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

◆ offset

static __always_inline off_t off_t offset
Initial value:
{
return ( ( segment << 16 ) | offset )
uint16_t segment
Code segment.
Definition: librm.h:252
uint16_t offset
Offset to command line.
Definition: bzimage.h:8

Offset to command line.

Interrupt wrapper address offset.

Definition at line 8 of file bzimage.h.

Referenced by __vxge_hw_desc_offset_up(), __vxge_hw_vpath_pci_read(), acpi_currticks(), acpi_extract_sx(), acpi_settings_fetch(), acpi_zsdt(), acpimac_extract(), acpimac_extract_auxmac(), acpimac_extract_rtxmac(), aes_column(), aes_output(), aes_setkey(), alloc_iob_fail_okx(), alloc_iob_okx(), alloc_iob_raw(), alloc_memblock(), apply_dns_settings(), ar9003_hw_tx_iq_cal_post_proc(), ar9285_hw_pa_cal(), ar9300_read_otp(), ar9300_uncompress_block(), arbel_cmd_unmap_icm(), arbel_ring_doorbell(), asn1_okx(), ath5k_cal_data_offset_2413(), ath5k_eeprom_init_11a_pcal_freq(), ath5k_eeprom_init_11bg_2413(), ath5k_eeprom_init_modes(), ath5k_eeprom_read_ants(), ath5k_eeprom_read_ctl_info(), ath5k_eeprom_read_freq_list(), ath5k_eeprom_read_mac(), ath5k_eeprom_read_modes(), ath5k_eeprom_read_pcal_info_2413(), ath5k_eeprom_read_pcal_info_5111(), ath5k_eeprom_read_pcal_info_5112(), ath5k_eeprom_read_target_rate_pwr_info(), ath5k_eeprom_read_turbo_modes(), ath5k_hw_eeprom_read(), ath5k_hw_rfb_op(), ath9k_olc_get_pdadcs(), atl1e_setup_ring_resources(), atl2_hw_read_shared_in_(), atl2_hw_write_shared_in_(), axge_in_complete(), axge_read_byte(), axge_read_dword(), axge_read_register(), axge_read_word(), axge_write_byte(), axge_write_dword(), axge_write_register(), axge_write_word(), base64_decode(), bios_currticks(), blktrans_xferbuf_read(), blktrans_xferbuf_write(), bnx2_ctx_wr(), bnx2_init_context(), bnx2_reg_rd_ind(), bnx2_reg_wr_ind(), bofm_locate_section(), bzimage_load_initrd(), bzimage_load_initrds(), call_bootsector(), cert_exec(), check_bios_interrupts(), clear_b0_fpga_memories(), cms_decrypt(), cms_digest(), day_of_week(), dbg_hex_dump_da(), dbg_hex_dump_da_row(), deflate_alphabet(), deflate_copy(), deflate_okx(), des_rounds(), dhcp_option(), dhcpopt_fetch(), dhcpopt_store(), dhcpopt_update_used_len(), digest_exec(), dm96xx_read_register(), dm96xx_read_registers(), dm96xx_write_register(), dm96xx_write_registers(), dns_decode(), dns_label(), dns_list_okx(), dns_question(), dns_skip(), dns_skip_search(), dns_xfer_deliver(), ecam_find(), efi_disk_io_read_disk(), efi_disk_io_write_disk(), efi_file_read_chunk(), efi_pxe_buf_write(), efi_snp_nvdata(), efifb_draw(), efifb_glyph(), efipci_ioremap(), ehci_enqueue(), ehci_extended_capability(), ena_clear_caps(), ena_set_base(), ena_set_caps(), exanic_poll_rx(), exanic_transmit(), fbcon_clear(), fbcon_draw(), fbcon_draw_cursor(), fbcon_picture_init(), fbcon_redraw(), fbcon_store(), fcpcmd_recv_rddata(), fdt_alias(), fdt_child(), fdt_mac(), fdt_path(), fdt_property(), fdt_string(), find_dhcp_option_with_encap(), find_smbios3_entry(), find_smbios_entry(), find_smbios_structure(), find_strings_terminator(), fragment_reassemble(), gcm_tag(), get_e(), goto_find_label(), gve_alloc_queue(), gve_poll_rx(), gve_transmit(), gzip_extract(), hermon_cmd_unmap_icm(), hermon_mod_stat_cfg(), hfa384x_copy_from_bap(), hfa384x_copy_to_bap(), hfa384x_prepare_bap(), history_entry(), history_move(), hunt_mcdi_copyout(), i2c_bit_read(), i2c_bit_write(), i2c_select(), ibft_install(), ibft_string(), icplus_set_base(), if(), image_asn1(), image_x509(), inject_corruption_nonzero(), ioremap_pages(), is_pnp_bios(), iscsi_rx_data_in(), iscsi_start_data_out(), iscsi_tx_data_out(), linda_post_send(), linda_readq(), linda_verify_uc_ram(), linda_writel(), linda_writeq(), load_cpu_fw(), malloc_phys_offset(), md4_update(), md5_update(), mlx_pci_config(), mlx_pci_config_byte(), mlx_pci_config_dword(), mlx_pci_config_word(), mlx_pci_gw_check_capability_id(), mlx_pci_mem_read(), mlx_pci_mem_read_priv(), mlx_pci_mem_write(), mlx_pci_mem_write_priv(), mlx_pci_read(), mlx_pci_read_priv(), mlx_pci_write(), mlx_pci_write_priv(), multiboot_find_header(), multiboot_load_raw(), natsemi_create_ring(), natsemi_hwaddr_insane(), nbi_load_segment(), nbi_process_segments(), ndp_fetch(), ndp_register_settings(), ndp_rx_options(), netdev_priv_offset(), netfront_transmit(), netvsc_buffer_copy(), nfs_read(), nodnic_port_thin_init(), ntlm_challenge(), ntlm_data_okx(), pci_backup(), pci_backup_excluded(), pci_msix_ioremap(), pci_restore(), pciea_bar_value(), pciea_offset(), peerdist_info_get(), peerdist_info_v1_block_offset(), peerdist_info_v1_blocks(), pem_asn1(), pem_image_asn1(), pem_image_probe(), pem_marker(), pem_next(), phantom_clp_cmd(), phantom_clp_fetch(), phantom_clp_store(), phantom_crb_access_128m(), phantom_crb_access_2m(), phantom_crb_access_32m(), phantom_dmesg(), phantom_get_macaddr(), phantom_read_test_mem(), phantom_read_test_mem_block(), phantom_readl(), phantom_writel(), phy_read(), phy_write(), png_palette(), png_unfilter_pass(), pnm_data(), prep_pci_cfg_cap(), print_user_string(), pxenv_file_api_check(), qib7322_post_send(), qib7322_readq(), qib7322_writel(), qib7322_writeq(), read_smbios_string(), read_srom_word(), read_user(), real_to_user(), reg_delay(), resize_dhcp_option(), rsdp_find_rsdt_range(), script_exec_line(), set_dhcp_option(), sha1_update(), sha256_update(), sha512_update(), smbios_checksum(), smscusb_fdt_fetch_mac(), t509_id_read_eeprom(), t509_load_eeprom_word(), tcpip_bind(), tftp_rx_data(), tg3_nvram_read(), tg3_nvram_read_be32(), tg3_nvram_read_using_eeprom(), trivial_memchr_user(), trivial_memset_user(), trivial_strlen_user(), trivial_user_to_virt(), trivial_userptr_add(), txnic_poll_cq(), txnic_refill_rq(), txnic_send(), ucode_parse_amd(), ucode_parse_intel(), ucode_verify(), vesafb_glyph(), virtio_pci_map_capability(), vmbus_xfer_page_iobufs(), vp_get(), vpm_get(), vpm_ioread16(), vpm_ioread32(), vpm_ioread8(), vpm_iowrite16(), vpm_iowrite32(), vpm_iowrite8(), vxge_hw_fifo_txd_offset_up(), vxge_hw_ring_replenish(), vxge_hw_ring_rxd_offset_up(), vxge_hw_set_fw_api(), xenstore_recv(), xenstore_send(), xfer_seek(), xferbuf_malloc_read(), xferbuf_malloc_write(), xferbuf_read(), xferbuf_umalloc_read(), xferbuf_umalloc_write(), xferbuf_write(), xhci_extended_capability(), and xhci_supported_protocol().