start_info.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. * Permission is hereby granted, free of charge, to any person obtaining a copy
  3. * of this software and associated documentation files (the "Software"), to
  4. * deal in the Software without restriction, including without limitation the
  5. * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  6. * sell copies of the Software, and to permit persons to whom the Software is
  7. * furnished to do so, subject to the following conditions:
  8. *
  9. * The above copyright notice and this permission notice shall be included in
  10. * all copies or substantial portions of the Software.
  11. *
  12. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  13. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  14. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  15. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  16. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  17. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  18. * DEALINGS IN THE SOFTWARE.
  19. *
  20. * Copyright (c) 2016, Citrix Systems, Inc.
  21. */
  22. #ifndef __XEN_PUBLIC_ARCH_X86_HVM_START_INFO_H__
  23. #define __XEN_PUBLIC_ARCH_X86_HVM_START_INFO_H__
  24. /*
  25. * Start of day structure passed to PVH guests and to HVM guests in %ebx.
  26. *
  27. * NOTE: nothing will be loaded at physical address 0, so a 0 value in any
  28. * of the address fields should be treated as not present.
  29. *
  30. * 0 +----------------+
  31. * | magic | Contains the magic value XEN_HVM_START_MAGIC_VALUE
  32. * | | ("xEn3" with the 0x80 bit of the "E" set).
  33. * 4 +----------------+
  34. * | version | Version of this structure. Current version is 0. New
  35. * | | versions are guaranteed to be backwards-compatible.
  36. * 8 +----------------+
  37. * | flags | SIF_xxx flags.
  38. * 12 +----------------+
  39. * | nr_modules | Number of modules passed to the kernel.
  40. * 16 +----------------+
  41. * | modlist_paddr | Physical address of an array of modules
  42. * | | (layout of the structure below).
  43. * 24 +----------------+
  44. * | cmdline_paddr | Physical address of the command line,
  45. * | | a zero-terminated ASCII string.
  46. * 32 +----------------+
  47. * | rsdp_paddr | Physical address of the RSDP ACPI data structure.
  48. * 40 +----------------+
  49. *
  50. * The layout of each entry in the module structure is the following:
  51. *
  52. * 0 +----------------+
  53. * | paddr | Physical address of the module.
  54. * 8 +----------------+
  55. * | size | Size of the module in bytes.
  56. * 16 +----------------+
  57. * | cmdline_paddr | Physical address of the command line,
  58. * | | a zero-terminated ASCII string.
  59. * 24 +----------------+
  60. * | reserved |
  61. * 32 +----------------+
  62. *
  63. * The address and sizes are always a 64bit little endian unsigned integer.
  64. *
  65. * NB: Xen on x86 will always try to place all the data below the 4GiB
  66. * boundary.
  67. */
  68. #define XEN_HVM_START_MAGIC_VALUE 0x336ec578
  69. /*
  70. * C representation of the x86/HVM start info layout.
  71. *
  72. * The canonical definition of this layout is above, this is just a way to
  73. * represent the layout described there using C types.
  74. */
  75. struct hvm_start_info {
  76. uint32_t magic; /* Contains the magic value 0x336ec578 */
  77. /* ("xEn3" with the 0x80 bit of the "E" set).*/
  78. uint32_t version; /* Version of this structure. */
  79. uint32_t flags; /* SIF_xxx flags. */
  80. uint32_t nr_modules; /* Number of modules passed to the kernel. */
  81. uint64_t modlist_paddr; /* Physical address of an array of */
  82. /* hvm_modlist_entry. */
  83. uint64_t cmdline_paddr; /* Physical address of the command line. */
  84. uint64_t rsdp_paddr; /* Physical address of the RSDP ACPI data */
  85. /* structure. */
  86. };
  87. struct hvm_modlist_entry {
  88. uint64_t paddr; /* Physical address of the module. */
  89. uint64_t size; /* Size of the module in bytes. */
  90. uint64_t cmdline_paddr; /* Physical address of the command line. */
  91. uint64_t reserved;
  92. };
  93. #endif /* __XEN_PUBLIC_ARCH_X86_HVM_START_INFO_H__ */