summaryrefslogtreecommitdiffstats
path: root/BaseTools
diff options
context:
space:
mode:
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-08 07:50:04 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-06-08 07:50:04 +0000
commit5b127d7565ba66a9dc8502938f3efd2a131946ff (patch)
tree3055331118a092ca2429f41912cbf63aa5b71085 /BaseTools
parentdfc66bb938684d029230f0494687f80e9308621e (diff)
downloadedk2-5b127d7565ba66a9dc8502938f3efd2a131946ff.tar.gz
edk2-5b127d7565ba66a9dc8502938f3efd2a131946ff.tar.bz2
edk2-5b127d7565ba66a9dc8502938f3efd2a131946ff.zip
Add new “Modal form” opcode.
Signed-off-by: ydong10 Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11766 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h5
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp3
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrFormPkg.h10
-rw-r--r--BaseTools/Source/C/VfrCompile/VfrSyntax.g17
4 files changed, 32 insertions, 3 deletions
diff --git a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
index 61fc191618..282eb150c7 100644
--- a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
+++ b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
@@ -681,6 +681,7 @@ typedef union {
#define EFI_IFR_CATENATE_OP 0x5E
#define EFI_IFR_GUID_OP 0x5F
#define EFI_IFR_SECURITY_OP 0x60
+#define EFI_IFR_MODAL_TAG_OP 0x61
typedef struct _EFI_IFR_OP_HEADER {
@@ -771,6 +772,10 @@ typedef struct _EFI_IFR_IMAGE {
EFI_IMAGE_ID Id;
} EFI_IFR_IMAGE;
+typedef struct _EFI_IFR_MODAL {
+ EFI_IFR_OP_HEADER Header;
+} EFI_IFR_MODAL;
+
typedef struct _EFI_IFR_LOCKED {
EFI_IFR_OP_HEADER Header;
} EFI_IFR_LOCKED;
diff --git a/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp b/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
index 571af91b0a..3c82b53c79 100644
--- a/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
+++ b/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
@@ -1305,6 +1305,7 @@ static struct {
{ sizeof (EFI_IFR_CATENATE), 0 }, // EFI_IFR_CATENATE_OP
{ sizeof (EFI_IFR_GUID), 0 }, // EFI_IFR_GUID_OP
{ sizeof (EFI_IFR_SECURITY), 0 }, // EFI_IFR_SECURITY_OP - 0x60
+ { sizeof (EFI_IFR_MODAL), 0}, // EFI_IFR_MODAL_OP - 0x61
};
#ifdef CIFROBJ_DEUBG
@@ -1327,7 +1328,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_SECURITY", "EFI_IFR_MODAL",
};
VOID
diff --git a/BaseTools/Source/C/VfrCompile/VfrFormPkg.h b/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
index 4cdd1cc5db..543852108f 100644
--- a/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
+++ b/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
@@ -809,6 +809,16 @@ public:
}
};
+class CIfrModal : public CIfrObj, public CIfrOpHeader {
+private:
+ EFI_IFR_MODAL *mModal;
+
+public:
+ CIfrModal () : CIfrObj (EFI_IFR_MODAL_TAG_OP, (CHAR8 **)&mModal),
+ CIfrOpHeader (EFI_IFR_MODAL_TAG_OP, &mModal->Header) {
+ }
+};
+
class CIfrLocked : public CIfrObj, public CIfrOpHeader {
private:
EFI_IFR_LOCKED *mLocked;
diff --git a/BaseTools/Source/C/VfrCompile/VfrSyntax.g b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
index 02a7b5c1f4..df09e9b655 100644
--- a/BaseTools/Source/C/VfrCompile/VfrSyntax.g
+++ b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
@@ -237,6 +237,7 @@ VfrParserStart (
#token EndGuidOp("endguidop") "endguidop"
#token DataType("datatype") "datatype"
#token Data("data") "data"
+#token Modal("modal") "modal"
//
// Define the class and subclass tokens
@@ -1251,7 +1252,8 @@ vfrFormDefinition :
vfrStatementBanner |
// Just for framework vfr compatibility
vfrStatementInvalid |
- vfrStatementExtension
+ vfrStatementExtension |
+ vfrStatementModal
)*
E:EndForm <<
if (mCompatibleMode) {
@@ -1310,7 +1312,8 @@ vfrFormMapDefinition :
vfrStatementConditional |
vfrStatementLabel |
vfrStatementBanner |
- vfrStatementExtension
+ vfrStatementExtension |
+ vfrStatementModal
)*
E:EndForm << CRT_END_OP (E); >>
";"
@@ -2490,6 +2493,11 @@ vfrLockedTag :
L:Locked << LObj.SetLineNo(L->getLine()); >>
;
+vfrModalTag :
+ << CIfrModal MObj; >>
+ L:Modal << MObj.SetLineNo(L->getLine()); >>
+ ;
+
vfrStatementStatTag :
vfrImageTag |
vfrLockedTag
@@ -2504,6 +2512,11 @@ vfrStatementImage :
";"
;
+vfrStatementModal :
+ vfrModalTag
+ ";"
+ ;
+
vfrStatementLocked :
vfrLockedTag
";"