[edk2-devel] [edk2-platforms][PATCH V1 17/17] SimicsOpenBoardPkg: Assign unique token namespace

2019-10-07 Thread Kubacki, Michael A
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2249

PCDs declared in the SimicsOpenBoardPkg currently use the GUID
gBoardModuleTokenSpaceGuid. The same name is used in other board
packages and a package has been added called BoardModulePkg so
this name is now misleading.

This change assigns a unique GUID value and a name specific to the
package to provide differentiation from PCDs in other board
packages.

Cc: Agyeman Prince 
Cc: Wei David Y 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/SimicsOpenBoardPkg/OpenBoardPkg.dec 
 | 72 ++--
 Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc
 | 14 ++--
 Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf   
 | 12 ++--
 
Platform/Intel/SimicsOpenBoardPkg/Library/PciHostBridgeLib/PciHostBridgeLib.inf 
| 14 ++--
 Platform/Intel/SimicsOpenBoardPkg/Library/PeiReportFvLib/PeiReportFvLib.inf
 | 10 +--
 
Platform/Intel/SimicsOpenBoardPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
 | 10 +--
 Platform/Intel/SimicsOpenBoardPkg/SecCore/SecMain.inf  
 | 18 ++---
 Platform/Intel/SimicsOpenBoardPkg/SimicsPei/SimicsPei.inf  
 | 36 +-
 Platform/Intel/SimicsOpenBoardPkg/SimicsVideoDxe/SimicsVideoDxe.inf
 |  2 +-
 Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/DecomprScratchEnd.fdf.inc  
 |  6 +-
 Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.fdf.inc   
 | 16 ++---
 11 files changed, 105 insertions(+), 105 deletions(-)

diff --git a/Platform/Intel/SimicsOpenBoardPkg/OpenBoardPkg.dec 
b/Platform/Intel/SimicsOpenBoardPkg/OpenBoardPkg.dec
index 40487820fa..421c464023 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/OpenBoardPkg.dec
+++ b/Platform/Intel/SimicsOpenBoardPkg/OpenBoardPkg.dec
@@ -17,57 +17,57 @@
   Include
 
 [Guids]
-  gBoardModuleTokenSpaceGuid  = {0xeed35f57, 0x4ff2, 0x4244, {0xb8, 0x3a, 
0xea, 0x71, 0x5f, 0xd3, 0x59, 0xa5}}
+  gSimicsOpenBoardPkgTokenSpaceGuid  = {0x75fd61da, 0x3931, 0x49aa, {0x8f, 
0x11, 0x18, 0x25, 0xf6, 0x31, 0x21, 0xd2}}
   gSimicsBoardConfigGuid  = {0xeed35f57, 0x4ff2, 0x4244, {0xb8, 0x3a, 0xea, 
0x71, 0x5f, 0xd3, 0x59, 0xa5}}
 
 [PcdsFixedAtBuild]
-  gBoardModuleTokenSpaceGuid.PcdSimicsPeiMemFvBase|0x0|UINT32|0
-  gBoardModuleTokenSpaceGuid.PcdSimicsPeiMemFvSize|0x0|UINT32|1
-  gBoardModuleTokenSpaceGuid.PcdSimicsDxeMemFvBase|0x0|UINT32|0x15
-  gBoardModuleTokenSpaceGuid.PcdSimicsDxeMemFvSize|0x0|UINT32|0x16
+  gSimicsOpenBoardPkgTokenSpaceGuid.PcdSimicsPeiMemFvBase|0x0|UINT32|0
+  gSimicsOpenBoardPkgTokenSpaceGuid.PcdSimicsPeiMemFvSize|0x0|UINT32|1
+  gSimicsOpenBoardPkgTokenSpaceGuid.PcdSimicsDxeMemFvBase|0x0|UINT32|0x15
+  gSimicsOpenBoardPkgTokenSpaceGuid.PcdSimicsDxeMemFvSize|0x0|UINT32|0x16
 
   #TODO: Remove these two when we integrate new PlatformPei
-  gBoardModuleTokenSpaceGuid.PcdSimicsMemFvBase|0x0080|UINT32|2
-  gBoardModuleTokenSpaceGuid.PcdSimicsMemFvSize|0x0050|UINT32|3
+  gSimicsOpenBoardPkgTokenSpaceGuid.PcdSimicsMemFvBase|0x0080|UINT32|2
+  gSimicsOpenBoardPkgTokenSpaceGuid.PcdSimicsMemFvSize|0x0050|UINT32|3
 
-  gBoardModuleTokenSpaceGuid.PcdSimicsFlashNvStorageEventLogBase|0x0|UINT32|0x8
-  gBoardModuleTokenSpaceGuid.PcdSimicsFlashNvStorageEventLogSize|0x0|UINT32|0x9
-  gBoardModuleTokenSpaceGuid.PcdSimicsFirmwareFdSize|0x0|UINT32|0xa
-  gBoardModuleTokenSpaceGuid.PcdSimicsFirmwareBlockSize|0|UINT32|0xb
-  gBoardModuleTokenSpaceGuid.PcdSimicsFlashNvStorageVariableBase|0x0|UINT32|0xc
-  gBoardModuleTokenSpaceGuid.PcdSimicsFlashNvStorageFtwSpareBase|0x0|UINT32|0xd
-  
gBoardModuleTokenSpaceGuid.PcdSimicsFlashNvStorageFtwWorkingBase|0x0|UINT32|0xe
-  gBoardModuleTokenSpaceGuid.PcdSimicsFdBaseAddress|0x0|UINT32|0xf
-  gBoardModuleTokenSpaceGuid.PcdSimicsSecPageTablesBase|0x0|UINT32|0x11
-  gBoardModuleTokenSpaceGuid.PcdSimicsSecPageTablesSize|0x0|UINT32|0x12
-  gBoardModuleTokenSpaceGuid.PcdSimicsSecPeiTempRamBase|0x0|UINT32|0x13
-  gBoardModuleTokenSpaceGuid.PcdSimicsSecPeiTempRamSize|0x0|UINT32|0x14
-  gBoardModuleTokenSpaceGuid.PcdSimicsLockBoxStorageBase|0x0|UINT32|0x18
-  gBoardModuleTokenSpaceGuid.PcdSimicsLockBoxStorageSize|0x0|UINT32|0x19
-  gBoardModuleTokenSpaceGuid.PcdGuidedExtractHandlerTableSize|0x0|UINT32|0x1a
-  gBoardModuleTokenSpaceGuid.PcdSimicsDecompressionScratchEnd|0x0|UINT32|0x1f
+  
gSimicsOpenBoardPkgTokenSpaceGuid.PcdSimicsFlashNvStorageEventLogBase|0x0|UINT32|0x8
+  
gSimicsOpenBoardPkgTokenSpaceGuid.PcdSimicsFlashNvStorageEventLogSize|0x0|UINT32|0x9
+  gSimicsOpenBoardPkgTokenSpaceGuid.PcdSimicsFirmwareFdSize|0x0|UINT32|0xa
+  gSimicsOpenBoardPkgTokenSpaceGuid.PcdSimicsFirmwareBlockSize|0|UINT32|0xb
+  
gSimicsOpenBoardPkgTokenSpaceGuid.PcdSimicsFlashNvStorageVariableBase|0x0|UINT32|0xc
+  

[edk2-devel] [edk2-platforms][PATCH V1 07/17] KabylakeOpenBoardPkg: Assign unique token namespace

2019-10-07 Thread Kubacki, Michael A
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2247

PCDs declared in the KabylakeOpenBoardPkg currently use the GUID
gBoardModuleTokenSpaceGuid. The same name is used in other board
packages and a package has been added called BoardModulePkg so
this name is now misleading.

This change assigns a unique GUID value and a name specific to the
package to provide differentiation from PCDs in other board
packages.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Jeremy Soller 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec   
   | 408 ++--
 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
   |  18 +-
 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc 
   |  60 +--
 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc  
   |  18 +-
 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc   
   |  60 +--
 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Include/Fdf/FlashMapInclude.fdf 
   |   4 +-
 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.fdf
   |   8 +-
 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.fdf  
   |   4 +-
 Platform/Intel/KabylakeOpenBoardPkg/Acpi/BoardAcpiDxe/BoardAcpiDxe.inf 
   |  16 +-
 Platform/Intel/KabylakeOpenBoardPkg/Features/PciHotPlug/PciHotPlug.inf 
   |   4 +-
 
Platform/Intel/KabylakeOpenBoardPkg/Features/Tbt/Library/DxeTbtPolicyLib/DxeTbtPolicyLib.inf
  |  40 +-
 
Platform/Intel/KabylakeOpenBoardPkg/Features/Tbt/Library/PeiDxeSmmTbtCommonLib/TbtCommonLib.inf
   |  40 +-
 
Platform/Intel/KabylakeOpenBoardPkg/Features/Tbt/Library/PeiTbtPolicyLib/PeiTbtPolicyLib.inf
  |  18 +-
 Platform/Intel/KabylakeOpenBoardPkg/Features/Tbt/TbtInit/Smm/TbtSmm.inf
   |   4 +-
 
Platform/Intel/KabylakeOpenBoardPkg/FspWrapper/Library/PeiSiliconPolicyNotifyLib/PeiPreMemSiliconPolicyNotifyLib.inf
  |   8 +-
 
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/PeiSiliconPolicyNotifyLib/PeiPreMemSiliconPolicyNotifyLib.inf
   |   8 +-
 
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf
   |  70 ++--
 
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BasePlatformHookLib/BasePlatformHookLib.inf
|  18 +-
 
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeBoardAcpiTableLib.inf
  |   4 +-
 
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/DxeMultiBoardAcpiSupportLib.inf
   |  10 +-
 
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/SmmBoardAcpiEnableLib.inf
 |   2 +-
 
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardAcpiLib/SmmMultiBoardAcpiSupportLib.inf
   |   2 +-
 
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiBoardInitPostMemLib.inf
|  16 +-
 
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiBoardInitPreMemLib.inf
 | 134 +++
 
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiMultiBoardInitPostMemLib.inf
   |  16 +-
 
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Library/BoardInitLib/PeiMultiBoardInitPreMemLib.inf
| 132 +++
 
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Policy/Library/DxeSiliconPolicyUpdateLib/DxeSiliconPolicyUpdateLib.inf
 |   4 +-
 
Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf
 |  74 ++--
 
Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BasePlatformHookLib/BasePlatformHookLib.inf
  |  18 +-
 
Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardAcpiLib/DxeBoardAcpiTableLib.inf
|  12 +-
 
Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/Library/BoardAcpiLib/DxeMultiBoardAcpiSupportLib.inf
 |  14 +-
 

[edk2-devel] [edk2-platforms][PATCH V1 03/17] KabylakeOpenBoardPkg/KabylakeRvp3: DSC cleanup

2019-10-07 Thread Kubacki, Michael A
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2242

This change refactors OpenBoardPkg.dsc and OpenBoardPkgPcd.dsc to
consolidate redundant sections and better group file content to
improve maintainability and readability.

The same pattern made in this change for KabylakeRvp3 is being
applied to all existing board packages in Platform/Intel to improve
overall consistency.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc| 521 
++-
 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc | 547 
++--
 2 files changed, 539 insertions(+), 529 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
index a3378d3c5d..efc4c2dca8 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
@@ -1,5 +1,5 @@
 ## @file
-#  Platform description.
+#  The main build description file for the KabylakeRvp3 board.
 #
 # Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
 #
@@ -7,11 +7,6 @@
 #
 ##
 [Defines]
-  #
-  # Set platform specific package/folder name, same as passed from PREBUILD 
script.
-  # PLATFORM_PACKAGE would be the same as PLATFORM_NAME as well as package 
build folder
-  # DEFINE only takes effect at R9 DSC and FDF.
-  #
   DEFINE  PLATFORM_PACKAGE= MinPlatformPkg
   DEFINE  PLATFORM_SI_PACKAGE = KabylakeSiliconPkg
   DEFINE  PLATFORM_SI_BIN_PACKAGE = KabylakeSiliconBinPkg
@@ -20,7 +15,7 @@
   DEFINE  PROJECT = 
$(PLATFORM_BOARD_PACKAGE)/$(BOARD)
 
   #
-  # Platform On/Off features are defined here
+  # Include PCD configuration for this board.
   #
   !include OpenBoardPkgPcd.dsc
 
@@ -68,8 +63,6 @@
   SUPPORTED_ARCHITECTURES = IA32|X64
   BUILD_TARGETS   = DEBUG|RELEASE
   SKUID_IDENTIFIER= ALL
-
-
   FLASH_DEFINITION= $(PROJECT)/OpenBoardPkg.fdf
 
   FIX_LOAD_TOP_MEMORY_ADDRESS = 0x0
@@ -82,172 +75,205 @@
 
 

 #
-# SKU Identification section - list of all SKU IDs supported by this
-#  Platform.
+# SKU Identification section - list of all SKU IDs supported by this board.
 #
 

 [SkuIds]
-  0|DEFAULT  # The entry: 0|DEFAULT is reserved and always 
required.
-  4|KabylakeRvp3
+  0x00|DEFAULT# 0|DEFAULT is reserved and always required.
+  0x04|KabylakeRvp3
   0x60|KabyLakeYLpddr3Rvp3
 
 

 #
-# Library Class section - list of all Library Classes needed by this Platform.
+# Includes section - other DSC file contents included for this board build.
 #
 

 
+###
+# Library Includes
+###
 !include $(PLATFORM_PACKAGE)/Include/Dsc/CoreCommonLib.dsc
 !include $(PLATFORM_PACKAGE)/Include/Dsc/CorePeiLib.dsc
 !include $(PLATFORM_PACKAGE)/Include/Dsc/CoreDxeLib.dsc
+!include $(PLATFORM_SI_PACKAGE)/SiPkgCommonLib.dsc
+!include $(PLATFORM_SI_PACKAGE)/SiPkgPeiLib.dsc
+!include $(PLATFORM_SI_PACKAGE)/SiPkgDxeLib.dsc
+
+###
+# Component Includes
+###
+[Components.IA32]
+!include $(PLATFORM_PACKAGE)/Include/Dsc/CorePeiInclude.dsc
+!include $(PLATFORM_SI_PACKAGE)/SiPkgPei.dsc
+
+[Components.X64]
+!include $(PLATFORM_PACKAGE)/Include/Dsc/CoreDxeInclude.dsc
+!include $(PLATFORM_SI_PACKAGE)/SiPkgDxe.dsc
+
+###
+# Build Option Includes
+###
+!include $(PLATFORM_SI_PACKAGE)/SiPkgBuildOption.dsc
+!include OpenBoardPkgBuildOption.dsc
+
+
+#
+# Library Class section - list of all Library Classes needed by this board.
+#
+
 
 [LibraryClasses.common]
-
-  PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
-  
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
-
-  
PciHostBridgeLib|$(PLATFORM_PACKAGE)/Pci/Library/PciHostBridgeLibSimple/PciHostBridgeLibSimple.inf
-  
PciSegmentInfoLib|$(PLATFORM_PACKAGE)/Pci/Library/PciSegmentInfoLibSimple/PciSegmentInfoLibSimple.inf
-  
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
-  

[edk2-devel] [edk2-platforms][PATCH V1 11/17] WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: Update FSP base PCDs

2019-10-07 Thread Kubacki, Michael A
Sets the FSP-T, FSP-M, and FSP-S base address PCDs based on the flash map.

Previously these were hardcoded in the DSC file.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.fdf | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.fdf 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.fdf
index 611078e4b4..30ce0b9b79 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.fdf
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.fdf
@@ -55,6 +55,9 @@ SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvMicrocodeSize
= gSiPkgTokenSpaceG
 SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvMicrocodeOffset  = 
gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvOffset
 SET gIntelFsp2WrapperTokenSpaceGuid.PcdFlashCodeCacheAddress = 
gSiPkgTokenSpaceGuid.PcdBiosAreaBaseAddress
 SET gIntelFsp2WrapperTokenSpaceGuid.PcdFlashCodeCacheSize= 
gSiPkgTokenSpaceGuid.PcdBiosSize
+SET gIntelFsp2WrapperTokenSpaceGuid.PcdFsptBaseAddress   = 
$(gSiPkgTokenSpaceGuid.PcdBiosAreaBaseAddress) + 
$(gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTOffset)
+SET gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress   = 
$(gSiPkgTokenSpaceGuid.PcdBiosAreaBaseAddress) + 
$(gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMOffset)
+SET gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress   = 
$(gSiPkgTokenSpaceGuid.PcdBiosAreaBaseAddress) + 
$(gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSOffset)
 SET gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaBaseAddress= 
gSiPkgTokenSpaceGuid.PcdBiosAreaBaseAddress
 SET gMinPlatformPkgTokenSpaceGuid.PcdFlashAreaSize   = 
gSiPkgTokenSpaceGuid.PcdBiosSize
 

-- 
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48539): https://edk2.groups.io/g/devel/message/48539
Mute This Topic: https://groups.io/mt/34439447/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms][PATCH V1 01/17] KabylakeOpenBoardPkg/KabylakeRvp3: Remove OpenBoardPkgConfig.dsc

2019-10-07 Thread Kubacki, Michael A
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2242

The location for PCD configuration is currently inconsistent in
KabylakeOpenBoardPkg. A large set of FeaturePCD definitions are
in OpenBoardPkgConfig.dsc while other PCD definitions (including
FeaturePCD) are located in OpenBoardPkgPcd.dsc.

This change consolidates PCD configuration for the KabylakeRvp3
board to OpenBoardPkgPcd.dsc and removes OpenBoardPkgConfig.dsc.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc   |   1 -
 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgConfig.dsc | 138 

 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc| 132 
++-
 3 files changed, 130 insertions(+), 141 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
index 7090852192..a3378d3c5d 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
@@ -22,7 +22,6 @@
   #
   # Platform On/Off features are defined here
   #
-  !include OpenBoardPkgConfig.dsc
   !include OpenBoardPkgPcd.dsc
 
 [Defines]
diff --git 
a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgConfig.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgConfig.dsc
deleted file mode 100644
index 15468494dd..00
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgConfig.dsc
+++ /dev/null
@@ -1,138 +0,0 @@
-## @file
-#  Platform configuration file.
-#
-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-##
-
-[PcdsFixedAtBuild]
-  #
-  # Please select BootStage here.
-  # Stage 1 - enable debug (system deadloop after debug init)
-  # Stage 2 - mem init (system deadloop after mem init)
-  # Stage 3 - boot to shell only
-  # Stage 4 - boot to OS
-  # Stage 5 - boot to OS with security boot enabled
-  #
-  gMinPlatformPkgTokenSpaceGuid.PcdBootStage|4
-  
-[PcdsFeatureFlag]
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 2
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|TRUE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 3
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|TRUE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 4
-  gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 5
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|TRUE
-  gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|TRUE
-!endif
-  
-  gBoardModuleTokenSpaceGuid.PcdTbtEnable|FALSE
-  #
-  # More fine granularity control below:
-  #
-  
-  
-  gBoardModuleTokenSpaceGuid.PcdMultiBoardSupport|TRUE
-
-
-
-#
-# TRUE is ENABLE. FALSE is DISABLE.
-#
-
-#
-# BIOS build switches configuration
-#
-  gSiPkgTokenSpaceGuid.PcdOptimizeCompilerEnable|TRUE
-
-# CPU
-  gSiPkgTokenSpaceGuid.PcdSourceDebugEnable|FALSE
-  gSiPkgTokenSpaceGuid.PcdTxtEnable|TRUE  #Set to FALSE for GCC Build @todo 
Convert TXT ASM to NASM
-  gSiPkgTokenSpaceGuid.PcdBiosGuardEnable|TRUE
-
-# SA
-  gSiPkgTokenSpaceGuid.PcdIgdEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdPegEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdSgEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdSaDmiEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdSkycamEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdGmmEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdSaOcEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdVtdEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdPeiDisplayEnable|TRUE
-
-# ME
-  gSiPkgTokenSpaceGuid.PcdAmtEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdAtaEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdPttEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdJhiEnable|TRUE
-
-  gSiPkgTokenSpaceGuid.PcdAcpiEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdBdatEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdBootGuardEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdIntegratedTouchEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdCpuPowerOnConfigEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdSiCsmEnable|FALSE
-  gSiPkgTokenSpaceGuid.PcdEvLoaderEnable|FALSE
-  gSiPkgTokenSpaceGuid.PcdTraceHubEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdOverclockEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdPpmEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdS3Enable|TRUE
-  gSiPkgTokenSpaceGuid.PcdSerialGpioEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdSmbiosEnable|TRUE
-  

[edk2-devel] [edk2-platforms][PATCH V1 09/17] WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: Remove OpenBoardPkgConfig.dsc

2019-10-07 Thread Kubacki, Michael A
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2243

The location for PCD configuration is currently inconsistent in
WhiskeylakeOpenBoardPkg. A large set of FeaturePCD definitions are
in OpenBoardPkgConfig.dsc while other PCD definitions (including
FeaturePCD) are located in OpenBoardPkgPcd.dsc.

This change consolidates PCD configuration for the WhiskeylakeURvp
board to OpenBoardPkgPcd.dsc and removes OpenBoardPkgConfig.dsc.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc   
|   1 -
 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgConfig.dsc 
| 128 
 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc
| 116 ++
 3 files changed, 116 insertions(+), 129 deletions(-)

diff --git 
a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
index 9a516cad60..1d07fdea84 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
@@ -26,7 +26,6 @@
   #
   # Platform On/Off features are defined here
   #
-  !include OpenBoardPkgConfig.dsc
   !include OpenBoardPkgPcd.dsc
 
 

diff --git 
a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgConfig.dsc 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgConfig.dsc
deleted file mode 100644
index c68fecf50e..00
--- 
a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgConfig.dsc
+++ /dev/null
@@ -1,128 +0,0 @@
-## @file
-#  Platform configuration file.
-#
-#
-#  Copyright (c) 2019, Intel Corporation. All rights reserved.
-#
-#  SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-#
-##
-
-[PcdsFixedAtBuild]
-  #
-  # Please select BootStage here.
-  # Stage 1 - enable debug (system deadloop after debug init)
-  # Stage 2 - mem init (system deadloop after mem init)
-  # Stage 3 - boot to shell only
-  # Stage 4 - boot to OS
-  # Stage 5 - boot to OS with security boot enabled
-  #
-  gMinPlatformPkgTokenSpaceGuid.PcdBootStage|4
-
-[PcdsFeatureFlag]
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 2
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|TRUE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 3
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|TRUE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 4
-  gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 5
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|TRUE
-  gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|TRUE
-!endif
-
-  gBoardModuleTokenSpaceGuid.PcdTbtEnable|FALSE
-  #
-  # More fine granularity control below:
-  #
-
-  gBoardModuleTokenSpaceGuid.PcdMultiBoardSupport|TRUE
-
-#
-# TRUE is ENABLE. FALSE is DISABLE.
-#
-#
-# BIOS build switches configuration
-#
-  gSiPkgTokenSpaceGuid.PcdOptimizeCompilerEnable|TRUE
-
-# CPU
-  gSiPkgTokenSpaceGuid.PcdSourceDebugEnable|FALSE
-
-# SA
-  gSiPkgTokenSpaceGuid.PcdIgdEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdPegEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdSgEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdSaDmiEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdSaOcEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdVtdEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdPeiDisplayEnable|TRUE
-
-# ME
-  gSiPkgTokenSpaceGuid.PcdAtaEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdPttEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdJhiEnable|TRUE
-
-  gSiPkgTokenSpaceGuid.PcdAcpiEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdBdatEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdIntegratedTouchEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdCpuPowerOnConfigEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdSiCsmEnable|FALSE
-  gSiPkgTokenSpaceGuid.PcdTraceHubEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdOverclockEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdPpmEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdS3Enable|TRUE
-  gSiPkgTokenSpaceGuid.PcdSmbiosEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdSmmVariableEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdUseHpetTimer|TRUE   # TRUE - 
HPET / FALSE - 8254 timer is used.
-  gSiPkgTokenSpaceGuid.PcdOcWdtEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdSiCatalogDebugEnable|FALSE
-
-  gSiPkgTokenSpaceGuid.PcdSerialIoUartEnable|TRUE
-  

[edk2-devel] [edk2-platforms][PATCH V1 05/17] KabylakeOpenBoardPkg/GalagoPro3: Remove OpenBoardPkgConfig.dsc

2019-10-07 Thread Kubacki, Michael A
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2242

The location for PCD configuration is currently inconsistent in
KabylakeOpenBoardPkg. A large set of FeaturePCD definitions are
in OpenBoardPkgConfig.dsc while other PCD definitions (including
FeaturePCD) are located in OpenBoardPkgPcd.dsc.

This change consolidates PCD configuration for the GalagoPro3
board to OpenBoardPkgPcd.dsc and removes OpenBoardPkgConfig.dsc.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Jeremy Soller 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc   |   1 -
 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgConfig.dsc | 132 

 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc| 122 
++
 3 files changed, 122 insertions(+), 133 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
index 90ee5dfc53..75f774d26b 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
@@ -23,7 +23,6 @@
   #
   # Platform On/Off features are defined here
   #
-  !include OpenBoardPkgConfig.dsc
   !include OpenBoardPkgPcd.dsc
 
 

diff --git 
a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgConfig.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgConfig.dsc
deleted file mode 100644
index 3de3f8942c..00
--- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgConfig.dsc
+++ /dev/null
@@ -1,132 +0,0 @@
-## @file
-#  System 76 GalagoPro3 board configuration.
-#
-# Copyright (c) 2019, Intel Corporation. All rights reserved.
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-##
-
-[PcdsFixedAtBuild]
-  #
-  # Please select BootStage here.
-  # Stage 1 - enable debug (system deadloop after debug init)
-  # Stage 2 - mem init (system deadloop after mem init)
-  # Stage 3 - boot to shell only
-  # Stage 4 - boot to OS
-  # Stage 5 - boot to OS with security boot enabled
-  #
-  gMinPlatformPkgTokenSpaceGuid.PcdBootStage|4
-
-[PcdsFeatureFlag]
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 2
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|TRUE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 3
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|TRUE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 4
-  gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 5
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|TRUE
-  gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|TRUE
-!endif
-
-  gBoardModuleTokenSpaceGuid.PcdTbtEnable|FALSE
-  #
-  # More fine granularity control below:
-  #
-  gBoardModuleTokenSpaceGuid.PcdMultiBoardSupport|TRUE
-
-#
-# TRUE is ENABLE. FALSE is DISABLE.
-#
-
-#
-# BIOS build switches configuration
-#
-  gSiPkgTokenSpaceGuid.PcdOptimizeCompilerEnable|TRUE
-
-# CPU
-  gSiPkgTokenSpaceGuid.PcdSourceDebugEnable|FALSE
-  gSiPkgTokenSpaceGuid.PcdTxtEnable|TRUE  #Set to FALSE for GCC Build @todo 
Convert TXT ASM to NASM
-  gSiPkgTokenSpaceGuid.PcdBiosGuardEnable|TRUE
-
-# SA
-  gSiPkgTokenSpaceGuid.PcdIgdEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdPegEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdSgEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdSaDmiEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdSkycamEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdGmmEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdSaOcEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdVtdEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdPeiDisplayEnable|TRUE
-
-# ME
-  gSiPkgTokenSpaceGuid.PcdAmtEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdAtaEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdPttEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdJhiEnable|TRUE
-
-  gSiPkgTokenSpaceGuid.PcdAcpiEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdBdatEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdBootGuardEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdIntegratedTouchEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdCpuPowerOnConfigEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdSiCsmEnable|FALSE
-  gSiPkgTokenSpaceGuid.PcdEvLoaderEnable|FALSE
-  gSiPkgTokenSpaceGuid.PcdTraceHubEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdOverclockEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdPpmEnable|TRUE
-  gSiPkgTokenSpaceGuid.PcdS3Enable|TRUE
-  gSiPkgTokenSpaceGuid.PcdSerialGpioEnable|TRUE
-  

[edk2-devel] [edk2-platforms][PATCH V1 15/17] SimicsOpenBoardPkg/BoardX58Ich10: Remove OpenBoardPkgConfig.dsc

2019-10-07 Thread Kubacki, Michael A
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2244

The location for PCD configuration is currently inconsistent in
SimicsOpenBoardPkg. A large set of FeaturePCD definitions are
in OpenBoardPkgConfig.dsc while other PCD definitions (including
FeaturePCD) are located in OpenBoardPkgPcd.dsc.

This change consolidates PCD configuration for the BoardX58Ich10
board to OpenBoardPkgPcd.dsc and removes OpenBoardPkgConfig.dsc.

Cc: Agyeman Prince 
Cc: Wei David Y 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc   |  1 -
 Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgConfig.dsc | 56 

 Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc| 43 
+++
 3 files changed, 43 insertions(+), 57 deletions(-)

diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc 
b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
index be29737c16..40f864ae17 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
+++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
@@ -40,7 +40,6 @@
   DEFINE NETWORK_ISCSI_ENABLE   = FALSE
   DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE
 
-  !include $(BOARD_PKG)/$(BOARD_NAME)/OpenBoardPkgConfig.dsc
   !include $(BOARD_PKG)/$(BOARD_NAME)/OpenBoardPkgPcd.dsc
   !include NetworkPkg/NetworkDefines.dsc.inc
 
diff --git 
a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgConfig.dsc 
b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgConfig.dsc
deleted file mode 100644
index 75de60e5bc..00
--- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgConfig.dsc
+++ /dev/null
@@ -1,56 +0,0 @@
-## @file
-#
-# Copyright (c) 2019 Intel Corporation. All rights reserved. 
-#
-# SPDX-License-Identifier: BSD-2-Clause-Patent
-#
-##
-
-#
-# TRUE is ENABLE. FALSE is DISABLE.
-#
-
-[PcdsFixedAtBuild]
-  gMinPlatformPkgTokenSpaceGuid.PcdBootStage|4
-
-[PcdsFeatureFlag]
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 2
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|TRUE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 3
-  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE
-  gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|TRUE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 4
-  gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE
-!endif
-
-!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 5
-  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|TRUE
-  gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|TRUE
-!endif
-
-  !if $(TARGET) == DEBUG
-gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|TRUE
-  !else
-gMinPlatformPkgTokenSpaceGuid.PcdSmiHandlerProfileEnable|FALSE
-  !endif
-
-  gMinPlatformPkgTokenSpaceGuid.PcdPerformanceEnable|FALSE
-
-  gAdvancedFeaturePkgTokenSpaceGuid.PcdNetworkEnable|TRUE
-  gAdvancedFeaturePkgTokenSpaceGuid.PcdSmbiosEnable|TRUE
-
diff --git 
a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc 
b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc
index 3bf10ee524..ad5e0c5a38 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc
+++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc
@@ -11,7 +11,50 @@
 # Pcd Section - list of all EDK II PCD Entries defined by this Platform
 #
 

+[PcdsFixedAtBuild]
+  gMinPlatformPkgTokenSpaceGuid.PcdBootStage|4
+
 [PcdsFeatureFlag.common]
+  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE
+  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE
+  gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE
+  gMinPlatformPkgTokenSpaceGuid.PcdUefiSecureBootEnable|FALSE
+  gMinPlatformPkgTokenSpaceGuid.PcdTpm2Enable|FALSE
+
+!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 1
+  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|TRUE
+!endif
+
+!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 2
+  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit|FALSE
+  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|TRUE
+!endif
+
+!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 3
+  gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit|FALSE
+  gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|TRUE
+!endif
+
+!if gMinPlatformPkgTokenSpaceGuid.PcdBootStage >= 4
+  gMinPlatformPkgTokenSpaceGuid.PcdBootToShellOnly|FALSE
+!endif
+
+!if 

[edk2-devel] [edk2-platforms][PATCH V1 10/17] CoffeelakeSiliconPkg: Add DSC include file section tags

2019-10-07 Thread Kubacki, Michael A
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2246

The DSC LibraryClass files in CoffeelakeSiliconPkg that are intended
to be included elsewhere such as SiPkgPeiLib.dsc, SiPkgDxeLib.dsc,
and SiPkgCommonLib.dsc should have section tags so that they are
not dependent on the top-level DSC file to place the include file
in the correct location in the DSC file and better define the
applicability of their library content.

This change adds section tags for the library class related files.
The component files may be built differently in the consuming package
depending on their architecture requirements so those are not
modified.

Cc: Sai Chaganty 
Cc: Chasel Chiu 
Signed-off-by: Michael Kubacki 
---
 Silicon/Intel/CoffeelakeSiliconPkg/SiPkgCommonLib.dsc | 1 +
 Silicon/Intel/CoffeelakeSiliconPkg/SiPkgDxeLib.dsc| 1 +
 Silicon/Intel/CoffeelakeSiliconPkg/SiPkgPeiLib.dsc| 1 +
 3 files changed, 3 insertions(+)

diff --git a/Silicon/Intel/CoffeelakeSiliconPkg/SiPkgCommonLib.dsc 
b/Silicon/Intel/CoffeelakeSiliconPkg/SiPkgCommonLib.dsc
index 2df08c6d01..7a9911e825 100644
--- a/Silicon/Intel/CoffeelakeSiliconPkg/SiPkgCommonLib.dsc
+++ b/Silicon/Intel/CoffeelakeSiliconPkg/SiPkgCommonLib.dsc
@@ -13,6 +13,7 @@
 #
 DEFINE  PCH = Cnl
 
+[LibraryClasses.common]
 #
 # Cpu
 #
diff --git a/Silicon/Intel/CoffeelakeSiliconPkg/SiPkgDxeLib.dsc 
b/Silicon/Intel/CoffeelakeSiliconPkg/SiPkgDxeLib.dsc
index 214de06d58..e21004c993 100644
--- a/Silicon/Intel/CoffeelakeSiliconPkg/SiPkgDxeLib.dsc
+++ b/Silicon/Intel/CoffeelakeSiliconPkg/SiPkgDxeLib.dsc
@@ -7,6 +7,7 @@
 #
 ##
 
+[LibraryClasses.common.DXE_CORE,LibraryClasses.common.DXE_SMM_DRIVER,LibraryClasses.common.SMM_CORE,LibraryClasses.common.DXE_DRIVER,LibraryClasses.common.DXE_RUNTIME_DRIVER,LibraryClasses.common.UEFI_DRIVER]
 #
 # Silicon Init Dxe Library
 #
diff --git a/Silicon/Intel/CoffeelakeSiliconPkg/SiPkgPeiLib.dsc 
b/Silicon/Intel/CoffeelakeSiliconPkg/SiPkgPeiLib.dsc
index 6e244a6ded..bc3fcabd4d 100644
--- a/Silicon/Intel/CoffeelakeSiliconPkg/SiPkgPeiLib.dsc
+++ b/Silicon/Intel/CoffeelakeSiliconPkg/SiPkgPeiLib.dsc
@@ -7,6 +7,7 @@
 #
 ##
 
+[LibraryClasses]
 #
 # Silicon Init Pei Library
 #
-- 
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48538): https://edk2.groups.io/g/devel/message/48538
Mute This Topic: https://groups.io/mt/34439446/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms][PATCH V1 04/17] KabylakeOpenBoardPkg/GalagoPro3: Relocate PCD DSC include

2019-10-07 Thread Kubacki, Michael A
This change moves the include of OpenBoardPkgPcd.dsc to the top of
OpenBoardPkg.dsc to improve visibility and align the include
location with other board DSC files.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Jeremy Soller 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
index f3dd2b0c91..90ee5dfc53 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
@@ -24,6 +24,7 @@
   # Platform On/Off features are defined here
   #
   !include OpenBoardPkgConfig.dsc
+  !include OpenBoardPkgPcd.dsc
 
 

 #
@@ -174,8 +175,6 @@
 [LibraryClasses.X64.DXE_RUNTIME_DRIVER]
   
ResetSystemLib|$(PLATFORM_SI_PACKAGE)/Pch/Library/DxeRuntimeResetSystemLib/DxeRuntimeResetSystemLib.inf
 
-!include OpenBoardPkgPcd.dsc
-
 [Components.IA32]
 
 #
-- 
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48532): https://edk2.groups.io/g/devel/message/48532
Mute This Topic: https://groups.io/mt/34439439/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms][PATCH V1 06/17] KabylakeOpenBoardPkg/GalagoPro3: DSC cleanup

2019-10-07 Thread Kubacki, Michael A
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2242

This change refactors OpenBoardPkg.dsc and OpenBoardPkgPcd.dsc to
consolidate redundant sections and better group file content to
improve maintainability and readability.

The same pattern made in this change for GalagoPro3 is being
applied to all existing board packages in Platform/Intel to improve
overall consistency.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Jeremy Soller 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc| 478 
+++-
 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc | 476 
++-
 2 files changed, 506 insertions(+), 448 deletions(-)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
index 75f774d26b..5f77c8db0a 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
@@ -1,5 +1,5 @@
 ## @file
-#  System 76 GalagoPro3 board description file.
+#  The main build description file for the GalagoPro3 board.
 #
 # Copyright (c) 2019, Intel Corporation. All rights reserved.
 #
@@ -7,11 +7,6 @@
 #
 ##
 [Defines]
-  #
-  # Set platform specific package/folder name, same as passed from PREBUILD 
script.
-  # PLATFORM_PACKAGE would be the same as PLATFORM_NAME as well as package 
build folder
-  # DEFINE only takes effect at R9 DSC and FDF.
-  #
   DEFINE  PLATFORM_PACKAGE= MinPlatformPkg
   DEFINE  PLATFORM_SI_PACKAGE = KabylakeSiliconPkg
   DEFINE  PLATFORM_SI_BIN_PACKAGE = KabylakeSiliconBinPkg
@@ -21,7 +16,7 @@
   DEFINE  PROJECT = 
$(PLATFORM_BOARD_PACKAGE)/$(BOARD)
 
   #
-  # Platform On/Off features are defined here
+  # Include PCD configuration for this board.
   #
   !include OpenBoardPkgPcd.dsc
 
@@ -53,8 +48,7 @@
 
 

 #
-# SKU Identification section - list of all SKU IDs supported by this
-#  Platform.
+# SKU Identification section - list of all SKU IDs supported by this board.
 #
 

 [SkuIds]
@@ -63,220 +57,261 @@
 
 

 #
-# Library Class section - list of all Library Classes needed by this Platform.
+# Includes section - other DSC file contents included for this board build.
 #
 

 
+###
+# Library Includes
+###
 !include $(PLATFORM_PACKAGE)/Include/Dsc/CoreCommonLib.dsc
 !include $(PLATFORM_PACKAGE)/Include/Dsc/CorePeiLib.dsc
 !include $(PLATFORM_PACKAGE)/Include/Dsc/CoreDxeLib.dsc
+!include $(PLATFORM_SI_PACKAGE)/SiPkgCommonLib.dsc
+!include $(PLATFORM_SI_PACKAGE)/SiPkgPeiLib.dsc
+!include $(PLATFORM_SI_PACKAGE)/SiPkgDxeLib.dsc
+
+###
+# Component Includes
+###
+[Components.IA32]
+!include $(PLATFORM_PACKAGE)/Include/Dsc/CorePeiInclude.dsc
+!include $(PLATFORM_SI_PACKAGE)/SiPkgPei.dsc
+
+[Components.X64]
+!include $(PLATFORM_PACKAGE)/Include/Dsc/CoreDxeInclude.dsc
+!include $(PLATFORM_SI_PACKAGE)/SiPkgDxe.dsc
+
+###
+# Build Option Includes
+###
+!include $(PLATFORM_SI_PACKAGE)/SiPkgBuildOption.dsc
+!include OpenBoardPkgBuildOption.dsc
+
+
+#
+# Library Class section - list of all Library Classes needed by this board.
+#
+
 
 [LibraryClasses.common]
-
-  PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
-  
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
-
-  
PciHostBridgeLib|$(PLATFORM_PACKAGE)/Pci/Library/PciHostBridgeLibSimple/PciHostBridgeLibSimple.inf
-  
PciSegmentInfoLib|$(PLATFORM_PACKAGE)/Pci/Library/PciSegmentInfoLibSimple/PciSegmentInfoLibSimple.inf
-  
PlatformBootManagerLib|$(PLATFORM_PACKAGE)/Bds/Library/DxePlatformBootManagerLib/DxePlatformBootManagerLib.inf
-  
I2cAccessLib|$(PLATFORM_BOARD_PACKAGE)/Library/PeiI2cAccessLib/PeiI2cAccessLib.inf
-  
GpioExpanderLib|$(PLATFORM_BOARD_PACKAGE)/Library/BaseGpioExpanderLib/BaseGpioExpanderLib.inf
-
-  
PlatformHookLib|$(PROJECT)/Library/BasePlatformHookLib/BasePlatformHookLib.inf
-
-  
FspWrapperHobProcessLib|$(PLATFORM_PACKAGE)/FspWrapper/Library/PeiFspWrapperHobProcessLib/PeiFspWrapperHobProcessLib.inf
-  
PlatformSecLib|$(PLATFORM_BOARD_PACKAGE)/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecFspWrapperPlatformSecLib.inf
-
+  

[edk2-devel] [edk2-platforms][PATCH V1 12/17] WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: DSC cleanup

2019-10-07 Thread Kubacki, Michael A
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2243

This change refactors OpenBoardPkg.dsc and OpenBoardPkgPcd.dsc to
consolidate redundant sections and better group file content to
improve maintainability and readability.

The same pattern made in this change for WhiskeylakeURvp is being
applied to all existing board packages in Platform/Intel to improve
overall consistency.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc| 
502 +++-
 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc | 
441 +
 2 files changed, 510 insertions(+), 433 deletions(-)

diff --git 
a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
index 1d07fdea84..d6eb66a880 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
@@ -1,20 +1,13 @@
 ## @file
-#  Platform description.
-#
+#  The main build description file for the WhiskeylakeURvp board.
 #
 #  Copyright (c) 2019, Intel Corporation. All rights reserved.
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
-#
 ##
 
 [Defines]
-  #
-  # Set platform specific package/folder name, same as passed from PREBUILD 
script.
-  # PLATFORM_PACKAGE would be the same as PLATFORM_NAME as well as package 
build folder
-  # DEFINE only takes effect at R9 DSC and FDF.
-  #
   DEFINE  PLATFORM_PACKAGE  = MinPlatformPkg
   DEFINE  PLATFORM_SI_PACKAGE   = CoffeelakeSiliconPkg
   DEFINE  PLATFORM_SI_BIN_PACKAGE   = CoffeelakeSiliconBinPkg
@@ -24,7 +17,7 @@
   DEFINE  PROJECT   = $(PLATFORM_BOARD_PACKAGE)/$(BOARD)
 
   #
-  # Platform On/Off features are defined here
+  # Include PCD configuration for this board.
   #
   !include OpenBoardPkgPcd.dsc
 
@@ -42,8 +35,6 @@
   SUPPORTED_ARCHITECTURES = IA32|X64
   BUILD_TARGETS   = DEBUG|RELEASE
   SKUID_IDENTIFIER= ALL
-
-
   FLASH_DEFINITION= $(PROJECT)/OpenBoardPkg.fdf
 
   FIX_LOAD_TOP_MEMORY_ADDRESS = 0x0
@@ -56,163 +47,238 @@
 
 

 #
-# SKU Identification section - list of all SKU IDs supported by this
-#  Platform.
+# SKU Identification section - list of all SKU IDs supported by this board.
 #
 

 [SkuIds]
-  0|DEFAULT  # The entry: 0|DEFAULT is reserved and always 
required.
+  0|DEFAULT  # 0|DEFAULT is reserved and always required.
   0x60|WhiskeylakeURvp
 
 

 #
-# Library Class section - list of all Library Classes needed by this Platform.
+# Includes section - other DSC file contents included for this board build.
 #
 

 
-  !include $(PLATFORM_PACKAGE)/Include/Dsc/CoreCommonLib.dsc
-  !include $(PLATFORM_PACKAGE)/Include/Dsc/CorePeiLib.dsc
-  !include $(PLATFORM_PACKAGE)/Include/Dsc/CoreDxeLib.dsc
+###
+# Library Includes
+###
+!include $(PLATFORM_PACKAGE)/Include/Dsc/CoreCommonLib.dsc
+!include $(PLATFORM_PACKAGE)/Include/Dsc/CorePeiLib.dsc
+!include $(PLATFORM_PACKAGE)/Include/Dsc/CoreDxeLib.dsc
+!include $(PLATFORM_SI_PACKAGE)/SiPkgCommonLib.dsc
+!include $(PLATFORM_SI_PACKAGE)/SiPkgPeiLib.dsc
+!include $(PLATFORM_SI_PACKAGE)/SiPkgDxeLib.dsc
+
+###
+# Component Includes
+###
+[Components.IA32]
+!include $(PLATFORM_PACKAGE)/Include/Dsc/CorePeiInclude.dsc
+!include $(PLATFORM_SI_PACKAGE)/SiPkgPei.dsc
+
+[Components.X64]
+!include $(PLATFORM_PACKAGE)/Include/Dsc/CoreDxeInclude.dsc
+!include $(PLATFORM_SI_PACKAGE)/SiPkgDxe.dsc
+
+###
+# Build Option Includes
+###
+!include $(PLATFORM_SI_PACKAGE)/SiPkgBuildOption.dsc
+!include OpenBoardPkgBuildOption.dsc
+
+
+#
+# Library Class section - list of all Library Classes needed by this board.
+#
+
 
 [LibraryClasses.common]
-
-  PeiLib|$(PLATFORM_PACKAGE)/Library/PeiLib/PeiLib.inf
-  
ReportFvLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/PeiReportFvLib/PeiReportFvLib.inf
-
-  
PciHostBridgeLib|$(PLATFORM_PACKAGE)/Pci/Library/PciHostBridgeLibSimple/PciHostBridgeLibSimple.inf
-  
PciSegmentInfoLib|$(PLATFORM_PACKAGE)/Pci/Library/PciSegmentInfoLibSimple/PciSegmentInfoLibSimple.inf
-  

[edk2-devel] [edk2-platforms][PATCH V1 08/17] WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: Relocate PCD DSC include

2019-10-07 Thread Kubacki, Michael A
This change moves the include of OpenBoardPkgPcd.dsc to the top of
OpenBoardPkg.dsc to improve visibility and align the placement with
other board DSC files.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
index eea809140c..9a516cad60 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
@@ -27,6 +27,7 @@
   # Platform On/Off features are defined here
   #
   !include OpenBoardPkgConfig.dsc
+  !include OpenBoardPkgPcd.dsc
 
 

 #
@@ -190,7 +191,6 @@
 [LibraryClasses.X64.DXE_RUNTIME_DRIVER]
   
ResetSystemLib|$(PLATFORM_SI_PACKAGE)/Pch/Library/DxeRuntimeResetSystemLib/DxeRuntimeResetSystemLib.inf
   DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf
-  !include OpenBoardPkgPcd.dsc
 
 [Components.IA32]
   #
-- 
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48536): https://edk2.groups.io/g/devel/message/48536
Mute This Topic: https://groups.io/mt/34439444/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms][PATCH V1 02/17] KabylakeSiliconPkg: Add DSC include file section tags

2019-10-07 Thread Kubacki, Michael A
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2245

The DSC LibraryClass files in KabylakeSiliconPkg that are intended
to be included elsewhere such as SiPkgPeiLib.dsc, SiPkgDxeLib.dsc,
and SiPkgCommonLib.dsc should have section tags so that they are
not dependent on the top-level DSC file to place the include file
in the correct location in the DSC file and better define the
applicability of their library content.

This change adds section tags for the library class related files.
The component files may be built differently in the consuming package
depending on their architecture requirements so those are not
modified.

Cc: Sai Chaganty 
Cc: Chasel Chiu 
Signed-off-by: Michael Kubacki 
---
 Silicon/Intel/KabylakeSiliconPkg/SiPkgCommonLib.dsc | 6 --
 Silicon/Intel/KabylakeSiliconPkg/SiPkgDxeLib.dsc| 5 +++--
 Silicon/Intel/KabylakeSiliconPkg/SiPkgPeiLib.dsc| 3 ++-
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/Silicon/Intel/KabylakeSiliconPkg/SiPkgCommonLib.dsc 
b/Silicon/Intel/KabylakeSiliconPkg/SiPkgCommonLib.dsc
index 920b02e410..fa9dd4a32d 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/SiPkgCommonLib.dsc
+++ b/Silicon/Intel/KabylakeSiliconPkg/SiPkgCommonLib.dsc
@@ -1,11 +1,13 @@
 ## @file
-#  Component description file for the SkyLake SiPkg both Pei and Dxe libraries 
DSC file.
+#  Build description file for Kaby Lake silicon PEI and DXE libraries.
 #
-# Copyright (c) 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
+
+[LibraryClasses.common]
 #
 # Silicon Init Common Library
 #
diff --git a/Silicon/Intel/KabylakeSiliconPkg/SiPkgDxeLib.dsc 
b/Silicon/Intel/KabylakeSiliconPkg/SiPkgDxeLib.dsc
index 8c194d8e7c..bc497c3531 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/SiPkgDxeLib.dsc
+++ b/Silicon/Intel/KabylakeSiliconPkg/SiPkgDxeLib.dsc
@@ -1,12 +1,13 @@
 # @file
-#  Component description file for the SkyLake SiPkg DXE libraries.
+#  Build description file for Kaby Lake silicon DXE libraries.
 #
-# Copyright (c) 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
+[LibraryClasses.common.DXE_CORE,LibraryClasses.common.DXE_SMM_DRIVER,LibraryClasses.common.SMM_CORE,LibraryClasses.common.DXE_DRIVER,LibraryClasses.common.DXE_RUNTIME_DRIVER,LibraryClasses.common.UEFI_DRIVER]
 #
 # Silicon Init Dxe Library
 #
diff --git a/Silicon/Intel/KabylakeSiliconPkg/SiPkgPeiLib.dsc 
b/Silicon/Intel/KabylakeSiliconPkg/SiPkgPeiLib.dsc
index 86e34ff359..5334598544 100644
--- a/Silicon/Intel/KabylakeSiliconPkg/SiPkgPeiLib.dsc
+++ b/Silicon/Intel/KabylakeSiliconPkg/SiPkgPeiLib.dsc
@@ -1,5 +1,5 @@
 ## @file
-#  Component description file for the SkyLake SiPkg PEI libraries.
+#  Build description file for Kaby Lake silicon PEI libraries.
 #
 # Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
 #
@@ -7,6 +7,7 @@
 #
 ##
 
+[LibraryClasses]
 #
 # Silicon Init Pei Library
 #
-- 
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48530): https://edk2.groups.io/g/devel/message/48530
Mute This Topic: https://groups.io/mt/34439437/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms][PATCH V1 14/17] SimicsOpenBoardPkg/BoardX58Ich10: Relocate DSC includes

2019-10-07 Thread Kubacki, Michael A
This change moves the following DSC file includes to the top of
the OpenBoardPkg.dsc file. This is to improve visibility and
align placement of the include with other board DSC files.

 * OpenBoardPkgConfig.dsc
 * OpenBoardPkgPcd.dsc
 * CorePeiLib.dsc
 * CoreDxeLib.dsc

Cc: Agyeman Prince 
Cc: Wei David Y 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc | 21 
+++-
 1 file changed, 7 insertions(+), 14 deletions(-)

diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc 
b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
index 59e13154a7..be29737c16 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
+++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
@@ -39,7 +39,11 @@
   DEFINE NETWORK_TLS_ENABLE = FALSE
   DEFINE NETWORK_ISCSI_ENABLE   = FALSE
   DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE
+
+  !include $(BOARD_PKG)/$(BOARD_NAME)/OpenBoardPkgConfig.dsc
+  !include $(BOARD_PKG)/$(BOARD_NAME)/OpenBoardPkgPcd.dsc
   !include NetworkPkg/NetworkDefines.dsc.inc
+
 

 #
 # SKU Identification section - list of all SKU IDs supported by this Platform.
@@ -54,12 +58,9 @@
 #
 

 
-[PcdsFeatureFlag]
-  #
-  # Platform On/Off features are defined here
-  #
-  !include $(BOARD_PKG)/$(BOARD_NAME)/OpenBoardPkgConfig.dsc
   !include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
+  !include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
+  !include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
   !include $(PCH_PKG)/IchCommonLib.dsc
 
 [LibraryClasses]
@@ -76,17 +77,13 @@
   
SiliconPolicyInitLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyInitLib/SiliconPolicyInitLib.inf
   
SiliconPolicyUpdateLib|$(BOARD_PKG)/Policy/Library/SiliconPolicyUpdateLib/SiliconPolicyUpdateLib.inf
   
PciSegmentInfoLib|MinPlatformPkg/Pci/Library/PciSegmentInfoLibSimple/PciSegmentInfoLibSimple.inf
-
-  !include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
-
   
S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
   AslUpdateLib|MinPlatformPkg/Acpi/Library/DxeAslUpdateLib/DxeAslUpdateLib.inf
   LogoLib|$(BOARD_PKG)/Library/DxeLogoLib/DxeLogoLib.inf
+
 [LibraryClasses.common.SEC]
   
ExtractGuidedSectionLib|MdePkg/Library/BaseExtractGuidedSectionLib/BaseExtractGuidedSectionLib.inf
 
-[LibraryClasses.common.PEI_CORE]
-
 [LibraryClasses.common.PEIM]
   
PeiResourcePublicationLib|MdePkg/Library/PeiResourcePublicationLib/PeiResourcePublicationLib.inf
   MpInitLib|UefiCpuPkg/Library/MpInitLib/PeiMpInitLib.inf
@@ -97,16 +94,12 @@
 !endif
   TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/PeiTestPointLib.inf
 
-  !include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
-
 [LibraryClasses.common.DXE_DRIVER]
   
PlatformBootManagerLib|$(BOARD_PKG)/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
 
 [LibraryClasses.common.DXE_SMM_DRIVER]
   
SpiFlashCommonLib|$(PCH_PKG)/Library/SmmSpiFlashCommonLib/SmmSpiFlashCommonLib.inf
 
-  !include $(BOARD_PKG)/$(BOARD_NAME)/OpenBoardPkgPcd.dsc
-
 [Components.IA32]
   $(BOARD_PKG)/SecCore/SecMain.inf {
 
-- 
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48542): https://edk2.groups.io/g/devel/message/48542
Mute This Topic: https://groups.io/mt/34439450/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platforms][PATCH V1 16/17] SimicsOpenBoardPkg/BoardX58Ich10: DSC cleanup

2019-10-07 Thread Kubacki, Michael A
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2244

This change refactors OpenBoardPkg.dsc and OpenBoardPkgPcd.dsc to
consolidate redundant sections and better group file content to
improve maintainability and readability.

The same pattern made in this change for BoardX58Ich10 is being
applied to all existing board packages in Platform/Intel to improve
overall consistency.

Cc: Agyeman Prince 
Cc: Wei David Y 
Signed-off-by: Michael Kubacki 
---
 Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc| 282 
+++--
 Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc | 418 
+---
 2 files changed, 361 insertions(+), 339 deletions(-)

diff --git a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc 
b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
index 40f864ae17..4f8ab4170d 100644
--- a/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
+++ b/Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc
@@ -1,6 +1,7 @@
 ## @file
+#  The main build description file for the X58Ich10 board.
 #
-# Copyright (c) 2019 Intel Corporation. All rights reserved. 
+# Copyright (c) 2019, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -33,7 +34,7 @@
   DEFINE SMM_REQUIRE = TRUE
 
   #
-  #PLATFORMX64_ENABLE is set to TRUE when PEI is IA32 and DXE is X64 platform
+  # PLATFORMX64_ENABLE is set to TRUE when PEI is IA32 and DXE is X64 platform
   #
   DEFINE PLATFORMX64_ENABLE = TRUE
   DEFINE NETWORK_TLS_ENABLE = FALSE
@@ -45,7 +46,7 @@
 
 

 #
-# SKU Identification section - list of all SKU IDs supported by this Platform.
+# SKU Identification section - list of all SKU IDs supported by this board.
 #
 

 [SkuIds]
@@ -53,173 +54,232 @@
 
 

 #
-# Library Class section - list of all Library Classes needed by this Platform.
+# Includes section - other DSC file contents included for this board build.
 #
 

 
-  !include MinPlatformPkg/Include/Dsc/CoreCommonLib.dsc
-  !include MinPlatformPkg/Include/Dsc/CorePeiLib.dsc
-  !include MinPlatformPkg/Include/Dsc/CoreDxeLib.dsc
-  !include $(PCH_PKG)/IchCommonLib.dsc
+###
+# Library Includes
+###
+!include $(PLATFORM_PACKAGE)/Include/Dsc/CoreCommonLib.dsc
+!include $(PLATFORM_PACKAGE)/Include/Dsc/CorePeiLib.dsc
+!include $(PLATFORM_PACKAGE)/Include/Dsc/CoreDxeLib.dsc
+!include $(PCH_PKG)/IchCommonLib.dsc
+
+###
+# Component Includes
+###
+[Components.IA32]
+!include $(PLATFORM_PACKAGE)/Include/Dsc/CorePeiInclude.dsc
+!include $(SKT_PKG)/SktPkgPei.dsc
+
+[Components.X64]
+!include $(PLATFORM_PACKAGE)/Include/Dsc/CoreDxeInclude.dsc
+!include AdvancedFeaturePkg/Include/Dsc/CoreAdvancedDxeInclude.dsc
+
+###
+# Build Option Includes
+###
+!include $(BOARD_PKG)/$(BOARD_NAME)/OpenBoardPkgBuildOption.dsc
+
+
+#
+# Library Class section - list of all Library Classes needed by this board.
+#
+
 
 [LibraryClasses]
-  ReportFvLib|$(BOARD_PKG)/Library/PeiReportFvLib/PeiReportFvLib.inf
+  ###
+  # Edk2 Packages
+  ###
   BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
+  
CpuExceptionHandlerLib|MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.inf
+  
S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
   SerialPortLib|PcAtChipsetPkg/Library/SerialIoLib/SerialIoLib.inf
+
+  #
+  # Platform Package
+  #
+  
AslUpdateLib|$(PLATFORM_PACKAGE)/Acpi/Library/DxeAslUpdateLib/DxeAslUpdateLib.inf
+  
BoardInitLib|$(PLATFORM_PACKAGE)/PlatformInit/Library/BoardInitLibNull/BoardInitLibNull.inf
+  
PciSegmentInfoLib|$(PLATFORM_PACKAGE)/Pci/Library/PciSegmentInfoLibSimple/PciSegmentInfoLibSimple.inf
+  
TestPointCheckLib|$(PLATFORM_PACKAGE)/Test/Library/TestPointCheckLibNull/TestPointCheckLibNull.inf
+
+  ###
+  # Board Package
+  ###
+  DxeLoadLinuxLib|$(BOARD_PKG)/Library/LoadLinuxLib/DxeLoadLinuxLib.inf
+  LogoLib|$(BOARD_PKG)/Library/DxeLogoLib/DxeLogoLib.inf
   NvVarsFileLib|$(BOARD_PKG)/Library/NvVarsFileLib/NvVarsFileLib.inf
+  

[edk2-devel] [edk2-platforms][PATCH V1 00/17] Intel Board Package Cleanup

2019-10-07 Thread Kubacki, Michael A
This patch series affects the following packages/boards.
 1. KabylakeOpenBoardPkg/KabylakeRvp3
 2. KabylakeOpenBoardPkg/GalagoPro3
 3. WhiskeylakeOpenBoardPkg/WhiskeylakeURvp
 4. SimicsOpenBoardPkg/BoardX58Ich10

The following high-level changes are done for each board.
 1. Remove the file OpenBoardPkgConfig.dsc
The file contents are merged into OpenBoardPkgPcd.dsc.

 2. Make the order and location of DSC files included into
OpenBoardPkg.dsc consistent across all boards.

 3. Refactor OpenBoardPkg.dsc and OpenBoardPkgPcd.dsc such that
duplicate sections are consolidated, duplicate PCDs are cleaned
up, and a consistent format is applied across the files improving
maintainability and readability.

 4. Assign a unique PCD token namespace string and value for each board
package.

Cc: Sai Chaganty 
Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Agyeman Prince 
Cc: Jeremy Soller 
Cc: Wei David Y 
Signed-off-by: Michael Kubacki 

Michael Kubacki (17):
  KabylakeOpenBoardPkg/KabylakeRvp3: Remove OpenBoardPkgConfig.dsc
  KabylakeSiliconPkg: Add DSC include file section tags
  KabylakeOpenBoardPkg/KabylakeRvp3: DSC cleanup
  KabylakeOpenBoardPkg/GalagoPro3: Relocate PCD DSC include
  KabylakeOpenBoardPkg/GalagoPro3: Remove OpenBoardPkgConfig.dsc
  KabylakeOpenBoardPkg/GalagoPro3: DSC cleanup
  KabylakeOpenBoardPkg: Assign unique token namespace
  WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: Relocate PCD DSC include
  WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: Remove OpenBoardPkgConfig.dsc
  CoffeelakeSiliconPkg: Add DSC include file section tags
  WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: Update FSP base PCDs
  WhiskeylakeOpenBoardPkg/WhiskeylakeURvp: DSC cleanup
  WhiskeylakeOpenBoardPkg: Assign unique token namespace
  SimicsOpenBoardPkg/BoardX58Ich10: Relocate DSC includes
  SimicsOpenBoardPkg/BoardX58Ich10: Remove OpenBoardPkgConfig.dsc
  SimicsOpenBoardPkg/BoardX58Ich10: DSC cleanup
  SimicsOpenBoardPkg: Assign unique token namespace

 Platform/Intel/KabylakeOpenBoardPkg/OpenBoardPkg.dec   
   | 408 ++--
 Platform/Intel/SimicsOpenBoardPkg/OpenBoardPkg.dec 
   |  72 +--
 Platform/Intel/WhiskeylakeOpenBoardPkg/OpenBoardPkg.dec
   | 684 ++--
 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
   | 488 +++---
 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgConfig.dsc  
   | 132 
 Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkgPcd.dsc 
   | 438 +
 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc  
   | 520 ---
 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgConfig.dsc
   | 138 
 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc   
   | 467 -
 Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkg.dsc   
   | 296 +
 Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgConfig.dsc 
   |  56 --
 Platform/Intel/SimicsOpenBoardPkg/BoardX58Ich10/OpenBoardPkgPcd.dsc
   | 433 +++--
 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkg.dsc
   | 509 ---
 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgConfig.dsc  
   | 128 
 Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc 
   | 395 +++
 Silicon/Intel/CoffeelakeSiliconPkg/SiPkgCommonLib.dsc  
   |   1 +
 Silicon/Intel/CoffeelakeSiliconPkg/SiPkgDxeLib.dsc 
   |   1 +
 Silicon/Intel/CoffeelakeSiliconPkg/SiPkgPeiLib.dsc 
   |   1 +
 Silicon/Intel/KabylakeSiliconPkg/SiPkgCommonLib.dsc
   |   6 +-
 Silicon/Intel/KabylakeSiliconPkg/SiPkgDxeLib.dsc   
   |   5 +-
 Silicon/Intel/KabylakeSiliconPkg/SiPkgPeiLib.dsc   
 

Re: [edk2-devel] [edk2-platforms] [PATCH V1] KabylakeOpenBoardPkg: Wrong instance of PlatformSecLib is used.

2019-10-07 Thread Chiu, Chasel

With this typo correction, Reviewed-by: Chasel Chiu 

> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Thursday, October 3, 2019 3:56 PM
> To: devel@edk2.groups.io; phi...@redhat.com
> Cc: Chiu, Chasel ; Kubacki, Michael A
> ; Jeremy Soller 
> Subject: RE: [edk2-devel] [edk2-platforms] [PATCH V1]
> KabylakeOpenBoardPkg: Wrong instance of PlatformSecLib is used.
> 
> Good catch, thank you!
> 
> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Philippe
> Mathieu-Daudé
> Sent: Thursday, October 3, 2019 12:40 AM
> To: devel@edk2.groups.io; Desimone, Nathaniel L
> 
> Cc: Chiu, Chasel ; Kubacki, Michael A
> ; Jeremy Soller 
> Subject: Re: [edk2-devel] [edk2-platforms] [PATCH V1]
> KabylakeOpenBoardPkg: Wrong instance of PlatformSecLib is used.
> 
> On 10/2/19 9:40 AM, Nate DeSimone wrote:
> > The GalagoPro3 platform in KabylakeOpenBoardPkg is using the instance
> > of PlatformSecLib in MinPlatformPkg instead of the instance in
> > KabylakeOpenBoardPkg. The version in MinPlatformPkg does not support
> > FSP 2.1 Dispatch Mode, whearas the version in
> 
> typo: "whereas"
> 
> > KabylakeOpenBoardPkg does.
> >
> > Cc: Chasel Chiu 
> > Cc: Michael Kubacki 
> > Cc: Jeremy Soller 
> > Signed-off-by: Nate DeSimone 
> > ---
> >   Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc |
> 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git
> > a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> > b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> > index d67e0cc000..f3dd2b0c91 100644
> > ---
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> > +++
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/OpenBoardPkg.dsc
> > @@ -85,7 +85,7 @@
> >
> >
> PlatformHookLib|$(PROJECT)/Library/BasePlatformHookLib/BasePlatformHo
> o
> > kLib.inf
> >
> >
> >
> FspWrapperHobProcessLib|$(PLATFORM_PACKAGE)/FspWrapper/Library/PeiF
> spW
> > rapperHobProcessLib/PeiFspWrapperHobProcessLib.inf
> > -
> >
> PlatformSecLib|$(PLATFORM_PACKAGE)/FspWrapper/Library/SecFspWrapper
> Pla
> > tformSecLib/SecFspWrapperPlatformSecLib.inf
> > +
> > +
> PlatformSecLib|$(PLATFORM_BOARD_PACKAGE)/FspWrapper/Library/SecFsp
> Wr
> > + apperPlatformSecLib/SecFspWrapperPlatformSecLib.inf
> >
> >
> >
> FspWrapperApiLib|IntelFsp2WrapperPkg/Library/BaseFspWrapperApiLib/Bas
> e
> > FspWrapperApiLib.inf
> >
> >
> FspWrapperApiTestLib|IntelFsp2WrapperPkg/Library/PeiFspWrapperApiTestL
> > ib/PeiFspWrapperApiTestLib.inf
> >
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48527): https://edk2.groups.io/g/devel/message/48527
Mute This Topic: https://groups.io/mt/34367442/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms] [PATCH V2] KabylakeOpenBoardPkg: Resize FSP-T to accommodate debug FSP builds.

2019-10-07 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 


> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Saturday, October 5, 2019 4:45 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Kubacki, Michael A
> ; Jeremy Soller 
> Subject: [edk2-platforms] [PATCH V2] KabylakeOpenBoardPkg: Resize FSP-T to
> accommodate debug FSP builds.
> 
> Resize the flash map for the GalagoPro3 platform to provide enough space
> to accommodate a debug build of FSP-T.
> 
> Cc: Chasel Chiu 
> Cc: Michael Kubacki 
> Cc: Jeremy Soller 
> Signed-off-by: Nate DeSimone 
> ---
>  .../GalagoPro3/Include/Fdf/FlashMapInclude.fdf  | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Include/Fdf/FlashMapI
> nclude.fdf
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Include/Fdf/FlashMapI
> nclude.fdf
> index b33b1e09a9..e024dd127c 100644
> ---
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Include/Fdf/FlashMapI
> nclude.fdf
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/Include/Fdf/FlashMa
> +++ pInclude.fdf
> @@ -41,8 +41,8 @@ SET gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvSize
> = 0x000A
>  SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSOffset
> = 0x0044  # Flash addr (0xFFE6) SET
> gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSSize=
> 0x0006  # SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMOffset
> = 0x004A  # Flash addr (0xFFEC)-SET
> gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMSize=
> 0x000BC000  #-SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTOffset
> = 0x0055C000  # Flash addr (0xFFF7C000)-SET
> gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTSize=
> 0x4000  #+SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMSize
> = 0x000BA000  #+SET
> gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTOffset  =
> 0x0055A000  # Flash addr (0xFFF7A000)+SET
> gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTSize=
> 0x6000  # SET
> gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPreMemoryOffset =
> 0x0056  # Flash addr (0xFFF8) SET
> gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPreMemorySize   =
> 0x0008  #--
> 2.23.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48526): https://edk2.groups.io/g/devel/message/48526
Mute This Topic: https://groups.io/mt/34398766/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms] [PATCH V2] KabylakeSiliconPkg: Logic Error in EISS bit ASSERT

2019-10-07 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Nate
> DeSimone
> Sent: Saturday, October 5, 2019 4:14 AM
> To: devel@edk2.groups.io
> Cc: Chiu, Chasel ; Kubacki, Michael A
> ; Chaganty, Rangasai V
> 
> Subject: [edk2-devel] [edk2-platforms] [PATCH V2] KabylakeSiliconPkg: Logic
> Error in EISS bit ASSERT
> 
> Current ASSERT logic checks that the EISS bit is still set after we clear it. 
> This
> is incorrect, it should be checking that that the EISS bit is clear after we 
> clear
> it.
> 
> Cc: Chasel Chiu 
> Cc: Michael Kubacki 
> Cc: Sai Chaganty 
> Signed-off-by: Nate DeSimone 
> ---
>  .../Intel/KabylakeSiliconPkg/Pch/Library/PeiSpiLib/PeiSpiLib.c  | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git 
> a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiSpiLib/PeiSpiLib.c
> b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiSpiLib/PeiSpiLib.c
> index aadc367a9f..c34c378de2 100644
> --- a/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiSpiLib/PeiSpiLib.c
> +++ b/Silicon/Intel/KabylakeSiliconPkg/Pch/Library/PeiSpiLib/PeiSpiLib.c
> @@ -184,7 +184,7 @@ DisableBiosWriteProtect (
>  B_PCH_SPI_BC_WPD ); -  ASSERT ((PciSegmentRead8
> (SpiBaseAddress + R_PCH_SPI_BC) & B_PCH_SPI_BC_EISS) != 0);+  ASSERT
> ((PciSegmentRead8 (SpiBaseAddress + R_PCH_SPI_BC) & B_PCH_SPI_BC_EISS)
> == 0);return EFI_SUCCESS; }--
> 2.23.0.windows.1
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> 
> View/Reply Online (#48489): https://edk2.groups.io/g/devel/message/48489
> Mute This Topic: https://groups.io/mt/34398391/1777047
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub  [chasel.c...@intel.com]
> -=-=-=-=-=-=


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48525): https://edk2.groups.io/g/devel/message/48525
Mute This Topic: https://groups.io/mt/34398391/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH V2 7/9] MdeModulePkg/Variable: Add RT GetVariable() cache support

2019-10-07 Thread Wu, Hao A
Inline replies below:


> -Original Message-
> From: Kubacki, Michael A
> Sent: Friday, October 04, 2019 5:54 AM
> To: Wu, Hao A; devel@edk2.groups.io
> Cc: Bi, Dandan; Ard Biesheuvel; Dong, Eric; Laszlo Ersek; Gao, Liming; Kinney,
> Michael D; Ni, Ray; Wang, Jian J; Yao, Jiewen
> Subject: RE: [PATCH V2 7/9] MdeModulePkg/Variable: Add RT GetVariable()
> cache support
> 
> #1 - The plan is to remove the polling entirely in V3.
> 
> #2 - I'd prefer to take a definitive direction and reduce validation and
> maintenance
> effort but you and Laszlo both requested this so I'll add a 
> FeaturePCD to
> control
> activation of the runtime cache in this patch series. Perhaps this 
> can be
> removed
> in the future.
> 
> #3 - Will be done in V3.
> 
> Other replies are inline.
> 
> > -Original Message-
> > From: Wu, Hao A 
> > Sent: Thursday, October 3, 2019 1:05 AM
> > To: Kubacki, Michael A ;
> > devel@edk2.groups.io
> > Cc: Bi, Dandan ; Ard Biesheuvel
> > ; Dong, Eric ; Laszlo
> Ersek
> > ; Gao, Liming ; Kinney,
> Michael
> > D ; Ni, Ray ; Wang, Jian J
> > ; Yao, Jiewen 
> > Subject: RE: [PATCH V2 7/9] MdeModulePkg/Variable: Add RT GetVariable()
> > cache support
> >
> > Before any comment on the patch, since I am not experienced in the
> > Variable
> > driver, I would like to ask for help from other reviewers to look into this
> > patch and provide feedbacks as well. Thanks in advance.
> >
> > With the above fact, some comments provided below maybe wrong. So
> > please help
> > to kindly correct me.
> >
> >
> > Some general comments:
> > 1. I am not sure if bringing the TimerLib dependency (delay in acquiring the
> >runtime cache read lock) to variable driver (a software driver for the 
> > most
> >part) is a good idea.
> >
> >Hope other reviewers can provide some feedbacks for this. Thanks in
> > advance.
> >
> > 2. In my opinion, I prefer a switch can be provided for platform owners to
> >choose between using the runtime cache and going through SMM for
> > GetVariable
> >(and for GetNextVariableName in the next patch as well).
> >
> >If platform owners feel uncomfortable with using the runtime cache with
> >regard to the security perspective, they can switch to the origin 
> > solution.
> >
> > 3. Please help to remove the 'EFIAPI' keyword for new driver internal
> > functions;
> >
> >
> > Inline comments below:
> >
> >
> > > -Original Message-
> > > From: Kubacki, Michael A
> > > Sent: Saturday, September 28, 2019 9:47 AM
> > > To: devel@edk2.groups.io
> > > Cc: Bi, Dandan; Ard Biesheuvel; Dong, Eric; Laszlo Ersek; Gao, Liming;
> > Kinney,
> > > Michael D; Ni, Ray; Wang, Jian J; Wu, Hao A; Yao, Jiewen
> > > Subject: [PATCH V2 7/9] MdeModulePkg/Variable: Add RT GetVariable()
> > > cache support
> > >
> > > REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2220
> > >
> > > This change reduces SMIs for GetVariable () by maintaining a
> > > UEFI variable cache in Runtime DXE in addition to the pre-
> > > existing cache in SMRAM. When the Runtime Service GetVariable()
> > > is invoked, a Runtime DXE cache is used instead of triggering an
> > > SMI to VariableSmm. This can improve overall system performance
> > > by servicing variable read requests without rendezvousing all
> > > cores into SMM.
> > >
> > > The following are important points regarding this change.
> > >
> > > 1. All of the non-volatile storage contents are loaded into the
> > >cache upon driver load. This one time load operation from storage
> > >is preferred as opposed to building the cache on demand. An on-
> > >demand cache would require a fallback SMI to load data into the
> > >cache as variables are requested.
> > >
> > > 2. SetVariable () requests will continue to always trigger an SMI.
> > >This occurs regardless of whether the variable is volatile or
> > >non-volatile.
> > >
> > > 3. Both volatile and non-volatile variables are cached in a runtime
> > >buffer. As is the case in the current EDK II variable driver, they
> > >continue to be cached in separate buffers.
> > >
> > > 4. The cache in Runtime DXE and SMM are intended to be exact copies
> > >of one another. All SMM variable accesses only return data from the
> > >SMM cache. The runtime caches are only updated after the variable I/O
> > >operation is successful in SMM. The runtime caches are only updated
> > >from SMM.
> > >
> > > 5. Synchronization mechanisms are in place to ensure the runtime cache
> > >content integrity with the SMM cache. These may result in updates to
> > >runtime cache that are the same in content but different in offset and
> > >size from updates to the SMM cache.
> > >
> > > When using SMM variables, two caches will now be present.
> > > 1. "Runtime Cache" - Maintained in VariableSmmRuntimeDxe. Used to
> > > service
> > >Runtime Services GetVariable () and GetNextVariableName () callers.
> > > 2. "SMM Cache" - Maintained 

Re: [edk2-devel] [PATCH V2 3/9] MdeModulePkg/Variable: Parameterize VARIABLE_INFO_ENTRY buffer

2019-10-07 Thread Wu, Hao A
> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Kubacki, Michael A
> Sent: Friday, October 04, 2019 2:06 AM
> To: Wu, Hao A; devel@edk2.groups.io
> Cc: Bi, Dandan; Ard Biesheuvel; Dong, Eric; Laszlo Ersek; Gao, Liming; Kinney,
> Michael D; Ni, Ray; Wang, Jian J; Yao, Jiewen
> Subject: Re: [edk2-devel] [PATCH V2 3/9] MdeModulePkg/Variable:
> Parameterize VARIABLE_INFO_ENTRY buffer
> 
> Your understanding is correct.


Thanks for the confirmation.
Could you help to refine the commit message in the next series? Thanks.

Best Regards,
Hao Wu


> 
> Thanks,
> Michael
> 
> > -Original Message-
> > From: Wu, Hao A 
> > Sent: Thursday, October 3, 2019 1:04 AM
> > To: Kubacki, Michael A ;
> > devel@edk2.groups.io
> > Cc: Bi, Dandan ; Ard Biesheuvel
> > ; Dong, Eric ; Laszlo
> Ersek
> > ; Gao, Liming ; Kinney,
> Michael
> > D ; Ni, Ray ; Wang, Jian J
> > ; Yao, Jiewen 
> > Subject: RE: [PATCH V2 3/9] MdeModulePkg/Variable: Parameterize
> > VARIABLE_INFO_ENTRY buffer
> >
> > > -Original Message-
> > > From: Kubacki, Michael A
> > > Sent: Saturday, September 28, 2019 9:47 AM
> > > To: devel@edk2.groups.io
> > > Cc: Bi, Dandan; Ard Biesheuvel; Dong, Eric; Laszlo Ersek; Gao, Liming;
> > > Kinney, Michael D; Ni, Ray; Wang, Jian J; Wu, Hao A; Yao, Jiewen
> > > Subject: [PATCH V2 3/9] MdeModulePkg/Variable: Parameterize
> > > VARIABLE_INFO_ENTRY buffer
> > >
> > > UpdateVariableInfo () currently accepts parameters regarding updates
> > > to be made to a global variable of type VARIABLE_INFO_ENTRY. This
> > > change passes the structure by pointer to UpdateVariableInfo () so
> > > structures can be updated outside the fixed global variable.
> >
> >
> > For:
> > "... so structures can be updated outside the fixed global variable "
> >
> > Do you mean:
> >
> > VARIABLE_INFO_ENTRY structure pointers other than "" can
> > be passed to UpdateVariableInfo().
> >
> > Is my understanding correct? If so,
> > Reviewed-by: Hao A Wu 
> >
> > Best Regards,
> > Hao Wu
> >
> >
> > >
> > > Cc: Dandan Bi 
> > > Cc: Ard Biesheuvel 
> > > Cc: Eric Dong 
> > > Cc: Laszlo Ersek 
> > > Cc: Liming Gao 
> > > Cc: Michael D Kinney 
> > > Cc: Ray Ni 
> > > Cc: Jian J Wang 
> > > Cc: Hao A Wu 
> > > Cc: Jiewen Yao 
> > > Signed-off-by: Michael Kubacki 
> > > ---
> > >  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.h | 18
> > > +
> > >  MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c| 14
> +++---
> > -
> > >  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.c | 41
> > > +++-
> > >  3 files changed, 39 insertions(+), 34 deletions(-)
> > >
> > > diff --git
> > > a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.h
> > > b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.h
> > > index 0d231511ea..6f2000f3ee 100644
> > > --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.h
> > > +++
> b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.h
> > > @@ -286,13 +286,14 @@ GetNextVariableEx (
> > >the transaction. Data is allocated by this routine, but never
> > >freed.
> > >
> > > -  @param[in] VariableName   Name of the Variable to track.
> > > -  @param[in] VendorGuid Guid of the Variable to track.
> > > -  @param[in] Volatile   TRUE if volatile FALSE if non-volatile.
> > > -  @param[in] Read   TRUE if GetVariable() was called.
> > > -  @param[in] Write  TRUE if SetVariable() was called.
> > > -  @param[in] Delete TRUE if deleted via SetVariable().
> > > -  @param[in] Cache  TRUE for a cache hit.
> > > +  @param[in]  VariableName   Name of the Variable to track.
> > > +  @param[in]  VendorGuid Guid of the Variable to track.
> > > +  @param[in]  Volatile   TRUE if volatile FALSE if non-volatile.
> > > +  @param[in]  Read   TRUE if GetVariable() was called.
> > > +  @param[in]  Write  TRUE if SetVariable() was called.
> > > +  @param[in]  Delete TRUE if deleted via SetVariable().
> > > +  @param[in]  Cache  TRUE for a cache hit.
> > > +  @param[in,out]  VariableInfo   Pointer to a pointer of
> > > VARIABLE_INFO_ENTRY structures.
> > >
> > >  **/
> > >  VOID
> > > @@ -303,7 +304,8 @@ UpdateVariableInfo (
> > >IN  BOOLEAN Read,
> > >IN  BOOLEAN Write,
> > >IN  BOOLEAN Delete,
> > > -  IN  BOOLEAN Cache
> > > +  IN  BOOLEAN Cache,
> > > +  IN OUT VARIABLE_INFO_ENTRY  **VariableInfo
> > >);
> > >
> > >  #endif
> > > diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
> > > b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
> > > index 816e8f7b8f..1a57d7e1ba 100644
> > > --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
> > > +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
> > > @@ -1641,7 +1641,7 @@ UpdateVariable (
> > >  // go to 

Re: [edk2-devel] [PATCH V2 1/9] MdeModulePkg/Variable: Consolidate common parsing functions

2019-10-07 Thread Wu, Hao A
> -Original Message-
> From: Kubacki, Michael A
> Sent: Friday, October 04, 2019 1:36 AM
> To: Wu, Hao A; devel@edk2.groups.io
> Cc: Bi, Dandan; Ard Biesheuvel; Dong, Eric; Laszlo Ersek; Gao, Liming; Kinney,
> Michael D; Ni, Ray; Wang, Jian J; Yao, Jiewen
> Subject: RE: [PATCH V2 1/9] MdeModulePkg/Variable: Consolidate common
> parsing functions
> 
> The main reason is cohesiveness in the VariableParsing.c file. These are
> functions that
> are commonly needed for general variable data structure parsing operations.
> Most of
> them just read a member or two in a VARIABLE_STORE_HEADER or
> VARIABLE_HEADER
> data structure,  perform a simple calculation if needed, and return some
> value. More
> complex functions such as FindVariableEx (), do this in iteration across the
> variable store.
> If a function is needed that performs these tasks, it is easier to have them
> grouped into a
> cohesive file than search which one is in Variable.c and VariableParsing.c on 
> a
> case-by-case
> basis. UpdateVariableInfo () is the exception here, I can move this to a
> separate file
> if you prefer.


I am fine to leave this function under VariableParsing.c.


> 
> Also, Variable.c is, in my opinion, far too large. It is on trend to only grow
> larger:
>   * Today: ~4,600 LOC
>   * ~2 years ago: ~4,200 LOC
>   * ~4 years ago: ~4,100 LOC
>   * ~5 years ago: ~3,440 LOC
>   * ~8 years ago: ~2,600 LOC
> 
> I think moving out generic parsing services such as these better groups
> related
> functionality in the short-term but also aids future refactoring efforts in 
> the
> file.


Thanks for the clarification.

I suggest to update the commit message and add the above detailed criteria for
those functions that got moved to the new file.

Best Regards,
Hao Wu


> 
> Thanks,
> Michael
> 
> > -Original Message-
> > From: Wu, Hao A 
> > Sent: Thursday, October 3, 2019 1:03 AM
> > To: Kubacki, Michael A ;
> > devel@edk2.groups.io
> > Cc: Bi, Dandan ; Ard Biesheuvel
> > ; Dong, Eric ; Laszlo
> Ersek
> > ; Gao, Liming ; Kinney,
> Michael
> > D ; Ni, Ray ; Wang, Jian J
> > ; Yao, Jiewen 
> > Subject: RE: [PATCH V2 1/9] MdeModulePkg/Variable: Consolidate
> common
> > parsing functions
> >
> > A couple of inline comments below:
> >
> >
> > > -Original Message-
> > > From: Kubacki, Michael A
> > > Sent: Saturday, September 28, 2019 9:47 AM
> > > To: devel@edk2.groups.io
> > > Cc: Bi, Dandan; Ard Biesheuvel; Dong, Eric; Laszlo Ersek; Gao, Liming;
> > Kinney,
> > > Michael D; Ni, Ray; Wang, Jian J; Wu, Hao A; Yao, Jiewen
> > > Subject: [PATCH V2 1/9] MdeModulePkg/Variable: Consolidate common
> > > parsing functions
> > >
> > > This change moves the following functions into a dedicated file
> > > so they may be used in other variable files as needed. Furthermore,
> > > it reduces the overall size of the common Variable.c file.
> > >
> > >  * DataSizeOfVariable ()
> > >  * FindVariableEx ()
> > >  * GetEndPointer ()
> > >  * GetNextVariablePtr ()
> > >  * GetStartPointer ()
> > >  * GetVariableDataOffset ()
> > >  * GetVariableDataPtr ()
> > >  * GetVariableHeaderSize ()
> > >  * GetVariableNamePtr ()
> > >  * GetVariableStoreStatus ()
> > >  * GetVendorGuidPtr ()
> > >  * IsValidVariableHeader ()
> > >  * NameSizeOfVariable ()
> > >  * SetDataSizeOfVariable ()
> > >  * SetNameSizeOfVariable ()
> > >  * UpdateVariableInfo ()
> > >  * VariableCompareTimeStampInternal ()
> > >  * VariableServiceGetNextVariableInternal ()
> >
> >
> > May I know what are the criteria for the above functions being moved to a
> > separate file?
> >
> > At first, I think all of them will be consumed by the new codes that
> > implement
> > the runtime cache. But I found that, for functions like
> > GetVariableDataOffset(),
> > GetVariableStoreStatus() and etc., their usages are still remained within 
> > file
> > Variable.c (seems not related with the runtime cache).
> >
> >
> > >
> > > Cc: Dandan Bi 
> > > Cc: Ard Biesheuvel 
> > > Cc: Eric Dong 
> > > Cc: Laszlo Ersek 
> > > Cc: Liming Gao 
> > > Cc: Michael D Kinney 
> > > Cc: Ray Ni 
> > > Cc: Jian J Wang 
> > > Cc: Hao A Wu 
> > > Cc: Jiewen Yao 
> > > Signed-off-by: Michael Kubacki 
> > > ---
> > >
> MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
> > > |   2 +
> > >  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmm.inf  |
> > 2
> > > +
> > >
> > >
> >
> MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf
> > > |   7 +
> > >  MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.h   | 119
> -
> > ---
> > >  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.h|
> > 306
> > > 
> > >  MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c   | 726
> > +--
> > > 
> > >  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableExLib.c  |
> 3
> > +-
> > >  MdeModulePkg/Universal/Variable/RuntimeDxe/VariableParsing.c|
> > 731
> > > 
> > >  

Re: [edk2-devel] [edk2-platforms] [PATCH 5/5] Platform/Intel: Add FIT generation tool

2019-10-07 Thread Kubacki, Michael A
Looking at the commit message in more detail, it should be cleaned up in V2.

Please try to clarify the following specifically:

"boards to specify the GUID associated with the its Bios Info PEIM"

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Kubacki,
> Michael A
> Sent: Monday, October 7, 2019 6:37 PM
> To: Agyeman, Prince ; devel@edk2.groups.io
> Cc: Sinha, Ankit ; Desimone, Nathaniel L
> 
> Subject: Re: [edk2-devel] [edk2-platforms] [PATCH 5/5] Platform/Intel: Add
> FIT generation tool
> 
> Reviewed-by: Michael Kubacki 
> 
> > -Original Message-
> > From: Agyeman, Prince 
> > Sent: Thursday, October 3, 2019 2:13 PM
> > To: devel@edk2.groups.io
> > Cc: Sinha, Ankit ; Desimone, Nathaniel L
> > ; Kubacki, Michael A
> > 
> > Subject: [edk2-platforms] [PATCH 5/5] Platform/Intel: Add FIT
> > generation tool
> >
> > Added fit generation tool to the build process.
> >
> > What was done:
> >
> > Added BIOS_INFO_GUID to the build.cfg
> >
> > Added BIOS_INFO_GUID to GalagoPro3,
> > KabylakeRvp3 and WhiskeylakeURvp build_config.cfg This allows the
> > boards to specify the GUID associated with the its Bios Info PEIM
> >
> > BIOS_INFO_GUID is passed as an argument to FitGen in the FIT table
> > generation process
> >
> > Cc: Ankit Sinha 
> > Cc: Nate DeSimone 
> > Cc: Michael Kubacki 
> >
> > Signed-off-by: Prince Agyeman 
> > ---
> >  .../GalagoPro3/build_config.cfg   |  1 +
> >  .../KabylakeRvp3/build_config.cfg |  1 +
> >  .../WhiskeylakeURvp/build_config.cfg  |  1 +
> >  Platform/Intel/build.cfg  |  1 +
> >  Platform/Intel/build_bios.py  | 57 +++
> >  5 files changed, 61 insertions(+)
> >
> > diff --git
> > a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg
> > b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg
> > index 8c6c51abb4..3f64239a29 100644
> > --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg
> > +++
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg
> > @@ -31,3 +31,4 @@ FSP_PKG_NAME = KabylakeFspPkg
> FSP_BINARY_BUILD =
> > FALSE  FSP_TEST_RELEASE = FALSE  SECURE_BOOT_ENABLE = FALSE
> > +BIOS_INFO_GUID = 3132E669-D16B-4AA7-B09B-BC0EB5F40E1F
> > diff --git
> > a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
> > b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
> > index 78f808bfaf..f6ae4b342a 100644
> > ---
> > a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
> > +++
> > b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
> > @@ -33,3 +33,4 @@ FSP_PKG_NAME = AmberLakeFspPkg
> FSP_BINARY_BUILD =
> > FALSE  FSP_TEST_RELEASE = FALSE SECURE_BOOT_ENABLE = FALSE
> > +BIOS_INFO_GUID = C83BCE0E-6F16-4D3C-8D9F-4D6F5A032929
> > diff --git
> >
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_confi
> > g.cfg
> >
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_confi
> > g.cfg
> > index 1b0619bc1c..1dfe5ffd10 100644
> > ---
> >
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_confi
> > g.cfg
> > +++
> >
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_confi
> > +++ g.cfg
> > @@ -31,3 +31,4 @@ FSP_PKG_NAME = CoffeelakeSiliconPkg
> FSP_BINARY_BUILD
> > = FALSE  FSP_TEST_RELEASE = FALSE SECURE_BOOT_ENABLE = FALSE
> > +BIOS_INFO_GUID = A842B2D2-5C88-44E9-A9E2-4830F26662B7
> > diff --git a/Platform/Intel/build.cfg b/Platform/Intel/build.cfg index
> > 2040774d1b..6aee96694c 100644
> > --- a/Platform/Intel/build.cfg
> > +++ b/Platform/Intel/build.cfg
> > @@ -48,6 +48,7 @@ SECURE_BOOT_ENABLE = FALSE  REBUILD_MODE =
> > BUILD_ROM_ONLY =  NUMBER_OF_PROCESSORS = 0
> > +BIOS_INFO_GUID =
> >
> >
> >  [PLATFORMS]
> > diff --git a/Platform/Intel/build_bios.py
> > b/Platform/Intel/build_bios.py index
> > 46285df19a..ea098de705 100644
> > --- a/Platform/Intel/build_bios.py
> > +++ b/Platform/Intel/build_bios.py
> > @@ -196,6 +196,31 @@ def pre_build(build_config, build_type="DEBUG",
> > silent=False, toolchain=None):
> >  if return_code != 0:
> >  build_failed(config)
> >
> > +#
> > +# build platform silicon tools
> > +#
> > +# save the current workspace
> > +saved_work_directory = config["WORKSPACE"]
> > +# change the workspace to silicon tools directory
> > +config["WORKSPACE"] = os.path.join(config["WORKSPACE_SILICON"],
> > + "Tools")
> > +
> > +command = ["nmake"]
> > +if os.name == "posix":  # linux
> > +command = ["make"]
> > +# add path to generated FitGen binary to
> > +# environment path variable
> > +config["PATH"] += os.pathsep + \
> > +  os.path.join(config["BASE_TOOLS_PATH"],
> > +   "Source", "C", "bin")
> > +
> > +# build the silicon tools
> > +_, _, result, return_code = execute_script(command, config,
> shell=shell)
> > +if return_code != 0:
> > 

Re: [edk2-devel] [edk2-platforms] [PATCH 2/5] KabylakeOpenBoardPkg/KabylakeRvp3: Add BIOS Info PEIM

2019-10-07 Thread Kubacki, Michael A
Please also fix the typo in the commit message "publishs".

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Kubacki,
> Michael A
> Sent: Monday, October 7, 2019 6:31 PM
> To: Agyeman, Prince ; devel@edk2.groups.io
> Cc: Sinha, Ankit ; Desimone, Nathaniel L
> 
> Subject: Re: [edk2-devel] [edk2-platforms] [PATCH 2/5]
> KabylakeOpenBoardPkg/KabylakeRvp3: Add BIOS Info PEIM
> 
> BiosInfo.c:
> 
> BiosInfoEntryPoint () function description should be updated. The function
> installs the BiosInfo PPI  but also produces the BiosInfo HOB.
> 
> It also looks like you can remove the following macros:
> #define INDEXPORT_TO_ADDRESS(x) (x)
> #define DATAPORT_TO_ADDRESS(x)  ((x) << 16)
> #define PORTWIDTH_TO_ADDRESS(x) ((x) << 32)
> #define PORTBITNUMBER_TO_ADDRESS(x) ((x) << 40)
> #define PORTINDEXNUMBER_TO_ADDRESS(x)   ((x) << 48)
> 
> > -Original Message-
> > From: Agyeman, Prince 
> > Sent: Thursday, October 3, 2019 2:13 PM
> > To: devel@edk2.groups.io
> > Cc: Sinha, Ankit ; Desimone, Nathaniel L
> > ; Kubacki, Michael A
> > 
> > Subject: [edk2-platforms] [PATCH 2/5]
> > KabylakeOpenBoardPkg/KabylakeRvp3: Add BIOS Info PEIM
> >
> > Added BIOS Info PEIM to KabylakeRvp3 to publish the BIOS info HOB.
> > This PEIM currently publishs the board's microcode region info.
> >
> > Cc: Ankit Sinha 
> > Cc: Nate DeSimone 
> > Cc: Kubacki Michael A 
> >
> > Signed-off-by: Prince Agyeman 
> > ---
> >  .../KabylakeRvp3/BiosInfo/BiosInfo.c  | 93 +++
> >  .../KabylakeRvp3/BiosInfo/BiosInfo.inf| 48 ++
> >  .../KabylakeRvp3/OpenBoardPkg.dsc |  2 +
> >  .../KabylakeRvp3/OpenBoardPkg.fdf |  1 +
> >  4 files changed, 144 insertions(+)
> >  create mode 100644
> > Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c
> >  create mode 100644
> >
> Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.inf
> >
> > diff --git
> >
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c
> >
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c
> > new file mode 100644
> > index 00..6a058a0fc2
> > --- /dev/null
> > +++
> > b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo
> > +++ .c
> > @@ -0,0 +1,93 @@
> > +/** @file
> > +  Driver for BIOS Info support.
> > +
> > +  Copyright (c) 2019, Intel Corporation. All rights reserved.
> > +  SPDX-License-Identifier: BSD-2-Clause-Patent **/
> > +
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +#include 
> > +
> > +#define INDEXPORT_TO_ADDRESS(x) (x)
> > +#define DATAPORT_TO_ADDRESS(x)  ((x) << 16)
> > +#define PORTWIDTH_TO_ADDRESS(x) ((x) << 32)
> > +#define PORTBITNUMBER_TO_ADDRESS(x) ((x) << 40)
> > +#define PORTINDEXNUMBER_TO_ADDRESS(x)   ((x) << 48)
> > +
> > +//
> > +// Internal
> > +//
> > +#pragma pack (1)
> > +
> > +typedef struct {
> > +  BIOS_INFO_HEADER  Header;
> > +  BIOS_INFO_STRUCT  Entry[1];
> > +} BIOS_INFO;
> > +#pragma pack ()
> > +
> > +GLOBAL_REMOVE_IF_UNREFERENCED BIOS_INFO  mBiosInfo = {
> > +  {
> > +BIOS_INFO_SIGNATURE,
> > +1,
> > +0,
> > +  },
> > +  {
> > +{
> > +  FIT_TYPE_01_MICROCODE,
> > +  BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION,
> > +  0x0100,
> > +  FixedPcdGet32 (PcdFlashMicrocodeFvSize),
> > +  FixedPcdGet32 (PcdFlashMicrocodeFvBase)
> > +}
> > +  }
> > +};
> > +
> > +GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR
> > mBiosInfoPpiList
> > += {
> > +  EFI_PEI_PPI_DESCRIPTOR_PPI |
> > EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
> > +  ,
> > +  
> > +};
> > +
> > +/**
> > +  Installs BiosInfo Ppi.
> > +
> > +  @param  FileHandle  Handle of the file being invoked.
> > +  @param  PeiServices Describes the list of possible PEI Services.
> > +
> > +  @retval EFI_SUCCESS   Install the BiosInfo Ppi successfully.
> > +
> > +**/
> > +EFI_STATUS
> > +EFIAPI
> > +BiosInfoEntryPoint (
> > +  IN   EFI_PEI_FILE_HANDLE  FileHandle,
> > +  IN CONST EFI_PEI_SERVICES **PeiServices
> > +  )
> > +{
> > +  EFI_STATUS  Status;
> > +  VOID*HobData;
> > +
> > +  //
> > +  // Install PPI, so that other PEI module can add dependency.
> > +  //
> > +  Status = PeiServicesInstallPpi ();
> > + ASSERT_EFI_ERROR (Status);
> > +
> > +  //
> > +  // Build hob, so that DXE module can also get the data.
> > +  //
> > +  HobData = BuildGuidHob (, sizeof (mBiosInfo));
> > + ASSERT (HobData != NULL);  if (HobData == NULL) {
> > +return EFI_OUT_OF_RESOURCES;
> > +  }
> > +  CopyMem (HobData, , sizeof (mBiosInfo));
> > +
> > +  return EFI_SUCCESS;
> > +}
> > diff --git
> >
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.i
> > nf
> >
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.i
> > nf
> > new file mode 100644
> > index 00..94543408b1
> > --- 

Re: [edk2-devel] [edk2-platforms] [PATCH 0/5] Add FIT support using FitGen

2019-10-07 Thread Kubacki, Michael A
* Please include the version number in the subject.

* Although minor, the commit description unnecessarily varies between commits.
   It would be better to keep it consistent.

   #2: "Add BIOS Info PEIM", #3: "Add BiosInfo PEIM", #4: "Add BIOS INFO PEIM"

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of
> Agyeman, Prince
> Sent: Thursday, October 3, 2019 2:13 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [edk2-platforms] [PATCH 0/5] Add FIT support using
> FitGen
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2210
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2211
> 
> This series of patches
>  1. Add the generation of the FitGen tool to build_bios.py  2. Add Firmware
> Interface Table (FIT) to the final images of:
> a. KabylakeOpenBoardPkg/KabylakeRvp3
> b. KabylakeOpenBoardPkg/GalagoPro3
> c. WhiskeylakeOpenBoardPkg/WhiskeylakeURvp
> 
> What each patch does:
> 0001-BoardModulePkg-Add-bios-info-HOB: Adds the gBiosInfoGuid and the
> Bios Info struct for the Bios info HOB
> 
> 0002-KabylakeOpenBoardPkg-KabylakeRvp3-Add-BIOS-Info-PEIM,
> 0003-KabylakeOpenBoardPkg-GalagoPro3-Add-BiosInfo-PEIM,
> 0004-WhiskeylakeOpenBoardPkg-Add-BIOS-INFO-PEIM:
> Patches 0002,0003,0004 add bios info PEIM to KabylakeRvp3,
> GalagoPro3 and WhiskeylakeURvp boards respectively
> 
> 0005-Platform-Intel-Add-FIT-generation-tool
> Adds the FitGen tool binary and FIT generation to the BIOS build process.
> 
> Prince Agyeman (5):
>   BoardModulePkg: Add bios info HOB
>   KabylakeOpenBoardPkg/KabylakeRvp3: Add BIOS Info PEIM
>   KabylakeOpenBoardPkg/GalagoPro3: Add BiosInfo PEIM
>   WhiskeylakeOpenBoardPkg: Add BIOS INFO PEIM
>   Platform/Intel: Add FIT generation tool
> 
>  .../Intel/BoardModulePkg/BoardModulePkg.dec   |  3 +
>  .../BoardModulePkg/Include/Library/BiosInfo.h | 62 +
>  .../GalagoPro3/BiosInfo/BiosInfo.c| 92 ++
>  .../GalagoPro3/BiosInfo/BiosInfo.inf  | 48 ++
>  .../GalagoPro3/OpenBoardPkg.dsc   |  2 +
>  .../GalagoPro3/OpenBoardPkg.fdf   |  1 +
>  .../GalagoPro3/build_config.cfg   |  1 +
>  .../KabylakeRvp3/BiosInfo/BiosInfo.c  | 93 +++
>  .../KabylakeRvp3/BiosInfo/BiosInfo.inf| 48 ++
>  .../KabylakeRvp3/OpenBoardPkg.dsc |  2 +
>  .../KabylakeRvp3/OpenBoardPkg.fdf |  1 +
>  .../KabylakeRvp3/build_config.cfg |  1 +
>  .../WhiskeylakeURvp/BiosInfo/BiosInfo.c   | 93 +++
>  .../WhiskeylakeURvp/BiosInfo/BiosInfo.inf | 48 ++
>  .../WhiskeylakeURvp/OpenBoardPkg.dsc  |  2 +
>  .../WhiskeylakeURvp/OpenBoardPkg.fdf  |  1 +
>  .../WhiskeylakeURvp/build_config.cfg  |  1 +
>  Platform/Intel/build.cfg  |  1 +
>  Platform/Intel/build_bios.py  | 57 
>  19 files changed, 557 insertions(+)
>  create mode 100644
> Platform/Intel/BoardModulePkg/Include/Library/BiosInfo.h
>  create mode 100644
> Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.c
>  create mode 100644
> Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.inf
>  create mode 100644
> Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c
>  create mode 100644
> Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.inf
>  create mode 100644
> Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosI
> nfo.c
>  create mode 100644
> Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosI
> nfo.inf
> 
> --
> 2.19.1.windows.1
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48519): https://edk2.groups.io/g/devel/message/48519
Mute This Topic: https://groups.io/mt/34386696/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms] [PATCH 5/5] Platform/Intel: Add FIT generation tool

2019-10-07 Thread Kubacki, Michael A
Reviewed-by: Michael Kubacki 

> -Original Message-
> From: Agyeman, Prince 
> Sent: Thursday, October 3, 2019 2:13 PM
> To: devel@edk2.groups.io
> Cc: Sinha, Ankit ; Desimone, Nathaniel L
> ; Kubacki, Michael A
> 
> Subject: [edk2-platforms] [PATCH 5/5] Platform/Intel: Add FIT generation
> tool
> 
> Added fit generation tool to the build
> process.
> 
> What was done:
> 
> Added BIOS_INFO_GUID to the build.cfg
> 
> Added BIOS_INFO_GUID to GalagoPro3,
> KabylakeRvp3 and WhiskeylakeURvp build_config.cfg This allows the boards
> to specify the GUID associated with the its Bios Info PEIM
> 
> BIOS_INFO_GUID is passed as an argument to FitGen in the FIT table
> generation process
> 
> Cc: Ankit Sinha 
> Cc: Nate DeSimone 
> Cc: Michael Kubacki 
> 
> Signed-off-by: Prince Agyeman 
> ---
>  .../GalagoPro3/build_config.cfg   |  1 +
>  .../KabylakeRvp3/build_config.cfg |  1 +
>  .../WhiskeylakeURvp/build_config.cfg  |  1 +
>  Platform/Intel/build.cfg  |  1 +
>  Platform/Intel/build_bios.py  | 57 +++
>  5 files changed, 61 insertions(+)
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg
> index 8c6c51abb4..3f64239a29 100644
> --- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg
> +++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg
> @@ -31,3 +31,4 @@ FSP_PKG_NAME = KabylakeFspPkg  FSP_BINARY_BUILD
> = FALSE  FSP_TEST_RELEASE = FALSE  SECURE_BOOT_ENABLE = FALSE
> +BIOS_INFO_GUID = 3132E669-D16B-4AA7-B09B-BC0EB5F40E1F
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
> index 78f808bfaf..f6ae4b342a 100644
> --- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
> @@ -33,3 +33,4 @@ FSP_PKG_NAME = AmberLakeFspPkg
> FSP_BINARY_BUILD = FALSE  FSP_TEST_RELEASE = FALSE
> SECURE_BOOT_ENABLE = FALSE
> +BIOS_INFO_GUID = C83BCE0E-6F16-4D3C-8D9F-4D6F5A032929
> diff --git
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_confi
> g.cfg
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_confi
> g.cfg
> index 1b0619bc1c..1dfe5ffd10 100644
> ---
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_confi
> g.cfg
> +++
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_confi
> +++ g.cfg
> @@ -31,3 +31,4 @@ FSP_PKG_NAME = CoffeelakeSiliconPkg
> FSP_BINARY_BUILD = FALSE  FSP_TEST_RELEASE = FALSE
> SECURE_BOOT_ENABLE = FALSE
> +BIOS_INFO_GUID = A842B2D2-5C88-44E9-A9E2-4830F26662B7
> diff --git a/Platform/Intel/build.cfg b/Platform/Intel/build.cfg index
> 2040774d1b..6aee96694c 100644
> --- a/Platform/Intel/build.cfg
> +++ b/Platform/Intel/build.cfg
> @@ -48,6 +48,7 @@ SECURE_BOOT_ENABLE = FALSE  REBUILD_MODE =
> BUILD_ROM_ONLY =  NUMBER_OF_PROCESSORS = 0
> +BIOS_INFO_GUID =
> 
> 
>  [PLATFORMS]
> diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py index
> 46285df19a..ea098de705 100644
> --- a/Platform/Intel/build_bios.py
> +++ b/Platform/Intel/build_bios.py
> @@ -196,6 +196,31 @@ def pre_build(build_config, build_type="DEBUG",
> silent=False, toolchain=None):
>  if return_code != 0:
>  build_failed(config)
> 
> +#
> +# build platform silicon tools
> +#
> +# save the current workspace
> +saved_work_directory = config["WORKSPACE"]
> +# change the workspace to silicon tools directory
> +config["WORKSPACE"] = os.path.join(config["WORKSPACE_SILICON"],
> + "Tools")
> +
> +command = ["nmake"]
> +if os.name == "posix":  # linux
> +command = ["make"]
> +# add path to generated FitGen binary to
> +# environment path variable
> +config["PATH"] += os.pathsep + \
> +  os.path.join(config["BASE_TOOLS_PATH"],
> +   "Source", "C", "bin")
> +
> +# build the silicon tools
> +_, _, result, return_code = execute_script(command, config, shell=shell)
> +if return_code != 0:
> +build_failed(config)
> +
> +# restore WORKSPACE environment variable
> +config["WORKSPACE"] = saved_work_directory
> +
>  config["SILENT_MODE"] = 'TRUE' if silent else 'FALSE'
> 
>  print("==")
> @@ -404,6 +429,35 @@ def post_build(config):
>  :returns: nothing
>  """
>  print("Running post_build to complete the build process.")
> +board_fd = config["BOARD"].upper()
> +final_fd = os.path.join(config["BUILD_DIR_PATH"], "FV",
> +"{}.fd".format(board_fd))
> +
> +if config["BIOS_INFO_GUID"]:
> +# Generate the fit table
> +print("Generating FIT ...")
> +if os.path.isfile(final_fd):
> +temp_fd = 

Re: [edk2-devel] [edk2-platforms] [PATCH 4/5] WhiskeylakeOpenBoardPkg: Add BIOS INFO PEIM

2019-10-07 Thread Kubacki, Michael A
Same feedback as patch #2:

BiosInfo.c:

BiosInfoEntryPoint () function description should be updated. The function 
installs the BiosInfo PPI
 but also produces the BiosInfo HOB.

It also looks like you can remove the following macros for now:
#define INDEXPORT_TO_ADDRESS(x) (x)
#define DATAPORT_TO_ADDRESS(x)  ((x) << 16)
#define PORTWIDTH_TO_ADDRESS(x) ((x) << 32)
#define PORTBITNUMBER_TO_ADDRESS(x) ((x) << 40)
#define PORTINDEXNUMBER_TO_ADDRESS(x)   ((x) << 48)

> -Original Message-
> From: Agyeman, Prince 
> Sent: Thursday, October 3, 2019 2:13 PM
> To: devel@edk2.groups.io
> Cc: Sinha, Ankit ; Desimone, Nathaniel L
> ; Kubacki, Michael A
> 
> Subject: [edk2-platforms] [PATCH 4/5] WhiskeylakeOpenBoardPkg: Add BIOS
> INFO PEIM
> 
> Added BIOS info PEIM to publish Bios Info HOB. This PEIM currently publishes
> the microcode FV info.
> 
> Cc: Ankit Sinha 
> Cc: Nate DeSimone 
> Cc: Kubacki Michael A 
> 
> Signed-off-by: Prince Agyeman 
> ---
>  .../WhiskeylakeURvp/BiosInfo/BiosInfo.c   | 93 +++
>  .../WhiskeylakeURvp/BiosInfo/BiosInfo.inf | 48 ++
>  .../WhiskeylakeURvp/OpenBoardPkg.dsc  |  2 +
>  .../WhiskeylakeURvp/OpenBoardPkg.fdf  |  1 +
>  4 files changed, 144 insertions(+)
>  create mode 100644
> Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosI
> nfo.c
>  create mode 100644
> Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosI
> nfo.inf
> 
> diff --git
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/Bi
> osInfo.c
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/Bi
> osInfo.c
> new file mode 100644
> index 00..6a058a0fc2
> --- /dev/null
> +++
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/Bi
> +++ osInfo.c
> @@ -0,0 +1,93 @@
> +/** @file
> +  Driver for BIOS Info support.
> +
> +  Copyright (c) 2019, Intel Corporation. All rights reserved.
> +  SPDX-License-Identifier: BSD-2-Clause-Patent **/
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#define INDEXPORT_TO_ADDRESS(x) (x)
> +#define DATAPORT_TO_ADDRESS(x)  ((x) << 16)
> +#define PORTWIDTH_TO_ADDRESS(x) ((x) << 32)
> +#define PORTBITNUMBER_TO_ADDRESS(x) ((x) << 40)
> +#define PORTINDEXNUMBER_TO_ADDRESS(x)   ((x) << 48)
> +
> +//
> +// Internal
> +//
> +#pragma pack (1)
> +
> +typedef struct {
> +  BIOS_INFO_HEADER  Header;
> +  BIOS_INFO_STRUCT  Entry[1];
> +} BIOS_INFO;
> +#pragma pack ()
> +
> +GLOBAL_REMOVE_IF_UNREFERENCED BIOS_INFO  mBiosInfo = {
> +  {
> +BIOS_INFO_SIGNATURE,
> +1,
> +0,
> +  },
> +  {
> +{
> +  FIT_TYPE_01_MICROCODE,
> +  BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION,
> +  0x0100,
> +  FixedPcdGet32 (PcdFlashMicrocodeFvSize),
> +  FixedPcdGet32 (PcdFlashMicrocodeFvBase)
> +}
> +  }
> +};
> +
> +GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR
> mBiosInfoPpiList
> += {
> +  EFI_PEI_PPI_DESCRIPTOR_PPI |
> EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
> +  ,
> +  
> +};
> +
> +/**
> +  Installs BiosInfo Ppi.
> +
> +  @param  FileHandle  Handle of the file being invoked.
> +  @param  PeiServices Describes the list of possible PEI Services.
> +
> +  @retval EFI_SUCCESS   Install the BiosInfo Ppi successfully.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +BiosInfoEntryPoint (
> +  IN   EFI_PEI_FILE_HANDLE  FileHandle,
> +  IN CONST EFI_PEI_SERVICES **PeiServices
> +  )
> +{
> +  EFI_STATUS  Status;
> +  VOID*HobData;
> +
> +  //
> +  // Install PPI, so that other PEI module can add dependency.
> +  //
> +  Status = PeiServicesInstallPpi ();  ASSERT_EFI_ERROR
> + (Status);
> +
> +  //
> +  // Build hob, so that DXE module can also get the data.
> +  //
> +  HobData = BuildGuidHob (, sizeof (mBiosInfo));  ASSERT
> + (HobData != NULL);  if (HobData == NULL) {
> +return EFI_OUT_OF_RESOURCES;
> +  }
> +  CopyMem (HobData, , sizeof (mBiosInfo));
> +
> +  return EFI_SUCCESS;
> +}
> diff --git
> a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/Bi
> osInfo.inf
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/Bi
> osInfo.inf
> new file mode 100644
> index 00..f268de00f5
> --- /dev/null
> +++
> b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/Bi
> +++ osInfo.inf
> @@ -0,0 +1,48 @@
> +### @file
> +#  Module Information description file for BIOS Info Driver # #
> +Copyright (c) 2019, Intel Corporation. All rights reserved. #
> +SPDX-License-Identifier: BSD-2-Clause-Patent ###
> +
> +[Defines]
> +  INF_VERSION= 0x00010017
> +  BASE_NAME  = BiosInfo
> +  FILE_GUID  = A842B2D2-5C88-44E9-A9E2-4830F26662B7
> +  VERSION_STRING = 1.0
> +  MODULE_TYPE= PEIM
> +  ENTRY_POINT= BiosInfoEntryPoint
> +#
> +# The 

Re: [edk2-devel] [edk2-platforms] [PATCH 3/5] KabylakeOpenBoardPkg/GalagoPro3: Add BiosInfo PEIM

2019-10-07 Thread Kubacki, Michael A
As mentioned in patch #2, the same PEIM can be used for KabylakeRvp3 and 
GalagoPro3 for now.

> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Monday, October 7, 2019 3:27 PM
> To: Agyeman, Prince ; devel@edk2.groups.io
> Cc: Sinha, Ankit ; Kubacki, Michael A
> 
> Subject: RE: [edk2-platforms] [PATCH 3/5]
> KabylakeOpenBoardPkg/GalagoPro3: Add BiosInfo PEIM
> 
> Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c
> and Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.c
> are identical files. Can we move this up to the parent KabylakeOpenBoardPkg
> and use one PEIM for both platforms?
> 
> -Original Message-
> From: Agyeman, Prince 
> Sent: Thursday, October 3, 2019 2:13 PM
> To: devel@edk2.groups.io
> Cc: Sinha, Ankit ; Desimone, Nathaniel L
> ; Kubacki, Michael A
> 
> Subject: [edk2-platforms] [PATCH 3/5] KabylakeOpenBoardPkg/GalagoPro3:
> Add BiosInfo PEIM
> 
> Added BiosInfo PEIM to publish the
> Bios Info HOB. Currently this PEIM publishes one Bios Info entry which is the
> microcode region information.
> 
> Cc: Ankit Sinha 
> Cc: Nate DeSimone 
> Cc: Kubacki Michael A 
> 
> Signed-off-by: Prince Agyeman 
> ---
>  .../GalagoPro3/BiosInfo/BiosInfo.c| 92 +++
>  .../GalagoPro3/BiosInfo/BiosInfo.inf  | 48 ++
>  .../GalagoPro3/OpenBoardPkg.dsc   |  2 +
>  .../GalagoPro3/OpenBoardPkg.fdf   |  1 +
>  4 files changed, 143 insertions(+)
>  create mode 100644
> Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.c
>  create mode 100644
> Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.inf
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.c
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.c
> new file mode 100644
> index 00..4db9d4685c
> --- /dev/null
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.c
> @@ -0,0 +1,92 @@
> +/** @file
> +  Driver for BIOS Info support.
> +
> +Copyright (c) 2019, Intel Corporation. All rights reserved.
> +SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include 
> +#include  #include 
> +#include  #include 
> +#include  #include  #include
> +
> +
> +#define INDEXPORT_TO_ADDRESS(x) (x)
> +#define DATAPORT_TO_ADDRESS(x)  ((x) << 16)
> +#define PORTWIDTH_TO_ADDRESS(x) ((x) << 32)
> +#define PORTBITNUMBER_TO_ADDRESS(x) ((x) << 40)
> +#define PORTINDEXNUMBER_TO_ADDRESS(x)   ((x) << 48)
> +
> +//
> +// Internal
> +//
> +#pragma pack (1)
> +
> +typedef struct {
> +  BIOS_INFO_HEADER  Header;
> +  BIOS_INFO_STRUCT  Entry[1];
> +} BIOS_INFO;
> +#pragma pack ()
> +
> +GLOBAL_REMOVE_IF_UNREFERENCED BIOS_INFO  mBiosInfo = {
> +  {
> +BIOS_INFO_SIGNATURE,
> +1,
> +0,
> +  },
> +  {
> +{
> +  FIT_TYPE_01_MICROCODE,
> +  BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION,
> +  0x0100,
> +  FixedPcdGet32 (PcdFlashMicrocodeFvSize),
> +  FixedPcdGet32 (PcdFlashMicrocodeFvBase)
> +}
> +  }
> +};
> +
> +GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR
> mBiosInfoPpiList
> += {
> +  EFI_PEI_PPI_DESCRIPTOR_PPI |
> EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
> +  ,
> +  
> +};
> +
> +/**
> +  Installs BiosInfo Ppi.
> +
> +  @param  FileHandle  Handle of the file being invoked.
> +  @param  PeiServices Describes the list of possible PEI Services.
> +
> +  @retval EFI_SUCCESS   Install the BiosInfo Ppi successfully.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +BiosInfoEntryPoint (
> +  IN   EFI_PEI_FILE_HANDLE  FileHandle,
> +  IN CONST EFI_PEI_SERVICES **PeiServices
> +  )
> +{
> +  EFI_STATUS  Status;
> +  VOID*HobData;
> +
> +  //
> +  // Install PPI, so that other PEI module can add dependency.
> +  //
> +  Status = PeiServicesInstallPpi ();  ASSERT_EFI_ERROR
> + (Status);
> +
> +  //
> +  // Build hob, so that DXE module can also get the data.
> +  //
> +  HobData = BuildGuidHob (, sizeof (mBiosInfo));  ASSERT
> + (HobData != NULL);  if (HobData == NULL) {
> +return EFI_OUT_OF_RESOURCES;
> +  }
> +  CopyMem (HobData, , sizeof (mBiosInfo));
> +
> +  return EFI_SUCCESS;
> +}
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.inf
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.inf
> new file mode 100644
> index 00..a0e18cff9c
> --- /dev/null
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.i
> +++ nf
> @@ -0,0 +1,48 @@
> +### @file
> +#  Module Information description file for BIOS Info Driver # #
> +Copyright (c) 2019, Intel Corporation. All rights reserved. #
> +SPDX-License-Identifier: BSD-2-Clause-Patent ###
> +
> +[Defines]
> +  INF_VERSION= 0x00010017
> +  BASE_NAME  = BiosInfo
> +  FILE_GUID  = 3132E669-D16B-4AA7-B09B-BC0EB5F40E1F
> +  VERSION_STRING = 1.0
> +  MODULE_TYPE= 

Re: [edk2-devel] [edk2-platforms] [PATCH 2/5] KabylakeOpenBoardPkg/KabylakeRvp3: Add BIOS Info PEIM

2019-10-07 Thread Kubacki, Michael A
BiosInfo.c:

BiosInfoEntryPoint () function description should be updated. The function 
installs the BiosInfo PPI
 but also produces the BiosInfo HOB.

It also looks like you can remove the following macros:
#define INDEXPORT_TO_ADDRESS(x) (x)
#define DATAPORT_TO_ADDRESS(x)  ((x) << 16)
#define PORTWIDTH_TO_ADDRESS(x) ((x) << 32)
#define PORTBITNUMBER_TO_ADDRESS(x) ((x) << 40)
#define PORTINDEXNUMBER_TO_ADDRESS(x)   ((x) << 48)

> -Original Message-
> From: Agyeman, Prince 
> Sent: Thursday, October 3, 2019 2:13 PM
> To: devel@edk2.groups.io
> Cc: Sinha, Ankit ; Desimone, Nathaniel L
> ; Kubacki, Michael A
> 
> Subject: [edk2-platforms] [PATCH 2/5]
> KabylakeOpenBoardPkg/KabylakeRvp3: Add BIOS Info PEIM
> 
> Added BIOS Info PEIM to KabylakeRvp3 to publish the BIOS info HOB. This
> PEIM currently publishs the board's microcode region info.
> 
> Cc: Ankit Sinha 
> Cc: Nate DeSimone 
> Cc: Kubacki Michael A 
> 
> Signed-off-by: Prince Agyeman 
> ---
>  .../KabylakeRvp3/BiosInfo/BiosInfo.c  | 93 +++
>  .../KabylakeRvp3/BiosInfo/BiosInfo.inf| 48 ++
>  .../KabylakeRvp3/OpenBoardPkg.dsc |  2 +
>  .../KabylakeRvp3/OpenBoardPkg.fdf |  1 +
>  4 files changed, 144 insertions(+)
>  create mode 100644
> Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c
>  create mode 100644
> Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.inf
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c
> new file mode 100644
> index 00..6a058a0fc2
> --- /dev/null
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo
> +++ .c
> @@ -0,0 +1,93 @@
> +/** @file
> +  Driver for BIOS Info support.
> +
> +  Copyright (c) 2019, Intel Corporation. All rights reserved.
> +  SPDX-License-Identifier: BSD-2-Clause-Patent **/
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#define INDEXPORT_TO_ADDRESS(x) (x)
> +#define DATAPORT_TO_ADDRESS(x)  ((x) << 16)
> +#define PORTWIDTH_TO_ADDRESS(x) ((x) << 32)
> +#define PORTBITNUMBER_TO_ADDRESS(x) ((x) << 40)
> +#define PORTINDEXNUMBER_TO_ADDRESS(x)   ((x) << 48)
> +
> +//
> +// Internal
> +//
> +#pragma pack (1)
> +
> +typedef struct {
> +  BIOS_INFO_HEADER  Header;
> +  BIOS_INFO_STRUCT  Entry[1];
> +} BIOS_INFO;
> +#pragma pack ()
> +
> +GLOBAL_REMOVE_IF_UNREFERENCED BIOS_INFO  mBiosInfo = {
> +  {
> +BIOS_INFO_SIGNATURE,
> +1,
> +0,
> +  },
> +  {
> +{
> +  FIT_TYPE_01_MICROCODE,
> +  BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION,
> +  0x0100,
> +  FixedPcdGet32 (PcdFlashMicrocodeFvSize),
> +  FixedPcdGet32 (PcdFlashMicrocodeFvBase)
> +}
> +  }
> +};
> +
> +GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR
> mBiosInfoPpiList
> += {
> +  EFI_PEI_PPI_DESCRIPTOR_PPI |
> EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
> +  ,
> +  
> +};
> +
> +/**
> +  Installs BiosInfo Ppi.
> +
> +  @param  FileHandle  Handle of the file being invoked.
> +  @param  PeiServices Describes the list of possible PEI Services.
> +
> +  @retval EFI_SUCCESS   Install the BiosInfo Ppi successfully.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +BiosInfoEntryPoint (
> +  IN   EFI_PEI_FILE_HANDLE  FileHandle,
> +  IN CONST EFI_PEI_SERVICES **PeiServices
> +  )
> +{
> +  EFI_STATUS  Status;
> +  VOID*HobData;
> +
> +  //
> +  // Install PPI, so that other PEI module can add dependency.
> +  //
> +  Status = PeiServicesInstallPpi ();  ASSERT_EFI_ERROR
> + (Status);
> +
> +  //
> +  // Build hob, so that DXE module can also get the data.
> +  //
> +  HobData = BuildGuidHob (, sizeof (mBiosInfo));  ASSERT
> + (HobData != NULL);  if (HobData == NULL) {
> +return EFI_OUT_OF_RESOURCES;
> +  }
> +  CopyMem (HobData, , sizeof (mBiosInfo));
> +
> +  return EFI_SUCCESS;
> +}
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.i
> nf
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.i
> nf
> new file mode 100644
> index 00..94543408b1
> --- /dev/null
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo
> +++ .inf
> @@ -0,0 +1,48 @@
> +### @file
> +#  Module Information description file for BIOS Info Driver # #
> +Copyright (c) 2019, Intel Corporation. All rights reserved. #
> +SPDX-License-Identifier: BSD-2-Clause-Patent ###
> +
> +[Defines]
> +  INF_VERSION= 0x00010017
> +  BASE_NAME  = BiosInfo
> +  FILE_GUID  = C83BCE0E-6F16-4D3C-8D9F-4D6F5A032929
> +  VERSION_STRING = 1.0
> +  MODULE_TYPE= PEIM
> +  ENTRY_POINT= BiosInfoEntryPoint
> +#
> +# The following information is for reference only and not 

Re: [edk2-devel] [PATCH v2] MdePkg:Include: Update SmBios header file

2019-10-07 Thread Liming Gao
Abner:
  Thanks for your notice. I see the public SMBIOS 3.3.0. 

  For this patch set, I have two minor comments. For other part, Reviewed-by: 
Liming Gao 
1) Please add BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2202 in the 
commit message. 
2) The comment for gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev is not 
required to be changed. 
This field is in SMBIOS 3.0 spec. It is not new added one in SMBIOS 3.3.

Thanks
Liming
>-Original Message-
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Abner Chang
>Sent: Friday, October 04, 2019 11:06 PM
>To: Gao, Liming ; devel@edk2.groups.io
>Cc: Kinney, Michael D ; Leif Lindholm
>; Chen, Gilbert 
>Subject: Re: [edk2-devel] [PATCH v2] MdePkg:Include: Update SmBios header
>file
>
>Just aware that SMBIOS 3.3.0 is published on DMTF,
>https://www.dmtf.org/standards/smbios
>
>The latest version of patch set is PATCH v4, please review it and help to push
>to mainstream if no further comments. Thanks
>Abner
>
>> -Original Message-
>> From: Gao, Liming [mailto:liming@intel.com]
>> Sent: Thursday, September 19, 2019 1:23 PM
>> To: Chang, Abner (HPS SW/FW Technologist) ;
>> devel@edk2.groups.io
>> Cc: Kinney, Michael D ; Leif Lindholm
>> ; Chen, Gilbert 
>> Subject: RE: [PATCH v2] MdePkg:Include: Update SmBios header file
>>
>> Abner:
>>   Please add BZ URL in the commit message, and separate this patch to three
>> changes. Each one is for each package of MdePkg, MdeModulePkg and
>> ShellPkg.
>>
>>   As Leif say, SmBios 3.3 spec is not published. This patch will not be 
>> pushed
>> until SmBios 3.3 is published.
>>
>> >-Original Message-
>> >From: Abner Chang [mailto:abner.ch...@hpe.com]
>> >Sent: Thursday, September 19, 2019 11:05 AM
>> >To: devel@edk2.groups.io
>> >Cc: abner.ch...@hpe.com; Kinney, Michael D
>> >; Gao, Liming ; Leif
>> >Lindholm ; Gilbert Chen
>> >
>> >Subject: [PATCH v2] MdePkg:Include: Update SmBios header file
>> >
>> >Update SmBios header file to conform with SMBIOS v3.3.0.
>> >The major update is to add definitions of SMBIOS Type 44h record.
>> >
>> >Signed-off-by: Abner Chang 
>> >
>> >Cc: Michael D Kinney 
>> >Cc: Liming Gao 
>> >Cc: Leif Lindholm 
>> >Cc: Gilbert Chen 
>> >---
>> > MdeModulePkg/MdeModulePkg.dec  |  6 +-
>> > MdePkg/Include/IndustryStandard/SmBios.h   | 76
>> >+-
>> > .../SmbiosView/PrintInfo.c | 23 ++-
>> > .../SmbiosView/PrintInfo.h | 13 +++-
>> > .../SmbiosView/QueryTable.c| 63 +-
>> > .../UefiShellDebug1CommandsLib.uni |  3 +-
>> > 6 files changed, 174 insertions(+), 10 deletions(-)
>> >
>> >diff --git a/MdeModulePkg/MdeModulePkg.dec
>> >b/MdeModulePkg/MdeModulePkg.dec index 19935c8..e3a65ab 100644
>> >--- a/MdeModulePkg/MdeModulePkg.dec
>> >+++ b/MdeModulePkg/MdeModulePkg.dec
>> >@@ -1792,10 +1792,10 @@
>> >
>> >   ## SMBIOS version.
>> >   # @Prompt SMBIOS version.
>> >-
>> >gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0302|UINT16|0
>> x0
>> >0010055
>> >+
>> >gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosVersion|0x0303|UINT16|0
>> x0
>> >0010055
>> >
>> >-  ## SMBIOS Docrev field in SMBIOS 3.0 (64-bit) Entry Point Structure.
>> >-  # @Prompt SMBIOS Docrev field in SMBIOS 3.0 (64-bit) Entry Point
>> Structure.
>> >+  ## SMBIOS Docrev field in SMBIOS 3.3 (64-bit) Entry Point Structure.
>> >+  # @Prompt SMBIOS Docrev field in SMBIOS 3.3 (64-bit) Entry Point
>> >Structure.
>> >
>> >gEfiMdeModulePkgTokenSpaceGuid.PcdSmbiosDocRev|0x0|UINT8|0x000
>1
>> 00
>> >6A
>> >
>> >   ## SMBIOS produce method.
>> >diff --git a/MdePkg/Include/IndustryStandard/SmBios.h
>> >b/MdePkg/Include/IndustryStandard/SmBios.h
>> >index f3b6f18..f504cc8 100644
>> >--- a/MdePkg/Include/IndustryStandard/SmBios.h
>> >+++ b/MdePkg/Include/IndustryStandard/SmBios.h
>> >@@ -1,8 +1,9 @@
>> > /** @file
>> >-  Industry Standard Definitions of SMBIOS Table Specification v3.2.0.
>> >+  Industry Standard Definitions of SMBIOS Table Specification v3.3.0.
>> >
>> > Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
>> > (C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP
>> >+(C) Copyright 2015 - 2019 Hewlett Packard Enterprise Development
>> >+LP
>> > SPDX-License-Identifier: BSD-2-Clause-Patent
>> >
>> > **/
>> >@@ -46,7 +47,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
>#define
>> >SMBIOS_3_0_TABLE_MAX_LENGTH 0x
>> >
>> > //
>> >-// SMBIOS type macros which is according to SMBIOS 2.7 specification.
>> >+// SMBIOS type macros which is according to SMBIOS 3.3.0 specification.
>> > //
>> > #define SMBIOS_TYPE_BIOS_INFORMATION 0
>> > #define SMBIOS_TYPE_SYSTEM_INFORMATION   1
>> >@@ -92,6 +93,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
>#define
>> >SMBIOS_TYPE_ONBOARD_DEVICES_EXTENDED_INFORMATION 41
>#define
>> >SMBIOS_TYPE_MANAGEMENT_CONTROLLER_HOST_INTERFACE 42
>> > #define 

Re: [edk2-devel] [edk2-platforms] [PATCH 2/5] KabylakeOpenBoardPkg/KabylakeRvp3: Add BIOS Info PEIM

2019-10-07 Thread Kubacki, Michael A
For now, this is definitely possible.

It may also be viable long term. The table is closely tied to the FV layout 
which is
standardized under Minimum Platform. Firmware volumes that may come and go like 
those for
a particular advanced feature would end up as child FVs under a FvAdvanced 
parent that
would be covered in the BIOS Info table. It seems that the FVs that will 
eventually be described in
the table will remain fixed while their contents are customized by individual 
boards. 

Also due to the FV standardization, the FVs that compose the IBB segment 
definition in the table
for S-ACM verification/measurement can likely be consistent across the boards 
in addition to the
post-IBB FVs which leads to a standardized IBB/OBB definition. Some boards 
within a package may
have Boot Guard enabled while others don't but having the FVs identified as 
IBB, post-IBB, or
exclude from FIT in the table will not negatively impact the Boot Guard 
disabled case.

I agree we should start with KabylakeOpenBoardPkg having a single copy of the 
PEIM used for
all boards.

Thanks,
Michael

> -Original Message-
> From: Desimone, Nathaniel L 
> Sent: Monday, October 7, 2019 3:27 PM
> To: Agyeman, Prince ; devel@edk2.groups.io
> Cc: Sinha, Ankit ; Kubacki, Michael A
> 
> Subject: RE: [edk2-platforms] [PATCH 2/5]
> KabylakeOpenBoardPkg/KabylakeRvp3: Add BIOS Info PEIM
> 
> Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c
> and Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.c
> are identical files. Can we move this up to the parent KabylakeOpenBoardPkg
> and use one PEIM for both platforms?
> 
> -Original Message-
> From: Agyeman, Prince 
> Sent: Thursday, October 3, 2019 2:13 PM
> To: devel@edk2.groups.io
> Cc: Sinha, Ankit ; Desimone, Nathaniel L
> ; Kubacki, Michael A
> 
> Subject: [edk2-platforms] [PATCH 2/5]
> KabylakeOpenBoardPkg/KabylakeRvp3: Add BIOS Info PEIM
> 
> Added BIOS Info PEIM to KabylakeRvp3 to publish the BIOS info HOB. This
> PEIM currently publishs the board's microcode region info.
> 
> Cc: Ankit Sinha 
> Cc: Nate DeSimone 
> Cc: Kubacki Michael A 
> 
> Signed-off-by: Prince Agyeman 
> ---
>  .../KabylakeRvp3/BiosInfo/BiosInfo.c  | 93 +++
>  .../KabylakeRvp3/BiosInfo/BiosInfo.inf| 48 ++
>  .../KabylakeRvp3/OpenBoardPkg.dsc |  2 +
>  .../KabylakeRvp3/OpenBoardPkg.fdf |  1 +
>  4 files changed, 144 insertions(+)
>  create mode 100644
> Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c
>  create mode 100644
> Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.inf
> 
> diff --git
> a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c
> new file mode 100644
> index 00..6a058a0fc2
> --- /dev/null
> +++
> b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo
> +++ .c
> @@ -0,0 +1,93 @@
> +/** @file
> +  Driver for BIOS Info support.
> +
> +  Copyright (c) 2019, Intel Corporation. All rights reserved.
> +  SPDX-License-Identifier: BSD-2-Clause-Patent **/
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#define INDEXPORT_TO_ADDRESS(x) (x)
> +#define DATAPORT_TO_ADDRESS(x)  ((x) << 16)
> +#define PORTWIDTH_TO_ADDRESS(x) ((x) << 32)
> +#define PORTBITNUMBER_TO_ADDRESS(x) ((x) << 40)
> +#define PORTINDEXNUMBER_TO_ADDRESS(x)   ((x) << 48)
> +
> +//
> +// Internal
> +//
> +#pragma pack (1)
> +
> +typedef struct {
> +  BIOS_INFO_HEADER  Header;
> +  BIOS_INFO_STRUCT  Entry[1];
> +} BIOS_INFO;
> +#pragma pack ()
> +
> +GLOBAL_REMOVE_IF_UNREFERENCED BIOS_INFO  mBiosInfo = {
> +  {
> +BIOS_INFO_SIGNATURE,
> +1,
> +0,
> +  },
> +  {
> +{
> +  FIT_TYPE_01_MICROCODE,
> +  BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION,
> +  0x0100,
> +  FixedPcdGet32 (PcdFlashMicrocodeFvSize),
> +  FixedPcdGet32 (PcdFlashMicrocodeFvBase)
> +}
> +  }
> +};
> +
> +GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR
> mBiosInfoPpiList
> += {
> +  EFI_PEI_PPI_DESCRIPTOR_PPI |
> EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
> +  ,
> +  
> +};
> +
> +/**
> +  Installs BiosInfo Ppi.
> +
> +  @param  FileHandle  Handle of the file being invoked.
> +  @param  PeiServices Describes the list of possible PEI Services.
> +
> +  @retval EFI_SUCCESS   Install the BiosInfo Ppi successfully.
> +
> +**/
> +EFI_STATUS
> +EFIAPI
> +BiosInfoEntryPoint (
> +  IN   EFI_PEI_FILE_HANDLE  FileHandle,
> +  IN CONST EFI_PEI_SERVICES **PeiServices
> +  )
> +{
> +  EFI_STATUS  Status;
> +  VOID*HobData;
> +
> +  //
> +  // Install PPI, so that other PEI module can add dependency.
> +  //
> +  Status = PeiServicesInstallPpi ();  ASSERT_EFI_ERROR
> + (Status);
> +
> +  //
> +  // Build hob, so that DXE module can also get the data.
> +  //
> +  

Re: [edk2-devel] [edk2-platforms] [PATCH 1/5] BoardModulePkg: Add bios info HOB

2019-10-07 Thread Kubacki, Michael A
Library/BiosInfo.h:
 1. I think the file description can be more accurate and useful than "Driver 
for BIOS Info support."

 This header file is not a driver or restricted to any particular driver in 
this location. I would
 generalize the comment.

 2. This file is not related to a library. Why was it placed in the 
Include/Library directory?

> -Original Message-
> From: Agyeman, Prince 
> Sent: Thursday, October 3, 2019 2:13 PM
> To: devel@edk2.groups.io
> Cc: Sinha, Ankit ; Desimone, Nathaniel L
> ; Kubacki, Michael A
> 
> Subject: [edk2-platforms] [PATCH 1/5] BoardModulePkg: Add bios info HOB
> 
> Added gBiosInfoGuid to be used to
> publish BIOS information HOB which
> is needed in FIT generation
> 
> Also added the Bios Info header
> file BiosInfo.h
> 
> Cc: Ankit Sinha 
> Cc: Nate DeSimone 
> Cc: Kubacki Michael A 
> 
> Signed-off-by: Prince Agyeman 
> ---
>  .../Intel/BoardModulePkg/BoardModulePkg.dec   |  3 +
>  .../BoardModulePkg/Include/Library/BiosInfo.h | 62
> +++
>  2 files changed, 65 insertions(+)
>  create mode 100644
> Platform/Intel/BoardModulePkg/Include/Library/BiosInfo.h
> 
> diff --git a/Platform/Intel/BoardModulePkg/BoardModulePkg.dec
> b/Platform/Intel/BoardModulePkg/BoardModulePkg.dec
> index 6f13945ca8..035427b2f5 100644
> --- a/Platform/Intel/BoardModulePkg/BoardModulePkg.dec
> +++ b/Platform/Intel/BoardModulePkg/BoardModulePkg.dec
> @@ -36,3 +36,6 @@
>  [Guids]
>## Include Include/Guid/BiosId.h
>gBiosIdGuid = { 0xC3E36D09, 0x8294, 0x4b97, { 0xA8, 0x57, 0xD5, 0x28, 0x8F,
> 0xE3, 0x3E, 0x28 } }
> +
> +  ## GUID to publish BIOS information HOB  gBiosInfoGuid = {
> + 0x09d0d15c, 0xe9f0, 0x4dfc, {0x9e, 0x0b, 0x39, 0x33, 0x1f, 0xca, 0x66,
> + 0x85} }
> diff --git a/Platform/Intel/BoardModulePkg/Include/Library/BiosInfo.h
> b/Platform/Intel/BoardModulePkg/Include/Library/BiosInfo.h
> new file mode 100644
> index 00..bba1c07bff
> --- /dev/null
> +++ b/Platform/Intel/BoardModulePkg/Include/Library/BiosInfo.h
> @@ -0,0 +1,62 @@
> +/** @file
> +
> +  Driver for BIOS Info support.
> +
> +  Copyright (c) 2019, Intel Corporation. All rights reserved.
> +  SPDX-License-Identifier: BSD-2-Clause-Patent **/
> +
> +#ifndef _BIOS_INFO_H_
> +#define _BIOS_INFO_H_
> +
> +//
> +// BIOS INFO data structure
> +// This is self contained data structure for BIOS info for TXT //
> +#pragma pack (1) #define BIOS_INFO_SIGNATURE  SIGNATURE_64 ('$', 'B',
> +'I', 'O', 'S', 'I', 'F', '$') typedef struct {
> +  UINT64Signature;
> +  UINT32EntryCount;
> +  UINT32Reserved;
> +//BIOS_INFO_STRUCT  Struct[EntryCount]; } BIOS_INFO_HEADER;
> +
> +//
> +// BIOS_INFO_STRUCT attributes
> +// bits[0:3] means general attributes
> +// bits[4:7] means type specific attributes // #define
> +BIOS_INFO_STRUCT_ATTRIBUTE_GENERAL_EXCLUDE_FROM_FIT  0x01
> +#define BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION
> 0x10
> +#define BIOS_INFO_STRUCT_ATTRIBUTE_BIOS_POST_IBB 0x10
> +#define BIOS_INFO_STRUCT_ATTRIBUTE_BIOS_NON_IBB  0x20
> +
> +typedef struct {
> +  //
> +  // FitTable entry type
> +  //
> +  UINT8Type;
> +  //
> +  // BIOS_INFO_STRUCT attributes
> +  //
> +  UINT8Attributes;
> +  //
> +  // FitTable entry version
> +  //
> +  UINT16   Version;
> +  //
> +  // FitTable entry real size
> +  //
> +  UINT32   Size;
> +  //
> +  // FitTable entry address
> +  //
> +  UINT64   Address;
> +} BIOS_INFO_STRUCT;
> +
> +extern EFI_GUID  gBiosInfoGuid;
> +
> +#pragma pack ()
> +
> +#endif
> --
> 2.19.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48512): https://edk2.groups.io/g/devel/message/48512
Mute This Topic: https://groups.io/mt/34386697/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 18/35] NetworkPkg/DxeNetLib: fix type typo in NetLibGetMacAddress()

2019-10-07 Thread Siyuan, Fu
Just return from vacation. Sorry for late response.

Reviewed-by: Siyuan Fu 

> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Philippe
> Mathieu-Daudé
> Sent: 2019年9月24日 19:00
> To: devel@edk2.groups.io; ler...@redhat.com
> Cc: Wu, Jiaxin ; Fu, Siyuan 
> Subject: Re: [edk2-devel] [PATCH 18/35] NetworkPkg/DxeNetLib: fix type
> typo in NetLibGetMacAddress()
> 
> On 9/17/19 9:49 PM, Laszlo Ersek wrote:
> > NetLibGetSnpHandle() returns an EFI_HANDLE, not an (EFI_HANDLE*).
> > NetLibGetMacAddress() only uses the return value ("SnpHandle") for a
> > NULL-check. Fix the type of "SnpHandle".
> >
> > This patch is a no-op.
> >
> > Cc: Jiaxin Wu 
> > Cc: Siyuan Fu 
> > Signed-off-by: Laszlo Ersek 
> > ---
> >
> > Notes:
> > lightly tested: MAC strings are displayed in UiApp
> >
> >  NetworkPkg/Library/DxeNetLib/DxeNetLib.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/NetworkPkg/Library/DxeNetLib/DxeNetLib.c
> b/NetworkPkg/Library/DxeNetLib/DxeNetLib.c
> > index 8e2f720666ea..a39c20be3d34 100644
> > --- a/NetworkPkg/Library/DxeNetLib/DxeNetLib.c
> > +++ b/NetworkPkg/Library/DxeNetLib/DxeNetLib.c
> > @@ -2182,7 +2182,7 @@ NetLibGetMacAddress (
> >EFI_SIMPLE_NETWORK_MODE  SnpModeData;
> >EFI_MANAGED_NETWORK_PROTOCOL *Mnp;
> >EFI_SERVICE_BINDING_PROTOCOL *MnpSb;
> > -  EFI_HANDLE   *SnpHandle;
> > +  EFI_HANDLE   SnpHandle;
> >EFI_HANDLE   MnpChildHandle;
> >
> >ASSERT (MacAddress != NULL);
> >
> 
> Since SnpHandle is only checked for being non-null, this change is
> indeed a no-op, else it would probably fixed some bug.
> 
> Reviewed-by: Philippe Mathieu-Daude 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48511): https://edk2.groups.io/g/devel/message/48511
Mute This Topic: https://groups.io/mt/34180219/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [edk2-platforms] [PATCH 2/5] KabylakeOpenBoardPkg/KabylakeRvp3: Add BIOS Info PEIM

2019-10-07 Thread Nate DeSimone
Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c and 
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.c are 
identical files. Can we move this up to the parent KabylakeOpenBoardPkg and use 
one PEIM for both platforms?

-Original Message-
From: Agyeman, Prince  
Sent: Thursday, October 3, 2019 2:13 PM
To: devel@edk2.groups.io
Cc: Sinha, Ankit ; Desimone, Nathaniel L 
; Kubacki, Michael A 

Subject: [edk2-platforms] [PATCH 2/5] KabylakeOpenBoardPkg/KabylakeRvp3: Add 
BIOS Info PEIM

Added BIOS Info PEIM to KabylakeRvp3 to publish the BIOS info HOB. This PEIM 
currently publishs the board's microcode region info.

Cc: Ankit Sinha 
Cc: Nate DeSimone 
Cc: Kubacki Michael A 

Signed-off-by: Prince Agyeman 
---
 .../KabylakeRvp3/BiosInfo/BiosInfo.c  | 93 +++
 .../KabylakeRvp3/BiosInfo/BiosInfo.inf| 48 ++
 .../KabylakeRvp3/OpenBoardPkg.dsc |  2 +
 .../KabylakeRvp3/OpenBoardPkg.fdf |  1 +
 4 files changed, 144 insertions(+)
 create mode 100644 
Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c
 create mode 100644 
Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.inf

diff --git 
a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c 
b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c
new file mode 100644
index 00..6a058a0fc2
--- /dev/null
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo
+++ .c
@@ -0,0 +1,93 @@
+/** @file
+  Driver for BIOS Info support.
+
+  Copyright (c) 2019, Intel Corporation. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent **/
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define INDEXPORT_TO_ADDRESS(x) (x)
+#define DATAPORT_TO_ADDRESS(x)  ((x) << 16)
+#define PORTWIDTH_TO_ADDRESS(x) ((x) << 32)
+#define PORTBITNUMBER_TO_ADDRESS(x) ((x) << 40)
+#define PORTINDEXNUMBER_TO_ADDRESS(x)   ((x) << 48)
+
+//
+// Internal
+//
+#pragma pack (1)
+
+typedef struct {
+  BIOS_INFO_HEADER  Header;
+  BIOS_INFO_STRUCT  Entry[1];
+} BIOS_INFO;
+#pragma pack ()
+
+GLOBAL_REMOVE_IF_UNREFERENCED BIOS_INFO  mBiosInfo = {
+  {
+BIOS_INFO_SIGNATURE,
+1,
+0,
+  },
+  {
+{
+  FIT_TYPE_01_MICROCODE,
+  BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION,
+  0x0100,
+  FixedPcdGet32 (PcdFlashMicrocodeFvSize),
+  FixedPcdGet32 (PcdFlashMicrocodeFvBase)
+}
+  }
+};
+
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR  mBiosInfoPpiList 
+= {
+  EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
+  ,
+  
+};
+
+/**
+  Installs BiosInfo Ppi.
+
+  @param  FileHandle  Handle of the file being invoked.
+  @param  PeiServices Describes the list of possible PEI Services.
+
+  @retval EFI_SUCCESS   Install the BiosInfo Ppi successfully.
+
+**/
+EFI_STATUS
+EFIAPI
+BiosInfoEntryPoint (
+  IN   EFI_PEI_FILE_HANDLE  FileHandle,
+  IN CONST EFI_PEI_SERVICES **PeiServices
+  )
+{
+  EFI_STATUS  Status;
+  VOID*HobData;
+
+  //
+  // Install PPI, so that other PEI module can add dependency.
+  //
+  Status = PeiServicesInstallPpi ();  ASSERT_EFI_ERROR 
+ (Status);
+
+  //
+  // Build hob, so that DXE module can also get the data.
+  //
+  HobData = BuildGuidHob (, sizeof (mBiosInfo));  ASSERT 
+ (HobData != NULL);  if (HobData == NULL) {
+return EFI_OUT_OF_RESOURCES;
+  }
+  CopyMem (HobData, , sizeof (mBiosInfo));
+
+  return EFI_SUCCESS;
+}
diff --git 
a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.inf 
b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.inf
new file mode 100644
index 00..94543408b1
--- /dev/null
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo
+++ .inf
@@ -0,0 +1,48 @@
+### @file
+#  Module Information description file for BIOS Info Driver # #
+Copyright (c) 2019, Intel Corporation. All rights reserved. #
+SPDX-License-Identifier: BSD-2-Clause-Patent ###
+
+[Defines]
+  INF_VERSION= 0x00010017
+  BASE_NAME  = BiosInfo
+  FILE_GUID  = C83BCE0E-6F16-4D3C-8D9F-4D6F5A032929
+  VERSION_STRING = 1.0
+  MODULE_TYPE= PEIM
+  ENTRY_POINT= BiosInfoEntryPoint
+#
+# The following information is for reference only and not required by the 
build tools.
+#
+# VALID_ARCHITECTURES IA32 X64
+#
+
+[LibraryClasses]
+  PeimEntryPoint
+  PeiServicesLib
+  HobLib
+  BaseMemoryLib
+  DebugLib
+
+[Packages]
+  MdePkg/MdePkg.dec
+  MdeModulePkg/MdeModulePkg.dec
+  IntelSiliconPkg/IntelSiliconPkg.dec
+  KabylakeSiliconPkg/SiPkg.dec
+  KabylakeFspBinPkg/KabylakeFspBinPkg.dec
+  BoardModulePkg/BoardModulePkg.dec
+  MinPlatformPkg/MinPlatformPkg.dec
+
+[Pcd]
+  gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvBase## CONSUMES
+  

Re: [edk2-devel] [edk2-platforms] [PATCH 4/5] WhiskeylakeOpenBoardPkg: Add BIOS INFO PEIM

2019-10-07 Thread Nate DeSimone
Same comment as PATCH 2 & 3, it seems like this PEIM could be used generically 
by any Whiskeylake board so I would prefer one copy of it in 
WhiskeylakeOpenBoardPkg.

-Original Message-
From: Agyeman, Prince  
Sent: Thursday, October 3, 2019 2:13 PM
To: devel@edk2.groups.io
Cc: Sinha, Ankit ; Desimone, Nathaniel L 
; Kubacki, Michael A 

Subject: [edk2-platforms] [PATCH 4/5] WhiskeylakeOpenBoardPkg: Add BIOS INFO 
PEIM

Added BIOS info PEIM to publish Bios Info HOB. This PEIM currently publishes 
the microcode FV info.

Cc: Ankit Sinha 
Cc: Nate DeSimone 
Cc: Kubacki Michael A 

Signed-off-by: Prince Agyeman 
---
 .../WhiskeylakeURvp/BiosInfo/BiosInfo.c   | 93 +++
 .../WhiskeylakeURvp/BiosInfo/BiosInfo.inf | 48 ++
 .../WhiskeylakeURvp/OpenBoardPkg.dsc  |  2 +
 .../WhiskeylakeURvp/OpenBoardPkg.fdf  |  1 +
 4 files changed, 144 insertions(+)
 create mode 100644 
Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosInfo.c
 create mode 100644 
Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosInfo.inf

diff --git 
a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosInfo.c 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosInfo.c
new file mode 100644
index 00..6a058a0fc2
--- /dev/null
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/Bi
+++ osInfo.c
@@ -0,0 +1,93 @@
+/** @file
+  Driver for BIOS Info support.
+
+  Copyright (c) 2019, Intel Corporation. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent **/
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define INDEXPORT_TO_ADDRESS(x) (x)
+#define DATAPORT_TO_ADDRESS(x)  ((x) << 16)
+#define PORTWIDTH_TO_ADDRESS(x) ((x) << 32)
+#define PORTBITNUMBER_TO_ADDRESS(x) ((x) << 40)
+#define PORTINDEXNUMBER_TO_ADDRESS(x)   ((x) << 48)
+
+//
+// Internal
+//
+#pragma pack (1)
+
+typedef struct {
+  BIOS_INFO_HEADER  Header;
+  BIOS_INFO_STRUCT  Entry[1];
+} BIOS_INFO;
+#pragma pack ()
+
+GLOBAL_REMOVE_IF_UNREFERENCED BIOS_INFO  mBiosInfo = {
+  {
+BIOS_INFO_SIGNATURE,
+1,
+0,
+  },
+  {
+{
+  FIT_TYPE_01_MICROCODE,
+  BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION,
+  0x0100,
+  FixedPcdGet32 (PcdFlashMicrocodeFvSize),
+  FixedPcdGet32 (PcdFlashMicrocodeFvBase)
+}
+  }
+};
+
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR  mBiosInfoPpiList 
+= {
+  EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
+  ,
+  
+};
+
+/**
+  Installs BiosInfo Ppi.
+
+  @param  FileHandle  Handle of the file being invoked.
+  @param  PeiServices Describes the list of possible PEI Services.
+
+  @retval EFI_SUCCESS   Install the BiosInfo Ppi successfully.
+
+**/
+EFI_STATUS
+EFIAPI
+BiosInfoEntryPoint (
+  IN   EFI_PEI_FILE_HANDLE  FileHandle,
+  IN CONST EFI_PEI_SERVICES **PeiServices
+  )
+{
+  EFI_STATUS  Status;
+  VOID*HobData;
+
+  //
+  // Install PPI, so that other PEI module can add dependency.
+  //
+  Status = PeiServicesInstallPpi ();  ASSERT_EFI_ERROR 
+ (Status);
+
+  //
+  // Build hob, so that DXE module can also get the data.
+  //
+  HobData = BuildGuidHob (, sizeof (mBiosInfo));  ASSERT 
+ (HobData != NULL);  if (HobData == NULL) {
+return EFI_OUT_OF_RESOURCES;
+  }
+  CopyMem (HobData, , sizeof (mBiosInfo));
+
+  return EFI_SUCCESS;
+}
diff --git 
a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosInfo.inf 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/BiosInfo.inf
new file mode 100644
index 00..f268de00f5
--- /dev/null
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/BiosInfo/Bi
+++ osInfo.inf
@@ -0,0 +1,48 @@
+### @file
+#  Module Information description file for BIOS Info Driver # #
+Copyright (c) 2019, Intel Corporation. All rights reserved. #
+SPDX-License-Identifier: BSD-2-Clause-Patent ###
+
+[Defines]
+  INF_VERSION= 0x00010017
+  BASE_NAME  = BiosInfo
+  FILE_GUID  = A842B2D2-5C88-44E9-A9E2-4830F26662B7
+  VERSION_STRING = 1.0
+  MODULE_TYPE= PEIM
+  ENTRY_POINT= BiosInfoEntryPoint
+#
+# The following information is for reference only and not required by the 
build tools.
+#
+# VALID_ARCHITECTURES IA32 X64
+#
+
+[LibraryClasses]
+  PeimEntryPoint
+  PeiServicesLib
+  HobLib
+  BaseMemoryLib
+  DebugLib
+
+[Packages]
+  MdePkg/MdePkg.dec
+  MdeModulePkg/MdeModulePkg.dec
+  IntelSiliconPkg/IntelSiliconPkg.dec
+  CoffeelakeSiliconPkg/SiPkg.dec
+  CoffeeLakeFspBinPkg/CoffeeLakeFspBinPkg.dec
+  BoardModulePkg/BoardModulePkg.dec
+  MinPlatformPkg/MinPlatformPkg.dec
+
+[Pcd]
+  gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvBase## CONSUMES
+  gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvSize## CONSUMES
+
+[Sources]
+  

Re: [edk2-devel] [edk2-platforms] [PATCH 5/5] Platform/Intel: Add FIT generation tool

2019-10-07 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

-Original Message-
From: Agyeman, Prince  
Sent: Thursday, October 3, 2019 2:13 PM
To: devel@edk2.groups.io
Cc: Sinha, Ankit ; Desimone, Nathaniel L 
; Kubacki, Michael A 

Subject: [edk2-platforms] [PATCH 5/5] Platform/Intel: Add FIT generation tool

Added fit generation tool to the build
process.

What was done:

Added BIOS_INFO_GUID to the build.cfg

Added BIOS_INFO_GUID to GalagoPro3,
KabylakeRvp3 and WhiskeylakeURvp build_config.cfg This allows the boards to 
specify the GUID associated with the its Bios Info PEIM

BIOS_INFO_GUID is passed as an argument to FitGen in the FIT table generation 
process

Cc: Ankit Sinha 
Cc: Nate DeSimone 
Cc: Michael Kubacki 

Signed-off-by: Prince Agyeman 
---
 .../GalagoPro3/build_config.cfg   |  1 +
 .../KabylakeRvp3/build_config.cfg |  1 +
 .../WhiskeylakeURvp/build_config.cfg  |  1 +
 Platform/Intel/build.cfg  |  1 +
 Platform/Intel/build_bios.py  | 57 +++
 5 files changed, 61 insertions(+)

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg 
b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg
index 8c6c51abb4..3f64239a29 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/build_config.cfg
@@ -31,3 +31,4 @@ FSP_PKG_NAME = KabylakeFspPkg  FSP_BINARY_BUILD = FALSE  
FSP_TEST_RELEASE = FALSE  SECURE_BOOT_ENABLE = FALSE
+BIOS_INFO_GUID = 3132E669-D16B-4AA7-B09B-BC0EB5F40E1F
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg 
b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
index 78f808bfaf..f6ae4b342a 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/build_config.cfg
@@ -33,3 +33,4 @@ FSP_PKG_NAME = AmberLakeFspPkg  FSP_BINARY_BUILD = FALSE  
FSP_TEST_RELEASE = FALSE  SECURE_BOOT_ENABLE = FALSE
+BIOS_INFO_GUID = C83BCE0E-6F16-4D3C-8D9F-4D6F5A032929
diff --git 
a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.cfg 
b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.cfg
index 1b0619bc1c..1dfe5ffd10 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.cfg
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_confi
+++ g.cfg
@@ -31,3 +31,4 @@ FSP_PKG_NAME = CoffeelakeSiliconPkg  FSP_BINARY_BUILD = FALSE 
 FSP_TEST_RELEASE = FALSE  SECURE_BOOT_ENABLE = FALSE
+BIOS_INFO_GUID = A842B2D2-5C88-44E9-A9E2-4830F26662B7
diff --git a/Platform/Intel/build.cfg b/Platform/Intel/build.cfg index 
2040774d1b..6aee96694c 100644
--- a/Platform/Intel/build.cfg
+++ b/Platform/Intel/build.cfg
@@ -48,6 +48,7 @@ SECURE_BOOT_ENABLE = FALSE  REBUILD_MODE =  BUILD_ROM_ONLY =  
NUMBER_OF_PROCESSORS = 0
+BIOS_INFO_GUID =
 
 
 [PLATFORMS]
diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py index 
46285df19a..ea098de705 100644
--- a/Platform/Intel/build_bios.py
+++ b/Platform/Intel/build_bios.py
@@ -196,6 +196,31 @@ def pre_build(build_config, build_type="DEBUG", 
silent=False, toolchain=None):
 if return_code != 0:
 build_failed(config)
 
+#
+# build platform silicon tools
+#
+# save the current workspace
+saved_work_directory = config["WORKSPACE"]
+# change the workspace to silicon tools directory
+config["WORKSPACE"] = os.path.join(config["WORKSPACE_SILICON"], 
+ "Tools")
+
+command = ["nmake"]
+if os.name == "posix":  # linux
+command = ["make"]
+# add path to generated FitGen binary to
+# environment path variable
+config["PATH"] += os.pathsep + \
+  os.path.join(config["BASE_TOOLS_PATH"],
+   "Source", "C", "bin")
+
+# build the silicon tools
+_, _, result, return_code = execute_script(command, config, shell=shell)
+if return_code != 0:
+build_failed(config)
+
+# restore WORKSPACE environment variable
+config["WORKSPACE"] = saved_work_directory
+
 config["SILENT_MODE"] = 'TRUE' if silent else 'FALSE'
 
 print("==")
@@ -404,6 +429,35 @@ def post_build(config):
 :returns: nothing
 """
 print("Running post_build to complete the build process.")
+board_fd = config["BOARD"].upper()
+final_fd = os.path.join(config["BUILD_DIR_PATH"], "FV",
+"{}.fd".format(board_fd))
+
+if config["BIOS_INFO_GUID"]:
+# Generate the fit table
+print("Generating FIT ...")
+if os.path.isfile(final_fd):
+temp_fd = os.path.join(config["BUILD_DIR_PATH"], "FV",
+   "{}_.fd".format(board_fd))
+shell = True
+command = ["FitGen", "-D",
+   final_fd, temp_fd, "-NA",
+   

Re: [edk2-devel] [edk2-platforms] [PATCH 3/5] KabylakeOpenBoardPkg/GalagoPro3: Add BiosInfo PEIM

2019-10-07 Thread Nate DeSimone
Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/BiosInfo/BiosInfo.c and 
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.c are 
identical files. Can we move this up to the parent KabylakeOpenBoardPkg and use 
one PEIM for both platforms?

-Original Message-
From: Agyeman, Prince  
Sent: Thursday, October 3, 2019 2:13 PM
To: devel@edk2.groups.io
Cc: Sinha, Ankit ; Desimone, Nathaniel L 
; Kubacki, Michael A 

Subject: [edk2-platforms] [PATCH 3/5] KabylakeOpenBoardPkg/GalagoPro3: Add 
BiosInfo PEIM

Added BiosInfo PEIM to publish the
Bios Info HOB. Currently this PEIM publishes one Bios Info entry which is the 
microcode region information.

Cc: Ankit Sinha 
Cc: Nate DeSimone 
Cc: Kubacki Michael A 

Signed-off-by: Prince Agyeman 
---
 .../GalagoPro3/BiosInfo/BiosInfo.c| 92 +++
 .../GalagoPro3/BiosInfo/BiosInfo.inf  | 48 ++
 .../GalagoPro3/OpenBoardPkg.dsc   |  2 +
 .../GalagoPro3/OpenBoardPkg.fdf   |  1 +
 4 files changed, 143 insertions(+)
 create mode 100644 
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.c
 create mode 100644 
Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.inf

diff --git a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.c 
b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.c
new file mode 100644
index 00..4db9d4685c
--- /dev/null
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.c
@@ -0,0 +1,92 @@
+/** @file
+  Driver for BIOS Info support.
+
+Copyright (c) 2019, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include  
+#include  #include  
+#include  #include  
+#include  #include  #include 
+
+
+#define INDEXPORT_TO_ADDRESS(x) (x)
+#define DATAPORT_TO_ADDRESS(x)  ((x) << 16)
+#define PORTWIDTH_TO_ADDRESS(x) ((x) << 32)
+#define PORTBITNUMBER_TO_ADDRESS(x) ((x) << 40)
+#define PORTINDEXNUMBER_TO_ADDRESS(x)   ((x) << 48)
+
+//
+// Internal
+//
+#pragma pack (1)
+
+typedef struct {
+  BIOS_INFO_HEADER  Header;
+  BIOS_INFO_STRUCT  Entry[1];
+} BIOS_INFO;
+#pragma pack ()
+
+GLOBAL_REMOVE_IF_UNREFERENCED BIOS_INFO  mBiosInfo = {
+  {
+BIOS_INFO_SIGNATURE,
+1,
+0,
+  },
+  {
+{
+  FIT_TYPE_01_MICROCODE,
+  BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION,
+  0x0100,
+  FixedPcdGet32 (PcdFlashMicrocodeFvSize),
+  FixedPcdGet32 (PcdFlashMicrocodeFvBase)
+}
+  }
+};
+
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_PEI_PPI_DESCRIPTOR  mBiosInfoPpiList 
+= {
+  EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
+  ,
+  
+};
+
+/**
+  Installs BiosInfo Ppi.
+
+  @param  FileHandle  Handle of the file being invoked.
+  @param  PeiServices Describes the list of possible PEI Services.
+
+  @retval EFI_SUCCESS   Install the BiosInfo Ppi successfully.
+
+**/
+EFI_STATUS
+EFIAPI
+BiosInfoEntryPoint (
+  IN   EFI_PEI_FILE_HANDLE  FileHandle,
+  IN CONST EFI_PEI_SERVICES **PeiServices
+  )
+{
+  EFI_STATUS  Status;
+  VOID*HobData;
+
+  //
+  // Install PPI, so that other PEI module can add dependency.
+  //
+  Status = PeiServicesInstallPpi ();  ASSERT_EFI_ERROR 
+ (Status);
+
+  //
+  // Build hob, so that DXE module can also get the data.
+  //
+  HobData = BuildGuidHob (, sizeof (mBiosInfo));  ASSERT 
+ (HobData != NULL);  if (HobData == NULL) {
+return EFI_OUT_OF_RESOURCES;
+  }
+  CopyMem (HobData, , sizeof (mBiosInfo));
+
+  return EFI_SUCCESS;
+}
diff --git 
a/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.inf 
b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.inf
new file mode 100644
index 00..a0e18cff9c
--- /dev/null
+++ b/Platform/Intel/KabylakeOpenBoardPkg/GalagoPro3/BiosInfo/BiosInfo.i
+++ nf
@@ -0,0 +1,48 @@
+### @file
+#  Module Information description file for BIOS Info Driver # #
+Copyright (c) 2019, Intel Corporation. All rights reserved. #
+SPDX-License-Identifier: BSD-2-Clause-Patent ###
+
+[Defines]
+  INF_VERSION= 0x00010017
+  BASE_NAME  = BiosInfo
+  FILE_GUID  = 3132E669-D16B-4AA7-B09B-BC0EB5F40E1F
+  VERSION_STRING = 1.0
+  MODULE_TYPE= PEIM
+  ENTRY_POINT= BiosInfoEntryPoint
+#
+# The following information is for reference only and not required by the 
build tools.
+#
+# VALID_ARCHITECTURES IA32 X64
+#
+
+[LibraryClasses]
+  PeimEntryPoint
+  PeiServicesLib
+  HobLib
+  BaseMemoryLib
+  DebugLib
+
+[Packages]
+  MdePkg/MdePkg.dec
+  MdeModulePkg/MdeModulePkg.dec
+  IntelSiliconPkg/IntelSiliconPkg.dec
+  KabylakeSiliconPkg/SiPkg.dec
+  KabylakeFspBinPkg/KabylakeFspBinPkg.dec
+  BoardModulePkg/BoardModulePkg.dec
+  MinPlatformPkg/MinPlatformPkg.dec
+
+[Pcd]
+  gSiPkgTokenSpaceGuid.PcdFlashMicrocodeFvBase## CONSUMES
+  

Re: [edk2-devel] [edk2-platforms] [PATCH 1/5] BoardModulePkg: Add bios info HOB

2019-10-07 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

-Original Message-
From: Agyeman, Prince  
Sent: Thursday, October 3, 2019 2:13 PM
To: devel@edk2.groups.io
Cc: Sinha, Ankit ; Desimone, Nathaniel L 
; Kubacki, Michael A 

Subject: [edk2-platforms] [PATCH 1/5] BoardModulePkg: Add bios info HOB

Added gBiosInfoGuid to be used to
publish BIOS information HOB which
is needed in FIT generation

Also added the Bios Info header
file BiosInfo.h

Cc: Ankit Sinha 
Cc: Nate DeSimone 
Cc: Kubacki Michael A 

Signed-off-by: Prince Agyeman 
---
 .../Intel/BoardModulePkg/BoardModulePkg.dec   |  3 +
 .../BoardModulePkg/Include/Library/BiosInfo.h | 62 +++
 2 files changed, 65 insertions(+)
 create mode 100644 Platform/Intel/BoardModulePkg/Include/Library/BiosInfo.h

diff --git a/Platform/Intel/BoardModulePkg/BoardModulePkg.dec 
b/Platform/Intel/BoardModulePkg/BoardModulePkg.dec
index 6f13945ca8..035427b2f5 100644
--- a/Platform/Intel/BoardModulePkg/BoardModulePkg.dec
+++ b/Platform/Intel/BoardModulePkg/BoardModulePkg.dec
@@ -36,3 +36,6 @@
 [Guids]
   ## Include Include/Guid/BiosId.h
   gBiosIdGuid = { 0xC3E36D09, 0x8294, 0x4b97, { 0xA8, 0x57, 0xD5, 0x28, 0x8F, 
0xE3, 0x3E, 0x28 } }
+
+  ## GUID to publish BIOS information HOB  gBiosInfoGuid = { 
+ 0x09d0d15c, 0xe9f0, 0x4dfc, {0x9e, 0x0b, 0x39, 0x33, 0x1f, 0xca, 0x66, 
+ 0x85} }
diff --git a/Platform/Intel/BoardModulePkg/Include/Library/BiosInfo.h 
b/Platform/Intel/BoardModulePkg/Include/Library/BiosInfo.h
new file mode 100644
index 00..bba1c07bff
--- /dev/null
+++ b/Platform/Intel/BoardModulePkg/Include/Library/BiosInfo.h
@@ -0,0 +1,62 @@
+/** @file
+
+  Driver for BIOS Info support.
+
+  Copyright (c) 2019, Intel Corporation. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent **/
+
+#ifndef _BIOS_INFO_H_
+#define _BIOS_INFO_H_
+
+//
+// BIOS INFO data structure
+// This is self contained data structure for BIOS info for TXT // 
+#pragma pack (1) #define BIOS_INFO_SIGNATURE  SIGNATURE_64 ('$', 'B', 
+'I', 'O', 'S', 'I', 'F', '$') typedef struct {
+  UINT64Signature;
+  UINT32EntryCount;
+  UINT32Reserved;
+//BIOS_INFO_STRUCT  Struct[EntryCount]; } BIOS_INFO_HEADER;
+
+//
+// BIOS_INFO_STRUCT attributes
+// bits[0:3] means general attributes
+// bits[4:7] means type specific attributes // #define 
+BIOS_INFO_STRUCT_ATTRIBUTE_GENERAL_EXCLUDE_FROM_FIT  0x01
+#define BIOS_INFO_STRUCT_ATTRIBUTE_MICROCODE_WHOLE_REGION0x10
+#define BIOS_INFO_STRUCT_ATTRIBUTE_BIOS_POST_IBB 0x10
+#define BIOS_INFO_STRUCT_ATTRIBUTE_BIOS_NON_IBB  0x20
+
+typedef struct {
+  //
+  // FitTable entry type
+  //
+  UINT8Type;
+  //
+  // BIOS_INFO_STRUCT attributes
+  //
+  UINT8Attributes;
+  //
+  // FitTable entry version
+  //
+  UINT16   Version;
+  //
+  // FitTable entry real size
+  //
+  UINT32   Size;
+  //
+  // FitTable entry address
+  //
+  UINT64   Address;
+} BIOS_INFO_STRUCT;
+
+extern EFI_GUID  gBiosInfoGuid;
+
+#pragma pack ()
+
+#endif
--
2.19.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48506): https://edk2.groups.io/g/devel/message/48506
Mute This Topic: https://groups.io/mt/34386697/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 18/35] NetworkPkg/DxeNetLib: fix type typo in NetLibGetMacAddress()

2019-10-07 Thread Michael D Kinney
Laszlo,

Reviewed-by: Michael D Kinney 

Mike

> -Original Message-
> From: devel@edk2.groups.io  On
> Behalf Of Laszlo Ersek
> Sent: Tuesday, September 17, 2019 12:49 PM
> To: edk2-devel-groups-io 
> Cc: Wu, Jiaxin ; Fu, Siyuan
> 
> Subject: [edk2-devel] [PATCH 18/35]
> NetworkPkg/DxeNetLib: fix type typo in
> NetLibGetMacAddress()
> 
> NetLibGetSnpHandle() returns an EFI_HANDLE, not an
> (EFI_HANDLE*).
> NetLibGetMacAddress() only uses the return value
> ("SnpHandle") for a NULL-check. Fix the type of
> "SnpHandle".
> 
> This patch is a no-op.
> 
> Cc: Jiaxin Wu 
> Cc: Siyuan Fu 
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> lightly tested: MAC strings are displayed in UiApp
> 
>  NetworkPkg/Library/DxeNetLib/DxeNetLib.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/NetworkPkg/Library/DxeNetLib/DxeNetLib.c
> b/NetworkPkg/Library/DxeNetLib/DxeNetLib.c
> index 8e2f720666ea..a39c20be3d34 100644
> --- a/NetworkPkg/Library/DxeNetLib/DxeNetLib.c
> +++ b/NetworkPkg/Library/DxeNetLib/DxeNetLib.c
> @@ -2182,7 +2182,7 @@ NetLibGetMacAddress (
>EFI_SIMPLE_NETWORK_MODE  SnpModeData;
>EFI_MANAGED_NETWORK_PROTOCOL *Mnp;
>EFI_SERVICE_BINDING_PROTOCOL *MnpSb;
> -  EFI_HANDLE   *SnpHandle;
> +  EFI_HANDLE   SnpHandle;
>EFI_HANDLE   MnpChildHandle;
> 
>ASSERT (MacAddress != NULL);
> --
> 2.19.1.3.g30247aa5d201
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this
> group.
> 
> View/Reply Online (#47405):
> https://edk2.groups.io/g/devel/message/47405
> Mute This Topic: https://groups.io/mt/34180219/1643496
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub
> [michael.d.kin...@intel.com]
> -=-=-=-=-=-=


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48505): https://edk2.groups.io/g/devel/message/48505
Mute This Topic: https://groups.io/mt/34180219/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH 26/35] SecurityPkg: fix UninstallMultipleProtocolInterfaces() calls

2019-10-07 Thread Laszlo Ersek
On 10/05/19 16:28, Zhang, Chao B wrote:
> Reviewed-by : Chao Zhang 

Thanks!
Laszlo

> 
> -Original Message-
> From: Zhang, Chao B 
> Sent: 2019年10月4日 21:14
> To: edk2-devel-groups-io ; 'ler...@redhat.com' 
> ; Wang, Jian J ; Yao, Jiewen 
> 
> Subject: RE: [edk2-devel] [PATCH 26/35] SecurityPkg: fix 
> UninstallMultipleProtocolInterfaces() calls
> 
> Hi Laszlo:
>Sorry for late response. The fix is good to me. I am also interested in 
> how you find this issue, can you share it?
>
> -Original Message-
> From: Laszlo Ersek [mailto:ler...@redhat.com]
> Sent: 2019年10月3日 19:07
> To: Zhang, Chao B ; Wang, Jian J 
> ; Yao, Jiewen 
> Cc: edk2-devel-groups-io 
> Subject: Re: [edk2-devel] [PATCH 26/35] SecurityPkg: fix 
> UninstallMultipleProtocolInterfaces() calls
> 
> Pinging SecurityPkg maintainers again, for reviewing this patch.
> 
> Thanks
> Laszlo
> 
> On 09/26/19 14:45, Laszlo Ersek wrote:
>> Chao, Jian, Jiewen,
>>
>> can you please review this patch?
>>
>> Thanks,
>> Laszlo
>>
>> On 09/17/19 21:49, Laszlo Ersek wrote:
>>> Unlike the InstallMultipleProtocolInterfaces() boot service, which 
>>> takes an (EFI_HANDLE*) as first parameter, the
>>> UninstallMultipleProtocolInterfaces() boot service takes an 
>>> EFI_HANDLE as first parameter.
>>>
>>> These are actual bugs. They must have remained hidden until now 
>>> because they are all in Unload() functions, which are probably 
>>> exercised infrequently. Fix the UninstallMultipleProtocolInterfaces() calls.
>>>
>>> Cc: Chao Zhang 
>>> Cc: Jian Wang 
>>> Cc: Jiewen Yao 
>>> Signed-off-by: Laszlo Ersek 
>>> ---
>>>
>>> Notes:
>>> build-tested only
>>>
>>>  SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c  
>>> | 2 +-
>>>  SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c 
>>> | 2 +-
>>>
>>> SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi
>>> gDriver.c | 2 +-
>>>  3 files changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c
>>> b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c
>>> index 54155a338100..9052eced757d 100644
>>> --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c
>>> +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDriver.c
>>> @@ -443,7 +443,7 @@ Tcg2ConfigDriverUnload (
>>>ASSERT (PrivateData->Signature == 
>>> TCG2_CONFIG_PRIVATE_DATA_SIGNATURE);
>>>
>>>gBS->UninstallMultipleProtocolInterfaces (
>>> - ,
>>> + ImageHandle,
>>>   ,
>>>   PrivateData,
>>>   NULL
>>> diff --git a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c
>>> b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c
>>> index 341879e4c4ba..fb06624fdb8f 100644
>>> --- a/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c
>>> +++ b/SecurityPkg/Tcg/TcgConfigDxe/TcgConfigDriver.c
>>> @@ -138,7 +138,7 @@ TcgConfigDriverUnload (
>>>ASSERT (PrivateData->Signature == 
>>> TCG_CONFIG_PRIVATE_DATA_SIGNATURE);
>>>
>>>gBS->UninstallMultipleProtocolInterfaces (
>>> - ,
>>> + ImageHandle,
>>>   ,
>>>   PrivateData,
>>>   NULL
>>> diff --git
>>> a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootCon
>>> figDriver.c
>>> b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootCon
>>> figDriver.c index 798ef9cfbc01..6c0294151e6c 100644
>>> ---
>>> a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootCon
>>> figDriver.c
>>> +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBoo
>>> +++ tConfigDriver.c
>>> @@ -115,7 +115,7 @@ SecureBootConfigDriverUnload (
>>>ASSERT (PrivateData->Signature == 
>>> SECUREBOOT_CONFIG_PRIVATE_DATA_SIGNATURE);
>>>
>>>gBS->UninstallMultipleProtocolInterfaces (
>>> - ,
>>> + ImageHandle,
>>>   ,
>>>   PrivateData,
>>>   NULL
>>>
>>
>>
>>
>>
> 
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48504): https://edk2.groups.io/g/devel/message/48504
Mute This Topic: https://groups.io/mt/34180228/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [Qemu-devel] [PATCH 1/2] q35: implement 128K SMRAM at default SMBASE address

2019-10-07 Thread Laszlo Ersek
On 10/04/19 13:31, Igor Mammedov wrote:
> On Tue, 1 Oct 2019 20:03:20 +0200
> "Laszlo Ersek"  wrote:

>> (1) What values to use.

> SeaBIOS writes 0x00 into command port, but it seems that's taken by
> EFI_SMM_COMMUNICATION_PROTOCOL. So we can use the next unused value
> (lets say 0x4). We probably don't have to use status port or 
> EFI_SMM_COMMUNICATION_PROTOCOL, since the value of written into 0xB2
> is sufficient to distinguish hotplug event.

Thanks. Can you please write a QEMU patch for the ACPI generator such
that hotplugging a VCPU writes value 4 to IO port 0xB2?

That will allow me to experiment with OVMF.

(I can experiment with some other parts in edk2 even before that.)

>> (2) How the parameters are passed.
>>
>>
>> (2a) For the new CPU, the SMI remains pending, until it gets an
>> INIT-SIPI-SIPI from one of the previously plugged CPUs (most likely, the
>> BSP). At that point, the new CPU will execute the "initial SMI handler
>> for hotplugged CPUs", at the default SMBASE.
>>
>> That's a routine we'll have to write in assembly, from zero. In this
>> routine, we can read back IO ports 0xB2 and 0xB3. And QEMU will be happy
>> to provide the values last written (see apm_ioport_readb() in
>> "hw/isa/apm.c"). So we can receive the values in this routine. Alright.
> 
> Potentially we can can avoid writing custom SMI handler,
> what do you think about following workflow:
> 
> on system boot after initial CPUs relocation, firmware set NOP SMI handler
> at default SMBASE.
> Then as reaction to GPE triggered SMI (on cpu hotplug), after SMI rendezvous,
> a host cpu reads IO port 0xB2 and does hotplugged CPUs enumeration.
> 
>   a) assuming we allow hotplug only in case of negotiated SMI broadcast
>  host CPU shoots down all in-flight INIT/SIPI/SIPI for hotpugged CPUs
>  to avoid race within relocation handler.

How is that "shootdown" possible?

>  After that host CPU in loop
> 
>   b) it prepares/initializes necessary CPU structures for a hotplugged
>  CPU if necessary and replaces NOP SMI handler with the relocation
>  SMI handler that is used during system boot.
>  
>   c) a host CPU sends NOP INIT/SIPI/SIPI to the hotplugged CPU
> 
>   d) the woken up hotplugged CPU, jumps to default SMBASE and
>  executes hotplug relocation handler.
> 
>   e) after the hotplugged CPU  is relocated and if there are more
>  hotplugged CPUs, a host CPU repeats b-d steps for the next
>  hotplugged CPU.
> 
>   f) after all CPUs are relocated, restore NOP SMI handler at default
>  SMBASE.
> 

Thanks
Laszlo

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48503): https://edk2.groups.io/g/devel/message/48503
Mute This Topic: https://groups.io/mt/34201782/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH wave 1 00/10] support QEMU's "SMRAM at default SMBASE" feature

2019-10-07 Thread Laszlo Ersek
On 10/04/19 16:09, Igor Mammedov wrote:
> On Tue, 1 Oct 2019 17:31:17 +0200
> "Laszlo Ersek"  wrote:

>> (It does not matter if another hotplug CPU starts the relocation in SMM
>> while the earlier one is left with *only* the RSM instruction in SMM,
>> immediately after the swap-back.)
> I don't see why it doesn't matter, let me illustrate the case
> I'm talking about.

Right, I'm sorry -- I completely forgot that the RSM instruction is what
makes the newly set SMBASE permanent!

[...]

> Safest way to deal with it would be:
> 
>   1. wait till all host CPUs are brought into SMM (with hotplug SMI handler = 
> check me in)
> 
>   2. wait till all hotplugged CPUs are put in well know state
> (a host cpu should send INIT-SIPI-SIPI with NOP vector to wake up)
> 
>   3. a host CPU will serialize hotplugged CPUs relocation by sending
>  uincast SMI + INIT-SIPI-SIPI NOP vector to wake up the second time
>  (with hotplug SMI handler = relocate_me)
> 
> alternatively we could skip step 3 and do following:
> 
>  hotplug_SMI_handler()   
>  hp_cpu_check_in_map[apic_id] = 1;
>  /* wait till another cpu tells me to continue */
>  while(hp_cpu_check_in_map[apic_id]) ;;
>  ...
> 
>  host_cpu_hotplug_all_cpus()
>  wait till all hotpluged CPUs are in hp_cpu_check_in_map;
>  for(i=0;;) {
> if (hp_cpu_check_in_map[i]) {
> /* relocate this CPU */
> hp_cpu_check_in_map[i] = 0;
> }
> 
> tell QEMU that FW pulled the CPU in;
> /* we can add a flag to QEMU's cpu hotplug MMIO interface to FW do it,
>so that legitimate  GPE handler would tell OS to online only
>firmware vetted CPUs */
>  }

[...]

>> How can we discover in the hotplug initial SMI handler at 0x3_ that
>> the CPU executing the code should have been relocated *earlier*, and the
>> OS just didn't obey the ACPI GPE code? I think a platform reset would be
>> a proper response, but I don't know how to tell, "this CPU should not be
>> here".
> 
> one can ask QEMU about present CPUs (via cpu hotplug interface)
> and compare with present CPU state in FW (OS can hide insert
> event there but not the presence).
> 
> another way is to keep it pinned in relocation SMI handler
> until another CPU tells it to continue with relocation.
> 
> In absence of SMI, such CPU will continue to run wild but do we
> really care about it?

Thanks.

It's clear that, for me, too much hangs in the air right now. I'll have
to get my hands dirty and experiment. I need to learn a lot about this
area of edk2 as well, and experimenting looks like one way.

Let's return to these question once we reach the following state:

- ACPI code generated by QEMU raises a broadcast SMI on VCPU hotplug
- in OVMF, a cold-plugged CPU executes platform code, in a custom SMI
handler
- in OVMF, a hot-plugged CPU executes platform code, in the initial
(default) SMI handler.

Once we get to that point, we can look into further details.

I'll answer under your other email too:
<20191004133052.20373155@redhat.com">http://mid.mail-archive.com/20191004133052.20373155@redhat.com>.

Thanks
Laszlo

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#48502): https://edk2.groups.io/g/devel/message/48502
Mute This Topic: https://groups.io/mt/34274934/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-