diff options
author | Alexandru Gagniuc <mr.nuke.me@gmail.com> | 2021-07-15 14:19:24 -0500 |
---|---|---|
committer | Patrick Delaunay <patrick.delaunay@foss.st.com> | 2021-07-27 09:47:40 +0200 |
commit | a25d6b65c21b1298712c75604ff606025cb40267 (patch) | |
tree | 413b09b4b710f1167df3ef9cfc83d3a856a91037 /include/spl.h | |
parent | 5f6e5c37c67381b9790f55a34640415939a479a5 (diff) | |
download | u-boot-a25d6b65c21b1298712c75604ff606025cb40267.tar.gz u-boot-a25d6b65c21b1298712c75604ff606025cb40267.tar.bz2 u-boot-a25d6b65c21b1298712c75604ff606025cb40267.zip |
spl: Introduce spl_board_prepare_for_optee() hook
OP-TEE requires some particular setup, which is not needed for linux
or other payloads. Add a hook for platform-specific code to perform
any OP-TEE related configuration and initialization.
A weak function is used because it is symmetrical to other
spl_board_prepare_for_*() implementations. A solution to avoid the use
of weak functions would trivially apply to all these implementations.
However, re-designing this is beyond the scope of this patch.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Diffstat (limited to 'include/spl.h')
-rw-r--r-- | include/spl.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/spl.h b/include/spl.h index 74a1939452..925b6f0cc6 100644 --- a/include/spl.h +++ b/include/spl.h @@ -432,6 +432,20 @@ int spl_parse_image_header(struct spl_image_info *spl_image, const struct image_header *header); void spl_board_prepare_for_linux(void); + +/** + * spl_board_prepare_for_optee() - Prepare board for an OPTEE payload + * + * Prepares the board for booting an OP-TEE payload. Initialization is platform + * specific, and may include configuring the TrustZone memory, and other + * initialization steps required by OP-TEE. + * Note that @fdt is not used directly by OP-TEE. OP-TEE passes this @fdt to + * its normal world target. This target is not guaranteed to be u-boot, so @fdt + * changes that would normally be done by u-boot should be done in this step. + * + * @fdt: Devicetree that will be passed on, or NULL + */ +void spl_board_prepare_for_optee(void *fdt); void spl_board_prepare_for_boot(void); int spl_board_ubi_load_image(u32 boot_device); int spl_board_boot_device(u32 boot_device); |