|
From: <yi...@us...> - 2013-06-17 06:39:54
|
Revision: 2584
http://sourceforge.net/p/edk2-buildtools/code/2584
Author: yingke
Date: 2013-06-17 06:39:51 +0000 (Mon, 17 Jun 2013)
Log Message:
-----------
Generate an error if a region described within an [FD] section will not fit within the FD section Size.
Signed-off-by: Garrett Kirkendall <gar...@am...>
Reviewed-by: Jordan Justen <jor...@in...>
Reviewed-by: Liu Yingke <yin...@in...>
Modified Paths:
--------------
trunk/BaseTools/Source/Python/GenFds/Fd.py
Modified: trunk/BaseTools/Source/Python/GenFds/Fd.py
===================================================================
--- trunk/BaseTools/Source/Python/GenFds/Fd.py 2013-06-06 08:51:28 UTC (rev 2583)
+++ trunk/BaseTools/Source/Python/GenFds/Fd.py 2013-06-17 06:39:51 UTC (rev 2584)
@@ -113,10 +113,15 @@
PreviousRegionStart = RegionObj.Offset
PreviousRegionSize = RegionObj.Size
#
+ # Verify current region fits within allocated FD section Size
+ #
+ if PreviousRegionStart + PreviousRegionSize > self.Size:
+ EdkLogger.error("GenFds", GENFDS_ERROR,
+ 'FD %s size too small to fit region with offset 0x%X and size 0x%X'
+ % (self.FdUiName, PreviousRegionStart, PreviousRegionSize))
+ #
# Call each region's AddToBuffer function
#
- if PreviousRegionSize > self.Size:
- EdkLogger.error("GenFds", GENFDS_ERROR, 'FD %s size too small' % self.FdUiName)
GenFdsGlobalVariable.VerboseLogger('Call each region\'s AddToBuffer function')
RegionObj.AddToBuffer (FdBuffer, self.BaseAddress, self.BlockSizeList, self.ErasePolarity, GenFds.ImageBinDict, self.vtfRawDict, self.DefineVarDict)
#
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|