X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FVariable%2FEmuRuntimeDxe%2FVariable.h;h=985f56791909137dd26f8a1c53a631f90e81d468;hb=6f817f9b8b07d195c63247b3cf4c1d646f1e8b0e;hp=482a192a381eb4de6e64e44fe65ed59846d7be87;hpb=01a5c99447c957a48bdaf64828191f4a4295c8b6;p=mirror_edk2.git diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h index 482a192a38..985f567919 100644 --- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h +++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h @@ -3,8 +3,8 @@ The internal header file includes the common header files, defines internal structure and functions used by EmuVariable module. -Copyright (c) 2006 - 2008, Intel Corporation -All rights reserved. This program and the accompanying materials +Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -31,12 +31,19 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include -#include +#include +#include +#include #include #define GET_VARIABLE_NAME_PTR(a) (CHAR16 *) ((UINTN) (a) + sizeof (VARIABLE_HEADER)) +/// +/// The size of a 3 character ISO639 language code. +/// +#define ISO_639_2_ENTRY_SIZE 3 + typedef enum { Physical, Virtual @@ -59,7 +66,12 @@ typedef struct { VARIABLE_GLOBAL VariableGlobal[2]; UINTN VolatileLastVariableOffset; UINTN NonVolatileLastVariableOffset; - UINT32 FvbInstance; + UINTN CommonVariableTotalSize; + UINTN HwErrVariableTotalSize; + CHAR8 *PlatformLangCodes; + CHAR8 *LangCodes; + CHAR8 *PlatformLang; + CHAR8 Lang[ISO_639_2_ENTRY_SIZE + 1]; } ESAL_VARIABLE_GLOBAL; /// @@ -138,7 +150,6 @@ VariableClassAddressChangeEvent ( @param Data On input, the size in bytes of the return Data buffer. On output, the size of data returned in Data. @param Global Pointer to VARIABLE_GLOBAL structure - @param Instance Instance of the Firmware Volume. @retval EFI_SUCCESS The function completed successfully. @retval EFI_NOT_FOUND The variable was not found. @@ -149,43 +160,45 @@ VariableClassAddressChangeEvent ( **/ EFI_STATUS EFIAPI -GetVariable ( +EmuGetVariable ( IN CHAR16 *VariableName, - IN EFI_GUID * VendorGuid, + IN EFI_GUID *VendorGuid, OUT UINT32 *Attributes OPTIONAL, IN OUT UINTN *DataSize, OUT VOID *Data, - IN VARIABLE_GLOBAL * Global, - IN UINT32 Instance + IN VARIABLE_GLOBAL *Global ); /** This code finds the next available variable. - @param VariableNameSize Size of the variable. + @param VariableNameSize The size of the VariableName buffer. The size must be large enough to fit input + string supplied in VariableName buffer. @param VariableName On input, supplies the last VariableName that was returned by GetNextVariableName(). On output, returns the Null-terminated Unicode string of the current variable. @param VendorGuid On input, supplies the last VendorGuid that was returned by GetNextVariableName(). - On output, returns the VendorGuid of the current variable. + On output, returns the VendorGuid of the current variable. @param Global Pointer to VARIABLE_GLOBAL structure. - @param Instance Instance of the Firmware Volume. - @retval EFI_SUCCESS The function completed successfully. + @retval EFI_SUCCESS The function completed successfully. @retval EFI_NOT_FOUND The next variable was not found. - @retval EFI_BUFFER_TOO_SMALL VariableNameSize is too small for the result. + @retval EFI_BUFFER_TOO_SMALL The VariableNameSize is too small for the result. VariableNameSize has been updated with the size needed to complete the request. @retval EFI_INVALID_PARAMETER VariableNameSize or VariableName or VendorGuid is NULL. + @retval EFI_INVALID_PARAMETER The input values of VariableName and VendorGuid are not a name and + GUID of an existing variable. + @retval EFI_INVALID_PARAMETER Null-terminator is not found in the first VariableNameSize bytes of + the input VariableName buffer. **/ EFI_STATUS EFIAPI -GetNextVariableName ( +EmuGetNextVariableName ( IN OUT UINTN *VariableNameSize, IN OUT CHAR16 *VariableName, IN OUT EFI_GUID *VendorGuid, - IN VARIABLE_GLOBAL *Global, - IN UINT32 Instance + IN VARIABLE_GLOBAL *Global ); /** @@ -205,7 +218,6 @@ GetNextVariableName ( @param Global Pointer to VARIABLE_GLOBAL structure @param VolatileOffset The offset of last volatile variable @param NonVolatileOffset The offset of last non-volatile variable - @param Instance Instance of the Firmware Volume. @retval EFI_SUCCESS The firmware has successfully stored the variable and its data as defined by the Attributes. @@ -220,7 +232,7 @@ GetNextVariableName ( **/ EFI_STATUS EFIAPI -SetVariable ( +EmuSetVariable ( IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, IN UINT32 Attributes, @@ -228,8 +240,7 @@ SetVariable ( IN VOID *Data, IN VARIABLE_GLOBAL *Global, IN UINTN *VolatileOffset, - IN UINTN *NonVolatileOffset, - IN UINT32 Instance + IN UINTN *NonVolatileOffset ); /** @@ -245,7 +256,6 @@ SetVariable ( @param MaximumVariableSize Returns the maximum size of an individual EFI variable associated with the attributes specified. @param Global Pointer to VARIABLE_GLOBAL structure. - @param Instance Instance of the Firmware Volume. @retval EFI_SUCCESS Valid answer returned. @retval EFI_INVALID_PARAMETER An invalid combination of attribute bits was supplied @@ -256,13 +266,12 @@ SetVariable ( **/ EFI_STATUS EFIAPI -QueryVariableInfo ( +EmuQueryVariableInfo ( IN UINT32 Attributes, OUT UINT64 *MaximumVariableStorageSize, OUT UINT64 *RemainingVariableStorageSize, OUT UINT64 *MaximumVariableSize, - IN VARIABLE_GLOBAL *Global, - IN UINT32 Instance + IN VARIABLE_GLOBAL *Global ); #endif