Subject: Running a *BSD kernel on PSIM + psim-970207
To: None <>
From: Andrew Cagney <>
List: port-powerpc
Date: 02/07/1997 12:52:47
[For port-powerpc just FYI]


The latest update of PSIM (PowerPC simulator) is available for ftp. 
This update is able to run a locally hacked copy of the NetBSD/PowerPC
kernel up-to single user mode.

This snapshot, baring major bugs, is effectivly psim version 2.1.

As preparatioin, the following files are needed:

		This contains a copy of my own local kernel
		directory.  In particular the file:
		is the kernel image.

		This text file specifies a device tree sufficient for
		running the above kernel.  Hmm, you'll probably
		need to edit this file so that the path to the disk
		image is correct.

		This is a cd9660 image of a small root file system.

To run the kernel you then enter something like:

	psim -f tree-970207 netbsd.gdb

(Not forgetting to first update/build PSIM and adjust the tree file to
specify the correct path to the fl9660 disk image.)

Known qwerks:

	o	The model of the console is pretty lame.
		It, for instance, should probably use cursors.

	o	While the kernel runs from within a cross compiled
		gdb.  The console code means that it `hangs' waiting
		for console input.

		enjoy, Andrew

PS: Below is the output from an agressivly configured simulator runnong
on an AMD486/DX4.  The default configuration has about half the speed.

bash$ ../sim/sim/psim-oea-complex/run -f tree -i netbsd.gdb 
bootpath: ofdisk0/netbsd -sd
IPKDB: No interface found!
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 1.2B (GENERIC) #54: Wed Feb  5 14:26:08 EST 1997
CPU: Version 0 (Revision 0)
real mem = 4194304
^H^H^H^Havail mem = 2641920
using 51 buffers containing 208896 bytes of memory
ofroot0 (root) (gpl,clayton)
ofbus0 at ofroot0 (cpus)
cpu at ofbus0 not configured
ofbus1 at ofroot0 (pci)
ofbus2 at ofbus1 (ide)
ofdisk0 at ofbus2 (cdrom)
ofdisk1 at ofbus2 (cdrom)
ofcons0 at ofbus1 (com)
clock: ticks_per_sec 1000000
clock: ns_per_tick 1000 (1000000000 / ticks_per_sec)
clock: hz 10
clock: ticks_per_intr 100000 (ticks_per_sec / hz)
WARNING: no swap space found
init: copying out flags `-s' 3
init: copying out path `/sbin/init' 11
: not found
# pwd
# ^C
Simulator performed 19,536,317 simulation cycles.
Simulator speed was 233,658 simulation cycles/second
netbsd.gdb: Caught signal 2 at address 0x10014c