From patchwork Sat Oct 28 22:49:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1856622 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=mkDFydQf; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=l6UFIsTy; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SHvrS0CZRz1yQQ for ; Sun, 29 Oct 2023 09:50:31 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=/b+TV7NijGzg5hVHV4hsmB7V/aBWRj3vLAChEKSZ4U8=; b=mkDFydQfqX4vTK UDxRVoyfSZJII++bqfnFoErhl/dyqHLqzkENQzcMoGWkyLUQXmjuNz8E7gqDcY4KRNuPO9J2qEdVQ rd48KfHL8Rdna9J69QpNa7MlenfyipcJsT758+rlbCm11sFk8IawuJkUi1Eb/bF1WD7ZuF1mADBct iqdoVJekp4xSKD1/VxTEMI62/vGKUatJzyBdaPhfH/eDsbA42A+rXaYTroIoiBtdhpXcQHPyEE+nl k/tsdnX4B+Vq1YGkuT+hK2CLOEQk7uq0PteRvEqTYJ2OI+xgslZ5c5WxdpX9F1YzrmvnZy70KDMDd NlAvjQILHsrbxJvFV23Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qws8H-000uR2-2I; Sat, 28 Oct 2023 22:50:17 +0000 Received: from smtp-relay-canonical-0.canonical.com ([185.125.188.120]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qws8C-000uPI-0y for opensbi@lists.infradead.org; Sat, 28 Oct 2023 22:50:14 +0000 Received: from LT2ubnt.fritz.box (ip-178-202-040-247.um47.pools.vodafone-ip.de [178.202.40.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id BC68942208; Sat, 28 Oct 2023 22:50:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1698533410; bh=WAt+AKly+Jmo+EjckAO2lp8SpHUcvbwgFLez10Tia3U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=l6UFIsTyYkTwPoe25jAVfiSJuzkSlnkhcoNlp1+NwV4zP+SKaiOzV5VbcTkfZzlRL sg/9ON/MlppKb+EoY+6Bk0V0eochY3M+RAFhatJpXEEh9R1mnoUPKKBRiUE66EV4Sz GzgaYswuOdJPYYUSpoiDOHOxP0lGGPZDU2gZzJSQlK3gXkM3gMfTqlnWbPn6TppSDl sHxb0FEDVmSFTUOY2ma/smawac7k8PlCwmYy2RFshG4r/uUTQzXGrPmBqJaBxCmObN mT6UHB0pIYDSQy5npGqW3Eov+ak+FZUggo9H9lBsfJtVW1u/yGYgUsndTyaMAt07U1 ClOpXWmOWaqfw== From: Heinrich Schuchardt To: Atish Patra , Anup Patel Cc: opensbi@lists.infradead.org, Heinrich Schuchardt Subject: [RFC 2/3] lib: sbi: Add Zkr in hart extensions Date: Sun, 29 Oct 2023 00:49:58 +0200 Message-Id: <20231028224959.95465-3-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231028224959.95465-1-heinrich.schuchardt@canonical.com> References: <20231028224959.95465-1-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231028_155012_467007_0D0E1DB0 X-CRM114-Status: UNSURE ( 8.65 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: - Add Zkr as extension in sbi_hart_extensions enum - Return "zkr" string for Zkr extension from sbi_hart_extension_id2string Signed-off-by: Heinrich Schuchardt --- include/sbi/sbi_hart.h | 2 ++ lib/sbi/sbi_hart.c | 3 +++ lib/utils/fdt/fdt_helper.c | 1 + 3 files changed, 6 insertions(+) Content analysis details: (-2.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [185.125.188.120 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.2 DKIMWL_WL_HIGH DKIMwl.org - High trust sender X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "opensbi" Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org - Add Zkr as extension in sbi_hart_extensions enum - Return "zkr" string for Zkr extension from sbi_hart_extension_id2string Signed-off-by: Heinrich Schuchardt Reviewed-by: Anup Patel --- include/sbi/sbi_hart.h | 2 ++ lib/sbi/sbi_hart.c | 3 +++ lib/utils/fdt/fdt_helper.c | 1 + 3 files changed, 6 insertions(+) diff --git a/include/sbi/sbi_hart.h b/include/sbi/sbi_hart.h index e60f415..fe1124a 100644 --- a/include/sbi/sbi_hart.h +++ b/include/sbi/sbi_hart.h @@ -40,6 +40,8 @@ enum sbi_hart_extensions { SBI_HART_EXT_ZICNTR, /** HART has Zihpm extension */ SBI_HART_EXT_ZIHPM, + /** HART has Zkr extension */ + SBI_HART_EXT_ZKR, /** Hart has Smcntrpmf extension */ SBI_HART_EXT_SMCNTRPMF, diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c index 29d6481..569596f 100644 --- a/lib/sbi/sbi_hart.c +++ b/lib/sbi/sbi_hart.c @@ -678,6 +678,9 @@ static inline char *sbi_hart_extension_id2string(int ext) case SBI_HART_EXT_ZIHPM: estr = "zihpm"; break; + case SBI_HART_EXT_ZKR: + estr = "zkr"; + break; case SBI_HART_EXT_SMEPMP: estr = "smepmp"; break; diff --git a/lib/utils/fdt/fdt_helper.c b/lib/utils/fdt/fdt_helper.c index 9ae7f09..35be7ba 100644 --- a/lib/utils/fdt/fdt_helper.c +++ b/lib/utils/fdt/fdt_helper.c @@ -376,6 +376,7 @@ static int fdt_parse_isa_one_hart(const char *isa, unsigned long *extensions) } set_multi_letter_ext("smepmp", SBI_HART_EXT_SMEPMP); + set_multi_letter_ext("zkr", SBI_HART_EXT_ZKR); #undef set_multi_letter_ext }