X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Farch%2Fx86%2Fkpanic.c;h=3adf8d56636c2692b156bf8d8f565de49da7a3fc;hb=2462d860630674d10d554f86aa669163f6f2db6b;hp=9300c69ef20e36932526cadfb41a7957eba36a59;hpb=48743e39650eb1ef988380e9d95f27fd40d3a9ce;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/arch/x86/kpanic.c b/KernelLand/Kernel/arch/x86/kpanic.c index 9300c69e..3adf8d56 100644 --- a/KernelLand/Kernel/arch/x86/kpanic.c +++ b/KernelLand/Kernel/arch/x86/kpanic.c @@ -78,6 +78,8 @@ const struct { 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 @@ -85,7 +87,7 @@ void KernelPanic_SetMode(void) if( giKP_Pos ) return ; // Restore VGA 0xB8000 text mode - #if 1 + #if 0 for( i = 0; i < NUM_REGVALUES; i++ ) { // Reset Flip-Flop @@ -110,6 +112,7 @@ void KernelPanic_SetMode(void) } #endif + #if ENABLE_KPANIC_MODE // Clear Screen for( i = 0; i < 80*25; i++ ) { @@ -122,10 +125,12 @@ void KernelPanic_SetMode(void) __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) { @@ -151,4 +156,11 @@ void KernelPanic_PutChar(char Ch) giKP_Pos ++; break; } + #if 0 + { + char s[2] = {Ch,0}; + VT_int_PutString(gpVT_CurTerm, s); + } + #endif + #endif // ENABLE_KPANIC_MODE }