From 74aa30a44fb8c8090acbd67cbf868a241af3eea5 Mon Sep 17 00:00:00 2001 From: apio Date: Fri, 30 Dec 2022 18:36:22 +0100 Subject: [PATCH] Init: Call efficient_halt() on magic number mismatch instead of busy-looping --- kernel/src/boot/Init.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kernel/src/boot/Init.cpp b/kernel/src/boot/Init.cpp index 2c413a02..69e40cb9 100644 --- a/kernel/src/boot/Init.cpp +++ b/kernel/src/boot/Init.cpp @@ -15,8 +15,7 @@ void Init::check_magic() if (memcmp(bootboot.magic, BOOTBOOT_MAGIC, 4)) { kerrorln("ERROR: Invalid magic value from bootloader"); - for (;;) - ; + CPU::efficient_halt(); } }