u8 bootdrv = 0;
u16 bootdev, bootip;
- // XXX - why different bootdev check based on CONFIG_CDROM_BOOT?
- if (CONFIG_CDROM_BOOT) {
- bootdev = inb_cmos(CMOS_BIOS_BOOTFLAG2);
- bootdev |= ((inb_cmos(CMOS_BIOS_BOOTFLAG1) & 0xf0) << 4);
- bootdev >>= 4 * seq_nr;
- bootdev &= 0xf;
- if (bootdev == 0)
- BX_PANIC("No bootable device.\n");
-
- /* Translate from CMOS runes to an IPL table offset by subtracting 1 */
- bootdev -= 1;
- } else {
- if (seq_nr ==2)
- BX_PANIC("No more boot devices.");
- if (!!(inb_cmos(CMOS_BIOS_CONFIG) & 0x20) ^ (seq_nr == 1))
- /* Boot from floppy if the bit is set or it's the second boot */
- bootdev = 0x00;
- else
- bootdev = 0x01;
- }
+ bootdev = inb_cmos(CMOS_BIOS_BOOTFLAG2);
+ bootdev |= ((inb_cmos(CMOS_BIOS_BOOTFLAG1) & 0xf0) << 4);
+ bootdev >>= 4 * seq_nr;
+ bootdev &= 0xf;
+ if (bootdev == 0)
+ BX_PANIC("No bootable device.\n");
+
+ /* Translate from CMOS runes to an IPL table offset by subtracting 1 */
+ bootdev -= 1;
if (bootdev >= GET_EBDA(ipl.count)) {
BX_INFO("Invalid boot device (0x%x)\n", bootdev);
#define CMOS_DISK_DRIVE2_TYPE 0x1a
#define CMOS_DISK_DRIVE1_CYL 0x1b
#define CMOS_DISK_DRIVE2_CYL 0x24
-#define CMOS_BIOS_CONFIG 0x2d
#define CMOS_MEM_EXTMEM_LOW 0x30
#define CMOS_MEM_EXTMEM_HIGH 0x31
#define CMOS_CENTURY 0x32