Files
xen/extras/mini-os/include/pcifront.h
T
Mike Neilsen 5fd5df0871 mini-os: Fix stubdom build failures on gcc 4.8
This is a fix for bug 35:
http://bugs.xenproject.org/xen/bug/35

This bug report describes several format string mismatches which prevent
building the stubdom target in Xen 4.3 and Xen 4.4-rc2 on gcc 4.8.  This is a
copy of Alex Sharp's original patch with the following modifications:

* Andrew Cooper's recommendation applied to extras/mini-os/xenbus/xenbus.c to
  avoid stack corruption
* Samuel Thibault's recommendation to make "fun" an unsigned int rather than an
  unsigned long in pcifront_physical_to_virtual and related functions
  (extras/mini-os/include/pcifront.h and extras/mini-os/pcifront.c)

Tested on x86_64 gcc Ubuntu/Linaro 4.8.1-10ubuntu9.

Coverity-IDs: 1055807 1055808 1055809 1055810
Signed-off-by: Mike Neilsen <mneilsen@acm.org>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2014-01-28 11:11:00 +00:00

30 lines
1.6 KiB
C

#include <mini-os/types.h>
#include <xen/io/pciif.h>
struct pcifront_dev;
void pcifront_watches(void *opaque);
struct pcifront_dev *init_pcifront(char *nodename);
void pcifront_op(struct pcifront_dev *dev, struct xen_pci_op *op);
void pcifront_scan(struct pcifront_dev *dev, void (*fun)(unsigned int domain, unsigned int bus, unsigned slot, unsigned int fun));
int pcifront_conf_read(struct pcifront_dev *dev,
unsigned int dom,
unsigned int bus, unsigned int slot, unsigned int fun,
unsigned int off, unsigned int size, unsigned int *val);
int pcifront_conf_write(struct pcifront_dev *dev,
unsigned int dom,
unsigned int bus, unsigned int slot, unsigned int fun,
unsigned int off, unsigned int size, unsigned int val);
int pcifront_enable_msi(struct pcifront_dev *dev,
unsigned int dom,
unsigned int bus, unsigned int slot, unsigned int fun);
int pcifront_disable_msi(struct pcifront_dev *dev,
unsigned int dom,
unsigned int bus, unsigned int slot, unsigned int fun);
int pcifront_enable_msix(struct pcifront_dev *dev,
unsigned int dom,
unsigned int bus, unsigned int slot, unsigned int fun,
struct xen_msix_entry *entries, int n);
int pcifront_disable_msix(struct pcifront_dev *dev,
unsigned int dom,
unsigned int bus, unsigned int slot, unsigned int fun);
void shutdown_pcifront(struct pcifront_dev *dev);