As the ‘psa_irq_status_t’ is a implementation-defined value, is it possible let the implementation-define the status encoding?
Then the status and its checking code needs to be define by implementation, too:
PSA_IRQ_STATUS_NOCHANGE
PSA_IRQ_STATUS_DISABLE
PSA_IRQ_STATUS_ENABLE
PSA_IRQ_STAUTS_IS_ENABLED(status)
This would make everything implementation-defined and this affects the headers, and one extra header: psa_impdef.h needs to be created by implementations. With this the ffm based applications just use preprocessors to get status and check them; the enable/disable can be out of ‘true’ and ‘false’ values.
/Ken
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Kevin Peng via TF-M
Sent: Tuesday, January 26, 2021 11:08 AM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] Arm Firmware Framework for M 1.1 Extensions Alpha specification
Hi all,
Per the off-line discussion with Andrew, I’d like to start a wider discussion on the interrupt APIs, specifically the Secure Partition API changes for interrupt control in chapter 6.3.3.
There are the following APIs:
* uint32_t psa_irq_is_enabled (psa_signal_t irq_signal);
This API returns 0 if the interrupt is disabled and 1 if the interrupt is enabled.
* psa_irq_status_t psa_irq_disable(psa_signal_t irq_signal);
This API returns the status of the interrupt prior to this call with an implementation defined value
Note the return type of the interrupt status is different.
The first one is only to tell whether the interrupt is enabled (1) or not (0) – an equivalent to bool type.
The second one could be any value to indicate an interrupt status. And that value is intended to be passed to psa_irq_restore to write to the interrupt control register directly.
* void psa_irq_restore(psa_signal_t irq_signal, psa_irq_status_t saved_status);
The typical usage:
psa_irq_status irq2_state = psa_irq_disable(IRQ2_SIGNAL) ;
// manipulate data shared with IRQ2 …
psa_irq_restore(IRQ2_SIGNAL, irq2_state);
This is a very efficient design as the 'saved status value' can be the exact value that needs to be written to an interrupt control register to restore the previous state.
But TF-M seems to be unable to take that advantage.
Because the most common interrupt controller is the NVIC provided by the core.
The NVIC takes 1/0 to enable or disable the interrupt and one register for 32 interrupts.
The underlying NVIC operation provided by CMSIS is NVIC_Enable/DisableIRQ.
So the psa_irq_status_t in TF-M would simply 1 or 0 for a specific interrupt signal.
Then the psa_irq_restore could be unnecessary if psa_irq_disable returns uint32_t just like psa_irq_is_enabled:
uint32_t irq_status = psa_irq_disable(IRQ);
... // critical section
if (irq_status)
psa_irq_enable(IRQ);
Any thoughts on the necessity of the psa_irq_restore API?
The draft implementation of the current APIs for easy understanding:
https://review.trustedfirmware.org/q/topic:%22psa_interrupt_api%22+(status:…
Best Regards,
Kevin
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Andrew Thoelke via TF-M
Sent: Friday, January 15, 2021 1:25 AM
To: tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>; nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: [TF-M] Arm Firmware Framework for M 1.1 Extensions Alpha specification
Hi all,
The PSA Firmware Framework for M 1.1 Extensions specification is now published on Arm Developer.
This document introduces a set of updates and extensions to the Arm® Platform Security Architecture Firmware Framework (FF-M) specification, designed to build on the capabilities provided in version 1.0.
This is an initial ALPHA release in order to enable wider review and feedback on the changes proposed to be included in the v1.1 specification. At this quality level, the changes and interfaces defined are not stable enough for product development. When the proposed extensions are sufficiently stable to be classed as Beta, they will be integrated into the FF-M version 1.1 specification.
The 1.1 Extensions document can be downloaded from:
https://developer.arm.com/documentation/aes0039/latest
Both the 1.0 Specification and the 1.1 Extensions document are linked from the main PSA architecture page:
https://developer.arm.com/architectures/security-architectures/platform-sec…
Ken and I have presented a number of times at last year's Tech Forums on the proposals in the specification, most recently I provided a summary of the whole document on 10th December 2020.
If you have any feedback, please provide it to arm.psa-feedback(a)arm.com<mailto:arm.psa-feedback@arm.com>, or discuss the proposals here in the TF-M mailing list.
Regards,
Andrew
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org<mailto:TF-M@lists.trustedfirmware.org>
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi Kumar,
Thanks a lot for reporting this issue.
We had also reported it to the GNU toolchain team and were waiting them to make it public.
Hi all,
Now the details of this issue can be found in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99157.
AFIAK, there is no workaround for this issue yet, without modifying the GNU toolchain source code.
So I'd like to suggest to *not* use GNU Arm embedded toolchain version 10-2020-q4-major now. The earlier versions are not affected.
Best regards,
Hu Ziji
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Kumar Gala via TF-M
Sent: Friday, February 19, 2021 2:41 AM
To: Adrian Shaw via TF-M <tf-m(a)lists.trustedfirmware.org>
Subject: [TF-M] Bug in GNU Arm Embedded toolchain (version 10-2020-q4-major) for TFM
Be aware that the binary release of the GNU Arm embedded toolchain version 10-2020-q4-major has a bug in it that impacts TFM support.
I’ve reported this to the Arm team that works on the toolchain and provided a fix as well. The libgcc/cmse.o code isn’t being properly compiled and thus doesn’t work correctly.
I’ve made the fix in the Zephyr SDK toolchain that provides an Arm embedded build:
https://github.com/zephyrproject-rtos/sdk-ng
Bug fix here:
https://github.com/zephyrproject-rtos/sdk-ng/blob/master/patches/gcc/10.2.0…
- k
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi all,
As I mentioned on yesterday's forum, I made a patch<https://review.trustedfirmware.org/c/TF-M/tf-m-tools/+/8484> to fix the gitattributes issues in the tools repo.
And the last call of review for the main repo normalization:
https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/8283
Plan to have them both merged on next Tuesday.
Best Regards,
Kevin
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Kevin Peng via TF-M
Sent: Tuesday, February 9, 2021 10:03 AM
To: tf-m(a)lists.trustedfirmware.org; Anton Komlev <Anton.Komlev(a)arm.com>
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] TF-M git repo normalization
Hi,
I'd like to give a brief introduction on the git normalization before merging this patch.
@Anton Komlev<mailto:Anton.Komlev@arm.com>, can I reserve 15-20 minutes of the next tech forum?
Best Regards,
Kevin
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Kevin Peng via TF-M
Sent: Monday, February 8, 2021 10:56 AM
To: tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
Cc: nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: Re: [TF-M] TF-M git repo normalization
Hi all,
Would like to merge the below patch *tomorrow* if there were no objections.
Best Regards,
Kevin
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Kevin Peng via TF-M
Sent: Friday, February 5, 2021 10:37 AM
To: tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
Cc: nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: Re: [TF-M] TF-M git repo normalization
This patch was generated by git command automatically:
$ git add --renormalize .
It does change any contents of the files, except the line-endings in the repository.
Your existing local working tree should not be affected when you pick up it or later when it's merged.
The only file maintained manually is the .gitattributes
Best Regards,
Kevin
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Kevin Peng via TF-M
Sent: Friday, February 5, 2021 9:53 AM
To: tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
Cc: nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: [TF-M] TF-M git repo normalization
Hi all,
Following the git normalization topic of the tech forum yesterday, I checked TF-M.
It has not been enabled the git normalization feature.
I've made a patch<https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/8283> to make this happen.
Please check out or rebase your work upon this patch to see any issues.
Your existing working tree should not be affected regarding the line-endings.
What is the normalization?
To be simple, different developers on different Host OS can have different line-endings in their local working tree and do not need to worry about interference with each other.
Reference: https://git-scm.com/docs/gitattributes
Best Regards,
Kevin
Be aware that the binary release of the GNU Arm embedded toolchain version 10-2020-q4-major has a bug in it that impacts TFM support.
I’ve reported this to the Arm team that works on the toolchain and provided a fix as well. The libgcc/cmse.o code isn’t being properly compiled and thus doesn’t work correctly.
I’ve made the fix in the Zephyr SDK toolchain that provides an Arm embedded build:
https://github.com/zephyrproject-rtos/sdk-ng
Bug fix here:
https://github.com/zephyrproject-rtos/sdk-ng/blob/master/patches/gcc/10.2.0…
- k
Agenda for the forum:
1. Git repository normalization.
2. Linaro SQUAD interface to visualise TF-M metrics
3. Any Other Business
Regards,
Anton
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Anton Komlev via TF-M
Sent: 10 February 2021 17:14
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: [TF-M] Technical Forum call - February 18
Hello,
The next Technical Forum is planned on Thursday, Feb 18 at 15:00-16:00 UTC (US time zone).
Please reply on this email with your proposals for agenda topics.
Kevin Peng already proposed the one:
1. Git repository normalization.
Recording and slides of previous meetings are here:
https://www.trustedfirmware.org/meetings/tf-m-technical-forum/
Best regards,
Anton
Hi all,
The PSA Firmware Update API specification is now published on Arm Developer.
This document introduces a standard firmware interface for installing firmware updates.
The document can be downloaded from https://developer.arm.com/documentation/ihi0093/0000/
This is an initial BETA release in order to enable wider review and feedback. We shall release new Beta versions to address feedback and comments.
Sherry Zhang in TF-M has begun an implementation of this interface, which is a work in progress.
If you have any feedback about the API specification, please provide it to arm.psa-feedback(a)arm.com, or discuss the proposal here in the TF-M mailing list.
Regards,
Adrian
Hello,
The next Technical Forum is planned on Thursday, Feb 18 at 15:00-16:00 UTC (US time zone).
Please reply on this email with your proposals for agenda topics.
Kevin Peng already proposed the one:
1. Git repository normalization.
Recording and slides of previous meetings are here:
https://www.trustedfirmware.org/meetings/tf-m-technical-forum/
Best regards,
Anton
Hi Antonio,
May I suggest to raise the question to PSA Arch test repo https://github.com/ARM-software/psa-arch-tests/issues?
Best regards,
Hu Ziji
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Antonio Ken IANNILLO via TF-M
Sent: Wednesday, February 10, 2021 8:43 PM
To: tf-m(a)lists.trustedfirmware.org
Subject: Re: [TF-M] PSA-ARCH-TEST with zephyr
I just add the verbosity (I initially tough was the cmake verbosity..) to the test libraries.
This is the new output is somebody can help: https://pastebin.com/JNQ6TD0K
In the specific the failure is at :
‘’’
TEST: 403 | DESCRIPTION: Insufficient space check
Input id is 01030000
Input id is 01030000
Input id is 02020000
Input id is 02020000
[Info] Executing tests from non-secure
[Info] Executing PS tests
[Check 1] Overload storage space
Setting 0x00000200 bytes for UID 5
Setting 0x00000200 bytes for UID 6
Setting 0x00000200 bytes for UID 7
Setting 0x00000200 bytes for UID 8
Setting 0x00000200 bytes for UID 9
Setting 0x00000200 bytes for UID 10
Setting 0x00000200 bytes for UID 11
Setting 0x00000200 bytes for UID 12
Setting 0x00000200 bytes for UID 13
UID 13 set failed due to insufficient space
Remove all registered UIDs
Removing UID 5
Removing UID 6
Removing UID 7
Removing UID 8
Removing UID 9
Removing UID 10
Removing UID 11
Removing UID 12
[Check 2] Overload storage again to verify all previous UID removed
Setting 0x00000200 bytes for UID 5
Setting 0x00000200 bytes for UID 6
Setting 0x00000200 bytes for UID 7
Setting 0x00000200 bytes for UID 8
Setting 0x00000200 bytes for UID 9
[INF] Starting bootloader
[INF] Swap type: none
[INF] Swap type: none
[INF] Bootloader chainload address offset: 0x80000
[INF] Jumping to the first image slot
[Sec Thread] Secure image initializing!
Booting TFM v1.2.0
[Crypto] MBEDTLS_TEST_NULL_ENTROPY is not suitable for production!
*** Booting Zephyr OS build v2.5.0-rc1-209-g30634334a811 ***
‘’’
--
Antonio Ken Iannillo
I just add the verbosity (I initially tough was the cmake verbosity..) to the test libraries.
This is the new output is somebody can help: https://pastebin.com/JNQ6TD0K
In the specific the failure is at :
‘’’
TEST: 403 | DESCRIPTION: Insufficient space check
Input id is 01030000
Input id is 01030000
Input id is 02020000
Input id is 02020000
[Info] Executing tests from non-secure
[Info] Executing PS tests
[Check 1] Overload storage space
Setting 0x00000200 bytes for UID 5
Setting 0x00000200 bytes for UID 6
Setting 0x00000200 bytes for UID 7
Setting 0x00000200 bytes for UID 8
Setting 0x00000200 bytes for UID 9
Setting 0x00000200 bytes for UID 10
Setting 0x00000200 bytes for UID 11
Setting 0x00000200 bytes for UID 12
Setting 0x00000200 bytes for UID 13
UID 13 set failed due to insufficient space
Remove all registered UIDs
Removing UID 5
Removing UID 6
Removing UID 7
Removing UID 8
Removing UID 9
Removing UID 10
Removing UID 11
Removing UID 12
[Check 2] Overload storage again to verify all previous UID removed
Setting 0x00000200 bytes for UID 5
Setting 0x00000200 bytes for UID 6
Setting 0x00000200 bytes for UID 7
Setting 0x00000200 bytes for UID 8
Setting 0x00000200 bytes for UID 9
[INF] Starting bootloader
[INF] Swap type: none
[INF] Swap type: none
[INF] Bootloader chainload address offset: 0x80000
[INF] Jumping to the first image slot
[Sec Thread] Secure image initializing!
Booting TFM v1.2.0
[Crypto] MBEDTLS_TEST_NULL_ENTROPY is not suitable for production!
*** Booting Zephyr OS build v2.5.0-rc1-209-g30634334a811 ***
‘’’
--
Antonio Ken Iannillo
Thanks for your inputs.
I am seeking if boot data is used for a specific service only - if that is true, this boot data actually can be bound to the specific services, and other could request boot data related services by API.
/Ken
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Michel JAOUEN via TF-M
Sent: Tuesday, February 9, 2021 8:53 PM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] Boot data usage
Hello,
On STM platform, The boot data is also used to pass specific information to user different from attestation.
For this support a specific Major is used. The actual implementation available in ST cube needs to be reworked so that each platform can customize it (Major value, and table checking access control on tfm core)
Best regards
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Tamas Ban via TF-M
Sent: mardi 9 février 2021 11:52
To: tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
Cc: nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: Re: [TF-M] Boot data usage
Hi Ken,
AFAIK current implementation of FWU partition also relies on shared data received from bootloader.
Tamas
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Ken Liu via TF-M
Sent: 2021. február 9., kedd 10:47
To: tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
Cc: nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: [TF-M] Boot data usage
Hi,
Wondered if someone is expanding the boot data usage, as the default user is attestation only.
Please provide your case if you are expanding boot data usage.
Thanks!
/Ken