Subject: update on sun2 port (and sc scsi driver)
To: None <port-sun3@netbsd.org>
From: Matthew Fredette <fredette@MIT.EDU>
List: port-sun3
Date: 03/16/2001 09:17:07
Hi all.  Much progress has been made on the Sun2 port.  It now boots
multiuser, a snapshot of programs run, and I've developed a driver for
the 'sc' SCSI board that seems to work pretty well.

Thanks go to Michael Thompson for helping me test all of this!

Should I post the sc driver somewhere?  I'd say that it's slightly
better than alpha quality, I still wouldn't trust it with critical
data.  It does DMA and I haven't had any problems with it yet tho.

I modelled it after the si driver in that it's broken up into
sc_<bus>.c and sc.c under arch/sun3/dev, and an MI sunscpal.c under
dev/ic.  (And "modelled" is misleading - all of the 'sc' and
'sunscpal' files are literally modified copies of the si and
ncr5380sbc files.  Much credit goes to those authors.)  I wrote an
sc_vme attachment but I have no idea if it works since I don't have
any VME hardware.

A multiuser session transcript follows.  Note that the kernel booted
from /dev/sd0a using the NetBSD boot blocks.  I would have root on sd0
if the disk were only big enough! :)

Matt

--
Matt Fredette
http://mit.edu/fredette/www

Script started on Fri Mar 16 08:38:49 2001
the-weight# tip hardwire
connected

>b sd(0,8,0)
Boot: sd(0,8,0)vmunix 
>> NetBSD ufsboot [$Revision: 1.7 $]
ufsboot: loading vmunix
696596+31068+135720+[52392+51865]=0xec3dd
Starting program at 0x4000
console is ttya
Copyright (c) 1996, 1997, 1998, 1999, 2000
    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.5 (SUN2) #3: Fri Mar 16 00:19:47 EST 2001
    fredette@the-weight.home:/data/home/fredette/project/sun2/kernel-build/sys/arch/sun3/compile/SUN2
Model: sun2 {120,170}
fpu: no math support
total memory = 4096 KB
avail memory = 2946 KB
using 37 buffers containing 75776 of memory
mainbus0 (root)
enable0 at mainbus0
obio0 at mainbus0
zsc1 at obio0 addr 0x2000 ipl 6: (softpri 3)
zstty0 at zsc1 channel 0 (console i/o)
zstty1 at zsc1 channel 1
clock0 at obio0 addr 0x2800 ipl 5
tod0 at obio0 addr 0x3800
obmem0 at mainbus0
zsc0 at obmem0 addr 0x780000 ipl 6: (softpri 3)
kbd0 at zsc0 channel 0
ms0 at zsc0 channel 1
bwtwo0 at obmem0 addr 0x700000 (1152x900)
mbmem0 at mainbus0
ie1 at mbmem0 addr 0x88000 ipl 3: macaddr 08:00:20:01:12:1e
sc0 at mbmem0 addr 0x80000 ipl 2: options=0xff
scsibus0 at sc0: 8 targets, 8 luns per target
enabling interrupts
scsibus0: waiting 2 seconds for devices to settle...
sd0 at scsibus0 target 2 lun 0: <DEC, RZ22     (C) DEC, 0A18> SCSI1 0/direct fixed
sd0: 51216 KB, 776 cyl, 4 head, 33 sec, 512 bytes/sect x 102432 sectors
cd0 at scsibus0 target 6 lun 0: <TOSHIBA, CD-ROM XM-3401TA, 0283> SCSI2 5/cdrom removable
boot device: <unknown>
root on ie1
nfs_boot: trying RARP (and RPC/bootparam)
nfs_boot: client_addr=10.0.0.7 (RARP from 10.0.0.8)
nfs_boot: server_addr=10.0.0.8
nfs_boot: hostname=desperate-people.home
nfs_boot: gateway=10.0.0.1
nfs_boot: my_mask=255.0.0.0
root on the-weight:/data/home/fredette/project/sun2/export/root
WARNING: clock gained 357 days -- CHECK AND RESET THE DATE!
swapctl: adding /dev/sd0b as swap device at priority 0
Automatic boot in progress: starting file system checks.
Setting tty flags.
Setting sysctl variables:
Starting network.
Hostname: desperate-people.home
default              10.0.0.1             done
add net 127.0.0.0: gateway 127.0.0.1
Configuring network interfaces:.
add net default: gateway 10.0.0.1
Building databases...
Starting syslogd.
Mounting all filesystems...
Clearing /tmp.
Checking quotas: done.
Setting securelevel: kern.securelevel: 0 -> 1
Creating runtime link editor directory cache.
Updating motd.
starting local daemons:.
Starting cron.
Sat Mar  9 04:23:42 PST 2002

NetBSD/sun3 (desperate-people.home) (ttya)

login: root
Last login: Fri Mar  8 19:34:21 2002 on kd
Mar  9 04:24:23 desperate-people login: ROOT LOGIN (root) ON ttya
Mar  9 04:24:23 desperate-people login: ROOT LOGIN (root) ON ttya
Copyright (c) 1996, 1997, 1998, 1999, 2000
        The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.

NetBSD 1.5 (SUN2) #3: Fri Mar 16 00:19:47 EST 2001

Welcome to NetBSD!

Terminal type? [unknown] xterm
Terminal type is xterm.
We recommend creating a non-root account and using su(1) for root access.
desperate-people# mount -t cd9660 /dev/cd0a /mnt
cd0(sc0:6:0): illegal request, data = 00 00 00 00 24 00 00 ce 00 09
Mar  9 04:25:09 desperate-people /netbsd: cd0(sc0:6:0): illegal request, data = 00 00 00 00 24 00 00 ce 00 09
desperate-people# cd /mnt
desperate-people# ls
ASK.EXE         EZSTART.BAT     TRANS.TBL       i386
CBCATLOG.HTML   NetBSD-1.4      asksrc          ls-lR.txt
CBCATLOG.TXT    README.1ST      boot            packages
desperate-people# cd NetBSD-1.4/source/sets
desperate-people# ls
BSDSUM       MD5          Split        gnusrc.tgz   sharesrc.tgz syssrc.tgz
CKSUM        SYSVSUM      TRANS.TBL    pkgsrc.tgz   src.tgz      xsrc.tgz
desperate-people# stty erase ^H
desperate-people# tar tzvf syssrc.tgz | head -20
drwxrwxr-x root/wsrc         0 May  8 10:38 1999 usr/src/sys
drwxrwxr-x root/wsrc         0 May  8 10:38 1999 usr/src/sys/CVS
-rw-rw-r-- root/wsrc       410 May  8 10:38 1999 usr/src/sys/CVS/Entries
-rw-rw-r-- root/wsrc        17 May  8 10:23 1999 usr/src/sys/CVS/Repository
-rw-rw-r-- root/wsrc         9 May  8 10:23 1999 usr/src/sys/CVS/Root
-rw-rw-r-- root/wsrc        20 May  8 10:23 1999 usr/src/sys/CVS/Tag
-rw-rw-r-- root/wsrc       344 Mar 10 00:56 1999 usr/src/sys/Makefile
drwxrwxr-x root/wsrc         0 May  8 10:23 1999 usr/src/sys/adosfs
drwxrwxr-x root/wsrc         0 May  8 10:23 1999 usr/src/sys/adosfs/CVS
-rw-rw-r-- root/wsrc       372 May  8 10:23 1999 usr/src/sys/adosfs/CVS/Entries
-rw-rw-r-- root/wsrc        24 May  8 10:23 1999 usr/src/sys/adosfs/CVS/Repository
-rw-rw-r-- root/wsrc         9 May  8 10:23 1999 usr/src/sys/adosfs/CVS/Root
-rw-rw-r-- root/wsrc        20 May  8 10:23 1999 usr/src/sys/adosfs/CVS/Tag
-rw-rw-r-- root/wsrc       144 Jun 12 16:22 1998 usr/src/sys/adosfs/Makefile
-rw-rw-r-- root/wsrc      8235 Aug  9 13:20 1998 usr/src/sys/adosfs/adlookup.c
-rw-rw-r-- root/wsrc      6165 Aug 31 20:33 1998 usr/src/sys/adosfs/adosfs.h
-rw-rw-r-- root/wsrc      5805 Feb 28 18:25 1998 usr/src/sys/adosfs/adutil.c
-rw-rw-r-- root/wsrc     20005 Feb 26 15:44 1999 usr/src/sys/adosfs/advfsops.c
-rw-rw-r-- root/wsrc     22106 Mar 22 11:21 1999 usr/src/sys/adosfs/advnops.c
drwxrwxr-x root/wsrc         0 May  8 10:33 1999 usr/src/sys/arch
desperate-people# swapctl -l
Device      1K-blocks     Used    Avail Capacity  Priority
/dev/sd0b       38940        0    38940     0%    0
desperate-people# umount /mnt
desperate-people# eject cdrom
desperate-people# fsck /dev/sd0a
** /dev/rsd0a
** File system is clean; not checking
desperate-people# fsck -f /dev/sd0a
** /dev/rsd0a
** File system is already clean
** Last Mounted on /mnt
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
3 files, 837 used, 10846 free (14 frags, 1354 blocks, 0.1% fragmentation)
desperate-people# ~
[EOT]
the-weight# exit
the-weight# exit

Script done on Fri Mar 16 08:51:38 2001