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/d7d46650d717
branches:  trunk
changeset: 346907:d7d46650d717
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 102d8ddd1241 -r d7d46650d717 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