]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Common/FdfParserLite.py
BaseTools: extend FFS alignment to 16M
[mirror_edk2.git] / BaseTools / Source / Python / Common / FdfParserLite.py
index 8e68a67e44d8c8d5d03d95764f1bc064a2f9fe37..7d129bfcab5909d77e4bd81918e5beea89580f62 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # parse FDF file\r
 #\r
-#  Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>\r
+#  Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
 #\r
 #  This program and the accompanying materials\r
 #  are licensed and made available under the terms and conditions of the BSD License\r
@@ -2340,7 +2340,8 @@ class FdfParser(object):
         \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
@@ -2608,7 +2609,8 @@ class FdfParser(object):
         \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
@@ -2924,7 +2926,8 @@ class FdfParser(object):
             \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 At Line ", self.FileName, self.CurrentLineNumber)\r
             AlignValue = self.__Token\r
 \r
@@ -2988,7 +2991,8 @@ class FdfParser(object):
                 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 At Line ", 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
@@ -3062,7 +3066,8 @@ class FdfParser(object):
                 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 At Line ", self.FileName, self.CurrentLineNumber)\r
                     FvImageSectionObj.Alignment = self.__Token\r
                 \r
@@ -3129,7 +3134,8 @@ class FdfParser(object):
                 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