summaryrefslogtreecommitdiffstats
path: root/sys/i386/acpica
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2005-04-22 09:53:04 +0000
committeriedowse <iedowse@FreeBSD.org>2005-04-22 09:53:04 +0000
commit9729412480c126bc3deef18dbaa29c01f0619307 (patch)
treed528d634c3bc6a725e80f377f29d7663ace2ae8d /sys/i386/acpica
parentc5c274c35626c79aa1fef24afe48f708bf7bff4e (diff)
downloadFreeBSD-src-9729412480c126bc3deef18dbaa29c01f0619307.zip
FreeBSD-src-9729412480c126bc3deef18dbaa29c01f0619307.tar.gz
Pick up the selectors to use for various kernel segments from assym.s
instead of assuming fixed offsets within the GDT. The hard-coded values here have been incorrect since Peter's GDT rearranging around 10 days ago, causing ACPI resume problems. Reviewed by: peter
Diffstat (limited to 'sys/i386/acpica')
-rw-r--r--sys/i386/acpica/acpi_wakecode.S9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/i386/acpica/acpi_wakecode.S b/sys/i386/acpica/acpi_wakecode.S
index 9a22fb1..c2d3039 100644
--- a/sys/i386/acpica/acpi_wakecode.S
+++ b/sys/i386/acpica/acpi_wakecode.S
@@ -30,9 +30,10 @@
#define LOCORE
#include <machine/asmacros.h>
-#include <machine/param.h>
#include <machine/specialreg.h>
+#include "assym.s"
+
.align 4
.code16
wakeup_16:
@@ -99,7 +100,7 @@ wakeup_16_gdt:
wakeup_sw32:
/* Switch to protected mode by intersegmental jump */
- ljmpl $0x8,$0x12345678 /* Code location, to be replaced */
+ ljmpl $KCSEL,$0x12345678 /* Code location, to be replaced */
.code32
wakeup_32:
@@ -111,12 +112,12 @@ wakeup_32:
nop
/* Set up segment registers for protected mode */
- movw $0x10,%ax /* KDSEL to segment registers */
+ movw $KDSEL,%ax /* KDSEL to segment registers */
movw %ax,%ds
movw %ax,%es
movw %ax,%gs
movw %ax,%ss
- movw $0x18,%ax /* KPSEL to %fs */
+ movw $KPSEL,%ax /* KPSEL to %fs */
movw %ax,%fs
movl %esi,%esp /* physical address stack pointer */
OpenPOWER on IntegriCloud