From 9b475d3db3275d4c34f02161ae70ced5595a0fdb Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Wed, 21 Feb 2024 20:06:35 +0100 Subject: 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. --- kernel/kubsan.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'kernel/kubsan.c') 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 #include #include +#include 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, -- cgit v1.2.3