diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2008-03-05 21:09:59 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2008-03-05 21:09:59 -0500 |
commit | 19786767cff71f52950c2902c2e3e93545c06a86 (patch) | |
tree | 9f0d188604667dfa937fb024e5f87313deeb679e /src | |
parent | a75284dbd70acc7ec4a832045c8a2fbec2d773d8 (diff) | |
download | seabios-19786767cff71f52950c2902c2e3e93545c06a86.tar.gz |
Rename VISIBLE macro for better control.
VISIBLE16 is used to mark functions externally available in 16bit code.
VISIBLE32 is for 32bit functions.
Diffstat (limited to 'src')
-rw-r--r-- | src/boot.c | 8 | ||||
-rw-r--r-- | src/clock.c | 8 | ||||
-rw-r--r-- | src/disk.c | 6 | ||||
-rw-r--r-- | src/floppy.c | 4 | ||||
-rw-r--r-- | src/floppy_dbt.c | 2 | ||||
-rw-r--r-- | src/kbd.c | 4 | ||||
-rw-r--r-- | src/mouse.c | 2 | ||||
-rw-r--r-- | src/post.c | 2 | ||||
-rw-r--r-- | src/serial.c | 4 | ||||
-rw-r--r-- | src/system.c | 14 | ||||
-rw-r--r-- | src/types.h | 11 |
11 files changed, 37 insertions, 28 deletions
@@ -15,7 +15,7 @@ // 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 @@ -178,7 +178,7 @@ try_boot(u16 seq_nr) } // Boot Failure recovery: try the next device. -void VISIBLE +void VISIBLE16 handle_18() { debug_enter(NULL); @@ -187,7 +187,7 @@ handle_18() } // INT 19h Boot Load Service Entry Point -void VISIBLE +void VISIBLE16 handle_19() { debug_enter(NULL); @@ -195,7 +195,7 @@ handle_19() } // Called from 32bit code - start boot process -void VISIBLE +void VISIBLE16 begin_boot() { if (CONFIG_ATA) diff --git a/src/clock.c b/src/clock.c index a8c1d2ec..6b121371 100644 --- a/src/clock.c +++ b/src/clock.c @@ -230,7 +230,7 @@ handle_1aXX(struct bregs *regs) } // INT 1Ah Time-of-day Service Entry Point -void VISIBLE +void VISIBLE16 handle_1a(struct bregs *regs) { //debug_enter(regs); @@ -250,14 +250,14 @@ handle_1a(struct bregs *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); @@ -338,7 +338,7 @@ handle_1583(struct bregs *regs) } // int70h: IRQ8 - CMOS RTC -void VISIBLE +void VISIBLE16 handle_70(struct bregs *regs) { debug_isr(regs); @@ -702,7 +702,7 @@ handle_legacy_disk(struct bregs *regs, u8 drive) disk_13(regs, device); } -void VISIBLE +void VISIBLE16 handle_40(struct bregs *regs) { debug_enter(regs); @@ -711,7 +711,7 @@ handle_40(struct bregs *regs) } // INT 13h Fixed Disk Services Entry Point -void VISIBLE +void VISIBLE16 handle_13(struct bregs *regs) { debug_enter(regs); @@ -737,7 +737,7 @@ done: } // record completion in BIOS task complete flag -void VISIBLE +void VISIBLE16 handle_76(struct bregs *regs) { debug_isr(regs); diff --git a/src/floppy.c b/src/floppy.c index 5a7513b2..a0352384 100644 --- a/src/floppy.c +++ b/src/floppy.c @@ -21,7 +21,7 @@ // 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 @@ -714,7 +714,7 @@ floppy_13(struct bregs *regs, u8 drive) } // INT 0Eh Diskette Hardware ISR Entry Point -void VISIBLE +void VISIBLE16 handle_0e(struct bregs *regs) { //debug_isr(regs); diff --git a/src/floppy_dbt.c b/src/floppy_dbt.c index dc8ebc0a..4c83f693 100644 --- a/src/floppy_dbt.c +++ b/src/floppy_dbt.c @@ -9,7 +9,7 @@ // 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, @@ -234,7 +234,7 @@ set_leds() } // INT 16h Keyboard Service Entry Point -void VISIBLE +void VISIBLE16 handle_16(struct bregs *regs) { // debug_enter(regs); @@ -541,7 +541,7 @@ process_key(u8 scancode) } // INT09h : Keyboard Hardware Service Entry Point -void VISIBLE +void VISIBLE16 handle_09(struct bregs *regs) { //debug_isr(regs); diff --git a/src/mouse.c b/src/mouse.c index fd462193..aeb1ef4f 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -412,7 +412,7 @@ int74_function() } // INT74h : PS/2 mouse hardware interrupt -void VISIBLE +void VISIBLE16 handle_74(struct bregs *regs) { //debug_isr(regs); @@ -641,7 +641,7 @@ check_restart_status() call16(&br); } -void VISIBLE +void VISIBLE32 _start() { init_dma(); diff --git a/src/serial.c b/src/serial.c index 63d17666..e6cb0523 100644 --- a/src/serial.c +++ b/src/serial.c @@ -113,7 +113,7 @@ handle_14XX(struct bregs *regs) } // INT 14h Serial Communications Service Entry Point -void VISIBLE +void VISIBLE16 handle_14(struct bregs *regs) { debug_enter(regs); @@ -215,7 +215,7 @@ handle_17XX(struct bregs *regs) } // INT17h : Printer Service Entry Point -void VISIBLE +void VISIBLE16 handle_17(struct bregs *regs) { debug_enter(regs); diff --git a/src/system.c b/src/system.c index 6f581ef8..67fdb630 100644 --- a/src/system.c +++ b/src/system.c @@ -403,7 +403,7 @@ handle_15XX(struct bregs *regs) } // INT 15h System Services Entry Point -void VISIBLE +void VISIBLE16 handle_15(struct bregs *regs) { //debug_enter(regs); @@ -428,7 +428,7 @@ handle_15(struct bregs *regs) } // INT 12h Memory Size Service Entry Point -void VISIBLE +void VISIBLE16 handle_12(struct bregs *regs) { debug_enter(regs); @@ -437,7 +437,7 @@ handle_12(struct bregs *regs) } // INT 11h Equipment List Service Entry Point -void VISIBLE +void VISIBLE16 handle_11(struct bregs *regs) { debug_enter(regs); @@ -446,21 +446,21 @@ handle_11(struct bregs *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); @@ -468,7 +468,7 @@ handle_nmi(struct bregs *regs) } // INT 75 - IRQ13 - MATH COPROCESSOR EXCEPTION -void VISIBLE +void VISIBLE16 handle_75(struct bregs *regs) { debug_isr(regs); diff --git a/src/types.h b/src/types.h index 10c3dfe5..197bb95e 100644 --- a/src/types.h +++ b/src/types.h @@ -15,7 +15,16 @@ typedef signed int s32; 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])) |