diff options
author | peter <peter@FreeBSD.org> | 2000-12-06 03:47:14 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2000-12-06 03:47:14 +0000 |
commit | f21988fc406987260c7a9e6dae3a9095511363ba (patch) | |
tree | f3c0d2446906eb537fe791be8cd7da5a0f08a1c6 /sys/kern/subr_smp.c | |
parent | e40c6d5192329b031191f5c5f4dafc5893273528 (diff) | |
download | FreeBSD-src-f21988fc406987260c7a9e6dae3a9095511363ba.zip FreeBSD-src-f21988fc406987260c7a9e6dae3a9095511363ba.tar.gz |
This is kind of a nasty hack, but it appears to solve the Compaq DL360
SMP problem. Compaq, in their infinite wisdom, forgot to put the IO apic
intpin #0 connection to the 8259 PIC into the mptable. This hack is to
look and see if intpin #0 has *no* table entry and adds a fake ExtInt
entry for the remap routines to use. isa/clock.c will still test the
interrupts. This entry is only ever used on an already broken system.
Diffstat (limited to 'sys/kern/subr_smp.c')
-rw-r--r-- | sys/kern/subr_smp.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c index d37b6d6..bed96be 100644 --- a/sys/kern/subr_smp.c +++ b/sys/kern/subr_smp.c @@ -875,7 +875,7 @@ mptable_pass2(void) M_DEVBUF, M_WAITOK); MALLOC(ioapic, volatile ioapic_t **, sizeof(ioapic_t *) * mp_napics, M_DEVBUF, M_WAITOK); - MALLOC(io_apic_ints, io_int *, sizeof(io_int) * nintrs, + MALLOC(io_apic_ints, io_int *, sizeof(io_int) * (nintrs + 1), M_DEVBUF, M_WAITOK); MALLOC(bus_data, bus_datum *, sizeof(bus_datum) * mp_nbusses, M_DEVBUF, M_WAITOK); @@ -916,7 +916,7 @@ mptable_pass2(void) bus_data[x].bus_id = 0xff; /* clear IO APIC INT table */ - for (x = 0; x < nintrs; ++x) { + for (x = 0; x < (nintrs + 1); ++x) { io_apic_ints[x].int_type = 0xff; io_apic_ints[x].int_vector = 0xff; } @@ -1229,6 +1229,17 @@ fix_mp_table(void) panic("Free physical APIC ID not usable"); } fix_id_to_io_mapping(); + + /* detect and fix broken Compaq MP table */ + if (apic_int_type(0, 0) == -1) { + printf("APIC_IO: MP table broken: 8259->APIC entry missing!\n"); + io_apic_ints[nintrs].int_type = 3; /* ExtInt */ + io_apic_ints[nintrs].int_vector = 0xff; /* Unassigned */ + /* XXX fixme, set src bus id etc, but it doesn't seem to hurt */ + io_apic_ints[nintrs].dst_apic_id = IO_TO_ID(0); + io_apic_ints[nintrs].dst_apic_int = 0; /* Pin 0 */ + nintrs++; + } } |