summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-01-24 20:06:08 +0300
committerBin Meng <bmeng.cn@gmail.com>2021-02-01 10:33:25 +0300
commit577c4ad0550825fa94c44ebca23523f05faecf17 (patch)
treef113b79fd4cc7c95366d8a3427f159319eb38f87 /arch/x86/include/asm
parentf82438948f649c33d775badd099869b0652ecc41 (diff)
downloadu-boot-577c4ad0550825fa94c44ebca23523f05faecf17.tar.xz
x86: zimage: Allow dumping the image from outside the module
At present it is possible to dump an image within the zimage command, but it is also useful to be able to dump it from elsewhere, for example in a loader that has special handling for the different zimage stages. Export this feature as a new function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r--arch/x86/include/asm/zimage.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/include/asm/zimage.h b/arch/x86/include/asm/zimage.h
index 64c0e6e857..6679767d16 100644
--- a/arch/x86/include/asm/zimage.h
+++ b/arch/x86/include/asm/zimage.h
@@ -62,6 +62,16 @@ struct boot_params *load_zimage(char *image, unsigned long kernel_size,
int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,
ulong initrd_addr, ulong initrd_size, ulong cmdline_force);
+/**
+ * zimage_dump() - Dump the metadata of a zimage
+ *
+ * This shows all available information in a zimage that has been loaded.
+ *
+ * @base_ptr: Pointer to the boot parameters, typically at address
+ * DEFAULT_SETUP_BASE
+ */
+void zimage_dump(struct boot_params *base_ptr);
+
void setup_video(struct screen_info *screen_info);
void setup_efi_info(struct efi_info *efi_info);