Subject: Re: Port benchmarks
To: None <port-alpha@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: port-alpha
Date: 04/02/2000 21:25:54
On Sun, Apr 02, 2000 at 10:57:26AM -0700, Jason R Thorpe wrote:
> On Sat, Apr 01, 2000 at 08:28:24PM +0200, Manuel Bouyer wrote:
> 
>  > I tried a kernel compiled with -mcpu=21264, it panics immediatly ...
> 
> Panics how?

Here it is:
P00>>>boot -file /tst dka0 
(boot dka0.0.0.2000.1 -file /tst -flags a)
block 0 of dka0.0.0.2000.1 is a valid boot block
reading 14 blocks from dka0.0.0.2000.1
bootstrap code read in
base = 200000, image_start = 0, image_bytes = 1c00
initializing HWRPB at 2000
initializing page table at 1ff68000
initializing machine state
setting affinity to the primary CPU
jumping to bootstrap code

NetBSD/alpha 1.4P FFS Primary Bootstrap
Jumping to entry point...

NetBSD/alpha 1.4P Secondary Bootstrap, Revision 1.10
(toddpw@chewie.toddpw.net, Jan 1 21:48:54 PST 2000)

VMS PAL rev: 0x2003600010145
OSF PAL rev: 0x200370002013e
Switch to OSF PAL code succeeded.

Boot file: /tst
Boot flags: a
2540032+313240 [85+159312+92173]=0x2f63d0

Entering /tst at 0xfffffc0000301040...

fatal kernel trap:

    trap entry = 0x3 (instruction fault)
    a0         = 0x4
    a1         = 0x60
    a2         = 0x8
    pc         = 0xfffffc000039b6fc
    ra         = 0xfffffc00004bf498
    curproc    = 0xfffffc00005a23b8
        pid = 0, comm = 

panic: trap
Stopped in  at  0xfffffc00004caca4:     ret     zero,(ra)
db> 

'tr' doesn't show anything here.
I tried to boot with the 'd' flag, but it gets the kernel trap before
entering ddb.
gdb says:
(gdb) l *0xfffffc00004caca4
0xfffffc00004caca4 is in cpu_Debugger (../../../../arch/alpha/alpha/db_interface.c:225).
220     
221     void
222     cpu_Debugger()
223     {
224     
225             __asm __volatile("call_pal 0x81");              /* bugchk */
226     }
227     
228     /*
229      * This is called before ddb_init() to install the
(gdb) l *0xfffffc000039b6fc
0xfffffc000039b6fc is in pool_init (../../../../kern/subr_pool.c:439).
434             pp->pr_minitems = 0;
435             pp->pr_minpages = 0;
436             pp->pr_maxpages = UINT_MAX;
437             pp->pr_roflags = flags;
438             pp->pr_flags = 0;
439             pp->pr_size = ALIGN(size);
440             pp->pr_align = align;
441             pp->pr_wchan = wchan;
442             pp->pr_mtype = mtype;
443             pp->pr_alloc = alloc;
(gdb) l *0xfffffc00004bf498
0xfffffc00004bf498 is in pmap_bootstrap (../../../../arch/alpha/alpha/pmap.c:912).
907     
908             /*
909              * Intialize the pmap pools and list.
910              */
911             pmap_ncpuids = ncpuids;
912             pool_init(&pmap_pmap_pool, sizeof(struct pmap), 0, 0, 0, "pmappl",
913                 0, pool_page_alloc_nointr, pool_page_free_nointr, M_VMPMAP);
914             pool_init(&pmap_asn_pool, pmap_ncpuids * sizeof(u_int), 0, 0, 0,
915                 "pmasnpl",
916                 0, pool_page_alloc_nointr, pool_page_free_nointr, M_VMPMAP);


I also compiled a libc with -mcpu=21264, and now portmap cores dump with an
Illegal instruction, in libc (_svc_getreqset()). Disassembly around the
instruction which caused the fault is (fault is at 0x16048d8e0):
0x16048d8d0 <_svc_getreqset+80>:        ldl     s2,0(s4)
0x16048d8d4 <_svc_getreqset+84>:        addq    s4,0x4,s4
0x16048d8d8 <_svc_getreqset+88>:        zapnot  s2,0xf,t1
0x16048d8dc <_svc_getreqset+92>:        cttz    t1,t0
0x16048d8e0 <_svc_getreqset+96>:        addq    t0,0x1,t0
0x16048d8e4 <_svc_getreqset+100>:       cmoveq  t1,0,t0
0x16048d8e8 <_svc_getreqset+104>:       addl    t0,zero,s1
0x16048d8ec <_svc_getreqset+108>:       
    beq s1,0x16048dab4 <_svc_getreqset+564>
0x16048d8f0 <_svc_getreqset+112>:       ldq     t0,-22496(gp)

I'm running lmbench compiled with -O2 -mcpu=21264 with the optimised libc
now, I'll post results here.

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--