Subject: Re: yamt-idlelwp fallout for mips/cobalt?
To: None <mk@kilbi.de>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-mips
Date: 05/22/2007 19:29:40
mk@kilbi.de wrote:

> Today with todays -current sources (after yamt-idlelwp merge) I
> successfully built a new kernel for my qube2 and tried to boot it on
> my qube2: It just hangs directly after displaying some entry point
> message/address! No further display...
> 
> -> Is this a known issue for cobalt/mips after yamt-idlelwp merge?

Maybe so, but it seems there are two problems.

One looks cobalt specific and the attached patch makes
my RaQ2 get device configuration.
(I'm not sure if cobalt firmware clears BSS when
 it loads a kernel directly without our native bootloader)

The other one is "panic: TLB out of universe:" messages
right after interrupts are enabled and this one may be
a MIPS3 generic problem as mentioned in src/doc/BRANCHES
because it also happens on NetBSD/arc, but I haven't
tracked it (yet).
---

Index: arch/cobalt/cobalt/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/cobalt/cobalt/machdep.c,v
retrieving revision 1.82
diff -u -r1.82 machdep.c
--- arch/cobalt/cobalt/machdep.c	17 May 2007 14:51:16 -0000	1.82
+++ arch/cobalt/cobalt/machdep.c	22 May 2007 10:20:15 -0000
@@ -165,7 +165,7 @@
 {
 	char *kernend, *v;
 	u_long first, last;
-	extern char edata[], end[];
+	extern char end[];
 	const char *bi_msg;
 #if NKSYMS || defined(DDB) || defined(LKM)
 	int nsym = 0;
@@ -182,12 +182,10 @@
 		esym = end;
 		esym += ((Elf_Ehdr *)end)->e_entry;
 		kernend = (char *)mips_round_page(esym);
-		memset(edata, 0, end - edata);
 	} else
 #endif
 	{
 		kernend = (void *)mips_round_page(end);
-		memset(edata, 0, kernend - edata);
 	}
 
 	/* Check for valid bootinfo passed from bootstrap */

---

BOOTLOADER ramcode: selected partition /dev/hda1
Decompressing done
Executing bootloader kernel...
Decompressing - done.

>> NetBSD/cobalt 4.99.1 Bootloader, Revision 0.1 [@0x80f00000]
>> (tsutsui@mirage, Fri Sep  1 14:56:37 JST 2006)
>> Memory:		262144 k
>> PROM boot string:	root=/dev/hda1 ro
Boot [wd0a:netbsd]: 
Loading: wd0a:netbsd
3421600+196896 [115888+106845]=0x3aa0c4
Starting at 0x80001000

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 4.99.20 (GENERIC) #11: Tue May 22 19:04:13 JST 2007
	tsutsui@mirage:/usr/src/sys/arch/cobalt/compile/GENERIC
Cobalt RaQ 2
total memory = 256 MB
avail memory = 246 MB
mainbus0 (root)
com0 at mainbus0 addr 0x1c800000 level 3: st16650a, working fifo
com0: console
cpu0 at mainbus0: QED RM5200 CPU (0x28a0) Rev. 10.0 with built-in FPU Rev. 10.0
cpu0: 32KB/32B 2-way set-associative L1 Instruction cache, 48 TLB entries
cpu0: 32KB/32B 2-way set-associative write-back L1 Data cache
mcclock0 at mainbus0 addr 0x10000070: mc146818 compatible time-of-day clock
panel0 at mainbus0 addr 0x1f000000
gt0 at mainbus0 addr 0x14000000
pci0 at gt0
pci0: i/o space, memory space enabled, rd/line, wr/inv ok
pchb0 at pci0 dev 0 function 0: Galileo GT-64111 System Controller, rev 1
tlp0 at pci0 dev 7 function 0: DECchip 21143 Ethernet, pass 4.1
tlp0: interrupting at level 1
tlp0: Ethernet address 00:10:e0:00:5e:95
lxtphy0 at tlp0 phy 1: LXT970 10/100 media interface, rev. 3
lxtphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
siop0 at pci0 dev 8 function 0: Symbios Logic 53c860 (ultra scsi)
siop0: interrupting at irq 4
scsibus0 at siop0: 8 targets, 8 luns per target
pcib0 at pci0 dev 9 function 0
pcib0: VIA Technologies VT82C586 PCI-ISA Bridge, rev 37
viaide0 at pci0 dev 9 function 1
viaide0: VIA Technologies VT82C586 (Apollo VP) ATA33 controller
viaide0: primary channel interrupting at irq 14
atabus0 at viaide0 channel 0
viaide0: secondary channel interrupting at irq 15
atabus1 at viaide0 channel 1
VIA Technologies VT83C572 USB Controller (USB serial bus, revision 0x02) at pci0 dev 9 function 2 not configured
tlp1 at pci0 dev 12 function 0: DECchip 21143 Ethernet, pass 4.1
tlp1: interrupting at level 2
tlp1: Ethernet address 00:10:e0:00:5e:97
lxtphy1 at tlp1 phy 1: LXT970 10/100 media interface, rev. 3
lxtphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
Kernelized RAIDframe activated
panic: TLB out of universe: ksp 0xcc6bdfb8 epc 0x80273b4c vaddr 0xb839f000
panic: TLB out of universe: ksp 0xcbeb7fd0 epc 0x801fd7ec vaddr 0xb851f000
panic: TLB out of universe: ksp 0xcbeb3f30 epc 0x80273b4c vaddr 0xb8f1f000
panic: TLB out of universe: ksp 0xc989ffd0 epc 0x801fd7ec vaddr 0xbc19f000
panic: TLB out of universe: ksp 0xc989bf30 epc 0x80273b4c vaddr 0xbc29f000
panic: TLB out of universe: ksp 0xc9899f80 epc 0x80273b4c vaddr 0xbc31f000
panic: TLB out of universe: ksp 0xc9897fd0 epc 0x80273b4c vaddr 0xbc39f000
panic: TLB out of universe: ksp 0xc9893f30 epc 0x80273b4c vaddr 0xbc49f000

 :
---
Izumi Tsutsui