VISIBLE16 is used to mark functions externally available in 16bit code.
VISIBLE32 is for 32bit functions.
// We need a copy of this string, but we are not actually a PnP BIOS,
// so make sure it is *not* aligned, so OSes will not see it if they
// scan.
-char pnp_string[] VISIBLE __attribute__((aligned (2))) = " $PnP";
+char pnp_string[] VISIBLE16 __attribute__((aligned (2))) = " $PnP";
//--------------------------------------------------------------------------
// print_boot_device
}
// Boot Failure recovery: try the next device.
-void VISIBLE
+void VISIBLE16
handle_18()
{
debug_enter(NULL);
}
// INT 19h Boot Load Service Entry Point
-void VISIBLE
+void VISIBLE16
handle_19()
{
debug_enter(NULL);
}
// Called from 32bit code - start boot process
-void VISIBLE
+void VISIBLE16
begin_boot()
{
if (CONFIG_ATA)
}
// INT 1Ah Time-of-day Service Entry Point
-void VISIBLE
+void VISIBLE16
handle_1a(struct bregs *regs)
{
//debug_enter(regs);
}
// User Timer Tick
-void VISIBLE
+void VISIBLE16
handle_1c(struct bregs *regs)
{
//debug_enter(regs);
}
// INT 08h System Timer ISR Entry Point
-void VISIBLE
+void VISIBLE16
handle_08(struct bregs *regs)
{
// debug_isr(regs);
}
// int70h: IRQ8 - CMOS RTC
-void VISIBLE
+void VISIBLE16
handle_70(struct bregs *regs)
{
debug_isr(regs);
disk_13(regs, device);
}
-void VISIBLE
+void VISIBLE16
handle_40(struct bregs *regs)
{
debug_enter(regs);
}
// INT 13h Fixed Disk Services Entry Point
-void VISIBLE
+void VISIBLE16
handle_13(struct bregs *regs)
{
debug_enter(regs);
}
// record completion in BIOS task complete flag
-void VISIBLE
+void VISIBLE16
handle_76(struct bregs *regs)
{
debug_isr(regs);
// Since no provisions are made for multiple drive types, most
// values in this table are ignored. I set parameters for 1.44M
// floppy here
-struct floppy_ext_dbt_s diskette_param_table2 VISIBLE = {
+struct floppy_ext_dbt_s diskette_param_table2 VISIBLE16 = {
.dbt = {
.specify1 = 0xAF,
.specify2 = 0x02, // head load time 0000001, DMA used
}
// INT 0Eh Diskette Hardware ISR Entry Point
-void VISIBLE
+void VISIBLE16
handle_0e(struct bregs *regs)
{
//debug_isr(regs);
// Since no provisions are made for multiple drive types, most
// values in this table are ignored. I set parameters for 1.44M
// floppy here
-struct floppy_dbt_s diskette_param_table VISIBLE = {
+struct floppy_dbt_s diskette_param_table VISIBLE16 = {
.specify1 = 0xAF,
.specify2 = 0x02, // head load time 0000001, DMA used
.shutoff_ticks = 0x25,
}
// INT 16h Keyboard Service Entry Point
-void VISIBLE
+void VISIBLE16
handle_16(struct bregs *regs)
{
// debug_enter(regs);
}
// INT09h : Keyboard Hardware Service Entry Point
-void VISIBLE
+void VISIBLE16
handle_09(struct bregs *regs)
{
//debug_isr(regs);
}
// INT74h : PS/2 mouse hardware interrupt
-void VISIBLE
+void VISIBLE16
handle_74(struct bregs *regs)
{
//debug_isr(regs);
call16(&br);
}
-void VISIBLE
+void VISIBLE32
_start()
{
init_dma();
}
// INT 14h Serial Communications Service Entry Point
-void VISIBLE
+void VISIBLE16
handle_14(struct bregs *regs)
{
debug_enter(regs);
}
// INT17h : Printer Service Entry Point
-void VISIBLE
+void VISIBLE16
handle_17(struct bregs *regs)
{
debug_enter(regs);
}
// INT 15h System Services Entry Point
-void VISIBLE
+void VISIBLE16
handle_15(struct bregs *regs)
{
//debug_enter(regs);
}
// INT 12h Memory Size Service Entry Point
-void VISIBLE
+void VISIBLE16
handle_12(struct bregs *regs)
{
debug_enter(regs);
}
// INT 11h Equipment List Service Entry Point
-void VISIBLE
+void VISIBLE16
handle_11(struct bregs *regs)
{
debug_enter(regs);
}
// INT 05h Print Screen Service Entry Point
-void VISIBLE
+void VISIBLE16
handle_05(struct bregs *regs)
{
debug_enter(regs);
}
// INT 10h Video Support Service Entry Point
-void VISIBLE
+void VISIBLE16
handle_10(struct bregs *regs)
{
debug_enter(regs);
// dont do anything, since the VGA BIOS handles int10h requests
}
-void VISIBLE
+void VISIBLE16
handle_nmi(struct bregs *regs)
{
debug_isr(regs);
}
// INT 75 - IRQ13 - MATH COPROCESSOR EXCEPTION
-void VISIBLE
+void VISIBLE16
handle_75(struct bregs *regs)
{
debug_isr(regs);
typedef u32 size_t;
typedef unsigned long long u64;
-#define VISIBLE __attribute__((externally_visible))
+#define __VISIBLE __attribute__((externally_visible))
+#ifdef MODE16
+// Notes a function as externally visible in the 16bit code chunk.
+#define VISIBLE16 __VISIBLE
+// Notes a function as externally visible in the 32bit code chunk.
+#define VISIBLE32
+#else
+#define VISIBLE16
+#define VISIBLE32 __VISIBLE
+#endif
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))