]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/PeiLib.c
Sync all bug fixes between EDK1.04 and EDK1.06 into EdkCompatibilityPkg.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Pei / PeiLib / PeiLib.c
index 86fbbb1ecdc8a4d54e6810599736eb772bf681da..11ae5a17f0a0c20d262eadac7ee16b4a2a1aee46 100644 (file)
@@ -1,7 +1,7 @@
 /*++\r
 \r
-Copyright (c) 2004 - 2008, Intel Corporation                                                         \r
-All rights reserved. This program and the accompanying materials                          \r
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>\r
+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
@@ -157,6 +157,7 @@ EFI_STATUS
 EFIAPI \r
 PeiLibPciCfgModify (\r
   IN EFI_PEI_SERVICES         **PeiServices,\r
+  IN PEI_PCI_CFG_PPI          *PciCfg,\r
   IN PEI_PCI_CFG_PPI_WIDTH    Width,\r
   IN UINT64                   Address,\r
   IN UINTN                    SetBits,\r
@@ -187,6 +188,7 @@ Routine Description:
    it will be updated to the following code which call this library API:\r
       PeiLibPciCfgModify (\r
           PeiServices,\r
+          PciCfg,\r
           Width,\r
           Address,\r
           SetBits,\r
@@ -199,7 +201,9 @@ Arguments:
   \r
   PeiServices     An indirect pointer to the PEI Services Table\r
                           published by the PEI Foundation.\r
-\r
+  PciCfg          A pointer to the this pointer of EFI_PEI_PCI_CFG_PPI. \r
+                          This parameter is unused as a place holder to make\r
+                          the parameter list identical to PEI_PCI_CFG_PPI_RW.\r
   Width           The width of the access. Enumerated in bytes. Type\r
                           EFI_PEI_PCI_CFG_PPI_WIDTH is defined in Read().\r
 \r
@@ -231,7 +235,7 @@ Returns:
                              NULL,\r
                              (VOID **) &PciCfg2\r
                              );\r
-  ASSERT_PEI_ERROR (PeiServices, Status);\r
+  ASSERT_PEI_ERROR ((CONST EFI_PEI_SERVICES **) PeiServices, Status);\r
 \r
   Status = PciCfg2->Modify (\r
                       (CONST EFI_PEI_SERVICES **) PeiServices,\r
@@ -379,8 +383,8 @@ EFI_STATUS
 EFIAPI\r
 PeiLibFfsFindNextFile (\r
   IN EFI_FV_FILETYPE            SearchType,\r
-  IN EFI_PEI_FV_HANDLE          FwVolHeader,\r
-  IN OUT EFI_PEI_FILE_HANDLE    *FileHeader\r
+  IN EFI_PEI_FV_HANDLE          FvHandle,\r
+  IN OUT EFI_PEI_FILE_HANDLE    *FileHandle\r
   )\r
 /*++\r
 \r
@@ -391,9 +395,9 @@ Routine Description:
 Arguments:\r
 \r
   SearchType   - Filter to find only file of this type.\r
-  FwVolHeader  - Pointer to the current FV to search.\r
+  FvHandle     - Pointer to the current FV to search.\r
   FileHandle   - Pointer to the file matching SearchType in FwVolHeader.\r
-                - NULL if file not found\r
+               - NULL if file not found\r
 \r
 Returns:\r
   EFI_STATUS\r
@@ -403,7 +407,7 @@ Returns:
   EFI_PEI_SERVICES  **PeiServices;\r
   \r
   PeiServices = GetPeiServicesTablePointer();\r
-  return (*PeiServices)->FfsFindNextFile (PeiServices, SearchType, &FwVolHeader, &FileHeader);\r
+  return (*PeiServices)->FfsFindNextFile (PeiServices, SearchType, FvHandle, FileHandle);\r
 }\r
 \r
 \r
@@ -467,13 +471,13 @@ Returns:
   EFI_PEI_SERVICES  **PeiServices;\r
   \r
   PeiServices = GetPeiServicesTablePointer();\r
-  return (*PeiServices)->FfsFindSectionData (PeiServices, SectionType, &FfsFileHeader, SectionData);\r
+  return (*PeiServices)->FfsFindSectionData (PeiServices, SectionType, (EFI_PEI_FILE_HANDLE)FfsFileHeader, SectionData);\r
 }\r
 \r
 EFI_STATUS\r
 EFIAPI\r
 PeiLibFfsGetVolumeInfo (\r
-  IN EFI_PEI_FV_HANDLE  *VolumeHandle,\r
+  IN EFI_PEI_FV_HANDLE  VolumeHandle,\r
   OUT EFI_FV_INFO       *VolumeInfo\r
   )\r
 /*++\r