X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=IntelFsp2WrapperPkg%2FFspWrapperNotifyDxe%2FFspWrapperNotifyDxe.c;h=a2fe18c2da106fd01d3930da5a91644dcbaf2f40;hp=a69263278db1c7511d9f3661312d5b2bf6ab241d;hb=de1e1195b34aad43fc85cdebf6d5b0b213eaa3d0;hpb=19d29d358f80a1f2b462d8a52943aae724b8702c diff --git a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c index a69263278d..a2fe18c2da 100644 --- a/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c +++ b/IntelFsp2WrapperPkg/FspWrapperNotifyDxe/FspWrapperNotifyDxe.c @@ -27,6 +27,8 @@ #include #include +#define FSP_API_NOTIFY_PHASE_AFTER_PCI_ENUMERATION BIT16 + typedef EFI_STATUS (EFIAPI * ADD_PERFORMANCE_RECORDS)( @@ -236,6 +238,7 @@ FspWrapperNotifyDxeEntryPoint ( EFI_EVENT ReadyToBootEvent; VOID *Registration; EFI_EVENT ProtocolNotifyEvent; + UINT32 FspApiMask; // // Load this driver's image to memory @@ -245,14 +248,17 @@ FspWrapperNotifyDxeEntryPoint ( return EFI_SUCCESS; } - ProtocolNotifyEvent = EfiCreateProtocolNotifyEvent ( - &gEfiPciEnumerationCompleteProtocolGuid, - TPL_CALLBACK, - OnPciEnumerationComplete, - NULL, - &Registration - ); - ASSERT (ProtocolNotifyEvent != NULL); + FspApiMask = PcdGet32 (PcdSkipFspApi); + if ((FspApiMask & FSP_API_NOTIFY_PHASE_AFTER_PCI_ENUMERATION) == 0) { + ProtocolNotifyEvent = EfiCreateProtocolNotifyEvent ( + &gEfiPciEnumerationCompleteProtocolGuid, + TPL_CALLBACK, + OnPciEnumerationComplete, + NULL, + &Registration + ); + ASSERT (ProtocolNotifyEvent != NULL); + } Status = EfiCreateEventReadyToBootEx ( TPL_CALLBACK,