Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <[email protected]>
---
 .../C/Include/Common/UefiInternalFormRepresentation.h   |  6 ++++++
 BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp            |  3 ++-
 BaseTools/Source/C/VfrCompile/VfrFormPkg.h              | 17 ++++++++++++++++-
 BaseTools/Source/C/VfrCompile/VfrSyntax.g               | 16 ++++++++++++++++
 4 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h 
b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
index 2da3f54..d17b633 100644
--- a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
+++ b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h
@@ -688,10 +688,11 @@ typedef union {
 #define EFI_IFR_GUID_OP                0x5F
 #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
+#define EFI_IFR_MATCH2_OP              0x64
 
 
 typedef struct _EFI_IFR_OP_HEADER {
   UINT8                    OpCode;
   UINT8                    Length:7;
@@ -1266,10 +1267,15 @@ typedef struct _EFI_IFR_LESS_THAN {
 
 typedef struct _EFI_IFR_MATCH {
   EFI_IFR_OP_HEADER        Header;
 } EFI_IFR_MATCH;
 
+typedef struct _EFI_IFR_MATCH2 {
+  EFI_IFR_OP_HEADER        Header;
+  EFI_GUID                 SyntaxType;
+} EFI_IFR_MATCH2;
+
 typedef struct _EFI_IFR_MULTIPLY {
   EFI_IFR_OP_HEADER        Header;
 } EFI_IFR_MULTIPLY;
 
 typedef struct _EFI_IFR_MODULO {
diff --git a/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp 
b/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
index 376a454..1612217 100644
--- a/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
+++ b/BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp
@@ -1661,10 +1661,11 @@ static struct {
   { sizeof (EFI_IFR_GUID), 0 },                // EFI_IFR_GUID_OP
   { 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
+  { sizeof (EFI_IFR_MATCH2), 0 },              // EFI_IFR_MATCH2_OP - 0x64
 };
 
 #ifdef CIFROBJ_DEUBG
 static struct {
   CHAR8 *mIfrName;
@@ -1683,11 +1684,11 @@ static struct {
   "EFI_IFR_UINT8",      "EFI_IFR_UINT16",               "EFI_IFR_UINT32",      
  "EFI_IFR_UINT64",          "EFI_IFR_TRUE",          "EFI_IFR_FALSE",
   "EFI_IFR_TO_UINT",    "EFI_IFR_TO_STRING",            "EFI_IFR_TO_BOOLEAN",  
  "EFI_IFR_MID",             "EFI_IFR_FIND",          "EFI_IFR_TOKEN",
   "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_WARNING_IF",
+  "EFI_IFR_SECURITY",   "EFI_IFR_MODAL_TAG",            "EFI_IFR_REFRESH_ID",  
  "EFI_IFR_WARNING_IF",      "EFI_IFR_MATCH2",
 };
 
 VOID
 CIFROBJ_DEBUG_PRINT (
   IN UINT8 OpCode
diff --git a/BaseTools/Source/C/VfrCompile/VfrFormPkg.h 
b/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
index 3d2def8..efe0ef5 100644
--- a/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
+++ b/BaseTools/Source/C/VfrCompile/VfrFormPkg.h
@@ -1,10 +1,10 @@
 /** @file
   
   The definition of CFormPkg's member function
 
-Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2015, 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 distribution.  The full text of the license may be 
found at        
 http://opensource.org/licenses/bsd-license.php                                 
           
                                                                                
           
@@ -2652,10 +2652,25 @@ public:
       CIfrOpHeader (EFI_IFR_MATCH_OP, &mMatch->Header) {
     SetLineNo (LineNo);
   }
 };
 
+class CIfrMatch2 : public CIfrObj, public CIfrOpHeader {
+private:
+  EFI_IFR_MATCH2 *mMatch2;
+
+public:
+  CIfrMatch2 (
+  IN UINT32   LineNo,
+  IN EFI_GUID *Guid
+  ) : CIfrObj (EFI_IFR_MATCH2_OP, (CHAR8 **)&mMatch2),
+      CIfrOpHeader (EFI_IFR_MATCH2_OP, &mMatch2->Header) {
+    SetLineNo (LineNo);
+    memmove (&mMatch2->SyntaxType, Guid, sizeof (EFI_GUID));
+  }
+};
+
 class CIfrMultiply : public CIfrObj, public CIfrOpHeader {
 private:
   EFI_IFR_MULTIPLY *mMultiply;
 
 public:
diff --git a/BaseTools/Source/C/VfrCompile/VfrSyntax.g 
b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
index 2255d6f..a125d6d 100644
--- a/BaseTools/Source/C/VfrCompile/VfrSyntax.g
+++ b/BaseTools/Source/C/VfrCompile/VfrSyntax.g
@@ -3253,10 +3253,11 @@ vfrStatementInvalidSaveRestoreDefaults :
 #token StringVal("stringval")                   "stringval"
 #token UnIntVal("unintval")                     "unintval"
 #token ToUpper("toupper")                       "toupper"
 #token ToLower("tolower")                       "tolower"
 #token Match("match")                           "match"
+#token Match2("match2")                         "match2"
 #token Catenate("catenate")                     "catenate"
 #token QuestionRefVal("questionrefval")         "questionrefval"
 #token StringRefVal("stringrefval")             "stringrefval"
 #token Map("map")                               "map"
 #token RefreshGuid("refreshguid")               "refreshguid"
@@ -3421,10 +3422,11 @@ castTerm [UINT32 & RootLevel, UINT32 & ExpOpCount]:
   ;
 
 atomTerm [UINT32 & RootLevel, UINT32 & ExpOpCount]:
     vfrExpressionCatenate[$RootLevel, $ExpOpCount]
   | vfrExpressionMatch[$RootLevel, $ExpOpCount]
+  | vfrExpressionMatch2[$RootLevel, $ExpOpCount]
   | vfrExpressionParen[$RootLevel, $ExpOpCount]
   | vfrExpressionBuildInFunction[$RootLevel, $ExpOpCount]
   | vfrExpressionConstant[$RootLevel, $ExpOpCount]
   | vfrExpressionUnaryOp[$RootLevel, $ExpOpCount]
   | vfrExpressionTernaryOp[$RootLevel, $ExpOpCount]
@@ -3451,10 +3453,24 @@ vfrExpressionMatch [UINT32 & RootLevel, UINT32 & 
ExpOpCount]:
   ","
   vfrStatementExpressionSub[$RootLevel + 1, $ExpOpCount]
   "\)"                                                 << { CIfrMatch 
MObj(L->getLine()); $ExpOpCount++; } >>
   ;
 
+vfrExpressionMatch2 [UINT32 & RootLevel, UINT32 & ExpOpCount]:
+  <<
+    EFI_GUID      Guid;
+  >>
+  L:Match2
+  "\("
+  vfrStatementExpressionSub[$RootLevel + 1, $ExpOpCount]
+  ","
+  vfrStatementExpressionSub[$RootLevel + 1, $ExpOpCount]
+  ","
+  guidDefinition[Guid]
+  "\)"                                                 << { CIfrMatch2 
M2Obj(L->getLine(), &Guid); $ExpOpCount++; } >>
+  ;
+
 vfrExpressionParen [UINT32 & RootLevel, UINT32 & ExpOpCount]:
   "\("
   vfrStatementExpressionSub[$RootLevel + 1, $ExpOpCount]
   "\)"
   ;
-- 
1.9.5.msysgit.1


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to