The boot header structure struct startup_header is
defined in the include file <sys/startup.h>.
It is 256 bytes in size and contains the following members,
which are examined by the IPL and/or startup code:
- unsigned long signature
- unsigned short version
- unsigned char flags1
- unsigned char flags2
- unsigned short header_size
- unsigned short machine
- unsigned long startup_vaddr
- unsigned long paddr_bias
- unsigned long image_paddr
- unsigned long ram_paddr
- unsigned long ram_size
- unsigned long startup_size
- unsigned long stored_size
- unsigned long imagefs_paddr
- unsigned long imagefs_size
- unsigned short preboot_size
- unsigned short zero0
- unsigned long zero [3]
- unsigned long info [48]
A valid image (for bootable images) is detected by
performing a checksum (via the function call
checksum()) over the entire image, as follows:
checksum (image_paddr, startup_size);
checksum (image_paddr + startup_size, stored_size - startup_size);