- the BSP apic id is written in the io apic redirection entries to
deliver the interrupts to BSP
PUBLIC unsigned int apicid(void)
{
- return lapic_read(LAPIC_ID);
+ return lapic_read(LAPIC_ID) >> 24;
}
PRIVATE int calib_clk_handler(irq_hook_t * UNUSED(hook))
}
bsp_lapic_id = apicid();
+ printf("Boot cpu apic id %d\n", bsp_lapic_id);
acpi_init();
/*
* route the interrupts to the bsp by default
*/
- hi_32 = 0;
+ hi_32 = bsp_lapic_id << 24;
ioapic_redirt_entry_write((void *) io_apic[ioa].addr,
io_apic_irq[irq].pin, hi_32, low_32);
}