summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2016-10-10 21:08:40 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2016-10-10 21:08:40 +0000
commitd536a33b99d10506c1d59c9d1dcf8a4e754ebef2 (patch)
tree68b61ca1de2fd8955f6aa7635b88e7273edcfd1e /sys/dev
parent7f9469706c887309e0c840b0462f063923c0675b (diff)
Reshuffle GUID device ID table and add $ tags to headers
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pv/hyperv.c222
-rw-r--r--sys/dev/pv/hypervreg.h26
-rw-r--r--sys/dev/pv/hypervvar.h24
3 files changed, 143 insertions, 129 deletions
diff --git a/sys/dev/pv/hyperv.c b/sys/dev/pv/hyperv.c
index 7641751d56d..3798440ef90 100644
--- a/sys/dev/pv/hyperv.c
+++ b/sys/dev/pv/hyperv.c
@@ -157,6 +157,114 @@ const struct cfattach hyperv_ca = {
sizeof(struct hv_softc), hv_match, hv_attach
};
+const struct hv_guid hv_guid_network = {
+ { 0x63, 0x51, 0x61, 0xf8, 0x3e, 0xdf, 0xc5, 0x46,
+ 0x91, 0x3f, 0xf2, 0xd2, 0xf9, 0x65, 0xed, 0x0e }
+};
+
+const struct hv_guid hv_guid_ide = {
+ { 0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44,
+ 0x9b, 0x5c, 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5 }
+};
+
+const struct hv_guid hv_guid_scsi = {
+ { 0xd9, 0x63, 0x61, 0xba, 0xa1, 0x04, 0x29, 0x4d,
+ 0xb6, 0x05, 0x72, 0xe2, 0xff, 0xb1, 0xdc, 0x7f }
+};
+
+const struct hv_guid hv_guid_shutdown = {
+ { 0x31, 0x60, 0x0b, 0x0e, 0x13, 0x52, 0x34, 0x49,
+ 0x81, 0x8b, 0x38, 0xd9, 0x0c, 0xed, 0x39, 0xdb }
+};
+
+const struct hv_guid hv_guid_timesync = {
+ { 0x30, 0xe6, 0x27, 0x95, 0xae, 0xd0, 0x7b, 0x49,
+ 0xad, 0xce, 0xe8, 0x0a, 0xb0, 0x17, 0x5c, 0xaf }
+};
+
+const struct hv_guid hv_guid_heartbeat = {
+ { 0x39, 0x4f, 0x16, 0x57, 0x15, 0x91, 0x78, 0x4e,
+ 0xab, 0x55, 0x38, 0x2f, 0x3b, 0xd5, 0x42, 0x2d }
+};
+
+const struct hv_guid hv_guid_kvp = {
+ { 0xe7, 0xf4, 0xa0, 0xa9, 0x45, 0x5a, 0x96, 0x4d,
+ 0xb8, 0x27, 0x8a, 0x84, 0x1e, 0x8c, 0x03, 0xe6 }
+};
+
+#ifdef HYPERV_DEBUG
+const struct hv_guid hv_guid_vss = {
+ { 0x29, 0x2e, 0xfa, 0x35, 0x23, 0xea, 0x36, 0x42,
+ 0x96, 0xae, 0x3a, 0x6e, 0xba, 0xcb, 0xa4, 0x40 }
+};
+
+const struct hv_guid hv_guid_dynmem = {
+ { 0xdc, 0x74, 0x50, 0x52, 0x85, 0x89, 0xe2, 0x46,
+ 0x80, 0x57, 0xa3, 0x07, 0xdc, 0x18, 0xa5, 0x02 }
+};
+
+const struct hv_guid hv_guid_mouse = {
+ { 0x9e, 0xb6, 0xa8, 0xcf, 0x4a, 0x5b, 0xc0, 0x4c,
+ 0xb9, 0x8b, 0x8b, 0xa1, 0xa1, 0xf3, 0xf9, 0x5a }
+};
+
+const struct hv_guid hv_guid_kbd = {
+ { 0x6d, 0xad, 0x12, 0xf9, 0x17, 0x2b, 0xea, 0x48,
+ 0xbd, 0x65, 0xf9, 0x27, 0xa6, 0x1c, 0x76, 0x84 }
+};
+
+const struct hv_guid hv_guid_video = {
+ { 0x02, 0x78, 0x0a, 0xda, 0x77, 0xe3, 0xac, 0x4a,
+ 0x8e, 0x77, 0x05, 0x58, 0xeb, 0x10, 0x73, 0xf8 }
+};
+
+const struct hv_guid hv_guid_fc = {
+ { 0x4a, 0xcc, 0x9b, 0x2f, 0x69, 0x00, 0xf3, 0x4a,
+ 0xb7, 0x6b, 0x6f, 0xd0, 0xbe, 0x52, 0x8c, 0xda }
+};
+
+const struct hv_guid hv_guid_fcopy = {
+ { 0xe3, 0x4b, 0xd1, 0x34, 0xe4, 0xde, 0xc8, 0x41,
+ 0x9a, 0xe7, 0x6b, 0x17, 0x49, 0x77, 0xc1, 0x92 }
+};
+
+const struct hv_guid hv_guid_pcie = {
+ { 0x1d, 0xf6, 0xc4, 0x44, 0x44, 0x44, 0x00, 0x44,
+ 0x9d, 0x52, 0x80, 0x2e, 0x27, 0xed, 0xe1, 0x9f }
+};
+
+const struct hv_guid hv_guid_netdir = {
+ { 0x3d, 0xaf, 0x2e, 0x8c, 0xa7, 0x32, 0x09, 0x4b,
+ 0xab, 0x99, 0xbd, 0x1f, 0x1c, 0x86, 0xb5, 0x01 }
+};
+
+const struct hv_guid hv_guid_rdesktop = {
+ { 0xf4, 0xac, 0x6a, 0x27, 0x15, 0xac, 0x6c, 0x42,
+ 0x98, 0xdd, 0x75, 0x21, 0xad, 0x3f, 0x01, 0xfe }
+};
+
+/* Automatic Virtual Machine Activation (AVMA) Services */
+const struct hv_guid hv_guid_avma1 = {
+ { 0x55, 0xb2, 0x87, 0x44, 0x8c, 0xb8, 0x3f, 0x40,
+ 0xbb, 0x51, 0xd1, 0xf6, 0x9c, 0xf1, 0x7f, 0x87 }
+};
+
+const struct hv_guid hv_guid_avma2 = {
+ { 0xf4, 0xba, 0x75, 0x33, 0x15, 0x9e, 0x30, 0x4b,
+ 0xb7, 0x65, 0x67, 0xac, 0xb1, 0x0d, 0x60, 0x7b }
+};
+
+const struct hv_guid hv_guid_avma3 = {
+ { 0xa0, 0x1f, 0x22, 0x99, 0xad, 0x24, 0xe2, 0x11,
+ 0xbe, 0x98, 0x00, 0x1a, 0xa0, 0x1b, 0xbf, 0x6e }
+};
+
+const struct hv_guid hv_guid_avma4 = {
+ { 0x16, 0x57, 0xe6, 0xf8, 0xb3, 0x3c, 0x06, 0x4a,
+ 0x9a, 0x60, 0x18, 0x89, 0xc5, 0xcc, 0xca, 0xb5 }
+};
+#endif /* HYPERV_DEBUG */
+
int
hv_match(struct device *parent, void *match, void *aux)
{
@@ -770,113 +878,7 @@ hv_vmbus_connect(struct hv_softc *sc)
return (-1);
}
-const struct hv_guid hv_guid_network = {
- { 0x63, 0x51, 0x61, 0xf8, 0x3e, 0xdf, 0xc5, 0x46,
- 0x91, 0x3f, 0xf2, 0xd2, 0xf9, 0x65, 0xed, 0x0e }
-};
-
-const struct hv_guid hv_guid_ide = {
- { 0x32, 0x26, 0x41, 0x32, 0xcb, 0x86, 0xa2, 0x44,
- 0x9b, 0x5c, 0x50, 0xd1, 0x41, 0x73, 0x54, 0xf5 }
-};
-
-const struct hv_guid hv_guid_scsi = {
- { 0xd9, 0x63, 0x61, 0xba, 0xa1, 0x04, 0x29, 0x4d,
- 0xb6, 0x05, 0x72, 0xe2, 0xff, 0xb1, 0xdc, 0x7f }
-};
-
-const struct hv_guid hv_guid_shutdown = {
- { 0x31, 0x60, 0x0b, 0x0e, 0x13, 0x52, 0x34, 0x49,
- 0x81, 0x8b, 0x38, 0xd9, 0x0c, 0xed, 0x39, 0xdb }
-};
-
-const struct hv_guid hv_guid_timesync = {
- { 0x30, 0xe6, 0x27, 0x95, 0xae, 0xd0, 0x7b, 0x49,
- 0xad, 0xce, 0xe8, 0x0a, 0xb0, 0x17, 0x5c, 0xaf }
-};
-
-const struct hv_guid hv_guid_heartbeat = {
- { 0x39, 0x4f, 0x16, 0x57, 0x15, 0x91, 0x78, 0x4e,
- 0xab, 0x55, 0x38, 0x2f, 0x3b, 0xd5, 0x42, 0x2d }
-};
-
-const struct hv_guid hv_guid_kvp = {
- { 0xe7, 0xf4, 0xa0, 0xa9, 0x45, 0x5a, 0x96, 0x4d,
- 0xb8, 0x27, 0x8a, 0x84, 0x1e, 0x8c, 0x03, 0xe6 }
-};
-
#ifdef HYPERV_DEBUG
-const struct hv_guid hv_guid_vss = {
- { 0x29, 0x2e, 0xfa, 0x35, 0x23, 0xea, 0x36, 0x42,
- 0x96, 0xae, 0x3a, 0x6e, 0xba, 0xcb, 0xa4, 0x40 }
-};
-
-const struct hv_guid hv_guid_dynmem = {
- { 0xdc, 0x74, 0x50, 0x52, 0x85, 0x89, 0xe2, 0x46,
- 0x80, 0x57, 0xa3, 0x07, 0xdc, 0x18, 0xa5, 0x02 }
-};
-
-const struct hv_guid hv_guid_mouse = {
- { 0x9e, 0xb6, 0xa8, 0xcf, 0x4a, 0x5b, 0xc0, 0x4c,
- 0xb9, 0x8b, 0x8b, 0xa1, 0xa1, 0xf3, 0xf9, 0x5a }
-};
-
-const struct hv_guid hv_guid_kbd = {
- { 0x6d, 0xad, 0x12, 0xf9, 0x17, 0x2b, 0xea, 0x48,
- 0xbd, 0x65, 0xf9, 0x27, 0xa6, 0x1c, 0x76, 0x84 }
-};
-
-const struct hv_guid hv_guid_video = {
- { 0x02, 0x78, 0x0a, 0xda, 0x77, 0xe3, 0xac, 0x4a,
- 0x8e, 0x77, 0x05, 0x58, 0xeb, 0x10, 0x73, 0xf8 }
-};
-
-const struct hv_guid hv_guid_fc = {
- { 0x4a, 0xcc, 0x9b, 0x2f, 0x69, 0x00, 0xf3, 0x4a,
- 0xb7, 0x6b, 0x6f, 0xd0, 0xbe, 0x52, 0x8c, 0xda }
-};
-
-const struct hv_guid hv_guid_fcopy = {
- { 0xe3, 0x4b, 0xd1, 0x34, 0xe4, 0xde, 0xc8, 0x41,
- 0x9a, 0xe7, 0x6b, 0x17, 0x49, 0x77, 0xc1, 0x92 }
-};
-
-const struct hv_guid hv_guid_pcie = {
- { 0x1d, 0xf6, 0xc4, 0x44, 0x44, 0x44, 0x00, 0x44,
- 0x9d, 0x52, 0x80, 0x2e, 0x27, 0xed, 0xe1, 0x9f }
-};
-
-const struct hv_guid hv_guid_netdir = {
- { 0x3d, 0xaf, 0x2e, 0x8c, 0xa7, 0x32, 0x09, 0x4b,
- 0xab, 0x99, 0xbd, 0x1f, 0x1c, 0x86, 0xb5, 0x01 }
-};
-
-const struct hv_guid hv_guid_rdesktop = {
- { 0xf4, 0xac, 0x6a, 0x27, 0x15, 0xac, 0x6c, 0x42,
- 0x98, 0xdd, 0x75, 0x21, 0xad, 0x3f, 0x01, 0xfe }
-};
-
-/* Automatic Virtual Machine Activation (AVMA) Services */
-const struct hv_guid hv_guid_avma1 = {
- { 0x55, 0xb2, 0x87, 0x44, 0x8c, 0xb8, 0x3f, 0x40,
- 0xbb, 0x51, 0xd1, 0xf6, 0x9c, 0xf1, 0x7f, 0x87 }
-};
-
-const struct hv_guid hv_guid_avma2 = {
- { 0xf4, 0xba, 0x75, 0x33, 0x15, 0x9e, 0x30, 0x4b,
- 0xb7, 0x65, 0x67, 0xac, 0xb1, 0x0d, 0x60, 0x7b }
-};
-
-const struct hv_guid hv_guid_avma3 = {
- { 0xa0, 0x1f, 0x22, 0x99, 0xad, 0x24, 0xe2, 0x11,
- 0xbe, 0x98, 0x00, 0x1a, 0xa0, 0x1b, 0xbf, 0x6e }
-};
-
-const struct hv_guid hv_guid_avma4 = {
- { 0x16, 0x57, 0xe6, 0xf8, 0xb3, 0x3c, 0x06, 0x4a,
- 0x9a, 0x60, 0x18, 0x89, 0xc5, 0xcc, 0xca, 0xb5 }
-};
-
static inline char *
guidprint(struct hv_guid *a)
{
@@ -1458,6 +1460,14 @@ hv_channel_recv(struct hv_channel *ch, void *data, uint32_t datalen,
return (rv);
}
+/* How many PFNs can be referenced by the header */
+#define HV_NPFNHDR ((VMBUS_MSG_DSIZE_MAX - \
+ sizeof(struct vmbus_chanmsg_gpadl_conn)) / sizeof(uint64_t))
+
+/* How many PFNs can be referenced by the body */
+#define HV_NPFNBODY ((VMBUS_MSG_DSIZE_MAX - \
+ sizeof(struct vmbus_chanmsg_gpadl_subconn)) / sizeof(uint64_t))
+
int
hv_handle_alloc(struct hv_channel *ch, void *buffer, uint32_t buflen,
uint32_t *handle)
diff --git a/sys/dev/pv/hypervreg.h b/sys/dev/pv/hypervreg.h
index d64ec834464..2a2915fb3fc 100644
--- a/sys/dev/pv/hypervreg.h
+++ b/sys/dev/pv/hypervreg.h
@@ -40,9 +40,7 @@ struct hv_guid {
#define VMBUS_GPADL_START 0xffff /* 0x10000 effectively */
/*
- * ============================================================================
- * hyperv_reg.h
- * ============================================================================
+ * $FreeBSD: head/sys/dev/hyperv/vmbus/hyperv_reg.h 303283 2016-07-25 03:12:40Z sephe $
*/
/*
@@ -202,9 +200,7 @@ struct hypercall_postmsg_in {
} __packed;
/*
- * ============================================================================
- * vmbus.h
- * ============================================================================
+ * $FreeBSD: head/sys/dev/hyperv/include/vmbus.h 306389 2016-09-28 04:25:25Z sephe $
*/
/*
@@ -265,9 +261,7 @@ struct vmbus_chanpkt_hdr {
VMBUS_CHANPKT_GETLEN((pkt)->cph_hlen)))
/*
- * ============================================================================
- * vmbus_reg.h
- * ============================================================================
+ * $FreeBSD: head/sys/dev/hyperv/vmbus/vmbus_reg.h 305405 2016-09-05 03:21:31Z sephe $
*/
/*
@@ -621,18 +615,4 @@ struct hv_heartbeat_msg {
uint32_t reserved[8];
} __packed;
-/*
- * ============================================================================
- * Helper macros
- * ============================================================================
- */
-
-/* How many PFNs can be referenced by the header */
-#define HV_NPFNHDR ((VMBUS_MSG_DSIZE_MAX - \
- sizeof(struct vmbus_chanmsg_gpadl_conn)) / sizeof(uint64_t))
-
-/* How many PFNs can be referenced by the body */
-#define HV_NPFNBODY ((VMBUS_MSG_DSIZE_MAX - \
- sizeof(struct vmbus_chanmsg_gpadl_subconn)) / sizeof(uint64_t))
-
#endif /* _DEV_PV_HYPERVREG_H_ */
diff --git a/sys/dev/pv/hypervvar.h b/sys/dev/pv/hypervvar.h
index b8da4a17892..b96217761c7 100644
--- a/sys/dev/pv/hypervvar.h
+++ b/sys/dev/pv/hypervvar.h
@@ -182,6 +182,30 @@ test_bit(u_int b, volatile void *p)
return !!(((volatile u_int *)p)[b >> 5] & (1 << (b & 0x1f)));
}
+extern const struct hv_guid hv_guid_network;
+extern const struct hv_guid hv_guid_ide;
+extern const struct hv_guid hv_guid_scsi;
+extern const struct hv_guid hv_guid_shutdown;
+extern const struct hv_guid hv_guid_timesync;
+extern const struct hv_guid hv_guid_heartbeat;
+extern const struct hv_guid hv_guid_kvp;
+#ifdef HYPERV_DEBUG
+extern const struct hv_guid hv_guid_vss;
+extern const struct hv_guid hv_guid_dynmem;
+extern const struct hv_guid hv_guid_mouse;
+extern const struct hv_guid hv_guid_kbd;
+extern const struct hv_guid hv_guid_video;
+extern const struct hv_guid hv_guid_fc;
+extern const struct hv_guid hv_guid_fcopy;
+extern const struct hv_guid hv_guid_pcie;
+extern const struct hv_guid hv_guid_netdir;
+extern const struct hv_guid hv_guid_rdesktop;
+extern const struct hv_guid hv_guid_avma1;
+extern const struct hv_guid hv_guid_avma2;
+extern const struct hv_guid hv_guid_avma3;
+extern const struct hv_guid hv_guid_avma4;
+#endif /* HYPERV_DEBUG */
+
int hv_handle_alloc(struct hv_channel *, void *, uint32_t, uint32_t *);
void hv_handle_free(struct hv_channel *, uint32_t);
int hv_channel_open(struct hv_channel *, void *, size_t, void (*)(void *),