• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 RAMDISK_IMAGE_START_MASK 0x07FF
29 #define RAMDISK_PROMPT_FLAG 0x8000
30 #define RAMDISK_LOAD_FLAG 0x4000
31 #define LOADED_HIGH (1 << 0)
32 #define KASLR_FLAG (1 << 1)
33 #define QUIET_FLAG (1 << 5)
34 #define KEEP_SEGMENTS (1 << 6)
35 #define CAN_USE_HEAP (1 << 7)
36 #define XLF_KERNEL_64 (1 << 0)
37 #define XLF_CAN_BE_LOADED_ABOVE_4G (1 << 1)
38 #define XLF_EFI_HANDOVER_32 (1 << 2)
39 #define XLF_EFI_HANDOVER_64 (1 << 3)
40 #define XLF_EFI_KEXEC (1 << 4)
41 #ifndef __ASSEMBLY__
42 #include <linux/types.h>
43 #include <linux/screen_info.h>
44 #include <linux/apm_bios.h>
45 #include <linux/edd.h>
46 #include <asm/ist.h>
47 #include <video/edid.h>
48 struct setup_data {
49   __u64 next;
50   __u32 type;
51   __u32 len;
52   __u8 data[0];
53 };
54 struct setup_header {
55   __u8 setup_sects;
56   __u16 root_flags;
57   __u32 syssize;
58   __u16 ram_size;
59   __u16 vid_mode;
60   __u16 root_dev;
61   __u16 boot_flag;
62   __u16 jump;
63   __u32 header;
64   __u16 version;
65   __u32 realmode_swtch;
66   __u16 start_sys_seg;
67   __u16 kernel_version;
68   __u8 type_of_loader;
69   __u8 loadflags;
70   __u16 setup_move_size;
71   __u32 code32_start;
72   __u32 ramdisk_image;
73   __u32 ramdisk_size;
74   __u32 bootsect_kludge;
75   __u16 heap_end_ptr;
76   __u8 ext_loader_ver;
77   __u8 ext_loader_type;
78   __u32 cmd_line_ptr;
79   __u32 initrd_addr_max;
80   __u32 kernel_alignment;
81   __u8 relocatable_kernel;
82   __u8 min_alignment;
83   __u16 xloadflags;
84   __u32 cmdline_size;
85   __u32 hardware_subarch;
86   __u64 hardware_subarch_data;
87   __u32 payload_offset;
88   __u32 payload_length;
89   __u64 setup_data;
90   __u64 pref_address;
91   __u32 init_size;
92   __u32 handover_offset;
93 } __attribute__((packed));
94 struct sys_desc_table {
95   __u16 length;
96   __u8 table[14];
97 };
98 struct olpc_ofw_header {
99   __u32 ofw_magic;
100   __u32 ofw_version;
101   __u32 cif_handler;
102   __u32 irq_desc_table;
103 } __attribute__((packed));
104 struct efi_info {
105   __u32 efi_loader_signature;
106   __u32 efi_systab;
107   __u32 efi_memdesc_size;
108   __u32 efi_memdesc_version;
109   __u32 efi_memmap;
110   __u32 efi_memmap_size;
111   __u32 efi_systab_hi;
112   __u32 efi_memmap_hi;
113 };
114 #define E820_MAX_ENTRIES_ZEROPAGE 128
115 struct boot_e820_entry {
116   __u64 addr;
117   __u64 size;
118   __u32 type;
119 } __attribute__((packed));
120 #define JAILHOUSE_SETUP_REQUIRED_VERSION 1
121 struct jailhouse_setup_data {
122   __u16 version;
123   __u16 compatible_version;
124   __u16 pm_timer_address;
125   __u16 num_cpus;
126   __u64 pci_mmconfig_base;
127   __u32 tsc_khz;
128   __u32 apic_khz;
129   __u8 standard_ioapic;
130   __u8 cpu_ids[255];
131 } __attribute__((packed));
132 struct boot_params {
133   struct screen_info screen_info;
134   struct apm_bios_info apm_bios_info;
135   __u8 _pad2[4];
136   __u64 tboot_addr;
137   struct ist_info ist_info;
138   __u64 acpi_rsdp_addr;
139   __u8 _pad3[8];
140   __u8 hd0_info[16];
141   __u8 hd1_info[16];
142   struct sys_desc_table sys_desc_table;
143   struct olpc_ofw_header olpc_ofw_header;
144   __u32 ext_ramdisk_image;
145   __u32 ext_ramdisk_size;
146   __u32 ext_cmd_line_ptr;
147   __u8 _pad4[116];
148   struct edid_info edid_info;
149   struct efi_info efi_info;
150   __u32 alt_mem_k;
151   __u32 scratch;
152   __u8 e820_entries;
153   __u8 eddbuf_entries;
154   __u8 edd_mbr_sig_buf_entries;
155   __u8 kbd_status;
156   __u8 secure_boot;
157   __u8 _pad5[2];
158   __u8 sentinel;
159   __u8 _pad6[1];
160   struct setup_header hdr;
161   __u8 _pad7[0x290 - 0x1f1 - sizeof(struct setup_header)];
162   __u32 edd_mbr_sig_buffer[EDD_MBR_SIG_MAX];
163   struct boot_e820_entry e820_table[E820_MAX_ENTRIES_ZEROPAGE];
164   __u8 _pad8[48];
165   struct edd_info eddbuf[EDDMAXNR];
166   __u8 _pad9[276];
167 } __attribute__((packed));
168 enum x86_hardware_subarch {
169   X86_SUBARCH_PC = 0,
170   X86_SUBARCH_LGUEST,
171   X86_SUBARCH_XEN,
172   X86_SUBARCH_INTEL_MID,
173   X86_SUBARCH_CE4100,
174   X86_NR_SUBARCHS,
175 };
176 #endif
177 #endif
178