4 FILE_LICENCE ( GPL2_OR_LATER
);
11 * As documented in Documentation/i386/boot.txt
13 struct bzimage_header
{
14 /** The size of the setup in sectors
16 * If this field contains 0, assume it contains 4.
19 /** If set, the root is mounted readonly */
21 /** DO NOT USE - for bootsect.S use only */
23 /** DO NOT USE - obsolete */
25 /** DO NOT USE - for bootsect.S use only */
27 /** Video mode control */
29 /** Default root device number */
31 /** 0xAA55 magic number */
33 /** Jump instruction */
35 /** Magic signature "HdrS" */
37 /** Boot protocol version supported */
39 /** Boot loader hook (see below) */
40 uint32_t realmode_swtch
;
41 /** The load-low segment (0x1000) (obsolete) */
43 /** Pointer to kernel version string */
44 uint16_t kernel_version
;
45 /** Boot loader identifier */
46 uint8_t type_of_loader
;
47 /** Boot protocol option flags */
49 /** Move to high memory size (used with hooks) */
50 uint16_t setup_move_size
;
51 /** Boot loader hook (see below) */
52 uint32_t code32_start
;
53 /** initrd load address (set by boot loader) */
54 uint32_t ramdisk_image
;
55 /** initrd size (set by boot loader) */
56 uint32_t ramdisk_size
;
57 /** DO NOT USE - for bootsect.S use only */
58 uint32_t bootsect_kludge
;
59 /** Free memory after setup end */
60 uint16_t heap_end_ptr
;
63 /** 32-bit pointer to the kernel command line */
64 uint32_t cmd_line_ptr
;
65 /** Highest legal initrd address */
66 uint32_t initrd_addr_max
;
67 /** Physical addr alignment required for kernel */
68 uint32_t kernel_alignment
;
69 /** Whether kernel is relocatable or not */
70 uint8_t relocatable_kernel
;
73 /** Maximum size of the kernel command line */
74 uint32_t cmdline_size
;
75 } __attribute__ (( packed
));
77 /** Offset of bzImage header within kernel image */
78 #define BZI_HDR_OFFSET 0x1f1
80 /** bzImage boot flag value */
81 #define BZI_BOOT_FLAG 0xaa55
83 /** bzImage magic signature value */
84 #define BZI_SIGNATURE 0x53726448
86 /** bzImage boot loader identifier for Etherboot */
87 #define BZI_LOADER_TYPE_ETHERBOOT 0x40
89 /** bzImage boot loader identifier for gPXE
91 * We advertise ourselves as Etherboot version 6.
93 #define BZI_LOADER_TYPE_GPXE ( BZI_LOADER_TYPE_ETHERBOOT | 0x06 )
95 /** bzImage "load high" flag */
96 #define BZI_LOAD_HIGH 0x01
98 /** Load address for high-loaded kernels */
99 #define BZI_LOAD_HIGH_ADDR 0x100000
101 /** Load address for low-loaded kernels */
102 #define BZI_LOAD_LOW_ADDR 0x10000
104 /** bzImage "kernel can use heap" flag */
105 #define BZI_CAN_USE_HEAP 0x80
107 /** bzImage special video mode "normal" */
108 #define BZI_VID_MODE_NORMAL 0xffff
110 /** bzImage special video mode "ext" */
111 #define BZI_VID_MODE_EXT 0xfffe
113 /** bzImage special video mode "ask" */
114 #define BZI_VID_MODE_ASK 0xfffd
116 /** bzImage maximum initrd address for versions < 2.03 */
117 #define BZI_INITRD_MAX 0x37ffffff
119 /** bzImage command-line structure used by older kernels */
120 struct bzimage_cmdline
{
121 /** Magic signature */
123 /** Offset to command line */
125 } __attribute__ (( packed
));
127 /** Offset of bzImage command-line structure within kernel image */
128 #define BZI_CMDLINE_OFFSET 0x20
130 /** bzImage command line present magic marker value */
131 #define BZI_CMDLINE_MAGIC 0xa33f
133 /** Assumed size of real-mode portion (including .bss) */
134 #define BZI_ASSUMED_RM_SIZE 0x8000
136 /** Amount of stack space to provide */
137 #define BZI_STACK_SIZE 0x1000
139 /** Maximum size of command line */
140 #define BZI_CMDLINE_SIZE 0x100
142 #endif /* _BZIMAGE_H */