iPXE
Data Structures | Macros | Functions | Variables
bzimage.h File Reference
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  bzimage_header
 A bzImage header. More...
 
struct  bzimage_cmdline
 bzImage command-line structure used by older kernels More...
 

Macros

#define BZI_HDR_OFFSET   0x1f1
 Offset of bzImage header within kernel image. More...
 
#define BZI_BOOT_FLAG   0xaa55
 bzImage boot flag value More...
 
#define BZI_SIGNATURE   0x53726448
 bzImage magic signature value More...
 
#define BZI_LOADER_TYPE_ETHERBOOT   0x40
 bzImage boot loader identifier for Etherboot More...
 
#define BZI_LOADER_TYPE_IPXE   ( BZI_LOADER_TYPE_ETHERBOOT | 0x06 )
 bzImage boot loader identifier for iPXE More...
 
#define BZI_LOAD_HIGH   0x01
 bzImage "load high" flag More...
 
#define BZI_LOAD_HIGH_ADDR   0x100000
 Load address for high-loaded kernels. More...
 
#define BZI_LOAD_LOW_ADDR   0x10000
 Load address for low-loaded kernels. More...
 
#define BZI_CAN_USE_HEAP   0x80
 bzImage "kernel can use heap" flag More...
 
#define BZI_VID_MODE_NORMAL   0xffff
 bzImage special video mode "normal" More...
 
#define BZI_VID_MODE_EXT   0xfffe
 bzImage special video mode "ext" More...
 
#define BZI_VID_MODE_ASK   0xfffd
 bzImage special video mode "ask" More...
 
#define BZI_INITRD_MAX   0x37ffffff
 bzImage maximum initrd address for versions < 2.03 More...
 
#define BZI_CMDLINE_OFFSET   0x20
 Offset of bzImage command-line structure within kernel image. More...
 
#define BZI_CMDLINE_MAGIC   0xa33f
 bzImage command line present magic marker value More...
 
#define BZI_ASSUMED_RM_SIZE   0x8000
 Assumed size of real-mode portion (including .bss) More...
 
#define BZI_STACK_SIZE   0x1000
 Amount of stack space to provide. More...
 
#define BZI_CMDLINE_SIZE   0x7ff
 Maximum size of command line. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
struct bzimage_header __attribute__ ((packed))
 

Variables

uint8_t setup_sects
 The size of the setup in sectors. More...
 
uint16_t root_flags
 If set, the root is mounted readonly. More...
 
uint16_t syssize
 DO NOT USE - for bootsect.S use only. More...
 
uint16_t swap_dev
 DO NOT USE - obsolete. More...
 
uint16_t ram_size
 DO NOT USE - for bootsect.S use only. More...
 
uint16_t vid_mode
 Video mode control. More...
 
uint16_t root_dev
 Default root device number. More...
 
uint16_t boot_flag
 0xAA55 magic number More...
 
uint16_t jump
 Jump instruction. More...
 
uint32_t header
 Magic signature "HdrS". More...
 
uint16_t version
 Boot protocol version supported. More...
 
uint32_t realmode_swtch
 Boot loader hook (see below) More...
 
uint16_t start_sys
 The load-low segment (0x1000) (obsolete) More...
 
uint16_t kernel_version
 Pointer to kernel version string. More...
 
uint8_t type_of_loader
 Boot loader identifier. More...
 
uint8_t loadflags
 Boot protocol option flags. More...
 
uint16_t setup_move_size
 Move to high memory size (used with hooks) More...
 
uint32_t code32_start
 Boot loader hook (see below) More...
 
uint32_t ramdisk_image
 initrd load address (set by boot loader) More...
 
uint32_t ramdisk_size
 initrd size (set by boot loader) More...
 
uint32_t bootsect_kludge
 DO NOT USE - for bootsect.S use only. More...
 
uint16_t heap_end_ptr
 Free memory after setup end. More...
 
uint16_t pad1
 Unused. More...
 
uint32_t cmd_line_ptr
 32-bit pointer to the kernel command line More...
 
uint32_t initrd_addr_max
 Highest legal initrd address. More...
 
uint32_t kernel_alignment
 Physical addr alignment required for kernel. More...
 
uint8_t relocatable_kernel
 Whether kernel is relocatable or not. More...
 
uint8_t pad2 [3]
 Unused. More...
 
uint32_t cmdline_size
 Maximum size of the kernel command line. More...
 
uint16_t magic
 Magic signature. More...
 
uint16_t offset
 Offset to command line. More...
 

Macro Definition Documentation

◆ BZI_HDR_OFFSET

#define BZI_HDR_OFFSET   0x1f1

Offset of bzImage header within kernel image.

Definition at line 78 of file bzimage.h.

◆ BZI_BOOT_FLAG

#define BZI_BOOT_FLAG   0xaa55

bzImage boot flag value

Definition at line 81 of file bzimage.h.

◆ BZI_SIGNATURE

#define BZI_SIGNATURE   0x53726448

bzImage magic signature value

Definition at line 84 of file bzimage.h.

◆ BZI_LOADER_TYPE_ETHERBOOT

#define BZI_LOADER_TYPE_ETHERBOOT   0x40

bzImage boot loader identifier for Etherboot

Definition at line 87 of file bzimage.h.

◆ BZI_LOADER_TYPE_IPXE

#define BZI_LOADER_TYPE_IPXE   ( BZI_LOADER_TYPE_ETHERBOOT | 0x06 )

bzImage boot loader identifier for iPXE

We advertise ourselves as Etherboot version 6.

Definition at line 93 of file bzimage.h.

◆ BZI_LOAD_HIGH

#define BZI_LOAD_HIGH   0x01

bzImage "load high" flag

Definition at line 96 of file bzimage.h.

◆ BZI_LOAD_HIGH_ADDR

#define BZI_LOAD_HIGH_ADDR   0x100000

Load address for high-loaded kernels.

Definition at line 99 of file bzimage.h.

◆ BZI_LOAD_LOW_ADDR

#define BZI_LOAD_LOW_ADDR   0x10000

Load address for low-loaded kernels.

Definition at line 102 of file bzimage.h.

◆ BZI_CAN_USE_HEAP

#define BZI_CAN_USE_HEAP   0x80

bzImage "kernel can use heap" flag

Definition at line 105 of file bzimage.h.

◆ BZI_VID_MODE_NORMAL

#define BZI_VID_MODE_NORMAL   0xffff

bzImage special video mode "normal"

Definition at line 108 of file bzimage.h.

◆ BZI_VID_MODE_EXT

#define BZI_VID_MODE_EXT   0xfffe

bzImage special video mode "ext"

Definition at line 111 of file bzimage.h.

◆ BZI_VID_MODE_ASK

#define BZI_VID_MODE_ASK   0xfffd

bzImage special video mode "ask"

Definition at line 114 of file bzimage.h.

◆ BZI_INITRD_MAX

#define BZI_INITRD_MAX   0x37ffffff

bzImage maximum initrd address for versions < 2.03

Definition at line 117 of file bzimage.h.

◆ BZI_CMDLINE_OFFSET

#define BZI_CMDLINE_OFFSET   0x20

Offset of bzImage command-line structure within kernel image.

Definition at line 128 of file bzimage.h.

◆ BZI_CMDLINE_MAGIC

#define BZI_CMDLINE_MAGIC   0xa33f

bzImage command line present magic marker value

Definition at line 131 of file bzimage.h.

◆ BZI_ASSUMED_RM_SIZE

#define BZI_ASSUMED_RM_SIZE   0x8000

Assumed size of real-mode portion (including .bss)

Definition at line 134 of file bzimage.h.

◆ BZI_STACK_SIZE

#define BZI_STACK_SIZE   0x1000

Amount of stack space to provide.

Definition at line 137 of file bzimage.h.

◆ BZI_CMDLINE_SIZE

#define BZI_CMDLINE_SIZE   0x7ff

Maximum size of command line.

Definition at line 140 of file bzimage.h.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ __attribute__()

struct bzimage_header __attribute__ ( (packed)  )

Variable Documentation

◆ setup_sects

uint8_t setup_sects

The size of the setup in sectors.

If this field contains 0, assume it contains 4.

Definition at line 9 of file bzimage.h.

◆ root_flags

uint16_t root_flags

If set, the root is mounted readonly.

Definition at line 11 of file bzimage.h.

◆ syssize

uint16_t syssize

DO NOT USE - for bootsect.S use only.

Definition at line 13 of file bzimage.h.

Referenced by bzimage_parse_header().

◆ swap_dev

uint16_t swap_dev

DO NOT USE - obsolete.

Definition at line 15 of file bzimage.h.

◆ ram_size

uint16_t ram_size

DO NOT USE - for bootsect.S use only.

Definition at line 17 of file bzimage.h.

◆ vid_mode

uint16_t vid_mode

Video mode control.

Definition at line 19 of file bzimage.h.

◆ root_dev

uint16_t root_dev

Default root device number.

Definition at line 21 of file bzimage.h.

◆ boot_flag

uint16_t boot_flag

0xAA55 magic number

Definition at line 23 of file bzimage.h.

◆ jump

uint16_t jump

Jump instruction.

Definition at line 25 of file bzimage.h.

◆ header

uint32_t header

Magic signature "HdrS".

Definition at line 27 of file bzimage.h.

◆ version

uint16_t version

Boot protocol version supported.

Definition at line 29 of file bzimage.h.

◆ realmode_swtch

uint32_t realmode_swtch

Boot loader hook (see below)

Definition at line 31 of file bzimage.h.

◆ start_sys

uint16_t start_sys

The load-low segment (0x1000) (obsolete)

Definition at line 33 of file bzimage.h.

◆ kernel_version

uint16_t kernel_version

Pointer to kernel version string.

Definition at line 35 of file bzimage.h.

◆ type_of_loader

uint8_t type_of_loader

Boot loader identifier.

Definition at line 37 of file bzimage.h.

◆ loadflags

uint8_t loadflags

Boot protocol option flags.

Definition at line 39 of file bzimage.h.

◆ setup_move_size

uint16_t setup_move_size

Move to high memory size (used with hooks)

Definition at line 41 of file bzimage.h.

◆ code32_start

uint32_t code32_start

Boot loader hook (see below)

Definition at line 43 of file bzimage.h.

◆ ramdisk_image

uint32_t ramdisk_image

initrd load address (set by boot loader)

Definition at line 45 of file bzimage.h.

◆ ramdisk_size

uint32_t ramdisk_size

initrd size (set by boot loader)

Definition at line 47 of file bzimage.h.

◆ bootsect_kludge

uint32_t bootsect_kludge

DO NOT USE - for bootsect.S use only.

Definition at line 49 of file bzimage.h.

◆ heap_end_ptr

uint16_t heap_end_ptr

Free memory after setup end.

Definition at line 51 of file bzimage.h.

◆ pad1

uint16_t pad1

Unused.

Definition at line 53 of file bzimage.h.

◆ cmd_line_ptr

uint32_t cmd_line_ptr

32-bit pointer to the kernel command line

Definition at line 55 of file bzimage.h.

◆ initrd_addr_max

uint32_t initrd_addr_max

Highest legal initrd address.

Definition at line 57 of file bzimage.h.

◆ kernel_alignment

uint32_t kernel_alignment

Physical addr alignment required for kernel.

Definition at line 59 of file bzimage.h.

◆ relocatable_kernel

uint8_t relocatable_kernel

Whether kernel is relocatable or not.

Definition at line 61 of file bzimage.h.

◆ pad2

uint8_t pad2[3]

Unused.

Definition at line 63 of file bzimage.h.

◆ cmdline_size

uint32_t cmdline_size

Maximum size of the kernel command line.

Definition at line 65 of file bzimage.h.

◆ magic

uint16_t magic

Magic signature.

Definition at line 6 of file bzimage.h.

◆ offset

uint16_t offset

Offset to command line.

Definition at line 8 of file bzimage.h.