From nobody Thu Apr 25 03:31:11 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.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; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1533551347603702.3671778311931; Mon, 6 Aug 2018 03:29:07 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 23542210DA797; Mon, 6 Aug 2018 03:29:05 -0700 (PDT) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (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 99194210DA784 for ; Mon, 6 Aug 2018 03:29:04 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Aug 2018 03:29:04 -0700 Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.158.46]) by fmsmga005.fm.intel.com with ESMTP; 06 Aug 2018 03:29:03 -0700 X-Original-To: edk2-devel@lists.01.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; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,452,1526367600"; d="scan'208";a="251641684" From: Star Zeng To: edk2-devel@lists.01.org Date: Mon, 6 Aug 2018 18:28:59 +0800 Message-Id: <1533551340-66548-2-git-send-email-star.zeng@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 In-Reply-To: <1533551340-66548-1-git-send-email-star.zeng@intel.com> References: <1533551340-66548-1-git-send-email-star.zeng@intel.com> Subject: [edk2] [PATCH 1/2] FmpDevicePkg FmpDxe: Need repopulate after SetImage is called X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael D Kinney , Star Zeng MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RDMRC_1 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" No need repopulate if SetImage is not called. But need repopulate after SetImage is called to update LastAttemptVersion and LastAttemptStatus Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng --- FmpDevicePkg/FmpDxe/FmpDxe.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/FmpDevicePkg/FmpDxe/FmpDxe.c b/FmpDevicePkg/FmpDxe/FmpDxe.c index eb3a9b0e32c2..3794ac5008f9 100644 --- a/FmpDevicePkg/FmpDxe/FmpDxe.c +++ b/FmpDevicePkg/FmpDxe/FmpDxe.c @@ -906,9 +906,6 @@ SetTheImage ( UINT32 AllHeaderSize; UINT32 IncommingFwVersion; UINT32 LastAttemptStatus; - EFI_STATUS GetAttributesStatus; - UINT64 AttributesSupported; - UINT64 AttributesSetting; UINT32 Version; UINT32 LowestSupportedVersion; =20 @@ -1121,18 +1118,6 @@ SetTheImage ( =20 LastAttemptStatus =3D LAST_ATTEMPT_STATUS_SUCCESS; =20 - // - // Set flag so the descriptor is repopulated - // This is only applied to devices that do not require reset - // - GetAttributesStatus =3D FmpDeviceGetAttributes (&AttributesSupported, &A= ttributesSetting); - if (!EFI_ERROR (GetAttributesStatus)) { - if (((AttributesSupported & IMAGE_ATTRIBUTE_RESET_REQUIRED) =3D=3D 0) = || - ((AttributesSetting & IMAGE_ATTRIBUTE_RESET_REQUIRED) =3D=3D 0)) { - mDescriptorPopulated =3D FALSE; - } - } - cleanup: mProgressFunc =3D NULL; mProgressSupported =3D FALSE; @@ -1145,6 +1130,12 @@ cleanup: Progress (100); } =20 + // + // Need repopulate after SetImage is called to + // update LastAttemptVersion and LastAttemptStatus. + // + mDescriptorPopulated =3D FALSE; + return Status; } =20 --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Thu Apr 25 03:31:11 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.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; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1533551349671561.0190071681156; Mon, 6 Aug 2018 03:29:09 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 4FA4A210DA79E; Mon, 6 Aug 2018 03:29:06 -0700 (PDT) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (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 97045210DA784 for ; Mon, 6 Aug 2018 03:29:05 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Aug 2018 03:29:05 -0700 Received: from shwdeopenpsi068.ccr.corp.intel.com ([10.239.158.46]) by fmsmga005.fm.intel.com with ESMTP; 06 Aug 2018 03:29:04 -0700 X-Original-To: edk2-devel@lists.01.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; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.126; helo=mga18.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,452,1526367600"; d="scan'208";a="251641689" From: Star Zeng To: edk2-devel@lists.01.org Date: Mon, 6 Aug 2018 18:29:00 +0800 Message-Id: <1533551340-66548-3-git-send-email-star.zeng@intel.com> X-Mailer: git-send-email 2.7.0.windows.1 In-Reply-To: <1533551340-66548-1-git-send-email-star.zeng@intel.com> References: <1533551340-66548-1-git-send-email-star.zeng@intel.com> Subject: [edk2] [PATCH 2/2] MdeModulePkg ErstFmpDxe: Create ESRT in ReadyToBoot event X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael D Kinney , Star Zeng MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RDMRC_1 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Current code just creates ESRT entry in FMP notification and installs ESRT configuration table in ReadyToBoot event. The LastAttemptVersion and LastAttemptStatus in ESRT will be out of date after system continues to boot without reset after capsule update (reset is required or capsule update is failed). This patches updates the code to create ESRT based on all FMP instances in ReadyToBoot event. Cc: Michael D Kinney Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng --- MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmp.c | 239 ++++++++++++------------= ---- 1 file changed, 103 insertions(+), 136 deletions(-) diff --git a/MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmp.c b/MdeModulePkg/Uni= versal/EsrtFmpDxe/EsrtFmp.c index cc9dd63b53cd..219059760e97 100644 --- a/MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmp.c +++ b/MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmp.c @@ -55,47 +55,34 @@ PrintTable ( // #define GROWTH_STEP 10 =20 -// -// Module globals. -// -EFI_EVENT mEsrtReadyToBootEvent; -EFI_SYSTEM_RESOURCE_TABLE *mTable =3D NULL; -BOOLEAN mEsrtInstalled =3D FALSE; -EFI_EVENT mFmpInstallEvent; -VOID *mFmpInstallEventRegistration =3D NULL; - /** Install EFI System Resource Table into the UEFI Configuration Table =20 + @param[in] Table Pointer to the ESRT. + @return Status code. =20 **/ EFI_STATUS InstallEfiSystemResourceTableInUefiConfigurationTable ( - VOID + IN EFI_SYSTEM_RESOURCE_TABLE *Table ) { EFI_STATUS Status; =20 Status =3D EFI_SUCCESS; - if (!mEsrtInstalled) { - if (mTable =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "EsrtFmpDxe: Can't install ESRT table because i= t is NULL. \n")); - Status =3D EFI_OUT_OF_RESOURCES; - } else if (mTable->FwResourceCount =3D=3D 0) { - DEBUG ((DEBUG_ERROR, "EsrtFmpDxe: Can't install ESRT table because i= t has zero Entries. \n")); - Status =3D EFI_UNSUPPORTED; + if (Table->FwResourceCount =3D=3D 0) { + DEBUG ((DEBUG_ERROR, "EsrtFmpDxe: Can't install ESRT table because it = has zero Entries. \n")); + Status =3D EFI_UNSUPPORTED; + } else { + // + // Install the pointer into config table + // + Status =3D gBS->InstallConfigurationTable (&gEfiSystemResourceTableGui= d, Table); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "EsrtFmpDxe: Can't install ESRT table. Status:= %r. \n", Status)); } else { - // - // Install the pointer into config table - // - Status =3D gBS->InstallConfigurationTable (&gEfiSystemResourceTableG= uid, mTable); - if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "EsrtFmpDxe: Can't install ESRT table. Statu= s: %r. \n", Status)); - } else { - DEBUG ((DEBUG_INFO, "EsrtFmpDxe: Installed ESRT table. \n")); - mEsrtInstalled =3D TRUE; - } + DEBUG ((DEBUG_INFO, "EsrtFmpDxe: Installed ESRT table. \n")); } } return Status; @@ -135,15 +122,18 @@ IsSystemFmp ( given a FMP descriptor. If the guid is already in the ESRT it will be ignored. The ESRT will grow if it does not have enough room. =20 - @param[in] FmpImageInfoBuf Pointer to the EFI_FIRMWARE_IMAGE_DESCRIP= TOR. - @param[in] FmpVersion FMP Version. + @param[in, out] Table On input, pointer to the pointer to th= e ESRT. + On output, same as input or pointer to= the pointer + to new enlarged ESRT. + @param[in] FmpImageInfoBuf Pointer to the EFI_FIRMWARE_IMAGE_DESC= RIPTOR. + @param[in] FmpVersion FMP Version. =20 @return Status code. =20 **/ EFI_STATUS -EFIAPI CreateEsrtEntry ( + IN OUT EFI_SYSTEM_RESOURCE_TABLE **Table, IN EFI_FIRMWARE_IMAGE_DESCRIPTOR *FmpImageInfoBuf, IN UINT32 FmpVersion ) @@ -156,18 +146,11 @@ CreateEsrtEntry ( Index =3D 0; Entry =3D NULL; =20 - // - // Get our ESRT table. This should never be null at this point - // - if (mTable =3D=3D NULL) { - return EFI_DEVICE_ERROR; - } - - Entry =3D (EFI_SYSTEM_RESOURCE_ENTRY *)(mTable + 1); + Entry =3D (EFI_SYSTEM_RESOURCE_ENTRY *)((*Table) + 1); // // Make sure Guid isn't already in the list // - for (Index =3D 0; Index < mTable->FwResourceCount; Index++) { + for (Index =3D 0; Index < (*Table)->FwResourceCount; Index++) { if (CompareGuid (&Entry->FwClass, &FmpImageInfoBuf->ImageTypeId)) { DEBUG ((DEBUG_ERROR, "EsrtFmpDxe: ESRT Entry already exists for FMP = Instance with GUID %g\n", &Entry->FwClass)); return EFI_INVALID_PARAMETER; @@ -178,18 +161,8 @@ CreateEsrtEntry ( // // Grow table if needed // - if (mTable->FwResourceCount >=3D mTable->FwResourceCountMax) { - // - // Can't grow table after installed. - // Only because didn't add support for this. - // Would need to re-install ESRT in system table if wanted to support - // - if (mEsrtInstalled) { - DEBUG ((DEBUG_ERROR, "EsrtFmpDxe: Failed to install entry because ES= RT table needed to grow after table already installed. \n")); - return EFI_OUT_OF_RESOURCES; - } - - NewSize =3D ((mTable->FwResourceCountMax + GROWTH_STEP) * sizeof (EFI= _SYSTEM_RESOURCE_ENTRY)) + sizeof (EFI_SYSTEM_RESOURCE_TABLE); + if ((*Table)->FwResourceCount >=3D (*Table)->FwResourceCountMax) { + NewSize =3D (((*Table)->FwResourceCountMax + GROWTH_STEP) * sizeof (E= FI_SYSTEM_RESOURCE_ENTRY)) + sizeof (EFI_SYSTEM_RESOURCE_TABLE); NewTable =3D AllocateZeroPool (NewSize); if (NewTable =3D=3D NULL) { DEBUG ((DEBUG_ERROR, "EsrtFmpDxe: Failed to allocate memory larger t= able for ESRT. \n")); @@ -200,8 +173,8 @@ CreateEsrtEntry ( // CopyMem ( NewTable, - mTable, - ((mTable->FwResourceCountMax) * sizeof (EFI_SYSTEM_RESOURCE_ENTRY)) = + sizeof (EFI_SYSTEM_RESOURCE_TABLE) + (*Table), + (((*Table)->FwResourceCountMax) * sizeof (EFI_SYSTEM_RESOURCE_ENTRY)= ) + sizeof (EFI_SYSTEM_RESOURCE_TABLE) ); // // Update max @@ -210,25 +183,25 @@ CreateEsrtEntry ( // // Free old table // - FreePool (mTable); + FreePool ((*Table)); // // Reassign pointer to new table. // - mTable =3D NewTable; + (*Table) =3D NewTable; } =20 // // ESRT table has enough room for the new entry so add new entry // - Entry =3D (EFI_SYSTEM_RESOURCE_ENTRY *)(((UINT8 *)mTable) + sizeof (EFI_= SYSTEM_RESOURCE_TABLE)); + Entry =3D (EFI_SYSTEM_RESOURCE_ENTRY *)(((UINT8 *)(*Table)) + sizeof (EF= I_SYSTEM_RESOURCE_TABLE)); // // Move to the location of new entry // - Entry =3D Entry + mTable->FwResourceCount; + Entry =3D Entry + (*Table)->FwResourceCount; // // Increment resource count // - mTable->FwResourceCount++; + (*Table)->FwResourceCount++; =20 CopyGuid (&Entry->FwClass, &FmpImageInfoBuf->ImageTypeId); =20 @@ -264,23 +237,23 @@ CreateEsrtEntry ( } =20 /** - Notify function for every Firmware Management Protocol being installed. - Get the descriptors from FMP Instance and create ESRT entries (ESRE) + Function to create ESRT based on FMP Instances. + Create ESRT table, get the descriptors from FMP Instance and + create ESRT entries (ESRE). =20 - @param[in] Event The Event that is being processed. - @param[in] Context The Event Context. + @return Pointer to the ESRT created. =20 **/ -VOID -EFIAPI -FmpInstallProtocolNotify ( - IN EFI_EVENT Event, - IN VOID *Context +EFI_SYSTEM_RESOURCE_TABLE * +CreateFmpBasedEsrt ( + VOID ) { EFI_STATUS Status; - EFI_HANDLE Handle; - UINTN BufferSize; + EFI_SYSTEM_RESOURCE_TABLE *Table; + UINTN NoProtocols; + VOID **Buffer; + UINTN Index; EFI_FIRMWARE_MANAGEMENT_PROTOCOL *Fmp; UINTN DescriptorSize; EFI_FIRMWARE_IMAGE_DESCRIPTOR *FmpImageInfoBuf; @@ -292,29 +265,43 @@ FmpInstallProtocolNotify ( CHAR16 *PackageVersionName; =20 Status =3D EFI_SUCCESS; - Handle =3D 0; - BufferSize =3D 0; + Table =3D NULL; + NoProtocols =3D 0; + Buffer =3D NULL; PackageVersionName =3D NULL; FmpImageInfoBuf =3D NULL; FmpImageInfoBufOrg =3D NULL; Fmp =3D NULL; =20 - DEBUG ((DEBUG_INFO, "FMP Installed Notify\n")); - while (TRUE) { - BufferSize =3D sizeof (EFI_HANDLE); - Status =3D gBS->LocateHandle (ByRegisterNotify, NULL, mFmpInstallEvent= Registration, &BufferSize, &Handle); - if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_WARN, "EsrtFmpDxe: Failed to Locate handle from notify= value. Status: %r\n", Status)); - return; - } + Status =3D EfiLocateProtocolBuffer ( + &gEfiFirmwareManagementProtocolGuid, + &NoProtocols, + &Buffer + ); + if (EFI_ERROR(Status) || (Buffer =3D=3D NULL)) { + return NULL; + } =20 - Status =3D gBS->HandleProtocol (Handle, &gEfiFirmwareManagementProtoco= lGuid, (VOID **)&Fmp); - if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "EsrtFmpDxe: Failed to get FMP for a handle 0x%= x\n", Handle)); - continue; - } - ImageInfoSize =3D 0; + // + // Allocate Memory for table + // + Table =3D AllocateZeroPool ( + (GROWTH_STEP * sizeof (EFI_SYSTEM_RESOURCE_ENTRY)) + sizeof (= EFI_SYSTEM_RESOURCE_TABLE) + ); + if (Table =3D=3D NULL) { + DEBUG ((DEBUG_ERROR, "EsrtFmpDxe: Failed to allocate memory for ESRT.\= n")); + gBS->FreePool (Buffer); + return NULL; + } + + Table->FwResourceCount =3D 0; + Table->FwResourceCountMax =3D GROWTH_STEP; + Table->FwResourceVersion =3D EFI_SYSTEM_RESOURCE_TABLE_FIRMWARE_RESOURC= E_VERSION;=20 =20 + for (Index =3D 0; Index < NoProtocols; Index++) { + Fmp =3D (EFI_FIRMWARE_MANAGEMENT_PROTOCOL *) Buffer[Index]; + + ImageInfoSize =3D 0; Status =3D Fmp->GetImageInfo ( Fmp, // FMP Pointer &ImageInfoSize, // Buffer Size (in this c= ase 0) @@ -331,7 +318,6 @@ FmpInstallProtocolNotify ( continue; } =20 - FmpImageInfoBuf =3D NULL; FmpImageInfoBuf =3D AllocateZeroPool (ImageInfoSize); if (FmpImageInfoBuf =3D=3D NULL) { DEBUG ((DEBUG_ERROR, "EsrtFmpDxe: Failed to get memory for descripto= rs.\n")); @@ -352,7 +338,9 @@ FmpInstallProtocolNotify ( ); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "EsrtFmpDxe: Failure in GetImageInfo. Status = =3D %r\n", Status)); - goto CleanUp; + FreePool (FmpImageInfoBufOrg); + FmpImageInfoBufOrg =3D NULL; + continue; } =20 // @@ -366,7 +354,7 @@ FmpInstallProtocolNotify ( // // Create ESRT entry // - CreateEsrtEntry (FmpImageInfoBuf, FmpImageInfoDescriptorVer); + CreateEsrtEntry (&Table, FmpImageInfoBuf, FmpImageInfoDescriptorVe= r); } FmpImageInfoCount--; // @@ -379,17 +367,12 @@ FmpInstallProtocolNotify ( FreePool (PackageVersionName); PackageVersionName =3D NULL; } - if (FmpImageInfoBufOrg !=3D NULL) { - FreePool (FmpImageInfoBufOrg); - FmpImageInfoBufOrg =3D NULL; - } - } - -CleanUp: - if (FmpImageInfoBufOrg !=3D NULL) { FreePool (FmpImageInfoBufOrg); + FmpImageInfoBufOrg =3D NULL; } - return; + + gBS->FreePool (Buffer); + return Table; } =20 /** @@ -407,14 +390,30 @@ EsrtReadyToBootEventNotify ( IN VOID *Context ) { - InstallEfiSystemResourceTableInUefiConfigurationTable (); + EFI_STATUS Status; + EFI_SYSTEM_RESOURCE_TABLE *Table; + + Table =3D CreateFmpBasedEsrt (); + if (Table !=3D NULL) { + // + // Print table on debug builds + // + DEBUG_CODE_BEGIN (); + PrintTable (Table); + DEBUG_CODE_END (); + + Status =3D InstallEfiSystemResourceTableInUefiConfigurationTable (Tabl= e); + if (EFI_ERROR (Status)) { + FreePool (Table); + } + } else { + DEBUG ((DEBUG_ERROR, "EsrtFmpDxe: Can't install ESRT table because it = is NULL. \n")); + } =20 // - // Print table on debug builds + // Close the event to prevent it be signalled again. // - DEBUG_CODE_BEGIN (); - PrintTable (mTable); - DEBUG_CODE_END (); + gBS->CloseEvent (Event); } =20 /** @@ -435,39 +434,7 @@ EsrtFmpEntryPoint ( ) { EFI_STATUS Status; - - // - // Allocate Memory for table - // - mTable =3D AllocateZeroPool ( - (GROWTH_STEP * sizeof (EFI_SYSTEM_RESOURCE_ENTRY)) + sizeof (= EFI_SYSTEM_RESOURCE_TABLE) - ); - ASSERT (mTable !=3D NULL); - if (mTable =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "EsrtFmpDxe: Failed to allocate memory for ESRT.\= n")); - return EFI_OUT_OF_RESOURCES; - } - - mTable->FwResourceCount =3D 0; - mTable->FwResourceCountMax =3D GROWTH_STEP; - mTable->FwResourceVersion =3D EFI_SYSTEM_RESOURCE_TABLE_FIRMWARE_RESOUR= CE_VERSION; - - // - // Register notify function for all FMP installed - // - mFmpInstallEvent =3D EfiCreateProtocolNotifyEvent ( - &gEfiFirmwareManagementProtocolGuid, - TPL_CALLBACK, - FmpInstallProtocolNotify, - NULL, - &mFmpInstallEventRegistration - ); - - ASSERT (mFmpInstallEvent !=3D NULL); - - if (mFmpInstallEvent =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "EsrtFmpDxe: Failed to Create Protocol Notify Eve= nt for FMP.\n")); - } + EFI_EVENT EsrtReadyToBootEvent; =20 // // Register notify function to install ESRT on ReadyToBoot Event. @@ -476,7 +443,7 @@ EsrtFmpEntryPoint ( TPL_CALLBACK, EsrtReadyToBootEventNotify, NULL, - &mEsrtReadyToBootEvent + &EsrtReadyToBootEvent ); =20 ASSERT_EFI_ERROR (Status); --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel