I found four additional code points in tfm_svcalls.c that needed to be enhanced to handle msg.type >= PSA_IPC_CALL.
3 of the four were like this:
if (msg->msg.type != PSA_IPC_CALL) {
Which I changed to:
if (msg->msg.type < PSA_IPC_CALL) {
The 4th occurrence was in the switch statement within 'tfm_svcall_psa_reply()'.
I moved the 'case PSA_IPC_CALL:' logic into the default block and surrounded it with:
if (msg->msg.type >= PSA_IPC_CALL) {
...
}
else {
tfm_panic();
}
With these changes in place, the new psa_call() 'type' argument appears to make its way peacefully and effectively through the plumbing.
Alan
-----Original Message-----
From: TF-M [mailto:tf-m-bounces@lists.trustedfirmware.org] On Behalf Of DeMars, Alan via TF-M
Sent: Friday, July 26, 2019 2:28 PM
To: Ken Liu (Arm Technology China)
Cc: tf-m(a)lists.trustedfirmware.org
Subject: Re: [TF-M] [EXTERNAL] [Maniphest] [Closed] T435: PSA APIs alignment
In order to pass along the new ‘type’ argument in psa_call, it seems that this line in tfm_svcalls.c:
msg = tfm_spm_create_msg(service, handle, PSA_IPC_CALL, ns_caller, invecs,
in_num, outvecs, out_num, outptr);
Should be:
msg = tfm_spm_create_msg(service, handle, type, ns_caller, invecs,
in_num, outvecs, out_num, outptr);
Otherwise the receiving SP will always see msg.type == PSA_IPC_CALL.
Alan
From: Summer-ARM (Summer Qin) [mailto:noreply@developer.trustedfirmware.org]
Sent: Thursday, July 25, 2019 7:14 PM
To: DeMars, Alan
Subject: [EXTERNAL] [Maniphest] [Closed] T435: PSA APIs alignment
Summer-ARM closed this task as "Resolved".
TASK DETAIL
https://developer.trustedfirmware.org/T435
EMAIL PREFERENCES
https://developer.trustedfirmware.org/settings/panel/emailpreferences/
To: Summer-ARM
Cc: edison-ai, matetothpal, adeaarm, wmnt, ashutoshksingh, KenLSoft, Summer-ARM, akiannillo, ademars, zhengwang721, BabaYB, karl-zh, shebuk, zbh, qixiang, DarshpreetSabharwal, jamesking1, mmorenobarm, abhishek-pandit
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
I found several other code points in tfm_svcalls.c that need to be enhanced to handle 'type' >= PSA_IPC_CALL.
Attached is my modified tfm_svcalls.c file. With these modifications, the 'type' argument makes its way through the system without causing tfm_panic() to be invoked.
Alan
-----Original Message-----
From: TF-M [mailto:tf-m-bounces@lists.trustedfirmware.org] On Behalf Of DeMars, Alan via TF-M
Sent: Friday, July 26, 2019 2:28 PM
To: Ken Liu (Arm Technology China)
Cc: tf-m(a)lists.trustedfirmware.org
Subject: Re: [TF-M] [EXTERNAL] [Maniphest] [Closed] T435: PSA APIs alignment
In order to pass along the new ‘type’ argument in psa_call, it seems that this line in tfm_svcalls.c:
msg = tfm_spm_create_msg(service, handle, PSA_IPC_CALL, ns_caller, invecs,
in_num, outvecs, out_num, outptr);
Should be:
msg = tfm_spm_create_msg(service, handle, type, ns_caller, invecs,
in_num, outvecs, out_num, outptr);
Otherwise the receiving SP will always see msg.type == PSA_IPC_CALL.
Alan
From: Summer-ARM (Summer Qin) [mailto:noreply@developer.trustedfirmware.org]
Sent: Thursday, July 25, 2019 7:14 PM
To: DeMars, Alan
Subject: [EXTERNAL] [Maniphest] [Closed] T435: PSA APIs alignment
Summer-ARM closed this task as "Resolved".
TASK DETAIL
https://developer.trustedfirmware.org/T435
EMAIL PREFERENCES
https://developer.trustedfirmware.org/settings/panel/emailpreferences/
To: Summer-ARM
Cc: edison-ai, matetothpal, adeaarm, wmnt, ashutoshksingh, KenLSoft, Summer-ARM, akiannillo, ademars, zhengwang721, BabaYB, karl-zh, shebuk, zbh, qixiang, DarshpreetSabharwal, jamesking1, mmorenobarm, abhishek-pandit
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
In order to pass along the new ‘type’ argument in psa_call, it seems that this line in tfm_svcalls.c:
msg = tfm_spm_create_msg(service, handle, PSA_IPC_CALL, ns_caller, invecs,
in_num, outvecs, out_num, outptr);
Should be:
msg = tfm_spm_create_msg(service, handle, type, ns_caller, invecs,
in_num, outvecs, out_num, outptr);
Otherwise the receiving SP will always see msg.type == PSA_IPC_CALL.
Alan
From: Summer-ARM (Summer Qin) [mailto:noreply@developer.trustedfirmware.org]
Sent: Thursday, July 25, 2019 7:14 PM
To: DeMars, Alan
Subject: [EXTERNAL] [Maniphest] [Closed] T435: PSA APIs alignment
Summer-ARM closed this task as "Resolved".
TASK DETAIL
https://developer.trustedfirmware.org/T435
EMAIL PREFERENCES
https://developer.trustedfirmware.org/settings/panel/emailpreferences/
To: Summer-ARM
Cc: edison-ai, matetothpal, adeaarm, wmnt, ashutoshksingh, KenLSoft, Summer-ARM, akiannillo, ademars, zhengwang721, BabaYB, karl-zh, shebuk, zbh, qixiang, DarshpreetSabharwal, jamesking1, mmorenobarm, abhishek-pandit
Hi,
There are a series of patches under "remove_isolation_level_3" topic: https://review.trustedfirmware.org/#/q/topic:remove_isolation_level_3+(stat… aim to remove isolation level 3 (TFM_LVL=3) from the library model.
These patches will not affect curent isolation level 1 and level 2 for both library model and IPC model.
Please help to review them and give comments if you find any problems or anywhere need to enhancement.
Thanks,
Edison
Just another use-case,
FreeRTOS is using the non-secure SVC. It does not expect that it may be used by somebody else (not RTOS).
Ideally, if TFM will not occupy SVC.
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken Liu (Arm Technology China) via TF-M
Sent: Friday, July 26, 2019 3:49 AM
To: DeMars, Alan <ademars(a)ti.com>; tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] Adding a platform specific tfm_svc_number_t
Hi Alan,
Can you share us your usage details? This could help us on defining the svc number things you mentioned.
Thanks.
-Ken
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of
> DeMars, Alan via TF-M
> Sent: Friday, July 26, 2019 6:59 AM
> To: tf-m(a)lists.trustedfirmware.org
> Subject: [TF-M] Adding a platform specific tfm_svc_number_t
>
> I need to define platform specific SPM APIs that will be invoked by our SPs.
>
> Is there a convention for 'cleanly' adding platform specific SVC
> enumerations to the tfm_svc_number_t typedef in tfm_svc.h as well as
> platform specific 'case's to SVCHandler_main() and/or SVC_Handler_IPC()?
>
> Alan
>
>
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.trustedfirmware.org%2Fmailman%2Flistinfo%2Ftf-m&data=02%7C01%7Ca
> ndrey.butok%40nxp.com%7C42c1df29f3b84ac62f5708d7116b749e%7C686ea1d3bc2
> b4c6fa92cd99c5c301635%7C0%7C0%7C636997025530401902&sdata=vO0tq34jt
> zFFn9D3cnrDP3a4fnrkq4h5jvzZmob2HnU%3D&reserved=0
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
I need to define platform specific SPM APIs that will be invoked by our SPs.
Is there a convention for 'cleanly' adding platform specific SVC enumerations to the tfm_svc_number_t typedef in tfm_svc.h as well as platform specific 'case's to SVCHandler_main() and/or SVC_Handler_IPC()?
Alan
When do you anticipate that this patch will be merged to master?
-----Original Message-----
From: TF-M [mailto:tf-m-bounces@lists.trustedfirmware.org] On Behalf Of Ken Liu (Arm Technology China) via TF-M
Sent: Tuesday, July 23, 2019 11:17 PM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd
Subject: [EXTERNAL] [TF-M] PSA API prototype update
Hi,
A patch is pushed for couple of days reveals the update on PSA API prototype and its related caller change:
https://review.trustedfirmware.org/c/trusted-firmware-m/+/1572
The most obvious part is a new parameter member 'type' is introduced in 'psa_call'. This is the first step of our upgrading to the latest PSA Firmware Framework Specification. The API internal behavior would come step by step later and now we can call PSA FF API in 1.0.0 prototypes.
The callers included in TF-M has been updated in this patch. Developers who developed extra services should mention this change and update PSA API related sources.
Any feedback please comment under the patch, or reply to this mail thread.
Thanks.
-Ken
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi,
A patch is pushed for couple of days reveals the update on PSA API prototype and its related caller change:
https://review.trustedfirmware.org/c/trusted-firmware-m/+/1572
The most obvious part is a new parameter member 'type' is introduced in 'psa_call'. This is the first step of our upgrading to the latest PSA Firmware Framework Specification. The API internal behavior would come step by step later and now we can call PSA FF API in 1.0.0 prototypes.
The callers included in TF-M has been updated in this patch. Developers who developed extra services should mention this change and update PSA API related sources.
Any feedback please comment under the patch, or reply to this mail thread.
Thanks.
-Ken
Hi all,
As you may be aware, implementing the PSA Internal Trusted Storage (ITS) APIs is on the TF-M roadmap for this quarter (https://developer.trustedfirmware.org/w/tf_m/planning/). We plan to implement these APIs with a new TF-M Internal Trusted Storage service.
The design proposal for the new TF-M ITS service is now available for design review here: https://review.trustedfirmware.org/c/trusted-firmware-m/+/1604 . The design is currently in "draft" state, which means further refinements are to be expected, and feedback is welcome.
For more information about the PSA ITS APIs themselves, the PSA Storage API document may be downloaded from here: https://pages.arm.com/PSA-APIs
Kind regards,
Jamie