pci_lpc.c (263236) | pci_lpc.c (264631) |
---|---|
1/*- 2 * Copyright (c) 2013 Neel Natu <neel@freebsd.org> 3 * Copyright (c) 2013 Tycho Nightingale <tycho.nightingale@pluribusnetworks.com> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * | 1/*- 2 * Copyright (c) 2013 Neel Natu <neel@freebsd.org> 3 * Copyright (c) 2013 Tycho Nightingale <tycho.nightingale@pluribusnetworks.com> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 10 unchanged lines hidden (view full) --- 19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 * |
27 * $FreeBSD: head/usr.sbin/bhyve/pci_lpc.c 263236 2014-03-16 12:31:28Z tychon $ | 27 * $FreeBSD: head/usr.sbin/bhyve/pci_lpc.c 264631 2014-04-18 00:02:06Z tychon $ |
28 */ 29 30#include <sys/cdefs.h> | 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/usr.sbin/bhyve/pci_lpc.c 263236 2014-03-16 12:31:28Z tychon $"); | 31__FBSDID("$FreeBSD: head/usr.sbin/bhyve/pci_lpc.c 264631 2014-04-18 00:02:06Z tychon $"); |
32 33#include <sys/types.h> 34#include <machine/vmm.h> 35#include <machine/vmm_dev.h> 36 37#include <stdio.h> 38#include <stdlib.h> 39#include <string.h> --- 10 unchanged lines hidden (view full) --- 50#define IO_ICU2 0xA0 51 52SET_DECLARE(lpc_dsdt_set, struct lpc_dsdt); 53SET_DECLARE(lpc_sysres_set, struct lpc_sysres); 54 55#define ELCR_PORT 0x4d0 56SYSRES_IO(ELCR_PORT, 2); 57 | 32 33#include <sys/types.h> 34#include <machine/vmm.h> 35#include <machine/vmm_dev.h> 36 37#include <stdio.h> 38#include <stdlib.h> 39#include <string.h> --- 10 unchanged lines hidden (view full) --- 50#define IO_ICU2 0xA0 51 52SET_DECLARE(lpc_dsdt_set, struct lpc_dsdt); 53SET_DECLARE(lpc_sysres_set, struct lpc_sysres); 54 55#define ELCR_PORT 0x4d0 56SYSRES_IO(ELCR_PORT, 2); 57 |
58#define IO_TIMER1_PORT 0x40 59 60#define NMISC_PORT 0x61 61SYSRES_IO(NMISC_PORT, 1); 62 |
|
58static struct pci_devinst *lpc_bridge; 59 60#define LPC_UART_NUM 2 61static struct lpc_uart_softc { 62 struct uart_softc *uart_softc; 63 const char *opts; 64 int iobase; 65 int irq; --- 155 unchanged lines hidden (view full) --- 221 dsdt_fixed_ioport(IO_ICU1, 2); 222 dsdt_fixed_ioport(IO_ICU2, 2); 223 dsdt_fixed_irq(2); 224 dsdt_unindent(2); 225 dsdt_line(" })"); 226 dsdt_line("}"); 227 dsdt_unindent(1); 228 | 63static struct pci_devinst *lpc_bridge; 64 65#define LPC_UART_NUM 2 66static struct lpc_uart_softc { 67 struct uart_softc *uart_softc; 68 const char *opts; 69 int iobase; 70 int irq; --- 155 unchanged lines hidden (view full) --- 226 dsdt_fixed_ioport(IO_ICU1, 2); 227 dsdt_fixed_ioport(IO_ICU2, 2); 228 dsdt_fixed_irq(2); 229 dsdt_unindent(2); 230 dsdt_line(" })"); 231 dsdt_line("}"); 232 dsdt_unindent(1); 233 |
234 dsdt_line(""); 235 dsdt_line("Device (TIMR)"); 236 dsdt_line("{"); 237 dsdt_line(" Name (_HID, EisaId (\"PNP0100\"))"); 238 dsdt_line(" Name (_CRS, ResourceTemplate ()"); 239 dsdt_line(" {"); 240 dsdt_indent(2); 241 dsdt_fixed_ioport(IO_TIMER1_PORT, 4); 242 dsdt_fixed_irq(0); 243 dsdt_unindent(2); 244 dsdt_line(" })"); |
|
229 dsdt_line("}"); | 245 dsdt_line("}"); |
246 247 dsdt_line("}"); |
|
230} 231 232static void 233pci_lpc_sysres_dsdt(void) 234{ 235 struct lpc_sysres **lspp, *lsp; 236 237 dsdt_line(""); --- 111 unchanged lines hidden --- | 248} 249 250static void 251pci_lpc_sysres_dsdt(void) 252{ 253 struct lpc_sysres **lspp, *lsp; 254 255 dsdt_line(""); --- 111 unchanged lines hidden --- |