summaryrefslogtreecommitdiffstats
path: root/sys/i386/include/mptable.h
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2000-05-31 21:37:28 +0000
committermsmith <msmith@FreeBSD.org>2000-05-31 21:37:28 +0000
commit50016bdc27d39de9e2f0dcc9763d8acb98ffe5c0 (patch)
tree26d1c66aa40b5144103ac34dd1e4045467234bde /sys/i386/include/mptable.h
parent3a3f64f9495417ad3f8127a866008a132c5b6f73 (diff)
downloadFreeBSD-src-50016bdc27d39de9e2f0dcc9763d8acb98ffe5c0.zip
FreeBSD-src-50016bdc27d39de9e2f0dcc9763d8acb98ffe5c0.tar.gz
Further fixes for multiple-IO-APIC systems from Tor Egge:
Further experimentation showed that some Dell 2450 machines with the prevention kludge installed still got T_RESERVED traps. CPU interrupt vector 0x7A was observed to be triggered. This might have been the bitwise OR of two different vectors sent from each of the IOAPICs at the same time. IOAPIC #0: 0x68 --> irq 8: RTC timer interrupt IOAPIC #1: 0x32 --> irq 18: scsi host adapter or network interface ---- 0x7a --> T_RESERVED Both IOAPICs had ID 0. Appendix B.3 in the MP spec indicates that the operating system is responsible for assigning unique IDs to the IOAPICs. The enclosed patch programs the IOAPIC IDs according to the IOAPIC entries in the MP table. Submitted by: tegge
Diffstat (limited to 'sys/i386/include/mptable.h')
-rw-r--r--sys/i386/include/mptable.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h
index b5bc1fd..1155e67 100644
--- a/sys/i386/include/mptable.h
+++ b/sys/i386/include/mptable.h
@@ -572,6 +572,7 @@ mp_enable(u_int boot_addr)
for (apic = 0; apic < mp_napics; ++apic) {
ux = io_apic_read(apic, IOAPIC_VER);
io_apic_versions[apic] = ux;
+ io_apic_set_id(apic, IO_TO_ID(apic));
}
/* program each IO APIC in the system */
@@ -1661,13 +1662,7 @@ default_mp_table(int type)
#else
if ((io_apic_id == 0) || (io_apic_id == 1) || (io_apic_id == 15)) {
#endif /* REALLY_ANAL_IOAPICID_VALUE */
- ux = io_apic_read(0, IOAPIC_ID); /* get current contents */
- ux &= ~APIC_ID_MASK; /* clear the ID field */
- ux |= 0x02000000; /* set it to '2' */
- io_apic_write(0, IOAPIC_ID, ux); /* write new value */
- ux = io_apic_read(0, IOAPIC_ID); /* re-read && test */
- if ((ux & APIC_ID_MASK) != 0x02000000)
- panic("can't control IO APIC ID, reg: 0x%08x", ux);
+ io_apic_set_id(0, 2);
io_apic_id = 2;
}
IO_TO_ID(0) = io_apic_id;
OpenPOWER on IntegriCloud