x86 platforms that use an IOAPIC route the legacy timer interrupt (IRQ0) to

pin 2 of the IOAPIC.

Add an 'Interrupt Source Override' entry to the MADT to describe this
and start asserting interrupts on pin 2 in the 8254 device model.

Submitted by:	Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)
This commit is contained in:
Neel Natu 2013-11-11 00:45:17 +00:00
parent 07d925fa2f
commit ec096ed5dd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=257933
2 changed files with 13 additions and 3 deletions

View File

@ -259,7 +259,17 @@ basl_fwrite_madt(FILE *fp)
EFPRINTF(fp, "[0004]\t\tInterrupt : 00000000\n");
EFPRINTF(fp, "\n");
/* Override the 8259 chained vector. XXX maybe not needed */
/* Legacy IRQ0 is connected to pin 2 of the IOAPIC */
EFPRINTF(fp, "[0001]\t\tSubtable Type : 02\n");
EFPRINTF(fp, "[0001]\t\tLength : 0A\n");
EFPRINTF(fp, "[0001]\t\tBus : 00\n");
EFPRINTF(fp, "[0001]\t\tSource : 00\n");
EFPRINTF(fp, "[0004]\t\tInterrupt : 00000002\n");
EFPRINTF(fp, "[0002]\t\tFlags (decoded below) : 0005\n");
EFPRINTF(fp, "\t\t\tPolarity : 1\n");
EFPRINTF(fp, "\t\t\tTrigger Mode : 1\n");
EFPRINTF(fp, "\n");
EFPRINTF(fp, "[0001]\t\tSubtable Type : 02\n");
EFPRINTF(fp, "[0001]\t\tLength : 0A\n");
EFPRINTF(fp, "[0001]\t\tBus : 00\n");

View File

@ -106,8 +106,8 @@ pit_mevent_cb(int fd, enum ev_type type, void *param)
pit_mev_count++;
ioapic_assert_pin(c->ctx, 0);
ioapic_deassert_pin(c->ctx, 0);
ioapic_assert_pin(c->ctx, 2);
ioapic_deassert_pin(c->ctx, 2);
/*
* Delete the timer for one-shots