1 /****************************************************************************
2 * (c) 2004 - Rolf Neugebauer - Intel Research Cambridge
3 * (c) 2004 - Keir Fraser - University of Cambridge
4 ****************************************************************************
5 * Description: Interface for domains to access physical devices on the PCI bus
8 #ifndef __XEN_PUBLIC_PHYSDEV_H__
9 #define __XEN_PUBLIC_PHYSDEV_H__
11 /* Commands to HYPERVISOR_physdev_op() */
12 #define PHYSDEVOP_PCI_CFGREG_READ 0
13 #define PHYSDEVOP_PCI_CFGREG_WRITE 1
14 #define PHYSDEVOP_PCI_INITIALISE_DEVICE 2
15 #define PHYSDEVOP_PCI_PROBE_ROOT_BUSES 3
16 #define PHYSDEVOP_IRQ_UNMASK_NOTIFY 4
17 #define PHYSDEVOP_IRQ_STATUS_QUERY 5
18 #define PHYSDEVOP_SET_IOPL 6
19 #define PHYSDEVOP_SET_IOBITMAP 7
21 /* Read from PCI configuration space. */
31 } PACKED physdevop_pci_cfgreg_read_t; /* 24 bytes */
33 /* Write to PCI configuration space. */
42 } PACKED physdevop_pci_cfgreg_write_t; /* 24 bytes */
44 /* Do final initialisation of a PCI device (e.g., last-moment IRQ routing). */
50 } PACKED physdevop_pci_initialise_device_t; /* 12 bytes */
52 /* Find the root buses for subsequent scanning. */
55 u32 busmask[256/32]; /* 0 */
56 } PACKED physdevop_pci_probe_root_buses_t; /* 32 bytes */
62 /* Need to call PHYSDEVOP_IRQ_UNMASK_NOTIFY when the IRQ has been serviced? */
63 #define PHYSDEVOP_IRQ_NEEDS_UNMASK_NOTIFY (1<<0)
65 } PACKED physdevop_irq_status_query_t; /* 8 bytes */
70 } PACKED physdevop_set_iopl_t; /* 4 bytes */
74 memory_t bitmap; /* 0 */
78 } PACKED physdevop_set_iobitmap_t; /* 16 bytes */
80 typedef struct _physdev_op_st
85 physdevop_pci_cfgreg_read_t pci_cfgreg_read;
86 physdevop_pci_cfgreg_write_t pci_cfgreg_write;
87 physdevop_pci_initialise_device_t pci_initialise_device;
88 physdevop_pci_probe_root_buses_t pci_probe_root_buses;
89 physdevop_irq_status_query_t irq_status_query;
90 physdevop_set_iopl_t set_iopl;
91 physdevop_set_iobitmap_t set_iobitmap;
94 } PACKED physdev_op_t; /* 40 bytes */
96 #endif /* __XEN_PUBLIC_PHYSDEV_H__ */
104 * indent-tabs-mode: nil