ke: freeze CPUs on panic

This commit is contained in:
Loïc Grégoire
2026-09-02 22:17:54 -04:00
parent d640053477
commit cf58ad369e
4 changed files with 76 additions and 6 deletions
+4
View File
@@ -158,6 +158,10 @@ pub inline fn percpu_ptr_other(variable: anytype, id: u32) @TypeOf(variable) {
return percpu_ptr_for(variable, id);
}
pub inline fn halt() void {
asm volatile ("hlt");
}
pub inline fn percpu_ptr(variable: anytype) @TypeOf(variable) {
const offset = asm volatile ("mov %%gs:(%[self]), %[out]"
: [out] "=r" (-> u64),