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