Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/acpi Use predefined macro rather than hardcode...



details:   https://anonhg.NetBSD.org/src/rev/aaf142d2f70c
branches:  trunk
changeset: 555531:aaf142d2f70c
user:      junyoung <junyoung%NetBSD.org@localhost>
date:      Thu Nov 20 12:30:34 2003 +0000

description:
Use predefined macro rather than hardcoded value.

diffstat:

 sys/arch/i386/acpi/acpi_wakecode.S |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r 3e51465c739b -r aaf142d2f70c sys/arch/i386/acpi/acpi_wakecode.S
--- a/sys/arch/i386/acpi/acpi_wakecode.S        Thu Nov 20 09:47:53 2003 +0000
+++ b/sys/arch/i386/acpi/acpi_wakecode.S        Thu Nov 20 12:30:34 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi_wakecode.S,v 1.1 2002/06/18 07:25:13 tshiozak Exp $       */
+/*     $NetBSD: acpi_wakecode.S,v 1.2 2003/11/20 12:30:34 junyoung Exp $       */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -72,6 +72,7 @@
 
 #include <machine/specialreg.h>
 #include <machine/param.h>
+#include <machine/segments.h>
 
        .code16
        .org 0  /* ACPI spec says: cs==(phys>>8), ip==(phys&0x000F) */
@@ -122,13 +123,13 @@
 
        nop
        /* Set up segment registers for protected mode */
-       movw    $0x10,%ax               /* KDSEL to segment registers */
+       movw    $GSEL(GDATA_SEL,SEL_KPL),%ax
        movw    %ax,%ds
        movw    %ax,%es
        movw    %ax,%gs
        movw    %ax,%ss
        movw    %ax,%fs
-       
+
        /* Fixup TSS type field; 386 busy TSS (11) -> 386 available TSS (9) */
 #define TSS_TYPEFIX_MASK       0xf9
        movl    physical_gdt+2(%esi),%ebx



Home | Main Index | Thread Index | Old Index