Revision e7b48c97
b/hw/xen_platform.c | ||
---|---|---|
113 | 113 |
{ |
114 | 114 |
PCIXenPlatformState *s = opaque; |
115 | 115 |
|
116 |
switch (addr - XEN_PLATFORM_IOPORT) {
|
|
116 |
switch (addr) { |
|
117 | 117 |
case 0: |
118 | 118 |
/* Unplug devices. Value is a bitmask of which devices to |
119 | 119 |
unplug, with bit 0 the IDE devices, bit 1 the network |
... | ... | |
152 | 152 |
static void platform_fixed_ioport_writel(void *opaque, uint32_t addr, |
153 | 153 |
uint32_t val) |
154 | 154 |
{ |
155 |
switch (addr - XEN_PLATFORM_IOPORT) {
|
|
155 |
switch (addr) { |
|
156 | 156 |
case 0: |
157 | 157 |
/* PV driver version */ |
158 | 158 |
break; |
... | ... | |
163 | 163 |
{ |
164 | 164 |
PCIXenPlatformState *s = opaque; |
165 | 165 |
|
166 |
switch (addr - XEN_PLATFORM_IOPORT) {
|
|
166 |
switch (addr) { |
|
167 | 167 |
case 0: /* Platform flags */ { |
168 | 168 |
hvmmem_type_t mem_type = (val & PFFLAG_ROM_LOCK) ? |
169 | 169 |
HVMMEM_ram_ro : HVMMEM_ram_rw; |
... | ... | |
186 | 186 |
{ |
187 | 187 |
PCIXenPlatformState *s = opaque; |
188 | 188 |
|
189 |
switch (addr - XEN_PLATFORM_IOPORT) {
|
|
189 |
switch (addr) { |
|
190 | 190 |
case 0: |
191 | 191 |
if (s->drivers_blacklisted) { |
192 | 192 |
/* The drivers will recognise this magic number and refuse |
... | ... | |
205 | 205 |
{ |
206 | 206 |
PCIXenPlatformState *s = opaque; |
207 | 207 |
|
208 |
switch (addr - XEN_PLATFORM_IOPORT) {
|
|
208 |
switch (addr) { |
|
209 | 209 |
case 0: |
210 | 210 |
/* Platform flags */ |
211 | 211 |
return s->flags; |
... | ... | |
221 | 221 |
{ |
222 | 222 |
PCIXenPlatformState *s = opaque; |
223 | 223 |
|
224 |
platform_fixed_ioport_writeb(s, XEN_PLATFORM_IOPORT, 0);
|
|
224 |
platform_fixed_ioport_writeb(s, 0, 0);
|
|
225 | 225 |
} |
226 | 226 |
|
227 | 227 |
const MemoryRegionPortio xen_platform_ioport[] = { |
... | ... | |
251 | 251 |
static uint32_t xen_platform_ioport_readb(void *opaque, uint32_t addr) |
252 | 252 |
{ |
253 | 253 |
if (addr == 0) { |
254 |
return platform_fixed_ioport_readb(opaque, XEN_PLATFORM_IOPORT);
|
|
254 |
return platform_fixed_ioport_readb(opaque, 0);
|
|
255 | 255 |
} else { |
256 | 256 |
return ~0u; |
257 | 257 |
} |
... | ... | |
263 | 263 |
|
264 | 264 |
switch (addr) { |
265 | 265 |
case 0: /* Platform flags */ |
266 |
platform_fixed_ioport_writeb(opaque, XEN_PLATFORM_IOPORT, val);
|
|
266 |
platform_fixed_ioport_writeb(opaque, 0, val);
|
|
267 | 267 |
break; |
268 | 268 |
case 8: |
269 | 269 |
log_writeb(s, val); |
... | ... | |
321 | 321 |
{ |
322 | 322 |
PCIXenPlatformState *s = opaque; |
323 | 323 |
|
324 |
platform_fixed_ioport_writeb(s, XEN_PLATFORM_IOPORT, s->flags);
|
|
324 |
platform_fixed_ioport_writeb(s, 0, s->flags);
|
|
325 | 325 |
|
326 | 326 |
return 0; |
327 | 327 |
} |
Also available in: Unified diff