Subject: Re: pre-built i386 + MP spinup test kernels now available.
To: None <sommerfeld@netbsd.org>
From: John Darrow <John.P.Darrow@wheaton.edu>
List: tech-smp
Date: 02/23/2000 18:11:36
In article <200002231449.OAA06059@orchard.arlington.ma.us>,
Bill Sommerfeld <sommerfeld@netbsd.org> wrote:
>See ftp://ftp.netbsd.org/pub/NetBSD/arch/i386/mptest/

ALR rackmount machine, can support up to 6 Pentium Pros on two cpu card
inserts, currently has two.  Long ago, I was able to boot this machine
(or maybe it was the identical machine next to it) using a kernel with
a slightly-hacked-to-apply-cleanly version of the original XXMP patches,
and cpu1 did spin up properly, but I no longer have a copy of that kernel
or dmesg.  I'm thinking it was sometime during the 1.3K age or so...

Now, I get a uvm fault, similar to what matt debergalis is getting.
Note that, similar to his machine, this bootprocessor is not at apid 0.

A little tracing around shows that:
mpbios_int+0x55: 0xfffffef0(%ebp) is 0, thus jumping to mpbios_int+0x6c
mpbios_int+0x6c: does some stuff with mp_busses and sets %edi from it, the
  last place where %edi is set before
mpbios_int+0xe3: %eax is set from 0xc(%edi), which contains 0, followed by
mpbios_int+0xe6: call *%eax

thus resulting in a uvm fault when an attempt is made to execute at memory
location 0.

Some traceback below (ten-finger copy, but should be accurate):

NetBSD 1.4T (GENERIC.MP) #5: Wed Feb 23 08:01:18 EST 2000
    wes@thunk:/usr/wes/current/src/sys/arch/i386/compile/GENERIC.MP
total memory = 65152 KB
avail memory = 55344 KB
using 840 buffers containing 3360 KB of memory
biostramp installed @ 1000
BIOS32 rev. 0 found at 0xf7cee
mainbus0 (root)
mainbus0: scanning 0x9fc00 to 0x9fff0 for MP signature
mainbus0: scanning 0x9f800 to 0x9fbf0 for MP signature
mainbus0: scanning 0xf0000 to 0xffff0 for MP signature
mainbus0: MP floating pointer found in bios at 0xfdbc0
mainbus0: MP config table at 0x9fd50, 260 bytes long
mainbus0: Intel MP Specification (Version 1.4)
mainbus0: MP OEM ALR      Product   Revol. 6x6
cpu0 at mainbus0: apid 6 (boot processor)
cpu0: family 6 model 1 step 9
cpu0: Intel Pentium Pro (686-class)
cpu0: features fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features fbff<PGE,MCA,CMOV>
cpu0: calibrating local timer
cpu0: apic clock running at 66 MHz
cpu0: kstack at 0xc55b2000 for 8192 bytes
cpu0: idle pcb at 0xc55b2000, idle sp at 0xc55b3fa0
cpu1 at mainbus0: apid 5 (application processor)
cpu1: family 6 model 1 step 9
cpu1: Intel Pentium Pro (686-class)
cpu1: features fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu1: features fbff<PGE,MCA,CMOV>
cpu1: kstack at 0xc55b4000 for 8192 bytes
cpu1: idle pcb at 0xc55b4000, idle sp at 0xc55b5fa0
mainbus0: unsupported bus type EISA
ioapic0 at mainbus0 apid 0 (I/O APIC)
ioapic0: pa 0xfec00000, virtual wire mode, version 11, 16 pins
ioapic0: int0 attached to ExtINT (type 3<type=3=ExtINT> flags 5<pol=1=Act Hi,trig=1=Edge>)
uvm_fault(0xc04899a0, 0x0, 0, 1) -> 1
kernel: page fault trap, code=0
Stopped in swapper at   0:      invalid address
(cpu 6)db> t
param.c(0,0,c06db844,3,c55b1dcc) at 0
mpbios_int(c55b1dcc,3,c06db824,c06dcfc0,c0437900) at mpbios_int+0xe8
mpbios_scan(c06dcfc0) at mpbios_scan+0x29f
mainbus_attach(0,c06dcfc0,0,c06dcfc0,0) at mainbus_attach+0x29
config_attach(0,c0436d64,0,0,c048bdf4) at config_attach+0x306
config_rootfound(c03d2120,0) at config_rootfound+0x37
cpu_configure(bfeff000,c051afa8,c018bc93,c0518010,518000) at cpu_configure+0x19
configure(c0518010,518000,51f000,90,900007ff) at configure+0x5a
main(0,0,0,0,0) at main+0x307
(cpu 6)db> show registers
es                0x10
ds          0xc0510010  end+0x58710
edi         0xc06dcfa8  end+0x2256a8
esi                0x1
ebp         0xc051ae60  end+0x63560
ebx         0xc06db824  end+0x223f24
edx         0x10000100  ngdt_table_0xfffcff2
ecx                  0
eax                  0
eip                  0
cs                 0x8
eflags         0x10206  ngdt_table+0xd0f8
esp         0xc051ad2c  end+0x6342c
ss          0xc0510010  end+0x58710
0:      invalid address
(cpu 6)db> x/i mpbios_int,100
...
mpbios_int+0x4c:	cmpl	$0x1,0xfffffef0(%ebp)
mpbios_int+0x53:	jz	mpbios_int+0x8c
mpbios_int+0x55:	jb	mpbios_int+0x6c
mpbios_int+0x57:	cmpl	$0x2,0xfffffef0(%ebp)
mpbios_int+0x5e:	jz	mpbios_int+0x84
mpbios_int+0x60:	cmpl	$0x3,0xfffffef0(%ebp)
mpbios_int+0x67:	jz	mpbios_int+0x7c
mpbios_int+0x69:	jmp	mpbios_int+0x91
mpbios_int+0x6b:	nop
(cpu 6)db> x/x $ebp+0xfffffef0
0xc051ad50:	0
(cpu 6)db> x/i mpbios_int+0x6c,100
mpbios_int+0x6c:	leal	0(%edx,%edx,4),%edx
mpbios_int+0x6f:	movl	mp_busses,%eax
mpbios_int+0x74:	leal	0(%eax,%edx,4),%edi
mpbios_int+0x77:	jmp	mpbios_int+0x91
(cpu 6)db> print mp_busses
c04b7034
(cpu 6)db> x/i mpbios_int+0x91,100
...
mpbios_int+0xd0:	movl	$0,0x20(%ebx)
mpbios_int+0xd7:	leal	0x20(%ebx),%eax
mpbios_int+0xda:	pushl	%eax
mpbios_int+0xdb:	pushl	%ecx
mpbios_int+0xdc:	movl	0xfffffef0(%ebp),%ecx
mpbios_int+0xe2:	pushl	%ecx
mpbios_int+0xe3:	movl	0xc(%edi),%eax
mpbios_int+0xe6:	call	*%eax
mpbios_int+0xe8:	addl	$0xc,%esp
(cpu 6)db> x/x $edi-0x18,11
0xc06dcf90:	0	    c0427a62	1	    c0368284	c0368124    0
0xc06dcfa8:	0	    0		0	    0		c06db824    0
						    ^^^^^^^^
This is the 0 that is moved into %eax just before the call...
0xc06dcfc0:	0	    c06da700	c048bdfc    c0436d64	0

jdarrow

-- 
John Darrow - Senior Technical Specialist               Office: 630/752-5201
Computing Services, Wheaton College, Wheaton, IL 60187  Fax:    630/752-5968
Alphapage: 6303160707@alphapage.airtouch.com            Pager:  630/316-0707
Email:     John.P.Darrow@wheaton.edu