*
*/
+#include "sys/x86_isa.h"
#include <sys/cpu.h>
-#include <hal/intc.h>
-#include <sys/apic.h>
-#include <sys/interrupts.h>
+#include "sys/apic.h"
+#include <sys/hart.h>
#include <lunaix/mm/mmio.h>
#include <lunaix/spike.h>
u32_t apic_id = apic_read_reg(APIC_IDR) >> 24;
u32_t apic_ver = apic_read_reg(APIC_VER);
- kprintf(KINFO "ID: %x, Version: %x, Max LVT: %u\n",
+ kprintf(KINFO "ID: %x, Version: %x, Max LVT: %u",
apic_id,
apic_ver & 0xff,
(apic_ver >> 16) & 0xff);
}
void
-apic_on_eoi(struct intc_context* intc_ctx, cpu_t cpu, int iv)
+apic_on_eoi(struct x86_intc* intc_ctx, cpu_t cpu, int iv)
{
// for all external interrupts except the spurious interrupt
// this is required by Intel Manual Vol.3A, section 10.8.1 & 10.8.5