Received: from eggs.gnu.org ([2001:4830:134:3::10]:38849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zdlbx-0004iy-MP for qemu-devel@nongnu.org; Sun, 20 Sep 2015 16:53:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zdlbs-0008Tn-Ft for qemu-devel@nongnu.org; Sun, 20 Sep 2015 16:53:25 -0400 From: Alexander Graf Date: Sun, 20 Sep 2015 22:53:14 +0200 Message-Id: <1442782398-41762-4-git-send-email-agraf@suse.de> In-Reply-To: <1442782398-41762-1-git-send-email-agraf@suse.de> References: <1442782398-41762-1-git-send-email-agraf@suse.de> Subject: [Qemu-devel] [PULL 3/7] PPC: e500 pci host: Fix ATMUs register reads List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-ppc@nongnu.org Cc: Peter Maydell , Rudolf Marek , qemu-devel@nongnu.org, Rudolf Marek From: Rudolf Marek There is a bug in the register mask when reading the ATMUs registers. As the result some registers cannot be read, and read is aliased to the other registers. Fix it. Signed-off-by: Rudolf Marek Signed-off-by: Alexander Graf --- hw/pci-host/ppce500.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pci-host/ppce500.c b/hw/pci-host/ppce500.c index 613ba73..50add34 100644 --- a/hw/pci-host/ppce500.c +++ b/hw/pci-host/ppce500.c @@ -140,7 +140,7 @@ static uint64_t pci_reg_read4(void *opaque, hwaddr addr, case PPCE500_PCI_OW3: case PPCE500_PCI_OW4: idx = (addr >> 5) & 0x7; - switch (addr & 0xC) { + switch (addr & 0x1F) { case PCI_POTAR: value = pci->pob[idx].potar; break; @@ -162,7 +162,7 @@ static uint64_t pci_reg_read4(void *opaque, hwaddr addr, case PPCE500_PCI_IW2: case PPCE500_PCI_IW1: idx = ((addr >> 5) & 0x3) - 1; - switch (addr & 0xC) { + switch (addr & 0x1F) { case PCI_PITAR: value = pci->pib[idx].pitar; break; -- 1.8.1.4