root / hw / pci_host.h @ 3ced9f7a
History | View | Annotate | Download (1.9 kB)
1 | 502a5395 | pbrook | /*
|
---|---|---|---|
2 | 502a5395 | pbrook | * QEMU Common PCI Host bridge configuration data space access routines.
|
3 | 502a5395 | pbrook | *
|
4 | 502a5395 | pbrook | * Copyright (c) 2006 Fabrice Bellard
|
5 | 5fafdf24 | ths | *
|
6 | 502a5395 | pbrook | * Permission is hereby granted, free of charge, to any person obtaining a copy
|
7 | 502a5395 | pbrook | * of this software and associated documentation files (the "Software"), to deal
|
8 | 502a5395 | pbrook | * in the Software without restriction, including without limitation the rights
|
9 | 502a5395 | pbrook | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10 | 502a5395 | pbrook | * copies of the Software, and to permit persons to whom the Software is
|
11 | 502a5395 | pbrook | * furnished to do so, subject to the following conditions:
|
12 | 502a5395 | pbrook | *
|
13 | 502a5395 | pbrook | * The above copyright notice and this permission notice shall be included in
|
14 | 502a5395 | pbrook | * all copies or substantial portions of the Software.
|
15 | 502a5395 | pbrook | *
|
16 | 502a5395 | pbrook | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17 | 502a5395 | pbrook | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18 | 502a5395 | pbrook | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
19 | 502a5395 | pbrook | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20 | 502a5395 | pbrook | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21 | 502a5395 | pbrook | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22 | 502a5395 | pbrook | * THE SOFTWARE.
|
23 | 502a5395 | pbrook | */
|
24 | 502a5395 | pbrook | |
25 | 502a5395 | pbrook | /* Worker routines for a PCI host controller that uses an {address,data}
|
26 | 502a5395 | pbrook | register pair to access PCI configuration space. */
|
27 | 502a5395 | pbrook | |
28 | 4f5e19e6 | Isaku Yamahata | #ifndef PCI_HOST_H
|
29 | 4f5e19e6 | Isaku Yamahata | #define PCI_HOST_H
|
30 | 8026037b | blueswir1 | |
31 | 8a14daa5 | Gerd Hoffmann | #include "sysbus.h" |
32 | 8a14daa5 | Gerd Hoffmann | |
33 | fb47a2e9 | Isaku Yamahata | struct PCIHostState {
|
34 | 8a14daa5 | Gerd Hoffmann | SysBusDevice busdev; |
35 | 502a5395 | pbrook | uint32_t config_reg; |
36 | 502a5395 | pbrook | PCIBus *bus; |
37 | fb47a2e9 | Isaku Yamahata | }; |
38 | 502a5395 | pbrook | |
39 | b6243d99 | Isaku Yamahata | void pci_data_write(PCIBus *s, uint32_t addr, uint32_t val, int len); |
40 | b6243d99 | Isaku Yamahata | uint32_t pci_data_read(PCIBus *s, uint32_t addr, int len);
|
41 | b6243d99 | Isaku Yamahata | |
42 | 4f5e19e6 | Isaku Yamahata | /* for mmio */
|
43 | f08b32fe | Isaku Yamahata | int pci_host_conf_register_mmio(PCIHostState *s);
|
44 | f08b32fe | Isaku Yamahata | int pci_host_conf_register_mmio_noswap(PCIHostState *s);
|
45 | f08b32fe | Isaku Yamahata | int pci_host_data_register_mmio(PCIHostState *s);
|
46 | 502a5395 | pbrook | |
47 | 4f5e19e6 | Isaku Yamahata | /* for ioio */
|
48 | f08b32fe | Isaku Yamahata | void pci_host_conf_register_ioport(pio_addr_t ioport, PCIHostState *s);
|
49 | 4f5e19e6 | Isaku Yamahata | void pci_host_data_register_ioport(pio_addr_t ioport, PCIHostState *s);
|
50 | 502a5395 | pbrook | |
51 | 4f5e19e6 | Isaku Yamahata | #endif /* PCI_HOST_H */ |