aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-07-25buildman: Specify the output directory in testsWIP/25Jul2023Simon Glass1-8/+11
The default output directory is generally '../' in tests so we end up trying to create '../.bm-work'. This does not work with azure, so update these tests to use the temporary directory instead. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24Revert "Merge branch '2023-07-24-introduce-FF-A-suppport'"Tom Rini41-4158/+9
This reverts commit d927d1a80843e1c3e2a3f0b8f6150790bef83da1, reversing changes made to c07ad9520c6190070513016fdb495d4703a4a853. These changes do not pass CI currently. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-07-24Merge branch '2023-07-24-introduce-FF-A-suppport'Tom Rini41-9/+4158
To quote the author: Adding support for Arm FF-A v1.0 (Arm Firmware Framework for Armv8-A) [A]. FF-A specifies interfaces that enable a pair of software execution environments aka partitions to communicate with each other. A partition could be a VM in the Normal or Secure world, an application in S-EL0, or a Trusted OS in S-EL1. FF-A is a discoverable bus and similar to architecture features. FF-A bus is discovered using ARM_SMCCC_FEATURES mechanism performed by the PSCI driver. => dm tree Class Index Probed Driver Name ----------------------------------------------------------- ... firmware 0 [ + ] psci |-- psci ffa 0 [ ] arm_ffa | `-- arm_ffa ... Clients are able to probe then use the FF-A bus by calling the DM class searching APIs (e.g: uclass_first_device). This implementation of the specification provides support for Aarch64. The FF-A driver uses the SMC ABIs defined by the FF-A specification to: - Discover the presence of secure partitions (SPs) of interest - Access an SP's service through communication protocols (e.g: EFI MM communication protocol) The FF-A support provides the following features: - Being generic by design and can be used by any Arm 64-bit platform - FF-A support can be compiled and used without EFI - Support for SMCCCv1.2 x0-x17 registers - Support for SMC32 calling convention - Support for 32-bit and 64-bit FF-A direct messaging - Support for FF-A MM communication (compatible with EFI boot time) - Enabling FF-A and MM communication in Corstone1000 platform as a use case - A Uclass driver providing generic FF-A methods. - An Arm FF-A device driver providing Arm-specific methods and reusing the Uclass methods. - A sandbox emulator for Arm FF-A, emulates the FF-A side of the Secure World and provides FF-A ABIs inspection methods. - An FF-A sandbox device driver for FF-A communication with the emulated Secure World. The driver leverages the FF-A Uclass to establish FF-A communication. - Sandbox FF-A test cases. - A new command called armffa is provided as an example of how to access the FF-A bus For more details about the FF-A support please refer to [B] and refer to [C] for how to use the armffa command. Please find at [D] an example of the expected boot logs when enabling FF-A support for a platform. In this example the platform is Corstone1000. But it can be any Arm 64-bit platform. [A]: https://developer.arm.com/documentation/den0077/latest/ [B]: doc/arch/arm64.ffa.rst [C]: doc/usage/cmd/armffa.rst [D]: example of boot logs when enabling FF-A
2023-07-24arm_ffa: efi: corstone1000: enable MM communicationWIP/2023-07-24-introduce-FF-A-suppportAbdellatif El Khlifi1-0/+4
turn on EFI MM communication On corstone1000 platform MM communication between u-boot and the secure world (Optee) is done using the FF-A bus. Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Cc: Jens Wiklander <jens.wiklander@linaro.org>
2023-07-24arm_ffa: efi: introduce FF-A MM communicationAbdellatif El Khlifi3-7/+309
Add MM communication support using FF-A transport This feature allows accessing MM partitions services through EFI MM communication protocol. MM partitions such as StandAlonneMM or smm-gateway secure partitions which reside in secure world. An MM shared buffer and a door bell event are used to exchange the data. The data is used by EFI services such as GetVariable()/SetVariable() and copied from the communication buffer to the MM shared buffer. The secure partition is notified about availability of data in the MM shared buffer by an FF-A message (door bell). On such event, MM SP can read the data and updates the MM shared buffer with the response data. The response data is copied back to the communication buffer and consumed by the EFI subsystem. MM communication protocol supports FF-A 64-bit direct messaging. Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Tested-by: Gowtham Suresh Kumar <gowtham.sureshkumar@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Cc: Jens Wiklander <jens.wiklander@linaro.org>
2023-07-24arm_ffa: introduce armffa command Sandbox testAbdellatif El Khlifi3-0/+36
Add Sandbox test for the armffa command Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Cc: Jens Wiklander <jens.wiklander@linaro.org>
2023-07-24arm_ffa: introduce sandbox test cases for UCLASS_FFAAbdellatif El Khlifi4-1/+265
Add functional test cases for the FF-A support These tests rely on the FF-A sandbox emulator and FF-A sandbox driver which help in inspecting the FF-A communication. Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Cc: Jens Wiklander <jens.wiklander@linaro.org> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
2023-07-24arm_ffa: introduce sandbox FF-A supportAbdellatif El Khlifi15-22/+1081
Emulate Secure World's FF-A ABIs and allow testing U-Boot FF-A support Features of the sandbox FF-A support: - Introduce an FF-A emulator - Introduce an FF-A device driver for FF-A comms with emulated Secure World - Provides test methods allowing to read the status of the inspected ABIs The sandbox FF-A emulator supports only 64-bit direct messaging. Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Cc: Jens Wiklander <jens.wiklander@linaro.org> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
2023-07-24arm_ffa: introduce armffa commandAbdellatif El Khlifi8-0/+317
Provide armffa command showcasing the use of the U-Boot FF-A support armffa is a command showcasing how to invoke FF-A operations. This provides a guidance to the client developers on how to call the FF-A bus interfaces. The command also allows to gather secure partitions information and ping these partitions. The command is also helpful in testing the communication with secure partitions. For more details please refer to the command documentation [1]. [1]: doc/usage/cmd/armffa.rst Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Cc: Jens Wiklander <jens.wiklander@linaro.org> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
2023-07-24arm_ffa: introduce Arm FF-A supportAbdellatif El Khlifi13-0/+1941
Add Arm FF-A support implementing Arm Firmware Framework for Armv8-A v1.0 The Firmware Framework for Arm A-profile processors (FF-A v1.0) [1] describes interfaces (ABIs) that standardize communication between the Secure World and Normal World leveraging TrustZone technology. This driver uses 64-bit registers as per SMCCCv1.2 spec and comes on top of the SMCCC layer. The driver provides the FF-A ABIs needed for querying the FF-A framework from the secure world. The driver uses SMC32 calling convention which means using the first 32-bit data of the Xn registers. All supported ABIs come with their 32-bit version except FFA_RXTX_MAP which has 64-bit version supported. Both 32-bit and 64-bit direct messaging are supported which allows both 32-bit and 64-bit clients to use the FF-A bus. FF-A is a discoverable bus and similar to architecture features. FF-A bus is discovered using ARM_SMCCC_FEATURES mechanism performed by the PSCI driver. Clients are able to probe then use the FF-A bus by calling the DM class searching APIs (e.g: uclass_first_device). The Secure World is considered as one entity to communicate with using the FF-A bus. FF-A communication is handled by one device and one instance (the bus). This FF-A driver takes care of all the interactions between Normal world and Secure World. The driver exports its operations to be used by upper layers. Exported operations: - ffa_partition_info_get - ffa_sync_send_receive - ffa_rxtx_unmap Generic FF-A methods are implemented in the Uclass (arm-ffa-uclass.c). Arm specific methods are implemented in the Arm driver (arm-ffa.c). For more details please refer to the driver documentation [2]. [1]: https://developer.arm.com/documentation/den0077/latest/ [2]: doc/arch/arm64.ffa.rst Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Cc: Jens Wiklander <jens.wiklander@linaro.org> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
2023-07-24lib: uuid: introduce testcase for uuid_str_to_le_binAbdellatif El Khlifi3-0/+47
provide a test case Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com>
2023-07-24lib: uuid: introduce uuid_str_to_le_bin functionAbdellatif El Khlifi2-0/+63
convert UUID string to little endian binary data Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Cc: Jens Wiklander <jens.wiklander@linaro.org>
2023-07-24arm64: smccc: add support for SMCCCv1.2 x0-x17 registersAbdellatif El Khlifi3-1/+117
add support for x0-x17 registers used by the SMC calls In SMCCC v1.2 [1] arguments are passed in registers x1-x17. Results are returned in x0-x17. This work is inspired from the following kernel commit: arm64: smccc: Add support for SMCCCv1.2 extended input/output registers [1]: https://documentation-service.arm.com/static/5f8edaeff86e16515cdbe4c6?token= Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com>
2023-07-24Merge tag 'dm-pull-24jul23' of ↵WIP/24Jul2023Tom Rini55-906/+2615
https://source.denx.de/u-boot/custodians/u-boot-dm buildman refactoring and --maintainer-check binman TI support binman cipher support
2023-07-24Merge branch '2023-07-22-TI-K3-improvements'Tom Rini45-241/+354
- Actually merge the assorted K3 platform improvements that were supposed to be in commit 247aa5a19115 ("Merge branch '2023-07-21-assorted-TI-platform-updates'")
2023-07-24buildman: Enable test coverageSimon Glass3-4/+23
Enable measuring test coverage for buildman so we can see the gaps. It is currently at 68%. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Add an option to check maintainers and targetsSimon Glass3-5/+16
In poking around it seems that many boards don't define a CONFIG_TARGET Kconfig variable. This is not strictly necessary, but add an option to buildman so these can be viewed. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Use -D for --debugSimon Glass2-7/+7
Change -D to mean --debug for consistency with other tools. This is not a commonly used option, so the impact should be minimal. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Add a way to print the architecture for a boardSimon Glass3-0/+33
This is useful for some tools and is easily available for buildman. Add a new --print-arch option. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move copy_files() out ot BuilderThread classSimon Glass1-23/+24
This does not need to be in the class. Move it out to avoid a pylint warning. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Tidy up some comments in builderthreadSimon Glass1-30/+36
Make sure all functions have full argument documentation. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Tidy up reporting of a toolchain errorSimon Glass2-8/+5
Provide the text of the exception when something goes wrong. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Avoid passing result into _read_done_file()Simon Glass1-8/+11
Move the creating of the result object into the function which sets it up, to simplify the code. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Create a function to handle config and buildSimon Glass1-36/+61
Move this code into a _config_and_build() function, so reduce the size of run_commit(). Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move checkout code to a separate functionSimon Glass1-9/+21
Put this in its own function to reduce the size of the run_commit() function Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move code to decide output dirsSimon Glass1-9/+25
Put this in its own function to reduce the size of the run_commit() function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move code to remove old outputsSimon Glass1-9/+19
Put this in its own function to reduce the size of the run_commit() function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move reading of the done file into a functionSimon Glass1-24/+42
Move this logic into its own function to reduce the size of the run_commt() function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move bulid code into its own functionSimon Glass1-10/+30
Split this into its own function so reduce the size of run_commit(). Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move reconfigure code into its own functionSimon Glass1-11/+30
Split this into its own function so reduce the size of run_commit(). Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Convert config_out to string IOSimon Glass1-4/+5
This is probably a little more efficient and it allows passing the object to another function to write data. Convert config_out to use a string I/O device. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move more things into _build_args()Simon Glass1-21/+34
Move more of the argument-building code into this function. Fix a missing assignment for out_rel_dir too. Rename the function since it now builds all the arguments. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move setting of toolchain arguments to _build_args()Simon Glass1-4/+5
Move a few more pieces to this new function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Start a function to set up the make argumentsSimon Glass1-15/+23
Move some of this code into a new funciion, to help reduce the size of the run_commits() function. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Drop unnecessary assignment of config_outSimon Glass1-1/+0
This is already set up earlier in the function, so drop the extra assignment. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Correct invalid use of out_dir variableSimon Glass1-2/+2
This variable has a different meaning in the outer scope. Use a different name to avoid confusion, or bugs. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Export _get_output_dir() to avoid warningsSimon Glass3-6/+6
Make this a public memory since it is used outside the class. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Correct most pylint warnings in builderthreadSimon Glass1-44/+51
Fix the easy warnings in this file. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Convert camel case in builderthread.pySimon Glass2-29/+29
Convert this file to snake case and update all files which use it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Split parser creation in twoSimon Glass1-11/+33
Split this into two functions to avoid a warning about too many statements. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Convert camel case in builder.pySimon Glass5-146/+145
Convert this file to snake case and update all files which use it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Convert camel case in bsettings.pySimon Glass7-25/+25
Convert this file to snake case and update all files which use it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Convert to argparseSimon Glass4-146/+148
Use argparse to parse the arguments, since OptionParser is deprecated now. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Add a test for --boardsSimon Glass3-2/+14
Add a simple functional test for the --boards option. Fix the example in the docs while we are here. Also improve the docs for Builder.count so it is clearer what it contains. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Correct most pylint warnings in cmdlineSimon Glass1-4/+11
Tidu up warnings in this file. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Convert camel case in cmdline.pySimon Glass3-3/+3
Convert this file to snake case and update all files which use it. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Create a function to get number of built commitsSimon Glass1-9/+25
Move this code into a function. This removes the last pylint error in the control module. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Use get_alow_missing() directly to avoid varSimon Glass1-5/+4
Avoid an unnecessary local variable by moving this code to a function. This fixes the pylint warning about too many local variables. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move getting the adjust_cfg into run_builder()Simon Glass1-11/+27
Move this into its own function to reduce the size of do_buildman(). Signed-off-by: Simon Glass <sjg@chromium.org>
2023-07-24buildman: Move checking for make into run_builder()Simon Glass1-6/+8
This is not needed until the builder is run. Move it there to reduce the size of the do_buildman() function. Signed-off-by: Simon Glass <sjg@chromium.org>