pc: enable page size extension early in apbootstrap

vmware in efi mode brings application processors up
with CR4 = 0 (pse disabled) which makes us page fault
when accessing the ap's pdb which might be in a 4MB
mapping when the boot processor used pse to setup
page tables.

so we unconditionally enable pse in apbootstrap
(and disable pae in case of surprises).
This commit is contained in:
cinap_lenrek 2014-11-04 05:52:42 +01:00
parent 32b5b2f42d
commit f5e45a02d4

View file

@ -73,6 +73,11 @@ TEXT _ap32(SB), $0
MOVL DX, (PDO(0))(CX)
MOVL CX, CR3 /* load and flush the mmu */
MOVL CR4, AX
ANDL $~0x00000020, AX /* ~PAE */
ORL $0x00000010, AX /* PSE */
MOVL AX, CR4
MOVL CR0, DX
ORL $0x80010000, DX /* PG|WP */
ANDL $~0x6000000A, DX /* ~(CD|NW|TS|MP) */