Fix reviewed and merged:
https://review.trustedfirmware.org/c/trusted-firmware-m/+/3333/
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
Feb 7 2020
Feb 6 2020
Should to confirm, that after the patch the issue is still present.
Patch created:
Feb 5 2020
Feb 3 2020
Thanks for your input, that helps much. I will create fixes when I back to office.
Hi Ken,
after farther testings, PSA Test application still goes to the memory fault.
So I have returned all my two workarounds, which work for all applications:
- .stack_top = PART_REGION_ADDR(ARM_LIB_STACK, $$ZI$$Limit) - 0x48,
- Disable if (stacked_ctx_pos != p_cur_sp->runtime_data.sp_thrd.sp_btm)
Hi Ken,
Also, it should be done something with the check in tfm_svcalls.c, tfm_core_validate_caller() line 1001:
Hi Ken,
Feb 1 2020
BTW, can you update other tfm_arch_*.h as well?
We can help verify the changes not covered in your side.
Hi Andrey,
Jan 31 2020
So my workaround, to avoid psa_panic(), is to disable the check:
So I have returned to the RESET issue.
After the following fix - 0x48, the applications does not have the memory fault:
{ .stack_bottom = PART_REGION_ADDR(ARM_LIB_STACK, $$ZI$$Base), .stack_top = PART_REGION_ADDR(ARM_LIB_STACK, $$ZI$$Limit) - 0x48, //NXP .rw_start = PART_REGION_ADDR(ARM_LIB_STACK, $$ZI$$Base), },
Hi Ken,
Related change: https://review.trustedfirmware.org/c/trusted-firmware-m/+/3328
Related change: https://review.trustedfirmware.org/c/trusted-firmware-m/+/3288
More hints for you:
Sorry for the late response and thanks for the findings. Could you share your image binary so that I could take a try? I got a board but not set up the environment yet.
Jan 30 2020
Jan 29 2020
I have tried to workaround it. Current steps:
- Updated to the latest TFM commit.
- Reverted changes related to:
- 5248af2d7b86775364a0e131eb80ac0330bc81fb
- 490281df3736b11b62e25bc98d3e2c6e4e10478c
- 483da6447e4360c514538807275904be68395dff
After that, PSA Test application starts working.
But the regression test application still goes to the Memory fault during the first App ROT partition initialization, on the first SVC call.
- Switched App ROT partitions to PSA ROT, in tfm_spm_db.inc => after that regression tests are OK.
Jan 28 2020
Change for this issue had been merged
Fix for this issue had been merged
Jan 27 2020
FYI:
For ARMClang/Keil
- Functional API and TFM_LVL=1, all applications/tests are OK!!!
- IPC API and TFM_LVL=1 => repetitive reset.
- IPC API and TFM_LVL=2 => goes to the mentioned memory fault.
Another experiment. Switching to Armasm V5 from v6 did not help, the same result - goes to the Memory fault.
So, for this moment only GCC (for PSA tests) is OK.
BTW: At the same time the TFM Regression Tests application (using GCC) goes to infinite reset on test_app()=>tfm_secure_client_run_tests()=>psa_connect(TFM_SECURE_CLIENT_SFN_RUN_TESTS_SID,TFM_SECURE_CLIENT_SFN_RUN_TESTS_VERSION)=>tfm_ns_interface_dispatch()=>fn()=>causes reset
Hi Ken,
Hi Ken,
Jan 25 2020
Looks like this was caused by the push operation, and it was caused by accessing an address out of ARM_LIB_STACK.
Jan 24 2020
After tfm_core_svc_handler() returns, the execution jumps to tfm_nspm_thread_entry().
Strange is, that during this jump PSP is changed from 0x30000FE0 to 0x30001048.
So the PSP, during main() has following values:
PSP = 0x300001000 PSPLIM = 0x30000800
Hi Ken,
Thank you by taking care about it.
Guess, the issue may be caused by the way we are using TFM. We have to compile TFM Secure in one project (instead of separate libraries). Guess, it may cause that some parts of data/code may be placed to unwanted memory sections.
I will try to analyze the generated map file.
Jan 23 2020
Jan 22 2020
Jan 19 2020
Jan 17 2020
Changes for this issue had been merged.
Jan 16 2020
Jan 15 2020
Jan 13 2020
Remove log.sh/log.bat from code base:
Change for this issue had been merged
Jan 10 2020
Patch is uploaded to https://review.trustedfirmware.org/c/trusted-firmware-m/+/3107.
The root cause is:
- When building SPRTL, arch type is fetched from GNUARM cmake file since SPRTL CMake file is included with add_subdirectory() instead of include().
- The CM0+ arch type should be "armv6s-m". However, it is set to "armv6-m" in GNUARM cmake file, which stands for CM0. CM0 doesn't support SVC. Thus the build failed.
- Previously, the psa_client.c and` psa_service.c` were not in SPRTL folder. When building the both files, cpu type is fetched which is correct.
Patch had been merged.
All patches had been merged to the master branch.
Jan 9 2020
Jan 7 2020
Change for this issue had been merged as a hotfix
Change for this issue: https://review.trustedfirmware.org/#/c/trusted-firmware-m/+/3051/
Jan 6 2020
Patch link:
Jan 4 2020
The problem is solved.
Jan 3 2020
Dec 31 2019
Dec 28 2019
Dec 27 2019
Dec 26 2019
Patch for the task:
https://review.trustedfirmware.org/c/trusted-firmware-m/+/2953/1