01 / THE BOOT
Eight steps
to a prompt.
Three programs run in turn: the boot PROM loads the microcode, the microcode brings back a Lisp world, and the microcode then enters one Lisp function, which does the rest.
01
The machine is told to boot.
At power-on, by the boot button, or from the keyboard: holding both Control keys and both Meta keys and pressing Rubout cold-boots a CADR, and Return in place of Rubout warm-boots it. The keyboard itself recognizes the keys and sends a boot code. The processor starts in its boot PROM; on QUUX, whose PROM has control store addresses of its own, a reset starts it there.
02
The boot PROM tests and clears.
It tests the hardware a bit at a time — the ALU’s carries, the byte hardware, the scratch memories and the PDL buffer — because a fault found here is better than a world that boots wrong. Then it clears the processor’s memories and both levels of the map, so that their parity is good.
03
It loads the microcode.
The disk names its current microcode partition: the CADR’s in a label in its first block, QUUX’s with an attribute bit in a GPT partition table. The partition is a series of sections — the microinstructions for the control store, the dispatch memory, a part of main memory, and the scratch memories — and the PROM loads each where it belongs. Then it jumps to location 6 of the new microcode, where both programs keep the same small loop, so the handover happens in the middle of it.
04
The microcode decides: cold or warm.
It reads the keyboard. A warm boot keeps the Lisp world already in virtual memory. A cold boot brings back a band: the microcode sizes main memory, finds the paging partition and the band on the disk, and sets up the map; QUUX’s microcode first asks which machine it runs on.
05
The band becomes virtual memory.
A band is a saved Lisp world, and loading one does not mean reading it into main memory. It is copied into the disk’s paging partition, which becomes the backing store of virtual memory; only the few pages that must always be in memory are read in, and everything else arrives later, a page at a time, when it is first touched.
06
Lisp starts.
The microcode copies a few values out of the band into its own registers, among them the function to start with, LISP-TOP-LEVEL. It builds one stack frame for that function by hand and falls into its main instruction loop. Nothing jumps to an address in the band: the first macroinstruction the machine executes is that function’s call to LISP-REINITIALIZE.
07
The system initializes itself.
LISP-REINITIALIZE resets the system’s state and runs its lists of initializations. Among them the process system makes the scheduler and the initial process and turns on the clock’s sequence breaks, and the window system leaves the first Lisp Listener on the screen and selected.
08
The herald, and the listener.
It prints the herald: the site, which band is running, the physical and virtual memory, and the version of each system loaded. Then the initial process runs the Lisp Listener’s loop: it reads a Lisp form, evaluates it and prints the value, and waits for the next.
A warm boot takes the same path from the microcode’s start and enters the same function, which is why it keeps the world and loses what was on the stack; the process that was running is reset, or stopped so that it can be examined. MIT’s own comment on it: “WARM BOOTING IS STRONGLY DISCOURAGED.”