[PATCH v2 08/41] x86: Drop the unnecessary base_ptr argument to zboot_dump()
Simon Glass
sjg at chromium.org
Wed Dec 4 00:45:26 CET 2024
This value is include the bootm_info, so drop the unnecessary parameter.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
(no changes since v1)
arch/x86/lib/zimage.c | 5 +++--
cmd/bootflow.c | 3 ++-
cmd/x86/zboot.c | 8 +++-----
include/bootm.h | 7 ++-----
4 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c
index d74c404464c..4dfcde68060 100644
--- a/arch/x86/lib/zimage.c
+++ b/arch/x86/lib/zimage.c
@@ -555,12 +555,13 @@ static void show_loader(struct setup_header *hdr)
printf("\n");
}
-void zimage_dump(struct bootm_info *bmi, struct boot_params *base_ptr,
- bool show_cmdline)
+void zimage_dump(struct bootm_info *bmi, bool show_cmdline)
{
+ struct boot_params *base_ptr;
struct setup_header *hdr;
int i;
+ base_ptr = bmi->base_ptr;
printf("Setup located at %p:\n\n", base_ptr);
print_num64("ACPI RSDP addr", base_ptr->acpi_rsdp_addr);
diff --git a/cmd/bootflow.c b/cmd/bootflow.c
index b3b78bebaed..a89c3bfd9c5 100644
--- a/cmd/bootflow.c
+++ b/cmd/bootflow.c
@@ -386,7 +386,8 @@ static int do_bootflow_info(struct cmd_tbl *cmdtp, int flag, int argc,
bootm_init(&bmi);
/* we don't know this at present */
bootm_x86_set(&bmi, bzimage_addr, 0);
- zimage_dump(&bmi, bflow->x86_setup, false);
+ bootm_x86_set(&bmi, base_ptr, bflow->x86_setup);
+ zimage_dump(&bmi, false);
return 0;
}
diff --git a/cmd/x86/zboot.c b/cmd/x86/zboot.c
index 029ff4eb9fd..ee099ca041b 100644
--- a/cmd/x86/zboot.c
+++ b/cmd/x86/zboot.c
@@ -103,15 +103,13 @@ static int do_zboot_go(struct cmd_tbl *cmdtp, int flag, int argc,
static int do_zboot_dump(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
- struct boot_params *base_ptr = bmi.base_ptr;
-
if (argc > 1)
- base_ptr = (void *)hextoul(argv[1], NULL);
- if (!base_ptr) {
+ bmi.base_ptr = (void *)hextoul(argv[1], NULL);
+ if (!bmi.base_ptr) {
printf("No zboot setup_base\n");
return CMD_RET_FAILURE;
}
- zimage_dump(&bmi, base_ptr, true);
+ zimage_dump(&bmi, true);
return 0;
}
diff --git a/include/bootm.h b/include/bootm.h
index fe7f80b88a5..c471615b08c 100644
--- a/include/bootm.h
+++ b/include/bootm.h
@@ -342,13 +342,10 @@ const char *zimage_get_kernel_version(struct boot_params *params,
*
* This shows all available information in a zimage that has been loaded.
*
- * @bmi: Bootm information
- * @base_ptr: Pointer to the boot parameters, typically at address
- * DEFAULT_SETUP_BASE
+ * @bmi: Bootm information, with valid base_ptr
* @show_cmdline: true to show the full command line
*/
-void zimage_dump(struct bootm_info *bmi, struct boot_params *base_ptr,
- bool show_cmdline);
+void zimage_dump(struct bootm_info *bmi, bool show_cmdline);
/*
* bootm_boot_start() - Boot an image at the given address
--
2.34.1
More information about the U-Boot
mailing list