void KernelPanic_SetMode(void)
{
int i;
+
+ __asm__ __volatile__ ("cli"); // Stop the processor!
// This function is called by Panic(), but MM_PageFault and the
// CPU exception handers also call it, so let's not clear the screen
if( giKP_Pos ) return ;
// Restore VGA 0xB8000 text mode
- #if 1
+ #if 0
for( i = 0; i < NUM_REGVALUES; i++ )
{
// Reset Flip-Flop
}
#endif
+ #if ENABLE_KPANIC_MODE
// Clear Screen
for( i = 0; i < 80*25; i++ )
{
__asm__ __volatile__ ("mov %%ebp, %0" : "=r" (ebp));
Error_Backtrace(eip, ebp);
}
+ #endif
}
void KernelPanic_PutChar(char Ch)
{
+ #if ENABLE_KPANIC_MODE
if( giKP_Pos > 80*25 ) return ;
switch(Ch)
{
giKP_Pos ++;
break;
}
+ #if 0
+ {
+ char s[2] = {Ch,0};
+ VT_int_PutString(gpVT_CurTerm, s);
+ }
+ #endif
+ #endif // ENABLE_KPANIC_MODE
}