fixed SIPI delivery bug from one the latest checkins
This commit is contained in:
parent
b532cad1d1
commit
913e3defd1
@ -29,6 +29,14 @@
|
||||
|
||||
bx_bool BX_CPU_C::handleWaitForEvent(void)
|
||||
{
|
||||
if (BX_CPU_THIS_PTR activity_state == BX_ACTIVITY_STATE_WAIT_FOR_SIPI) {
|
||||
// HALT condition remains, return so other CPUs have a chance
|
||||
#if BX_DEBUGGER
|
||||
BX_CPU_THIS_PTR stop_reason = STOP_CPU_HALTED;
|
||||
#endif
|
||||
return 1; // Return to caller of cpu_loop.
|
||||
}
|
||||
|
||||
// For one processor, pass the time as quickly as possible until
|
||||
// an interrupt wakes up the CPU.
|
||||
while (1)
|
||||
@ -381,6 +389,7 @@ void BX_CPU_C::deliver_SIPI(unsigned vector)
|
||||
BX_CPU_THIS_PTR activity_state = BX_ACTIVITY_STATE_ACTIVE;
|
||||
RIP = 0;
|
||||
load_seg_reg(&BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS], vector*0x100);
|
||||
unmask_event(BX_EVENT_INIT | BX_EVENT_SMI | BX_EVENT_NMI);
|
||||
BX_INFO(("CPU %d started up at %04X:%08X by APIC",
|
||||
BX_CPU_THIS_PTR bx_cpuid, vector*0x100, EIP));
|
||||
} else {
|
||||
|
@ -914,8 +914,9 @@ void BX_CPU_C::reset(unsigned source)
|
||||
} else {
|
||||
// it's an application processor, halt until IPI is heard.
|
||||
BX_CPU_THIS_PTR msr.apicbase &= ~0x0100; /* clear bit 8 BSP */
|
||||
BX_INFO(("CPU[%d] is an application processor. Halting until IPI.", apic_id));
|
||||
BX_INFO(("CPU[%d] is an application processor. Halting until SIPI.", apic_id));
|
||||
activity_state = BX_ACTIVITY_STATE_WAIT_FOR_SIPI;
|
||||
mask_event(BX_EVENT_INIT | BX_EVENT_SMI | BX_EVENT_NMI);
|
||||
async_event = 1;
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user