Defined 2 PCDs(Test4 & Test401) and 2 SKUs(DEFAULT & _), then set "SKUID_Defines" to ALL, for FixedAtBuild gEfiStructuredPcdPkgTokenSpaceGuid. Test401 in this case, its value should get from "Default" SKU, not from "_" SKU, but we does not set value in SKU "_" in dsc, so Test401 should only display the value get from dec.
Cc: Bob Feng <bob.c.f...@intel.com> Cc: Liming Gao <liming....@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux....@intel.com> --- BaseTools/Source/Python/Common/GlobalData.py | 2 +- BaseTools/Source/Python/Workspace/DscBuildData.py | 1 + BaseTools/Source/Python/build/BuildReport.py | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/Common/GlobalData.py b/BaseTools/Source/Python/Common/GlobalData.py index 5eaee06694..f117998b0b 100644 --- a/BaseTools/Source/Python/Common/GlobalData.py +++ b/BaseTools/Source/Python/Common/GlobalData.py @@ -103,7 +103,7 @@ MixedPcd = {} # Structure Pcd dict gStructurePcd = {} - +gPcdSkuOverrides={} # Pcd name for the Pcd which used in the Conditional directives gConditionalPcds = [] diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py index 233e530d5c..0ea1b1bb39 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -1525,6 +1525,7 @@ class DscBuildData(PlatformBuildClassObject): for stru_pcd in S_pcd_set.values(): for skuid in SkuIds: if skuid in stru_pcd.SkuOverrideValues: + GlobalData.gPcdSkuOverrides.update({(stru_pcd.TokenCName, stru_pcd.TokenSpaceGuidCName): stru_pcd.SkuOverrideValues}) continue nextskuid = self.SkuIdMgr.GetNextSkuId(skuid) NoDefault = False diff --git a/BaseTools/Source/Python/build/BuildReport.py b/BaseTools/Source/Python/build/BuildReport.py index e979611c26..9752a9c0d2 100644 --- a/BaseTools/Source/Python/build/BuildReport.py +++ b/BaseTools/Source/Python/build/BuildReport.py @@ -1295,7 +1295,10 @@ class PcdReport(object): FileWrite(File, ' %-*s : %6s %10s = %s' % (self.MaxLen, Flag + ' ' + PcdTokenCName, TypeName, '(' + Pcd.DatumType + ')', Value)) if IsStructure: FiledOverrideFlag = False - OverrideValues = Pcd.SkuOverrideValues + if (Pcd.TokenCName,Pcd.TokenSpaceGuidCName) in GlobalData.gPcdSkuOverrides: + OverrideValues = GlobalData.gPcdSkuOverrides[(Pcd.TokenCName,Pcd.TokenSpaceGuidCName)] + else: + OverrideValues = Pcd.SkuOverrideValues if OverrideValues: for Data in OverrideValues.values(): Struct = list(Data.values()) -- 2.14.1.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel