iPXE
xenver.h
Go to the documentation of this file.
1 #ifndef _IPXE_XENVER_H
2 #define _IPXE_VENVER_H
3 
4 /** @file
5  *
6  * Xen version
7  *
8  */
9 
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 
12 #include <ipxe/xen.h>
13 #include <xen/version.h>
14 
15 /**
16  * Get Xen version
17  *
18  * @v xen Xen hypervisor
19  * @ret version Version (major.minor: 16 bits each)
20  */
21 static inline __attribute__ (( always_inline )) uint32
22 xenver_version ( struct xen_hypervisor *xen ) {
23 
24  return xen_hypercall_2 ( xen, __HYPERVISOR_xen_version,
25  XENVER_version, 0 );
26 }
27 
28 /**
29  * Get Xen extra version string
30  *
31  * @v xen Xen hypervisor
32  * @v extraversion Extra version string to fill in
33  * @ret xenrc Xen status code
34  */
35 static inline __attribute__ (( always_inline )) int
36 xenver_extraversion ( struct xen_hypervisor *xen,
38 
39  return xen_hypercall_2 ( xen, __HYPERVISOR_xen_version,
42 }
43 
44 #endif /* _IPXE_XENVER_H */
static xen_extraversion_t * extraversion
Definition: xenver.h:37
#define XENVER_extraversion
Definition: version.h:41
static __always_inline unsigned long virt_to_phys(volatile const void *addr)
Convert virtual address to a physical address.
Definition: uaccess.h:287
A Xen hypervisor.
Definition: xen.h:51
Xen interface.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
char xen_extraversion_t[16]
Definition: version.h:42
#define __HYPERVISOR_xen_version
Definition: xen.h:83
#define XENVER_version
Definition: version.h:38
static __attribute__((always_inline)) uint32 xenver_version(struct xen_hypervisor *xen)
Get Xen version.
Definition: xenver.h:21
uint32_t uint32
Definition: stdint.h:32