blob: 020e819fe3460634a4a0ff91532d32a82443460d [file] [log] [blame]
Elliott Hughesabd62612013-11-08 11:45:48 -08001/****************************************************************************
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/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#define SETUP_DTB 2
25#define SETUP_PCI 3
Christopher Ferris38062f92014-07-09 15:33:25 -070026#define SETUP_EFI 4
Christopher Ferris48af7cb2017-02-21 12:35:09 -080027#define SETUP_APPLE_PROPERTIES 5
Elliott Hughesabd62612013-11-08 11:45:48 -080028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080029#define RAMDISK_IMAGE_START_MASK 0x07FF
Christopher Ferris38062f92014-07-09 15:33:25 -070030#define RAMDISK_PROMPT_FLAG 0x8000
Elliott Hughesabd62612013-11-08 11:45:48 -080031#define RAMDISK_LOAD_FLAG 0x4000
Tao Baod7db5942015-01-28 10:07:51 -080032#define LOADED_HIGH (1 << 0)
Elliott Hughesabd62612013-11-08 11:45:48 -080033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080034#define KASLR_FLAG (1 << 1)
Christopher Ferris05d08e92016-02-04 13:16:38 -080035#define QUIET_FLAG (1 << 5)
Tao Baod7db5942015-01-28 10:07:51 -080036#define KEEP_SEGMENTS (1 << 6)
37#define CAN_USE_HEAP (1 << 7)
Elliott Hughesabd62612013-11-08 11:45:48 -080038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080039#define XLF_KERNEL_64 (1 << 0)
Christopher Ferris05d08e92016-02-04 13:16:38 -080040#define XLF_CAN_BE_LOADED_ABOVE_4G (1 << 1)
Tao Baod7db5942015-01-28 10:07:51 -080041#define XLF_EFI_HANDOVER_32 (1 << 2)
42#define XLF_EFI_HANDOVER_64 (1 << 3)
Christopher Ferris38062f92014-07-09 15:33:25 -070043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080044#define XLF_EFI_KEXEC (1 << 4)
Christopher Ferris05d08e92016-02-04 13:16:38 -080045#ifndef __ASSEMBLY__
Elliott Hughesabd62612013-11-08 11:45:48 -080046#include <linux/types.h>
47#include <linux/screen_info.h>
Christopher Ferris38062f92014-07-09 15:33:25 -070048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080049#include <linux/apm_bios.h>
Christopher Ferris05d08e92016-02-04 13:16:38 -080050#include <linux/edd.h>
Elliott Hughesabd62612013-11-08 11:45:48 -080051#include <asm/e820.h>
52#include <asm/ist.h>
Christopher Ferris38062f92014-07-09 15:33:25 -070053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080054#include <video/edid.h>
Christopher Ferris05d08e92016-02-04 13:16:38 -080055struct setup_data {
Tao Baod7db5942015-01-28 10:07:51 -080056 __u64 next;
57 __u32 type;
Christopher Ferris38062f92014-07-09 15:33:25 -070058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080059 __u32 len;
Christopher Ferris05d08e92016-02-04 13:16:38 -080060 __u8 data[0];
Elliott Hughesabd62612013-11-08 11:45:48 -080061};
62struct setup_header {
Christopher Ferris38062f92014-07-09 15:33:25 -070063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080064 __u8 setup_sects;
Christopher Ferris05d08e92016-02-04 13:16:38 -080065 __u16 root_flags;
Tao Baod7db5942015-01-28 10:07:51 -080066 __u32 syssize;
67 __u16 ram_size;
Christopher Ferris38062f92014-07-09 15:33:25 -070068/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080069 __u16 vid_mode;
Christopher Ferris05d08e92016-02-04 13:16:38 -080070 __u16 root_dev;
Tao Baod7db5942015-01-28 10:07:51 -080071 __u16 boot_flag;
72 __u16 jump;
Christopher Ferris38062f92014-07-09 15:33:25 -070073/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080074 __u32 header;
Christopher Ferris05d08e92016-02-04 13:16:38 -080075 __u16 version;
Tao Baod7db5942015-01-28 10:07:51 -080076 __u32 realmode_swtch;
77 __u16 start_sys;
Christopher Ferris38062f92014-07-09 15:33:25 -070078/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080079 __u16 kernel_version;
Christopher Ferris05d08e92016-02-04 13:16:38 -080080 __u8 type_of_loader;
Tao Baod7db5942015-01-28 10:07:51 -080081 __u8 loadflags;
82 __u16 setup_move_size;
Christopher Ferris38062f92014-07-09 15:33:25 -070083/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080084 __u32 code32_start;
Christopher Ferris05d08e92016-02-04 13:16:38 -080085 __u32 ramdisk_image;
Tao Baod7db5942015-01-28 10:07:51 -080086 __u32 ramdisk_size;
87 __u32 bootsect_kludge;
Christopher Ferris38062f92014-07-09 15:33:25 -070088/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080089 __u16 heap_end_ptr;
Christopher Ferris05d08e92016-02-04 13:16:38 -080090 __u8 ext_loader_ver;
Tao Baod7db5942015-01-28 10:07:51 -080091 __u8 ext_loader_type;
92 __u32 cmd_line_ptr;
Christopher Ferris38062f92014-07-09 15:33:25 -070093/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080094 __u32 initrd_addr_max;
Christopher Ferris05d08e92016-02-04 13:16:38 -080095 __u32 kernel_alignment;
Tao Baod7db5942015-01-28 10:07:51 -080096 __u8 relocatable_kernel;
97 __u8 min_alignment;
Christopher Ferris38062f92014-07-09 15:33:25 -070098/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -080099 __u16 xloadflags;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800100 __u32 cmdline_size;
Tao Baod7db5942015-01-28 10:07:51 -0800101 __u32 hardware_subarch;
102 __u64 hardware_subarch_data;
Christopher Ferris38062f92014-07-09 15:33:25 -0700103/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800104 __u32 payload_offset;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800105 __u32 payload_length;
Tao Baod7db5942015-01-28 10:07:51 -0800106 __u64 setup_data;
107 __u64 pref_address;
Christopher Ferris38062f92014-07-09 15:33:25 -0700108/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800109 __u32 init_size;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800110 __u32 handover_offset;
Elliott Hughesabd62612013-11-08 11:45:48 -0800111} __attribute__((packed));
112struct sys_desc_table {
Christopher Ferris38062f92014-07-09 15:33:25 -0700113/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800114 __u16 length;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800115 __u8 table[14];
Elliott Hughesabd62612013-11-08 11:45:48 -0800116};
117struct olpc_ofw_header {
Christopher Ferris38062f92014-07-09 15:33:25 -0700118/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800119 __u32 ofw_magic;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800120 __u32 ofw_version;
Tao Baod7db5942015-01-28 10:07:51 -0800121 __u32 cif_handler;
122 __u32 irq_desc_table;
Christopher Ferris38062f92014-07-09 15:33:25 -0700123/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800124} __attribute__((packed));
Christopher Ferris05d08e92016-02-04 13:16:38 -0800125struct efi_info {
Tao Baod7db5942015-01-28 10:07:51 -0800126 __u32 efi_loader_signature;
127 __u32 efi_systab;
Christopher Ferris38062f92014-07-09 15:33:25 -0700128/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800129 __u32 efi_memdesc_size;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800130 __u32 efi_memdesc_version;
Tao Baod7db5942015-01-28 10:07:51 -0800131 __u32 efi_memmap;
132 __u32 efi_memmap_size;
Christopher Ferris38062f92014-07-09 15:33:25 -0700133/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800134 __u32 efi_systab_hi;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800135 __u32 efi_memmap_hi;
Elliott Hughesabd62612013-11-08 11:45:48 -0800136};
137struct boot_params {
Christopher Ferris38062f92014-07-09 15:33:25 -0700138/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800139 struct screen_info screen_info;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800140 struct apm_bios_info apm_bios_info;
Tao Baod7db5942015-01-28 10:07:51 -0800141 __u8 _pad2[4];
142 __u64 tboot_addr;
Christopher Ferris38062f92014-07-09 15:33:25 -0700143/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800144 struct ist_info ist_info;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800145 __u8 _pad3[16];
Tao Baod7db5942015-01-28 10:07:51 -0800146 __u8 hd0_info[16];
147 __u8 hd1_info[16];
Christopher Ferris38062f92014-07-09 15:33:25 -0700148/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800149 struct sys_desc_table sys_desc_table;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800150 struct olpc_ofw_header olpc_ofw_header;
Tao Baod7db5942015-01-28 10:07:51 -0800151 __u32 ext_ramdisk_image;
152 __u32 ext_ramdisk_size;
Christopher Ferris38062f92014-07-09 15:33:25 -0700153/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800154 __u32 ext_cmd_line_ptr;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800155 __u8 _pad4[116];
Tao Baod7db5942015-01-28 10:07:51 -0800156 struct edid_info edid_info;
157 struct efi_info efi_info;
Christopher Ferris38062f92014-07-09 15:33:25 -0700158/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800159 __u32 alt_mem_k;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800160 __u32 scratch;
Tao Baod7db5942015-01-28 10:07:51 -0800161 __u8 e820_entries;
162 __u8 eddbuf_entries;
Christopher Ferris38062f92014-07-09 15:33:25 -0700163/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800164 __u8 edd_mbr_sig_buf_entries;
Christopher Ferris05d08e92016-02-04 13:16:38 -0800165 __u8 kbd_status;
Tao Baod7db5942015-01-28 10:07:51 -0800166 __u8 _pad5[3];
167 __u8 sentinel;
Christopher Ferris38062f92014-07-09 15:33:25 -0700168/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800169 __u8 _pad6[1];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800170 struct setup_header hdr;
Tao Baod7db5942015-01-28 10:07:51 -0800171 __u8 _pad7[0x290 - 0x1f1 - sizeof(struct setup_header)];
172 __u32 edd_mbr_sig_buffer[EDD_MBR_SIG_MAX];
Christopher Ferris38062f92014-07-09 15:33:25 -0700173/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800174 struct e820entry e820_map[E820MAX];
Christopher Ferris05d08e92016-02-04 13:16:38 -0800175 __u8 _pad8[48];
Tao Baod7db5942015-01-28 10:07:51 -0800176 struct edd_info eddbuf[EDDMAXNR];
177 __u8 _pad9[276];
Christopher Ferris38062f92014-07-09 15:33:25 -0700178/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800179} __attribute__((packed));
Christopher Ferris106b3a82016-08-24 12:15:38 -0700180enum x86_hardware_subarch {
Tao Baod7db5942015-01-28 10:07:51 -0800181 X86_SUBARCH_PC = 0,
182 X86_SUBARCH_LGUEST,
Christopher Ferris38062f92014-07-09 15:33:25 -0700183/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800184 X86_SUBARCH_XEN,
Christopher Ferris05d08e92016-02-04 13:16:38 -0800185 X86_SUBARCH_INTEL_MID,
Tao Baod7db5942015-01-28 10:07:51 -0800186 X86_SUBARCH_CE4100,
187 X86_NR_SUBARCHS,
Christopher Ferris38062f92014-07-09 15:33:25 -0700188/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
Christopher Ferris48af7cb2017-02-21 12:35:09 -0800189};
Elliott Hughesabd62612013-11-08 11:45:48 -0800190#endif
Christopher Ferris05d08e92016-02-04 13:16:38 -0800191#endif