## @file\r
# process FV generation\r
#\r
-# Copyright (c) 2007 - 2016, 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
self.CapsuleName = None\r
self.FvBaseAddress = None\r
self.FvForceRebase = None\r
+ self.FvRegionInFD = None\r
\r
## AddToBuffer()\r
#\r
"""Modify images from build output if the feature of loading driver at fixed address is on."""\r
if GenFdsGlobalVariable.FixedLoadAddress:\r
GenFds.PreprocessImage(BuildWorkSpace, GenFdsGlobalVariable.ActivePlatform)\r
+\r
+ # Record the FV Region info that may specific in the FD\r
+ if FdfParserObj.Profile.FvDict and FdfParserObj.Profile.FdDict:\r
+ for Fv in FdfParserObj.Profile.FvDict:\r
+ FvObj = FdfParserObj.Profile.FvDict[Fv]\r
+ for Fd in FdfParserObj.Profile.FdDict:\r
+ FdObj = FdfParserObj.Profile.FdDict[Fd]\r
+ for RegionObj in FdObj.RegionList:\r
+ if RegionObj.RegionType != 'FV':\r
+ continue\r
+ for RegionData in RegionObj.RegionDataList:\r
+ if FvObj.UiFvName.upper() == RegionData.upper():\r
+ if FvObj.FvRegionInFD:\r
+ if FvObj.FvRegionInFD != RegionObj.Size:\r
+ EdkLogger.error("GenFds", FORMAT_INVALID, "The FV %s's region is specified in multiple FD with different value." %FvObj.UiFvName)\r
+ else:\r
+ FvObj.FvRegionInFD = RegionObj.Size\r
+ RegionObj.BlockInfoOfRegion(FdObj.BlockSizeList, FvObj)\r
+\r
"""Call GenFds"""\r
GenFds.GenFd('', FdfParserObj, BuildWorkSpace, ArchList)\r
\r