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_ENUM_MAX SETUP_RNG_SEED 17 18 #define SETUP_INDIRECT (1<<31) 19 #define SETUP_TYPE_MAX (SETUP_ENUM_MAX | SETUP_INDIRECT) 20 21 #ifndef __ASSEMBLY__ 22 23 #include "standard-headers/linux/types.h" 24 25 /* extensible setup data list node */ 26 struct setup_data { 27 uint64_t next; 28 uint32_t type; 29 uint32_t len; 30 uint8_t data[]; 31 }; 32 33 /* extensible setup indirect data node */ 34 struct setup_indirect { 35 uint32_t type; 36 uint32_t reserved; /* Reserved, must be set to zero. */ 37 uint64_t len; 38 uint64_t addr; 39 }; 40 41 /* 42 * The E820 memory region entry of the boot protocol ABI: 43 */ 44 struct boot_e820_entry { 45 uint64_t addr; 46 uint64_t size; 47 uint32_t type; 48 } QEMU_PACKED; 49 50 /* 51 * The boot loader is passing platform information via this Jailhouse-specific 52 * setup data structure. 53 */ 54 struct jailhouse_setup_data { 55 struct { 56 uint16_t version; 57 uint16_t compatible_version; 58 } QEMU_PACKED hdr; 59 struct { 60 uint16_t pm_timer_address; 61 uint16_t num_cpus; 62 uint64_t pci_mmconfig_base; 63 uint32_t tsc_khz; 64 uint32_t apic_khz; 65 uint8_t standard_ioapic; 66 uint8_t cpu_ids[255]; 67 } QEMU_PACKED v1; 68 struct { 69 uint32_t flags; 70 } QEMU_PACKED v2; 71 } QEMU_PACKED; 72 73 /* 74 * IMA buffer setup data information from the previous kernel during kexec 75 */ 76 struct ima_setup_data { 77 uint64_t addr; 78 uint64_t size; 79 } QEMU_PACKED; 80 81 #endif /* __ASSEMBLY__ */ 82 83 #endif /* _ASM_X86_SETUP_DATA_H */ 84