From: "Zeng, Star" <star.zeng@intel.com>
To: "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Cc: "Kinney, Michael D" <michael.d.kinney@intel.com>,
"Gao, Liming" <liming.gao@intel.com>,
"Zhu, Yonghong" <yonghong.zhu@intel.com>,
"Zeng, Star" <star.zeng@intel.com>
Subject: Re: [RFC 0/2] PCD: Extended SKU support 2 - sub SKU
Date: Mon, 15 May 2017 10:00:51 +0000 [thread overview]
Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B8B398A@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1493124500-19000-1-git-send-email-star.zeng@intel.com>
Hi,
The development will be done on a staging branch if there is no any comments in the following week.
Anyway, feedback still can be provided during the development on the staging branch and merging to master finally. :)
Thanks,
Star
-----Original Message-----
From: Zeng, Star
Sent: Tuesday, April 25, 2017 8:48 PM
To: edk2-devel@lists.01.org
Cc: Zeng, Star <star.zeng@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming <liming.gao@intel.com>; Zhu, Yonghong <yonghong.zhu@intel.com>
Subject: [RFC 0/2] PCD: Extended SKU support 2 - sub SKU
- Requirement
Simplify the PCDs configuring for multiple SKUs in DSC.
- Current limitation
There is no sub SKU support for now. The PCD statements for different platform components need to be centralized for different SKUs, and the relationship between different SKUs is hard to build, then it is also hard to maintain the PCD values(configuring new PCD value or updating PCD value) for different SKUs.
- Proposal: Support sub SKU set and combinations of them.
This proposal depends on the proposal “PCD: Extended SKU support 1 - inheritance” at https://lists.01.org/pipermail/edk2-devel/2017-April/010194.html.
This proposal only extends DSC [SkuIds] section syntax.
BaseTools update is needed to support the syntax extension, and no any change in PCD database and driver is required.
DSC syntax:
[SkuIds]
SubSkuSetName|SubSkuName[|ParentSubSkuName]
SubSkuSetName: string or 0, 0 is reserved for DEFAULT SKU, string means it is sub SKU set name.
SubSkuName: string
ParentSubSkuName: string, optional, defines which sub SKU the PCD value will derive from for this sub SKU. The PCD value will derive from DEFAULT SKU for this sub SKU if ParentSubSkuName is absent.
There could be multiple SubSku entries with different SubSkuSetName.
There could be multiple SubSku entries with same SubSkuSetName and different SubSkuName.
ComboName | (SubSkuSetName1 or SubSkuName1, SubSkuSetName2 or SubSkuName2, ...)
There could be multiple Combo entries for different boards.
SKUID_IDENTIFIER in [Defines] section could be DEFAULT, ALL, or combo name if sub SKU and Combo are specified in [Skuids] section.
PcdLib.h:
// Retrieves sub SKU value based on Combo name and sub SKU name.
// This definition is for platform PEIM to easily get the hidden sub SKU values in the Combo.
// BaseTools can make sure the unique of platform SKU value that can be calculated by adding up sub SKU values in the Combo.
#define PcdSubSkuValueInCombo (ComboName, SubSkuName) _PCD_SUB_SKU_##ComboName_##SubSkuName
AutoGen.h:
Macros for _PCD_SUB_SKU_##ComboName_##SubSkuName will be generated in AutoGen.h based on the statements in [SkuIds] section of dsc.
- Example:
Without sub SKU support:
Check the example at [RFC 1/2] Example: The PCDs configuring for multiple SKUs with current SKU usage
With sub SKU support:
Check the example at [RFC 2/2] Example: The PCDs configuring for multiple SKUs with sub SKU support
Pseudo-code for platform to set SKU with sub SKU support:
Note: The Combo and CPU/CS/FRU identifying should be hardware detection.
UINTN CpuSkuV;
UINTN CsSkuV;
UINTN FruSkuV;
UINTN PlatformSku;
if (Combo1) {
if (CpuA) {
CpuSkuV = PcdSubSkuValueInCombo(Combo1, CpuSkuA);
} else if (CpuB) {
CpuSkuV = PcdSubSkuValueInCombo(Combo1, CpuSkuB);
}
// Similar logic to get CsSkuV and FruSkuV.
// Calculate the platform SKU.
PlatformSku = CpuSkuV + CsSkuV + FruSkuV
} else …
LibPcdSetSku (PlatformSku);
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Star Zeng (2):
Example: The PCDs configuring for multiple SKUs with current SKU usage
Example: The PCDs configuring for multiple SKUs with sub SKU support
Nt32Pkg/Nt32Pkg.dec | 9 +++++++++
Nt32Pkg/Nt32Pkg.dsc | 41 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 50 insertions(+)
--
2.7.0.windows.1
prev parent reply other threads:[~2017-05-15 10:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-25 12:48 [RFC 0/2] PCD: Extended SKU support 2 - sub SKU Star Zeng
2017-04-25 12:48 ` [RFC 1/2] Example: The PCDs configuring for multiple SKUs with current SKU usage Star Zeng
2017-04-25 12:48 ` [RFC 2/2] Example: The PCDs configuring for multiple SKUs with sub SKU support Star Zeng
2017-05-15 10:00 ` Zeng, Star [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0C09AFA07DD0434D9E2A0C6AEB0483103B8B398A@shsmsx102.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox