TianoCore EDK2 master
|
#include <Uefi/UefiBaseType.h>
#include <Library/VarCheckLib.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/DevicePathLib.h>
#include <Guid/VariableFormat.h>
#include <Guid/GlobalVariable.h>
#include <Guid/HardwareErrorVariable.h>
#include <Guid/ImageAuthentication.h>
Go to the source code of this file.
Data Structures | |
struct | UEFI_DEFINED_VARIABLE_ENTRY |
Typedefs | |
typedef EFI_STATUS(EFIAPI * | INTERNAL_VAR_CHECK_FUNCTION) (IN VAR_CHECK_VARIABLE_PROPERTY *Propery, IN UINTN DataSize, IN VOID *Data) |
Implementation functions and structures for var check uefi library.
Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file VarCheckUefiLibNullClass.c.
typedef EFI_STATUS(EFIAPI * INTERNAL_VAR_CHECK_FUNCTION) (IN VAR_CHECK_VARIABLE_PROPERTY *Propery, IN UINTN DataSize, IN VOID *Data) |
Definition at line 23 of file VarCheckUefiLibNullClass.c.
INTERNAL_VAR_CHECK_FUNCTION GetUefiDefinedVarCheckFunction | ( | IN CHAR16 * | VariableName, |
IN EFI_GUID * | VendorGuid, | ||
OUT VAR_CHECK_VARIABLE_PROPERTY ** | VariableProperty | ||
) |
Get UEFI defined var check function.
[in] | VariableName | Pointer to variable name. |
[in] | VendorGuid | Pointer to variable vendor GUID. |
[out] | VariableProperty | Pointer to variable property. |
Definition at line 756 of file VarCheckUefiLibNullClass.c.
EFI_STATUS EFIAPI InternalVarCheckAsciiString | ( | IN VAR_CHECK_VARIABLE_PROPERTY * | VariablePropery, |
IN UINTN | DataSize, | ||
IN VOID * | Data | ||
) |
Internal check for ASCII string.
[in] | VariablePropery | Pointer to variable property. |
[in] | DataSize | Data size. |
[in] | Data | Pointer to data buffer. |
EFI_SUCCESS | The SetVariable check result was success. |
EFI_INVALID_PARAMETER | The data buffer is not a Null-terminated ASCII string. |
Definition at line 167 of file VarCheckUefiLibNullClass.c.
EFI_STATUS EFIAPI InternalVarCheckDevicePath | ( | IN VAR_CHECK_VARIABLE_PROPERTY * | VariablePropery, |
IN UINTN | DataSize, | ||
IN VOID * | Data | ||
) |
Internal check for device path.
[in] | VariablePropery | Pointer to variable property. |
[in] | DataSize | Data size. |
[in] | Data | Pointer to data buffer. |
EFI_SUCCESS | The SetVariable check result was success. |
EFI_INVALID_PARAMETER | The data buffer is not a valid device path. |
Definition at line 141 of file VarCheckUefiLibNullClass.c.
EFI_STATUS EFIAPI InternalVarCheckKeyOption | ( | IN VAR_CHECK_VARIABLE_PROPERTY * | VariablePropery, |
IN UINTN | DataSize, | ||
IN VOID * | Data | ||
) |
Internal check for key option.
[in] | VariablePropery | Pointer to variable property. |
[in] | DataSize | Data size. |
[in] | Data | Pointer to data buffer. |
EFI_SUCCESS | The SetVariable check result was success. |
EFI_INVALID_PARAMETER | The data buffer is not a valid key option. |
Definition at line 115 of file VarCheckUefiLibNullClass.c.
EFI_STATUS EFIAPI InternalVarCheckLoadOption | ( | IN VAR_CHECK_VARIABLE_PROPERTY * | VariablePropery, |
IN UINTN | DataSize, | ||
IN VOID * | Data | ||
) |
Internal check for load option.
[in] | VariablePropery | Pointer to variable property. |
[in] | DataSize | Data size. |
[in] | Data | Pointer to data buffer. |
EFI_SUCCESS | The SetVariable check result was success. |
EFI_INVALID_PARAMETER | The data buffer is not a valid load option. |
Definition at line 49 of file VarCheckUefiLibNullClass.c.
EFI_STATUS EFIAPI InternalVarCheckSizeArray | ( | IN VAR_CHECK_VARIABLE_PROPERTY * | VariablePropery, |
IN UINTN | DataSize, | ||
IN VOID * | Data | ||
) |
Internal check for size array.
[in] | VariablePropery | Pointer to variable property. |
[in] | DataSize | Data size. |
[in] | Data | Pointer to data buffer. |
EFI_SUCCESS | The SetVariable check result was success. |
EFI_INVALID_PARAMETER | The DataSize is not size array. |
Definition at line 204 of file VarCheckUefiLibNullClass.c.
This code checks if variable is hardware error record variable or not.
According to UEFI spec, hardware error record variable should use the EFI_HARDWARE_ERROR_VARIABLE VendorGuid and have the L"HwErrRec####" name convention, #### is a printed hex value and no 0x or h is included in the hex value.
[in] | VariableName | Pointer to variable name. |
[in] | VendorGuid | Variable Vendor Guid. |
TRUE | Variable is hardware error record variable. |
FALSE | Variable is not hardware error record variable. |
Definition at line 726 of file VarCheckUefiLibNullClass.c.
EFI_STATUS EFIAPI SetVariableCheckHandlerUefiDefined | ( | IN CHAR16 * | VariableName, |
IN EFI_GUID * | VendorGuid, | ||
IN UINT32 | Attributes, | ||
IN UINTN | DataSize, | ||
IN VOID * | Data | ||
) |
SetVariable check handler UEFI defined.
[in] | VariableName | Name of Variable to set. |
[in] | VendorGuid | Variable vendor GUID. |
[in] | Attributes | Attribute value of the variable. |
[in] | DataSize | Size of Data to set. |
[in] | Data | Data pointer. |
EFI_SUCCESS | The SetVariable check result was success. |
EFI_INVALID_PARAMETER | An invalid combination of attribute bits, name, GUID, DataSize and Data value was supplied. |
EFI_WRITE_PROTECTED | The variable in question is read-only. |
Definition at line 814 of file VarCheckUefiLibNullClass.c.
BOOLEAN EFIAPI VarCheckUefiIsHexaDecimalDigitCharacter | ( | IN CHAR16 | Char | ) |
Check if a Unicode character is an upper case hexadecimal character.
This function checks if a Unicode character is an upper case hexadecimal character. The valid upper case hexadecimal character is L'0' to L'9', or L'A' to L'F'.
[in] | Char | The character to check against. |
TRUE | If the Char is an upper case hexadecmial character. |
FALSE | If the Char is not an upper case hexadecmial character. |
Definition at line 703 of file VarCheckUefiLibNullClass.c.
RETURN_STATUS EFIAPI VarCheckUefiLibNullClassConstructor | ( | VOID | ) |
Constructor function of VarCheckUefiLib to set property and register SetVariable check handler for UEFI defined variables.
EFI_SUCCESS | The constructor executed correctly. |
Definition at line 939 of file VarCheckUefiLibNullClass.c.
VOID VariablePropertySetUefiDefined | ( | VOID | ) |
Variable property set for UEFI defined variables.
Definition at line 884 of file VarCheckUefiLibNullClass.c.
UEFI_DEFINED_VARIABLE_ENTRY mGlobalVariableList[] |
Definition at line 225 of file VarCheckUefiLibNullClass.c.
UEFI_DEFINED_VARIABLE_ENTRY mGlobalVariableList2[] |
Definition at line 569 of file VarCheckUefiLibNullClass.c.
UEFI_DEFINED_VARIABLE_ENTRY mHwErrRecVariable |
Definition at line 669 of file VarCheckUefiLibNullClass.c.
UEFI_DEFINED_VARIABLE_ENTRY mImageSecurityVariableList[] |
Definition at line 630 of file VarCheckUefiLibNullClass.c.
EFI_GUID* mUefiDefinedGuid[] |
Definition at line 681 of file VarCheckUefiLibNullClass.c.