Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\mtrr\generic.c Create Date:2022-07-28 08:06:10
Last Modify:2022-05-18 17:45:43 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Grab all of the MTRR state for this CPU into *state

Proto:bool __init get_mtrr_state(void)

Type:bool

Parameter:Nothing

469  vrs = var_ranges
471  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_MTRRcap, lo, dummy)
472  have_fixed = lo >> 8 & 1
474  When i < num_var_ranges cycle Get the MSR pair relating to a var range
476  If have_fixed Then get_fixed_ranges(fixed_ranges)
479  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_MTRRdefType, lo, dummy)
480  def_type = lo & 0xff
481  enabled = (lo & 0xc00) >> 10
483  If amd_special_default_mtrr() Then
487  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_K8_TOP_MEM2, low, high)
488  mtrr_tom2 = high
489  mtrr_tom2 <<= 32
490  mtrr_tom2 |= low
491  mtrr_tom2 &= 0xffffff800000ULL
494  print_mtrr_state()
496  mtrr_state_set = 1
498  Return Not Not (enabled & MTRR_STATE_MTRR_ENABLED)