Hi all,
You mentioned AN552 FPGA, so the platform is the corstone300/an552. In our current port we setup every peripheral as non-secure which is not used by TF-M.
Please check which PPC bit did you use to connect your IP. Also try to access the peripheral on the NS alias: 0x41700000. Can you access the 0x51700000 address before tfm_hal_platform_init (for this test please use a debugger to check and remove printf)?
Regards, Dávid
From: Antonio De Angelis Antonio.DeAngelis@arm.com Sent: Friday, August 16, 2024 9:08 AM To: Mark Chen mark@pufsecurity.com; Anton Komlev Anton.Komlev@arm.com; Shebu Varghese Kuriakose Shebu.VargheseKuriakose@arm.com; tf-m@lists.trustedfirmware.org; David Hazi David.Hazi@arm.com Cc: Randy Liu randyliu@pufsecurity.com; Victor Huang victor@pufsecurity.com; Neil Chen neilchen@pufsecurity.com Subject: Re: [Technical Loop] PSA Crypto API with PUFcc on the TF-M platform
Adding David from our platform integration team.
Which platform are you using to integrate the new peripheral? Can you access it before tfm_core_init() is called? This looks like that peripheral is not configured correctly for S access, letting David to expand on this.
Thanks, Antonio
Sent from Outlook for Androidhttps://aka.ms/AAb9ysg ________________________________ From: Mark Chen <mark@pufsecurity.commailto:mark@pufsecurity.com> Sent: Friday, August 16, 2024 3:44:57 AM To: Anton Komlev <Anton.Komlev@arm.commailto:Anton.Komlev@arm.com>; Shebu Varghese Kuriakose <Shebu.VargheseKuriakose@arm.commailto:Shebu.VargheseKuriakose@arm.com>; Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>; tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.orgmailto:tf-m@lists.trustedfirmware.org> Cc: Randy Liu <randyliu@pufsecurity.commailto:randyliu@pufsecurity.com>; Victor Huang <victor@pufsecurity.commailto:victor@pufsecurity.com>; Neil Chen <neilchen@pufsecurity.commailto:neilchen@pufsecurity.com> Subject: RE: [Technical Loop] PSA Crypto API with PUFcc on the TF-M platform
Hi all,
I am working on integrating our IP(PUFcc) into TF-Mv2.1.0, with the PUFcc located at address 0x51700000.
The PUFcc can be access on bl2 stage, however, it cannot be access on booting tf-m stage.
The exception log as below:
[cid:image002.png@01DAEFBD.4FA96590]FATAL ERROR: HardFault
Here is some context for the exception:
EXC_RETURN (LR): 0xFFFFFFF1
Exception came from secure FW in handler mode.
xPSR: 0x00000003
MSP: 0x31000B18
PSP: 0x31000BF8
MSP_NS: 0xFFFFFFFC
PSP_NS: 0xFFFFFFFC
Exception frame at: 0x31000B18
R0: 0x31000B60
R1: 0x00000000
R2: 0x0000001B
R3: 0x00000002
R12: 0x00000000
LR: 0x38009EF7
PC: 0x3800AB02
xPSR: 0x6100000B
Callee saved register state: R4: 0xFFFFFFF9
R5: 0x31000B60
R6: 0x00000002
R7: 0x00000002
R8: 0x38030F24
R9: 0x0000001B
R10: 0x00000011
R11: 0x38030F11
CFSR: 0x00008200
BFSR: 0x00000082
BFAR: 0x00000004
MMFSR: 0x00000000
MMFAR: Not Valid
UFSR: 0x00000000
HFSR: 0x40000000
SFSR: 0x00000000
SFAR: Not Valid
The diff patch as below:
[cid:image003.png@01DAEFBD.4FA96590]--- a/secure_fw/spm/core/main.c
+++ b/secure_fw/spm/core/main.c
@@ -56,6 +56,9 @@ static fih_int tfm_core_init(void)
*/
SPMLOG_INFMSG("\033[1;34mBooting TF-M "VERSION_FULLSTR"\033[0m\r\n");
+ uint32_t* p_s = (uint32_t *)0x51700000;
+ printf("p_s = %08x\n", (uint32_t)*p_s);
Could you provide any suggestions on this issue?
Best regards,
Mark Chen
Research & Development Division II
PUFsecurity Corporation
Tel: 886-3-5601010 ext. 3110
Fax: 886-3-5601177
Email: mark@pufsecurity.commailto:mark@pufsecurity.com
[cid:image004.png@01DAEFBD.4FA96590]
From: Andy Chen <andychen@pufsecurity.commailto:andychen@pufsecurity.com> Sent: Thursday, August 1, 2024 12:12 AM To: Anton Komlev <Anton.Komlev@arm.commailto:Anton.Komlev@arm.com> Cc: Randy Liu <randyliu@pufsecurity.commailto:randyliu@pufsecurity.com>; Victor Huang <victor@pufsecurity.commailto:victor@pufsecurity.com>; Neil Chen <neilchen@pufsecurity.commailto:neilchen@pufsecurity.com>; Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>; Shebu Varghese Kuriakose <Shebu.VargheseKuriakose@arm.commailto:Shebu.VargheseKuriakose@arm.com> Subject: Re: [Technical Loop] PSA Crypto API with PUFcc on the TF-M platform
Hi Anton,
Thank you and enjoy your time!!!
Best,
Andy
________________________________
寄件者: Anton Komlev <Anton.Komlev@arm.commailto:Anton.Komlev@arm.com> 寄件日期: Wednesday, July 31, 2024 11:34:48 PM 收件者: Andy Chen <andychen@pufsecurity.commailto:andychen@pufsecurity.com> 副本: Randy Liu <randyliu@pufsecurity.commailto:randyliu@pufsecurity.com>; Victor Huang <victor@pufsecurity.commailto:victor@pufsecurity.com>; Neil Chen <neilchen@pufsecurity.commailto:neilchen@pufsecurity.com>; Antonio De Angelis <Antonio.DeAngelis@arm.commailto:Antonio.DeAngelis@arm.com>; Shebu Varghese Kuriakose <Shebu.VargheseKuriakose@arm.commailto:Shebu.VargheseKuriakose@arm.com> 主旨: RE: [Technical Loop] PSA Crypto API with PUFcc on the TF-M platform
HI Andy,
Great to hear good news.
I will be in annual leave from tomorrow, Aug 1st, but Antonio (coped) could help you and can redirect the possible questions to appropriate team members.
With the occasion, I would appreciate if your team evaluates and follows TF-M documentation and gives us feedback on possible confusion or missing information.
Best regards,
Anton
From: Andy Chen <andychen@pufsecurity.commailto:andychen@pufsecurity.com> Sent: Wednesday, July 31, 2024 3:26 PM To: Anton Komlev <Anton.Komlev@arm.commailto:Anton.Komlev@arm.com> Cc: Randy Liu <randyliu@pufsecurity.commailto:randyliu@pufsecurity.com>; Victor Huang <victor@pufsecurity.commailto:victor@pufsecurity.com>; Neil Chen <neilchen@pufsecurity.commailto:neilchen@pufsecurity.com> Subject: [Technical Loop] PSA Crypto API with PUFcc on the TF-M platform
#Set a new mail loop
Hi Anton,
We set a kick-off meeting of "PSA Crypto API with PUFcc on the TF-M platform" this week.
• TF-M v2.1.0
• PSA Crypto API - v1.2.1
• PSA Certified APIs Architecture Test Suite - v1.6
• MPS3 with AN552
Randy, Victor, and Neil are members of this project.
We would have many issues when developing that need your help to solve it.
Please feel free to add your teams. Let's make the project successful.
Thank you very much.
Have a Nice Day, Andy
[cid:image004.png@01DAEFBD.4FA96590] 熵碼科技股份有限公司
Tel: 886-3-5601010 #2119 Email: andychen@pufsecurity.commailto:andychen@pufsecurity.com Website: https://www.pufsecurity.com/
-------- Disclaimer: This e-mail is from PUFsecurity Corporation. This e-mail may contain privileged and confidential information. It is intended for the named recipient(s) only. Disclosure, copying, distribution, or use of the contents of this e-mail by persons other than the intended recipient may violate applicable laws. If you are not an intended recipient, please notify us immediately (by reply e-mail) and delete this e-mail from your system. Our postal address is 8F-1, No. 5, Tai-Yuan 1st St., Jhubei City, Hsinchu County 302082, Taiwan.--------
-------- Disclaimer: This e-mail is from PUFsecurity Corporation. This e-mail may contain privileged and confidential information. It is intended for the named recipient(s) only. Disclosure, copying, distribution, or use of the contents of this e-mail by persons other than the intended recipient may violate applicable laws. If you are not an intended recipient, please notify us immediately (by reply e-mail) and delete this e-mail from your system. Our postal address is 8F-1, No. 5, Tai-Yuan 1st St., Jhubei City, Hsinchu County 302082, Taiwan.--------
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
-------- Disclaimer: This e-mail is from PUFsecurity Corporation. This e-mail may contain privileged and confidential information. It is intended for the named recipient(s) only. Disclosure, copying, distribution, or use of the contents of this e-mail by persons other than the intended recipient may violate applicable laws. If you are not an intended recipient, please notify us immediately (by reply e-mail) and delete this e-mail from your system. Our postal address is 8F-1, No. 5, Tai-Yuan 1st St., Jhubei City, Hsinchu County 302082, Taiwan.--------
-------- Disclaimer: This e-mail is from PUFsecurity Corporation. This e-mail may contain privileged and confidential information. It is intended for the named recipient(s) only. Disclosure, copying, distribution, or use of the contents of this e-mail by persons other than the intended recipient may violate applicable laws. If you are not an intended recipient, please notify us immediately (by reply e-mail) and delete this e-mail from your system. Our postal address is 8F-1, No. 5, Tai-Yuan 1st St., Jhubei City, Hsinchu County 302082, Taiwan.-------- -------- Disclaimer: This e-mail is from PUFsecurity Corporation. This e-mail may contain privileged and confidential information. It is intended for the named recipient(s) only. Disclosure, copying, distribution, or use of the contents of this e-mail by persons other than the intended recipient may violate applicable laws. If you are not an intended recipient, please notify us immediately (by reply e-mail) and delete this e-mail from your system. Our postal address is 8F-1, No. 5, Tai-Yuan 1st St., Jhubei City, Hsinchu County 302082, Taiwan.--------