[SeaBIOS] [PATCH 12/23] Move optionroms.h to std/optionrom.h and util.h.

Kevin O'Connor kevin at koconnor.net
Sun Sep 15 07:10:38 CEST 2013


Signed-off-by: Kevin O'Connor <kevin at koconnor.net>
---
 src/fw/csm.c                          | 2 +-
 src/malloc.c                          | 2 +-
 src/optionroms.c                      | 2 +-
 src/{optionroms.h => std/optionrom.h} | 3 ---
 src/util.h                            | 4 ++++
 vgasrc/vgabios.c                      | 2 +-
 6 files changed, 8 insertions(+), 7 deletions(-)
 rename src/{optionroms.h => std/optionrom.h} (95%)

diff --git a/src/fw/csm.c b/src/fw/csm.c
index 7a926b1..b98dc96 100644
--- a/src/fw/csm.c
+++ b/src/fw/csm.c
@@ -14,11 +14,11 @@
 #include "hw/pic.h"
 #include "malloc.h" // csm_malloc_preinit
 #include "memmap.h"
-#include "optionroms.h"
 #include "output.h" // dprintf
 #include "post.h"
 #include "smbios.h"
 #include "stacks.h" // wait_threads
+#include "std/optionrom.h" // struct rom_header
 #include "util.h" // copy_smbios
 
 struct rsdp_descriptor csm_rsdp VARFSEG __aligned(16);
diff --git a/src/malloc.c b/src/malloc.c
index 65a0bb1..281f41e 100644
--- a/src/malloc.c
+++ b/src/malloc.c
@@ -9,9 +9,9 @@
 #include "list.h" // hlist_node
 #include "malloc.h" // _malloc
 #include "memmap.h" // struct e820entry
-#include "optionroms.h" // OPTION_ROM_ALIGN
 #include "output.h" // dprintf
 #include "stacks.h" // wait_preempt
+#include "std/optionrom.h" // OPTION_ROM_ALIGN
 #include "string.h" // memset
 
 // Information on a reserved area.
diff --git a/src/optionroms.c b/src/optionroms.c
index b38e44e..8f9bb31 100644
--- a/src/optionroms.c
+++ b/src/optionroms.c
@@ -13,10 +13,10 @@
 #include "hw/pci_ids.h" // PCI_CLASS_DISPLAY_VGA
 #include "hw/pci_regs.h" // PCI_ROM_ADDRESS
 #include "malloc.h" // rom_confirm
-#include "optionroms.h" // struct rom_header
 #include "output.h" // dprintf
 #include "romfile.h" // romfile_loadint
 #include "stacks.h" // farcall16big
+#include "std/optionrom.h" // struct rom_header
 #include "string.h" // memset
 #include "util.h" // get_pnp_offset
 
diff --git a/src/optionroms.h b/src/std/optionrom.h
similarity index 95%
rename from src/optionroms.h
rename to src/std/optionrom.h
index c5ea4ba..94ca4ae 100644
--- a/src/optionroms.h
+++ b/src/std/optionrom.h
@@ -56,7 +56,4 @@ struct pnp_data {
 #define OPTION_ROM_INITVECTOR offsetof(struct rom_header, initVector[0])
 #define PCIROM_CODETYPE_X86 0
 
-void
-callrom(struct rom_header *rom, u16 bdf);
-
 #endif
diff --git a/src/util.h b/src/util.h
index 2c65494..06483ba 100644
--- a/src/util.h
+++ b/src/util.h
@@ -47,6 +47,10 @@ int irqtimer_check(u32 end);
 void apm_shutdown(void);
 void handle_1553(struct bregs *regs);
 
+// optionroms.c
+struct rom_header;
+void callrom(struct rom_header *rom, u16 bdf);
+
 // pcibios.c
 void handle_1ab1(struct bregs *regs);
 void bios32_init(void);
diff --git a/vgasrc/vgabios.c b/vgasrc/vgabios.c
index 5206da9..a07fc91 100644
--- a/vgasrc/vgabios.c
+++ b/vgasrc/vgabios.c
@@ -11,8 +11,8 @@
 #include "config.h" // CONFIG_*
 #include "hw/pci.h" // pci_config_readw
 #include "hw/pci_regs.h" // PCI_VENDOR_ID
-#include "optionroms.h" // struct pci_data
 #include "output.h" // dprintf
+#include "std/optionrom.h" // struct pci_data
 #include "stdvga.h" // stdvga_set_cursor_shape
 #include "string.h" // memset_far
 #include "util.h" // VERSION
-- 
1.8.3.1




More information about the SeaBIOS mailing list