summaryrefslogtreecommitdiffstats
path: root/sys/dev/hyperv/vmbus/hyperv_reg.h
diff options
context:
space:
mode:
authorsephe <sephe@FreeBSD.org>2016-05-23 07:06:53 +0000
committersephe <sephe@FreeBSD.org>2016-05-23 07:06:53 +0000
commit7fe01c346db99048659a6e158f6463a19d5ce867 (patch)
tree6765a50c2369787f205f9619a46f4bf1f645b3b5 /sys/dev/hyperv/vmbus/hyperv_reg.h
parent584c5b9bae8bd1977478b359c2ad7fbb8db089ac (diff)
downloadFreeBSD-src-7fe01c346db99048659a6e158f6463a19d5ce867.zip
FreeBSD-src-7fe01c346db99048659a6e158f6463a19d5ce867.tar.gz
hyperv: Move Hypercall setup to an early place.
It does not belong to the vmbus. While I'm here rework the Hypercall setup, e.g. use busdma(9) and avoid bit fields. Discussed with: Jun Su <junsu microsoft com> MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6445
Diffstat (limited to 'sys/dev/hyperv/vmbus/hyperv_reg.h')
-rw-r--r--sys/dev/hyperv/vmbus/hyperv_reg.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/sys/dev/hyperv/vmbus/hyperv_reg.h b/sys/dev/hyperv/vmbus/hyperv_reg.h
new file mode 100644
index 0000000..7d1d509
--- /dev/null
+++ b/sys/dev/hyperv/vmbus/hyperv_reg.h
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2016 Microsoft Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice unmodified, this list of conditions, and the following
+ * disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD$
+ */
+
+#ifndef _HYPERV_REG_H_
+#define _HYPERV_REG_H_
+
+#define MSR_HV_HYPERCALL 0x40000001
+#define MSR_HV_HYPERCALL_ENABLE 0x0001ULL
+#define MSR_HV_HYPERCALL_RSVD_MASK 0x0ffeULL
+#define MSR_HV_HYPERCALL_PGSHIFT 12
+
+#endif /* !_HYPERV_REG_H_ */
OpenPOWER on IntegriCloud