[edk2-devel] [Patch V2] WhiskeylakeOpenBoardPkg: Add USB DCI debug suport
Heng Luo
heng.luo at intel.com
Mon Dec 14 01:43:52 UTC 2020
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3081
Add gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdDciEnable for
USB DCI debug feature, feature is enabled if PcdDciEnable is TRUE,
it allows to debug BIOS via DCI cable.
Cc: Chasel Chiu <chasel.chiu at intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone at intel.com>
Signed-off-by: Heng Luo <heng.luo at intel.com>
---
Platform/Intel/WhiskeylakeOpenBoardPkg/OpenBoardPkg.dec | 1 +
Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/PeiPchPolicyUpdatePreMem.c | 8 +++++++-
Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf | 4 ++++
Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.dsc | 2 ++
Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc | 2 ++
5 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/OpenBoardPkg.dec b/Platform/Intel/WhiskeylakeOpenBoardPkg/OpenBoardPkg.dec
index fbb9549e44..196460e170 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/OpenBoardPkg.dec
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/OpenBoardPkg.dec
@@ -554,6 +554,7 @@ gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdNCT6776FHWMON |
[PcdsDynamicEx]
[PcdsDynamic, PcdsDynamicEx]
+gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdDciEnable |FALSE|BOOLEAN|0x20000001
[PcdsPatchableInModule]
diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/PeiPchPolicyUpdatePreMem.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/PeiPchPolicyUpdatePreMem.c
index 2d48b09175..bb34f89fb5 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/PeiPchPolicyUpdatePreMem.c
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/PeiPchPolicyUpdatePreMem.c
@@ -83,7 +83,13 @@ UpdatePeiPchPolicyPreMem (
Status = GetConfigBlock ((VOID *) SiPreMemPolicy, &gIshPreMemConfigGuid, (VOID *) &IshPreMemConfig);
ASSERT_EFI_ERROR (Status);
- DciPreMemConfig->DciUsb3TypecUfpDbg = 2;
+ if (PcdGetBool (PcdDciEnable)) {
+ DciPreMemConfig->PlatformDebugConsent = 3;
+ DciPreMemConfig->DciUsb3TypecUfpDbg = 1;
+ } else {
+ DciPreMemConfig->DciUsb3TypecUfpDbg = 2;
+ }
+
PchTraceHubPreMemConfig->MemReg0Size = 3;
PchTraceHubPreMemConfig->MemReg1Size = 3;
//
diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf b/Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf
index 478e2d0512..252f92f487 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf
@@ -230,6 +230,9 @@
gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdEcPresent
+ # Enable/Disable USB DCI Debug
+ gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdDciEnable ## CONSUMES
+
gIntelSiliconPkgTokenSpaceGuid.PcdIntelGraphicsVbtFileGuid ## CONSUMES
gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdSmbusAlertEnable ## CONSUMES
gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdSataLedEnable ## CONSUMES
@@ -243,6 +246,7 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdSystemFmpCapsuleImageTypeIdGuid ## CONSUMES
gUefiCpuPkgTokenSpaceGuid.PcdCpuMaxLogicalProcessorNumber ## CONSUMES
+
[FixedPcd]
gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiAcpiReclaimMemorySize ## CONSUMES
gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiAcpiNvsMemorySize ## CONSUMES
diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.dsc
index e161bf06f4..84d4ec1331 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.dsc
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/OpenBoardPkgPcd.dsc
@@ -399,6 +399,8 @@
gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdRtd3Tbt|0x1
gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdRtd3TbtClkReq|0x1
+ gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdDciEnable|FALSE
+
[PcdsDynamicHii.X64.DEFAULT]
######################################
# Edk2 Configuration
diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc
index 83ada3c95c..4a7ba4d5f0 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/OpenBoardPkgPcd.dsc
@@ -389,6 +389,8 @@
gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdRtd3Tbt|0x1
gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdRtd3TbtClkReq|0x1
+ gWhiskeylakeOpenBoardPkgTokenSpaceGuid.PcdDciEnable|FALSE
+
[PcdsDynamicHii.X64.DEFAULT]
######################################
# Edk2 Configuration
--
2.24.0.windows.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68748): https://edk2.groups.io/g/devel/message/68748
Mute This Topic: https://groups.io/mt/78941913/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list