xref: /openbmc/u-boot/arch/x86/include/asm/zimage.h (revision 284d201b4d9c17bc92044f825ce44550d66841cd)
183d290c5STom Rini /* SPDX-License-Identifier: GPL-2.0+ */
2fea25720SGraeme Russ /*
3fea25720SGraeme Russ  * (C) Copyright 2002
4fa82f871SAlbert ARIBAUD  * Daniel Engström, Omicron Ceti AB, daniel@omicron.se
5fea25720SGraeme Russ  */
6fea25720SGraeme Russ 
7fea25720SGraeme Russ #ifndef _ASM_ZIMAGE_H_
8fea25720SGraeme Russ #define _ASM_ZIMAGE_H_
9fea25720SGraeme Russ 
1069370d14SGabe Black #include <asm/bootparam.h>
11233dbc11SGabe Black #include <asm/e820.h>
12233dbc11SGabe Black 
13fea25720SGraeme Russ /* linux i386 zImage/bzImage header. Offsets relative to
14fea25720SGraeme Russ  * the start of the image */
15fea25720SGraeme Russ 
16fea25720SGraeme Russ #define HEAP_FLAG           0x80
17fea25720SGraeme Russ #define BIG_KERNEL_FLAG     0x01
18fea25720SGraeme Russ 
19fea25720SGraeme Russ /* magic numbers */
20fea25720SGraeme Russ #define KERNEL_MAGIC        0xaa55
21fea25720SGraeme Russ #define KERNEL_V2_MAGIC     0x53726448
22fea25720SGraeme Russ #define COMMAND_LINE_MAGIC  0xA33F
23fea25720SGraeme Russ 
24fea25720SGraeme Russ /* limits */
25fea25720SGraeme Russ #define BZIMAGE_MAX_SIZE   15*1024*1024     /* 15MB */
26fea25720SGraeme Russ #define ZIMAGE_MAX_SIZE    512*1024         /* 512k */
27fea25720SGraeme Russ #define SETUP_MAX_SIZE     32768
28fea25720SGraeme Russ 
29fea25720SGraeme Russ #define SETUP_START_OFFSET 0x200
30fea25720SGraeme Russ #define BZIMAGE_LOAD_ADDR  0x100000
31fea25720SGraeme Russ #define ZIMAGE_LOAD_ADDR   0x10000
32fea25720SGraeme Russ 
3369370d14SGabe Black struct boot_params *load_zimage(char *image, unsigned long kernel_size,
3476539383SSimon Glass 				ulong *load_addressp);
3569370d14SGabe Black int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot,
3669370d14SGabe Black 		 unsigned long initrd_addr, unsigned long initrd_size);
37a4520022SBin Meng void setup_video(struct screen_info *screen_info);
38*1fdeacd3SBin Meng void setup_efi_info(struct efi_info *efi_info);
39fea25720SGraeme Russ 
40fea25720SGraeme Russ #endif
41