DBLX Users guide
Stig Telfer, Alpha Processor Inc, 7 February 2001
DBLX is the concept where the booted kernel is ROM-resident. The hardware and software environment required by a booting kernel is configured and prepared by the Alpha Diagnostics. A familiarity with using Diagnostics to upgrade firmware and change environment variables is required for using DBLX.
In order to reconfigure a system to use DBLX, significant sections of the ROM must be reflashed. This can be achieved in one of several ways:
In addition to upgrading the firmware, some environment variables will need adjusting to exploit all the features of embedded boot.
Platforms supported by this release:
The firmware map can be fairly flexible, with some exceptions. Firstly, the System NVRAM and System Log are at fixed addresses in the ROM and cannot be changed. Secondly, Alpha Diags must be the first image found in the ROM in order for the system to boot when the FSB jumper is set. Also, a second copy of Alpha Diags must be the next image in the ROM for the system to boot when the FSB jumper is removed. (note: System NVRAM and System Log are not counted as firmware images).
If space is at a premium, the second copy of Alpha Diags may be sacrificed but this means the system will not boot unless the FSB jumper is in place. A side-effect of this is that the FSB jumper overrides any auto-boot action on power-up.
Below is the suggested layout as used in development:
ROM base address | Size | Contents |
0x000000 | 256KB | Alpha Diags image |
0x050000 | 64KB | System NVRAM |
0x060000 | 256KB | Second copy of Alpha Diags |
0x0A0000 | 64KB | Embedded OSF PALcode |
0x0B0000 | variable | Embedded Linux kernel |
0x1F0000 | 64KB | System Non-volatile Log region |
UP2000 and UP2000+ systems are shipped with the Debug Monitor (DBM) firmware instead of Alpha Diags
Start the debug monitor by putting a jumper on pin 1 of jumper block J29k (this is by the floppy cable connecter with pin 1 towards the IDE cable)
Put the diags.rom image onto a DOS-format floppy in the disk drive.
Run the command:
flload diags.rom 800000
This command will load the new ROM image into memory at 8Mbytes (in hex). Note the size of the loaded file in hex, which will be printed out on completion.
Run the command below to flash into address 0 in the ROM:
help flash <- confirm the order of the arguments flash 800000 0
DBM will ask you to confirm that you will be overwriting sectors 0-3 of the ROM. (if it doesn't say this, cancel and consult the on-line help!).
Once the diags.rom image is flashed into the ROM, reset the machine to start Diags and continue the upgrade process as described below.
When the FSB jumper is in place (pin 1, jumper block J29, as described above) and Diags is flashed into the firmware, Diags will start directly into the flash firmware management utility.
This utility can be used to perform the rest of the upgrade.
The embedded boot kernel needs to have parameters passed to it giving essential details, such as the location of the root filesystem. There are two approaches that may be used to achieve this.
To boot a kernel interactively requires several short steps. Starting from the Diags main menu screen, the steps are:
Bring the secondary processor(s) (if in an SMP configuration) on-line and ready for booting. | |
linux | Start the embedded bootloader. Choose 'r' to perform a ROM-based boot. Alternatives include downloading the kernel and PALcode over serial cable or loading the two files (as raw images or gzipped, not .rom images) from a DOS-format floppy. |
Kernel boot parameters | Enter boot parameters for the loaded kernel when prompted, for example "root=/dev/sda2 console=ttyS0,115200". |
The kernel can be automatically configured and started on powerup by setting some NVRAM values. This does not work if the FSB jumper is set. This is because the FSB jumper must always override an automatic action in case a bad or mis-configured kernel has been installed. For automatic booting on UP2000(+), two copies of Alpha Diags must be flashed into the ROM as described above. The first image is loaded when the FSB jumper is present. The second image is loaded when it is absent.
The key command is 'nvram'. This command presents the configuration options used by console firmware. In this release, an auto-boot is started by setting the diags_action variable to execute the linux command.
A default boot device (normally the rom) is set using the bootdef_dev variable. A setting of 'rom' will use the ROM for its boot images. [Note: in previous releases, the required setting was /dev/krom]
The kernel boot parameters are stored in the variable boot_osflags. The last-used set of kernel boot parameters are automatically stored by diags in the variable booted_osflags (this is used for reboot requests).
The ROM has room typically for a small initial ramdisk (InitRD). This can be used to contain a compact embedded filesystem, which may enable some small applications to become totally independent of any boot devices beyond the firmware.
The DBLX kernel must be built with initial ramdisk support.
To boot an InitRD directly from the ROM, it must first be flashed into the ROM. This is done in the usual way, using the flash command.
The normal format for InitRD - a (usually gzipped) filesystem image - must first have a ROM header of the appropriate type added to it (to do this, see makerom). Then it can be put into the ROM, if sufficient space is available.
Using Diags, the 'nvram' command can set variables to tell Diags and Kernel to look for an InitRD.
Once the InitRD ROM image is flashed into the ROM, and the correct environment variables are set, the DBLX kernel can be booted with InitRD enabled and loaded using the linux command. Loading of InitRD will follow the loading of Kernel and PALcode.
In the production environment, and for other specialised purposes, it may be desirable to load a new firmware image (such as SRM console) without flashing it into memory. Normally, this is easily achievable using a serial cable, but in some circumstances that is not practical, for example when using a large cluster of machines.
To this end, there is the BootMem functionality. BootMem reserves some DBLX kernel memory and presents the user with a device which can be used to put ROM images into that memory. Then, on shutdown the memory is checked for valid ROM images, and if one is found it is started.
The bootmem process is enabled and configured using environment variables:
Once the BootMem variables have been configured, a DBLX kernel should be booted. A super-user can then insert the bootmem module. A character device is registered. The major number of that device is dynamically assigned. It is given in the syslog messages, and also in the file /proc/devices.
The next stage is to create a character special file with matching major number. This is done using the mknod command:
mknod /dev/bootmem c major-number
Once the character device file has been created, the BootMem firmware file (typcically with a .rom extension) can be loaded thus:
cat firmware.rom > /dev/bootmem
The success or failure of the operation will be reported in the syslog messages, typically recorded in the file /var/log/messages.
The final step is to halt the OS. When Diags reenters it will detect the BootMem image and start it.
An extension to the ROM-in-RAM process allows new DBLX images to be loaded without requiring reflashing first. This may be useful, for example when testing a new experimental DBLX kernel.
DBLX images are handled differently to normal firmware, because they depend on each other (InitRD requires kernel, and kernel requires PALcode etc.), and a significant amount of machine setup is required before they can run. Diags is capable of recognising new DBLX images, and handling them with the differences that they require. The end result is that when a DBLX component is loaded into BootMem, it takes precedence over the image in the ROM, but any DBLX dependencies not satisfied by BootMem fetched from the ROM.