~fboudra/qemu-linaro/new-upstream-release-1.2.0-2012.09-0ubuntu1

« back to all changes in this revision

Viewing changes to hw/xen-host-pci-device.h

  • Committer: Fathi Boudra
  • Author(s): Fathi Boudra
  • Date: 2012-08-21 06:47:11 UTC
  • mfrom: (0.1.16)
  • Revision ID: fathi.boudra@linaro.org-20120821064711-7yxmubp2v8a44xce
Tags: 1.1.50-2012.08-0ubuntu1
* New upstream release.
  - support emulated systems with more than 2G of memory. (LP: #1030588)
* Drop powerpc-missing-include.patch - merged upstream.
* Update debian/control: 
  - drop perl build dependency.
  - add libfdt-dev build dependency.
* Update debian/qemu-keymaps.install file.
* Update debian/rules:
  - update QEMU_CPU for ARM architecture: armv4l -> armv7l.
  - update conf_audio_drv: default to PulseAudio since PA is the default on
    Ubuntu.
  - enable KVM on ARM architecture.
  - enable flat device tree support (--enable-fdt). (LP: #1030594)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef XEN_HOST_PCI_DEVICE_H
 
2
#define XEN_HOST_PCI_DEVICE_H
 
3
 
 
4
#include "pci.h"
 
5
 
 
6
enum {
 
7
    XEN_HOST_PCI_REGION_TYPE_IO = 1 << 1,
 
8
    XEN_HOST_PCI_REGION_TYPE_MEM = 1 << 2,
 
9
    XEN_HOST_PCI_REGION_TYPE_PREFETCH = 1 << 3,
 
10
    XEN_HOST_PCI_REGION_TYPE_MEM_64 = 1 << 4,
 
11
};
 
12
 
 
13
typedef struct XenHostPCIIORegion {
 
14
    pcibus_t base_addr;
 
15
    pcibus_t size;
 
16
    uint8_t type;
 
17
    uint8_t bus_flags; /* Bus-specific bits */
 
18
} XenHostPCIIORegion;
 
19
 
 
20
typedef struct XenHostPCIDevice {
 
21
    uint16_t domain;
 
22
    uint8_t bus;
 
23
    uint8_t dev;
 
24
    uint8_t func;
 
25
 
 
26
    uint16_t vendor_id;
 
27
    uint16_t device_id;
 
28
    int irq;
 
29
 
 
30
    XenHostPCIIORegion io_regions[PCI_NUM_REGIONS - 1];
 
31
    XenHostPCIIORegion rom;
 
32
 
 
33
    bool is_virtfn;
 
34
 
 
35
    int config_fd;
 
36
} XenHostPCIDevice;
 
37
 
 
38
int xen_host_pci_device_get(XenHostPCIDevice *d, uint16_t domain,
 
39
                            uint8_t bus, uint8_t dev, uint8_t func);
 
40
void xen_host_pci_device_put(XenHostPCIDevice *pci_dev);
 
41
 
 
42
int xen_host_pci_get_byte(XenHostPCIDevice *d, int pos, uint8_t *p);
 
43
int xen_host_pci_get_word(XenHostPCIDevice *d, int pos, uint16_t *p);
 
44
int xen_host_pci_get_long(XenHostPCIDevice *d, int pos, uint32_t *p);
 
45
int xen_host_pci_get_block(XenHostPCIDevice *d, int pos, uint8_t *buf,
 
46
                           int len);
 
47
int xen_host_pci_set_byte(XenHostPCIDevice *d, int pos, uint8_t data);
 
48
int xen_host_pci_set_word(XenHostPCIDevice *d, int pos, uint16_t data);
 
49
int xen_host_pci_set_long(XenHostPCIDevice *d, int pos, uint32_t data);
 
50
int xen_host_pci_set_block(XenHostPCIDevice *d, int pos, uint8_t *buf,
 
51
                           int len);
 
52
 
 
53
int xen_host_pci_find_ext_cap_offset(XenHostPCIDevice *s, uint32_t cap);
 
54
 
 
55
#endif /* !XEN_HOST_PCI_DEVICE_H_ */