Basic support for PCI BIOS.
[seabios.git] / src / util.h
index 7d5b7c8b1eaeab746346dd6ab58ce5699f45e3f6..d553b3ad6ca79fcf751416c77eb108d6d499bc60 100644 (file)
@@ -45,6 +45,7 @@ static inline void hlt(void)
 // XXX - move this to a c file and use PANIC PORT.
 #define BX_PANIC(fmt, args...) do { \
         bprintf(0, fmt , ##args);   \
+        irq_disable();              \
         for (;;)                    \
             hlt();                  \
     } while (0)
@@ -83,22 +84,20 @@ eoi_both_pics()
     eoi_master_pic();
 }
 
+// Call a function with a specified register state.  Note that on
+// return, the interrupt enable/disable flag may be altered.
 static inline
 void call16(struct bregs *callregs)
 {
     asm volatile(
-        "pushl %%ebp\n" // Save state
-        "pushfl\n"
 #ifdef MODE16
         "calll __call16\n"
 #else
         "calll __call16_from32\n"
 #endif
-        "popfl\n"       // Restore state
-        "popl %%ebp\n"
         : "+a" (callregs), "+m" (*callregs)
         :
-        : "ebx", "ecx", "edx", "esi", "edi");
+        : "ebx", "ecx", "edx", "esi", "edi", "ebp", "cc");
 }
 
 static inline
@@ -170,6 +169,9 @@ void handle_1583(struct bregs *regs);
 // apm.c
 void VISIBLE16 handle_1553(struct bregs *regs);
 
+// pcibios.c
+void handle_1ab1(struct bregs *regs);
+
 // util.c
 void usleep(u32 count);