I'm trying to add s secure interrupt to my secure partition manifest but am getting a compile error because there are no definitions of my secure interrupt IRQ name and SIGNAL name.
What is the mechanism for including a platform-specific header that defines platform specific interrupts when compiling "secure_fw/core/ipc/tfm_svcalls.c"?
Alan
Hi Mate,
I was able to get this working by changing the build config to a non-IPC
setup (ConfigDefault.cmake), in which case the tfm veneers functions are
available and I can call the PSA API shims directly:
SYMBOL TABLE:
100efc80 g F *ABS* 00000008 tfm_tfm_crypto_generate_random_veneer
100efc88 g F *ABS* 00000008
tfm_tfm_crypto_get_generator_capacity_veneer
...
Thanks for the clarification. Calling `psa_generate_random` from the NSPE
works are expected now.
Best regards,
Kevin
On Wed, 17 Jul 2019 at 14:16, Mate Toth-Pal via TF-M <
tf-m(a)lists.trustedfirmware.org> wrote:
> Hi Kevin,
>
> Based on what you write your build is probably OK. To access the
> psa_generate_random service, you need to call the function 'psa_status_t
> psa_generate_random(uint8_t *output, size_t output_size)', declared in
> interface/include/psa/crypto.h.
>
> in case the TFM/PSA APIs are in use (your case), the transition to the
> secure code is done through the tfm_psa_* veneers. A service (for example
> psa_generate_random) is connected with a call to 'psa_connect(...)', which
> is provided with the ID of the selected service, and then 'psa_call(...)'
> is called with the handle received from 'psa_connect(...)' (as it is
> described in the PSA FF Specification). However this exchange is
> implemented inside the TF-M's crypto API implementation in
> interface\src\tfm_crypto_api.c, so you only need to call the API function.
>
> The veneer 'tfm_tfm_crypto_generate_random_veneer' is compiled into TF-M
> when the Library model is used. In this case the secure services can be
> accessed with a single function call, and the tfm_psa_* veneers are not
> available. However please note, that even in this case you can use TF-M's
> crypto API, which will call the service the correct way. (Look for the
> conditionally compiled blocks depending on the TFM_PSA_API macro in the API
> implementation.)
>
> I hope this answers your questions.
>
> Regards,
> Mate
>
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Kevin
> Townsend via TF-M
> Sent: 17 July 2019 13:12
> To: Thomas Törnblom via TF-M <tf-m(a)lists.trustedfirmware.org>
> Subject: [TF-M] Missing veneer function implementations
>
> Greetings,
>
> I'm trying to get the TFM/PSA APIs working in Zephyr, based on the
> upstream TF-M repository.
>
> The libraries are being built with the following settings, followed by
> make and make install:
>
> cmake -G\"Unix Makefiles\" -DPROJ_CONFIG=`readlink -f
> ../ConfigRegressionIPC.cmake` -DTARGET_PLATFORM=AN521 -DCOMPILER=GNUARM ../
>
> *ConfigRegressionIPC is used simply to include the test service for
> debugging purposes for now.
>
> The SPE is handled by TF-M, and the NSPE uses Zephyr, with zephyr making
> calls to the SPE via the PSA APIs, which should call the appropriate
> veneers via the source files in the `install/export/tfm` folder, as well as
> `veneers/s_veneers.o`
>
> This works fine calling the test service via `tfm_psa_call_veneer`, but
> whenever I try to make use of any of the .c shims in the PSA API (for
> example `psa_generate_random`), I get the following error(s):
>
> tfm_crypto_api.c:1571: undefined reference to
> `tfm_tfm_crypto_generate_random_veneer'
>
> I assumed the veneers are in the `s_veneers.o` file generated as part of
> the TF-M build, and this file is linked into during the Zephyr build
> process, but when I look at the contents of the .o file (which was
> suspiciously small at 740b) I only see the following:
>
> $ arm-none-eabi-objdump -t tfm/build/install/export/tfm/veneers/s_veneers.o
>
> /tfm/build/install/export/tfm/veneers/s_veneers.o: file format
> elf32-littlearm
>
> SYMBOL TABLE:
> 100efc80 g F *ABS* 00000008 tfm_psa_framework_version_veneer
> 100efc88 g F *ABS* 00000008 TZ_InitContextSystem_S
> 100efc90 g F *ABS* 00000008 TZ_LoadContext_S
>
> 100efc98 g F *ABS* 00000008 tfm_psa_version_veneer
> 100efca0 g F *ABS* 00000008 tfm_psa_close_veneer
> 100efca8 g F *ABS* 00000008 TZ_FreeModuleContext_S
> 100efcb0 g F *ABS* 00000008 tfm_psa_connect_veneer
> 100efcb8 g F *ABS* 00000008 TZ_AllocModuleContext_S
> 100efcc0 g F *ABS* 00000008 tfm_secure_client_service_veneer_run_tests
> 100efcc8 g F *ABS* 00000008 TZ_StoreContext_S
> 100efcd0 g F *ABS* 00000008 tfm_psa_call_veneer
> 100efcd8 g F *ABS* 00000008 tfm_register_client_id
>
> Clearly I'm missing something in the build process so that all of the
> other veneers are present, but it's not obvious to me at this point what.
> At present I can only make calls to `tfm_psa_call` to the test service, but
> that isn't going to help with the goal of publishing a sample application
> that meets the requirements for PSA Level 1 certification.
>
> Any suggestions on what knob to turn to include the missing veneers would
> be very welcome.
>
> Best regards,
> Kevin Townsend
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/tf-m
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/tf-m
>
Hi Kevin,
Based on what you write your build is probably OK. To access the psa_generate_random service, you need to call the function 'psa_status_t psa_generate_random(uint8_t *output, size_t output_size)', declared in interface/include/psa/crypto.h.
in case the TFM/PSA APIs are in use (your case), the transition to the secure code is done through the tfm_psa_* veneers. A service (for example psa_generate_random) is connected with a call to 'psa_connect(...)', which is provided with the ID of the selected service, and then 'psa_call(...)' is called with the handle received from 'psa_connect(...)' (as it is described in the PSA FF Specification). However this exchange is implemented inside the TF-M's crypto API implementation in interface\src\tfm_crypto_api.c, so you only need to call the API function.
The veneer 'tfm_tfm_crypto_generate_random_veneer' is compiled into TF-M when the Library model is used. In this case the secure services can be accessed with a single function call, and the tfm_psa_* veneers are not available. However please note, that even in this case you can use TF-M's crypto API, which will call the service the correct way. (Look for the conditionally compiled blocks depending on the TFM_PSA_API macro in the API implementation.)
I hope this answers your questions.
Regards,
Mate
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Kevin Townsend via TF-M
Sent: 17 July 2019 13:12
To: Thomas Törnblom via TF-M <tf-m(a)lists.trustedfirmware.org>
Subject: [TF-M] Missing veneer function implementations
Greetings,
I'm trying to get the TFM/PSA APIs working in Zephyr, based on the upstream TF-M repository.
The libraries are being built with the following settings, followed by make and make install:
cmake -G\"Unix Makefiles\" -DPROJ_CONFIG=`readlink -f ../ConfigRegressionIPC.cmake` -DTARGET_PLATFORM=AN521 -DCOMPILER=GNUARM ../
*ConfigRegressionIPC is used simply to include the test service for debugging purposes for now.
The SPE is handled by TF-M, and the NSPE uses Zephyr, with zephyr making calls to the SPE via the PSA APIs, which should call the appropriate veneers via the source files in the `install/export/tfm` folder, as well as `veneers/s_veneers.o`
This works fine calling the test service via `tfm_psa_call_veneer`, but whenever I try to make use of any of the .c shims in the PSA API (for example `psa_generate_random`), I get the following error(s):
tfm_crypto_api.c:1571: undefined reference to `tfm_tfm_crypto_generate_random_veneer'
I assumed the veneers are in the `s_veneers.o` file generated as part of the TF-M build, and this file is linked into during the Zephyr build process, but when I look at the contents of the .o file (which was suspiciously small at 740b) I only see the following:
$ arm-none-eabi-objdump -t tfm/build/install/export/tfm/veneers/s_veneers.o
/tfm/build/install/export/tfm/veneers/s_veneers.o: file format
elf32-littlearm
SYMBOL TABLE:
100efc80 g F *ABS* 00000008 tfm_psa_framework_version_veneer
100efc88 g F *ABS* 00000008 TZ_InitContextSystem_S
100efc90 g F *ABS* 00000008 TZ_LoadContext_S
100efc98 g F *ABS* 00000008 tfm_psa_version_veneer
100efca0 g F *ABS* 00000008 tfm_psa_close_veneer
100efca8 g F *ABS* 00000008 TZ_FreeModuleContext_S
100efcb0 g F *ABS* 00000008 tfm_psa_connect_veneer
100efcb8 g F *ABS* 00000008 TZ_AllocModuleContext_S
100efcc0 g F *ABS* 00000008 tfm_secure_client_service_veneer_run_tests
100efcc8 g F *ABS* 00000008 TZ_StoreContext_S
100efcd0 g F *ABS* 00000008 tfm_psa_call_veneer
100efcd8 g F *ABS* 00000008 tfm_register_client_id
Clearly I'm missing something in the build process so that all of the other veneers are present, but it's not obvious to me at this point what. At present I can only make calls to `tfm_psa_call` to the test service, but that isn't going to help with the goal of publishing a sample application that meets the requirements for PSA Level 1 certification.
Any suggestions on what knob to turn to include the missing veneers would be very welcome.
Best regards,
Kevin Townsend
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi All,
I've pushed a set of patches for review which aims to add the following features to MCUBoot:
* Integration with HW key(s).
* Sign & authenticate S and NS image independently with different keys.
Design proposal for this change:
https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/1453/
Related changes are listed here:
https://developer.trustedfirmware.org/T438
Please feel free to review any of the patches.:)
Thanks,
Tamas
Greetings,
I'm trying to get the TFM/PSA APIs working in Zephyr, based on the upstream
TF-M repository.
The libraries are being built with the following settings, followed by make
and make install:
cmake -G\"Unix Makefiles\" -DPROJ_CONFIG=`readlink -f
../ConfigRegressionIPC.cmake` -DTARGET_PLATFORM=AN521 -DCOMPILER=GNUARM ../
*ConfigRegressionIPC is used simply to include the test service for
debugging purposes for now.
The SPE is handled by TF-M, and the NSPE uses Zephyr, with zephyr making
calls to the SPE via the PSA APIs, which should call the appropriate
veneers via the source files in the `install/export/tfm` folder, as well as
`veneers/s_veneers.o`
This works fine calling the test service via `tfm_psa_call_veneer`, but
whenever I try to make use of any of the .c shims in the PSA API (for
example `psa_generate_random`), I get the following error(s):
tfm_crypto_api.c:1571: undefined reference to
`tfm_tfm_crypto_generate_random_veneer'
I assumed the veneers are in the `s_veneers.o` file generated as part of
the TF-M build, and this file is linked into during the Zephyr build
process, but when I look at the contents of the .o file (which was
suspiciously small at 740b) I only see the following:
$ arm-none-eabi-objdump -t tfm/build/install/export/tfm/veneers/s_veneers.o
/tfm/build/install/export/tfm/veneers/s_veneers.o: file format
elf32-littlearm
SYMBOL TABLE:
100efc80 g F *ABS* 00000008 tfm_psa_framework_version_veneer
100efc88 g F *ABS* 00000008 TZ_InitContextSystem_S
100efc90 g F *ABS* 00000008 TZ_LoadContext_S
100efc98 g F *ABS* 00000008 tfm_psa_version_veneer
100efca0 g F *ABS* 00000008 tfm_psa_close_veneer
100efca8 g F *ABS* 00000008 TZ_FreeModuleContext_S
100efcb0 g F *ABS* 00000008 tfm_psa_connect_veneer
100efcb8 g F *ABS* 00000008 TZ_AllocModuleContext_S
100efcc0 g F *ABS* 00000008 tfm_secure_client_service_veneer_run_tests
100efcc8 g F *ABS* 00000008 TZ_StoreContext_S
100efcd0 g F *ABS* 00000008 tfm_psa_call_veneer
100efcd8 g F *ABS* 00000008 tfm_register_client_id
Clearly I'm missing something in the build process so that all of the other
veneers are present, but it's not obvious to me at this point what. At
present I can only make calls to `tfm_psa_call` to the test service, but
that isn't going to help with the goal of publishing a sample application
that meets the requirements for PSA Level 1 certification.
Any suggestions on what knob to turn to include the missing veneers would
be very welcome.
Best regards,
Kevin Townsend
Hi Antonio,
> TF-M Crypto will align to newest release of Mbed Crypto when they will become available
Just FYI: The newest official release of Mbed Crypto is v1.1.0: https://github.com/ARMmbed/mbed-crypto/releases
Thanks,
Andrej
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Antonio De Angelis via TF-M
Sent: Monday, May 27, 2019 6:22 PM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] Old Mbed-Crypto library?
Hi Andrej,
TF-M Crypto has moved to use the same API as the latest available *release* of Mbed Crypto which is Mbed Crypto 1.0.0 . Mbed Crypto is a reference implementation of the PSA Crypto API, which are under active development. TF-M Crypto will align to newest release of Mbed Crypto when they will become available; these new releases will incorporate the new features which are developed as part of the PSA Crypto API, and there will be cases where the new features will break legacy code (i.e. API changes).
Regarding the change that you mention, i.e. psa_key_slot_t vs psa_key_handle_t . The concept of psa_key_handle_t that TF-M Crypto is using now is indeed a newer (updated) concept introduced with later versions of the PSA Crypto API to replace the outdated concept of psa_key_slot_t. For example, if you look at the current latest development version of the PSA Crypto API, you will see that psa_key_handle_t is used to handle keys.
This is an example of a breaking change in the API that has been introduced by newer releases of the PSA Crypto API. You are right, this change will break regression / PSA API compliance tests, in fact as part of the latest set of patches you can see that the Regression tests are upgraded to use the new concept of psa_key_handle_t instead of psa_key_slot_t. From these updated tests, you can get an idea of how to use the psa_key_handle_t.
After this update, TF-M Crypto can't support the PSA API compliance tests (ACK) which were run previously (i.e. the ew_beta0 branch). The psa-arch-test team is in the process of providing an update on the master branch which will enable TF-M Crypto to run compliance tests from there. This should happen in the next couple of weeks.
Please let me know in case you need any more clarification.
Best regards,
Antonio
________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Andrej Butok via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: 27 May 2019 12:52
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] Old Mbed-Crypto library?
Hello,
tfm_build_instruction.rst tells to use mbed-Crypto instead of mbedTLS:
git clone https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co… -b mbedcrypto-1.0<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co…>.0
But the issue is that it references to the obsolete (3 month old) Mbed-Crypto library.
Also, it looks like this old MbedCrypto has downgraded TFM/PSA Crypto API (from key-slot to key-handle) => this is step back in PSA TFM API, which should break crypto regression and PSA tests.
We do not want to downgrade our SDK MbedCrypto, better to freeze TFM.
Any plans to use the last Crypto Lib and to revert the PSA API degradation?
Thanks,
Andrej Butok
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
Hi,
This is a design document change for IPC, the intention is to change design document from wiki page to rst format. The patch is put at:
https://review.trustedfirmware.org/c/trusted-firmware-m/+/1533
The plan is to put this design document under source control and the following feature changes and enhancement about IPC will be pushed as patches on it - which helps review.
Since the original text is already public so I changed the doc status to 'Detailed', plan is to merge it soon with some quick comment. If you think some necessary points are missing please leave comments in this mailing thread and we will add them later with a new patch.
Thanks.
-Ken
Hi Andrej,
Does your IDE support pre-build command? Is there any chance to execute the parse and auto-generation in the pre-build step?
Best regards,
Hu Ziji
________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Andrej Butok via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: Thursday, July 11, 2019 7:41 PM
To: Ken Liu (Arm Technology China)
Cc: tf-m(a)lists.trustedfirmware.org
Subject: Re: [TF-M] Common scatter files and templates
Hi Ken,
> Could you help to tell the name of the file you don't want to be removed?
So, any .c,.h,.inc and linker file which may be used during compilation.
An IDE project (ARM Kei, MCUx, IAR etc.) assumes a fixed set of existing files.
Thanks,
Andrej
-----Original Message-----
From: Ken Liu (Arm Technology China) <Ken.Liu(a)arm.com>
Sent: Thursday, July 11, 2019 12:44 PM
To: Andrej Butok <andrey.butok(a)nxp.com>; tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: RE: Common scatter files and templates
Hi Andrej,
Could you help to tell the name of the file you don't want to be removed?
So that we can estimate what is important for IDE projects and how we could help on that.
An introduction of how your IDE integrate with TF-M code is also welcome.
Would you share this to us?
Thanks.
-Ken
> -----Original Message-----
> From: Andrej Butok <andrey.butok(a)nxp.com>
> Sent: Thursday, July 11, 2019 2:25 PM
> To: David Hu (Arm Technology China) <David.Hu(a)arm.com>; Antonio De
> Angelis <Antonio.DeAngelis(a)arm.com>; Ken Liu (Arm Technology China)
> <Ken.Liu(a)arm.com>; Miklos Balint <Miklos.Balint(a)arm.com>
> Cc: tf-m(a)lists.trustedfirmware.org
> Subject: RE: Common scatter files and templates
>
> Pre-generated files are required for TFM IDE projects.
> Please do not delete them, find other solution!
> It can be solved by adding #if/#ifdef.
>
> Thank you,
> Andrej Butok
>
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of David
> Hu (Arm Technology China) via TF-M
> Sent: Thursday, July 11, 2019 4:08 AM
> To: Antonio De Angelis <Antonio.DeAngelis(a)arm.com>; tf-
> m(a)lists.trustedfirmware.org; Ken Liu (Arm Technology China)
> <Ken.Liu(a)arm.com>; Miklos Balint <Miklos.Balint(a)arm.com>
> Cc: nd <nd(a)arm.com>
> Subject: Re: [TF-M] Common scatter files and templates
>
> Hi Antonio, Ken, Miklos,
>
> Currently, we use a preprocessor flag `TFM_MULTI_CORE_TOPOLOGY` to
> comment the veneer sections in the templates in multi-core topology.
> Each time before building, we have to run the Python script to
> generate new link script/scatter file with veneer disabled, to replace the existing ones.
> It becomes more inconvenient as the number of developers and users on
> feature-twincpu branch grows.
>
> As Chris proposed on
> https://review.tr
> ustedfirmware.org%2Fc%2Ftrusted-firmware-
> m%2F%2B%2F1527&data=02%7C01%7Candrey.butok%40nxp.com%7C068
> 37920c9bd443236e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635%
> 7C0%7C0%7C636984076614785023&sdata=2SVwa0TpX4a4lP86hsIYiw25YS
> Zqi8FzFErhpH3CrYI%3D&reserved=0, does it also make sense to
> directly update the "generated" linker script/scatter file as well, on
> feature-twincpu branch? `TFM_MULTI_CORE_TOPOLOGY` will be a common
> flag used in multi- core topology and will help resolve our urgent problem.
> If the final improvement solution is completed on master branch, we
> will update the feature branch accordingly when merging it back to master branch.
>
> Please let me know if there is a better option for feature-twincpu branch.
> Thank you.
>
> Best regards,
> Hu Ziji
>
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of
> Antonio De Angelis via TF-M
> Sent: Thursday, July 11, 2019 3:53 AM
> To: TF-M(a)lists.trustedfirmware.org; nd <nd(a)arm.com>
> Subject: Re: [TF-M] Common scatter files and templates
>
> Hi Chris,
>
> you are right, that file is autogenerated from the template file but
> both are kept under source control. The reason for this is that the
> autogenerated file is not created at build time but by manually
> running the tfm_parse_manifest_list.py, which has to be run every time
> something in the manifest is changed, and the resulting autogenerated file is committed under source control as well.
>
> On the other hand, the build system could be modified to run the
> parsers at build time so that the autogenerated files wouldn't have to
> be stored in source control, and we could keep only the template.
> These two alternatives are both equally valid in my view, but if there
> is strong consensus for the other we can discuss.
>
> Thanks,
> Antonio
>
> ________________________________
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of
> Christopher Brand via TF-M <tf-m(a)lists.trustedfirmware.org>
> Sent: 10 July 2019 19:50
> To: TF-M(a)lists.trustedfirmware.org; Miklos Balint
> Subject: [TF-M] Common scatter files and templates
>
> Can somebody please help me understand this?
> $ ls platform/ext/common/armclang/
> tfm_common_s.sct tfm_common_s.sct.template $ ls
> platform/ext/common/gcc tfm_common_s.ld tfm_common_s.ld.template In
> both directories, both files are under source control, but the
> non-template files say that they're auto-generated:
> /*********** WARNING: This is an auto-generated file. Do not edit!
> ***********/
>
> It's unusual to see both the source file and the artifact under source control.
>
> It seems that they're generated by tools/tfm_parse_manifest_list.py,
> but that doesn't seem to be run as part of the build, so when is it run?
>
> Thanks,
>
> Chris
>
>
> This message and any attachments may contain confidential information
> from Cypress or its subsidiaries. If it has been received in error,
> please advise the sender and immediately delete this message.
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://lists.trust
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C06837920c9bd44323
> 6e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636
> 984076614785023&sdata=CwIsfSfixxyMt0BjBQk2p0%2BrzebG2WeLVgAaD
> bfl678%3D&reserved=0
> 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.
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://lists.trust
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C06837920c9bd44323
> 6e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636
> 984076614785023&sdata=CwIsfSfixxyMt0BjBQk2p0%2BrzebG2WeLVgAaD
> bfl678%3D&reserved=0
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://lists.trust
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C06837920c9bd44323
> 6e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636
> 984076614785023&sdata=CwIsfSfixxyMt0BjBQk2p0%2BrzebG2WeLVgAaD
> bfl678%3D&reserved=0
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
For clarification, the IAR IDE supports both pre and post build actions.
/Thomas
Den 2019-07-11 kl. 15:17, skrev David Hu (Arm Technology China) via TF-M:
> Hi Andrej,
>
>
> Does your IDE support pre-build command? Is there any chance to execute the parse and auto-generation in the pre-build step?
>
>
> Best regards,
>
> Hu Ziji
>
>
> ________________________________
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Andrej Butok via TF-M <tf-m(a)lists.trustedfirmware.org>
> Sent: Thursday, July 11, 2019 7:41 PM
> To: Ken Liu (Arm Technology China)
> Cc: tf-m(a)lists.trustedfirmware.org
> Subject: Re: [TF-M] Common scatter files and templates
>
> Hi Ken,
>
>> Could you help to tell the name of the file you don't want to be removed?
> So, any .c,.h,.inc and linker file which may be used during compilation.
> An IDE project (ARM Kei, MCUx, IAR etc.) assumes a fixed set of existing files.
>
> Thanks,
> Andrej
>
> -----Original Message-----
> From: Ken Liu (Arm Technology China) <Ken.Liu(a)arm.com>
> Sent: Thursday, July 11, 2019 12:44 PM
> To: Andrej Butok <andrey.butok(a)nxp.com>; tf-m(a)lists.trustedfirmware.org
> Cc: nd <nd(a)arm.com>
> Subject: RE: Common scatter files and templates
>
> Hi Andrej,
>
> Could you help to tell the name of the file you don't want to be removed?
> So that we can estimate what is important for IDE projects and how we could help on that.
>
> An introduction of how your IDE integrate with TF-M code is also welcome.
> Would you share this to us?
>
> Thanks.
>
> -Ken
>
>
>> -----Original Message-----
>> From: Andrej Butok <andrey.butok(a)nxp.com>
>> Sent: Thursday, July 11, 2019 2:25 PM
>> To: David Hu (Arm Technology China) <David.Hu(a)arm.com>; Antonio De
>> Angelis <Antonio.DeAngelis(a)arm.com>; Ken Liu (Arm Technology China)
>> <Ken.Liu(a)arm.com>; Miklos Balint <Miklos.Balint(a)arm.com>
>> Cc: tf-m(a)lists.trustedfirmware.org
>> Subject: RE: Common scatter files and templates
>>
>> Pre-generated files are required for TFM IDE projects.
>> Please do not delete them, find other solution!
>> It can be solved by adding #if/#ifdef.
>>
>> Thank you,
>> Andrej Butok
>>
>> -----Original Message-----
>> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of David
>> Hu (Arm Technology China) via TF-M
>> Sent: Thursday, July 11, 2019 4:08 AM
>> To: Antonio De Angelis <Antonio.DeAngelis(a)arm.com>; tf-
>> m(a)lists.trustedfirmware.org; Ken Liu (Arm Technology China)
>> <Ken.Liu(a)arm.com>; Miklos Balint <Miklos.Balint(a)arm.com>
>> Cc: nd <nd(a)arm.com>
>> Subject: Re: [TF-M] Common scatter files and templates
>>
>> Hi Antonio, Ken, Miklos,
>>
>> Currently, we use a preprocessor flag `TFM_MULTI_CORE_TOPOLOGY` to
>> comment the veneer sections in the templates in multi-core topology.
>> Each time before building, we have to run the Python script to
>> generate new link script/scatter file with veneer disabled, to replace the existing ones.
>> It becomes more inconvenient as the number of developers and users on
>> feature-twincpu branch grows.
>>
>> As Chris proposed on
>> https://review.tr
>> ustedfirmware.org%2Fc%2Ftrusted-firmware-
>> m%2F%2B%2F1527&data=02%7C01%7Candrey.butok%40nxp.com%7C068
>> 37920c9bd443236e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635%
>> 7C0%7C0%7C636984076614785023&sdata=2SVwa0TpX4a4lP86hsIYiw25YS
>> Zqi8FzFErhpH3CrYI%3D&reserved=0, does it also make sense to
>> directly update the "generated" linker script/scatter file as well, on
>> feature-twincpu branch? `TFM_MULTI_CORE_TOPOLOGY` will be a common
>> flag used in multi- core topology and will help resolve our urgent problem.
>> If the final improvement solution is completed on master branch, we
>> will update the feature branch accordingly when merging it back to master branch.
>>
>> Please let me know if there is a better option for feature-twincpu branch.
>> Thank you.
>>
>> Best regards,
>> Hu Ziji
>>
>> -----Original Message-----
>> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of
>> Antonio De Angelis via TF-M
>> Sent: Thursday, July 11, 2019 3:53 AM
>> To: TF-M(a)lists.trustedfirmware.org; nd <nd(a)arm.com>
>> Subject: Re: [TF-M] Common scatter files and templates
>>
>> Hi Chris,
>>
>> you are right, that file is autogenerated from the template file but
>> both are kept under source control. The reason for this is that the
>> autogenerated file is not created at build time but by manually
>> running the tfm_parse_manifest_list.py, which has to be run every time
>> something in the manifest is changed, and the resulting autogenerated file is committed under source control as well.
>>
>> On the other hand, the build system could be modified to run the
>> parsers at build time so that the autogenerated files wouldn't have to
>> be stored in source control, and we could keep only the template.
>> These two alternatives are both equally valid in my view, but if there
>> is strong consensus for the other we can discuss.
>>
>> Thanks,
>> Antonio
>>
>> ________________________________
>> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of
>> Christopher Brand via TF-M <tf-m(a)lists.trustedfirmware.org>
>> Sent: 10 July 2019 19:50
>> To: TF-M(a)lists.trustedfirmware.org; Miklos Balint
>> Subject: [TF-M] Common scatter files and templates
>>
>> Can somebody please help me understand this?
>> $ ls platform/ext/common/armclang/
>> tfm_common_s.sct tfm_common_s.sct.template $ ls
>> platform/ext/common/gcc tfm_common_s.ld tfm_common_s.ld.template In
>> both directories, both files are under source control, but the
>> non-template files say that they're auto-generated:
>> /*********** WARNING: This is an auto-generated file. Do not edit!
>> ***********/
>>
>> It's unusual to see both the source file and the artifact under source control.
>>
>> It seems that they're generated by tools/tfm_parse_manifest_list.py,
>> but that doesn't seem to be run as part of the build, so when is it run?
>>
>> Thanks,
>>
>> Chris
>>
>>
>> This message and any attachments may contain confidential information
>> from Cypress or its subsidiaries. If it has been received in error,
>> please advise the sender and immediately delete this message.
>> --
>> TF-M mailing list
>> TF-M(a)lists.trustedfirmware.org
>> https://lists.trust
>> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
>> m&data=02%7C01%7Candrey.butok%40nxp.com%7C06837920c9bd44323
>> 6e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636
>> 984076614785023&sdata=CwIsfSfixxyMt0BjBQk2p0%2BrzebG2WeLVgAaD
>> bfl678%3D&reserved=0
>> 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.
>> --
>> TF-M mailing list
>> TF-M(a)lists.trustedfirmware.org
>> https://lists.trust
>> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
>> m&data=02%7C01%7Candrey.butok%40nxp.com%7C06837920c9bd44323
>> 6e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636
>> 984076614785023&sdata=CwIsfSfixxyMt0BjBQk2p0%2BrzebG2WeLVgAaD
>> bfl678%3D&reserved=0
>> --
>> TF-M mailing list
>> TF-M(a)lists.trustedfirmware.org
>> https://lists.trust
>> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
>> m&data=02%7C01%7Candrey.butok%40nxp.com%7C06837920c9bd44323
>> 6e908d705a48d92%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636
>> 984076614785023&sdata=CwIsfSfixxyMt0BjBQk2p0%2BrzebG2WeLVgAaD
>> bfl678%3D&reserved=0
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/tf-m
--
*Thomas Törnblom*, /Product Engineer/
IAR Systems AB
Box 23051, Strandbodgatan 1
SE-750 23 Uppsala, SWEDEN
Mobile: +46 76 180 17 80 Fax: +46 18 16 78 01
E-mail: thomas.tornblom(a)iar.com <mailto:thomas.tornblom@iar.com>
Website: www.iar.com <http://www.iar.com>
Twitter: www.twitter.com/iarsystems <http://www.twitter.com/iarsystems>
Pre-generated files are required for TFM IDE projects.
Please do not delete them, find other solution!
It can be solved by adding #if/#ifdef.
Thank you,
Andrej Butok
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of David Hu (Arm Technology China) via TF-M
Sent: Thursday, July 11, 2019 4:08 AM
To: Antonio De Angelis <Antonio.DeAngelis(a)arm.com>; tf-m(a)lists.trustedfirmware.org; Ken Liu (Arm Technology China) <Ken.Liu(a)arm.com>; Miklos Balint <Miklos.Balint(a)arm.com>
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] Common scatter files and templates
Hi Antonio, Ken, Miklos,
Currently, we use a preprocessor flag `TFM_MULTI_CORE_TOPOLOGY` to comment the veneer sections in the templates in multi-core topology. Each time before building, we have to run the Python script to generate new link script/scatter file with veneer disabled, to replace the existing ones.
It becomes more inconvenient as the number of developers and users on feature-twincpu branch grows.
As Chris proposed on https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Freview.tr…p;reserved=0, does it also make sense to directly update the "generated" linker script/scatter file as well, on feature-twincpu branch? `TFM_MULTI_CORE_TOPOLOGY` will be a common flag used in multi-core topology and will help resolve our urgent problem.
If the final improvement solution is completed on master branch, we will update the feature branch accordingly when merging it back to master branch.
Please let me know if there is a better option for feature-twincpu branch.
Thank you.
Best regards,
Hu Ziji
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Antonio De Angelis via TF-M
Sent: Thursday, July 11, 2019 3:53 AM
To: TF-M(a)lists.trustedfirmware.org; nd <nd(a)arm.com>
Subject: Re: [TF-M] Common scatter files and templates
Hi Chris,
you are right, that file is autogenerated from the template file but both are kept under source control. The reason for this is that the autogenerated file is not created at build time but by manually running the tfm_parse_manifest_list.py, which has to be run every time something in the manifest is changed, and the resulting autogenerated file is committed under source control as well.
On the other hand, the build system could be modified to run the parsers at build time so that the autogenerated files wouldn't have to be stored in source control, and we could keep only the template. These two alternatives are both equally valid in my view, but if there is strong consensus for the other we can discuss.
Thanks,
Antonio
________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Christopher Brand via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: 10 July 2019 19:50
To: TF-M(a)lists.trustedfirmware.org; Miklos Balint
Subject: [TF-M] Common scatter files and templates
Can somebody please help me understand this?
$ ls platform/ext/common/armclang/
tfm_common_s.sct tfm_common_s.sct.template $ ls platform/ext/common/gcc tfm_common_s.ld tfm_common_s.ld.template In both directories, both files are under source control, but the non-template files say that they're auto-generated:
/*********** WARNING: This is an auto-generated file. Do not edit! ***********/
It's unusual to see both the source file and the artifact under source control.
It seems that they're generated by tools/tfm_parse_manifest_list.py, but that doesn't seem to be run as part of the build, so when is it run?
Thanks,
Chris
This message and any attachments may contain confidential information from Cypress or its subsidiaries. If it has been received in error, please advise the sender and immediately delete this message.
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
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.
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
Hi Antonio, Ken, Miklos,
Currently, we use a preprocessor flag `TFM_MULTI_CORE_TOPOLOGY` to comment the veneer sections in the templates in multi-core topology. Each time before building, we have to run the Python script to generate new link script/scatter file with veneer disabled, to replace the existing ones.
It becomes more inconvenient as the number of developers and users on feature-twincpu branch grows.
As Chris proposed on https://review.trustedfirmware.org/c/trusted-firmware-m/+/1527, does it also make sense to directly update the "generated" linker script/scatter file as well, on feature-twincpu branch? `TFM_MULTI_CORE_TOPOLOGY` will be a common flag used in multi-core topology and will help resolve our urgent problem.
If the final improvement solution is completed on master branch, we will update the feature branch accordingly when merging it back to master branch.
Please let me know if there is a better option for feature-twincpu branch.
Thank you.
Best regards,
Hu Ziji
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Antonio De Angelis via TF-M
Sent: Thursday, July 11, 2019 3:53 AM
To: TF-M(a)lists.trustedfirmware.org; nd <nd(a)arm.com>
Subject: Re: [TF-M] Common scatter files and templates
Hi Chris,
you are right, that file is autogenerated from the template file but both are kept under source control. The reason for this is that the autogenerated file is not created at build time but by manually running the tfm_parse_manifest_list.py, which has to be run every time something in the manifest is changed, and the resulting autogenerated file is committed under source control as well.
On the other hand, the build system could be modified to run the parsers at build time so that the autogenerated files wouldn't have to be stored in source control, and we could keep only the template. These two alternatives are both equally valid in my view, but if there is strong consensus for the other we can discuss.
Thanks,
Antonio
________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Christopher Brand via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: 10 July 2019 19:50
To: TF-M(a)lists.trustedfirmware.org; Miklos Balint
Subject: [TF-M] Common scatter files and templates
Can somebody please help me understand this?
$ ls platform/ext/common/armclang/
tfm_common_s.sct tfm_common_s.sct.template $ ls platform/ext/common/gcc tfm_common_s.ld tfm_common_s.ld.template In both directories, both files are under source control, but the non-template files say that they're auto-generated:
/*********** WARNING: This is an auto-generated file. Do not edit! ***********/
It's unusual to see both the source file and the artifact under source control.
It seems that they're generated by tools/tfm_parse_manifest_list.py, but that doesn't seem to be run as part of the build, so when is it run?
Thanks,
Chris
This message and any attachments may contain confidential information from Cypress or its subsidiaries. If it has been received in error, please advise the sender and immediately delete this message.
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
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.
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi Chris,
you are right, that file is autogenerated from the template file but both are kept under source control. The reason for this is that the autogenerated file is not created at build time but by manually running the tfm_parse_manifest_list.py, which has to be run every time something in the manifest is changed, and the resulting autogenerated file is committed under source control as well.
On the other hand, the build system could be modified to run the parsers at build time so that the autogenerated files wouldn't have to be stored in source control, and we could keep only the template. These two alternatives are both equally valid in my view, but if there is strong consensus for the other we can discuss.
Thanks,
Antonio
________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Christopher Brand via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: 10 July 2019 19:50
To: TF-M(a)lists.trustedfirmware.org; Miklos Balint
Subject: [TF-M] Common scatter files and templates
Can somebody please help me understand this?
$ ls platform/ext/common/armclang/
tfm_common_s.sct tfm_common_s.sct.template
$ ls platform/ext/common/gcc
tfm_common_s.ld tfm_common_s.ld.template
In both directories, both files are under source control, but the non-template files say that they're auto-generated:
/*********** WARNING: This is an auto-generated file. Do not edit! ***********/
It's unusual to see both the source file and the artifact under source control.
It seems that they're generated by tools/tfm_parse_manifest_list.py, but that doesn't seem to be run as part of the build, so when is it run?
Thanks,
Chris
This message and any attachments may contain confidential information from Cypress or its subsidiaries. If it has been received in error, please advise the sender and immediately delete this message.
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
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.
Can somebody please help me understand this?
$ ls platform/ext/common/armclang/
tfm_common_s.sct tfm_common_s.sct.template
$ ls platform/ext/common/gcc
tfm_common_s.ld tfm_common_s.ld.template
In both directories, both files are under source control, but the non-template files say that they're auto-generated:
/*********** WARNING: This is an auto-generated file. Do not edit! ***********/
It's unusual to see both the source file and the artifact under source control.
It seems that they're generated by tools/tfm_parse_manifest_list.py, but that doesn't seem to be run as part of the build, so when is it run?
Thanks,
Chris
This message and any attachments may contain confidential information from Cypress or its subsidiaries. If it has been received in error, please advise the sender and immediately delete this message.
How would a git repo with some submodules preclude any of the things you mentioned? I guess my initial thought is that there would be an “uber” repo in which TFM, CMSIS and mbedcrypto would all be sub-modules.
There’s also the option of using cmake ExternalProject (https://cmake.org/cmake/help/latest/module/ExternalProject.html?highlight=e…)
Or west
https://pypi.org/project/west/
- k
> On Jul 10, 2019, at 8:47 AM, Ashutosh Singh via TF-M <tf-m(a)lists.trustedfirmware.org> wrote:
>
> Hi,
>
> Initial idea was to keep the external dependencies clearly visible (from code auditability point of view). With submodule we can't checkout the dependencies out of tree. Since the dependencies need to be checked out only once it was considered acceptable nuisance, until you do a pull and version of the dependencies have changed.
> 'repo' was considered as well, but repo tool doesn't work on windows(last I checked).
>
> Thanks,
> Ashu
>
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Kumar Gala via TF-M
> Sent: 10 July 2019 09:50
> To: Andrej Butok <andrey.butok(a)nxp.com>
> Cc: tf-m(a)lists.trustedfirmware.org
> Subject: Re: [TF-M] Using git submodules for dependencies?
>
> There can always be a fork of the sources kept in TF-M repos to handle the case of needing local modifications for some reason.
>
> - k
>
>> On Jul 10, 2019, at 3:48 AM, Andrej Butok via TF-M <tf-m(a)lists.trustedfirmware.org> wrote:
>>
>> Hi Kevin,
>>
>> Only if 100% of the external project source code is used without change.
>> Even if it is valid now, nobody will give you this guarantee in future.
>>
>> Regards,
>> Andrej
>>
>> -----Original Message-----
>> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Kevin Townsend via TF-M
>> Sent: Wednesday, July 10, 2019 10:41 AM
>> To: Thomas Törnblom via TF-M <tf-m(a)lists.trustedfirmware.org>
>> Subject: [TF-M] Using git submodules for dependencies?
>>
>> Hi,
>>
>> I'm currently working on integrating TF-M into Zephyr and getting TF-M working with QEMU. Part of that work is simplifying the setup and build process to generate a TF-M secure library.
>>
>> Was the idea of git submodules for dependencies considered and rejected?
>> Using sub-modules would reduce the number of setup steps required, and pair external dependency versions with specific TF-M commits/releases.
>>
>> There may be a valid reason this approach was rejected, but it seems like a sensible option on the surface?
>>
>> Best regards,
>> Kevin Townsend
>> --
>> TF-M mailing list
>> TF-M(a)lists.trustedfirmware.org
>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
>> --
>> TF-M mailing list
>> TF-M(a)lists.trustedfirmware.org
>> https://lists.trustedfirmware.org/mailman/listinfo/tf-m
>
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/tf-m
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi All,
I've pushed a set of patches for review which aims to add multi-image support to MCUBoot. It enables the Secure and Non-secure images
to be handled and updated separately by the bootloader. You can find the links of the reviews and more information in the following ticket:
https://developer.trustedfirmware.org/T421
Please feel free to review any of the patches.:)
Thanks,
David
Hi,
Initial idea was to keep the external dependencies clearly visible (from code auditability point of view). With submodule we can't checkout the dependencies out of tree. Since the dependencies need to be checked out only once it was considered acceptable nuisance, until you do a pull and version of the dependencies have changed.
'repo' was considered as well, but repo tool doesn't work on windows(last I checked).
Thanks,
Ashu
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Kumar Gala via TF-M
Sent: 10 July 2019 09:50
To: Andrej Butok <andrey.butok(a)nxp.com>
Cc: tf-m(a)lists.trustedfirmware.org
Subject: Re: [TF-M] Using git submodules for dependencies?
There can always be a fork of the sources kept in TF-M repos to handle the case of needing local modifications for some reason.
- k
> On Jul 10, 2019, at 3:48 AM, Andrej Butok via TF-M <tf-m(a)lists.trustedfirmware.org> wrote:
>
> Hi Kevin,
>
> Only if 100% of the external project source code is used without change.
> Even if it is valid now, nobody will give you this guarantee in future.
>
> Regards,
> Andrej
>
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Kevin Townsend via TF-M
> Sent: Wednesday, July 10, 2019 10:41 AM
> To: Thomas Törnblom via TF-M <tf-m(a)lists.trustedfirmware.org>
> Subject: [TF-M] Using git submodules for dependencies?
>
> Hi,
>
> I'm currently working on integrating TF-M into Zephyr and getting TF-M working with QEMU. Part of that work is simplifying the setup and build process to generate a TF-M secure library.
>
> Was the idea of git submodules for dependencies considered and rejected?
> Using sub-modules would reduce the number of setup steps required, and pair external dependency versions with specific TF-M commits/releases.
>
> There may be a valid reason this approach was rejected, but it seems like a sensible option on the surface?
>
> Best regards,
> Kevin Townsend
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/tf-m
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
There can always be a fork of the sources kept in TF-M repos to handle the case of needing local modifications for some reason.
- k
> On Jul 10, 2019, at 3:48 AM, Andrej Butok via TF-M <tf-m(a)lists.trustedfirmware.org> wrote:
>
> Hi Kevin,
>
> Only if 100% of the external project source code is used without change.
> Even if it is valid now, nobody will give you this guarantee in future.
>
> Regards,
> Andrej
>
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Kevin Townsend via TF-M
> Sent: Wednesday, July 10, 2019 10:41 AM
> To: Thomas Törnblom via TF-M <tf-m(a)lists.trustedfirmware.org>
> Subject: [TF-M] Using git submodules for dependencies?
>
> Hi,
>
> I'm currently working on integrating TF-M into Zephyr and getting TF-M working with QEMU. Part of that work is simplifying the setup and build process to generate a TF-M secure library.
>
> Was the idea of git submodules for dependencies considered and rejected?
> Using sub-modules would reduce the number of setup steps required, and pair external dependency versions with specific TF-M commits/releases.
>
> There may be a valid reason this approach was rejected, but it seems like a sensible option on the surface?
>
> Best regards,
> Kevin Townsend
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi Kevin,
Only if 100% of the external project source code is used without change.
Even if it is valid now, nobody will give you this guarantee in future.
Regards,
Andrej
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Kevin Townsend via TF-M
Sent: Wednesday, July 10, 2019 10:41 AM
To: Thomas Törnblom via TF-M <tf-m(a)lists.trustedfirmware.org>
Subject: [TF-M] Using git submodules for dependencies?
Hi,
I'm currently working on integrating TF-M into Zephyr and getting TF-M working with QEMU. Part of that work is simplifying the setup and build process to generate a TF-M secure library.
Was the idea of git submodules for dependencies considered and rejected?
Using sub-modules would reduce the number of setup steps required, and pair external dependency versions with specific TF-M commits/releases.
There may be a valid reason this approach was rejected, but it seems like a sensible option on the surface?
Best regards,
Kevin Townsend
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
Hi,
I'm currently working on integrating TF-M into Zephyr and getting TF-M
working with QEMU. Part of that work is simplifying the setup and build
process to generate a TF-M secure library.
Was the idea of git submodules for dependencies considered and rejected?
Using sub-modules would reduce the number of setup steps required, and pair
external dependency versions with specific TF-M commits/releases.
There may be a valid reason this approach was rejected, but it seems like a
sensible option on the surface?
Best regards,
Kevin Townsend
Hi,
The last patch for this task is pushed for review:
https://review.trustedfirmware.org/c/trusted-firmware-m/+/1487
Please help to review and the 'configs' directory would be the only place for holding configurations.
Thanks
-Ken
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken Liu
> (Arm Technology China) via TF-M
> Sent: Tuesday, June 25, 2019 2:02 PM
> To: TF-M(a)lists.trustedfirmware.org
> Cc: nd <nd(a)arm.com>
> Subject: [TF-M] [PLEASE READ] Move configuration files into specified directory
>
> Hi,
> Configurations has been moved into 'configs' directory. Please:
> - Update your build commands to build with configurations under 'configs'
> directory, check updated document: docs/user_guides/tfm_build_instruction.rst
> - If you want to push new configurations, please put new configurations under
> 'configs' directory.
>
> The dummy configurations under root directory will be removed soon so please
> DO UPDATE YOUR BUILD COMMAND!
>
> Thanks
>
> -Ken
>
> > -----Original Message-----
> > From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken
> > Liu (Arm Technology China) via TF-M
> > Sent: Tuesday, June 18, 2019 10:03 AM
> > To: TF-M(a)lists.trustedfirmware.org
> > Cc: nd <nd(a)arm.com>
> > Subject: Re: [TF-M] [RFC] Move configuration files into specified
> > directory
> >
> > Hi,
> > The patch has been pushed for a while and is going to be merged in one
> > week, please help to review it if you planned but still not have a look:
> > https://review.trustedfirmware.org/c/trusted-firmware-m/+/1234
> >
> > After this patch get merged, all new configurations created in root
> > directory will be rejected. Please create new configuration files under ./configs
> directory.
> > The existing fake configuration files under root directory will be
> > removed after CI setting changed.
> >
> > Thanks.
> >
> > -Ken
> >
> > > -----Original Message-----
> > > From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken
> > > Liu (Arm Technology China) via TF-M
> > > Sent: Tuesday, June 11, 2019 1:40 PM
> > > To: TF-M(a)lists.trustedfirmware.org
> > > Cc: nd <nd(a)arm.com>
> > > Subject: [TF-M] [RFC] Move configuration files into specified
> > > directory
> > >
> > > Hi,
> > > Since the number of configuration files is increasing, let’s move
> > > the configuration files (ConfigXXXX.cmake) into specified directory.
> > > This would reduces the files under root directory and makes the
> > > structure more clearer.
> > >
> > > I have created the issue and patch for it:
> > > https://developer.trustedfirmware.org/T394
> > > https://review.trustedfirmware.org/c/trusted-firmware-m/+/1234
> > >
> > > IMPORTANT NOTES:
> > > To be compatible with the existing building configurations, the
> > > existing configuration files have been forwarded into the
> > > corresponded configuration file under ./configs. Which means there
> > > are two set of configuration files under sources tree at current –
> > > but this will change soon. There is a warning while you are building
> > > with root configurations files: “Please use the configs available in
> > > the ./config sub-
> > directory.”
> > >
> > > So please:
> > >
> > > - If you are planning to create new configuration, create it under
> > > ./configs instead of root directory
> > > - The reference of configuration files under root directory will be
> > > removed soon, please change your build system setting to reference
> > > the configuration files put under ./configs
> > >
> > > Any feedbacks please reply this mail or put comments under the
> > > issue, thanks
> > > 😉
> > >
> > > -Ken
> > >
> > > --
> > > TF-M mailing list
> > > TF-M(a)lists.trustedfirmware.org
> > > https://lists.trustedfirmware.org/mailman/listinfo/tf-m
> > --
> > TF-M mailing list
> > TF-M(a)lists.trustedfirmware.org
> > https://lists.trustedfirmware.org/mailman/listinfo/tf-m
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi,
Is there a design guideline available for device driver which is working on secure side alongside SPM.
I do not want to plug my driver in TF-M due to latency considerations.
Basically my plan is to introduce non secure callable veneers for calling the interfaces of the driver which I am introducing.
Any thoughts on this will be helpful.
Regards
Manoj
Hi all,
I am proposing a couple of changes to the standard PSA headers in TF-M.
The first change is here: https://review.trustedfirmware.org/c/trusted-firmware-m/+/1458/
It renames the standard PSA headers in TF-M from psa_<api>.h to psa/<api>.h. TF-M defined headers are not affected. This change also tweaks a large number of #includes across the TF-M repo to use the new names. Any code maintained outside the TF-M repo that includes PSA headers from TF-M will also need to be changed to use the new names in #includes once this is merged.
The benefit of this change is that is brings the names of the headers in TF-M into agreement with the names used in the PSA Firmware Framework. It will also make running the PSA API tests easier, as the step of copying the PSA headers to the standard names is no longer required.
The second change is here: https://review.trustedfirmware.org/c/trusted-firmware-m/+/1459/
It adds a copy of the psa/error.h header, which contains new standard error codes intended to be used by the SPM and RoT Services. The "PSA_SUCCESS" and "psa_status_t" definitions are also moved to this header, and it is included by psa/client.h and psa/service.h.
This change should have minimal impact on other code -- no code is immediately changed to use the new error codes, but upstreaming the header now allows services to start using the new error codes when needed.
Kind regards,
Jamie
Hi,
We are now involving secure partition runtime library into tf-m design.
While implementing isolation level 2, some runtime APIs (printf e.g.) calling would cause fault, because it is accessing global variables (The STDIO instance) or need to manipulate hardware (UART). So we shutdown calling to these APIs - it is lucky that the secure service logic does not rely on these functions.
This leads to the thinking of runtime APIs implementation - not only C runtime mentioned in PSA FF specification, but also developer APIs for service client. These APIs are definitely necessary and need to work well under all isolation levels. Since we cannot put multiple runtime copies into secure partitions (waste and not supported by single firmware linker design), shared runtime library looks like the only choice.
Here we introduce the design of a runtime library for secure partition usage. We aligned the concepts with PSA FF and it does not break the mandatory requirements of isolation, and proposes designs for some dedicated APIs. I know there may be similar runtime implementations somewhere, while I just want to implement the functions quick to make out a solution before other library searching and investigating stage (which may spent quite much time).
The key requirements of this runtime library are:
- This library is protected as Read-Only + executable by MPU, so all other data will not be included into protected region. This point is very important.
- For those session/handle based API set, necessary supporting from tooling or other parts needs to be involved.
Please help to review the design document at: https://review.trustedfirmware.org/c/trusted-firmware-m/+/1425
Feel free to add you as reviewers and comment something; and you can reply to this thread, too. Any new thinking is worthy of being discussed.
Thanks.
-Ken
Hi,
You can find here a useful script which can be used to verify an initial attestation token(IAT) on server side when it is retrieved from the IoT device:
https://developer.trustedfirmware.org/T411
BR,
Tamas
Hi Antonio,
Sorry, ignore the previous e-mail.
Yes, tfm_mbedcrypto_include.h was mixed up with tfm_mbedcrypto_config.h
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Antonio De Angelis via TF-M
Sent: Thursday, June 27, 2019 12:48 PM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] tfm_mbedcrypto_include.h
Hi Andrej,
tfm_mbedcrypto_include.h is a file which is private to TF-M Crypto service and it's ok for it to be included directly by the service modules.
I think what you are referring is platform/ext/common/tfm_mbedcrypto_config.h, which is indeed the configuration of the Mbed Crypto library (similar to what was done with the configuration of the Mbed TLS library), and as far as I can see is not included directly by any module.
Thanks,
Antonio
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: 27 June 2019 11:11
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] tfm_mbedcrypto_include.h
Hello,
The following TFM files contain direct include of tfm_mbedcrypto_include.h", which may cause conflict with a platform/project-specific mbed-crypto configuration:
\secure_fw\services\crypto\crypto_aead.c(16)
\secure_fw\services\crypto\crypto_alloc.c(11)
\secure_fw\services\crypto\crypto_alloc.c(11)
\secure_fw\services\crypto\crypto_cipher.c(16)
\secure_fw\services\crypto\crypto_generator.c(16)
\secure_fw\services\crypto\crypto_hash.c(16)
\secure_fw\services\crypto\crypto_key.c(16)
\secure_fw\services\crypto\crypto_init.c(8)
\secure_fw\services\crypto\crypto_mac.c(16)
Guess, it have to be replaced by:
#if !defined(MBEDTLS_CONFIG_FILE)
#include "tfm_mbedcrypto_include.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
As it is used by mbed-crypto and previous version of TFM.
Thanks,
Andrej Butok
SW Tech Lead
Security & Connectivity, Microcontrollers NXP Semiconductors
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
Hi Andrej,
tfm_mbedcrypto_include.h is a file which is private to TF-M Crypto service and it's ok for it to be included directly by the service modules.
I think what you are referring is platform/ext/common/tfm_mbedcrypto_config.h, which is indeed the configuration of the Mbed Crypto library (similar to what was done with the configuration of the Mbed TLS library), and as far as I can see is not included directly by any module.
Thanks,
Antonio
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: 27 June 2019 11:11
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] tfm_mbedcrypto_include.h
Hello,
The following TFM files contain direct include of tfm_mbedcrypto_include.h", which may cause conflict with a platform/project-specific mbed-crypto configuration:
\secure_fw\services\crypto\crypto_aead.c(16)
\secure_fw\services\crypto\crypto_alloc.c(11)
\secure_fw\services\crypto\crypto_alloc.c(11)
\secure_fw\services\crypto\crypto_cipher.c(16)
\secure_fw\services\crypto\crypto_generator.c(16)
\secure_fw\services\crypto\crypto_hash.c(16)
\secure_fw\services\crypto\crypto_key.c(16)
\secure_fw\services\crypto\crypto_init.c(8)
\secure_fw\services\crypto\crypto_mac.c(16)
Guess, it have to be replaced by:
#if !defined(MBEDTLS_CONFIG_FILE)
#include "tfm_mbedcrypto_include.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
As it is used by mbed-crypto and previous version of TFM.
Thanks,
Andrej Butok
SW Tech Lead
Security & Connectivity, Microcontrollers NXP Semiconductors
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hello,
The following TFM files contain direct include of tfm_mbedcrypto_include.h", which may cause conflict with a platform/project-specific mbed-crypto configuration:
\secure_fw\services\crypto\crypto_aead.c(16)
\secure_fw\services\crypto\crypto_alloc.c(11)
\secure_fw\services\crypto\crypto_alloc.c(11)
\secure_fw\services\crypto\crypto_cipher.c(16)
\secure_fw\services\crypto\crypto_generator.c(16)
\secure_fw\services\crypto\crypto_hash.c(16)
\secure_fw\services\crypto\crypto_key.c(16)
\secure_fw\services\crypto\crypto_init.c(8)
\secure_fw\services\crypto\crypto_mac.c(16)
Guess, it have to be replaced by:
#if !defined(MBEDTLS_CONFIG_FILE)
#include "tfm_mbedcrypto_include.h"
#else
#include MBEDTLS_CONFIG_FILE
#endif
As it is used by mbed-crypto and previous version of TFM.
Thanks,
Andrej Butok
SW Tech Lead
Security & Connectivity, Microcontrollers
NXP Semiconductors
Thank you for merging my cleanup in T398.
I have a set of IAR build related files that I would like to push, both
new and modified cmake files and startup and linker scripts for the
Musca A board.
There is still some work needed on the linker scripts to get everything
fully functional but I can load and debug the secure and non secure
images, and the non-secure image will start and execute the idle thread.
I have not tested mcuboot although it appears to build properly.
We have chip vendors that are eagerly awaiting our port and I would like
to push this as "experimental".
Would this be OK?
/Thomas
--
*Thomas Törnblom*, /Product Engineer/
IAR Systems AB
Box 23051, Strandbodgatan 1
SE-750 23 Uppsala, SWEDEN
Mobile: +46 76 180 17 80 Fax: +46 18 16 78 01
E-mail: thomas.tornblom(a)iar.com <mailto:thomas.tornblom@iar.com>
Website: www.iar.com <http://www.iar.com>
Twitter: www.twitter.com/iarsystems <http://www.twitter.com/iarsystems>
Hi Andrej,
We shall avoid adding IDE specific workarounds to the code.
I see many possible better solutions to this problem:
1. All IDEs are capable to "ignore" files present in the working copy
but not part of the build. You could try this feature.
2. Irrelevant files can be deleted from the workspace by using a script.
3. Using a different generator of CMake could allow to generate a
project format which your IDE can import. (See
https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html)
4. Using CMAKE_EXPORT_COMPILE_CMMANDS will make CMake to
generate a json file listing all C files part of the build with the build
command needed to compile them. It could be relative simple to
write a Python script to create an IDE project or to update an
existing one with build settings. (See:
https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_COMPILE_COMMANDS.…)
5. Long term a generators could be up streamed to CMake to add
Support for you IDE. Please contact the IDE vendor with this request.
6. The IDE could be updated to co-operate with "cmake server" to
allow integration with cmake based build systems. Again please
contact the IDE vendor with this request.
/George
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: 18 June 2019 08:23
To: Miklos Balint <Miklos.Balint(a)arm.com>; Thomas Törnblom <thomas.tornblom(a)iar.com>
Cc: tf-m(a)lists.trustedfirmware.org
Subject: Re: [TF-M] Feature request
Hi Miklos,
One more feature request:
3) Using separate files in TFM without #ifdef is causing issues for IDE projects, and requires creation of separate projects/targets (with different file set) per each feature combination.
We are using IDEs (IAR, MCUx, Keil), so we have to add missing #ifdef to the original TFM source code.
Please use #if/#ifdef in TFM, everywhere were it is needed.
Thanks,
Andrej
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Miklos Balint via TF-M
Sent: Monday, June 17, 2019 5:31 PM
To: Thomas Törnblom <thomas.tornblom(a)iar.com>; tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] Feature request
Hi Thomas,
I see no major issue with either suggestion, I think it makes sense to introduce improvements in these matters.
For issue #1 it makes very much sense to have a shared header file for all components that rely on these definitions. I don't recall any reason why that should not be possible, it's simply something that hasn't been done due to limited bandwidth for such clean-up of the code.
For issue #2 we have had some internal discussions on the best way to handle compiler dependencies, and the suggestion I liked the most is similar to your suggestion below, but instead of having a single header file, having a compiler folder with each supported toolchain as a separate sub-folder, each defining their own version of tfm_compiler.h to provide the definitions required by TF-M.
The compiler-specific cmake file can then simply point to the appropriate location for the compiler-specific inclusion, avoiding compiler-specific ifdef:s.
Let me know your thoughts on this approach
Thanks and kindest regards
Miklos
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Thomas Törnblom via TF-M
Sent: 13 June 2019 16:11
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] Feature request
While working on porting TF-M to the IAR toolchain, I've run into a couple of issues I'd like to discuss.
1) The duplicated REGION/REGION_NAME/REGION_DECLARE macros.
Why are these not defined in an include file instead of being defined in eight different c files?
I see that they are also defined in spm_db.h, but that is only included in spm related files.
2) I suggest adding a toolchain related include file that should be included in every source file that is part of TF-M.
This could be something similar to cmsis_compiler.h, where a toolchain vendor could add stuff that only relates to a specific toolchain.
In our case that could include things like:
---
#ifdef __ICCARM__
#define $$ZI$$Limit $$Limit
#define $$ZI$$Base $$Base
#define Image$$
#endif
---
Ideas?
/Thomas
--
*Thomas Törnblom*, /Product Engineer/
IAR Systems AB
Box 23051, Strandbodgatan 1
SE-750 23 Uppsala, SWEDEN
Mobile: +46 76 180 17 80 Fax: +46 18 16 78 01
E-mail: thomas.tornblom(a)iar.com <mailto:thomas.tornblom@iar.com>
Website: https://eur01.safelinks.protection.outlook.com/?url=www.iar.com&data=02… <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.iar.co…>
Twitter: https://eur01.safelinks.protection.outlook.com/?url=www.twitter.com%2Fiarsy… <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.twitte…>
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi,
Configurations has been moved into 'configs' directory. Please:
- Update your build commands to build with configurations under 'configs' directory, check updated document: docs/user_guides/tfm_build_instruction.rst
- If you want to push new configurations, please put new configurations under 'configs' directory.
The dummy configurations under root directory will be removed soon so please DO UPDATE YOUR BUILD COMMAND!
Thanks
-Ken
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken Liu
> (Arm Technology China) via TF-M
> Sent: Tuesday, June 18, 2019 10:03 AM
> To: TF-M(a)lists.trustedfirmware.org
> Cc: nd <nd(a)arm.com>
> Subject: Re: [TF-M] [RFC] Move configuration files into specified directory
>
> Hi,
> The patch has been pushed for a while and is going to be merged in one week,
> please help to review it if you planned but still not have a look:
> https://review.trustedfirmware.org/c/trusted-firmware-m/+/1234
>
> After this patch get merged, all new configurations created in root directory will
> be rejected. Please create new configuration files under ./configs directory.
> The existing fake configuration files under root directory will be removed after
> CI setting changed.
>
> Thanks.
>
> -Ken
>
> > -----Original Message-----
> > From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken
> > Liu (Arm Technology China) via TF-M
> > Sent: Tuesday, June 11, 2019 1:40 PM
> > To: TF-M(a)lists.trustedfirmware.org
> > Cc: nd <nd(a)arm.com>
> > Subject: [TF-M] [RFC] Move configuration files into specified
> > directory
> >
> > Hi,
> > Since the number of configuration files is increasing, let’s move the
> > configuration files (ConfigXXXX.cmake) into specified directory.
> > This would reduces the files under root directory and makes the
> > structure more clearer.
> >
> > I have created the issue and patch for it:
> > https://developer.trustedfirmware.org/T394
> > https://review.trustedfirmware.org/c/trusted-firmware-m/+/1234
> >
> > IMPORTANT NOTES:
> > To be compatible with the existing building configurations, the
> > existing configuration files have been forwarded into the corresponded
> > configuration file under ./configs. Which means there are two set of
> > configuration files under sources tree at current – but this will
> > change soon. There is a warning while you are building with root
> > configurations files: “Please use the configs available in the ./config sub-
> directory.”
> >
> > So please:
> >
> > - If you are planning to create new configuration, create it under
> > ./configs instead of root directory
> > - The reference of configuration files under root directory will be
> > removed soon, please change your build system setting to reference the
> > configuration files put under ./configs
> >
> > Any feedbacks please reply this mail or put comments under the issue,
> > thanks
> > 😉
> >
> > -Ken
> >
> > --
> > TF-M mailing list
> > TF-M(a)lists.trustedfirmware.org
> > https://lists.trustedfirmware.org/mailman/listinfo/tf-m
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi All,
Not sure if everyone knows that there is an initial deployment of TF-M CI (Continuous Integration) system. It tests every patch that gets submitted in TF-M gerrit.
Read about the CI system and find the relevant links in this blog - https://www.trustedfirmware.org/blog/trusted-firmware-open-ci-update/
Thanks,
Shebu
If the objective of assigning it to TEST_PASSED before the test is that it becomes the default final answer (i.e. unless it gets reassigned to TEST_FAILED the final result remains this assignment) then it should absolutely be set to TEST_PASSED at startup.
thanks,
Christian.
________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Jamie Fox via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: Wednesday, June 19, 2019 6:00 AM
To: Thomas Törnblom; tf-m(a)lists.trustedfirmware.org
Cc: nd
Subject: Re: [TF-M] T398: Initial support for IAR Embedded Workbench for Arm tool chain
Hi Thomas,
Personally I would avoid the type cast too. But to turn your dilemma into a trilemma, there is a third possible solution too -- you could remove the `{0}` initialiser from the initialiser list. Then the last member of the struct will be initialised implicitly the same way as a static object (i.e. to zero).
Best wishes,
Jamie
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Thomas Törnblom via TF-M
Sent: 19 June 2019 13:05
To: tf-m(a)lists.trustedfirmware.org
Subject: Re: [TF-M] T398: Initial support for IAR Embedded Workbench for Arm tool chain
I get lots of warnings about type mismatch for enums.
I have fixed some of them where it seems natural, but I need to discuss the approach for fixing these:
---
[ 37%] Building C object
test/CMakeFiles/tfm_secure_tests.dir/suites/invert/secure/invert_s_interface_testsuite.o
"Invert with valid buffer", {0} },
^
"C:\Users\thomasto\Projects\tf-m4\trusted-firmware-m\test\suites\invert\secure\invert_s_interface_testsuite.c",20
Warning[Pe188]:
enumerated type mixed with another type
"Invert with invalid buffer", {0} },
^
"C:\Users\thomasto\Projects\tf-m4\trusted-firmware-m\test\suites\invert\secure\invert_s_interface_testsuite.c",22
Warning[Pe188]:
enumerated type mixed with another type
---
The issue is that the "{0}" is the initializer for the enum test_status_t "val" below:
---
enum test_status_t {
TEST_PASSED = 0, /*!< Test has passed */
TEST_FAILED = 1, /*!< Test has failed */ };
struct test_result_t {
enum test_status_t val; /*!< Test result \ref test_status_t */
const char *info_msg; /*!< Information message to show in case of
* failure
*/
const char *filename; /*!< Filename where the failure has occured */
uint32_t line; /*!< Line where the failure has occured */ };
---
I can eliminate the warnings by either casting the "0" to enum test_status_t, or replace the 0 with "TEST_PASSED". Personally I would prefer to avoid having a type cast, but initializing the value to "TEST_PASSED" may seem to indicate that the test has passed even before having been run.
Comments?
/Thomas
--
*Thomas Törnblom*, /Product Engineer/
IAR Systems AB
Box 23051, Strandbodgatan 1
SE-750 23 Uppsala, SWEDEN
Mobile: +46 76 180 17 80 Fax: +46 18 16 78 01
E-mail: thomas.tornblom(a)iar.com <mailto:thomas.tornblom@iar.com>
Website: www.iar.com<http://www.iar.com> <http://www.iar.com>
Twitter: www.twitter.com/iarsystems<http://www.twitter.com/iarsystems> <http://www.twitter.com/iarsystems>
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
This message and any attachments may contain confidential information from Cypress or its subsidiaries. If it has been received in error, please advise the sender and immediately delete this message.
Hi Thomas,
Personally I would avoid the type cast too. But to turn your dilemma into a trilemma, there is a third possible solution too -- you could remove the `{0}` initialiser from the initialiser list. Then the last member of the struct will be initialised implicitly the same way as a static object (i.e. to zero).
Best wishes,
Jamie
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Thomas Törnblom via TF-M
Sent: 19 June 2019 13:05
To: tf-m(a)lists.trustedfirmware.org
Subject: Re: [TF-M] T398: Initial support for IAR Embedded Workbench for Arm tool chain
I get lots of warnings about type mismatch for enums.
I have fixed some of them where it seems natural, but I need to discuss the approach for fixing these:
---
[ 37%] Building C object
test/CMakeFiles/tfm_secure_tests.dir/suites/invert/secure/invert_s_interface_testsuite.o
"Invert with valid buffer", {0} },
^
"C:\Users\thomasto\Projects\tf-m4\trusted-firmware-m\test\suites\invert\secure\invert_s_interface_testsuite.c",20
Warning[Pe188]:
enumerated type mixed with another type
"Invert with invalid buffer", {0} },
^
"C:\Users\thomasto\Projects\tf-m4\trusted-firmware-m\test\suites\invert\secure\invert_s_interface_testsuite.c",22
Warning[Pe188]:
enumerated type mixed with another type
---
The issue is that the "{0}" is the initializer for the enum test_status_t "val" below:
---
enum test_status_t {
TEST_PASSED = 0, /*!< Test has passed */
TEST_FAILED = 1, /*!< Test has failed */ };
struct test_result_t {
enum test_status_t val; /*!< Test result \ref test_status_t */
const char *info_msg; /*!< Information message to show in case of
* failure
*/
const char *filename; /*!< Filename where the failure has occured */
uint32_t line; /*!< Line where the failure has occured */ };
---
I can eliminate the warnings by either casting the "0" to enum test_status_t, or replace the 0 with "TEST_PASSED". Personally I would prefer to avoid having a type cast, but initializing the value to "TEST_PASSED" may seem to indicate that the test has passed even before having been run.
Comments?
/Thomas
--
*Thomas Törnblom*, /Product Engineer/
IAR Systems AB
Box 23051, Strandbodgatan 1
SE-750 23 Uppsala, SWEDEN
Mobile: +46 76 180 17 80 Fax: +46 18 16 78 01
E-mail: thomas.tornblom(a)iar.com <mailto:thomas.tornblom@iar.com>
Website: www.iar.com <http://www.iar.com>
Twitter: www.twitter.com/iarsystems <http://www.twitter.com/iarsystems>
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
I get lots of warnings about type mismatch for enums.
I have fixed some of them where it seems natural, but I need to discuss
the approach for fixing these:
---
[ 37%] Building C object
test/CMakeFiles/tfm_secure_tests.dir/suites/invert/secure/invert_s_interface_testsuite.o
"Invert with valid buffer", {0} },
^
"C:\Users\thomasto\Projects\tf-m4\trusted-firmware-m\test\suites\invert\secure\invert_s_interface_testsuite.c",20
Warning[Pe188]:
enumerated type mixed with another type
"Invert with invalid buffer", {0} },
^
"C:\Users\thomasto\Projects\tf-m4\trusted-firmware-m\test\suites\invert\secure\invert_s_interface_testsuite.c",22
Warning[Pe188]:
enumerated type mixed with another type
---
The issue is that the "{0}" is the initializer for the enum
test_status_t "val" below:
---
enum test_status_t {
TEST_PASSED = 0, /*!< Test has passed */
TEST_FAILED = 1, /*!< Test has failed */
};
struct test_result_t {
enum test_status_t val; /*!< Test result \ref test_status_t */
const char *info_msg; /*!< Information message to show in case of
* failure
*/
const char *filename; /*!< Filename where the failure has occured */
uint32_t line; /*!< Line where the failure has occured */
};
---
I can eliminate the warnings by either casting the "0" to enum
test_status_t, or replace the 0 with "TEST_PASSED". Personally I would
prefer to avoid having a type cast, but initializing the value to
"TEST_PASSED" may seem to indicate that the test has passed even before
having been run.
Comments?
/Thomas
--
*Thomas Törnblom*, /Product Engineer/
IAR Systems AB
Box 23051, Strandbodgatan 1
SE-750 23 Uppsala, SWEDEN
Mobile: +46 76 180 17 80 Fax: +46 18 16 78 01
E-mail: thomas.tornblom(a)iar.com <mailto:thomas.tornblom@iar.com>
Website: www.iar.com <http://www.iar.com>
Twitter: www.twitter.com/iarsystems <http://www.twitter.com/iarsystems>
Just FYI
The problem has been solved. The main issue was caused by not correct integration of mbedCrypto on our side.
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: Friday, June 14, 2019 5:12 PM
To: Ken Liu (Arm Technology China) <Ken.Liu(a)arm.com>
Cc: tf-m(a)lists.trustedfirmware.org
Subject: Re: [TF-M] Is TFM_PSA_API broken?
Just FYI:
Downgraded to commit SHA-1: 25e2b2dba5d7eb3ba0da14384a6c8240278f5c15 (Crypto: Implement additional PSA Crypto APIs).
It becomes much better, but finally goes to the assert in some time (tfm_thrd_context_switch:170). Will continue next week.
The terminal log:
Sec Thread] Secure image initializing!
[Sec Thread] hello! this is ipc client test sp!
[Sec Thread] Connect success!
[Sec Thread] Call success!
#### Execute test suites for the Secure area #### Running Test Suite PSA protected storage S interface tests (TFM_SST_TEST_2XXX)...
> Executing 'TFM_SST_TEST_2001'
Description: 'Set interface'
TEST PASSED!
> Executing 'TFM_SST_TEST_2002'
Description: 'Set interface with create flags'
TEST PASSED!
> Executing 'TFM_SST_TEST_2003'
Description: 'Set interface with NULL data pointer'
TEST PASSED!
> Executing 'TFM_SST_TEST_2004'
Description: 'Set interface with invalid data length'
TEST PASSED!
> Executing 'TFM_SST_TEST_2005'
Description: 'Set interface with write once UID'
TEST PASSED!
> Executing 'TFM_SST_TEST_2006'
Description: 'Get interface with valid data'
TEST PASSED!
> Executing 'TFM_SST_TEST_2007'
Description: 'Get interface with zero data length'
TEST PASSED!
> Executing 'TFM_SST_TEST_2008'
Description: 'Get interface with invalid UIDs'
TEST PASSED!
> Executing 'TFM_SST_TEST_2009'
Description: 'Get interface with invalid data lengths and offsets'
TEST PASSED!
> Executing 'TFM_SST_TEST_2010'
Description: 'Get interface with NULL data pointer'
TEST PASSED!
> Executing 'TFM_SST_TEST_2011'
Description: 'Get info interface with write once UID'
TEST PASSED!
> Executing 'TFM_SST_TEST_2012'
Description: 'Get info interface with valid UID'
TEST PASSED!
> Executing 'TFM_SST_TEST_2013'
Description: 'Get info interface with invalid UIDs'
TEST PASSED!
> Executing 'TFM_SST_TEST_2014'
Description: 'Get info interface with NULL info pointer'
TEST PASSED!
> Executing 'TFM_SST_TEST_2015'
Description: 'Remove interface with valid UID'
TEST PASSED!
> Executing 'TFM_SST_TEST_2016'
Description: 'Remove interface with write once UID'
TEST PASSED!
> Executing 'TFM_SST_TEST_2017'
Description: 'Remove interface with invalid UID'
TEST PASSED!
> Executing 'TFM_SST_TEST_2018'
Description: 'Block compaction after remove'
TEST PASSED!
> Executing 'TFM_SST_TEST_2019'
Description: 'Multiple partial gets'
TEST PASSED!
> Executing 'TFM_SST_TEST_2020'
Description: 'Multiple sets to same UID from same thread'
TEST PASSED!
> Executing 'TFM_SST_TEST_2021'
Description: 'Get support interface'
TEST PASSED!
TESTSUITE PASSED!
Running Test Suite SST reliability tests (TFM_SST_TEST_3XXX)...
> Executing 'TFM_SST_TEST_3001'
Description: 'repetitive sets and gets in/from an asset'
> Iteration 15 of 15
TEST PASSED!
> Executing 'TFM_SST_TEST_3002'
Description: 'repetitive sets, gets and removes'
> Iteration 15 of 15
TEST PASSED!
TESTSUITE PASSED!
Running Test Suite Crypto secure interface tests (TFM_CRYPTO_TEST_5XXX)...
> Executing 'TFM_CRYPTO_TEST_5001'
Description: 'Secure Key management interface'
Assert:tfm_thrd_context_switch:170
From: Andrej Butok
Sent: Friday, June 14, 2019 4:14 PM
To: Ken Liu (Arm Technology China) <Ken.Liu(a)arm.com>
Cc: tf-m(a)lists.trustedfirmware.org
Subject: RE: Is TFM_PSA_API broken?
Hi Ken,
> Please check your modification in SST partition
No modifications from my side.
As it becomes wasting of time, a debugging is not consistent and looks like uninitialized variable, stack or something else.
I have decided to find a TFM commit which caused this abnormal behavior.
So far, it occurs in a commit between:
NOT WORKING: SHA-1: 122360ffb1e7278406183714249afefcb2184488 * Attest: Replace example asymmetric key-pair
WORKING: SHA-1: 4743e6731b0fe8a00ceebfd74da098c7676ac6e0 * Crypto: Add IPC compatibility
Thanks,
Andrej
From: Ken Liu (Arm Technology China) <mailto:Ken.Liu@arm.com>
Sent: Friday, June 14, 2019 4:00 PM
To: Andrej Butok <mailto:andrey.butok@nxp.com>
Cc: mailto:tf-m@lists.trustedfirmware.org; nd <mailto:nd@arm.com>
Subject: Re: Is TFM_PSA_API broken?
Hi Andrej,
As I said, that workaround only works for specified case. Debugging these failed cases with this patch applied will lead you into heavy core debugging.
We need to find out the root cause, why the assert is triggered?
There is no reason that all partitions go into block state, unless there are some improper modification in core or secure partitions.
Please check your modification in SST partition, try to print something in your SST thread, to see why the thread keeps in block state.
If a client calls psa_connect/psa_all, SPM would activate the partition into running state with function tfm_spm_send_event().
The correct call routine should be (psa_call has the similar routine):
tfm_sst_test_2001->psa_connect->...->SVC_Handler->tfm_svcall_psa_connect->tfm_spm_send_event->....-> (your partition thread).
Please remove the workaround patch, and try to debug to see if the call routine is correct.
Thanks.
-Ken
________________________________________
From: Andrej Butok <mailto:andrey.butok@nxp.com>
Sent: Friday, June 14, 2019 8:13 PM
To: Ken Liu (Arm Technology China)
Cc: mailto:tf-m@lists.trustedfirmware.org
Subject: RE: Is TFM_PSA_API broken?
Hi Ken,
Your patch/fix helped, so now there is no stuck in assert.
But all regression tests are failed:
#### Execute test suites for the Secure area #### Running Test Suite PSA protected storage S interface tests (TFM_SST_TEST_2XXX)...
> Executing 'TFM_SST_TEST_2001'
Description: 'Set interface'
Set should not fail with valid UID (Failed at ../../../../../../../middleware/tfm/test/suites/sst/secure/psa_ps_s_interface_testsuite.c:153)
TEST FAILED!
> Executing 'TFM_SST_TEST_2002'
Description: 'Set interface with create flags'
Set should not fail with no flags (Failed at ../../../../../../../middleware/tfm/test/suites/sst/secure/psa_ps_s_interface_testsuite.c:199)
TEST FAILED!
> Executing 'TFM_SST_TEST_2003'
Description: 'Set interface with NULL data pointer'
Set should succeed with NULL data pointer and zero length (Failed at ../../../../../../../middleware/tfm/test/suites/sst/secure/psa_ps_s_interface_testsuite.c:243)
TEST FAILED!
Will try to investigate...
-----Original Message-----
From: TF-M <mailto:tf-m-bounces@lists.trustedfirmware.org> On Behalf Of Ken Liu (Arm Technology China) via TF-M
Sent: Friday, June 14, 2019 10:32 AM
To: mailto:TF-M@lists.trustedfirmware.org
Cc: nd <mailto:nd@arm.com>
Subject: Re: [TF-M] Is TFM_PSA_API broken?
Hi Andrej,
tfm_thrd_context_switch() does not want to thread to be running is NULL. And actually it should never happen in existing implement unless IRQ is involved.
Here is a patch for fixing this, but I am not sure if you are under the same case we met:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Freview.tr…
I am curious about your environment, at least one partition will be running in latest master branch.
Can you share me your changes? Are your using original TF-M and which configuration file you are using?
Thanks.
-Ken
> -----Original Message-----
> From: TF-M <mailto:tf-m-bounces@lists.trustedfirmware.org> On Behalf
> Of Andrej Butok via TF-M
> Sent: Friday, June 14, 2019 4:15 PM
> To: Antonio De Angelis <mailto:Antonio.DeAngelis@arm.com>
> Cc: mailto:tf-m@lists.trustedfirmware.org
> Subject: Re: [TF-M] Is TFM_PSA_API broken?
>
> Hi Antonio,
>
>
>
> So, I have disabled Platform and Log services.
>
> Also, TFM_NS_CLIENT_IDENTIFICATION have to be undefined for IPC. Is
> this correct?
>
> After that it becomes compliable.
>
>
>
> But when starting the regression tests, I am getting assert in
> tfm_thrd_conext_switch(). Terminal log:
>
>
>
> [Sec Thread] Secure image initializing!
>
>
>
> NS code is running...
>
>
>
> #### Execute test suites for the Secure area ####
>
> Running Test Suite PSA protected storage S interface tests
> (TFM_SST_TEST_2XXX)...
>
> > Executing 'TFM_SST_TEST_2001'
>
> Description: 'Set interface'
>
> Assert:tfm_thrd_context_switch:170
>
>
>
> So I am stuck now, and no matter what to use the IPC or the Function
> API approach.
>
> Probably, something serious happened during last two weeks (before it
> worked), may be in platform dependent code.
>
> NOTE: I am using a different platform LPC55S69 and IDE approach (not cmake).
>
>
>
> Any tips?
>
>
>
> Thanks,
>
> Andrej
>
>
>
>
>
> -----Original Message-----
> From: TF-M <mailto:tf-m-bounces@lists.trustedfirmware.org> On Behalf
> Of Antonio De Angelis via TF-M
> Sent: Thursday, June 13, 2019 5:00 PM
> To: mailto:tf-m@lists.trustedfirmware.org
> Cc: nd <mailto:nd@arm.com>
> Subject: Re: [TF-M] Is TFM_PSA_API broken?
>
>
>
> Hi Andrej,
>
>
>
> "Should the Log and Platform services be disabled for IPC?"
>
>
>
> Yes, platform service and Audit Log service do not support IPC. You
> can see from existing IPC - specific build configurations which flags
> need to be set to make sure these two services are not built when IPC builds are selected.
>
>
>
> Thanks,
>
> Antonio
>
>
>
> -----Original Message-----
>
> From: TF-M
> <mailto:tf-m-bounces@lists.trustedfirmware.org%3cmailto:tf-m-%0b>
> mailto:bounces@lists.trustedfirmware.org>> On Behalf Of Andrej Butok
> via TF-M
>
> Sent: 13 June 2019 15:46
>
> To:
> mailto:tf-m@lists.trustedfirmware.org%3cmailto:tf-m@lists.trustedfirmw
> are.org>
>
> Subject: [TF-M] Is TFM_PSA_API broken?
>
>
>
> Hello,
>
>
>
> I use absolutely the latest TF-M (SHA-1:
> 81fb08cd66c1037a5e6c57e46ad5946bfc8a0d0e)
>
>
>
> I am trying to run the regression-test application using IPC API
> (TFM_PSA_API is
> defined) The application is compliable with errors:
>
> Error: L6218E: Undefined symbol tfm_spm_request_reset_vote (referred
> from platform_sp.o).
>
> Error: L6218E: Undefined symbol tfm_core_get_caller_client_id
> (referred from audit_core.o).
>
> Not enough information to list image symbols.
>
>
>
> It is caused by the fact that the platform and audit log services are
> using the functions (printed in the log) which are not
> available/disabled when TFM_PSA_API is defined.
>
> Is it known issue?
>
> Any suggestions?
>
> Should the Log and Platform services be disabled for IPC?
>
>
>
> Thanks,
>
> Andrej
>
> --
>
> TF-M mailing list
>
> mailto:TF-M@lists.trustedfirmware.org%3cmailto:TF-M@lists.trustedfirmw
> are.org>
>
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.trust
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C4416c02536e54d420
> bdc08d6f00fc1ff%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6369
> 60347799555976&sdata=1zhWkIyBjqiiTqtf0tYdtxRACLofQ%2B5Po6tC3cqW
> Fis%3D&reserved=0
>
> --
>
> TF-M mailing list
>
> mailto:TF-M@lists.trustedfirmware.org%3cmailto:TF-M@lists.trustedfirmw
> are.org>
>
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.trust
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C4416c02536e54d420
> bdc08d6f00fc1ff%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6369
> 60347799555976&sdata=1zhWkIyBjqiiTqtf0tYdtxRACLofQ%2B5Po6tC3cqW
> Fis%3D&reserved=0
> --
> TF-M mailing list
> mailto:TF-M@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%7C441c81dc90a44fb5418408d6f0a2b68a%7C686ea1d3bc2
> b4c6fa92cd99c5c301635%7C0%7C0%7C636960978972859087&sdata=weHHf8wG3
> nlnTsI1JEA5Ww0D9sXSf4oJKyLkImmaCi8%3D&reserved=0
--
TF-M mailing list
mailto:TF-M@lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
Hi all,
As I haven't received any objection to the below, I am going to merge the change which drops support for Armclang 6.7 and Armclang 6.9.
Thanks,
Antonio
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Antonio De Angelis via TF-M
Sent: 06 June 2019 11:28
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: [TF-M] Supported versions of the Armclang compiler in the TF-M build
Dear all,
We are considering to drop support for older versions of the Armclang compiler (i.e. 6.7 and 6.9) to focus support on newer releases (thus increasing the requirement on Armclang version to 6.10 or higher).
https://developer.trustedfirmware.org/T392https://review.trustedfirmware.org/c/trusted-firmware-m/+/1223
If you have any specific requirement to use Armclang 6.7 or 6.9, please get in touch here or on the review.
Thanks,
Antonio
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi Miklos,
One more feature request:
3) Using separate files in TFM without #ifdef is causing issues for IDE projects, and requires creation of separate projects/targets (with different file set) per each feature combination.
We are using IDEs (IAR, MCUx, Keil), so we have to add missing #ifdef to the original TFM source code.
Please use #if/#ifdef in TFM, everywhere were it is needed.
Thanks,
Andrej
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Miklos Balint via TF-M
Sent: Monday, June 17, 2019 5:31 PM
To: Thomas Törnblom <thomas.tornblom(a)iar.com>; tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] Feature request
Hi Thomas,
I see no major issue with either suggestion, I think it makes sense to introduce improvements in these matters.
For issue #1 it makes very much sense to have a shared header file for all components that rely on these definitions. I don't recall any reason why that should not be possible, it's simply something that hasn't been done due to limited bandwidth for such clean-up of the code.
For issue #2 we have had some internal discussions on the best way to handle compiler dependencies, and the suggestion I liked the most is similar to your suggestion below, but instead of having a single header file, having a compiler folder with each supported toolchain as a separate sub-folder, each defining their own version of tfm_compiler.h to provide the definitions required by TF-M.
The compiler-specific cmake file can then simply point to the appropriate location for the compiler-specific inclusion, avoiding compiler-specific ifdef:s.
Let me know your thoughts on this approach
Thanks and kindest regards
Miklos
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Thomas Törnblom via TF-M
Sent: 13 June 2019 16:11
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] Feature request
While working on porting TF-M to the IAR toolchain, I've run into a couple of issues I'd like to discuss.
1) The duplicated REGION/REGION_NAME/REGION_DECLARE macros.
Why are these not defined in an include file instead of being defined in eight different c files?
I see that they are also defined in spm_db.h, but that is only included in spm related files.
2) I suggest adding a toolchain related include file that should be included in every source file that is part of TF-M.
This could be something similar to cmsis_compiler.h, where a toolchain vendor could add stuff that only relates to a specific toolchain.
In our case that could include things like:
---
#ifdef __ICCARM__
#define $$ZI$$Limit $$Limit
#define $$ZI$$Base $$Base
#define Image$$
#endif
---
Ideas?
/Thomas
--
*Thomas Törnblom*, /Product Engineer/
IAR Systems AB
Box 23051, Strandbodgatan 1
SE-750 23 Uppsala, SWEDEN
Mobile: +46 76 180 17 80 Fax: +46 18 16 78 01
E-mail: thomas.tornblom(a)iar.com <mailto:thomas.tornblom@iar.com>
Website: https://eur01.safelinks.protection.outlook.com/?url=www.iar.com&data=02… <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.iar.co…>
Twitter: https://eur01.safelinks.protection.outlook.com/?url=www.twitter.com%2Fiarsy… <https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.twitte…>
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
Hi Ashu,
The proposal is good and covers most of the cases while a NS and S communication
channel is available. And I think below part is going to be considerate before we
create design docs to follow this rules:
- Leave the NSPE SPM_IDLE case handling as implementation defined instead of
involving IRQ to bring more complexity. NSPE could just yield but SPE needs to
support a bit asynchronization -- that is not a big fair compare to IRQ communication.
- The rules rely on the NSPE/SPE communication channel but for if NSPE has no use/misuse
this channel SPE should detect the problem and panic NSPE, this is also can to be
implemented.
Most of the interrupt priority related rules can be done with hardware setting. The priority of
secure partition with IRQ needs to be considerate while partitions designing since in IPC model
scheduler decides who should go based on partition priority.
Let's see if we can find more cases while implementing.
BR
-Ken
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ashutosh
> Singh via TF-M
> Sent: Tuesday, April 30, 2019 7:06 PM
> To: tf-m(a)lists.trustedfirmware.org
> Cc: nd <nd(a)arm.com>
> Subject: [TF-M] TF-M Cooperative Scheduler Design - Scheduling Rules
>
> Hi,
>
> This is a proposal that introduces scheduling rules in TF-M.
> Introduction:
> On ArmV8-M CPUs, NSPE and SPE share the same physical processing
> element(PE). A TF-M enabled system need to be able to handle asynchronous
> events (interrupts) regardless of current security state of the PE; and that may
> lead to scheduling decisions. This introduces significant complexity into TF-M. To
> keep the integrity of (NSPE and SPE) schedulers and call paths between NSPE and
> SPE, following set of rules are imposed on the TF-M scheduler design.
> https://developer.trustedfirmware.org/w/tf_m/design/cooperative_scheduling/
>
> Feedback welcome!
>
> Thanks,
> Ashu
>
>
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi,
The patch has been pushed for a while and is going to be merged in one week, please help to review it if you planned but still not have a look:
https://review.trustedfirmware.org/c/trusted-firmware-m/+/1234
After this patch get merged, all new configurations created in root directory will be rejected. Please create new configuration files under ./configs directory.
The existing fake configuration files under root directory will be removed after CI setting changed.
Thanks.
-Ken
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken Liu
> (Arm Technology China) via TF-M
> Sent: Tuesday, June 11, 2019 1:40 PM
> To: TF-M(a)lists.trustedfirmware.org
> Cc: nd <nd(a)arm.com>
> Subject: [TF-M] [RFC] Move configuration files into specified directory
>
> Hi,
> Since the number of configuration files is increasing, let’s move the
> configuration files (ConfigXXXX.cmake) into specified directory.
> This would reduces the files under root directory and makes the structure more
> clearer.
>
> I have created the issue and patch for it:
> https://developer.trustedfirmware.org/T394
> https://review.trustedfirmware.org/c/trusted-firmware-m/+/1234
>
> IMPORTANT NOTES:
> To be compatible with the existing building configurations, the existing
> configuration files have been forwarded into the corresponded configuration
> file under ./configs. Which means there are two set of configuration files under
> sources tree at current – but this will change soon. There is a warning while you
> are building with root configurations files: “Please use the configs available in
> the ./config sub-directory.”
>
> So please:
>
> - If you are planning to create new configuration, create it under ./configs
> instead of root directory
> - The reference of configuration files under root directory will be removed soon,
> please change your build system setting to reference the configuration files put
> under ./configs
>
> Any feedbacks please reply this mail or put comments under the issue, thanks
> 😉
>
> -Ken
>
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi Thomas,
I see no major issue with either suggestion, I think it makes sense to introduce improvements in these matters.
For issue #1 it makes very much sense to have a shared header file for all components that rely on these definitions. I don't recall any reason why that should not be possible, it's simply something that hasn't been done due to limited bandwidth for such clean-up of the code.
For issue #2 we have had some internal discussions on the best way to handle compiler dependencies, and the suggestion I liked the most is similar to your suggestion below, but instead of having a single header file, having a compiler folder with each supported toolchain as a separate sub-folder, each defining their own version of tfm_compiler.h to provide the definitions required by TF-M.
The compiler-specific cmake file can then simply point to the appropriate location for the compiler-specific inclusion, avoiding compiler-specific ifdef:s.
Let me know your thoughts on this approach
Thanks and kindest regards
Miklos
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Thomas Törnblom via TF-M
Sent: 13 June 2019 16:11
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] Feature request
While working on porting TF-M to the IAR toolchain, I've run into a couple of issues I'd like to discuss.
1) The duplicated REGION/REGION_NAME/REGION_DECLARE macros.
Why are these not defined in an include file instead of being defined in eight different c files?
I see that they are also defined in spm_db.h, but that is only included in spm related files.
2) I suggest adding a toolchain related include file that should be included in every source file that is part of TF-M.
This could be something similar to cmsis_compiler.h, where a toolchain vendor could add stuff that only relates to a specific toolchain.
In our case that could include things like:
---
#ifdef __ICCARM__
#define $$ZI$$Limit $$Limit
#define $$ZI$$Base $$Base
#define Image$$
#endif
---
Ideas?
/Thomas
--
*Thomas Törnblom*, /Product Engineer/
IAR Systems AB
Box 23051, Strandbodgatan 1
SE-750 23 Uppsala, SWEDEN
Mobile: +46 76 180 17 80 Fax: +46 18 16 78 01
E-mail: thomas.tornblom(a)iar.com <mailto:thomas.tornblom@iar.com>
Website: www.iar.com <http://www.iar.com>
Twitter: www.twitter.com/iarsystems <http://www.twitter.com/iarsystems>
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi Andrej,
Does this affect also any of the reference platforms (i.e. AN521)? If the same behaviour appears on a reference platform, it will suggest that is likely not related to platform code.
It would be good if you can identify the EXACT commit that is giving you this problem, as we can't reproduce, so that we can have a look in detail to the source code.
Thanks,
Antonio
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: 14 June 2019 16:12
To: Ken Liu (Arm Technology China) <Ken.Liu(a)arm.com>
Cc: tf-m(a)lists.trustedfirmware.org
Subject: Re: [TF-M] Is TFM_PSA_API broken?
Just FYI:
Downgraded to commit SHA-1: 25e2b2dba5d7eb3ba0da14384a6c8240278f5c15 (Crypto: Implement additional PSA Crypto APIs).
It becomes much better, but finally goes to the assert in some time (tfm_thrd_context_switch:170). Will continue next week.
The terminal log:
Sec Thread] Secure image initializing!
[Sec Thread] hello! this is ipc client test sp!
[Sec Thread] Connect success!
[Sec Thread] Call success!
#### Execute test suites for the Secure area #### Running Test Suite PSA protected storage S interface tests (TFM_SST_TEST_2XXX)...
> Executing 'TFM_SST_TEST_2001'
Description: 'Set interface'
TEST PASSED!
> Executing 'TFM_SST_TEST_2002'
Description: 'Set interface with create flags'
TEST PASSED!
> Executing 'TFM_SST_TEST_2003'
Description: 'Set interface with NULL data pointer'
TEST PASSED!
> Executing 'TFM_SST_TEST_2004'
Description: 'Set interface with invalid data length'
TEST PASSED!
> Executing 'TFM_SST_TEST_2005'
Description: 'Set interface with write once UID'
TEST PASSED!
> Executing 'TFM_SST_TEST_2006'
Description: 'Get interface with valid data'
TEST PASSED!
> Executing 'TFM_SST_TEST_2007'
Description: 'Get interface with zero data length'
TEST PASSED!
> Executing 'TFM_SST_TEST_2008'
Description: 'Get interface with invalid UIDs'
TEST PASSED!
> Executing 'TFM_SST_TEST_2009'
Description: 'Get interface with invalid data lengths and offsets'
TEST PASSED!
> Executing 'TFM_SST_TEST_2010'
Description: 'Get interface with NULL data pointer'
TEST PASSED!
> Executing 'TFM_SST_TEST_2011'
Description: 'Get info interface with write once UID'
TEST PASSED!
> Executing 'TFM_SST_TEST_2012'
Description: 'Get info interface with valid UID'
TEST PASSED!
> Executing 'TFM_SST_TEST_2013'
Description: 'Get info interface with invalid UIDs'
TEST PASSED!
> Executing 'TFM_SST_TEST_2014'
Description: 'Get info interface with NULL info pointer'
TEST PASSED!
> Executing 'TFM_SST_TEST_2015'
Description: 'Remove interface with valid UID'
TEST PASSED!
> Executing 'TFM_SST_TEST_2016'
Description: 'Remove interface with write once UID'
TEST PASSED!
> Executing 'TFM_SST_TEST_2017'
Description: 'Remove interface with invalid UID'
TEST PASSED!
> Executing 'TFM_SST_TEST_2018'
Description: 'Block compaction after remove'
TEST PASSED!
> Executing 'TFM_SST_TEST_2019'
Description: 'Multiple partial gets'
TEST PASSED!
> Executing 'TFM_SST_TEST_2020'
Description: 'Multiple sets to same UID from same thread'
TEST PASSED!
> Executing 'TFM_SST_TEST_2021'
Description: 'Get support interface'
TEST PASSED!
TESTSUITE PASSED!
Running Test Suite SST reliability tests (TFM_SST_TEST_3XXX)...
> Executing 'TFM_SST_TEST_3001'
Description: 'repetitive sets and gets in/from an asset'
> Iteration 15 of 15
TEST PASSED!
> Executing 'TFM_SST_TEST_3002'
Description: 'repetitive sets, gets and removes'
> Iteration 15 of 15
TEST PASSED!
TESTSUITE PASSED!
Running Test Suite Crypto secure interface tests (TFM_CRYPTO_TEST_5XXX)...
> Executing 'TFM_CRYPTO_TEST_5001'
Description: 'Secure Key management interface'
Assert:tfm_thrd_context_switch:170
From: Andrej Butok
Sent: Friday, June 14, 2019 4:14 PM
To: Ken Liu (Arm Technology China) <Ken.Liu(a)arm.com>
Cc: tf-m(a)lists.trustedfirmware.org
Subject: RE: Is TFM_PSA_API broken?
Hi Ken,
> Please check your modification in SST partition
No modifications from my side.
As it becomes wasting of time, a debugging is not consistent and looks like uninitialized variable, stack or something else.
I have decided to find a TFM commit which caused this abnormal behavior.
So far, it occurs in a commit between:
NOT WORKING: SHA-1: 122360ffb1e7278406183714249afefcb2184488 * Attest: Replace example asymmetric key-pair
WORKING: SHA-1: 4743e6731b0fe8a00ceebfd74da098c7676ac6e0 * Crypto: Add IPC compatibility
Thanks,
Andrej
From: Ken Liu (Arm Technology China) <mailto:Ken.Liu@arm.com>
Sent: Friday, June 14, 2019 4:00 PM
To: Andrej Butok <mailto:andrey.butok@nxp.com>
Cc: mailto:tf-m@lists.trustedfirmware.org; nd <mailto:nd@arm.com>
Subject: Re: Is TFM_PSA_API broken?
Hi Andrej,
As I said, that workaround only works for specified case. Debugging these failed cases with this patch applied will lead you into heavy core debugging.
We need to find out the root cause, why the assert is triggered?
There is no reason that all partitions go into block state, unless there are some improper modification in core or secure partitions.
Please check your modification in SST partition, try to print something in your SST thread, to see why the thread keeps in block state.
If a client calls psa_connect/psa_all, SPM would activate the partition into running state with function tfm_spm_send_event().
The correct call routine should be (psa_call has the similar routine):
tfm_sst_test_2001->psa_connect->...->SVC_Handler->tfm_svcall_psa_connect->tfm_spm_send_event->....-> (your partition thread).
Please remove the workaround patch, and try to debug to see if the call routine is correct.
Thanks.
-Ken
________________________________________
From: Andrej Butok <mailto:andrey.butok@nxp.com>
Sent: Friday, June 14, 2019 8:13 PM
To: Ken Liu (Arm Technology China)
Cc: mailto:tf-m@lists.trustedfirmware.org
Subject: RE: Is TFM_PSA_API broken?
Hi Ken,
Your patch/fix helped, so now there is no stuck in assert.
But all regression tests are failed:
#### Execute test suites for the Secure area #### Running Test Suite PSA protected storage S interface tests (TFM_SST_TEST_2XXX)...
> Executing 'TFM_SST_TEST_2001'
Description: 'Set interface'
Set should not fail with valid UID (Failed at ../../../../../../../middleware/tfm/test/suites/sst/secure/psa_ps_s_interface_testsuite.c:153)
TEST FAILED!
> Executing 'TFM_SST_TEST_2002'
Description: 'Set interface with create flags'
Set should not fail with no flags (Failed at ../../../../../../../middleware/tfm/test/suites/sst/secure/psa_ps_s_interface_testsuite.c:199)
TEST FAILED!
> Executing 'TFM_SST_TEST_2003'
Description: 'Set interface with NULL data pointer'
Set should succeed with NULL data pointer and zero length (Failed at ../../../../../../../middleware/tfm/test/suites/sst/secure/psa_ps_s_interface_testsuite.c:243)
TEST FAILED!
Will try to investigate...
-----Original Message-----
From: TF-M <mailto:tf-m-bounces@lists.trustedfirmware.org> On Behalf Of Ken Liu (Arm Technology China) via TF-M
Sent: Friday, June 14, 2019 10:32 AM
To: mailto:TF-M@lists.trustedfirmware.org
Cc: nd <mailto:nd@arm.com>
Subject: Re: [TF-M] Is TFM_PSA_API broken?
Hi Andrej,
tfm_thrd_context_switch() does not want to thread to be running is NULL. And actually it should never happen in existing implement unless IRQ is involved.
Here is a patch for fixing this, but I am not sure if you are under the same case we met:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Freview.tr…
I am curious about your environment, at least one partition will be running in latest master branch.
Can you share me your changes? Are your using original TF-M and which configuration file you are using?
Thanks.
-Ken
> -----Original Message-----
> From: TF-M <mailto:tf-m-bounces@lists.trustedfirmware.org> On Behalf
> Of Andrej Butok via TF-M
> Sent: Friday, June 14, 2019 4:15 PM
> To: Antonio De Angelis <mailto:Antonio.DeAngelis@arm.com>
> Cc: mailto:tf-m@lists.trustedfirmware.org
> Subject: Re: [TF-M] Is TFM_PSA_API broken?
>
> Hi Antonio,
>
>
>
> So, I have disabled Platform and Log services.
>
> Also, TFM_NS_CLIENT_IDENTIFICATION have to be undefined for IPC. Is
> this correct?
>
> After that it becomes compliable.
>
>
>
> But when starting the regression tests, I am getting assert in
> tfm_thrd_conext_switch(). Terminal log:
>
>
>
> [Sec Thread] Secure image initializing!
>
>
>
> NS code is running...
>
>
>
> #### Execute test suites for the Secure area ####
>
> Running Test Suite PSA protected storage S interface tests
> (TFM_SST_TEST_2XXX)...
>
> > Executing 'TFM_SST_TEST_2001'
>
> Description: 'Set interface'
>
> Assert:tfm_thrd_context_switch:170
>
>
>
> So I am stuck now, and no matter what to use the IPC or the Function
> API approach.
>
> Probably, something serious happened during last two weeks (before it
> worked), may be in platform dependent code.
>
> NOTE: I am using a different platform LPC55S69 and IDE approach (not cmake).
>
>
>
> Any tips?
>
>
>
> Thanks,
>
> Andrej
>
>
>
>
>
> -----Original Message-----
> From: TF-M <mailto:tf-m-bounces@lists.trustedfirmware.org> On Behalf
> Of Antonio De Angelis via TF-M
> Sent: Thursday, June 13, 2019 5:00 PM
> To: mailto:tf-m@lists.trustedfirmware.org
> Cc: nd <mailto:nd@arm.com>
> Subject: Re: [TF-M] Is TFM_PSA_API broken?
>
>
>
> Hi Andrej,
>
>
>
> "Should the Log and Platform services be disabled for IPC?"
>
>
>
> Yes, platform service and Audit Log service do not support IPC. You
> can see from existing IPC - specific build configurations which flags
> need to be set to make sure these two services are not built when IPC builds are selected.
>
>
>
> Thanks,
>
> Antonio
>
>
>
> -----Original Message-----
>
> From: TF-M
> <mailto:tf-m-bounces@lists.trustedfirmware.org%3cmailto:tf-m-%0b>
> mailto:bounces@lists.trustedfirmware.org>> On Behalf Of Andrej Butok
> via TF-M
>
> Sent: 13 June 2019 15:46
>
> To:
> mailto:tf-m@lists.trustedfirmware.org%3cmailto:tf-m@lists.trustedfirmw
> are.org>
>
> Subject: [TF-M] Is TFM_PSA_API broken?
>
>
>
> Hello,
>
>
>
> I use absolutely the latest TF-M (SHA-1:
> 81fb08cd66c1037a5e6c57e46ad5946bfc8a0d0e)
>
>
>
> I am trying to run the regression-test application using IPC API
> (TFM_PSA_API is
> defined) The application is compliable with errors:
>
> Error: L6218E: Undefined symbol tfm_spm_request_reset_vote (referred
> from platform_sp.o).
>
> Error: L6218E: Undefined symbol tfm_core_get_caller_client_id
> (referred from audit_core.o).
>
> Not enough information to list image symbols.
>
>
>
> It is caused by the fact that the platform and audit log services are
> using the functions (printed in the log) which are not
> available/disabled when TFM_PSA_API is defined.
>
> Is it known issue?
>
> Any suggestions?
>
> Should the Log and Platform services be disabled for IPC?
>
>
>
> Thanks,
>
> Andrej
>
> --
>
> TF-M mailing list
>
> mailto:TF-M@lists.trustedfirmware.org%3cmailto:TF-M@lists.trustedfirmw
> are.org>
>
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.trust
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C4416c02536e54d420
> bdc08d6f00fc1ff%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6369
> 60347799555976&sdata=1zhWkIyBjqiiTqtf0tYdtxRACLofQ%2B5Po6tC3cqW
> Fis%3D&reserved=0
>
> --
>
> TF-M mailing list
>
> mailto:TF-M@lists.trustedfirmware.org%3cmailto:TF-M@lists.trustedfirmw
> are.org>
>
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.trust
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C4416c02536e54d420
> bdc08d6f00fc1ff%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6369
> 60347799555976&sdata=1zhWkIyBjqiiTqtf0tYdtxRACLofQ%2B5Po6tC3cqW
> Fis%3D&reserved=0
> --
> TF-M mailing list
> mailto:TF-M@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%7C441c81dc90a44fb5418408d6f0a2b68a%7C686ea1d3bc2
> b4c6fa92cd99c5c301635%7C0%7C0%7C636960978972859087&sdata=weHHf8wG3
> nlnTsI1JEA5Ww0D9sXSf4oJKyLkImmaCi8%3D&reserved=0
--
TF-M mailing list
mailto:TF-M@lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi Ken,
Your patch/fix helped, so now there is no stuck in assert.
But all regression tests are failed:
#### Execute test suites for the Secure area ####
Running Test Suite PSA protected storage S interface tests (TFM_SST_TEST_2XXX)...
> Executing 'TFM_SST_TEST_2001'
Description: 'Set interface'
Set should not fail with valid UID (Failed at ../../../../../../../middleware/tfm/test/suites/sst/secure/psa_ps_s_interface_testsuite.c:153)
TEST FAILED!
> Executing 'TFM_SST_TEST_2002'
Description: 'Set interface with create flags'
Set should not fail with no flags (Failed at ../../../../../../../middleware/tfm/test/suites/sst/secure/psa_ps_s_interface_testsuite.c:199)
TEST FAILED!
> Executing 'TFM_SST_TEST_2003'
Description: 'Set interface with NULL data pointer'
Set should succeed with NULL data pointer and zero length (Failed at ../../../../../../../middleware/tfm/test/suites/sst/secure/psa_ps_s_interface_testsuite.c:243)
TEST FAILED!
Will try to investigate...
-----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, June 14, 2019 10:32 AM
To: TF-M(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] Is TFM_PSA_API broken?
Hi Andrej,
tfm_thrd_context_switch() does not want to thread to be running is NULL. And actually it should never happen in existing implement unless IRQ is involved.
Here is a patch for fixing this, but I am not sure if you are under the same case we met:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Freview.tr…
I am curious about your environment, at least one partition will be running in latest master branch.
Can you share me your changes? Are your using original TF-M and which configuration file you are using?
Thanks.
-Ken
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of
> Andrej Butok via TF-M
> Sent: Friday, June 14, 2019 4:15 PM
> To: Antonio De Angelis <Antonio.DeAngelis(a)arm.com>
> Cc: tf-m(a)lists.trustedfirmware.org
> Subject: Re: [TF-M] Is TFM_PSA_API broken?
>
> Hi Antonio,
>
>
>
> So, I have disabled Platform and Log services.
>
> Also, TFM_NS_CLIENT_IDENTIFICATION have to be undefined for IPC. Is
> this correct?
>
> After that it becomes compliable.
>
>
>
> But when starting the regression tests, I am getting assert in
> tfm_thrd_conext_switch(). Terminal log:
>
>
>
> [Sec Thread] Secure image initializing!
>
>
>
> NS code is running...
>
>
>
> #### Execute test suites for the Secure area ####
>
> Running Test Suite PSA protected storage S interface tests
> (TFM_SST_TEST_2XXX)...
>
> > Executing 'TFM_SST_TEST_2001'
>
> Description: 'Set interface'
>
> Assert:tfm_thrd_context_switch:170
>
>
>
> So I am stuck now, and no matter what to use the IPC or the Function
> API approach.
>
> Probably, something serious happened during last two weeks (before it
> worked), may be in platform dependent code.
>
> NOTE: I am using a different platform LPC55S69 and IDE approach (not cmake).
>
>
>
> Any tips?
>
>
>
> Thanks,
>
> Andrej
>
>
>
>
>
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of
> Antonio De Angelis via TF-M
> Sent: Thursday, June 13, 2019 5:00 PM
> To: tf-m(a)lists.trustedfirmware.org
> Cc: nd <nd(a)arm.com>
> Subject: Re: [TF-M] Is TFM_PSA_API broken?
>
>
>
> Hi Andrej,
>
>
>
> "Should the Log and Platform services be disabled for IPC?"
>
>
>
> Yes, platform service and Audit Log service do not support IPC. You
> can see from existing IPC - specific build configurations which flags
> need to be set to make sure these two services are not built when IPC builds are selected.
>
>
>
> Thanks,
>
> Antonio
>
>
>
> -----Original Message-----
>
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-
> bounces(a)lists.trustedfirmware.org>> On Behalf Of Andrej Butok via TF-M
>
> Sent: 13 June 2019 15:46
>
> To:
> tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
>
> Subject: [TF-M] Is TFM_PSA_API broken?
>
>
>
> Hello,
>
>
>
> I use absolutely the latest TF-M (SHA-1:
> 81fb08cd66c1037a5e6c57e46ad5946bfc8a0d0e)
>
>
>
> I am trying to run the regression-test application using IPC API
> (TFM_PSA_API is
> defined) The application is compliable with errors:
>
> Error: L6218E: Undefined symbol tfm_spm_request_reset_vote (referred
> from platform_sp.o).
>
> Error: L6218E: Undefined symbol tfm_core_get_caller_client_id
> (referred from audit_core.o).
>
> Not enough information to list image symbols.
>
>
>
> It is caused by the fact that the platform and audit log services are
> using the functions (printed in the log) which are not
> available/disabled when TFM_PSA_API is defined.
>
> Is it known issue?
>
> Any suggestions?
>
> Should the Log and Platform services be disabled for IPC?
>
>
>
> Thanks,
>
> Andrej
>
> --
>
> TF-M mailing list
>
> TF-M(a)lists.trustedfirmware.org<mailto:TF-M@lists.trustedfirmware.org>
>
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.trust
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C4416c02536e54d420
> bdc08d6f00fc1ff%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6369
> 60347799555976&sdata=1zhWkIyBjqiiTqtf0tYdtxRACLofQ%2B5Po6tC3cqW
> Fis%3D&reserved=0
>
> --
>
> TF-M mailing list
>
> TF-M(a)lists.trustedfirmware.org<mailto:TF-M@lists.trustedfirmware.org>
>
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.trust
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C4416c02536e54d420
> bdc08d6f00fc1ff%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6369
> 60347799555976&sdata=1zhWkIyBjqiiTqtf0tYdtxRACLofQ%2B5Po6tC3cqW
> Fis%3D&reserved=0
> --
> 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%7C441c81dc90a44fb5418408d6f0a2b68a%7C686ea1d3bc2
> b4c6fa92cd99c5c301635%7C0%7C0%7C636960978972859087&sdata=weHHf8wG3
> nlnTsI1JEA5Ww0D9sXSf4oJKyLkImmaCi8%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 have just created T398 for integrating source cleanup to improve
portability.
I have just pushed a patch for review.
/Thomas
--
*Thomas Törnblom*, /Product Engineer/
IAR Systems AB
Box 23051, Strandbodgatan 1
SE-750 23 Uppsala, SWEDEN
Mobile: +46 76 180 17 80 Fax: +46 18 16 78 01
E-mail: thomas.tornblom(a)iar.com <mailto:thomas.tornblom@iar.com>
Website: www.iar.com <http://www.iar.com>
Twitter: www.twitter.com/iarsystems <http://www.twitter.com/iarsystems>
Hi Thomas,
It's a bit slim, but I assume you noticed this but are looking for further
details?
https://git.trustedfirmware.org/trusted-firmware-m.git/tree/contributing.rst
Best regards,
Kevin
On Fri, 14 Jun 2019 at 13:10, Thomas Törnblom via TF-M <
tf-m(a)lists.trustedfirmware.org> wrote:
> I'm about to submit a set of cleanup patches but have not been able to
> find the contribution guide.
>
> Most of the useful documentation I've found seems to be related to TF-A.
>
> So where is it?
>
> /Thomas
>
> --
>
> *Thomas Törnblom*, /Product Engineer/
> IAR Systems AB
> Box 23051, Strandbodgatan 1
> SE-750 23 Uppsala, SWEDEN
> Mobile: +46 76 180 17 80 Fax: +46 18 16 78 01
> E-mail: thomas.tornblom(a)iar.com <mailto:thomas.tornblom@iar.com>
> Website: www.iar.com <http://www.iar.com>
> Twitter: www.twitter.com/iarsystems <http://www.twitter.com/iarsystems>
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/tf-m
>
I'm about to submit a set of cleanup patches but have not been able to
find the contribution guide.
Most of the useful documentation I've found seems to be related to TF-A.
So where is it?
/Thomas
--
*Thomas Törnblom*, /Product Engineer/
IAR Systems AB
Box 23051, Strandbodgatan 1
SE-750 23 Uppsala, SWEDEN
Mobile: +46 76 180 17 80 Fax: +46 18 16 78 01
E-mail: thomas.tornblom(a)iar.com <mailto:thomas.tornblom@iar.com>
Website: www.iar.com <http://www.iar.com>
Twitter: www.twitter.com/iarsystems <http://www.twitter.com/iarsystems>
Hi Andrej,
tfm_thrd_context_switch() does not want to thread to be running is NULL. And actually it should never happen in existing implement unless IRQ is involved.
Here is a patch for fixing this, but I am not sure if you are under the same case we met:
https://review.trustedfirmware.org/c/trusted-firmware-m/+/959
I am curious about your environment, at least one partition will be running in latest master branch.
Can you share me your changes? Are your using original TF-M and which configuration file you are using?
Thanks.
-Ken
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej
> Butok via TF-M
> Sent: Friday, June 14, 2019 4:15 PM
> To: Antonio De Angelis <Antonio.DeAngelis(a)arm.com>
> Cc: tf-m(a)lists.trustedfirmware.org
> Subject: Re: [TF-M] Is TFM_PSA_API broken?
>
> Hi Antonio,
>
>
>
> So, I have disabled Platform and Log services.
>
> Also, TFM_NS_CLIENT_IDENTIFICATION have to be undefined for IPC. Is this
> correct?
>
> After that it becomes compliable.
>
>
>
> But when starting the regression tests, I am getting assert in
> tfm_thrd_conext_switch(). Terminal log:
>
>
>
> [Sec Thread] Secure image initializing!
>
>
>
> NS code is running...
>
>
>
> #### Execute test suites for the Secure area ####
>
> Running Test Suite PSA protected storage S interface tests
> (TFM_SST_TEST_2XXX)...
>
> > Executing 'TFM_SST_TEST_2001'
>
> Description: 'Set interface'
>
> Assert:tfm_thrd_context_switch:170
>
>
>
> So I am stuck now, and no matter what to use the IPC or the Function API
> approach.
>
> Probably, something serious happened during last two weeks (before it worked),
> may be in platform dependent code.
>
> NOTE: I am using a different platform LPC55S69 and IDE approach (not cmake).
>
>
>
> Any tips?
>
>
>
> Thanks,
>
> Andrej
>
>
>
>
>
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Antonio De
> Angelis via TF-M
> Sent: Thursday, June 13, 2019 5:00 PM
> To: tf-m(a)lists.trustedfirmware.org
> Cc: nd <nd(a)arm.com>
> Subject: Re: [TF-M] Is TFM_PSA_API broken?
>
>
>
> Hi Andrej,
>
>
>
> "Should the Log and Platform services be disabled for IPC?"
>
>
>
> Yes, platform service and Audit Log service do not support IPC. You can see from
> existing IPC - specific build configurations which flags need to be set to make
> sure these two services are not built when IPC builds are selected.
>
>
>
> Thanks,
>
> Antonio
>
>
>
> -----Original Message-----
>
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-
> bounces(a)lists.trustedfirmware.org>> On Behalf Of Andrej Butok via TF-M
>
> Sent: 13 June 2019 15:46
>
> To: tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
>
> Subject: [TF-M] Is TFM_PSA_API broken?
>
>
>
> Hello,
>
>
>
> I use absolutely the latest TF-M (SHA-1:
> 81fb08cd66c1037a5e6c57e46ad5946bfc8a0d0e)
>
>
>
> I am trying to run the regression-test application using IPC API (TFM_PSA_API is
> defined) The application is compliable with errors:
>
> Error: L6218E: Undefined symbol tfm_spm_request_reset_vote (referred from
> platform_sp.o).
>
> Error: L6218E: Undefined symbol tfm_core_get_caller_client_id (referred from
> audit_core.o).
>
> Not enough information to list image symbols.
>
>
>
> It is caused by the fact that the platform and audit log services are using the
> functions (printed in the log) which are not available/disabled when
> TFM_PSA_API is defined.
>
> Is it known issue?
>
> Any suggestions?
>
> Should the Log and Platform services be disabled for IPC?
>
>
>
> Thanks,
>
> Andrej
>
> --
>
> TF-M mailing list
>
> TF-M(a)lists.trustedfirmware.org<mailto:TF-M@lists.trustedfirmware.org>
>
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C4416c02536e54d420
> bdc08d6f00fc1ff%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6369
> 60347799555976&sdata=1zhWkIyBjqiiTqtf0tYdtxRACLofQ%2B5Po6tC3cqW
> Fis%3D&reserved=0
>
> --
>
> TF-M mailing list
>
> TF-M(a)lists.trustedfirmware.org<mailto:TF-M@lists.trustedfirmware.org>
>
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C4416c02536e54d420
> bdc08d6f00fc1ff%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6369
> 60347799555976&sdata=1zhWkIyBjqiiTqtf0tYdtxRACLofQ%2B5Po6tC3cqW
> Fis%3D&reserved=0
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi Antonio,
So, I have disabled Platform and Log services.
Also, TFM_NS_CLIENT_IDENTIFICATION have to be undefined for IPC. Is this correct?
After that it becomes compliable.
But when starting the regression tests, I am getting assert in tfm_thrd_conext_switch(). Terminal log:
[Sec Thread] Secure image initializing!
NS code is running...
#### Execute test suites for the Secure area ####
Running Test Suite PSA protected storage S interface tests (TFM_SST_TEST_2XXX)...
> Executing 'TFM_SST_TEST_2001'
Description: 'Set interface'
Assert:tfm_thrd_context_switch:170
So I am stuck now, and no matter what to use the IPC or the Function API approach.
Probably, something serious happened during last two weeks (before it worked), may be in platform dependent code.
NOTE: I am using a different platform LPC55S69 and IDE approach (not cmake).
Any tips?
Thanks,
Andrej
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Antonio De Angelis via TF-M
Sent: Thursday, June 13, 2019 5:00 PM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] Is TFM_PSA_API broken?
Hi Andrej,
"Should the Log and Platform services be disabled for IPC?"
Yes, platform service and Audit Log service do not support IPC. You can see from existing IPC - specific build configurations which flags need to be set to make sure these two services are not built when IPC builds are selected.
Thanks,
Antonio
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org<mailto:tf-m-bounces@lists.trustedfirmware.org>> On Behalf Of Andrej Butok via TF-M
Sent: 13 June 2019 15:46
To: tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
Subject: [TF-M] Is TFM_PSA_API broken?
Hello,
I use absolutely the latest TF-M (SHA-1: 81fb08cd66c1037a5e6c57e46ad5946bfc8a0d0e)
I am trying to run the regression-test application using IPC API (TFM_PSA_API is defined) The application is compliable with errors:
Error: L6218E: Undefined symbol tfm_spm_request_reset_vote (referred from platform_sp.o).
Error: L6218E: Undefined symbol tfm_core_get_caller_client_id (referred from audit_core.o).
Not enough information to list image symbols.
It is caused by the fact that the platform and audit log services are using the functions (printed in the log) which are not available/disabled when TFM_PSA_API is defined.
Is it known issue?
Any suggestions?
Should the Log and Platform services be disabled for IPC?
Thanks,
Andrej
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org<mailto:TF-M@lists.trustedfirmware.org>
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org<mailto:TF-M@lists.trustedfirmware.org>
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
Hi Andrej,
"Should the Log and Platform services be disabled for IPC?"
Yes, platform service and Audit Log service do not support IPC. You can see from existing IPC - specific build configurations which flags need to be set to make sure these two services are not built when IPC builds are selected.
Thanks,
Antonio
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: 13 June 2019 15:46
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] Is TFM_PSA_API broken?
Hello,
I use absolutely the latest TF-M (SHA-1: 81fb08cd66c1037a5e6c57e46ad5946bfc8a0d0e)
I am trying to run the regression-test application using IPC API (TFM_PSA_API is defined) The application is compliable with errors:
Error: L6218E: Undefined symbol tfm_spm_request_reset_vote (referred from platform_sp.o).
Error: L6218E: Undefined symbol tfm_core_get_caller_client_id (referred from audit_core.o).
Not enough information to list image symbols.
It is caused by the fact that the platform and audit log services are using the functions (printed in the log) which are not available/disabled when TFM_PSA_API is defined.
Is it known issue?
Any suggestions?
Should the Log and Platform services be disabled for IPC?
Thanks,
Andrej
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hello,
I use absolutely the latest TF-M (SHA-1: 81fb08cd66c1037a5e6c57e46ad5946bfc8a0d0e)
I am trying to run the regression-test application using IPC API (TFM_PSA_API is defined)
The application is compliable with errors:
Error: L6218E: Undefined symbol tfm_spm_request_reset_vote (referred from platform_sp.o).
Error: L6218E: Undefined symbol tfm_core_get_caller_client_id (referred from audit_core.o).
Not enough information to list image symbols.
It is caused by the fact that the platform and audit log services are using the functions (printed in the log) which are not available/disabled when TFM_PSA_API is defined.
Is it known issue?
Any suggestions?
Should the Log and Platform services be disabled for IPC?
Thanks,
Andrej
While working on porting TF-M to the IAR toolchain, I've run into a
couple of issues I'd like to discuss.
1) The duplicated REGION/REGION_NAME/REGION_DECLARE macros.
Why are these not defined in an include file instead of being defined in
eight different c files?
I see that they are also defined in spm_db.h, but that is only included
in spm related files.
2) I suggest adding a toolchain related include file that should be
included in every source file that is part of TF-M.
This could be something similar to cmsis_compiler.h, where a toolchain
vendor could add stuff that only relates to a specific toolchain.
In our case that could include things like:
---
#ifdef __ICCARM__
#define $$ZI$$Limit $$Limit
#define $$ZI$$Base $$Base
#define Image$$
#endif
---
Ideas?
/Thomas
--
*Thomas Törnblom*, /Product Engineer/
IAR Systems AB
Box 23051, Strandbodgatan 1
SE-750 23 Uppsala, SWEDEN
Mobile: +46 76 180 17 80 Fax: +46 18 16 78 01
E-mail: thomas.tornblom(a)iar.com <mailto:thomas.tornblom@iar.com>
Website: www.iar.com <http://www.iar.com>
Twitter: www.twitter.com/iarsystems <http://www.twitter.com/iarsystems>
Hi,
Since the number of configuration files is increasing, let’s move the configuration files (ConfigXXXX.cmake) into specified directory.
This would reduces the files under root directory and makes the structure more clearer.
I have created the issue and patch for it:
https://developer.trustedfirmware.org/T394https://review.trustedfirmware.org/c/trusted-firmware-m/+/1234
IMPORTANT NOTES:
To be compatible with the existing building configurations, the existing configuration files have been forwarded into the corresponded configuration file under ./configs. Which means there are two set of configuration files under sources tree at current – but this will change soon. There is a warning while you are building with root configurations files: “Please use the configs available in the ./config sub-directory.”
So please:
- If you are planning to create new configuration, create it under ./configs instead of root directory
- The reference of configuration files under root directory will be removed soon, please change your build system setting to reference the configuration files put under ./configs
Any feedbacks please reply this mail or put comments under the issue, thanks 😉
-Ken
Dear all,
The new tag which has just been made available from the psa-arch-tests, available here:
https://github.com/ARM-software/psa-arch-tests/releases/tag/v19.06_API0.9
is the one that has to be used to be able to verify PSA Developer API compliance with the latest TF-M.
The procedure to follow to build and run the tests remains the same.
Thanks,
Antonio
Dear all,
We are considering to drop support for older versions of the Armclang compiler (i.e. 6.7 and 6.9) to focus support on newer releases (thus increasing the requirement on Armclang version to 6.10 or higher).
https://developer.trustedfirmware.org/T392https://review.trustedfirmware.org/c/trusted-firmware-m/+/1223
If you have any specific requirement to use Armclang 6.7 or 6.9, please get in touch here or on the review.
Thanks,
Antonio
Hi all,
Two changes that have underwent multiple rounds of review and test were accidentally merged instead of being pushed for review and final approval.
I was at fault, apologies for that.
Additional tests of the changes flagged up no regression.
Let me know if you have any concerns or questions,
Thanks and regards
Miklos
Hi Antonio,
> For the newer API version, the psa-arch-test team will provide a new tag on the master branch in the coming days (this is still not available yet).
Please ping me when this tag will appear.
Thank you,
Andrej
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Antonio De Angelis via TF-M
Sent: Tuesday, May 28, 2019 2:19 PM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] Old Mbed-Crypto library?
Hi Andrej,
please find my replies inline in red.
________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Andrej Butok via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: 28 May 2019 07:38
To: tf-m(a)lists.trustedfirmware.org
Subject: Re: [TF-M] Old Mbed-Crypto library?
Hi Antonio,
> TF-M Crypto has moved to use the same API as the latest available *release* of Mbed Crypto which is Mbed Crypto 1.0.0
If to follow the latest development branch of Mbed-Crypto, actually it has started using of "handles" instead of "slots" (the obsolete version is using handles).
So by using the old mbed-Crypto release, you have downgraded the Crypto API.
[Antonio] Not sure exactly what you mean here. This is the latest Crypto API header used in the development branch:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co…
And it uses handles instead of slots as I have explained earlier, handles being a newer concept. Also, please bear in mind that the PSA Crypto API development happens on this branch: https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co… , Mbed Crypto being a reference implementation of the API, which means that the API itself can have new concepts which are not part of the reference implementation yet.
Please use the latest available mbed-Crypto (do not afraid - it is functional, checked) and avoid this created mess and desynchronization between all PSA related projects.
[Antonio] TF-M Crypto service is indeed aligned to latest available release of Mbed Crypto, which is Mbed Crypto 1.0.0 (dated 1st April 2019): https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co…
As soon as there will be new releases, TF-M Crypto will align to those. The TF-M Crypto service is not aligned to the development branch because, as mentioned, that branch undergoes active daily development and would be too difficult to track.
> The psa-arch-test team is in the process of providing an update on the master branch
The master branch, as was declared by PSA Test Suite team, is not used for PSA Functional API certification.
Instead, as was declared by PSA Test Suite team, it have to be used the ew_beta0 branch.
Please clarify what PSA-TestSuite branch must be used with TFM now?
[Antonio] The ew_beta0 branch was used as a temporary milestone which was using the old 0.1.0beta API. For the newer API version, the psa-arch-test team will provide a new tag on the master branch in the coming days (this is still not available yet).
Best regards,
Antonio
Thanks,
Andrej
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Antonio De Angelis via TF-M
Sent: Monday, May 27, 2019 6:22 PM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] Old Mbed-Crypto library?
Hi Andrej,
TF-M Crypto has moved to use the same API as the latest available *release* of Mbed Crypto which is Mbed Crypto 1.0.0 . Mbed Crypto is a reference implementation of the PSA Crypto API, which are under active development. TF-M Crypto will align to newest release of Mbed Crypto when they will become available; these new releases will incorporate the new features which are developed as part of the PSA Crypto API, and there will be cases where the new features will break legacy code (i.e. API changes).
Regarding the change that you mention, i.e. psa_key_slot_t vs psa_key_handle_t . The concept of psa_key_handle_t that TF-M Crypto is using now is indeed a newer (updated) concept introduced with later versions of the PSA Crypto API to replace the outdated concept of psa_key_slot_t. For example, if you look at the current latest development version of the PSA Crypto API, you will see that psa_key_handle_t is used to handle keys.
This is an example of a breaking change in the API that has been introduced by newer releases of the PSA Crypto API. You are right, this change will break regression / PSA API compliance tests, in fact as part of the latest set of patches you can see that the Regression tests are upgraded to use the new concept of psa_key_handle_t instead of psa_key_slot_t. From these updated tests, you can get an idea of how to use the psa_key_handle_t.
After this update, TF-M Crypto can't support the PSA API compliance tests (ACK) which were run previously (i.e. the ew_beta0 branch). The psa-arch-test team is in the process of providing an update on the master branch which will enable TF-M Crypto to run compliance tests from there. This should happen in the next couple of weeks.
Please let me know in case you need any more clarification.
Best regards,
Antonio
________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Andrej Butok via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: 27 May 2019 12:52
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] Old Mbed-Crypto library?
Hello,
tfm_build_instruction.rst tells to use mbed-Crypto instead of mbedTLS:
git clone https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co… -b mbedcrypto-1.0<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co…>.0
But the issue is that it references to the obsolete (3 month old) Mbed-Crypto library.
Also, it looks like this old MbedCrypto has downgraded TFM/PSA Crypto API (from key-slot to key-handle) => this is step back in PSA TFM API, which should break crypto regression and PSA tests.
We do not want to downgrade our SDK MbedCrypto, better to freeze TFM.
Any plans to use the last Crypto Lib and to revert the PSA API degradation?
Thanks,
Andrej Butok
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
Hi Andrej,
please find my replies inline in red.
________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Andrej Butok via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: 28 May 2019 07:38
To: tf-m(a)lists.trustedfirmware.org
Subject: Re: [TF-M] Old Mbed-Crypto library?
Hi Antonio,
> TF-M Crypto has moved to use the same API as the latest available *release* of Mbed Crypto which is Mbed Crypto 1.0.0
If to follow the latest development branch of Mbed-Crypto, actually it has started using of "handles" instead of "slots" (the obsolete version is using handles).
So by using the old mbed-Crypto release, you have downgraded the Crypto API.
[Antonio] Not sure exactly what you mean here. This is the latest Crypto API header used in the development branch:
https://github.com/ARMmbed/mbed-crypto/blob/development/include/psa/crypto.h
And it uses handles instead of slots as I have explained earlier, handles being a newer concept. Also, please bear in mind that the PSA Crypto API development happens on this branch: https://github.com/ARMmbed/mbed-crypto/tree/psa-api-1.0-beta , Mbed Crypto being a reference implementation of the API, which means that the API itself can have new concepts which are not part of the reference implementation yet.
Please use the latest available mbed-Crypto (do not afraid - it is functional, checked) and avoid this created mess and desynchronization between all PSA related projects.
[Antonio] TF-M Crypto service is indeed aligned to latest available release of Mbed Crypto, which is Mbed Crypto 1.0.0 (dated 1st April 2019): https://github.com/ARMmbed/mbed-crypto/releases
As soon as there will be new releases, TF-M Crypto will align to those. The TF-M Crypto service is not aligned to the development branch because, as mentioned, that branch undergoes active daily development and would be too difficult to track.
> The psa-arch-test team is in the process of providing an update on the master branch
The master branch, as was declared by PSA Test Suite team, is not used for PSA Functional API certification.
Instead, as was declared by PSA Test Suite team, it have to be used the ew_beta0 branch.
Please clarify what PSA-TestSuite branch must be used with TFM now?
[Antonio] The ew_beta0 branch was used as a temporary milestone which was using the old 0.1.0beta API. For the newer API version, the psa-arch-test team will provide a new tag on the master branch in the coming days (this is still not available yet).
Best regards,
Antonio
Thanks,
Andrej
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Antonio De Angelis via TF-M
Sent: Monday, May 27, 2019 6:22 PM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] Old Mbed-Crypto library?
Hi Andrej,
TF-M Crypto has moved to use the same API as the latest available *release* of Mbed Crypto which is Mbed Crypto 1.0.0 . Mbed Crypto is a reference implementation of the PSA Crypto API, which are under active development. TF-M Crypto will align to newest release of Mbed Crypto when they will become available; these new releases will incorporate the new features which are developed as part of the PSA Crypto API, and there will be cases where the new features will break legacy code (i.e. API changes).
Regarding the change that you mention, i.e. psa_key_slot_t vs psa_key_handle_t . The concept of psa_key_handle_t that TF-M Crypto is using now is indeed a newer (updated) concept introduced with later versions of the PSA Crypto API to replace the outdated concept of psa_key_slot_t. For example, if you look at the current latest development version of the PSA Crypto API, you will see that psa_key_handle_t is used to handle keys.
This is an example of a breaking change in the API that has been introduced by newer releases of the PSA Crypto API. You are right, this change will break regression / PSA API compliance tests, in fact as part of the latest set of patches you can see that the Regression tests are upgraded to use the new concept of psa_key_handle_t instead of psa_key_slot_t. From these updated tests, you can get an idea of how to use the psa_key_handle_t.
After this update, TF-M Crypto can't support the PSA API compliance tests (ACK) which were run previously (i.e. the ew_beta0 branch). The psa-arch-test team is in the process of providing an update on the master branch which will enable TF-M Crypto to run compliance tests from there. This should happen in the next couple of weeks.
Please let me know in case you need any more clarification.
Best regards,
Antonio
________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Andrej Butok via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: 27 May 2019 12:52
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] Old Mbed-Crypto library?
Hello,
tfm_build_instruction.rst tells to use mbed-Crypto instead of mbedTLS:
git clone https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co… -b mbedcrypto-1.0<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co…>.0
But the issue is that it references to the obsolete (3 month old) Mbed-Crypto library.
Also, it looks like this old MbedCrypto has downgraded TFM/PSA Crypto API (from key-slot to key-handle) => this is step back in PSA TFM API, which should break crypto regression and PSA tests.
We do not want to downgrade our SDK MbedCrypto, better to freeze TFM.
Any plans to use the last Crypto Lib and to revert the PSA API degradation?
Thanks,
Andrej Butok
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi Antonio,
> TF-M Crypto has moved to use the same API as the latest available *release* of Mbed Crypto which is Mbed Crypto 1.0.0
If to follow the latest development branch of Mbed-Crypto, actually it has started using of "handles" instead of "slots" (the obsolete version is using handles).
So by using the old mbed-Crypto release, you have downgraded the Crypto API.
Please use the latest available mbed-Crypto (do not afraid - it is functional, checked) and avoid this created mess and desynchronization between all PSA related projects.
> The psa-arch-test team is in the process of providing an update on the master branch
The master branch, as was declared by PSA Test Suite team, is not used for PSA Functional API certification.
Instead, as was declared by PSA Test Suite team, it have to be used the ew_beta0 branch.
Please clarify what PSA-TestSuite branch must be used with TFM now?
Thanks,
Andrej
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Antonio De Angelis via TF-M
Sent: Monday, May 27, 2019 6:22 PM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] Old Mbed-Crypto library?
Hi Andrej,
TF-M Crypto has moved to use the same API as the latest available *release* of Mbed Crypto which is Mbed Crypto 1.0.0 . Mbed Crypto is a reference implementation of the PSA Crypto API, which are under active development. TF-M Crypto will align to newest release of Mbed Crypto when they will become available; these new releases will incorporate the new features which are developed as part of the PSA Crypto API, and there will be cases where the new features will break legacy code (i.e. API changes).
Regarding the change that you mention, i.e. psa_key_slot_t vs psa_key_handle_t . The concept of psa_key_handle_t that TF-M Crypto is using now is indeed a newer (updated) concept introduced with later versions of the PSA Crypto API to replace the outdated concept of psa_key_slot_t. For example, if you look at the current latest development version of the PSA Crypto API, you will see that psa_key_handle_t is used to handle keys.
This is an example of a breaking change in the API that has been introduced by newer releases of the PSA Crypto API. You are right, this change will break regression / PSA API compliance tests, in fact as part of the latest set of patches you can see that the Regression tests are upgraded to use the new concept of psa_key_handle_t instead of psa_key_slot_t. From these updated tests, you can get an idea of how to use the psa_key_handle_t.
After this update, TF-M Crypto can't support the PSA API compliance tests (ACK) which were run previously (i.e. the ew_beta0 branch). The psa-arch-test team is in the process of providing an update on the master branch which will enable TF-M Crypto to run compliance tests from there. This should happen in the next couple of weeks.
Please let me know in case you need any more clarification.
Best regards,
Antonio
________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Andrej Butok via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: 27 May 2019 12:52
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] Old Mbed-Crypto library?
Hello,
tfm_build_instruction.rst tells to use mbed-Crypto instead of mbedTLS:
git clone https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co… -b mbedcrypto-1.0<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.co…>.0
But the issue is that it references to the obsolete (3 month old) Mbed-Crypto library.
Also, it looks like this old MbedCrypto has downgraded TFM/PSA Crypto API (from key-slot to key-handle) => this is step back in PSA TFM API, which should break crypto regression and PSA tests.
We do not want to downgrade our SDK MbedCrypto, better to freeze TFM.
Any plans to use the last Crypto Lib and to revert the PSA API degradation?
Thanks,
Andrej Butok
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
Hi Andrej,
TF-M Crypto has moved to use the same API as the latest available *release* of Mbed Crypto which is Mbed Crypto 1.0.0 . Mbed Crypto is a reference implementation of the PSA Crypto API, which are under active development. TF-M Crypto will align to newest release of Mbed Crypto when they will become available; these new releases will incorporate the new features which are developed as part of the PSA Crypto API, and there will be cases where the new features will break legacy code (i.e. API changes).
Regarding the change that you mention, i.e. psa_key_slot_t vs psa_key_handle_t . The concept of psa_key_handle_t that TF-M Crypto is using now is indeed a newer (updated) concept introduced with later versions of the PSA Crypto API to replace the outdated concept of psa_key_slot_t. For example, if you look at the current latest development version of the PSA Crypto API, you will see that psa_key_handle_t is used to handle keys.
This is an example of a breaking change in the API that has been introduced by newer releases of the PSA Crypto API. You are right, this change will break regression / PSA API compliance tests, in fact as part of the latest set of patches you can see that the Regression tests are upgraded to use the new concept of psa_key_handle_t instead of psa_key_slot_t. From these updated tests, you can get an idea of how to use the psa_key_handle_t.
After this update, TF-M Crypto can't support the PSA API compliance tests (ACK) which were run previously (i.e. the ew_beta0 branch). The psa-arch-test team is in the process of providing an update on the master branch which will enable TF-M Crypto to run compliance tests from there. This should happen in the next couple of weeks.
Please let me know in case you need any more clarification.
Best regards,
Antonio
________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Andrej Butok via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: 27 May 2019 12:52
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] Old Mbed-Crypto library?
Hello,
tfm_build_instruction.rst tells to use mbed-Crypto instead of mbedTLS:
git clone https://github.com/ARMmbed/mbed-crypto.git -b mbedcrypto-1.0<https://github.com/ARMmbed/mbed-crypto.git%20-b%20mbedcrypto-1.0>.0
But the issue is that it references to the obsolete (3 month old) Mbed-Crypto library.
Also, it looks like this old MbedCrypto has downgraded TFM/PSA Crypto API (from key-slot to key-handle) => this is step back in PSA TFM API, which should break crypto regression and PSA tests.
We do not want to downgrade our SDK MbedCrypto, better to freeze TFM.
Any plans to use the last Crypto Lib and to revert the PSA API degradation?
Thanks,
Andrej Butok
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hello,
tfm_build_instruction.rst tells to use mbed-Crypto instead of mbedTLS:
git clone https://github.com/ARMmbed/mbed-crypto.git -b mbedcrypto-1.0<https://github.com/ARMmbed/mbed-crypto.git%20-b%20mbedcrypto-1.0>.0
But the issue is that it references to the obsolete (3 month old) Mbed-Crypto library.
Also, it looks like this old MbedCrypto has downgraded TFM/PSA Crypto API (from key-slot to key-handle) => this is step back in PSA TFM API, which should break crypto regression and PSA tests.
We do not want to downgrade our SDK MbedCrypto, better to freeze TFM.
Any plans to use the last Crypto Lib and to revert the PSA API degradation?
Thanks,
Andrej Butok
On Mon, Mar 11, 2019 at 01:43:19PM +0000, Tamas Ban via TF-M wrote:
>Please see the following link for a design proposal on anti-rollback protection in trusted boot:
>
>https://developer.trustedfirmware.org/w/tf_m/design/trusted_boot/rollback_p…
Somewhat related, as I've been working through a prototype
implementation of SUIT, the SUIT manifest also wants what they call a
"sequence number", which is a monotonically increasing number
associated with each version. They've kind of decided they don't want
to have to do anything like semantic version parsing as part of the
firmware upgrade.
I think this sequence number serves the same purpose as this security
counter (except that the sequence number is required to increase with
each software relase).
One of the goals of the MCUboot community is to make sure that however
the SUIT manifest is implemented, it must be semantically the same as
the existing TLV-format manifest. An easy solution is to just treat
the existing version as a 32-bit number (ignoring the build-id, which
I think is supposed to be the case, anyway).
As far as the possibility of re-using the same security counter value,
I don't think that is something that should be done. In general, it
isn't possible to know where security bugs will be found in an image.
If we always increase the security counter value, someone still
running the immediately following image will be prevented from rolling
back to the version with the security flaw, whereas if we reused the
values, it might be necessary to try to force them to upgrade to a new
version that has the counter increased.
Also, I think it is important to clarify that the security counter is
not required for anti-rollback, it only protects the anti-rollback
implementation from a specific threat: something that is able to
replace the primary firmware image outside of the control of the
bootloader. The cost is that implementing a security counter
generally requires specific hardware just for that purpose. An
entirely software anti-rollback protects against other threats,
including the common case of using the ordinary firmware upgrade
process.
David
Hello,
So, the RTX was replaced by FreeRTOS (regression and psa-tests passed).
Required changes:
1) Use CMSIS-FreeRTOS adapter from: https://github.com/ARM-software/CMSIS-FreeRTOS
2) Do not call os_wrapper_join_thread()/osThreadJoin() and do not use osThreadJoinable flag. It is not supported by FreeRTOS
3) Add missing osThreadExit().
4) Add osDelay(1) to tfm_sst_run_test(), as FreeRTOS free some allocated resources only in the idle task.
5) Disable TFM_NS_CLIENT_IDENTIFICATION to avoid SVC conflict.
5) Other minor changes.
Proposals for general TFM code:
1) Delete os_wrapper_join_thread()/osThreadJoin() as it is optional. It works without it and not supported by all RTOSes.
2) Add missing osThreadExit() to test_task_runner().
3) Do not call each SST test in separate task, or to allow switching to idle task after each SST test.
4) Find other TFM_NS_CLIENT_IDENTIFICATION mechanism, which will not use SVC.
Thanks,
Andrej Butok
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: Friday, May 3, 2019 9:36 AM
To: tf-m(a)lists.trustedfirmware.org
Subject: Re: [TF-M] [EXT] Re: TFM and FreeRTOS
Hello,
So, even if the unique User ID is optional, it is mandatory for the case when different NS users must have different security asset policies for SST resources.
Is it possible to find another mechanism for the user ID assignment which does not use SVC? To avoid unwanted limitation for FreeRTOS and any other NS application using SVC.
Thanks,
Andrej
-----Original Message-----
From: Miklos Balint <Miklos.Balint(a)arm.com>
Sent: Tuesday, April 30, 2019 5:19 PM
To: Andrej Butok <andrey.butok(a)nxp.com>; tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: RE: [TF-M] [EXT] Re: TFM and FreeRTOS
Caution: EXT Email
Hi Andrej,
Your interpretation is correct: if NS client identification is disabled, all non-secure threads are assigned the default non-secure client id (-1).
That means that secure services cannot differentiate between various non-secure threads, i.e. they would all be provided the same access policies when requesting secure services.
This is in line with PSA Firmware Framework. As described in chapter 3.3.3 of PSA FF 1.0 beta Release 0, "In implementations where NSPE client_id values are provided by the SPM, the same negative client_id must be used for all connections."
Note that according to that specification each connection and message would still have their own unique handles - see chapter 3.3.4.
Note also that this does not impact the client ID assignments for secure partitions, so any service would be able to identify if it was called by a non-secure entity or a secure one, and if a secure one, then which one.
Let me know if you need further assistance in this matter.
Regards
Miklos
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: 25 April 2019 12:47
To: David Hu (Arm Technology China) <David.Hu(a)arm.com>
Cc: TF-M(a)lists.trustedfirmware.org
Subject: Re: [TF-M] [EXT] Re: TFM and FreeRTOS
Hi David,
OK. We may try to limit FreeRTOS to the case when it starts and runs only in non-secure world and its tasks will call secure world only via PSA/TFM API.
In this case, if I understand well, to avoid conflict for non-secure SVC, it is enough to disable TFM_NS_CLIENT_IDENTIFICATION.
It means that all user tasks will be assigned to the default user id = DEFAULT_NS_CLIENT_ID.
What does it mean? How does it limits the functionality? Is it OK from PSA point of view?
Thanks,
Andrej
-----Original Message-----
From: David Hu (Arm Technology China) <David.Hu(a)arm.com>
Sent: Thursday, April 25, 2019 11:26 AM
To: Andrej Butok <andrey.butok(a)nxp.com>; tf-m(a)lists.trustedfirmware.org
Subject: [EXT] Re: [TF-M] TFM and FreeRTOS
Caution: EXT Email
Hi Andrej,
I guess that you may ask about the SVCalls communication between secure world and non-secure world in FreeRTOS. If I misunderstood your question, please ignore the following.
In my very own opinion, FreeRTOS has a different concept of how to manage secure stack/context from TF-M does.
FreeRTOS prefers to allocate and manage a dedicated secure stack/context for each non-secure task requiring secure service. In its implementation, each time when it does context switch, it invokes SVCalls to also switch the secure stack/context for the next non-secure task. FreeRTOS implements several own APIs to accomplish those functionalities.
By contrast, TF-M as a trusted firmware, naturally, manages all the secure resource by its own. Therefore, there is no such dedicated stack in secure world mapping to each non-secure task. Currently, TF-M implements CMSIS RTOS thread context management APIs to execute some management work between non-secure world and secure world, on Armv8-M core.
Hope it can hlep you.
Best regards,
Hu Ziji
On 4/25/2019 3:45 PM, Andrej Butok via TF-M wrote:
> Hello,
>
> Do you know about any existing port of FreeRTOS (instead of RTX) to TFM? Did somebody a feasibility study?
> I have just started to look at it, and immediately detected a conflict, both are using Supervisor Calls (SVC) for own needs.
>
> Thanks,
> Andrej
>
>
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.
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
Hi All,
Please find under the following link: https://review.trustedfirmware.org/c/trusted-firmware-m/+/1040 the review of a design document which aim is to fix the implicit casting happening with enumerations in TF-M.
Feel free to add any comments you want on the review!
Kind regards,
Hugues
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.
Hi all,
I have uploaded the design document for the TF-M Crypto service at the following Gerrit code review in RST format: https://review.trustedfirmware.org/c/trusted-firmware-m/+/1023
It can be possible to render the HTML format of the design document by checking out the patch above and build the docs (in particular, by building the install_userguide target)
Comments are welcome, here in this thread or preferably in the Gerrit review for better tracking.
Thanks,
Antonio
Hello,
Current TFM SST service supports 1, 2, 4 and 8 Byte minimum write.
Do you have any plan to add the 512 Byte minimal write support to the TFM SST?
LPC55S69 Flash has the 512Bytes program size. Guess, all flash modules with ECC has the same requirement.
Thanks,
Andrej Butok
On Mon, Apr 15, 2019 at 02:52:56PM +0000, Tamas Ban via TF-M wrote:
>Actually the design doc propose to use a distinct security counter from image version (ih_ver in header). But in the most simple case this security counter can be derived from the image version, to have the exact same value (ignoring the build number).
>
>The image signature cover these continues blocks in memory:
>- image header
>- image
>- some part of TLV section (currently not covered, but due to multi image support it is planned to introduce a signed TLV section)
>
>Because these are contiguous regions in the memory it is not possible
>to place only the (header + TLV section) to the trusted memory but
>miss out the image itself (at least I cannot see how to solve)
Could the trusted memory contain a version field, and perhaps a hash
of the image?
David
Hi Andrej,
Your interpretation is correct: if NS client identification is disabled, all non-secure threads are assigned the default non-secure client id (-1).
That means that secure services cannot differentiate between various non-secure threads, i.e. they would all be provided the same access policies when requesting secure services.
This is in line with PSA Firmware Framework. As described in chapter 3.3.3 of PSA FF 1.0 beta Release 0, "In implementations where NSPE client_id values are provided by the SPM, the same negative client_id must be used for all connections."
Note that according to that specification each connection and message would still have their own unique handles - see chapter 3.3.4.
Note also that this does not impact the client ID assignments for secure partitions, so any service would be able to identify if it was called by a non-secure entity or a secure one, and if a secure one, then which one.
Let me know if you need further assistance in this matter.
Regards
Miklos
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: 25 April 2019 12:47
To: David Hu (Arm Technology China) <David.Hu(a)arm.com>
Cc: TF-M(a)lists.trustedfirmware.org
Subject: Re: [TF-M] [EXT] Re: TFM and FreeRTOS
Hi David,
OK. We may try to limit FreeRTOS to the case when it starts and runs only in non-secure world and its tasks will call secure world only via PSA/TFM API.
In this case, if I understand well, to avoid conflict for non-secure SVC, it is enough to disable TFM_NS_CLIENT_IDENTIFICATION.
It means that all user tasks will be assigned to the default user id = DEFAULT_NS_CLIENT_ID.
What does it mean? How does it limits the functionality? Is it OK from PSA point of view?
Thanks,
Andrej
-----Original Message-----
From: David Hu (Arm Technology China) <David.Hu(a)arm.com>
Sent: Thursday, April 25, 2019 11:26 AM
To: Andrej Butok <andrey.butok(a)nxp.com>; tf-m(a)lists.trustedfirmware.org
Subject: [EXT] Re: [TF-M] TFM and FreeRTOS
Caution: EXT Email
Hi Andrej,
I guess that you may ask about the SVCalls communication between secure world and non-secure world in FreeRTOS. If I misunderstood your question, please ignore the following.
In my very own opinion, FreeRTOS has a different concept of how to manage secure stack/context from TF-M does.
FreeRTOS prefers to allocate and manage a dedicated secure stack/context for each non-secure task requiring secure service. In its implementation, each time when it does context switch, it invokes SVCalls to also switch the secure stack/context for the next non-secure task. FreeRTOS implements several own APIs to accomplish those functionalities.
By contrast, TF-M as a trusted firmware, naturally, manages all the secure resource by its own. Therefore, there is no such dedicated stack in secure world mapping to each non-secure task. Currently, TF-M implements CMSIS RTOS thread context management APIs to execute some management work between non-secure world and secure world, on Armv8-M core.
Hope it can hlep you.
Best regards,
Hu Ziji
On 4/25/2019 3:45 PM, Andrej Butok via TF-M wrote:
> Hello,
>
> Do you know about any existing port of FreeRTOS (instead of RTX) to TFM? Did somebody a feasibility study?
> I have just started to look at it, and immediately detected a conflict, both are using Supervisor Calls (SVC) for own needs.
>
> Thanks,
> Andrej
>
>
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.
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi Andrej,
The idea of the OS wrapper layer is to abstract the underlying OS, so that the test app can use generic wrapper APIs, which are implemented using OS-specific APIs. In os_wrapper_rtx.c, we provide an example implementation that targets the CMSIS-RTOS2 APIs for RTX.
As osThreadJoinable is not supported by FreeRTOS, you can remove that attribute in your port, and implement os_wrapper_join_thread() as a no-op. We use semaphores for synchronisation in the test app anyway, so os_wrapper_join_thread() only needs to be implemented if threads are joinable and so need join() to be called to free up resources associated with the thread.
I do think we could make the OS wrapper layer a bit more generic though. We could replace the only call to os_wrapper_join_thread() that currently exists with a call to a new function os_wrapper_delete_thread(), which is defined to release the resources associated with a thread context. For CMSIS-RTOS2 this can be empty because this happens automatically, but for other RTOS APIs there may be some delete() function that needs to be called. Let me know what you think.
Best wishes,
Jamie
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: 02 May 2019 15:04
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] Avoid osThreadJoin()
Hello,
The TFM test applications are using CMSIS-RTOS2 API. And this is good.
But could you delete os_wrapper_join_thread()and avoid using of osThreadJoin().
If I understand well, its support by RTOS tasks is optional (via osThreadJoinable flag).
The problem is that the osThreadJoin() functionality is not supported by FreeRTOS (https://arm-software.github.io/CMSIS-FreeRTOS/General/html/tech_data.html).
It is critical obstacle.
Could you tell what are you going to do with this requirement? To understand, if to continue with a FreeRTOS port.
Thank you
Andrej Butok
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hello,
The TFM test applications are using CMSIS-RTOS2 API. And this is good.
But could you delete os_wrapper_join_thread()and avoid using of osThreadJoin().
If I understand well, its support by RTOS tasks is optional (via osThreadJoinable flag).
The problem is that the osThreadJoin() functionality is not supported by FreeRTOS (https://arm-software.github.io/CMSIS-FreeRTOS/General/html/tech_data.html).
It is critical obstacle.
Could you tell what are you going to do with this requirement? To understand, if to continue with a FreeRTOS port.
Thank you
Andrej Butok
Hi Andrej,
TF-M has no requirement on NS thread execution being unprivileged, nor is it mandated by PSA.
It is one of a set of measures that make non-secure thread isolation possible, reduce attack surface and provide a degree of tolerance against programming errors, but its absence does not invalidate the security measures provided by TF-M, so it is a fully valid implementation to make NSPE a single protection domain and all non-secure code execution privileged.
Regards
Miklos
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: 02 May 2019 14:19
To: TF-M(a)lists.trustedfirmware.org
Subject: [TF-M] NS application privilege mode
Hello,
May a non-secure TFM user application stay in the privilege mode after start-up? It's needed, as some system registers are accessible only in the privilege mode.
Asking, because the TFM NS Musca start-up code is switching to the unprivileged mode from very beginning:
MRS R0, control ; Get control value
ORR R0, R0, #1 ; Select switch to unprivilage mode
ORR R0, R0, #2 ; Select switch to PSP
MSR control, R0
Hope, it is not mandatory.
Thanks,
Andrej Butok
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hello,
May a non-secure TFM user application stay in the privilege mode after start-up? It's needed, as some system registers are accessible only in the privilege mode.
Asking, because the TFM NS Musca start-up code is switching to the unprivileged mode from very beginning:
MRS R0, control ; Get control value
ORR R0, R0, #1 ; Select switch to unprivilage mode
ORR R0, R0, #2 ; Select switch to PSP
MSR control, R0
Hope, it is not mandatory.
Thanks,
Andrej Butok
Hi,
This is a proposal that introduces scheduling rules in TF-M.
Introduction:
On ArmV8-M CPUs, NSPE and SPE share the same physical processing element(PE). A TF-M enabled system need to be able to handle asynchronous events (interrupts) regardless of current security state of the PE; and that may lead to scheduling decisions. This introduces significant complexity into TF-M. To keep the integrity of (NSPE and SPE) schedulers and call paths between NSPE and SPE, following set of rules are imposed on the TF-M scheduler design.
https://developer.trustedfirmware.org/w/tf_m/design/cooperative_scheduling/
Feedback welcome!
Thanks,
Ashu
Hi All,
The parts that refer to the BASEPRI_NS register being set on return from Secure services has been removed from the document (marked with strikethrough), as the attack surfaces introduced by not doing it are mitigated by the veneer stack checking on secure function entry.
Sorry for the inconvenience.
Best regards,
Mate
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Mate Toth-Pal via TF-M
Sent: 29 April 2019 15:21
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: [TF-M] Non-secure interrupt handling design proposal
Hi All,
The design proposal for the Non-secure interrupt handling is available for review at the following link:
https://developer.trustedfirmware.org/w/tf_m/design/ns_interrupt_handling/
Please share your thoughts in this mail thread.
Thank you!
Best regards,
Mate
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi,
There was a cmake response file patch to fix the linker error especially in windows:
https://review.trustedfirmware.org/c/trusted-firmware-m/+/237
In this patch I set proper flags for linkers, but also enable response file as default, which caused some concerns about: is the response file option stable enough, will it break the build?
So I created an updated one, which just set correct response file switch for linkers, and do not enable response file as default. In the case if ARMCLANG response is enabled by cmake automatically, cmake could apply correct response flag for ARMCLANG:
https://review.trustedfirmware.org/c/trusted-firmware-m/+/925
Because they are pushed towards different branches, so a new gerrit item is generated which lost the history...The only difference with previous one is removed below line :
set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS 1)
The reason I raise this patch is because, this problem happens every time in my PC so I have to cherry-pick this patch before building anything. I had seen someone got the same issue, and want to check how you solve this.
Call for volunteers to help verifying this patch (925) in your side and provide feedback to ensure it will not break the building, is there anyone could help? Just cherry-pick this patch into your environment is OK.
Thanks.
-Ken
Hi all,
I've created a change as a follow-on from the mail discussion below to provide a design pattern proposal: IOCTL for platform-specific services.
https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/951/
Brief problem statement:
Some platforms required services and HAL functions that were not generic to warrant their dedicated generic HAL API functions as that implied a requirement for *all* platforms to implement - essentially stub - the implementation if the functionality was not applicable to that platform. The existing solution doesn't scale so I propose to introduce a single mandatory function that serves as a platform-specific wrapper/arbiter for services that are specific to a single platform, or a family of similar platforms.
Note that at present the change IS the design proposal - I felt it would make more sense to present it this time as code changes and documentation updates instead of a single linear design document.
Let me know your thought in this mail thread for generic observations or on the review page for specific details of the implementation.
Thanks
Regards,
Miklos
-----Original Message-----
From: Michel JAOUEN <michel.jaouen(a)st.com>
Sent: 11 April 2019 17:38
To: Miklos Balint <Miklos.Balint(a)arm.com>; tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: RE: Platform: Create platform service for pin functions
Hello,
You should detail your proposal with single entry.
It should help to implement the function really required for dedicated platform.
Regards
-----Original Message-----
From: Miklos Balint <Miklos.Balint(a)arm.com>
Sent: jeudi 11 avril 2019 17:28
To: Michel JAOUEN <michel.jaouen(a)st.com>; tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: RE: Platform: Create platform service for pin functions
Michel,
I agree there is a need for a more generic design pattern for such platform-specific features.
I think that there should be a single entry point for any platform specific service request to the platform/ directory and each platform should/could list the specific features it supports. Then the specific function type would be encoded in an invec to the service request.
But I think a more detailed design proposal is needed with enough room for discussion before committing to a new pattern, and I'd prefer to avoid introducing platform dependencies in the services/ folder. That folder should ideally just have an indirection across HAL to a platform-specific service request arbiter.
Any opinions or should I produce a more detailed proposal to show what I mean?
Regards
Miklos
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Michel JAOUEN via TF-M
Sent: 11 April 2019 13:57
To: tf-m(a)lists.trustedfirmware.org
Subject: Re: [TF-M] Platform: Create platform service for pin functions
I see that there is https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/825/
On review , it adds some dummy functions for the platform not requiring these services Can we think about introducing some configuration on platform basis.
As example , I post
https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/854/
Best regards
From: Michel JAOUEN
Sent: mercredi 10 avril 2019 13:05
To: 'tf-m(a)lists.trustedfirmware.org' <tf-m(a)lists.trustedfirmware.org>
Subject: Platform: Create platform service for pin functions
Hello,
I noticed the merge of this api, which seems require only for platform Musca_a.
This create the need to implement dummy functions for the other platform.
would it be better to make this configurable for each platform ?
I think for the interface connected to platform partition, it is important to have a flexibility.
As example some platform , may require an API requesting a pin to be configureable from non secure .
Best regards
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi Stanislav,
Thanks for reporting the issue. As the issue seems to be in the PSA Tests rather than TF-M, please can you report it directly to the psa-arch-tests project here https://github.com/arm-software/psa-arch-tests as we in the TF-M team do not maintain that code.
Best wishes,
Jamie
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Stanislav Jancik via TF-M
Sent: 25 April 2019 12:51
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] TF-M ARM GCC PSA Test 014 fail
Hi,
I use "7 2018-q2-update" ARMGCC compiler. The PSA Tests code works when it is compiled by ARMGLANG, but a fail occurs when the same code is compiled by ARMGCC.
Issue:
When TEST: 414 runs, I've got secure violation fault. See report bellow:
TEST: 414 | DESCRIPTION: Optional APIs not supported check [Info] Executing tests from non-secure Optional PS APIs are not supported.
[Check 1] Call to create API should fail as API not supported [Check 2] Create valid storage with set API [Check 3] Call to set_extended API call should fail [Check 4] Verify data is unchanged Oops... Secure fault!!! You're not going anywhere!
Reason:
The valtest_entry_p014 is overwritten by read_buff variable and this caused this fail.
Workaround:
When I changed read_buff declaration in test_p014.c from static uint8_t read_buff[TEST_BUFF_SIZE/4] = {0}; to static uint32_t read_buff[TEST_BUFF_SIZE/4] = {0}; the code is running correctly. But I think, that it should be officially fixed.
Best Regards
Stanislav
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi,
I use "7 2018-q2-update" ARMGCC compiler. The PSA Tests code works when it is compiled by ARMGLANG, but a fail occurs when the same code is compiled by ARMGCC.
Issue:
When TEST: 414 runs, I've got secure violation fault. See report bellow:
TEST: 414 | DESCRIPTION: Optional APIs not supported check
[Info] Executing tests from non-secure
Optional PS APIs are not supported.
[Check 1] Call to create API should fail as API not supported
[Check 2] Create valid storage with set API
[Check 3] Call to set_extended API call should fail
[Check 4] Verify data is unchanged
Oops... Secure fault!!! You're not going anywhere!
Reason:
The valtest_entry_p014 is overwritten by read_buff variable and this caused this fail.
Workaround:
When I changed read_buff declaration in test_p014.c from static uint8_t read_buff[TEST_BUFF_SIZE/4] = {0}; to static uint32_t read_buff[TEST_BUFF_SIZE/4] = {0}; the code is running correctly. But I think, that it should be officially fixed.
Best Regards
Stanislav
Hi Andrej,
I guess that you may ask about the SVCalls communication between secure
world and non-secure world in FreeRTOS. If I misunderstood your
question, please ignore the following.
In my very own opinion, FreeRTOS has a different concept of how to
manage secure stack/context from TF-M does.
FreeRTOS prefers to allocate and manage a dedicated secure stack/context
for each non-secure task requiring secure service. In its
implementation, each time when it does context switch, it invokes
SVCalls to also switch the secure stack/context for the next non-secure
task. FreeRTOS implements several own APIs to accomplish those
functionalities.
By contrast, TF-M as a trusted firmware, naturally, manages all the
secure resource by its own. Therefore, there is no such dedicated stack
in secure world mapping to each non-secure task. Currently, TF-M
implements CMSIS RTOS thread context management APIs to execute some
management work between non-secure world and secure world, on Armv8-M core.
Hope it can hlep you.
Best regards,
Hu Ziji
On 4/25/2019 3:45 PM, Andrej Butok via TF-M wrote:
> Hello,
>
> Do you know about any existing port of FreeRTOS (instead of RTX) to TFM? Did somebody a feasibility study?
> I have just started to look at it, and immediately detected a conflict, both are using Supervisor Calls (SVC) for own needs.
>
> Thanks,
> Andrej
>
>
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.
Hi Andrej,
For the SVC issue - that should be easy to resolve:
The only point at which the NS application stored in the repo uses SVC is when TFM_NS_CLIENT_IDENTIFICATION is enabled.
If your scope is a feasibility study with any OS you can turn off this feature by adding
set (TFM_NS_CLIENT_IDENTIFICATION OFF)
to your Config*.cmake build configuration or
toggle the corresponding line in CommonConfig.cmake to OFF to turn it off globally for all build configs in your repo.
Regards
Miklos
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: 25 April 2019 09:46
To: TF-M(a)lists.trustedfirmware.org
Subject: [TF-M] TFM and FreeRTOS
Hello,
Do you know about any existing port of FreeRTOS (instead of RTX) to TFM? Did somebody a feasibility study?
I have just started to look at it, and immediately detected a conflict, both are using Supervisor Calls (SVC) for own needs.
Thanks,
Andrej
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hello,
Do you know about any existing port of FreeRTOS (instead of RTX) to TFM? Did somebody a feasibility study?
I have just started to look at it, and immediately detected a conflict, both are using Supervisor Calls (SVC) for own needs.
Thanks,
Andrej
Hi Ken,
OK. We will disable IPC in the regression tests, till it is fixed.
Thank you,
Andrej Butok
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken Liu (Arm Technology China) via TF-M
Sent: Wednesday, April 24, 2019 9:52 AM
To: TF-M(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
Hi Andrej,
This is caused by one of the working model changing patch: 4d66dc3cca0d8c1eff5a3a41692cf01d69eae6ca.
The concept of this series changes is: IPC compatible partition is supported only if IPC working model takes place; and library model partitions works for library working model.
Before 1.5 weeks ago IPC model could co-exists with library model so the regression works but it is not good -- we should not enable co-existing of two models since it is a waste of resources.
We are working on an a workaround to avoid this problem at first by disable library model test while IPC model is selected; and later on patches will make the test framework under proper way for each working model.
Thanks.
-Ken
> -----Original Message-----
> From: Andrej Butok <andrey.butok(a)nxp.com>
> Sent: Wednesday, April 24, 2019 3:35 PM
> To: Ken Liu (Arm Technology China) <Ken.Liu(a)arm.com>
> Cc: TF-M(a)lists.trustedfirmware.org
> Subject: RE: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
>
> Hi Ken,
>
> The fix has fixed the bus fault. Thanks
>
> But there are some issues when to run the TFM regression tests
> (defined CORE_TEST_IPC and TFM_PSA_API)
>
> I am getting Security violation
> SVC_Handle()=>tfm_core_partition_request_svc_handler()=>tfm_core_sfn_r
> equ est_handler()=>tfm_secure_api_error_handler(),
>
> The log:
>
> [Sec Thread] Secure image initializing!
> [Sec Thread] hello! this is ipc client test sp!
> [Sec Thread] Connect success!
> [Sec Thread] Call success!
>
> NS code is running...
> [Sec Error] Unauthorized service request!
> [Sec Error] Security violation when calling secure API
>
>
> Could you run the regression tests and check if everything is OK.
> 1.5 week ago, even when IPC was enabled, all regression tests passed.
> Now they are passing only when IPC is disabled.
>
> Thanks,
> Andrej
>
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken
> Liu (Arm Technology China) via TF-M
> Sent: Wednesday, April 24, 2019 9:02 AM
> To: tf-m(a)lists.trustedfirmware.org
> Cc: nd <nd(a)arm.com>
> Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
>
> Hi,
> The fix for this problem has been logged here:
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdeve
> lope
> r.trustedfirmware.org%2FT327&data=02%7C01%7Candrey.butok%40nxp.c
> om%7Ccf08748223284a68708b08d6c882c0a6%7C686ea1d3bc2b4c6fa92cd99c5
> c301635%7C0%7C0%7C636916861232914034&sdata=Zq54%2FpI%2FyTtyv
> K5aUhWwdU%2FQGPIhJKKT36Ue8Pnop1U%3D&reserved=0
> And the patch is here:
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Frevi
> ew.tr
> ustedfirmware.org%2Fc%2Ftrusted-firmware-
> m%2F%2B%2F922&data=02%7C01%7Candrey.butok%40nxp.com%7Ccf087
> 48223284a68708b08d6c882c0a6%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C
> 0%7C0%7C636916861232914034&sdata=i1A91n5gv6UocgRCcazmiClhH%2
> F%2BkB%2FxGGU%2FktWWjjLk%3D&reserved=0
>
> I used a fake thread object to collect initial context to make
> scheduler has an initial CURR_THRD.
> This is because I need to avoid unnecessary condition checking while
> context switch since CURR_THRD only equals to ZERO for ONCE time:
>
> ctx_switch:
> If (pcurr)
> Tfm_memcpy(&pcurr->ctx, pctx, sizeof(*pctx)); Tfm_memcpy(pctx,
> &pnext-
> >ctx, sizeof(pnext->ctx)):
>
> The TFM_ASSERT in source is another thing since they may get removed
> in a release product.
>
> Please help to provide feedback on it if you see this patch. And I
> will try to merge it after several +1/2 is collected since it is an hotfix patch.
>
> Thanks.
>
> -Ken
>
> > -----Original Message-----
> > From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken
> > Liu (Arm Technology China) via TF-M
> > Sent: Tuesday, April 23, 2019 10:06 PM
> > To: TF-M(a)lists.trustedfirmware.org; nd <nd(a)arm.com>
> > Cc: nd <nd(a)arm.com>
> > Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
> >
> > Hi Andrej,
> > Ah, great finding!
> > We moved the default IDLE thread into partition now so there is no
> > default CUR_THRD at very start.
> > I guess reverting the latest commit
> > 4dcae6f69db61af31316831d773e5d8777e9fbd3 should fix this problem.
> > Sorry I don't have working platform now so can not verify it.
> > Will provide a fix soon.
> >
> > -Ken
> > ________________________________
> > From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of
> > Antonio De Angelis via TF-M <tf-m(a)lists.trustedfirmware.org>
> > Sent: Tuesday, April 23, 2019 9:58 PM
> > To: tf-m(a)lists.trustedfirmware.org
> > Cc: nd
> > Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
> >
> > Hi Andrej,
> >
> > While trying to replicate your issue I have found a (maybe related)
> > issue with ConfigCoreIPC.cmake and Regression enabled on the current
> > tip, described by the following ticket:
> >
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdeve
> lope
> r.trustedfirmware.org%2FT326&data=02%7C01%7Candrey.butok%40nxp.c
> om%7Ccf08748223284a68708b08d6c882c0a6%7C686ea1d3bc2b4c6fa92cd99c5
> c301635%7C0%7C0%7C636916861232924039&sdata=3VroxNyRxDp6DK2Ir
> fYjgoE%2BGi0tKJDQL5%2Bbm1UnRHA%3D&reserved=0 . We are
> investigating if this can be related to the issue you're observing.
> >
> > Thanks,
> > Antonio
> >
> > -----Original Message-----
> > From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of
> > Andrej Butok via TF-M
> > Sent: 23 April 2019 14:50
> > To: Ken Liu (Arm Technology China) <Ken.Liu(a)arm.com>
> > Cc: TF-M(a)lists.trustedfirmware.org
> > Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
> >
> >
> > Hi Ken,
> > May be context is static, but the CURR_THRD (p_curr_thrd) pointer is
> > NULL, before the first tfm_thrd_context_switch() call.
> > OR I have something wrong.
> >
> > -----Original Message-----
> > From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken
> > Liu (Arm Technology China) via TF-M
> > Sent: Tuesday, April 23, 2019 3:43 PM
> > To: tf-m(a)lists.trustedfirmware.org
> > Cc: nd <nd(a)arm.com>
> > Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
> >
> > WARNING: This email was created outside of NXP. DO NOT CLICK links
> > or attachments unless you recognize the sender and know the content is safe.
> >
> >
> >
> > Hi Andrej,
> > Thanks for the investigation, we will take a look ASAP.
> >
> > The thread context is allocated statically in global which should
> > not have chance to be NULL. If you have time for digging, you can
> > put message in function
> > './secure_fw/core/ipc/tfm_spm.c:tfm_spm_init()' to show all thread context value of partitions.
> >
> > Thanks.
> >
> > -Ken
> > ________________________________
> > From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of
> > Andrej Butok via TF-M <tf-m(a)lists.trustedfirmware.org>
> > Sent: Tuesday, April 23, 2019 9:16 PM
> > To: Antonio De Angelis
> > Cc: TF-M(a)lists.trustedfirmware.org
> > Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
> >
> > Hi Antonio,
> >
> > We have own port for LPC55S69, so not sure if you are able to run it.
> > But, the issues happens in general code (master branch, the latest
> > current commit). Defined TFM_PSA_API, TFM_LVL = 1.
> > The NULL parameter is causing fault in the first call of
> > tfm_thrd_context_switch(..., NULL,...) => tfm_memcpy(&NULL-
> > >state_ctx.ctxb, ...) => memcpy(wrong address), and should cause an
> > >issue on
> > any platform.
> >
> > Thanks,
> > Andrej
> >
> > -----Original Message-----
> > From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of
> > Antonio De Angelis via TF-M
> > Sent: Tuesday, April 23, 2019 3:02 PM
> > To: tf-m(a)lists.trustedfirmware.org
> > Cc: nd <nd(a)arm.com>
> > Subject: [EXT] Re: [TF-M] TFM_PSA_API =>BusFault
> >
> > WARNING: This email was created outside of NXP. DO NOT CLICK links
> > or attachments unless you recognize the sender and know the content is safe.
> >
> >
> >
> > Hi Andrej,
> >
> > Could you provide us with instructions on how to replicate the issue
> > you're observing? In particular, which build configuration you're
> > building (.cmake), compiler, platform used and if it's observed on
> > board or FVP/model? Also, are you able to identify the latest commit
> > which was still working in your setup / identify the commit which
> > brings in this
> issue?
> >
> > Thanks,
> > Antonio
> >
> > -----Original Message-----
> > From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of
> > Andrej Butok via TF-M
> > Sent: 23 April 2019 13:19
> > To: Andrej Butok <andrey.butok(a)nxp.com>
> > Cc: TF-M(a)lists.trustedfirmware.org
> > Subject: Re: [TF-M] TFM_PSA_API =>BusFault
> >
> > Father investigation shows, that tfm_pendsv_do_schedule() calls
> > tfm_thrd_context_switch() and passing pth_curr which is set to
> > NULL, so it is causing memcpy() to 0 address => Bus Fault.
> > So this code may not work properly.
> > Please provide a fix.
> >
> > -----Original Message-----
> > From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of
> > Andrej Butok via TF-M
> > Sent: Tuesday, April 23, 2019 1:38 PM
> > To: TF-M(a)lists.trustedfirmware.org
> > Subject: [EXT] [TF-M] TFM_PSA_API =>BusFault
> >
> > Hello,
> >
> > After last commits on TFM master branch, when TFM_PSA_API is
> > defined, the tfm examples finish in main()=>tfm_spm_init()=>....=>
> > tfm_thrd_context_switch()=>tfm_memcpy()=>BusFault_Handler().
> > When TFM_PSA_API is not defined, everything is OK.
> > Also, TFM examples were OK at least 2 weeks ago, even when
> > TFM_PSA_API was defined.
> >
> > Is it known issue? Or something new (during last week) must be added
> > into our target-specific code?
> >
> > Thanks,
> > Andrej Butok
> >
> > --
> > TF-M mailing list
> > TF-M(a)lists.trustedfirmware.org
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fli
> > st
> > s.trust
> > edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> >
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C594516635db840889
> >
> 6ee08d6c7f19eeb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636
> >
> 916237904331396&sdata=663%2F9XukXmp8lCoKUM6qEa4h5mxn6I9my0jh
> > W8P9wLM%3D&reserved=0
> > --
> > TF-M mailing list
> > TF-M(a)lists.trustedfirmware.org
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fli
> > st
> > s.trust
> > edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> >
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C594516635db840889
> >
> 6ee08d6c7f19eeb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636
> >
> 916237904331396&sdata=663%2F9XukXmp8lCoKUM6qEa4h5mxn6I9my0jh
> > W8P9wLM%3D&reserved=0
> > --
> > TF-M mailing list
> > TF-M(a)lists.trustedfirmware.org
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fli
> > st
> > s.trust
> > edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> >
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C594516635db840889
> >
> 6ee08d6c7f19eeb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636
> >
> 916237904341405&sdata=QvbSlGT7udwTcKcJajgtO8rvCvH0UJOMMqOJUc
> > 2YPMo%3D&reserved=0
> > --
> > TF-M mailing list
> > TF-M(a)lists.trustedfirmware.org
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fli
> > st
> > s.trust
> > edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> >
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C594516635db840889
> >
> 6ee08d6c7f19eeb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636
> >
> 916237904341405&sdata=QvbSlGT7udwTcKcJajgtO8rvCvH0UJOMMqOJUc
> > 2YPMo%3D&reserved=0
> > --
> > TF-M mailing list
> > TF-M(a)lists.trustedfirmware.org
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fli
> > st
> > s.trust
> > edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> >
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C594516635db840889
> >
> 6ee08d6c7f19eeb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636
> >
> 916237904341405&sdata=QvbSlGT7udwTcKcJajgtO8rvCvH0UJOMMqOJUc
> > 2YPMo%3D&reserved=0
> > --
> > TF-M mailing list
> > TF-M(a)lists.trustedfirmware.org
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fli
> > st
> > s.trustedfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Ca
> >
> ndrey.butok%40nxp.com%7Ccf08748223284a68708b08d6c882c0a6%7C686ea1
> d3bc2
> >
> b4c6fa92cd99c5c301635%7C0%7C0%7C636916861232924039&sdata=i4R0
> 4%2BC
> > zqYsB2bIBHHVUI1aOMNSEVKJa17ABl1vamUM%3D&reserved=0
> > --
> > TF-M mailing list
> > TF-M(a)lists.trustedfirmware.org
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fli
> > st
> > s.trustedfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Ca
> >
> ndrey.butok%40nxp.com%7Ccf08748223284a68708b08d6c882c0a6%7C686ea1
> d3bc2
> >
> b4c6fa92cd99c5c301635%7C0%7C0%7C636916861232924039&sdata=i4R0
> 4%2BC
> > zqYsB2bIBHHVUI1aOMNSEVKJa17ABl1vamUM%3D&reserved=0
> > --
> > TF-M mailing list
> > TF-M(a)lists.trustedfirmware.org
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fli
> > st
> > s.trustedfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Ca
> >
> ndrey.butok%40nxp.com%7Ccf08748223284a68708b08d6c882c0a6%7C686ea1
> d3bc2
> >
> b4c6fa92cd99c5c301635%7C0%7C0%7C636916861232924039&sdata=i4R0
> 4%2BC
> > zqYsB2bIBHHVUI1aOMNSEVKJa17ABl1vamUM%3D&reserved=0
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.trust
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7Ccf08748223284a6870
> 8b08d6c882c0a6%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6369
> 16861232924039&sdata=i4R04%2BCzqYsB2bIBHHVUI1aOMNSEVKJa17ABl
> 1vamUM%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…
Hi Ken,
The fix has fixed the bus fault. Thanks
But there are some issues when to run the TFM regression tests (defined CORE_TEST_IPC and TFM_PSA_API)
I am getting Security violation SVC_Handle()=>tfm_core_partition_request_svc_handler()=>tfm_core_sfn_request_handler()=>tfm_secure_api_error_handler(),
The log:
[Sec Thread] Secure image initializing!
[Sec Thread] hello! this is ipc client test sp!
[Sec Thread] Connect success!
[Sec Thread] Call success!
NS code is running...
[Sec Error] Unauthorized service request!
[Sec Error] Security violation when calling secure API
Could you run the regression tests and check if everything is OK.
1.5 week ago, even when IPC was enabled, all regression tests passed. Now they are passing only when IPC is disabled.
Thanks,
Andrej
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken Liu (Arm Technology China) via TF-M
Sent: Wednesday, April 24, 2019 9:02 AM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
Hi,
The fix for this problem has been logged here:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdeveloper…
And the patch is here:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Freview.tr…
I used a fake thread object to collect initial context to make scheduler has an initial CURR_THRD.
This is because I need to avoid unnecessary condition checking while context switch since CURR_THRD only equals to ZERO for ONCE time:
ctx_switch:
If (pcurr)
Tfm_memcpy(&pcurr->ctx, pctx, sizeof(*pctx)); Tfm_memcpy(pctx, &pnext->ctx, sizeof(pnext->ctx)):
The TFM_ASSERT in source is another thing since they may get removed in a release product.
Please help to provide feedback on it if you see this patch. And I will try to merge it after several +1/2 is collected since it is an hotfix patch.
Thanks.
-Ken
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken
> Liu (Arm Technology China) via TF-M
> Sent: Tuesday, April 23, 2019 10:06 PM
> To: TF-M(a)lists.trustedfirmware.org; nd <nd(a)arm.com>
> Cc: nd <nd(a)arm.com>
> Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
>
> Hi Andrej,
> Ah, great finding!
> We moved the default IDLE thread into partition now so there is no
> default CUR_THRD at very start.
> I guess reverting the latest commit
> 4dcae6f69db61af31316831d773e5d8777e9fbd3 should fix this problem.
> Sorry I don't have working platform now so can not verify it.
> Will provide a fix soon.
>
> -Ken
> ________________________________
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of
> Antonio De Angelis via TF-M <tf-m(a)lists.trustedfirmware.org>
> Sent: Tuesday, April 23, 2019 9:58 PM
> To: tf-m(a)lists.trustedfirmware.org
> Cc: nd
> Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
>
> Hi Andrej,
>
> While trying to replicate your issue I have found a (maybe related)
> issue with ConfigCoreIPC.cmake and Regression enabled on the current
> tip, described by the following ticket:
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdeveloper… . We are investigating if this can be related to the issue you're observing.
>
> Thanks,
> Antonio
>
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of
> Andrej Butok via TF-M
> Sent: 23 April 2019 14:50
> To: Ken Liu (Arm Technology China) <Ken.Liu(a)arm.com>
> Cc: TF-M(a)lists.trustedfirmware.org
> Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
>
>
> Hi Ken,
> May be context is static, but the CURR_THRD (p_curr_thrd) pointer is
> NULL, before the first tfm_thrd_context_switch() call.
> OR I have something wrong.
>
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken
> Liu (Arm Technology China) via TF-M
> Sent: Tuesday, April 23, 2019 3:43 PM
> To: tf-m(a)lists.trustedfirmware.org
> Cc: nd <nd(a)arm.com>
> Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
>
> WARNING: This email was created outside of NXP. DO NOT CLICK links or
> attachments unless you recognize the sender and know the content is safe.
>
>
>
> Hi Andrej,
> Thanks for the investigation, we will take a look ASAP.
>
> The thread context is allocated statically in global which should not
> have chance to be NULL. If you have time for digging, you can put
> message in function './secure_fw/core/ipc/tfm_spm.c:tfm_spm_init()' to
> show all thread context value of partitions.
>
> Thanks.
>
> -Ken
> ________________________________
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of
> Andrej Butok via TF-M <tf-m(a)lists.trustedfirmware.org>
> Sent: Tuesday, April 23, 2019 9:16 PM
> To: Antonio De Angelis
> Cc: TF-M(a)lists.trustedfirmware.org
> Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
>
> Hi Antonio,
>
> We have own port for LPC55S69, so not sure if you are able to run it.
> But, the issues happens in general code (master branch, the latest
> current commit). Defined TFM_PSA_API, TFM_LVL = 1.
> The NULL parameter is causing fault in the first call of
> tfm_thrd_context_switch(..., NULL,...) => tfm_memcpy(&NULL-
> >state_ctx.ctxb, ...) => memcpy(wrong address), and should cause an
> >issue on
> any platform.
>
> Thanks,
> Andrej
>
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of
> Antonio De Angelis via TF-M
> Sent: Tuesday, April 23, 2019 3:02 PM
> To: tf-m(a)lists.trustedfirmware.org
> Cc: nd <nd(a)arm.com>
> Subject: [EXT] Re: [TF-M] TFM_PSA_API =>BusFault
>
> WARNING: This email was created outside of NXP. DO NOT CLICK links or
> attachments unless you recognize the sender and know the content is safe.
>
>
>
> Hi Andrej,
>
> Could you provide us with instructions on how to replicate the issue
> you're observing? In particular, which build configuration you're
> building (.cmake), compiler, platform used and if it's observed on
> board or FVP/model? Also, are you able to identify the latest commit
> which was still working in your setup / identify the commit which brings in this issue?
>
> Thanks,
> Antonio
>
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of
> Andrej Butok via TF-M
> Sent: 23 April 2019 13:19
> To: Andrej Butok <andrey.butok(a)nxp.com>
> Cc: TF-M(a)lists.trustedfirmware.org
> Subject: Re: [TF-M] TFM_PSA_API =>BusFault
>
> Father investigation shows, that tfm_pendsv_do_schedule() calls
> tfm_thrd_context_switch() and passing pth_curr which is set to NULL,
> so it is causing memcpy() to 0 address => Bus Fault.
> So this code may not work properly.
> Please provide a fix.
>
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of
> Andrej Butok via TF-M
> Sent: Tuesday, April 23, 2019 1:38 PM
> To: TF-M(a)lists.trustedfirmware.org
> Subject: [EXT] [TF-M] TFM_PSA_API =>BusFault
>
> Hello,
>
> After last commits on TFM master branch, when TFM_PSA_API is defined,
> the tfm examples finish in main()=>tfm_spm_init()=>....=>
> tfm_thrd_context_switch()=>tfm_memcpy()=>BusFault_Handler().
> When TFM_PSA_API is not defined, everything is OK.
> Also, TFM examples were OK at least 2 weeks ago, even when TFM_PSA_API
> was defined.
>
> Is it known issue? Or something new (during last week) must be added
> into our target-specific code?
>
> Thanks,
> Andrej Butok
>
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.trust
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C594516635db840889
> 6ee08d6c7f19eeb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636
> 916237904331396&sdata=663%2F9XukXmp8lCoKUM6qEa4h5mxn6I9my0jh
> W8P9wLM%3D&reserved=0
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.trust
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C594516635db840889
> 6ee08d6c7f19eeb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636
> 916237904331396&sdata=663%2F9XukXmp8lCoKUM6qEa4h5mxn6I9my0jh
> W8P9wLM%3D&reserved=0
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.trust
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C594516635db840889
> 6ee08d6c7f19eeb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636
> 916237904341405&sdata=QvbSlGT7udwTcKcJajgtO8rvCvH0UJOMMqOJUc
> 2YPMo%3D&reserved=0
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.trust
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C594516635db840889
> 6ee08d6c7f19eeb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636
> 916237904341405&sdata=QvbSlGT7udwTcKcJajgtO8rvCvH0UJOMMqOJUc
> 2YPMo%3D&reserved=0
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.trust
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C594516635db840889
> 6ee08d6c7f19eeb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636
> 916237904341405&sdata=QvbSlGT7udwTcKcJajgtO8rvCvH0UJOMMqOJUc
> 2YPMo%3D&reserved=0
> --
> 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%7Ccf08748223284a68708b08d6c882c0a6%7C686ea1d3bc2
> b4c6fa92cd99c5c301635%7C0%7C0%7C636916861232924039&sdata=i4R04%2BC
> zqYsB2bIBHHVUI1aOMNSEVKJa17ABl1vamUM%3D&reserved=0
> --
> 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%7Ccf08748223284a68708b08d6c882c0a6%7C686ea1d3bc2
> b4c6fa92cd99c5c301635%7C0%7C0%7C636916861232924039&sdata=i4R04%2BC
> zqYsB2bIBHHVUI1aOMNSEVKJa17ABl1vamUM%3D&reserved=0
> --
> 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%7Ccf08748223284a68708b08d6c882c0a6%7C686ea1d3bc2
> b4c6fa92cd99c5c301635%7C0%7C0%7C636916861232924039&sdata=i4R04%2BC
> zqYsB2bIBHHVUI1aOMNSEVKJa17ABl1vamUM%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…
Hi,
The fix for this problem has been logged here:
https://developer.trustedfirmware.org/T327
And the patch is here:
https://review.trustedfirmware.org/c/trusted-firmware-m/+/922
I used a fake thread object to collect initial context to make scheduler has an initial CURR_THRD.
This is because I need to avoid unnecessary condition checking while context switch since CURR_THRD only equals to ZERO for ONCE time:
ctx_switch:
If (pcurr)
Tfm_memcpy(&pcurr->ctx, pctx, sizeof(*pctx));
Tfm_memcpy(pctx, &pnext->ctx, sizeof(pnext->ctx)):
The TFM_ASSERT in source is another thing since they may get removed in a release product.
Please help to provide feedback on it if you see this patch. And I will try to merge it after several +1/2 is collected since it is an hotfix patch.
Thanks.
-Ken
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken Liu
> (Arm Technology China) via TF-M
> Sent: Tuesday, April 23, 2019 10:06 PM
> To: TF-M(a)lists.trustedfirmware.org; nd <nd(a)arm.com>
> Cc: nd <nd(a)arm.com>
> Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
>
> Hi Andrej,
> Ah, great finding!
> We moved the default IDLE thread into partition now so there is no default
> CUR_THRD at very start.
> I guess reverting the latest commit
> 4dcae6f69db61af31316831d773e5d8777e9fbd3 should fix this problem.
> Sorry I don't have working platform now so can not verify it.
> Will provide a fix soon.
>
> -Ken
> ________________________________
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Antonio De
> Angelis via TF-M <tf-m(a)lists.trustedfirmware.org>
> Sent: Tuesday, April 23, 2019 9:58 PM
> To: tf-m(a)lists.trustedfirmware.org
> Cc: nd
> Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
>
> Hi Andrej,
>
> While trying to replicate your issue I have found a (maybe related) issue with
> ConfigCoreIPC.cmake and Regression enabled on the current tip, described by
> the following ticket: https://developer.trustedfirmware.org/T326 . We are
> investigating if this can be related to the issue you're observing.
>
> Thanks,
> Antonio
>
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej
> Butok via TF-M
> Sent: 23 April 2019 14:50
> To: Ken Liu (Arm Technology China) <Ken.Liu(a)arm.com>
> Cc: TF-M(a)lists.trustedfirmware.org
> Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
>
>
> Hi Ken,
> May be context is static, but the CURR_THRD (p_curr_thrd) pointer is NULL,
> before the first tfm_thrd_context_switch() call.
> OR I have something wrong.
>
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken Liu
> (Arm Technology China) via TF-M
> Sent: Tuesday, April 23, 2019 3:43 PM
> To: tf-m(a)lists.trustedfirmware.org
> Cc: nd <nd(a)arm.com>
> Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
>
> WARNING: This email was created outside of NXP. DO NOT CLICK links or
> attachments unless you recognize the sender and know the content is safe.
>
>
>
> Hi Andrej,
> Thanks for the investigation, we will take a look ASAP.
>
> The thread context is allocated statically in global which should not have chance
> to be NULL. If you have time for digging, you can put message in function
> './secure_fw/core/ipc/tfm_spm.c:tfm_spm_init()' to show all thread context
> value of partitions.
>
> Thanks.
>
> -Ken
> ________________________________
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Andrej
> Butok via TF-M <tf-m(a)lists.trustedfirmware.org>
> Sent: Tuesday, April 23, 2019 9:16 PM
> To: Antonio De Angelis
> Cc: TF-M(a)lists.trustedfirmware.org
> Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
>
> Hi Antonio,
>
> We have own port for LPC55S69, so not sure if you are able to run it.
> But, the issues happens in general code (master branch, the latest current
> commit). Defined TFM_PSA_API, TFM_LVL = 1.
> The NULL parameter is causing fault in the first call of
> tfm_thrd_context_switch(..., NULL,...) => tfm_memcpy(&NULL-
> >state_ctx.ctxb, ...) => memcpy(wrong address), and should cause an issue on
> any platform.
>
> Thanks,
> Andrej
>
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Antonio De
> Angelis via TF-M
> Sent: Tuesday, April 23, 2019 3:02 PM
> To: tf-m(a)lists.trustedfirmware.org
> Cc: nd <nd(a)arm.com>
> Subject: [EXT] Re: [TF-M] TFM_PSA_API =>BusFault
>
> WARNING: This email was created outside of NXP. DO NOT CLICK links or
> attachments unless you recognize the sender and know the content is safe.
>
>
>
> Hi Andrej,
>
> Could you provide us with instructions on how to replicate the issue you're
> observing? In particular, which build configuration you're building (.cmake),
> compiler, platform used and if it's observed on board or FVP/model? Also, are
> you able to identify the latest commit which was still working in your setup /
> identify the commit which brings in this issue?
>
> Thanks,
> Antonio
>
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej
> Butok via TF-M
> Sent: 23 April 2019 13:19
> To: Andrej Butok <andrey.butok(a)nxp.com>
> Cc: TF-M(a)lists.trustedfirmware.org
> Subject: Re: [TF-M] TFM_PSA_API =>BusFault
>
> Father investigation shows, that tfm_pendsv_do_schedule() calls
> tfm_thrd_context_switch() and passing pth_curr which is set to NULL, so it is
> causing memcpy() to 0 address => Bus Fault.
> So this code may not work properly.
> Please provide a fix.
>
> -----Original Message-----
> From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej
> Butok via TF-M
> Sent: Tuesday, April 23, 2019 1:38 PM
> To: TF-M(a)lists.trustedfirmware.org
> Subject: [EXT] [TF-M] TFM_PSA_API =>BusFault
>
> Hello,
>
> After last commits on TFM master branch, when TFM_PSA_API is defined, the
> tfm examples finish in main()=>tfm_spm_init()=>....=>
> tfm_thrd_context_switch()=>tfm_memcpy()=>BusFault_Handler().
> When TFM_PSA_API is not defined, everything is OK.
> Also, TFM examples were OK at least 2 weeks ago, even when TFM_PSA_API
> was defined.
>
> Is it known issue? Or something new (during last week) must be added into our
> target-specific code?
>
> Thanks,
> Andrej Butok
>
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C594516635db840889
> 6ee08d6c7f19eeb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636
> 916237904331396&sdata=663%2F9XukXmp8lCoKUM6qEa4h5mxn6I9my0jh
> W8P9wLM%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…
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C594516635db840889
> 6ee08d6c7f19eeb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636
> 916237904331396&sdata=663%2F9XukXmp8lCoKUM6qEa4h5mxn6I9my0jh
> W8P9wLM%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…
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C594516635db840889
> 6ee08d6c7f19eeb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636
> 916237904341405&sdata=QvbSlGT7udwTcKcJajgtO8rvCvH0UJOMMqOJUc
> 2YPMo%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…
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C594516635db840889
> 6ee08d6c7f19eeb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636
> 916237904341405&sdata=QvbSlGT7udwTcKcJajgtO8rvCvH0UJOMMqOJUc
> 2YPMo%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…
> edfirmware.org%2Fmailman%2Flistinfo%2Ftf-
> m&data=02%7C01%7Candrey.butok%40nxp.com%7C594516635db840889
> 6ee08d6c7f19eeb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636
> 916237904341405&sdata=QvbSlGT7udwTcKcJajgtO8rvCvH0UJOMMqOJUc
> 2YPMo%3D&reserved=0
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/tf-m
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/tf-m
> --
> TF-M mailing list
> TF-M(a)lists.trustedfirmware.org
> https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Good, will wait for the official fix ;)
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken Liu (Arm Technology China) via TF-M
Sent: Tuesday, April 23, 2019 4:06 PM
To: TF-M(a)lists.trustedfirmware.org; nd <nd(a)arm.com>
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
Hi Andrej,
Ah, great finding!
We moved the default IDLE thread into partition now so there is no default CUR_THRD at very start.
I guess reverting the latest commit 4dcae6f69db61af31316831d773e5d8777e9fbd3 should fix this problem.
Sorry I don't have working platform now so can not verify it.
Will provide a fix soon.
-Ken
________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Antonio De Angelis via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: Tuesday, April 23, 2019 9:58 PM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd
Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
Hi Andrej,
While trying to replicate your issue I have found a (maybe related) issue with ConfigCoreIPC.cmake and Regression enabled on the current tip, described by the following ticket: https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdeveloper… . We are investigating if this can be related to the issue you're observing.
Thanks,
Antonio
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: 23 April 2019 14:50
To: Ken Liu (Arm Technology China) <Ken.Liu(a)arm.com>
Cc: TF-M(a)lists.trustedfirmware.org
Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
Hi Ken,
May be context is static, but the CURR_THRD (p_curr_thrd) pointer is NULL, before the first tfm_thrd_context_switch() call.
OR I have something wrong.
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken Liu (Arm Technology China) via TF-M
Sent: Tuesday, April 23, 2019 3:43 PM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
WARNING: This email was created outside of NXP. DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.
Hi Andrej,
Thanks for the investigation, we will take a look ASAP.
The thread context is allocated statically in global which should not have chance to be NULL. If you have time for digging, you can put message in function './secure_fw/core/ipc/tfm_spm.c:tfm_spm_init()' to show all thread context value of partitions.
Thanks.
-Ken
________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Andrej Butok via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: Tuesday, April 23, 2019 9:16 PM
To: Antonio De Angelis
Cc: TF-M(a)lists.trustedfirmware.org
Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
Hi Antonio,
We have own port for LPC55S69, so not sure if you are able to run it.
But, the issues happens in general code (master branch, the latest current commit). Defined TFM_PSA_API, TFM_LVL = 1.
The NULL parameter is causing fault in the first call of tfm_thrd_context_switch(..., NULL,...) => tfm_memcpy(&NULL->state_ctx.ctxb, ...) => memcpy(wrong address), and should cause an issue on any platform.
Thanks,
Andrej
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Antonio De Angelis via TF-M
Sent: Tuesday, April 23, 2019 3:02 PM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: [EXT] Re: [TF-M] TFM_PSA_API =>BusFault
WARNING: This email was created outside of NXP. DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.
Hi Andrej,
Could you provide us with instructions on how to replicate the issue you're observing? In particular, which build configuration you're building (.cmake), compiler, platform used and if it's observed on board or FVP/model? Also, are you able to identify the latest commit which was still working in your setup / identify the commit which brings in this issue?
Thanks,
Antonio
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: 23 April 2019 13:19
To: Andrej Butok <andrey.butok(a)nxp.com>
Cc: TF-M(a)lists.trustedfirmware.org
Subject: Re: [TF-M] TFM_PSA_API =>BusFault
Father investigation shows, that tfm_pendsv_do_schedule() calls tfm_thrd_context_switch() and passing pth_curr which is set to NULL, so it is causing memcpy() to 0 address => Bus Fault.
So this code may not work properly.
Please provide a fix.
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: Tuesday, April 23, 2019 1:38 PM
To: TF-M(a)lists.trustedfirmware.org
Subject: [EXT] [TF-M] TFM_PSA_API =>BusFault
Hello,
After last commits on TFM master branch, when TFM_PSA_API is defined, the tfm examples finish in main()=>tfm_spm_init()=>....=> tfm_thrd_context_switch()=>tfm_memcpy()=>BusFault_Handler().
When TFM_PSA_API is not defined, everything is OK.
Also, TFM examples were OK at least 2 weeks ago, even when TFM_PSA_API was defined.
Is it known issue? Or something new (during last week) must be added into our target-specific code?
Thanks,
Andrej Butok
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
Hi Andrej,
Ah, great finding!
We moved the default IDLE thread into partition now so there is no default CUR_THRD at very start.
I guess reverting the latest commit 4dcae6f69db61af31316831d773e5d8777e9fbd3 should fix this problem.
Sorry I don't have working platform now so can not verify it.
Will provide a fix soon.
-Ken
________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Antonio De Angelis via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: Tuesday, April 23, 2019 9:58 PM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd
Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
Hi Andrej,
While trying to replicate your issue I have found a (maybe related) issue with ConfigCoreIPC.cmake and Regression enabled on the current tip, described by the following ticket: https://developer.trustedfirmware.org/T326 . We are investigating if this can be related to the issue you're observing.
Thanks,
Antonio
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: 23 April 2019 14:50
To: Ken Liu (Arm Technology China) <Ken.Liu(a)arm.com>
Cc: TF-M(a)lists.trustedfirmware.org
Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
Hi Ken,
May be context is static, but the CURR_THRD (p_curr_thrd) pointer is NULL, before the first tfm_thrd_context_switch() call.
OR I have something wrong.
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken Liu (Arm Technology China) via TF-M
Sent: Tuesday, April 23, 2019 3:43 PM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
WARNING: This email was created outside of NXP. DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.
Hi Andrej,
Thanks for the investigation, we will take a look ASAP.
The thread context is allocated statically in global which should not have chance to be NULL. If you have time for digging, you can put message in function './secure_fw/core/ipc/tfm_spm.c:tfm_spm_init()' to show all thread context value of partitions.
Thanks.
-Ken
________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Andrej Butok via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: Tuesday, April 23, 2019 9:16 PM
To: Antonio De Angelis
Cc: TF-M(a)lists.trustedfirmware.org
Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
Hi Antonio,
We have own port for LPC55S69, so not sure if you are able to run it.
But, the issues happens in general code (master branch, the latest current commit). Defined TFM_PSA_API, TFM_LVL = 1.
The NULL parameter is causing fault in the first call of tfm_thrd_context_switch(..., NULL,...) => tfm_memcpy(&NULL->state_ctx.ctxb, ...) => memcpy(wrong address), and should cause an issue on any platform.
Thanks,
Andrej
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Antonio De Angelis via TF-M
Sent: Tuesday, April 23, 2019 3:02 PM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: [EXT] Re: [TF-M] TFM_PSA_API =>BusFault
WARNING: This email was created outside of NXP. DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.
Hi Andrej,
Could you provide us with instructions on how to replicate the issue you're observing? In particular, which build configuration you're building (.cmake), compiler, platform used and if it's observed on board or FVP/model? Also, are you able to identify the latest commit which was still working in your setup / identify the commit which brings in this issue?
Thanks,
Antonio
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: 23 April 2019 13:19
To: Andrej Butok <andrey.butok(a)nxp.com>
Cc: TF-M(a)lists.trustedfirmware.org
Subject: Re: [TF-M] TFM_PSA_API =>BusFault
Father investigation shows, that tfm_pendsv_do_schedule() calls tfm_thrd_context_switch() and passing pth_curr which is set to NULL, so it is causing memcpy() to 0 address => Bus Fault.
So this code may not work properly.
Please provide a fix.
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: Tuesday, April 23, 2019 1:38 PM
To: TF-M(a)lists.trustedfirmware.org
Subject: [EXT] [TF-M] TFM_PSA_API =>BusFault
Hello,
After last commits on TFM master branch, when TFM_PSA_API is defined, the tfm examples finish in main()=>tfm_spm_init()=>....=> tfm_thrd_context_switch()=>tfm_memcpy()=>BusFault_Handler().
When TFM_PSA_API is not defined, everything is OK.
Also, TFM examples were OK at least 2 weeks ago, even when TFM_PSA_API was defined.
Is it known issue? Or something new (during last week) must be added into our target-specific code?
Thanks,
Andrej Butok
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi Andrej,
While trying to replicate your issue I have found a (maybe related) issue with ConfigCoreIPC.cmake and Regression enabled on the current tip, described by the following ticket: https://developer.trustedfirmware.org/T326 . We are investigating if this can be related to the issue you're observing.
Thanks,
Antonio
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: 23 April 2019 14:50
To: Ken Liu (Arm Technology China) <Ken.Liu(a)arm.com>
Cc: TF-M(a)lists.trustedfirmware.org
Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
Hi Ken,
May be context is static, but the CURR_THRD (p_curr_thrd) pointer is NULL, before the first tfm_thrd_context_switch() call.
OR I have something wrong.
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken Liu (Arm Technology China) via TF-M
Sent: Tuesday, April 23, 2019 3:43 PM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
WARNING: This email was created outside of NXP. DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.
Hi Andrej,
Thanks for the investigation, we will take a look ASAP.
The thread context is allocated statically in global which should not have chance to be NULL. If you have time for digging, you can put message in function './secure_fw/core/ipc/tfm_spm.c:tfm_spm_init()' to show all thread context value of partitions.
Thanks.
-Ken
________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Andrej Butok via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: Tuesday, April 23, 2019 9:16 PM
To: Antonio De Angelis
Cc: TF-M(a)lists.trustedfirmware.org
Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
Hi Antonio,
We have own port for LPC55S69, so not sure if you are able to run it.
But, the issues happens in general code (master branch, the latest current commit). Defined TFM_PSA_API, TFM_LVL = 1.
The NULL parameter is causing fault in the first call of tfm_thrd_context_switch(..., NULL,...) => tfm_memcpy(&NULL->state_ctx.ctxb, ...) => memcpy(wrong address), and should cause an issue on any platform.
Thanks,
Andrej
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Antonio De Angelis via TF-M
Sent: Tuesday, April 23, 2019 3:02 PM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: [EXT] Re: [TF-M] TFM_PSA_API =>BusFault
WARNING: This email was created outside of NXP. DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.
Hi Andrej,
Could you provide us with instructions on how to replicate the issue you're observing? In particular, which build configuration you're building (.cmake), compiler, platform used and if it's observed on board or FVP/model? Also, are you able to identify the latest commit which was still working in your setup / identify the commit which brings in this issue?
Thanks,
Antonio
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: 23 April 2019 13:19
To: Andrej Butok <andrey.butok(a)nxp.com>
Cc: TF-M(a)lists.trustedfirmware.org
Subject: Re: [TF-M] TFM_PSA_API =>BusFault
Father investigation shows, that tfm_pendsv_do_schedule() calls tfm_thrd_context_switch() and passing pth_curr which is set to NULL, so it is causing memcpy() to 0 address => Bus Fault.
So this code may not work properly.
Please provide a fix.
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: Tuesday, April 23, 2019 1:38 PM
To: TF-M(a)lists.trustedfirmware.org
Subject: [EXT] [TF-M] TFM_PSA_API =>BusFault
Hello,
After last commits on TFM master branch, when TFM_PSA_API is defined, the tfm examples finish in main()=>tfm_spm_init()=>....=> tfm_thrd_context_switch()=>tfm_memcpy()=>BusFault_Handler().
When TFM_PSA_API is not defined, everything is OK.
Also, TFM examples were OK at least 2 weeks ago, even when TFM_PSA_API was defined.
Is it known issue? Or something new (during last week) must be added into our target-specific code?
Thanks,
Andrej Butok
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi Ken,
May be context is static, but the CURR_THRD (p_curr_thrd) pointer is NULL, before the first tfm_thrd_context_switch() call.
OR I have something wrong.
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken Liu (Arm Technology China) via TF-M
Sent: Tuesday, April 23, 2019 3:43 PM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
WARNING: This email was created outside of NXP. DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.
Hi Andrej,
Thanks for the investigation, we will take a look ASAP.
The thread context is allocated statically in global which should not have chance to be NULL. If you have time for digging, you can put message in function './secure_fw/core/ipc/tfm_spm.c:tfm_spm_init()' to show all thread context value of partitions.
Thanks.
-Ken
________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Andrej Butok via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: Tuesday, April 23, 2019 9:16 PM
To: Antonio De Angelis
Cc: TF-M(a)lists.trustedfirmware.org
Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
Hi Antonio,
We have own port for LPC55S69, so not sure if you are able to run it.
But, the issues happens in general code (master branch, the latest current commit). Defined TFM_PSA_API, TFM_LVL = 1.
The NULL parameter is causing fault in the first call of tfm_thrd_context_switch(..., NULL,...) => tfm_memcpy(&NULL->state_ctx.ctxb, ...) => memcpy(wrong address), and should cause an issue on any platform.
Thanks,
Andrej
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Antonio De Angelis via TF-M
Sent: Tuesday, April 23, 2019 3:02 PM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: [EXT] Re: [TF-M] TFM_PSA_API =>BusFault
WARNING: This email was created outside of NXP. DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.
Hi Andrej,
Could you provide us with instructions on how to replicate the issue you're observing? In particular, which build configuration you're building (.cmake), compiler, platform used and if it's observed on board or FVP/model? Also, are you able to identify the latest commit which was still working in your setup / identify the commit which brings in this issue?
Thanks,
Antonio
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: 23 April 2019 13:19
To: Andrej Butok <andrey.butok(a)nxp.com>
Cc: TF-M(a)lists.trustedfirmware.org
Subject: Re: [TF-M] TFM_PSA_API =>BusFault
Father investigation shows, that tfm_pendsv_do_schedule() calls tfm_thrd_context_switch() and passing pth_curr which is set to NULL, so it is causing memcpy() to 0 address => Bus Fault.
So this code may not work properly.
Please provide a fix.
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: Tuesday, April 23, 2019 1:38 PM
To: TF-M(a)lists.trustedfirmware.org
Subject: [EXT] [TF-M] TFM_PSA_API =>BusFault
Hello,
After last commits on TFM master branch, when TFM_PSA_API is defined, the tfm examples finish in main()=>tfm_spm_init()=>....=> tfm_thrd_context_switch()=>tfm_memcpy()=>BusFault_Handler().
When TFM_PSA_API is not defined, everything is OK.
Also, TFM examples were OK at least 2 weeks ago, even when TFM_PSA_API was defined.
Is it known issue? Or something new (during last week) must be added into our target-specific code?
Thanks,
Andrej Butok
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
Hi Andrej,
Thanks for the investigation, we will take a look ASAP.
The thread context is allocated statically in global which should not have chance to be NULL. If you have time for digging, you can put message in function './secure_fw/core/ipc/tfm_spm.c:tfm_spm_init()' to show all thread context value of partitions.
Thanks.
-Ken
________________________________
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> on behalf of Andrej Butok via TF-M <tf-m(a)lists.trustedfirmware.org>
Sent: Tuesday, April 23, 2019 9:16 PM
To: Antonio De Angelis
Cc: TF-M(a)lists.trustedfirmware.org
Subject: Re: [TF-M] [EXT] Re: TFM_PSA_API =>BusFault
Hi Antonio,
We have own port for LPC55S69, so not sure if you are able to run it.
But, the issues happens in general code (master branch, the latest current commit). Defined TFM_PSA_API, TFM_LVL = 1.
The NULL parameter is causing fault in the first call of tfm_thrd_context_switch(..., NULL,...) => tfm_memcpy(&NULL->state_ctx.ctxb, ...) => memcpy(wrong address), and should cause an issue on any platform.
Thanks,
Andrej
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Antonio De Angelis via TF-M
Sent: Tuesday, April 23, 2019 3:02 PM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: [EXT] Re: [TF-M] TFM_PSA_API =>BusFault
WARNING: This email was created outside of NXP. DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.
Hi Andrej,
Could you provide us with instructions on how to replicate the issue you're observing? In particular, which build configuration you're building (.cmake), compiler, platform used and if it's observed on board or FVP/model? Also, are you able to identify the latest commit which was still working in your setup / identify the commit which brings in this issue?
Thanks,
Antonio
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: 23 April 2019 13:19
To: Andrej Butok <andrey.butok(a)nxp.com>
Cc: TF-M(a)lists.trustedfirmware.org
Subject: Re: [TF-M] TFM_PSA_API =>BusFault
Father investigation shows, that tfm_pendsv_do_schedule() calls tfm_thrd_context_switch() and passing pth_curr which is set to NULL, so it is causing memcpy() to 0 address => Bus Fault.
So this code may not work properly.
Please provide a fix.
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: Tuesday, April 23, 2019 1:38 PM
To: TF-M(a)lists.trustedfirmware.org
Subject: [EXT] [TF-M] TFM_PSA_API =>BusFault
Hello,
After last commits on TFM master branch, when TFM_PSA_API is defined, the tfm examples finish in main()=>tfm_spm_init()=>....=> tfm_thrd_context_switch()=>tfm_memcpy()=>BusFault_Handler().
When TFM_PSA_API is not defined, everything is OK.
Also, TFM examples were OK at least 2 weeks ago, even when TFM_PSA_API was defined.
Is it known issue? Or something new (during last week) must be added into our target-specific code?
Thanks,
Andrej Butok
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi Antonio,
We have own port for LPC55S69, so not sure if you are able to run it.
But, the issues happens in general code (master branch, the latest current commit). Defined TFM_PSA_API, TFM_LVL = 1.
The NULL parameter is causing fault in the first call of tfm_thrd_context_switch(..., NULL,...) => tfm_memcpy(&NULL->state_ctx.ctxb, ...) => memcpy(wrong address), and should cause an issue on any platform.
Thanks,
Andrej
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Antonio De Angelis via TF-M
Sent: Tuesday, April 23, 2019 3:02 PM
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: [EXT] Re: [TF-M] TFM_PSA_API =>BusFault
WARNING: This email was created outside of NXP. DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.
Hi Andrej,
Could you provide us with instructions on how to replicate the issue you're observing? In particular, which build configuration you're building (.cmake), compiler, platform used and if it's observed on board or FVP/model? Also, are you able to identify the latest commit which was still working in your setup / identify the commit which brings in this issue?
Thanks,
Antonio
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: 23 April 2019 13:19
To: Andrej Butok <andrey.butok(a)nxp.com>
Cc: TF-M(a)lists.trustedfirmware.org
Subject: Re: [TF-M] TFM_PSA_API =>BusFault
Father investigation shows, that tfm_pendsv_do_schedule() calls tfm_thrd_context_switch() and passing pth_curr which is set to NULL, so it is causing memcpy() to 0 address => Bus Fault.
So this code may not work properly.
Please provide a fix.
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: Tuesday, April 23, 2019 1:38 PM
To: TF-M(a)lists.trustedfirmware.org
Subject: [EXT] [TF-M] TFM_PSA_API =>BusFault
Hello,
After last commits on TFM master branch, when TFM_PSA_API is defined, the tfm examples finish in main()=>tfm_spm_init()=>....=> tfm_thrd_context_switch()=>tfm_memcpy()=>BusFault_Handler().
When TFM_PSA_API is not defined, everything is OK.
Also, TFM examples were OK at least 2 weeks ago, even when TFM_PSA_API was defined.
Is it known issue? Or something new (during last week) must be added into our target-specific code?
Thanks,
Andrej Butok
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
Hi Andrej,
Could you provide us with instructions on how to replicate the issue you're observing? In particular, which build configuration you're building (.cmake), compiler, platform used and if it's observed on board or FVP/model? Also, are you able to identify the latest commit which was still working in your setup / identify the commit which brings in this issue?
Thanks,
Antonio
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: 23 April 2019 13:19
To: Andrej Butok <andrey.butok(a)nxp.com>
Cc: TF-M(a)lists.trustedfirmware.org
Subject: Re: [TF-M] TFM_PSA_API =>BusFault
Father investigation shows, that tfm_pendsv_do_schedule() calls tfm_thrd_context_switch() and passing pth_curr which is set to NULL, so it is causing memcpy() to 0 address => Bus Fault.
So this code may not work properly.
Please provide a fix.
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: Tuesday, April 23, 2019 1:38 PM
To: TF-M(a)lists.trustedfirmware.org
Subject: [EXT] [TF-M] TFM_PSA_API =>BusFault
Hello,
After last commits on TFM master branch, when TFM_PSA_API is defined, the tfm examples finish in main()=>tfm_spm_init()=>....=> tfm_thrd_context_switch()=>tfm_memcpy()=>BusFault_Handler().
When TFM_PSA_API is not defined, everything is OK.
Also, TFM examples were OK at least 2 weeks ago, even when TFM_PSA_API was defined.
Is it known issue? Or something new (during last week) must be added into our target-specific code?
Thanks,
Andrej Butok
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Father investigation shows, that tfm_pendsv_do_schedule() calls tfm_thrd_context_switch() and passing pth_curr which is set to NULL, so it is causing memcpy() to 0 address => Bus Fault.
So this code may not work properly.
Please provide a fix.
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Andrej Butok via TF-M
Sent: Tuesday, April 23, 2019 1:38 PM
To: TF-M(a)lists.trustedfirmware.org
Subject: [EXT] [TF-M] TFM_PSA_API =>BusFault
Hello,
After last commits on TFM master branch, when TFM_PSA_API is defined, the tfm examples finish in main()=>tfm_spm_init()=>....=> tfm_thrd_context_switch()=>tfm_memcpy()=>BusFault_Handler().
When TFM_PSA_API is not defined, everything is OK.
Also, TFM examples were OK at least 2 weeks ago, even when TFM_PSA_API was defined.
Is it known issue? Or something new (during last week) must be added into our target-specific code?
Thanks,
Andrej Butok
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
Hello,
After last commits on TFM master branch, when TFM_PSA_API is defined, the tfm examples finish in main()=>tfm_spm_init()=>....=> tfm_thrd_context_switch()=>tfm_memcpy()=>BusFault_Handler().
When TFM_PSA_API is not defined, everything is OK.
Also, TFM examples were OK at least 2 weeks ago, even when TFM_PSA_API was defined.
Is it known issue? Or something new (during last week) must be added into our target-specific code?
Thanks,
Andrej Butok
For solving the placement in contiguous region. One possible solution is to modify image format as follow :
header can contain manifest and ih_hdr_size still fixes payload start offset and TLV section starts after sizeof(struct image_header)
Michel
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Tamas Ban via TF-M
Sent: lundi 15 avril 2019 16:53
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] FW: Trusted boot - rollback protection
Actually the design doc propose to use a distinct security counter from image version (ih_ver in header). But in the most simple case this security counter can be derived from the image version, to have the exact same value (ignoring the build number).
The image signature cover these continues blocks in memory:
- image header
- image
- some part of TLV section (currently not covered, but due to multi image support it is planned to introduce a signed TLV section)
Because these are contiguous regions in the memory it is not possible to place only the (header + TLV section) to the trusted memory but miss out the image itself (at least I cannot see how to solve)
Tamas
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Michel JAOUEN via TF-M
Sent: 08 April 2019 16:20
To: tf-m(a)lists.trustedfirmware.org
Subject: Re: [TF-M] Trusted boot - rollback protection
For the platform without hardware for NV counter, but having trusted memory It is mentioned that the support is possible as follow :
"an active image and related manifest data is stored in trusted memory then the included security counter cannot be compromised."
the impact for this implementation in mcu-boot is limited to :
* The test of the version (security counter is ih_ver from mcuboot header)
* The placement of active image and related manifest data in a trusted memory.
Is my understanding correct ?
As the placement of full image in a trusted memory is a constraint.
Can we limit the information placed in a trusted memory to :
* image header,
* TLV sections.
This seems sufficient to support anti roll back.
Of course additional impact on mcu-boot must be planned but as multi image support is also targeted , the placement of all images in a trusted memory is likely to be unachievable for all configurations.
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
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.
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi,
We have a candidate fix for issues reported with -Os builds with IPC mode builds, available here: https://review.trustedfirmware.org/c/trusted-firmware-m/+/882 could you please help verify if this fixes the issue you're seeing?
Note that also with this patch, the Secure side of SST regression in IPC mode fails, but that is another issue that we have identified and we have a separate patch which will be ready shortly for that.
Thanks,
Antonio
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Stanislav Jancik via TF-M
Sent: 16 April 2019 13:26
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] TF-M ARM GCC Optimization issue
Hi Gyorgy,
Yes, it looks that this is the issue. I saw exactly this behavior when optimization was set to -O1. Do you think, that ARM will prepare official fix of this file?
Moreover, when I tried to set optimization to -Os, the regression tests have stopped working at TFM_SST_TEST_1XXX test suite. But I did not try to find the reason why, therefore I cannot say more.
Regards
Stanislav
-----Original Message-----
From: TF-M [mailto:tf-m-bounces@lists.trustedfirmware.org] On Behalf Of tf-m-request(a)lists.trustedfirmware.org
Sent: Tuesday, April 16, 2019 2:00 PM
To: tf-m(a)lists.trustedfirmware.org
Subject: [EXT] TF-M Digest, Vol 6, Issue 12
WARNING: This email was created outside of NXP. DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.
Send TF-M mailing list submissions to
tf-m(a)lists.trustedfirmware.org
To subscribe or unsubscribe via the World Wide Web, visit
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
or, via email, send a message with subject or body 'help' to
tf-m-request(a)lists.trustedfirmware.org
You can reach the person managing the list at
tf-m-owner(a)lists.trustedfirmware.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of TF-M digest..."
Today's Topics:
1. FW: Trusted boot - rollback protection (Tamas Ban)
2. TF-M ARM GCC Optimization issue (Stanislav Jancik)
3. Re: TF-M ARM GCC Optimization issue (Gyorgy Szing)
----------------------------------------------------------------------
Message: 1
Date: Mon, 15 Apr 2019 14:52:49 +0000
From: Tamas Ban <Tamas.Ban(a)arm.com>
To: "tf-m(a)lists.trustedfirmware.org" <tf-m(a)lists.trustedfirmware.org>
Subject: [TF-M] FW: Trusted boot - rollback protection
Message-ID:
<AM6PR08MB3126592CF647127402DB91C4E22B0(a)AM6PR08MB3126.eurprd08.prod.outlook.com>
Content-Type: text/plain; charset="utf-8"
Actually the design doc propose to use a distinct security counter from image version (ih_ver in header). But in the most simple case this security counter can be derived from the image version, to have the exact same value (ignoring the build number).
The image signature cover these continues blocks in memory:
- image header
- image
- some part of TLV section (currently not covered, but due to multi image support it is planned to introduce a signed TLV section)
Because these are contiguous regions in the memory it is not possible to place only the (header + TLV section) to the trusted memory but miss out the image itself (at least I cannot see how to solve)
Tamas
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Michel JAOUEN via TF-M
Sent: 08 April 2019 16:20
To: tf-m(a)lists.trustedfirmware.org
Subject: Re: [TF-M] Trusted boot - rollback protection
For the platform without hardware for NV counter, but having trusted memory It is mentioned that the support is possible as follow :
"an active image and related manifest data is stored in trusted memory then the included security counter cannot be compromised."
the impact for this implementation in mcu-boot is limited to :
* The test of the version (security counter is ih_ver from mcuboot header)
* The placement of active image and related manifest data in a trusted memory.
Is my understanding correct ?
As the placement of full image in a trusted memory is a constraint.
Can we limit the information placed in a trusted memory to :
* image header,
* TLV sections.
This seems sufficient to support anti roll back.
Of course additional impact on mcu-boot must be planned but as multi image support is also targeted , the placement of all images in a trusted memory is likely to be unachievable for all configurations.
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
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.
------------------------------
Message: 2
Date: Tue, 16 Apr 2019 11:21:05 +0000
From: Stanislav Jancik <stanislav.jancik(a)nxp.com>
To: "tf-m(a)lists.trustedfirmware.org" <tf-m(a)lists.trustedfirmware.org>
Subject: [TF-M] TF-M ARM GCC Optimization issue
Message-ID:
<VI1PR04MB63200EB729C45B420D211A2890240(a)VI1PR04MB6320.eurprd04.prod.outlook.com>
Content-Type: text/plain; charset="us-ascii"
Hi,
I am currently working on porting TF-M to our (NXP's) LPC55S69 platform. We have supported armclang compiler and we work on support of armgcc compiler. I found out, that the TF-M is working correctly only with optimization -O0 for secure code. I use "7 2018-q2-update" compiler.
For example, when optimization -O1 is set for secure code, the regression tests are running correctly until TFM_IPC_TEST_1XXX test suite. When I debugged this issue, I found out that function and arguments are not properly assigned in function tfm_core_ns_ipc_request (tfm_psa_api_client.c). When I updated this function so the variables int32_t args[4]; struct tfm_sfn_req_s desc, *desc_ptr = &desc; and nt32_t res; were global instead of local. The tests have started running correctly.
I so similar issue, when optimization was -Os, but only secure test suites run correctly in this case. I did not see such a behavior when I used armclang compiler.
Did you try to use different optimization at Musca boards as well?
Regards
Stanislav
------------------------------
Message: 3
Date: Tue, 16 Apr 2019 11:58:29 +0000
From: Gyorgy Szing <Gyorgy.Szing(a)arm.com>
To: "tf-m(a)lists.trustedfirmware.org" <tf-m(a)lists.trustedfirmware.org>
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] TF-M ARM GCC Optimization issue
Message-ID:
<VE1PR08MB4928420C61B16FA35C6F9A4D91240(a)VE1PR08MB4928.eurprd08.prod.outlook.com>
Content-Type: text/plain; charset="utf-8"
Hi Stanislav,
Can you please check if the issue described here https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdeveloper… is the same as you are reporting?
/George
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Stanislav Jancik via TF-M
Sent: 16 April 2019 13:21
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] TF-M ARM GCC Optimization issue
Hi,
I am currently working on porting TF-M to our (NXP's) LPC55S69 platform. We have supported armclang compiler and we work on support of armgcc compiler. I found out, that the TF-M is working correctly only with optimization -O0 for secure code. I use "7 2018-q2-update" compiler.
For example, when optimization -O1 is set for secure code, the regression tests are running correctly until TFM_IPC_TEST_1XXX test suite. When I debugged this issue, I found out that function and arguments are not properly assigned in function tfm_core_ns_ipc_request (tfm_psa_api_client.c). When I updated this function so the variables int32_t args[4]; struct tfm_sfn_req_s desc, *desc_ptr = &desc; and nt32_t res; were global instead of local. The tests have started running correctly.
I so similar issue, when optimization was -Os, but only secure test suites run correctly in this case. I did not see such a behavior when I used armclang compiler.
Did you try to use different optimization at Musca boards as well?
Regards
Stanislav
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
------------------------------
Subject: Digest Footer
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
------------------------------
End of TF-M Digest, Vol 6, Issue 12
***********************************
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Hi Gyorgy,
Yes, it looks that this is the issue. I saw exactly this behavior when optimization was set to -O1. Do you think, that ARM will prepare official fix of this file?
Moreover, when I tried to set optimization to -Os, the regression tests have stopped working at TFM_SST_TEST_1XXX test suite. But I did not try to find the reason why, therefore I cannot say more.
Regards
Stanislav
-----Original Message-----
From: TF-M [mailto:tf-m-bounces@lists.trustedfirmware.org] On Behalf Of tf-m-request(a)lists.trustedfirmware.org
Sent: Tuesday, April 16, 2019 2:00 PM
To: tf-m(a)lists.trustedfirmware.org
Subject: [EXT] TF-M Digest, Vol 6, Issue 12
WARNING: This email was created outside of NXP. DO NOT CLICK links or attachments unless you recognize the sender and know the content is safe.
Send TF-M mailing list submissions to
tf-m(a)lists.trustedfirmware.org
To subscribe or unsubscribe via the World Wide Web, visit
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
or, via email, send a message with subject or body 'help' to
tf-m-request(a)lists.trustedfirmware.org
You can reach the person managing the list at
tf-m-owner(a)lists.trustedfirmware.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of TF-M digest..."
Today's Topics:
1. FW: Trusted boot - rollback protection (Tamas Ban)
2. TF-M ARM GCC Optimization issue (Stanislav Jancik)
3. Re: TF-M ARM GCC Optimization issue (Gyorgy Szing)
----------------------------------------------------------------------
Message: 1
Date: Mon, 15 Apr 2019 14:52:49 +0000
From: Tamas Ban <Tamas.Ban(a)arm.com>
To: "tf-m(a)lists.trustedfirmware.org" <tf-m(a)lists.trustedfirmware.org>
Subject: [TF-M] FW: Trusted boot - rollback protection
Message-ID:
<AM6PR08MB3126592CF647127402DB91C4E22B0(a)AM6PR08MB3126.eurprd08.prod.outlook.com>
Content-Type: text/plain; charset="utf-8"
Actually the design doc propose to use a distinct security counter from image version (ih_ver in header). But in the most simple case this security counter can be derived from the image version, to have the exact same value (ignoring the build number).
The image signature cover these continues blocks in memory:
- image header
- image
- some part of TLV section (currently not covered, but due to multi image support it is planned to introduce a signed TLV section)
Because these are contiguous regions in the memory it is not possible to place only the (header + TLV section) to the trusted memory but miss out the image itself (at least I cannot see how to solve)
Tamas
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Michel JAOUEN via TF-M
Sent: 08 April 2019 16:20
To: tf-m(a)lists.trustedfirmware.org
Subject: Re: [TF-M] Trusted boot - rollback protection
For the platform without hardware for NV counter, but having trusted memory It is mentioned that the support is possible as follow :
"an active image and related manifest data is stored in trusted memory then the included security counter cannot be compromised."
the impact for this implementation in mcu-boot is limited to :
* The test of the version (security counter is ih_ver from mcuboot header)
* The placement of active image and related manifest data in a trusted memory.
Is my understanding correct ?
As the placement of full image in a trusted memory is a constraint.
Can we limit the information placed in a trusted memory to :
* image header,
* TLV sections.
This seems sufficient to support anti roll back.
Of course additional impact on mcu-boot must be planned but as multi image support is also targeted , the placement of all images in a trusted memory is likely to be unachievable for all configurations.
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
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.
------------------------------
Message: 2
Date: Tue, 16 Apr 2019 11:21:05 +0000
From: Stanislav Jancik <stanislav.jancik(a)nxp.com>
To: "tf-m(a)lists.trustedfirmware.org" <tf-m(a)lists.trustedfirmware.org>
Subject: [TF-M] TF-M ARM GCC Optimization issue
Message-ID:
<VI1PR04MB63200EB729C45B420D211A2890240(a)VI1PR04MB6320.eurprd04.prod.outlook.com>
Content-Type: text/plain; charset="us-ascii"
Hi,
I am currently working on porting TF-M to our (NXP's) LPC55S69 platform. We have supported armclang compiler and we work on support of armgcc compiler. I found out, that the TF-M is working correctly only with optimization -O0 for secure code. I use "7 2018-q2-update" compiler.
For example, when optimization -O1 is set for secure code, the regression tests are running correctly until TFM_IPC_TEST_1XXX test suite. When I debugged this issue, I found out that function and arguments are not properly assigned in function tfm_core_ns_ipc_request (tfm_psa_api_client.c). When I updated this function so the variables int32_t args[4]; struct tfm_sfn_req_s desc, *desc_ptr = &desc; and nt32_t res; were global instead of local. The tests have started running correctly.
I so similar issue, when optimization was -Os, but only secure test suites run correctly in this case. I did not see such a behavior when I used armclang compiler.
Did you try to use different optimization at Musca boards as well?
Regards
Stanislav
------------------------------
Message: 3
Date: Tue, 16 Apr 2019 11:58:29 +0000
From: Gyorgy Szing <Gyorgy.Szing(a)arm.com>
To: "tf-m(a)lists.trustedfirmware.org" <tf-m(a)lists.trustedfirmware.org>
Cc: nd <nd(a)arm.com>
Subject: Re: [TF-M] TF-M ARM GCC Optimization issue
Message-ID:
<VE1PR08MB4928420C61B16FA35C6F9A4D91240(a)VE1PR08MB4928.eurprd08.prod.outlook.com>
Content-Type: text/plain; charset="utf-8"
Hi Stanislav,
Can you please check if the issue described here https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdeveloper… is the same as you are reporting?
/George
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Stanislav Jancik via TF-M
Sent: 16 April 2019 13:21
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] TF-M ARM GCC Optimization issue
Hi,
I am currently working on porting TF-M to our (NXP's) LPC55S69 platform. We have supported armclang compiler and we work on support of armgcc compiler. I found out, that the TF-M is working correctly only with optimization -O0 for secure code. I use "7 2018-q2-update" compiler.
For example, when optimization -O1 is set for secure code, the regression tests are running correctly until TFM_IPC_TEST_1XXX test suite. When I debugged this issue, I found out that function and arguments are not properly assigned in function tfm_core_ns_ipc_request (tfm_psa_api_client.c). When I updated this function so the variables int32_t args[4]; struct tfm_sfn_req_s desc, *desc_ptr = &desc; and nt32_t res; were global instead of local. The tests have started running correctly.
I so similar issue, when optimization was -Os, but only secure test suites run correctly in this case. I did not see such a behavior when I used armclang compiler.
Did you try to use different optimization at Musca boards as well?
Regards
Stanislav
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
------------------------------
Subject: Digest Footer
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.tru…
------------------------------
End of TF-M Digest, Vol 6, Issue 12
***********************************
Hi Stanislav,
Can you please check if the issue described here https://developer.trustedfirmware.org/T234 is the same as you are reporting?
/George
-----Original Message-----
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Stanislav Jancik via TF-M
Sent: 16 April 2019 13:21
To: tf-m(a)lists.trustedfirmware.org
Subject: [TF-M] TF-M ARM GCC Optimization issue
Hi,
I am currently working on porting TF-M to our (NXP's) LPC55S69 platform. We have supported armclang compiler and we work on support of armgcc compiler. I found out, that the TF-M is working correctly only with optimization -O0 for secure code. I use "7 2018-q2-update" compiler.
For example, when optimization -O1 is set for secure code, the regression tests are running correctly until TFM_IPC_TEST_1XXX test suite. When I debugged this issue, I found out that function and arguments are not properly assigned in function tfm_core_ns_ipc_request (tfm_psa_api_client.c). When I updated this function so the variables int32_t args[4]; struct tfm_sfn_req_s desc, *desc_ptr = &desc; and nt32_t res; were global instead of local. The tests have started running correctly.
I so similar issue, when optimization was -Os, but only secure test suites run correctly in this case. I did not see such a behavior when I used armclang compiler.
Did you try to use different optimization at Musca boards as well?
Regards
Stanislav
--
TF-M mailing list
TF-M(a)lists.trustedfirmware.org
https://lists.trustedfirmware.org/mailman/listinfo/tf-m