#include <Library/HobLib.h>\r
#include <FspStatusCode.h>\r
\r
+#define FSP_API_NOTIFY_PHASE_AFTER_PCI_ENUMERATION BIT16\r
+\r
typedef\r
EFI_STATUS\r
(EFIAPI * ADD_PERFORMANCE_RECORDS)(\r
EFI_EVENT ReadyToBootEvent;\r
VOID *Registration;\r
EFI_EVENT ProtocolNotifyEvent;\r
+ UINT32 FspApiMask;\r
\r
//\r
// Load this driver's image to memory\r
return EFI_SUCCESS;\r
}\r
\r
- ProtocolNotifyEvent = EfiCreateProtocolNotifyEvent (\r
- &gEfiPciEnumerationCompleteProtocolGuid,\r
- TPL_CALLBACK,\r
- OnPciEnumerationComplete,\r
- NULL,\r
- &Registration\r
- );\r
- ASSERT (ProtocolNotifyEvent != NULL);\r
+ FspApiMask = PcdGet32 (PcdSkipFspApi);\r
+ if ((FspApiMask & FSP_API_NOTIFY_PHASE_AFTER_PCI_ENUMERATION) == 0) {\r
+ ProtocolNotifyEvent = EfiCreateProtocolNotifyEvent (\r
+ &gEfiPciEnumerationCompleteProtocolGuid,\r
+ TPL_CALLBACK,\r
+ OnPciEnumerationComplete,\r
+ NULL,\r
+ &Registration\r
+ );\r
+ ASSERT (ProtocolNotifyEvent != NULL);\r
+ }\r
\r
Status = EfiCreateEventReadyToBootEx (\r
TPL_CALLBACK,\r