]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkModulePkg/Library/EdkFvbServiceLib/Ia32/Fvb.c
Add some definitions for efi event in Uefi/UefiSpec.h to follow spec.
[mirror_edk2.git] / EdkModulePkg / Library / EdkFvbServiceLib / Ia32 / Fvb.c
index c94c8242ac1419bb8666ce582c7888eecf76dd1d..12a55c97d3799e3f1166d69af3428fd603713e3c 100644 (file)
@@ -2,21 +2,21 @@
 \r
   Firmware Volume Block Protocol Runtime Abstraction\r
 \r
-  mFvbEntry is an array of Handle Fvb pairs. The Fvb Lib Instance matches the \r
+  mFvbEntry is an array of Handle Fvb pairs. The Fvb Lib Instance matches the\r
   index in the mFvbEntry array. This should be the same sequence as the FVB's\r
-  were described in the HOB. We have to remember the handle so we can tell if \r
+  were described in the HOB. We have to remember the handle so we can tell if\r
   the protocol has been reinstalled and it needs updateing.\r
 \r
   If you are using any of these lib functions.you must first call FvbInitialize ().\r
-  \r
-Copyright (c) 2006, Intel Corporation                                                         \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
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Copyright (c) 2006, Intel Corporation\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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
@@ -32,9 +32,9 @@ STATIC UINTN              mFvbCount;
 \r
 /**\r
   Check whether an address is runtime memory or not.\r
\r
+\r
   @param    Address   The Address being checked.\r
-  \r
+\r
   @retval   TRUE      The address is runtime memory.\r
   @retval   FALSE     The address is not runtime memory.\r
 **/\r
@@ -124,10 +124,10 @@ IsRuntimeMemory (
 /**\r
   Update mFvbEntry. Add new entry, or update existing entry if Fvb protocol is\r
   reinstalled.\r
\r
+\r
   @param Event      The Event that is being processed\r
   @param Context    Event Context\r
-  \r
+\r
 **/\r
 STATIC\r
 VOID\r
@@ -190,15 +190,15 @@ FvbNotificationEvent (
     //  Get the interface pointer and if it's ours, skip it\r
     //\r
     Status = gBS->HandleProtocol (\r
-                    Handle, \r
-                    &gEfiFirmwareVolumeBlockProtocolGuid, \r
+                    Handle,\r
+                    &gEfiFirmwareVolumeBlockProtocolGuid,\r
                     (VOID **) &mFvbEntry[UpdateIndex].Fvb\r
                     );\r
     ASSERT_EFI_ERROR (Status);\r
 \r
     Status = gBS->HandleProtocol (\r
-                    Handle, \r
-                    &gEfiFvbExtensionProtocolGuid, \r
+                    Handle,\r
+                    &gEfiFvbExtensionProtocolGuid,\r
                     (VOID **) &mFvbEntry[UpdateIndex].FvbExtension\r
                     );\r
     if (Status != EFI_SUCCESS) {\r
@@ -209,14 +209,14 @@ FvbNotificationEvent (
     // Check the FVB can be accessed in RUNTIME, The FVBs in FVB handle list comes\r
     // from two way:\r
     // 1) Dxe Core. (FVB information is transferred from FV HOB).\r
-    // 2) FVB driver. \r
+    // 2) FVB driver.\r
     // The FVB produced Dxe core is used for discoverying DXE driver and dispatch. These\r
-    // FVBs can only be accessed in boot time. \r
+    // FVBs can only be accessed in boot time.\r
     // FVB driver will discovery all FV in FLASH and these FVBs can be accessed in runtime.\r
-    // The FVB itself produced by FVB driver is allocated in runtime memory. So we can \r
+    // The FVB itself produced by FVB driver is allocated in runtime memory. So we can\r
     // determine the what FVB can be accessed in RUNTIME by judging whether FVB itself is allocated\r
     // in RUNTIME memory.\r
-    // \r
+    //\r
     mFvbEntry[UpdateIndex].IsRuntimeAccess = IsRuntimeMemory (mFvbEntry[UpdateIndex].Fvb);\r
   }\r
 }\r
@@ -226,7 +226,7 @@ FvbNotificationEvent (
 \r
   @param Event      The Event that is being processed\r
   @param Context    Event Context\r
-  \r
+\r
 **/\r
 VOID\r
 EFIAPI\r
@@ -265,10 +265,10 @@ FvbVirtualAddressChangeNotifyEvent (
 \r
 /**\r
   Library constructor function entry.\r
\r
+\r
   @param ImageHandle    The handle of image who call this libary.\r
   @param SystemTable    The point of System Table.\r
-  \r
+\r
   @retval EFI_SUCESS    Sucess construct this library.\r
   @retval Others        Fail to contruct this libary.\r
 **/\r
@@ -296,7 +296,7 @@ FvbLibInitialize (
 \r
   EfiCreateProtocolNotifyEvent (\r
     &gEfiFirmwareVolumeBlockProtocolGuid,\r
-    EFI_TPL_CALLBACK,\r
+    TPL_CALLBACK,\r
     FvbNotificationEvent,\r
     NULL,\r
     &mFvbRegistration\r
@@ -306,8 +306,8 @@ FvbLibInitialize (
   // Register SetVirtualAddressMap () notify function\r
   //\r
   //  Status = gBS->CreateEvent (\r
-  //                EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,\r
-  //                EFI_TPL_NOTIFY,\r
+  //                EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE,\r
+  //                TPL_NOTIFY,\r
   //                EfiRuntimeLibFvbVirtualNotifyEvent,\r
   //                NULL,\r
   //                &mEfiFvbVirtualNotifyEvent\r
@@ -326,7 +326,7 @@ FvbLibInitialize (
   return EFI_SUCCESS;\r
 }\r
 \r
-// \r
+//\r
 // =============================================================================\r
 // The following functions wrap Fvb protocol in the Runtime Lib functions.\r
 // The Instance translates into Fvb instance. The Fvb order defined by HOBs and\r
@@ -335,7 +335,7 @@ FvbLibInitialize (
 // EfiFvbInitialize () must be called before any of the following functions\r
 // must be called.\r
 // =============================================================================\r
-// \r
+//\r
 \r
 /**\r
   Reads specified number of bytes into a buffer from the specified block\r
@@ -348,7 +348,7 @@ FvbLibInitialize (
                       of bytes read\r
   @param Buffer       Pointer to a caller allocated buffer that will be\r
                       used to hold the data read\r
-  \r
+\r
   @retval EFI_INVALID_PARAMETER  Invalid parameter\r
   @retval EFI_SUCESS             Sucess to Read block\r
   @retval Others                 Fail to read block\r
@@ -375,7 +375,7 @@ EfiFvbReadBlock (
 \r
 /**\r
    Writes specified number of bytes from the input buffer to the block\r
\r
+\r
   @param Instance         The FV instance to be written to\r
   @param Lba              The starting logical block index to write to\r
   @param Offset           Offset into the block at which to begin writing\r
@@ -384,7 +384,7 @@ EfiFvbReadBlock (
                           of bytes actually written\r
   @param Buffer           Pointer to a caller allocated buffer that contains\r
                           the source for the write\r
-  \r
+\r
   @retval EFI_INVALID_PARAMETER  Invalid parameter\r
   @retval EFI_SUCESS             Sucess to write block\r
   @retval Others                 Fail to write block\r
@@ -414,7 +414,7 @@ EfiFvbWriteBlock (
 \r
    @param Instance      The FV instance to be erased\r
    @param Lba           The logical block index to be erased\r
-   \r
+\r
    @retval EFI_INVALID_PARAMETER  Invalid parameter\r
    @retval EFI_SUCESS             Sucess to erase block\r
    @retval Others                 Fail to erase block\r
@@ -439,10 +439,10 @@ EfiFvbEraseBlock (
 /**\r
   Retrieves attributes, insures positive polarity of attribute bits, returns\r
   resulting attributes in output parameter\r
\r
+\r
   @param Instance       The FV instance whose attributes is going to be returned\r
   @param Attributes     Output buffer which contains attributes\r
-  \r
+\r
   @retval EFI_INVALID_PARAMETER  Invalid parameter\r
   @retval EFI_SUCESS             Sucess to get Fv attribute\r
   @retval Others                 Fail to get Fv attribute\r
@@ -465,16 +465,16 @@ EfiFvbGetVolumeAttributes (
 }\r
 \r
 /**\r
-   Modifies the current settings of the firmware volume according to the \r
+   Modifies the current settings of the firmware volume according to the\r
    input parameter, and returns the new setting of the volume\r
 \r
-   @param Instance        The FV instance whose attributes is going to be \r
+   @param Instance        The FV instance whose attributes is going to be\r
                           modified\r
-   @param Attributes      On input, it is a pointer to EFI_FVB_ATTRIBUTES \r
+   @param Attributes      On input, it is a pointer to EFI_FVB_ATTRIBUTES\r
                           containing the desired firmware volume settings.\r
                           On successful return, it contains the new settings\r
                           of the firmware volume\r
-   \r
+\r
   @retval EFI_INVALID_PARAMETER  Invalid parameter\r
   @retval EFI_SUCESS             Sucess to set Fv attribute\r
   @retval Others                 Fail to set Fv attribute\r
@@ -501,10 +501,10 @@ EfiFvbSetVolumeAttributes (
 \r
    @param Instance      The FV instance whose base address is going to be\r
                         returned\r
-   @param BaseAddress   Pointer to a caller allocated EFI_PHYSICAL_ADDRESS \r
+   @param BaseAddress   Pointer to a caller allocated EFI_PHYSICAL_ADDRESS\r
                         that on successful return, contains the base address\r
                         of the firmware volume.\r
-   \r
+\r
   @retval EFI_INVALID_PARAMETER  Invalid parameter\r
   @retval EFI_SUCESS             Sucess to get physical address\r
   @retval Others                 Fail to get physical address\r
@@ -538,7 +538,7 @@ EfiFvbGetPhysicalAddress (
                               number of consecutive blocks starting with Lba is\r
                               returned. All blocks in this range have a size of\r
                               BlockSize\r
-   \r
+\r
   @retval EFI_INVALID_PARAMETER  Invalid parameter\r
   @retval EFI_SUCESS             Sucess to get block size\r
   @retval Others                 Fail to get block size\r
@@ -567,11 +567,11 @@ EfiFvbGetBlockSize (
 \r
    @param Instance          The FV instance to be erased\r
    @param StartLba          The starting logical block index to be erased\r
-   @param OffsetStartLba    Offset into the starting block at which to \r
+   @param OffsetStartLba    Offset into the starting block at which to\r
                             begin erasing\r
    @param LastLba           The last logical block index to be erased\r
    @param OffsetLastLba     Offset into the last block at which to end erasing\r
-   \r
+\r
   @retval EFI_INVALID_PARAMETER  Invalid parameter\r
   @retval EFI_SUCESS             Sucess to erase custom block range\r
   @retval Others                 Fail to erase custom block range\r