Function report |
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 activity | Download SCCT | Chinese |
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
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 |
709 | phys_addr = CPUID functions returning a single datum & 0xff |
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 |
730 | Else |
732 | Case CPU vendor == X86_VENDOR_AMD |
735 | mtrr_if = mtrr_ops[X86_VENDOR_AMD] |
736 | size_or_mask = SIZE_OR_MASK_BITS(32) |
737 | size_and_mask = 0 |
739 | Break |
740 | Case CPU vendor == X86_VENDOR_CENTAUR |
742 | mtrr_if = mtrr_ops[X86_VENDOR_CENTAUR] |
743 | size_or_mask = SIZE_OR_MASK_BITS(32) |
744 | size_and_mask = 0 |
746 | Break |
747 | Case CPU vendor == X86_VENDOR_CYRIX |
749 | mtrr_if = mtrr_ops[X86_VENDOR_CYRIX] |
750 | size_or_mask = SIZE_OR_MASK_BITS(32) |
751 | size_and_mask = 0 |
753 | Break |
754 | Default |
755 | Break |
759 | If mtrr_if Then |
760 | __mtrr_enabled = true |
762 | init_table() |
763 | If use_intel() Then |
765 | __mtrr_enabled = get_mtrr_state() |
767 | If mtrr_enabled() Then mtrr_bp_pat_init() |
770 | If mtrr_cleanup(phys_addr) Then |
771 | changed_by_mtrr_cleanup = 1 |
772 | set_all() |
777 | If Not mtrr_enabled() Then |
778 | pr_info("Disabled\n") |
785 | pat_disable("MTRRs disabled, skipping PAT initialization too.") |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |