Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\mce\amd.c Create Date:2022-07-28 08:03:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Reprogram MCx_MISC MSR behind this threshold bank.

Proto:static void threshold_restart_bank(void *_tr)

Type:void

Parameter:

TypeParameterName
void *_tr
379  tr = _tr
382  Access to machine-specific registers (available on 586 and better only)* Note: the rd* operations modify the parameters directly (without using* pointer indirection), this allows gcc to optimize better( MSR address for the block , lo, hi)
384  If * Value upon which threshold * interrupt is generated. < (hi & THRESHOLD_MAX) Then reset = 1
387  If reset Then
388  hi = hi & ~(MASK_ERR_COUNT_HI | MASK_OVERFLOW_HI) | THRESHOLD_MAX - * Value upon which threshold * interrupt is generated.
391  Else if old_limit Then
392  new_count = (hi & THRESHOLD_MAX) + old_limit - * Value upon which threshold * interrupt is generated.
395  hi = hi & ~MASK_ERR_COUNT_HI | new_count & THRESHOLD_MAX
400  hi &= ~MASK_INT_TYPE_HI
402  If Not Bank can generate an interrupt. Then Go to done
405  If set_lvt_off Then
406  If lvt_off_valid(b, lvt_off, lo, hi) Then
408  hi &= ~MASK_LVTOFF_HI
409  hi |= lvt_off << 20
413  If Enable/Disable APIC interrupt Then hi |= INT_TYPE_APIC
416  done :
418  hi |= MASK_COUNT_EN_HI
419  wrmsr( MSR address for the block , lo, hi)
Caller
NameDescribe
mce_threshold_block_init
log_and_reset_block