From: Kevin O'Connor Date: Sun, 13 May 2012 16:23:58 +0000 (-0400) Subject: Convert boot code EBDA variables to VARLOW variables. X-Git-Tag: rel-1.7.1~68 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9d8e0a677b40c7e9fd22394901be6091993fcbe1;p=seabios.git Convert boot code EBDA variables to VARLOW variables. Signed-off-by: Kevin O'Connor --- diff --git a/src/biosvar.h b/src/biosvar.h index 8f94b24..35cd181 100644 --- a/src/biosvar.h +++ b/src/biosvar.h @@ -234,8 +234,6 @@ struct extended_bios_data_area_s { // Locks for removable devices u8 cdrom_locks[CONFIG_MAX_EXTDRIVE]; - - u16 boot_sequence; } PACKED; // The initial size and location of EBDA diff --git a/src/boot.c b/src/boot.c index 4447b9a..ef21fe4 100644 --- a/src/boot.c +++ b/src/boot.c @@ -238,8 +238,6 @@ boot_setup(void) if (! CONFIG_BOOT) return; - SET_EBDA(boot_sequence, 0xffff); - if (!CONFIG_COREBOOT) { // On emulators, get boot order from nvram. if (inb_cmos(CMOS_BIOS_BOOTFLAG1) & 1) @@ -642,7 +640,7 @@ boot_fail(void) // Determine next boot method and attempt a boot using it. static void -do_boot(u16 seq_nr) +do_boot(int seq_nr) { if (! CONFIG_BOOT) panic("Boot support not compiled in.\n"); @@ -679,15 +677,16 @@ do_boot(u16 seq_nr) call16_int(0x18, &br); } +int BootSequence VARLOW = -1; + // Boot Failure recovery: try the next device. void VISIBLE32FLAT handle_18(void) { debug_serial_setup(); debug_enter(NULL, DEBUG_HDL_18); - u16 ebda_seg = get_ebda_seg(); - u16 seq = GET_EBDA2(ebda_seg, boot_sequence) + 1; - SET_EBDA2(ebda_seg, boot_sequence, seq); + int seq = BootSequence + 1; + BootSequence = seq; do_boot(seq); } @@ -697,6 +696,6 @@ handle_19(void) { debug_serial_setup(); debug_enter(NULL, DEBUG_HDL_19); - SET_EBDA(boot_sequence, 0); + BootSequence = 0; do_boot(0); }