MBR: add HLT to prevent system from melting on failure
authorH. Peter Anvin <hpa@zytor.com>
Thu, 12 Jul 2007 00:25:59 +0000 (17:25 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Thu, 12 Jul 2007 00:25:59 +0000 (17:25 -0700)
In case we hit the death loop, put HLT in it.  It's probably superfluous,
but it can't hurt, and we can always take it out to reclaim the space.

Arguable the death loop is superfluous at all, since int $0x18 should
never return.

mbr/mbr.S

index 8d472da..06e1980 100644 (file)
--- a/mbr/mbr.S
+++ b/mbr/mbr.S
@@ -285,7 +285,9 @@ error:
        jmp     2b
 3:
        int     $0x18           /* Boot failure */
-       jmp     .               /* Die */
+die:
+       hlt
+       jmp     die
 
 missing_os_msg:
        .ascii  "Missing operating system.\r\n"