Subject: Re: new to sgi linux

From: Oliver Frommel <[email-masked]>
Date: Wed, 1 Apr 1998 00:13:53 +0200 (MET DST)

> 
> I hope I finally get a kernel which boots my Indy now..
> This will the most exciting moment of my life :-)
> (greetings to Ralf)
>

ok. i finally managed to compile binutils and gcc (with a lot of help from Ralf)
and compiled the latest kernel on linux.sgi.com ..
you can get it from ftp://zero.ac.at/pub/sgi-linux/linux-980326.tar.gz

have fun
-oliver

---

From: Dong Liu <[email-masked]>
Date: Wed, 1 Apr 1998 12:05:15 -0500

Ulf Carlsson writes:
 > 2.1.90 doesn't work on my Indy :-(
 > 
 > Here's the output (maybe something for Ralf to look at):
 > 
 > PROMLIB: SGI ARCS firmware Version 1 Revision 10
 > PROMLIB: Total free ram 33284672 bytes (31528K, 30MB)
 > ARCH: SGI-IP22
 > CPU: MIPS-R4000 FPU<MIPS-R4000FPC> ICACHE DCACHE SCACHE
 > Loading R4000 MMU routines.
 > Primary instruction cache 8kb, linesize 16 bytes)
 > Primary data cache 8kb, linesize 16 bytes)
 > Secondary cache sized at 1024K linesize 128
 > Linux version 2.1.90 ([email-masked]) (gcc version 2.7.2) ...
 > MC: SGI memory controller Revision 3
 > R4600/R5000 SCACHE size 0k linesize 128 bytes
 > calculating r4koff... 000a1e0(500192)
 > GFX INIT: SHMIQ setup
 > usemaclone misc device registered (minor: 151)
 > Video screen size is 00004c88 at 88318db0
 > Console: 16 point font, 992 scans
 > Console: colour NEWPORT 158x62, 1 virtual console (max 63)
 > Calibrating delay loop... 49.97 BogoMIPS
 > Memory: 28300k/163372k available (1036 kernel code, 2188k data)
 > Swansea University Computer Society NET3.039 for Linux 2.1
 > NET3: Unix domain sockets 0.16 for Linux NET3.038.
 > Swansea University Computer Society TCP/IP for NET3.037
 > IP Protocols: ICMP, UDP, TCP
 > Checking for 'wait' instruction... unavailable
 > POSIX conformance testing by UNIFIX
 > Starting kswapd v 1.5
 > SGI Zilog8530 serial driver version 1.00
 > tty00 at 0xbfbd9838 (irq = 21) is a Zilog8530
 > tty01 at 0xbfbd9830 (irq = 21) is a Zilog8530
 > WD93: Driver version 1.25 compiled on Mar 31 1998 at 22:26:48
 >  debug_flags=0x00
 > wd33c93-0: chip=WD33c93B/13 no_sync=0xff no_dma=0scsi0 : GVP SeriesII SCSI
 > scsi : 1 host
 >  sending SDTR 0103013f0csync_xfer=2cpagefault from irq handler: 0000
 > $0 : 00000000 1004fc00 89f5ac80 ffffff80
 > $4 : 00000000 89f5acd0 1004fc00 1004fc00
 > $8 : 1004fc00 1000001f 4003f004 8802c10c
 > $12: 00000100 880ee84e 88009fa0 ffffffe0
 > $16: c0000044 00001000 a9f58000 89f59c00
 > $20: 89f59e70 bfbc0003 00000060 bfb90000
 > $24: a8747310 8810e5cc
 > $28: 88008000 88009c90 89f59e70 880d9204
 > epc   : 880224e8
 > Status: 1000fc02
 > Cause : 30008008
 > Aiee, killing interrupt handler
 > Kernel panic: Attempted to kill the idle task!
 > In swapper task - not syncing
 > 
I had the exact same result:=).

Dong

---

From: Ulf Carlsson <[email-masked]>
Date: Wed, 1 Apr 1998 19:06:46 +0200 (CEST)

So, that's all! Puh.. my fingers are burning, those hex numbers drove me
crazy..

I've still a R4000SC with 1mb cache. Tell me if I can dome something else
to help you debugging it. I don't think I have the knowledge needed to fix
the problem on my own right now, sorry... 

- Ulf

---

From: [email-masked]
Date: Wed, 1 Apr 1998 19:26:00 +0200

> R4600/R5000 SCACHE size 0k linesize 128 bytes

Ouch?  That routine should never be called.  Bug #1.

> wd33c93-0: chip=WD33c93B/13 no_sync=0xff no_dma=0scsi0 : GVP SeriesII SCSI
                                                           ^^^^^^^^^^^^^^^^^
Ouch.  Guess I got caught cuting'n'pasting from the Amiga code ...
Anyway, purely cosmetic.

> $4 : 00000000 89f5acd0 1004fc00 1004fc00
       ^^^^^^^^
Hmm...  That one looks like you sliped a line or something _really_
strange happend.  The value should actually be 0x00000080.  Which on
our horribly small screen font looks almost like 0x00000000.

It this assumption is right, then the fix will be easy.

> So, that's all! Puh.. my fingers are burning, those hex numbers drove me

That's why god sent men the serial console :-)

> the problem on my own right now, sorry... 

Let's fry that bug anyway.  What you provided in combination with the
kernel binary is actually useful information.

There is just one thing which I request when people are spreading kernels -
please don't strip them.  It makes disassembling quite a bit harder.

  Ralf

---

From: [email-masked]
Date: Wed, 1 Apr 1998 19:54:24 +0200

> I had the exact same result:=).

Everything else would be even worse.  Actually the only bug reports in
the last time I was _really_ worrying about were those where the kernel
just locked up without printing any message at all.

Assume that bug to be fixed, I think I know what's wrong.

  Ralf

---

From: [email-masked]
Date: Wed, 1 Apr 1998 20:04:19 +0200

On Wed, Apr 01, 1998 at 07:47:35PM +0200, Ulf Carlsson wrote:

> Does this mean that It's possible for me to give you more information?

I already have everything that is needed to fix the problem.

Thanks!

  Ralf

---

From: [email-masked]
Date: Wed, 1 Apr 1998 20:23:56 +0200

> I already have everything that is needed to fix the problem.

Below the patch.  Oliver is going to build a kernel to test the fix
for you.

  Ralf

--- linux-sgi/arch/mips/mm/r4xx0.c-orig	Wed Apr  1 20:09:18 1998
+++ linux-sgi/arch/mips/mm/r4xx0.c	Wed Apr  1 20:11:07 1998
@@ -1951,7 +1951,7 @@
 	a = addr & ~(sc_lsize - 1);
 	end = (addr + size) & ~(sc_lsize - 1);
 	while (1) {
-		flush_scache_line(addr); /* Hit_Writeback_Inv_SD */
+		flush_scache_line(a);	/* Hit_Writeback_Inv_SD */
 		if (addr == end) break;
 		addr += sc_lsize;
 	}
@@ -2006,7 +2006,7 @@
 	a = addr & ~(sc_lsize - 1);
 	end = (addr + size) & ~(sc_lsize - 1);
 	while (1) {
-		flush_scache_line(addr); /* Hit_Writeback_Inv_SD */
+		flush_scache_line(a); /* Hit_Writeback_Inv_SD */
 		if (addr == end) break;
 		addr += sc_lsize;
 	}
Apr  1 20:16:47 lappi sendmail[5998]: UAA05998: from=ralf, size=1155, class=0, pri=31155, nrcpts=1, msgid=<[email-masked]>, relay=ralf@localhost
Apr  1 20:16:49 lappi sendmail[6000]: UAA05998: to=[email-masked], ctladdr=ralf (500/500), delay=00:00:02, xdelay=00:00:02, mailer=esmtp, relay=mailhost.uni-koblenz.de [141.26.4.1], stat=Sent (UAA09136 Message accepted for delivery)
Apr  1 20:17:12 lappi sendmail[6004]: UAA06004: from=<[email-masked]>, size=2521, class=-60, pri=140521, nrcpts=1, msgid=<[email-masked]>, proto=ESMTP, relay=localhost [127.0.0.1]
Apr  1 20:17:13 lappi sendmail[6006]: UAA06006: from=<[email-masked]>, size=6343, class=-60, pri=144343, nrcpts=1, msgid=<[email-masked]>, proto=ESMTP, relay=localhost [127.0.0.1]
Apr  1 20:17:13 lappi sendmail[6009]: UAA06009: from=<[email-masked]>, size=2680, class=0, pri=32680, nrcpts=1, msgid=<[email-masked]>, proto=ESMTP, relay=localhost [127.0.0.1]
Apr  1 20:17:14 lappi sendmail[6005]: UAA06004: to=<ralf@localhost>, delay=00:00:02, xdelay=00:00:02, mailer=local, stat=Sent
Apr  1 20:17:14 lappi sendmail[6011]: UAA06009: to=<ralf@localhost>, delay=00:00:01, xdelay=00:00:00, mailer=local, stat=Sent
Apr  1 20:17:14 lappi sendmail[6013]: UAA06013: from=<MAILER-DAEMON>, size=2688, class=0, pri=32688, nrcpts=1, msgid=<[email-masked]>, proto=ESMTP, relay=localhost [127.0.0.1]
Apr  1 20:17:15 lappi sendmail[6014]: UAA06013: to=<ralf@localhost>, delay=00:00:01, xdelay=00:00:00, mailer=local, stat=Sent
Apr  1 20:17:15 lappi sendmail[6015]: UAA06015: from=<MAILER-DAEMON>, size=2668, class=0, pri=32668, nrcpts=1, msgid=<[email-masked]>, proto=ESMTP, relay=localhost [127.0.0.1]
Apr  1 20:17:15 lappi sendmail[6017]: UAA06015: to=<ralf@localhost>, delay=00:00:01, xdelay=00:00:00, mailer=local, stat=Sent
Apr  1 20:17:15 lappi sendmail[6018]: UAA06018: from=<MAILER-DAEMON>, size=2681, class=0, pri=32681, nrcpts=1, msgid=<[email-masked]>, proto=ESMTP, relay=localhost [127.0.0.1]
Apr  1 20:17:15 lappi sendmail[6020]: UAA06018: to=<ralf@localhost>, delay=00:00:00, xdelay=00:00:00, mailer=local, stat=Sent
Apr  1 20:17:16 lappi sendmail[6022]: UAA06022: from=<[email-masked]>, size=3507, class=-60, pri=141507, nrcpts=1, msgid=<[email-masked]>, bodytype=7BIT, proto=ESMTP, relay=localhost [127.0.0.1]
Apr  1 20:17:16 lappi sendmail[6023]: UAA06022: to=<ralf@localhost>, delay=00:00:01, xdelay=00:00:00, mailer=local, stat=Sent
Apr  1 20:17:16 lappi sendmail[6025]: UAA06025: from=<[email-masked]>, size=2748, class=-60, pri=140748, nrcpts=1, msgid=<[email-masked]>, proto=ESMTP, relay=localhost [127.0.0.1]
Apr  1 20:17:17 lappi sendmail[6026]: UAA06025: to=<ralf@localhost>, delay=00:00:01, xdelay=00:00:00, mailer=local, stat=Sent
Apr  1 20:17:17 lappi sendmail[6027]: UAA06027: from=<MAILER-DAEMON>, size=2315, class=0, pri=32315, nrcpts=1, msgid=<[email-masked]>, proto=ESMTP, relay=localhost [127.0.0.1]
Apr  1 20:17:17 lappi sendmail[6029]: UAA06027: to=<ralf@localhost>, delay=00:00:01, xdelay=00:00:00, mailer=local, stat=Sent
Apr  1 20:17:21 lappi sendmail[6008]: UAA06006: to=<ralf@localhost>, delay=00:00:09, xdelay=00:00:08, mailer=local, stat=Sent
Apr  1 20:17:49 lappi in.fingerd[6031]: connect from 141.26.5.28
Apr  1 20:20:58 lappi in.fingerd[6034]: connect from 141.26.4.29
Apr  1 20:21:57 lappi sendmail[6038]: UAA06038: from=<[email-masked]>, size=2362, class=-60, pri=140362, nrcpts=1, msgid=<[email-masked]>, proto=ESMTP, relay=localhost [127.0.0.1]
Apr  1 20:21:58 lappi sendmail[6039]: UAA06038: to=<ralf@localhost>, delay=00:00:02, xdelay=00:00:00, mailer=local, stat=Sent

---

From: Oliver Frommel <[email-masked]>
Date: Wed, 1 Apr 1998 20:26:10 +0200 (MET DST)

> Assume that bug to be fixed, I think I know what's wrong.

Ralf sent me a patch and i recompiled the 2.1.90 kernel with it applied.
You can find it on ftp://zero.aec.at/pub/sgi-linux/linux-980326-1.tar.gz

bye
-oliver

---

From: [email-masked]
Date: Wed, 1 Apr 1998 20:28:40 +0200

> You can find it on ftp://zero.aec.at/pub/sgi-linux/linux-980326-1.tar.gz

Stop the presses.  This is not my day.  I'm sending you a new patch.

  Ralf

---

From: Oliver Frommel <[email-masked]>
Date: Wed, 1 Apr 1998 20:38:39 +0200 (MET DST)

> Stop the presses.  This is not my day.  I'm sending you a new patch.

you can get ftp://zero.aec.at/pub/sgi-linux/linux-980326-2.tar.gz now ..

-oliver

---

From: William Ellis <[email-masked]>
Date: Wed, 01 Apr 1998 11:16:34 -0800

I was mucking around trying to get the Challenge S booting
about 2 months ago.  There were problems then since this
machine doesn't have a graphics card.  Just got several
of the latest compiled kernels and still no luck.  Anyone
have a kernel which boots on these machines?  
TIA.  Cheers, Bill

-Looks like it is still probing for graphics.
(output from the 2.1.90 compile -patched)

sash: boot -f /vmlinux
1153264+115552 entry: 0x8800250c

Exception: <vector=Normal>
Status register: 0x10004803<CU0,IM7,IM4,IPL=???,MODE=KERNEL,EXL,IE>
Cause register: 0xc000<CE=0,IP8,IP7,EXC=INT>
Exception PC: 0x880ea3c0, Exception RA: 0x880ea730
Interrupt exception
GIO Timeout Interrupt
GIO parity error register: 0x400<TIME>
GIO bus error: address: 0x80000000
  Saved user regs in hex (&gpda 0xa8740e48, &_regs 0xa8741048):
  arg: a8740000 ffffffff 25 2
  tmp: a8740000 0 88009fb0 88107240 88107244 91fffc0c 91fdf390 91fad900
  sve: a8740000 0 0 0 0 0 0 0
  t8 a8740000 t9 0 at 0 v0 0 v1 0 k1 10004801
  gp a8740000 fp 0 sp 0 ra 0

PANIC: Unexpected exception

[Press reset or ENTER to restart.]

^^ At least it catches the error now and doesn't
have to be hard booted.  ;p

---

From: Dong Liu <[email-masked]>
Date: Wed, 1 Apr 1998 15:01:38 -0500

> you can get ftp://zero.aec.at/pub/sgi-linux/linux-980326-2.tar.gz now ..

I got it, now the SCSI is working, it correctly recongnized my scsi
disck, but I got 

Ubable to handle kernel paging request at virtual address 00000000, epc == 880ce1f4, ra == 880ce1d4
Oops 0001

right after 

eth0: SGI Seeq8003 xx:xx:xx:xx:xx

I try mips-linux-addr2line, it didn't give me anything, I guess Oliver
didn't compile it with -g.

Dong

---

From: [email-masked]
Date: Wed, 1 Apr 1998 22:39:54 +0200

On Wed, Apr 01, 1998 at 08:54:55PM +0200, Ulf Carlsson wrote:

> eth0: SGI Seeq8003 08:00:69:07:a8:c7
> Unable to handle kernel paging request at virtual address 00000008, epc ==
> 880ce1f4, ra == 880ce1d4

That one seems to be a pretty nasty one.  What is happening is something
that looks like the caches are writing the values back with a certain
delay or not at all.  Not good ...

  Ralf

---

From: Ulf Carlsson <[email-masked]>
Date: Thu, 2 Apr 1998 00:47:15 +0200 (CEST)

> delay or not at all.  Not good ...

Isn't this the same old bug we've had for months now? It's atleast the
same error text - 'unable to handle kernel paging request at bla bla..'.

- Ulf

---

From: Ulf Carlsson <[email-masked]>
Date: Thu, 2 Apr 1998 00:47:25 +0200 (CEST)

- Ulf

---

From: Ulf Carlsson <[email-masked]>
Date: Thu, 2 Apr 1998 00:47:44 +0200 (CEST)

- Ulf

---

From: Ulf Carlsson <[email-masked]>
Date: Thu, 2 Apr 1998 00:48:48 +0200 (CEST)

- Ulf

---

From: Ulf Carlsson <[email-masked]>
Date: Thu, 2 Apr 1998 00:48:56 +0200 (CEST)

- Ulf

---

From: Ulf Carlsson <[email-masked]>
Date: Thu, 2 Apr 1998 00:49:28 +0200 (CEST)

- Ulf

---

From: Ulf Carlsson <[email-masked]>
Date: Thu, 2 Apr 1998 00:50:47 +0200 (CEST)

- Ulf

---

From: Ulf Carlsson <[email-masked]>
Date: Thu, 2 Apr 1998 01:14:02 +0200 (CEST)

Sorry, it's pine's fault..

- Ulf

---

From: [email-masked]
Date: Thu, 2 Apr 1998 09:27:33 +0200

> eth0: SGI Seeq8003 xx:xx:xx:xx:xx

I bet it's ``... at virtual address 00000008 ...'', not zero?

People, when writing down these number, please be careful.

> didn't compile it with -g.

It's quite usless that to the aggressive use of inline functions and -O2
optimizations in Linux anyway.

  Ralf

---

From: [email-masked]
Date: Thu, 2 Apr 1998 09:31:17 +0200

> Sorry, it's pine's fault..

It's written ``Pine'' but prononouced ``pain'' ...

  Ralf

---

From: Oliver Frommel <[email-masked]>
Date: Thu, 2 Apr 1998 16:42:59 +0200 (MET DST)

> delay or not at all.  Not good ...

kernel 2.1.90 with Ralf's new patch #3 is here:
ftp://zero.aec.at/pub/sgi-linux/linux-980326-3.tar.gz

-oliver