]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/UefiIfrParserExpression.h
c73db92b8e63c2a52348a3cff7067e09cf20201b
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / FrameworkHiiOnUefiHiiThunk / UefiIfrParserExpression.h
1 /** @file
2 Internal Function and Macro defintions for IFR Expression evaluation used in Ifr Parsing. This header file should only
3 be included by UefiIfrParserExpression.c and UefiIfrParser.c
4
5 Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef _HII_THUNK_UEFI_IFR_PARSER_EXPRESSION_
17 #define _HII_THUNK_UEFI_IFR_PARSER_EXPRESSION_
18
19 /**
20 Reset stack pointer to begin of the stack.
21
22 **/
23 VOID
24 ResetScopeStack (
25 VOID
26 );
27
28 /**
29 Push an Operand onto the Stack
30
31 @param Operand Operand to push.
32
33 @retval EFI_SUCCESS The value was pushed onto the stack.
34 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the
35 stack.
36
37 **/
38 EFI_STATUS
39 PushScope (
40 IN UINT8 Operand
41 );
42
43
44 /**
45 Pop an Operand from the Stack
46
47 @param Operand Operand to pop.
48
49 @retval EFI_SUCCESS The value was pushed onto the stack.
50 @retval EFI_OUT_OF_RESOURCES There is not enough system memory to grow the
51 stack.
52
53 **/
54 EFI_STATUS
55 PopScope (
56 OUT UINT8 *Operand
57 );
58
59 /**
60 Zero extend integer/boolean/date/time to UINT64 for comparing.
61
62 @param Value HII Value to be converted.
63
64 @return None.
65
66 **/
67 VOID
68 ExtendValueToU64 (
69 IN EFI_HII_VALUE *Value
70 );
71
72 /**
73 Compare two Hii value.
74
75 @param Value1 Expression value to compare on left-hand
76 @param Value2 Expression value to compare on right-hand
77 @param HiiHandle Only required for string compare
78
79 @retval EFI_INVALID_PARAMETER Could not perform comparation on two values
80 @retval 0 Two operators equeal
81 @retval 0 Value1 is greater than Value2
82 @retval 0 Value1 is less than Value2
83
84 **/
85 INTN
86 CompareHiiValue (
87 IN EFI_HII_VALUE *Value1,
88 IN EFI_HII_VALUE *Value2,
89 IN EFI_HII_HANDLE HiiHandle OPTIONAL
90 );
91
92 #endif