Instruction manual

Example 2 System Firmware Entry Code
if (halt code == powerup)
{
hlt_act = hlt_swx
if (hlt_act == HALT)
halt
else
boot
}
else if (halt code == external halt (HALT button))
halt (enter the console)
else
{
case hlt_act
RESTART:
{
hlt_act = hlt_swx
restart using the address in the HWRPB
}
BOOT:
{
hlt_act = hlt_swx
boot the machine using the default boot device
}
HALT:
{
hlt_act = hlt_swx
halt (enter the console)
}
}
Figure 19 shows the virtual boot address space.
The system software is loaded into region 1 (VA 2000.0000). This region is
large enough to load the system software and three additional pages—one stack
page and two guard pages for the stack. This system software is in most cases
a secondary boot program (APB for VMS) that loads the rest of the operating
system.
The machine is in the following state when control is passed to the system
software:
The HWRPB is located at virtual address 1000.0000; its saved data is
initialized:
KSP = the value of the top of the stack page allocated in region 1
ESP, SSP, USP = UNPREDICATABLE values
PTBR = PFN of the level 1 page table created by the console
ASN = 0
FEN=0
Cycle Counter = 0
ASTSR, ASTEN = 0
Additional initialization must be performed by the system software.
14–10 Powerup Initialization and Firmware Entry