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.
Unbreak Now! (1)
Needs Triage (14)
Thanks, I submitted the following based on CJKay's patch above:
This is the explanation for "FP_SOFTABI" in Zephyr.
bool "Floating point Soft ABI"
This option selects the Floating point ABI in which hardware floating point instructions are generated but soft-float calling conventions."
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.
But for Zephyr, are you using soft FP or hardware FP?
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.
- But for Zephyr, are you using soft FP or hardware FP?
- Is it possible for you to share the compile options and linker options for the source file including the "Non-Secure interrupt" crashing?
- Is it possible to show the assembly code for the "Non-Secure interrupt"?
Wed, May 12
Tue, May 11
The problem has been solved.
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.
Fri, May 7
Thu, May 6
FYI. Feder is on holiday and will back to office on 10th May.
Wed, May 5
Yes, the __sramdata in the declaration is a mistake, the correct target section for that global needs to be .pmusram.data. This used to be in .sram.data once upon a time but then the suspend.c stuff got added and required it to be moved to PMUSRAM. I guess they forgot to update that part in the declaration and since the old GCC seemed to silently prefer the attribute in the definition, nobody noticed. Please apply CJKay's first patch to fix the warning.
I can only assume GCC <11 simply didn't have this warning, but it looks legitimate.
It's native aarch64, the command line I'm using is:
make HOSTCC="gcc $RPM_OPT_FLAGS" CROSS_COMPILE="" PLAT=rk3399 bl31
Is this building natively on arm64 host?
I'm using Fedora 34/35 with the distribution toolchain (gcc 11.1 GA)
Can you please provide the link to the gcc11 toolchain you use?
AFAIK latest public Arm release of the cross compiler toolchains is 10.2 (https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads)
Tue, May 4
Mon, May 3
Setting this to High for now - but feel free to re-triage this was not appropriate.
Fri, Apr 30
For the concern you mentioned, yes, we need to add extra steps in secure scheduler, I am still working on this part.
- 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.
- 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.
Thu, Apr 29
At a quick glance this seems to be an m2r bug: https://github.com/sphinx-doc/sphinx/issues/8705. m2r seems to be abandoned, switching to m2r2 might be a workaround, as that seems to have a fix merged.
For now the best might be to stick to the documented package versions. I am wondering if the requirements file should be more strict on Spninx version.
Is this a compatibility issue and the TFM doc build system can be upgraded, or this a bug in the latest version of Sphinx?
Wed, Apr 28
Tue, Apr 27
Wed, Apr 21
The first patch for this:
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.