From nobody Sat Nov 2 12:32:49 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1490602168553588.4296799433387; Mon, 27 Mar 2017 01:09:28 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D914F21DFA7BB; Mon, 27 Mar 2017 01:09:05 -0700 (PDT) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A1DA321BC6A23 for ; Mon, 27 Mar 2017 01:08:57 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Mar 2017 01:08:57 -0700 Received: from junghyun-mobl.amr.corp.intel.com (HELO jljusten-skl.amr.corp.intel.com) ([10.252.131.12]) by fmsmga005.fm.intel.com with ESMTP; 27 Mar 2017 01:08:57 -0700 X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490602137; x=1522138137; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=qRIxfNlejJuTKAmVUnW51AoHhfUXWSqE4C30dOP/kNY=; b=NkKC6stL+66d+W2mhEP/vNqPoi2COu3XogW0vI3w2AuRcu8eKsrxqRMK dJIepOZk1/iP69A8G8yTk/NydEkVvw==; X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,229,1486454400"; d="scan'208";a="80948389" From: Jordan Justen To: edk2-devel@lists.01.org Date: Mon, 27 Mar 2017 01:05:44 -0700 Message-Id: <20170327080544.24748-13-jordan.l.justen@intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170327080544.24748-1-jordan.l.justen@intel.com> References: <20170327080544.24748-1-jordan.l.justen@intel.com> Subject: [edk2] [PATCH 12/12] OvmfPkg QemuFlashFvbServicesRuntimeDxe: Cleanup init now done in PEI X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jordan Justen , Laszlo Ersek MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This is now done in PEI since commit "OvmfPkg PlatformPei: Set flash variable PCDs". Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen --- .../FvbServicesRuntimeDxe.inf | 4 ---- .../FvbServicesSmm.inf | 4 ---- .../FwBlockService.c | 28 ++++--------------= ---- 3 files changed, 5 insertions(+), 31 deletions(-) diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.i= nf b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf index c0dda75bf7..8656d185f6 100644 --- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf +++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesRuntimeDxe.inf @@ -78,11 +78,7 @@ gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareBlockSize =20 [Pcd] - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable =20 [FeaturePcd] diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf b/Ov= mfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf index ba2d3679a4..c9cbc34901 100644 --- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf +++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FvbServicesSmm.inf @@ -77,11 +77,7 @@ gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFirmwareBlockSize =20 [Pcd] - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashNvStorageEventLogBase - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 gUefiOvmfPkgTokenSpaceGuid.PcdOvmfFlashVariablesEnable =20 [FeaturePcd] diff --git a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c b/Ovmf= Pkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c index ff27c1100c..857b1e3878 100644 --- a/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c +++ b/OvmfPkg/QemuFlashFvbServicesRuntimeDxe/FwBlockService.c @@ -965,9 +965,9 @@ FvbInitialize ( EFI_PHYSICAL_ADDRESS BaseAddress; UINTN Length; UINTN NumOfBlocks; - RETURN_STATUS PcdStatus; =20 - if (EFI_ERROR (QemuFlashInitialize ())) { + if (!PcdGetBool (PcdOvmfFlashVariablesEnable)) { + ASSERT (!FeaturePcdGet (PcdSmmSmramRequire)); // // Return an error so image will be unloaded // @@ -976,6 +976,9 @@ FvbInitialize ( return EFI_WRITE_PROTECTED; } =20 + Status =3D QemuFlashInitialize (); + ASSERT_RETURN_ERROR (Status); + // // Allocate runtime services data for global variable, which contains // the private data of all firmware volume block instances @@ -1093,25 +1096,6 @@ FvbInitialize ( =20 MarkMemoryRangeForRuntimeAccess (BaseAddress, Length); =20 - // - // Set several PCD values to point to flash - // - PcdStatus =3D PcdSet64S ( - PcdFlashNvStorageVariableBase64, - (UINTN) PcdGet32 (PcdOvmfFlashNvStorageVariableBase) - ); - ASSERT_RETURN_ERROR (PcdStatus); - PcdStatus =3D PcdSet32S ( - PcdFlashNvStorageFtwWorkingBase, - PcdGet32 (PcdOvmfFlashNvStorageFtwWorkingBase) - ); - ASSERT_RETURN_ERROR (PcdStatus); - PcdStatus =3D PcdSet32S ( - PcdFlashNvStorageFtwSpareBase, - PcdGet32 (PcdOvmfFlashNvStorageFtwSpareBase) - ); - ASSERT_RETURN_ERROR (PcdStatus); - FwhInstance =3D (EFI_FW_VOL_INSTANCE *) ( (UINTN) ((UINT8 *) FwhInstance) + FwVolHeader->HeaderLength + @@ -1123,7 +1107,5 @@ FvbInitialize ( // InstallVirtualAddressChangeHandler (); =20 - PcdStatus =3D PcdSetBoolS (PcdOvmfFlashVariablesEnable, TRUE); - ASSERT_RETURN_ERROR (PcdStatus); return EFI_SUCCESS; } --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel