Hello
I use hab.c and hab_rvt.c files in below link. hab.c has a function that called imx_hab_authenticate_image(). It calls hab_Entry() function.
But it is waiting in the entry() function as loop. It cannot continue.
is there anyone to help me ?
https://github.com/nxp-mcuxpresso/sbl/blob/master/component/secure/semifunc/hab.c
This is my code.
LOG_INFO("HAB Entry");
if (hab_Entry() != HAB_SUCCESS) {
LOG_ERROR("Error: hab entry function\n");
goto hab_exit;
}
LOG_INFO("Check target");
status = hab_rvt_check_target(HAB_TGT_MEMORY, (void *)image_start, bytes);
if (status != HAB_SUCCESS) {
LOG_ERROR("HAB check target status %x, image_start 0x%08x, end 0x%08x\n",
status, image_start, image_start + bytes);
goto hab_exit;
}
Output :
07.01.2025 16:36:29.096 #1 [15573][INF][UPDATE_HAB:155]LEN : 0x38
07.01.2025 16:36:29.096 #1 [15573][INF][UPDATE_HAB:156]PAR : 0x45
07.01.2025 16:36:29.096 #1 [15573][INF][UPDATE_HAB:158]HAB Entry
I've got a similar problem with a imx8-mini. Where would I confirm the value of HABRVT_API_TREE_ADDR my device? I've looked in the processor reference manual but I'm struggling to find it in the > 5000 pages
Even if HAB is not enabled it is possible to call hab_entry(). Please make sure that the HAB_API address is the correct for the used device.
//RT1170
#define HABRVT_API_TREE_ADDR (0x00211C0C)
Please use this part of code to test the hab_entry:
#include "hab.h"
PRINTF("\n\n\rCalling HAB entry...");
HabStatus = hab_Entry();
PRINTF("\n\rHAB Entry Status = ");
DUMP(&HabStatus,4);
uint32_t habversion;
habversion = hab_Get_version();
PRINTF("\r\n\n HAB version is =%X", habversion);
Best regards,
Omar