[xen] Update to current Xen headers
[ipxe.git] / src / include / xen / version.h
1 /* SPDX-License-Identifier: MIT */
2 /******************************************************************************
3 * version.h
4 *
5 * Xen version, type, and compile information.
6 *
7 * Copyright (c) 2005, Nguyen Anh Quynh <aquynh@gmail.com>
8 * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
9 */
10
11 #ifndef __XEN_PUBLIC_VERSION_H__
12 #define __XEN_PUBLIC_VERSION_H__
13
14 FILE_LICENCE ( MIT );
15
16 #include "xen.h"
17
18 /* NB. All ops return zero on success, except XENVER_{version,pagesize}
19 * XENVER_{version,pagesize,build_id} */
20
21 /* arg == NULL; returns major:minor (16:16). */
22 #define XENVER_version 0
23
24 /* arg == xen_extraversion_t. */
25 #define XENVER_extraversion 1
26 typedef char xen_extraversion_t[16];
27 #define XEN_EXTRAVERSION_LEN (sizeof(xen_extraversion_t))
28
29 /* arg == xen_compile_info_t. */
30 #define XENVER_compile_info 2
31 struct xen_compile_info {
32 char compiler[64];
33 char compile_by[16];
34 char compile_domain[32];
35 char compile_date[32];
36 };
37 typedef struct xen_compile_info xen_compile_info_t;
38
39 #define XENVER_capabilities 3
40 typedef char xen_capabilities_info_t[1024];
41 #define XEN_CAPABILITIES_INFO_LEN (sizeof(xen_capabilities_info_t))
42
43 #define XENVER_changeset 4
44 typedef char xen_changeset_info_t[64];
45 #define XEN_CHANGESET_INFO_LEN (sizeof(xen_changeset_info_t))
46
47 #define XENVER_platform_parameters 5
48 struct xen_platform_parameters {
49 xen_ulong_t virt_start;
50 };
51 typedef struct xen_platform_parameters xen_platform_parameters_t;
52
53 #define XENVER_get_features 6
54 struct xen_feature_info {
55 uint32_t submap_idx; /* IN: which 32-bit submap to return */
56 uint32_t submap; /* OUT: 32-bit submap */
57 };
58 typedef struct xen_feature_info xen_feature_info_t;
59
60 /* Declares the features reported by XENVER_get_features. */
61 #include "features.h"
62
63 /* arg == NULL; returns host memory page size. */
64 #define XENVER_pagesize 7
65
66 /* arg == xen_domain_handle_t.
67 *
68 * The toolstack fills it out for guest consumption. It is intended to hold
69 * the UUID of the guest.
70 */
71 #define XENVER_guest_handle 8
72
73 #define XENVER_commandline 9
74 typedef char xen_commandline_t[1024];
75
76 /*
77 * Return value is the number of bytes written, or XEN_Exx on error.
78 * Calling with empty parameter returns the size of build_id.
79 */
80 #define XENVER_build_id 10
81 struct xen_build_id {
82 uint32_t len; /* IN: size of buf[]. */
83 unsigned char buf[XEN_FLEX_ARRAY_DIM];
84 /* OUT: Variable length buffer with build_id. */
85 };
86 typedef struct xen_build_id xen_build_id_t;
87
88 #endif /* __XEN_PUBLIC_VERSION_H__ */
89
90 /*
91 * Local variables:
92 * mode: C
93 * c-file-style: "BSD"
94 * c-basic-offset: 4
95 * tab-width: 4
96 * indent-tabs-mode: nil
97 * End:
98 */