From: Simon Glass Date: Mon, 4 Dec 2023 00:29:37 +0000 (-0700) Subject: x86: zboot: Use zboot_start() in zboot_run() X-Git-Url: http://git.dujemihanovic.xyz/%7B%7B%20%24style.Permalink%20%7D%7D?a=commitdiff_plain;h=39f7045252ad72ede2ac0c1c09c05d22367b09c1;p=u-boot.git 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 --- 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);