Hab events with newly signed bootloader

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Hab events with newly signed bootloader

391 次查看
uboot_problem
Contributor I

HI,

WIth previous help from this forum I've been able to compile & sign a bootloader for my iMX8M board. Also I've succesfully written the fuses corresponding to the hexdump of the key the bootloader was signed with. However the system is still creating the following events on hab_status (fuse hasn't been burned to lock the system down yet):

 

Secure boot disabled

HAB Configuration: 0xf0, HAB State: 0x66

--------- HAB Event 1 -----------------
event data:
        0xdb 0x00 0x14 0x43 0x33 0x0c 0xa0 0x00
        0x00 0x00 0x00 0x00 0x40 0x1f 0xdd 0xc0
        0x00 0x00 0x00 0x20

STS = HAB_FAILURE (0x33)
RSN = HAB_INV_ASSERTION (0x0C)
CTX = HAB_CTX_ASSERT (0xA0)
ENG = HAB_ENG_ANY (0x00)


--------- HAB Event 2 -----------------
event data:
        0xdb 0x00 0x14 0x43 0x33 0x0c 0xa0 0x00
        0x00 0x00 0x00 0x00 0x40 0x1f 0xcd 0xc0
        0x00 0x00 0x00 0x04

STS = HAB_FAILURE (0x33)
RSN = HAB_INV_ASSERTION (0x0C)
CTX = HAB_CTX_ASSERT (0xA0)
ENG = HAB_ENG_ANY (0x00)


--------- HAB Event 3 -----------------
event data:
        0xdb 0x00 0x3c 0x43 0x33 0x18 0xc0 0x00
        0xca 0x00 0x34 0x00 0x02 0xc5 0x1d 0x00
        0x00 0x00 0x16 0x5c 0x40 0x1f 0xcd 0xc0
        0x00 0x00 0x10 0x20 0x40 0x20 0x00 0x00
        0x00 0x0a 0x08 0xa0 0x00 0x91 0x00 0x00
        0x00 0x00 0x80 0x59 0x00 0x00 0x00 0x00
        0x00 0x00 0x00 0x00 0x40 0x2a 0x08 0xa0
        0x00 0x00 0x59 0xde

STS = HAB_FAILURE (0x33)
RSN = HAB_INV_SIGNATURE (0x18)
CTX = HAB_CTX_COMMAND (0xC0)
ENG = HAB_ENG_ANY (0x00)

csf_spl.txt:

[Header]
    Version = 4.3
    Hash Algorithm = sha256
    Engine = CAAM
    Engine Configuration = 0
    Certificate Format = X509
    Signature Format = CMS

[Install SRK]
    # Index of the key location in the SRK table to be installed
    File = "../crts/SRK_1_2_3_4_table.bin"
    Source index = 0

[Install CSFK]
    # Key used to authenticate the CSF data
    File = "../crts/CSF1_1_sha256_4096_65537_v3_usr_crt.pem"

[Authenticate CSF]

[Unlock]
    # Leave Job Ring and DECO master ID registers Unlocked
    Engine = CAAM
    Features = MID

[Install Key]
    # Key slot index used to authenticate the key to be installed
    Verification index = 0
    # Target key slot in HAB key store where key will be installed
    Target index = 2
    # Key to install
    File = "../crts/IMG1_1_sha256_4096_65537_v3_usr_crt.pem"

[Authenticate Data]
    # Key slot index used to authenticate the image data
    Verification index = 2
    # Authenticate Start Address, Offset, Length and file
    Blocks = 0x7e0fc0 0x1a000 0x37800 "flash.bin"

 csf_fit.txt looks like:

[Header]
    Version = 4.3
    Hash Algorithm = sha256
    Engine = CAAM
    Engine Configuration = 0
    Certificate Format = X509
    Signature Format = CMS

[Install SRK]
    # Index of the key location in the SRK table to be installed
    File = "../crts/SRK_1_2_3_4_table.bin"
    Source index = 0

[Install CSFK]
    # Key used to authenticate the CSF data
    File = "../crts/CSF1_1_sha256_4096_65537_v3_usr_crt.pem"

[Authenticate CSF]

[Install Key]
    # Key slot index used to authenticate the key to be installed
    Verification index = 0
    # Target key slot in HAB key store where key will be installed
    Target index = 2
    # Key to install
    File = "../crts/IMG1_1_sha256_4096_65537_v3_usr_crt.pem"


[Authenticate Data]
    # Key slot index used to authenticate the image data
    Verification index = 2
    # Authenticate Start Address, Offset, Length and file
    Blocks = 0x401fcdc0 0x57c00 0x1020 "flash.bin", \
	0x40200000 0x5AC00 0xA08A0 "flash.bin", \
	0x910000 0xFB4A0 0x8059 "flash.bin", \
	0x0 0x1034F9 0x0 "flash.bin", \
	0x402A08A0 0x1034F9 0x59DE "flash.bin"

The second to last line looks suspicious to me, could it be causing this issue? The values were returned by the print_fit_hab.sh, which I used according to instructions here 

Is it possible for some values used  by print_fit_hab.sh to be specific to the board I'm using. I understood they are supposed to be platform (eg. iMX8M) specific?

0 项奖励
回复
1 回复

370 次查看
uboot_problem
Contributor I

After some further research I came across this topic: https://community.nxp.com/t5/i-MX-Processors/iMX8MM-HAB-errors/m-p/1172520 

I tried replicating some of what was done there, removed the 4 last lines csf_fit.txt, leaving only one (Blocks = 0x401fcdc0 0x57c00 0x1020 "flash.bin")

After that the board reports no hab events during bootup, so the issue is definitely with the values reported by ./print_fit_hab.sh

0 项奖励
回复