/** @file\r
The internal header file for firmware volume related definitions.\r
\r
-Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2009 - 2011, 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
((ActualSize) + (((Alignment) - ((ActualSize) & ((Alignment) - 1))) & ((Alignment) - 1)))\r
\r
\r
+#define PEI_FW_VOL_SIGNATURE SIGNATURE_32('P','F','W','V')\r
+\r
+typedef struct {\r
+ UINTN Signature;\r
+ BOOLEAN IsFfs3Fv;\r
+ EFI_PEI_FIRMWARE_VOLUME_PPI Fv;\r
+} PEI_FW_VOL_INSTANCE;\r
+\r
+#define PEI_FW_VOL_INSTANCE_FROM_FV_THIS(a) \\r
+ CR(a, PEI_FW_VOL_INSTANCE, Fv, PEI_FW_VOL_SIGNATURE)\r
+\r
+\r
/**\r
Process a firmware volume and create a volume handle.\r
\r
**/\r
EFI_STATUS\r
EFIAPI\r
-PeiFfs2FvPpiProcessVolume (\r
+PeiFfsFvPpiProcessVolume (\r
IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This,\r
IN VOID *Buffer,\r
IN UINTN BufferSize,\r
**/ \r
EFI_STATUS\r
EFIAPI\r
-PeiFfs2FvPpiFindFileByType (\r
+PeiFfsFvPpiFindFileByType (\r
IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This,\r
IN EFI_FV_FILETYPE SearchType,\r
IN EFI_PEI_FV_HANDLE FvHandle,\r
**/ \r
EFI_STATUS\r
EFIAPI\r
-PeiFfs2FvPpiFindFileByName (\r
+PeiFfsFvPpiFindFileByName (\r
IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This,\r
IN CONST EFI_GUID *FileName,\r
IN EFI_PEI_FV_HANDLE *FvHandle,\r
**/ \r
EFI_STATUS\r
EFIAPI\r
-PeiFfs2FvPpiFindSectionByType (\r
+PeiFfsFvPpiFindSectionByType (\r
IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This,\r
IN EFI_SECTION_TYPE SearchType,\r
IN EFI_PEI_FILE_HANDLE FileHandle,\r
OUT VOID **SectionData\r
);\r
\r
+/**\r
+ Find the next matching section in the firmware file.\r
+\r
+ This service enables PEI modules to discover sections\r
+ of a given instance and type within a valid file.\r
+\r
+ @param This Points to this instance of the\r
+ EFI_PEI_FIRMWARE_VOLUME_PPI.\r
+ @param SearchType A filter to find only sections of this\r
+ type.\r
+ @param SearchInstance A filter to find the specific instance\r
+ of sections.\r
+ @param FileHandle Handle of firmware file in which to\r
+ search.\r
+ @param SectionData Updated upon return to point to the\r
+ section found.\r
+ @param AuthenticationStatus Updated upon return to point to the\r
+ authentication status for this section.\r
+\r
+ @retval EFI_SUCCESS Section was found.\r
+ @retval EFI_NOT_FOUND Section of the specified type was not\r
+ found. SectionData contains NULL.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+PeiFfsFvPpiFindSectionByType2 (\r
+ IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This,\r
+ IN EFI_SECTION_TYPE SearchType,\r
+ IN UINTN SearchInstance,\r
+ IN EFI_PEI_FILE_HANDLE FileHandle,\r
+ OUT VOID **SectionData,\r
+ OUT UINT32 *AuthenticationStatus\r
+ );\r
+\r
/**\r
Returns information about a specific file.\r
\r
**/ \r
EFI_STATUS\r
EFIAPI\r
-PeiFfs2FvPpiGetFileInfo (\r
+PeiFfsFvPpiGetFileInfo (\r
IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This, \r
IN EFI_PEI_FILE_HANDLE FileHandle, \r
OUT EFI_FV_FILE_INFO *FileInfo\r
);\r
\r
+/**\r
+ Returns information about a specific file.\r
+\r
+ This function returns information about a specific\r
+ file, including its file name, type, attributes, starting\r
+ address, size and authentication status.\r
+\r
+ @param This Points to this instance of the\r
+ EFI_PEI_FIRMWARE_VOLUME_PPI.\r
+ @param FileHandle Handle of the file.\r
+ @param FileInfo Upon exit, points to the file's\r
+ information.\r
+\r
+ @retval EFI_SUCCESS File information returned.\r
+ @retval EFI_INVALID_PARAMETER If FileHandle does not\r
+ represent a valid file.\r
+ @retval EFI_INVALID_PARAMETER If FileInfo is NULL.\r
+\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+PeiFfsFvPpiGetFileInfo2 (\r
+ IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This,\r
+ IN EFI_PEI_FILE_HANDLE FileHandle,\r
+ OUT EFI_FV_FILE_INFO2 *FileInfo\r
+ );\r
+\r
/**\r
This function returns information about the firmware volume.\r
\r
**/ \r
EFI_STATUS\r
EFIAPI\r
-PeiFfs2FvPpiGetVolumeInfo (\r
+PeiFfsFvPpiGetVolumeInfo (\r
IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This, \r
IN EFI_PEI_FV_HANDLE FvHandle, \r
OUT EFI_FV_INFO *VolumeInfo\r
/**\r
Report the information for a new discoveried FV in unknown format.\r
\r
- If the EFI_PEI_FIRMWARE_VOLUME_PPI has not been install for specifical FV format, but\r
+ If the EFI_PEI_FIRMWARE_VOLUME_PPI has not been installed for specifical FV format, but\r
the FV in this FV format has been discoveried, then the information of this FV\r
will be cached into PEI_CORE_INSTANCE's UnknownFvInfo array.\r
Also a notification would be installed for unknown FV format guid, if EFI_PEI_FIRMWARE_VOLUME_PPI\r
using new installed EFI_PEI_FIRMWARE_VOLUME_PPI.\r
\r
@param PrivateData Point to instance of PEI_CORE_INSTANCE\r
- @param Format Point to the unknown FV format guid.\r
- @param FvInfo Point to FvInfo buffer.\r
- @param FvInfoSize The size of FvInfo buffer.\r
+ @param FvInfo2Ppi Point to FvInfo2 PPI.\r
\r
@retval EFI_OUT_OF_RESOURCES The FV info array in PEI_CORE_INSTANCE has no more spaces.\r
@retval EFI_SUCCESS Success to add the information for unknown FV.\r
**/\r
EFI_STATUS\r
AddUnknownFormatFvInfo (\r
- IN PEI_CORE_INSTANCE *PrivateData,\r
- IN EFI_GUID *Format,\r
- IN VOID *FvInfo,\r
- IN UINT32 FvInfoSize\r
+ IN PEI_CORE_INSTANCE *PrivateData,\r
+ IN EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI *FvInfo2Ppi\r
);\r
\r
/**\r
@param Format Point to given FV format guid\r
@param FvInfo On return, the pointer of FV information buffer in given FV format guid\r
@param FvInfoSize On return, the size of FV information buffer.\r
+ @param AuthenticationStatus On return, the authentication status of FV information buffer.\r
\r
@retval EFI_NOT_FOUND The FV is not found for new installed EFI_PEI_FIRMWARE_VOLUME_PPI\r
@retval EFI_SUCCESS Success to find a FV which could be processed by new installed EFI_PEI_FIRMWARE_VOLUME_PPI.\r
IN PEI_CORE_INSTANCE *PrivateData,\r
IN EFI_GUID *Format,\r
OUT VOID **FvInfo,\r
- OUT UINT32 *FvInfoSize\r
+ OUT UINT32 *FvInfoSize,\r
+ OUT UINT32 *AuthenticationStatus\r
);\r
\r
/**\r