HAB4 API RVT exit() return value

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

HAB4 API RVT exit() return value

Jump to solution
936 Views
matias_larsson
Contributor II

Hello,

I'm having a difficult time understanding the return value of the exit function and hope that someone can help me with it. This is what it says in the API manual:

• HAB_SUCCESS on an IC not configured as HAB_CFG_CLOSED, although
unsuccessful operations will still generate audit log events,
• HAB_WARNING on other ICs if all commands completed without failure (even if
warnings were generated),
• HAB_FAILURE otherwise

But U-Boot source code looks like this:

if (hab_rvt_exit() != HAB_SUCCESS) {
    puts("hab exit function fail\n");

    ...

If I understand correctly, hab_rvt_exit() should return HAB_SUCCESS on an open device and HAB_WARNING on a closed device. But the U-Boot code seems to rely on the fact that it returns HAB_SUCCESS on a closed device. Also it returns HAB_SUCCESS on my closed device. What am I missing?

Thank you in advance!

BR,

Matias Larsson

Labels (2)
0 Kudos
1 Solution
841 Views
Yuri
NXP Employee
NXP Employee

Hi,

  perhaps it makes sense to introduce an error to a boot image in order to check

operation.

Regards,

Yuri.

View solution in original post

0 Kudos
3 Replies
841 Views
Yuri
NXP Employee
NXP Employee

Hello,

   Looks like U-boot does not treat HAB_WARNING case separately.

What is the issue in Your case? Do You have real fails? 


Have a great day,
Yuri

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.

0 Kudos
841 Views
matias_larsson
Contributor II

Hi Yuri,

Thank you for your response. The issue in my case is that the exit() function seems to behave differently than what it says in the API manual. However, maybe it is supposed to return HAB_SUCCESS on a closed device and the documentation is wrong or I have read it wrong. The way it works makes sense and U-Boot seems to expect it as well. It would still be nice to be able to confirm correct operation and in this case what is happening is not in line with the documentation.

I don't have fails, things are working nicely, just a bit differently than I expected based on the documentation.

0 Kudos
842 Views
Yuri
NXP Employee
NXP Employee

Hi,

  perhaps it makes sense to introduce an error to a boot image in order to check

operation.

Regards,

Yuri.

0 Kudos