Skip to content

Commit

Permalink
mips: fix broken fulong2e machine
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bonzini authored and Leon Alrae committed Apr 17, 2015
1 parent b8df920 commit 0ca4f94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hw/pci-host/bonito.c
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 0ca4f94

Please sign in to comment.