1*d1f3a23bSKevin Wolf /* 2*d1f3a23bSKevin Wolf * Copyright (c) 2013 Kevin Wolf <kwolf@redhat.com> 3*d1f3a23bSKevin Wolf * 4*d1f3a23bSKevin Wolf * Permission is hereby granted, free of charge, to any person obtaining a copy 5*d1f3a23bSKevin Wolf * of this software and associated documentation files (the "Software"), to deal 6*d1f3a23bSKevin Wolf * in the Software without restriction, including without limitation the rights 7*d1f3a23bSKevin Wolf * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8*d1f3a23bSKevin Wolf * copies of the Software, and to permit persons to whom the Software is 9*d1f3a23bSKevin Wolf * furnished to do so, subject to the following conditions: 10*d1f3a23bSKevin Wolf * 11*d1f3a23bSKevin Wolf * The above copyright notice and this permission notice shall be included in 12*d1f3a23bSKevin Wolf * all copies or substantial portions of the Software. 13*d1f3a23bSKevin Wolf * 14*d1f3a23bSKevin Wolf * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15*d1f3a23bSKevin Wolf * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16*d1f3a23bSKevin Wolf * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17*d1f3a23bSKevin Wolf * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18*d1f3a23bSKevin Wolf * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19*d1f3a23bSKevin Wolf * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20*d1f3a23bSKevin Wolf * THE SOFTWARE. 21*d1f3a23bSKevin Wolf */ 22*d1f3a23bSKevin Wolf 23*d1f3a23bSKevin Wolf #ifndef MULTIBOOT_H 24*d1f3a23bSKevin Wolf #define MULTIBOOT_H 25*d1f3a23bSKevin Wolf 26*d1f3a23bSKevin Wolf #include "libc.h" 27*d1f3a23bSKevin Wolf 28*d1f3a23bSKevin Wolf struct mb_info { 29*d1f3a23bSKevin Wolf uint32_t flags; 30*d1f3a23bSKevin Wolf uint32_t mem_lower; 31*d1f3a23bSKevin Wolf uint32_t mem_upper; 32*d1f3a23bSKevin Wolf uint32_t boot_device; 33*d1f3a23bSKevin Wolf uint32_t cmdline; 34*d1f3a23bSKevin Wolf uint32_t mods_count; 35*d1f3a23bSKevin Wolf uint32_t mods_addr; 36*d1f3a23bSKevin Wolf char syms[16]; 37*d1f3a23bSKevin Wolf uint32_t mmap_length; 38*d1f3a23bSKevin Wolf uint32_t mmap_addr; 39*d1f3a23bSKevin Wolf uint32_t drives_length; 40*d1f3a23bSKevin Wolf uint32_t drives_addr; 41*d1f3a23bSKevin Wolf uint32_t config_table; 42*d1f3a23bSKevin Wolf uint32_t boot_loader_name; 43*d1f3a23bSKevin Wolf uint32_t apm_table; 44*d1f3a23bSKevin Wolf uint32_t vbe_control_info; 45*d1f3a23bSKevin Wolf uint32_t vbe_mode_info; 46*d1f3a23bSKevin Wolf uint16_t vbe_mode; 47*d1f3a23bSKevin Wolf uint16_t vbe_interface_seg; 48*d1f3a23bSKevin Wolf uint16_t vbe_interface_off; 49*d1f3a23bSKevin Wolf uint16_t vbe_interface_len; 50*d1f3a23bSKevin Wolf } __attribute__((packed)); 51*d1f3a23bSKevin Wolf 52*d1f3a23bSKevin Wolf struct mb_module { 53*d1f3a23bSKevin Wolf uint32_t mod_start; 54*d1f3a23bSKevin Wolf uint32_t mod_end; 55*d1f3a23bSKevin Wolf uint32_t string; 56*d1f3a23bSKevin Wolf uint32_t reserved; 57*d1f3a23bSKevin Wolf } __attribute__((packed)); 58*d1f3a23bSKevin Wolf 59*d1f3a23bSKevin Wolf struct mb_mmap_entry { 60*d1f3a23bSKevin Wolf uint32_t size; 61*d1f3a23bSKevin Wolf uint64_t base_addr; 62*d1f3a23bSKevin Wolf uint64_t length; 63*d1f3a23bSKevin Wolf uint32_t type; 64*d1f3a23bSKevin Wolf } __attribute__((packed)); 65*d1f3a23bSKevin Wolf 66*d1f3a23bSKevin Wolf #endif 67