root / hw / pci_bridge.c @ ca22a3a3
History | View | Annotate | Download (9.4 kB)
1 | 783753fd | Isaku Yamahata | /*
|
---|---|---|---|
2 | 783753fd | Isaku Yamahata | * QEMU PCI bus manager
|
3 | 783753fd | Isaku Yamahata | *
|
4 | 783753fd | Isaku Yamahata | * Copyright (c) 2004 Fabrice Bellard
|
5 | 783753fd | Isaku Yamahata | *
|
6 | 783753fd | Isaku Yamahata | * Permission is hereby granted, free of charge, to any person obtaining a copy
|
7 | 783753fd | Isaku Yamahata | * of this software and associated documentation files (the "Software"), to dea
|
8 | 783753fd | Isaku Yamahata | |
9 | 783753fd | Isaku Yamahata | * in the Software without restriction, including without limitation the rights
|
10 | 783753fd | Isaku Yamahata | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11 | 783753fd | Isaku Yamahata | * copies of the Software, and to permit persons to whom the Software is
|
12 | 783753fd | Isaku Yamahata | * furnished to do so, subject to the following conditions:
|
13 | 783753fd | Isaku Yamahata | *
|
14 | 783753fd | Isaku Yamahata | * The above copyright notice and this permission notice shall be included in
|
15 | 783753fd | Isaku Yamahata | * all copies or substantial portions of the Software.
|
16 | 783753fd | Isaku Yamahata | *
|
17 | 783753fd | Isaku Yamahata | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18 | 783753fd | Isaku Yamahata | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19 | 783753fd | Isaku Yamahata | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
20 | 783753fd | Isaku Yamahata | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21 | 783753fd | Isaku Yamahata | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM
|
22 | 783753fd | Isaku Yamahata | |
23 | 783753fd | Isaku Yamahata | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
24 | 783753fd | Isaku Yamahata | * THE SOFTWARE.
|
25 | 783753fd | Isaku Yamahata | */
|
26 | 783753fd | Isaku Yamahata | /*
|
27 | 783753fd | Isaku Yamahata | * split out from pci.c
|
28 | 783753fd | Isaku Yamahata | * Copyright (c) 2010 Isaku Yamahata <yamahata at valinux co jp>
|
29 | 783753fd | Isaku Yamahata | * VA Linux Systems Japan K.K.
|
30 | 783753fd | Isaku Yamahata | */
|
31 | 783753fd | Isaku Yamahata | |
32 | 783753fd | Isaku Yamahata | #include "pci_bridge.h" |
33 | 783753fd | Isaku Yamahata | #include "pci_internals.h" |
34 | 5afb9869 | Blue Swirl | #include "range.h" |
35 | 783753fd | Isaku Yamahata | |
36 | f4c817e0 | Isaku Yamahata | /* PCI bridge subsystem vendor ID helper functions */
|
37 | f4c817e0 | Isaku Yamahata | #define PCI_SSVID_SIZEOF 8 |
38 | f4c817e0 | Isaku Yamahata | #define PCI_SSVID_SVID 4 |
39 | f4c817e0 | Isaku Yamahata | #define PCI_SSVID_SSID 6 |
40 | f4c817e0 | Isaku Yamahata | |
41 | f4c817e0 | Isaku Yamahata | int pci_bridge_ssvid_init(PCIDevice *dev, uint8_t offset,
|
42 | f4c817e0 | Isaku Yamahata | uint16_t svid, uint16_t ssid) |
43 | f4c817e0 | Isaku Yamahata | { |
44 | f4c817e0 | Isaku Yamahata | int pos;
|
45 | f4c817e0 | Isaku Yamahata | pos = pci_add_capability(dev, PCI_CAP_ID_SSVID, offset, PCI_SSVID_SIZEOF); |
46 | f4c817e0 | Isaku Yamahata | if (pos < 0) { |
47 | f4c817e0 | Isaku Yamahata | return pos;
|
48 | f4c817e0 | Isaku Yamahata | } |
49 | f4c817e0 | Isaku Yamahata | |
50 | f4c817e0 | Isaku Yamahata | pci_set_word(dev->config + pos + PCI_SSVID_SVID, svid); |
51 | f4c817e0 | Isaku Yamahata | pci_set_word(dev->config + pos + PCI_SSVID_SSID, ssid); |
52 | f4c817e0 | Isaku Yamahata | return pos;
|
53 | f4c817e0 | Isaku Yamahata | } |
54 | f4c817e0 | Isaku Yamahata | |
55 | 68f79994 | Isaku Yamahata | /* Accessor function to get parent bridge device from pci bus. */
|
56 | 783753fd | Isaku Yamahata | PCIDevice *pci_bridge_get_device(PCIBus *bus) |
57 | 783753fd | Isaku Yamahata | { |
58 | 783753fd | Isaku Yamahata | return bus->parent_dev;
|
59 | 783753fd | Isaku Yamahata | } |
60 | 783753fd | Isaku Yamahata | |
61 | 68f79994 | Isaku Yamahata | /* Accessor function to get secondary bus from pci-to-pci bridge device */
|
62 | 68f79994 | Isaku Yamahata | PCIBus *pci_bridge_get_sec_bus(PCIBridge *br) |
63 | 68f79994 | Isaku Yamahata | { |
64 | 68f79994 | Isaku Yamahata | return &br->sec_bus;
|
65 | 68f79994 | Isaku Yamahata | } |
66 | 68f79994 | Isaku Yamahata | |
67 | 68f79994 | Isaku Yamahata | static uint32_t pci_config_get_io_base(const PCIDevice *d, |
68 | 783753fd | Isaku Yamahata | uint32_t base, uint32_t base_upper16) |
69 | 783753fd | Isaku Yamahata | { |
70 | 783753fd | Isaku Yamahata | uint32_t val; |
71 | 783753fd | Isaku Yamahata | |
72 | 783753fd | Isaku Yamahata | val = ((uint32_t)d->config[base] & PCI_IO_RANGE_MASK) << 8;
|
73 | 783753fd | Isaku Yamahata | if (d->config[base] & PCI_IO_RANGE_TYPE_32) {
|
74 | 783753fd | Isaku Yamahata | val |= (uint32_t)pci_get_word(d->config + base_upper16) << 16;
|
75 | 783753fd | Isaku Yamahata | } |
76 | 783753fd | Isaku Yamahata | return val;
|
77 | 783753fd | Isaku Yamahata | } |
78 | 783753fd | Isaku Yamahata | |
79 | 68f79994 | Isaku Yamahata | static pcibus_t pci_config_get_memory_base(const PCIDevice *d, uint32_t base) |
80 | 783753fd | Isaku Yamahata | { |
81 | 783753fd | Isaku Yamahata | return ((pcibus_t)pci_get_word(d->config + base) & PCI_MEMORY_RANGE_MASK)
|
82 | 783753fd | Isaku Yamahata | << 16;
|
83 | 783753fd | Isaku Yamahata | } |
84 | 783753fd | Isaku Yamahata | |
85 | 68f79994 | Isaku Yamahata | static pcibus_t pci_config_get_pref_base(const PCIDevice *d, |
86 | 783753fd | Isaku Yamahata | uint32_t base, uint32_t upper) |
87 | 783753fd | Isaku Yamahata | { |
88 | 783753fd | Isaku Yamahata | pcibus_t tmp; |
89 | 783753fd | Isaku Yamahata | pcibus_t val; |
90 | 783753fd | Isaku Yamahata | |
91 | 783753fd | Isaku Yamahata | tmp = (pcibus_t)pci_get_word(d->config + base); |
92 | 783753fd | Isaku Yamahata | val = (tmp & PCI_PREF_RANGE_MASK) << 16;
|
93 | 783753fd | Isaku Yamahata | if (tmp & PCI_PREF_RANGE_TYPE_64) {
|
94 | 783753fd | Isaku Yamahata | val |= (pcibus_t)pci_get_long(d->config + upper) << 32;
|
95 | 783753fd | Isaku Yamahata | } |
96 | 783753fd | Isaku Yamahata | return val;
|
97 | 783753fd | Isaku Yamahata | } |
98 | 783753fd | Isaku Yamahata | |
99 | 68f79994 | Isaku Yamahata | /* accessor function to get bridge filtering base address */
|
100 | 68f79994 | Isaku Yamahata | pcibus_t pci_bridge_get_base(const PCIDevice *bridge, uint8_t type)
|
101 | 783753fd | Isaku Yamahata | { |
102 | 783753fd | Isaku Yamahata | pcibus_t base; |
103 | 783753fd | Isaku Yamahata | if (type & PCI_BASE_ADDRESS_SPACE_IO) {
|
104 | 783753fd | Isaku Yamahata | base = pci_config_get_io_base(bridge, |
105 | 783753fd | Isaku Yamahata | PCI_IO_BASE, PCI_IO_BASE_UPPER16); |
106 | 783753fd | Isaku Yamahata | } else {
|
107 | 783753fd | Isaku Yamahata | if (type & PCI_BASE_ADDRESS_MEM_PREFETCH) {
|
108 | 783753fd | Isaku Yamahata | base = pci_config_get_pref_base( |
109 | 783753fd | Isaku Yamahata | bridge, PCI_PREF_MEMORY_BASE, PCI_PREF_BASE_UPPER32); |
110 | 783753fd | Isaku Yamahata | } else {
|
111 | 783753fd | Isaku Yamahata | base = pci_config_get_memory_base(bridge, PCI_MEMORY_BASE); |
112 | 783753fd | Isaku Yamahata | } |
113 | 783753fd | Isaku Yamahata | } |
114 | 783753fd | Isaku Yamahata | |
115 | 783753fd | Isaku Yamahata | return base;
|
116 | 783753fd | Isaku Yamahata | } |
117 | 783753fd | Isaku Yamahata | |
118 | 68f79994 | Isaku Yamahata | /* accessor funciton to get bridge filtering limit */
|
119 | 68f79994 | Isaku Yamahata | pcibus_t pci_bridge_get_limit(const PCIDevice *bridge, uint8_t type)
|
120 | 783753fd | Isaku Yamahata | { |
121 | 783753fd | Isaku Yamahata | pcibus_t limit; |
122 | 783753fd | Isaku Yamahata | if (type & PCI_BASE_ADDRESS_SPACE_IO) {
|
123 | 783753fd | Isaku Yamahata | limit = pci_config_get_io_base(bridge, |
124 | 783753fd | Isaku Yamahata | PCI_IO_LIMIT, PCI_IO_LIMIT_UPPER16); |
125 | 783753fd | Isaku Yamahata | limit |= 0xfff; /* PCI bridge spec 3.2.5.6. */ |
126 | 783753fd | Isaku Yamahata | } else {
|
127 | 783753fd | Isaku Yamahata | if (type & PCI_BASE_ADDRESS_MEM_PREFETCH) {
|
128 | 783753fd | Isaku Yamahata | limit = pci_config_get_pref_base( |
129 | 783753fd | Isaku Yamahata | bridge, PCI_PREF_MEMORY_LIMIT, PCI_PREF_LIMIT_UPPER32); |
130 | 783753fd | Isaku Yamahata | } else {
|
131 | 783753fd | Isaku Yamahata | limit = pci_config_get_memory_base(bridge, PCI_MEMORY_LIMIT); |
132 | 783753fd | Isaku Yamahata | } |
133 | 783753fd | Isaku Yamahata | limit |= 0xfffff; /* PCI bridge spec 3.2.5.{1, 8}. */ |
134 | 783753fd | Isaku Yamahata | } |
135 | 783753fd | Isaku Yamahata | return limit;
|
136 | 783753fd | Isaku Yamahata | } |
137 | 783753fd | Isaku Yamahata | |
138 | 68f79994 | Isaku Yamahata | /* default write_config function for PCI-to-PCI bridge */
|
139 | 68f79994 | Isaku Yamahata | void pci_bridge_write_config(PCIDevice *d,
|
140 | 783753fd | Isaku Yamahata | uint32_t address, uint32_t val, int len)
|
141 | 783753fd | Isaku Yamahata | { |
142 | a5fce077 | Isaku Yamahata | PCIBridge *s = container_of(d, PCIBridge, dev); |
143 | a5fce077 | Isaku Yamahata | uint16_t oldctl = pci_get_word(d->config + PCI_BRIDGE_CONTROL); |
144 | a5fce077 | Isaku Yamahata | uint16_t newctl; |
145 | a5fce077 | Isaku Yamahata | |
146 | 783753fd | Isaku Yamahata | pci_default_write_config(d, address, val, len); |
147 | 783753fd | Isaku Yamahata | |
148 | 783753fd | Isaku Yamahata | if (/* io base/limit */ |
149 | 783753fd | Isaku Yamahata | ranges_overlap(address, len, PCI_IO_BASE, 2) ||
|
150 | 783753fd | Isaku Yamahata | |
151 | 783753fd | Isaku Yamahata | /* memory base/limit, prefetchable base/limit and
|
152 | 783753fd | Isaku Yamahata | io base/limit upper 16 */
|
153 | 783753fd | Isaku Yamahata | ranges_overlap(address, len, PCI_MEMORY_BASE, 20)) {
|
154 | 7e98e3af | Isaku Yamahata | pci_bridge_update_mappings(&s->sec_bus); |
155 | 783753fd | Isaku Yamahata | } |
156 | a5fce077 | Isaku Yamahata | |
157 | a5fce077 | Isaku Yamahata | newctl = pci_get_word(d->config + PCI_BRIDGE_CONTROL); |
158 | a5fce077 | Isaku Yamahata | if (~oldctl & newctl & PCI_BRIDGE_CTL_BUS_RESET) {
|
159 | a5fce077 | Isaku Yamahata | /* Trigger hot reset on 0->1 transition. */
|
160 | a5fce077 | Isaku Yamahata | pci_bus_reset(&s->sec_bus); |
161 | a5fce077 | Isaku Yamahata | } |
162 | 783753fd | Isaku Yamahata | } |
163 | 783753fd | Isaku Yamahata | |
164 | 0208def1 | Isaku Yamahata | void pci_bridge_disable_base_limit(PCIDevice *dev)
|
165 | 0208def1 | Isaku Yamahata | { |
166 | 0208def1 | Isaku Yamahata | uint8_t *conf = dev->config; |
167 | 0208def1 | Isaku Yamahata | |
168 | 0208def1 | Isaku Yamahata | pci_byte_test_and_set_mask(conf + PCI_IO_BASE, |
169 | 0208def1 | Isaku Yamahata | PCI_IO_RANGE_MASK & 0xff);
|
170 | 0208def1 | Isaku Yamahata | pci_byte_test_and_clear_mask(conf + PCI_IO_LIMIT, |
171 | 0208def1 | Isaku Yamahata | PCI_IO_RANGE_MASK & 0xff);
|
172 | 0208def1 | Isaku Yamahata | pci_word_test_and_set_mask(conf + PCI_MEMORY_BASE, |
173 | 0208def1 | Isaku Yamahata | PCI_MEMORY_RANGE_MASK & 0xffff);
|
174 | 0208def1 | Isaku Yamahata | pci_word_test_and_clear_mask(conf + PCI_MEMORY_LIMIT, |
175 | 0208def1 | Isaku Yamahata | PCI_MEMORY_RANGE_MASK & 0xffff);
|
176 | 0208def1 | Isaku Yamahata | pci_word_test_and_set_mask(conf + PCI_PREF_MEMORY_BASE, |
177 | 0208def1 | Isaku Yamahata | PCI_PREF_RANGE_MASK & 0xffff);
|
178 | 0208def1 | Isaku Yamahata | pci_word_test_and_clear_mask(conf + PCI_PREF_MEMORY_LIMIT, |
179 | 0208def1 | Isaku Yamahata | PCI_PREF_RANGE_MASK & 0xffff);
|
180 | 0208def1 | Isaku Yamahata | pci_set_word(conf + PCI_PREF_BASE_UPPER32, 0);
|
181 | 0208def1 | Isaku Yamahata | pci_set_word(conf + PCI_PREF_LIMIT_UPPER32, 0);
|
182 | 0208def1 | Isaku Yamahata | } |
183 | 0208def1 | Isaku Yamahata | |
184 | 68f79994 | Isaku Yamahata | /* reset bridge specific configuration registers */
|
185 | 68f79994 | Isaku Yamahata | void pci_bridge_reset_reg(PCIDevice *dev)
|
186 | 68f79994 | Isaku Yamahata | { |
187 | 68f79994 | Isaku Yamahata | uint8_t *conf = dev->config; |
188 | 68f79994 | Isaku Yamahata | |
189 | 68f79994 | Isaku Yamahata | conf[PCI_PRIMARY_BUS] = 0;
|
190 | 68f79994 | Isaku Yamahata | conf[PCI_SECONDARY_BUS] = 0;
|
191 | 68f79994 | Isaku Yamahata | conf[PCI_SUBORDINATE_BUS] = 0;
|
192 | 68f79994 | Isaku Yamahata | conf[PCI_SEC_LATENCY_TIMER] = 0;
|
193 | 68f79994 | Isaku Yamahata | |
194 | 0208def1 | Isaku Yamahata | /*
|
195 | 0208def1 | Isaku Yamahata | * the default values for base/limit registers aren't specified
|
196 | 0208def1 | Isaku Yamahata | * in the PCI-to-PCI-bridge spec. So we don't thouch them here.
|
197 | 0208def1 | Isaku Yamahata | * Each implementation can override it.
|
198 | 0208def1 | Isaku Yamahata | * typical implementation does
|
199 | 0208def1 | Isaku Yamahata | * zero base/limit registers or
|
200 | 0208def1 | Isaku Yamahata | * disable forwarding: pci_bridge_disable_base_limit()
|
201 | 0208def1 | Isaku Yamahata | * If disable forwarding is wanted, call pci_bridge_disable_base_limit()
|
202 | 0208def1 | Isaku Yamahata | * after this function.
|
203 | 0208def1 | Isaku Yamahata | */
|
204 | 0208def1 | Isaku Yamahata | pci_byte_test_and_clear_mask(conf + PCI_IO_BASE, |
205 | 0208def1 | Isaku Yamahata | PCI_IO_RANGE_MASK & 0xff);
|
206 | 0208def1 | Isaku Yamahata | pci_byte_test_and_clear_mask(conf + PCI_IO_LIMIT, |
207 | 0208def1 | Isaku Yamahata | PCI_IO_RANGE_MASK & 0xff);
|
208 | 0208def1 | Isaku Yamahata | pci_word_test_and_clear_mask(conf + PCI_MEMORY_BASE, |
209 | 0208def1 | Isaku Yamahata | PCI_MEMORY_RANGE_MASK & 0xffff);
|
210 | 0208def1 | Isaku Yamahata | pci_word_test_and_clear_mask(conf + PCI_MEMORY_LIMIT, |
211 | 0208def1 | Isaku Yamahata | PCI_MEMORY_RANGE_MASK & 0xffff);
|
212 | 0208def1 | Isaku Yamahata | pci_word_test_and_clear_mask(conf + PCI_PREF_MEMORY_BASE, |
213 | 0208def1 | Isaku Yamahata | PCI_PREF_RANGE_MASK & 0xffff);
|
214 | 0208def1 | Isaku Yamahata | pci_word_test_and_clear_mask(conf + PCI_PREF_MEMORY_LIMIT, |
215 | 0208def1 | Isaku Yamahata | PCI_PREF_RANGE_MASK & 0xffff);
|
216 | 68f79994 | Isaku Yamahata | pci_set_word(conf + PCI_PREF_BASE_UPPER32, 0);
|
217 | 68f79994 | Isaku Yamahata | pci_set_word(conf + PCI_PREF_LIMIT_UPPER32, 0);
|
218 | 68f79994 | Isaku Yamahata | |
219 | 68f79994 | Isaku Yamahata | pci_set_word(conf + PCI_BRIDGE_CONTROL, 0);
|
220 | 68f79994 | Isaku Yamahata | } |
221 | 68f79994 | Isaku Yamahata | |
222 | 68f79994 | Isaku Yamahata | /* default reset function for PCI-to-PCI bridge */
|
223 | 68f79994 | Isaku Yamahata | void pci_bridge_reset(DeviceState *qdev)
|
224 | 783753fd | Isaku Yamahata | { |
225 | 68f79994 | Isaku Yamahata | PCIDevice *dev = DO_UPCAST(PCIDevice, qdev, qdev); |
226 | 68f79994 | Isaku Yamahata | pci_bridge_reset_reg(dev); |
227 | 68f79994 | Isaku Yamahata | } |
228 | 783753fd | Isaku Yamahata | |
229 | 68f79994 | Isaku Yamahata | /* default qdev initialization function for PCI-to-PCI bridge */
|
230 | 68f79994 | Isaku Yamahata | int pci_bridge_initfn(PCIDevice *dev)
|
231 | 68f79994 | Isaku Yamahata | { |
232 | 68f79994 | Isaku Yamahata | PCIBus *parent = dev->bus; |
233 | 68f79994 | Isaku Yamahata | PCIBridge *br = DO_UPCAST(PCIBridge, dev, dev); |
234 | 68f79994 | Isaku Yamahata | PCIBus *sec_bus = &br->sec_bus; |
235 | 783753fd | Isaku Yamahata | |
236 | 783753fd | Isaku Yamahata | pci_set_word(dev->config + PCI_STATUS, |
237 | 783753fd | Isaku Yamahata | PCI_STATUS_66MHZ | PCI_STATUS_FAST_BACK); |
238 | 783753fd | Isaku Yamahata | pci_config_set_class(dev->config, PCI_CLASS_BRIDGE_PCI); |
239 | 783753fd | Isaku Yamahata | dev->config[PCI_HEADER_TYPE] = |
240 | 783753fd | Isaku Yamahata | (dev->config[PCI_HEADER_TYPE] & PCI_HEADER_TYPE_MULTI_FUNCTION) | |
241 | 783753fd | Isaku Yamahata | PCI_HEADER_TYPE_BRIDGE; |
242 | 783753fd | Isaku Yamahata | pci_set_word(dev->config + PCI_SEC_STATUS, |
243 | 783753fd | Isaku Yamahata | PCI_STATUS_66MHZ | PCI_STATUS_FAST_BACK); |
244 | 68f79994 | Isaku Yamahata | |
245 | 68f79994 | Isaku Yamahata | qbus_create_inplace(&sec_bus->qbus, &pci_bus_info, &dev->qdev, |
246 | 68f79994 | Isaku Yamahata | br->bus_name); |
247 | 68f79994 | Isaku Yamahata | sec_bus->parent_dev = dev; |
248 | 68f79994 | Isaku Yamahata | sec_bus->map_irq = br->map_irq; |
249 | 68f79994 | Isaku Yamahata | |
250 | 68f79994 | Isaku Yamahata | QLIST_INIT(&sec_bus->child); |
251 | 68f79994 | Isaku Yamahata | QLIST_INSERT_HEAD(&parent->child, sec_bus, sibling); |
252 | 783753fd | Isaku Yamahata | return 0; |
253 | 783753fd | Isaku Yamahata | } |
254 | 783753fd | Isaku Yamahata | |
255 | 68f79994 | Isaku Yamahata | /* default qdev clean up function for PCI-to-PCI bridge */
|
256 | 68f79994 | Isaku Yamahata | int pci_bridge_exitfn(PCIDevice *pci_dev)
|
257 | 783753fd | Isaku Yamahata | { |
258 | 783753fd | Isaku Yamahata | PCIBridge *s = DO_UPCAST(PCIBridge, dev, pci_dev); |
259 | 51a92333 | Isaku Yamahata | assert(QLIST_EMPTY(&s->sec_bus.child)); |
260 | 51a92333 | Isaku Yamahata | QLIST_REMOVE(&s->sec_bus, sibling); |
261 | 68f79994 | Isaku Yamahata | /* qbus_free() is called automatically by qdev_free() */
|
262 | 783753fd | Isaku Yamahata | return 0; |
263 | 783753fd | Isaku Yamahata | } |
264 | 783753fd | Isaku Yamahata | |
265 | 68f79994 | Isaku Yamahata | /*
|
266 | 68f79994 | Isaku Yamahata | * before qdev initialization(qdev_init()), this function sets bus_name and
|
267 | 68f79994 | Isaku Yamahata | * map_irq callback which are necessry for pci_bridge_initfn() to
|
268 | 68f79994 | Isaku Yamahata | * initialize bus.
|
269 | 68f79994 | Isaku Yamahata | */
|
270 | 68f79994 | Isaku Yamahata | void pci_bridge_map_irq(PCIBridge *br, const char* bus_name, |
271 | 68f79994 | Isaku Yamahata | pci_map_irq_fn map_irq) |
272 | 783753fd | Isaku Yamahata | { |
273 | 68f79994 | Isaku Yamahata | br->map_irq = map_irq; |
274 | 68f79994 | Isaku Yamahata | br->bus_name = bus_name; |
275 | 783753fd | Isaku Yamahata | } |