From: Kevin O'Connor Date: Sat, 12 Jan 2013 21:36:11 +0000 (-0500) Subject: boot: Support "halt" in the boot order to prevent default boot attempts. X-Git-Tag: rel-1.7.2~1 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=54ae5436df92c8caf0a814a7c653adb1d75a084c;p=seabios.git boot: Support "halt" in the boot order to prevent default boot attempts. Current seabios will attempt to boot from both configured devices and a list of default devices. Sometimes it is desirable to only attempt to boot from the configured devices and not from any of the default devices. This patch adds support for a "HALT" item in the "bootorder" file - its presence will prevent SeaBIOS from attempting any default boot actions. Signed-off-by: Kevin O'Connor Signed-off-by: Amos Kong --- diff --git a/src/boot.c b/src/boot.c index c67cc7f..56843e3 100644 --- a/src/boot.c +++ b/src/boot.c @@ -291,6 +291,7 @@ static struct bootentry_s *BootList; #define IPL_TYPE_CBFS 0x20 #define IPL_TYPE_BEV 0x80 #define IPL_TYPE_BCV 0x81 +#define IPL_TYPE_HALT 0xf0 static void bootentry_add(int type, int prio, u32 data, const char *desc) @@ -488,6 +489,10 @@ boot_prep(void) interactive_bootmenu(); wait_threads(); + int haltprio = find_prio("HALT"); + if (haltprio >= 0) + bootentry_add(IPL_TYPE_HALT, haltprio, 0, "HALT"); + // Map drives and populate BEV list struct bootentry_s *pos = BootList; while (pos) { @@ -672,6 +677,9 @@ do_boot(int seq_nr) case IPL_TYPE_BEV: boot_rom(ie->vector); break; + case IPL_TYPE_HALT: + boot_fail(); + break; } // Boot failed: invoke the boot recovery function