aboutsummaryrefslogtreecommitdiff
path: root/src/ata.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2010-12-27 19:07:49 -0500
committerKevin O'Connor <kevin@koconnor.net>2010-12-27 19:07:49 -0500
commit72eee3eff7a6984979dac5caafcd19761e657ed8 (patch)
treed4717b8e1ba3ca53102c737f9f9cf34ff9efb7a9 /src/ata.c
parentce24be5f62a2062aaca5805d0adc2c846fa0c9ba (diff)
downloadseabios-hppa-72eee3eff7a6984979dac5caafcd19761e657ed8.zip
seabios-hppa-72eee3eff7a6984979dac5caafcd19761e657ed8.tar.gz
seabios-hppa-72eee3eff7a6984979dac5caafcd19761e657ed8.tar.bz2
Simplify boot ordering by building an inclusive boot list.
Replace the bcv list with a full list of all "bootable objects". All ordering can then be done on this list. The final boot menu, drive mapping, and BEV list generation is then driven from this authoritative list. Move "Floppy" and "DVD/CD" description prefixes into drive description generation code to simplify boot menu generation. Rework QEMU's CMOS defined bootorder to work with priority scheme in new boot list. Have every CBFS entry create it's own BEV entry (instead of one entry for all CBFS payloads). Move CBFS payload detection code into coreboot.c.
Diffstat (limited to 'src/ata.c')
-rw-r--r--src/ata.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/ata.c b/src/ata.c
index d971480..e01f842 100644
--- a/src/ata.c
+++ b/src/ata.c
@@ -14,7 +14,7 @@
#include "pci.h" // foreachpci
#include "pci_ids.h" // PCI_CLASS_STORAGE_OTHER
#include "pci_regs.h" // PCI_INTERRUPT_LINE
-#include "boot.h" // add_bcv_hd
+#include "boot.h" // boot_add_hd
#include "disk.h" // struct ata_s
#include "ata.h" // ATA_CB_STAT
#include "blockcmd.h" // CDB_CMD_READ_10
@@ -774,7 +774,8 @@ init_drive_atapi(struct atadrive_s *dummy, u16 *buffer)
adrive_g->drive.sectors = (u64)-1;
u8 iscd = ((buffer[0] >> 8) & 0x1f) == 0x05;
char model[MAXMODEL+1];
- snprintf(adrive_g->drive.desc, MAXDESCSIZE, "ata%d-%d: %s ATAPI-%d %s"
+ snprintf(adrive_g->drive.desc, MAXDESCSIZE
+ , "DVD/CD [ata%d-%d: %s ATAPI-%d %s]"
, adrive_g->chan_gf->chanid, adrive_g->slave
, ata_extract_model(model, MAXMODEL, buffer)
, ata_extract_version(buffer)
@@ -782,10 +783,8 @@ init_drive_atapi(struct atadrive_s *dummy, u16 *buffer)
dprintf(1, "%s\n", adrive_g->drive.desc);
// fill cdidmap
- if (iscd) {
- map_cd_drive(&adrive_g->drive);
- add_baid_cdrom(&adrive_g->drive);
- }
+ if (iscd)
+ boot_add_cd(&adrive_g->drive);
return adrive_g;
}
@@ -835,7 +834,7 @@ init_drive_ata(struct atadrive_s *dummy, u16 *buffer)
setup_translation(&adrive_g->drive);
// Register with bcv system.
- add_bcv_internal(&adrive_g->drive);
+ boot_add_hd(&adrive_g->drive);
return adrive_g;
}