mptable: Assign index for each IOAPIC
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 3 Mar 2011 14:14:40 +0000 (22:14 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 3 Mar 2011 14:41:59 +0000 (22:41 +0800)
commit6b881b58c506886dea35c08ea7162676f639b86f
tree0cc8bccf77fd904c351179085d364ecdc2a3b922
parent11870ba515d7d1128f92c4c6ddd79f949b2d6610
mptable: Assign index for each IOAPIC

IOAPIC information is saved into list ordered by ascending order
of IOAPIC's APIC ID and each IOAPIC is assigned an index according
to the order.

In this way we could use IOAPIC information extracted from ACPI
MADT and MPTABLE in the same fashion when routing PCI interrupts,
i.e. using index instead of APIC ID.  It has been observed that on
some machines, the APIC ID of IOAPIC in ACPI MADT is different from
the one in MPTABLE, but the order (index) is same.

PCI interrupt routing information now saves IOAPIC's index instead
of IOAPIC's APIC ID.
sys/platform/pc32/i386/mp_machdep.c
sys/platform/pc64/x86_64/mp_machdep.c