Wrong Barker Code in Header Error

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

Wrong Barker Code in Header Error

2,270 Views
brandensherrell
Contributor III

When attempting to Secure Boot I am met with an error when U-boot is loaded:

SEC0: RNG instantiated

PPA validation startedERROR :: 4 :: Wrong barker code in header

SEC_MON state transitioning to Soft Fail.

SEC_MON state transitioning to Non Secure.

Generating reset request

resetting ...

I was surprised the ESBC was executed at all considering it was not validated. What I observe is U-boot being loaded and immediately restarting to the default bank. I do not have time to query the scratch registers, but I imagine them to be written with error code 0x302 indicating the Barker Code was incorrect.

I flashed a RCW with SBEN=1. The source of the RCW includes uboot_hdr_addr.rcw, which simply includes a PBI command:

write 0xee0200, 0x60080000

I can stop the core and query this address and the value is written to this register location, so I know the PBI commands are getting executed.

Capture2.PNG

Also, if I memory dump the 0x60080000 region I see the Barker header as expected.

Capture.PNG

Any ideas?

Labels (1)
0 Kudos
Reply
4 Replies

1,904 Views
bpe
NXP Employee
NXP Employee

Your u-Boot clearly says what is the problem. It attempts to find a PPA
image and fails. PPA concept is described here:

https://freescale.sdlproducts.com/LiveContent/content/en-US/QorIQ_SDK/GUID-0BB77E9F-EE5E-441D-9292-D...


Have a great day,
Platon

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

0 Kudos
Reply

1,904 Views
brandensherrell
Contributor III

This is not obvious from the error messages. The PPA images do not start with a Barker code preamble. There is no mention of a PPA header in any of the documentation I have found. I even have the application note for enabling secure boot on the LS1043ardb and it does not mention it.

After writing the PPA header I am still met with a similar error but no context to which it applies.

SEC0: RNG instantiated

PPA validation startedPPA validation Successful

PPA Firmware: Version 0.2

Firmware 'Microcode version 0.0.1 for LS1021a r1.0' for 1021 V1.0

QE: uploading microcode 'Microcode for LS1021a r1.0' version 0.0.1

PPA validation startedPPA validation Successful

Using SERDES1 Protocol: 5205 (0x1455)

Flash: 128 MiB

NAND:  512 MiB

MMC:   FSL_SDHC: 0

Using default environment

EEPROM: NXID v1

PCIe1: disabled

PCIe2: Root Complex no link, regs @ 0x3500000

PCIe3: Root Complex no link, regs @ 0x3600000

In:    serial

Out:   serial

Err:   serial

SCSI:  Error: SCSI Controller(s) 1B4B:9170 not found

Net:   Fman1: Uploading microcode version 106.4.17

FM1@DTSEC1, FM1@DTSEC2, FM1@DTSEC3 [PRIME], FM1@DTSEC4, FM1@DTSEC5, FM1@DTSEC6, FM1@TGEC1

Hit any key to stop autoboot:  0

ERROR :: 4 :: Wrong barker code in header

SEC_MON state transitioning to Soft Fail.

SEC_MON state transitioning to Non Secure.

Generating reset request

resetting ...

0 Kudos
Reply

1,904 Views
tschutte
Contributor III

Are you sure your CSF is where you expect it to be? Do you use any LAW's that move where your flash is initially? I havent done secureboot on any LS processors, but for the P and T series ones there are LAWs you need to be careful of.

0 Kudos
Reply

1,904 Views
brandensherrell
Contributor III

As it turns out, this new error was related to the header not being present for the bootscript. I was not expecting there to be a requirement of a bootscript because the SDK 0.4 (Latest SDK prior to the recent merge into 2.0 three weeks ago) included a caveat that the Ls1043A-rdb had an elusive bug that forced them to exclude the use of a bootscript for a while; it seems as though this was fixed.

0 Kudos
Reply