From patchwork Fri Jun 22 08:01:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Denis V. Lunev\" via" X-Patchwork-Id: 10481457 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 52FFC60383 for ; Fri, 22 Jun 2018 08:04:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4726128E49 for ; Fri, 22 Jun 2018 08:04:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39C9C28E53; Fri, 22 Jun 2018 08:04:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 87DA728E49 for ; Fri, 22 Jun 2018 08:04:07 +0000 (UTC) Received: from localhost ([::1]:59940 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWH38-00033Z-2C for patchwork-qemu-devel@patchwork.kernel.org; Fri, 22 Jun 2018 04:04:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44111) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWH1a-0001r1-Kt for qemu-devel@nongnu.org; Fri, 22 Jun 2018 04:02:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWH1X-0002Pz-I5 for qemu-devel@nongnu.org; Fri, 22 Jun 2018 04:02:30 -0400 Received: from smtp58.i.mail.ru ([217.69.128.38]:46694) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fWH1X-0002PN-AH for qemu-devel@nongnu.org; Fri, 22 Jun 2018 04:02:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=X3YJTrjK3YnX8knf4QtA/yo8i9CI/JeXbCj8Crn/ym0=; b=Kk/XnjhzRFlPf49oGktxTIT39xP2pDUFAqO+hdUhzFbNHZHswHuk64+gBEv/YcWCvjMrPD8v2gfPQROIWDmKNf9nJOf7EncEl+NM9kcCAjd3Xn7sjHN4Zgk8jS/v/AOoh815KUsXoMIRlPlgQZQEqJbl0BLn2DX5SweBg9ld5ik=; Received: by smtp58.i.mail.ru with esmtpa (envelope-from ) id 1fWH1V-0004R4-E9; Fri, 22 Jun 2018 11:02:25 +0300 To: qemu-devel Date: Fri, 22 Jun 2018 11:01:37 +0300 Message-Id: <20180622080138.17702-2-jusual@mail.ru> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180622080138.17702-1-jusual@mail.ru> References: <20180622080138.17702-1-jusual@mail.ru> Authentication-Results: smtp58.i.mail.ru; auth=pass smtp.auth=jusual@mail.ru smtp.mailfrom=jusual@mail.ru X-7FA49CB5: 0D63561A33F958A51F7D5FABFF5C10AAEA96F0A908EBB418D887B81FA16162DD0A6AB1C7CE11FEE34AF66DFF1D4D208B76E601842F6C81A1F004C906525384306FED454B719173D6725E5C173C3A84C3AC6EB6EE67F779AC77D690E8945E457E6D8C47C27EEC5E9FB5C8C57E37DE458B4C7702A67D5C3316FA3894348FB808DB5CDE6EBCCF0779B2574AF45C6390F7469DAA53EE0834AAEE X-Mailru-Sender: 7766D515518070DE138AAC7428EA760D788743B276775BD5690CF8C0787FE22E75268CCE79D7902D7C4160E8B47E48163DDE9B364B0DF2898CB68AF7A628805D594FB4C9F0DBF412AE208404248635DF X-Mras: OK X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 217.69.128.38 Subject: [Qemu-devel] [PATCH v2 1/2] target/arm: Introduce ARM_FEATURE_M_MAIN X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Julia Suvorova via Qemu-devel From: "Denis V. Lunev\" via" Reply-To: Julia Suvorova Cc: Peter Maydell , Jim Mussared , =?UTF-8?q?Steffen=20G=C3=B6rtz?= , Stefan Hajnoczi , Joel Stanley , Julia Suvorova Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This feature is intended to distinguish ARMv8-M variants: Baseline and Mainline. ARMv7-M compatibility requires the Main Extension. ARMv6-M compatibility is provided by all ARMv8-M implementations. Signed-off-by: Julia Suvorova --- target/arm/cpu.c | 3 +++ target/arm/cpu.h | 1 + 2 files changed, 4 insertions(+) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 788883073c..c8bba94b06 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1248,6 +1248,7 @@ static void cortex_m3_initfn(Object *obj) ARMCPU *cpu = ARM_CPU(obj); set_feature(&cpu->env, ARM_FEATURE_V7); set_feature(&cpu->env, ARM_FEATURE_M); + set_feature(&cpu->env, ARM_FEATURE_M_MAIN); cpu->midr = 0x410fc231; cpu->pmsav7_dregion = 8; cpu->id_pfr0 = 0x00000030; @@ -1272,6 +1273,7 @@ static void cortex_m4_initfn(Object *obj) set_feature(&cpu->env, ARM_FEATURE_V7); set_feature(&cpu->env, ARM_FEATURE_M); + set_feature(&cpu->env, ARM_FEATURE_M_MAIN); set_feature(&cpu->env, ARM_FEATURE_THUMB_DSP); cpu->midr = 0x410fc240; /* r0p0 */ cpu->pmsav7_dregion = 8; @@ -1297,6 +1299,7 @@ static void cortex_m33_initfn(Object *obj) set_feature(&cpu->env, ARM_FEATURE_V8); set_feature(&cpu->env, ARM_FEATURE_M); + set_feature(&cpu->env, ARM_FEATURE_M_MAIN); set_feature(&cpu->env, ARM_FEATURE_M_SECURITY); set_feature(&cpu->env, ARM_FEATURE_THUMB_DSP); cpu->midr = 0x410fd213; /* r0p3 */ diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 8488273c5b..a4507a2d6f 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -1482,6 +1482,7 @@ enum arm_features { ARM_FEATURE_V8_RDM, /* implements v8.1 simd round multiply */ ARM_FEATURE_V8_FP16, /* implements v8.2 half-precision float */ ARM_FEATURE_V8_FCMA, /* has complex number part of v8.3 extensions. */ + ARM_FEATURE_M_MAIN, /* M profile Main Extension */ }; static inline int arm_feature(CPUARMState *env, int feature)