Log("CPU Error %x, Code: 0x%x", Regs->IntNum, Regs->ErrorCode);
Log(" - %s", csaERROR_NAMES[Regs->IntNum]);
- Log(" CS:RIP = 0x%04x:%016x", Regs->CS, Regs->RIP);
- Log(" SS:RSP = 0x%04x:%016x", Regs->SS, Regs->RSP);
- Log(" RFLAGS = 0x%016x", Regs->RFlags);
+ Log(" CS:RIP = 0x%04x:%016llx", Regs->CS, Regs->RIP);
+ Log(" SS:RSP = 0x%04x:%016llx", Regs->SS, Regs->RSP);
+ Log(" RFLAGS = 0x%016llx", Regs->RFlags);
- Log(" RAX %016x RCX %016x RDX %016x RBX %016x",
+ Log(" RAX %016llx RCX %016llx RDX %016llx RBX %016llx",
Regs->RAX, Regs->RCX, Regs->RDX, Regs->RBX);
- Log(" RSP %016x RBP %016x RSI %016x RDI %016x",
+ Log(" RSP %016llx RBP %016llx RSI %016llx RDI %016llx",
Regs->RSP, Regs->RBP, Regs->RSP, Regs->RDI);
- Log(" R8 %016x R9 %016x R10 %016x R11 %016x",
+ Log(" R8 %016llx R9 %016llx R10 %016llx R11 %016llx",
Regs->R8, Regs->R9, Regs->R10, Regs->R11);
- Log(" R12 %016x R13 %016x R14 %016x R15 %016x",
+ Log(" R12 %016llx R13 %016llx R14 %016llx R15 %016llx",
Regs->R12, Regs->R13, Regs->R14, Regs->R15);
Log(" FS %04x GS %04x", Regs->FS, Regs->GS);
__asm__ __volatile__ ("mov %%cr0, %0":"=r"(cr));
Warning(" CR0 0x%08x", cr);
__asm__ __volatile__ ("mov %%cr2, %0":"=r"(cr));
- Warning(" CR2 0x%08x", cr);
+ Warning(" CR2 0x%016llx", cr);
__asm__ __volatile__ ("mov %%cr3, %0":"=r"(cr));
- Warning(" CR3 0x%08x", cr);
+ Warning(" CR3 0x%016llx", cr);
__asm__ __volatile__ ("mov %%cr4, %0":"=r"(cr));
Warning(" CR4 0x%08x", cr);
// If the spinlock is set, let it complete
if(IS_LOCKED(&glThreadListLock)) return;
+ //LogF("Scheduler: CPU = %i\n", CPU);
+
// Get current thread
thread = gaCPUs[CPU].Current;
// Error Check
if(thread == NULL) {
thread = gaCPUs[CPU].IdleThread;
- Warning("Hmm... Threads_GetNextToRun returned NULL, I don't think this should happen.\n");
+ //Warning("Hmm... Threads_GetNextToRun returned NULL, I don't think this should happen.\n");
+ //LogF("Zzzzz.\n");
return;
}
#if DEBUG_TRACE_SWITCH
- Log("Switching to task %i, CR3 = 0x%x, RIP = %p",
+ LogF("Switching to task %i, CR3 = 0x%x, RIP = %p",
thread->TID,
thread->MemState.CR3,
thread->SavedState.RIP