]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/EdkFvbServiceLib/Fvb.c
Updated EFI_FVB_ATTRIBUTES to EFI_FVB_ATTRIBUTES_2.
[mirror_edk2.git] / MdeModulePkg / Library / EdkFvbServiceLib / Fvb.c
index db415a11435f032604c52c71eb912b15e841453f..733e77b0192c3aeb8a9b54f25527254b6c95dca0 100644 (file)
@@ -1,6 +1,7 @@
 /**@file\r
 \r
-  Firmware Volume Block Protocol Runtime Abstraction\r
+  Firmware Volume Block Protocol Runtime Interface Abstraction\r
+  And FVB Extension protocol Runtime Interface Abstraction\r
 \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
@@ -9,7 +10,7 @@
 \r
   If you are using any of these lib functions.you must first call FvbInitialize ().\r
 \r
-Copyright (c) 2006, Intel Corporation\r
+Copyright (c) 2006 - 2008, 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
@@ -355,9 +356,12 @@ EfiFvbReadBlock (
   IN EFI_LBA                                      Lba,\r
   IN UINTN                                        Offset,\r
   IN OUT UINTN                                    *NumBytes,\r
-  IN UINT8                                        *Buffer\r
+  OUT UINT8                                       *Buffer\r
   )\r
 {\r
+  ASSERT (NumBytes != NULL);\r
+  ASSERT (Buffer != NULL);\r
+  \r
   if (Instance >= mFvbCount) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -394,6 +398,8 @@ EfiFvbWriteBlock (
   IN UINT8                                        *Buffer\r
   )\r
 {\r
+  ASSERT (NumBytes != NULL);\r
+  \r
   if (Instance >= mFvbCount) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -446,9 +452,11 @@ EfiFvbEraseBlock (
 EFI_STATUS\r
 EfiFvbGetVolumeAttributes (\r
   IN UINTN                                Instance,\r
-  OUT EFI_FVB_ATTRIBUTES                  *Attributes\r
+  OUT EFI_FVB_ATTRIBUTES_2                *Attributes\r
   )\r
 {\r
+  ASSERT (Attributes != NULL);\r
+  \r
   if (Instance >= mFvbCount) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -466,7 +474,7 @@ EfiFvbGetVolumeAttributes (
 \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_2\r
                           containing the desired firmware volume settings.\r
                           On successful return, it contains the new settings\r
                           of the firmware volume\r
@@ -478,9 +486,11 @@ EfiFvbGetVolumeAttributes (
 EFI_STATUS\r
 EfiFvbSetVolumeAttributes (\r
   IN     UINTN                                Instance,\r
-  IN OUT EFI_FVB_ATTRIBUTES                   *Attributes\r
+  IN OUT EFI_FVB_ATTRIBUTES_2                 *Attributes\r
   )\r
 {\r
+  ASSERT (Attributes != NULL);\r
+  \r
   if (Instance >= mFvbCount) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -511,6 +521,8 @@ EfiFvbGetPhysicalAddress (
   OUT EFI_PHYSICAL_ADDRESS                *BaseAddress\r
   )\r
 {\r
+  ASSERT (BaseAddress != NULL);\r
+  \r
   if (Instance >= mFvbCount) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -547,6 +559,9 @@ EfiFvbGetBlockSize (
   OUT UINTN                                       *NumOfBlocks\r
   )\r
 {\r
+  ASSERT (BlockSize != NULL);\r
+  ASSERT (NumOfBlocks != NULL);\r
+  \r
   if (Instance >= mFvbCount) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r