.po 8
.de hd
'sp 2
'tl 'K32.86.2''20 Aug 86'
'sp 2
..
.de ft
'sp 2
'tl ''- % -''
'bp
..
.sp 2
.wh -6 ft
.wh 0 hd
.nf
LOGICON
-----------------------------------------------------------------
.tl 'To: KSOS-32 Development Notebook''Date: 20 August 1986'
.sp
.tl 'From: Tom Perrine''Document: K32.86.2      '
.sp
.tl 'Subject: KSOS-32 Bootload Strategy'''
.sp
.tl 'Reference: VAX/VMS Internals and Data Structures, Chapter 24'''
-----------------------------------------------------------------
.fi
.sp
This memo describes the KSOS-32 bootload strategy with respect to the
KSOS-32 goals, the KSOS-11 bootload strategy and licensing
considerations.
.sp
For a detailed discussion of the VAX/VMS bootload sequence and the
hardware environment, see
.ul
VAX/VMS Internals and Data Structures,
Chapter 24, pp. 521 ff. The following discussion assumes familiarity
with this reference.
.sp
The BSD UNIX bootload sequence is similar to the VMS mechanism,
although it uses its own primary bootstrap program instead of VMB.EXE
(the VMS primary bootloader).
.sp
KSOS-32 should use the VMB.EXE primary bootloader for several reasons:
.sp
.in +7
.ti -2
*\ it is distributed by DEC with every VAX CPU;
.ti -2
*\ its semantics are well-known and any future changes are extremely
likely to be backwards-compatible;
.ti -2
*\ its use precludes the need to write a new primary bootloader (at
least at this time).
.in -7
.sp
VMB.EXE uses the contents of general purpose registers R0-R5 to find
the next program to be loaded. This information is summarized in the
Reference, pp. 536-537. For KSOS-32 the "next program" is the KSOS-32
"level 0 bootloader," which is located in block 0 of the boot device
(not the console floppy).
.sp
Using this information and our current configuration, we can determine
the appropriate contents of the registers and write a CMD file to
boot from RM05 drive, logical block 0:
.sp
.nf
! $Header:$
! K32BOO.CMD	BOOT KSOS-32 FROM DISK DRIVE 1
SET DEF HEX
SET DEF LONG
SET REL:0
HALT
UNJAM
INIT
D/I 11 20003800	! set up SCBB
D R0 0			! MASSBUS drive
D R1 8			! NEXUS (TR) 8
D R2 1			! DRIVE 1
D R3 1			! DRIVE 1
D R4 0			! BLOCK 0
D R5 8			! SOFTWARE FLAGS
D FP 0			! MACH CHK not expected
S 20003000	! START ROM PROGRAM
WAIT DONE
E SP			! Display loc+0200H of good mem
LOAD VMB.EXE/S:@
START @
.fi
.sp
Note that the Stack Pointer (SP) register will contain the address
(+0200H) of a block of 64K bytes of known-good memory, as determined
by the hardware boot ROM. This will normally be 0200H, as the memory
is almost always OK (and MUST be, for KSOS-32).
.sp
The level 0 bootloader is a small (<512 bytes) program, written in VAX
assembler, which must locate, load and start execution of the next
program, the KSOS-32 "level 1" bootloader.  The level 1 bootloader
will come from the same disk as the level 0 bootloader.
.sp
At this time, the size and location of the level 1 bootloader is
subject to change. However, it can be noted that on KSOS-11, the level
bootloader is written in "C", has a maximum size of 8K bytes, and
starts at block 20 (decimal) on the disk. For KSOS-32, the level 1
bootloader *may* be written in Modula-2.
.sp
Note: Any changes to the size or location of the bootloaders must be
accounted for in the EXTENT MAP (KSOS-32 documentation pending.)
