From owner-svn-soc-all@freebsd.org Sat May 7 15:59:44 2016 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BD792B31164 for ; Sat, 7 May 2016 15:59:44 +0000 (UTC) (envelope-from iateaca@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97B4D19FF for ; Sat, 7 May 2016 15:59:44 +0000 (UTC) (envelope-from iateaca@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.15.2/8.15.2) with ESMTP id u47FxiXr061844 for ; Sat, 7 May 2016 15:59:44 GMT (envelope-from iateaca@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.15.2/8.15.2/Submit) id u47FxhUk061840 for svn-soc-all@FreeBSD.org; Sat, 7 May 2016 15:59:43 GMT (envelope-from iateaca@FreeBSD.org) Date: Sat, 7 May 2016 15:59:43 GMT Message-Id: <201605071559.u47FxhUk061840@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to iateaca@FreeBSD.org using -f From: iateaca@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r302352 - soc2015/iateaca/bhyve-ne2000-head/usr.sbin/bhyve MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2016 15:59:44 -0000 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 +#include + +#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; +} + + From owner-svn-soc-all@freebsd.org Sat May 7 19:19:24 2016 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9CAB3B31F2C for ; Sat, 7 May 2016 19:19:24 +0000 (UTC) (envelope-from iateaca@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76F471846 for ; Sat, 7 May 2016 19:19:24 +0000 (UTC) (envelope-from iateaca@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.15.2/8.15.2) with ESMTP id u47JJOh6079336 for ; Sat, 7 May 2016 19:19:24 GMT (envelope-from iateaca@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.15.2/8.15.2/Submit) id u47JJN06079290 for svn-soc-all@FreeBSD.org; Sat, 7 May 2016 19:19:23 GMT (envelope-from iateaca@FreeBSD.org) Date: Sat, 7 May 2016 19:19:23 GMT Message-Id: <201605071919.u47JJN06079290@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to iateaca@FreeBSD.org using -f From: iateaca@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r302358 - soc2015/iateaca/bhyve-ne2000-head/usr.sbin/bhyve MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2016 19:19:24 -0000 Author: iateaca Date: Sat May 7 19:19:23 2016 New Revision: 302358 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=302358 Log: probe the HDA controller - set the PCI configuration space, allocate BAR0 memory addresses and request IRQ Modified: soc2015/iateaca/bhyve-ne2000-head/usr.sbin/bhyve/pci_hda.c Modified: soc2015/iateaca/bhyve-ne2000-head/usr.sbin/bhyve/pci_hda.c ============================================================================== --- soc2015/iateaca/bhyve-ne2000-head/usr.sbin/bhyve/pci_hda.c Sat May 7 18:58:07 2016 (r302357) +++ soc2015/iateaca/bhyve-ne2000-head/usr.sbin/bhyve/pci_hda.c Sat May 7 19:19:23 2016 (r302358) @@ -7,7 +7,7 @@ /* * HDA Debug Log */ -#define DEBUG_HDA 0 +#define DEBUG_HDA 1 #if DEBUG_HDA == 1 static FILE *dbg; #define DPRINTF(fmt, arg...) \ @@ -20,6 +20,8 @@ /* * HDA defines */ +#define INTEL_VENDORID 0x8086 +#define HDA_INTEL_82801G 0x27d8 /* * HDA data structures @@ -63,6 +65,28 @@ static int pci_hda_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) { + assert(ctx != NULL); + assert(pi != NULL); + +#if DEBUG_HDA == 1 + dbg = fopen("/tmp/bhyve_hda.log", "w+"); +#endif + + DPRINTF("PCI HDA\n"); + + pci_set_cfgdata16(pi, PCIR_VENDOR, INTEL_VENDORID); + pci_set_cfgdata16(pi, PCIR_DEVICE, HDA_INTEL_82801G); + + pci_set_cfgdata8(pi, PCIR_SUBCLASS, PCIS_MULTIMEDIA_HDA); + pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_MULTIMEDIA); + + /* TODO check the right size */ + /* allocate one BAR register for the Memory address offsets */ + pci_emul_alloc_bar(pi, 0, PCIBAR_MEM32, 0x0fff); + + /* allocate an IRQ pin for our slot */ + pci_lintr_request(pi); + return 0; } @@ -70,6 +94,10 @@ pci_hda_write(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx, uint64_t offset, int size, uint64_t value) { + assert(baridx == 0); + + DPRINTF("offset: 0x%lx size: %d\n", offset, size); + return; } @@ -77,6 +105,10 @@ pci_hda_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, int baridx, uint64_t offset, int size) { + assert(baridx == 0); + + DPRINTF("offset: 0x%lx size: %d\n", offset, size); + return 0; } From owner-svn-soc-all@freebsd.org Sat May 7 21:29:44 2016 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18C36B32843 for ; Sat, 7 May 2016 21:29:44 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E85DC1147 for ; Sat, 7 May 2016 21:29:43 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.15.2/8.15.2) with ESMTP id u47LThC8077439 for ; Sat, 7 May 2016 21:29:43 GMT (envelope-from gavin@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.15.2/8.15.2/Submit) id u47LThO0077438 for svn-soc-all@FreeBSD.org; Sat, 7 May 2016 21:29:43 GMT (envelope-from gavin@FreeBSD.org) Date: Sat, 7 May 2016 21:29:43 GMT Message-Id: <201605072129.u47LThO0077438@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to gavin@FreeBSD.org using -f From: gavin@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r302370 - soc2016 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2016 21:29:44 -0000 Author: gavin Date: Sat May 7 21:29:43 2016 New Revision: 302370 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=302370 Log: Create workspace for SoC 2016 Added: soc2016/ From owner-svn-soc-all@freebsd.org Sat May 7 21:30:31 2016 Return-Path: Delivered-To: svn-soc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34303B3286C for ; Sat, 7 May 2016 21:30:31 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10426115F for ; Sat, 7 May 2016 21:30:31 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.15.2/8.15.2) with ESMTP id u47LUUdt078728 for ; Sat, 7 May 2016 21:30:30 GMT (envelope-from gavin@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.15.2/8.15.2/Submit) id u47LUUbi078725 for svn-soc-all@FreeBSD.org; Sat, 7 May 2016 21:30:30 GMT (envelope-from gavin@FreeBSD.org) Date: Sat, 7 May 2016 21:30:30 GMT Message-Id: <201605072130.u47LUUbi078725@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to gavin@FreeBSD.org using -f From: gavin@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r302371 - svnadmin/conf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 07 May 2016 21:30:31 -0000 Author: gavin Date: Sat May 7 21:30:29 2016 New Revision: 302371 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=302371 Log: Give students access to /soc2016 Modified: svnadmin/conf/authz Modified: svnadmin/conf/authz ============================================================================== --- svnadmin/conf/authz Sat May 7 21:29:43 2016 (r302370) +++ svnadmin/conf/authz Sat May 7 21:30:29 2016 (r302371) @@ -29,3 +29,6 @@ [/soc2015] $authenticated = rw +[/soc2016] +$authenticated = rw +