14#ifndef L4UTIL_MB_INFO_H
15#define L4UTIL_MB_INFO_H
24#include <l4/sys/l4int.h>
50typedef struct __attribute__((packed))
60#define MB_ARD_MEMORY 1
66#define MB_ART_MEMORY 1
67#define MB_ART_RESERVED 2
71#define MB_ART_UNUSABLE 5
87#define MB_DI_CHS_MODE 0
88#define MB_DI_LBA_MODE 1
334#define l4util_mb_for_each_mmap_entry(i, mbi) \
335 for (i = l4util_mb_first_mmap_entry(mbi); \
336 (unsigned long)i < (unsigned long)mbi->mmap_addr + mbi->mmap_length; \
337 i = l4util_mb_next_mmap_entry(i))
346#define L4UTIL_MB_MEMORY 0x00000001
349#define L4UTIL_MB_BOOTDEV 0x00000002
352#define L4UTIL_MB_CMDLINE 0x00000004
355#define L4UTIL_MB_MODS 0x00000008
359#define L4UTIL_MB_AOUT_SYMS 0x00000010
362#define L4UTIL_MB_ELF_SHDR 0x00000020
365#define L4UTIL_MB_MEM_MAP 0x00000040
368#define L4UTIL_MB_DRIVE_INFO 0x00000080
371#define L4UTIL_MB_CONFIG_TABLE 0x00000100
374#define L4UTIL_MB_BOOT_LOADER_NAME 0x00000200
377#define L4UTIL_MB_APM_TABLE 0x00000400
380#define L4UTIL_MB_VIDEO_INFO 0x00000800
384#define L4UTIL_MB_VALID 0x2BADB002UL
385#define L4UTIL_MB_VALID_ASM 0x2BADB002
398} __attribute__((packed)) l4util_mb2_info_t;
403} __attribute__((packed)) l4util_mb2_cmdline_tag_t;
410} __attribute__((packed)) l4util_mb2_module_tag_t;
418} __attribute__((packed)) l4util_mb2_memmap_entry_t;
424 l4util_mb2_memmap_entry_t entries[];
425} __attribute__((packed)) l4util_mb2_memmap_tag_t;
430} __attribute__((packed)) l4util_mb2_rsdp_tag_t;
439 l4util_mb2_cmdline_tag_t cmdline;
440 l4util_mb2_module_tag_t
module;
441 l4util_mb2_memmap_tag_t memmap;
442 l4util_mb2_rsdp_tag_t rsdp;
444} __attribute__((packed)) l4util_mb2_tag_t;
449#define L4UTIL_MB2_MAGIC 0xE85250D6
450#define L4UTIL_MB2_ARCH_I386 0x0
452#define L4UTIL_MB2_TERMINATOR_HEADER_TAG 0
453#define L4UTIL_MB2_INFO_REQUEST_HEADER_TAG 1
454#define L4UTIL_MB2_ENTRY_ADDRESS_HEADER_TAG 3
455#define L4UTIL_MB2_RELOCATABLE_HEADER_TAG 10
457#define L4UTIL_MB2_TAG_FLAG_REQUIRED 0
459#define L4UTIL_MB2_TAG_ALIGN_SHIFT 3
460#define L4UTIL_MB2_TAG_ALIGN 8
462#define L4UTIL_MB2_TERMINATOR_INFO_TAG 0
463#define L4UTIL_MB2_BOOT_CMDLINE_INFO_TAG 1
464#define L4UTIL_MB2_MODULE_INFO_TAG 3
465#define L4UTIL_MB2_MEMORY_MAP_INFO_TAG 6
466#define L4UTIL_MB2_RSDP_OLD_INFO_TAG 14
467#define L4UTIL_MB2_RSDP_NEW_INFO_TAG 15
468#define L4UTIL_MB2_IMAGE_LOAD_BASE_PHYS_INFO_TAG 21
470#define L4UTIL_MB2_RELO_PREFERED_NONE 0
471#define L4UTIL_MB2_RELO_PREFERED_MIN 1
472#define L4UTIL_MB2_RELO_PREFERED_MAX 2
L4 compiler related defines.
unsigned long l4_addr_t
Address type.
unsigned char l4_uint8_t
Unsigned 8bit value.
unsigned int l4_uint32_t
Unsigned 32bit value.
unsigned short int l4_uint16_t
Unsigned 16bit value.
unsigned long long l4_uint64_t
Unsigned 64bit value.
INT-15, AX=E820 style "AddressRangeDescriptor" ...with a "size" parameter on the front which is the s...
l4_uint32_t type
type of memory range
l4_uint64_t size
Size of memory range.
l4_uint64_t addr
Start address.
l4_uint32_t struct_size
Size of structure.
l4_uint8_t drive_number
<The size of this structure.
l4_uint8_t drive_mode
<The BIOS drive number.
l4_uint16_t drive_cylinders
<The access mode (see below).
l4_uint8_t drive_sectors
<number of heads
l4_uint8_t drive_heads
<number of cylinders
MultiBoot Info description.
l4_uint32_t drives_length
size of drive info buffer
l4_uint32_t num
(ELF) Kernel section header table
l4_uint16_t vbe_mode
VESA video mode number.
l4_uint32_t mmap_length
size of memory mapping buffer
l4_uint16_t vbe_interface_len
VESA lenght of prot BIOS interface.
l4_uint32_t drives_addr
address of driver info buffer
l4_uint32_t mem_upper
available memory starting from 1MB [kB]
l4_uint32_t tabsize
(a.out) Kernel symbol table info
l4_uint32_t boot_device
"root" partition
l4_uint32_t apm_table
APM table.
l4_uint32_t cmdline
Kernel command line.
l4_uint32_t config_table
ROM configuration table.
l4_uint16_t vbe_interface_off
VESA offset of prot BIOS interface.
l4_uint32_t mem_lower
available memory below 1MB
l4_uint32_t mmap_addr
address of memory mapping buffer
l4_uint32_t vbe_mode_info
VESA video mode info.
l4_uint32_t vbe_ctrl_info
VESA video contoller info.
l4_uint32_t mods_addr
module list
l4_uint32_t mods_count
number of modules
l4_uint32_t boot_loader_name
Boot Loader Name.
l4_uint32_t flags
MultiBoot info version number.
l4_uint16_t vbe_interface_seg
VESA segment of prot BIOS interface.
The structure type "mod_list" is used by the multiboot_info structure.
l4_uint32_t mod_start
Starting address of module in memory.
l4_uint32_t pad
padding to take it to 16 bytes
l4_uint32_t cmdline
Module command line.
l4_uint32_t mod_end
End address of module in memory.
VBE controller information.
l4_uint8_t number_of_banks
Number of banks.
l4_uint16_t linear_bytes_per_scanline
Bytes per scan line for linear modes.
l4_uint8_t linear_number_of_image_pages
Number of images for linear modes.
l4_uint16_t x_resolution
Horizontal resolution in pixels or characters.
l4_uint8_t linear_red_mask_size
Size of direct color red mask (linear modes).
l4_uint8_t win_b_attributes
Window B attributes.
l4_uint8_t red_field_position
Bit position of LSB of red mask.
l4_uint8_t blue_mask_size
Size of direct color blue mask in bits.
l4_uint8_t linear_reserved_mask_size
Size of direct color reserved mask (linear modes).
l4_uint8_t memory_model
Memory model type.
l4_uint16_t win_b_segment
Window B start segment.
l4_uint8_t linear_green_field_position
Bit position of LSB of green mask (linear modes).
l4_uint32_t phys_base
Physical address for flat memory memory frame buffer.
l4_uint8_t y_char_size
Character cell height in pixels.
l4_uint16_t bytes_per_scanline
Bytes per scan line.
l4_uint16_t win_granularity
Window granularity.
l4_uint32_t reserved1
Reserved – always set to 0.
l4_uint8_t red_mask_size
Size of direct color red mask in bits.
l4_uint8_t bits_per_pixel
Bits per pixel.
l4_uint8_t x_char_size
Character cell width in pixels.
l4_uint8_t green_mask_size
Size of direct color green mask in bits.
l4_uint32_t max_pixel_clock
Maximum pixel clock (in Hz) for graphics mode.
l4_uint8_t green_field_position
Bit position of LSB of green mask.
l4_uint16_t reversed2
Reserved – always set to 0.
l4_uint8_t number_of_planes
Number of memory planes.
l4_uint8_t linear_blue_mask_size
Size of direct color blue mask (linear modes).
l4_uint8_t linear_blue_field_position
Bit position of LSB of blue mask (linear modes).
l4_uint8_t linear_red_field_position
Bit position of LSB of red mask (linear modes).
l4_uint8_t banked_number_of_image_pages
Number of images for banked modes.
l4_uint8_t linear_reserved_field_position
Bit position of LSB of reserved mask (linear modes).
l4_uint32_t win_func
Real mode pointer to window function.
l4_uint8_t bank_size
Bank size in KiB.
l4_uint8_t reserved0
Reserved for page function.
l4_uint8_t win_a_attributes
Window A attributes.
l4_uint16_t win_size
Window size.
l4_uint16_t win_a_segment
Window A start segment.
l4_uint8_t blue_field_position
Bit position of LSB of blue mask.
l4_uint16_t mode_attributes
Mode attributes.
l4_uint8_t linear_green_mask_size
Size of direct color green mask (linear modes).
l4_uint16_t y_resolution
Vertical resolution in pixels or characters.
l4_uint8_t number_of_image_pages
Number of images.
l4_uint8_t reserved_mask_size
Size of direct color reserved mask in bits.
l4_uint8_t direct_color_mode_info
Direct color mode attributes.
l4_uint8_t reserved_field_position
Bit position of LSB of reserved mask.