win-pvdrivers

diff 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
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/common/include/public/elfnote.h	Wed Nov 28 14:44:10 2007 -0800
     1.3 @@ -0,0 +1,233 @@
     1.4 +/******************************************************************************
     1.5 + * elfnote.h
     1.6 + *
     1.7 + * Definitions used for the Xen ELF notes.
     1.8 + *
     1.9 + * Permission is hereby granted, free of charge, to any person obtaining a copy
    1.10 + * of this software and associated documentation files (the "Software"), to
    1.11 + * deal in the Software without restriction, including without limitation the
    1.12 + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
    1.13 + * sell copies of the Software, and to permit persons to whom the Software is
    1.14 + * furnished to do so, subject to the following conditions:
    1.15 + *
    1.16 + * The above copyright notice and this permission notice shall be included in
    1.17 + * all copies or substantial portions of the Software.
    1.18 + *
    1.19 + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    1.20 + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    1.21 + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    1.22 + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    1.23 + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    1.24 + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    1.25 + * DEALINGS IN THE SOFTWARE.
    1.26 + *
    1.27 + * Copyright (c) 2006, Ian Campbell, XenSource Ltd.
    1.28 + */
    1.29 +
    1.30 +#ifndef __XEN_PUBLIC_ELFNOTE_H__
    1.31 +#define __XEN_PUBLIC_ELFNOTE_H__
    1.32 +
    1.33 +/*
    1.34 + * The notes should live in a PT_NOTE segment and have "Xen" in the
    1.35 + * name field.
    1.36 + *
    1.37 + * Numeric types are either 4 or 8 bytes depending on the content of
    1.38 + * the desc field.
    1.39 + *
    1.40 + * LEGACY indicated the fields in the legacy __xen_guest string which
    1.41 + * this a note type replaces.
    1.42 + */
    1.43 +
    1.44 +/*
    1.45 + * NAME=VALUE pair (string).
    1.46 + */
    1.47 +#define XEN_ELFNOTE_INFO           0
    1.48 +
    1.49 +/*
    1.50 + * The virtual address of the entry point (numeric).
    1.51 + *
    1.52 + * LEGACY: VIRT_ENTRY
    1.53 + */
    1.54 +#define XEN_ELFNOTE_ENTRY          1
    1.55 +
    1.56 +/* The virtual address of the hypercall transfer page (numeric).
    1.57 + *
    1.58 + * LEGACY: HYPERCALL_PAGE. (n.b. legacy value is a physical page
    1.59 + * number not a virtual address)
    1.60 + */
    1.61 +#define XEN_ELFNOTE_HYPERCALL_PAGE 2
    1.62 +
    1.63 +/* The virtual address where the kernel image should be mapped (numeric).
    1.64 + *
    1.65 + * Defaults to 0.
    1.66 + *
    1.67 + * LEGACY: VIRT_BASE
    1.68 + */
    1.69 +#define XEN_ELFNOTE_VIRT_BASE      3
    1.70 +
    1.71 +/*
    1.72 + * The offset of the ELF paddr field from the acutal required
    1.73 + * psuedo-physical address (numeric).
    1.74 + *
    1.75 + * This is used to maintain backwards compatibility with older kernels
    1.76 + * which wrote __PAGE_OFFSET into that field. This field defaults to 0
    1.77 + * if not present.
    1.78 + *
    1.79 + * LEGACY: ELF_PADDR_OFFSET. (n.b. legacy default is VIRT_BASE)
    1.80 + */
    1.81 +#define XEN_ELFNOTE_PADDR_OFFSET   4
    1.82 +
    1.83 +/*
    1.84 + * The version of Xen that we work with (string).
    1.85 + *
    1.86 + * LEGACY: XEN_VER
    1.87 + */
    1.88 +#define XEN_ELFNOTE_XEN_VERSION    5
    1.89 +
    1.90 +/*
    1.91 + * The name of the guest operating system (string).
    1.92 + *
    1.93 + * LEGACY: GUEST_OS
    1.94 + */
    1.95 +#define XEN_ELFNOTE_GUEST_OS       6
    1.96 +
    1.97 +/*
    1.98 + * The version of the guest operating system (string).
    1.99 + *
   1.100 + * LEGACY: GUEST_VER
   1.101 + */
   1.102 +#define XEN_ELFNOTE_GUEST_VERSION  7
   1.103 +
   1.104 +/*
   1.105 + * The loader type (string).
   1.106 + *
   1.107 + * LEGACY: LOADER
   1.108 + */
   1.109 +#define XEN_ELFNOTE_LOADER         8
   1.110 +
   1.111 +/*
   1.112 + * The kernel supports PAE (x86/32 only, string = "yes", "no" or
   1.113 + * "bimodal").
   1.114 + *
   1.115 + * For compatibility with Xen 3.0.3 and earlier the "bimodal" setting
   1.116 + * may be given as "yes,bimodal" which will cause older Xen to treat
   1.117 + * this kernel as PAE.
   1.118 + *
   1.119 + * LEGACY: PAE (n.b. The legacy interface included a provision to
   1.120 + * indicate 'extended-cr3' support allowing L3 page tables to be
   1.121 + * placed above 4G. It is assumed that any kernel new enough to use
   1.122 + * these ELF notes will include this and therefore "yes" here is
   1.123 + * equivalent to "yes[entended-cr3]" in the __xen_guest interface.
   1.124 + */
   1.125 +#define XEN_ELFNOTE_PAE_MODE       9
   1.126 +
   1.127 +/*
   1.128 + * The features supported/required by this kernel (string).
   1.129 + *
   1.130 + * The string must consist of a list of feature names (as given in
   1.131 + * features.h, without the "XENFEAT_" prefix) separated by '|'
   1.132 + * characters. If a feature is required for the kernel to function
   1.133 + * then the feature name must be preceded by a '!' character.
   1.134 + *
   1.135 + * LEGACY: FEATURES
   1.136 + */
   1.137 +#define XEN_ELFNOTE_FEATURES      10
   1.138 +
   1.139 +/*
   1.140 + * The kernel requires the symbol table to be loaded (string = "yes" or "no")
   1.141 + * LEGACY: BSD_SYMTAB (n.b. The legacy treated the presence or absence
   1.142 + * of this string as a boolean flag rather than requiring "yes" or
   1.143 + * "no".
   1.144 + */
   1.145 +#define XEN_ELFNOTE_BSD_SYMTAB    11
   1.146 +
   1.147 +/*
   1.148 + * The lowest address the hypervisor hole can begin at (numeric).
   1.149 + *
   1.150 + * This must not be set higher than HYPERVISOR_VIRT_START. Its presence
   1.151 + * also indicates to the hypervisor that the kernel can deal with the
   1.152 + * hole starting at a higher address.
   1.153 + */
   1.154 +#define XEN_ELFNOTE_HV_START_LOW  12
   1.155 +
   1.156 +/*
   1.157 + * List of maddr_t-sized mask/value pairs describing how to recognize
   1.158 + * (non-present) L1 page table entries carrying valid MFNs (numeric).
   1.159 + */
   1.160 +#define XEN_ELFNOTE_L1_MFN_VALID  13
   1.161 +
   1.162 +/*
   1.163 + * Whether or not the guest supports cooperative suspend cancellation.
   1.164 + */
   1.165 +#define XEN_ELFNOTE_SUSPEND_CANCEL 14
   1.166 +
   1.167 +/*
   1.168 + * The number of the highest elfnote defined.
   1.169 + */
   1.170 +#define XEN_ELFNOTE_MAX XEN_ELFNOTE_SUSPEND_CANCEL
   1.171 +
   1.172 +/*
   1.173 + * System information exported through crash notes.
   1.174 + *
   1.175 + * The kexec / kdump code will create one XEN_ELFNOTE_CRASH_INFO 
   1.176 + * note in case of a system crash. This note will contain various
   1.177 + * information about the system, see xen/include/xen/elfcore.h.
   1.178 + */
   1.179 +#define XEN_ELFNOTE_CRASH_INFO 0x1000001
   1.180 +
   1.181 +/*
   1.182 + * System registers exported through crash notes.
   1.183 + *
   1.184 + * The kexec / kdump code will create one XEN_ELFNOTE_CRASH_REGS 
   1.185 + * note per cpu in case of a system crash. This note is architecture
   1.186 + * specific and will contain registers not saved in the "CORE" note.
   1.187 + * See xen/include/xen/elfcore.h for more information.
   1.188 + */
   1.189 +#define XEN_ELFNOTE_CRASH_REGS 0x1000002
   1.190 +
   1.191 +
   1.192 +/*
   1.193 + * xen dump-core none note.
   1.194 + * xm dump-core code will create one XEN_ELFNOTE_DUMPCORE_NONE
   1.195 + * in its dump file to indicate that the file is xen dump-core
   1.196 + * file. This note doesn't have any other information.
   1.197 + * See tools/libxc/xc_core.h for more information.
   1.198 + */
   1.199 +#define XEN_ELFNOTE_DUMPCORE_NONE               0x2000000
   1.200 +
   1.201 +/*
   1.202 + * xen dump-core header note.
   1.203 + * xm dump-core code will create one XEN_ELFNOTE_DUMPCORE_HEADER
   1.204 + * in its dump file.
   1.205 + * See tools/libxc/xc_core.h for more information.
   1.206 + */
   1.207 +#define XEN_ELFNOTE_DUMPCORE_HEADER             0x2000001
   1.208 +
   1.209 +/*
   1.210 + * xen dump-core xen version note.
   1.211 + * xm dump-core code will create one XEN_ELFNOTE_DUMPCORE_XEN_VERSION
   1.212 + * in its dump file. It contains the xen version obtained via the
   1.213 + * XENVER hypercall.
   1.214 + * See tools/libxc/xc_core.h for more information.
   1.215 + */
   1.216 +#define XEN_ELFNOTE_DUMPCORE_XEN_VERSION        0x2000002
   1.217 +
   1.218 +/*
   1.219 + * xen dump-core format version note.
   1.220 + * xm dump-core code will create one XEN_ELFNOTE_DUMPCORE_FORMAT_VERSION
   1.221 + * in its dump file. It contains a format version identifier.
   1.222 + * See tools/libxc/xc_core.h for more information.
   1.223 + */
   1.224 +#define XEN_ELFNOTE_DUMPCORE_FORMAT_VERSION     0x2000003
   1.225 +
   1.226 +#endif /* __XEN_PUBLIC_ELFNOTE_H__ */
   1.227 +
   1.228 +/*
   1.229 + * Local variables:
   1.230 + * mode: C
   1.231 + * c-set-style: "BSD"
   1.232 + * c-basic-offset: 4
   1.233 + * tab-width: 4
   1.234 + * indent-tabs-mode: nil
   1.235 + * End:
   1.236 + */