diff options
author | dzwdz | 2021-07-09 18:27:47 +0200 |
---|---|---|
committer | dzwdz | 2021-07-09 18:27:47 +0200 |
commit | 9566dac198f685ef947d82facee0be182a77495e (patch) | |
tree | 1e09721f226bf3293e11f37777f2964a2c59d529 /platform | |
parent | 5cfe5443e678e3354ed3488baea9c91cbb9e7697 (diff) |
implement basic kernel panics
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 |