diff options
author | Simon Glass <sjg@chromium.org> | 2023-07-12 09:04:43 -0600 |
---|---|---|
committer | Bin Meng <bmeng@tinylab.org> | 2023-07-17 13:38:35 +0800 |
commit | c886557c18956dca5819920fd48d0d250c4b76a1 (patch) | |
tree | c2b7488fb26854b6eeb3cd6f0e83fa8f6d1ab7c4 /arch/x86/include | |
parent | 33ebcb468109c40ef0dce262be00a4c161265b90 (diff) | |
download | u-boot-c886557c18956dca5819920fd48d0d250c4b76a1.zip u-boot-c886557c18956dca5819920fd48d0d250c4b76a1.tar.gz u-boot-c886557c18956dca5819920fd48d0d250c4b76a1.tar.bz2 |
x86: Add a function to boot a zimage
Add a direct interface to booting a zimage, so that bootstd can call it
without going through the command-line interface.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/zimage.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/x86/include/asm/zimage.h b/arch/x86/include/asm/zimage.h index 000b38e..966d7224 100644 --- a/arch/x86/include/asm/zimage.h +++ b/arch/x86/include/asm/zimage.h @@ -72,4 +72,21 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot, */ void zimage_dump(struct boot_params *base_ptr); +/** + * zboot_start() - Boot a zimage + * + * Boot a zimage, given the component parts + * + * @addr: Address where the bzImage is moved before booting, either + * BZIMAGE_LOAD_ADDR or ZIMAGE_LOAD_ADDR + * @base: Pointer to the boot parameters, typically at address + * DEFAULT_SETUP_BASE + * @initrd: Address of the initial ramdisk, or 0 if none + * @initrd_size: Size of the initial ramdisk, or 0 if none + * @cmdline: Command line to use for booting + * Return: -EFAULT on error (normally it does not return) + */ +int zboot_start(ulong addr, ulong size, ulong initrd, ulong initrd_size, + ulong base, char *cmdline); + #endif |