1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 #ifndef _ASM_X86_SETUP_DATA_H 3 #define _ASM_X86_SETUP_DATA_H 4 5 /* setup_data/setup_indirect types */ 6 #define SETUP_NONE 0 7 #define SETUP_E820_EXT 1 8 #define SETUP_DTB 2 9 #define SETUP_PCI 3 10 #define SETUP_EFI 4 11 #define SETUP_APPLE_PROPERTIES 5 12 #define SETUP_JAILHOUSE 6 13 #define SETUP_CC_BLOB 7 14 #define SETUP_IMA 8 15 #define SETUP_RNG_SEED 9 16 #define SETUP_KEXEC_KHO 10 17 #define SETUP_ENUM_MAX SETUP_KEXEC_KHO 18 19 #define SETUP_INDIRECT (1<<31) 20 #define SETUP_TYPE_MAX (SETUP_ENUM_MAX | SETUP_INDIRECT) 21 22 #ifndef __ASSEMBLER__ 23 24 #include "standard-headers/linux/types.h" 25 26 /* extensible setup data list node */ 27 struct setup_data { 28 uint64_t next; 29 uint32_t type; 30 uint32_t len; 31 uint8_t data[]; 32 }; 33 34 /* extensible setup indirect data node */ 35 struct setup_indirect { 36 uint32_t type; 37 uint32_t reserved; /* Reserved, must be set to zero. */ 38 uint64_t len; 39 uint64_t addr; 40 }; 41 42 /* 43 * The E820 memory region entry of the boot protocol ABI: 44 */ 45 struct boot_e820_entry { 46 uint64_t addr; 47 uint64_t size; 48 uint32_t type; 49 } QEMU_PACKED; 50 51 /* 52 * The boot loader is passing platform information via this Jailhouse-specific 53 * setup data structure. 54 */ 55 struct jailhouse_setup_data { 56 struct { 57 uint16_t version; 58 uint16_t compatible_version; 59 } QEMU_PACKED hdr; 60 struct { 61 uint16_t pm_timer_address; 62 uint16_t num_cpus; 63 uint64_t pci_mmconfig_base; 64 uint32_t tsc_khz; 65 uint32_t apic_khz; 66 uint8_t standard_ioapic; 67 uint8_t cpu_ids[255]; 68 } QEMU_PACKED v1; 69 struct { 70 uint32_t flags; 71 } QEMU_PACKED v2; 72 } QEMU_PACKED; 73 74 /* 75 * IMA buffer setup data information from the previous kernel during kexec 76 */ 77 struct ima_setup_data { 78 uint64_t addr; 79 uint64_t size; 80 } QEMU_PACKED; 81 82 /* 83 * Locations of kexec handover metadata 84 */ 85 struct kho_data { 86 uint64_t fdt_addr; 87 uint64_t fdt_size; 88 uint64_t scratch_addr; 89 uint64_t scratch_size; 90 } QEMU_PACKED; 91 92 #endif /* __ASSEMBLER__ */ 93 94 #endif /* _ASM_X86_SETUP_DATA_H */ 95