From b1042fd64988e79861474aed4bddf0f0663c3518 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Fri, 18 Mar 2022 23:16:07 -0400 Subject: [PATCH] Jump to HULK Unfortunately, crashes... :( --- src/hello/hello.d | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/hello/hello.d b/src/hello/hello.d index 566a0cf..9948770 100644 --- a/src/hello/hello.d +++ b/src/hello/hello.d @@ -191,6 +191,12 @@ private void build_page_tables() write_cr3(cast(ulong)pt_base); } +private void jump_to_hulk() +{ + void function(BootInfo *) hulk_start = cast(void function(BootInfo *))HULK_VIRTUAL_START; + hulk_start(&bootinfo); +} + extern (C) EFI_STATUS efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE * st) { .st = st; @@ -226,5 +232,7 @@ extern (C) EFI_STATUS efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE * st) build_page_tables(); + jump_to_hulk(); + return EFI_SUCCESS; }