From patchwork Wed Feb 22 02:33:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 655673 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp456834wrb; Tue, 21 Feb 2023 18:37:44 -0800 (PST) X-Google-Smtp-Source: AK7set8Peo25hwBEdis5RY0ovckYvurmmvPSaYaRTxSrTP5EAp5ZwgONydI9aGth0209VJ+NtSfi X-Received: by 2002:a05:6214:2426:b0:56e:a93e:2300 with SMTP id gy6-20020a056214242600b0056ea93e2300mr14829372qvb.40.1677033464441; Tue, 21 Feb 2023 18:37:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677033464; cv=none; d=google.com; s=arc-20160816; b=s7oqTiDG35MXMzv7CrKJFV3ymHx1vmMFVZqoowz1wAfhOFAnp9dVRXQv1DoRyDAg2v 035y9vRHlIr4dMOEdGhxuF45GSnYeWyXNycyF9TOa5tYFGKOEopeHV1GTq0zWKCXennz tLplJCNr/gkt0hlooD7a8SGNVcVjV4JPcIICXVoS6DobEkNqJPoOfesdet9tXuQLKqL5 oRX/HxesJ1CVOpWC1uGnpUtNbMNTt2vHQRhNgcSjpOI02sWM2XF5Zllb3grFH5fwhKjZ WeboOwCQ6sqPOhyrYrDklS3ObGjUSM9iuiACSChTZTCsrkimnNgFORx0kBt+KiACUyxj hQFg== 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:cc:to :from:dkim-signature; bh=BdnIrBC/vjhypfMOEhRm01STyDVGWe2QDHvXiznUOKk=; b=gFKrYz1lV13ej49I4dEQYY8aB/xc32Svdv1XUF3jTvd/Q2v2jv9s+qKNqCjHCkgiKP 6Nsxao0/GfwFpKMoXw34YWL5tw6uqs8oP+edRlh01pwAClncSsUklKopVwjE9ot1lU6l xeAzx9+ajDLUXXouefgXANE6mG6JGXFY4Gc0zlXEALnk6o/tGFdu262kkcNtPwdCzKGe 92R1fgrnTPNvhAVYMt9CTU8m9moNkczQD3lmEOhbKll9sYYxZGdBZm5vwfPeHbxZ+eiV PhXy/WkMexlJQJJrgnt4teNFB//k6P9WI4bNm32kbRM4mORUU6heItHC/+h9NU+jfTGR X9Tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zso61bsF; 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 d5-20020a0cf0c5000000b00534f9174377si6268711qvl.219.2023.02.21.18.37.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Feb 2023 18:37:44 -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=pass header.i=@linaro.org header.s=google header.b=zso61bsF; 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 1pUexV-0007iV-Pp; Tue, 21 Feb 2023 21:34:17 -0500 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 1pUexQ-0007b5-Cy for qemu-devel@nongnu.org; Tue, 21 Feb 2023 21:34:12 -0500 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pUexO-0001ic-9Q for qemu-devel@nongnu.org; Tue, 21 Feb 2023 21:34:12 -0500 Received: by mail-pl1-x634.google.com with SMTP id h14so7359574plf.10 for ; Tue, 21 Feb 2023 18:34:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=BdnIrBC/vjhypfMOEhRm01STyDVGWe2QDHvXiznUOKk=; b=zso61bsFfah/MWT18NzTF8AtAjKsks4Cy/ph/tOiuBaHnIsiuTMfL5WUCUkzGw197O AU12Noq9Gk+EddplGG2EKL4PxO2XGm33hnyig73x57Rf2WYR7II8HvgvdfIxGq1F0hvu HJo0N3OMq9CVRT0wYmD/Y2VPFAGsLIW6MQsIP7Vhf2LLZ7sQJza/J2Fr7PCwZwQJNN/o zluuikVoSg47bYg3Amolmamt4K0fHji+DfDRkeKrCc+SWh+iRVZwEEcqu9kAdTy85tCP Hu1sZjgzbzr9X2sf84JKxAExnpv1jk2fFq9KuH4HBFZXjic8BfwG0VpuS7sC0DcwL5es 6fGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BdnIrBC/vjhypfMOEhRm01STyDVGWe2QDHvXiznUOKk=; b=rwZsVhAAxumSmiFvB6sqkgx9SckCFgQAPwpnZy+6eIWOmJbT9IYGlG32Cgq34OwDQR Ah4X69HZzoBOn01H+cxZte4SV9Yb/VcwKB/enqa5N34325iY6xm2vLYhuyGb29PEIV0w TPGtli+CHlwX4I+BT65LckxCvd9tz0Lz5ae2f3XmSVtPeKh/9iKo67u3/aat2xhb/0lr jgRLt0f/wa2SRm5bQuZ5lvTCVy6mPRCdteGctWVdD8rPiKfpd5EKrNFB1MRRIxPHoufg uH+9mp1czr5sCmjdZFuIbQQjbtoiNe2531jjHNw4gi4gpd9tZPad87hNYmxfajwq6I5z hYEw== X-Gm-Message-State: AO0yUKXJ8MEli/SrjAoKINqjsCXeWj2tgu9hy/iyO9VGFDBqaHaCjPBy cReCvc0n3WnvitOfIiW1WkJFyqjuo+ZHPluc+d0= X-Received: by 2002:a17:902:6bcb:b0:19a:ae81:b09b with SMTP id m11-20020a1709026bcb00b0019aae81b09bmr7346310plt.11.1677033248751; Tue, 21 Feb 2023 18:34:08 -0800 (PST) Received: from stoup.. (rrcs-173-198-77-218.west.biz.rr.com. [173.198.77.218]) by smtp.gmail.com with ESMTPSA id k3-20020a170902e90300b00198fde9178csm10520112pld.197.2023.02.21.18.34.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 18:34:08 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Peter Maydell Subject: [PATCH v3 21/25] target/arm: Add GPC syndrome Date: Tue, 21 Feb 2023 16:33:32 -1000 Message-Id: <20230222023336.915045-22-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230222023336.915045-1-richard.henderson@linaro.org> References: <20230222023336.915045-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x634.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 autolearn=unavailable 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 The function takes the fields as filled in by the Arm ARM pseudocode for TakeGPCException. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/syndrome.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/target/arm/syndrome.h b/target/arm/syndrome.h index d27d1bc31f..62254d0e51 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)