Deleted Added
full compact
pci_emul.h (262184) pci_emul.h (265211)
1/*-
2 * Copyright (c) 2011 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) 2011 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: head/usr.sbin/bhyve/pci_emul.h 262184 2014-02-18 19:00:15Z neel $
26 * $FreeBSD: head/usr.sbin/bhyve/pci_emul.h 265211 2014-05-02 04:51:31Z neel $
27 */
28
29#ifndef _PCI_EMUL_H_
30#define _PCI_EMUL_H_
31
32#include <sys/types.h>
33#include <sys/queue.h>
34#include <sys/kernel.h>

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

228void pci_populate_msicap(struct msicap *cap, int msgs, int nextptr);
229int pci_emul_add_msixcap(struct pci_devinst *pi, int msgnum, int barnum);
230int pci_emul_msix_twrite(struct pci_devinst *pi, uint64_t offset, int size,
231 uint64_t value);
232uint64_t pci_emul_msix_tread(struct pci_devinst *pi, uint64_t offset, int size);
233int pci_count_lintr(int bus);
234void pci_walk_lintr(int bus, pci_lintr_cb cb, void *arg);
235void pci_write_dsdt(void);
27 */
28
29#ifndef _PCI_EMUL_H_
30#define _PCI_EMUL_H_
31
32#include <sys/types.h>
33#include <sys/queue.h>
34#include <sys/kernel.h>

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

228void pci_populate_msicap(struct msicap *cap, int msgs, int nextptr);
229int pci_emul_add_msixcap(struct pci_devinst *pi, int msgnum, int barnum);
230int pci_emul_msix_twrite(struct pci_devinst *pi, uint64_t offset, int size,
231 uint64_t value);
232uint64_t pci_emul_msix_tread(struct pci_devinst *pi, uint64_t offset, int size);
233int pci_count_lintr(int bus);
234void pci_walk_lintr(int bus, pci_lintr_cb cb, void *arg);
235void pci_write_dsdt(void);
236int pci_bus_configured(int bus);
236
237static __inline void
238pci_set_cfgdata8(struct pci_devinst *pi, int offset, uint8_t val)
239{
240 assert(offset <= PCI_REGMAX);
241 *(uint8_t *)(pi->pi_cfgdata + offset) = val;
242}
243

--- 36 unchanged lines hidden ---
237
238static __inline void
239pci_set_cfgdata8(struct pci_devinst *pi, int offset, uint8_t val)
240{
241 assert(offset <= PCI_REGMAX);
242 *(uint8_t *)(pi->pi_cfgdata + offset) = val;
243}
244

--- 36 unchanged lines hidden ---