Also OCM provides 256K of ram. The TRM states that the BootROM memory is not visible to the user. OCM is initially mapped into two areas of the address map. 192K sits at address zero and the other 64K sits at the highest memory addresses. Initially the high memory is used by the bootROM, but once the first stage loader has been moved to OCM and transfered to, this may be used. The address mapping may then be flipped so that all of OCM is mapped to the highest addresses as a contiguous 256K section, i.e.
0xffc0000 to 0xffffffffStatements are made that the OCM is designed to support the full clock rate of the processor (667 Mhz), so perhaps the BootROM sets up the clock to run at the full rate.
After reset, CPU0 runs BootROM code and CPU1 executes the WFE instruction. As they say, CPU1 "parks itself" using the WFE instruction. The BootROM looks for a Boot Image Header on the boot device, and then loads a FSBL (first stage boot loader) into OCM and branches to it.
The chip can boot from several devices, as per jumper settings
I'll note that my flash image begins with
00000000 feff ffea feff ffea feff ffea feff ffea 00000010 feff ffea feff ffea feff ffea feff ffea 00000020 6655 99aa 584e 4c58 0000 0000 0000 0101 fU XNLX 00000030 0017 0000 1080 0100 0000 0000 0000 0000 00000040 1080 0100 0100 0000 2045 16fc 0000 0000 E 00000050 0000 0000 0000 0000 0000 0000 0000 0000 00000060 0000 0000 0000 0000 0000 0000 0000 0000 00000070 0000 0000 0000 0000 0000 0000 0000 0000 00000080 0000 0000 0000 0000 0000 0000 0000 0000 00000090 0000 0000 0000 0000 c008 0000 800c 0000Note that feffffea can be viewed a a little endian 32 bit object, in which case it becomes 0xeafffffe. Note that this is repeated 8 times. What this is is 8 "boot vectors" and this is the ARM "jump to self" instruction being loaded into each of them (i.e. a single instruction "spin" loop).
The boot header is described in the TRM in section 6.3.2. The 8 vector entries are noted
Indeed, inspection of the image shows code starting at 0x1700. The length is well under the limit of 192K (196,608 bytes).
Here is the image header:
000008c0 0000 0201 0300 0000 2003 0000 4002 0000 @ 000008d0 0000 0000 ffff ffff ffff ffff ffff ffff 000008e0 ffff ffff ffff ffff ffff ffff ffff ffff 000008f0 ffff ffff ffff ffff ffff ffff ffff ffff
00000c80 0460 0000 0460 0000 0460 0000 0000 0000 ` ` ` 00000c90 0000 0000 c005 0000 1000 0000 0100 0000 00000ca0 0000 0000 4002 0000 0000 0000 0000 0000 @ 00000cb0 0000 0000 0000 0000 0000 0000 e2d7 feff
Tom's Computer Info / [email protected]