Introduce ioapic enumerators, which is used to probe and config ioapics
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 14 Feb 2011 06:47:39 +0000 (14:47 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Mon, 14 Feb 2011 08:05:39 +0000 (16:05 +0800)
commit65b2387fb07c1a805b383418b9fc3f3a40e05483
tree2b8ff7affacc160a144847deea6ded52d9146c78
parent58c2553a79a1ecfcbfd3ab0cb8e383052af37406
Introduce ioapic enumerators, which is used to probe and config ioapics

ioapic enumerator implementation should provide two methods:

ioapic_probe()
    Make sure that if this enumerator is selected, later ioapic
    enumeration could work.  Return error code upon failure.

ioapic_enumerate()
    Enumerate ioapic and prepare for later ioapic configuration in
    the common code (the configuration in the common code is not
    implemented yet).

ioapic enumerator implementation could be registered by calling
ioapic_enumerator_register() with ioapic_enumerator struct.  The
higher the priority field, the earlier the ioapic enumerator's
ioapic_probe method will be invoked.

Currently a do-nothing-other-than-logging ioapic enumerators are
implemented and registered.  This dummy ioapic enumerator uses ACPI
MADT.
sys/platform/pc32/apic/mpapic.c
sys/platform/pc32/i386/mp_machdep.c
sys/platform/pc32/i386/mp_madt.c
sys/platform/pc32/include/smp.h
sys/platform/pc64/apic/mpapic.c
sys/platform/pc64/include/smp.h
sys/platform/pc64/x86_64/mp_machdep.c
sys/platform/pc64/x86_64/mp_madt.c