+++ /dev/null
-/*++\r
-\r
-Copyright (c) 2006, Intel Corporation \r
-All rights reserved. This program and the accompanying materials \r
-are licensed and made available under the terms and conditions of the BSD License \r
-which accompanies this distribution. The full text of the license may be found at \r
-http://opensource.org/licenses/bsd-license.php \r
- \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
-\r
-Module Name:\r
-\r
- Ppi.c\r
-\r
-Abstract:\r
-\r
- EFI PEI Core PPI services\r
-\r
-Revision History\r
-\r
---*/\r
-\r
-#include <PeiMain.h>\r
-\r
-VOID\r
-InitializePpiServices (\r
- IN EFI_PEI_SERVICES **PeiServices,\r
- IN PEI_CORE_INSTANCE *OldCoreData\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Initialize PPI services.\r
-\r
-Arguments:\r
-\r
- PeiServices - The PEI core services table.\r
- OldCoreData - Pointer to the PEI Core data.\r
- NULL if being run in non-permament memory mode.\r
-\r
-Returns:\r
- Nothing\r
-\r
---*/\r
-{\r
- PEI_CORE_INSTANCE *PrivateData;\r
- \r
- if (OldCoreData == NULL) {\r
- PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices);\r
-\r
- PrivateData->PpiData.NotifyListEnd = MAX_PPI_DESCRIPTORS-1;\r
- PrivateData->PpiData.DispatchListEnd = MAX_PPI_DESCRIPTORS-1;\r
- PrivateData->PpiData.LastDispatchedNotify = MAX_PPI_DESCRIPTORS-1;\r
- }\r
- \r
- return; \r
-}\r
-\r
-VOID\r
-ConvertPpiPointers (\r
- IN EFI_PEI_SERVICES **PeiServices,\r
- IN EFI_HOB_HANDOFF_INFO_TABLE *OldHandOffHob,\r
- IN EFI_HOB_HANDOFF_INFO_TABLE *NewHandOffHob\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Migrate the Hob list from the CAR stack to PEI installed memory.\r
-\r
-Arguments:\r
-\r
- PeiServices - The PEI core services table.\r
- OldHandOffHob - The old handoff HOB list.\r
- NewHandOffHob - The new handoff HOB list.\r
-\r
-Returns:\r
- \r
---*/\r
-{\r
- PEI_CORE_INSTANCE *PrivateData;\r
- UINT8 Index;\r
- PEI_PPI_LIST_POINTERS *PpiPointer;\r
- UINTN Fixup;\r
-\r
- PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices);\r
-\r
- Fixup = (UINTN)NewHandOffHob - (UINTN)OldHandOffHob;\r
- \r
- for (Index = 0; Index < MAX_PPI_DESCRIPTORS; Index++) {\r
- if (Index < PrivateData->PpiData.PpiListEnd ||\r
- Index > PrivateData->PpiData.NotifyListEnd) {\r
- PpiPointer = &PrivateData->PpiData.PpiListPtrs[Index];\r
- \r
- if (((UINTN)PpiPointer->Raw < (UINTN)OldHandOffHob->EfiFreeMemoryBottom) && \r
- ((UINTN)PpiPointer->Raw >= (UINTN)OldHandOffHob)) {\r
- //\r
- // Convert the pointer to the PEIM descriptor from the old HOB heap\r
- // to the relocated HOB heap.\r
- //\r
- PpiPointer->Raw = (VOID *) ((UINTN)PpiPointer->Raw + Fixup);\r
-\r
- //\r
- // Only when the PEIM descriptor is in the old HOB should it be necessary\r
- // to try to convert the pointers in the PEIM descriptor\r
- //\r
- \r
- if (((UINTN)PpiPointer->Ppi->Guid < (UINTN)OldHandOffHob->EfiFreeMemoryBottom) && \r
- ((UINTN)PpiPointer->Ppi->Guid >= (UINTN)OldHandOffHob)) {\r
- //\r
- // Convert the pointer to the GUID in the PPI or NOTIFY descriptor\r
- // from the old HOB heap to the relocated HOB heap.\r
- //\r
- PpiPointer->Ppi->Guid = (VOID *) ((UINTN)PpiPointer->Ppi->Guid + Fixup);\r
- }\r
-\r
- //\r
- // Assume that no code is located in the temporary memory, so the pointer to\r
- // the notification function in the NOTIFY descriptor needs not be converted.\r
- //\r
- if (Index < PrivateData->PpiData.PpiListEnd &&\r
- (UINTN)PpiPointer->Ppi->Ppi < (UINTN)OldHandOffHob->EfiFreeMemoryBottom &&\r
- (UINTN)PpiPointer->Ppi->Ppi >= (UINTN)OldHandOffHob) {\r
- //\r
- // Convert the pointer to the PPI interface structure in the PPI descriptor\r
- // from the old HOB heap to the relocated HOB heap.\r
- //\r
- PpiPointer->Ppi->Ppi = (VOID *) ((UINTN)PpiPointer->Ppi->Ppi+ Fixup); \r
- }\r
- }\r
- }\r
- }\r
-}\r
-\r
-\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PeiInstallPpi (\r
- IN EFI_PEI_SERVICES **PeiServices,\r
- IN EFI_PEI_PPI_DESCRIPTOR *PpiList\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Install PPI services.\r
-\r
-Arguments:\r
-\r
- PeiServices - Pointer to the PEI Service Table\r
- PpiList - Pointer to a list of PEI PPI Descriptors.\r
-\r
-Returns:\r
-\r
- EFI_SUCCESS - if all PPIs in PpiList are successfully installed.\r
- EFI_INVALID_PARAMETER - if PpiList is NULL pointer\r
- EFI_INVALID_PARAMETER - if any PPI in PpiList is not valid\r
- EFI_OUT_OF_RESOURCES - if there is no more memory resource to install PPI\r
-\r
---*/\r
-{\r
- PEI_CORE_INSTANCE *PrivateData;\r
- INTN Index;\r
- INTN LastCallbackInstall;\r
-\r
-\r
- if (PpiList == NULL) {\r
- return EFI_INVALID_PARAMETER;\r
- }\r
-\r
- PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices);\r
-\r
- Index = PrivateData->PpiData.PpiListEnd;\r
- LastCallbackInstall = Index;\r
-\r
- //\r
- // This is loop installs all PPI descriptors in the PpiList. It is terminated\r
- // by the EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST being set in the last\r
- // EFI_PEI_PPI_DESCRIPTOR in the list.\r
- //\r
- \r
- for (;;) {\r
- //\r
- // Since PpiData is used for NotifyList and InstallList, max resource\r
- // is reached if the Install reaches the NotifyList\r
- //\r
- if (Index == PrivateData->PpiData.NotifyListEnd + 1) {\r
- return EFI_OUT_OF_RESOURCES;\r
- }\r
- //\r
- // Check if it is a valid PPI. \r
- // If not, rollback list to exclude all in this list.\r
- // Try to indicate which item failed.\r
- //\r
- if ((PpiList->Flags & EFI_PEI_PPI_DESCRIPTOR_PPI) == 0) {\r
- PrivateData->PpiData.PpiListEnd = LastCallbackInstall;\r
- DEBUG((EFI_D_ERROR, "ERROR -> InstallPpi: %g %x\n", PpiList->Guid, PpiList->Ppi));\r
- return EFI_INVALID_PARAMETER;\r
- }\r
-\r
- DEBUG((EFI_D_INFO, "Install PPI: %g\n", PpiList->Guid)); \r
- PrivateData->PpiData.PpiListPtrs[Index].Ppi = PpiList; \r
- PrivateData->PpiData.PpiListEnd++;\r
- \r
- //\r
- // Continue until the end of the PPI List.\r
- //\r
- if ((PpiList->Flags & EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) == \r
- EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) {\r
- break;\r
- }\r
- PpiList++;\r
- Index++;\r
- }\r
-\r
- //\r
- // Dispatch any callback level notifies for newly installed PPIs.\r
- //\r
- DispatchNotify (\r
- PeiServices,\r
- EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,\r
- LastCallbackInstall,\r
- PrivateData->PpiData.PpiListEnd,\r
- PrivateData->PpiData.DispatchListEnd, \r
- PrivateData->PpiData.NotifyListEnd\r
- );\r
-\r
-\r
- return EFI_SUCCESS;\r
-}\r
-\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PeiReInstallPpi (\r
- IN EFI_PEI_SERVICES **PeiServices,\r
- IN EFI_PEI_PPI_DESCRIPTOR *OldPpi,\r
- IN EFI_PEI_PPI_DESCRIPTOR *NewPpi\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Re-Install PPI services.\r
-\r
-Arguments:\r
-\r
- PeiServices - Pointer to the PEI Service Table\r
- OldPpi - Pointer to the old PEI PPI Descriptors.\r
- NewPpi - Pointer to the new PEI PPI Descriptors.\r
-\r
-Returns:\r
-\r
- EFI_SUCCESS - if the operation was successful\r
- EFI_INVALID_PARAMETER - if OldPpi or NewPpi is NULL\r
- EFI_INVALID_PARAMETER - if NewPpi is not valid\r
- EFI_NOT_FOUND - if the PPI was not in the database\r
-\r
---*/\r
-{\r
- PEI_CORE_INSTANCE *PrivateData;\r
- INTN Index;\r
-\r
-\r
- if ((OldPpi == NULL) || (NewPpi == NULL)) {\r
- return EFI_INVALID_PARAMETER;\r
- }\r
-\r
- if ((NewPpi->Flags & EFI_PEI_PPI_DESCRIPTOR_PPI) == 0) {\r
- return EFI_INVALID_PARAMETER;\r
- }\r
-\r
- PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices);\r
-\r
- //\r
- // Find the old PPI instance in the database. If we can not find it,\r
- // return the EFI_NOT_FOUND error.\r
- //\r
- for (Index = 0; Index < PrivateData->PpiData.PpiListEnd; Index++) {\r
- if (OldPpi == PrivateData->PpiData.PpiListPtrs[Index].Ppi) {\r
- break;\r
- }\r
- }\r
- if (Index == PrivateData->PpiData.PpiListEnd) {\r
- return EFI_NOT_FOUND;\r
- }\r
-\r
- //\r
- // Remove the old PPI from the database, add the new one.\r
- // \r
- DEBUG((EFI_D_INFO, "Reinstall PPI: %g\n", NewPpi->Guid));\r
- PrivateData->PpiData.PpiListPtrs[Index].Ppi = NewPpi;\r
-\r
- //\r
- // Dispatch any callback level notifies for the newly installed PPI.\r
- //\r
- DispatchNotify (\r
- PeiServices,\r
- EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,\r
- Index,\r
- Index+1,\r
- PrivateData->PpiData.DispatchListEnd, \r
- PrivateData->PpiData.NotifyListEnd\r
- );\r
-\r
-\r
- return EFI_SUCCESS;\r
-}\r
-\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PeiLocatePpi (\r
- IN EFI_PEI_SERVICES **PeiServices,\r
- IN EFI_GUID *Guid,\r
- IN UINTN Instance,\r
- IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor,\r
- IN OUT VOID **Ppi\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Locate a given named PPI.\r
-\r
-Arguments:\r
-\r
- PeiServices - Pointer to the PEI Service Table\r
- Guid - Pointer to GUID of the PPI.\r
- Instance - Instance Number to discover.\r
- PpiDescriptor - Pointer to reference the found descriptor. If not NULL,\r
- returns a pointer to the descriptor (includes flags, etc)\r
- Ppi - Pointer to reference the found PPI\r
-\r
-Returns:\r
-\r
- Status - EFI_SUCCESS if the PPI is in the database \r
- EFI_NOT_FOUND if the PPI is not in the database\r
---*/\r
-{\r
- PEI_CORE_INSTANCE *PrivateData;\r
- INTN Index;\r
- EFI_GUID *CheckGuid;\r
- EFI_PEI_PPI_DESCRIPTOR *TempPtr;\r
-\r
- \r
- PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices);\r
-\r
- //\r
- // Search the data base for the matching instance of the GUIDed PPI.\r
- //\r
- for (Index = 0; Index < PrivateData->PpiData.PpiListEnd; Index++) {\r
- TempPtr = PrivateData->PpiData.PpiListPtrs[Index].Ppi;\r
- CheckGuid = TempPtr->Guid;\r
-\r
- //\r
- // Don't use CompareGuid function here for performance reasons.\r
- // Instead we compare the GUID as INT32 at a time and branch\r
- // on the first failed comparison.\r
- //\r
- if ((((INT32 *)Guid)[0] == ((INT32 *)CheckGuid)[0]) &&\r
- (((INT32 *)Guid)[1] == ((INT32 *)CheckGuid)[1]) &&\r
- (((INT32 *)Guid)[2] == ((INT32 *)CheckGuid)[2]) &&\r
- (((INT32 *)Guid)[3] == ((INT32 *)CheckGuid)[3])) {\r
- if (Instance == 0) {\r
-\r
- if (PpiDescriptor != NULL) {\r
- *PpiDescriptor = TempPtr;\r
- }\r
-\r
- if (Ppi != NULL) {\r
- *Ppi = TempPtr->Ppi;\r
- }\r
-\r
-\r
- return EFI_SUCCESS;\r
- }\r
- Instance--;\r
- }\r
- }\r
-\r
- return EFI_NOT_FOUND;\r
-}\r
-\r
-\r
-EFI_STATUS\r
-EFIAPI\r
-PeiNotifyPpi (\r
- IN EFI_PEI_SERVICES **PeiServices,\r
- IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Install a notification for a given PPI.\r
-\r
-Arguments:\r
-\r
- PeiServices - Pointer to the PEI Service Table\r
- NotifyList - Pointer to list of Descriptors to notify upon.\r
-\r
-Returns:\r
-\r
- Status - EFI_SUCCESS if successful\r
- EFI_OUT_OF_RESOURCES if no space in the database\r
- EFI_INVALID_PARAMETER if not a good decriptor\r
-\r
---*/\r
-{\r
- PEI_CORE_INSTANCE *PrivateData;\r
- INTN Index;\r
- INTN NotifyIndex;\r
- INTN LastCallbackNotify;\r
- EFI_PEI_NOTIFY_DESCRIPTOR *NotifyPtr;\r
- UINTN NotifyDispatchCount;\r
-\r
-\r
- NotifyDispatchCount = 0;\r
-\r
- if (NotifyList == NULL) {\r
- return EFI_INVALID_PARAMETER;\r
- }\r
-\r
- PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices);\r
-\r
- Index = PrivateData->PpiData.NotifyListEnd;\r
- LastCallbackNotify = Index;\r
-\r
- //\r
- // This is loop installs all Notify descriptors in the NotifyList. It is\r
- // terminated by the EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST being set in the last\r
- // EFI_PEI_NOTIFY_DESCRIPTOR in the list.\r
- //\r
-\r
- for (;;) {\r
- //\r
- // Since PpiData is used for NotifyList and InstallList, max resource\r
- // is reached if the Install reaches the PpiList\r
- //\r
- if (Index == PrivateData->PpiData.PpiListEnd - 1) {\r
- return EFI_OUT_OF_RESOURCES;\r
- }\r
- \r
- //\r
- // If some of the PPI data is invalid restore original Notify PPI database value\r
- //\r
- if ((NotifyList->Flags & EFI_PEI_PPI_DESCRIPTOR_NOTIFY_TYPES) == 0) {\r
- PrivateData->PpiData.NotifyListEnd = LastCallbackNotify;\r
- DEBUG((EFI_D_ERROR, "ERROR -> InstallNotify: %g %x\n", NotifyList->Guid, NotifyList->Notify));\r
- return EFI_INVALID_PARAMETER;\r
- }\r
- \r
- if ((NotifyList->Flags & EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH) != 0) {\r
- NotifyDispatchCount ++; \r
- } \r
- \r
- PrivateData->PpiData.PpiListPtrs[Index].Notify = NotifyList; \r
- \r
- PrivateData->PpiData.NotifyListEnd--;\r
- DEBUG((EFI_D_INFO, "Register PPI Notify: %g\n", NotifyList->Guid));\r
- if ((NotifyList->Flags & EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) ==\r
- EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST) {\r
- break;\r
- }\r
- //\r
- // Go the next descriptor. Remember the NotifyList moves down.\r
- //\r
- NotifyList++;\r
- Index--;\r
- }\r
- \r
- //\r
- // If there is Dispatch Notify PPI installed put them on the bottom \r
- //\r
- if (NotifyDispatchCount > 0) {\r
- for (NotifyIndex = LastCallbackNotify; NotifyIndex > PrivateData->PpiData.NotifyListEnd; NotifyIndex--) { \r
- if ((PrivateData->PpiData.PpiListPtrs[NotifyIndex].Notify->Flags & EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH) != 0) {\r
- NotifyPtr = PrivateData->PpiData.PpiListPtrs[NotifyIndex].Notify;\r
- \r
- for (Index = NotifyIndex; Index < PrivateData->PpiData.DispatchListEnd; Index++){\r
- PrivateData->PpiData.PpiListPtrs[Index].Notify = PrivateData->PpiData.PpiListPtrs[Index + 1].Notify;\r
- }\r
- PrivateData->PpiData.PpiListPtrs[Index].Notify = NotifyPtr;\r
- PrivateData->PpiData.DispatchListEnd--; \r
- }\r
- }\r
- \r
- LastCallbackNotify -= NotifyDispatchCount; \r
- }\r
- \r
- //\r
- // Dispatch any callback level notifies for all previously installed PPIs.\r
- //\r
- DispatchNotify (\r
- PeiServices,\r
- EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,\r
- 0,\r
- PrivateData->PpiData.PpiListEnd,\r
- LastCallbackNotify,\r
- PrivateData->PpiData.NotifyListEnd\r
- );\r
- \r
- \r
- return EFI_SUCCESS;\r
-}\r
-\r
-\r
-VOID\r
-ProcessNotifyList (\r
- IN EFI_PEI_SERVICES **PeiServices\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Process the Notify List at dispatch level.\r
-\r
-Arguments:\r
-\r
- PeiServices - Pointer to the PEI Service Table\r
-\r
-Returns:\r
-\r
---*/\r
-\r
-{\r
- PEI_CORE_INSTANCE *PrivateData;\r
- INTN TempValue;\r
-\r
- PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices);\r
-\r
- \r
- while (TRUE) {\r
- //\r
- // Check if the PEIM that was just dispatched resulted in any\r
- // Notifies getting installed. If so, go process any dispatch\r
- // level Notifies that match the previouly installed PPIs.\r
- // Use "while" instead of "if" since DispatchNotify can modify \r
- // DispatchListEnd (with NotifyPpi) so we have to iterate until the same.\r
- //\r
- while (PrivateData->PpiData.LastDispatchedNotify != PrivateData->PpiData.DispatchListEnd) {\r
- TempValue = PrivateData->PpiData.DispatchListEnd;\r
- DispatchNotify (\r
- PeiServices,\r
- EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH,\r
- 0,\r
- PrivateData->PpiData.LastDispatchedInstall,\r
- PrivateData->PpiData.LastDispatchedNotify,\r
- PrivateData->PpiData.DispatchListEnd\r
- );\r
- PrivateData->PpiData.LastDispatchedNotify = TempValue;\r
- }\r
- \r
- \r
- //\r
- // Check if the PEIM that was just dispatched resulted in any\r
- // PPIs getting installed. If so, go process any dispatch\r
- // level Notifies that match the installed PPIs.\r
- // Use "while" instead of "if" since DispatchNotify can modify \r
- // PpiListEnd (with InstallPpi) so we have to iterate until the same.\r
- //\r
- while (PrivateData->PpiData.LastDispatchedInstall != PrivateData->PpiData.PpiListEnd) {\r
- TempValue = PrivateData->PpiData.PpiListEnd;\r
- DispatchNotify (\r
- PeiServices,\r
- EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH,\r
- PrivateData->PpiData.LastDispatchedInstall,\r
- PrivateData->PpiData.PpiListEnd,\r
- MAX_PPI_DESCRIPTORS-1,\r
- PrivateData->PpiData.DispatchListEnd\r
- );\r
- PrivateData->PpiData.LastDispatchedInstall = TempValue;\r
- }\r
- \r
- if (PrivateData->PpiData.LastDispatchedNotify == PrivateData->PpiData.DispatchListEnd) {\r
- break;\r
- }\r
- } \r
- return;\r
-}\r
-\r
-VOID\r
-DispatchNotify (\r
- IN EFI_PEI_SERVICES **PeiServices,\r
- IN UINTN NotifyType,\r
- IN INTN InstallStartIndex,\r
- IN INTN InstallStopIndex,\r
- IN INTN NotifyStartIndex,\r
- IN INTN NotifyStopIndex\r
- )\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Dispatch notifications.\r
-\r
-Arguments:\r
-\r
- PeiServices - Pointer to the PEI Service Table\r
- NotifyType - Type of notify to fire.\r
- InstallStartIndex - Install Beginning index.\r
- InstallStopIndex - Install Ending index.\r
- NotifyStartIndex - Notify Beginning index.\r
- NotifyStopIndex - Notify Ending index.\r
-\r
-Returns: None\r
-\r
---*/\r
-\r
-{\r
- PEI_CORE_INSTANCE *PrivateData;\r
- INTN Index1;\r
- INTN Index2;\r
- EFI_GUID *SearchGuid;\r
- EFI_GUID *CheckGuid;\r
- EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor;\r
-\r
- PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices);\r
-\r
- //\r
- // Remember that Installs moves up and Notifies moves down.\r
- //\r
- for (Index1 = NotifyStartIndex; Index1 > NotifyStopIndex; Index1--) {\r
- NotifyDescriptor = PrivateData->PpiData.PpiListPtrs[Index1].Notify;\r
-\r
- CheckGuid = NotifyDescriptor->Guid;\r
-\r
- for (Index2 = InstallStartIndex; Index2 < InstallStopIndex; Index2++) {\r
- SearchGuid = PrivateData->PpiData.PpiListPtrs[Index2].Ppi->Guid;\r
- //\r
- // Don't use CompareGuid function here for performance reasons.\r
- // Instead we compare the GUID as INT32 at a time and branch\r
- // on the first failed comparison.\r
- //\r
- if ((((INT32 *)SearchGuid)[0] == ((INT32 *)CheckGuid)[0]) &&\r
- (((INT32 *)SearchGuid)[1] == ((INT32 *)CheckGuid)[1]) &&\r
- (((INT32 *)SearchGuid)[2] == ((INT32 *)CheckGuid)[2]) &&\r
- (((INT32 *)SearchGuid)[3] == ((INT32 *)CheckGuid)[3])) {\r
- DEBUG ((EFI_D_INFO, "Notify: PPI Guid: %g, Peim notify entry point: %x\n", \r
- SearchGuid, \r
- NotifyDescriptor->Notify\r
- ));\r
- NotifyDescriptor->Notify (\r
- PeiServices,\r
- NotifyDescriptor,\r
- (PrivateData->PpiData.PpiListPtrs[Index2].Ppi)->Ppi\r
- );\r
- }\r
- }\r
- }\r
-\r
- return;\r
-}\r
-\r