From patchwork Fri Dec 14 02:12:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Wood X-Patchwork-Id: 206273 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 338B72C009B for ; Fri, 14 Dec 2012 13:12:55 +1100 (EST) Received: from localhost ([::1]:53699 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjKlh-0004zp-86 for incoming@patchwork.ozlabs.org; Thu, 13 Dec 2012 21:12:53 -0500 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 Received: from ch1ehsobe001.messaging.microsoft.com ([216.32.181.181]:13690 helo=ch1outboundpool.messaging.microsoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TjKl5-0005V8-Do; Thu, 13 Dec 2012 21:12:15 -0500 Received: from mail94-ch1-R.bigfish.com (10.43.68.252) by CH1EHSOBE005.bigfish.com (10.43.70.55) with Microsoft SMTP Server id 14.1.225.23; Fri, 14 Dec 2012 02:12:14 +0000 Received: from mail94-ch1 (localhost [127.0.0.1]) by mail94-ch1-R.bigfish.com (Postfix) with ESMTP id 8B6EB203F4; Fri, 14 Dec 2012 02:12:14 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1de0h1202h1e76h1d1ah1d2ahzz8275bhz2dh2a8h668h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1155h) Received: from mail94-ch1 (localhost.localdomain [127.0.0.1]) by mail94-ch1 (MessageSwitch) id 1355451132323417_7614; Fri, 14 Dec 2012 02:12:12 +0000 (UTC) Received: from CH1EHSMHS042.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.252]) by mail94-ch1.bigfish.com (Postfix) with ESMTP id 4CCBB4009F; Fri, 14 Dec 2012 02:12:12 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CH1EHSMHS042.bigfish.com (10.43.69.251) with Microsoft SMTP Server (TLS) id 14.1.225.23; Fri, 14 Dec 2012 02:12:12 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-005.039d.mgd.msft.net (10.84.1.17) with Microsoft SMTP Server (TLS) id 14.2.318.3; Fri, 14 Dec 2012 02:12:11 +0000 Received: from snotra.am.freescale.net ([10.214.86.99]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id qBE2C4t3019223; Thu, 13 Dec 2012 19:12:09 -0700 From: Scott Wood To: Alexander Graf Date: Thu, 13 Dec 2012 20:12:03 -0600 Message-ID: <1355451124-2559-6-git-send-email-scottwood@freescale.com> X-Mailer: git-send-email 1.7.9.5 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 X-OriginatorOrg: freescale.com X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-Received-From: 216.32.181.181 Cc: Scott Wood , qemu-ppc@nongnu.org, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 5/6] openpic: BRR1 is not a CPU-specific register. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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;