T1022 Secure Boot

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

T1022 Secure Boot

2,336 Views
tschutte
Contributor III


So After being able to get the secureboot process working on a P4080, I am trying to set things up on a T series processor.

Here is what I have so far:

Created OTPMK and programmed, Created SRKH and programmed, Checked for OTPMK errors - none found - before moving onto setting up the RCW.  In the RCW; set SB_EN bit, created LAW (Based on working LAW from p4080, addr is known to be in first 3.5Gb, set SCRATCHRW1 with location of CSF. Sign U-Boot with CST 2.0, and program board with U-boot and CST at addresses.  Currently the board goes into a machine check (0x1 in SCRATCHRW2) so I think there might be an issue with a PBL / RCW command I am issuing. But looking at example ESBC LAW's from SDK 2.0 doc and prior I look to be doing things correctly.  Is there something else I may be missing?

Labels (1)
Tags (1)
0 Kudos
10 Replies

1,288 Views
bpe
NXP Employee
NXP Employee

Error 0x1 is reported only for machine checks. Try reading registers

mentioned in 13.3.1.3.2 of T1040RM to determine where it occurs.

Make sure  SCRATCHRW1 and CSF header contain valid addresses.

SDK 2.0 provides a working secure boot scenario for T1042RDB. If you

are working with the RDB, try it first. If you are working with a

custom board, study the existing configuration and make minimum required

changes.

Detailed instructions can be found here:

https://freescale.sdlproducts.com/LiveContent/content/en-US/QorIQ_SDK/GUID-038CFEAB-F051-46F9-94E6-F...


Have a great day,
Platon

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

0 Kudos

1,288 Views
keithartel
Contributor I

Hi, I'm picking up the work Tom was doing with Secure Boot on the T1022.  I can get secure boot working as a monolithic secure boot, but I'd like to know how to use secure boot with stages.  How does the ESBC Boot script get kicked off?  I'm trying to figure out what I need to configure in order for the boot script to be implemented. 

Also, the documentation says that the boot script validates 3 additional images.  Does it have to be 3?  Can it be less?  For example, I'm working with VxWorks, and I only have two additional images - the DTB and the kernel.  How would I write the script in that case?

Thanks,

Keith

0 Kudos

1,288 Views
ravirajaram
Contributor I

Hi Keith,

You mentioned that you were able to get past the original problem (0x01 in SCRATCHRW2 indicating Critical Exception during ISBC Phase) on your system. May I know what the root cause of the exception was and how it was fixed on your system?

Thanks & Regards,

Ravi.

0 Kudos

1,288 Views
keithartel
Contributor I

The root cause of my issue was that I ran into an erratum where I was booting my U-Boot from NOR flash with the RCW stored in a non-NOR flash source.  The erratum is specific to this particular scenario.

 

If you want more details on the erratum, you'll need to contact NXP since I'm not an employee of NXP.

0 Kudos

1,288 Views
bob_behrooz
NXP Employee
NXP Employee

Hi Keith, 

Could you please identify the erratum number or specifics of the erratum that affected you? I reviewed T1040 Chip Erratum Rev. 5, 12/2017 and can not find an erratum that matches your description. 

Regards, 

Bob 

0 Kudos

1,288 Views
keithartel
Contributor I

Bob,

 

The erratum that was pointed to me A-009950 that is in the LS2080A and LS2040A Chip Errata document titled "IFC is not automatically initialized according to RCW[FLASH_MODE] if IFC is not the RCW source".

 

My NXP Field contact at the time told me that this erratum was discovered after the last errata was published but it does apply to the T1022.  Once I apply that erratum fix, I can get Secure Boot working.

 

I found that I also need to do this on a T2080 and other Trust Architecture 2.0 products as well, as most of my company's products have the RCW in SPI flash while our U-Boot is in NOR flash.

 

Keith

0 Kudos

1,288 Views
ravirajaram
Contributor I

Hi Keith,

Thanks a lot for your inputs and sharing the details of the fix. Bob provided a RCW/PBL image with this workaround and it seems to get past the exception issue now.

Regards,

Ravi.

0 Kudos

1,288 Views
ravirajaram
Contributor I

Hi Keith,

Thanks for your response. The system I am working on has a similar scheme - u-boot in NOR and RCW in non-NOR flash source. I will contact NXP support to check if this erratum applies for the scenario I have.

Thanks again.

Regards,

Ravi.

0 Kudos

1,288 Views
keithartel
Contributor I

I'm guessing it will.  I was told that it applies to all Trust Architecture 2.0 products.  I've only tried this on a T1022 and T2080, and both needed this erratum.

0 Kudos

1,288 Views
tschutte
Contributor III

0x1

ERROR_MACHINECHECKMachine check Exception

is the error in SRATCHRW2 specifically.... While I can set SB_EN to 0 and boot just fine, the second that bit is flipped I get nowhere... Thoughts?

0 Kudos