diff options
author | Yonghong Zhu <yonghong.zhu@intel.com> | 2017-09-20 14:10:04 +0800 |
---|---|---|
committer | Yonghong Zhu <yonghong.zhu@intel.com> | 2017-09-25 11:18:22 +0800 |
commit | e921f58d44587c77b843a6332b43f171a44b76cb (patch) | |
tree | 1d8a456c3a8da697e39bc755c26ed4e8ed8b8529 /BaseTools/Source/Python/Common/FdfParserLite.py | |
parent | 79777358cd5dbdbb267ebd02405584321292f06a (diff) | |
download | edk2-e921f58d44587c77b843a6332b43f171a44b76cb.tar.gz edk2-e921f58d44587c77b843a6332b43f171a44b76cb.tar.bz2 edk2-e921f58d44587c77b843a6332b43f171a44b76cb.zip |
BaseTools: extend FFS alignment to 16M
Current FFS only supports 64KiB alignment for data, Per PI 1.6
requirement, we extend FFS alignment to 16M.
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Common/FdfParserLite.py')
-rw-r--r-- | BaseTools/Source/Python/Common/FdfParserLite.py | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/BaseTools/Source/Python/Common/FdfParserLite.py b/BaseTools/Source/Python/Common/FdfParserLite.py index 8e68a67e44..7d129bfcab 100644 --- a/BaseTools/Source/Python/Common/FdfParserLite.py +++ b/BaseTools/Source/Python/Common/FdfParserLite.py @@ -1,7 +1,7 @@ ## @file
# parse FDF file
#
-# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2017, 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
@@ -2340,7 +2340,8 @@ class FdfParser(object): AlignValue = None
if self.__GetAlignment():
- if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",
+ "256K", "512K", "1M", "2M", "4M", "8M", "16M"):
raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
AlignValue = self.__Token
@@ -2608,7 +2609,8 @@ class FdfParser(object): AlignValue = None
if self.__GetAlignment():
- if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
+ if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",
+ "256K", "512K", "1M", "2M", "4M", "8M", "16M"):
raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
AlignValue = self.__Token
@@ -2924,7 +2926,8 @@ class FdfParser(object): AlignValue = ""
if self.__GetAlignment():
- if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",
+ "256K", "512K", "1M", "2M", "4M", "8M", "16M"):
raise Warning("Incorrect alignment At Line ", self.FileName, self.CurrentLineNumber)
AlignValue = self.__Token
@@ -2988,7 +2991,8 @@ class FdfParser(object): CheckSum = True
if self.__GetAlignment():
- if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",
+ "256K", "512K", "1M", "2M", "4M", "8M", "16M"):
raise Warning("Incorrect alignment At Line ", self.FileName, self.CurrentLineNumber)
if self.__Token == 'Auto' and (not SectionName == 'PE32') and (not SectionName == 'TE'):
raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)
@@ -3062,7 +3066,8 @@ class FdfParser(object): FvImageSectionObj.FvFileType = self.__Token
if self.__GetAlignment():
- if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
+ if self.__Token not in ("8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",
+ "256K", "512K", "1M", "2M", "4M", "8M", "16M"):
raise Warning("Incorrect alignment At Line ", self.FileName, self.CurrentLineNumber)
FvImageSectionObj.Alignment = self.__Token
@@ -3129,7 +3134,8 @@ class FdfParser(object): EfiSectionObj.BuildNum = self.__Token
if self.__GetAlignment():
- if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K"):
+ if self.__Token not in ("Auto", "8", "16", "32", "64", "128", "512", "1K", "4K", "32K" ,"64K", "128K",
+ "256K", "512K", "1M", "2M", "4M", "8M", "16M"):
raise Warning("Incorrect alignment '%s'" % self.__Token, self.FileName, self.CurrentLineNumber)
if self.__Token == 'Auto' and (not SectionName == 'PE32') and (not SectionName == 'TE'):
raise Warning("Auto alignment can only be used in PE32 or TE section ", self.FileName, self.CurrentLineNumber)
|