Subject: pc532 Forth and autoboot monitors
To: None <pc532@bungi.com, port-pc532@NetBSD.ORG>
From: Phil Budne <budd@cs.bu.edu>
List: port-pc532
Date: 05/02/1997 17:27:02
I've tweaked the sources for Jordan's Forth and Phil's autoboot
monitor to build under NetBSD.
The sources can be found at ftp://alpha.gnu.ai.mit.edu/budne/pc532/
newmon.tar.gz
forth.tar.gz
================ autoboot monitor
The items marked with *** in the WISHLIST (below) are why I started
this (and Philip Z's amazement that the sources required Minix to
build)!
Has only a few bytes free (to fit in a 32K PROM), despite my linking
it as an OMAGIC executable (no page alignment between text and data),
I can't imagine how it fit when linked with the PROM copy of data
padded out to a 1K boundary. Compiling with -O2 only makes it worse
(negative bytes free). I suppose it's possible GCC v1 made smaller
code! I've tested the ram_db image, but have not blasted a PROM.
================ Forth
I had to do MUCH more work on Forth (since 90% of it is in assembler),
it seems to work, but I get "? msg # 0" after every line of input. I
also reworked scsi_hi.c to deal with BSD disk labels, but haven't
tested Forth disk I/O.
================ newmon/WISHLIST from newmon.tar.gz
Wishlist for pc532 monitor
Phil Budne
May 1997
0. build autoboot monitor on NetBSD
[done
36 bytes free when compiled with -O
-13 bytes free when compiled with -O2!!
6239 bytes free when compiled without DISASSEMBLE]
build with kernel libraries
move source to /sys/arch/pc532/stand/ ??
use compression (decompress and run from ram)???
32732 byte image compresses to 17897 bytes!!
1. boot/reboot support
have "boot" command take string to pass to application (boot prog)?
*** handle "reboot" string/flags from previous application (kernel)
have special entry point; check regs for magic number?
if "halt" don't autoboot!
if "reboot" start immediately!!
pass string to default program?
interpret as prom command????
2. DUART support
*** support 26c92 (at least reset to 2681 compat mode)
more speeds
always use C/T?
allow ANYTHING from 1 to 57600??
do sanity checks (see if multiple of 300?)
just add 38400
add 57600 (using C/T?)
add 115200 (if using 26c92)??
pass console speed to application?!
3. handle/display parity (NMI) traps
4. save info (in block zero ???)
default console rate
autoboot enabled
autoboot delay
default boot string
5. diags
memory test??
SCSI probe
================
BIG;
Switch to Jordan's forth;
add "boot" command
add auto-startup screen??
use an image "file" for startup commands?