[PATCH 12/13] x86: zboot: Use zboot_start() in zboot_run()

Simon Glass sjg at chromium.org
Mon Dec 4 01:29:37 CET 2023


Now that we have a function to start the process of booting a zimage,
use it in zboot_run() to avoid duplicated logic.

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

 arch/x86/lib/zimage.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index f2d4f3b50162..d7403876c13d 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -442,19 +442,7 @@ int zboot_run(ulong addr, ulong size, ulong initrd, ulong initrd_size,
 {
 	int ret;
 
-	memset(&state, '\0', sizeof(state));
-
-	if (base) {
-		state.base_ptr = map_sysmem(base, 0);
-		state.load_address = addr;
-	} else {
-		state.bzimage_addr = addr;
-	}
-	state.bzimage_size = size;
-	state.initrd_addr = initrd;
-	state.initrd_size = initrd_size;
-	state.cmdline = cmdline;
-
+	zboot_start(addr, size, initrd, initrd_size, base, cmdline);
 	ret = zboot_load();
 	if (ret)
 		return log_msg_ret("ld", ret);
-- 
2.43.0.rc2.451.g8631bc7472-goog



More information about the U-Boot mailing list