Don't panic (that turns off irqs), instead spin with irqs enabled.
bootdev >>= 4 * seq_nr;
bootdev &= 0xf;
- if (bootdev == 0)
- panic("No bootable device.\n");
+ if (bootdev == 0) {
+ printf("No bootable device.\n");
+ // Loop with irqs enabled - this allows ctrl+alt+delete to work.
+ for (;;)
+ usleep(1000000);
+ }
/* Translate bootdev to an IPL table offset by subtracting 1 */
bootdev -= 1;
}
// Wait for 'usec' microseconds with irqs enabled.
-static void
+void
usleep(u32 usec)
{
struct bregs br;
__call16_int((callregs), (u32)&irq_trampoline_ ##nr ); \
} while (0)
inline void call16_simpint(int nr, u32 *eax, u32 *flags);
+void usleep(u32 usec);
int get_keystroke(int msec);
// output.c