HAB4 API RVT exit() return value

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

HAB4 API RVT exit() return value

ソリューションへジャンプ
1,979件の閲覧回数
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

ラベル(2)
0 件の賞賛
返信
1 解決策
1,884件の閲覧回数
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 件の賞賛
返信
3 返答(返信)
1,884件の閲覧回数
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 件の賞賛
返信
1,884件の閲覧回数
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 件の賞賛
返信
1,885件の閲覧回数
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 件の賞賛
返信