aboutsummaryrefslogtreecommitdiff
path: root/environments
AgeCommit message (Collapse)Author
2024-01-25Fix: Eliminate warningsGabor Toth
Consider warnings as errors and correct them. Signed-off-by: Gabor Toth <gabor.toth2@arm.com> Change-Id: I2d777ee56b21750966b75147be6c4eb73229043f
2023-08-16Refactor SPs to use the TS RPC UUID as FF-A UUIDJelle Sels
Change all SPs to use the same RPC UUID as their FF-A UUID. The SPs will keep their SP UUID as the name of the binary but the UUID stored in the SP manifest will be the protocol UUID. This means all clients will discover TS SPs build with this option with the same UUID. Signed-off-by: Jelle Sels <jelle.sels@arm.com> Signed-off-by: Imre Kis <imre.kis@arm.com> Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com> Change-Id: I662b6209cd9526b058016a907308a880c1944e7d
2023-08-10cmake: enhance UUID handlingGyorgy Szing
Before this change SP_UUID_LE was needed as an input parameter for export_ep(). SP_UUID_LE is used in manifest files and was set with different methods in opteesp and sp deployments. The former used cmake code to generate it from the SP_UUID while the latter used hand defined values. This change makes the two deployment types work the same way. For this the following is done: - UUID manipulation routines are moved to a dedicated cmake file - export_sp is changed to generate the LE UUID format internally using the new UUID services mentioned above - TargetCompileDefinitions.cmake is changed to use the new UUID services, and to stop setting the SP_UUID_LE variable. Change-Id: I18f4b97bb560e1ebbce3acb8aed8c3912ab05a3f Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2023-08-01Consolidate targets settings in opteesp deploymentsGyorgy Szing
In the "opteesp" environment UUID and SP name is communicated from cmake to C sources using macro definitions. Refactor the cmake scripts to remove duplication. Change-Id: Ia51a334035a9120293b28ef8a46e66578c5d6c90 Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2023-08-01opteesp: consolidate stripped elf generationGyorgy Szing
Move the generation and installation code of stripped elf files needed by the opteesp environment to a common place. The intent is to remove code duplication and to make creating new deployments easier and more robust. Change-Id: I4088dc47c13dc9f35f6b35fb44afee620303bac3 Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2023-08-01Add test for multiple SPs with the same UUIDGyorgy Szing
Add a new test SP which is used to test when multiple SPs have the same FF-A UUID. This change carries the following modifications to the spm-test deployments: - introduce a new UUID which identifies the SP binary (like a file name) - ensure the binary UUID is used in output file names if set in the opteesp deployments - adds a new deployment to have two SPs with matching FF-A UUID - refactor tests to check if SPMC allows discovering SPs with matching FF-A UUID. Change-Id: Icb82a67adf51cfdd2b20a21ecfe7ad2fa39c88a3 Signed-off-by: Jelle Sels <jelle.sels@arm.com> Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2023-08-01Make elf output names compatible to symbolize.pyGyorgy Szing
Change the name of elf output files of SP builds to follow the {SP_NAME}_{UUID}.elf pattern. This allows symbolize.py to find the relevant elf file on disk when analyzing stack dumps. Signed-off-by: Jelle Sels <jelle.sels@arm.com> Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com> Change-Id: Id8135c6a37ecf02ab7a27f56b39663bccb250948
2023-06-12Implement FFA_CONSOLE_LOG interfaceImre Kis
Implement FFA_CONSOLE_LOG interface for sending debug logs to the SPMC. The commit also replaces the proprietary trace call by FFA_CONSOLE_LOG. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I5275470683e2674fdd6f5a61f9c5ab8dd71dcb11
2023-06-02Refactor FF-A boot infoBalint Dobszay
Refactor the FF-A boot info related types to prepare for adding the FF-A v1.1 structures. Signed-off-by: Balint Dobszay <balint.dobszay@arm.com> Change-Id: I03dd0275d367611e6156c4ba47bdbacb62296001
2023-05-04Add support for using the Armv8-A CRC32 featureBalint Dobszay
The Armv8-A architecture specifies a CRC32 hardware feature, it can be used through an intrinsic specified by ACLE. However, the HW feature is mandatory only starting from v8.1, so for v8.0 CPUs we have to check its availability. This commit implements a mechanism to do this check for both Linux and SP environments, and override the default software CRC32 implementation when the HW feature is present. Signed-off-by: Balint Dobszay <balint.dobszay@arm.com> Change-Id: Ia15fe1db9890b8aa076deec44c71639a4382cb35
2023-04-12Restructure fwu-app deploymentGyorgy Szing
Change fwu-app deployment to be more consistent to existing deployments: - change fwu-app to be a dedicated deployment instead of a configuration of an SP. Change the name to "fwu-tool". Change the name of the executable to the same. - delete posix environment and: - move posix trace implementation to linux-pc environment - move deployment specific files to the deployment directory - move fwu-app common files from components/service/fwu/app to the new deployment, under src/app Change-Id: Icf68d39bda34092807f33256f540389cd82d0a46 Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2023-04-12Fix static analysis errorsGyorgy Szing
Fix checkpatch and cppcheck findings in newly added FWU files. Change-Id: Ie6a877e65b758399647ceda345ae22081d911f8e Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2023-03-21Add fwu update agent deployment for linux-pc/posixJulian Hall
The fwu update agent can be deployed in different execution environments to suite platform requirements. This commit adds a deployment where the fwu update agent runs within a command-line app for Posix environments where the firmware image file is accessible via standard file io. Can be built to run in a native PC environment to enable a disk image file to be inspected. Signed-off-by: Julian Hall <julian.hall@arm.com> Change-Id: I3a652c7ab201c5b7059f8dd1bb6b590e6d8c4c37
2023-02-20Add trace support for posix environmentsJulian Hall
In preparation for deploying the FWU update agent in the linux-pc environment, trace support is added to allow trace messages to be output to stdout. Signed-off-by: Julian Hall <julian.hall@arm.com> Change-Id: If2adb3e90fdbc39251ed3b95c22fae2cbf52ccbf
2023-01-03Remove uuid field from sp/sp_pkg.json_inImre Kis
The uuid field can be safely removed as the uuid endianness is fixed in the SP manifest. Also TF-A v2.7 has a bug in parsing the sp_pkg.json which prevents the use of the uuid field. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: Icb40283e74779cc6bae61ecfd8dc08ccc684113e
2023-01-03Fix: Initialize .bss in sp environment startup codeImre Kis
Clear .bss on SP startup to have a clear starting point regardless of the behavior of the loader. The code relies on having the .bss filled with zeroes on startup, otherwise it will result in undefined behavior. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: Ic5cdafc2a041b0e709cd8e8acb59caa45957fa1d
2022-11-30Prototype alternative deployment structureJulian Hall
Prototypes an alternative deployment directory structure for the block-storage service to improve support for different build configurations for different platforms. The new structure reflects the three layers for app, infra and env to improve reuse across multiple build configurations. The infra (infrastructure) layer significantly improves flexibility to realize app platform service dependencies in different ways. Signed-off-by: Julian Hall <julian.hall@arm.com> Change-Id: I0f91fd4b6f333eb3cb6a3a5e4206815bc3532fac
2022-11-03Fix: make GCC.cmake host compatibleGyorgy Szing
GCC.cmake holds generic functionality like running the preprocessor on a file, creating raw binary output and so on. Common parts of the file were executing cross-compilation specific code which made the file incompatible to compiling code targeting the host machine. This change makes these cross-compilation specific part execute conditionally and thus allows using generic functionality when targeting the host. Change-Id: I962ea47868d876c02a3c5ff9e18af13ff0813429 Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2022-11-03Build: add build type supportGyorgy Szing
Refactor cmake files to support setting the "build type" following CMake idioms. A "build type" is a set of compiler flags controlling code optimization and debug information generation. For more information on the supported types and their meaning please refer to the documentation. This change extends build type support to external components too. The build type of each component can be independently controlled using command line settings. For details about the supported types and settings, please refer to the cmake file of the external component and the documentation of the external project. This change tries to be backwards compatible and selects the default build type to be "Debug". This may change in the future. Change-Id: Ic041140bb8d4aaf0f07be9c4cac0638c03996eb5 Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2022-09-13Remove UUID field from sp_pkg json templateBalint Dobszay
Due to a bug in TF-A v2.6 sptool if the UUID field is present in the SP package's json, the sptool will crash. Since currently we don't rely on this field, it's redundant and it can simply be removed. Signed-off-by: Balint Dobszay <balint.dobszay@arm.com> Change-Id: I33503252c6dd40f54f2d24a105e08ac222fc34c0
2022-07-05Use -Wall compiler warning levelJulian Hall
Sets the C and C++ compiler warning level to -Wall. Fixes for warnings judged to be non-functional are included in this commit. Signed-off-by: Julian Hall <julian.hall@arm.com> Change-Id: I783ff274b7fbd802bc25074953e2c2f287114605
2022-06-29Change UUID to little-endian in SP manifestBalint Dobszay
Currently in the SP manifest the UUID is represented as big-endian. Change this to little-endian to get better aligned with OP-TEE and TF-A which expect this format. Signed-off-by: Balint Dobszay <balint.dobszay@arm.com> Change-Id: I1ed9e64aab624121fa2c6586c64036f60d727fc8
2022-06-20Fix UUID endianness issues with TF-A FIPtopics/cddl_cbor_protoImre Kis
Adding UUID field to opteesp/sp_pkg.json.in to prevent TF-A FIP build to try to extract the UUID from the manifest as this may result in an incorrect UUID endianness in the FIP package which prevents loading the SP. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: Id6ab6e3608d210608076d79dad64f68acf81c962
2022-05-09Create generic FF-A SP environmentImre Kis
Currently the boot method of SPs is SPMC specific. Each SPMC uses a different binary format and different boot method. An SPMC agonistic binary format and boot method has been defined, to remove fragmentation. This is called "generic FF-A SP" here. All SPMC implementations developed or contributed by Arm will add support for this format. This change adds a new environment to capture the SPMC independent binary format and boot method specifics. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I60b6a7103ee2a8188b0676a0ded5fe2a8bdf9cf9
2022-05-09Create export_sp CMake functionImre Kis
Move the contents of environments/opteesp/ExportSp.cmake into the export_sp function of tools/cmake/common/ExportSp.cmake. Change existing deployments to use the export_sp function. This is a preparation for having generic format SPs. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I0fe147327aa4f5a80eb6b6ab1c3e45bf3490dce9
2022-03-31Introduce libc independent assert fail handlerImre Kis
Introduce assert_fail_handler function definition as a libc independent interface for handling assert failures. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I80207b0158e44e697c8a0b8366c56dfbdc9b7c37
2022-03-31Move libc_init interface into separate componentImre Kis
Move libc_init interface into a separate component as it is independent from the environment. Each libc implementation should hide its initialization sequence in this function so SPs can remain libc agnostic. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I8c72e2fe102ec2054b31fac50f467e9e8f8bdf94
2022-03-31Remove OP-TEE dependency of SP heapImre Kis
Remove OPTEE_ prefix from OPTEE_SP_HEAP_SIZE definition and move it to the CMake file of the deployment. This is a preparation for having generic format SPs. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I73028dcbdf27a44285a1cd250cd242865bf6d119
2022-03-09Fix arm-linux default toolchain fileGyorgy Szing
The toolchain file was incorrectly setting the xx_INIT variables and thus losing value set in initial cache file. This patch switches to string(APPEND ...) to avoid overwriting data. Change-Id: Ie8a0b2d624fdcc859861a62199f6ccb8df51e087 Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2022-02-01Fix faulty SP build when build-id is enabledImre Kis
Linkers are able to insert a build-id into the binary but by default it is placed at the beginning of the binary. This conflicts the placement of sp_head thus OP-TEE interprets the build-id as the sp_head structure resulting in a load error. The issue is fixed by placing the build-id section explicitly through the linker script and adding an assert for checking sp_head placement. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I072bfba212e58b42dfc7b27f22af5bf90c8d2313
2021-12-16Enhance standard library integrationGyorgy Szing
This change makes the split between standard library related and non standard library related build settings cleaner. This may make enabling other standard libraries to be used in SPs easier Changes: - the standard library target is renamed to stdlib::c - newlib specific files moved to newlib component - GCC flags changing standard library related search paths moved to newlib component - modified newlib targets to use transitive dependencies to get libnosys.a linked - newlib component defines the -nostdinc flag again Change-Id: I5e9ef72cc42454c70d234a15d516634eea51d494 Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com>
2021-12-02Remove SP dev kit external componentImre Kis
Remove all references to SP dev kit from opteesp deployments and b-test files. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I3752ec4fc0046c576ab658bca81cad9a21cb1fa8
2021-12-02Integrate newlib into opteesp environmentImre Kis
Use newlib external component in opteesp targeted builds along the necessary compiler and linker options. Also adding/modifying the source files for startup, heap handling and trace features. The sp.ld.S file is based on ta/arch/arm/ta.ld.S from optee_os 6be0dbcaa11394a2ad5a46ac77e2f76e31a41722. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: Ie9f3e8f0fb755bb88cc33feffda86fbbbf3c7fce
2021-12-02Remove OP-TEE dependency on trace functionsImre Kis
Introducing a custom trace component which replaces the one that comes from the SP dev kit. The new component provides the same DMSG, IMSG, EMSG macros for printing trace messages with different levels. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I5f9466c5a32fefeb9ef350b179dc22ee33324f7e
2021-10-06Remove dependency on unsupported MbedTLS build interfaceJulian Hall
To build libmbedcrypto (part of MbedTLS) for different deployments, it is necessary to provide a suitable TS project defined configuration header file and include paths for PSA storage. It turns out that we have been using an unsupported CMake based interface to pass in the configuration path and include paths (using 'thirdparty_inc' and 'thirdparty_defs' cmake variables). These variables disappear in MbedTLS v3.0.0 so an alternative method is needed before upgrading. MbedTLS doesn't currently provide its own cmake interface for providing these parameters. This commit adds a general purpose configuration interface that exploits the cmake toolchain file functionality where the toolchain file is actioned early on when a new cmake context is created. A common cmake file called config_iface.cmake gets run when an environment's toochain file is run. The caller may optionally define the variables EXTERNAL_DEFINITIONS and EXTERNAL_INCLUDE_PATHS to inject configuration parameters into the child cmake build. This facility is used by the external component cmake file for MbedTLS. Signed-off-by: Julian Hall <julian.hall@arm.com> Change-Id: I7356c0d1da23bc789090d3299b8e66f2e28ab979
2021-10-04Fix: Stop opteesp environment using default libcAndrew Beggs
The opteesp environment uses the libc implementation part of the SPDEV-KIT. Projects targeting the opteesp environment shall be configured to stop using the standard library and its header files part of the compiler package. This patch: - adds the missing compiler and linker options - adds header files missing from SPDEV-KITs libc implementation - extends the external component cmake files to align build options with the main project - moves environment specific mandatory flags to a common file - fixes the supported C standard from gnuc99 to c99 The following files where forked from TF-A (https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git; SHA: 7737fdf0ed): - stdarg.h - stdbool.h - stddef.h - stddef_.h Signed-off-by: Andrew Beggs <andrew.beggs@arm.com> Signed-off-by: Gyorgy Szing <Gyorgy.Szing@arm.com> Change-Id: I3890453a29b003c60c8f44dfd19d553e96b1796c
2021-06-30Enable logging from OP-TEE SPsImre Kis
Allow SPs to send log messages to the OP-TEE core using a non-FF-A SVC call. Signed-off-by: Imre Kis <imre.kis@arm.com> Change-Id: I1b41a7830f893cbc1a9734f5bf2d42c8b7343006
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-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-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>
2020-11-27Add Linux PC and Arm environmentsJulian Hall
Adds build system config and toolchain options to enable building for x86 and Arm AArch64 Linux environments. Change-Id: Id1cf40842fcdc9648a4e06b5ac82e5385f6b2fa4 Signed-off-by: Julian Hall <julian.hall@arm.com>
2020-11-25libsp: Add build system files.Gyorgy Szing
- Add opteesp deployment. This deployment builds libsp as a static library targeting aarch64 SPs running under OP-TEE. - Add inport and export interfaces for OP TEE-OS. - Add opteesp environment files. - Add shared CMake scripts including GCC compiler support. Change-Id: Ie8643756d45d0d96822fd98c4c37e7264a7378a1 Signed-off-by: Gyorgy Szing <gyorgy.szing@arm.com>