V3: (1) Reset QuestionStoredInBitField to FALSE at end opcode(EFI_IFR_END_OP) (2) Fix typo and format issues(line alignment for debug print message and value assignment...) V2: (1)Remove the VarOffsetBitLevel/StorageWidthBitLevel to reduce the final VarCheckBinSize and update the implementation accordingly. (2)Update the VAR_CHECK_HII_REVISION (3)Refine the Debug message and function comments,like update oneof", "checkbox", "numeric" to "OneOf", "CheckBox", "Numeric". VarCheckHiiLib check the value set to storage based on the possible value listed in the vfr file. Since we have enhanced vfr to support Question value stored in bit field, so now enhance VarCheckHiiLib to support bit field check. Cc: Star Zeng <star.zeng@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
64 lines
1.7 KiB
C
64 lines
1.7 KiB
C
/** @file
|
|
Include file for Var Check Hii handler and bin.
|
|
|
|
Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
|
|
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
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
**/
|
|
|
|
#ifndef _VAR_CHECK_HII_H_
|
|
#define _VAR_CHECK_HII_H_
|
|
|
|
#include <Library/VarCheckLib.h>
|
|
#include <Library/BaseLib.h>
|
|
#include <Library/DebugLib.h>
|
|
#include <Library/BaseMemoryLib.h>
|
|
#include <Library/UefiBootServicesTableLib.h>
|
|
#include <Library/MemoryAllocationLib.h>
|
|
|
|
#include <Guid/MdeModuleHii.h>
|
|
|
|
#include <Protocol/HiiDatabase.h>
|
|
#include <Protocol/FirmwareVolume2.h>
|
|
#include <Protocol/FirmwareVolumeBlock.h>
|
|
|
|
#include "InternalVarCheckStructure.h"
|
|
#include "VarCheckHiiGen.h"
|
|
|
|
//#define DUMP_VAR_CHECK_HII
|
|
//#define DUMP_HII_DATA
|
|
|
|
typedef struct {
|
|
UINT8 HiiOpCode;
|
|
CHAR8 *HiiOpCodeStr;
|
|
} VAR_CHECK_HII_OPCODE_STRING;
|
|
|
|
typedef struct {
|
|
UINT8 PackageType;
|
|
CHAR8 *PackageTypeStr;
|
|
} VAR_CHECK_HII_PACKAGE_TYPE_STRING;
|
|
|
|
/**
|
|
Dump Var Check HII.
|
|
|
|
@param[in] VarCheckHiiBin Pointer to VarCheckHiiBin.
|
|
@param[in] VarCheckHiiBinSize VarCheckHiiBin size.
|
|
|
|
**/
|
|
VOID
|
|
DumpVarCheckHii (
|
|
IN VOID *VarCheckHiiBin,
|
|
IN UINTN VarCheckHiiBinSize
|
|
);
|
|
|
|
extern VAR_CHECK_HII_VARIABLE_HEADER *mVarCheckHiiBin;
|
|
extern UINTN mVarCheckHiiBinSize;
|
|
|
|
#endif
|