2 /******************************************************************************
5 * Definitions used for the Xen ELF notes.
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to
9 * deal in the Software without restriction, including without limitation the
10 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
11 * sell copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 * DEALINGS IN THE SOFTWARE.
25 * Copyright (c) 2006, Ian Campbell, XenSource Ltd.
28 #ifndef __XEN_PUBLIC_ELFNOTE_H__
29 #define __XEN_PUBLIC_ELFNOTE_H__
32 * The notes should live in a PT_NOTE segment and have "Xen" in the
35 * Numeric types are either 4 or 8 bytes depending on the content of
38 * LEGACY indicated the fields in the legacy __xen_guest string which
39 * this a note type replaces.
43 * NAME=VALUE pair (string).
45 #define XEN_ELFNOTE_INFO 0
48 * The virtual address of the entry point (numeric).
52 #define XEN_ELFNOTE_ENTRY 1
54 /* The virtual address of the hypercall transfer page (numeric).
56 * LEGACY: HYPERCALL_PAGE. (n.b. legacy value is a physical page
57 * number not a virtual address)
59 #define XEN_ELFNOTE_HYPERCALL_PAGE 2
61 /* The virtual address where the kernel image should be mapped (numeric).
67 #define XEN_ELFNOTE_VIRT_BASE 3
70 * The offset of the ELF paddr field from the acutal required
71 * psuedo-physical address (numeric).
73 * This is used to maintain backwards compatibility with older kernels
74 * which wrote __PAGE_OFFSET into that field. This field defaults to 0
77 * LEGACY: ELF_PADDR_OFFSET. (n.b. legacy default is VIRT_BASE)
79 #define XEN_ELFNOTE_PADDR_OFFSET 4
82 * The version of Xen that we work with (string).
86 #define XEN_ELFNOTE_XEN_VERSION 5
89 * The name of the guest operating system (string).
93 #define XEN_ELFNOTE_GUEST_OS 6
96 * The version of the guest operating system (string).
100 #define XEN_ELFNOTE_GUEST_VERSION 7
103 * The loader type (string).
107 #define XEN_ELFNOTE_LOADER 8
110 * The kernel supports PAE (x86/32 only, string = "yes", "no" or
113 * For compatibility with Xen 3.0.3 and earlier the "bimodal" setting
114 * may be given as "yes,bimodal" which will cause older Xen to treat
115 * this kernel as PAE.
117 * LEGACY: PAE (n.b. The legacy interface included a provision to
118 * indicate 'extended-cr3' support allowing L3 page tables to be
119 * placed above 4G. It is assumed that any kernel new enough to use
120 * these ELF notes will include this and therefore "yes" here is
121 * equivalent to "yes[entended-cr3]" in the __xen_guest interface.
123 #define XEN_ELFNOTE_PAE_MODE 9
126 * The features supported/required by this kernel (string).
128 * The string must consist of a list of feature names (as given in
129 * features.h, without the "XENFEAT_" prefix) separated by '|'
130 * characters. If a feature is required for the kernel to function
131 * then the feature name must be preceded by a '!' character.
135 #define XEN_ELFNOTE_FEATURES 10
138 * The kernel requires the symbol table to be loaded (string = "yes" or "no")
139 * LEGACY: BSD_SYMTAB (n.b. The legacy treated the presence or absence
140 * of this string as a boolean flag rather than requiring "yes" or
143 #define XEN_ELFNOTE_BSD_SYMTAB 11
146 * The lowest address the hypervisor hole can begin at (numeric).
148 * This must not be set higher than HYPERVISOR_VIRT_START. Its presence
149 * also indicates to the hypervisor that the kernel can deal with the
150 * hole starting at a higher address.
152 #define XEN_ELFNOTE_HV_START_LOW 12
155 * List of maddr_t-sized mask/value pairs describing how to recognize
156 * (non-present) L1 page table entries carrying valid MFNs (numeric).
158 #define XEN_ELFNOTE_L1_MFN_VALID 13
161 * Whether or not the guest supports cooperative suspend cancellation.
163 #define XEN_ELFNOTE_SUSPEND_CANCEL 14
166 * The number of the highest elfnote defined.
168 #define XEN_ELFNOTE_MAX XEN_ELFNOTE_SUSPEND_CANCEL
171 * System information exported through crash notes.
173 * The kexec / kdump code will create one XEN_ELFNOTE_CRASH_INFO
174 * note in case of a system crash. This note will contain various
175 * information about the system, see xen/include/xen/elfcore.h.
177 #define XEN_ELFNOTE_CRASH_INFO 0x1000001
180 * System registers exported through crash notes.
182 * The kexec / kdump code will create one XEN_ELFNOTE_CRASH_REGS
183 * note per cpu in case of a system crash. This note is architecture
184 * specific and will contain registers not saved in the "CORE" note.
185 * See xen/include/xen/elfcore.h for more information.
187 #define XEN_ELFNOTE_CRASH_REGS 0x1000002
191 * xen dump-core none note.
192 * xm dump-core code will create one XEN_ELFNOTE_DUMPCORE_NONE
193 * in its dump file to indicate that the file is xen dump-core
194 * file. This note doesn't have any other information.
195 * See tools/libxc/xc_core.h for more information.
197 #define XEN_ELFNOTE_DUMPCORE_NONE 0x2000000
200 * xen dump-core header note.
201 * xm dump-core code will create one XEN_ELFNOTE_DUMPCORE_HEADER
203 * See tools/libxc/xc_core.h for more information.
205 #define XEN_ELFNOTE_DUMPCORE_HEADER 0x2000001
208 * xen dump-core xen version note.
209 * xm dump-core code will create one XEN_ELFNOTE_DUMPCORE_XEN_VERSION
210 * in its dump file. It contains the xen version obtained via the
212 * See tools/libxc/xc_core.h for more information.
214 #define XEN_ELFNOTE_DUMPCORE_XEN_VERSION 0x2000002
217 * xen dump-core format version note.
218 * xm dump-core code will create one XEN_ELFNOTE_DUMPCORE_FORMAT_VERSION
219 * in its dump file. It contains a format version identifier.
220 * See tools/libxc/xc_core.h for more information.
222 #define XEN_ELFNOTE_DUMPCORE_FORMAT_VERSION 0x2000003
224 #endif /* __XEN_PUBLIC_ELFNOTE_H__ */
232 * indent-tabs-mode: nil