--- a/sys/x86/x86/io_apic.c +++ b/sys/x86/x86/io_apic.c @@ -486,14 +486,30 @@ ioapic_config_intr } static void +ioapic_dump(struct ioapic *io) +{ + int i; + + printf("ioapic%u:\n", io->io_id); + for (i = 0; i < io->io_numintr; i++) + printf("pin%d: %08x:%08x\n", i, + ioapic_read(io->io_addr, IOAPIC_REDTBL_LO(i)), + ioapic_read(io->io_addr, IOAPIC_REDTBL_HI(i))); +} + +static void ioapic_resume(struct pic *pic) { struct ioapic *io = (struct ioapic *)pic; int i; mtx_lock_spin(&icu_lock); + printf("before re-programming ioapic\n"); + ioapic_dump(io); for (i = 0; i < io->io_numintr; i++) ioapic_program_intpin(&io->io_pins[i]); + printf("after re-programming ioapic\n"); + ioapic_dump(io); mtx_unlock_spin(&icu_lock); }