]> xenbits.xensource.com Git - seabios.git/commitdiff
nmi: Don't try to switch onto extra stack in NMI handler
authorKevin O'Connor <kevin@koconnor.net>
Wed, 23 Dec 2015 20:33:02 +0000 (15:33 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Mon, 28 Dec 2015 16:48:26 +0000 (11:48 -0500)
The NMI could occur when already on the extra stack, which would
corrupt it.  Always use the current stack on an NMI to avoid this.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/romlayout.S

index fedadfe1c3f1755a35cdab083b9fa4fe9ebb9e4d..53cc0f5e3d45c51dc263757b08871309d8a0d1a0 100644 (file)
@@ -548,7 +548,10 @@ entry_post:
         ENTRY_INTO32 _cfunc32flat_handle_post   // Normal entry point
 
         ORG 0xe2c3
-        IRQ_ENTRY 02
+        .global entry_02
+entry_02:
+        ENTRY handle_02  // NMI handler does not switch onto extra stack
+        iretw
 
         ORG 0xe3fe
         .global entry_13_official