summaryrefslogtreecommitdiffstats
path: root/sys
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
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')
-rw-r--r--sys/i386/acpica/acpi_wakecode.S9
-rw-r--r--sys/modules/acpi/acpi/Makefile4
2 files changed, 7 insertions, 6 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 */
diff --git a/sys/modules/acpi/acpi/Makefile b/sys/modules/acpi/acpi/Makefile
index 17a4323..12e1623 100644
--- a/sys/modules/acpi/acpi/Makefile
+++ b/sys/modules/acpi/acpi/Makefile
@@ -77,11 +77,11 @@ opt_ddb.h: Makefile
# Machine-specific code such as sleep/wakeup
SRCS+= acpi_machdep.c acpi_wakecode.h acpi_wakeup.c
.if ${MACHINE} == "i386"
-SRCS+= madt.c
+SRCS+= madt.c assym.s
.endif
CLEANFILES+= acpi_wakecode.h acpi_wakecode.o acpi_wakecode.bin ${DBSRC:.c=.o}
-acpi_wakecode.h: acpi_wakecode.S
+acpi_wakecode.h: acpi_wakecode.S assym.s
${MAKE} -f ${.CURDIR}/../../../${MACHINE_ARCH}/acpica/Makefile \
MAKESRCPATH=${.CURDIR}/../../../${MACHINE_ARCH}/acpica
OpenPOWER on IntegriCloud