-/**\r
+/** @file\r
Module produce FV2 on top of FV.\r
\r
UEFI PI specification supersedes Inte's Framework Specification.\r
1) Framework module producing FV is present\r
2) And the rest of modules on the platform consume FV2\r
\r
-Copyright (c) 2006 - 2008 Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2010, Intel Corporation. <BR>\r
All rights reserved. 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
ReadFile() is used to retrieve any file from a firmware volume\r
during the DXE phase. The actual binary encoding of the file in\r
the firmware volume media may be in any arbitrary format as long\r
- as it does the following: ?It is accessed using the Firmware\r
- Volume Protocol. ?The image that is returned follows the image\r
+ as it does the following: It is accessed using the Firmware\r
+ Volume Protocol. The image that is returned follows the image\r
format defined in Code Definitions: PI Firmware File Format.\r
If the input value of Buffer==NULL, it indicates the caller is\r
requesting only that the type, attributes, and size of the\r
\r
@retval EFI_OUT_OF_RESOURCES An allocation failure occurred.\r
\r
- @retavl EFI_NOT_FOUND Name was not found in the firmware\r
+ @retval EFI_NOT_FOUND Name was not found in the firmware\r
volume.\r
\r
@retval EFI_DEVICE_ERROR A hardware error occurred when\r
ReadSection() is used to retrieve a specific section from a file\r
within a firmware volume. The section returned is determined\r
using a depth-first, left-to-right search algorithm through all\r
- sections found in the specified file. See\r
- ????Firmware File Sections???? on page 9 for more details about\r
- sections. The output buffer is specified by a double indirection\r
- of the Buffer parameter. The input value of Buffer is used to\r
- determine if the output buffer is caller allocated or is\r
+ sections found in the specified file. The output buffer is \r
+ specified by a double indirection of the Buffer parameter. \r
+ The input value of Buffer is used to determine \r
+ if the output buffer is caller allocated or is\r
dynamically allocated by ReadSection(). If the input value of\r
Buffer!=NULL, it indicates that the output buffer is caller\r
allocated. In this case, the input value of *BufferSize\r
undefined. Type EFI_TPL is defined in RaiseTPL() in the UEFI 2.0\r
specification.\r
\r
- @param This Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL\r
- instance. NumberOfFiles Indicates the number of\r
- elements in the array pointed to by FileData.\r
+ @param This Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL instance. \r
\r
+ @param NumberOfFiles Indicates the number of elements in the \r
+ array pointed to by FileData.\r
\r
@param WritePolicy Indicates the level of reliability for the\r
write in the event of a power failure or\r
\r
\r
@param This Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL\r
- instance. Key Pointer to a caller-allocated buffer\r
+ instance. \r
+\r
+ @param Key Pointer to a caller-allocated buffer\r
that contains implementation-specific data that is\r
used to track where to begin the search for the\r
next file. The size of the buffer must be at least\r
//\r
// Module globals\r
//\r
+/**\r
+ This notification function is invoked when an instance of the\r
+ EFI_FIRMWARE_VOLUME_PROTOCOL is produced. It installs another instance of the\r
+ EFI_FIRMWARE_VOLUME2_PROTOCOL on the same handle.\r
+\r
+ @param Event The event that occured\r
+ @param Context Context of event. Not used in this nofication function.\r
\r
+**/\r
VOID\r
EFIAPI\r
Fv2NotificationEvent (\r
EFI_STATUS Status;\r
UINTN Shift;\r
\r
- if (*FvAttributes & (EFI_FV2_READ_LOCK_STATUS | EFI_FV2_WRITE_LOCK_STATUS)) {\r
+ if ((*FvAttributes & (EFI_FV2_READ_LOCK_STATUS | EFI_FV2_WRITE_LOCK_STATUS)) != 0) {\r
//\r
// Framework FV protocol does not support EFI_FV2_READ_LOCK_* | EFI_FV2_WRITE_LOCK_*\r
//\r
ReadFile() is used to retrieve any file from a firmware volume\r
during the DXE phase. The actual binary encoding of the file in\r
the firmware volume media may be in any arbitrary format as long\r
- as it does the following: ?It is accessed using the Firmware\r
- Volume Protocol. ?The image that is returned follows the image\r
+ as it does the following: It is accessed using the Firmware\r
+ Volume Protocol. The image that is returned follows the image\r
format defined in Code Definitions: PI Firmware File Format.\r
If the input value of Buffer==NULL, it indicates the caller is\r
requesting only that the type, attributes, and size of the\r
\r
@retval EFI_OUT_OF_RESOURCES An allocation failure occurred.\r
\r
- @retavl EFI_NOT_FOUND Name was not found in the firmware\r
+ @retval EFI_NOT_FOUND Name was not found in the firmware\r
volume.\r
\r
@retval EFI_DEVICE_ERROR A hardware error occurred when\r
ReadSection() is used to retrieve a specific section from a file\r
within a firmware volume. The section returned is determined\r
using a depth-first, left-to-right search algorithm through all\r
- sections found in the specified file. See\r
- ????Firmware File Sections???? on page 9 for more details about\r
- sections. The output buffer is specified by a double indirection\r
- of the Buffer parameter. The input value of Buffer is used to\r
- determine if the output buffer is caller allocated or is\r
+ sections found in the specified file.The output buffer is specified \r
+ by a double indirection of the Buffer parameter. The input value of Buffer \r
+ is used to determine if the output buffer is caller allocated or is\r
dynamically allocated by ReadSection(). If the input value of\r
Buffer!=NULL, it indicates that the output buffer is caller\r
allocated. In this case, the input value of *BufferSize\r
undefined. Type EFI_TPL is defined in RaiseTPL() in the UEFI 2.0\r
specification.\r
\r
- @param This Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL\r
- instance. NumberOfFiles Indicates the number of\r
- elements in the array pointed to by FileData.\r
+ @param This Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL instance. \r
+\r
+ @param NumberOfFiles Indicates the number of\r
+ elements in the array pointed to by FileData.\r
\r
\r
@param WritePolicy Indicates the level of reliability for the\r
\r
\r
@param This Indicates the EFI_FIRMWARE_VOLUME2_PROTOCOL\r
- instance. Key Pointer to a caller-allocated buffer\r
+ instance. \r
+\r
+ @param Key Pointer to a caller-allocated buffer\r
that contains implementation-specific data that is\r
used to track where to begin the search for the\r
next file. The size of the buffer must be at least\r