public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [RFC 0/2] PCD: Extended SKU support 2 - sub SKU
@ 2017-04-25 12:48 Star Zeng
  2017-04-25 12:48 ` [RFC 1/2] Example: The PCDs configuring for multiple SKUs with current SKU usage Star Zeng
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Star Zeng @ 2017-04-25 12:48 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Michael Kinney, Liming Gao, Yonghong Zhu

- 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



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [RFC 1/2] Example: The PCDs configuring for multiple SKUs with current SKU usage
  2017-04-25 12:48 [RFC 0/2] PCD: Extended SKU support 2 - sub SKU Star Zeng
@ 2017-04-25 12:48 ` 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 ` [RFC 0/2] PCD: Extended SKU support 2 - sub SKU Zeng, Star
  2 siblings, 0 replies; 4+ messages in thread
From: Star Zeng @ 2017-04-25 12:48 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng

---
 Nt32Pkg/Nt32Pkg.dec |   9 ++++
 Nt32Pkg/Nt32Pkg.dsc | 125 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 134 insertions(+)

diff --git a/Nt32Pkg/Nt32Pkg.dec b/Nt32Pkg/Nt32Pkg.dec
index 06da067bc1d9..7b330359c5d2 100644
--- a/Nt32Pkg/Nt32Pkg.dec
+++ b/Nt32Pkg/Nt32Pkg.dec
@@ -93,4 +93,13 @@ [PcdsDynamic, PcdsDynamicEx]
   gEfiNt32PkgTokenSpaceGuid.PcdWinNtMemorySize|L"64!64"|VOID*|0x00001005
   gEfiNt32PkgTokenSpaceGuid.PcdWinNtConsole|L"Bus Driver Console Window"|VOID*|0x0000100a
   gEfiNt32PkgTokenSpaceGuid.PcdWinNtGop|L"UGA Window 1!UGA Window 2"|VOID*|0x0000100d
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig1|FALSE|BOOLEAN|0x00000001
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig2|FALSE|BOOLEAN|0x00000002
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig3|FALSE|BOOLEAN|0x00000003
+  gXXXPkgTokenSpaceGuid.PcdCsConfig1|FALSE|BOOLEAN|0x00000004
+  gXXXPkgTokenSpaceGuid.PcdCsConfig2|FALSE|BOOLEAN|0x00000005
+  gXXXPkgTokenSpaceGuid.PcdCsConfig3|FALSE|BOOLEAN|0x00000006
+  gXXXPkgTokenSpaceGuid.PcdFruConfig1|FALSE|BOOLEAN|0x00000007
+  gXXXPkgTokenSpaceGuid.PcdFruConfig2|FALSE|BOOLEAN|0x00000008
+  gXXXPkgTokenSpaceGuid.PcdFruConfig3|FALSE|BOOLEAN|0x00000009
 
diff --git a/Nt32Pkg/Nt32Pkg.dsc b/Nt32Pkg/Nt32Pkg.dsc
index fa3446be062f..573875fe4b95 100644
--- a/Nt32Pkg/Nt32Pkg.dsc
+++ b/Nt32Pkg/Nt32Pkg.dsc
@@ -86,6 +86,16 @@ [Defines]
 ################################################################################
 [SkuIds]
   0|DEFAULT              # The entry: 0|DEFAULT is reserved and always required.
+  1 | Sku1 # CpuA + CsA + FruA
+  2 | Sku2 # CpuA + CsA + FruB
+  3 | Sku3 # CpuA + CsB + FruA
+  4 | Sku4 # CpuA + CsB + FruB
+  5 | Sku5 # CpuB + CsA + FruA
+  6 | Sku6 # CpuB + CsA + FruB
+  7 | Sku7 # CpuB + CsB + FruA
+  8 | Sku8 # CpuB + CsB + FruB
+  9 | Sku9 # CpuA + CsB
+  10 | Sku10 # CpuB + CsB
 
 ################################################################################
 #
@@ -327,6 +337,121 @@ [PcdsDynamicHii.common.DEFAULT]
   gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|L"Timeout"|gEfiGlobalVariableGuid|0x0|10
   gEfiMdePkgTokenSpaceGuid.PcdHardwareErrorRecordLevel|L"HwErrRecSupport"|gEfiGlobalVariableGuid|0x0|1
 
+[PcdsDynamicDefault.Common.DEFAULT]
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig1|FALSE
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig2|FALSE
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig3|FALSE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig1|FALSE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig2|FALSE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig3|FALSE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig1|FALSE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig2|FALSE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig3|FALSE
+
+[PcdsDynamicDefault.Common.Sku1]
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig2|TRUE
+  # gXXXPkgTokenSpaceGuid.PcdCpuConfig3|FALSE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig2|TRUE
+  # gXXXPkgTokenSpaceGuid.PcdCsConfig3|FALSE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig2|TRUE
+  # gXXXPkgTokenSpaceGuid.PcdFruConfig3|FALSE
+
+[PcdsDynamicDefault.Common.Sku2]
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig2|TRUE
+  # gXXXPkgTokenSpaceGuid.PcdCpuConfig3|FALSE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig2|TRUE
+  # gXXXPkgTokenSpaceGuid.PcdCsConfig3|FALSE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig2|TRUE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig3|TRUE
+
+[PcdsDynamicDefault.Common.Sku3]
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig2|TRUE
+  # gXXXPkgTokenSpaceGuid.PcdCpuConfig3|FALSE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig2|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig3|TRUE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig2|TRUE
+  # gXXXPkgTokenSpaceGuid.PcdFruConfig3|FALSE
+
+[PcdsDynamicDefault.Common.Sku4]
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig2|TRUE
+  # gXXXPkgTokenSpaceGuid.PcdCpuConfig3|FALSE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig2|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig3|TRUE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig2|TRUE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig3|TRUE
+
+[PcdsDynamicDefault.Common.Sku5]
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig2|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig3|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig2|TRUE
+  # gXXXPkgTokenSpaceGuid.PcdCsConfig3|FALSE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig2|TRUE
+  # gXXXPkgTokenSpaceGuid.PcdFruConfig3|FALSE
+
+[PcdsDynamicDefault.Common.Sku6]
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig2|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig3|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig2|TRUE
+  # gXXXPkgTokenSpaceGuid.PcdCsConfig3|FALSE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig2|TRUE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig3|TRUE
+
+[PcdsDynamicDefault.Common.Sku7]
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig2|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig3|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig2|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig3|TRUE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig2|TRUE
+  # gXXXPkgTokenSpaceGuid.PcdFruConfig3|FALSE
+
+[PcdsDynamicDefault.Common.Sku8]
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig2|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig3|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig2|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig3|TRUE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig2|TRUE
+  gXXXPkgTokenSpaceGuid.PcdFruConfig3|TRUE
+
+[PcdsDynamicDefault.Common.Sku9]
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig2|TRUE
+  # gXXXPkgTokenSpaceGuid.PcdCpuConfig3|FALSE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig2|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig3|TRUE
+
+[PcdsDynamicDefault.Common.Sku10]
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig2|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCpuConfig3|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig1|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig2|TRUE
+  gXXXPkgTokenSpaceGuid.PcdCsConfig3|TRUE
+
 ###################################################################################################
 #
 # Components Section - list of the modules and components that will be processed by compilation
-- 
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [RFC 2/2] Example: The PCDs configuring for multiple SKUs with sub SKU support
  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 ` Star Zeng
  2017-05-15 10:00 ` [RFC 0/2] PCD: Extended SKU support 2 - sub SKU Zeng, Star
  2 siblings, 0 replies; 4+ messages in thread
From: Star Zeng @ 2017-04-25 12:48 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng

---
 Nt32Pkg/Nt32Pkg.dsc | 116 ++++++++--------------------------------------------
 1 file changed, 16 insertions(+), 100 deletions(-)

diff --git a/Nt32Pkg/Nt32Pkg.dsc b/Nt32Pkg/Nt32Pkg.dsc
index 573875fe4b95..7b468c18ad7a 100644
--- a/Nt32Pkg/Nt32Pkg.dsc
+++ b/Nt32Pkg/Nt32Pkg.dsc
@@ -86,16 +86,15 @@ [Defines]
 ################################################################################
 [SkuIds]
   0|DEFAULT              # The entry: 0|DEFAULT is reserved and always required.
-  1 | Sku1 # CpuA + CsA + FruA
-  2 | Sku2 # CpuA + CsA + FruB
-  3 | Sku3 # CpuA + CsB + FruA
-  4 | Sku4 # CpuA + CsB + FruB
-  5 | Sku5 # CpuB + CsA + FruA
-  6 | Sku6 # CpuB + CsA + FruB
-  7 | Sku7 # CpuB + CsB + FruA
-  8 | Sku8 # CpuB + CsB + FruB
-  9 | Sku9 # CpuA + CsB
-  10 | Sku10 # CpuB + CsB
+  CpuSku | CpuSkuA | DEFAULT
+  CpuSku | CpuSkuB | CpuSkuA
+  CsSku | CsSkuA | DEFAULT
+  CsSku | CsSkuB | CsSkuA
+  FruSku | FruSkuA | DEFAULT
+  FruSku | FruSkuB | FruSkuA
+
+  Combo1 | (CpuSku , CsSku, FruSku)
+  Combo2 | (CpuSku , CsSkuB)
 
 ################################################################################
 #
@@ -348,109 +347,26 @@ [PcdsDynamicDefault.Common.DEFAULT]
   gXXXPkgTokenSpaceGuid.PcdFruConfig2|FALSE
   gXXXPkgTokenSpaceGuid.PcdFruConfig3|FALSE
 
-[PcdsDynamicDefault.Common.Sku1]
+[PcdsDynamicDefault.Common.CpuA]
   gXXXPkgTokenSpaceGuid.PcdCpuConfig1|TRUE
   gXXXPkgTokenSpaceGuid.PcdCpuConfig2|TRUE
-  # gXXXPkgTokenSpaceGuid.PcdCpuConfig3|FALSE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig2|TRUE
-  # gXXXPkgTokenSpaceGuid.PcdCsConfig3|FALSE
-  gXXXPkgTokenSpaceGuid.PcdFruConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdFruConfig2|TRUE
-  # gXXXPkgTokenSpaceGuid.PcdFruConfig3|FALSE
-
-[PcdsDynamicDefault.Common.Sku2]
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig2|TRUE
-  # gXXXPkgTokenSpaceGuid.PcdCpuConfig3|FALSE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig2|TRUE
-  # gXXXPkgTokenSpaceGuid.PcdCsConfig3|FALSE
-  gXXXPkgTokenSpaceGuid.PcdFruConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdFruConfig2|TRUE
-  gXXXPkgTokenSpaceGuid.PcdFruConfig3|TRUE
 
-[PcdsDynamicDefault.Common.Sku3]
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig2|TRUE
-  # gXXXPkgTokenSpaceGuid.PcdCpuConfig3|FALSE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig2|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig3|TRUE
-  gXXXPkgTokenSpaceGuid.PcdFruConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdFruConfig2|TRUE
-  # gXXXPkgTokenSpaceGuid.PcdFruConfig3|FALSE
-
-[PcdsDynamicDefault.Common.Sku4]
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig2|TRUE
-  # gXXXPkgTokenSpaceGuid.PcdCpuConfig3|FALSE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig2|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig3|TRUE
-  gXXXPkgTokenSpaceGuid.PcdFruConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdFruConfig2|TRUE
-  gXXXPkgTokenSpaceGuid.PcdFruConfig3|TRUE
-
-[PcdsDynamicDefault.Common.Sku5]
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig2|TRUE
+[PcdsDynamicDefault.Common.CpuB]
   gXXXPkgTokenSpaceGuid.PcdCpuConfig3|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig2|TRUE
-  # gXXXPkgTokenSpaceGuid.PcdCsConfig3|FALSE
-  gXXXPkgTokenSpaceGuid.PcdFruConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdFruConfig2|TRUE
-  # gXXXPkgTokenSpaceGuid.PcdFruConfig3|FALSE
 
-[PcdsDynamicDefault.Common.Sku6]
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig2|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig3|TRUE
+[PcdsDynamicDefault.Common.CsA]
   gXXXPkgTokenSpaceGuid.PcdCsConfig1|TRUE
   gXXXPkgTokenSpaceGuid.PcdCsConfig2|TRUE
-  # gXXXPkgTokenSpaceGuid.PcdCsConfig3|FALSE
-  gXXXPkgTokenSpaceGuid.PcdFruConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdFruConfig2|TRUE
-  gXXXPkgTokenSpaceGuid.PcdFruConfig3|TRUE
 
-[PcdsDynamicDefault.Common.Sku7]
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig2|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig3|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig2|TRUE
+[PcdsDynamicDefault.Common.CsB]
   gXXXPkgTokenSpaceGuid.PcdCsConfig3|TRUE
-  gXXXPkgTokenSpaceGuid.PcdFruConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdFruConfig2|TRUE
-  # gXXXPkgTokenSpaceGuid.PcdFruConfig3|FALSE
 
-[PcdsDynamicDefault.Common.Sku8]
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig2|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig3|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig2|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig3|TRUE
+[PcdsDynamicDefault.Common.FruA]
   gXXXPkgTokenSpaceGuid.PcdFruConfig1|TRUE
   gXXXPkgTokenSpaceGuid.PcdFruConfig2|TRUE
-  gXXXPkgTokenSpaceGuid.PcdFruConfig3|TRUE
 
-[PcdsDynamicDefault.Common.Sku9]
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig2|TRUE
-  # gXXXPkgTokenSpaceGuid.PcdCpuConfig3|FALSE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig2|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig3|TRUE
-
-[PcdsDynamicDefault.Common.Sku10]
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig2|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCpuConfig3|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig1|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig2|TRUE
-  gXXXPkgTokenSpaceGuid.PcdCsConfig3|TRUE
+[PcdsDynamicDefault.Common.FruB]
+  gXXXPkgTokenSpaceGuid.PcdFruConfig3|TRUE
 
 ###################################################################################################
 #
-- 
2.7.0.windows.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [RFC 0/2] PCD: Extended SKU support 2 - sub SKU
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Zeng, Star @ 2017-05-15 10:00 UTC (permalink / raw)
  To: edk2-devel@lists.01.org
  Cc: Kinney, Michael D, Gao, Liming, Zhu, Yonghong, Zeng, Star

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-05-15 10:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [RFC 0/2] PCD: Extended SKU support 2 - sub SKU Zeng, Star

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox