]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/Ppi/Ppi.c
check the usage of %d,%x,%ld,%lx and so on in debug print statement.
[mirror_edk2.git] / MdeModulePkg / Core / Pei / Ppi / Ppi.c
index 0649859f3ed3d0d47684caeb4c9c0337aed6829d..a0780c7838f9cff2d2af3bfaf47a72fec5c4dd24 100644 (file)
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 **/\r
 \r
-#include <PeiMain.h>\r
+#include "PeiMain.h"\r
 \r
 /**\r
 \r
@@ -41,8 +41,10 @@ InitializePpiServices (
   Migrate the Hob list from the CAR stack to PEI installed memory.\r
 \r
   @param PrivateData         Pointer to PeiCore's private data structure.\r
-  @param OldCheckingBottom   The old checking bottom.\r
-  @param OldCheckingTop      The old checking top.\r
+  @param OldCheckingBottom   Bottom of temporary memory range. All Ppi in this range\r
+                             will be fixup for PpiData and PpiDescriptor pointer.\r
+  @param OldCheckingTop      Top of temporary memory range. All Ppi in this range\r
+                             will be fixup for PpiData and PpiDescriptor.\r
   @param Fixup               The address difference between\r
                              the new Hob list and old Hob list.\r
 \r
@@ -114,7 +116,7 @@ ConvertPpiPointers (
 \r
   @retval EFI_SUCCESS              if all PPIs in PpiList are successfully installed.\r
   @retval EFI_INVALID_PARAMETER    if PpiList is NULL pointer\r
-  @retval EFI_INVALID_PARAMETER    if any PPI in PpiList is not valid\r
+                                   if any PPI in PpiList is not valid\r
   @retval EFI_OUT_OF_RESOURCES     if there is no more memory resource to install PPI\r
 \r
 **/\r
@@ -147,7 +149,7 @@ PeiInstallPpi (
 \r
   for (;;) {\r
     //\r
-    // Since PpiData is used for NotifyList and InstallList, max resource\r
+    // Since PpiData is used for NotifyList and PpiList, max resource\r
     // is reached if the Install reaches the NotifyList\r
     //\r
     if (Index == PrivateData->PpiData.NotifyListEnd + 1) {\r
@@ -160,7 +162,7 @@ PeiInstallPpi (
     //\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
+      DEBUG((EFI_D_ERROR, "ERROR -> InstallPpi: %g %p\n", PpiList->Guid, PpiList->Ppi));\r
       return  EFI_INVALID_PARAMETER;\r
     }\r
 \r
@@ -399,7 +401,7 @@ PeiNotifyPpi (
     //\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
+        DEBUG((EFI_D_ERROR, "ERROR -> InstallNotify: %g %p\n", NotifyList->Guid, NotifyList->Notify));\r
       return  EFI_INVALID_PARAMETER;\r
     }\r
 \r
@@ -567,12 +569,12 @@ DispatchNotify (
           (((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
+        DEBUG ((EFI_D_INFO, "Notify: PPI Guid: %g, Peim notify entry point: %p\n",\r
           SearchGuid,\r
           NotifyDescriptor->Notify\r
           ));\r
         NotifyDescriptor->Notify (\r
-                            GetPeiServicesTablePointer (),\r
+                            (EFI_PEI_SERVICES **) GetPeiServicesTablePointer (),\r
                             NotifyDescriptor,\r
                             (PrivateData->PpiData.PpiListPtrs[Index2].Ppi)->Ppi\r
                             );\r