[SeaBIOS] [PATCH] Move most of the VAR16FIXED() defs to misc.c.

Kevin O'Connor kevin at koconnor.net
Sat May 31 03:49:13 CEST 2014


Signed-off-by: Kevin O'Connor <kevin at koconnor.net>
---
 src/disk.c      | 3 ---
 src/hw/floppy.c | 2 --
 src/misc.c      | 8 ++++++++
 src/serial.c    | 3 ---
 src/util.h      | 1 +
 5 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/disk.c b/src/disk.c
index 2aadd8a..fe2e2c3 100644
--- a/src/disk.c
+++ b/src/disk.c
@@ -744,6 +744,3 @@ handle_76(void)
     SET_BDA(disk_interrupt_flag, 0xff);
     pic_eoi2();
 }
-
-// Old Fixed Disk Parameter Table (newer tables are in the ebda).
-struct fdpt_s OldFDPT VAR16FIXED(0xe401);
diff --git a/src/hw/floppy.c b/src/hw/floppy.c
index f4d7c01..aa8583d 100644
--- a/src/hw/floppy.c
+++ b/src/hw/floppy.c
@@ -58,8 +58,6 @@ struct floppy_ext_dbt_s diskette_param_table2 VARFSEG = {
     .drive_type     = 4,    // drive type in cmos
 };
 
-struct floppy_dbt_s diskette_param_table VAR16FIXED(0xefc7);
-
 struct floppyinfo_s {
     struct chs_s chs;
     u8 floppy_size;
diff --git a/src/misc.c b/src/misc.c
index 21693fc..889064a 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -188,6 +188,14 @@ u8 BiosModelId VAR16FIXED(0xfffe) = BUILD_MODEL_ID;
 
 u8 BiosChecksum VAR16FIXED(0xffff);
 
+struct floppy_dbt_s diskette_param_table VAR16FIXED(0xefc7);
+
+// Old Fixed Disk Parameter Table (newer tables are in the ebda).
+struct fdpt_s OldFDPT VAR16FIXED(0xe401);
+
+// XXX - Baud Rate Generator Table
+u8 BaudTable[16] VAR16FIXED(0xe729);
+
 // XXX - Initial Interrupt Vector Offsets Loaded by POST
 u8 InitVectors[13] VAR16FIXED(0xfef3);
 
diff --git a/src/serial.c b/src/serial.c
index 00c6eb7..88349c8 100644
--- a/src/serial.c
+++ b/src/serial.c
@@ -181,9 +181,6 @@ handle_14(struct bregs *regs)
     }
 }
 
-// XXX - Baud Rate Generator Table
-u8 BaudTable[16] VAR16FIXED(0xe729);
-
 
 /****************************************************************
  * LPT ports
diff --git a/src/util.h b/src/util.h
index e7c9ff9..8b078e8 100644
--- a/src/util.h
+++ b/src/util.h
@@ -176,6 +176,7 @@ void process_key(u8 key);
 
 // misc.c
 extern struct bios_config_table_s BIOS_CONFIG_TABLE __aligned(1);
+extern struct floppy_dbt_s diskette_param_table __aligned(1);
 extern u8 BiosChecksum;
 int in_post(void);
 void mathcp_setup(void);
-- 
1.9.3




More information about the SeaBIOS mailing list