Unpredictable problems with APIC renumbering
John Baldwin
jhb at FreeBSD.org
Thu Aug 28 12:23:05 PDT 2003
On 28-Aug-2003 Scott Ballantyne wrote:
> John Baldwin <jhb at FreeBSD.org> writes:
>
>> > Is there a fix or work-a-round for this problem?
>>
>> It's not a problem you need to worry about and is common to many
>> MP motherboards.
>>
>
> It's odd that it only happens occasionally. The precise message is:
>
>
> Programming 24 pins in IOAPIC #0
> IOAPIC #0 intpin 2 -> IRQ 0
> AP#1 (PHY #1) failed!
> panic y/n? [y]
> mp-lock = 0000001; cpuid=0; 1apicid=0
This is a different message and has nothing to do with the
I/O APIC code. Try the attached patch.
--
John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
-------------- next part --------------
Index: mp_machdep.c
===================================================================
RCS file: /usr/cvs/src/sys/i386/i386/mp_machdep.c,v
retrieving revision 1.214
diff -u -r1.214 mp_machdep.c
--- mp_machdep.c 12 Aug 2003 17:01:10 -0000 1.214
+++ mp_machdep.c 28 Aug 2003 16:44:51 -0000
@@ -2259,6 +2259,7 @@
int vector;
int cpus;
u_long icr_lo, icr_hi;
+ register_t eflags;
POSTCODE(START_AP_POST);
@@ -2277,6 +2278,7 @@
* bug), CPU waiting for STARTUP IPI. OR this INIT IPI might be
* ignored.
*/
+ eflags = intr_disable();
/* setup the address for the target AP */
icr_hi = lapic.icr_hi & ~APIC_ID_MASK;
@@ -2332,6 +2334,7 @@
while (lapic.icr_lo & APIC_DELSTAT_MASK)
/* spin */ ;
u_sleep(200); /* wait ~200uS */
+ intr_restore(eflags);
/* wait for it to start */
set_apic_timer(5000000);/* == 5 seconds */
More information about the freebsd-smp
mailing list