1fea25720SGraeme Russ #ifndef _ASM_X86_BOOTPARAM_H 2fea25720SGraeme Russ #define _ASM_X86_BOOTPARAM_H 3fea25720SGraeme Russ 4fea25720SGraeme Russ #include <linux/types.h> 5fea25720SGraeme Russ #include <linux/screen_info.h> 6fea25720SGraeme Russ #include <linux/apm_bios.h> 7fea25720SGraeme Russ #include <linux/edd.h> 8fea25720SGraeme Russ #include <asm/e820.h> 9fea25720SGraeme Russ #include <asm/ist.h> 10fea25720SGraeme Russ #include <asm/video/edid.h> 11fea25720SGraeme Russ 12fea25720SGraeme Russ /* setup data types */ 135d73292cSIvan Gorinov enum { 145d73292cSIvan Gorinov SETUP_NONE = 0, 155d73292cSIvan Gorinov SETUP_E820_EXT, 165d73292cSIvan Gorinov SETUP_DTB, 175d73292cSIvan Gorinov }; 18fea25720SGraeme Russ 19fea25720SGraeme Russ /* extensible setup data list node */ 20fea25720SGraeme Russ struct setup_data { 21fea25720SGraeme Russ __u64 next; 22fea25720SGraeme Russ __u32 type; 23fea25720SGraeme Russ __u32 len; 24fea25720SGraeme Russ __u8 data[0]; 25fea25720SGraeme Russ }; 26fea25720SGraeme Russ 27fea25720SGraeme Russ struct setup_header { 28fea25720SGraeme Russ __u8 setup_sects; 29fea25720SGraeme Russ __u16 root_flags; 30fea25720SGraeme Russ __u32 syssize; 31fea25720SGraeme Russ __u16 ram_size; 32fea25720SGraeme Russ #define RAMDISK_IMAGE_START_MASK 0x07FF 33fea25720SGraeme Russ #define RAMDISK_PROMPT_FLAG 0x8000 34fea25720SGraeme Russ #define RAMDISK_LOAD_FLAG 0x4000 35fea25720SGraeme Russ __u16 vid_mode; 36fea25720SGraeme Russ __u16 root_dev; 37fea25720SGraeme Russ __u16 boot_flag; 38fea25720SGraeme Russ __u16 jump; 39fea25720SGraeme Russ __u32 header; 40fea25720SGraeme Russ __u16 version; 41fea25720SGraeme Russ __u32 realmode_swtch; 42fea25720SGraeme Russ __u16 start_sys; 43fea25720SGraeme Russ __u16 kernel_version; 44fea25720SGraeme Russ __u8 type_of_loader; 45fea25720SGraeme Russ __u8 loadflags; 46fea25720SGraeme Russ #define LOADED_HIGH (1<<0) 47fea25720SGraeme Russ #define QUIET_FLAG (1<<5) 48fea25720SGraeme Russ #define KEEP_SEGMENTS (1<<6) 49fea25720SGraeme Russ #define CAN_USE_HEAP (1<<7) 50fea25720SGraeme Russ __u16 setup_move_size; 51fea25720SGraeme Russ __u32 code32_start; 52fea25720SGraeme Russ __u32 ramdisk_image; 53fea25720SGraeme Russ __u32 ramdisk_size; 54fea25720SGraeme Russ __u32 bootsect_kludge; 55fea25720SGraeme Russ __u16 heap_end_ptr; 56fea25720SGraeme Russ __u8 ext_loader_ver; 57fea25720SGraeme Russ __u8 ext_loader_type; 58fea25720SGraeme Russ __u32 cmd_line_ptr; 59fea25720SGraeme Russ __u32 initrd_addr_max; 60fea25720SGraeme Russ __u32 kernel_alignment; 61fea25720SGraeme Russ __u8 relocatable_kernel; 62fea25720SGraeme Russ __u8 _pad2[3]; 63fea25720SGraeme Russ __u32 cmdline_size; 64fea25720SGraeme Russ __u32 hardware_subarch; 65fea25720SGraeme Russ __u64 hardware_subarch_data; 66fea25720SGraeme Russ __u32 payload_offset; 67fea25720SGraeme Russ __u32 payload_length; 68fea25720SGraeme Russ __u64 setup_data; 6988d915b1SStefan Roese __u64 pref_address; 7088d915b1SStefan Roese __u32 init_size; 7188d915b1SStefan Roese __u32 handover_offset; 72fea25720SGraeme Russ } __attribute__((packed)); 73fea25720SGraeme Russ 74fea25720SGraeme Russ struct sys_desc_table { 75fea25720SGraeme Russ __u16 length; 76fea25720SGraeme Russ __u8 table[14]; 77fea25720SGraeme Russ }; 78fea25720SGraeme Russ 79fea25720SGraeme Russ struct efi_info { 80fea25720SGraeme Russ __u32 efi_loader_signature; 81fea25720SGraeme Russ __u32 efi_systab; 82fea25720SGraeme Russ __u32 efi_memdesc_size; 83fea25720SGraeme Russ __u32 efi_memdesc_version; 84fea25720SGraeme Russ __u32 efi_memmap; 85fea25720SGraeme Russ __u32 efi_memmap_size; 86fea25720SGraeme Russ __u32 efi_systab_hi; 87fea25720SGraeme Russ __u32 efi_memmap_hi; 88fea25720SGraeme Russ }; 89fea25720SGraeme Russ 90fea25720SGraeme Russ /* The so-called "zeropage" */ 91fea25720SGraeme Russ struct boot_params { 92fea25720SGraeme Russ struct screen_info screen_info; /* 0x000 */ 93fea25720SGraeme Russ struct apm_bios_info apm_bios_info; /* 0x040 */ 94fea25720SGraeme Russ __u8 _pad2[4]; /* 0x054 */ 95fea25720SGraeme Russ __u64 tboot_addr; /* 0x058 */ 96fea25720SGraeme Russ struct ist_info ist_info; /* 0x060 */ 97fea25720SGraeme Russ __u8 _pad3[16]; /* 0x070 */ 98fea25720SGraeme Russ __u8 hd0_info[16]; /* obsolete! */ /* 0x080 */ 99fea25720SGraeme Russ __u8 hd1_info[16]; /* obsolete! */ /* 0x090 */ 100fea25720SGraeme Russ struct sys_desc_table sys_desc_table; /* 0x0a0 */ 101fea25720SGraeme Russ __u8 _pad4[144]; /* 0x0b0 */ 102fea25720SGraeme Russ struct edid_info edid_info; /* 0x140 */ 103fea25720SGraeme Russ struct efi_info efi_info; /* 0x1c0 */ 104fea25720SGraeme Russ __u32 alt_mem_k; /* 0x1e0 */ 105fea25720SGraeme Russ __u32 scratch; /* Scratch field! */ /* 0x1e4 */ 106fea25720SGraeme Russ __u8 e820_entries; /* 0x1e8 */ 107fea25720SGraeme Russ __u8 eddbuf_entries; /* 0x1e9 */ 108fea25720SGraeme Russ __u8 edd_mbr_sig_buf_entries; /* 0x1ea */ 109fea25720SGraeme Russ __u8 _pad6[6]; /* 0x1eb */ 110fea25720SGraeme Russ struct setup_header hdr; /* setup header */ /* 0x1f1 */ 111fea25720SGraeme Russ __u8 _pad7[0x290-0x1f1-sizeof(struct setup_header)]; 112fea25720SGraeme Russ __u32 edd_mbr_sig_buffer[EDD_MBR_SIG_MAX]; /* 0x290 */ 113*45519924SBin Meng struct e820_entry e820_map[E820MAX]; /* 0x2d0 */ 114fea25720SGraeme Russ __u8 _pad8[48]; /* 0xcd0 */ 115fea25720SGraeme Russ struct edd_info eddbuf[EDDMAXNR]; /* 0xd00 */ 116fea25720SGraeme Russ __u8 _pad9[276]; /* 0xeec */ 117fea25720SGraeme Russ } __attribute__((packed)); 118fea25720SGraeme Russ 119fea25720SGraeme Russ enum { 120fea25720SGraeme Russ X86_SUBARCH_PC = 0, 121fea25720SGraeme Russ X86_SUBARCH_LGUEST, 122fea25720SGraeme Russ X86_SUBARCH_XEN, 1237cbaddd4SAndy Shevchenko X86_SUBARCH_INTEL_MID, 1247cbaddd4SAndy Shevchenko X86_SUBARCH_CE4100, 125fea25720SGraeme Russ X86_NR_SUBARCHS, 126fea25720SGraeme Russ }; 127fea25720SGraeme Russ #endif /* _ASM_X86_BOOTPARAM_H */ 128