socsvn commit: r302352 - soc2015/iateaca/bhyve-ne2000-head/usr.sbin/bhyve

iateaca at FreeBSD.org iateaca at FreeBSD.org
Sat May 7 15:59:44 UTC 2016


Author: iateaca
Date: Sat May  7 15:59:42 2016
New Revision: 302352
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=302352

Log:
  add pci_hda in bhyve

Added:
  soc2015/iateaca/bhyve-ne2000-head/usr.sbin/bhyve/pci_hda.c
Modified:
  soc2015/iateaca/bhyve-ne2000-head/usr.sbin/bhyve/Makefile

Modified: soc2015/iateaca/bhyve-ne2000-head/usr.sbin/bhyve/Makefile
==============================================================================
--- soc2015/iateaca/bhyve-ne2000-head/usr.sbin/bhyve/Makefile	Sat May  7 08:30:21 2016	(r302351)
+++ soc2015/iateaca/bhyve-ne2000-head/usr.sbin/bhyve/Makefile	Sat May  7 15:59:42 2016	(r302352)
@@ -23,6 +23,7 @@
 	ne2000.c		\
 	pci_ahci.c		\
 	pci_emul.c		\
+	pci_hda.c		\
 	pci_hostbridge.c	\
 	pci_irq.c		\
 	pci_lpc.c		\

Added: soc2015/iateaca/bhyve-ne2000-head/usr.sbin/bhyve/pci_hda.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ soc2015/iateaca/bhyve-ne2000-head/usr.sbin/bhyve/pci_hda.c	Sat May  7 15:59:42 2016	(r302352)
@@ -0,0 +1,83 @@
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "pci_emul.h"
+
+/*
+ * HDA Debug Log
+ */
+#define DEBUG_HDA			0
+#if DEBUG_HDA == 1
+static FILE *dbg;
+#define DPRINTF(fmt, arg...)						\
+do {fprintf(dbg, "%s-%d: " fmt, __func__, __LINE__, ##arg);		\
+fflush(dbg); } while (0)
+#else
+#define DPRINTF(fmt, arg...)
+#endif
+
+/*
+ * HDA defines
+ */
+
+/*
+ * HDA data structures
+ */
+
+/*
+ * HDA module function declarations
+ */
+
+/*
+ * PCI HDA function declarations
+ */
+static int
+pci_hda_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts);
+static void
+pci_hda_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi,
+		int baridx, uint64_t offset, int size, uint64_t value);
+static uint64_t
+pci_hda_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi,
+		int baridx, uint64_t offset, int size);
+/*
+ * HDA global data
+ */
+
+struct pci_devemu pci_de_hda = {
+	.pe_emu		= "hda",
+	.pe_init	= pci_hda_init,
+	.pe_barwrite	= pci_hda_write,
+	.pe_barread	= pci_hda_read
+};
+
+PCI_EMUL_SET(pci_de_hda);
+
+/*
+ * HDA module function definitions
+ */
+
+/*
+ * PCI HDA function definitions
+ */
+static int
+pci_hda_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts)
+{
+	return 0;
+}
+
+static void
+pci_hda_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi,
+		int baridx, uint64_t offset, int size, uint64_t value)
+{
+	return;
+}
+
+static uint64_t
+pci_hda_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi,
+		int baridx, uint64_t offset, int size)
+{
+	return 0;
+}
+
+


More information about the svn-soc-all mailing list