From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjKlG-0004fK-9p for qemu-devel@nongnu.org; Thu, 13 Dec 2012 21:12:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TjKlB-0005bo-Ud for qemu-devel@nongnu.org; Thu, 13 Dec 2012 21:12:26 -0500 From: Scott Wood Date: Thu, 13 Dec 2012 20:12:03 -0600 Message-ID: <1355451124-2559-6-git-send-email-scottwood@freescale.com> In-Reply-To: <1355451124-2559-1-git-send-email-scottwood@freescale.com> References: <1355451124-2559-1-git-send-email-scottwood@freescale.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH 5/6] openpic: BRR1 is not a CPU-specific register. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Scott Wood , qemu-ppc@nongnu.org, qemu-devel@nongnu.org It's in the address range that normally contains a magic redirection to the CPU-specific region of the curretn CPU, but it isn't actually a per-CPU register. On real hardware BRR1 shows up only at 0x40000, not at 0x60000 or other non-magic per-CPU areas. Plus, this makes it possible to read the register on the QEMU command line with "xp". Signed-off-by: Scott Wood --- hw/openpic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/openpic.c b/hw/openpic.c index c57a168..c0c4307 100644 --- a/hw/openpic.c +++ b/hw/openpic.c @@ -580,6 +580,8 @@ static uint64_t openpic_gbl_read(void *opaque, hwaddr addr, unsigned len) retval = 0x00000000; break; case 0x00: /* Block Revision Register1 (BRR1) */ + retval = opp->brr1; + break; case 0x40: case 0x50: case 0x60: @@ -881,9 +883,6 @@ static uint32_t openpic_cpu_read_internal(void *opaque, hwaddr addr, dst = &opp->dst[idx]; addr &= 0xFF0; switch (addr) { - case 0x00: /* Block Revision Register1 (BRR1) */ - retval = opp->brr1; - break; case 0x80: /* PCTP */ retval = dst->pctp; break; -- 1.7.9.5