{
PCIXenPlatformState *s = opaque;
- switch (addr - XEN_PLATFORM_IOPORT) {
+ switch (addr) {
case 0:
/* Unplug devices. Value is a bitmask of which devices to
unplug, with bit 0 the IDE devices, bit 1 the network
static void platform_fixed_ioport_writel(void *opaque, uint32_t addr,
uint32_t val)
{
- switch (addr - XEN_PLATFORM_IOPORT) {
+ switch (addr) {
case 0:
/* PV driver version */
break;
{
PCIXenPlatformState *s = opaque;
- switch (addr - XEN_PLATFORM_IOPORT) {
+ switch (addr) {
case 0: /* Platform flags */ {
hvmmem_type_t mem_type = (val & PFFLAG_ROM_LOCK) ?
HVMMEM_ram_ro : HVMMEM_ram_rw;
{
PCIXenPlatformState *s = opaque;
- switch (addr - XEN_PLATFORM_IOPORT) {
+ switch (addr) {
case 0:
if (s->drivers_blacklisted) {
/* The drivers will recognise this magic number and refuse
{
PCIXenPlatformState *s = opaque;
- switch (addr - XEN_PLATFORM_IOPORT) {
+ switch (addr) {
case 0:
/* Platform flags */
return s->flags;
{
PCIXenPlatformState *s = opaque;
- platform_fixed_ioport_writeb(s, XEN_PLATFORM_IOPORT, 0);
+ platform_fixed_ioport_writeb(s, 0, 0);
}
const MemoryRegionPortio xen_platform_ioport[] = {
static uint32_t xen_platform_ioport_readb(void *opaque, uint32_t addr)
{
if (addr == 0) {
- return platform_fixed_ioport_readb(opaque, XEN_PLATFORM_IOPORT);
+ return platform_fixed_ioport_readb(opaque, 0);
} else {
return ~0u;
}
switch (addr) {
case 0: /* Platform flags */
- platform_fixed_ioport_writeb(opaque, XEN_PLATFORM_IOPORT, val);
+ platform_fixed_ioport_writeb(opaque, 0, val);
break;
case 8:
log_writeb(s, val);
{
PCIXenPlatformState *s = opaque;
- platform_fixed_ioport_writeb(s, XEN_PLATFORM_IOPORT, s->flags);
+ platform_fixed_ioport_writeb(s, 0, s->flags);
return 0;
}