elfnote.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. /******************************************************************************
  2. * elfnote.h
  3. *
  4. * Definitions used for the Xen ELF notes.
  5. *
  6. * Copyright (c) 2006, Ian Campbell, XenSource Ltd.
  7. */
  8. #ifndef __XEN_PUBLIC_ELFNOTE_H__
  9. #define __XEN_PUBLIC_ELFNOTE_H__
  10. /*
  11. * The notes should live in a SHT_NOTE segment and have "Xen" in the
  12. * name field.
  13. *
  14. * Numeric types are either 4 or 8 bytes depending on the content of
  15. * the desc field.
  16. *
  17. * LEGACY indicated the fields in the legacy __xen_guest string which
  18. * this a note type replaces.
  19. */
  20. /*
  21. * NAME=VALUE pair (string).
  22. *
  23. * LEGACY: FEATURES and PAE
  24. */
  25. #define XEN_ELFNOTE_INFO 0
  26. /*
  27. * The virtual address of the entry point (numeric).
  28. *
  29. * LEGACY: VIRT_ENTRY
  30. */
  31. #define XEN_ELFNOTE_ENTRY 1
  32. /* The virtual address of the hypercall transfer page (numeric).
  33. *
  34. * LEGACY: HYPERCALL_PAGE. (n.b. legacy value is a physical page
  35. * number not a virtual address)
  36. */
  37. #define XEN_ELFNOTE_HYPERCALL_PAGE 2
  38. /* The virtual address where the kernel image should be mapped (numeric).
  39. *
  40. * Defaults to 0.
  41. *
  42. * LEGACY: VIRT_BASE
  43. */
  44. #define XEN_ELFNOTE_VIRT_BASE 3
  45. /*
  46. * The offset of the ELF paddr field from the acutal required
  47. * pseudo-physical address (numeric).
  48. *
  49. * This is used to maintain backwards compatibility with older kernels
  50. * which wrote __PAGE_OFFSET into that field. This field defaults to 0
  51. * if not present.
  52. *
  53. * LEGACY: ELF_PADDR_OFFSET. (n.b. legacy default is VIRT_BASE)
  54. */
  55. #define XEN_ELFNOTE_PADDR_OFFSET 4
  56. /*
  57. * The version of Xen that we work with (string).
  58. *
  59. * LEGACY: XEN_VER
  60. */
  61. #define XEN_ELFNOTE_XEN_VERSION 5
  62. /*
  63. * The name of the guest operating system (string).
  64. *
  65. * LEGACY: GUEST_OS
  66. */
  67. #define XEN_ELFNOTE_GUEST_OS 6
  68. /*
  69. * The version of the guest operating system (string).
  70. *
  71. * LEGACY: GUEST_VER
  72. */
  73. #define XEN_ELFNOTE_GUEST_VERSION 7
  74. /*
  75. * The loader type (string).
  76. *
  77. * LEGACY: LOADER
  78. */
  79. #define XEN_ELFNOTE_LOADER 8
  80. /*
  81. * The kernel supports PAE (x86/32 only, string = "yes" or "no").
  82. *
  83. * LEGACY: PAE (n.b. The legacy interface included a provision to
  84. * indicate 'extended-cr3' support allowing L3 page tables to be
  85. * placed above 4G. It is assumed that any kernel new enough to use
  86. * these ELF notes will include this and therefore "yes" here is
  87. * equivalent to "yes[entended-cr3]" in the __xen_guest interface.
  88. */
  89. #define XEN_ELFNOTE_PAE_MODE 9
  90. /*
  91. * The features supported/required by this kernel (string).
  92. *
  93. * The string must consist of a list of feature names (as given in
  94. * features.h, without the "XENFEAT_" prefix) separated by '|'
  95. * characters. If a feature is required for the kernel to function
  96. * then the feature name must be preceded by a '!' character.
  97. *
  98. * LEGACY: FEATURES
  99. */
  100. #define XEN_ELFNOTE_FEATURES 10
  101. /*
  102. * The kernel requires the symbol table to be loaded (string = "yes" or "no")
  103. * LEGACY: BSD_SYMTAB (n.b. The legacy treated the presence or absence
  104. * of this string as a boolean flag rather than requiring "yes" or
  105. * "no".
  106. */
  107. #define XEN_ELFNOTE_BSD_SYMTAB 11
  108. /*
  109. * The lowest address the hypervisor hole can begin at (numeric).
  110. *
  111. * This must not be set higher than HYPERVISOR_VIRT_START. Its presence
  112. * also indicates to the hypervisor that the kernel can deal with the
  113. * hole starting at a higher address.
  114. */
  115. #define XEN_ELFNOTE_HV_START_LOW 12
  116. /*
  117. * List of maddr_t-sized mask/value pairs describing how to recognize
  118. * (non-present) L1 page table entries carrying valid MFNs (numeric).
  119. */
  120. #define XEN_ELFNOTE_L1_MFN_VALID 13
  121. /*
  122. * Whether or not the guest supports cooperative suspend cancellation.
  123. */
  124. #define XEN_ELFNOTE_SUSPEND_CANCEL 14
  125. #endif /* __XEN_PUBLIC_ELFNOTE_H__ */
  126. /*
  127. * Local variables:
  128. * mode: C
  129. * c-set-style: "BSD"
  130. * c-basic-offset: 4
  131. * tab-width: 4
  132. * indent-tabs-mode: nil
  133. * End:
  134. */