diff options
| author | Peter Wemm <peter@FreeBSD.org> | 2000-12-06 03:47:14 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 2000-12-06 03:47:14 +0000 |
| commit | 4366ac52adaa34b41d8937a15fa1294be3eadeec (patch) | |
| tree | e8f620c13b6e79a7457b6235b5e32269d0120492 /sys/amd64/include | |
| parent | 960d3c68ed3d3a42157100491265aff9b11fdea1 (diff) | |
Notes
Diffstat (limited to 'sys/amd64/include')
| -rw-r--r-- | sys/amd64/include/mptable.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h index d37b6d668e30..bed96bef91f5 100644 --- a/sys/amd64/include/mptable.h +++ b/sys/amd64/include/mptable.h @@ -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++; + } } |
