|
11 | 11 | #define __XEN_PUBLIC_ELFNOTE_H__
|
12 | 12 |
|
13 | 13 | /*
|
14 |
| - * The notes should live in a SHT_NOTE segment and have "Xen" in the |
| 14 | + * `incontents 200 elfnotes ELF notes |
| 15 | + * |
| 16 | + * The notes should live in a PT_NOTE segment and have "Xen" in the |
15 | 17 | * name field.
|
16 | 18 | *
|
17 | 19 | * Numeric types are either 4 or 8 bytes depending on the content of
|
|
22 | 24 | *
|
23 | 25 | * String values (for non-legacy) are NULL terminated ASCII, also known
|
24 | 26 | * as ASCIZ type.
|
| 27 | + * |
| 28 | + * Xen only uses ELF Notes contained in x86 binaries. |
25 | 29 | */
|
26 | 30 |
|
27 | 31 | /*
|
|
52 | 56 | #define XEN_ELFNOTE_VIRT_BASE 3
|
53 | 57 |
|
54 | 58 | /*
|
55 |
| - * The offset of the ELF paddr field from the acutal required |
| 59 | + * The offset of the ELF paddr field from the actual required |
56 | 60 | * pseudo-physical address (numeric).
|
57 | 61 | *
|
58 | 62 | * This is used to maintain backwards compatibility with older kernels
|
|
92 | 96 | #define XEN_ELFNOTE_LOADER 8
|
93 | 97 |
|
94 | 98 | /*
|
95 |
| - * The kernel supports PAE (x86/32 only, string = "yes" or "no"). |
| 99 | + * The kernel supports PAE (x86/32 only, string = "yes", "no" or |
| 100 | + * "bimodal"). |
| 101 | + * |
| 102 | + * For compatibility with Xen 3.0.3 and earlier the "bimodal" setting |
| 103 | + * may be given as "yes,bimodal" which will cause older Xen to treat |
| 104 | + * this kernel as PAE. |
96 | 105 | *
|
97 | 106 | * LEGACY: PAE (n.b. The legacy interface included a provision to
|
98 | 107 | * indicate 'extended-cr3' support allowing L3 page tables to be
|
|
149 | 158 | * The (non-default) location the initial phys-to-machine map should be
|
150 | 159 | * placed at by the hypervisor (Dom0) or the tools (DomU).
|
151 | 160 | * The kernel must be prepared for this mapping to be established using
|
152 |
| - * large pages, despite such otherwise not being available to guests. |
| 161 | + * large pages, despite such otherwise not being available to guests. Note |
| 162 | + * that these large pages may be misaligned in PFN space (they'll obviously |
| 163 | + * be aligned in MFN and virtual address spaces). |
153 | 164 | * The kernel must also be able to handle the page table pages used for
|
154 | 165 | * this mapping not being accessible through the initial mapping.
|
155 | 166 | * (Only x86-64 supports this at present.)
|
|
185 | 196 | */
|
186 | 197 | #define XEN_ELFNOTE_PHYS32_ENTRY 18
|
187 | 198 |
|
| 199 | +/* |
| 200 | + * Physical loading constraints for PVH kernels |
| 201 | + * |
| 202 | + * The presence of this note indicates the kernel supports relocating itself. |
| 203 | + * |
| 204 | + * The note may include up to three 32bit values to place constraints on the |
| 205 | + * guest physical loading addresses and alignment for a PVH kernel. Values |
| 206 | + * are read in the following order: |
| 207 | + * - a required start alignment (default 0x200000) |
| 208 | + * - a minimum address for the start of the image (default 0; see below) |
| 209 | + * - a maximum address for the last byte of the image (default 0xffffffff) |
| 210 | + * |
| 211 | + * When this note specifies an alignment value, it is used. Otherwise the |
| 212 | + * maximum p_align value from loadable ELF Program Headers is used, if it is |
| 213 | + * greater than or equal to 4k (0x1000). Otherwise, the default is used. |
| 214 | + */ |
| 215 | +#define XEN_ELFNOTE_PHYS32_RELOC 19 |
| 216 | + |
188 | 217 | /*
|
189 | 218 | * The number of the highest elfnote defined.
|
190 | 219 | */
|
191 |
| -#define XEN_ELFNOTE_MAX XEN_ELFNOTE_PHYS32_ENTRY |
| 220 | +#define XEN_ELFNOTE_MAX XEN_ELFNOTE_PHYS32_RELOC |
| 221 | + |
| 222 | +/* |
| 223 | + * System information exported through crash notes. |
| 224 | + * |
| 225 | + * The kexec / kdump code will create one XEN_ELFNOTE_CRASH_INFO |
| 226 | + * note in case of a system crash. This note will contain various |
| 227 | + * information about the system, see xen/include/xen/elfcore.h. |
| 228 | + */ |
| 229 | +#define XEN_ELFNOTE_CRASH_INFO 0x1000001 |
| 230 | + |
| 231 | +/* |
| 232 | + * System registers exported through crash notes. |
| 233 | + * |
| 234 | + * The kexec / kdump code will create one XEN_ELFNOTE_CRASH_REGS |
| 235 | + * note per cpu in case of a system crash. This note is architecture |
| 236 | + * specific and will contain registers not saved in the "CORE" note. |
| 237 | + * See xen/include/xen/elfcore.h for more information. |
| 238 | + */ |
| 239 | +#define XEN_ELFNOTE_CRASH_REGS 0x1000002 |
| 240 | + |
| 241 | + |
| 242 | +/* |
| 243 | + * xen dump-core none note. |
| 244 | + * xm dump-core code will create one XEN_ELFNOTE_DUMPCORE_NONE |
| 245 | + * in its dump file to indicate that the file is xen dump-core |
| 246 | + * file. This note doesn't have any other information. |
| 247 | + * See tools/libxc/xc_core.h for more information. |
| 248 | + */ |
| 249 | +#define XEN_ELFNOTE_DUMPCORE_NONE 0x2000000 |
| 250 | + |
| 251 | +/* |
| 252 | + * xen dump-core header note. |
| 253 | + * xm dump-core code will create one XEN_ELFNOTE_DUMPCORE_HEADER |
| 254 | + * in its dump file. |
| 255 | + * See tools/libxc/xc_core.h for more information. |
| 256 | + */ |
| 257 | +#define XEN_ELFNOTE_DUMPCORE_HEADER 0x2000001 |
| 258 | + |
| 259 | +/* |
| 260 | + * xen dump-core xen version note. |
| 261 | + * xm dump-core code will create one XEN_ELFNOTE_DUMPCORE_XEN_VERSION |
| 262 | + * in its dump file. It contains the xen version obtained via the |
| 263 | + * XENVER hypercall. |
| 264 | + * See tools/libxc/xc_core.h for more information. |
| 265 | + */ |
| 266 | +#define XEN_ELFNOTE_DUMPCORE_XEN_VERSION 0x2000002 |
| 267 | + |
| 268 | +/* |
| 269 | + * xen dump-core format version note. |
| 270 | + * xm dump-core code will create one XEN_ELFNOTE_DUMPCORE_FORMAT_VERSION |
| 271 | + * in its dump file. It contains a format version identifier. |
| 272 | + * See tools/libxc/xc_core.h for more information. |
| 273 | + */ |
| 274 | +#define XEN_ELFNOTE_DUMPCORE_FORMAT_VERSION 0x2000003 |
192 | 275 |
|
193 | 276 | #endif /* __XEN_PUBLIC_ELFNOTE_H__ */
|
0 commit comments