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"
13 #include "vmware_vga.h"
17 /* PCI IO reads/writes, to byte-word addressable memory. */
18 /* ??? Doesn't handle multiple PCI busses. */
20 static uint64_t bw_io_read(void *opaque
, target_phys_addr_t addr
, unsigned size
)
33 static void bw_io_write(void *opaque
, target_phys_addr_t addr
,
34 uint64_t val
, unsigned size
)
51 const MemoryRegionOps alpha_pci_bw_io_ops
= {
54 .endianness
= DEVICE_LITTLE_ENDIAN
,
61 /* PCI config space reads/writes, to byte-word addressable memory. */
62 static uint64_t bw_conf1_read(void *opaque
, target_phys_addr_t addr
,
66 return pci_data_read(b
, addr
, size
);
69 static void bw_conf1_write(void *opaque
, target_phys_addr_t addr
,
70 uint64_t val
, unsigned size
)
73 pci_data_write(b
, addr
, val
, size
);
76 const MemoryRegionOps alpha_pci_conf1_ops
= {
77 .read
= bw_conf1_read
,
78 .write
= bw_conf1_write
,
79 .endianness
= DEVICE_LITTLE_ENDIAN
,
86 /* PCI/EISA Interrupt Acknowledge Cycle. */
88 static uint64_t iack_read(void *opaque
, target_phys_addr_t addr
, unsigned size
)
90 return pic_read_irq(isa_pic
);
93 static void special_write(void *opaque
, target_phys_addr_t addr
,
94 uint64_t val
, unsigned size
)
96 qemu_log("pci: special write cycle");
99 const MemoryRegionOps alpha_pci_iack_ops
= {
101 .write
= special_write
,
102 .endianness
= DEVICE_LITTLE_ENDIAN
,
104 .min_access_size
= 4,
105 .max_access_size
= 4,
108 .min_access_size
= 4,
109 .max_access_size
= 4,
113 void alpha_pci_vga_setup(PCIBus
*pci_bus
)
115 switch (vga_interface_type
) {
118 pci_create_simple(pci_bus
, -1, "qxl-vga");
122 pci_cirrus_vga_init(pci_bus
);
125 pci_vmsvga_init(pci_bus
);
128 /* If VGA is enabled at all, and one of the above didn't work, then
129 fallback to Standard VGA. */
130 if (vga_interface_type
!= VGA_NONE
) {
131 pci_vga_init(pci_bus
);