summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen/AutoGen.py
diff options
context:
space:
mode:
authorBobCF <bob.c.feng@intel.com>2018-03-02 18:11:13 +0800
committerLiming Gao <liming.gao@intel.com>2018-03-03 12:40:39 +0800
commitb854e2bf752940b8d4dd3a569942d9c07b5d498f (patch)
tree98e5372765319bcd830bf5842a517a364f5e07e3 /BaseTools/Source/Python/AutoGen/AutoGen.py
parent0537f332c968e6c3adeefa2222b5f1aa7252b711 (diff)
downloadedk2-b854e2bf752940b8d4dd3a569942d9c07b5d498f.tar.gz
edk2-b854e2bf752940b8d4dd3a569942d9c07b5d498f.tar.bz2
edk2-b854e2bf752940b8d4dd3a569942d9c07b5d498f.zip
BaseTools: Fixed Pcd value override issue.
1. Handle the Pcd maxsize issue for the case that the length of Pcd value from CommandLine bigger that its maxsize 2. The Pcd value override in commandline. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/AutoGen.py')
-rw-r--r--BaseTools/Source/Python/AutoGen/AutoGen.py26
1 files changed, 0 insertions, 26 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/Python/AutoGen/AutoGen.py
index e2589cfbae..439e360955 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -1368,27 +1368,6 @@ class PlatformAutoGen(AutoGen):
# This interface should be invoked explicitly when platform action is created.
#
def CollectPlatformDynamicPcds(self):
- # Override the platform Pcd's value by build option
- if GlobalData.BuildOptionPcd:
- for PcdItem in GlobalData.BuildOptionPcd:
- PlatformPcd = self.Platform.Pcds.get((PcdItem[1],PcdItem[0]))
- if PlatformPcd:
- if PlatformPcd.DatumType in [TAB_UINT8, TAB_UINT16, TAB_UINT32, TAB_UINT64,'BOOLEAN']:
- for sku in PlatformPcd.SkuInfoList:
- PlatformPcd.SkuInfoList[sku].DefaultValue = PcdItem[2]
- else:
- PcdDefaultValue = StringToArray(PcdItem[2])
- for sku in PlatformPcd.SkuInfoList:
- skuinfo = PlatformPcd.SkuInfoList[sku]
- if skuinfo.VariableGuid:
- skuinfo.HiiDefaultValue = PcdDefaultValue
- else:
- skuinfo.DefaultValue = PcdDefaultValue
- PlatformPcd.DefaultValue = PcdDefaultValue
- if PlatformPcd.MaxDatumSize:
- PlatformPcd.MaxDatumSize = str(max([int(PlatformPcd.MaxDatumSize),len(PcdDefaultValue.split(","))]))
- else:
- PlatformPcd.MaxDatumSize = str(len(PcdDefaultValue.split(",")))
for key in self.Platform.Pcds:
for SinglePcd in GlobalData.MixedPcd:
@@ -2373,11 +2352,6 @@ class PlatformAutoGen(AutoGen):
TokenCName = PcdItem[0]
break
if FromPcd != None:
- if GlobalData.BuildOptionPcd:
- for pcd in GlobalData.BuildOptionPcd:
- if (FromPcd.TokenSpaceGuidCName, FromPcd.TokenCName) == (pcd[0], pcd[1]):
- FromPcd.DefaultValue = pcd[2]
- break
if ToPcd.Pending and FromPcd.Type not in [None, '']:
ToPcd.Type = FromPcd.Type
elif (ToPcd.Type not in [None, '']) and (FromPcd.Type not in [None, ''])\