From 39f7045252ad72ede2ac0c1c09c05d22367b09c1 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 3 Dec 2023 17:29:37 -0700 Subject: [PATCH] x86: zboot: Use zboot_start() in zboot_run() 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 --- 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 f2d4f3b501..d7403876c1 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.39.5