Porting OpenBSD to the Solbourne S4000

The few pages located here attempt to document my efforts at porting the OpenBSD operating system to the Solbourne IDT family of workstations (S3000, S4000, S4000DX).


No, this is not my S4000, but it looks similar...
except the Solbourne badge is missing on mine

The port is far from finished at this point, but I am slowly making progress, and I am trying to document all this work, in the hope that people will consider this useful. Some technical knowledge of the 32-bit SPARC processors is recommended, although I try to keep the text understandable to any tech-savvy mind; feel free to ask me to provide more details on hermetic technical points.

Contents
  1. Introduction
  2. Hardware Details
  3. Getting Started
  4. Playing With The Hardware
  5. Blinking The LED
  6. Taming The MMU
  7. Taming The MMU, continued
  8. A Few Words on Serial
  9. Introducing The CPU
  10. Every PMAP Goes to Heaven
  11. Mapping Games
  12. El jardín de senderos que se bifurcan
  13. Work Around The Clock
Last update (Work Around The Clock)
Sat Apr 16 22:20:48 GMT 2005
News

Random facts which will probably eventually make it into the texts on the left...

  • April 19: kernel parts commited to the repository, development will continue in-tree, after a short break (since I need to work on some other BSD things...)
  • April 18: init(8) starts, kernel dies very shortly afterwards...
  • April 12: Kernel mounts its root over NFS.
  • April 8: Serial ports driver attach, and work as a real console. Lots of code restructured to share more code with sparc and reduce differences. Plus, I realized my S4000 runs at 36MHz, not 33MHz; I thought only the 4100 were using 36MHz processors!
  • April 7: The kernel walks the device tree. But I will probably go without this, as the device tree does not list several components!
  • April 6: The kernel is ready to probe devices!
  • April 4: The kernel prints the copyright line, panics shortly afterwards...
  • April 2nd: Received a list of known KAP bugs, kernel enters pmap_bootstrap()
  • April 1st: The S4000 outputs a few words on serial console!
  • March 29: MMU details sorted out, almost
  • March 22: The front LED blinks!
  • March 20: I get the S4000 to boot my own binaries.
  • March 19: I finally convince myself it's time to start working on this port.

dmesg

Here is the dmesg du jour (20050418). I expect it to grow and grow as problems are sorted out and drivers for the hardware get written...

console is ttya
Copyright (c) 1982, 1986, 1989, 1991, 1993
 The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2005 OpenBSD. All rights reserved.  http://www.OpenBSD.org

OpenBSD 3.7-current (GENERIC) #644: Mon Apr 18 20:53:19 GMT 2005
    miod@credogne.gentiane.org:/usr/src/sys/arch/solbourne/compile/GENERIC
real mem = 16777216
avail mem = 9478144
using 102 buffers containing 835584 bytes of memory
bootpath: tftp.ei()/aoutbsd
mainbus0 (root): S4000
cpu0 at mainbus0: KAP @ 36 MHz, on-chip FPU
cpu0: 3K instruction (12 b/l), 2K data (8 b/l) cache enabled
obio0 at mainbus0
tod0 at obio0 addr 0x80014000: OKI MSM62X42BRS
nvram at obio0 addr 0x80000000 not configured
zs0 at obio0 addr 0x80008000 pri 12, softpri 6
zstty0 at zs0 channel 0 (console i/o)
zstty1 at zs0 channel 1
zs1 at obio0 addr 0x80004000 pri 12, softpri 6
zsclock0 at zs1 channel 0
zstty2 at zs1 channel 1: mouse
fdc at obio0 addr 0x8000c000 not configured
audioamd at obio0 addr 0x80010000 not configured
wdsc at obio0 addr 0x40000020 not configured
le0 at obio0 addr 0x40000030 pri 6: address 00:00:8e:01:01:97
le0: 16 receive buffers, 4 transmit buffers
root device : le0
/dev/ksyms: Symbol table not valid.
nfs_boot: using network interface 'le0'
nfs_boot: client_addr=10.0.1.164
nfs_boot: server_addr=10.0.1.101 hostname=ceroux
root on 10.0.1.101:/netboot/ceroux/root
swap on 10.0.1.101:/netboot/ceroux/swap
init: copying out path `/sbin/init' 11
start_init 3
panic: vm_map_lock_read: intrsafe map
Stopped at      0xfd14a65c:     jmpl            [%o7 + 0x8], %g0
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC!
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!
ddb> ps /a
   PID  COMMAND          STRUCT PROC *             UAREA *      VMSPACE/VM_MAP
     7  aiodoned            0xf9a2e7b0          0xfa4b0000          0xfd193c68
     6  update              0xf9a2e668          0xfa4ae000          0xfd193c68
     5  cleaner             0xf9a2e520          0xfa4ac000          0xfd193c68
     4  reaper              0xf9a2e3d8          0xfa4aa000          0xfd193c68
     3  pagedaemon          0xf9a2e290          0xfa4a8000          0xfd193c68
     2  kmthread            0xf9a2e148          0xfa4a6000          0xfd193c68
*    1  init                0xf9a2e000          0xfa4a2000          0xf9a28000
     0  swapper             0xfd193d60          0xfd16c000          0xfd193c68
ddb>

Look how many kernels I had to compile and test, in order to get there!

Thanks

I would like to thank the following for their help during this port, in no particular order:


miod@online.fr