aboutsummaryrefslogtreecommitdiffstats
path: root/src/optionroms.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2009-02-08 19:43:47 -0500
committerKevin O'Connor <kevin@koconnor.net>2009-02-08 19:43:47 -0500
commit0a924124b4f5daf3735a7f81f906a387ba8296f4 (patch)
tree4b40dd53b8c7f2032eb7cf933dd1e00fc9e5f8cf /src/optionroms.c
parent8e62a90e7d4e4ea59f4463dabfc9fac1c305df7b (diff)
downloadseabios-0a924124b4f5daf3735a7f81f906a387ba8296f4.tar.gz
Add support for selecting harddrive order in boot menu.
Save ATA harddrive model name so that it can be shown from menu. Minor - use "ata0-1" not "ata0 slave". Fill fdpt info based on BIOS drive id - not the controller id. Add BCV support to IPL code. Use "BCV" system to set harddrive order (for both ata and option roms). Also, don't show floppy/cdrom in boot menu if no drives found.
Diffstat (limited to 'src/optionroms.c')
-rw-r--r--src/optionroms.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/optionroms.c b/src/optionroms.c
index d9c4e0e3..14d84d2c 100644
--- a/src/optionroms.c
+++ b/src/optionroms.c
@@ -100,6 +100,13 @@ callrom(struct rom_header *rom, u16 offset, u16 bdf)
debug_serial_setup();
}
+// Execute a BCV option rom registered via add_bcv().
+void
+call_bcv(u16 seg, u16 ip)
+{
+ callrom(MAKE_FLATPTR(seg, 0), ip, 0);
+}
+
// Verify that an option rom looks valid
static int
is_valid_rom(struct rom_header *rom)
@@ -318,8 +325,8 @@ optionrom_setup()
pos += ALIGN(rom->size * 512, OPTION_ROM_ALIGN);
struct pnp_data *pnp = get_pnp_rom(rom);
if (! pnp) {
- // Legacy rom - run init vector now.
- callrom(rom, OPTION_ROM_INITVECTOR, 0);
+ // Legacy rom.
+ add_bcv(FLATPTR_TO_SEG(rom), OPTION_ROM_INITVECTOR, 0);
continue;
}
// PnP rom.
@@ -329,8 +336,7 @@ optionrom_setup()
else
// Check for BCV (there may be multiple).
while (pnp && pnp->bcv) {
- // Has BCV - run it now.
- callrom(rom, pnp->bcv, 0);
+ add_bcv(FLATPTR_TO_SEG(rom), pnp->bcv, pnp->productname);
pnp = get_pnp_next(rom, pnp);
}
}