From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f172.google.com (mail-oi1-f172.google.com [209.85.167.172]) by mx.groups.io with SMTP id smtpd.web11.6119.1687545676558992543 for ; Fri, 23 Jun 2023 11:41:16 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@ventanamicro.com header.s=google header.b=RIdAG7BI; spf=pass (domain: ventanamicro.com, ip: 209.85.167.172, mailfrom: tphan@ventanamicro.com) Received: by mail-oi1-f172.google.com with SMTP id 5614622812f47-38c35975545so738167b6e.1 for ; Fri, 23 Jun 2023 11:41:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1687545675; x=1690137675; 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=FtbP7foHppsEW928JzLpBx/lNp4sK1cVmQEjnFkBj5c=; b=RIdAG7BIw/V6iOlJH3HUjmFCy9jv/Hh4dcwVy+PZto3WTPeeKATF3W4nRv8Gt6hU2r d8kxXzuvlqH3dJyLS5wTE/A4WWtzRrzbfScI6mMdDyvSaOObkcwtjcq+pkOrJ/UUCh/6 7Xd53pSlurNJ8suesotOHFzp6bjSkX6UMmc6FYifE2Z+MHs3l6pR4Cclj8ObGm1PNsiC vqkWurC587hnYlnxrBw153VTsDmUYp8NyP0P0dcqtj/alqyjq+k7aOaKD/rIyEWRXzKo xhh93JzEjsaM8MMFcEHgdwKFzcP23SPZCzafZml1zTopsCYNG2ny/6EOb/02YRM51OBw wJdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687545675; x=1690137675; 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=FtbP7foHppsEW928JzLpBx/lNp4sK1cVmQEjnFkBj5c=; b=HFeka9VkhVW6PXNwxWC+6tMaAJyFf5oy4E0XWee4FsEv92qPC/5JSey5ru1sSc/nyX P9M8JMjlIjEu8od/NxBRJVB4E+cnFAAGqNLuq9/QLgXND9sHR3Ch8v4PAwTBI5reTU0N OekxsOkFqCOlojRKr2ydHa/f+vwoy2NkhJbEBDbmfb6fD6LTB3aFD+1TX0rekw7axzol 5ibn0ZjTZji0hom4V+BX/MwGwVu9Vh/g487qASRdQTAInrUgBInoz+ZOnop/o7X8JPWd 46OSyF/bihDfmA+MkNrzQdcYvNC4R6JYAkRRk2au74aI0dKu+xk0vWr7ScyMDGAY+7oG Mu1A== X-Gm-Message-State: AC+VfDxisXPK0K8654/SkdgCjnkLjpjdw2QGN4+nqWehq8R6wp8i/s5d TIjMv657ZxBL5q/alU0sROKu4Cit7zJDw7mYFSc13Q== X-Google-Smtp-Source: ACHHUZ7rzqSzc4rgltogAaM3Os0nnB9jUipI9Ayud1RAT5+g2BCmjenGFyxisdJKDZxw44ITe1mLyQ== X-Received: by 2002:a05:6808:1904:b0:398:27d3:1fc3 with SMTP id bf4-20020a056808190400b0039827d31fc3mr17171145oib.42.1687545675460; Fri, 23 Jun 2023 11:41:15 -0700 (PDT) Return-Path: Received: from localhost.localdomain (c-174-50-177-95.hsd1.ca.comcast.net. [174.50.177.95]) by smtp.gmail.com with ESMTPSA id v2-20020aa78502000000b006667b36e904sm6354184pfn.113.2023.06.23.11.41.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jun 2023 11:41:15 -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: [PATCH v4 6/7] OvmfPkg: RiscVVirt: Remove satp bare mode setting Date: Fri, 23 Jun 2023 11:39:33 -0700 Message-Id: <20230623183934.23905-7-tphan@ventanamicro.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230623183934.23905-1-tphan@ventanamicro.com> References: <20230623183934.23905-1-tphan@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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));=0D }=0D =0D -/**=0D - Configure MMU=0D -**/=0D -STATIC=0D -VOID=0D -InitMmu (=0D - )=0D -{=0D - //=0D - // Set supervisor translation mode to Bare mode=0D - //=0D - RiscVSetSupervisorAddressTranslationRegister ((UINT64)SATP_MODE_OFF << 6= 0);=0D - DEBUG ((DEBUG_INFO, "%a: Set Supervisor address mode to bare-metal mode.= \n", __func__));=0D -}=0D -=0D /**=0D Publish system RAM and reserve memory regions.=0D =0D @@ -327,7 +312,8 @@ MemoryPeimInitialization ( =0D AddReservedMemoryMap (FdtPointer);=0D =0D - InitMmu ();=0D + /* Make sure SEC is booting with bare mode */=0D + ASSERT ((RiscVGetSupervisorAddressTranslationRegister () & SATP64_MODE) = =3D=3D (SATP_MODE_OFF << SATP64_MODE_SHIFT));=0D =0D BuildMemoryTypeInformationHob ();=0D =0D --=20 2.25.1