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 the stack to save %edx.



details:   https://anonhg.NetBSD.org/src/rev/94fd8532e3d4
branches:  trunk
changeset: 817049:94fd8532e3d4
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Aug 06 14:54:25 2016 +0000

description:
Use the stack to save %edx.

diffstat:

 sys/arch/i386/acpi/acpi_wakeup_low.S |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r fbe43182d362 -r 94fd8532e3d4 sys/arch/i386/acpi/acpi_wakeup_low.S
--- a/sys/arch/i386/acpi/acpi_wakeup_low.S      Sat Aug 06 14:51:01 2016 +0000
+++ b/sys/arch/i386/acpi/acpi_wakeup_low.S      Sat Aug 06 14:54:25 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: acpi_wakeup_low.S,v 1.7 2016/07/24 14:09:22 maxv Exp $ */
+/*     $NetBSD: acpi_wakeup_low.S,v 1.8 2016/08/06 14:54:25 maxv Exp $ */
 
 /*-
  * Copyright (c) 2007 Joerg Sonnenberger <joerg%netbsd.org@localhost>
@@ -29,7 +29,7 @@
  */
 
 #include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup_low.S,v 1.7 2016/07/24 14:09:22 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup_low.S,v 1.8 2016/08/06 14:54:25 maxv Exp $");
 
 #include "assym.h"
 #include <machine/segments.h>
@@ -105,8 +105,9 @@
        movl    %esp,ACPI_SUSPEND_REG+(4*4)(%edx)
 
        movl    $MSR_EFER,%ecx
-       rdmsr
-       movl    CPUVAR(SELF),%edx
+       pushl   %edx
+       rdmsr   /* overwrites %edx */
+       popl    %edx
        movl    %eax,ACPI_SUSPEND_EFER(%edx)
 
        movl    %cr0,%eax



Home | Main Index | Thread Index | Old Index