Deleted Added
full compact
pci_uart.c (267341) pci_uart.c (267393)
1/*-
2 * Copyright (c) 2012 NetApp, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 2012 NetApp, Inc.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: stable/10/usr.sbin/bhyve/pci_uart.c 267341 2014-06-10 21:20:37Z jhb $
26 * $FreeBSD: stable/10/usr.sbin/bhyve/pci_uart.c 267393 2014-06-12 13:13:15Z jhb $
27 */
28
29#include <sys/cdefs.h>
27 */
28
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: stable/10/usr.sbin/bhyve/pci_uart.c 267341 2014-06-10 21:20:37Z jhb $");
30__FBSDID("$FreeBSD: stable/10/usr.sbin/bhyve/pci_uart.c 267393 2014-06-12 13:13:15Z jhb $");
31
32#include <sys/types.h>
33
34#include <stdio.h>
35
36#include "bhyverun.h"
37#include "pci_emul.h"
38#include "uart_emul.h"

--- 47 unchanged lines hidden (view full) ---

86}
87
88static int
89pci_uart_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts)
90{
91 struct uart_softc *sc;
92
93 pci_emul_alloc_bar(pi, 0, PCIBAR_IO, UART_IO_BAR_SIZE);
31
32#include <sys/types.h>
33
34#include <stdio.h>
35
36#include "bhyverun.h"
37#include "pci_emul.h"
38#include "uart_emul.h"

--- 47 unchanged lines hidden (view full) ---

86}
87
88static int
89pci_uart_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts)
90{
91 struct uart_softc *sc;
92
93 pci_emul_alloc_bar(pi, 0, PCIBAR_IO, UART_IO_BAR_SIZE);
94 pci_lintr_request(pi, -1);
94 pci_lintr_request(pi);
95
96 /* initialize config space */
97 pci_set_cfgdata16(pi, PCIR_DEVICE, COM_DEV);
98 pci_set_cfgdata16(pi, PCIR_VENDOR, COM_VENDOR);
99 pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_SIMPLECOMM);
100
101 sc = uart_init(pci_uart_intr_assert, pci_uart_intr_deassert, pi);
102 pi->pi_arg = sc;

--- 17 unchanged lines hidden ---
95
96 /* initialize config space */
97 pci_set_cfgdata16(pi, PCIR_DEVICE, COM_DEV);
98 pci_set_cfgdata16(pi, PCIR_VENDOR, COM_VENDOR);
99 pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_SIMPLECOMM);
100
101 sc = uart_init(pci_uart_intr_assert, pci_uart_intr_deassert, pi);
102 pi->pi_arg = sc;

--- 17 unchanged lines hidden ---