9 * As documented in Documentation/i386/boot.txt
11 struct bzimage_header {
12 /** The size of the setup in sectors
14 * If this field contains 0, assume it contains 4.
17 /** If set, the root is mounted readonly */
19 /** DO NOT USE - for bootsect.S use only */
21 /** DO NOT USE - obsolete */
23 /** DO NOT USE - for bootsect.S use only */
25 /** Video mode control */
27 /** Default root device number */
29 /** 0xAA55 magic number */
31 /** Jump instruction */
33 /** Magic signature "HdrS" */
35 /** Boot protocol version supported */
37 /** Boot loader hook (see below) */
38 uint32_t realmode_swtch;
39 /** The load-low segment (0x1000) (obsolete) */
41 /** Pointer to kernel version string */
42 uint16_t kernel_version;
43 /** Boot loader identifier */
44 uint8_t type_of_loader;
45 /** Boot protocol option flags */
47 /** Move to high memory size (used with hooks) */
48 uint16_t setup_move_size;
49 /** Boot loader hook (see below) */
50 uint32_t code32_start;
51 /** initrd load address (set by boot loader) */
52 uint32_t ramdisk_image;
53 /** initrd size (set by boot loader) */
54 uint32_t ramdisk_size;
55 /** DO NOT USE - for bootsect.S use only */
56 uint32_t bootsect_kludge;
57 /** Free memory after setup end */
58 uint16_t heap_end_ptr;
61 /** 32-bit pointer to the kernel command line */
62 uint32_t cmd_line_ptr;
63 /** Highest legal initrd address */
64 uint32_t initrd_addr_max;
65 } __attribute__ (( packed ));
67 /** Offset of bzImage header within kernel image */
68 #define BZI_HDR_OFFSET 0x1f1
70 /** bzImage magic signature value */
71 #define BZI_SIGNATURE 0x53726448
73 /** bzImage boot loader identifier for Etherboot */
74 #define BZI_LOADER_TYPE_ETHERBOOT 0x40
76 /** bzImage boot loader identifier for gPXE
78 * We advertise ourselves as Etherboot version 6.
80 #define BZI_LOADER_TYPE_GPXE ( BZI_LOADER_TYPE_ETHERBOOT | 0x06 )
82 /** bzImage "load high" flag */
83 #define BZI_LOAD_HIGH 0x01
85 /** Load address for high-loaded kernels */
86 #define BZI_LOAD_HIGH_ADDR 0x100000
88 /** Load address for low-loaded kernels */
89 #define BZI_LOAD_LOW_ADDR 0x10000
91 /** bzImage "kernel can use heap" flag */
92 #define BZI_CAN_USE_HEAP 0x80
94 /** bzImage special video mode "normal" */
95 #define BZI_VID_MODE_NORMAL 0xffff
97 /** bzImage special video mode "ext" */
98 #define BZI_VID_MODE_EXT 0xfffe
100 /** bzImage special video mode "ask" */
101 #define BZI_VID_MODE_ASK 0xfffd
103 /** bzImage maximum initrd address for versions < 2.03 */
104 #define BZI_INITRD_MAX 0x37ffffff
106 /** bzImage command-line structure used by older kernels */
107 struct bzimage_cmdline {
108 /** Magic signature */
110 /** Offset to command line */
112 } __attribute__ (( packed ));
114 /** Offset of bzImage command-line structure within kernel image */
115 #define BZI_CMDLINE_OFFSET 0x20
117 /** bzImage command line present magic marker value */
118 #define BZI_CMDLINE_MAGIC 0xa33f
120 /** Assumed size of real-mode portion (including .bss) */
121 #define BZI_ASSUMED_RM_SIZE 0x8000
123 /** Amount of stack space to provide */
124 #define BZI_STACK_SIZE 0x1000
126 /** Maximum size of command line */
127 #define BZI_CMDLINE_SIZE 0x100
129 #endif /* _BZIMAGE_H */