From patchwork Tue Dec 20 19:10:45 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Langsdorf X-Patchwork-Id: 132502 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id B44FFB7058 for ; Wed, 21 Dec 2011 06:11:12 +1100 (EST) Received: from localhost ([::1]:60493 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rd55d-0003sb-1b for incoming@patchwork.ozlabs.org; Tue, 20 Dec 2011 14:11:05 -0500 Received: from eggs.gnu.org ([140.186.70.92]:47094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rd55N-0003gB-AP for qemu-devel@nongnu.org; Tue, 20 Dec 2011 14:10:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rd55H-0005uE-Oo for qemu-devel@nongnu.org; Tue, 20 Dec 2011 14:10:49 -0500 Received: from smtp191.dfw.emailsrvr.com ([67.192.241.191]:54116) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rd55H-0005u9-Lf for qemu-devel@nongnu.org; Tue, 20 Dec 2011 14:10:43 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp19.relay.dfw1a.emailsrvr.com (SMTP Server) with ESMTP id 095EC3C86DB; Tue, 20 Dec 2011 14:10:43 -0500 (EST) X-Virus-Scanned: OK Received: by smtp19.relay.dfw1a.emailsrvr.com (Authenticated sender: mark.langsdorf-AT-calxeda.com) with ESMTPSA id DA5B03C8676; Tue, 20 Dec 2011 14:10:42 -0500 (EST) Message-ID: <4EF0DDB5.9040806@calxeda.com> Date: Tue, 20 Dec 2011 13:10:45 -0600 From: Mark Langsdorf User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0 MIME-Version: 1.0 To: qemu-devel@nongnu.org, peter.maydell@linaro.org, peter.maydell@linaro.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 67.192.241.191 Subject: [Qemu-devel] [PATCH 3/9] arm: add missing v7 cp15 registers 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: Rob Herring Signed-off-by: Rob Herring Signed-off-by: Mark Langsdorf Conflicts: target-arm/cpu.h target-arm/helper.c --- target-arm/cpu.h | 1 + target-arm/helper.c | 7 +++++++ 2 files changed, 8 insertions(+), 0 deletions(-) bad_reg: diff --git a/target-arm/cpu.h b/target-arm/cpu.h index 129edbb..b89c085 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -152,6 +152,7 @@ typedef struct CPUARMState { uint32_t c15_i_max; /* Maximum D-cache dirty line index. */ uint32_t c15_i_min; /* Minimum D-cache dirty line index. */ uint32_t c15_threadid; /* TI debugger thread-ID. */ + uint32_t c15_scubase; /* SCU base address. */ } cp15; struct { diff --git a/target-arm/helper.c b/target-arm/helper.c index 816c4c4..37110bc 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -2197,6 +2197,13 @@ uint32_t HELPER(get_cp15)(CPUState *env, uint32_t insn) * 0x200 << ($rn & 0xfff), when MMU is off. */ goto bad_reg; } + if (ARM_CPUID(env) == ARM_CPUID_CORTEXA9) { + switch (crm) { + case 0: + return env->cp15.c15_scubase; + } + goto bad_reg; + } return 0; }