1 | /** @file
|
---|
2 | Include file for Var Check Hii bin generation.
|
---|
3 |
|
---|
4 | Copyright (c) 2024, Intel Corporation. All rights reserved.<BR>
|
---|
5 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
6 |
|
---|
7 | **/
|
---|
8 |
|
---|
9 | #ifndef _VAR_CHECK_HII_GEN_H_
|
---|
10 | #define _VAR_CHECK_HII_GEN_H_
|
---|
11 |
|
---|
12 | #include "VarCheckHii.h"
|
---|
13 | extern VAR_CHECK_HII_VARIABLE_HEADER *mVarCheckHiiBin;
|
---|
14 | extern UINTN mVarCheckHiiBinSize;
|
---|
15 |
|
---|
16 | /**
|
---|
17 | Dump Hii Package.
|
---|
18 |
|
---|
19 | @param[in] HiiPackage Pointer to Hii Package.
|
---|
20 |
|
---|
21 | **/
|
---|
22 | VOID
|
---|
23 | DumpHiiPackage (
|
---|
24 | IN VOID *HiiPackage
|
---|
25 | );
|
---|
26 |
|
---|
27 | /**
|
---|
28 | Dump Hii Database.
|
---|
29 |
|
---|
30 | @param[in] HiiDatabase Pointer to Hii Database.
|
---|
31 | @param[in] HiiDatabaseSize Hii Database size.
|
---|
32 |
|
---|
33 | **/
|
---|
34 | VOID
|
---|
35 | DumpHiiDatabase (
|
---|
36 | IN VOID *HiiDatabase,
|
---|
37 | IN UINTN HiiDatabaseSize
|
---|
38 | );
|
---|
39 |
|
---|
40 | /**
|
---|
41 | Allocates and zeros a buffer of type EfiBootServicesData.
|
---|
42 |
|
---|
43 | Allocates the number bytes specified by AllocationSize of type EfiBootServicesData, clears the
|
---|
44 | buffer with zeros, and returns a pointer to the allocated buffer. If AllocationSize is 0, then a
|
---|
45 | valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the
|
---|
46 | request, then NULL is returned.
|
---|
47 |
|
---|
48 | @param AllocationSize The number of bytes to allocate and zero.
|
---|
49 |
|
---|
50 | @return A pointer to the allocated buffer or NULL if allocation fails.
|
---|
51 |
|
---|
52 | **/
|
---|
53 | VOID *
|
---|
54 | InternalVarCheckAllocateZeroPool (
|
---|
55 | IN UINTN AllocationSize
|
---|
56 | );
|
---|
57 |
|
---|
58 | /**
|
---|
59 | Frees a buffer that was previously allocated with one of the pool allocation functions in the
|
---|
60 | Memory Allocation Library.
|
---|
61 |
|
---|
62 | Frees the buffer specified by Buffer. Buffer must have been allocated on a previous call to the
|
---|
63 | pool allocation services of the Memory Allocation Library. If it is not possible to free pool
|
---|
64 | resources, then this function will perform no actions.
|
---|
65 |
|
---|
66 | If Buffer was not allocated with a pool allocation function in the Memory Allocation Library,
|
---|
67 | then ASSERT().
|
---|
68 |
|
---|
69 | @param Buffer The pointer to the buffer to free.
|
---|
70 |
|
---|
71 | **/
|
---|
72 | VOID
|
---|
73 | EFIAPI
|
---|
74 | InternalVarCheckFreePool (
|
---|
75 | IN VOID *Buffer
|
---|
76 | );
|
---|
77 |
|
---|
78 | /**
|
---|
79 | Var Check Parse Hii Package.
|
---|
80 |
|
---|
81 | @param[in] HiiPackage Pointer to Hii Package.
|
---|
82 | @param[in] FromFv Hii Package from FV.
|
---|
83 |
|
---|
84 | **/
|
---|
85 | VOID
|
---|
86 | VarCheckParseHiiPackage (
|
---|
87 | IN VOID *HiiPackage,
|
---|
88 | IN BOOLEAN FromFv
|
---|
89 | );
|
---|
90 |
|
---|
91 | /**
|
---|
92 | Var Check Parse Hii Database.
|
---|
93 |
|
---|
94 | @param[in] HiiDatabase Pointer to Hii Database.
|
---|
95 | @param[in] HiiDatabaseSize Hii Database size.
|
---|
96 |
|
---|
97 | **/
|
---|
98 | VOID
|
---|
99 | VarCheckParseHiiDatabase (
|
---|
100 | IN VOID *HiiDatabase,
|
---|
101 | IN UINTN HiiDatabaseSize
|
---|
102 | );
|
---|
103 |
|
---|
104 | /**
|
---|
105 | Generate from FV.
|
---|
106 |
|
---|
107 | **/
|
---|
108 | VOID
|
---|
109 | VarCheckHiiGenFromFv (
|
---|
110 | VOID
|
---|
111 | );
|
---|
112 |
|
---|
113 | /**
|
---|
114 | Generate from Hii Database.
|
---|
115 |
|
---|
116 | **/
|
---|
117 | VOID
|
---|
118 | VarCheckHiiGenFromHiiDatabase (
|
---|
119 | VOID
|
---|
120 | );
|
---|
121 |
|
---|
122 | /**
|
---|
123 | Generate VarCheckHiiBin from Hii Database and FV.
|
---|
124 |
|
---|
125 | **/
|
---|
126 | VOID
|
---|
127 | EFIAPI
|
---|
128 | VarCheckHiiGen (
|
---|
129 | VOID
|
---|
130 | );
|
---|
131 |
|
---|
132 | #endif
|
---|