diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2013-01-12 16:36:11 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2013-01-12 16:36:11 -0500 |
commit | 54ae5436df92c8caf0a814a7c653adb1d75a084c (patch) | |
tree | 6afad5c4e059c6c2baa447ffe6de7474100e47e9 /src/boot.c | |
parent | 261e8706ac85912f5bb155c1246a0b91c40b1b06 (diff) | |
download | seabios-54ae5436df92c8caf0a814a7c653adb1d75a084c.zip seabios-54ae5436df92c8caf0a814a7c653adb1d75a084c.tar.gz seabios-54ae5436df92c8caf0a814a7c653adb1d75a084c.tar.bz2 |
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 <kevin@koconnor.net>
Signed-off-by: Amos Kong <akong@redhat.com>
Diffstat (limited to 'src/boot.c')
-rw-r--r-- | src/boot.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 |