public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 1/5] spl: mmc: Support OP-TEE payloads in Falcon mode
@ 2021-02-03 15:21 Alexandru Gagniuc
  2021-02-03 15:21 ` [PATCH 2/5] spl: Introduce spl_board_prepare_for_optee() hook Alexandru Gagniuc
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Alexandru Gagniuc @ 2021-02-03 15:21 UTC (permalink / raw)
  To: u-boot

In general, Falcon mode means we're booting a linux kernel directly.
With FIT images, however, an OP-TEE secure kernel can be booted before
linux. Thus, if the next stage is an IH_OS_TEE, this isn't necessarily
a problem.

Of course, a general solution would involve mmc_load_image_raw_os()
only loading the binary, and leaving the decision of suitability to
someone else. However, a rework of the boot flow is beyond the scope
of this patch. Accept IH_OS_TEE as a valid OS value.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
---
 common/spl/spl_mmc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index add2785b4e..bab558d055 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -230,8 +230,10 @@ static int mmc_load_image_raw_os(struct spl_image_info *spl_image,
 	if (ret)
 		return ret;
 
-	if (spl_image->os != IH_OS_LINUX) {
-		puts("Expected Linux image is not found. Trying to start U-boot\n");
+	if (spl_image->os != IH_OS_LINUX && spl_image->os != IH_OS_TEE) {
+		puts("Expected OS image is not found. Instead found ");
+		puts(genimg_get_os_name(spl_image->os));
+		puts(". Trying to start U-boot\n");
 		return -ENOENT;
 	}
 
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH 1/5] spl: mmc: Support OP-TEE payloads in Falcon mode
@ 2021-02-04 19:55 Alexandru Gagniuc
  2021-02-04 19:55 ` [PATCH 4/5] stm32mp1: spl: Configure TrustZone controller for OP-TEE Alexandru Gagniuc
  0 siblings, 1 reply; 8+ messages in thread
From: Alexandru Gagniuc @ 2021-02-04 19:55 UTC (permalink / raw)
  To: u-boot

In general, Falcon mode means we're booting a linux kernel directly.
With FIT images, however, an OP-TEE secure kernel can be booted before
linux. Thus, if the next stage is an IH_OS_TEE, this isn't necessarily
a problem.

Of course, a general solution would involve mmc_load_image_raw_os()
only loading the binary, and leaving the decision of suitability to
someone else. However, a rework of the boot flow is beyond the scope
of this patch. Accept IH_OS_TEE as a valid OS value.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
---
 common/spl/spl_mmc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index add2785b4e..bab558d055 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -230,8 +230,10 @@ static int mmc_load_image_raw_os(struct spl_image_info *spl_image,
 	if (ret)
 		return ret;
 
-	if (spl_image->os != IH_OS_LINUX) {
-		puts("Expected Linux image is not found. Trying to start U-boot\n");
+	if (spl_image->os != IH_OS_LINUX && spl_image->os != IH_OS_TEE) {
+		puts("Expected OS image is not found. Instead found ");
+		puts(genimg_get_os_name(spl_image->os));
+		puts(". Trying to start U-boot\n");
 		return -ENOENT;
 	}
 
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-02-04 19:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-03 15:21 [PATCH 1/5] spl: mmc: Support OP-TEE payloads in Falcon mode Alexandru Gagniuc
2021-02-03 15:21 ` [PATCH 2/5] spl: Introduce spl_board_prepare_for_optee() hook Alexandru Gagniuc
2021-02-03 16:30   ` Tom Rini
2021-02-03 15:21 ` [PATCH 3/5] arm: stm32mp: Implement support for TZC 400 controller Alexandru Gagniuc
2021-02-03 15:21 ` [PATCH 4/5] stm32mp1: spl: Configure TrustZone controller for OP-TEE Alexandru Gagniuc
2021-02-03 15:21 ` [PATCH 5/5] ARM: dts: stm32mp: Add OP-TEE reserved memory to SPL dtb Alexandru Gagniuc
2021-02-03 16:30 ` [PATCH 1/5] spl: mmc: Support OP-TEE payloads in Falcon mode Tom Rini
  -- strict thread matches above, loose matches on Subject: below --
2021-02-04 19:55 Alexandru Gagniuc
2021-02-04 19:55 ` [PATCH 4/5] stm32mp1: spl: Configure TrustZone controller for OP-TEE Alexandru Gagniuc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox