prom − general features of the prom monitor The prom monitor resides in PROM on the R2300 cpu board and is transfered to on system reset. The prom monitor is responsible for initializing the R2000 processor, the R2350 private memory boards, and the R2300 cpu board. The R2000 processor is initialized by initializing the system coprocessor status and cause registers, and flushing the translation buffer. The R2350 memory cards are initialized by probing to determine how many cards exist, determining the best memory interleave configuration, configuring the boards for refresh slot assignment and assigning base addresses. The R2350 memory cards are programmed to respond to access via both the private and VME memory buses. The R2300 cpu board is initialized by sizing and flushing both the instruction and data caches, inspecting the contents of non-volatile memory and reinitializing it if necessary, and initializing environment variables from non-volatile memory. The prom monitor uses system memory between physical address 0x500 and 0x10000. The include file "prom/entrypt.h" describes conventions for memory use by standalone programs. The prom monitor maintains a number of "environment variables" that are passed to booted programs and function like the environment variables of the UNIX shell. Certain of these environment variables affect prom monitor operation and are maintained in non-volatile memory so they presist across power up/down cycles and system resets. These special environment variables are: lbaud The baud rate for tty(0) which is uart A on the R2300 cpu board and typically the local console. lbaud may be set to any one of: 75, 110, 134, 150, 300, 600, 1200, 1800, 2400, 4800, 9600, or 19200. If an illegal baud rate is specified, 9600 baud is used. rbaud The baud rate for tty(1) which is uart B on the R2300 cpu board and typically the remote console. rbaud may be set to any one of: 75, 110, 134, 150, 300, 600, 1200, 1800, 2400, 4800, 9600, or 19200. If an illegal baud rate is specified, 9600 baud is used. netaddr The inet address for the node. This is used by the boot file service software in the standalone library. console This variable selects which console devices are to be considered consoles on power-up and after resets. When set to ’l’ (ell), only tty(0) is initially enabled as a console, if console is ’r’, then both tty(0) and tty(1) are enabled as consoles. Consoles may be enabled and disabled by command after a reset, see bootmode This variable controls the prom monitors action in response to system resets. If bootmode is ’m’, the prom monitor enters command mode after a reset. If bootmode is ’c’, the prom monitor performs a cold boot. A cold boot consists of loading the file specified by the environment variable "bootfile" and passing it the argument "-a". Typically, the bootfile is the standalone shell. The standalone shell interprets the "-a" flag as a request to load the operating system as specified in the volume header of the device from which sash itself loaded. If bootmode is ’w’, the prom monitor attempts a warm boot on reset. A warm boot is transferring control to an memory image loaded before the system was reset. The prom monitor determines if such an image is present by looking for a properly formatted "restart block", see If either no restart block is found, the restart block is incorrectly formatted, or a warm boot has already been attempted with the restart block, then a cold boot is performed. If bootmode is ’d’, the prom enters diagnostic mode on reset. Diagnostic mode operates like command mode (’m’) with the exception that the monitor attempts to preserve memory contents across resets. The prom monitor initializes both the non-volatile ram and the time-of-day clock that resides in the 146818 real time clock chip on the R2300 cpu board. A single location in non-volatile ram location on this chip is reserved to indicate to operating system kernels whether the time-of-day clock is valid. This location is defined as "NVADDR_STATE" in the prom include file "prom.h". NVADDR_STATE is an offset relative to the general purpose nv ram on the 146818. Two bits are defined in this byte location to indicate the validity of the time-of-day clock and the rest of non-volatile ram. "NVSTATE_TODVALID" is set if the prom considers the time-of-day clock valid and clear otherwise. "NVSTATE_RAMVALID" is another bit in the NVADDR_STATE location that is used internally by the prom monitor, and generally not of interest to the operating system. The operating system can verify if the time-of-day clock is valid by checking that the "VRT" bit in register D of the 146818 real time clock is asserted and the NVSTATE_TODVALID bit is set in the non-volatile ram location NVADDR_STATE. Note that reading register D of the 146818 sets VRT, so this bit is "read-once". If either of these bits are not set the operating system should correctly set the time in the 146818 and then "or" NVSTATE_TODVALID into location NVADDR_STATE in the non-volatile ram. Note that both the prom monitor and MIPS kernels use the time-of-day clock to maintain time as the number of seconds from the beginning of the current year. To calculate seconds from the beginning of the year the time-of-day clock is always set to some date in the year 1972 and the offset in seconds is calculated from this base. The baud rate for tty(0) and tty(1) may also be cycled among the baud rates, 110, 300, 1200, 2400, 4800, 9600, and 19200 baud by entering a BREAK. Baud rates changes made by BREAK’s are temporary until the next reset or until a new program is loaded. To permanently change the baud rate, change either the lbaud or rbaud environment variable as appropriate. If the prom monitor is presented a command that is not a built-in command, the monitor will use the first word of the command as the name of a file and attempt to boot that file passing any other arguments on the command line onto the booted program. If the environment variable $path is not defined, the first word of the command must be a complete file name specification consisting of a device name, controller, unit, partition fields as necessary, and a file path. If the environment variable $path is defined, the prom monitor will attempt to boot the program file formed by prepending the contents of $path to the original file name. If $path is a list of space separated prefixes, the prom monitor will try each prefix from $path in turn until the file can be successfully booted or all prefixes have been tried. intro(1spp), sash(1spp), dbgmon(1spp)