win-pvdrivers

annotate common/include/public/elfnote.h @ 12:5712dede5a1b

add in xen public includes, so the extra step of copying them over is not needed
author Andy Grover <andy@groveronline.com>
date Wed Nov 28 14:44:10 2007 -0800 (2007-11-28)
parents
children
rev   line source
andy@12 1 /******************************************************************************
andy@12 2 * elfnote.h
andy@12 3 *
andy@12 4 * Definitions used for the Xen ELF notes.
andy@12 5 *
andy@12 6 * Permission is hereby granted, free of charge, to any person obtaining a copy
andy@12 7 * of this software and associated documentation files (the "Software"), to
andy@12 8 * deal in the Software without restriction, including without limitation the
andy@12 9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
andy@12 10 * sell copies of the Software, and to permit persons to whom the Software is
andy@12 11 * furnished to do so, subject to the following conditions:
andy@12 12 *
andy@12 13 * The above copyright notice and this permission notice shall be included in
andy@12 14 * all copies or substantial portions of the Software.
andy@12 15 *
andy@12 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
andy@12 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
andy@12 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
andy@12 19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
andy@12 20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
andy@12 21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
andy@12 22 * DEALINGS IN THE SOFTWARE.
andy@12 23 *
andy@12 24 * Copyright (c) 2006, Ian Campbell, XenSource Ltd.
andy@12 25 */
andy@12 26
andy@12 27 #ifndef __XEN_PUBLIC_ELFNOTE_H__
andy@12 28 #define __XEN_PUBLIC_ELFNOTE_H__
andy@12 29
andy@12 30 /*
andy@12 31 * The notes should live in a PT_NOTE segment and have "Xen" in the
andy@12 32 * name field.
andy@12 33 *
andy@12 34 * Numeric types are either 4 or 8 bytes depending on the content of
andy@12 35 * the desc field.
andy@12 36 *
andy@12 37 * LEGACY indicated the fields in the legacy __xen_guest string which
andy@12 38 * this a note type replaces.
andy@12 39 */
andy@12 40
andy@12 41 /*
andy@12 42 * NAME=VALUE pair (string).
andy@12 43 */
andy@12 44 #define XEN_ELFNOTE_INFO 0
andy@12 45
andy@12 46 /*
andy@12 47 * The virtual address of the entry point (numeric).
andy@12 48 *
andy@12 49 * LEGACY: VIRT_ENTRY
andy@12 50 */
andy@12 51 #define XEN_ELFNOTE_ENTRY 1
andy@12 52
andy@12 53 /* The virtual address of the hypercall transfer page (numeric).
andy@12 54 *
andy@12 55 * LEGACY: HYPERCALL_PAGE. (n.b. legacy value is a physical page
andy@12 56 * number not a virtual address)
andy@12 57 */
andy@12 58 #define XEN_ELFNOTE_HYPERCALL_PAGE 2
andy@12 59
andy@12 60 /* The virtual address where the kernel image should be mapped (numeric).
andy@12 61 *
andy@12 62 * Defaults to 0.
andy@12 63 *
andy@12 64 * LEGACY: VIRT_BASE
andy@12 65 */
andy@12 66 #define XEN_ELFNOTE_VIRT_BASE 3
andy@12 67
andy@12 68 /*
andy@12 69 * The offset of the ELF paddr field from the acutal required
andy@12 70 * psuedo-physical address (numeric).
andy@12 71 *
andy@12 72 * This is used to maintain backwards compatibility with older kernels
andy@12 73 * which wrote __PAGE_OFFSET into that field. This field defaults to 0
andy@12 74 * if not present.
andy@12 75 *
andy@12 76 * LEGACY: ELF_PADDR_OFFSET. (n.b. legacy default is VIRT_BASE)
andy@12 77 */
andy@12 78 #define XEN_ELFNOTE_PADDR_OFFSET 4
andy@12 79
andy@12 80 /*
andy@12 81 * The version of Xen that we work with (string).
andy@12 82 *
andy@12 83 * LEGACY: XEN_VER
andy@12 84 */
andy@12 85 #define XEN_ELFNOTE_XEN_VERSION 5
andy@12 86
andy@12 87 /*
andy@12 88 * The name of the guest operating system (string).
andy@12 89 *
andy@12 90 * LEGACY: GUEST_OS
andy@12 91 */
andy@12 92 #define XEN_ELFNOTE_GUEST_OS 6
andy@12 93
andy@12 94 /*
andy@12 95 * The version of the guest operating system (string).
andy@12 96 *
andy@12 97 * LEGACY: GUEST_VER
andy@12 98 */
andy@12 99 #define XEN_ELFNOTE_GUEST_VERSION 7
andy@12 100
andy@12 101 /*
andy@12 102 * The loader type (string).
andy@12 103 *
andy@12 104 * LEGACY: LOADER
andy@12 105 */
andy@12 106 #define XEN_ELFNOTE_LOADER 8
andy@12 107
andy@12 108 /*
andy@12 109 * The kernel supports PAE (x86/32 only, string = "yes", "no" or
andy@12 110 * "bimodal").
andy@12 111 *
andy@12 112 * For compatibility with Xen 3.0.3 and earlier the "bimodal" setting
andy@12 113 * may be given as "yes,bimodal" which will cause older Xen to treat
andy@12 114 * this kernel as PAE.
andy@12 115 *
andy@12 116 * LEGACY: PAE (n.b. The legacy interface included a provision to
andy@12 117 * indicate 'extended-cr3' support allowing L3 page tables to be
andy@12 118 * placed above 4G. It is assumed that any kernel new enough to use
andy@12 119 * these ELF notes will include this and therefore "yes" here is
andy@12 120 * equivalent to "yes[entended-cr3]" in the __xen_guest interface.
andy@12 121 */
andy@12 122 #define XEN_ELFNOTE_PAE_MODE 9
andy@12 123
andy@12 124 /*
andy@12 125 * The features supported/required by this kernel (string).
andy@12 126 *
andy@12 127 * The string must consist of a list of feature names (as given in
andy@12 128 * features.h, without the "XENFEAT_" prefix) separated by '|'
andy@12 129 * characters. If a feature is required for the kernel to function
andy@12 130 * then the feature name must be preceded by a '!' character.
andy@12 131 *
andy@12 132 * LEGACY: FEATURES
andy@12 133 */
andy@12 134 #define XEN_ELFNOTE_FEATURES 10
andy@12 135
andy@12 136 /*
andy@12 137 * The kernel requires the symbol table to be loaded (string = "yes" or "no")
andy@12 138 * LEGACY: BSD_SYMTAB (n.b. The legacy treated the presence or absence
andy@12 139 * of this string as a boolean flag rather than requiring "yes" or
andy@12 140 * "no".
andy@12 141 */
andy@12 142 #define XEN_ELFNOTE_BSD_SYMTAB 11
andy@12 143
andy@12 144 /*
andy@12 145 * The lowest address the hypervisor hole can begin at (numeric).
andy@12 146 *
andy@12 147 * This must not be set higher than HYPERVISOR_VIRT_START. Its presence
andy@12 148 * also indicates to the hypervisor that the kernel can deal with the
andy@12 149 * hole starting at a higher address.
andy@12 150 */
andy@12 151 #define XEN_ELFNOTE_HV_START_LOW 12
andy@12 152
andy@12 153 /*
andy@12 154 * List of maddr_t-sized mask/value pairs describing how to recognize
andy@12 155 * (non-present) L1 page table entries carrying valid MFNs (numeric).
andy@12 156 */
andy@12 157 #define XEN_ELFNOTE_L1_MFN_VALID 13
andy@12 158
andy@12 159 /*
andy@12 160 * Whether or not the guest supports cooperative suspend cancellation.
andy@12 161 */
andy@12 162 #define XEN_ELFNOTE_SUSPEND_CANCEL 14
andy@12 163
andy@12 164 /*
andy@12 165 * The number of the highest elfnote defined.
andy@12 166 */
andy@12 167 #define XEN_ELFNOTE_MAX XEN_ELFNOTE_SUSPEND_CANCEL
andy@12 168
andy@12 169 /*
andy@12 170 * System information exported through crash notes.
andy@12 171 *
andy@12 172 * The kexec / kdump code will create one XEN_ELFNOTE_CRASH_INFO
andy@12 173 * note in case of a system crash. This note will contain various
andy@12 174 * information about the system, see xen/include/xen/elfcore.h.
andy@12 175 */
andy@12 176 #define XEN_ELFNOTE_CRASH_INFO 0x1000001
andy@12 177
andy@12 178 /*
andy@12 179 * System registers exported through crash notes.
andy@12 180 *
andy@12 181 * The kexec / kdump code will create one XEN_ELFNOTE_CRASH_REGS
andy@12 182 * note per cpu in case of a system crash. This note is architecture
andy@12 183 * specific and will contain registers not saved in the "CORE" note.
andy@12 184 * See xen/include/xen/elfcore.h for more information.
andy@12 185 */
andy@12 186 #define XEN_ELFNOTE_CRASH_REGS 0x1000002
andy@12 187
andy@12 188
andy@12 189 /*
andy@12 190 * xen dump-core none note.
andy@12 191 * xm dump-core code will create one XEN_ELFNOTE_DUMPCORE_NONE
andy@12 192 * in its dump file to indicate that the file is xen dump-core
andy@12 193 * file. This note doesn't have any other information.
andy@12 194 * See tools/libxc/xc_core.h for more information.
andy@12 195 */
andy@12 196 #define XEN_ELFNOTE_DUMPCORE_NONE 0x2000000
andy@12 197
andy@12 198 /*
andy@12 199 * xen dump-core header note.
andy@12 200 * xm dump-core code will create one XEN_ELFNOTE_DUMPCORE_HEADER
andy@12 201 * in its dump file.
andy@12 202 * See tools/libxc/xc_core.h for more information.
andy@12 203 */
andy@12 204 #define XEN_ELFNOTE_DUMPCORE_HEADER 0x2000001
andy@12 205
andy@12 206 /*
andy@12 207 * xen dump-core xen version note.
andy@12 208 * xm dump-core code will create one XEN_ELFNOTE_DUMPCORE_XEN_VERSION
andy@12 209 * in its dump file. It contains the xen version obtained via the
andy@12 210 * XENVER hypercall.
andy@12 211 * See tools/libxc/xc_core.h for more information.
andy@12 212 */
andy@12 213 #define XEN_ELFNOTE_DUMPCORE_XEN_VERSION 0x2000002
andy@12 214
andy@12 215 /*
andy@12 216 * xen dump-core format version note.
andy@12 217 * xm dump-core code will create one XEN_ELFNOTE_DUMPCORE_FORMAT_VERSION
andy@12 218 * in its dump file. It contains a format version identifier.
andy@12 219 * See tools/libxc/xc_core.h for more information.
andy@12 220 */
andy@12 221 #define XEN_ELFNOTE_DUMPCORE_FORMAT_VERSION 0x2000003
andy@12 222
andy@12 223 #endif /* __XEN_PUBLIC_ELFNOTE_H__ */
andy@12 224
andy@12 225 /*
andy@12 226 * Local variables:
andy@12 227 * mode: C
andy@12 228 * c-set-style: "BSD"
andy@12 229 * c-basic-offset: 4
andy@12 230 * tab-width: 4
andy@12 231 * indent-tabs-mode: nil
andy@12 232 * End:
andy@12 233 */