11.2.2.1 MMC/SD Boot Detailed Flow
www.ti.com
ARM ROM Boot Modes
The MMC/SD User boot loader UBL descriptor format is described in
Table 11-4. MMC/SD UBL Descriptor
Page 0 Address
32-Bits
Description
0
0xA1AC EDxx
Magic number (0xA1ACEDxx)
4
Entry Point Address of UBL
Entry point address for the user boot-loader (absolute address)
8
Number of blocks in UBL
Number of blocks (size of user boot-loader in number of blocks)
12
Starting Block # of UBL
Block number where user boot-loader is located
Table 11-5. MMC/SD UBL Signatures and Special Modes
Mode
Value
Description
UBL_MAGIC_SAFE
0x A1AC ED00
Safe boot mode
UBL_MAGIC_IC
0x A1AC ED22
I Cache boot mode
An overview of the MMC/SD Boot process is shown in the flow chart in
and exemplified in
. The following steps describe the MMC/SD Boot process:
•
There are two instantiations of the MMC/SD Controller in the device: MMCSD0 and MMCSD1.
MMC/SD boot shall use only MMCSD0.
•
Initialize the stack in the upper 2K of RAM1 in IRAM (RAM1 ' 0x7800-0x7FFF). Do not use the last
32-bits of IRAM (0x7ffc-0x8000) for stack, since these will be written with the block number
corresponding to the valid block number.
•
Disable all interrupts, IRQ and FIQ
•
Read CID and CSD registers of MMC/SD and initialize the MMC/SD module in Native mode.
•
Search for the magic number in the UBL descriptor starting in block 0 (see
). The magic
number is of the format 0xA1ACEDxx and is in the first 32-bits of the block. CRC error detection shall
be enabled when reading the UBL Descriptor. If a CRC read error is detected or the magic number is
not valid, the descriptor search process shall begin anew in the next block after that in which the UBL
descriptor was just searched for up to the first 24 blocks. When a valid UBL signature is found, the
corresponding block number (from 1 to 24) shall be written to the last 32 bits of ARM internal memory
(0x7ffc-0x8000). The UBL Descriptor provides the needed details of the user boot-loader. See Figure 6
and Figure 7 for details of the UBL Descriptor. The UBL Descriptor consists of the following
parameters (all UBL parameters are 32-bits wide):
–
Entry Point Address: absolute entry point AFTER loading UBL
•
Must be in range 0x0020 - 0x781C
–
Number of MMC/SD blocks in UBL:
•
Must be contiguous blocks
•
Total bytes must be less than or equal to 30KByte total (size of IRAM - ~2KB stack space)
–
Number of MMC/SD blocks in UBL:
•
Cannot be same block as UBL Definition
•
Copy the User boot-loader from MMC/SD to IRAM with hardware CRC error detection enabled. If a
CRC read error is detected, the descriptor search process begins anew in the next block after that in
which the UBL descriptor was found for up to the first 24 blocks. Detected CRC errors will not be
corrected. If no valid magic number is found after searching 24 blocks, MMC/SD boot will be tried.
•
Give control to User boot loader at UBL Entry Address.
SPRUFX7 – July 2008
Boot Modes
161