Page MenuHomePhabricator
Feed Advanced Search

Advanced Search

May 27 2021

ioannisg added a comment to T921: Supporting Non-Secure RTOS applications, integrated with Trusted Firmware-M, which want to use the FPU.

Hi Feder, correct; setting CPACR_S solves the problem of Secure No-Coprocessor Usage Fault.

May 27 2021, 7:36 AM · Trusted Firmware M
federliangarm added a comment to T921: Supporting Non-Secure RTOS applications, integrated with Trusted Firmware-M, which want to use the FPU.

Please try to add code below just before setting NSACR in tfm_arch_config_extensions() and let me know the result. Thanks!

May 27 2021, 7:00 AM · Trusted Firmware M

May 26 2021

ioannisg added a comment to T921: Supporting Non-Secure RTOS applications, integrated with Trusted Firmware-M, which want to use the FPU.

Hi Feder,

May 26 2021, 10:42 AM · Trusted Firmware M
KenLSoft edited the content of Recyclebin.
May 26 2021, 8:36 AM · Trusted Firmware M
KenLSoft edited the content of Recyclebin.
May 26 2021, 8:36 AM · Trusted Firmware M
KenLSoft edited the content of Recyclebin.
May 26 2021, 8:35 AM · Trusted Firmware M
KenLSoft created an object: Recyclebin.
May 26 2021, 8:33 AM · Trusted Firmware M

May 24 2021

adilahbisar added a comment to T398: Initial support for IAR Embedded Workbench for Arm tool chain.
May 24 2021, 9:48 AM · Trusted Firmware M

May 21 2021

federliangarm added a comment to T921: Supporting Non-Secure RTOS applications, integrated with Trusted Firmware-M, which want to use the FPU.

I tried on my side with steps above, and I still cannot reproduce your issue.
Please confirm NSACR register is configured correctly, and check the FP related registers before the FP instruction causing crash.

May 21 2021, 8:22 AM · Trusted Firmware M

May 18 2021

ioannisg added a comment to T921: Supporting Non-Secure RTOS applications, integrated with Trusted Firmware-M, which want to use the FPU.

I tried this on my side on STM32L562e_dk board with TF-M repo: enable "-mfloat-abi=softfp" in NS side and use TF-M default "-mfloat-abi=soft" option, and changed FP registers in non-secure thread first, then do PSA call. When system is in secure thread mode, no crash found even FPCCR_S.LSPACT = 1.

May 18 2021, 8:50 AM · Trusted Firmware M
ioannisg added a comment to T921: Supporting Non-Secure RTOS applications, integrated with Trusted Firmware-M, which want to use the FPU.

Do you have FP instruction in secure thread? If there is no FP instruction, the processor will not stack FP registers even LSPACT flag is set.
I tried this on my side on STM32L562e_dk board with TF-M repo: enable "-mfloat-abi=softfp" in NS side and use TF-M default "-mfloat-abi=soft" option, and changed FP registers in non-secure thread first, then do PSA call. When system is in secure thread mode, no crash found even FPCCR_S.LSPACT = 1.

May 18 2021, 8:45 AM · Trusted Firmware M

May 17 2021

federliangarm added a comment to T921: Supporting Non-Secure RTOS applications, integrated with Trusted Firmware-M, which want to use the FPU.

TF-M currently support "-mfloat-abi=soft" as default, but doesn't support the setting in Zephyr "-mfloat-abi=softfp". Because they are totally different things.

But why? These ABIs are link-compatible, I do not see the problem. GCC allows these binaries to link successfully.

I mean TF-M itself current FP option is "-mfloat-abi=soft", not the "-mfloat-abi=softfp" which is used in Zephyr. It doesn't matter with setting for Zephyr.

May 17 2021, 10:33 AM · Trusted Firmware M

May 13 2021

ioannisg added a comment to T921: Supporting Non-Secure RTOS applications, integrated with Trusted Firmware-M, which want to use the FPU.

TF-M currently support "-mfloat-abi=soft" as default, but doesn't support the setting in Zephyr "-mfloat-abi=softfp". Because they are totally different things.

May 13 2021, 5:56 PM · Trusted Firmware M
federliangarm added a comment to T921: Supporting Non-Secure RTOS applications, integrated with Trusted Firmware-M, which want to use the FPU.

This is the explanation for "FP_SOFTABI" in Zephyr.
"config FP_SOFTABI
bool "Floating point Soft ABI"
help

	  This option selects the Floating point ABI in which hardware floating
	  point instructions are generated but soft-float calling conventions."
May 13 2021, 9:28 AM · Trusted Firmware M
ioannisg added a comment to T921: Supporting Non-Secure RTOS applications, integrated with Trusted Firmware-M, which want to use the FPU.

Yes, it crashes even without Lazy Stacking. It is a bit more deterministic as is. It crashes in the first secure exception entry, after the transition to secure domain from non-secure.

May 13 2021, 8:26 AM · Trusted Firmware M
ioannisg added a comment to T921: Supporting Non-Secure RTOS applications, integrated with Trusted Firmware-M, which want to use the FPU.

But for Zephyr, are you using soft FP or hardware FP?

May 13 2021, 8:12 AM · Trusted Firmware M
federliangarm added a comment to T921: Supporting Non-Secure RTOS applications, integrated with Trusted Firmware-M, which want to use the FPU.

The first thing I want to confirm is "I compile zephyr and Tf-M with soft FP". As you know, TF-M is default with soft FP.

  1. But for Zephyr, are you using soft FP or hardware FP?
  2. Is it possible for you to share the compile options and linker options for the source file including the "Non-Secure interrupt" crashing?
  3. Is it possible to show the assembly code for the "Non-Secure interrupt"?
  4. Please have a try to disable lazy FP stacking, to see whether still crash.
May 13 2021, 1:35 AM · Trusted Firmware M

May 12 2021

ioannisg added a comment to T921: Supporting Non-Secure RTOS applications, integrated with Trusted Firmware-M, which want to use the FPU.

Hi Feder,

May 12 2021, 12:36 PM · Trusted Firmware M

May 11 2021

federliangarm added a comment to T921: Supporting Non-Secure RTOS applications, integrated with Trusted Firmware-M, which want to use the FPU.

If you didn't change TF-M while integrating into your project, PSA call(handler mode) cannot be interrupted by non-secure interrupt like you mentioned, the reason is non-secure exceptions are de-prioritized (AIRCR.PRIS = 1) in TF-M.
Non-secure interrupt can only be active when system in thread mode.

May 11 2021, 8:01 AM · Trusted Firmware M

May 7 2021

KenLSoft closed T911: Build warnings as Resolved.
May 7 2021, 2:32 AM · Trusted Firmware M
KenLSoft added a comment to T911: Build warnings.

Merged.

May 7 2021, 2:32 AM · Trusted Firmware M

May 6 2021

davidwang added a comment to T921: Supporting Non-Secure RTOS applications, integrated with Trusted Firmware-M, which want to use the FPU.

Hi @ioannisg,
FYI. Feder is on holiday and will back to office on 10th May.
Thanks.

May 6 2021, 6:05 AM · Trusted Firmware M

May 4 2021

andvib created T924: Protected Storage Non-Secure Client Identification test cases failing.
May 4 2021, 2:54 PM · Trusted Firmware M

May 3 2021

ioannisg triaged T921: Supporting Non-Secure RTOS applications, integrated with Trusted Firmware-M, which want to use the FPU as High priority.

Setting this to High for now - but feel free to re-triage this was not appropriate.

May 3 2021, 8:21 AM · Trusted Firmware M
ioannisg added a comment to T921: Supporting Non-Secure RTOS applications, integrated with Trusted Firmware-M, which want to use the FPU.

Hi Feder,

May 3 2021, 8:04 AM · Trusted Firmware M

Apr 30 2021

federliangarm added a comment to T921: Supporting Non-Secure RTOS applications, integrated with Trusted Firmware-M, which want to use the FPU.

For the concern you mentioned, yes, we need to add extra steps in secure scheduler, I am still working on this part.

  1. When secure doing secure calls: a. if lazy fp is disabled, hardware will push/pop FP context automatically during exception entry/return. b. if lazy fp is enable, for isolation 1, secure scheduler will save and restore FP context, but not invalidate FP context; for isolation 2 and 3, secure scheduler will trigger lazy fp stacking, hardware will push FP context to thread' stack and invalidate them automatically.
  2. When non-secure doing secure calls, non-secure side will SG to secure world in tfm_nspm_thread_entry, then doing secure calls as same as above. FP context of non-secure can be restored when bxns lr to non-secure side.
Apr 30 2021, 3:57 AM · Trusted Firmware M

Apr 28 2021

davidwang reassigned T921: Supporting Non-Secure RTOS applications, integrated with Trusted Firmware-M, which want to use the FPU from Anton-TF to federliangarm.
Apr 28 2021, 2:23 AM · Trusted Firmware M

Apr 27 2021

ioannisg created T921: Supporting Non-Secure RTOS applications, integrated with Trusted Firmware-M, which want to use the FPU.
Apr 27 2021, 9:12 AM · Trusted Firmware M

Apr 21 2021

KenLSoft added a comment to T911: Build warnings.

The first patch for this:
https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/9730

Apr 21 2021, 9:49 AM · Trusted Firmware M
davidhuziji added a comment to T911: Build warnings.

Currently GNU 10-2020-q4-major cannot support CMSE well (https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/tree/docs/getting_started/tfm_sw_requirement.rst#n54).
So this GNU version won't be supported in TF-M.

Apr 21 2021, 9:46 AM · Trusted Firmware M

Apr 13 2021

shebuk edited the content of TF-M Videos.
Apr 13 2021, 12:21 PM · Trusted Firmware M

Apr 12 2021

oyvindronningstad added a comment to T911: Build warnings.

I built with

Apr 12 2021, 7:21 AM · Trusted Firmware M
KenLSoft added a comment to T911: Build warnings.

I will run the GCC version later to check if there are more warnings. Will collect all the warnings and fix them in one shot later.

Apr 12 2021, 5:41 AM · Trusted Firmware M
KenLSoft added a comment to T911: Build warnings.

Would fix after the release. Mark as a long term goal.

Apr 12 2021, 5:10 AM · Trusted Firmware M

Apr 7 2021

Karl added a comment to T910: Interactive tests fail to return to main thread after test has ran and sit in osRtxIdleThread() function.

Okay, I run into a fault when apply this patch on AN521, may need some investigations :
Running Test Suite Core non-secure interactive tests (TFM_CORE_TEST_2XXX)...

Executing 'TFM_CORE_TEST_2001'

Description: 'Interactive tests'

Segmentation fault

Apr 7 2021, 7:02 AM · Trusted Firmware M
lairdjm added a comment to T910: Interactive tests fail to return to main thread after test has ran and sit in osRtxIdleThread() function.

You will need to apply this patch in order for the interactive tests to function as without it the secure part will never build with that part enabled https://review.trustedfirmware.org/c/TF-M/tf-m-tests/+/9431
After applying that and building using:

cmake -DTFM_PLATFORM=lairdconnectivity/bl5340_dvk_cpuapp -GNinja -DTFM_TOOLCHAIN_FILE=../toolchain_GNUARM.cmake -DTEST_S=off -DTEST_NS=on -DCMAKE_BUILD_TYPE=debug -DTFM_INTERACTIVE_TEST=on -DTFM_PERIPH_ACCESS_TEST=ON -DTFM_IRQ_TEST=ON ..

And running it, the first test passes but the freezes at the same point as yours does, it does not continue with the next task

Apr 7 2021, 6:44 AM · Trusted Firmware M
Karl claimed T910: Interactive tests fail to return to main thread after test has ran and sit in osRtxIdleThread() function.

I took a look at this test case, the interactive test suit is disabled by default. Could you append some logs or command on your platform of TFM_CORE_TEST_2001
The test from my side on AN521 will stop after scenario 1:

Executing 'TFM_CORE_TEST_2001'

Description: 'Interactive tests'

Scenario 1 - SequentialTrying to acquire the TFM core from NS [seq_task]NS Lock: acquired [seq_task]Secure call to tfm_spm_core_test_sfn_veneer(&in_vec, 1, NULL, 0) failed, generic!NS Lock: releasing... [seq_task]Scenario 1 - test finished

Apr 7 2021, 6:41 AM · Trusted Firmware M

Apr 6 2021

Sherryzhang2 added a comment to T918: Issues with alignment and buffer locations.

@oyvind.ronningstad@nordicsemi.no This issue is on the Nordic platform. Can you take a look at it?

Apr 6 2021, 9:26 AM · Trusted Firmware M
davidwang assigned T910: Interactive tests fail to return to main thread after test has ran and sit in osRtxIdleThread() function to karl-zh.
Apr 6 2021, 3:06 AM · Trusted Firmware M
davidwang added a comment to T911: Build warnings.

Assigned to Ken for the warning fix.

Apr 6 2021, 3:01 AM · Trusted Firmware M
davidwang reassigned T911: Build warnings from davidwang to KenLSoft.
Apr 6 2021, 3:01 AM · Trusted Firmware M

Apr 2 2021

KenLSoft created T918: Issues with alignment and buffer locations.
Apr 2 2021, 12:39 AM · Trusted Firmware M

Apr 1 2021

davidhuziji updated subscribers of T910: Interactive tests fail to return to main thread after test has ran and sit in osRtxIdleThread() function.
Apr 1 2021, 2:48 AM · Trusted Firmware M
davidhuziji added a project to T910: Interactive tests fail to return to main thread after test has ran and sit in osRtxIdleThread() function: Trusted Firmware M.
Apr 1 2021, 2:47 AM · Trusted Firmware M

Mar 30 2021

davidhuziji added a comment to T911: Build warnings.

I will run the GCC version later to check if there are more warnings. Will collect all the warnings and fix them in one shot later.

Mar 30 2021, 8:06 AM · Trusted Firmware M
davidhuziji added a project to T911: Build warnings: Trusted Firmware M.
Mar 30 2021, 8:03 AM · Trusted Firmware M

Mar 29 2021

KenLSoft updated the task description for T909: 'psa-arch-tests' panic test result inconsistent between ARMCLANG and GNUARM.
Mar 29 2021, 6:01 AM · Trusted Firmware M
KenLSoft created T909: 'psa-arch-tests' panic test result inconsistent between ARMCLANG and GNUARM.
Mar 29 2021, 6:00 AM · Trusted Firmware M

Mar 23 2021

KenLSoft triaged T903: TFM IPC Regression test would fail if TEST_NS=ON and TEST_S=OFF as Low priority.
Mar 23 2021, 8:15 AM · Trusted Firmware M
davidhuziji created T902: NV counter test in PS regression test 4001 is stuck on SSE-300 in isolation level 2 when PXN is enabled.
Mar 23 2021, 6:26 AM · Trusted Firmware M

Mar 17 2021

adeaarm closed T408: Refactor UART stdio retargeting as Wontfix.
Mar 17 2021, 11:51 AM · Trusted Firmware M
gbrtth closed T889: Add support for AN547 MPS3 platform as Resolved.
Mar 17 2021, 9:56 AM · Trusted Firmware M

Mar 4 2021

gbrtth closed T819: Fix system reset issue on Musca-S1 as Resolved.
Mar 4 2021, 4:19 PM · Trusted Firmware M
gbrtth added a comment to T889: Add support for AN547 MPS3 platform.

Test results:
FPGA:

Mar 4 2021, 3:50 PM · Trusted Firmware M
gbrtth claimed T889: Add support for AN547 MPS3 platform.
Mar 4 2021, 3:32 PM · Trusted Firmware M
gbrtth created T889: Add support for AN547 MPS3 platform.
Mar 4 2021, 3:32 PM · Trusted Firmware M

Feb 19 2021

Anton-TF closed T883: Scripts and add-on files to create TF-M CMSIS-Packs as Resolved.
Feb 19 2021, 1:37 PM · Trusted Firmware M

Jan 26 2021

RobertRostohar created T883: Scripts and add-on files to create TF-M CMSIS-Packs.
Jan 26 2021, 11:38 AM · Trusted Firmware M

Jan 8 2021

bianyu91 closed T862: How to program images in STM32L562 external Flash memory with ARM TF-M? as Resolved.
Jan 8 2021, 5:46 AM · Trusted Firmware M

Dec 30 2020

KenLSoft added a comment to T872: Document update: Code review guidelines..

Above patch has been abandoned, as it is not important at the current stage.

Dec 30 2020, 5:45 AM · Trusted Firmware M

Dec 24 2020

wschang0 updated the task description for T877: TF-M port for Nuvoton M2354.
Dec 24 2020, 5:31 AM · Trusted Firmware M
wschang0 updated the task description for T877: TF-M port for Nuvoton M2354.
Dec 24 2020, 5:29 AM · Trusted Firmware M
wschang0 updated the task description for T877: TF-M port for Nuvoton M2354.
Dec 24 2020, 5:27 AM · Trusted Firmware M
wschang0 created T877: TF-M port for Nuvoton M2354.
Dec 24 2020, 5:26 AM · Trusted Firmware M
wschang0 closed T821: TF-M port for Nuvoton M2351 as Resolved.
Dec 24 2020, 5:22 AM · Trusted Firmware M

Dec 23 2020

AlamyLiu closed T875: PSoc64 fails to build NS image due to the change of PSA tests library as Resolved.

Verified that it passed the compiling & running tests, with the reverted patch.
Thank you for the quick response/fix~

Dec 23 2020, 3:53 PM · Trusted Firmware M
kevin-peng-hao added a comment to T875: PSoc64 fails to build NS image due to the change of PSA tests library.

Apparently, the patch didn't work for GCC. Sorry about that.
It has been reverted for the time being:
https://review.trustedfirmware.org/c/TF-M/tf-m-tests/+/7651

Dec 23 2020, 3:50 AM · Trusted Firmware M

Dec 22 2020

AlamyLiu created T875: PSoc64 fails to build NS image due to the change of PSA tests library.
Dec 22 2020, 6:14 PM · Trusted Firmware M

Dec 14 2020

KenLSoft added a comment to T872: Document update: Code review guidelines..

https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/7577

Dec 14 2020, 7:12 AM · Trusted Firmware M
KenLSoft created T872: Document update: Code review guidelines..
Dec 14 2020, 7:10 AM · Trusted Firmware M

Dec 8 2020

jamike added a comment to T862: How to program images in STM32L562 external Flash memory with ARM TF-M?.

Hello,
Here are 2 commits to introduce the support of external flash for secondary slot
https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/7412
https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/7413

Dec 8 2020, 4:50 PM · Trusted Firmware M

Dec 7 2020

KenLSoft closed T843: feature-isolation-l3 to master as Resolved.
Dec 7 2020, 6:59 AM · Trusted Firmware M
KenLSoft reopened T843: feature-isolation-l3 to master as "Open".
Dec 7 2020, 6:53 AM · Trusted Firmware M

Dec 4 2020

davidhuziji created T871: Optimize NS client iovecs parameter copies.
Dec 4 2020, 2:45 AM · Trusted Firmware M

Dec 1 2020

tamasban closed T282: Compile time assert utility as Resolved.
Dec 1 2020, 10:15 AM · Trusted Firmware M
tamasban closed T840: Musca-B1 cannot boot-up if built with GNUARM as Resolved.
Dec 1 2020, 10:15 AM · Trusted Firmware M

Nov 28 2020

nickfrasher794 added a comment to T806: Disabling non secure MPU for stm35l5 platforms.
Nov 28 2020, 12:38 PM · Trusted Firmware M

Nov 26 2020

davidvincze closed T859: TF-M hits tfm_abort() on NXP LPC55S69 when IPC mode and PS are enabled as Resolved.

The whole problem has boiled down to a flash write issue and it has been worked around by c32710c7fc8514dd0d072a01549e23a94278ee17.

Nov 26 2020, 9:21 PM · Trusted Firmware M

Nov 25 2020

erwango added a comment to T806: Disabling non secure MPU for stm35l5 platforms.

Verified with https://github.com/zephyrproject-rtos/zephyr/pull/30226

Nov 25 2020, 8:59 AM · Trusted Firmware M
erwango added a comment to T806: Disabling non secure MPU for stm35l5 platforms.

This issue is now fixed and can be closed

Nov 25 2020, 8:58 AM · Trusted Firmware M

Nov 16 2020

soby-mathew closed T809: Fix the sfn parameters check function of Lib Model as Resolved.

Patch fixed and merged

Nov 16 2020, 11:44 AM · Trusted Firmware M

Nov 10 2020

RcColes closed T786: CC312 build configuration incorrect. as Resolved.
Nov 10 2020, 11:04 AM · Trusted Firmware M

Nov 4 2020

soby-mathew added a comment to T865: Musca-B1 failures for PSA Arch crypto tests.

Closed the previous issue https://developer.trustedfirmware.org/T845 as duplicate

Nov 4 2020, 1:42 PM · Trusted Firmware M
soby-mathew closed T845: PSA Arch crypto test #250 fails on Musca-B1 as Resolved.
Nov 4 2020, 12:18 PM · Trusted Firmware M
soby-mathew added a comment to T865: Musca-B1 failures for PSA Arch crypto tests.

Internal ref : https://jira.arm.com/browse/IOTPSW-3471

Nov 4 2020, 12:16 PM · Trusted Firmware M
soby-mathew triaged T865: Musca-B1 failures for PSA Arch crypto tests as Normal priority.
Nov 4 2020, 12:12 PM · Trusted Firmware M
KenLSoft closed T843: feature-isolation-l3 to master as Resolved.
Nov 4 2020, 9:45 AM · Trusted Firmware M
KenLSoft added a comment to T843: feature-isolation-l3 to master.

Thanks, everybody.

Nov 4 2020, 9:45 AM · Trusted Firmware M

Nov 2 2020

bianyu91 triaged T862: How to program images in STM32L562 external Flash memory with ARM TF-M? as Normal priority.
Nov 2 2020, 1:32 AM · Trusted Firmware M

Oct 30 2020

bianyu91 created T862: How to program images in STM32L562 external Flash memory with ARM TF-M?.
Oct 30 2020, 6:52 AM · Trusted Firmware M

Oct 28 2020

jf549 lowered the priority of T307: Support enabling the PS_TEST_NV_COUNTERS build flag without building tests from Normal to Wishlist.
Oct 28 2020, 9:54 PM · Restricted Project
davidvincze updated the task description for T859: TF-M hits tfm_abort() on NXP LPC55S69 when IPC mode and PS are enabled.
Oct 28 2020, 6:29 PM · Trusted Firmware M
davidvincze created T859: TF-M hits tfm_abort() on NXP LPC55S69 when IPC mode and PS are enabled.
Oct 28 2020, 6:29 PM · Trusted Firmware M
kevin-peng-hao triaged T858: Add isolation support for peripherals in isolation level 3 as Normal priority.
Oct 28 2020, 3:45 AM · Trusted Firmware M

Oct 27 2020

microbuilder added a comment to T853: Enable MCUboot (BL2) on LPCXpresso55S69.

Tested changes on LPC55S69, both patches seem good here.

Oct 27 2020, 5:28 PM · Trusted Firmware M
davidvincze added a comment to T853: Enable MCUboot (BL2) on LPCXpresso55S69.

Related code reviews:

Oct 27 2020, 11:27 AM · Trusted Firmware M
davidvincze triaged T853: Enable MCUboot (BL2) on LPCXpresso55S69 as Normal priority.
Oct 27 2020, 11:26 AM · Trusted Firmware M

Oct 21 2020

soby-mathew added a comment to T692: AN521 FVP soft reset via AIRCR does not reset MPC / PPC / MPU during PSA FF test.

The latest FVP claims to have resolved this problem. This needs to be re-tested on latest AN521 FVP.

Oct 21 2020, 12:45 PM · Trusted Firmware M
donberke closed T841: Musca-A QSPI read fault as Resolved.
Oct 21 2020, 9:50 AM · Trusted Firmware M
donberke added a comment to T841: Musca-A QSPI read fault.

Change has been successfully submitted

Oct 21 2020, 9:50 AM · Trusted Firmware M