* \brief Fire a magic breakpoint (bochs)
*/
#define MAGIC_BREAK() __asm__ __volatile__ ("xchg %bx, %bx")
+// TODO: SMP halt request too
+#define HALT_CPU() for(;;) { __asm__ __volatile__ ("cli; hlt"); }
// === TYPES ===
typedef unsigned int Uint; // Unsigned machine native integer
}
// 5 nested panics? Fuck it
if( gbDebug_IsKPanic > 5 )
- for(;;);
+ HALT_CPU();
gbDebug_IsKPanic ++;
KernelPanic_SetMode();
}
//Threads_Dump();
//Heap_Dump();
- for(;;) ;
+ HALT_CPU();
}
void Debug_SetKTerminal(const char *File)
#include <stddef.h>
#include <arch.h>
+#ifndef HALT_CPU
+# define HALT_CPU() for(;;);
+#endif
+
//! Pack a structure
#define PACKED __attribute__((packed))
//! Mark a function as not returning