TianoCore EDK2 master
|
#include <Uefi.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/MmServicesTableLib.h>
#include <Protocol/MmCommunication.h>
#include <Library/VarCheckLib.h>
#include "VarCheckHii.h"
#include "VarCheckHiiLibCommon.h"
Go to the source code of this file.
Functions | |
EFI_STATUS EFIAPI | VarCheckHiiLibReceiveHiiBinHandler (IN EFI_HANDLE DispatchHandle, IN CONST VOID *Context OPTIONAL, IN OUT VOID *CommBuffer OPTIONAL, IN OUT UINTN *CommBufferSize OPTIONAL) |
EFI_STATUS EFIAPI | SetVariableCheckHandlerHii (IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, IN UINT32 Attributes, IN UINTN DataSize, IN VOID *Data) |
EFI_STATUS EFIAPI | VarCheckHiiLibConstructorStandaloneMm (IN EFI_HANDLE ImageHandle, IN EFI_MM_SYSTEM_TABLE *SystemTable) |
Variables | |
VAR_CHECK_HII_VARIABLE_HEADER * | mMmReceivedVarCheckHiiBin = NULL |
UINTN | mMmReceivedVarCheckHiiBinSize = 0 |
EFI_GUID | gVarCheckReceivedHiiBinHandlerGuid = VAR_CHECK_RECEIVED_HII_BIN_HANDLER_GUID |
Implementation functions and structures for var check services. This file provides functions and structures to register and handle variable checks in the Standalone MM environment, specifically for HII variables.
Copyright (c) 2024, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file VarCheckHiiLibStandaloneMm.c.
EFI_STATUS EFIAPI SetVariableCheckHandlerHii | ( | IN CHAR16 * | VariableName, |
IN EFI_GUID * | VendorGuid, | ||
IN UINT32 | Attributes, | ||
IN UINTN | DataSize, | ||
IN VOID * | Data | ||
) |
Sets the variable check handler for HII. This function registers a handler that will be invoked for variable checks in the HII environment. It allows for custom validation logic to be implemented for setting HII variables.
[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. |
Definition at line 106 of file VarCheckHiiLibStandaloneMm.c.
EFI_STATUS EFIAPI VarCheckHiiLibConstructorStandaloneMm | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_MM_SYSTEM_TABLE * | SystemTable | ||
) |
Constructor function for variable check library in Standalone MM. This function registers a handler for variable checks and sets up the environment for variable checking in the Standalone MM environment.
[in] | ImageHandle | The firmware allocated handle for the EFI image. |
[in] | SystemTable | A pointer to the EFI system table. |
EFI_SUCCESS | The constructor executed successfully. |
Others | An error occurred during execution. |
Definition at line 129 of file VarCheckHiiLibStandaloneMm.c.
EFI_STATUS EFIAPI VarCheckHiiLibReceiveHiiBinHandler | ( | IN EFI_HANDLE | DispatchHandle, |
IN CONST VOID *Context | OPTIONAL, | ||
IN OUT VOID *CommBuffer | OPTIONAL, | ||
IN OUT UINTN *CommBufferSize | OPTIONAL | ||
) |
Registers a handler for HII variable checks in MM environment. This function is intended to be called to register a handler for checking variables in the Standalone MM environment. It allocates memory for the variable check data and copies the data from the communication buffer.
[in] | DispatchHandle | The handle of the dispatch function. |
[in] | Context | Optional context for the handler, not used in this implementation. |
CommBuffer | The buffer of data being passed in. | |
CommBufferSize | The size of the data being passed in. |
EFI_SUCCESS | Registration and memory allocation were successful. |
EFI_INVALID_PARAMETER | The CommBuffer or CommBufferSize is NULL. |
EFI_ACCESS_DENIED | The buffer size is invalid or the buffer is in an invalid location. |
EFI_OUT_OF_RESOURCES | Memory allocation for the variable check data failed. |
Definition at line 48 of file VarCheckHiiLibStandaloneMm.c.
EFI_GUID gVarCheckReceivedHiiBinHandlerGuid = VAR_CHECK_RECEIVED_HII_BIN_HANDLER_GUID |
Definition at line 28 of file VarCheckHiiLibStandaloneMm.c.
VAR_CHECK_HII_VARIABLE_HEADER* mMmReceivedVarCheckHiiBin = NULL |
Definition at line 26 of file VarCheckHiiLibStandaloneMm.c.
UINTN mMmReceivedVarCheckHiiBinSize = 0 |
Definition at line 27 of file VarCheckHiiLibStandaloneMm.c.