U-Boot blob enc/dec command error

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

U-Boot blob enc/dec command error

1,318 Views
yilingxu
Contributor III

I download uboot from uboot-imx - i.MX U-Boot , and the version is rel_imx_4.14.78_1.0.0_ga. I want to try blob enc/dec command in uboot.

My .config is set as follow:

CONFIG_FSL_CAAM=y
SHA_PROG_HW_ACCEL=y

CONFIG_CMD_BLOB=y
CONFIG_CMD_PRIBLOB=y
CONFIG_CMD_DEKBLOB=y
CONFIG_SECURE_BOOT=y
SYS_FSL_SEC_COMPAT 4

My uboot command as follow:

=> tftp 0x12000000 zImage
=> tftp 0x14000000 key.bin
=> blob enc 0x12000000 0x12001000 32 0x14000000
out_jr_size is 0
SEC0: RNG instantiated

Encapsulating data to form blob
01: key
03: seq_in_ptr
03: seq_in_ptr_extlen
06: seq_out_ptr
06: seq_out_ptr_extlen
09: operation
Descriptor dump:
Word[0]: b080000a
Word[1]: 04000010
Word[2]: 14000000
Word[3]: f0400000
Word[4]: 12000000
Word[5]: 00000032
Word[6]: f8400000
Word[7]: 12001000
Word[8]: 00000062
Word[9]: 870d0000
Word[10]: 00000068
Word[11]: 00000018
Word[12]: 00000000
Word[13]: 00000000
SEC Dequeue timed out
Error in blob encapsulation: -2
exit not allowed from main input shell.

I read source code, and found in jr_dequeue() funciton:

static int jr_dequeue(int sec_idx)
{
      struct jr_regs *regs = (struct jr_regs *)SEC_JR0_ADDR(sec_idx);
      ...  

      while (sec_in32(&regs->orsf) && CIRC_CNT(jr->head, jr->tail, jr->size)) {

            ...
      }

      return 0;
}

sec_in32(&regs->orsf) is always 0. Can anyone tell me why? I really need help.

Thanks,

Yiling Xu

Labels (2)
0 Kudos
2 Replies

1,009 Views
naveenprasath_0
Contributor I

Hi,

This same issue "SEC Dequeue timed outis faced by me but issue occurs while running rng_self_test.

What is the solution for this?

0 Kudos

1,102 Views
Yuri
NXP Employee
NXP Employee

 

Hello,

 

   Please apply to recommendations of  AN12056 (Encrypted Boot on HABv4

and CAAM Enabled Devices) how to use the blobs.

https://www.nxp.com/docs/en/application-note/AN12056.pdf 

Have a great day,

Yuri

 

------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer

button. Thank you!

0 Kudos