diff --git a/src/boot/error.cpp b/src/boot/error.cpp index 1f888bb..92d623d 100644 --- a/src/boot/error.cpp +++ b/src/boot/error.cpp @@ -63,16 +63,15 @@ uefi_handler::uefi_handler(console &con) : { } -[[ noreturn ]] void +void uefi_handler::handle(uefi::status s, const wchar_t *message) { status_line::fail(message, error_message(s)); - while (1) asm("hlt"); } cpu_assert_handler::cpu_assert_handler() : handler() {} -[[ noreturn ]] void +void cpu_assert_handler::handle(uefi::status s, const wchar_t *message) { asm volatile ( @@ -83,7 +82,6 @@ cpu_assert_handler::handle(uefi::status s, const wchar_t *message) : : "r"((uint64_t)s) : "rax", "rdx", "r8", "r9"); - while (1) asm("hlt"); } } // namespace error diff --git a/src/boot/error.h b/src/boot/error.h index c5435ef..9df8f21 100644 --- a/src/boot/error.h +++ b/src/boot/error.h @@ -39,7 +39,8 @@ class uefi_handler : { public: uefi_handler(console &con); - [[ noreturn ]] void handle(uefi::status, const wchar_t*) override; + virtual ~uefi_handler() {} + void handle(uefi::status, const wchar_t*) override; private: console &m_con; @@ -52,7 +53,8 @@ class cpu_assert_handler : { public: cpu_assert_handler(); - [[ noreturn ]] void handle(uefi::status, const wchar_t*) override; + virtual ~cpu_assert_handler() {} + void handle(uefi::status, const wchar_t*) override; }; } // namespace error