Star -- This assumes that the SKU ID is only used for PCDs, which is not the case. The SKU ID may be used by other components, and other components may use the 0|DEFAULT rule as well.
1) There is no way to read this defaulting rule at runtime. The information is buried in the PCD database, but not available externally. 2) There is no way to read the contents of SKUID_IDENTIFIER when multiple SKUs are specified. While more than one SKU can be specified (separated by spaces), there is no way to pass multiple values into build.exe today, nor is there any way to identify which SKUs (out of the total list of SKUs) is supported on one build at runtime. Tim -----Original Message----- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Zeng, Star Sent: Tuesday, April 25, 2017 5:40 AM To: edk2-devel@lists.01.org Cc: Kinney, Michael D <michael.d.kin...@intel.com>; Zeng, Star <star.z...@intel.com>; Gao, Liming <liming....@intel.com> Subject: [edk2] [RFC] PCD: Extended SKU support 1 - inheritance - Requirement Simplify the PCDs configuring for multiple SKUs in DSC. - Current limitation Non-DEFAULT SKU could only derive from DEFAULT SKU, but could not derive from another non-DEFAULT SKU. For example below, SkuA and SkuB could only derive from DEFAULT, but SkuB could not derive from SkuA. [SkuIds] 0 | DEFAULT 1 | SkuA 2 | SkuB - Proposal: One non-DEFAULT SKU could be a derivative of another non-DEFAULT SKU. This proposal only extends DSC [SkuIds] section syntax and the extension is optional. This proposal keeps the backward compatibility with current SKU usage. BaseTools update is needed to support the syntax extension, and no any change in PCD database and driver is required. DSC syntax: [SkuIds] SkuValue|SkuName[|ParentSkuName] SkuValue: integer, 0 is reserved for DEFAULT SKU. SkuName: string ParentSkuName: string, optional, it is new introduced in this proposal and defines which SKU the PCD value will derive from for this SKU. The PCD value will derive from DEFAULT SKU for this SKU if the ParentSkuName is absent. - Example: SkuB is a derivative of SkuA, but not a derivative of DEFAULT. [SkuIds] 0 | DEFAULT 1 | SkuA 2 | SkuB | SkuA [PcdsDynamicDefault.Common.DEFAULT] gXXXPkgTokenSpaceGuid.PcdXXXSignature|"DEFAULT" gXXXPkgTokenSpaceGuid.PcdXXXConfig1|FALSE gXXXPkgTokenSpaceGuid.PcdXXXConfig2|FALSE gXXXPkgTokenSpaceGuid.PcdXXXConfig3|FALSE [PcdsDynamicDefault.Common.SkuA] gXXXPkgTokenSpaceGuid.PcdXXXSignature|"SkuA" gXXXPkgTokenSpaceGuid.PcdXXXConfig1|TRUE gXXXPkgTokenSpaceGuid.PcdXXXConfig2|TRUE # No need statement for PcdXXXConfig3 whose value will derive from DEFAULT SKU and be FLASE. [PcdsDynamicDefault.Common.SkuB] gXXXPkgTokenSpaceGuid.PcdXXXSignature|" SkuB" # No need statement for PcdXXXConfig1 and PcdXXXConfig2 whose values will derive from SkuA SKU and be TRUE. gXXXPkgTokenSpaceGuid.PcdXXXConfig3|TRUE _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel