/** @file\r
Implementation for PEI Services Library.\r
\r
- Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
- All rights reserved. This program and the accompanying materials\r
+ Copyright (c) 2006 - 2009, 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
#include <Library/BaseMemoryLib.h>\r
\r
\r
-GLOBAL_REMOVE_IF_UNREFERENCED CONST EFI_PEI_PPI_DESCRIPTOR mPpiListTemplate [] = {\r
+GLOBAL_REMOVE_IF_UNREFERENCED CONST EFI_PEI_PPI_DESCRIPTOR mPpiListTemplate[] = {\r
{\r
(EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),\r
&gEfiPeiFirmwareVolumeInfoPpiGuid,\r
EFI_STATUS\r
EFIAPI\r
PeiServicesGetHobList (\r
- OUT VOID **HobList\r
+ OUT VOID **HobList\r
)\r
{\r
CONST EFI_PEI_SERVICES **PeiServices;\r
\r
**/\r
EFI_STATUS\r
-EFIAPI\r
+EFIAPI \r
PeiServicesFfsGetFileInfo (\r
IN CONST EFI_PEI_FILE_HANDLE FileHandle,\r
OUT EFI_FV_FILE_INFO *FileInfo\r
@param VolumeHandle The firmware volume to search FileHandle\r
Upon exit, points to the found file's\r
handle or NULL if it could not be found.\r
-\r
- @param FileHandle The filehandle found in volume.\r
+ @param FileHandle Pointer to found file handle \r
\r
@retval EFI_SUCCESS File was found.\r
\r
EFI_STATUS Status; \r
EFI_PEI_FIRMWARE_VOLUME_INFO_PPI *FvInfoPpi;\r
EFI_PEI_PPI_DESCRIPTOR *FvInfoPpiDescriptor;\r
+ EFI_GUID *ParentFvNameValue;\r
+ EFI_GUID *ParentFileNameValue;\r
\r
+ ParentFvNameValue = NULL;\r
+ ParentFileNameValue = NULL;\r
FvInfoPpi = AllocateZeroPool (sizeof (EFI_PEI_FIRMWARE_VOLUME_INFO_PPI));\r
- ASSERT( FvInfoPpi != NULL);\r
+ ASSERT(FvInfoPpi != NULL);\r
\r
if (FvFormat != NULL) {\r
CopyGuid (&FvInfoPpi->FvFormat, FvFormat);\r
}\r
FvInfoPpi->FvInfo = (VOID *) FvInfo;\r
FvInfoPpi->FvInfoSize = FvInfoSize;\r
- FvInfoPpi->ParentFvName = (EFI_GUID *) ParentFvName;\r
- FvInfoPpi->ParentFileName = (EFI_GUID *) ParentFileName;\r
-\r
+ if (ParentFvName != NULL) {\r
+ ParentFvNameValue = AllocateCopyPool (sizeof (EFI_GUID), ParentFvName);\r
+ ASSERT (ParentFvNameValue != NULL);\r
+ FvInfoPpi->ParentFvName = ParentFvNameValue;\r
+ }\r
+ if (ParentFileName != NULL) {\r
+ ParentFileNameValue = AllocateCopyPool (sizeof (EFI_GUID), ParentFileName);\r
+ ASSERT (ParentFileNameValue != NULL);\r
+ FvInfoPpi->ParentFileName = ParentFileNameValue;\r
+ }\r
\r
FvInfoPpiDescriptor = AllocateCopyPool (sizeof(EFI_PEI_PPI_DESCRIPTOR), mPpiListTemplate);\r
ASSERT (FvInfoPpiDescriptor != NULL);\r