From: Rudolf Marek <rudolf.marek@sysgo.com>
To: qemu-devel@nongnu.org
Cc: Alexander Graf <agraf@suse.de>
Subject: [Qemu-devel] [PATCH] e500 ATMU register reads broken
Date: Fri, 14 Aug 2015 13:49:54 +0200 [thread overview]
Message-ID: <55CDD5E2.60405@sysgo.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 815 bytes --]
Hi all,
I noticed that ATMU register reads on E500 are broken. Due to the wrong mask,
some registers cannot be read and instead some other registers are read. Please
see attached patch which fixes the problem.
I also noticed that if there was an intention to have 1:1 PCI/CPU space mapping
for 0xC000_0000 for MPC8544DS without programming ATMUs - it does not work,
unless ATMUs are programmed.
Signed-off-by: Rudolf Marek <rudolf.marek@sysgo.com>
Thanks,
Rudolf
--
S přátelským pozdravem / Best regards / Mit freundlichen Grüßen
Ing. Rudolf Marek
SYSGO s.r.o.
Zelený pruh 99
CZ-14800 Praha 4
Phone: +420 222138 627, +49 6136 9948 627
Fax: +420 296374890, +49 6136 9948 1 627
rudolf.marek@sysgo.com
http://www.sysgo.com | http://www.elinos.com | http://www.pikeos.com
[-- Attachment #2: 0001-PPC-e500-pci-host-Fix-ATMUs-register-reads.patch --]
[-- Type: text/x-diff, Size: 1308 bytes --]
>From 75795e2bcc6ffbb245d192eb84e063d855dbf248 Mon Sep 17 00:00:00 2001
From: Rudolf Marek <mar@sysgo.com>
Date: Fri, 14 Aug 2015 13:38:55 +0200
Subject: [PATCH] PPC: e500 pci host: Fix ATMUs register reads
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 <rudolf.marek@sysgo.com>
---
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.9.1
next reply other threads:[~2015-08-14 11:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-14 11:49 Rudolf Marek [this message]
2015-08-21 12:33 ` [Qemu-devel] [PATCH] e500 ATMU register reads broken Rudolf Marek
2015-08-26 9:15 ` Alexander Graf
2015-08-28 7:22 ` Rudolf Marek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55CDD5E2.60405@sysgo.com \
--to=rudolf.marek@sysgo.com \
--cc=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).