Enable interrupts in debug mode so keyboard works. Fixed crosscall off by one due to previous change.

This commit is contained in:
Ali Mashtizadeh 2015-11-20 12:23:20 -08:00
parent afd9cdc068
commit a274a78a5b
2 changed files with 5 additions and 2 deletions

View File

@ -53,6 +53,8 @@ Debug_HaltIPI()
MP_SetState(CPUSTATE_HALTED); MP_SetState(CPUSTATE_HALTED);
__sync_fetch_and_add(&debugHalted, 1); __sync_fetch_and_add(&debugHalted, 1);
enable_interrupts();
while (debugCmd == 0) { while (debugCmd == 0) {
pause(); pause();
} }

View File

@ -167,12 +167,13 @@ MP_CrossCallTrap()
int int
MP_CrossCall(CrossCallCB cb, void *arg) MP_CrossCall(CrossCallCB cb, void *arg)
{ {
CrossCallFrame frame; volatile CrossCallFrame frame;
// Setup frame // Setup frame
memset(&frame, 0, sizeof(frame)); memset(&frame, 0, sizeof(frame));
frame.cb = cb; frame.cb = cb;
frame.arg = arg; frame.arg = arg;
frame.count = 1;
Critical_Enter(); Critical_Enter();
@ -187,7 +188,7 @@ MP_CrossCall(CrossCallCB cb, void *arg)
frame.done[CPU()] = 1; frame.done[CPU()] = 1;
// Wait for all to respond // Wait for all to respond
while (frame.count != lastCPU) { while (frame.count < lastCPU) {
// Check for timeout // Check for timeout
// XXX: Should dump the crosscall frame // XXX: Should dump the crosscall frame