From patchwork Fri Jun 23 12:31:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 695268 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp1926579wrm; Fri, 23 Jun 2023 05:37:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6tWwWKdiy//cMg62LgQs4yTYyryvV1JtknHV7xYgkQ2BKEhvTwavdzhpw3KCacZQcYNEAN X-Received: by 2002:a05:620a:4687:b0:765:55a6:5e5d with SMTP id bq7-20020a05620a468700b0076555a65e5dmr145285qkb.48.1687523843367; Fri, 23 Jun 2023 05:37:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687523843; cv=none; d=google.com; s=arc-20160816; b=e4TthfzDaRskZ5js40cnANL11JgZqo9bZYG3CFRsXHyqwyjXTXDiAz8zfMxautO1df qDXjuKWCnjPYDAZE9vOKHHFFCPIqve+E3f45pc+rHbrSpNexFgDWzKsEoiL9snUmBACm r6PdA4G3veaPFN5EJYIJpq9J0kFS5ePEp05SfFIZGhfEDpS36I3D3m78uvEf5kFfqhXO d7inb77Q21Iabir9DfDvWeTR3kLrqws7wDFbC71iGUqh/dza5mrdjHO+NnWvdkafyAUp Ez3bQbfZ03CR3RQhPEeS7agrfc04D5NZxdtOmnt9eiz+UyWs9l/3TXvtpvHwViWZdc4K K5lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=FIM0jkrJI5QtjGm4m8RJZDPmz1IjyL1s0JAX6s9xjdM=; b=YPnOs+ubBcVPQpA0z4UDLmXU0DvvYgULEgexH+rqvK4osOFB5qhqlIAWgAt5sGjGV8 B2gu5x+p3FdbXLofao5gebAlIMgMVA77LFLD9PPPKylUyx+L4RU6ez6vAR/VYbnewUJ4 D1OxP7DBXtKcBykaHHQJYvHODVUe7W8tiuhKoYE6q540njonkWA3vDkodBTC9BLUBt8H RujClvxUbIX3nCYlqZ/rN1KJuKgTHxy1pp3XzBWbxRyarynubJx5jZxuy2OsTOoWA1O9 mGYKnCXBNg/jnqUbn7JlR2YFvY5uDQxk49n3dyd65MO6gjOK0vv5urQXErFE7lU7guhG DokA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yE7ve3yD; 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=pass (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 ty12-20020a05620a3f4c00b007578d35f690si3652264qkn.20.2023.06.23.05.37.23 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Jun 2023 05:37:23 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b=yE7ve3yD; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qCfxK-0002bX-HG; Fri, 23 Jun 2023 08:32:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qCfx8-0001le-Nw for qemu-devel@nongnu.org; Fri, 23 Jun 2023 08:31:50 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qCfx6-0000hZ-30 for qemu-devel@nongnu.org; Fri, 23 Jun 2023 08:31:50 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-3f9002a1a39so6493385e9.2 for ; Fri, 23 Jun 2023 05:31:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687523505; x=1690115505; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=FIM0jkrJI5QtjGm4m8RJZDPmz1IjyL1s0JAX6s9xjdM=; b=yE7ve3yDqcbwC5F5R4bLUFyGnzsTg8RzwXRsaupFGoK7zr1Sdcqw0z0B3eMLjJTmRC EPM0Gdm7tHLXjJDqHGJjejN8XovtmcYljKWBtwnTz3D3ixwWC3SwDswI4Bd+gpfOx2uv OdJgdlmc265H2i2dhwshS3hz9P26P3+n1FsSsWHSzqjtTNG+u57I2nh10iuPRku0q1hI gDE6HTbE46RsqQmOuasnewGWt/OCQmSruQrrtOUCPDXgSzkvPtNNfRi4gpcI0Gin1PEG oPPLj/7LWc/7yM1/42nP2Nj6J2kqDnNvHVWSXYp61TOZGqgO1SCc9mcoFUTApWtqvgQA bHNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687523505; x=1690115505; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FIM0jkrJI5QtjGm4m8RJZDPmz1IjyL1s0JAX6s9xjdM=; b=OiDhlfsZlNUkossxZRZP4cSL/WbYYE4lDhJxQCjGfz6Eb6wc5TaBkcP9ZZ1g7UbSui E5hac4wVYaJivsKbZXjiVk/rgyMsrhjSIH9CkAyjVVjooelmQv8O/nHNFdgAAfGyqdb/ rUkaqbJe3tQWvxpl8JVm5aVOCuda1PPMXxvgF2HaxmZ55rqJato9QBNvSxFFtBO7MNlx xuQ6RvfKNlXvRsnREMHxBoBQClhxCx98u2BaB1/iXAheTKiC+7R4zNgb/Ml21Op8Gv7/ w8tOfkUe0Vui52PiHOB/krE2aDA9zHaEyfNB0aab8zAXSy1G8wt1ToOQ7zqndjbH9ZPO pOuQ== X-Gm-Message-State: AC+VfDy0uQqPTBrmmp/SGwoYV86k0ivdnojOG8G2WbICjXHLQgl29QfF UUkOK9zrjEcxF9Ax4Q5dW/ctkLDXbwl/RPQ2m8g= X-Received: by 2002:a7b:c385:0:b0:3fa:77d0:c7b0 with SMTP id s5-20020a7bc385000000b003fa77d0c7b0mr2823619wmj.23.1687523505440; Fri, 23 Jun 2023 05:31:45 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id z7-20020a1c4c07000000b003f819dfa0ddsm2232622wmf.28.2023.06.23.05.31.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jun 2023 05:31:45 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 17/26] target/arm: Add GPC syndrome Date: Fri, 23 Jun 2023 13:31:26 +0100 Message-Id: <20230623123135.1788191-18-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230623123135.1788191-1-peter.maydell@linaro.org> References: <20230623123135.1788191-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Richard Henderson The function takes the fields as filled in by the Arm ARM pseudocode for TakeGPCException. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20230620124418.805717-18-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/syndrome.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/target/arm/syndrome.h b/target/arm/syndrome.h index d27d1bc31f0..62254d0e518 100644 --- a/target/arm/syndrome.h +++ b/target/arm/syndrome.h @@ -50,6 +50,7 @@ enum arm_exception_class { EC_SVEACCESSTRAP = 0x19, EC_ERETTRAP = 0x1a, EC_SMETRAP = 0x1d, + EC_GPC = 0x1e, EC_INSNABORT = 0x20, EC_INSNABORT_SAME_EL = 0x21, EC_PCALIGNMENT = 0x22, @@ -247,6 +248,15 @@ static inline uint32_t syn_bxjtrap(int cv, int cond, int rm) (cv << 24) | (cond << 20) | rm; } +static inline uint32_t syn_gpc(int s2ptw, int ind, int gpcsc, + int cm, int s1ptw, int wnr, int fsc) +{ + /* TODO: FEAT_NV2 adds VNCR */ + return (EC_GPC << ARM_EL_EC_SHIFT) | ARM_EL_IL | (s2ptw << 21) + | (ind << 20) | (gpcsc << 14) | (cm << 8) | (s1ptw << 7) + | (wnr << 6) | fsc; +} + static inline uint32_t syn_insn_abort(int same_el, int ea, int s1ptw, int fsc) { return (EC_INSNABORT << ARM_EL_EC_SHIFT) | (same_el << ARM_EL_EC_SHIFT)