AnsweredAssumed Answered

Calling HAB API to authenticate signature on RT1052

Question asked by tom fang on Jun 21, 2020
Latest reply on Jul 2, 2020 by Kerry Zhou

Hi,

Being trapped in some troubles about HAB API, I wanted to call HAB API in our bootloader to verify the bootloader its own signature, even though ROM code has done that, but I just want to verify the process of calling HAB API does work, but the code got stuck once calling hab_rvt.entry() function, let alone hab_rvt.authenticate_image(). I have read AN12263, AN4581, AN12079, HAB4_API.pdf from cst-3.1.0 and so on, but no clues I could find. See the test code below, and a block of OCRAM has been reserved.

 

By checking the RVT table, each member's address should be right according to AN12263. For example function entry(), the variable is located at 0x00200304 and its function located at 0x00201A81(not alignment?). See code above, why does it get stuck while entering function hab_rvt->entry()? Any else I missed?

 

 

Question 2, for function authenticate_image(), the paramter "bytes", what does it include? HABr_API.pdf said it's "Initial (possibly partial) image size on entry. Final image size on exit", is it [IVT+BootData+DCD+signed_image]? Do you have any sample of the use of HAB API?

Outcomes