From 8da3ff180974732fc4272cb4433fef85c1822961 Mon Sep 17 00:00:00 2001 From: pbrook Date: Mon, 1 Dec 2008 18:59:50 +0000 Subject: Change MMIO callbacks to use offsets, not absolute addresses. Signed-off-by: Paul Brook git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5849 c046a42c-6fe2-441c-8c8c-71466251a162 --- hw/mac_nvram.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'hw/mac_nvram.c') diff --git a/hw/mac_nvram.c b/hw/mac_nvram.c index 7304ac27e0..f608ace71d 100644 --- a/hw/mac_nvram.c +++ b/hw/mac_nvram.c @@ -26,7 +26,6 @@ #include "ppc_mac.h" struct MacIONVRAMState { - target_phys_addr_t mem_base; target_phys_addr_t size; int mem_index; uint8_t data[0x2000]; @@ -62,7 +61,6 @@ static void macio_nvram_writeb (void *opaque, { MacIONVRAMState *s = opaque; - addr -= s->mem_base; addr = (addr >> 4) & 0x1fff; s->data[addr] = value; // printf("macio_nvram_writeb %04x = %02x\n", addr, value); @@ -73,7 +71,6 @@ static uint32_t macio_nvram_readb (void *opaque, target_phys_addr_t addr) MacIONVRAMState *s = opaque; uint32_t value; - addr -= s->mem_base; addr = (addr >> 4) & 0x1fff; value = s->data[addr]; // printf("macio_nvram_readb %04x = %02x\n", addr, value); @@ -112,7 +109,6 @@ void macio_nvram_map (void *opaque, target_phys_addr_t mem_base) MacIONVRAMState *s; s = opaque; - s->mem_base = mem_base; cpu_register_physical_memory(mem_base, s->size, s->mem_index); } -- cgit v1.2.3