aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2008-03-05 21:09:59 -0500
committerKevin O'Connor <kevin@koconnor.net>2008-03-05 21:09:59 -0500
commit19786767cff71f52950c2902c2e3e93545c06a86 (patch)
tree9f0d188604667dfa937fb024e5f87313deeb679e /src
parenta75284dbd70acc7ec4a832045c8a2fbec2d773d8 (diff)
downloadseabios-hppa-19786767cff71f52950c2902c2e3e93545c06a86.zip
seabios-hppa-19786767cff71f52950c2902c2e3e93545c06a86.tar.gz
seabios-hppa-19786767cff71f52950c2902c2e3e93545c06a86.tar.bz2
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.c8
-rw-r--r--src/clock.c8
-rw-r--r--src/disk.c6
-rw-r--r--src/floppy.c4
-rw-r--r--src/floppy_dbt.c2
-rw-r--r--src/kbd.c4
-rw-r--r--src/mouse.c2
-rw-r--r--src/post.c2
-rw-r--r--src/serial.c4
-rw-r--r--src/system.c14
-rw-r--r--src/types.h11
11 files changed, 37 insertions, 28 deletions
diff --git a/src/boot.c b/src/boot.c
index a21136e..944eb21 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -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 a8c1d2e..6b12137 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);
diff --git a/src/disk.c b/src/disk.c
index 5a2f069..5088217 100644
--- a/src/disk.c
+++ b/src/disk.c
@@ -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 5a7513b..a035238 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 dc8ebc0..4c83f69 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,
diff --git a/src/kbd.c b/src/kbd.c
index e1f01a5..c89899f 100644
--- a/src/kbd.c
+++ b/src/kbd.c
@@ -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 fd46219..aeb1ef4 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);
diff --git a/src/post.c b/src/post.c
index b157a98..acd35db 100644
--- a/src/post.c
+++ b/src/post.c
@@ -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 63d1766..e6cb052 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 6f581ef..67fdb63 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 10c3dfe..197bb95 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]))