From nobody Sun Feb 8 05:40:29 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+106943+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+106943+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1689361734; cv=none; d=zohomail.com; s=zohoarc; b=CBiltIJXU9NmMQuAkjVAszfhJNFVvfO94k3rk+nx98sQ92LYdfCU4eak0tlxnQgDnKj9uFMwSEw+RXnpXUjhdu/Pp2IvOe4BvAu/lWTSnsPmUXIwCGNxgMmW0GOtIbOqdcRaVBbYPVBHlq5Xloyo3ZNa7Q7xYOPIj295Cmp1xHo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1689361734; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=Q8uDr/7pfYspqpk5Dw1L0IeearivVgT6tLwsf3iyNNQ=; b=KOKezfl4n95rzqDtVVgX6QkvqocRb87f3HJit1NqJCeErk2QZQPR2eXvljd3C/0u3jYCpYXVF/ixa4+XSQEqZsUSw55kVMQrh6oHsKy0m0MnS5zp4jFfNiW1IZCtTSua31H6/5OyBJK4zS9A6LJ31olriekvQ1yJRZGY/sf5Ipc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+106943+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 168936173481159.547403781517005; Fri, 14 Jul 2023 12:08:54 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=HRiEkEydHvH6YsWGZuLRjq+nPQ9yxJF97sZ6gleysE0=; c=relaxed/simple; d=groups.io; h=X-Received:X-Received:X-Received:X-Gm-Message-State:X-Google-Smtp-Source:X-Received:X-Received:From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Unsubscribe:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:Content-Transfer-Encoding; s=20140610; t=1689361734; v=1; b=Fx5vWZDjXvz/3SaRbrbO+PONuFXZ+ET1hBsjLyz+elS7ZLpqrlXiVIpxTLLygSfFbXVGZNd0 v/OYMQNgCvSJe3ezAPBlMxY9zm/tvwE7rnPbT5COVBqGb5GWc+avqbDp1MsYNvqtkSeDuHsbkbg 5/aO3C5MoYqAgv/dk5BzSHac= X-Received: by 127.0.0.2 with SMTP id UJcsYY1788612xBYm1r20ltI; Fri, 14 Jul 2023 12:08:54 -0700 X-Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mx.groups.io with SMTP id smtpd.web10.3794.1689361733973353700 for ; Fri, 14 Jul 2023 12:08:54 -0700 X-Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-6686ef86110so1555339b3a.2 for ; Fri, 14 Jul 2023 12:08:53 -0700 (PDT) X-Gm-Message-State: 1NeeE5TJP9mjxSpoRkJTlQGvx1787277AA= X-Google-Smtp-Source: APBJJlH7Dn51Tqz504Zbo/HsEq8yw4QwWaAUeHHQSqwLtdhXD5paCt0o4XoQQZmnaEFqWYQ4ynuOvw== X-Received: by 2002:a05:6a21:3284:b0:110:9210:f6ac with SMTP id yt4-20020a056a21328400b001109210f6acmr5534657pzb.37.1689361733065; Fri, 14 Jul 2023 12:08:53 -0700 (PDT) X-Received: from localhost.localdomain (c-174-50-177-95.hsd1.ca.comcast.net. [174.50.177.95]) by smtp.gmail.com with ESMTPSA id p18-20020a170902ead200b001a98f844e60sm8041413pld.263.2023.07.14.12.08.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Jul 2023 12:08:52 -0700 (PDT) From: "Tuan Phan" To: devel@edk2.groups.io Cc: michael.d.kinney@intel.com, gaoliming@byosoft.com.cn, zhiguang.liu@intel.com, sunilvl@ventanamicro.com, git@danielschaefer.me, andrei.warkentin@intel.com, ardb+tianocore@kernel.org, Tuan Phan Subject: [edk2-devel] [PATCH v5 6/7] OvmfPkg: RiscVVirt: Remove satp bare mode setting Date: Fri, 14 Jul 2023 12:08:23 -0700 Message-Id: <20230714190824.16552-7-tphan@ventanamicro.com> In-Reply-To: <20230714190824.16552-1-tphan@ventanamicro.com> References: <20230714190824.16552-1-tphan@ventanamicro.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,tphan@ventanamicro.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1689361736199100023 Content-Type: text/plain; charset="utf-8" There is no point to set satp to bare mode as that should be the default mode when booting edk2. Signed-off-by: Tuan Phan Reviewed-by: Andrei Warkentin Reviewed-by: Sunil V L --- OvmfPkg/RiscVVirt/Sec/Memory.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/OvmfPkg/RiscVVirt/Sec/Memory.c b/OvmfPkg/RiscVVirt/Sec/Memory.c index 0e2690c73687..aad71ee5dcbb 100644 --- a/OvmfPkg/RiscVVirt/Sec/Memory.c +++ b/OvmfPkg/RiscVVirt/Sec/Memory.c @@ -85,21 +85,6 @@ AddMemoryRangeHob ( AddMemoryBaseSizeHob (MemoryBase, (UINT64)(MemoryLimit - MemoryBase)); } =20 -/** - Configure MMU -**/ -STATIC -VOID -InitMmu ( - ) -{ - // - // Set supervisor translation mode to Bare mode - // - RiscVSetSupervisorAddressTranslationRegister ((UINT64)SATP_MODE_OFF << 6= 0); - DEBUG ((DEBUG_INFO, "%a: Set Supervisor address mode to bare-metal mode.= \n", __func__)); -} - /** Publish system RAM and reserve memory regions. =20 @@ -327,7 +312,8 @@ MemoryPeimInitialization ( =20 AddReservedMemoryMap (FdtPointer); =20 - InitMmu (); + /* Make sure SEC is booting with bare mode */ + ASSERT ((RiscVGetSupervisorAddressTranslationRegister () & SATP64_MODE) = =3D=3D (SATP_MODE_OFF << SATP64_MODE_SHIFT)); =20 BuildMemoryTypeInformationHob (); =20 --=20 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106943): https://edk2.groups.io/g/devel/message/106943 Mute This Topic: https://groups.io/mt/100147813/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-