From patchwork Tue Jan 8 22:31:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 155013 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp35270jaa; Tue, 8 Jan 2019 14:37:45 -0800 (PST) X-Google-Smtp-Source: ALg8bN7RkOuhckKh1ofeym1MnxRRzsSMhHwYHyRQKSV4rdKyg4lnnLMV/0/07+QvlZDLjojXWInQ X-Received: by 2002:a5d:6b81:: with SMTP id n1mr3056881wrx.149.1546987065667; Tue, 08 Jan 2019 14:37:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546987065; cv=none; d=google.com; s=arc-20160816; b=k8YoVjZ2qgxRHQIAPwbRDqe+5QriQH4QUK/eYOO6+qpf97g/5u41h5/WEysOVVbE+g LyngOChigsy1fUVSsh9ZwmRc0Aa+2HJkuSvmjhidaKtdP6VJX2xDeGC0JWM3NTbkxEOu kh2wncoclhd6baWaR4RBBV8YXPaXoxHMkeMSbBGhq1NTQ8vqoyVUZAkCuzMPuSnkEIKn DN2j55cMCelz8Riyw2rVU7YsQOVNAE8116FRtao2WfHX57E/DhQ1AmGPeqQ9HOdEG/+G r0JqenprPa4ErgCXPHPGS9qje1vob3uRPkW7OcLxf5dp8SPwi2u7YRWeTUTLyF2d927k bQag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=hH55bLkql39OTMji4tcf4IYVIJI0UJzo6VknZottr4Q=; b=u8tfGF3TMVKEo/XuEUYtjUQexAvJew96/S9jUAkw6nI8n7HyBweiONfSl7hTg3J0vs gi4JCa19Ifyaa172Efpl9yG7U98DN565Hdn5pxMqD0GjYAzwjOVGLfUac77S5Cde9kVo BZqrMpCOsArY5xp61zWl/l11Go8Z6X9emtMGYUMoKtq2oHwWRCJa/r5dnZ2Xp1BeiA9E HKRtBH4JToF0yQEb2LdVzINXFwPfP2hq8DviiA6esAou/0qRf9tmVt6sbZpkL/+wkRom 5sF+RMi6BvzE3TV8LQroclP013ThU4q+ryUpWs1xy/2R0ZLvsXAdpsgKoUXN8MTzAjLZ fn2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NdVSPtsf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id i4si37826767wru.93.2019.01.08.14.37.45 for (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 08 Jan 2019 14:37:45 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=NdVSPtsf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:40781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gh00G-00044L-Fh for patch@linaro.org; Tue, 08 Jan 2019 17:37:44 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52423) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ggzuR-0007w7-LK for qemu-devel@nongnu.org; Tue, 08 Jan 2019 17:31:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ggzuQ-00049k-I2 for qemu-devel@nongnu.org; Tue, 08 Jan 2019 17:31:43 -0500 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:41149) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ggzuQ-00048a-Cf for qemu-devel@nongnu.org; Tue, 08 Jan 2019 17:31:42 -0500 Received: by mail-pf1-x441.google.com with SMTP id b7so2607250pfi.8 for ; Tue, 08 Jan 2019 14:31:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=hH55bLkql39OTMji4tcf4IYVIJI0UJzo6VknZottr4Q=; b=NdVSPtsfra2r4zlF2NpncgObmFB5jWJOhI1SvtPm1Dy8NHBYUXqNTrnOSF7PFdzfbM 3VtXHcAzKgLcI3LT/D9z3hBoXvLSii5yUWIQdlKlh2K+cqcS1EWUK1XoRkGF2TGBOq8k nZ4ltFBZdiL9gt6dOaU27N5mRSJUTuZm7hjBU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=hH55bLkql39OTMji4tcf4IYVIJI0UJzo6VknZottr4Q=; b=BtNl5PgctIkTYodOYHQL4IsHXPKLTjSY3OeheROMtaguOxWzXCioESTXGua4g1BTWi vJfJb/O+hdEhZm0Ra5BdbB1UapZsIuRlThcLLiH6b7jNwF781Wh1e7rNO0j2V9or3Otf GlYtlEz6zccJpmf4BGXHj7552C+ME3Ov6mTwi+VopqPxKYGHDU1b5IfidBA0L3R1T33M JSDcIpIAvfwhoypWsT+daX7Hqi/BctzWMKGDmzHTIVOWt43HWYuH8Dvg9+/raFfnD6N9 TQ1jan+D31adkz7R2QWZxYPTVXGzrmGUJ9jlROqy+UDHD7+tUoETkkp89Z8xatZXo1g9 m5iA== X-Gm-Message-State: AJcUukd8YhB2xnsypdZfIKcpdVWIF8rBCFP25BYruLoOUVcNvPyL8t1A rouXjK1vXhcxQbtjPeM6w+2+CRxFej4= X-Received: by 2002:a63:3703:: with SMTP id e3mr944934pga.348.1546986701001; Tue, 08 Jan 2019 14:31:41 -0800 (PST) Received: from cloudburst.lan (2001-44b8-2176-c800-8cc6-2630-7d99-5ef1.static.ipv6.internode.on.net. [2001:44b8:2176:c800:8cc6:2630:7d99:5ef1]) by smtp.gmail.com with ESMTPSA id w128sm100686177pfw.79.2019.01.08.14.31.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 08 Jan 2019 14:31:40 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 9 Jan 2019 08:31:00 +1000 Message-Id: <20190108223129.5570-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190108223129.5570-1-richard.henderson@linaro.org> References: <20190108223129.5570-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::441 Subject: [Qemu-devel] [PATCH v3 02/31] target/arm: Add SCTLR bits through ARMv8.5 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: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Post v8.4 bits taken from SysReg_v85_xml-00bet8. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson ---- v2: Review fixups from Peter. --- target/arm/cpu.h | 45 +++++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) -- 2.17.2 diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 8b891bbc30..843d5936ea 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -991,12 +991,15 @@ void pmccntr_sync(CPUARMState *env); #define SCTLR_A (1U << 1) #define SCTLR_C (1U << 2) #define SCTLR_W (1U << 3) /* up to v6; RAO in v7 */ -#define SCTLR_SA (1U << 3) +#define SCTLR_nTLSMD_32 (1U << 3) /* v8.2-LSMAOC, AArch32 only */ +#define SCTLR_SA (1U << 3) /* AArch64 only */ #define SCTLR_P (1U << 4) /* up to v5; RAO in v6 and v7 */ +#define SCTLR_LSMAOE_32 (1U << 4) /* v8.2-LSMAOC, AArch32 only */ #define SCTLR_SA0 (1U << 4) /* v8 onward, AArch64 only */ #define SCTLR_D (1U << 5) /* up to v5; RAO in v6 */ #define SCTLR_CP15BEN (1U << 5) /* v7 onward */ #define SCTLR_L (1U << 6) /* up to v5; RAO in v6 and v7; RAZ in v8 */ +#define SCTLR_nAA (1U << 6) /* when v8.4-LSE is implemented */ #define SCTLR_B (1U << 7) /* up to v6; RAZ in v7 */ #define SCTLR_ITD (1U << 7) /* v8 onward */ #define SCTLR_S (1U << 8) /* up to v6; RAZ in v7 */ @@ -1004,35 +1007,53 @@ void pmccntr_sync(CPUARMState *env); #define SCTLR_R (1U << 9) /* up to v6; RAZ in v7 */ #define SCTLR_UMA (1U << 9) /* v8 onward, AArch64 only */ #define SCTLR_F (1U << 10) /* up to v6 */ -#define SCTLR_SW (1U << 10) /* v7 onward */ -#define SCTLR_Z (1U << 11) +#define SCTLR_SW (1U << 10) /* v7, RES0 in v8 */ +#define SCTLR_Z (1U << 11) /* in v7, RES1 in v8 */ +#define SCTLR_EOS (1U << 11) /* v8.5-ExS */ #define SCTLR_I (1U << 12) -#define SCTLR_V (1U << 13) +#define SCTLR_V (1U << 13) /* AArch32 only */ +#define SCTLR_EnDB (1U << 13) /* v8.3, AArch64 only */ #define SCTLR_RR (1U << 14) /* up to v7 */ #define SCTLR_DZE (1U << 14) /* v8 onward, AArch64 only */ #define SCTLR_L4 (1U << 15) /* up to v6; RAZ in v7 */ #define SCTLR_UCT (1U << 15) /* v8 onward, AArch64 only */ #define SCTLR_DT (1U << 16) /* up to ??, RAO in v6 and v7 */ #define SCTLR_nTWI (1U << 16) /* v8 onward */ -#define SCTLR_HA (1U << 17) +#define SCTLR_HA (1U << 17) /* up to v7, RES0 in v8 */ #define SCTLR_BR (1U << 17) /* PMSA only */ #define SCTLR_IT (1U << 18) /* up to ??, RAO in v6 and v7 */ #define SCTLR_nTWE (1U << 18) /* v8 onward */ #define SCTLR_WXN (1U << 19) #define SCTLR_ST (1U << 20) /* up to ??, RAZ in v6 */ -#define SCTLR_UWXN (1U << 20) /* v7 onward */ -#define SCTLR_FI (1U << 21) -#define SCTLR_U (1U << 22) +#define SCTLR_UWXN (1U << 20) /* v7 onward, AArch32 only */ +#define SCTLR_FI (1U << 21) /* up to v7, v8 RES0 */ +#define SCTLR_IESB (1U << 21) /* v8.2-IESB, AArch64 only */ +#define SCTLR_U (1U << 22) /* up to v6, RAO in v7 */ +#define SCTLR_EIS (1U << 22) /* v8.5-ExS */ #define SCTLR_XP (1U << 23) /* up to v6; v7 onward RAO */ +#define SCTLR_SPAN (1U << 23) /* v8.1-PAN */ #define SCTLR_VE (1U << 24) /* up to v7 */ #define SCTLR_E0E (1U << 24) /* v8 onward, AArch64 only */ #define SCTLR_EE (1U << 25) #define SCTLR_L2 (1U << 26) /* up to v6, RAZ in v7 */ #define SCTLR_UCI (1U << 26) /* v8 onward, AArch64 only */ -#define SCTLR_NMFI (1U << 27) -#define SCTLR_TRE (1U << 28) -#define SCTLR_AFE (1U << 29) -#define SCTLR_TE (1U << 30) +#define SCTLR_NMFI (1U << 27) /* up to v7, RAZ in v7VE and v8 */ +#define SCTLR_EnDA (1U << 27) /* v8.3, AArch64 only */ +#define SCTLR_TRE (1U << 28) /* AArch32 only */ +#define SCTLR_nTLSMD_64 (1U << 28) /* v8.2-LSMAOC, AArch64 only */ +#define SCTLR_AFE (1U << 29) /* AArch32 only */ +#define SCTLR_LSMAOE_64 (1U << 29) /* v8.2-LSMAOC, AArch64 only */ +#define SCTLR_TE (1U << 30) /* AArch32 only */ +#define SCTLR_EnIB (1U << 30) /* v8.3, AArch64 only */ +#define SCTLR_EnIA (1U << 31) /* v8.3, AArch64 only */ +#define SCTLR_BT0 (1ULL << 35) /* v8.5-BTI */ +#define SCTLR_BT1 (1ULL << 36) /* v8.5-BTI */ +#define SCTLR_ITFSB (1ULL << 37) /* v8.5-MemTag */ +#define SCTLR_TCF0 (3ULL << 38) /* v8.5-MemTag */ +#define SCTLR_TCF (3ULL << 40) /* v8.5-MemTag */ +#define SCTLR_ATA0 (1ULL << 42) /* v8.5-MemTag */ +#define SCTLR_ATA (1ULL << 43) /* v8.5-MemTag */ +#define SCTLR_DSSBS (1ULL << 44) /* v8.5 */ #define CPTR_TCPAC (1U << 31) #define CPTR_TTA (1U << 20)