From: kettenis Date: Sun, 26 Apr 2015 09:49:42 +0000 (+0000) Subject: Enable NX support in the resume path. Makes suspend/resume work with the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=29372b22a9e2a7a53c140dd0b3bc70d222604021;p=openbsd Enable NX support in the resume path. Makes suspend/resume work with the PAE pmap. ok deraadt@, mlarkin@ --- diff --git a/sys/arch/i386/i386/acpi_wakecode.S b/sys/arch/i386/i386/acpi_wakecode.S index 9570ec2883a..952dc78a522 100644 --- a/sys/arch/i386/i386/acpi_wakecode.S +++ b/sys/arch/i386/i386/acpi_wakecode.S @@ -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