]> xenbits.xensource.com Git - seabios.git/commitdiff
Fix int 1589 calls when CONFIG_ENTRY_EXTRASTACK is enabled.
authorKevin O'Connor <kevin@koconnor.net>
Thu, 8 May 2014 22:32:32 +0000 (18:32 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Thu, 8 May 2014 22:44:35 +0000 (18:44 -0400)
The int 1589 call is entered in real mode and returns in protected
mode.  However, the code to use the "extra stack" does not support
that.  Fix this by never using the "extra stack" on int 1589 calls.

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

index 0d9e66f6055b6ad84054dd3bff74547c97159400..0fdd28e742dbb7f83e31778fd442eef3346878f9 100644 (file)
@@ -61,7 +61,7 @@ ivt_init(void)
     SET_IVT(0x12, FUNC16(entry_12));
     SET_IVT(0x13, FUNC16(entry_13_official));
     SET_IVT(0x14, FUNC16(entry_14));
-    SET_IVT(0x15, FUNC16(entry_15));
+    SET_IVT(0x15, FUNC16(entry_15_official));
     SET_IVT(0x16, FUNC16(entry_16));
     SET_IVT(0x17, FUNC16(entry_17));
     SET_IVT(0x18, FUNC16(entry_18));
index f6b797933e5e3f5eb149e8937825644ae6266507..57e8bcc12785960a810643473f4f29a654d5523d 100644 (file)
@@ -378,6 +378,12 @@ entry_pcibios16:
         ENTRY_ARG handle_pcibios
         iretw
 
+// int 1589 entry point
+        DECLFUNC entry_1589
+entry_1589:
+        ENTRY_ARG handle_1589
+        iretw
+
 // BIOS32 support
         .code32
         DECLFUNC entry_bios32
@@ -682,6 +688,10 @@ entry_10_0x0f:
         IRQ_ENTRY_ARG 11
 
         ORG 0xf859
+        .global entry_15_official
+entry_15_official:
+        cmpb $0x89, %ah
+        je entry_1589           // 1589 calls return in protected mode
         IRQ_ENTRY_ARG 15
 
         // 0xfa6e - vgafont8 in font.c
index 3cb2228f520d572551a203fa8d101a44484aa0d0..756dc3119b5f4c44d73d11afac474ca9cd66f998 100644 (file)
@@ -191,9 +191,10 @@ handle_1588(struct bregs *regs)
 }
 
 // Switch to protected mode
-static void
+void VISIBLE16
 handle_1589(struct bregs *regs)
 {
+    debug_enter(regs, DEBUG_HDL_15);
     set_a20(1);
 
     pic_reset(regs->bl, regs->bh);
@@ -355,7 +356,6 @@ handle_15(struct bregs *regs)
     case 0x86: handle_1586(regs); break;
     case 0x87: handle_1587(regs); break;
     case 0x88: handle_1588(regs); break;
-    case 0x89: handle_1589(regs); break;
     case 0x90: handle_1590(regs); break;
     case 0x91: handle_1591(regs); break;
     case 0xc0: handle_15c0(regs); break;