Add MP enhancements for the kernel debugger

This commit is contained in:
Ali Mashtizadeh 2015-02-15 20:17:00 -08:00
parent d5535ded23
commit 220328dd91
2 changed files with 17 additions and 0 deletions

View File

@ -23,6 +23,7 @@ void
MP_Init()
{
/*
* Arguments to mpstart are stored at 0x6F00
* arg[0] = CR3
* arg[1] = RSP
*/
@ -61,3 +62,18 @@ MP_InitAP()
booted = 1;
}
void
Debug_CPUS(int argc, const char *argv[])
{
}
REGISTER_DBGCMD(cpus, "Show MP information", Debug_CPUS);
void
Debug_CPU(int argc, const char *argv[])
{
kprintf("CPU %d\n", CPU());
}
REGISTER_DBGCMD(cpu, "Current CPU number", Debug_CPU);

View File

@ -590,6 +590,7 @@ Debug_Threads(int argc, const char *argv[])
//Spinlock_Lock(&threadLock);
kprintf("CPU %d\n", c);
kprintf("Current Thread: %d(%016llx) %d\n",
curProc[c]->tid, curProc[c], curProc[c]->ctxSwitches);
Thread_Dump(curProc[c]);