PSA Firmware Framework (PSA-FF) defines a standard interface and framework to isolate trusted functionality within constrained IoT devices.
The framework provides:
This specification enables the development of Secure firmware functionality which can be reused on different devices that use any conforming implementation of the Firmware Framework. For more information, download the PSA-FF Specification.
The architecture test suite is a set of examples of the invariant behaviors that are specified by the PSA-FF specification. Use this suite to verify whether these behaviors are implemented correctly in your system. This suite contains self-checking and portable C-based tests with directed stimulus. The tests are available as open source. The tests and the corresponding abstraction layers are available with an Apache v2.0 license allowing for external contribution.
This test suite is not a substitute for design verification. To review the test logs, Arm licensees can contact Arm directly through their partner managers.
For more information on architecture test suite specification, refer to the Validation Methodology document.
The mapping of the rules in the specification to the test cases and the steps followed in the tests are mentioned in the Scenario Document present in the docs/ folder.
Follow the instructions in the subsequent sections to get a copy of the source code on your local machine and build the tests. Make sure you have all required software installed as explained in the Software Requirements.
Refer to the PSA-FF Test Suite Porting Guide document for porting steps.
To build the test suite for your target platform, perform the following steps.
Execute cd api-tests
.
Using your Secure partition build tool, parse the following test suite partition manifest files and generate manifest output files. The manifest parsing tool must be compliant with the manifest rules defined in the PSA FF specification.
The test suite manifests to be parsed are:
Compile the tests as shown below.
cd api-tests mkdir <build_dir> cd <build_dir> cmake ../ -G"<generator-name> -DTARGET=<platform_name> -DCPU_ARCH=<cpu_architecture_version> -DSUITE=<suite_name> -DPSA_INCLUDE_PATHS="<include_path1>;<include_path2>;...;<include_pathn>" cmake --build .
where:
To compile IPC tests for tgt_ff_tfm_an521 platform, execute the following commands:
cd api-tests mkdir BUILD cd BUILD cmake ../ -G"Unix Makefiles" -DTARGET=tgt_ff_tfm_an521 -DCPU_ARCH=armv8m_ml -DSUITE=IPC -DPSA_INCLUDE_PATHS="<include_path1>;<include_path2>;...;<include_pathn>" cmake --build .
Note: The default compilation flow includes the functional API tests to build the test suite. It does not include panic tests that check for the API's PROGRAMMER ERROR conditions as defined in the PSA-FF specification. You can include the panic tests for building the test suite just by passing -DINCLUDE_PANIC_TESTS=1 to CMake.
The test suite build generates the following binaries:
NSPE libraries:
SPE libraries explicitly for IPC test suite:
The following steps describe the execution flow before the test execution:
For details on test suite integration, refer to the Integrating the test suite with the SUT section of Validation Methodology.
Arm PSA test suite is distributed under Apache v2.0 License.
Copyright (c) 2018-2019, Arm Limited and Contributors. All rights reserved.