1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef _ASM_X86_BOOTPARAM_H 20 #define _ASM_X86_BOOTPARAM_H 21 #define SETUP_NONE 0 22 #define SETUP_E820_EXT 1 23 #define SETUP_DTB 2 24 #define SETUP_PCI 3 25 #define SETUP_EFI 4 26 #define SETUP_APPLE_PROPERTIES 5 27 #define SETUP_JAILHOUSE 6 28 #define SETUP_CC_BLOB 7 29 #define SETUP_IMA 8 30 #define SETUP_RNG_SEED 9 31 #define SETUP_ENUM_MAX SETUP_RNG_SEED 32 #define SETUP_INDIRECT (1 << 31) 33 #define SETUP_TYPE_MAX (SETUP_ENUM_MAX | SETUP_INDIRECT) 34 #define RAMDISK_IMAGE_START_MASK 0x07FF 35 #define RAMDISK_PROMPT_FLAG 0x8000 36 #define RAMDISK_LOAD_FLAG 0x4000 37 #define LOADED_HIGH (1 << 0) 38 #define KASLR_FLAG (1 << 1) 39 #define QUIET_FLAG (1 << 5) 40 #define KEEP_SEGMENTS (1 << 6) 41 #define CAN_USE_HEAP (1 << 7) 42 #define XLF_KERNEL_64 (1 << 0) 43 #define XLF_CAN_BE_LOADED_ABOVE_4G (1 << 1) 44 #define XLF_EFI_HANDOVER_32 (1 << 2) 45 #define XLF_EFI_HANDOVER_64 (1 << 3) 46 #define XLF_EFI_KEXEC (1 << 4) 47 #define XLF_5LEVEL (1 << 5) 48 #define XLF_5LEVEL_ENABLED (1 << 6) 49 #ifndef __ASSEMBLY__ 50 #include <linux/types.h> 51 #include <linux/screen_info.h> 52 #include <linux/apm_bios.h> 53 #include <linux/edd.h> 54 #include <asm/ist.h> 55 #include <video/edid.h> 56 struct setup_data { 57 __u64 next; 58 __u32 type; 59 __u32 len; 60 __u8 data[]; 61 }; 62 struct setup_indirect { 63 __u32 type; 64 __u32 reserved; 65 __u64 len; 66 __u64 addr; 67 }; 68 struct setup_header { 69 __u8 setup_sects; 70 __u16 root_flags; 71 __u32 syssize; 72 __u16 ram_size; 73 __u16 vid_mode; 74 __u16 root_dev; 75 __u16 boot_flag; 76 __u16 jump; 77 __u32 header; 78 __u16 version; 79 __u32 realmode_swtch; 80 __u16 start_sys_seg; 81 __u16 kernel_version; 82 __u8 type_of_loader; 83 __u8 loadflags; 84 __u16 setup_move_size; 85 __u32 code32_start; 86 __u32 ramdisk_image; 87 __u32 ramdisk_size; 88 __u32 bootsect_kludge; 89 __u16 heap_end_ptr; 90 __u8 ext_loader_ver; 91 __u8 ext_loader_type; 92 __u32 cmd_line_ptr; 93 __u32 initrd_addr_max; 94 __u32 kernel_alignment; 95 __u8 relocatable_kernel; 96 __u8 min_alignment; 97 __u16 xloadflags; 98 __u32 cmdline_size; 99 __u32 hardware_subarch; 100 __u64 hardware_subarch_data; 101 __u32 payload_offset; 102 __u32 payload_length; 103 __u64 setup_data; 104 __u64 pref_address; 105 __u32 init_size; 106 __u32 handover_offset; 107 __u32 kernel_info_offset; 108 } __attribute__((packed)); 109 struct sys_desc_table { 110 __u16 length; 111 __u8 table[14]; 112 }; 113 struct olpc_ofw_header { 114 __u32 ofw_magic; 115 __u32 ofw_version; 116 __u32 cif_handler; 117 __u32 irq_desc_table; 118 } __attribute__((packed)); 119 struct efi_info { 120 __u32 efi_loader_signature; 121 __u32 efi_systab; 122 __u32 efi_memdesc_size; 123 __u32 efi_memdesc_version; 124 __u32 efi_memmap; 125 __u32 efi_memmap_size; 126 __u32 efi_systab_hi; 127 __u32 efi_memmap_hi; 128 }; 129 #define E820_MAX_ENTRIES_ZEROPAGE 128 130 struct boot_e820_entry { 131 __u64 addr; 132 __u64 size; 133 __u32 type; 134 } __attribute__((packed)); 135 #define JAILHOUSE_SETUP_REQUIRED_VERSION 1 136 struct jailhouse_setup_data { 137 struct { 138 __u16 version; 139 __u16 compatible_version; 140 } __attribute__((packed)) hdr; 141 struct { 142 __u16 pm_timer_address; 143 __u16 num_cpus; 144 __u64 pci_mmconfig_base; 145 __u32 tsc_khz; 146 __u32 apic_khz; 147 __u8 standard_ioapic; 148 __u8 cpu_ids[255]; 149 } __attribute__((packed)) v1; 150 struct { 151 __u32 flags; 152 } __attribute__((packed)) v2; 153 } __attribute__((packed)); 154 struct ima_setup_data { 155 __u64 addr; 156 __u64 size; 157 } __attribute__((packed)); 158 struct boot_params { 159 struct screen_info screen_info; 160 struct apm_bios_info apm_bios_info; 161 __u8 _pad2[4]; 162 __u64 tboot_addr; 163 struct ist_info ist_info; 164 __u64 acpi_rsdp_addr; 165 __u8 _pad3[8]; 166 __u8 hd0_info[16]; 167 __u8 hd1_info[16]; 168 struct sys_desc_table sys_desc_table; 169 struct olpc_ofw_header olpc_ofw_header; 170 __u32 ext_ramdisk_image; 171 __u32 ext_ramdisk_size; 172 __u32 ext_cmd_line_ptr; 173 __u8 _pad4[112]; 174 __u32 cc_blob_address; 175 struct edid_info edid_info; 176 struct efi_info efi_info; 177 __u32 alt_mem_k; 178 __u32 scratch; 179 __u8 e820_entries; 180 __u8 eddbuf_entries; 181 __u8 edd_mbr_sig_buf_entries; 182 __u8 kbd_status; 183 __u8 secure_boot; 184 __u8 _pad5[2]; 185 __u8 sentinel; 186 __u8 _pad6[1]; 187 struct setup_header hdr; 188 __u8 _pad7[0x290 - 0x1f1 - sizeof(struct setup_header)]; 189 __u32 edd_mbr_sig_buffer[EDD_MBR_SIG_MAX]; 190 struct boot_e820_entry e820_table[E820_MAX_ENTRIES_ZEROPAGE]; 191 __u8 _pad8[48]; 192 struct edd_info eddbuf[EDDMAXNR]; 193 __u8 _pad9[276]; 194 } __attribute__((packed)); 195 enum x86_hardware_subarch { 196 X86_SUBARCH_PC = 0, 197 X86_SUBARCH_LGUEST, 198 X86_SUBARCH_XEN, 199 X86_SUBARCH_INTEL_MID, 200 X86_SUBARCH_CE4100, 201 X86_NR_SUBARCHS, 202 }; 203 #endif 204 #endif 205