summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>2013-06-14 23:43:44 +0000
committergibbs <gibbs@FreeBSD.org>2013-06-14 23:43:44 +0000
commitd4000dfe1d836cc3ec0996c13cf7e451cbee4671 (patch)
treef9ece4abef119de43a80527815adb73517b2695c /sys/amd64/include
parent7df13c4780705e56489fb9e80bcbd56b84593359 (diff)
downloadFreeBSD-src-d4000dfe1d836cc3ec0996c13cf7e451cbee4671.zip
FreeBSD-src-d4000dfe1d836cc3ec0996c13cf7e451cbee4671.tar.gz
Upgrade Xen interface headers to Xen 4.2.1.
Move FreeBSD from interface version 0x00030204 to 0x00030208. Updates are required to our grant table implementation before we can bump this further. sys/xen/hvm.h: Replace the implementation of hvm_get_parameter(), formerly located in sys/xen/interface/hvm/params.h. Linux has a similar file which primarily stores this function. sys/xen/xenstore/xenstore.c: Include new xen/hvm.h header file to get hvm_get_parameter(). sys/amd64/include/xen/xen-os.h: sys/i386/include/xen/xen-os.h: Correctly protect function definition and variables from being included into assembly files in xen-os.h Xen memory barriers are now prefixed with "xen_" to avoid conflicts with OS native primatives. Define Xen memory barriers in terms of the native FreeBSD primatives. Sponsored by: Spectra Logic Corporation Reviewed by: Roger Pau Monné Tested by: Roger Pau Monné Obtained from: Roger Pau Monné (bug fixes)
Diffstat (limited to 'sys/amd64/include')
-rw-r--r--sys/amd64/include/xen/xen-os.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/sys/amd64/include/xen/xen-os.h b/sys/amd64/include/xen/xen-os.h
index 6941558..8974323 100644
--- a/sys/amd64/include/xen/xen-os.h
+++ b/sys/amd64/include/xen/xen-os.h
@@ -13,16 +13,21 @@
#define CONFIG_X86_PAE
#endif
+#ifdef LOCORE
+#define __ASSEMBLY__
+#endif
+
#if !defined(__XEN_INTERFACE_VERSION__)
-/*
- * Can update to a more recent version when we implement
- * the hypercall page
- */
-#define __XEN_INTERFACE_VERSION__ 0x00030204
+#define __XEN_INTERFACE_VERSION__ 0x00030208
#endif
+#define GRANT_REF_INVALID 0xffffffff
+
#include <xen/interface/xen.h>
+/* Everything below this point is not included by assembler (.S) files. */
+#ifndef __ASSEMBLY__
+
/* Force a proper event-channel callback from Xen. */
void force_evtchn_callback(void);
@@ -43,10 +48,6 @@ static inline void rep_nop(void)
void *bootmem_alloc(unsigned int size);
void bootmem_free(void *ptr, unsigned int size);
-
-/* Everything below this point is not included by assembler (.S) files. */
-#ifndef __ASSEMBLY__
-
void printk(const char *fmt, ...);
/* some function prototypes */
@@ -128,14 +129,14 @@ do { \
#else
#endif
-#ifndef mb
-#define mb() __asm__ __volatile__("mfence":::"memory")
+#ifndef xen_mb
+#define xen_mb() mb()
#endif
-#ifndef rmb
-#define rmb() __asm__ __volatile__("lfence":::"memory");
+#ifndef xen_rmb
+#define xen_rmb() rmb()
#endif
-#ifndef wmb
-#define wmb() barrier()
+#ifndef xen_wmb
+#define xen_wmb() wmb()
#endif
#ifdef SMP
#define smp_mb() mb()
OpenPOWER on IntegriCloud