This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM6422: Clarification on ROM BOOT processing

Part Number: AM6422
Other Parts Discussed in Thread: CSD

Tool/software:

We are booting our am64x device from either SD card or from eMMC, and have realised that we are possibly not using the bootmode pins correct.

For SD boot, we set BOOTMODE[9:3] = 1011000; and for eMMC boot we set BOOTMODE[9:3] = 0011000.

With this setting, we are able to boot in either fs *or* raw mode, and in the raw mode, the 'backup' area is used if there is an error in the 'primary' read.

We think this applies to both SD and eMMC boot, though we tend to use fs mode on the SD card and raw mode on the eMMC.

However, "Table 4-4. Primary Boot Mode Selection" plus "4.4.4 eMMC Boot" in the TRM seem to suggest that we ought to also be changing BOOTMODE[7] to explicitly select 'raw' mode when using the eMMC.

So is there an 'auto-sense' kind of logic in the ROM code that first tries 'fs' mode, and then tries' raw' mode - or have we confused ourselves ?

We have also tried configuring the eMMC device to use the boot0 and boot1 partitions are boot sectors, expecting to find that the am64x would still boot with fallback to the 'backup' offset on error, but that is not happening (again, we may be making mistakes on our end) - but without knowing more about the ROM interaction with the eMMC, we are guessing what the 'correct' behaviour should be.

Regards,

David

  • The query has been assigned to the expert. Please expect a response in a day or two.

    Thanks!

  • I think what is not apparent is that if the ROM fails to boot in fs mode, it will also fallback to try in raw mode.  This is probably why you can successfully boot in either mode when selecting fs mode.  And furthermore, the fallback with try both the primary and backup locations for the raw image.  There is not really any 'auto-sense' logic, this is just the sequence that the ROM attempts (ie, if fs is selected by the boot pins, the sequence will be fs->raw primary->raw redundant)  

    You are correct that the above applies to both SD and eMMC boot in UDA mode.   

    Note that there are 2 eMMC boot modes:

    -eMMC boot in UDA mode: this uses filesystem/raw mode in the user data area

    -eMMC boot (alternate): this uses the boot partitions in the eMMC device (raw mode only)

    When using the boot partitions, you have to choose which partition to boot from using the EXT_CSD register on the card.  ROM will only try to boot from either partition, it doesn't have the feature to try from one partition, and then try from the other partition if that fails.  Also, there is no "redundant" image capability when using eMMC boot partitions.  So if the ROM fails to boot from the initial boot partition, there is no "fallback" or retry as described above in the SD or eMMC (UDA mode) boot modes.  The ROM will just move on to the backup boot mode as defined by the boot pins.

    Regards,

    James

      

  • Hi James,

    Many thanks for the swift and clear response.

    We had guessed that this was the case, but as it wasn't spelt out quite as clearly in the TRM, we weren't sure we could rely on the behavior staying unchanged in the future.

    This reply puts all doubts to rest, thank you.

    Regards,

    David