[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 55/64] PPC: Fix via-cuda memory registration
From: |
Alexander Graf |
Subject: |
[Qemu-ppc] [PATCH 55/64] PPC: Fix via-cuda memory registration |
Date: |
Thu, 6 Oct 2011 10:05:57 +0200 |
Commit 23c5e4ca (convert to memory API) broke the VIA Cuda emulation layer
by not registering the IO structs.
This patch registers them properly and thus makes -M g3beige and -M mac99
work again.
Tested-by: Andreas Färber <address@hidden>
Signed-off-by: Alexander Graf <address@hidden>
---
hw/cuda.c | 28 ++++++++++++++++------------
1 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/hw/cuda.c b/hw/cuda.c
index 6f05975..4077436 100644
--- a/hw/cuda.c
+++ b/hw/cuda.c
@@ -634,16 +634,20 @@ static uint32_t cuda_readl (void *opaque,
target_phys_addr_t addr)
return 0;
}
-static CPUWriteMemoryFunc * const cuda_write[] = {
- &cuda_writeb,
- &cuda_writew,
- &cuda_writel,
-};
-
-static CPUReadMemoryFunc * const cuda_read[] = {
- &cuda_readb,
- &cuda_readw,
- &cuda_readl,
+static MemoryRegionOps cuda_ops = {
+ .old_mmio = {
+ .write = {
+ cuda_writeb,
+ cuda_writew,
+ cuda_writel,
+ },
+ .read = {
+ cuda_readb,
+ cuda_readw,
+ cuda_readl,
+ },
+ },
+ .endianness = DEVICE_NATIVE_ENDIAN,
};
static bool cuda_timer_exist(void *opaque, int version_id)
@@ -740,8 +744,8 @@ void cuda_init (MemoryRegion **cuda_mem, qemu_irq irq)
s->tick_offset = (uint32_t)mktimegm(&tm) + RTC_OFFSET;
s->adb_poll_timer = qemu_new_timer_ns(vm_clock, cuda_adb_poll, s);
- cpu_register_io_memory(cuda_read, cuda_write, s,
- DEVICE_NATIVE_ENDIAN);
+ memory_region_init_io(&s->mem, &cuda_ops, s, "cuda", 0x2000);
+
*cuda_mem = &s->mem;
vmstate_register(NULL, -1, &vmstate_cuda, s);
qemu_register_reset(cuda_reset, s);
--
1.6.0.2
- [Qemu-ppc] [PATCH 39/64] pseries: More complete WIMG validation in H_ENTER code, (continued)
- [Qemu-ppc] [PATCH 39/64] pseries: More complete WIMG validation in H_ENTER code, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 43/64] KVM: Update kernel headers, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 51/64] ppc405: use RAM_ADDR_FMT instead of %08lx, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 15/64] PPC: bamboo: Move host fdt copy to target, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 57/64] KVM: Update kernel headers, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 47/64] Implement POWER7's CFAR in TCG, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 49/64] vscsi: send the CHECK_CONDITION status down together with autosense data, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 04/64] PPC: Move openpic to target specific code compilation, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 40/64] PPC: Fix sync instructions problem in SMP, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 55/64] PPC: Fix via-cuda memory registration,
Alexander Graf <=
- [Qemu-ppc] [PATCH 06/64] PPC: Extend MPIC MMIO range, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 50/64] Gdbstub: handle read of fpscr, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 54/64] ppc: move ADB stuff from ppc_mac.h to adb.h, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 41/64] pseries: Add real mode debugging hcalls, Alexander Graf, 2011/10/06
- [Qemu-ppc] [PATCH 27/64] device tree: dont fail operations, Alexander Graf, 2011/10/06
- Re: [Qemu-ppc] [PULL 00/64] ppc patch queue 2011-10-06, Blue Swirl, 2011/10/08