Graeme Russ | 1bab104 | 2010-04-24 00:05:49 +1000 | [diff] [blame] | 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 */ |
Ivan Gorinov | 901bb0b | 2018-03-26 18:06:54 -0700 | [diff] [blame] | 13 | enum { |
| 14 | SETUP_NONE = 0, |
| 15 | SETUP_E820_EXT, |
| 16 | SETUP_DTB, |
| 17 | }; |
Graeme Russ | 1bab104 | 2010-04-24 00:05:49 +1000 | [diff] [blame] | 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; |
Stefan Roese | 58e41cc | 2016-09-30 09:15:59 +0200 | [diff] [blame] | 69 | __u64 pref_address; |
| 70 | __u32 init_size; |
| 71 | __u32 handover_offset; |
Graeme Russ | 1bab104 | 2010-04-24 00:05:49 +1000 | [diff] [blame] | 72 | } __attribute__((packed)); |
| 73 | |
| 74 | struct sys_desc_table { |
| 75 | __u16 length; |
| 76 | __u8 table[14]; |
| 77 | }; |
| 78 | |
| 79 | struct efi_info { |
| 80 | __u32 efi_loader_signature; |
| 81 | __u32 efi_systab; |
| 82 | __u32 efi_memdesc_size; |
| 83 | __u32 efi_memdesc_version; |
| 84 | __u32 efi_memmap; |
| 85 | __u32 efi_memmap_size; |
| 86 | __u32 efi_systab_hi; |
| 87 | __u32 efi_memmap_hi; |
| 88 | }; |
| 89 | |
| 90 | /* The so-called "zeropage" */ |
| 91 | struct boot_params { |
| 92 | struct screen_info screen_info; /* 0x000 */ |
| 93 | struct apm_bios_info apm_bios_info; /* 0x040 */ |
| 94 | __u8 _pad2[4]; /* 0x054 */ |
| 95 | __u64 tboot_addr; /* 0x058 */ |
| 96 | struct ist_info ist_info; /* 0x060 */ |
Andy Shevchenko | d87a21d | 2019-09-13 18:42:00 +0300 | [diff] [blame] | 97 | __u64 acpi_rsdp_addr; /* 0x070 */ |
| 98 | __u8 _pad3[8]; /* 0x078 */ |
Graeme Russ | 1bab104 | 2010-04-24 00:05:49 +1000 | [diff] [blame] | 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 */ |
Bin Meng | 4b8fc74 | 2018-04-11 22:02:11 -0700 | [diff] [blame] | 114 | struct e820_entry e820_map[E820MAX]; /* 0x2d0 */ |
Graeme Russ | 1bab104 | 2010-04-24 00:05:49 +1000 | [diff] [blame] | 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, |
Andy Shevchenko | 7c7a078 | 2017-01-08 23:51:04 +0300 | [diff] [blame] | 124 | X86_SUBARCH_INTEL_MID, |
| 125 | X86_SUBARCH_CE4100, |
Graeme Russ | 1bab104 | 2010-04-24 00:05:49 +1000 | [diff] [blame] | 126 | X86_NR_SUBARCHS, |
| 127 | }; |
Graeme Russ | 1bab104 | 2010-04-24 00:05:49 +1000 | [diff] [blame] | 128 | #endif /* _ASM_X86_BOOTPARAM_H */ |