[comp.sys.nsc.32k] Mach 3.0 diffs for ns532...

ylo@ngs.fi (Tatu Yl|nen) (02/20/91)

>         I was wondering how avaiable you would make the diffs to the
> Mach 3.0 source files to allow it to run on the pc532s. I'm not interested
> in the AT&T code, just the micro-kernel, etc.

Our code will be made available, but I don't yet know exactly when (I
would estimate in about one month).  Mach now runs quite nicely on the
pc532 (shell, ps, most of the utilities, vi, etc work; gcc has
compiled small programs on the pc532, emacs loads but due to some bug
in the tty driver the tty modes don't yet get set properly).  Floating
point code may not yet work, and the scsi driver still has bugs.

Our current code is based on Mach 3.0 release 30, while the
first freed release is 41.  We will have to convert our code from 30
to 42 (the current release) before we can give it out.  That will be
a few days work, and we won't start it until we get the last few
really disturbing bugs fixed.

Also remember that we cannot distribute the unix server (except
perhaps as diffs).  (We'll have to check on this.)

Attached is a log which gives some idea of the current status.

    Johannes Helander <jvh@cs.hut.fi>
    Tero Kivinen      <kivinen@niksula.hut.fi>
    Jukka Partanen    <jtp@niksula.hut.fi>
    Mika Pihlajamaki  <pipe@niksula.hut.fi>
    Tatu Ylonen       <ylo@cs.hut.fi>

-------------------------------------------------------------------------------

NS32000 ROM Debugger
Version: Sat Jul 14 19:25:31 PDT 1990
RAM free above 0x1554

Command (? for help): read 1 2000 400 10
Command (? for help): run 2020
ABC
ns532_init: delaycount=3122
PC532 boot: total memory 8 megabytes
Kernel from 0x18000000: code 217088, data 38696, bss 10520, symbols 47240 bytes
Available physical space from 0x59000 to 0x7ff000
[ preserving 0xb888 bytes of mach symbol table ]
Breakpoint at	_Debugger+0x3:	bpt
db> c
Mach 3.0 VERSION(XMK30): Wed Feb 20 10:31:17 EET 1991; kernel/STD+PC532 (bond.hut.fi)
root on sd4a
sd: initializing DP8490 controller
PC532 COM Driver V0.0  Copyright (c) 1991 Tatu Ylonen <ylo@cs.hut.fi>
PC532 SCSI Driver V0.0  Copyright (c) 1991 Tatu Ylonen <ylo@cs.hut.fi>
sd: DP8490 target 0: Direct access device: MICROP  1588-15MB1036510AS0A1588-15MB1036510AS0A
sd: DP8490 target 0: 637MB (512 byte sectors)
sd: disk label is not valid.
sd: DP8490 target 4: Direct access device: SEAGATE ST277N          00810445    
sd: DP8490 target 4: 62MB (512 byte sectors)
sd: partitions: (2250 22050) (0 0) (2088 120611) (24300 96311) (120611 2088) (0 1) (1 2087) (0 0)
sd: initialization complete.  2 targets found.
Paging file /dev/sd4a/mach_servers/paging_file found
boot_load_program: loading /dev/sd4a/mach_servers/startup
boot_load_program: argv[0]='/mach_servers/startup'
boot_load_program: argv[1]='-as'
boot_load_program: argv[2]='sd4a'
[ preserving 0x97d8 bytes of unix symbol table ]
read_emulator_symbols: calling open_file /dev/sd4a/mach_servers/emulator
[ preserving 0x1dd0 bytes of emulator symbol table ]
bootstrap: calling thread_resume 0x900
Breakpoint at	_Debugger+0x3:	bpt
db> c
Breakpoint at	_main+0x4f:	bpt
db> c
Mach 3.0 VERSION(XUX18): Tue Feb 19 12:28:31 EET 1991; server/BOOT+BS+WS (bond.hut.fi)

Available memory = 7.25 megabytes
Using up to 206 buffers
rootdev=0x20
system_setup: calling inode_pager_bootstrap
system_setup: calling mountfs
mountfs: calling bread
mountfs: bread returned
system_setup: mountfs returned
system_setup: calling inittodr
Base is Wed Feb 20 04:51:44 1991
Current time is Wed Feb 20 08:34:00 1991
Time is set to Wed Feb 20 08:34:00 1991
inittodr returned
system_setup: calling iget rootdir
system_setup: calling newproc
newproc: creating process 1
system_setup: calling inode_pager
system_setup: calling ux_handler_setup
system_setup: calling task_set_exception_port
system_setup: calling load_emulator
system_setup: resuming init process
system_setup: calling unix_release
system_setup: calling server_thread_deregister
system_setup: entering ux_server_loop
newproc: creating process 2
# TERM=vt100
# export TERM
# ls -la
newproc: creating process 3
total 7
drwxr-xr-x 10 14238         512 Feb 20 04:51 .
drwxr-xr-x  3 14238         512 Feb 20 04:48 ..
drwxrwxrwx  2 14238        1536 Feb 20 04:49 bin
drwxrwxrwx  2 14238        1024 Feb 20 04:49 dev
drwxrwxrwx  2 14238         512 Feb 20 08:34 etc
drwxrwxrwx  2 14238         512 Feb 20 04:50 lib
drwxr-xr-x  2 14238         512 Feb 20 04:50 mach_servers
drwxr-xr-x  2 14238         512 Feb 20 04:51 pc532
drwxrwxrwx  2 14238         512 Feb 14 18:09 tmp
drwxr-xr-x  2 14238         512 Feb 20 04:48 usr
# ls bin
newproc: creating process 4
[		df		machine		rb		sz
ar		diff		make		rcp		tar
as		du		mkdir		rm		tee
bash		e		mkfs		rmdir		test
binsh		echo		mount		rx		time
cat		ed		mt		rz		top
chfn		expr		mv		sb		tp
chmod		false		nice		sed		true
chsh		hostid		nm		sh		umount
cmp		hostname	od		size		wall
cp		kill		pagesize	strip		who
cpio		ld		passwd		stty		write
csh		ln		pr		su		xstrip
date		login		ps		sx
dd		ls		pwd		sync
# ls -l mach_servers
newproc: creating process 5
total 2460
-rwxr-x--x  1 14238       48157 Feb 20 04:50 emulator
-rwxr-xr-x  1 14238       29054 Feb 20 04:50 mach_init
-rw-r--r--  1 14238     2097152 Feb 20 04:50 paging_file
-rwxr-xr-x  1 14238      334819 Feb 20 04:50 startup
# csh
newproc: creating process 6
# mount -r /dev/sd4d /usr
newproc: creating process 7
mountfs: calling bread
mountfs: bread returned
ufs_mount: file system not cleaned -- please fsck
# mkdir /jvh
newproc: creating process 8
# cd /jvh
# sync
newproc: creating process 9
# vi hello.c
newproc: creating process 10

   (many control codes deleted)

:wq"hello.c" [New file] 4 lines, 38 characters 
# cat hello.c
newproc: creating process 11
main()
{
	printf("Hello World!\n");
}
# sync
newproc: creating process 12
# gcc -v hello.c -o hello
newproc: creating process 13
gcc version 1.37.94
 /pc532/root/usr/lib/gcc-cpp -v -undef -D__GNUC__ -Dns32000 -Dunix -D__ns32000__ -D__unix__ hello.c /tmp/cc000013.cpp
newproc: creating process 14
GNU CPP version 1.37.94
 /pc532/root/usr/lib/gcc-cc1 /tmp/cc000013.cpp -quiet -dumpbase hello.c -version -o /tmp/cc000013.s
newproc: creating process 15
GNU C version 1.37.94 (32000, GAS syntax) compiled by GNU C version 1.37.94.
default target switches: -m32081 -msb0
 as -o hello.o /tmp/cc000013.s
newproc: creating process 16
 ld -o hello /lib/crt0.o hello.o /pc532/root/usr/lib/gcc-gnulib -lc /pc532/root/usr/lib/gcc-gnulib
newproc: creating process 17
# sync
newproc: creating process 18
# ./hellsd: arbitration timeout.  Resetting DP8490 bus

    (at this point, the machine crashed)

com0: received break
Breakpoint at	_Debugger+0x3:	bpt
db> tr/u
_Debugger(0,1803bcf0,1803c3b0) at _Debugger+0x3
_comintr_receive(18040b18,18040b84,1803c3b0) at	_comintr_receive+0x57
_comintr(c,4,8000001,0,18031638,4,1) at	_comintr+0xdc
_t_nvi_interrupt(8000001,4,1,8000000,0,0,19940ec0,3) at	_t_nvi_interrupt+0x4e
_t_nvi_interrupt(8000000,1803c3b0) at _t_nvi_interrupt+0x4b
_dp8490_busreset(0,18839f80,18031f10,20,1,1883b6c4) at _dp8490_busreset+0x23
_dp8490_arbtimeout(20,1,1,2710,1,b71b0)	at _dp8490_arbtimeout+0xa9
_softclock(1,0,0,1803f544,1803f430,100)	at _softclock+0x6a
_clock_interrupt(2710,1,1,0) at	_clock_interrupt+0x12f
_hardclock(0,0,84037e5,0,ffffff80,19940e00,1) at _hardclock+0x32
_t_nvi_interrupt(84037e5,2) at _t_nvi_interrupt+0x4e
_machine_idle(0,0,0,0,0,1803f534,1803f0a4) at _machine_idle+0x2f
_idle_thread() at _idle_thread+0x6e
db> show all threads
task 0x18839ab8: 8 threads:
thread 0x18839da0   W N	_vm_page_free_wanted
thread 0x18839f80  R	pri = 31, 225u 62s 1569478c
thread 0x1883a160   W N	_reaper_queue
thread 0x1883a3c0   W N	_swapin_queue
thread 0x1883a5a0   W N	_thread_swap_tick
thread 0x1883a780   W N	0
thread 0x1883a9a0  R  N	pri = 0, 0u 0s 277c
thread 0x1883ac80   W N	_net_rcv_msg_queue
task 0x1883ae60: thread	0x1883afdc   W	 0
task 0x1883b8d8: 12 threads:
thread 0x1883ba54   W	0
thread 0x188428b0   W	0
thread 0x18842aa4   W	0
thread 0x18842c98   W	0
thread 0x188435cc   W	0
thread 0x188496f8   W	0
thread 0x1884a730   W	0
thread 0x1884aea4   W	0
thread 0x1884d8dc   W	0
thread 0x1884db74   W	0
thread 0x1884dd0c   W	0
thread 0x188515dc   W	0
task 0x18848d30: thread	0x18849270   W	 0
task 0x1884a950: thread	0x1884ab7c   W	 0
task 0x1884dee4: thread	0x188501a8   W	 0
db> 

(here we typed "pc532reset" in another window to reboot the pc532
downstairs)

NS32000 ROM Debugger
Version: Sat Jul 14 19:25:31 PDT 1990
RAM free above 0x1554

Command (? for help): read 1 2000 400 10
Command (? for help): run 2020
ABC
ns532_init: delaycount=3122
PC532 boot: total memory 8 megabytes
Kernel from 0x18000000: code 217088, data 38696, bss 10520, symbols 47240 bytes
Available physical space from 0x59000 to 0x7ff000
[ preserving 0xb888 bytes of mach symbol table ]
Breakpoint at	_Debugger+0x3:	bpt
db> c
Mach 3.0 VERSION(XMK30): Wed Feb 20 10:31:17 EET 1991; kernel/STD+PC532 (bond.hut.fi)
root on sd4a
sd: initializing DP8490 controller
PC532 COM Driver V0.0  Copyright (c) 1991 Tatu Ylonen <ylo@cs.hut.fi>
PC532 SCSI Driver V0.0  Copyright (c) 1991 Tatu Ylonen <ylo@cs.hut.fi>
sd: DP8490 target 0: Direct access device: MICROP  1588-15MB1036510AS0A1588-15MB1036510AS0A
sd: DP8490 target 0: 637MB (512 byte sectors)
sd: disk label is not valid.
sd: DP8490 target 4: Direct access device: SEAGATE ST277N          00810445
sd: DP8490 target 4: 62MB (512 byte sectors)
sd: partitions: (2250 22050) (0 0) (2088 120611) (24300 96311) (120611 2088) (0 1) (1 2087) (0 0)
sd: initialization complete.  2 targets found.
Paging file /dev/sd4a/mach_servers/paging_file found
boot_load_program: loading /dev/sd4a/mach_servers/startup
boot_load_program: argv[0]='/mach_servers/startup'
boot_load_program: argv[1]='-as'
boot_load_program: argv[2]='sd4a'
[ preserving 0x97d8 bytes of unix symbol table ]
read_emulator_symbols: calling open_file /dev/sd4a/mach_servers/emulator
[ preserving 0x1dd0 bytes of emulator symbol table ]
bootstrap: calling thread_resume 0x900
Breakpoint at	_Debugger+0x3:	bpt
db> c
Breakpoint at	_main+0x4f:	bpt
db> c
Mach 3.0 VERSION(XUX18): Tue Feb 19 12:28:31 EET 1991; server/BOOT+BS+WS (bond.hut.fi)

Available memory = 7.25 megabytes
Using up to 206 buffers
rootdev=0x20
system_setup: calling inode_pager_bootstrap
system_setup: calling mountfs
mountfs: calling bread
mountfs: bread returned
system_setup: mountfs returned
system_setup: calling inittodr
Base is Wed Feb 20 05:09:05 1991
Current time is Wed Feb 20 08:41:28 1991
Time is set to Wed Feb 20 08:41:28 1991
inittodr returned
system_setup: calling iget rootdir
system_setup: calling newproc
newproc: creating process 1
system_setup: calling inode_pager
system_setup: calling ux_handler_setup
system_setup: calling task_set_exception_port
system_setup: calling load_emulator
system_setup: resuming init process
system_setup: calling unix_release
system_setup: calling server_thread_deregister
system_setup: entering ux_server_loop
newproc: creating process 2
# TERM=vt100
# export TERM
# csh
newproc: creating process 3
# sync
newproc: creating process 4
# mount -r /dev/sd4d /usr
newproc: creating process 5
mountfs: calling bread
mountfs: bread returned
ufs_mount: file system not cleaned -- please fsck
# set path=(/bin /usr/bin /usr/ucb)
# cd /jvh
# ls -l
newproc: creating process 6
total 1
-rw-r--r--  1 0              38 Feb 20 08:37 hello.c
# gcc -v hello.c -o hello
newproc: creating process 7
gcc version 1.37.94
 /pc532/root/usr/lib/gcc-cpp -v -undef -D__GNUC__ -Dns32000 -Dunix -D__ns32000__ -D__unix__ hello.c /tmp/cc000007.cpp
newproc: creating process 8
GNU CPP version 1.37.94
 /pc532/root/usr/lib/gcc-cc1 /tmp/cc000007.cpp -quiet -dumpbase hello.c -version -o /tmp/cc000007.s
newproc: creating process 9
GNU C version 1.37.94 (32000, GAS syntax) compiled by GNU C version 1.37.94.
default target switches: -m32081 -msb0
 as -o hello.o /tmp/cc000007.s
newproc: creating process 10
 ld -o hello /lib/crt0.o hello.o /pc532/root/usr/lib/gcc-gnulib -lc /pc532/root/usr/lib/gcc-gnulib
newproc: creating process 11
# ./hello
newproc: creating process 12
Hello World!
# ps ax
newproc: creating process 13
emulator [6fe20] obreak : vm_allocate 3
[inuse]ps (13)called obreak(24ffc)
ps: could not sbrk, return = 3
emulator [6fe20] obreak : vm_allocate 3
[inuse]ps (13)called obreak(25ffc)
ps: could not sbrk, return = 3
emulator [6fe20] obreak : vm_allocate 3
[inuse]ps (13)called obreak(28ffc)
ps: could not sbrk, return = 3
  PID TT STAT  TIME COMMAND
    0 ?  S <   0:19 /mach_server
    1 ?  S     0:00 /mach_servers/mach_init -sa
    2 ?  S     0:00 - (sh)
    3 ?  S     0:02 -sh (csh)
   13 ?  R     0:00 ps ax
# ps axl
newproc: creating process 14
emulator [6fe20] obreak : vm_allocate 3
[inuse]ps (14)called obreak(24ffc)
ps: could not sbrk, return = 3
emulator [6fe20] obreak : vm_allocate 3
[inuse]ps (14)called obreak(25ffc)
ps: could not sbrk, return = 3
emulator [6fe20] obreak : vm_allocate 3
[inuse]ps (14)called obreak(28ffc)
ps: could not sbrk, return = 3
      F  UID   PID  PPID CP PRI NI ADDR   SZ  RSS WCHAN STAT TT  TIME COMMAND
emulator [6fe20] obreak : vm_allocate 3
[inuse]ps (14)called obreak(29ffc)
ps: could not sbrk, return = 3
trap: user mode unrecoverable page fault pc=0x167b8 addr=0x2900c
kernel: Abort trap, code=1
Stopped	at	_wait1+0x154:	movd	r0,0(r1)
db> c
Segmentation fault
# ls -l
newproc: creating process 15
total 68
-rw-r--r--  1 0           53248 Feb 20 08:44 core
-rwxr-xr-x  1 0           10997 Feb 20 08:44 hello
-rw-r--r--  1 0              38 Feb 20 08:37 hello.c
# wall
newproc: creating process 16
This is a test!
# who
newproc: creating process 17
# compress core
newproc: creating process 18
# ls -l
newproc: creating process 19
total 18
-rw-r--r--  1 0            5915 Feb 20 08:44 core.Z
-rwxr-xr-x  1 0           10997 Feb 20 08:44 hello
-rw-r--r--  1 0              38 Feb 20 08:37 hello.c
# uncompress core
newproc: creating process 20
# ls -l /lib
newproc: creating process 21
total 432
-rwxrwxrwx  1 14238         618 Feb 19 23:00 crt0.o
-rwxr-xr-x  1 14238       29613 Feb 15 14:59 ex3.7preserve
-rwxr-xr-x  1 14238       29197 Feb 15 14:59 ex3.7recover
-rwxrwxrwx  1 14238        2847 Feb 14 19:35 gcrt0.o
-rw-rw-r--  1 14238      164812 Feb 19 23:00 libc.a
-rw-r--r--  1 14238      197122 Feb 19 00:02 libc_p.a
-rwxrwxrwx  1 14238        1920 Feb 19 23:00 mcrt0.o
# ar t /lib/libc.a
newproc: creating process 22
__.SYMDEF
library/Ovadvise
library/Ovfork.o
library/_exit.o
library/_setjmp.
library/abort.o
library/abs.o
library/accept.o
library/access.o
library/acct.o
library/adjtime.
library/alarm.o
library/alloca.o
library/atof.o
library/atoi.o
library/atol.o
library/bcmp.o
library/bcopy.o
library/bind.o
library/brk.o
library/bzero.o
library/calloc.o
library/cerror.o
library/chdir.o
library/chmod.o
library/chown.o
library/chroot.o
library/close.o
library/closedir
library/clrerr.o
library/connect.
library/creat.o
library/crypt.o
library/ctime.o
library/ctype_.o
library/disktab.
library/doprnt.o
library/doscan.o
library/dup.o
library/dup2.o
library/ecvt.o
library/errlst.o
library/execl.o
library/execle.o
library/exect.o
library/execv.o
library/execve.o
library/execvp.o
library/exit.o
library/fabs.o
library/fchmod.o
library/fchown.o
library/fcntl.o
library/fdopen.o
library/ffs.o
library/fgetc.o
library/fgets.o
library/filbuf.o
library/findiop.
library/flock.o
library/flsbuf.o
library/fopen.o
library/fork.o
library/fpinit.o
library/fprintf.
library/fputc.o
library/fputs.o
library/fread.o
library/freopen.
library/frexp.o
library/fseek.o
library/fstab.o
library/fstat.o
library/fsync.o
library/ftell.o
library/ftime.o
library/ftruncat
library/fwrite.o
library/gcvt.o
library/getchar.
library/getdiren
library/getdtabl
library/getegid.
library/getenv.o
library/geteuid.
library/getgid.o
library/getgrent
library/getgrgid
library/getgrnam
library/getgroup
library/gethoste
library/gethosti
library/gethostn
library/gethostn
library/getitime
library/getlogin
library/getmodes
library/getnetby
library/getnetby
library/getneten
library/getopt.o
library/getpages
library/getpass.
library/getpeern
library/getpgrp.
library/getpid.o
library/getppid.
library/getprior
library/getproto
library/getproto
library/getproto
library/getpw.o
library/getpwent
library/getpwnam
library/getrlimi
library/getrusag
library/gets.o
library/getservb
library/getservb
library/getserve
library/getsockn
library/getsocko
library/gettimeo
library/getttyen
library/getttyna

    (at this point we pressed ^C)

# nm /lib/crt0.o
newproc: creating process 23
00000004 C __StrongBox_init_routine
00000004 C __cthread_exit_routine
00000004 C __cthread_init_routine
00000000 T __start
0000000c T __start2
00000004 C __start_sp
00000094 D _environ
00000098 D _errno
         U _exit
00000004 C _mach_init_routine
         U _main
0000008f T _mcount
00000088 T _moncontrol
# man gcc
newproc: creating process 24
man: no entry for gcc in the manual.
# grep mach /etc/group
newproc: creating process 25
grep: can't open /etc/group
# cat /etc/passwd
newproc: creating process 26
/etc/passwd: No such file or directory
# grep printf hello.c
newproc: creating process 27
	printf("Hello World!\n");
# gcc hello.c -o hello2 &
newproc: creating process 28
[1] 28
# ps
newproc: creating process 29
newproc: creating process 30
newproc: creating process 31
newproc: creating process 32
  PID TT STAT  TIME COMMAND
# newproc: creating process 33

[1]    Done                 gcc hello.c -o hello2
# ps
newproc: creating process 34
  PID TT STAT  TIME COMMAND
# !gcc
gcc: Event not found.
# ps ax
newproc: creating process 35
emulator [6fe20] obreak : vm_allocate 3
[inuse]ps (35)called obreak(24ffc)
ps: could not sbrk, return = 3
emulator [6fe20] obreak : vm_allocate 3
[inuse]ps (35)called obreak(25ffc)
ps: could not sbrk, return = 3
emulator [6fe20] obreak : vm_allocate 3
[inuse]ps (35)called obreak(28ffc)
ps: could not sbrk, return = 3
  PID TT STAT  TIME COMMAND
    0 ?  S <   0:40 /mach_server
    1 ?  S     0:00 /mach_servers/mach_init -sa
    2 ?  S     0:00 - (sh)
    3 ?  S     0:03 -sh (csh)
   35 ?  R     0:00 ps ax
# gcc hello.c -o hello3 &
newproc: creating process 36
[1] 36
# newproc: creating process 37
ps newproc: creating process 38
ax
newproc: creating process 39
newproc: creating process 40
newproc: creating process 41
emulator [70348] obreak : vm_allocate 3
[inuse]ps (39)called obreak(24ffc)
ps: could not sbrk, return = 3
emulator [70348] obreak : vm_allocate 3
[inuse]ps (39)called obreak(25ffc)
ps: could not sbrk, return = 3
emulator [70348] obreak : vm_allocate 3
[inuse]ps (39)called obreak(26ffc)
ps: could not sbrk, return = 3
emulator [70348] obreak : vm_allocate 3
[inuse]ps (39)called obreak(27ffc)
ps: could not sbrk, return = 3
emulator [70348] obreak : vm_allocate 3
[inuse]ps (39)called obreak(2affc)
ps: could not sbrk, return = 3
  PID TT STAT  TIME COMMAND
    0 ?  R <   0:46 /mach_server
    1 ?  S     0:00 /mach_servers/mach_init -sa
    2 ?  S     0:00 - (sh)
    3 ?  S     0:03 -sh (csh)
   36 ?  S     0:00 gcc hello.c -o hello3
   39 ?  R     0:00 ps ax
   41 ?  R     0:00 ld -o hello3 /lib/crt0.o hello.o /pc532/root/usr/lib/gcc-gn
[1]  + Done                 gcc hello.c -o hello3
# date
newproc: creating process 42
Wed Feb 20 08:50:20 EST 1991
# dd if=core of=test
newproc: creating process 43
104+0 records in
104+0 records out
# dc
newproc: creating process 44
10 20 + p
30
10 k
5 3 / p
1.6666666666
4 v p
2.0000000000
5 v p
2.2360679774
# which ftp
newproc: creating process 45
newproc: creating process 46
/usr/ucb/ftp
# ctags hello.c
newproc: creating process 47
# ls -l
newproc: creating process 48
total 146
-rw-r--r--  1 0           53248 Feb 20 08:44 core
-rwxr-xr-x  1 0           10997 Feb 20 08:44 hello
-rw-r--r--  1 0              38 Feb 20 08:37 hello.c
-rwxr-xr-x  1 0           10997 Feb 20 08:49 hello2
-rwxr-xr-x  1 0           10997 Feb 20 08:49 hello3
-rw-r--r--  1 0              26 Feb 20 08:52 tags
-rw-r--r--  1 0           53248 Feb 20 08:50 test
# cp hello.c hello2.c
newproc: creating process 49
# cp hello.c hello3.c
newproc: creating process 50
# echo aaas >>hello2.c
# echo aasa >>hello3.c
# diff3 hello.c hello2.c hello3.c
newproc: creating process 51
/usr/bin/diff3: Permission denied.
# chmod a+x /usr/bin/diff3
newproc: creating process 52
chmod: /usr/bin/diff3: Read-only file system
# umount /usr
newproc: creating process 53

   (well, the system crashed again, let's press break)

com0: received break
Breakpoint at	_Debugger+0x3:	bpt
db> trace
_Debugger(4,1885244c,188521cc) at _Debugger+0x3
_comintr_receive(18040b18,18040b84,188521cc) at	_comintr_receive+0x57
_comintr(c,4,8001888,0,188521cc,1460,13a0) at _comintr+0xdc
_t_nvi_interrupt(8001888,18849fc0,1000,1883b660,1885244c,1885244c,0) at	_t_nvi_interrupt+0x4e
_sdstrategy(1885244c,50) at _sdstrategy+0x185
_block_io(18031734,18024290,1885244c) at _block_io+0x60
_sdwrite(20,1885244c,0,188537d8,1884b010,188537e8,1883b660) at _sdwrite+0x18
_ds_device_write(1883b660,18844d78,12,0,1460,18849fc0,1000,1884b034,1883b684,1884b010,188537e8,188537e8) at _ds_device_write+0xaa
_ds_device_read_reply_inband(188537e8,1884b010,1884b000) at _ds_device_read_reply_inband+0x248
_device_server(188537e8,1884b010,0,188537d8,1883b684,0)	at _device_server+0x80
_ipc_kobject_server(188537d8,38,0,1883b948,18809dc8,0) at _ipc_kobject_server+0x82
_ipc_mqueue_send(188537d8,0,0,38,0,0,0,19aacf74,19aacf3c,8,19aacf4c,1803373f,0,0,38,0) at _ipc_mqueue_send+0x22
_mach_msg_trap() at _mach_msg_trap+0x79d
db> c
com0: received break
Breakpoint at	_Debugger+0x3:	bpt
db> 
com0: received break
Breakpoint at	_Debugger+0x3:	bpt
db> tr/u
_Debugger(4,1885244c,188521cc) at _Debugger+0x3
_comintr_receive(18040b18,18040b84,188521cc) at	_comintr_receive+0x57
_comintr(c,4,8001888,0,188521cc,1460,13a0) at _comintr+0xdc
_t_nvi_interrupt(8001888,18849fc0,1000,1883b660,1885244c,1885244c,0) at	_t_nvi_interrupt+0x4e
_sdstrategy(1885244c,50) at _sdstrategy+0x18c
_block_io(18031734,18024290,1885244c) at _block_io+0x60
_sdwrite(20,1885244c,0,188537d8,1884b010,188537e8,1883b660) at _sdwrite+0x18
_ds_device_write(1883b660,18844d78,12,0,1460,18849fc0,1000,1884b034,1883b684,1884b010,188537e8,188537e8) at _ds_device_write+0xaa
_ds_device_read_reply_inband(188537e8,1884b010,1884b000) at _ds_device_read_reply_inband+0x248
_device_server(188537e8,1884b010,0,188537d8,1883b684,0)	at _device_server+0x80
_ipc_kobject_server(188537d8,38,0,1883b948,18809dc8,0) at _ipc_kobject_server+0x82
_ipc_mqueue_send(188537d8,0,0,38,0,0,0,19aacf74,19aacf3c,8,19aacf4c,1803373f,0,0,38,0) at _ipc_mqueue_send+0x22
_mach_msg_trap() at _mach_msg_trap+0x79d
_syscall_call(54bc7c,1,38,0,0,0,0,7f024,80001513,3,f300,4500,0,af2,10012002,0) at _syscall_call+0x3
_device_write_request(f300,4500,0,1460,396000,1000,30a,7f024) at _device_write_request+0x5e
_bio_strategy(7f024,54ffff,7f024) at _bio_strategy+0x6e
_bforce(7f024,3,6de70,54bd24,a8750) at _bforce+0x69
_bflush(ffffffff,52168,24,54ddd0,27c27f8b,a8750,27c27f8b,a6040)	at _bflush+0x6f
_update() at _update+0x140
_sync(0,54ddd0,54bdd0,0,52168,54bdd0,54fde4,54ddd0,54bd44,2c,54bd44,0) at _sync+0x9
_ux_generic_server(54ddd0,54bdd0,0,40e9c,fffffde5,73207875,65767265,68742072,64616572,35343620,3430,0,0,0,0,0) at _ux_generic_server+0x169
_ux_server_loop(0,0,0,70348,0,70370,70370,54ddf4,0,0,0,0,0,54ddd0,24,54fde4) at	_ux_server_loop+0xae
_ux_thread_bootstrap(40e9c,0,64504) at _ux_thread_bootstrap+0x7c
_cthread_body()	at _cthread_body+0xa2
db> sh regs
No such	command
db> show reg
r0		   0
r1	    0x18040b18	_comttys
r2	    0x18040b18	_comttys
r3	    0x1885218d	_end+0x81114d
r4	    0x18040b18	_comttys
r5		 0x1
r6		   0
r7	    0x1803bd10	_sdcontrollers+0x20
sp	    0x54bc20	_end+0x4e9b7c
ksp	    0x19aacd88	_end+0x1a6bd48
fp	    0x19aacdb4	_end+0x1a6bd74
sb		   0
pc	    0x1800f4a3	_Debugger+0x3
psr	    0x4c740860	<i z f>
f0		   0
f1		   0
f2		   0
f3		   0
f4		   0
f5		   0
f6		   0
f7		   0
fsr	     0x10000	<rmb roundm=Nearest trapt=None>	_sdinit+0xb38c
intbase	    0x1800278d	_intvectors
ptb	    0x7df000	_end+0x77cf5c
ivar		   0
tear	    0x4cc180	_end+0x46a0dc
mcr		 0x3	<ts tu>
msr		0xaf	<sst=Data transfer tex=1st PTE inv>
dcr		   0	<>
dsr		   0	<>
car		   0
bpc		   0
cfg	       0xbf6
_Debugger+0x3:	bpt
db> trace,2
_Debugger(4,1885244c,188521cc) at _Debugger+0x3
_comintr_receive(18040b18,18040b84,188521cc) at	_comintr_receive+0x57
db> break strategy
db> break sdintr
db> c
com0: received break
Breakpoint at	_Debugger+0x3:	bpt
db> break hardclock
db> c
Breakpoint at	_hardclock:	enter	[r3],0
db> s
Stopped	at	_hardclock+0x3:	movd	0x10(fp),r3
db> 
Stopped	at	_hardclock+0x6:	andd	0x100,r3
db> 
Stopped	at	_hardclock+0xc:	cmpqd	0,r3
db> 
Stopped	at	_hardclock+0xe:	sned	r0
db> 
Stopped	at	_hardclock+0x10:	movd	r0,tos
db> 
Stopped	at	_hardclock+0x12:	jsr	@_leds_hardclock
db> n/p
[after	    5]	   _leds_hardclock+0x10:	jsr	@_led_outdigit
[after	   13]	     _led_outdigit+0x20:	jsr	@_splclock
[after	   17]	     _splclock+0x14:	ret	0
[after	   20]	     _led_outdigit+0x2a:	jsr	@_sdaux_select
[after	   37]	     _sdaux_select+0x38:	ret	0
[after	   62]	     _led_outdigit+0x95:	jsr	@_sdaux_select
[after	   78]	     _sdaux_select+0x38:	ret	0
[after	   80]	     _led_outdigit+0x9d:	jsr	@_splx
[after	   94]	     _set_spl_common+0x56:	ret	0
[after	   98]	   _led_outdigit+0xa9:	ret	0
[after	  103]	   _leds_hardclock+0x24:	jsr	@_led_outdigit
[after	  111]	     _led_outdigit+0x20:	jsr	@_splclock
[after	  115]	     _splclock+0x14:	ret	0
[after	  118]	     _led_outdigit+0x2a:	jsr	@_sdaux_select
[after	  135]	     _sdaux_select+0x38:	ret	0
[after	  160]	     _led_outdigit+0x95:	jsr	@_sdaux_select
[after	  176]	     _sdaux_select+0x38:	ret	0
[after	  178]	     _led_outdigit+0x9d:	jsr	@_splx
[after	  192]	     _set_spl_common+0x56:	ret	0
[after	  196]	   _led_outdigit+0xa9:	ret	0
[after	  199]	   _leds_hardclock+0x32:	jsr	@_led_outdigit
[after	  207]	     _led_outdigit+0x20:	jsr	@_splclock
[after	  211]	     _splclock+0x14:	ret	0
[after	  214]	     _led_outdigit+0x2a:	jsr	@_sdaux_select
[after	  231]	     _sdaux_select+0x38:	ret	0
[after	  256]	     _led_outdigit+0x95:	jsr	@_sdaux_select
[after	  272]	     _sdaux_select+0x38:	ret	0
[after	  274]	     _led_outdigit+0x9d:	jsr	@_splx
[after	  288]	     _set_spl_common+0x56:	ret	0
[after	  292]	   _led_outdigit+0xa9:	ret	0
296 instructions executed
Stopped	at	_leds_hardclock+0x43:	ret	0
db> x/i $pc,10
		_leds_hardclock+0x43	ret	0
		_leds_hardclock+0x45	addb	r0,r0
		_leds_hardclock+0x47	addb	0(0(fp)),0x17(r0)
		_leds_int+0x4	addb	r1,r3
		_leds_int+0x6	cmpqd	0,r0
		_leds_int+0x8	beq	_leds_int+0x1e
		_leds_int+0xa	cmpqd	0,@_show_leds_int
		_leds_int+0x10	beq	_leds_int+0x1e
		_leds_int+0x12	movd	r0,tos
		_leds_int+0x14	movqd	0x1,tos
		_leds_int+0x16	jsr	@_led_outdigit
		_leds_int+0x1c	cmpd	tos,tos
		_leds_int+0x1e	exit	[]
		_leds_int+0x20	ret	0
		_leds_int+0x22	addb	r0,r0
_leds_trap:	_leds_trap	enter	[],0
db> s
Stopped	at	_hardclock+0x18:	cmpqd	0,tos
db> s
Stopped	at	_hardclock+0x1a:	cmpqd	0,0xc(fp)
db> s
Stopped	at	_hardclock+0x1d:	seqd	r0
db> s
Stopped	at	_hardclock+0x1f:	movd	r0,tos
db> s
Stopped	at	_hardclock+0x21:	cmpqd	0,r3
db> s
Stopped	at	_hardclock+0x23:	sned	r0
db> s
Stopped	at	_hardclock+0x25:	movd	r0,tos
db> ?
Bad character
?
db> help
print	    examine	x	    set		write	    delete	break
step	    s		continue    until	next	    trace	show
halt
db> show
all	    registers	breaks	    thread	map	    object	page
port
db> c
Breakpoint at	_hardclock:	enter	[r3],0
db> c
Breakpoint at	_hardclock:	enter	[r3],0
db> c
Breakpoint at	_hardclock:	enter	[r3],0
db> c
Breakpoint at	_hardclock:	enter	[r3],0
db> c
Breakpoint at	_hardclock:	enter	[r3],0
db> c
Breakpoint at	_hardclock:	enter	[r3],0
db> delete
db> c
com0: received break
Breakpoint at	_Debugger+0x3:	bpt
db> break clock_interrupt
db> c
Breakpoint at	_clock_interrupt:	enter	[r3,r4,r5,r6,r7],0
db> trace
_clock_interrupt(0,6,8414b29,0,19aacdb4,18041040,fffe) at _clock_interrupt
_t_nvi_interrupt(8414b29,8) at _t_nvi_interrupt+0x4e
_set_spl_common(6,0,8,18040b18,1,19aacd50,0,8,18040b18,1885218d) at _set_spl_common+0x52
_kdb_trap(8,18040b18,19aacd50,1803bd10,0,1,18040b18,1885218d,1803363a,1885125c,8) at _kdb_trap+0xad
_trap(19aacd50,8,10000,0,0,0,0,0,0,0,0,0,0,19aacdb4,19aacd88,54bc20) at	_trap+0x177
_trap_common(4,1885244c,188521cc) at _trap_common+0xd
_comintr_receive(18040b18,18040b84,188521cc) at	_comintr_receive+0x57
_comintr(c,4,8001888,0,188521cc,1460,13a0) at _comintr+0xdc
_t_nvi_interrupt(8001888,18849fc0,1000,1883b660,1885244c,1885244c,0) at	_t_nvi_interrupt+0x4e
_sdstrategy(1885244c,50) at _sdstrategy+0x189
_block_io(18031734,18024290,1885244c) at _block_io+0x60
_sdwrite(20,1885244c,0,188537d8,1884b010,188537e8,1883b660) at _sdwrite+0x18
_ds_device_write(1883b660,18844d78,12,0,1460,18849fc0,1000,1884b034,1883b684,1884b010,188537e8,188537e8) at _ds_device_write+0xaa
_ds_device_read_reply_inband(188537e8,1884b010,1884b000) at _ds_device_read_reply_inband+0x248
_device_server(188537e8,1884b010,0,188537d8,1883b684,0)	at _device_server+0x80
_ipc_kobject_server(188537d8,38,0,1883b948,18809dc8,0) at _ipc_kobject_server+0x82
_ipc_mqueue_send(188537d8,0,0,38,0,0,0,19aacf74,19aacf3c,8,19aacf4c,1803373f,0,0,38,0) at _ipc_mqueue_send+0x22
_mach_msg_trap() at _mach_msg_trap+0x79d
db> c
Breakpoint at	_clock_interrupt:	enter	[r3,r4,r5,r6,r7],0
db> delete
db> c

NS32000 ROM Debugger
Version: Sat Jul 14 19:25:31 PDT 1990
RAM free above 0x1554

Command (? for help): 
Command (? for help): 

-------------------------------------------------------------------------------