diff options
author | Mike Larkin <mlarkin@cvs.openbsd.org> | 2009-11-24 17:00:02 +0000 |
---|---|---|
committer | Mike Larkin <mlarkin@cvs.openbsd.org> | 2009-11-24 17:00:02 +0000 |
commit | 2d7c096b13915d581dcff6bfe4928b058a6ee29a (patch) | |
tree | 41ae2a0983a31771f80fb41aed31be5f837fc1d4 /sys/arch | |
parent | 91b0184fb6307e543a68f54380bebe94334ad6e1 (diff) |
Poke CR3 one last time before resuming. Suggested by deraadt@.
ok deraadt@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/amd64/acpi_wakecode.S | 6 | ||||
-rw-r--r-- | sys/arch/i386/i386/acpi_wakecode.S | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/sys/arch/amd64/amd64/acpi_wakecode.S b/sys/arch/amd64/amd64/acpi_wakecode.S index 3b49a1e0569..bd0763d46ab 100644 --- a/sys/arch/amd64/amd64/acpi_wakecode.S +++ b/sys/arch/amd64/amd64/acpi_wakecode.S @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi_wakecode.S,v 1.4 2009/11/22 22:00:51 mlarkin Exp $ */ +/* $OpenBSD: acpi_wakecode.S,v 1.5 2009/11/24 17:00:01 mlarkin Exp $ */ /* * Copyright (c) 2001 Takanori Watanabe <takawata@jp.freebsd.org> * Copyright (c) 2001 Mitsuru IWASAKI <iwasaki@jp.freebsd.org> @@ -367,6 +367,10 @@ _C_LABEL(acpi_long_mode_resume): movq acpi_saved_r14, %r14 movq acpi_saved_r15, %r15 + /* Poke CR3 one more time. Might not be necessary */ + movq acpi_saved_cr3, %rax + movq %rax, %cr3 + xorq %rax, %rax jmp *acpi_saved_ret diff --git a/sys/arch/i386/i386/acpi_wakecode.S b/sys/arch/i386/i386/acpi_wakecode.S index 2b0ff810e92..3f80542bf8a 100644 --- a/sys/arch/i386/i386/acpi_wakecode.S +++ b/sys/arch/i386/i386/acpi_wakecode.S @@ -305,6 +305,10 @@ _C_LABEL(acpi_protected_mode_resume): push acpi_saved_fl popfl + /* Poke CR3 one more time. Might not be necessary */ + movl acpi_saved_cr3,%eax + movl %eax,%cr3 + /* * Return to the OS. We've previously saved the resume * address in acpi_saved_ret (via a call to acpi_savecpu |