Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Sep 2002 13:31:13 -0400 (EDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        beemern <beemern@ksu.edu>
Cc:        smp@freebsd.org
Subject:   RE: For those with P4 SMP problems..
Message-ID:  <XFMail.20020920133113.jhb@FreeBSD.org>
In-Reply-To: <Pine.GSO.4.33L.0209201156510.10969-100000@unix2.cc.ksu.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

On 20-Sep-2002 beemern wrote:
> 
> i edit'd /usr/src/sys/i386/i386/mp_machdep.c , changing the apic loop to
> start at x=2 (instead of x=1) since its (apparantly at x=1) where the
> problem arises, and it boots up fine, saying that its SMP Motherboard in
> dmesg (no errors)
> 
> the reason i say that x=1 is the bad apic is because of the panic msg in
> the "regular" smp kernel which says:
> 
> "AP #1 (PHY #6) failed!"
> 
> i'm sure its not this simple, BUT, i'm wondering how to tell for sure if
> you really ARE running in SMP or not
> 
> even tho the system is booted and running fine, i dont know how to verify
> that it is INDEED running in SMP mode

Well, in teh above message, 6 is the APIC ID, not 1.  Does it actually
lauch the other CPU?  Probably not.  Your change probably just made it
skip launching the CPU.  What you want to do instead is something more
like this:

Index: mp_machdep.c
===================================================================
RCS file: /usr/cvs/src/sys/i386/i386/mp_machdep.c,v
retrieving revision 1.189
diff -u -r1.189 mp_machdep.c
--- mp_machdep.c        28 Aug 2002 23:24:05 -0000      1.189
+++ mp_machdep.c        20 Sep 2002 17:12:11 -0000
@@ -2134,6 +2134,8 @@
 
        /* get the PHYSICAL APIC ID# */
        physical_cpu = CPU_TO_ID(logical_cpu);
+       /* XXX: override hack */
+       physical_cpu = 1;
 
        /* calculate the vector */
        vector = (boot_addr >> 12) & 0xff;

See if that works.  Then try setting it to '2', '3', '4', '5', '6',
'7', '8', '9', '10', '11' and see which ones work and which ones
don't.  It may just be that the mptable (and the APIC table) have
the wrong ID for the second CPU.  Turn off the Hyperthreading in
the BIOS so it is easier to figure out what the ID of the second
physical processor is.

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20020920133113.jhb>