[boot] Fix call to exit_boot_services
Exiting boot services can't actually be done from inside `bootloader_uefi_main`, because there are objects in that scope that run code requiring boot services in their destructors. Also added `support.cpp` with `memcpy` because clang will emit references to `memcpy` even in freestanding mode. Added a `debug_break` function to allow for faking breakpoints when connecting to the bootloader with GDB. Tags: debug
This commit is contained in:
@@ -89,6 +89,8 @@ cpu_assert_handler::handle(uefi::status s, const wchar_t *message)
|
||||
} // namespace error
|
||||
} // namespace boot
|
||||
|
||||
extern "C" int _purecall() { ::boot::error::raise(uefi::status::unsupported, L"Pure virtual call"); }
|
||||
void operator delete (void *) {}
|
||||
|
||||
void debug_break()
|
||||
{
|
||||
volatile int go = 0;
|
||||
while (!go);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user