summaryrefslogtreecommitdiff
path: root/main.c3
diff options
context:
space:
mode:
authorandromeda <andromeda@bsd.my.domain>2026-10-19 18:54:26 -0400
committerandromeda <andromeda@bsd.my.domain>2026-10-19 18:54:26 -0400
commitaa113b17449e67dbd808587b411aeb21ea869974 (patch)
treeb6b7f1b71d761cbc043d5e97f72345d428c140ac /main.c3
parent97d331175ae47aec3d0b990ada9754a9e4298e32 (diff)
minimal running stub
Diffstat (limited to 'main.c3')
-rw-r--r--main.c39
1 files changed, 8 insertions, 1 deletions
diff --git a/main.c3 b/main.c3
index e3a8c15..86231bf 100644
--- a/main.c3
+++ b/main.c3
@@ -20,6 +20,13 @@ import uefi;
fn EfiStatus efi_main(EfiHandle image_handle, SystemTable* system_table) @export("efi_main")
{
- pre_load::init(image_handle, system_table)!!;
return SUCCESS;
}
+
+alias PanicFn = fn void(String message, String file, String function, int line);
+PanicFn panicfn = &_panicfn;
+fn void _panicfn(String reason, String file = "", String func = "", int line = 0)
+{
+ asm("cli");
+ asm("hlt");
+}