From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@ventanamicro.com header.s=google header.b=eSaUvf32; spf=pass (domain: ventanamicro.com, ip: 209.85.210.170, mailfrom: tphan@ventanamicro.com) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-6686ef86110so1555339b3a.2 for ; Fri, 14 Jul 2023 12:08:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1689361733; x=1691953733; 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=eSaUvf32ecW3XFNR8kF+v1uKak3lPibhfCieRphcAkGIMHDs5gEo2Umksj5ml1Aesd IREgvH4p8y4WiNKpFvbbgJ8CEDcDeYg9yhc7HIShftFWwLwdB/jLI1cqqg/C7YGc7388 1t7TnQQkC2F3ivFrVIL1J2IvWnR5MYayaBeA+lr8xWP0mZayAvwQAlONuRfRwzCBzT9F rga8O82iU8O1qoEovcmHl2RFYmjBgwmgOpJqjOudBIsEZB+3Lt8eQNiJXRnbCQjXfcBJ VdrWn8JezCO28nqx+lLC1E72VmplV0bgSvYbpc1ji3R7Zjti7C27wfAbQkKFAfwwlq/5 vZUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689361733; x=1691953733; 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=TdNfpyhssl7d1SSxMu03bfNTl7ajigNNW4b+E3DOH9oSAmyW8KDeRjpwhIx4jj+FvS SwkrGzBsOE+knRNwPOHsSeU+u1OGBQt9opUXlkTWsoO7YtbH/mfYs3FgPxnbq0UJlcai e0i04OLh5TVu8CNjD3daRflnTrC9gSTJxJww6WguN4119xhQwHnyggXhrjiCac3AIjxH mSezPnRbHDxNtwNMEtZvnMv1bSlkJeS0Pc3DlUQQYKv/dO528ZTcbb9Fi8cmyq9W8goX zT9KbkUp911UyoJ9nvXX3Eh7WjsBB8LoJX32aS3VRHb5neqmLXtz0cAapuOVHMz+OnnH HLwQ== X-Gm-Message-State: ABy/qLZvQ6s15E7wnhOFSGkOrZ6XBU3JWJOQlwH3Ei8yfnoAbuVYdV6a H5Za1HGmja2cqq68ksADV+PCNnQyQIlFJ1pChQBOzg== 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) 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 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: [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> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230714190824.16552-1-tphan@ventanamicro.com> References: <20230714190824.16552-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