when driver link library and there have pcd override in DSC component
section, in the library autogen file, the pcd's size is incorrect, the
size value is from DSC [pcd] section, but not from the override pcd
value that in the [component] section.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
FixedAtBuildPcds = {} \r
ShareFixedAtBuildPcdsSameValue = {} \r
for Module in LibAuto._ReferenceModules: \r
FixedAtBuildPcds = {} \r
ShareFixedAtBuildPcdsSameValue = {} \r
for Module in LibAuto._ReferenceModules: \r
- for Pcd in Module.FixedAtBuildPcds + LibAuto.FixedAtBuildPcds:\r
+ for Pcd in Module.FixedAtBuildPcds:\r
key = ".".join((Pcd.TokenSpaceGuidCName,Pcd.TokenCName)) \r
if key not in FixedAtBuildPcds:\r
ShareFixedAtBuildPcdsSameValue[key] = True\r
key = ".".join((Pcd.TokenSpaceGuidCName,Pcd.TokenCName)) \r
if key not in FixedAtBuildPcds:\r
ShareFixedAtBuildPcdsSameValue[key] = True\r
if DscPcd.Type != "FixedAtBuild":\r
continue\r
if key in ShareFixedAtBuildPcdsSameValue and ShareFixedAtBuildPcdsSameValue[key]: \r
if DscPcd.Type != "FixedAtBuild":\r
continue\r
if key in ShareFixedAtBuildPcdsSameValue and ShareFixedAtBuildPcdsSameValue[key]: \r
- LibAuto.ConstPcd[key] = Pcd.DefaultValue\r
+ LibAuto.ConstPcd[key] = FixedAtBuildPcds[key]\r
\r
def CollectVariables(self, DynamicPcdSet):\r
\r
\r
def CollectVariables(self, DynamicPcdSet):\r
\r
## @file\r
# Routines for generating AutoGen.h and AutoGen.c\r
#\r
## @file\r
# Routines for generating AutoGen.h and AutoGen.c\r
#\r
-# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
ConstFixedPcd = False\r
if PcdItemType == TAB_PCDS_FIXED_AT_BUILD and (key in Info.ConstPcd or (Info.IsLibrary and not Info._ReferenceModules)):\r
ConstFixedPcd = True\r
ConstFixedPcd = False\r
if PcdItemType == TAB_PCDS_FIXED_AT_BUILD and (key in Info.ConstPcd or (Info.IsLibrary and not Info._ReferenceModules)):\r
ConstFixedPcd = True\r
+ if key in Info.ConstPcd:\r
+ Pcd.DefaultValue = Info.ConstPcd[key]\r
if Pcd.DatumType not in _NumericDataTypesList:\r
AutoGenH.Append('#define _PCD_VALUE_%s %s%s\n' %(TokenCName, Type, PcdVariableName))\r
else:\r
if Pcd.DatumType not in _NumericDataTypesList:\r
AutoGenH.Append('#define _PCD_VALUE_%s %s%s\n' %(TokenCName, Type, PcdVariableName))\r
else:\r