]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/GenFds/FdfParser.py
BaseTools: Structure Pcd in CommandLine.
[mirror_edk2.git] / BaseTools / Source / Python / GenFds / FdfParser.py
index 8f49f9faad7a4c7cd564ac260f82a9052c3aa3a0..0190be884a339fbe8b98720e596081a50f12513d 100644 (file)
@@ -2311,7 +2311,7 @@ class FdfParser:
                            "WRITE_DISABLED_CAP", "WRITE_STATUS", "READ_ENABLED_CAP", \\r
                            "READ_DISABLED_CAP", "READ_STATUS", "READ_LOCK_CAP", \\r
                            "READ_LOCK_STATUS", "WRITE_LOCK_CAP", "WRITE_LOCK_STATUS", \\r
-                           "WRITE_POLICY_RELIABLE", "WEAK_ALIGNMENT"):\r
+                           "WRITE_POLICY_RELIABLE", "WEAK_ALIGNMENT", "FvUsedSizeEnable"):\r
                 self.__UndoToken()\r
                 return False\r
 \r
@@ -2365,7 +2365,7 @@ class FdfParser:
 \r
     def __GetFvExtEntryStatement(self, FvObj):\r
 \r
-        if not self.__IsKeyword( "FV_EXT_ENTRY"):\r
+        if not (self.__IsKeyword( "FV_EXT_ENTRY") or self.__IsKeyword( "FV_EXT_ENTRY_TYPE")):\r
             return False\r
 \r
         if not self.__IsKeyword ("TYPE"):\r
@@ -2767,7 +2767,8 @@ class FdfParser:
         while True:\r
             AlignValue = None\r
             if self.__GetAlignment():\r
-                if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+                if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+                                        "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
                     raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
                 #For FFS, Auto is default option same to ""\r
                 if not self.__Token == "Auto":\r
@@ -2826,7 +2827,8 @@ class FdfParser:
             FfsFileObj.CheckSum = True\r
 \r
         if self.__GetAlignment():\r
-            if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+            if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+                                    "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
                 raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
             #For FFS, Auto is default option same to ""\r
             if not self.__Token == "Auto":\r
@@ -2897,7 +2899,8 @@ class FdfParser:
 \r
         AlignValue = None\r
         if self.__GetAlignment():\r
-            if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+            if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+                                    "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
                 raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
             AlignValue = self.__Token\r
 \r
@@ -3186,7 +3189,8 @@ class FdfParser:
 \r
         AlignValue = None\r
         if self.__GetAlignment():\r
-            if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+            if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+                                    "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
                 raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
             AlignValue = self.__Token\r
 \r
@@ -3777,7 +3781,8 @@ class FdfParser:
 \r
         AlignValue = ""\r
         if self.__GetAlignment():\r
-            if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+            if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+                                    "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
                 raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
             #For FFS, Auto is default option same to ""\r
             if not self.__Token == "Auto":\r
@@ -3826,7 +3831,8 @@ class FdfParser:
 \r
             SectAlignment = ""\r
             if self.__GetAlignment():\r
-                if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+                if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+                                        "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
                     raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
                 if self.__Token == 'Auto' and (not SectionName == 'PE32') and (not SectionName == 'TE'):\r
                     raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)\r
@@ -3905,7 +3911,8 @@ class FdfParser:
                 FvImageSectionObj.FvFileType = self.__Token\r
 \r
                 if self.__GetAlignment():\r
-                    if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+                    if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+                                            "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
                         raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
                     FvImageSectionObj.Alignment = self.__Token\r
 \r
@@ -3972,7 +3979,8 @@ class FdfParser:
                 EfiSectionObj.BuildNum = self.__Token\r
 \r
         if self.__GetAlignment():\r
-            if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):\r
+            if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",\r
+                                    "256K", "512K", "1M", "2M", "4M", "8M", "16M"):\r
                 raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)\r
             if self.__Token == 'Auto' and (not SectionName == 'PE32') and (not SectionName == 'TE'):\r
                 raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)\r