diff options
| author | Ian Moffett <ian@osmora.org> | 2025-11-15 20:48:12 -0500 |
|---|---|---|
| committer | Ian Moffett <ian@osmora.org> | 2025-11-15 20:48:12 -0500 |
| commit | d6b373756ddc6de416636f1e2648416f174e9a71 (patch) | |
| tree | 19e117c4522859d9d13387ef9a4316de92a7ad17 /sys/arch/amd64/cpu | |
| parent | 012c6c107579320160bbc1ad2158eca9daf2d04f (diff) | |
kern/amd64: Add panic function + MU helpers
This commit introduces a panic function as well as a panic machine
unifier layer for MD specifics that help bring the system to a halt.
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/arch/amd64/cpu')
| -rw-r--r-- | sys/arch/amd64/cpu/trap.S | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sys/arch/amd64/cpu/trap.S b/sys/arch/amd64/cpu/trap.S index 1761358..d3b9887 100644 --- a/sys/arch/amd64/cpu/trap.S +++ b/sys/arch/amd64/cpu/trap.S @@ -64,22 +64,17 @@ trapstr_tab: .text .globl trap_dispatch - .extern uart_write + .extern panic trap_dispatch: mov 0(%rdi), %rax /* Vector */ - push %rax /* Save it */ cmp $TRAPSTR_ENTRIES, %rax /* Too big? */ jg .unknown_trap /* Yeah... */ - lea error_header(%rip), %rdi /* Load the error header */ - call uart_puts /* Print it */ - - pop %rcx /* Get the vector number */ + mov %rax, %rcx /* Vector -> RCX */ lea trapstr_convtab(%rip), %rdi /* Load the base here */ leaq (%rdi, %rcx, 8), %rdi /* Scale by the vector */ mov (%rdi), %rdi /* Get the error string address */ - - call uart_puts + call panic retq .unknown_trap: lea error_unknown(%rip), %rdi |
