diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/asm.h (renamed from platform/sysenter.h) | 5 | ||||
-rw-r--r-- | platform/boot.s | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/platform/sysenter.h b/platform/asm.h index b0495cc..6f72617 100644 --- a/platform/sysenter.h +++ b/platform/asm.h @@ -1,4 +1,9 @@ #pragma once +// boot.s +__attribute__((noreturn)) +void halt_cpu(); + +// sysenter.c void sysexit(void (*fun)(), void *stack_top); void sysenter_setup(); diff --git a/platform/boot.s b/platform/boot.s index 6052347..c2a06c3 100644 --- a/platform/boot.s +++ b/platform/boot.s @@ -27,7 +27,10 @@ _start: mov $stack_top, %esp call kmain - cli /* disable interrupts */ +.global halt_cpu +.type halt_cpu, @function +halt_cpu: + cli 1: hlt jmp 1b |