summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/GenFds/FfsInfStatement.py
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2017-09-20 14:10:04 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2017-09-25 11:18:22 +0800
commite921f58d44587c77b843a6332b43f171a44b76cb (patch)
tree1d8a456c3a8da697e39bc755c26ed4e8ed8b8529 /BaseTools/Source/Python/GenFds/FfsInfStatement.py
parent79777358cd5dbdbb267ebd02405584321292f06a (diff)
downloadedk2-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/GenFds/FfsInfStatement.py')
-rw-r--r--BaseTools/Source/Python/GenFds/FfsInfStatement.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/GenFds/FfsInfStatement.py b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
index c61c227c99..958cecfad6 100644
--- a/BaseTools/Source/Python/GenFds/FfsInfStatement.py
+++ b/BaseTools/Source/Python/GenFds/FfsInfStatement.py
@@ -1,7 +1,7 @@
## @file
# process FFS generation from INF statement
#
-# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2014-2016 Hewlett-Packard Development Company, L.P.<BR>
#
# This program and the accompanying materials
@@ -731,8 +731,10 @@ class FfsInfStatement(FfsInfStatementClassObject):
ImageObj = PeImageClass (File)
if ImageObj.SectionAlignment < 0x400:
self.Alignment = str (ImageObj.SectionAlignment)
- else:
+ elif ImageObj.SectionAlignment < 0x100000:
self.Alignment = str (ImageObj.SectionAlignment / 0x400) + 'K'
+ else:
+ self.Alignment = str (ImageObj.SectionAlignment / 0x100000) + 'M'
if not NoStrip:
FileBeforeStrip = os.path.join(self.OutputPath, ModuleName + '.reloc')
@@ -770,8 +772,10 @@ class FfsInfStatement(FfsInfStatementClassObject):
ImageObj = PeImageClass (GenSecInputFile)
if ImageObj.SectionAlignment < 0x400:
self.Alignment = str (ImageObj.SectionAlignment)
- else:
+ elif ImageObj.SectionAlignment < 0x100000:
self.Alignment = str (ImageObj.SectionAlignment / 0x400) + 'K'
+ else:
+ self.Alignment = str (ImageObj.SectionAlignment / 0x100000) + 'M'
if not NoStrip:
FileBeforeStrip = os.path.join(self.OutputPath, ModuleName + '.reloc')