We will soon add a PCI class in the low 4 bits. Signed-off-by: Paolo Bonzini pbonzini@redhat.com --- src/boot.c | 17 +++++++++-------- 1 file modificato, 9 inserzioni(+), 8 rimozioni(-)
diff --git a/src/boot.c b/src/boot.c index 3ca7960..b9bcb57 100644 --- a/src/boot.c +++ b/src/boot.c @@ -285,12 +285,13 @@ struct bootentry_s { }; static struct bootentry_s *BootList;
-#define IPL_TYPE_FLOPPY 0x01 -#define IPL_TYPE_HARDDISK 0x02 -#define IPL_TYPE_CDROM 0x03 -#define IPL_TYPE_CBFS 0x20 -#define IPL_TYPE_BEV 0x80 -#define IPL_TYPE_BCV 0x81 +#define IPL_TYPE_FLOPPY 0x10 +#define IPL_TYPE_HARDDISK 0x20 +#define IPL_TYPE_CDROM 0x30 +#define IPL_TYPE_CBFS 0x40 +#define IPL_TYPE_BEV 0x50 +#define IPL_TYPE_BCV 0x60 +#define IPL_TYPE_MASK 0xF0
static void bootentry_add(int type, int prio, u32 data, const char *desc) @@ -491,7 +492,7 @@ boot_prep(void) // Map drives and populate BEV list struct bootentry_s *pos = BootList; while (pos) { - switch (pos->type) { + switch (pos->type & IPL_TYPE_MASK) { case IPL_TYPE_BCV: call_bcv(pos->vector.seg, pos->vector.offset); add_bev(IPL_TYPE_HARDDISK, 0); @@ -654,7 +655,7 @@ do_boot(int seq_nr)
// Boot the given BEV type. struct bev_s *ie = &BEV[seq_nr]; - switch (ie->type) { + switch (ie->type & IPL_TYPE_MASK) { case IPL_TYPE_FLOPPY: printf("Booting from Floppy...\n"); boot_disk(0x00, CheckFloppySig);