[PATCH 26/29] bootm: optee: Drop special call to bootm_find_other()

Simon Glass sjg at chromium.org
Sun Nov 12 01:09:11 CET 2023


The normal bootm flow calls bootm_find_other() can call the
BOOTM_STATE_FINDOTHER state as part of its processing. Fix the
condition there so that this hack can be removed.

Also drop the confusing check for the OS type, since do_bootm_tee() is
only called if the condition is met - see bootm_os_get_boot_func()

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 boot/bootm.c    |  2 +-
 boot/bootm_os.c | 10 ----------
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/boot/bootm.c b/boot/bootm.c
index 342d6211a097..62b6ca957f5b 100644
--- a/boot/bootm.c
+++ b/boot/bootm.c
@@ -583,7 +583,7 @@ static int bootm_find_other(struct cmd_tbl *cmdtp, int flag, int argc,
 	     images.os.type == IH_TYPE_KERNEL_NOLOAD ||
 	     images.os.type == IH_TYPE_MULTI) &&
 	    (images.os.os == IH_OS_LINUX || images.os.os == IH_OS_VXWORKS ||
-	     images.os.os == IH_OS_EFI))
+	     images.os.os == IH_OS_EFI || images.os.os == IH_OS_TEE))
 		return bootm_find_images(flag, argc, argv, 0, 0);
 
 	return 0;
diff --git a/boot/bootm_os.c b/boot/bootm_os.c
index 9af084a9f823..265df3dda626 100644
--- a/boot/bootm_os.c
+++ b/boot/bootm_os.c
@@ -467,11 +467,6 @@ static int do_bootm_tee(int flag, int argc, char *const argv[],
 {
 	int ret;
 
-	/* Verify OS type */
-	if (images->os.os != IH_OS_TEE) {
-		return 1;
-	};
-
 	/* Validate OPTEE header */
 	ret = optee_verify_bootm_image(images->os.image_start,
 				       images->os.load,
@@ -479,11 +474,6 @@ static int do_bootm_tee(int flag, int argc, char *const argv[],
 	if (ret)
 		return ret;
 
-	/* Locate FDT etc */
-	ret = bootm_find_images(flag, argc, argv, 0, 0);
-	if (ret)
-		return ret;
-
 	/* From here we can run the regular linux boot path */
 	return do_bootm_linux(flag, argc, argv, images);
 }
-- 
2.42.0.869.gea05f2083d-goog



More information about the U-Boot mailing list