S32K3_HSE_ASB_postboot_passflag

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

S32K3_HSE_ASB_postboot_passflag

Jump to solution
3,993 Views
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 Kudos
Reply
1 Solution
3,978 Views
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

View solution in original post

0 Kudos
Reply
2 Replies
3,979 Views
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 Kudos
Reply
3,967 Views
wuxianlong
Senior Contributor I
Thank you very much for your help. I ignored the API documentation before and did not find the information.
0 Kudos
Reply
%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%3EI%20am%20now%20ready%20to%20use%20HSE's%20ASB%20to%20verify%20my%20BOOT%20and%20APP.%20I%20use%20Preboot%20SMR%20to%20verify%20my%20BOOT%20and%20release%20the%20M7%20kernel%20when%20the%20verification%20passes.%20Then%20I%20used%20postboot%20to%20verify%20my%20APP%20in%20parallel.%20The%20problem%20now%20is%20how%20to%20confirm%20that%20my%20APP%20verification%20was%20successful.%3CSTRONG%3E%20(I%20can't%20find%20the%20status%20sign%20of%20postboot%20pass)%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%3EThe%20current%20idea%20is%20to%20wait%20for%20the%20HSE%20initialization%20to%20complete%20before%20jumping%20to%20the%20APP%2C%20and%20then%20confirm%20whether%20the%20verification%20is%20successful%20by%20checking%20whether%20the%20SMR%20KEYs%20are%20valid.%20%3CSPAN%3ECan%20this%20method%20be%20implemented%3F%26nbsp%3B%3C%2FSPAN%3Eis%20there%20a%20better%20way%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3EBest%20Regards%2C%3CBR%20%2F%3Exianlong%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%3EThank%20you%20very%20much%20for%20your%20help.%20I%20ignored%20the%20API%20documentation%20before%20and%20did%20not%20find%20the%20information.%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%3EYes%2C%20the%20end%20of%20post%20boot%20phase%20can%20be%20monitored%20by%20HSE_STATUS_INIT_OK%3A%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%3EYou%20can%20read%20the%20status%20directly.%20See%20struct%20hseAttrSmrCoreStatus_t%20in%20HSE%20Service%20API%20reference%20manual%3A%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%3EYou%20can%20find%20an%20example%20for%20Get%20Attribute%20service%20in%20HSE%20DemoExamples%3A%3CBR%20%2F%3E%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%3EThis%20is%20from%20c%3A%5CNXP%5CS32K3_HSE_DemoExamples_1_0_0%5CS32K3_HSE_DemoExamples%5CSecure_Boot%5CS32K344_Advanced_SecureBoot%3A%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3E%2F*%20Get%20status%20of%20the%20Secure%20Memory%20Region%20and%20Core%20Reset%20Entry%20installation%20*%2F%3CBR%20%2F%3EHseResponse%20%3D%20Get_Attr(%3CBR%20%2F%3EHSE_SMR_CORE_BOOT_STATUS_ATTR_ID%2C%3CBR%20%2F%3Esizeof(hseAttrSmrCoreStatus_t)%2C%3CBR%20%2F%3E(void%20*)(%26amp%3BsmrCoreStatus))%3B%3CBR%20%2F%3EASSERT(HSE_SRV_RSP_OK%20%3D%3D%20HseResponse)%3B%3C%2FP%3E%0A%3CP%3ERegards%2C%3CBR%20%2F%3ELukas%3C%2FP%3E%3C%2FLINGO-BODY%3E