]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/PeiMain.h
MdeModulePkg PeiCore: Remove the using of PcdPeiCoreMaxPpiSupported
[mirror_edk2.git] / MdeModulePkg / Core / Pei / PeiMain.h
index b103215d81f7a5d0dd4c90376da295d854827081..322e7cd84524b9c6029cfc531ac5de8504e6e160 100644 (file)
@@ -66,37 +66,60 @@ typedef union {
 } PEI_PPI_LIST_POINTERS;\r
 \r
 ///\r
-/// PPI database structure which contains two link: PpiList and NotifyList. PpiList\r
-/// is in head of PpiListPtrs array and notify is in end of PpiListPtrs.\r
+/// Number of PEI_PPI_LIST_POINTERS to grow by each time we run out of room\r
 ///\r
+#define PPI_GROWTH_STEP             64\r
+#define CALLBACK_NOTIFY_GROWTH_STEP 32\r
+#define DISPATCH_NOTIFY_GROWTH_STEP 8\r
+\r
 typedef struct {\r
+  UINTN                 CurrentCount;\r
+  UINTN                 MaxCount;\r
+  UINTN                 LastDispatchedCount;\r
   ///\r
-  /// index of end of PpiList link list.\r
+  /// MaxCount number of entries.\r
   ///\r
-  INTN                    PpiListEnd;\r
+  PEI_PPI_LIST_POINTERS *PpiPtrs;\r
+} PEI_PPI_LIST;\r
+\r
+typedef struct {\r
+  UINTN                 CurrentCount;\r
+  UINTN                 MaxCount;\r
   ///\r
-  /// index of end of notify link list.\r
+  /// MaxCount number of entries.\r
   ///\r
-  INTN                    NotifyListEnd;\r
+  PEI_PPI_LIST_POINTERS *NotifyPtrs;\r
+} PEI_CALLBACK_NOTIFY_LIST;\r
+\r
+typedef struct {\r
+  UINTN                 CurrentCount;\r
+  UINTN                 MaxCount;\r
+  UINTN                 LastDispatchedCount;\r
   ///\r
-  /// index of the dispatched notify list.\r
+  /// MaxCount number of entries.\r
   ///\r
-  INTN                    DispatchListEnd;\r
+  PEI_PPI_LIST_POINTERS *NotifyPtrs;\r
+} PEI_DISPATCH_NOTIFY_LIST;\r
+\r
+///\r
+/// PPI database structure which contains three links:\r
+/// PpiList, CallbackNotifyList and DispatchNotifyList.\r
+///\r
+typedef struct {\r
   ///\r
-  /// index of last installed Ppi description in PpiList link list.\r
+  /// PPI List.\r
   ///\r
-  INTN                    LastDispatchedInstall;\r
+  PEI_PPI_LIST              PpiList;\r
   ///\r
-  /// index of last dispatched notify in Notify link list.\r
+  /// Notify List at dispatch level.\r
   ///\r
-  INTN                    LastDispatchedNotify;\r
+  PEI_CALLBACK_NOTIFY_LIST  CallbackNotifyList;\r
   ///\r
-  /// Ppi database has the PcdPeiCoreMaxPpiSupported number of entries.\r
+  /// Notify List at callback level.\r
   ///\r
-  PEI_PPI_LIST_POINTERS   *PpiListPtrs;\r
+  PEI_DISPATCH_NOTIFY_LIST  DispatchNotifyList;\r
 } PEI_PPI_DATABASE;\r
 \r
-\r
 //\r
 // PEI_CORE_FV_HANDE.PeimState\r
 // Do not change these values as there is code doing math to change states.\r
@@ -555,13 +578,13 @@ PeiNotifyPpi (
 \r
 **/\r
 VOID\r
-ProcessNotifyList (\r
+ProcessDispatchNotifyList (\r
   IN PEI_CORE_INSTANCE  *PrivateData\r
   );\r
 \r
 /**\r
 \r
-  Dispatch notifications.\r
+  Process notifications.\r
 \r
   @param PrivateData        PeiCore's private data structure\r
   @param NotifyType         Type of notify to fire.\r
@@ -572,7 +595,7 @@ ProcessNotifyList (
 \r
 **/\r
 VOID\r
-DispatchNotify (\r
+ProcessNotify (\r
   IN PEI_CORE_INSTANCE  *PrivateData,\r
   IN UINTN               NotifyType,\r
   IN INTN                InstallStartIndex,\r