• Andi Kleen's avatar
    x86: do kernel direct mapping at boot using GB pages · ef925766
    Andi Kleen authored
    The AMD Fam10h CPUs support new Gigabyte page table entry for
    mapping 1GB at a time. Use this for the kernel direct mapping.
    
    Only done for 64bit because i386 does not support GB page tables.
    
    This only applies to the data portion of the direct mapping; the
    kernel text mapping stays with 2MB pages because the AMD Fam10h
    microarchitecture does not support GB ITLBs and AMD recommends
    against using GB mappings for code.
    
    Can be disabled with disable_gbpages on the kernel command line
    
    [ tglx@linutronix.de: simplify enable code ]
    [ Yinghai Lu <yinghai.lu@sun.com>: boot fix on 256 GB RAM ]
    Signed-off-by: default avatarAndi Kleen <ak@suse.de>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    ef925766
init_64.c 19.7 KB