1 /* 2 * kaboom.c 3 */ 4 5 #include "core.h" 6 7 #if defined(CORE_DEBUG) || defined(DEBUG_PORT) 8 9 #include <dprintf.h> 10 11 __export __noreturn __bad_SEG(const volatile void *p) 12 { 13 dprintf("SEG() passed an invalid pointer: %p\n", p); 14 kaboom(); 15 } 16 17 #endif 18 19 #undef kaboom 20 21 __export __noreturn _kaboom(void) 22 { 23 extern void kaboom(void); 24 call16(kaboom, &zero_regs, NULL); 25 /* Do this if kaboom somehow returns... */ 26 for (;;) 27 asm volatile("hlt"); 28 } 29