10 FILE_LICENCE ( GPL2_OR_LATER );
12 /* Define Xen interface version before including any Xen header files */
13 #define __XEN_INTERFACE_VERSION__ 0x00040400
16 #include <ipxe/uaccess.h>
18 #include <xen/event_channel.h>
20 /* Memory barrier macros used by ring.h */
22 #define xen_rmb() rmb()
23 #define xen_wmb() wmb()
27 /** A Xen grant table */
29 /** Grant table entries */
30 struct grant_entry_v1 *table;
31 /** Total grant table length */
33 /** Entry size shift (for later version tables) */
35 /** Number of grant table entries in use */
37 /** Most recently used grant reference */
43 /** XenStore domain interface */
44 struct xenstore_domain_interface *intf;
49 /** A Xen hypervisor */
50 struct xen_hypervisor {
51 /** Hypercall table */
52 struct xen_hypercall *hypercall;
53 /** Shared info page */
54 struct shared_info *shared;
56 struct xen_grant grant;
58 struct xen_store store;
64 * Convert a Xen status code to an iPXE status code
66 * @v xenrc Xen status code (negated)
67 * @ret rc iPXE status code (before negation)
69 * Xen status codes are defined in the file include/xen/errno.h in the
70 * Xen repository. They happen to match the Linux error codes, some
71 * of which can be found in our include/ipxe/errno/linux.h.
73 #define EXEN( xenrc ) EPLATFORM ( EINFO_EPLATFORM, -(xenrc) )
75 #endif /* _IPXE_XEN_H */