Question regarding bootROM in i.MX6 devices

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Question regarding bootROM in i.MX6 devices

3,567件の閲覧回数
enriqueencarnac
Contributor II

Dear support,

Today, with our i.MX6 platform, we have both eMMC and SPI NOR attached and configurable as bootable media based on boot time pin-strap configuration.

 

What I'm wanting to do is have a copy of the bootloader in eMMC and a copy of the bootloader in SPI NOR and have the bootROM normally boot to the bootloader in eMMC unless the bootloader "fails" to boot for some reason (such as the binary being corrupted or missing) and at that point switch over to attempting to boot from SPI NOR.

 

I've read through the i.MX6 docs and it seems like this may be possible but it is not entirely clear.  In the i.MX6 reference manual, I see reference to a "RECOVERY DEVICES" in section 8.9 of the reference manual.  The manual states that if the primary boot device fails, the bootrom will attempt to boot from the recovery device using one of the I2C or SPI ports.

 

What's not clear to me is what constitutes a "primary boot device failure".  Is it possible for the bootram to support this recovery feature without using HAB or is it required that I use HAB, thus allowing the bootrom to validate the bootloader before booting it?

 

Can you point me to some documentation provide details on how I can learn more about how to get this recovery boot functionality working?

ラベル(1)
タグ(1)
0 件の賞賛
返信
4 返答(返信)

2,571件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Enrique

"primary" means boot from boot pins (fuses) and "recovery" mode does not

depends on hab. Additional details can be found in Figure 8-1. Boot Flow,

sect.8.5.3.5 Redundant Boot Support for Expansion Device i.MX6DQ Reference Manual
http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf

Unfortunately I am not aware of additional documentation for that.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 件の賞賛
返信

2,571件の閲覧回数
chrishealy
Contributor I

Hi Igor,

I've looked at section 8.5.3.5 and what is not clear to me is what constitutes a failure.  Said another way, how does the bootrom know that the code (bootloader) it jumped to did not fail and it should not perform a SW reset?

0 件の賞賛
返信

2,571件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Enrique

"failure" may be any hardware error, for example bad signal integrity (as CRC error)

or incorrectly connected/powered emmc. Also one can check sect.67.4.2.4.3 ADMA Error

sect.67.5.1 Command Send & Response Receive Basic Operation, sect.67.5.3.5 Transfer Error

i.MX6DQ Reference Manual

Best regards
igor

0 件の賞賛
返信

2,571件の閲覧回数
wb_CN
Contributor II

Hi Igor,

Can you help to confirm when HAB authentication fails, the boot ROM of i.MX6SL will eventually jump to recovery SPI NOR flash? Or it just stuck there forever?

My evaluation on i.MX6SLEVK shows that it would stuck there, this is contradictory with what the "High level boot sequence" has illustrated.

Details:

1.  My intention is to use SD card as primary boot device, use HAB to check the data integrity of u-boot on SD card, if authentication fails, boot ROM should jump to SPI NOR;

2. The setup, note the "EEPROM Recovery Enable" bit is 1;

i.MX6SLEVK;

SW3/BOOTCFG1_0~7: 0000 0010

SW4/BOOTCFG2_0~7: 0011 0100

SW5/BOOTCFG4 _0~7: 00010010

3. The problem:

- Managed to go through the workflow of generating keys, burning the SRK fuses, compiling the HAB u-boot.imx, and then flashed the SD card and on-board 4MB NOR flash, and then "close" the SEC_CONFIG for HAB. Verified HAB works fine:

=> hab_status

Secure boot enabled

HAB Configuration: 0xcc, HAB State: 0x99
=>

- But I found the yellow path doesn't work.  If I modify 1 bit in the u-boot image then flash it into SD card, then turn on the power switch, the board will get stuck forever, with nothing shown-up on serial console;

- Only the red path works, meaning I have to unplug the SD card then toggle the power switch of the EVK, then the boot ROM can jump to the SPI NOR to boot;

recovery_boot_not_work_with_HAB.png

0 件の賞賛
返信