Enable NX support in the resume path. Makes suspend/resume work with the
authorkettenis <kettenis@openbsd.org>
Sun, 26 Apr 2015 09:49:42 +0000 (09:49 +0000)
committerkettenis <kettenis@openbsd.org>
Sun, 26 Apr 2015 09:49:42 +0000 (09:49 +0000)
PAE pmap.

ok deraadt@, mlarkin@

sys/arch/i386/i386/acpi_wakecode.S

index 9570ec2..952dc78 100644 (file)
@@ -200,6 +200,15 @@ _C_LABEL(acpi_protected_mode_resume):
        mov     acpi_saved_cr4,%eax
        mov     %eax,%cr4
 
+       testl   $CR4_PAE, %eax
+       jz      1f
+
+       movl    $MSR_EFER, %ecx
+       rdmsr
+       orl     $EFER_NXE, %eax
+       wrmsr
+
+1:
        /*
         * Re-enable paging, using the CR3 we stored before suspend
         * as our new page table base location. Restore CR0 after