Message ID | 20220405104541.13185-4-mchitale@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@bilbo.ozlabs.org Authentication-Results: bilbo.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=UW2xUWXJ; 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=Urlme0En; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=<UNKNOWN>) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KXkpW5zN5z9sFq for <incoming@patchwork.ozlabs.org>; Tue, 5 Apr 2022 20:46:26 +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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id: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=/EJlZiYFgEEb02VaA/NJE+4DKZ+jAHLmVyz2n29P0Ns=; b=UW2xUWXJUspImo lrZlSGRwMDSO7r3JVpCn4DXrGDiBSZJ0whS5nzuYJ6eQvJ2mos+1lyp780vhWmNwt/sh7oUFVoQqu 5dVDgGD6KC1g+XIiqrKPecjpqUzoGdIUPbkdYNhXXQm4bjD/zmqUyRZaUla89lENDQhskke2GRJiM U6i3E+ThRB+UUaJcF3Awn1vDIp/d2lZ+wNP1fvp8GAXDUh69j3EDPUdNmBoiDEvs3axi/z9Z/pFj8 aPY45DwY/Ac0pFS44n17KxarIRB2jFEhjPYYnmpnR1QtRYoIji1iyFieH+dFAAZQfVblxcUT0Vxcd BK9NCS/ixJO+IGR+QABg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nbghQ-000guy-0W; Tue, 05 Apr 2022 10:46:12 +0000 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nbghM-000grc-PV for opensbi@lists.infradead.org; Tue, 05 Apr 2022 10:46:10 +0000 Received: by mail-pj1-x102a.google.com with SMTP id i10-20020a17090a2aca00b001ca56c9ab16so1621522pjg.1 for <opensbi@lists.infradead.org>; Tue, 05 Apr 2022 03:46:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=FOBa/XQYkgAK/091/kgpPSZZbVfJ/fWWSwqwI4hTJHs=; b=Urlme0EnGIzcbjyfpaC5iaZ03FGzJPRDGrNyS3r7J9SHYOrjmZqoVYybXxTucMXBjb w7APczn1EhSOOUKSYU96KWADC5Zjg6L8BxxHM3gn9yglR68iSM6PtxCFvRkrbRXYRRUi 61OETKUCaDt+yhugN43dkC55DtnSVcuHfgFVp7dSrK6aqK90zmXEMURgP8UGrohUaISG wXE/+aGNe71bZJh7kKyM2ttOUZDIHrv3ma/kuM8jGPScbX8IEJuYDP7REXeFGP4oj1ZI pU/IH7Pz0MhyPphNanFjHKb9GcWKkIc+uUtHHzy0w5cWLJTYKT+E8ddhm0T8EhePJiOM dxgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=FOBa/XQYkgAK/091/kgpPSZZbVfJ/fWWSwqwI4hTJHs=; b=caEN5B9kb1Yincsb+FiAJ2HJe9OISaW347jXAxGIEfLk+jnL2e3sdL5IS/fzj98WEr AKfCG7SZB+3ewgAI9OCIPG0Wb08u8bJMx1/KtpSq6OClBCZ2aRc/M+jjqYu/jS4YTFDr LniF3jgkJX1dYU1d1VqVcYQwQeIcA14dCq1oEnBuKuzXPffiKo13L1PBIJ9omVYCORLw mWe39T4XZH+3LYJPImunR6R+pIPBfo4+bQf7icf3CcEgUguhMcl92L/n+8witjwbsOcU dTLCSBC/DKit5EmE6ty5Jmn5k4BGRlEGAWHfna+QkXo7EB1h2xnZ6tc1eZnYxHdUNdka L/Nw== X-Gm-Message-State: AOAM530mEnnrhl0vgPMchUwh+s34VSyAFnSiU+/P3HQhEhYVrAliKrlY jWG/8d96GFRySTBFsIiOGewA356SGb7aiQC0t9g= X-Google-Smtp-Source: ABdhPJykO/4kFNDT6iGWTvz5jxQSZl8/AT0KcSGAsi9pwzC5wFG9BuCexXJa5FTpHqB9LJDEM7GKtg== X-Received: by 2002:a17:902:b704:b0:156:624:934b with SMTP id d4-20020a170902b70400b001560624934bmr2958429pls.116.1649155565363; Tue, 05 Apr 2022 03:46:05 -0700 (PDT) Received: from ThinkPad-T490.dc1.ventanamicro.com ([182.70.13.238]) by smtp.googlemail.com with ESMTPSA id 21-20020a630115000000b00382a0895661sm12964147pgb.11.2022.04.05.03.46.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 03:46:04 -0700 (PDT) From: Mayuresh Chitale <mchitale@ventanamicro.com> To: opensbi@lists.infradead.org Cc: Mayuresh Chitale <mchitale@ventanamicro.com> Subject: [PATCH v2 3/3] lib: irqchip/imsic: configure mstateen Date: Tue, 5 Apr 2022 16:15:41 +0530 Message-Id: <20220405104541.13185-4-mchitale@ventanamicro.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220405104541.13185-1-mchitale@ventanamicro.com> References: <20220405104541.13185-1-mchitale@ventanamicro.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220405_034608_863333_1BBB31A0 X-CRM114-Status: UNSURE ( 8.94 ) 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: When mstateen registers are implemented, the AIA related configurations need to be done in mstateen for the IMSIC initialization to succeed. Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com> --- lib/sbi/sbi_hart.c | 6 ++++++ 1 file changed, 6 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:102a 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> MIME-Version: 1.0 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 |
RISC-V Smstateen support
|
expand
|
diff --git a/lib/sbi/sbi_hart.c b/lib/sbi/sbi_hart.c index db08eaf..604e0b4 100644 --- a/lib/sbi/sbi_hart.c +++ b/lib/sbi/sbi_hart.c @@ -98,6 +98,12 @@ static void mstatus_init(struct sbi_scratch *scratch) mstateen_val |= SMSTATEEN0_HSENVCFG; else mstateen_val &= ~SMSTATEEN0_HSENVCFG; + if (sbi_hart_has_feature(scratch, SBI_HART_HAS_AIA)) + mstateen_val |= (SMSTATEEN0_AIA | SMSTATEEN0_SVSLCT | + SMSTATEEN0_IMSIC); + else + mstateen_val &= ~(SMSTATEEN0_AIA | SMSTATEEN0_SVSLCT | + SMSTATEEN0_IMSIC); csr_write(CSR_MSTATEEN0, mstateen_val); #if __riscv_xlen == 32 csr_write(CSR_MSTATEEN0H, mstateen_val >> 32);
When mstateen registers are implemented, the AIA related configurations need to be done in mstateen for the IMSIC initialization to succeed. Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com> --- lib/sbi/sbi_hart.c | 6 ++++++ 1 file changed, 6 insertions(+)