|
<< Click to Display Table of Contents >> Navigation: ASA-EMulatR Reference Guide > Introduction > Architecture Overview > Chapter 20 – Boot Sequence, PAL, and SRM Integration > 20.9 Boot Sequence |
Before any CPU runs, all global subsystems are constructed: GuestMemory (physical RAM allocated, MMIO regions registered, reservation system initialized), MMIO and devices (ConsoleOPA0Device, ConsoleManager, SRMEnvStore), interrupt infrastructure (IRQPendingState per CPU, IPIManager, IPIMailboxes), PAL infrastructure (PalVectorTable constructed and initialized, all PAL vectors registered), and CPU objects (AlphaCPU instances, pipeline, register files, FaultDispatcher per CPU, HWPCBBank initialized).
CPU 0 begins execution at the RESET vector (PAL_BASE + 0x0000). Initial state: PC = RESET vector | 0x1 (PAL mode), IPL = 7, CM = KERNEL, PAL_BASE = 0x0000000000000000 (per EV6 HRM section 4.1.1). The RESET handler initializes core IPRs, sets up the initial page table base (PTBR), initializes the system control block base (SCBB), and prepares the HWPCB for CPU 0.
PAL code initializes IPRs, TLBs, and caches. Interrupt vectors are configured. The HWRPB (Hardware Restart Parameter Block) is populated with system configuration data (processor type EV6 21264, clock speed, memory size, cache size). Memory regions are established:
GuestMemory routing:
SafeMemory (RAM) 0x0_0000_0000 – 0x1_0000_0000 (4 GB)
MMIOManager (devices) 0x1_0000_0000 – 0x2_0000_0000 (4 GB)
AlphaMemorySystem (PAL) 0x2_0000_0000 – 0x2_0010_0000 (1 MB)
SRMFirmwareRegion (SRM) 0x2_0010_0000 – 0x2_0030_0000 (2 MB)
AlphaMemorySystem (HWRPB) 0x2_0030_0000 – 0x2_0040_0000 (1 MB)
Control transfers to the SRM firmware. SRM performs memory testing, displays system identification (processor type, memory size, cache size, serial number), and enters the interactive console loop. SRM uses CSERVE for all I/O — PUTC/PUTS for output, GETC/POLL for input, GETENV/SETENV for configuration. The console prompt (>>>) indicates readiness for commands.
Key SRM environment variables: bootdef_dev (default boot device), boot_osflags (OS boot flags), boot_file (boot file path), auto_action (automatic boot action), console (console device).
When the user issues a BOOT command (or auto_action triggers automatic boot), SRM loads the primary bootstrap from the boot device, loads the secondary bootstrap, and transfers control to the operating system. The OS then uses CALL_PAL for system services and takes full control of the hardware via PAL.
See Also: Chapter 15 – Memory System Implementation Details (GuestMemory routing); Chapter 16 – Device Model & DMA (ConsoleOPA0Device, SRMEnvStore).