setup_data.h 1.7 KB

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