2 * QEMU Alpha PCI support functions.
4 * Some of this isn't very Alpha specific at all.
6 * ??? Sparse memory access not implemented.
10 #include "alpha_sys.h"
15 /* PCI IO reads/writes, to byte-word addressable memory. */
16 /* ??? Doesn't handle multiple PCI busses. */
18 static uint64_t bw_io_read(void *opaque
, target_phys_addr_t addr
, unsigned size
)
31 static void bw_io_write(void *opaque
, target_phys_addr_t addr
,
32 uint64_t val
, unsigned size
)
49 const MemoryRegionOps alpha_pci_bw_io_ops
= {
52 .endianness
= DEVICE_LITTLE_ENDIAN
,
59 /* PCI config space reads/writes, to byte-word addressable memory. */
60 static uint64_t bw_conf1_read(void *opaque
, target_phys_addr_t addr
,
64 return pci_data_read(b
, addr
, size
);
67 static void bw_conf1_write(void *opaque
, target_phys_addr_t addr
,
68 uint64_t val
, unsigned size
)
71 pci_data_write(b
, addr
, val
, size
);
74 const MemoryRegionOps alpha_pci_conf1_ops
= {
75 .read
= bw_conf1_read
,
76 .write
= bw_conf1_write
,
77 .endianness
= DEVICE_LITTLE_ENDIAN
,
84 /* PCI/EISA Interrupt Acknowledge Cycle. */
86 static uint64_t iack_read(void *opaque
, target_phys_addr_t addr
, unsigned size
)
88 return pic_read_irq(isa_pic
);
91 static void special_write(void *opaque
, target_phys_addr_t addr
,
92 uint64_t val
, unsigned size
)
94 qemu_log("pci: special write cycle");
97 const MemoryRegionOps alpha_pci_iack_ops
= {
99 .write
= special_write
,
100 .endianness
= DEVICE_LITTLE_ENDIAN
,
102 .min_access_size
= 4,
103 .max_access_size
= 4,
106 .min_access_size
= 4,
107 .max_access_size
= 4,