12#ifndef L4UTIL_MB_INFO_H
13#define L4UTIL_MB_INFO_H
22#include <l4/sys/l4int.h>
48typedef struct __attribute__((packed))
48typedef struct __attribute__((packed)) {
…};
58#define MB_ARD_MEMORY 1
64#define MB_ART_MEMORY 1
65#define MB_ART_RESERVED 2
69#define MB_ART_UNUSABLE 5
85#define MB_DI_CHS_MODE 0
86#define MB_DI_LBA_MODE 1
332#define l4util_mb_for_each_mmap_entry(i, mbi) \
333 for (i = l4util_mb_first_mmap_entry(mbi); \
334 (unsigned long)i < (unsigned long)mbi->mmap_addr + mbi->mmap_length; \
335 i = l4util_mb_next_mmap_entry(i))
332#define l4util_mb_for_each_mmap_entry(i, mbi) \ …
344#define L4UTIL_MB_MEMORY 0x00000001
347#define L4UTIL_MB_BOOTDEV 0x00000002
350#define L4UTIL_MB_CMDLINE 0x00000004
353#define L4UTIL_MB_MODS 0x00000008
357#define L4UTIL_MB_AOUT_SYMS 0x00000010
360#define L4UTIL_MB_ELF_SHDR 0x00000020
363#define L4UTIL_MB_MEM_MAP 0x00000040
366#define L4UTIL_MB_DRIVE_INFO 0x00000080
369#define L4UTIL_MB_CONFIG_TABLE 0x00000100
372#define L4UTIL_MB_BOOT_LOADER_NAME 0x00000200
375#define L4UTIL_MB_APM_TABLE 0x00000400
378#define L4UTIL_MB_VIDEO_INFO 0x00000800
382#define L4UTIL_MB_VALID 0x2BADB002UL
383#define L4UTIL_MB_VALID_ASM 0x2BADB002
396} __attribute__((packed)) l4util_mb2_info_t;
401} __attribute__((packed)) l4util_mb2_cmdline_tag_t;
408} __attribute__((packed)) l4util_mb2_module_tag_t;
416} __attribute__((packed)) l4util_mb2_memmap_entry_t;
422 l4util_mb2_memmap_entry_t entries[];
423} __attribute__((packed)) l4util_mb2_memmap_tag_t;
428} __attribute__((packed)) l4util_mb2_rsdp_tag_t;
431struct color_info_rgb_t
439} __attribute__((packed));
454 struct color_info_rgb_t color_info_rgb;
456} __attribute__((packed)) l4util_mb2_framebuffer_tag_t;
465 l4util_mb2_cmdline_tag_t cmdline;
466 l4util_mb2_module_tag_t
module;
467 l4util_mb2_memmap_tag_t memmap;
468 l4util_mb2_framebuffer_tag_t fb;
469 l4util_mb2_rsdp_tag_t rsdp;
471} __attribute__((packed)) l4util_mb2_tag_t;
476#define L4UTIL_MB2_MAGIC 0xE85250D6
477#define L4UTIL_MB2_ARCH_I386 0x0
479#define L4UTIL_MB2_TERMINATOR_HEADER_TAG 0
480#define L4UTIL_MB2_INFO_REQUEST_HEADER_TAG 1
481#define L4UTIL_MB2_ENTRY_ADDRESS_HEADER_TAG 3
482#define L4UTIL_MB2_FRAMEBUFFER_HEADER_TAG 5
483#define L4UTIL_MB2_RELOCATABLE_HEADER_TAG 10
485#define L4UTIL_MB2_TAG_FLAG_REQUIRED 0
487#define L4UTIL_MB2_TAG_ALIGN_SHIFT 3
488#define L4UTIL_MB2_TAG_ALIGN 8
490#define L4UTIL_MB2_TERMINATOR_INFO_TAG 0
491#define L4UTIL_MB2_BOOT_CMDLINE_INFO_TAG 1
492#define L4UTIL_MB2_MODULE_INFO_TAG 3
493#define L4UTIL_MB2_MEMORY_MAP_INFO_TAG 6
494#define L4UTIL_MB2_FRAMEBUFFER_INFO_TAG 8
495#define L4UTIL_MB2_RSDP_OLD_INFO_TAG 14
496#define L4UTIL_MB2_RSDP_NEW_INFO_TAG 15
497#define L4UTIL_MB2_IMAGE_LOAD_BASE_PHYS_INFO_TAG 21
499#define L4UTIL_MB2_RELO_PREFERED_NONE 0
500#define L4UTIL_MB2_RELO_PREFERED_MIN 1
501#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.