Page MenuHomePhabricator

PSoC64 fails on Non-Seucre TFM_IPC_TEST_1007 test
Closed, ResolvedPublic


PSoC64 system resets when it runs to TFM_IPC_TEST_1007 test

Running Test Suite IPC non-secure interface test (TFM_IPC_TEST_1XXX)...
. . .
> Executing 'TFM_IPC_TEST_1006' 
  Description: 'Call PSA RoT access APP RoT memory test service'
Connect success!
Call success!
> Executing 'TFM_IPC_TEST_1007' 
  Description: 'Call PSA RoT access APP RoT readonly memory test service'
Connect success!

The fail path is

Secure: ipc_service_test_main()
`-- ipc_service_psa_access_app_readonly_mem
    `-- tfm_hal_memory_has_access
        `-- tfm_has_access_to_region
            `-- /* __get_IPSR(): Abort if not in Handler mode */

Since ipc_service_test_main is running as thread --> tfm_core_panic() --> reset

Event Timeline

AlamyLiu created this task.Dec 18 2020, 6:35 AM

On a close look, the TFM_IPC_TEST_1007 seems to suggest a panic (reset).

/* The system should panic in psa_call. If runs here, the test fails. */
ret->val = TEST_FAILED;

However, after the reset, the system doesn't pass TFM_IPC_TEST_1007 and continue on to next test.
Instead, it starts over from the beginning (e.g.: PROTECTED_STORAGE test suite), and hence, in a infinite reset loop.

davidhuziji added a comment.EditedDec 18 2020, 2:54 PM

Previously, memory access check was only performed in TF-M SPM. Therefore multi-core memory access check checks whether current execution is in Handler mode.
Memory access check is allowed only in Handler mode.

However, with patch, some PSA RoT test services also call memory access check. Thus multi-core memory access check fails during Handler mode check.

AlamyLiu closed this task as Resolved.Dec 22 2020, 6:02 PM

Confirm the issue is fixed.