diff options
author | Anton Kling <anton@kling.gg> | 2024-02-21 20:06:35 +0100 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2024-02-21 20:06:35 +0100 |
commit | 9b475d3db3275d4c34f02161ae70ced5595a0fdb (patch) | |
tree | 0c50e4af3ce52017f295c44f6f4319e4a43de085 /kernel/kubsan.c | |
parent | 6c9cb0bd8ceb039ce387c850e25adc6f99cfcd6f (diff) |
Kernel: Remove all inline assembly.
Now the kernel does not rely upon inline assembly which is often very
error prone. This also means that the kernel could probably be compiled
with any c99 compiler which would help future bootstrapping.
Diffstat (limited to 'kernel/kubsan.c')
-rw-r--r-- | kernel/kubsan.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/kubsan.c b/kernel/kubsan.c index fc2900d..9bc2631 100644 --- a/kernel/kubsan.c +++ b/kernel/kubsan.c @@ -2,15 +2,13 @@ #include <kubsan.h> #include <log.h> #include <stdio.h> +#include <cpu/arch_inst.h> void ubsan_log(const char *cause, struct source_location source) { kprintf("%s: %s : %d\n", cause, source.file_name, source.line); dump_backtrace(5); disable_interrupts(); - asm volatile("1: jmp 1b"); - asm("hlt"); - for (;;) - ; + halt(); } void __ubsan_handle_shift_out_of_bounds(struct ShiftOutOfBoundsData *data, |