1 | /** @file
|
---|
2 | Definitions of Hii Expression.
|
---|
3 |
|
---|
4 | Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>
|
---|
5 | (C) Copyright 2021 Hewlett Packard Enterprise Development LP<BR>
|
---|
6 | Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
---|
7 |
|
---|
8 | SPDX-License-Identifier: BSD-2-Clause-Patent
|
---|
9 |
|
---|
10 | **/
|
---|
11 |
|
---|
12 | #ifndef HII_EXPRESSION_H_
|
---|
13 | #define HII_EXPRESSION_H_
|
---|
14 |
|
---|
15 | #include <Library/HiiUtilityLib.h>
|
---|
16 |
|
---|
17 | /**
|
---|
18 | Get the expression list count.
|
---|
19 |
|
---|
20 | @param[in] Level Which type this expression belong to. Form,
|
---|
21 | statement or option?
|
---|
22 |
|
---|
23 | @retval >=0 The expression count
|
---|
24 | @retval -1 Input parameter error.
|
---|
25 |
|
---|
26 | **/
|
---|
27 | INTN
|
---|
28 | GetConditionalExpressionCount (
|
---|
29 | IN EXPRESS_LEVEL Level
|
---|
30 | );
|
---|
31 |
|
---|
32 | /**
|
---|
33 | Get the expression Buffer pointer.
|
---|
34 |
|
---|
35 | @param[in] Level Which type this expression belong to. Form,
|
---|
36 | statement or option?
|
---|
37 |
|
---|
38 | @retval The start pointer of the expression buffer or NULL.
|
---|
39 |
|
---|
40 | **/
|
---|
41 | HII_EXPRESSION **
|
---|
42 | GetConditionalExpressionList (
|
---|
43 | IN EXPRESS_LEVEL Level
|
---|
44 | );
|
---|
45 |
|
---|
46 | /**
|
---|
47 | Push the expression options onto the Stack.
|
---|
48 |
|
---|
49 | @param[in] Pointer Pointer to the current expression.
|
---|
50 | @param[in] Level Which type this expression belong to. Form,
|
---|
51 | statement or option?
|
---|
52 |
|
---|
53 | @retval EFI_SUCCESS The value was pushed onto the stack.
|
---|
54 | @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
|
---|
55 |
|
---|
56 | **/
|
---|
57 | EFI_STATUS
|
---|
58 | PushConditionalExpression (
|
---|
59 | IN HII_EXPRESSION *Pointer,
|
---|
60 | IN EXPRESS_LEVEL Level
|
---|
61 | );
|
---|
62 |
|
---|
63 | /**
|
---|
64 | Pop the expression options from the Stack
|
---|
65 |
|
---|
66 | @param[in] Level Which type this expression belong to. Form,
|
---|
67 | statement or option?
|
---|
68 |
|
---|
69 | @retval EFI_SUCCESS The value was pushed onto the stack.
|
---|
70 | @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
|
---|
71 |
|
---|
72 | **/
|
---|
73 | EFI_STATUS
|
---|
74 | PopConditionalExpression (
|
---|
75 | IN EXPRESS_LEVEL Level
|
---|
76 | );
|
---|
77 |
|
---|
78 | /**
|
---|
79 | Reset stack pointer to begin of the stack.
|
---|
80 |
|
---|
81 | **/
|
---|
82 | VOID
|
---|
83 | ResetCurrentExpressionStack (
|
---|
84 | VOID
|
---|
85 | );
|
---|
86 |
|
---|
87 | /**
|
---|
88 | Push current expression onto the Stack
|
---|
89 |
|
---|
90 | @param[in] Pointer Pointer to current expression.
|
---|
91 |
|
---|
92 | @retval EFI_SUCCESS The value was pushed onto the stack.
|
---|
93 | @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
|
---|
94 |
|
---|
95 | **/
|
---|
96 | EFI_STATUS
|
---|
97 | PushCurrentExpression (
|
---|
98 | IN VOID *Pointer
|
---|
99 | );
|
---|
100 |
|
---|
101 | /**
|
---|
102 | Pop current expression from the Stack
|
---|
103 |
|
---|
104 | @param[in] Pointer Pointer to current expression to be pop.
|
---|
105 |
|
---|
106 | @retval EFI_SUCCESS The value was pushed onto the stack.
|
---|
107 | @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
|
---|
108 |
|
---|
109 | **/
|
---|
110 | EFI_STATUS
|
---|
111 | PopCurrentExpression (
|
---|
112 | OUT VOID **Pointer
|
---|
113 | );
|
---|
114 |
|
---|
115 | /**
|
---|
116 | Reset stack pointer to begin of the stack.
|
---|
117 |
|
---|
118 | **/
|
---|
119 | VOID
|
---|
120 | ResetMapExpressionListStack (
|
---|
121 | VOID
|
---|
122 | );
|
---|
123 |
|
---|
124 | /**
|
---|
125 | Push the list of map expression onto the Stack
|
---|
126 |
|
---|
127 | @param[in] Pointer Pointer to the list of map expression to be pushed.
|
---|
128 |
|
---|
129 | @retval EFI_SUCCESS The value was pushed onto the stack.
|
---|
130 | @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
|
---|
131 |
|
---|
132 | **/
|
---|
133 | EFI_STATUS
|
---|
134 | PushMapExpressionList (
|
---|
135 | IN VOID *Pointer
|
---|
136 | );
|
---|
137 |
|
---|
138 | /**
|
---|
139 | Pop the list of map expression from the Stack
|
---|
140 |
|
---|
141 | @param[in] Pointer Pointer to the list of map expression to be pop.
|
---|
142 |
|
---|
143 | @retval EFI_SUCCESS The value was pushed onto the stack.
|
---|
144 | @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the stack.
|
---|
145 |
|
---|
146 | **/
|
---|
147 | EFI_STATUS
|
---|
148 | PopMapExpressionList (
|
---|
149 | OUT VOID **Pointer
|
---|
150 | );
|
---|
151 |
|
---|
152 | /**
|
---|
153 | Reset stack pointer to begin of the stack.
|
---|
154 |
|
---|
155 | **/
|
---|
156 | VOID
|
---|
157 | ResetScopeStack (
|
---|
158 | VOID
|
---|
159 | );
|
---|
160 |
|
---|
161 | /**
|
---|
162 | Push an Operand onto the Stack
|
---|
163 |
|
---|
164 | @param[in] Operand Operand to push.
|
---|
165 |
|
---|
166 | @retval EFI_SUCCESS The value was pushed onto the stack.
|
---|
167 | @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the
|
---|
168 | stack.
|
---|
169 |
|
---|
170 | **/
|
---|
171 | EFI_STATUS
|
---|
172 | PushScope (
|
---|
173 | IN UINT8 Operand
|
---|
174 | );
|
---|
175 |
|
---|
176 | /**
|
---|
177 | Pop an Operand from the Stack
|
---|
178 |
|
---|
179 | @param[out] Operand Operand to pop.
|
---|
180 |
|
---|
181 | @retval EFI_SUCCESS The value was pushed onto the stack.
|
---|
182 | @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the
|
---|
183 | stack.
|
---|
184 |
|
---|
185 | **/
|
---|
186 | EFI_STATUS
|
---|
187 | PopScope (
|
---|
188 | OUT UINT8 *Operand
|
---|
189 | );
|
---|
190 |
|
---|
191 | #endif
|
---|