S32K3_HSE_ASB_postboot_passflag

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S32K3_HSE_ASB_postboot_passflag

跳至解决方案
4,580 次查看
wuxianlong
Senior Contributor I

Hi, NXP

I am now ready to use HSE's ASB to verify my BOOT and APP. I use Preboot SMR to verify my BOOT and release the M7 kernel when the verification passes. Then I used postboot to verify my APP in parallel. The problem now is how to confirm that my APP verification was successful. (I can't find the status sign of postboot pass)
17401018685171.png17401032358218.png

The current idea is to wait for the HSE initialization to complete before jumping to the APP, and then confirm whether the verification is successful by checking whether the SMR KEYs are valid. Can this method be implemented? is there a better way?


Best Regards,
xianlong
0 项奖励
回复
1 解答
4,565 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi

Yes, the end of post boot phase can be monitored by HSE_STATUS_INIT_OK:

image.png

 

image.png


You can read the status directly. See struct hseAttrSmrCoreStatus_t in HSE Service API reference manual:

image.png

You can find an example for Get Attribute service in HSE DemoExamples:
https://www.nxp.com/webapp/Download?colCode=S32K3_HSE_DemoExamples

This is from c:\NXP\S32K3_HSE_DemoExamples_1_0_0\S32K3_HSE_DemoExamples\Secure_Boot\S32K344_Advanced_SecureBoot:


/* Get status of the Secure Memory Region and Core Reset Entry installation */
HseResponse = Get_Attr(
HSE_SMR_CORE_BOOT_STATUS_ATTR_ID,
sizeof(hseAttrSmrCoreStatus_t),
(void *)(&smrCoreStatus));
ASSERT(HSE_SRV_RSP_OK == HseResponse);

Regards,
Lukas

在原帖中查看解决方案

0 项奖励
回复
2 回复数
4,566 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi

Yes, the end of post boot phase can be monitored by HSE_STATUS_INIT_OK:

image.png

 

image.png


You can read the status directly. See struct hseAttrSmrCoreStatus_t in HSE Service API reference manual:

image.png

You can find an example for Get Attribute service in HSE DemoExamples:
https://www.nxp.com/webapp/Download?colCode=S32K3_HSE_DemoExamples

This is from c:\NXP\S32K3_HSE_DemoExamples_1_0_0\S32K3_HSE_DemoExamples\Secure_Boot\S32K344_Advanced_SecureBoot:


/* Get status of the Secure Memory Region and Core Reset Entry installation */
HseResponse = Get_Attr(
HSE_SMR_CORE_BOOT_STATUS_ATTR_ID,
sizeof(hseAttrSmrCoreStatus_t),
(void *)(&smrCoreStatus));
ASSERT(HSE_SRV_RSP_OK == HseResponse);

Regards,
Lukas

0 项奖励
回复
4,554 次查看
wuxianlong
Senior Contributor I
Thank you very much for your help. I ignored the API documentation before and did not find the information.
0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2048676%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES32K3_HSE_ASB_postboot_passflag%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2048676%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%20NXP%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CDIV%20class%3D%22%22%3E%E6%88%91%E7%8E%B0%E5%9C%A8%E5%87%86%E5%A4%87%E4%BD%BF%E7%94%A8%20HSE%20%E7%9A%84%20ASB%20%E6%9D%A5%E9%AA%8C%E8%AF%81%E6%88%91%E7%9A%84%20BOOT%20%E5%92%8C%20APP%E3%80%82%E6%88%91%E4%BD%BF%E7%94%A8%20Preboot%20SMR%20%E6%9D%A5%E9%AA%8C%E8%AF%81%E6%88%91%E7%9A%84%20BOOT%EF%BC%8C%E5%B9%B6%E5%9C%A8%E9%AA%8C%E8%AF%81%E9%80%9A%E8%BF%87%E5%90%8E%E5%8F%91%E5%B8%83%20M7%20%E5%86%85%E6%A0%B8%E3%80%82%E7%84%B6%E5%90%8E%E6%88%91%E4%BD%BF%E7%94%A8%20postboot%20%E5%B9%B6%E8%A1%8C%E9%AA%8C%E8%AF%81%E6%88%91%E7%9A%84%20APP%E3%80%82%E7%8E%B0%E5%9C%A8%E7%9A%84%E9%97%AE%E9%A2%98%E6%98%AF%E5%A6%82%E4%BD%95%E7%A1%AE%E8%AE%A4%E6%88%91%E7%9A%84APP%E9%AA%8C%E8%AF%81%E6%88%90%E5%8A%9F%E4%BA%86%E3%80%82%20%3CSTRONG%3E%EF%BC%88%E6%88%91%E6%89%BE%E4%B8%8D%E5%88%B0postboot%20pass%E7%9A%84%E7%8A%B6%E6%80%81%E6%A0%87%E5%BF%97%EF%BC%89%3C%2FSTRONG%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20image-alt%3D%2217401018685171.png%22%20style%3D%22width%3A%20923px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2217401018685171.png%22%20style%3D%22width%3A%20923px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F325066i5D329A9DF88A5BF4%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2217401018685171.png%22%20alt%3D%2217401018685171.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-left%22%20image-alt%3D%2217401032358218.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%2217401032358218.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F325067i764F92D0854CC83B%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%2217401032358218.png%22%20alt%3D%2217401032358218.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FDIV%3E%3CDIV%20class%3D%22%22%3E%E7%9B%AE%E5%89%8D%E7%9A%84%E6%83%B3%E6%B3%95%E6%98%AF%E7%AD%89%E5%BE%85HSE%E5%88%9D%E5%A7%8B%E5%8C%96%E5%AE%8C%E6%88%90%E5%90%8E%E5%86%8D%E8%B7%B3%E8%BD%AC%E5%88%B0APP%EF%BC%8C%E7%84%B6%E5%90%8E%E9%80%9A%E8%BF%87%E6%A3%80%E6%9F%A5SMR%20KEY%E6%98%AF%E5%90%A6%E6%9C%89%E6%95%88%E6%9D%A5%E7%A1%AE%E8%AE%A4%E9%AA%8C%E8%AF%81%E6%98%AF%E5%90%A6%E6%88%90%E5%8A%9F%E3%80%82%3CSPAN%3E%E8%BF%99%E7%A7%8D%E6%96%B9%E6%B3%95%E8%83%BD%E5%AE%9E%E7%8E%B0%E5%90%97%EF%BC%9F%3C%2FSPAN%3E%E6%9C%89%E6%B2%A1%E6%9C%89%E6%9B%B4%E5%A5%BD%E7%9A%84%E5%8A%9E%E6%B3%95%EF%BC%9F%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%E6%AD%A4%E8%87%B4%EF%BC%8C%3CBR%20%2F%3E%E6%98%BE%E9%BE%99%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2049348%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K3_HSE_ASB_postboot_passflag%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2049348%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E9%9D%9E%E5%B8%B8%E6%84%9F%E8%B0%A2%E6%82%A8%E7%9A%84%E5%B8%AE%E5%8A%A9%E3%80%82%E6%88%91%E4%B9%8B%E5%89%8D%E5%BF%BD%E7%95%A5%E4%BA%86API%E6%96%87%E6%A1%A3%EF%BC%8C%E6%B2%A1%E6%9C%89%E6%89%BE%E5%88%B0%E7%9B%B8%E5%85%B3%E4%BF%A1%E6%81%AF%E3%80%82%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2049003%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20S32K3_HSE_ASB_postboot_passflag%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2049003%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%3C%2FP%3E%0A%3CP%3E%E6%98%AF%E7%9A%84%EF%BC%8C%E5%8F%AF%E4%BB%A5%E9%80%9A%E8%BF%87%20HSE_STATUS_INIT_OK%20%E7%9B%91%E6%8E%A7%E5%90%8E%E5%90%AF%E5%8A%A8%E9%98%B6%E6%AE%B5%E7%9A%84%E7%BB%93%E6%9D%9F%EF%BC%9A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F325149i871D1F468323A751%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F325146i11340F3C76A8135C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E%E6%82%A8%E5%8F%AF%E4%BB%A5%E7%9B%B4%E6%8E%A5%E8%AF%BB%E5%8F%96%E7%8A%B6%E6%80%81%E3%80%82%E8%AF%B7%E5%8F%82%E9%98%85%20HSE%20%E6%9C%8D%E5%8A%A1%20API%20%E5%8F%82%E8%80%83%E6%89%8B%E5%86%8C%E4%B8%AD%E7%9A%84%20struct%20hseAttrSmrCoreStatus_t%EF%BC%9A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20847px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20847px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F325147i27A04BE869A8AF57%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%E6%82%A8%E5%8F%AF%E4%BB%A5%E5%9C%A8%20HSE%20DemoExamples%20%E4%B8%AD%E6%89%BE%E5%88%B0%E8%8E%B7%E5%8F%96%E5%B1%9E%E6%80%A7%E6%9C%8D%E5%8A%A1%E7%9A%84%E7%A4%BA%E4%BE%8B%EF%BC%9A%3CBR%20%2F%3E%20%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fwebapp%2FDownload%3FcolCode%3DS32K3_HSE_DemoExamples%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fwww.nxp.com%2Fwebapp%2FDownload%3FcolCode%3DS32K3_HSE_DemoExamples%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%E8%BF%99%E6%98%AF%E6%9D%A5%E8%87%AAc%3A%5CNXP%5CS32K3_HSE_DemoExamples_1_0_0%5CS32K3_HSE_DemoExamples%5CSecure_Boot%5CS32K344_Advanced_SecureBoot%EF%BC%9A%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E%2F*%20%E8%8E%B7%E5%8F%96%E5%AE%89%E5%85%A8%E5%86%85%E5%AD%98%E5%8C%BA%E5%9F%9F%E5%92%8C%E6%A0%B8%E5%BF%83%E9%87%8D%E7%BD%AE%E6%9D%A1%E7%9B%AE%E5%AE%89%E8%A3%85%E7%9A%84%E7%8A%B6%E6%80%81%20*%2F%3CBR%20%2F%3E%20HseResponse%20%3D%20Get_Attr(%3CBR%20%2F%3E%20HSE_SMR_CORE_BOOT_STATUS_ATTR_ID%EF%BC%8C%3CBR%20%2F%3E%E5%A4%A7%E5%B0%8F%EF%BC%88hseAttrSmrCoreStatus_t%EF%BC%89%EF%BC%8C%3CBR%20%2F%3E%20%EF%BC%88%E6%97%A0%E6%95%88*%EF%BC%89%EF%BC%88%EF%BC%86smrCoreStatus%EF%BC%89%EF%BC%89%EF%BC%9B%3CBR%20%2F%3E%20ASSERT(HSE_SRV_RSP_OK%20%3D%3D%20HseResponse)%3B%3C%2FP%3E%0A%3CP%3E%E9%97%AE%E5%80%99%EF%BC%8C%3CBR%20%2F%3E%E5%8D%A2%E5%8D%A1%E6%96%AF%3C%2FP%3E%3C%2FLINGO-BODY%3E