Message ID | 20230706104928.3391947-2-hchauhan@ventanamicro.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org 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=<UNKNOWN>) 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=YUGe5Spe; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ventanamicro.com header.i=@ventanamicro.com header.a=rsa-sha256 header.s=google header.b=JBZZaf0P; dkim-atps=neutral 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 (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QxYFm3RQ9z20bQ for <incoming@patchwork.ozlabs.org>; Thu, 6 Jul 2023 20:50:04 +1000 (AEST) 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=rL6SPPCzJb4or4gH/HaA+NQxjoCwLJVXgCyU8bDjD/k=; b=YUGe5SpelkP6uW 4YJgz8zFE5snPt5FJh7n7r6q5uw45GCZQhx/q/zSgg/UwhTJ6dPXpB7KSCNho1P/AON0jRs+yg9Rg NtEnPjI1bypgerpscCpWUfQQU5osaABKqYCDnaFFWwwiNP6q6aGIa8aPTjEjhZG/N0Z5RUa+O8a/P vngbXlLwTNxV7VlwKHHQIPglXbGkkwQp1mvlNcvn79CdnfsfXN2xxQwaVv3J0pb2NljovGb+Q8RqV a1UxY5Arm4CzSXHZ2UvckmNIaPa2IZWBXpJ2McUw4+GUPZPM7E4q87nrO86a2KotEwtvC9k06INHB Zfds2n++Ip2fqSO9oy+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qHMYQ-001Gb3-1x; Thu, 06 Jul 2023 10:49:42 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qHMYN-001GY7-1v for opensbi@lists.infradead.org; Thu, 06 Jul 2023 10:49:40 +0000 Received: by mail-pj1-x1030.google.com with SMTP id 98e67ed59e1d1-263e62842c1so146763a91.0 for <opensbi@lists.infradead.org>; Thu, 06 Jul 2023 03:49:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1688640578; x=1691232578; 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=61+efhu1VsdxlBNyP3Lv8sq7TyrrbbQxcnu3rNz3nOk=; b=JBZZaf0PYDBAZ3T1GUV/iloPdDYXosrUFW80xfSHss3cHUafjdsvkrPbvkh6fPt0KA hVBZzzgk1oujmB2rBmWVREz4nlSX6PNtY9Z2tEPZBijw8KPamoLfMQAtKzoQTnrcNuV1 adNgh2fZR/0be2nZVW/ut15TeInQLQeYSLN4SZysxVMqObhZ650C8OhfYp/dTPEtNwJ/ Y32zdSds5YSALGHH8y4iszNKSUbfHkpZyUeq/7MSGO/A/HJL0EtI0HWI3k35Xk7Xs2fh vUiJxXrHwZOEt6SV/H4ecJBMydymDMENIa93wdmec3ij/aVkQ52dXFl9uk9UmsYzJqqX +/nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688640578; x=1691232578; 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=61+efhu1VsdxlBNyP3Lv8sq7TyrrbbQxcnu3rNz3nOk=; b=ZSXHyUJqqmTVSYVQBw86TaGHA6mfkVbrLbtlE9ezRlfi1lBghrjfJFbjPksY7JjKVl UXUoPL3YszKAGxBPjT9Q7A3YUkXIYw1cFEUm59CCzcSsKfw/R7xiNdaRXRvXRcI+Y+c0 6Tg/rhC7nhtEJ4W6U+gJUPdCgdoK9OX5mL2zQdDLgYYQ5P8NI07/W9xUAs+ohtC5V5Zg 8iP4iTFdyJH2ElEUjw1tJHkdeG84F/BlyvZpcB0nOhdlSmxtmBcJBsmX0wW1h3+tI/LC tDsIbyaFCa9PBCneXeeSQcBajbQKQVKZ8kDAZTqyRrYwHOA+XZ+cR8mJrkEncXUoEPbW Uctg== X-Gm-Message-State: ABy/qLb/ZJsh+rqQikVNCqyCqLlosNQTGhrSg1FcZfztPaT+GCD3wXs/ 0z6i1w58ZSmgY89z9nljIct7jAijVbK8SX8//cPVDVlh X-Google-Smtp-Source: APBJJlElmEWwXDRWbaPVjnDBR6E+q+ndXFdek5n7bT4DnEy3Dnl2rbo+xxhwoAu65etm6h/fcrCdnA== X-Received: by 2002:a17:90b:1995:b0:25b:88bc:bb6b with SMTP id mv21-20020a17090b199500b0025b88bcbb6bmr1416774pjb.2.1688640577610; Thu, 06 Jul 2023 03:49:37 -0700 (PDT) Received: from saptrishi.. ([2405:201:d019:cbd3:9126:16c2:7e:c7e5]) by smtp.gmail.com with ESMTPSA id gn20-20020a17090ac79400b002635341a7e8sm3670746pjb.3.2023.07.06.03.49.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 03:49:37 -0700 (PDT) From: Himanshu Chauhan <hchauhan@ventanamicro.com> To: opensbi@lists.infradead.org Cc: Himanshu Chauhan <hchauhan@ventanamicro.com>, Anup Patel <anup@brainfault.org> Subject: [PATCH v2 1/8] include: sbi: Add macro definitions for mseccfg CSR Date: Thu, 6 Jul 2023 16:19:21 +0530 Message-Id: <20230706104928.3391947-2-hchauhan@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230706104928.3391947-1-hchauhan@ventanamicro.com> References: <20230620143212.2701598-1-hchauhan@ventanamicro.com> <20230706104928.3391947-1-hchauhan@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230706_034939_643945_F3C849EE X-CRM114-Status: UNSURE ( 7.80 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) 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 macros for Machine Security Configuration (mseccfg) CSR - Add macros to access/manipulate bits in msecfg CSR Signed-off-by: Himanshu Chauhan <hchauhan@ventanamicro.com> Reviewed-by: Anup Patel <anup@brainfault.org> --- include/sbi/riscv_encoding.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1030 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 X-BeenThere: opensbi@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <opensbi.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/opensbi>, <mailto:opensbi-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/opensbi/> List-Post: <mailto:opensbi@lists.infradead.org> List-Help: <mailto:opensbi-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/opensbi>, <mailto:opensbi-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "opensbi" <opensbi-bounces@lists.infradead.org> Errors-To: opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org |
Series |
Add support for Smepmp
|
expand
|
diff --git a/include/sbi/riscv_encoding.h b/include/sbi/riscv_encoding.h index 4ebed97..50071ad 100644 --- a/include/sbi/riscv_encoding.h +++ b/include/sbi/riscv_encoding.h @@ -663,6 +663,18 @@ #define CSR_MHPMEVENT30H 0x73e #define CSR_MHPMEVENT31H 0x73f +/* Machine Security Configuration CSR (mseccfg) */ +#define CSR_MSECCFG_LOWER 0x747 +#define CSR_MSECCFG_UPPER 0x757 +#define CSR_MSECCFG (CSR_MSECCFG_LOWER) + +#define MSECCFG_MML_SHIFT (0) +#define MSECCFG_MML (_UL(1) << MSECCFG_MML_SHIFT) +#define MSECCFG_MMWP_SHIFT (1) +#define MSECCFG_MMWP (_UL(1) << MSECCFG_MMWP_SHIFT) +#define MSECCFG_RLB_SHIFT (2) +#define MSECCFG_RLB (_UL(1) << MSECCFG_RLB_SHIFT) + /* Counter Overflow CSR */ #define CSR_SCOUNTOVF 0xda0