]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Variable/EmuRuntimeDxe/InitVariable.c
MdeModulePkg Variable: Align TPL level for (Smm)EndOfDxe callback
[mirror_edk2.git] / MdeModulePkg / Universal / Variable / EmuRuntimeDxe / InitVariable.c
index c02578ef435c0a8cee1ae1c4073faa8c5939ca44..309a4b8dbfeb61e8b2e599b0a7dcd7aa1c6dc826 100644 (file)
@@ -3,7 +3,7 @@
   Implment all four UEFI runtime variable services and \r
   install variable architeture protocol.\r
   \r
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2016, 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
@@ -27,7 +27,8 @@ EFI_EVENT   mVirtualAddressChangeEvent = NULL;
   @param Attributes                 Attribute value of the variable found.\r
   @param DataSize                   Size of Data found. If size is less than the\r
                                     data, this value contains the required size.\r
-  @param Data                       Data pointer.\r
+  @param Data                       The buffer to return the contents of the variable. May be NULL\r
+                                    with a zero DataSize in order to determine the size buffer needed.\r
                       \r
   @return EFI_INVALID_PARAMETER     Invalid parameter\r
   @return EFI_SUCCESS               Find the specified variable\r
@@ -42,7 +43,7 @@ RuntimeServiceGetVariable (
   IN EFI_GUID      *VendorGuid,\r
   OUT UINT32       *Attributes OPTIONAL,\r
   IN OUT UINTN     *DataSize,\r
-  OUT VOID         *Data\r
+  OUT VOID         *Data OPTIONAL\r
   )\r
 {\r
   return EmuGetVariable (\r
@@ -59,14 +60,22 @@ RuntimeServiceGetVariable (
 \r
   This code Finds the Next available variable.\r
 \r
-  @param VariableNameSize           Size of the variable name\r
-  @param VariableName               Pointer to variable name\r
-  @param VendorGuid                 Variable Vendor Guid\r
-\r
-  @return EFI_INVALID_PARAMETER     Invalid parameter\r
-  @return EFI_SUCCESS               Find the specified variable\r
-  @return EFI_NOT_FOUND             Not found\r
-  @return EFI_BUFFER_TO_SMALL       DataSize is too small for the result\r
+  @param  VariableNameSize       The size of the VariableName buffer. The size must be large enough to fit input\r
+                                 string supplied in VariableName buffer.\r
+  @param  VariableName           On input, supplies the last VariableName that was returned by GetNextVariableName().\r
+                                 On output, returns the Null-terminated Unicode string of the current variable.\r
+  @param  VendorGuid             On input, supplies the last VendorGuid that was returned by GetNextVariableName().\r
+                                 On output, returns the VendorGuid of the current variable.\r
+\r
+  @retval EFI_SUCCESS            The function completed successfully.\r
+  @retval EFI_NOT_FOUND          The next variable was not found.\r
+  @retval EFI_BUFFER_TOO_SMALL   The VariableNameSize is too small for the result.\r
+                                 VariableNameSize has been updated with the size needed to complete the request.\r
+  @retval EFI_INVALID_PARAMETER  VariableNameSize or VariableName or VendorGuid is NULL.\r
+  @retval EFI_INVALID_PARAMETER  The input values of VariableName and VendorGuid are not a name and\r
+                                 GUID of an existing variable.\r
+  @retval EFI_INVALID_PARAMETER  Null-terminator is not found in the first VariableNameSize bytes of\r
+                                 the input VariableName buffer.\r
 \r
 **/\r
 EFI_STATUS\r