clean up panic test
This commit is contained in:
parent
da95a4acfa
commit
a0973fe49d
2 changed files with 0 additions and 4 deletions
|
|
@ -6,6 +6,5 @@
|
||||||
|
|
||||||
void kmain() {
|
void kmain() {
|
||||||
kprint("Hello, OS World!\n");
|
kprint("Hello, OS World!\n");
|
||||||
kpanic_force();
|
|
||||||
poweroff();
|
poweroff();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,11 +9,8 @@ void kpanic(const char *reason){
|
||||||
}
|
}
|
||||||
|
|
||||||
void kpanic_force() {
|
void kpanic_force() {
|
||||||
// 1. Immediate Output
|
|
||||||
kprint("\n!!! FORCE PANIC !!!\n");
|
kprint("\n!!! FORCE PANIC !!!\n");
|
||||||
|
|
||||||
// 2. Trigger a hardware breakpoint or illegal instruction
|
|
||||||
// This allows a debugger (GDB) to stop exactly here.
|
|
||||||
// 'ebreak' is the standard RISC-V way to trigger a debug trap.
|
// 'ebreak' is the standard RISC-V way to trigger a debug trap.
|
||||||
__asm__ volatile("ebreak");
|
__asm__ volatile("ebreak");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue