Discussion:
NetBSD installation on NWS-3260
Jürgen Fricke
2002-09-29 17:33:39 UTC
Permalink
Hi,

now after many trys i found an boot-image that rocks. But yet another
problem is that this image looks like incomplete. After the first and
second boostrap, a minimal NetBSD is running from floppy.

The .profile sh-script ask me to choose terminal type (VT100) and after
all i type (i) for installation. But the script can't execute the sysinst
program.

Where can i find this program compiled for running on NEWS-MIPS R3000?
And what i have to do to now for the next undocumented steps?

Any suggestions, tips or hints?

Best regards,
Jofry

--->
NEWS> bo fh()
NetBSD/newsmips Primary Boot

NetBSD/newsmips Secondary Boot
Booting fh(0,0,0)
1072536+2128992+129556 [89+47888+37487]=0x344b6c

Copyright (c) 1996, 1997, 1998, 1999
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 1.4L (INSTALL) #5: Sun Oct 31 22:44:53 JST 1999
***@mirage:/usr/src/sys/arch/newsmips/compile/INSTALL
total memory = 36832 KB
avail memory = 30612 KB
using 486 buffers containing 1944 KB of memory
SONY NET WORK STATION, Model NWS-3260, Machine ID #50033
mainbus0 (root)
cpu0 at mainbus0: cpu0: MIPS R3000 CPU Rev. 3.0 with MIPS R3010 FPC Rev.
4.0
cpu0: 32KB Instruction, 32KB Data, direct mapped cache
hb0 at mainbus0
le0 at hb0 addr 0xbff80000: address 08:00:46:00:79:31
le0: 8 receive buffers, 2 transmit buffers
mkclock0 at hb0 addr 0xbff407f8
zsc0 at hb0 addr 0xbfec0000
zstty0 at zsc0 channel 0 (console)
zstty1 at zsc0 channel 1
sc0 at hb0 addr 0xbfe00100
scsibus0 at sc0: 8 targets, 8 luns per target
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 targ 0 lun 0: <SEAGATE, ST1480, 4511> SCSI2 0/direct
fixed
sd0: 406 MB, 1476 cyl, 9 head, 62 sec, 512 bytes/sect x 832527 sectors
SC(i): [istatus=0x84, tstatus=0x0]
SC(i): [istatus=0x84, tstatus=0x0]
SC(i): [istatus=0x84, tstatus=0x0]
SC(i): [istatus=0x84, tstatus=0x0]
SC(i): [istatus=0x84, tstatus=0x0]
SC(i): [istatus=0x84, tstatus=0x0]
SC(i): [istatus=0x84, tstatus=0x0]
SC(i): [istatus=0x84, tstatus=0x0]
SC(i): [istatus=0x84, tstatus=0x0]
SC(i): [istatus=0x84, tstatus=0x0]
SC(i): [istatus=0x84, tstatus=0x0]
SC(i): [istatus=0x84, tstatus=0x0]
md0: internal 2048K image area
boot device: <unknown>
root on md0a dumps on md0b
WARNING: preposterous clock chip time
root file system type: ffs
erase ^H, werase ^W, kill ^U, intr ^C, status ^T
Terminal type? [vt100]
Erase is backspace.
(I)nstall, (S)hell or (H)alt ? i
/sysinst: not found
#
<---
Mauricio
2002-11-24 04:38:53 UTC
Permalink
Wow! Many months have passed since a message was posted int
his list. I wonder if that means I am the only bloke left with a
NEWS box without netbsd. =)
Post by Jürgen Fricke
Hi,
now after many trys i found an boot-image that rocks. But yet another
problem is that this image looks like incomplete. After the first and
second boostrap, a minimal NetBSD is running from floppy.
The .profile sh-script ask me to choose terminal type (VT100) and after
all i type (i) for installation. But the script can't execute the sysinst
program.
Where can i find this program compiled for running on NEWS-MIPS R3000?
And what i have to do to now for the next undocumented steps?
Any suggestions, tips or hints?
Best regards,
Jofry
Sounds like you went further than I did:

Testing memories: done.
12288K bytes available, 32K bytes reserved.

SONY NET WORK STATION R3000 Monitor Release 2.0A
Model NWS-3710, Machine ID #30145, Ethernet address 08:00:46:00:79:e7

NEWS> bo fh
NetBSD/newsmips Primary Boot

NetBSD/newsmips Secondary Boot
Booting fh(0,0,0)
1072536+2128992+129556 [89+47888+37487]=0x344b6c

Copyright (c) 1996, 1997, 1998, 1999
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 1.4L (INSTALL) #5: Sun Oct 31 22:44:53 JST 1999
***@mirage:/usr/src/sys/arch/newsmips/compile/INSTALL
total memory = 12256 KB
avail memory = 7952 KB
using 178 buffers containing 712 KB of memory
SONY NET WORK STATION, Model NWS-3710, Machine ID #30145
mainbus0 (root)
cpu0 at mainbus0: cpu0: MIPS R3000 CPU Rev. 2.0 with MIPS R3010 FPC Rev. 2.0
cpu0: 64KB Instruction, 64KB Data, direct mapped cache
hb0 at mainbus0
le0 at hb0 addr 0xbff80000: address 08:00:46:00:79:e7
le0: 8 receive buffers, 2 transmit buffers
mkclock0 at hb0 addr 0xbff407f8
zsc0 at hb0 addr 0xbfec0000
zstty0 at zsc0 channel 0 (console)
zstty1 at zsc0 channel 1
sc0 at hb0 addr 0xbfe00100
scsibus0 at sc0: 8 targets, 8 luns per target
scsibus0: waiting 2 seconds for devices to settle...

I've been trying different boot files. Usually they would hang up
just before the Copyright notice. The one I tried was

-rw-rw-rw- 1 raub weirdos 1474560 Sep 15 10:14 boot-newsmips-14L-nofb.fs

which seems to be a bit larger than the floppy:

# dd if=boot-newsmips-14L-nofb.fs bs=18k of=/dev/rfd0a
write: No space left on device
80+0 records in
80+0 records out
#

Oh well, at least I went somewhere. That said, it now hangs up on
waiting for the devices to settle, whatever it means by that. I
wonder if that means the SCSI HD I have in the machine is not working.
Izumi Tsutsui
2002-11-24 09:59:49 UTC
Permalink
Sorry, I have not tracked what causes hangs after kernel is loaded,
but it seems there are some other problems.
Post by Mauricio
I've been trying different boot files. Usually they would hang up
just before the Copyright notice. The one I tried was
-rw-rw-rw- 1 raub weirdos 1474560 Sep 15 10:14 boot-newsmips-14L-nofb.fs
# dd if=boot-newsmips-14L-nofb.fs bs=18k of=/dev/rfd0a
write: No space left on device
80+0 records in
80+0 records out
#
Hmm, 512(bytes) * 80(cyls) * 2(heads) * 18(sectors) = 1474560,
so it should be fit a floppy. What machine did you tried to
write the image? It seems there is no device file for fd0a
under /dev and just your root file system is filled.
Post by Mauricio
Oh well, at least I went somewhere. That said, it now hangs up on
waiting for the devices to settle, whatever it means by that. I
wonder if that means the SCSI HD I have in the machine is not working.
It seems there are some spurious interrups. How about the workaround
mentioned in news68k FAQ?
http://www.netbsd.org/Ports/news68k/faq.html#level_3_int
---
Izumi Tsutsui
***@ceres.dti.ne.jp
Mauricio
2002-11-24 17:50:57 UTC
Permalink
Post by Izumi Tsutsui
Sorry, I have not tracked what causes hangs after kernel is loaded,
but it seems there are some other problems.
Post by Mauricio
I've been trying different boot files. Usually they would hang up
just before the Copyright notice. The one I tried was
-rw-rw-rw- 1 raub weirdos 1474560 Sep 15 10:14
boot-newsmips-14L-nofb.fs
# dd if=boot-newsmips-14L-nofb.fs bs=18k of=/dev/rfd0a
write: No space left on device
80+0 records in
80+0 records out
#
Hmm, 512(bytes) * 80(cyls) * 2(heads) * 18(sectors) = 1474560,
so it should be fit a floppy. What machine did you tried to
write the image? It seems there is no device file for fd0a
under /dev and just your root file system is filled.
I am using a Sparc 20 running Solaris 2.6, as it is the only
other unix box I have with a floppy. The other non-unix machine I
have with a floppy is a Mac. I wonder if it is the arguments (bs?)
that are slightly different.
Post by Izumi Tsutsui
Post by Mauricio
Oh well, at least I went somewhere. That said, it now hangs up on
waiting for the devices to settle, whatever it means by that. I
wonder if that means the SCSI HD I have in the machine is not working.
It seems there are some spurious interrups. How about the workaround
mentioned in news68k FAQ?
http://www.netbsd.org/Ports/news68k/faq.html#level_3_int
I will try that next time i boot the machine. I probably
also need to get a new NVRAM since this one seems to be deceased.
Mauricio
2003-01-08 22:26:45 UTC
Permalink
Well, I have not touched the machine in a while, but recently
I was able to put some time on it. I also took the time to replace
its HD with a ~1GB 3 1/2" HH one. Here are some results with
different boot files:

=================================> Now trying boot-newsmips-test:

NEWS> bo fh
NetBSD/newsmips Primary Boot

a0 0
a1 50007001
a2 80bffef4 (/boot)
a3 bf8000
a4 67696e66
a5 6f002e72
block_size = 8192
block_count = 7
entry_point = 0xa0700000
reading block: 17 33 49 65 81 97 113 done
NetBSD/newsmips Secondary Boot, Revision 1.7
(***@mirage, Mon Sep 30 16:51:24 JST 2002)
HB system.
howto = 0x0
bootdev = 0x50007001
bootname =
maxmem = 0xbf8000
Booting fh(0,0,0)
trying fh(0,0,0)/netbsd...
devopen: fh(0,0,0)/netbsd
devname = fh(0,0,0), fd = 3
1765584+151148 [72592+60632]=0x1f49b8
entry = 0x80001000
ssym = 0x801d4f3c
esym = 0x801f59b8

consinit() done.
cpu_model = news3700
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002
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 1.6H (GALANT) #130: Mon Sep 30 19:13:44 JST 2002
***@mirage:/usr/src/sys/arch/newsmips/compile/GALANT
total memory = 12256 KB
avail memory = 9048 KB
using 178 buffers containing 712 KB of memory
SONY NET WORK STATION, Model NWS-3710, Machine ID #30145
mainbus0 (root)
cpu0 at mainbus0: MIPS R3000 CPU (0x220) Rev. 2.0 with MIPS R3010 FPC Rev. 2.0
cpu0: 64KB/4B direct-mapped Instruction cache, 64 TLB entries
cpu0: 64KB/4B direct-mapped write-through Data cache
hb0 at mainbus0
le0 at hb0 addr 0xbff80000 level 1: address 08:00:46:00:79:e7
le0: 8 receive buffers, 2 transmit buffers
mkclock0 at hb0 addr 0xbff407f8
zsc0 at hb0 addr 0xbfec0000 level 1
zstty0 at zsc0 channel 0 (console i/o)
zstty1 at zsc0 channel 1
kb0 at hb0 addr 0xbfd00000 level 2
wskbd0 at kb0 mux 1
ms0 at hb0 addr 0xbfd00004 level 2
wsmouse0 at ms0 mux 0
sc0 at hb0 addr 0xbfe00100 level 0
scsibus0 at sc0: 8 targets, 8 luns per target
scsibus0: waiting 2 seconds for devices to settle...
SC(t): [istatus=0x80, tstatus=0x2]
sd0 at scsibus0 target 6 lun 0: <SEAGATE, ST31230N, 0290> SCSI2 0/direct fixed
sd0: 1010 MB, 3992 cyl, 5 head, 103 sec, 512 bytes/sect x 2069860 sectors
SC(t): [istatus=0x80, tstatus=0x2]
boot device: <unknown>
root device: ?
use one of: le0 sd0[a-h] ddb halt reboot
root device:
<What does it need next?>

=================================> Now trying boot-newsmips-14L-nofb.fs

Testing memories: done.
12288K bytes available, 32K bytes reserved.

SONY NET WORK STATION R3000 Monitor Release 2.0A
Model NWS-3710, Machine ID #30145, Ethernet address 08:00:46:00:79:e7

NEWS> bo fh
NetBSD/newsmips Primary Boot

NetBSD/newsmips Secondary Boot
Booting fh(0,0,0)
1072536+2128992+129556 [89+47888+37487]=0x344b6c

Copyright (c) 1996, 1997, 1998, 1999
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 1.4L (INSTALL) #5: Sun Oct 31 22:44:53 JST 1999

***@mirage:/usr/src/sys/arch/newsmips/compile/INSTALL
total memory = 12256 KB
avail memory = 7952 KB
using 178 buffers containing 712 KB of memory
SONY NET WORK STATION, Model
NWS-3710, Machine ID #30145
mainbus0 (root)
cpu0 at mainbus0: cpu0: MIPS R3000
CPU Rev. 2.0 with MIPS R3010 FPC Rev. 2.0
cpu0: 64KB Instruction, 64KB Data,
direct mapped cache
hb0 at mainbus0
le0 at hb0 addr 0xbff80000: address
08:00:46:00:79:e7
le0: 8 receive buffers, 2 transmit buffers
mkclock0 at hb0 addr 0xbff407f8
zsc0 at hb0 addr 0xbfec0000
zstty0 at zsc0 channel 0 (console)
zstty1 at zsc0 channel 1
sc0 at hb0 addr 0xbfe00100
scsibus0 at sc0: 8 targets, 8 luns per target
scsibus0: waiting 2 seconds for
devices to settle...

<freezes>

# dd if=boot-newsmips-1.6H.fs bs=18k of=/dev/rfd0a
68+1 records in
68+1 records out
# eject floppy
#

Testing memories: done.
12288K bytes available, 32K bytes reserved.

SONY NET WORK STATION R3000 Monitor Release 2.0A
Model NWS-3710, Machine ID #30145, Ethernet address 08:00:46:00:79:e7

NEWS> bo fh
NetBSD/newsmips Primary Boot
NetBSD/newsmips Secondary Boot, Revision 1.7
(***@mirage, Sat Sep 14 18:20:02 JST 2002)
Booting fh(0,0,0)
3788720+128968=0x3bc914

<freezes>

=================================> Now trying boot.fs

NEWS> eject fh
NEWS> bo fh
NetBSD/newsmips Primary Boot
NetBSD/newsmips Secondary Boot, Revision 1.7
(***@tgm.daemon.org, Mon Sep 9 01:13:14 UTC 2002)
Booting fh(0,0,0)
3788736+127656=0x3bc404

<freezes>

=================================> Now trying boot-20020210.fs

Testing memories: done.
12288K bytes available, 32K bytes reserved.

SONY NET WORK STATION R3000 Monitor Release 2.0A
Model NWS-3710, Machine ID #30145, Ethernet address 08:00:46:00:79:e7

NEWS> bo fh
NetBSD/newsmips Primary Boot
NetBSD/newsmips Secondary Boot
Booting fh(0,0,0)
3258512+127256 [60128+50602]=0x355c48

<freezes>
Mauricio
2003-01-12 20:04:00 UTC
Permalink
Is it single or multi layer? I broke one of the SIMM
sockets. I have a few, nnicer ones to use, but I am not that good
with multilayer motherboards...
Mauricio
2003-01-15 22:30:27 UTC
Permalink
Post by Mauricio
Is it single or multi layer? I broke one of the SIMM
sockets. I have a few, nnicer ones to use, but I am not that good
with multilayer motherboards...
Update: It seems the operation was a success: I put back
the memories and the machine and it reports the same amount o memory
as before.

However, when I tried to add more memory than the 12 1MB SIMMs in it,
it does not seem to recognize them. I wonder why. Can I skip a bank?

Also, there is a jumper (JP3) that selects between 1MB and 4MB SIMMs.
Mauricio
2003-01-27 13:17:51 UTC
Permalink
Is there anybody.... out there?
Emmanuel Chaput
2003-01-28 09:03:53 UTC
Permalink
Post by Mauricio
Is there anybody.... out there?
"Just nod if tou can hear me. Is there anyone at home ?"
--
Emmanuel Chaput, Maître de Conférences - Dépt Télécom & Réseau, ENSEEIHT
*5 61 58 82 10 (Fax *5 61 58 80 14) ***@enseeiht.fr
Izumi Tsutsui
2003-01-28 14:48:32 UTC
Permalink
Post by Emmanuel Chaput
Post by Mauricio
Is there anybody.... out there?
"Just nod if tou can hear me. Is there anyone at home ?"
I believe there are a bit more people than port-news68k here ;-)

I have not got any clue to fix bootloader problem on serial console..
1.4L bootloader seems to work, but there are many changes between
1.4L and 1.6M. But -current bootloader works fine on news5000 even
on serial console.
---
Izumi Tsutsui
***@ceres.dti.ne.jp
Mauricio
2003-01-30 07:44:52 UTC
Permalink
Post by Izumi Tsutsui
Post by Emmanuel Chaput
Post by Mauricio
Is there anybody.... out there?
"Just nod if tou can hear me. Is there anyone at home ?"
I believe there are a bit more people than port-news68k here ;-)
I have not got any clue to fix bootloader problem on serial console..
1.4L bootloader seems to work, but there are many changes between
1.4L and 1.6M. But -current bootloader works fine on news5000 even
on serial console.
---
Izumi Tsutsui
All I can say is I wish I knew how to make a bootloader so I
could help out. Unfortunately, in this aspect I am rather like Homer
Simpson: clueless.
Izumi Tsutsui
2003-04-19 12:57:50 UTC
Permalink
Post by Mauricio
Post by Izumi Tsutsui
I have not got any clue to fix bootloader problem on serial console..
1.4L bootloader seems to work, but there are many changes between
1.4L and 1.6M. But -current bootloader works fine on news5000 even
on serial console.
All I can say is I wish I knew how to make a bootloader so I
could help out. Unfortunately, in this aspect I am rather like Homer
Simpson: clueless.
Today I found a (silly) bug and I've committed the fix:
http://mail-index.netbsd.org/source-changes/2003/04/19/0006.html

Would you please try a new boot.fs image for newsmips?
http://www.ceres.dti.ne.jp/~tsutsui/netbsd/boot-newsmips-1.6R.fs.gz

If it works, I'll build a new snapshot.
(Unfortunately, I'm afraid it's too late for 1.6.1-release..)
---
Izumi Tsutsui
***@ceres.dti.ne.jp
Mauricio
2003-04-20 20:35:03 UTC
Permalink
Post by Izumi Tsutsui
Post by Mauricio
Post by Izumi Tsutsui
I have not got any clue to fix bootloader problem on serial console..
1.4L bootloader seems to work, but there are many changes between
1.4L and 1.6M. But -current bootloader works fine on news5000 even
on serial console.
All I can say is I wish I knew how to make a bootloader so I
could help out. Unfortunately, in this aspect I am rather like Homer
Simpson: clueless.
http://mail-index.netbsd.org/source-changes/2003/04/19/0006.html
Would you please try a new boot.fs image for newsmips?
http://www.ceres.dti.ne.jp/~tsutsui/netbsd/boot-newsmips-1.6R.fs.gz
If it works, I'll build a new snapshot.
(Unfortunately, I'm afraid it's too late for 1.6.1-release..)
---
Izumi Tsutsui
Hello there!

Thanks to your new floppy I do get to boot the machine and
get *this* close to start installing netbsd:


NEWS> bo fh
NetBSD/newsmips Primary Boot
NetBSD/newsmips Secondary Boot, Revision 1.7
(***@mirage, Sun Apr 13 10:41:00 JST 2003)
Booting fh(0,0,0)
3883504+136952=0x3d5afc

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
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 1.6R (INSTALL) #9: Sat Apr 19 20:49:23 JST 2003
***@mirage:/sys/arch/newsmips/compile/INSTALL
total memory = 12256 KB
avail memory = 7216 KB
using 178 buffers containing 712 KB of memory
SONY NET WORK STATION, Model NWS-3710, Machine ID #30145
mainbus0 (root)
cpu0 at mainbus0: MIPS R3000 CPU (0x220) Rev. 2.0 with MIPS R3010 FPC Rev. 2.0
cpu0: 64KB/4B direct-mapped Instruction cache, 64 TLB entries
cpu0: 64KB/4B direct-mapped write-through Data cache
hb0 at mainbus0
le0 at hb0 addr 0xbff80000 level 1: address 08:00:46:00:79:e7
le0: 8 receive buffers, 2 transmit buffers
mkclock0 at hb0 addr 0xbff407f8
zsc0 at hb0 addr 0xbfec0000 level 1
zstty0 at zsc0 channel 0 (console i/o)
zstty1 at zsc0 channel 1
kb0 at hb0 addr 0xbfd00000 level 2
wskbd0 at kb0 (mux ignored)
sc0 at hb0 addr 0xbfe00100 level 0
scsibus0 at sc0: 8 targets, 8 luns per target
md0: internal 2560 KB image area
scsibus0: waiting 2 seconds for devices to settle...
SC(t): [istatus=0x80, tstatus=0x2]
sd0 at scsibus0 target 6 lun 0: <SEAGATE, ST31230N, 0290> disk fixed
sd0: 1010 MB, 3992 cyl, 5 head, 103 sec, 512 bytes/sect x 2069860 sectors
SC(t): [istatus=0x80, tstatus=0x2]
boot device: <unknown>
root on md0a dumps on md0b
root file system type: ffs
erase ^H, werase ^W, kill ^U, intr ^C, status ^T
Terminal type? [vt100]
Erase is backspace.
(I)nstall, (S)hell or (H)alt ? i

Welcome to sysinst, the NetBSD-1.6R system installation tool. This
menu-driven tool is designed to help you install NetBSD to a hard disk, or
upgrade an existing NetBSD system, with a minimum of work. In the following
menus, you may change the current selection by either typing the reference
letter (a, b, c, ...). Arrow keys may also work. You activate the current
selection from the menu by typing the enter key.

If you booted from a floppy, you may now remove the disk.

Thank you for using NetBSD!


You have chosen to install NetBSD on your hard disk. This will change
information on your hard disk. You should have made a full backup before
c) Load and install distribution sets

(After you enter the partition information but before your disk is changed,
you will have the opportunity to quit this procedure.)

Shall we continue?
d0: no disk label
1sd0: no disk label ¯>b: Yes ¯

Now, where did it stop? Well, when I got to the screen where
it asks if you want to install to the hard drive and I select yes
(option b), it gives the message that my sd0 has no disk label. How
can I label it so it can continue? Can I just slap it to a Sun
sparcstation?

Anyway, it seems that after this I may finally be able to
install netbsd in this machine. =)
Izumi Tsutsui
2003-04-21 14:36:25 UTC
Permalink
Hi, thank you for your report.
Post by Mauricio
Thanks to your new floppy I do get to boot the machine and
NetBSD 1.6R (INSTALL) #9: Sat Apr 19 20:49:23 JST 2003
total memory = 12256 KB
avail memory = 7216 KB
using 178 buffers containing 712 KB of memory
SONY NET WORK STATION, Model NWS-3710, Machine ID #30145
Good, I'll add NWS-3710 to the list of supported machines.
Post by Mauricio
Shall we continue?
d0: no disk label
1sd0: no disk label $B/>(Bb: Yes /
Now, where did it stop? Well, when I got to the screen where
it asks if you want to install to the hard drive and I select yes
(option b), it gives the message that my sd0 has no disk label. How
can I label it so it can continue? Can I just slap it to a Sun
sparcstation?
"sd0: no disk label" message is printed by kernel when
it tries to read disklabel but there is no label on the disk.
This message is just a warning, so you can proceed installation
and then sysinst will support to make partitions and disklabel.
If screen is corrupted by the warning messages, you always can hit
^L (ctrl-L) to repaint the screen.
Post by Mauricio
Anyway, it seems that after this I may finally be able to
install netbsd in this machine. =)
Okay, I've put a new snapshot built from around 20030419 sources:
ftp://ftp.NetBSD.ORG/pub/NetBSD/arch/newsmips/snapshot/20030419/
---
Izumi Tsutsui
***@ceres.dti.ne.jp
Mauricio
2003-04-21 15:22:23 UTC
Permalink
?Hi, thank you for your report.
No problem. Glad to be of help.
Post by Mauricio
Shall we continue?
d0: no disk label
1sd0: no disk label ?b: Yes /
Now, where did it stop? Well, when I got to the screen where
it asks if you want to install to the hard drive and I select yes
(option b), it gives the message that my sd0 has no disk label. How
can I label it so it can continue? Can I just slap it to a Sun
sparcstation?
"sd0: no disk label" message is printed by kernel when
it tries to read disklabel but there is no label on the disk.
This message is just a warning, so you can proceed installation
and then sysinst will support to make partitions and disklabel.
If screen is corrupted by the warning messages, you always can hit
^L (ctrl-L) to repaint the screen.
I found what was going on: once that problem happened, the
screen would stop being written to (as in the vt1000 escape commands
are being ignored or just not being sent anymore). So, I now have to
keep pressing the right arrow key to see the text being draw on on
the screen.
Post by Mauricio
Anyway, it seems that after this I may finally be able to
install netbsd in this machine. =)
ftp://ftp.NetBSD.ORG/pub/NetBSD/arch/newsmips/snapshot/20030419/
---
Izumi Tsutsui
Izumi Tsutsui
2003-04-21 15:54:06 UTC
Permalink
Post by Mauricio
I found what was going on: once that problem happened, the
screen would stop being written to (as in the vt1000 escape commands
are being ignored or just not being sent anymore). So, I now have to
keep pressing the right arrow key to see the text being draw on on
the screen.
Hmm, it seems there is some problem around flow control.
Could you try to enable crtscts like this?
---
:
boot device: <unknown>
root on md0a dumps on md0b
WARNING: clock gained 2 days -- CHECK AND RESET THE DATE!
root file system type: ffs
erase ^H, werase ^W, kill ^U, intr ^C, status ^T
Terminal type? [vt100]
Erase is backspace.
(I)nstall, (S)hell or (H)alt ? s
# stty crtscts
# sysinst
---

I saw the similar problem several times, but I don't know
what is the real problem. I guess ZS_DELAY in newsmips/dev/zs_hb.c
might have some clue, but not sure.
---
Izumi Tsutsui
***@ceres.dti.ne.jp
Mauricio
2003-04-21 19:25:37 UTC
Permalink
Post by Izumi Tsutsui
Post by Mauricio
I found what was going on: once that problem happened, the
screen would stop being written to (as in the vt1000 escape commands
are being ignored or just not being sent anymore). So, I now have to
keep pressing the right arrow key to see the text being draw on on
the screen.
Hmm, it seems there is some problem around flow control.
Could you try to enable crtscts like this?
---
boot device: <unknown>
root on md0a dumps on md0b
WARNING: clock gained 2 days -- CHECK AND RESET THE DATE!
root file system type: ffs
erase ^H, werase ^W, kill ^U, intr ^C, status ^T
Terminal type? [vt100]
Erase is backspace.
(I)nstall, (S)hell or (H)alt ? s
# stty crtscts
# sysinst
---
I saw the similar problem several times, but I don't know
what is the real problem. I guess ZS_DELAY in newsmips/dev/zs_hb.c
might have some clue, but not sure.
---
I just tried and am still having the same problem. Is there
any terminal set in the install program that is even dumber (i.e. no
escape sequences)? At least thne I would eb able to get this
installed
Izumi Tsutsui
2003-04-22 14:40:53 UTC
Permalink
Post by Mauricio
I just tried and am still having the same problem. Is there
any terminal set in the install program that is even dumber (i.e. no
escape sequences)? At least thne I would eb able to get this
installed
Hm, what type of cable are you using for the serial console,
and what settings are you using on your terminal for flow control?

Maybe you need the cable mentioned in the NetBSD serial port primer page:
http://www.netbsd.org/Documentation/Hardware/Misc/serial.html
---
Izumi Tsutsui
***@ceres.dti.ne.jp
Mauricio
2003-04-22 21:08:31 UTC
Permalink
Post by Izumi Tsutsui
Post by Mauricio
I just tried and am still having the same problem. Is there
any terminal set in the install program that is even dumber (i.e. no
escape sequences)? At least thne I would eb able to get this
installed
Hm, what type of cable are you using for the serial console,
and what settings are you using on your terminal for flow control?
I am really using only a garden-variety db9 to db25 serial
cable. It is the same one I use to connect to the serial ports of my
SS20, SS1+, and Dec 5000/25. Terminal settings are th usual: 9600
8N1.
Post by Izumi Tsutsui
http://www.netbsd.org/Documentation/Hardware/Misc/serial.html
---
Izumi Tsutsui
At thsi point in time, I do not know...
Mauricio
2003-04-23 00:27:35 UTC
Permalink
Post by Mauricio
Post by Izumi Tsutsui
Post by Mauricio
I just tried and am still having the same problem. Is there
any terminal set in the install program that is even dumber (i.e. no
escape sequences)? At least thne I would eb able to get this
installed
Hm, what type of cable are you using for the serial console,
and what settings are you using on your terminal for flow control?
I am really using only a garden-variety db9 to db25 serial
cable. It is the same one I use to connect to the serial ports of
9600 8N1.
Post by Izumi Tsutsui
http://www.netbsd.org/Documentation/Hardware/Misc/serial.html
---
Izumi Tsutsui
At thsi point in time, I do not know...
Also, I installed netbsd in the Dec 5000/25 without a hitch
-- the vt100 escape sequences worked flawlessly -- using this very
serial cable.
Izumi Tsutsui
2003-04-26 17:10:03 UTC
Permalink
Post by Mauricio
Also, I installed netbsd in the Dec 5000/25 without a hitch
-- the vt100 escape sequences worked flawlessly -- using this very
serial cable.
Now I can reproduce your problem on my 3470.
The problem was cased by autorepeat of the terminal
(which is NetBSD/cats), and maybe there are some bugs
around RX handling in zs serial driver.
(I've implemented generic software interrupt, but it doesn't help..)

I'll check zs driver (both MI and MD part) later.
---
Izumi Tsutsui
***@ceres.dti.ne.jp
Izumi Tsutsui
2003-04-27 08:19:23 UTC
Permalink
Post by Izumi Tsutsui
(I've implemented generic software interrupt, but it doesn't help..)
The attached is a patch for generic software interrupt support.
Most code is taken from algor port, and interrupt handlers
of hb and apbus are also modified to share some structures.
I've tested new kernel with this patch both on NWS-3470D and
NWS-5000X, it seems to work without problem.

If there is no objection I'll commit this tomorrow.
---
Izumi Tsutsui
***@ceres.dti.ne.jp

Index: apbus/apbus.c
===================================================================
RCS file: /cvsroot/src/sys/arch/newsmips/apbus/apbus.c,v
retrieving revision 1.13
diff -u -r1.13 apbus.c
--- apbus/apbus.c 2003/04/19 14:56:05 1.13
+++ apbus/apbus.c 2003/04/27 04:50:33
@@ -38,6 +38,7 @@
#include <machine/autoconf.h>
#define _NEWSMIPS_BUS_DMA_PRIVATE
#include <machine/bus.h>
+#include <machine/intr.h>
#include <newsmips/apbus/apbusvar.h>

static int apbusmatch (struct device *, struct cfdata *, void *);
@@ -71,21 +72,8 @@
CFATTACH_DECL(ap, sizeof(struct apbus_softc),
apbusmatch, apbusattach, NULL, NULL);

-#define APBUS_DEVNAMELEN 16
-
-struct ap_intrhand {
- struct ap_intrhand *ai_next;
- int ai_mask;
- int ai_priority;
- int (*ai_func) (void*); /* function */
- void *ai_aux; /* softc */
- char ai_name[APBUS_DEVNAMELEN];
- int ai_ctlno;
-};
-
#define NLEVEL 2
-
-static struct ap_intrhand *apintr[NLEVEL];
+static struct newsmips_intr apintr_tab[NLEVEL];

static int
apbusmatch(parent, cfdata, aux)
@@ -111,6 +99,8 @@
struct apbus_attach_args child;
struct apbus_dev *apdev;
struct apbus_ctl *apctl;
+ struct newsmips_intr *ip;
+ int i;

*(volatile u_int *)(NEWS5000_APBUS_INTST) = 0xffffffff;
*(volatile u_int *)(NEWS5000_APBUS_INTMSK) = 0xffffffff;
@@ -119,6 +109,11 @@

printf("\n");

+ for (i = 0; i < NLEVEL; i++) {
+ ip = &apintr_tab[i];
+ LIST_INIT(&ip->intr_q);
+ }
+
/*
* get first ap-device
*/
@@ -202,13 +197,16 @@
int level;
int stat;
{
- int nintr = 0;
- struct ap_intrhand *ai;
-
- for (ai = apintr[level]; ai != NULL; ai = ai->ai_next) {
- if (ai->ai_mask & stat) {
- nintr += (*ai->ai_func)(ai->ai_aux);
- }
+ struct newsmips_intr *ip;
+ struct newsmips_intrhand *ih;
+ int nintr;
+
+ ip = &apintr_tab[level];
+
+ nintr = 0;
+ LIST_FOREACH(ih, &ip->intr_q, ih_q) {
+ if (ih->ih_mask & stat)
+ nintr += (*ih->ih_func)(ih->ih_arg);
}
return nintr;
}
@@ -217,45 +215,58 @@
* register device interrupt routine
*/
void *
-apbus_intr_establish(level, mask, priority, func, aux, name, ctlno)
+apbus_intr_establish(level, mask, priority, func, arg, name, ctlno)
int level;
int mask;
int priority;
int (*func) (void *);
- void *aux;
+ void *arg;
char *name;
int ctlno;
{
- struct ap_intrhand *ai, **aip;
- volatile unsigned int *inten0 = (volatile unsigned int *)NEWS5000_INTEN0;
- volatile unsigned int *inten1 = (volatile unsigned int *)NEWS5000_INTEN1;
+ struct newsmips_intr *ip;
+ struct newsmips_intrhand *ih, *curih;
+ volatile u_int32_t *inten0, *inten1;
+
+ ip = &apintr_tab[level];

- ai = malloc(sizeof(*ai), M_DEVBUF, M_NOWAIT);
- if (ai == NULL)
+ ih = malloc(sizeof(*ih), M_DEVBUF, M_NOWAIT);
+ if (ih == NULL)
panic("apbus_intr_establish: can't malloc handler info");
- ai->ai_mask = mask;
- ai->ai_priority = priority;
- ai->ai_func = func;
- ai->ai_aux = aux;
- strncpy(ai->ai_name, name, APBUS_DEVNAMELEN-1);
- ai->ai_ctlno = ctlno;
-
- for (aip = &apintr[level]; *aip != NULL; aip = &(*aip)->ai_next) {
- if ((*aip)->ai_priority < priority)
- break;
+ ih->ih_mask = mask;
+ ih->ih_priority = priority;
+ ih->ih_func = func;
+ ih->ih_arg = arg;
+
+ if (LIST_EMPTY(&ip->intr_q)) {
+ LIST_INSERT_HEAD(&ip->intr_q, ih, ih_q);
+ goto done;
}
- ai->ai_next = *aip;
- *aip = ai;
+
+ for (curih = LIST_FIRST(&ip->intr_q);
+ LIST_NEXT(curih, ih_q) != NULL;
+ curih = LIST_NEXT(curih, ih_q)) {
+ if (ih->ih_priority > curih->ih_priority) {
+ LIST_INSERT_BEFORE(curih, ih, ih_q);
+ goto done;
+ }
+ }
+
+ LIST_INSERT_AFTER(curih, ih, ih_q);
+
+ done:
switch (level) {
case 0:
+ inten0 = (volatile u_int32_t *)NEWS5000_INTEN0;
*inten0 |= mask;
break;
case 1:
+ inten1 = (volatile u_int32_t *)NEWS5000_INTEN1;
*inten1 |= mask;
break;
}

- return (void *)ai;
+ return (void *)ih;
}

static void
Index: apbus/zs_ap.c
===================================================================
RCS file: /cvsroot/src/sys/arch/newsmips/apbus/zs_ap.c,v
retrieving revision 1.13
diff -u -r1.13 zs_ap.c
--- apbus/zs_ap.c 2003/04/26 18:43:19 1.13
+++ apbus/zs_ap.c 2003/04/27 04:50:34
@@ -311,6 +311,7 @@
if (!didintr) {
didintr = 1;

+ zsc->zsc_si = softintr_establish(IPL_SOFTSERIAL, zssoft, zsc);
apbus_intr_establish(1, /* interrupt level ( 0 or 1 ) */
NEWS5000_INT1_SCC,
0, /* priority */
Index: conf/files.newsmips
===================================================================
RCS file: /cvsroot/src/sys/arch/newsmips/conf/files.newsmips,v
retrieving revision 1.21
diff -u -r1.21 files.newsmips
--- conf/files.newsmips 2002/10/26 13:50:38 1.21
+++ conf/files.newsmips 2003/04/27 04:50:34
@@ -89,6 +89,7 @@

file arch/newsmips/newsmips/autoconf.c
file arch/newsmips/newsmips/bus.c
+file arch/newsmips/newsmips/interrupt.c
file arch/newsmips/newsmips/machdep.c
file arch/newsmips/newsmips/news3400.c hb
file arch/newsmips/newsmips/news5000.c ap
Index: dev/hb.c
===================================================================
RCS file: /cvsroot/src/sys/arch/newsmips/dev/hb.c,v
retrieving revision 1.10
diff -u -r1.10 hb.c
--- dev/hb.c 2003/01/01 01:55:42 1.10
+++ dev/hb.c 2003/04/27 04:50:34
@@ -3,8 +3,10 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/device.h>
+#include <sys/malloc.h>

#include <machine/autoconf.h>
+#include <machine/intr.h>

static int hb_match __P((struct device *, struct cfdata *, void *));
static void hb_attach __P((struct device *, struct device *, void *));
@@ -17,13 +19,8 @@

extern struct cfdriver hb_cd;

-struct intrhand {
- int (*func) __P((void *));
- void *arg;
-};
-
-#define NHBINTR 4
-struct intrhand hb_intrhand[6][NHBINTR];
+#define NLEVEL 4
+static struct newsmips_intr hbintr_tab[NLEVEL];

static int
hb_match(parent, cf, aux)
@@ -46,8 +43,16 @@
void *aux;
{
struct confargs *ca = aux;
+ struct newsmips_intr *ip;
+ int i;

printf("\n");
+
+ for (i = 0; i < NLEVEL; i++) {
+ ip = &hbintr_tab[i];
+ LIST_INIT(&ip->intr_q);
+ }
+
config_search(hb_search, self, ca);
}

@@ -90,50 +95,53 @@
}

void *
-hb_intr_establish(irq, level, func, arg)
- int irq, level;
+hb_intr_establish(level, priority, func, arg)
+ int level, priority;
int (*func) __P((void *));
void *arg;
{
- struct intrhand *ih = hb_intrhand[irq];
- int i;
+ struct newsmips_intr *ip;
+ struct newsmips_intrhand *ih, *curih;
+
+ ip = &hbintr_tab[level];

- for (i = NHBINTR; i > 0; i--) {
- if (ih->func == NULL)
- goto found;
- ih++;
+ ih = malloc(sizeof *ih, M_DEVBUF, M_NOWAIT);
+ if (ih == NULL)
+ panic("hb_intr_establish: malloc failed");
+
+ ih->ih_func = func;
+ ih->ih_arg = arg;
+ ih->ih_priority = priority;
+ if (LIST_EMPTY(&ip->intr_q)) {
+ LIST_INSERT_HEAD(&ip->intr_q, ih, ih_q);
+ goto done;
}
- panic("hb_intr_establish: no room");

-found:
- ih->func = func;
- ih->arg = arg;
-
-#ifdef HB_DEBUG
- for (irq = 0; irq <= 2; irq++) {
- for (i = 0; i < NHBINTR; i++) {
- printf("%p(%p) ",
- hb_intrhand[irq][i].func,
- hb_intrhand[irq][i].arg);
+ for (curih = LIST_FIRST(&ip->intr_q);
+ LIST_NEXT(curih, ih_q) != NULL;
+ curih = LIST_NEXT(curih, ih_q)) {
+ if (ih->ih_priority > curih->ih_priority) {
+ LIST_INSERT_BEFORE(curih, ih, ih_q);
+ goto done;
}
- printf("\n");
}
-#endif

+ LIST_INSERT_AFTER(curih, ih, ih_q);
+
+ done:
return ih;
}

void
-hb_intr_dispatch(irq)
- int irq;
+hb_intr_dispatch(level)
+ int level;
{
- struct intrhand *ih;
- int i;
+ struct newsmips_intr *ip;
+ struct newsmips_intrhand *ih;
+
+ ip = &hbintr_tab[level];

- ih = hb_intrhand[irq];
- for (i = NHBINTR; i > 0; i--) {
- if (ih->func)
- (*ih->func)(ih->arg);
- ih++;
+ LIST_FOREACH(ih, &ip->intr_q, ih_q) {
+ (*ih->ih_func)(ih->ih_arg);
}
}
Index: dev/zs.c
===================================================================
RCS file: /cvsroot/src/sys/arch/newsmips/dev/zs.c,v
retrieving revision 1.17
diff -u -r1.17 zs.c
--- dev/zs.c 2003/04/26 18:43:20 1.17
+++ dev/zs.c 2003/04/27 04:50:34
@@ -84,8 +84,6 @@
return UNCONF;
}

-static volatile int zssoftpending;
-
/*
* Our ZS chips all share a common, autovectored interrupt,
* so we have to look at all of them on each interrupt.
@@ -97,20 +95,16 @@
struct zsc_softc *zsc;
int unit, rval, softreq;

- rval = softreq = 0;
+ rval = 0;
for (unit = 0; unit < zsc_cd.cd_ndevs; unit++) {
zsc = zsc_cd.cd_devs[unit];
if (zsc == NULL)
continue;
rval |= zsc_intr_hard(zsc);
- softreq |= zsc->zsc_cs[0]->cs_softreq;
+ softreq = zsc->zsc_cs[0]->cs_softreq;
softreq |= zsc->zsc_cs[1]->cs_softreq;
- }
-
- /* We are at splzs here, so no need to lock. */
- if (softreq && (zssoftpending == 0)) {
- zssoftpending = 1;
- setsoftserial();
+ if (softreq)
+ softintr_schedule(zsc->zsc_si);
}

return rval;
@@ -125,19 +119,6 @@
{
struct zsc_softc *zsc;
int s, unit;
-
- /* This is not the only ISR on this IPL. */
- if (zssoftpending == 0)
- return;
-
- /*
- * The soft intr. bit will be set by zshard only if
- * the variable zssoftpending is zero. The order of
- * these next two statements prevents our clearing
- * the soft intr bit just after zshard has set it.
- */
- /* clearsoftnet(); */
- zssoftpending = 0;

/* Make sure we call the tty layer at spltty. */
s = spltty();
Index: dev/zs_hb.c
===================================================================
RCS file: /cvsroot/src/sys/arch/newsmips/dev/zs_hb.c,v
retrieving revision 1.11
diff -u -r1.11 zs_hb.c
--- dev/zs_hb.c 2003/04/26 18:43:20 1.11
+++ dev/zs_hb.c 2003/04/27 04:50:34
@@ -295,6 +295,7 @@
if (!didintr) {
didintr = 1;

+ zsc->zsc_si = softintr_establish(IPL_SOFTSERIAL, zssoft, zsc);
hb_intr_establish(intlevel, IPL_SERIAL, zshard_hb, NULL);
}
/* XXX; evcnt_attach() ? */
Index: include/intr.h
===================================================================
RCS file: /cvsroot/src/sys/arch/newsmips/include/intr.h,v
retrieving revision 1.11
diff -u -r1.11 intr.h
--- include/intr.h 2001/04/13 23:30:02 1.11
+++ include/intr.h 2003/04/27 04:50:35
@@ -1,7 +1,11 @@
/* $NetBSD: intr.h,v 1.11 2001/04/13 23:30:02 thorpej Exp $ */

-/*
- * Copyright (c) 1998 Jonathan Stone. All rights reserved.
+/*-
+ * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Jason R. Thorpe.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -13,39 +17,68 @@
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
- * This product includes software developed by Jonathan Stone for
- * the NetBSD Project.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef _MACHINE_INTR_H_
#define _MACHINE_INTR_H_

#define IPL_NONE 0 /* disable only this interrupt */
-#define IPL_BIO 1 /* disable block I/O interrupts */
-#define IPL_NET 2 /* disable network interrupts */
-#define IPL_TTY 3 /* disable terminal interrupts */
-#define IPL_CLOCK 4 /* disable clock interrupts */
-#define IPL_STATCLOCK 5 /* disable profiling interrupts */
-#define IPL_SERIAL 6 /* disable serial hardware interrupts */
-#define IPL_HIGH 7 /* disable all interrupts */

+#define IPL_SOFT 1 /* generic software interrupts (SI 0) */
+#define IPL_SOFTCLOCK 2 /* clock software interrupts (SI 0) */
+#define IPL_SOFTNET 3 /* network software interrupts (SI 1) */
+#define IPL_SOFTSERIAL 4 /* serial software interrupts (SI 1) */
+
+#define IPL_BIO 5 /* disable block I/O interrupts */
+#define IPL_NET 6 /* disable network interrupts */
+#define IPL_TTY 7 /* disable terminal interrupts */
+#define IPL_SERIAL 7 /* disable serial hardware interrupts */
+#define IPL_CLOCK 8 /* disable clock interrupts */
+#define IPL_STATCLOCK 8 /* disable profiling interrupts */
+#define IPL_HIGH 8 /* disable all interrupts */
+
+#define _IPL_NSOFT 4
+#define _IPL_N 9
+
+#define _IPL_SI0_FIRST IPL_SOFT
+#define _IPL_SI0_LAST IPL_SOFTCLOCK
+
+#define _IPL_SI1_FIRST IPL_SOFTNET
+#define _IPL_SI1_LAST IPL_SOFTSERIAL
+
+#define IPL_SOFTNAMES { \
+ "misc", \
+ "clock", \
+ "net", \
+ "serial", \
+}
+
#ifdef _KERNEL
#ifndef _LOCORE
-#include <mips/cpuregs.h>

+#include <sys/device.h>
+#include <sys/lock.h>
+
+extern const u_int32_t ipl_sr_bits[_IPL_N];
+extern const u_int32_t ipl_si_to_sr[_IPL_NSOFT];
+
extern int _splraise __P((int));
extern int _spllower __P((int));
extern int _splset __P((int));
@@ -53,82 +86,119 @@
extern void _splnone __P((void));
extern void _setsoftintr __P((int));
extern void _clrsoftintr __P((int));
-
-/*
- * software simulated interrupt
- */
-#define SIR_NET 0x01
-#define SIR_SERIAL 0x02
-
-#define setsoft(x) do { \
- extern u_int ssir; \
- int s; \
- \
- s = splhigh(); \
- ssir |= (x); \
- _setsoftintr(MIPS_SOFT_INT_MASK_1); \
- splx(s); \
-} while (0)
-
-#define setsoftclock() _setsoftintr(MIPS_SOFT_INT_MASK_0)
-#define setsoftnet() setsoft(SIR_NET)
-#define setsoftserial() setsoft(SIR_SERIAL)

-/*
- * nesting interrupt masks.
- */
-#define MIPS_INT_MASK_SPL_SOFT0 MIPS_SOFT_INT_MASK_0
-#define MIPS_INT_MASK_SPL_SOFT1 (MIPS_SOFT_INT_MASK_1|MIPS_INT_MASK_SPL_SOFT0)
-#define MIPS_INT_MASK_SPL0 (MIPS_INT_MASK_0|MIPS_INT_MASK_SPL_SOFT1)
-#define MIPS_INT_MASK_SPL1 (MIPS_INT_MASK_1|MIPS_INT_MASK_SPL0)
-#define MIPS_INT_MASK_SPL2 (MIPS_INT_MASK_2|MIPS_INT_MASK_SPL1)
-#define MIPS_INT_MASK_SPL3 (MIPS_INT_MASK_3|MIPS_INT_MASK_SPL2)
-#define MIPS_INT_MASK_SPL4 (MIPS_INT_MASK_4|MIPS_INT_MASK_SPL3)
-#define MIPS_INT_MASK_SPL5 (MIPS_INT_MASK_5|MIPS_INT_MASK_SPL4)
-
+#define splhigh() _splraise(ipl_sr_bits[IPL_HIGH])
#define spl0() (void)_spllower(0)
#define splx(s) (void)_splset(s)
-#define splbio() _splraise(MIPS_INT_MASK_SPL0)
-#define splnet() _splraise(MIPS_INT_MASK_SPL1)
-#define spltty() _splraise(MIPS_INT_MASK_SPL1)
-#define splvm() _splraise(MIPS_INT_MASK_SPL1)
-#define splclock() _splraise(MIPS_INT_MASK_SPL2)
-#define splstatclock() _splraise(MIPS_INT_MASK_SPL2)
-#define splhigh() _splraise(MIPS_INT_MASK_SPL2)
-#define splsched() splhigh()
-#define spllock() splhigh()
-
-#define splsoftclock() _splraise(MIPS_INT_MASK_SPL_SOFT0)
-#define splsoftnet() _splraise(MIPS_INT_MASK_SPL_SOFT1)
-#define spllowersoftclock() _spllower(MIPS_INT_MASK_SPL_SOFT0)
+#define splbio() _splraise(ipl_sr_bits[IPL_BIO])
+#define splnet() _splraise(ipl_sr_bits[IPL_NET])
+#define spltty() _splraise(ipl_sr_bits[IPL_TTY])
+#define splserial() _splraise(ipl_sr_bits[IPL_SERIAL])
+#define splvm() spltty()
+#define splclock() _splraise(ipl_sr_bits[IPL_CLOCK])
+#define splstatclock() splclock()
+
+#define splsched() splclock()
+#define spllock() splhigh()
+
+#define splsoft() _splraise(ipl_sr_bits[IPL_SOFT])
+#define splsoftclock() _splraise(ipl_sr_bits[IPL_SOFTCLOCK])
+#define splsoftnet() _splraise(ipl_sr_bits[IPL_SOFTNET])
+#define splsoftserial() _splraise(ipl_sr_bits[IPL_SOFTSERIAL])
+
+#define spllowersoftclock() _spllower(ipl_sr_bits[IPL_SOFTCLOCK])
+
+struct newsmips_intrhand {
+ LIST_ENTRY(newsmips_intrhand) ih_q;
+ struct evcnt intr_count;
+ int (*ih_func)(void *);
+ void *ih_arg;
+ u_int ih_level;
+ u_int ih_mask;
+ u_int ih_priority;
+};
+
+struct newsmips_intr {
+ LIST_HEAD(,newsmips_intrhand) intr_q;
+};
+
+#define setsoft(x) \
+do { \
+ _setsoftintr(ipl_si_to_sr[(x) - IPL_SOFT]); \
+} while (/*CONSTCOND*/0)
+
+struct newsmips_soft_intrhand {
+ TAILQ_ENTRY(newsmips_soft_intrhand) sih_q;
+ struct newsmips_soft_intr *sih_intrhead;
+ void (*sih_func)(void *);
+ void *sih_arg;
+ int sih_pending;
+};
+
+struct newsmips_soft_intr {
+ TAILQ_HEAD(,newsmips_soft_intrhand) softintr_q;
+ struct evcnt softintr_evcnt;
+ struct simplelock softintr_slock;
+ unsigned long softintr_ipl;
+};
+
+void *softintr_establish(int, void (*)(void *), void *);
+void softintr_disestablish(void *);
+void softintr_init(void);
+void softintr_dispatch(void);
+
+#define softintr_schedule(arg) \
+do { \
+ struct newsmips_soft_intrhand *__sih = (arg); \
+ struct newsmips_soft_intr *__si = __sih->sih_intrhead; \
+ int __s; \
+ \
+ __s = splhigh(); \
+ simple_lock(&__si->softintr_slock); \
+ if (__sih->sih_pending == 0) { \
+ TAILQ_INSERT_TAIL(&__si->softintr_q, __sih, sih_q); \
+ __sih->sih_pending = 1; \
+ setsoft(__si->softintr_ipl); \
+ } \
+ simple_unlock(&__si->softintr_slock); \
+ splx(__s); \
+} while (/*CONSTCOND*/0)
+
+/* XXX For legacy software interrupts. */
+extern struct newsmips_soft_intrhand *softnet_intrhand;
+
+#define setsoftnet() softintr_schedule(softnet_intrhand)

/*
* Index into intrcnt[], which is defined in locore
*/
-#define SOFTCLOCK_INTR 0
-#define SOFTNET_INTR 1
-#define SERIAL0_INTR 2
-#define SERIAL1_INTR 3
-#define SERIAL2_INTR 4
-#define LANCE_INTR 5
-#define SCSI_INTR 6
-#define ERROR_INTR 7
-#define HARDCLOCK_INTR 8
-#define FPU_INTR 9
-#define SLOT1_INTR 10
-#define SLOT2_INTR 11
-#define SLOT3_INTR 12
-#define FLOPPY_INTR 13
-#define STRAY_INTR 14
+#define SERIAL0_INTR 0
+#define SERIAL1_INTR 1
+#define SERIAL2_INTR 2
+#define LANCE_INTR 3
+#define SCSI_INTR 4
+#define ERROR_INTR 5
+#define HARDCLOCK_INTR 6
+#define FPU_INTR 7
+#define SLOT1_INTR 8
+#define SLOT2_INTR 9
+#define SLOT3_INTR 10
+#define FLOPPY_INTR 11
+#define STRAY_INTR 12

extern u_int intrcnt[];

/* handle i/o device interrupts */
-extern void news3400_intr __P((u_int, u_int, u_int, u_int));
-extern void news5000_intr __P((u_int, u_int, u_int, u_int));
+#ifdef news3400
+void news3400_intr __P((u_int, u_int, u_int, u_int));
+#endif
+#ifdef news5000
+void news5000_intr __P((u_int, u_int, u_int, u_int));
+#endif
+void (*hardware_intr) __P((u_int, u_int, u_int, u_int));

-extern void (*enable_intr) __P((void));
-extern void (*disable_intr) __P((void));
+void (*enable_intr) __P((void));
+void (*disable_intr) __P((void));

#endif /* !_LOCORE */
#endif /* _KERNEL */
Index: include/types.h
===================================================================
RCS file: /cvsroot/src/sys/arch/newsmips/include/types.h,v
retrieving revision 1.5
diff -u -r1.5 types.h
--- include/types.h 2002/08/05 02:13:15 1.5
+++ include/types.h 2003/04/27 04:50:35
@@ -3,6 +3,7 @@
#include <mips/types.h>

#define __BROKEN_CONFIG_UNIT_USAGE
+#define __HAVE_GENERIC_SOFT_INTERRUPTS

/* MIPS specific options */
#define __HAVE_BOOTINFO_H
Index: include/z8530var.h
===================================================================
RCS file: /cvsroot/src/sys/arch/newsmips/include/z8530var.h,v
retrieving revision 1.4
diff -u -r1.4 z8530var.h
--- include/z8530var.h 2003/04/26 18:43:20 1.4
+++ include/z8530var.h 2003/04/27 04:50:35
@@ -52,6 +52,7 @@
struct zs_chanstate *zsc_cs[2]; /* channel A and B soft state */
/* Machine-dependent part follows... */
struct zs_chanstate zsc_cs_store[2];
+ void *zsc_si; /* softinterrupt handle */
};

/*
@@ -77,5 +78,4 @@
void (*zs_delay) __P((void));

/* Zilog Serial hardware interrupts (level 1) */
-#define splzs cpu_spl1
-extern int splzs(void);
+#define splzs spltty
Index: newsmips/autoconf.c
===================================================================
RCS file: /cvsroot/src/sys/arch/newsmips/newsmips/autoconf.c,v
retrieving revision 1.16
diff -u -r1.16 autoconf.c
--- newsmips/autoconf.c 2002/09/25 22:21:15 1.16
+++ newsmips/autoconf.c 2003/04/27 04:50:36
@@ -98,6 +98,7 @@
/*
* Kick off autoconfiguration
*/
+ softintr_init();
_splnone(); /* enable all interrupts */
splhigh(); /* ...then disable device interrupts */

Index: newsmips/locore_machdep.S
===================================================================
RCS file: /cvsroot/src/sys/arch/newsmips/newsmips/locore_machdep.S,v
retrieving revision 1.9
diff -u -r1.9 locore_machdep.S
--- newsmips/locore_machdep.S 2003/04/26 18:40:00 1.9
+++ newsmips/locore_machdep.S 2003/04/27 04:50:36
@@ -226,8 +226,6 @@
.globl _C_LABEL(intrnames)
.globl _C_LABEL(eintrnames)
_C_LABEL(intrnames):
- .asciiz "softclock"
- .asciiz "softnet"
.asciiz "serial0"
.asciiz "serial1"
.asciiz "serial2"
@@ -246,7 +244,7 @@
_C_LABEL(eintrnames):
.align 2
_C_LABEL(intrcnt):
- .word 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0, 0
+ .word 0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0
_C_LABEL(eintrcnt):
.word 0 # This shouldn't be needed but with 4.4bsd's as, the eintrcnt
# label ends end up in a different section otherwise.
Index: newsmips/machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/newsmips/newsmips/machdep.c,v
retrieving revision 1.69
diff -u -r1.69 machdep.c
--- newsmips/machdep.c 2003/04/26 18:50:19 1.69
+++ newsmips/machdep.c 2003/04/27 04:50:36
@@ -129,13 +129,8 @@
int mem_cluster_cnt;

struct idrom idrom;
-void (*enable_intr) __P((void));
-void (*disable_intr) __P((void));
void (*readmicrotime) __P((struct timeval *tvp));

-static void (*hardware_intr) __P((u_int, u_int, u_int, u_int));
-u_int ssir;
-
/*
* Local functions.
*/
@@ -649,52 +644,4 @@
int n;
{
DELAY(n);
-}
-
-#include "zsc.h"
-
-int zssoft __P((void));
-
-void
-cpu_intr(status, cause, pc, ipending)
- u_int32_t status;
- u_int32_t cause;
- u_int32_t pc;
- u_int32_t ipending;
-{
- uvmexp.intrs++;
-
- /* device interrupts */
- (*hardware_intr)(status, cause, pc, ipending);
-
- /* software simulated interrupt */
- if ((ipending & MIPS_SOFT_INT_MASK_1) ||
- (ssir && (status & MIPS_SOFT_INT_MASK_1))) {
-
-#define DO_SIR(bit, fn) \
- do { \
- if (n & (bit)) { \
- uvmexp.softs++; \
- fn; \
- } \
- } while (0)
-
- unsigned n;
- n = ssir; ssir = 0;
- _clrsoftintr(MIPS_SOFT_INT_MASK_1);
-
-#if NZSC > 0
- DO_SIR(SIR_SERIAL, zssoft());
-#endif
- DO_SIR(SIR_NET, netintr());
-#undef DO_SIR
- }
-
- /* 'softclock' interrupt */
- if (ipending & MIPS_SOFT_INT_MASK_0) {
- _clrsoftintr(MIPS_SOFT_INT_MASK_0);
- uvmexp.softs++;
- intrcnt[SOFTCLOCK_INTR]++;
- softclock(NULL);
- }
}
--- /dev/null 2003-04-27 13:38:34.000000000 +0900
+++ newsmips/interrupt.c 2003-04-27 13:17:36.000000000 +0900
@@ -0,0 +1,225 @@
+/* $NetBSD$ */
+
+/*
+ * Copyright (c) 2001 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Jason R. Thorpe.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/param.h>
+#include <sys/device.h>
+#include <sys/malloc.h>
+
+#include <uvm/uvm_extern.h>
+
+#include <net/netisr.h> /* Legacy softnet support */
+
+#include <machine/intr.h>
+
+/* XXX For legacy software interrupts. */
+struct newsmips_soft_intrhand *softnet_intrhand;
+
+/*
+ * This is a mask of bits to clear in the SR when we go to a
+ * given interrupt priority level.
+ */
+const u_int32_t ipl_sr_bits[_IPL_N] = {
+ 0, /* IPL_NONE */
+
+ MIPS_SOFT_INT_MASK_0, /* IPL_SOFT */
+
+ MIPS_SOFT_INT_MASK_0, /* IPL_SOFTCLOCK */
+
+ MIPS_SOFT_INT_MASK_0|
+ MIPS_SOFT_INT_MASK_1, /* IPL_SOFTNET */
+
+ MIPS_SOFT_INT_MASK_0|
+ MIPS_SOFT_INT_MASK_1, /* IPL_SOFTSERIAL */
+
+ MIPS_SOFT_INT_MASK_0|
+ MIPS_SOFT_INT_MASK_1|
+ MIPS_INT_MASK_0, /* IPL_BIO */
+
+ MIPS_SOFT_INT_MASK_0|
+ MIPS_SOFT_INT_MASK_1|
+ MIPS_INT_MASK_0|
+ MIPS_INT_MASK_1, /* IPL_NET */
+
+ MIPS_SOFT_INT_MASK_0|
+ MIPS_SOFT_INT_MASK_1|
+ MIPS_INT_MASK_0|
+ MIPS_INT_MASK_1, /* IPL_{TTY,SERIAL} */
+
+ MIPS_SOFT_INT_MASK_0|
+ MIPS_SOFT_INT_MASK_1|
+ MIPS_INT_MASK_0|
+ MIPS_INT_MASK_1|
+ MIPS_INT_MASK_2, /* IPL_{CLOCK,HIGH} */
+};
+
+const u_int32_t ipl_si_to_sr[_IPL_NSOFT] = {
+ MIPS_SOFT_INT_MASK_0, /* IPL_SOFT */
+ MIPS_SOFT_INT_MASK_0, /* IPL_SOFTCLOCK */
+ MIPS_SOFT_INT_MASK_1, /* IPL_SOFTNET */
+ MIPS_SOFT_INT_MASK_1, /* IPL_SOFTSERIAL */
+};
+
+struct newsmips_soft_intr newsmips_soft_intrs[_IPL_NSOFT];
+
+void
+cpu_intr(status, cause, pc, ipending)
+ u_int32_t status;
+ u_int32_t cause;
+ u_int32_t pc;
+ u_int32_t ipending;
+{
+ struct newsmips_soft_intr *nsi;
+ struct newsmips_soft_intrhand *sih;
+ int i, s;
+
+ uvmexp.intrs++;
+
+ /* device interrupts */
+ (*hardware_intr)(status, cause, pc, ipending);
+
+ /* software interrupts */
+ ipending &= (MIPS_SOFT_INT_MASK_1|MIPS_SOFT_INT_MASK_0);
+ if (ipending == 0)
+ return;
+
+ _clrsoftintr(ipending);
+
+ for (i = _IPL_NSOFT - 1; i >= 0; i--) {
+ if ((ipending & ipl_si_to_sr[i]) == 0)
+ continue;
+
+ nsi = &newsmips_soft_intrs[i];
+
+ if (TAILQ_FIRST(&nsi->softintr_q) != NULL)
+ nsi->softintr_evcnt.ev_count++;
+
+ for (;;) {
+ s = splhigh();
+
+ sih = TAILQ_FIRST(&nsi->softintr_q);
+ if (sih != NULL) {
+ TAILQ_REMOVE(&nsi->softintr_q, sih, sih_q);
+ sih->sih_pending = 0;
+ }
+
+ splx(s);
+
+ if (sih == NULL)
+ break;
+
+ uvmexp.softs++;
+ (*sih->sih_func)(sih->sih_arg);
+ }
+ }
+}
+
+/*
+ * softintr_init:
+ *
+ * Initialize the software interrupt system.
+ */
+void
+softintr_init(void)
+{
+ static const char *softintr_names[] = IPL_SOFTNAMES;
+ struct newsmips_soft_intr *nsi;
+ int i;
+
+ for (i = 0; i < _IPL_NSOFT; i++) {
+ nsi = &newsmips_soft_intrs[i];
+ TAILQ_INIT(&nsi->softintr_q);
+ nsi->softintr_ipl = IPL_SOFT + i;
+ evcnt_attach_dynamic(&nsi->softintr_evcnt, EVCNT_TYPE_INTR,
+ NULL, "soft", softintr_names[i]);
+ }
+
+ /* XXX Establish legacy soft interrupt handlers. */
+ softnet_intrhand = softintr_establish(IPL_SOFTNET,
+ (void (*)(void *))netintr, NULL);
+
+ KASSERT(softnet_intrhand != NULL);
+}
+
+/*
+ * softintr_establish: [interface]
+ *
+ * Register a software interrupt handler.
+ */
+void *
+softintr_establish(int ipl, void (*func)(void *), void *arg)
+{
+ struct newsmips_soft_intr *nsi;
+ struct newsmips_soft_intrhand *sih;
+
+ if (__predict_false(ipl >= (IPL_SOFT + _IPL_NSOFT) ||
+ ipl < IPL_SOFT))
+ panic("softintr_establish");
+
+ nsi = &newsmips_soft_intrs[ipl - IPL_SOFT];
+
+ sih = malloc(sizeof(*sih), M_DEVBUF, M_NOWAIT);
+ if (__predict_true(sih != NULL)) {
+ sih->sih_intrhead = nsi;
+ sih->sih_func = func;
+ sih->sih_arg = arg;
+ sih->sih_pending = 0;
+ }
+ return sih;
+}
+
+/*
+ * softintr_disestablish: [interface]
+ *
+ * Unregister a software interrupt handler.
+ */
+void
+softintr_disestablish(void *arg)
+{
+ struct newsmips_soft_intrhand *sih = arg;
+ struct newsmips_soft_intr *nsi = sih->sih_intrhead;
+ int s;
+
+ s = splhigh();
+ if (sih->sih_pending) {
+ TAILQ_REMOVE(&nsi->softintr_q, sih, sih_q);
+ sih->sih_pending = 0;
+ }
+ splx(s);
+
+ free(sih, M_DEVBUF);
+}
Mauricio
2003-04-29 13:46:07 UTC
Permalink
Post by Izumi Tsutsui
Post by Izumi Tsutsui
(I've implemented generic software interrupt, but it doesn't help..)
The attached is a patch for generic software interrupt support.
Most code is taken from algor port, and interrupt handlers
of hb and apbus are also modified to share some structures.
I've tested new kernel with this patch both on NWS-3470D and
NWS-5000X, it seems to work without problem.
If there is no objection I'll commit this tomorrow.
---
Izumi Tsutsui
[...]

Since I am yet to install netbsd in my box, all I can say is:
if it works, I am happy. Do let me know when I can try a new
snapshot! =)
Izumi Tsutsui
2003-04-29 17:49:40 UTC
Permalink
Post by Mauricio
if it works, I am happy. Do let me know when I can try a new
snapshot! =)
The generic softintr patch would not help serial console problem
on NWS-3xx0, but it seems that the problem occurs when both
TX and RX interrupts happen at the same time.
Then I guess the workaround is to avoid pressing any keys
when screen is being drawed on the terminal.

Only NWS-3xx0 has the problem and NWS-5000 works fine
so I wonder which source has the problem..

Does anyone see the similar problem on the other ports which use
MI z8530sc driver?
---
Izumi Tsutsui
***@ceres.dti.ne.jp
Mauricio
2003-04-30 20:15:43 UTC
Permalink
Post by Izumi Tsutsui
Post by Mauricio
if it works, I am happy. Do let me know when I can try a new
snapshot! =)
The generic softintr patch would not help serial console problem
on NWS-3xx0, but it seems that the problem occurs when both
TX and RX interrupts happen at the same time.
Then I guess the workaround is to avoid pressing any keys
when screen is being drawed on the terminal.
Unfortunately, in my case once the screen "hiccups" after the
message saying the hard drive had not been initialized, I can leave
the machine on for hours and it will not continue. If I keep holding
the space bar, the screen is then redrawn, one character for every
time I press the space bar. =(
Post by Izumi Tsutsui
Only NWS-3xx0 has the problem and NWS-5000 works fine
so I wonder which source has the problem..
Does anyone see the similar problem on the other ports which use
MI z8530sc driver?
---
Izumi Tsutsui
Izumi Tsutsui
2003-05-02 00:43:26 UTC
Permalink
Post by Mauricio
Unfortunately, in my case once the screen "hiccups" after the
message saying the hard drive had not been initialized, I can leave
the machine on for hours and it will not continue. If I keep holding
the space bar, the screen is then redrawn, one character for every
time I press the space bar. =(
Ok, now I've got some clue. It seems interrupt handling
problem on news3400 (HB based system).

Both z8530 serial and LANCE Ethernet on news3400 use
the same interrupt level, and it's handled in
newsmips/news3400.c:news3400_level1_intr().
Now I notice that serial console recovers from hiccups
if interrupts from the LANCE Ethernet occur.
(Maybe some locking is needed?)

I don't know how to fix this right now,
but there is a certain (but ugly) workaround.
Try to set IP address to your newsmips machine before
stating sysinst (by ifconfig(8) on shell prompt) and
ping(8) to the machine from another host during installation.
---
Izumi Tsutsui
***@ceres.dti.ne.jp
Mauricio
2003-05-03 14:28:19 UTC
Permalink
Post by Izumi Tsutsui
Post by Mauricio
Unfortunately, in my case once the screen "hiccups" after the
message saying the hard drive had not been initialized, I can leave
the machine on for hours and it will not continue. If I keep holding
the space bar, the screen is then redrawn, one character for every
time I press the space bar. =(
Ok, now I've got some clue. It seems interrupt handling
problem on news3400 (HB based system).
Both z8530 serial and LANCE Ethernet on news3400 use
the same interrupt level, and it's handled in
newsmips/news3400.c:news3400_level1_intr().
Now I notice that serial console recovers from hiccups
if interrupts from the LANCE Ethernet occur.
(Maybe some locking is needed?)
I don't know how to fix this right now,
but there is a certain (but ugly) workaround.
Try to set IP address to your newsmips machine before
stating sysinst (by ifconfig(8) on shell prompt) and
ping(8) to the machine from another host during installation.
---
Izumi Tsutsui
Thanks for the suggestion! I did set the IP address
(ifconfig le0 10.0.0.16 netmask 255.255.255.0 up) and then pinged the
machine from my Solaris box when it gave the error message regarding
the HD label. One ping was all it took!

So, I finally started installing the OS. One thing I was confused
with was the default partition table. It only has the following
partitions (1GB HD):

/ (64MB)
swap (64MB)
/usr (~800MB)

Where does /home goes to then? Also, it seems to have ran ot of
space during the installation:

: write failed, file system is full
65752ailed wri92 KB/s uid 0 comm tar on : file system full
65413 KB 202.17 KB/s
: write failed, file system is full
tar: Failed write to file ./usr/share/calendar/calendar.birthday (No
space left on device)

How come? I guesstimated the space required for a full install
(minus X) to be under 250MB. That should fit like 3 times in 800MB.
Why didn't it? After all, I did install netbsd in my DEC 5000/20
before in a 512MB HD without a problem.

At least it seems the problem now is simple one. =)

Thanks for all the help!
Izumi Tsutsui
2003-05-04 15:31:20 UTC
Permalink
Post by Mauricio
One ping was all it took!
Yeah, but it should really be fixed..
Post by Mauricio
Where does /home goes to then?
I think you should choose "3. Custom" on the labeling menu.
(though I can't check sysinst right now)
Post by Mauricio
65752ailed wri92 KB/s uid 0 comm tar on : file system full
65413 KB 202.17 KB/s
: write failed, file system is full
tar: Failed write to file ./usr/share/calendar/calendar.birthday (No
space left on device)
65413 KB is mostly 64MB, so it seems /usr is not mounted properly.
(you can check it by df(1) after error.)
I don't know how does such situation occur, but I think
there are some messages which indicates wrong operations
on sysinst.

Please check INSTALL.html and messages more carefully.
---
Izumi Tsutsui
***@ceres.dti.ne.jp
Emmanuel Chaput
2003-05-05 19:12:25 UTC
Permalink
Post by Izumi Tsutsui
Ok, now I've got some clue. It seems interrupt handling
problem on news3400 (HB based system).
Both z8530 serial and LANCE Ethernet on news3400 use
the same interrupt level, and it's handled i
It seems I'm facing a similar problem. But I'm afraid my
ethernet device has been locked ! The transceiver's LED
don't even light up ! This is the same thing on the switch.

Most of all, the problem remains while I'm trying to boot
the NWS over the network !!

I own a couple of 3410, lots of different transceiver (RJ45
as well as 10BaseT) so I am quite sure that this is not a
hardware problem ...

As usual, any hint would be greatly apreciated !!

----------------------------------------------------------------------------------
NetBSD/newsmips Primary Boot
NetBSD/newsmips Secondary Boot, Revision 1.7
(***@mirage, Sun Apr 13 10:41:00 JST 2003)
Booting fh(0,0,0)
3883504+136952=0x3d5afc

Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
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 1.6R (INSTALL) #9: Sat Apr 19 20:49:23 JST 2003
***@mirage:/sys/arch/newsmips/compile/INSTALL
total memory = 16352 KB
avail memory = 10992 KB
using 230 buffers containing 920 KB of memory
SONY NET WORK STATION, Model NWS-3410, Machine ID #50146
mainbus0 (root)
cpu0 at mainbus0: MIPS R3000 CPU (0x220) Rev. 2.0 with MIPS R3010 FPC
Rev. 2.0
cpu0: 64KB/4B direct-mapped Instruction cache, 64 TLB entries
cpu0: 64KB/4B direct-mapped write-through Data cache
hb0 at mainbus0
le0 at hb0 addr 0xbff80000 level 1: address 08:00:46:00:68:ae
le0: 8 receive buffers, 2 transmit buffers
mkclock0 at hb0 addr 0xbff407f8
zsc0 at hb0 addr 0xbfec0000 level 1
zstty0 at zsc0 channel 0 (console i/o)
zstty1 at zsc0 channel 1
kb0 at hb0 addr 0xbfd00000 level 2
wskbd0 at kb0 (mux ignored)
fb0 at hb0 addr 0x88000000: NWE-501, 1024 x 768, 1bpp
wsdisplay0 at fb0 (kbdmux ignored)
sc0 at hb0 addr 0xbfe00100 level 0
scsibus0 at sc0: 8 targets, 8 luns per target
md0: internal 2560 KB image area
scsibus0: waiting 2 seconds for devices to settle...
boot device: <unknown>
root on md0a dumps on md0b
WARNING: clock gained 8472 days -- CHECK AND RESET THE DATE!
root file system type: ffs
erase ^H, werase ^W, kill ^U, intr ^C, status ^T
Terminal type? [vt100]
Erase is backspace.
(I)nstall, (S)hell or (H)alt ? s


# ifconfig le0 192.168.19.84 netmask 255.255.255.224
le0: lost carrier
ifconfig -a
le0: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
address: 08:00:46:00:68:ae
media: Ethernet manual
status: active
inet 192.168.19.84 netmask 0xffffffe0 broadcast 192.168.19.95
lo0: flags=8008<LOOPBACK,MULTICAST> mtu 33196


# route -v show
Routing tables

Internet:
Destination Gateway Flags
192.168.19.64 link#1 U


# ping -c 1 192.168.19.95
PINGle0: lost carrier
192.168.19.95 (192.168.19.95): 56 data bytes
64 bytes from 192.168.19.84: icmp_seq=0 ttl=255 time=20.001 ms

----192.168.19.95 PING Statistics----
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 20.001/20.001/20.001/0.000 ms

Loading...