Initialization pairs let you easily initialize Processor Systems (PS) registers for the MIO multiplexer and flash clocks. This allows the MIO multiplexer to be fully configured before the FSBL image is copied into OCM or executed from flash with eXecute in place (XIP), and allows for flash device clocks to be set to maximum bandwidth speeds.
There are 256 initialization pairs at the end of the fixed portion of the boot
image header. Initialization pairs are designated as such because a pair consists of a
32-bit address value and a 32-bit data value. When no initialization is to take place,
all of the address values contain
0xFFFFFFFF, and the
data values contain
0x00000000. Set initialization
pairs with a text file that has an .int file
extension by default, but can have any file extension.
The[init]file attribute precedes the file name to identify it as the INIT file in the BIF file. The data format consists of an operation directive followed by:
- An address value
- an = character
- a data value
.set. operation directive;for example:
.set. 0xE0000018 = 0x00000411; // This is the 9600 uart setting.
Bootgen fills the boot header initialization from the INT file up to the 256 pair limit. When the BootROM runs, it looks at the address value. If it is not 0xFFFFFFFF, the BootROM uses the next 32-bit value following the address value to write the value of address. The BootROM loops through the initialization pairs, setting values, until it encounters a 0xFFFFFFFF address, or it reaches the 256th initialization pair.
Bootgen provides a full expression evaluator (including nested parenthesis to enforce precedence) with the following operators:
* = multiply/ = divide % = mod an address value ulo divide + = addition - = subtraction ~ = negation >> = shift right << = shift left & = binary and = binary or ^ = binary nor
The numbers can be hex (
0x), octal (
decimal digits. Number expressions are maintained as 128-bit fixed-point integers. You
can add white space around any of the expression operators for readability.