public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [Patch V2] WhiskeylakeOpenBoardPkg: Add USB DCI debug suport
@ 2020-12-14  1:43 Heng Luo
  2020-12-15  0:49 ` Nate DeSimone
  2020-12-19  1:18 ` Nate DeSimone
  0 siblings, 2 replies; 3+ messages in thread
From: Heng Luo @ 2020-12-14  1:43 UTC (permalink / raw)
  To: devel; +Cc: Chasel Chiu, Nate DeSimone

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@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Signed-off-by: Heng Luo <heng.luo@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


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

end of thread, other threads:[~2020-12-19  1:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-14  1:43 [Patch V2] WhiskeylakeOpenBoardPkg: Add USB DCI debug suport Heng Luo
2020-12-15  0:49 ` Nate DeSimone
2020-12-19  1:18 ` Nate DeSimone

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