case 0x05: handle_1a05(regs); break;
case 0x06: handle_1a06(regs); break;
case 0x07: handle_1a07(regs); break;
- case 0xb1: handle_1ab1(regs); break;
default: handle_1aXX(regs); break;
}
}
#define DEBUG_ISR_hwpic2 5
#define DEBUG_HDL_pnp 1
#define DEBUG_HDL_pmm 1
-#define DEBUG_HDL_pcibios32 9
+#define DEBUG_HDL_pcibios 9
#define DEBUG_HDL_apm 9
#define DEBUG_unimplemented 2
}
}
+// Entry point for pci bios functions.
+void VISIBLE16 VISIBLE32SEG
+handle_pcibios(struct bregs *regs)
+{
+ debug_enter(regs, DEBUG_HDL_pcibios);
+ handle_1ab1(regs);
+}
+
/****************************************************************
* 32bit interface
****************************************************************/
-// Entry point for 32bit pci bios functions.
-void VISIBLE32SEG
-handle_pcibios32(struct bregs *regs)
-{
- debug_enter(regs, DEBUG_HDL_pcibios32);
- handle_1ab1(regs);
-}
-
struct bios32_s {
u32 signature;
u32 entry;
SET_IVT(0x17, FUNC16(entry_17));
SET_IVT(0x18, FUNC16(entry_18));
SET_IVT(0x19, FUNC16(entry_19_official));
- SET_IVT(0x1a, FUNC16(entry_1a));
+ SET_IVT(0x1a, FUNC16(entry_1a_official));
SET_IVT(0x40, FUNC16(entry_40));
// INT 60h-66h reserved for user interrupt
popfl
lretl
-// PCI-BIOS 32bit entry point
+// PCI-BIOS entry points
DECLFUNC entry_pcibios32
entry_pcibios32:
pushfl
pushl %gs // Backup %gs and set %gs=%ds
pushl %ds
popl %gs
- ENTRY_ARG_ESP _cfunc32seg_handle_pcibios32
+ ENTRY_ARG_ESP _cfunc32seg_handle_pcibios
popl %gs
popfl
lretl
+ .code16gcc
+ DECLFUNC entry_pcibios16
+entry_pcibios16:
+ ENTRY_ARG handle_pcibios
+ iretw
+
// BIOS32 support
+ .code32
DECLFUNC entry_bios32
entry_bios32:
pushfl
// 0xfa6e - vgafont8 in font.c
ORG 0xfe6e
+ .global entry_1a_official
+entry_1a_official:
+ cmpb $0xb1, %ah
+ je entry_pcibios16 // PCIBIOS calls can be in protected mode
IRQ_ENTRY_ARG 1a
ORG 0xfea5