aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-05-26Fix: correct Linux FF-A driver dependencyHEADmainintegrationBalint Dobszay
Currently the TS->Linux driver dependency is set to the tip of the main branch of the driver. Since the branch has moved correction is needed to driver API version 1.0.0. Signed-off-by: Balint Dobszay <balint.dobszay@arm.com> Change-Id: Ie2d9e4fa13dc6d860a779ab8f89a28af944aebb0
2021-04-14Add hw TRNG from SEL0 SPjulhal01
Intgrates the FVP TRNG into the crypto sp to provide a hw entropy source. Includes tests that check SP device region configuration loading and MMIO access within the region. Signed-off-by: Julian Hall <julian.hall@arm.com> Change-Id: Ia9af8b044596e1c7d194f039fdf64c2468bb3221
2021-04-14Add simple_c test runnerjulhal01
Adds simple_c test runner to use for writing SP environment test that will initially be used to check SP configuration parameters. Signed-off-by: Julian Hall <julian.hall@arm.com> Change-Id: Ia3e2070207e3d327e27487aad149ba735a31eeda
2021-04-14Add test_runner servicejulhal01
This is a new service with client and provider that can be used for running tests in a secure processing environment and retrieving the results. The test_runner provider allows for arbitrary test farmework backends. The goal is to have a cpputest backend. In this commit, a mock backend is included for testing the service itself. The service has its own access protocol defined under the protocols top-level directory. Signed-off-by: Julian Hall <julian.hall@arm.com> Change-Id: If4e965c110763bd805abbdcb87e7e03cd76248b2
2021-04-14Add platform specific TRNG driverjulhal01
Adds platform specific TRNG driver to Crypto opteesp deployment. Fetches and builds the TZ-TRNG driver from its external repo and includes it when the crypto/opteesp is built for the arm/fvp/fvp_base_revc-2xaemv8a platform. Device region information provided as external configuration data is not yet integrated to the TRNG hardware is not yet used. Signed-off-by: Julian Hall <julian.hall@arm.com> Change-Id: I8a2946643a279dfcc3aff608427c85e674f0e084
2021-04-14Add platform supportjulhal01
TS project structure and build system extended to accommodate hardware specific drivers. The concept of a platform is introduced to allow hardware specific drivers from external providers to be used. This change implements the Portability Model described in the project documentation. Signed-off-by: Julian Hall <julian.hall@arm.com> Change-Id: I61e678ae103e0bf139f2c440ba6cd010620af37e
2021-04-14Add packed-c protocol support for crypto servicejulhal01
To provide a lightweight parameter encoding that is aligned to conventions used by SCMI, the packed-c parameter serialization has been added to the crypto service. This builds on generic components that allow other packed-c service access protocols to be added easily. Service level tests have been extended to use both protobuf and packed-c clients. Signed-off-by: julhal01 <julian.hall@arm.com> Change-Id: I9279b0814bcc9cf6c4aa4e30629e2f46f2df4c23
2021-04-14Extend RPC parametersjulhal01
The RPC model is extended to include parameters for identifying an RPC interface instance at an endpoint and another for identifying the parameter encoding. The interface ID parameter allows multiple service interfaces to be co-located. The encoding parameter allows clients to use different parameter serialization schemes and to specify the format in each RPC request. Signed-off-by: julhal01 <julian.hall@arm.com> Change-Id: I201b3417dc0e9f655113b9931db3494e41f1d74b
2021-04-13Create and export SP layout JSONBalint Dobszay
Configure a JSON file for each SP and export it to the install dir. The individual files should be merged by the integrator to form the SP_LAYOUT_FILE JSON used by TF-A to create the SP packages. Signed-off-by: Balint Dobszay <balint.dobszay@arm.com> Change-Id: I63674e8e584dd3285490f3be51c228718f39a998
2021-04-13Add example SP manifestsBalint Dobszay
Add manifest DTS for crypto and secure-storage SPs. The manifests contain the minimal required set of fields. The files are exported to the install directory (along with the executables, etc). Signed-off-by: Balint Dobszay <balint.dobszay@arm.com> Change-Id: Ifb42e4fb8e7f8e4a97cc46f51f0ffc670f490ae9
2021-03-26Fix nanopb python dependenciesGyorgy Szing
The nanopb requirements file did not capture the exact version of the "protobuf" package. As a result newer version were installed and that made the build fail. This fix adds the nanopb package and the proper version to requirements.txt. Change-Id: I0e0ad7615828a6fea9fa354623e3b82c560c360d Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2021-03-26Update specifications sectionGyorgy Szing
Update the documentation on supported specifications: - clean up PSA related info. - add a page on FF-A Change-Id: I68e8e7762bdce765f38acf503d1d762deb104cc7 Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2021-03-11Fix: "arm-linux" builds allow wrong GCC compilerGyorgy Szing
Change d80f856adf59 introduced a bug. It makes deployments targeting the "arm-linux" environment accept non Linux specific GCC binaries like "aarch64-none-elf-gcc". Since these GCC builds are not bundled with a standard library built with Linux support, compilation errors arise due to missing Linux kernel headers. In addition this change fixes the GCC prefix triplet list for the “opeesp” environment and allows using GCC built with “aarch64-none-linux“ triplet. Change-Id: Ideff9f53dfe9080cd0ba24f75279a81532badb04 Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2021-02-24libsp: Remove non-trivial designated initializersImre Kis
Remove unnecessary non-trivial designated initializers from libsp unit tests in order to increase compatibility with older compiler versions. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: Ica0182f3187d2e1c4a0c40cb09339ba59013f7fb
2021-02-23Use firmware-test-builder in existing testsImre Kis
Use firmware-test-builder for driving component-test and ts-service-test. Change-Id: I5a728395eaa0459188fb92f1355f3d62e86a65ca Signed-off-by: Imre Kis <imre.kis@arm.com>
2021-02-23libsp: Integrate firmware-test-builderImre Kis
Use firmware-test-builder for unit testing libsp on the host machine. Change-Id: I32139e6ce476358e3265fe03f33eb20ebac00db4 Signed-off-by: Imre Kis <imre.kis@arm.com>
2021-02-16Fix: output binary path for opteesp environmentBalint Dobszay
Signed-off-by: Balint Dobszay <balint.dobszay@arm.com> Change-Id: Idc0ab4d1e22cdec369530259bc2a6cd385cba42a
2021-02-12Fix: deployments fail to install to a single treeGyorgy Szing
File names of same deployment built for different environments collide which results in overwrites. This patch makes the install locations environment specific to avoid this issue. This also makes the install tree less confusing. Change-Id: I05e45f7cdc5d05b4a695334ba66a29aadac2f08e Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2021-02-12Fix: CROSS_COMPILE env variable is ignoredGyorgy Szing
The "arm-linux" deployments ignore the CROSS_COMPILE environment variable which makes the build fail when the compiler is not on the PATH. This patch fixes this incorrect behavior and makes the "arm-linux" and the "opteesp" deployments aligned on how the environment variable is handled. The policy is to prefer any value already in the cache. If the variable is not in the cache, the value will be taken over from the environment. Change-Id: Id3cc4d6c23767d8ad9cb9657a582d6f70e191e37 Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2021-02-12Align with Linux FF-A driverBalint Dobszay
The user space driver for FF-A has been updated. Align the necessary parts and replace the driver header in external. Signed-off-by: Balint Dobszay <balint.dobszay@arm.com> Change-Id: I8bcf601d54e93584f6a9d624bd74039dc12eda18
2021-02-02libsp: Unit testing sp_memory_management.cImre Kis
Testing the functions of sp_memory_management.c using the mocked FF-A layer and SP RXTX implementation. The static functions of the file are tested by exporting them through c-picker. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: Ie9995c83b7d9ceb98527bac6685e6f9d555471af
2021-02-02libsp: Unit testing sp_discovery.hImre Kis
Testing the functions of sp_discovery.h using the mocked FF-A and SP RXTX implementations. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I16d023fd3da457030ba97a3689a10e7931563b1d
2021-02-02libsp: Add sp_rxtx.h mock implementationImre Kis
Enabling the validation of SP layer RXTX calls from other SP layer modules or from user code. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: Ia08d5fc0e07a0f18a29c2cc3d8b30c63286954a8
2021-02-02libsp: Unit testing the functions of sp_rxtx.cImre Kis
Validating SP level RXTX buffer handler functions by checking them with mocked FF-A layer implementation. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I2522857664f4fa2ecacb8a338f9a8257a6cca1f1
2021-02-02libsp: Add ffa_api.h mock implementationImre Kis
Enables SP layer tests to expect and validate FF-A layer calls. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I4cb45c73574d26c7eebfc1f1328c98354346d3ef
2021-02-02libsp: Unit testing ffa_memory_descriptors.cImre Kis
Testing the FF-A memory descriptor related functions by building and parsing descriptors on a fake RXTX buffer. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I090f28f82fdd9830398a91d51fbbd4c2301b9119
2021-02-02libsp: Unit testing the functions of ffa_api.hImre Kis
Testing the FF-A layer by mocking the FF-A SVC layer and validating calls and returned values. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I544a5fa0b5eb1c72e3443ff7862dacee1b3e8097
2021-02-02libsp: Add ffa_internal_api.h mock implementationImre Kis
ffa_svc calls can be expected from tests instead of real SVC calls to decouple platform dependency. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I410a5576020871b65010e1f003ea57b73f19a71a
2021-02-02libsp: Add mock assert implementationImre Kis
Assertion failures can be expected from tests and an exception-like behavior is implemented to prevent executing code after a failed assert. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I0ed0951baab40a449018d61926daded2f6a970ed
2021-02-02libsp: Fix header file orderImre Kis
Changing the order of header files in component.cmake to have them in alphabetical order. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I31c31811d9b10b0b00522df298b841170f49e790
2021-02-02libsp: Add missing include to sp_api_defines.hImre Kis
SP_RESULT definitions need to know the FF-A error code with the lowest value. ffa_api_defines.h is now included in sp_api_defines.h so it doesn't rely on having both header files included at usage. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: Ie0a99e9f2397264b4d96620927338e8228ef8292
2021-02-02libsp: Refactoring sp_discovery.cImre Kis
Remove duplicated code and fix formatting. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: Id20852205d2cd02be7e9c821c060eee238f073cf
2021-02-02libsp: Fix buffer boundary check in sp_discoveryImre Kis
Fix verification if RX buffer can hold returned partition descriptors. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I062f08816e4de6dc37f4bcd69c114e0cf6ce698e
2021-02-02libsp: Fix SP memory management formattingImre Kis
Apply Linux coding style to sp_memory_management.c. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I0a9deb9e9847c4b5fe0a19893fbf69034b764dc2
2021-02-02libsp: Handle SP memory management invalid argsImre Kis
Fill output parameters with fix values in case of an error. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: Ida1d1cc49cb998f7dd858563a042a59692e677df
2021-02-02libsp: Move sp_memory_attr definitionImre Kis
Moving the definition of the union to global level for better readability and easier access. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I151f7bb705afbbf4fbff713cd981f66062009724
2021-02-02libsp: Fix formatting of sp_rxtx.cImre Kis
Applying Linux coding style to sp_rxtx.c. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I4143243cf1c14c98073773254c123d84e6d4d697
2021-01-28DOC: update documentation.Julian Hall
Add documentation covering: - developer information about architecture - project structure and building - project overview and service descriptions - the portability model for supporting hardware Signed-off-by: Julian Hall <julian.hall@arm.com> Co-Authored-By: Gyorgy Szing <gyorgy.szing@gmail.com> Change-Id: I8bf9c01a66350719d82a7ca2bc1c78a8ab17978d
2021-01-13libsp: Fix RXTX buffer page count range checkImre Kis
Accepting the maximum page count defined by the FF-A specification. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I0200ee76bd5cf9537eafa5046880238f6e64a231
2021-01-13libsp: Fix scope of sp_rxtx.c internal variablesImre Kis
Moving internal pointers of RX/TX buffers from global scope to file level scope. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I91133a0697c9d08deea5173e1f0a418ce631a8ce
2021-01-13libsp: Add missing extern "C" linkage-specificationImre Kis
extern "C" was added to ffa_internal_api.h and sp_api.h of libsp in order to make them able to be used from C++. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I761e468a8091df1babf5b826d3c4ae2f246e06e8
2020-11-27Add testing and demo deploymentsJulian Hall
Change-Id: Ia13b478ac625e974ceacb22c64ec25b078c8e8ba Signed-off-by: Julian Hall <julian.hall@arm.com>
2020-11-27Add crypto deploymentJulian Hall
Change-Id: I09a9948ac5047ed83104498ca19bac0931b2adc3 Signed-off-by: Julian Hall <julian.hall@arm.com>
2020-11-27Add secure storage service and demo deploymentsBalint Dobszay
Change-Id: Ie321a3faca1a57fbfbd7709fa3f2e983e002f0b3 Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
2020-11-27Add deployment for libtsJulian Hall
Change-Id: Ic881a04799146f782e13e6df787ec3f3a935233b Signed-off-by: Julian Hall <julian.hall@arm.com>
2020-11-27Add demo applicationJulian Hall
Change-Id: Ibdd9d170e9d2df5d1d215b50bf4bf6a3a40270ab Signed-off-by: Julian Hall <julian.hall@arm.com>
2020-11-27Add test applicationJulian Hall
Change-Id: I066cea19c6bfcc0019aa28d150e12b25c8da9c1b Signed-off-by: Julian Hall <julian.hall@arm.com>
2020-11-27Add crypto serviceJulian Hall
Change-Id: Ifd55a4caaf0b95e3d1b6504863fba112a7e18f15 Signed-off-by: Julian Hall <julian.hall@arm.com>
2020-11-27Add secure storage serviceBalint Dobszay
Implements secure storage service client and provider. The client is compatible with PSA Internal Trusted Storage API. There are two provider versions implemented: * mock_store is a dummy storage for testing purposes, * secure_flash_store is a RAM based proof-of-concept storage solution based on the ITS implementation in Trusted Firmware-M. Some files in this commit were forked from Trusted Firmware-M, keeping the original license header intact: tag name: TF-Mv1.1 (8c22a260e24bc5778e5ce0dbdf9da3ccec1da880) tagged commit: a6b336c1509fd5f5522450e3cec0fcd6c060f9c8 From 'secure_fw/partitions/internal_trusted_storage/' of TF-M, to 'components/service/secure_storage/provider/secure_flash_store/': flash/its_flash.c -> flash/sfs_flash.c flash/its_flash.h -> flash/sfs_flash.h flash/its_flash_info_internal.c -> flash/sfs_flash_info.c flash/its_flash_ram.c -> flash/sfs_flash_ram.c flash/its_flash_ram.h -> flash/sfs_flash_ram.h flash_fs/its_flash_fs.c -> flash_fs/sfs_flash_fs.c flash_fs/its_flash_fs.h -> flash_fs/sfs_flash_fs.h flash_fs/its_flash_fs_check_info.h -> flash_fs/sfs_flash_fs_check_info.h flash_fs/its_flash_fs_dblock.c -> flash_fs/sfs_flash_fs_dblock.c flash_fs/its_flash_fs_dblock.h -> flash_fs/sfs_flash_fs_dblock.h flash_fs/its_flash_fs_mblock.c -> flash_fs/sfs_flash_fs_mblock.c flash_fs/its_flash_fs_mblock.h -> flash_fs/sfs_flash_fs_mblock.h its_utils.c -> sfs_utils.c its_utils.h -> sfs_utils.h tfm_internal_trusted_storage.c -> secure_flash_store.c tfm_internal_trusted_storage.h -> secure_flash_store.h Change-Id: If9eb3bb7c8a58364a8da9a0b463015b2bbc160c4 Signed-off-by: Balint Dobszay <balint.dobszay@arm.com>
2020-11-27Add service locator componentJulian Hall
Change-Id: I58ad588deff3c0904b3ba8b9162b20440e9ff7d3 Signed-off-by: Julian Hall <julian.hall@arm.com>