The banks folder contains definitions of the system image memory banks.
A system image memory bank is specified by an object of the type Bank. The following fields of a Bank object are defined in a target.xml file:
addr is an integer specifying the address at which the memory bank must be installed (burned or downloaded) during the system deployment process. Usually the address is physical on PowerPC and x86 systems and virtual in UltraSPARC systems.
size is an integer specifying the maximum size of the memory bank.
ram is a boolean specifying whether the bank occupies RAM at installation.
If the value of ram is true, mkimage determines the portion of the system RAM that the memory bank image will occupy after installation, and tags that RAM as PH_ALLOCATED in the initial state of the RAM allocator.
If the value of ram is false, the bank has no impact on the initial state of the RAM. For example, the value of ram must be false if the memory bank is to be burned in ROM.
The default value of ram is true.
The board-specific configuration can define any number of memory banks. A board-specific configuration must define a Bank object named sys_bank.
For example, the SBC8260 board-specific configuration defines two memory banks trampoline_bank and sys_bank.
trampoline_bank will contain the power-up initialization (trampoline) program (see "Power-up Program Implementation"). sys_bank will contain the remains of the system image.
Example 5-2 is an extract of the SBC8260 board-specific configuration file, and defines the trampoline_bank and sys_bank objects.
<folder name='Banks'> <description>system image memory banks</description> <definition name='sys_bank'> <description>default system image memory bank</description> <condition> <equal><var name='BOOT_MODE' /><const>RAM</const></equal> </condition> <type name='Bank' /> <value field='ram'><true /></value> <value field='addr'><const>0x00100000</const></value> <value field='size'><const>0x00f00000</const></value> </definition> <definition name='trampoline_bank'> <description>memory bank for a 'trampoline' (eg. power-up) binary</description> <condition> <equal><var name='BOOT_MODE' /><const>ROM</const></equal> </condition> <type name='Bank' /> <value field='ram'><false /></value> <value field='addr'><const>0xfff00000</const></value> <value field='size'><const>0x00001000</const></value> </definition> <definition name='sys_bank'> <description>default system image memory bank</description> <condition> <equal><var name='BOOT_MODE' /><const>ROM</const></equal> </condition> <type name='Bank' /> <value field='ram'><false /></value> <value field='addr'><const>0xfff01000</const></value> <value field='size'><const>0x000ff000</const></value> </definition> </folder>
Two bank configurations are provided. The first configuration is used when the system is configured to boot from ROM. This configuration is selected when the value of the BOOT_MODE configuration variable is set to ROM. In this case, trampoline_bank will start at the address 0xfff00000 and can contain up to 4K bytes, sufficient for thetrampoline program to run. sys_bank starts immediately after trampoline_bank at the address 0xfff01000 and it can contain up to 0xff000 bytes.
The second configuration is used when the system is configured to boot from RAM. In this case, trampoline_bank is not defined. sys_bank starts at the address 0x00100000 and it can contain up to 0xf00000 bytes. The RAM occupied by the bank will be tagged as allocated when the initial state of the RAM allocator is generated, because the value of the ram field is true.