]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/EdkFvbServiceLib/Fvb.c
Add comments and DoxyGen format for these files.
[mirror_edk2.git] / MdeModulePkg / Library / EdkFvbServiceLib / Fvb.c
index db415a11435f032604c52c71eb912b15e841453f..0cd0f6dcdc69354b28e118c2127859eefae25965 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
@@ -449,6 +455,8 @@ EfiFvbGetVolumeAttributes (
   OUT EFI_FVB_ATTRIBUTES                  *Attributes\r
   )\r
 {\r
+  ASSERT (Attributes != NULL);\r
+  \r
   if (Instance >= mFvbCount) {\r
     return EFI_INVALID_PARAMETER;\r
   }\r
@@ -481,6 +489,8 @@ EfiFvbSetVolumeAttributes (
   IN OUT EFI_FVB_ATTRIBUTES                   *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