Home | History | Annotate | Line # | Download | only in public
      1  1.1  cherry /******************************************************************************
      2  1.1  cherry  * version.h
      3  1.1  cherry  *
      4  1.1  cherry  * Xen version, type, and compile information.
      5  1.1  cherry  *
      6  1.1  cherry  * Permission is hereby granted, free of charge, to any person obtaining a copy
      7  1.1  cherry  * of this software and associated documentation files (the "Software"), to
      8  1.1  cherry  * deal in the Software without restriction, including without limitation the
      9  1.1  cherry  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
     10  1.1  cherry  * sell copies of the Software, and to permit persons to whom the Software is
     11  1.1  cherry  * furnished to do so, subject to the following conditions:
     12  1.1  cherry  *
     13  1.1  cherry  * The above copyright notice and this permission notice shall be included in
     14  1.1  cherry  * all copies or substantial portions of the Software.
     15  1.1  cherry  *
     16  1.1  cherry  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     17  1.1  cherry  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     18  1.1  cherry  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     19  1.1  cherry  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     20  1.1  cherry  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
     21  1.1  cherry  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
     22  1.1  cherry  * DEALINGS IN THE SOFTWARE.
     23  1.1  cherry  *
     24  1.1  cherry  * Copyright (c) 2005, Nguyen Anh Quynh <aquynh (at) gmail.com>
     25  1.1  cherry  * Copyright (c) 2005, Keir Fraser <keir (at) xensource.com>
     26  1.1  cherry  */
     27  1.1  cherry 
     28  1.1  cherry #ifndef __XEN_PUBLIC_VERSION_H__
     29  1.1  cherry #define __XEN_PUBLIC_VERSION_H__
     30  1.1  cherry 
     31  1.1  cherry #include "xen.h"
     32  1.1  cherry 
     33  1.1  cherry /* NB. All ops return zero on success, except XENVER_{version,pagesize}
     34  1.1  cherry  * XENVER_{version,pagesize,build_id} */
     35  1.1  cherry 
     36  1.1  cherry /* arg == NULL; returns major:minor (16:16). */
     37  1.1  cherry #define XENVER_version      0
     38  1.1  cherry 
     39  1.1  cherry /* arg == xen_extraversion_t. */
     40  1.1  cherry #define XENVER_extraversion 1
     41  1.1  cherry typedef char xen_extraversion_t[16];
     42  1.1  cherry #define XEN_EXTRAVERSION_LEN (sizeof(xen_extraversion_t))
     43  1.1  cherry 
     44  1.1  cherry /* arg == xen_compile_info_t. */
     45  1.1  cherry #define XENVER_compile_info 2
     46  1.1  cherry struct xen_compile_info {
     47  1.1  cherry     char compiler[64];
     48  1.1  cherry     char compile_by[16];
     49  1.1  cherry     char compile_domain[32];
     50  1.1  cherry     char compile_date[32];
     51  1.1  cherry };
     52  1.1  cherry typedef struct xen_compile_info xen_compile_info_t;
     53  1.1  cherry 
     54  1.1  cherry #define XENVER_capabilities 3
     55  1.1  cherry typedef char xen_capabilities_info_t[1024];
     56  1.1  cherry #define XEN_CAPABILITIES_INFO_LEN (sizeof(xen_capabilities_info_t))
     57  1.1  cherry 
     58  1.1  cherry #define XENVER_changeset 4
     59  1.1  cherry typedef char xen_changeset_info_t[64];
     60  1.1  cherry #define XEN_CHANGESET_INFO_LEN (sizeof(xen_changeset_info_t))
     61  1.1  cherry 
     62  1.1  cherry #define XENVER_platform_parameters 5
     63  1.1  cherry struct xen_platform_parameters {
     64  1.1  cherry     xen_ulong_t virt_start;
     65  1.1  cherry };
     66  1.1  cherry typedef struct xen_platform_parameters xen_platform_parameters_t;
     67  1.1  cherry 
     68  1.1  cherry #define XENVER_get_features 6
     69  1.1  cherry struct xen_feature_info {
     70  1.1  cherry     unsigned int submap_idx;    /* IN: which 32-bit submap to return */
     71  1.1  cherry     uint32_t     submap;        /* OUT: 32-bit submap */
     72  1.1  cherry };
     73  1.1  cherry typedef struct xen_feature_info xen_feature_info_t;
     74  1.1  cherry 
     75  1.1  cherry /* Declares the features reported by XENVER_get_features. */
     76  1.1  cherry #include "features.h"
     77  1.1  cherry 
     78  1.1  cherry /* arg == NULL; returns host memory page size. */
     79  1.1  cherry #define XENVER_pagesize 7
     80  1.1  cherry 
     81  1.1  cherry /* arg == xen_domain_handle_t.
     82  1.1  cherry  *
     83  1.1  cherry  * The toolstack fills it out for guest consumption. It is intended to hold
     84  1.1  cherry  * the UUID of the guest.
     85  1.1  cherry  */
     86  1.1  cherry #define XENVER_guest_handle 8
     87  1.1  cherry 
     88  1.1  cherry #define XENVER_commandline 9
     89  1.1  cherry typedef char xen_commandline_t[1024];
     90  1.1  cherry 
     91  1.1  cherry /*
     92  1.1  cherry  * Return value is the number of bytes written, or XEN_Exx on error.
     93  1.1  cherry  * Calling with empty parameter returns the size of build_id.
     94  1.1  cherry  */
     95  1.1  cherry #define XENVER_build_id 10
     96  1.1  cherry struct xen_build_id {
     97  1.1  cherry         uint32_t        len; /* IN: size of buf[]. */
     98  1.1  cherry #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
     99  1.1  cherry         unsigned char   buf[];
    100  1.1  cherry #elif defined(__GNUC__)
    101  1.1  cherry         unsigned char   buf[1]; /* OUT: Variable length buffer with build_id. */
    102  1.1  cherry #endif
    103  1.1  cherry };
    104  1.1  cherry typedef struct xen_build_id xen_build_id_t;
    105  1.1  cherry 
    106  1.1  cherry #endif /* __XEN_PUBLIC_VERSION_H__ */
    107  1.1  cherry 
    108  1.1  cherry /*
    109  1.1  cherry  * Local variables:
    110  1.1  cherry  * mode: C
    111  1.1  cherry  * c-file-style: "BSD"
    112  1.1  cherry  * c-basic-offset: 4
    113  1.1  cherry  * tab-width: 4
    114  1.1  cherry  * indent-tabs-mode: nil
    115  1.1  cherry  * End:
    116  1.1  cherry  */
    117