VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiLib.c

Last change on this file was 108794, checked in by vboxsync, 3 weeks ago

Devices/EFI/FirmwareNew: Merge edk2-stable202502 from the vendor branch and make it build for the important platforms, bugref:4643

  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1/** @file
2 Var Check Hii handler.
3
4Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
5SPDX-License-Identifier: BSD-2-Clause-Patent
6
7**/
8
9#include "VarCheckHii.h"
10#include "VarCheckHiiGen.h"
11#include "VarCheckHiiLibCommon.h"
12
13/**
14 Sets the variable check handler for HII.
15 @param[in] VariableName Name of Variable to set.
16 @param[in] VendorGuid Variable vendor GUID.
17 @param[in] Attributes Attribute value of the variable.
18 @param[in] DataSize Size of Data to set.
19 @param[in] Data Data pointer.
20 @retval EFI_SUCCESS The SetVariable check result was success.
21 @retval EFI_SECURITY_VIOLATION Check fail.
22**/
23EFI_STATUS
24EFIAPI
25SetVariableCheckHandlerHii (
26 IN CHAR16 *VariableName,
27 IN EFI_GUID *VendorGuid,
28 IN UINT32 Attributes,
29 IN UINTN DataSize,
30 IN VOID *Data
31 )
32{
33 return CheckHiiVariableCommon (mVarCheckHiiBin, mVarCheckHiiBinSize, VariableName, VendorGuid, Attributes, DataSize, Data);
34}
35
36/**
37 Constructor function of VarCheckHiiLib to register var check HII handler.
38
39 @param[in] ImageHandle The firmware allocated handle for the EFI image.
40 @param[in] SystemTable A pointer to the EFI System Table.
41
42 @retval EFI_SUCCESS The constructor executed correctly.
43
44**/
45EFI_STATUS
46EFIAPI
47VarCheckHiiLibConstructor (
48 IN EFI_HANDLE ImageHandle,
49 IN EFI_SYSTEM_TABLE *SystemTable
50 )
51{
52 VarCheckLibRegisterEndOfDxeCallback (VarCheckHiiGen);
53 VarCheckLibRegisterAddressPointer ((VOID **)&mVarCheckHiiBin);
54 VarCheckLibRegisterSetVariableCheckHandler (SetVariableCheckHandlerHii);
55
56 return EFI_SUCCESS;
57}
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette