aboutsummaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-12-03 17:29:31 -0700
committerTom Rini <trini@konsulko.com>2024-04-10 13:49:16 -0600
commitdb0c6f47c37f91db5a0caf27ebc870b8fe72c6aa (patch)
treeed6d62e0e7a3b844e544c16786e5a65339b6154d /arch/x86
parent42a99d0df66d3092dfc1c922de9143448a863118 (diff)
downloadu-boot-db0c6f47c37f91db5a0caf27ebc870b8fe72c6aa.zip
u-boot-db0c6f47c37f91db5a0caf27ebc870b8fe72c6aa.tar.gz
u-boot-db0c6f47c37f91db5a0caf27ebc870b8fe72c6aa.tar.bz2
x86: zboot: Move environment setting into zboot_load()
The only difference between the command and the underlying logic is the setting of envrionment variables. Move this out of the command processing since it needs to be done in any case. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/lib/zimage.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index 1d1249f..b72e2f0 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -370,6 +370,7 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,
int zboot_load(void)
{
struct boot_params *base_ptr;
+ int ret;
if (state.base_ptr) {
struct boot_params *from = (struct boot_params *)state.base_ptr;
@@ -389,6 +390,12 @@ int zboot_load(void)
}
state.base_ptr = base_ptr;
+ ret = env_set_hex("zbootbase", map_to_sysmem(state.base_ptr));
+ if (!ret)
+ ret = env_set_hex("zbootaddr", state.load_address);
+ if (ret)
+ return ret;
+
return 0;
}