From: Michael Walle <michael@walle.cc>
To: u-boot@lists.denx.de
Subject: [PATCH 8/8] board: sl28: add OP-TEE Trusted OS support (bl32)
Date: Mon, 16 Nov 2020 22:47:31 +0100 [thread overview]
Message-ID: <20201116214731.29128-9-michael@walle.cc> (raw)
In-Reply-To: <20201116214731.29128-1-michael@walle.cc>
Add support to load the OP-TEE Trusted OS by the SPL.
Signed-off-by: Michael Walle <michael@walle.cc>
---
.../dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi | 36 +++++++++++++++++++
board/kontron/sl28/Kconfig | 23 ++++++++++++
board/kontron/sl28/sl28.c | 7 ++++
3 files changed, 66 insertions(+)
diff --git a/arch/arm/dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi b/arch/arm/dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi
index 4b97e9d388..b89ae15c74 100644
--- a/arch/arm/dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi
+++ b/arch/arm/dts/fsl-ls1028a-kontron-sl28-u-boot.dtsi
@@ -141,6 +141,42 @@
};
#endif
+#ifdef CONFIG_SL28_SPL_LOADS_OPTEE_BL32
+&binman {
+ fit {
+ images {
+ bl32 {
+ description = "OP-TEE Trusted OS (bl32)";
+ type = "firmware";
+ arch = "arm";
+ os = "tee";
+ compression = "none";
+ load = <CONFIG_SL28_BL32_ENTRY_ADDR>;
+ entry = <CONFIG_SL28_BL32_ENTRY_ADDR>;
+
+ blob-ext {
+ filename = "tee.bin";
+ };
+ };
+ };
+
+ configurations {
+ conf-1 {
+ loadables = "uboot", "bl31", "bl32";
+ };
+
+ conf-2 {
+ loadables = "uboot", "bl31", "bl32";
+ };
+
+ conf-3 {
+ loadables = "uboot", "bl31", "bl32";
+ };
+ };
+ };
+};
+#endif
+
&i2c0 {
rtc: rtc at 32 {
};
diff --git a/board/kontron/sl28/Kconfig b/board/kontron/sl28/Kconfig
index aba49fc115..4078ef186b 100644
--- a/board/kontron/sl28/Kconfig
+++ b/board/kontron/sl28/Kconfig
@@ -25,4 +25,27 @@ config SL28_SPL_LOADS_ATF_BL31
Enable this to load a BL31 image by the SPL. You have to
provde a bl31.bin in u-boot's root directory.
+if SL28_SPL_LOADS_ATF_BL31
+
+config SL28_BL31_ENTRY_ADDR
+ hex "Entry point of the BL31 image"
+ default 0xfbe00000
+
+endif
+
+config SL28_SPL_LOADS_OPTEE_BL32
+ bool "SPL loads OP-TEE Trusted OS as BL32"
+ depends on SL28_SPL_LOADS_ATF_BL31
+ help
+ Enable this to load a BL32 image by the SPL. You have to
+ provde a tee.bin in u-boot's root directory.
+
+if SL28_SPL_LOADS_OPTEE_BL32
+
+config SL28_BL32_ENTRY_ADDR
+ hex "Entry point of the BL32 image"
+ default 0xfc000000
+
+endif
+
endif
diff --git a/board/kontron/sl28/sl28.c b/board/kontron/sl28/sl28.c
index b18127c4d1..34f17b486b 100644
--- a/board/kontron/sl28/sl28.c
+++ b/board/kontron/sl28/sl28.c
@@ -50,6 +50,7 @@ int ft_board_setup(void *blob, struct bd_info *bd)
u64 base[CONFIG_NR_DRAM_BANKS];
u64 size[CONFIG_NR_DRAM_BANKS];
int nbanks = CONFIG_NR_DRAM_BANKS;
+ int node;
int i;
ft_cpu_setup(blob, bd);
@@ -64,5 +65,11 @@ int ft_board_setup(void *blob, struct bd_info *bd)
fdt_fixup_icid(blob);
+ if (CONFIG_IS_ENABLED(SL28_SPL_LOADS_OPTEE_BL32)) {
+ node = fdt_node_offset_by_compatible(blob, -1, "linaro,optee-tz");
+ if (node)
+ fdt_set_node_status(blob, node, FDT_STATUS_OKAY, 0);
+ }
+
return 0;
}
--
2.20.1
prev parent reply other threads:[~2020-11-16 21:47 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-16 21:47 [PATCH 0/8] spl: atf: add support for LOAD_IMAGE_V2 Michael Walle
2020-11-16 21:47 ` [PATCH 1/8] treewide: use CONFIG_IS_ENABLED() for ARMV8_SEC_FIRMWARE_SUPPORT Michael Walle
2020-11-18 14:21 ` Michal Simek
2020-11-16 21:47 ` [PATCH 2/8] spl: atf: move storage for bl31_params into function Michael Walle
2020-11-18 14:07 ` Michal Simek
2020-11-16 21:47 ` [PATCH 3/8] spl: atf: provide a bl2_plat_get_bl31_params_default() Michael Walle
2020-11-18 14:23 ` Michal Simek
2020-11-18 14:24 ` Michal Simek
2020-11-16 21:47 ` [PATCH 4/8] spl: atf: remove helper structure from common header Michael Walle
2020-11-18 14:25 ` Michal Simek
2020-11-16 21:47 ` [PATCH 5/8] spl: atf: add support for LOAD_IMAGE_V2 Michael Walle
2020-11-18 14:26 ` Michal Simek
2020-11-16 21:47 ` [PATCH 6/8] armv8: layerscape: don't initialize GIC in SPL Michael Walle
2020-11-16 21:47 ` [PATCH 7/8] board: sl28: add ATF support (bl31) Michael Walle
2020-11-18 14:06 ` Michal Simek
2020-11-18 14:10 ` Michael Walle
2020-11-18 14:15 ` Michal Simek
2020-11-18 14:20 ` Michael Walle
2020-11-18 16:11 ` Michael Walle
2020-11-16 21:47 ` Michael Walle [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201116214731.29128-9-michael@walle.cc \
--to=michael@walle.cc \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox