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 @@
 #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 @@
+    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 @@
     case IPL_TYPE_BEV:
+    case IPL_TYPE_HALT:
+        boot_fail();
+        break;
     // Boot failed: invoke the boot recovery function