For systems without emulated devices (e.g., bare-metal), use halt-loop when exiting the realmode test. Signed-off-by: Nadav Amit <namit@xxxxxxxxxx> --- x86/realmode.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/x86/realmode.c b/x86/realmode.c index ef79f7e..301b013 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -115,6 +115,10 @@ static int failed; static void exit(int code) { outb(code, 0xf4); + + while (1) { + asm volatile("hlt" ::: "memory"); + } } struct regs { -- 2.20.1