From 1241af9510c6f7c0ff83cc3c418e9e1e24bf1ab1 Mon Sep 17 00:00:00 2001 From: Star Zeng Date: Tue, 25 Aug 2015 03:10:04 +0000 Subject: MdeModulePkg: Add VarCheckHiiLib NULL class library The check will be based on VarCheckHiiBin that generated from FV and Hii Database. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng Reviewed-by: Jiewen Yao git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18293 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Library/VarCheckHiiLib/VarCheckHiiGen.h | 136 +++++++++++++++++++++ 1 file changed, 136 insertions(+) create mode 100644 MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.h (limited to 'MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.h') diff --git a/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.h b/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.h new file mode 100644 index 0000000000..f81be2ea88 --- /dev/null +++ b/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.h @@ -0,0 +1,136 @@ +/** @file + Include file for Var Check Hii bin generation. + +Copyright (c) 2015, 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 + +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_GEN_H_ +#define _VAR_CHECK_HII_GEN_H_ + +#include "VarCheckHii.h" + +/** + Dump Hii Package. + + @param[in] HiiPackage Pointer to Hii Package. + +**/ +VOID +DumpHiiPackage ( + IN VOID *HiiPackage + ); + +/** + Dump Hii Database. + + @param[in] HiiDatabase Pointer to Hii Database. + @param[in] HiiDatabaseSize Hii Database size. + +**/ +VOID +DumpHiiDatabase ( + IN VOID *HiiDatabase, + IN UINTN HiiDatabaseSize + ); + +/** + Allocates and zeros a buffer of type EfiBootServicesData. + + Allocates the number bytes specified by AllocationSize of type EfiBootServicesData, clears the + buffer with zeros, and returns a pointer to the allocated buffer. If AllocationSize is 0, then a + valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the + request, then NULL is returned. + + @param AllocationSize The number of bytes to allocate and zero. + + @return A pointer to the allocated buffer or NULL if allocation fails. + +**/ +VOID * +InternalVarCheckAllocateZeroPool ( + IN UINTN AllocationSize + ); + +/** + Frees a buffer that was previously allocated with one of the pool allocation functions in the + Memory Allocation Library. + + Frees the buffer specified by Buffer. Buffer must have been allocated on a previous call to the + pool allocation services of the Memory Allocation Library. If it is not possible to free pool + resources, then this function will perform no actions. + + If Buffer was not allocated with a pool allocation function in the Memory Allocation Library, + then ASSERT(). + + @param Buffer The pointer to the buffer to free. + +**/ +VOID +EFIAPI +InternalVarCheckFreePool ( + IN VOID *Buffer + ); + +/** + Var Check Parse Hii Package. + + @param[in] HiiPackage Pointer to Hii Package. + @param[in] FromFv Hii Package from FV. + +**/ +VOID +VarCheckParseHiiPackage ( + IN VOID *HiiPackage, + IN BOOLEAN FromFv + ); + +/** + Var Check Parse Hii Database. + + @param[in] HiiDatabase Pointer to Hii Database. + @param[in] HiiDatabaseSize Hii Database size. + +**/ +VOID +VarCheckParseHiiDatabase ( + IN VOID *HiiDatabase, + IN UINTN HiiDatabaseSize + ); + +/** + Generate from FV. + +**/ +VOID +VarCheckHiiGenFromFv ( + VOID + ); + +/** + Generate from Hii Database. + +**/ +VOID +VarCheckHiiGenFromHiiDatabase ( + VOID + ); + +/** + Generate VarCheckHiiBin from Hii Database and FV. + +**/ +VOID +EFIAPI +VarCheckHiiGen ( + VOID + ); + +#endif -- cgit v1.2.3