self._FixedAtBuildPcds = []\r
self.ConstPcd = {}\r
\r
+ ##Store the VOID* type FixedAtBuild Pcds\r
+ #\r
+ self._FixedPcdVoidTypeDict = {}\r
+\r
def __repr__(self):\r
return "%s [%s]" % (self.MetaFile, self.Arch)\r
\r
\r
return self._FixedAtBuildPcds\r
\r
+ def _GetFixedAtBuildVoidTypePcds(self):\r
+ if self._FixedPcdVoidTypeDict:\r
+ return self._FixedPcdVoidTypeDict\r
+ for Pcd in self.ModulePcdList:\r
+ if Pcd.Type == TAB_PCDS_FIXED_AT_BUILD and Pcd.DatumType == TAB_VOID:\r
+ if '{}.{}'.format(Pcd.TokenSpaceGuidCName, Pcd.TokenCName) not in self._FixedPcdVoidTypeDict:\r
+ self._FixedPcdVoidTypeDict['{}.{}'.format(Pcd.TokenSpaceGuidCName, Pcd.TokenCName)] = Pcd.DefaultValue\r
+ return self._FixedPcdVoidTypeDict\r
+\r
def _GetUniqueBaseName(self):\r
BaseName = self.Name\r
for Module in self.PlatformInfo.ModuleAutoGenList:\r
return self._DepexDict\r
\r
self._DepexDict[self.ModuleType] = []\r
-\r
+ self._GetFixedAtBuildVoidTypePcds()\r
for ModuleType in self._DepexDict:\r
DepexList = self._DepexDict[ModuleType]\r
#\r
if DepexList != []:\r
DepexList.append('AND')\r
DepexList.append('(')\r
- DepexList.extend(D)\r
+ #replace D with value if D is FixedAtBuild PCD\r
+ NewList = []\r
+ for item in D:\r
+ if '.' not in item:\r
+ NewList.append(item)\r
+ else:\r
+ if item not in self._FixedPcdVoidTypeDict:\r
+ EdkLogger.error("build", FORMAT_INVALID, "{} used in [Depex] section should be used as FixedAtBuild type and VOID* datum type in the module.".format(item))\r
+ else:\r
+ Value = self._FixedPcdVoidTypeDict[item]\r
+ if len(Value.split(',')) != 16:\r
+ EdkLogger.error("build", FORMAT_INVALID,\r
+ "{} used in [Depex] section should be used as FixedAtBuild type and VOID* datum type and 16 bytes in the module.".format(item))\r
+ NewList.append(Value)\r
+ DepexList.extend(NewList)\r
if DepexList[-1] == 'END': # no need of a END at this time\r
DepexList.pop()\r
DepexList.append(')')\r
\r
FixedAtBuildPcds = property(_GetFixedAtBuildPcds)\r
UniqueBaseName = property(_GetUniqueBaseName)\r
+ FixedVoidTypePcds = property(_GetFixedAtBuildVoidTypePcds)\r
\r
# This acts like the main() function for the script, unless it is 'import'ed into another script.\r
if __name__ == '__main__':\r