mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
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.
This commit is contained in:
parent
960d3c68ed
commit
4366ac52ad
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=69658
@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user