Hi Diego,
Thank you for your reply and the useful references.
I have used the same key set to sign both the bootloader and the application image, and I am invoking the ROM HAB API from within my Second Stage Bootloader to authenticate the application image.
The authentication process works — the function returns a valid reset handler address, meaning the image is successfully verified.
Here’s the relevant call I am using:
load_addr = (uint32_t)hab_authenticate_image_no_dcd(1, ivt_offset, image_start, bytes);
and the implementation of that wrapper:
hab_image_entry_f hab_authenticate_image_no_dcd(uint8_t cid, uint32_t ivt_offset, uint32_t start, size_t bytes)
{
return g_habrvtTree->authenticate_image_no_dcd(cid, ivt_offset, (void **)&start, (size_t *)&bytes, NULL);
}
However, after the authentication succeeds, I call the ROM functions to report the HAB status and events, and I consistently get a WARNING status, even though the image is validated correctly.
Example output:
Hab rvt report status = 0x69, config = 0xcc, status = 0x99
Report event #0 -> 0xf0
[HAB EVENT #0] (44 bytes):
DB 00 2C 43 69 0A C0 00 CA 00 24 00 02 C5 1B 00 00 00 0A 28 20 00 10 ...
...
No more HAB events (status=0x33)
When parsing the first HAB event according to the HAB4 documentation, it indicates:
0x69 – Warning
0x0A – Unsupported engine
0xC0 – Event logged in hab_rvt.run_csf()
The following sequence 0C C5 1B 00 corresponds to the verification index of image key, HAB_PCL_CMS protocol, DCP engine, and default configuration.
So, from what I understand, the ROM reports a warning because it tries to use the DCP engine during CSF execution, but it is not properly available or initialized in this context.
I have attempted to manually enable and initialize the DCP in my bootloader using the SDK API (DCP_Init() with default config and enabling the DCP clock), but the warning still persists.
The image is verified successfully and executes correctly, but I would like to understand how to avoid or suppress this Unsupported Engine (DCP) warning when authenticating an image from the custom bootloader using HAB ROM APIs.
Any insights into how the ROM initializes the DCP during the primary boot process (or how to replicate that behavior from the second stage bootloader) would be very helpful.
Thanks again