Message ID | 20230712043436.100548-2-hchauhan@ventanamicro.com |
---|---|
State | Accepted |
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=3BS1jD6b; 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=E9krQBrK; 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 4R14fW2zsGz20b9 for <incoming@patchwork.ozlabs.org>; Wed, 12 Jul 2023 14:35:15 +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=3BS1jD6bS/tzUZ CQekcCTyTFNDsHy3wmvwOcEFHV8DJGMdGo4KLpUqzJIcNlCIWkVnumGY1CCtRhxbMakrfaHWiMBLV Zqe8FFIhaSSec+gXF2HowGdLHPXvcLaSl36KBqTE7JCsjR6tPdDw1ebKQlavmNEhbyg5aruiJxTZR VHqY8Oqx7TxOGXghDxDELn4n0ZpgV0dkk3cmD1i5rFws25dlJmekxDuXF2wMcdWv1St99a/zQuJUs idlK+l4kkqQaV5n6/T/xw5KvExGJ7pFQNVOv8htkeKgibeOw8uVD1bkKgM3cyQsRea3PXFhgmZM+N dIreCS7mRtcDI+BBUVQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qJRYv-00GUoV-26; Wed, 12 Jul 2023 04:34:49 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qJRYt-00GUnf-0t for opensbi@lists.infradead.org; Wed, 12 Jul 2023 04:34:48 +0000 Received: by mail-pf1-x432.google.com with SMTP id d2e1a72fcca58-66d6a9851f3so1051572b3a.0 for <opensbi@lists.infradead.org>; Tue, 11 Jul 2023 21:34:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1689136486; x=1691728486; 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=E9krQBrKXaPgrkB9mTH3Ih67oPPxrllL5uiDC6yuB82gzKCgAUr3llSsvTSdrLbXIQ aHiZ/yx6id6iOIbg0AU5U88SIfZK5sHZOhhSe00HsVhCPNor/YfvotxyQRXuicIVoFuv rbUmdTZU/fjjoVDXsK5yOx0j8xVYS8x2ZxeYlCxCaPCMxuWzHwADmpgv1JJ6IqIkD5O/ P2SDUTSzOLrZK2DzNESqS+0UH/kQQ2MJGHFvid6aSlV3ncJbGH6LxlL66wuWghEunndU v6FuHkKmKInn/9ele2M2jMhXKGttlBIMQZShemXz03UrCEW18oUS1+XbOV5YFCyIil1p xb8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689136486; x=1691728486; 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=Faz+5Zqxu3XUrd7ebnd3negWZMtSrefsukMXiUaYsd0cxNNkvobZE3BgKU8PFnyajt QmYoJHClX0WKd9hH8jJrcAQ13ihLfHSEl4waNoJSFuDhKvnA0JgQnF9JUtBzpjBOsWWH m9wSlXBbbO+3hroGejeLpySlNpASrV4mLl3LzdmTi9cZPwfq/yxFI3jloLlywQN9B4yE B0Mks1e9GIOqjWKlEHGcmzT66OzUQh1pWcr/Sm6zesLSxKf+ba40UTz+UAJSZJmkveOz 2e6nUkpqcmnrv68JhE42+AzNJcqlT/9M6SNTHOx/GUtDKVtM6fqqd/FW4YNi0i1e8/We gvmg== X-Gm-Message-State: ABy/qLYMMTmg0GOvoOD5jUwlA0Qaw6OQy3TS6a+iwW1kvN5h3vYJz6pe biSdWA4GODVKCzF4m20DePEcd91Ad6zZsxpJe80= X-Google-Smtp-Source: APBJJlGPsktBKPdAmkUab9Pdpq3n3iLjbBd/Wsv5XLT93YyDqmtxCgLQsSmeznnpxKRjHy4Juk8Y6Q== X-Received: by 2002:a17:903:41c7:b0:1b8:b55d:4cff with SMTP id u7-20020a17090341c700b001b8b55d4cffmr22429240ple.2.1689136485873; Tue, 11 Jul 2023 21:34:45 -0700 (PDT) Received: from saptrishi.. ([2409:40f2:101d:c560:cb32:f5f5:1d86:260a]) by smtp.gmail.com with ESMTPSA id ix13-20020a170902f80d00b001b896686c78sm2806152plb.66.2023.07.11.21.34.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jul 2023 21:34:45 -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 v3 01/10] include: sbi: Add macro definitions for mseccfg CSR Date: Wed, 12 Jul 2023 10:04:27 +0530 Message-Id: <20230712043436.100548-2-hchauhan@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230712043436.100548-1-hchauhan@ventanamicro.com> References: <20230706104928.3391947-1-hchauhan@ventanamicro.com> <20230712043436.100548-1-hchauhan@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230711_213447_312151_89E8D957 X-CRM114-Status: UNSURE ( 7.95 ) 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:432 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