Page MenuHomePhabricator

AndreyButokNXP (Andrej Butok)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 26 2019, 12:22 PM (286 w, 3 d)

Recent Activity

Apr 29 2021

AndreyButokNXP added a comment to T922: cmake: TF-M documentation build issue.

Hi Minos,
Is this a compatibility issue and the TFM doc build system can be upgraded, or this a bug in the latest version of Sphinx?

Apr 29 2021, 5:47 AM · Restricted Project

Feb 12 2020

AndreyButokNXP added a comment to T652: Stuck in tfm_nspm_thread_entry().

Hi Ken,
Yes, the final patch has fixed the issue.
It works now without our workarounds.

Feb 12 2020, 9:40 AM · Trusted Firmware M

Feb 6 2020

AndreyButokNXP added a comment to T652: Stuck in tfm_nspm_thread_entry().

Should to confirm, that after the patch the issue is still present.

Feb 6 2020, 7:53 AM · Trusted Firmware M

Feb 3 2020

AndreyButokNXP added a comment to T652: Stuck in tfm_nspm_thread_entry().

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:

  1. .stack_top = PART_REGION_ADDR(ARM_LIB_STACK, $$ZI$$Limit) - 0x48,
  2. Disable if (stacked_ctx_pos != p_cur_sp->runtime_data.sp_thrd.sp_btm)
Feb 3 2020, 1:12 PM · Trusted Firmware M
AndreyButokNXP added a comment to T652: Stuck in tfm_nspm_thread_entry().

Hi Ken,
Also, it should be done something with the check in tfm_svcalls.c, tfm_core_validate_caller() line 1001:

Feb 3 2020, 12:56 PM · Trusted Firmware M
AndreyButokNXP added a comment to T652: Stuck in tfm_nspm_thread_entry().

Hi Ken,

Feb 3 2020, 7:53 AM · Trusted Firmware M

Jan 31 2020

AndreyButokNXP added a comment to T652: Stuck in tfm_nspm_thread_entry().

So my workaround, to avoid psa_panic(), is to disable the check:

Jan 31 2020, 3:54 PM · Trusted Firmware M
AndreyButokNXP added a comment to T652: Stuck in tfm_nspm_thread_entry().

So I have returned to the RESET issue.

Jan 31 2020, 3:42 PM · Trusted Firmware M
AndreyButokNXP added a comment to T652: Stuck in tfm_nspm_thread_entry().

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),
},
Jan 31 2020, 2:34 PM · Trusted Firmware M
AndreyButokNXP added a comment to T652: Stuck in tfm_nspm_thread_entry().

Hi Ken,

Jan 31 2020, 11:32 AM · Trusted Firmware M

Jan 29 2020

AndreyButokNXP added a comment to T652: Stuck in tfm_nspm_thread_entry().

I have tried to workaround it. Current steps:

  1. Updated to the latest TFM commit.
  2. Reverted changes related to:
    1. 5248af2d7b86775364a0e131eb80ac0330bc81fb
    2. 490281df3736b11b62e25bc98d3e2c6e4e10478c
    3. 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.

  1. Switched App ROT partitions to PSA ROT, in tfm_spm_db.inc => after that regression tests are OK.
Jan 29 2020, 9:53 AM · Trusted Firmware M

Jan 28 2020

AndreyButokNXP added a comment to T561: Update the TFM Crypto Service to use the mbedCrypto v2.0.

Hi Antonio
FYI:
mbedCrypto v3.0.1: https://github.com/ARMmbed/mbed-crypto/tags

Jan 28 2020, 3:50 PM · Restricted Project

Jan 27 2020

AndreyButokNXP added a comment to T652: Stuck in tfm_nspm_thread_entry().

FYI:
For ARMClang/Keil

  1. Functional API and TFM_LVL=1, all applications/tests are OK!!!
  2. IPC API and TFM_LVL=1 => repetitive reset.
  3. IPC API and TFM_LVL=2 => goes to the mentioned memory fault.
Jan 27 2020, 1:55 PM · Trusted Firmware M
AndreyButokNXP added a comment to T652: Stuck in tfm_nspm_thread_entry().

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.

Jan 27 2020, 12:15 PM · Trusted Firmware M
AndreyButokNXP added a comment to T652: Stuck in tfm_nspm_thread_entry().

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

Jan 27 2020, 9:33 AM · Trusted Firmware M
AndreyButokNXP added a comment to T652: Stuck in tfm_nspm_thread_entry().

Hi Ken,

Jan 27 2020, 9:07 AM · Trusted Firmware M
AndreyButokNXP added a comment to T652: Stuck in tfm_nspm_thread_entry().

Hi Ken,

Jan 27 2020, 8:26 AM · Trusted Firmware M

Jan 24 2020

AndreyButokNXP added a comment to T652: Stuck in tfm_nspm_thread_entry().

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.

Jan 24 2020, 2:47 PM · Trusted Firmware M
AndreyButokNXP added a comment to T652: Stuck in tfm_nspm_thread_entry().

So the PSP, during main() has following values:
PSP = 0x300001000 PSPLIM = 0x30000800

Jan 24 2020, 11:57 AM · Trusted Firmware M
AndreyButokNXP added a comment to T652: Stuck in tfm_nspm_thread_entry().

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 24 2020, 8:59 AM · Trusted Firmware M

Jan 23 2020

AndreyButokNXP added a comment to T653: Apply '-fno-builtin' for building.
Jan 23 2020, 9:12 AM · Trusted Firmware M

Dec 11 2019

AndreyButokNXP added a comment to T561: Update the TFM Crypto Service to use the mbedCrypto v2.0.

Hi Antonio, it looks like the patch is forgotten by reviewers.

Dec 11 2019, 3:57 PM · Restricted Project

Oct 22 2019

AndreyButokNXP created T561: Update the TFM Crypto Service to use the mbedCrypto v2.0.
Oct 22 2019, 6:25 AM · Restricted Project

Jul 16 2019

AndreyButokNXP added a comment to T428: Crypto: Update interface file to use Mbed Crypto 1.1.0.

The separation of trees does not help without changes in original code.
#include "psa/<same_name.h>" will reference to different versions of file (in case two library sources are in one project) .
The only way to solve it, is to change #include "differen_name_or_path" (our solution), or compile and use MbedCrypto as a separate library (your solution).
Adding a file prefix or changing of the "psa" sub-folder name to something different, will solve the file name conflict.

Jul 16 2019, 10:21 AM · Restricted Project
AndreyButokNXP added a comment to T428: Crypto: Update interface file to use Mbed Crypto 1.1.0.

It looks like there is no conflict, but it is ;)
TFM and MbedCrypto referencing to "psa/<same_name.h>" which are placed in different directories.
But if both sources belong to the same project, the project must contain both include paths .
It is a luck what path is taken the first one in the search path list.
If no luck, you will get compilation errors as some structure types have an unexpected content.

Jul 16 2019, 6:57 AM · Restricted Project

Jul 15 2019

AndreyButokNXP added a comment to T428: Crypto: Update interface file to use Mbed Crypto 1.1.0.

Symbol renaming is OK.
But I have talked about file names, to avoid conflict when TFM and MbedCrypto referencing to "psa/<same_name.h>".
Guess, using a different include directory e.g. "psa_tfm/<same_name.h>" may solve the issue.
P.S. Different headers files should have different names and path - good practice for any use case.

Jul 15 2019, 2:25 PM · Restricted Project
AndreyButokNXP added a comment to T428: Crypto: Update interface file to use Mbed Crypto 1.1.0.

It means that you have decided to add the limitation which is possible to avoid.
It is possible to have and compile TFM, MbedCrypto and PSA test suite without splitting to separate libraries/projects.

Jul 15 2019, 1:59 PM · Restricted Project
AndreyButokNXP added a comment to T428: Crypto: Update interface file to use Mbed Crypto 1.1.0.

It's probably OK when to compile in multiple libraries. The problem happens when to compile sources of MbedCrypto and TFM in one project.
So, as workaround, we have to add psa_ prefix to TFM PSA headers (as it was done in previous version of TFM).

Jul 15 2019, 12:58 PM · Restricted Project
AndreyButokNXP added a comment to T428: Crypto: Update interface file to use Mbed Crypto 1.1.0.

Hi, PSA header files in mbedCrypto and TFM have the same names but a different content.
Guess, if they have the same names and the same path, they should to have the same content or to have a different prefix.

Jul 15 2019, 11:02 AM · Restricted Project

Jun 26 2019

AndreyButokNXP added a comment to T410: Add preprocessor based project content defintition techique.

Thanks, hope it will be implemented.

Jun 26 2019, 12:26 PM · Trusted Firmware M