diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-10-10 02:08:22 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-10-10 02:08:22 +0000 |
commit | 166152e85cd99bf4d3d9158b5c3455e4e0f7bb12 (patch) | |
tree | 78cbdee059c1802f73e3d6a90ffd56153b014816 /MdePkg/Library/PeiPiLib | |
parent | 10dde96f9548bc11d01b46750293aba336d5d1c6 (diff) | |
download | edk2-platforms-166152e85cd99bf4d3d9158b5c3455e4e0f7bb12.tar.xz |
0) Change the PEI core behavior to not install FV HOB for each FV INFO PPI installed. This allows more freedom to platform developer to choose to expose which FV to PEI core or DXE core.
1) Split MdePkg/Include/Library/PiLib.h to DxePiLib.h and PeiPiLib.h. These two library classes are for DXE phase and PEI phase.
2) Update the API names in DxePiLib and PeiPiLib to be longer ones to be more meaningfull and to avoid name collisions.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4067 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/PeiPiLib')
-rw-r--r-- | MdePkg/Library/PeiPiLib/PeiPiLib.c | 22 | ||||
-rw-r--r-- | MdePkg/Library/PeiPiLib/PeiPiLib.inf | 2 |
2 files changed, 14 insertions, 10 deletions
diff --git a/MdePkg/Library/PeiPiLib/PeiPiLib.c b/MdePkg/Library/PeiPiLib/PeiPiLib.c index 49894dfe4d..d1e8611365 100644 --- a/MdePkg/Library/PeiPiLib/PeiPiLib.c +++ b/MdePkg/Library/PeiPiLib/PeiPiLib.c @@ -21,9 +21,10 @@ #include <Library/MemoryAllocationLib.h>
#include <Library/PeiServicesLib.h>
#include <Library/PeiPiLib.h>
+#include <Library/BaseMemoryLib.h>
-STATIC CONST EFI_PEI_FIRMWARE_VOLUME_INFO_PPI mFvInfoPpiTemplate = {
+CONST EFI_PEI_FIRMWARE_VOLUME_INFO_PPI mFvInfoPpiTemplate = {
EFI_FIRMWARE_FILE_SYSTEM2_GUID,
NULL,
0, //FvInfoSize
@@ -33,11 +34,12 @@ STATIC CONST EFI_PEI_FIRMWARE_VOLUME_INFO_PPI mFvInfoPpiTemplate = { VOID
EFIAPI
-PeiPiLibBuildPiFvInfoPpi (
- IN EFI_PHYSICAL_ADDRESS FvStart,
- IN UINT64 FvLength,
- IN EFI_GUID *ParentFvName,
- IN EFI_GUID *ParentFileName
+PiLibInstallFvInfoPpi (
+ IN EFI_GUID *FvFormat, OPTIONAL
+ IN VOID *FvInfo,
+ IN UINT32 FvInfoSize,
+ IN EFI_GUID *ParentFvName, OPTIONAL
+ IN EFI_GUID *ParentFileName OPTIONAL
) {
EFI_STATUS Status;
@@ -47,8 +49,11 @@ PeiPiLibBuildPiFvInfoPpi ( FvInfoPpi = AllocateCopyPool (sizeof (*FvInfoPpi), &mFvInfoPpiTemplate);
ASSERT( FvInfoPpi != NULL);
- FvInfoPpi->FvInfo = (VOID *) (UINTN) FvStart;
- FvInfoPpi->FvInfoSize = (UINT32) FvLength;
+ if (FvFormat != NULL) {
+ CopyMem (&FvInfoPpi->FvFormat, FvFormat, sizeof (*FvFormat));
+ }
+ FvInfoPpi->FvInfo = (VOID *) (UINTN) FvInfo;
+ FvInfoPpi->FvInfoSize = (UINT32) FvInfoSize;
FvInfoPpi->ParentFvName = ParentFvName;
FvInfoPpi->ParentFileName = ParentFileName;
@@ -62,6 +67,5 @@ PeiPiLibBuildPiFvInfoPpi ( Status = PeiServicesInstallPpi (FvInfoPpiDescriptor);
ASSERT_EFI_ERROR (Status);
-
}
diff --git a/MdePkg/Library/PeiPiLib/PeiPiLib.inf b/MdePkg/Library/PeiPiLib/PeiPiLib.inf index 61e90612eb..94ddc75b1e 100644 --- a/MdePkg/Library/PeiPiLib/PeiPiLib.inf +++ b/MdePkg/Library/PeiPiLib/PeiPiLib.inf @@ -21,7 +21,7 @@ FILE_GUID = 6196FE81-4FA4-469a-B759-2C4DFE935B79
MODULE_TYPE = PEIM
VERSION_STRING = 1.0
- LIBRARY_CLASS = PiLib|PEIM
+ LIBRARY_CLASS = DxePiLib|PEIM
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
|