From patchwork Thu Feb 3 19:43:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 81711 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 84132B70E9 for ; Fri, 4 Feb 2011 07:14:17 +1100 (EST) Received: from localhost ([127.0.0.1]:39123 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pl576-0005wN-7g for incoming@patchwork.ozlabs.org; Thu, 03 Feb 2011 14:45:08 -0500 Received: from [140.186.70.92] (port=37217 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pl55s-0004zQ-Mn for qemu-devel@nongnu.org; Thu, 03 Feb 2011 14:43:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pl55a-0002Ok-S4 for qemu-devel@nongnu.org; Thu, 03 Feb 2011 14:43:35 -0500 Received: from mnementh.archaic.org.uk ([81.2.115.146]:26905) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pl55a-0002NL-LE for qemu-devel@nongnu.org; Thu, 03 Feb 2011 14:43:34 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.69) (envelope-from ) id 1Pl55R-0000nX-3u; Thu, 03 Feb 2011 19:43:25 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Date: Thu, 3 Feb 2011 19:43:22 +0000 Message-Id: <1296762205-3043-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1296762205-3043-1-git-send-email-peter.maydell@linaro.org> References: <1296762205-3043-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 81.2.115.146 Cc: patches@linaro.org Subject: [Qemu-devel] [PATCH 1/4] target-arm: Add CPU feature flag for v7MP X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Add a CPU feature flag for v7MP (the multiprocessing extensions); some instructions exist only for v7MP and not for the base v7 architecture. Signed-off-by: Peter Maydell --- target-arm/cpu.h | 3 ++- target-arm/helper.c | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/target-arm/cpu.h b/target-arm/cpu.h index 5bcd53a..0d96325 100644 --- a/target-arm/cpu.h +++ b/target-arm/cpu.h @@ -362,7 +362,8 @@ enum arm_features { ARM_FEATURE_DIV, ARM_FEATURE_M, /* Microcontroller profile. */ ARM_FEATURE_OMAPCP, /* OMAP specific CP15 ops handling. */ - ARM_FEATURE_THUMB2EE + ARM_FEATURE_THUMB2EE, + ARM_FEATURE_V7MP /* v7 Multiprocessing Extensions */ }; static inline int arm_feature(CPUARMState *env, int feature) diff --git a/target-arm/helper.c b/target-arm/helper.c index b562767..3cf9181 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -123,6 +123,11 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id) set_feature(env, ARM_FEATURE_VFP_FP16); set_feature(env, ARM_FEATURE_NEON); set_feature(env, ARM_FEATURE_THUMB2EE); + /* Note that A9 supports the MP extensions even for + * A9UP and single-core A9MP (which are both different + * and valid configurations; we don't model A9UP). + */ + set_feature(env, ARM_FEATURE_V7MP); env->vfp.xregs[ARM_VFP_FPSID] = 0x41034000; /* Guess */ env->vfp.xregs[ARM_VFP_MVFR0] = 0x11110222; env->vfp.xregs[ARM_VFP_MVFR1] = 0x01111111; @@ -152,6 +157,7 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id) set_feature(env, ARM_FEATURE_NEON); set_feature(env, ARM_FEATURE_THUMB2EE); set_feature(env, ARM_FEATURE_DIV); + set_feature(env, ARM_FEATURE_V7MP); break; case ARM_CPUID_TI915T: case ARM_CPUID_TI925T: