From f5e45a02d4e1621a9720b3abcadd6b12e7fb4be0 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Tue, 4 Nov 2014 05:52:42 +0100 Subject: 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). --- sys/src/9/pc/apbootstrap.s | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sys/src') diff --git a/sys/src/9/pc/apbootstrap.s b/sys/src/9/pc/apbootstrap.s index 5407530f0..14d115224 100644 --- a/sys/src/9/pc/apbootstrap.s +++ b/sys/src/9/pc/apbootstrap.s @@ -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) */ -- cgit v1.2.3