[coreboot] seabios change to boot from last boot device for gPXE or other option rom booting
Joe Julian
joe at julianfamily.org
Wed Mar 11 17:15:01 CET 2009
The hardcoded boot order method when using seabios with coreboot makes
booting from option roms difficult if the number of hard drives
installed is not a fixed number. I used this patch to allow choosing the
last boot device by setting the nibble to 0xf. This allows me to boot
from the gPXE option rom.
diff --git a/src/boot.c b/src/boot.c
index 6b4e985..44c1665 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -51,7 +51,8 @@ boot_setup()
SET_EBDA(boot_sequence, 0xffff);
if (CONFIG_COREBOOT) {
// XXX - hardcode defaults for coreboot.
- IPL.bootorder = 0x00000231;
+ // use 0xf to choose the last bev device
+ IPL.bootorder = 0x0000231f;
IPL.checkfloppysig = 1;
} else {
// On emulators, get boot order from nvram.
@@ -372,6 +373,10 @@ do_boot(u16 seq_nr)
u32 bootdev = IPL.bootorder;
bootdev >>= 4 * seq_nr;
bootdev &= 0xf;
+ if(bootdev == 0x0f) {
+ dprintf(1, "IPL.bevcount = %d)\n", IPL.bevcount);
+ bootdev = IPL.bevcount;
+ }
if (bootdev == 0) {
printf("No bootable device.\n");
More information about the coreboot
mailing list