summaryrefslogtreecommitdiff
path: root/BaseTools/Source/C
diff options
context:
space:
mode:
Diffstat (limited to 'BaseTools/Source/C')
-rw-r--r--BaseTools/Source/C/Include/Common/BuildVersion.h2
-rw-r--r--BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h9
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp3
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrFormPkg.h20
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrSyntax.g13
5 files changed, 43 insertions, 4 deletions
diff --git a/BaseTools/Source/C/Include/Common/BuildVersion.h b/BaseTools/Source/C/Include/Common/BuildVersion.h
index 764bebfa9..f524cefc9 100644
--- a/BaseTools/Source/C/Include/Common/BuildVersion.h
+++ b/BaseTools/Source/C/Include/Common/BuildVersion.h
@@ -14,4 +14,4 @@
**/
-#define __BUILD_VERSION ""
+#define __BUILD_VERSION "Build 2601"
diff --git a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
index 3cd22d134..ea5f211e9 100644
--- a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
+++ b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
@@ -3,7 +3,7 @@
IFR is primarily consumed by the EFI presentation engine, and produced by EFI
internal application and drivers as well as all add-in card option-ROM drivers
- Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2013, 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
@@ -691,6 +691,7 @@ typedef union {
#define EFI_IFR_SECURITY_OP 0x60
#define EFI_IFR_MODAL_TAG_OP 0x61
#define EFI_IFR_REFRESH_ID_OP 0x62
+#define EFI_IFR_WARNING_IF_OP 0x63
typedef struct _EFI_IFR_OP_HEADER {
@@ -1015,6 +1016,12 @@ typedef struct _EFI_IFR_NO_SUBMIT_IF {
EFI_STRING_ID Error;
} EFI_IFR_NO_SUBMIT_IF;
+typedef struct _EFI_IFR_WARNING_IF {
+ EFI_IFR_OP_HEADER Header;
+ EFI_STRING_ID Warning;
+ UINT8 TimeOut;
+} EFI_IFR_WARNING_IF;
+
typedef struct _EFI_IFR_REFRESH {
EFI_IFR_OP_HEADER Header;
UINT8 RefreshInterval;
diff --git a/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp b/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
index 7cadf0f42..363ca82a2 100644
--- a/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
+++ b/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
@@ -1673,6 +1673,7 @@ static struct {
{ sizeof (EFI_IFR_SECURITY), 0 }, // EFI_IFR_SECURITY_OP - 0x60
{ sizeof (EFI_IFR_MODAL_TAG), 0}, // EFI_IFR_MODAL_TAG_OP - 0x61
{ sizeof (EFI_IFR_REFRESH_ID), 0}, // EFI_IFR_REFRESH_ID_OP - 0x62
+ { sizeof (EFI_IFR_WARNING_IF), 1}, // EFI_IFR_WARNING_IF_OP - 0x63
};
#ifdef CIFROBJ_DEUBG
@@ -1695,7 +1696,7 @@ static struct {
"EFI_IFR_STRING_REF1","EFI_IFR_STRING_REF2", "EFI_IFR_CONDITIONAL", "EFI_IFR_QUESTION_REF3", "EFI_IFR_ZERO", "EFI_IFR_ONE",
"EFI_IFR_ONES", "EFI_IFR_UNDEFINED", "EFI_IFR_LENGTH", "EFI_IFR_DUP", "EFI_IFR_THIS", "EFI_IFR_SPAN",
"EFI_IFR_VALUE", "EFI_IFR_DEFAULT", "EFI_IFR_DEFAULTSTORE", "EFI_IFR_FORM_MAP", "EFI_IFR_CATENATE", "EFI_IFR_GUID",
- "EFI_IFR_SECURITY", "EFI_IFR_MODAL_TAG", "EFI_IFR_REFRESH_ID",
+ "EFI_IFR_SECURITY", "EFI_IFR_MODAL_TAG", "EFI_IFR_REFRESH_ID", "EFI_IFR_WARNING_IF",
};
VOID
diff --git a/BaseTools/Source/C/VfrCompile/VfrFormPkg.h b/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
index 614471060..25280def9 100644
--- a/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
+++ b/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
@@ -1612,6 +1612,26 @@ public:
}
};
+class CIfrWarningIf : public CIfrObj, public CIfrOpHeader {
+private:
+ EFI_IFR_WARNING_IF *mWarningIf;
+
+public:
+ CIfrWarningIf () : CIfrObj (EFI_IFR_WARNING_IF_OP, (CHAR8 **)&mWarningIf),
+ CIfrOpHeader (EFI_IFR_WARNING_IF_OP, &mWarningIf->Header) {
+ mWarningIf->Warning = EFI_STRING_ID_INVALID;
+ mWarningIf->TimeOut = 0;
+ }
+
+ VOID SetWarning (IN EFI_STRING_ID Warning) {
+ mWarningIf->Warning = Warning;
+ }
+
+ VOID SetTimeOut (IN UINT8 TimeOut) {
+ mWarningIf->TimeOut = TimeOut;
+ }
+};
+
class CIfrNoSubmitIf : public CIfrObj, public CIfrOpHeader {
private:
EFI_IFR_NO_SUBMIT_IF *mNoSubmitIf;
diff --git a/BaseTools/Source/C/VfrCompile/VfrSyntax.g b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
index 253834508..61b68f5fb 100644
--- a/BaseTools/Source/C/VfrCompile/VfrSyntax.g
+++ b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
@@ -184,6 +184,7 @@ VfrParserStart (
#token Goto("goto") "goto"
#token FormSetGuid("formsetguid") "formsetguid"
#token InconsistentIf("inconsistentif") "inconsistentif"
+#token WarningIf("warningif") "warningif"
#token NoSubmitIf("nosubmitif") "nosubmitif"
#token EndIf("endif") "endif"
#token Key("key") "key"
@@ -2627,7 +2628,8 @@ vfrStatementQuestionTag :
vfrStatementRefresh |
vfrStatementVarstoreDevice |
vfrStatementExtension |
- vfrStatementRefreshEvent
+ vfrStatementRefreshEvent |
+ vfrStatementWarningIf
;
vfrStatementQuestionTagList :
@@ -2825,6 +2827,15 @@ vfrStatementNoSubmitIf :
E:EndIf << CRT_END_OP (E); >>
;
+vfrStatementWarningIf :
+ << CIfrWarningIf WIObj; >>
+ L:WarningIf << WIObj.SetLineNo(L->getLine()); >>
+ Prompt "=" "STRING_TOKEN" "\(" S:Number "\)" "," << WIObj.SetWarning (_STOSID(S->getText())); >>
+ {Timeout "=" T:Number "," << WIObj.SetTimeOut (_STOU8(T->getText())); >>}
+ vfrStatementExpression[0]
+ E:EndIf << CRT_END_OP (E); >>
+ ;
+
vfrStatementDisableIfQuest :
<<
CIfrDisableIf DIObj;