system couldn't wakeup when HAB reports no event on uboot image

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

system couldn't wakeup when HAB reports no event on uboot image

175 Views
jiada
Contributor III

Hello

I am working on a customer target with i.MX8MP SoC,
I have written fuse to the target, and signed uboot/kernel image with CST tool according to instructions in
https://github.com/nxp-imx/uboot-imx/blob/lf_v2022.04/doc/imx/habv4/guides/mx8m_secure_boot.txt

everything looks good,
after power on, by execute "hab_status", there is no HAB event reported,
during bootup of kernel image, uboot also could verify kernel image without HAB event be reported,
but if after system booted, suspend the target to mem with command [echo mem > /sys/power/state]
then it can never wakeup

after some investigation & experiments, 

I found:
1) the issue only occurs when uboot image is correctly signed (no HAB even found)
2) if uboot image is not correctly signed, then system can wakeup after suspend to ram
3) whether kernel image is correctly signed or not doesn't affect the behavior
4) the issue occurs after uboot calls hab_rvt.authenticate_image
https://github.com/nxp-imx/uboot-imx/blob/lf_v2022.04/arch/arm/mach-imx/hab.c#L242
5) the device hasn't been closed (I am not sure if this will affect the behavior)
6) I have configured using ttymxc3 input irq or rtc alarm as wakeup source, but seems when issue occurs, the interrupt couldn't occur, thus not able to wake the system

could you give me some hint? is there any know issue, or how can I continue to debug this issue?
how to check the behavior of "hab_rvt.authenticate_image"? I also looked into imx-atf, couldn't find related code
for hab_rvt.authenticate_image

Thanks,
Jiada

0 Kudos
Reply
0 Replies