Added kernel panic routines to output to the screen on kpanic
[tpg/acess2.git] / Kernel / arch / x86 / proc.c
index 3b5ceb2..6298067 100644 (file)
@@ -779,6 +779,14 @@ void Proc_Scheduler(int CPU)
        #else
                __asm__ __volatile__ ("mov %0, %%cr3"::"a"(thread->MemState.CR3));
        #endif
+       
+       #if 0
+       if(thread->SavedState.ESP > 0xC0000000
+       && thread->SavedState.ESP < thread->KernelStack-0x2000) {
+               Log_Warning("Proc", "Possible bad ESP %p (PID %i)", thread->SavedState.ESP);
+       }
+       #endif
+       
        // Switch threads
        __asm__ __volatile__ (
                "mov %1, %%esp\n\t"     // Restore ESP

UCC git Repository :: git.ucc.asn.au