Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:mtrr_bp_init - initialize mtrrs on the boot CPU* This needs to be called early; before any of the other CPUs are* initialized (i.e. before smp_init()).

Proto:void __init mtrr_bp_init(void)

Type:void

Parameter:Nothing

693  HACK ALERT!* These should be called implicitly, but we can't yet until all the initcall* stuff is done...
695  phys_addr = 32
697  If boot_cpu_has(Memory Type Range Registers ) Then
698  mtrr_if = generic_mtrr_ops
699  size_or_mask = SIZE_OR_MASK_BITS(36)
700  size_and_mask = 0x00f00000
701  phys_addr = 36
708  If CPUID functions returning a single datum >= 0x80000008 Then
711  If CPU vendor == X86_VENDOR_INTEL && CPU family == 0xF && x86_model == 0x3 && ( x86_stepping == 0x3 || x86_stepping == 0x4 ) Then phys_addr = 36
719  size_and_mask = ~size_or_mask & 0xfffff00000ULL
720  Else if CPU vendor == X86_VENDOR_CENTAUR && CPU family == 6 Then
727  size_and_mask = 0
728  phys_addr = 32
730  Else
739  Break
746  Break
753  Break
754  Default
755  Break
759  If mtrr_if Then
760  __mtrr_enabled = true
761  This function returns the number of variable MTRRs
762  init_table()
763  If use_intel() Then
767  If mtrr_enabled() Then mtrr_bp_pat_init()
770  If mtrr_cleanup(phys_addr) Then
772  set_all()
777  If Not mtrr_enabled() Then
778  pr_info("Disabled\n")
785  pat_disable("MTRRs disabled, skipping PAT initialization too.")