From patchwork Mon Jan 7 15:38:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 210007 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 B1A242C0091 for ; Tue, 8 Jan 2013 04:06:11 +1100 (EST) Received: from localhost ([::1]:52000 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsEnY-0005El-Lw for incoming@patchwork.ozlabs.org; Mon, 07 Jan 2013 10:39:36 -0500 Received: from eggs.gnu.org ([208.118.235.92]:40850) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsEn7-0004G5-7Q for qemu-devel@nongnu.org; Mon, 07 Jan 2013 10:39:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsEn4-00073v-QW for qemu-devel@nongnu.org; Mon, 07 Jan 2013 10:39:09 -0500 Received: from cantor2.suse.de ([195.135.220.15]:39858 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsEn4-00073q-KJ; Mon, 07 Jan 2013 10:39:06 -0500 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 180C9A4F01; Mon, 7 Jan 2013 16:39:06 +0100 (CET) From: Alexander Graf To: qemu-devel@nongnu.org Date: Mon, 7 Jan 2013 16:38:33 +0100 Message-Id: <1357573140-8877-5-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1357573140-8877-1-git-send-email-agraf@suse.de> References: <1357573140-8877-1-git-send-email-agraf@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: Blue Swirl , Scott Wood , qemu-ppc@nongnu.org, Aurelien Jarno Subject: [Qemu-devel] [PATCH 04/31] 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 From: Scott Wood 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 Signed-off-by: Alexander Graf --- hw/openpic.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/openpic.c b/hw/openpic.c index f0877fa..337dbf5 100644 --- a/hw/openpic.c +++ b/hw/openpic.c @@ -587,6 +587,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: @@ -878,9 +880,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;