summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-04-16 21:11:23 +0100
committerLeon Alrae <leon.alrae@imgtec.com>2015-04-17 12:11:48 +0100
commit0ca4f94195cce77b624edc6d9abcf14a3bf01f06 (patch)
tree92df39e5a206b8c0d0cd4a560b1cf0ac3e07f6e9 /hw
parentb8df9208f357d2b36e1b19634aea973618dc7ba8 (diff)
downloadqemu-0ca4f94195cce77b624edc6d9abcf14a3bf01f06.zip
mips: fix broken fulong2e machine
After commit 5312bd8 the bonito_readl() and bonito_writel() have been accessing incorrect addresses. Consequently QEMU is crashing when trying to boot Linux kernel on fulong2e machine. Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/pci-host/bonito.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/pci-host/bonito.c b/hw/pci-host/bonito.c
index 8bdd56922a..8134d0bcd0 100644
--- a/hw/pci-host/bonito.c
+++ b/hw/pci-host/bonito.c
@@ -233,7 +233,7 @@ static void bonito_writel(void *opaque, hwaddr addr,
uint32_t saddr;
int reset = 0;
- saddr = (addr - BONITO_REGBASE) >> 2;
+ saddr = addr >> 2;
DPRINTF("bonito_writel "TARGET_FMT_plx" val %x saddr %x\n", addr, val, saddr);
switch (saddr) {
@@ -295,7 +295,7 @@ static uint64_t bonito_readl(void *opaque, hwaddr addr,
PCIBonitoState *s = opaque;
uint32_t saddr;
- saddr = (addr - BONITO_REGBASE) >> 2;
+ saddr = addr >> 2;
DPRINTF("bonito_readl "TARGET_FMT_plx"\n", addr);
switch (saddr) {