From: "Heng Luo" <heng.luo@intel.com>
To: devel@edk2.groups.io
Cc: Chasel Chiu <chasel.chiu@intel.com>,
Nate DeSimone <nathaniel.l.desimone@intel.com>
Subject: [PATCH] UpXtreme: Enable USB DCI debug
Date: Fri, 20 Nov 2020 13:23:15 +0800 [thread overview]
Message-ID: <20201120052316.3707-1-heng.luo@intel.com> (raw)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3081
Allow 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/Policy/Library/PeiPolicyUpdateLib/PeiPchPolicyUpdatePreMem.c | 1 -
Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/Library/PeiPolicyBoardConfigLib/PeiCpuPolicyBoardConfig.c | 5 +++++
Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/Library/PeiPolicyBoardConfigLib/PeiPchPolicyBoardConfigPreMem.c | 7 +++++++
Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/Library/PeiPolicyBoardConfigLib/PeiPolicyBoardConfigLib.inf | 1 +
Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/PeiPolicyBoardConfigLib/PeiPchPolicyBoardConfigPreMem.c | 6 ++++++
Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/PeiPolicyBoardConfigLib/PeiPolicyBoardConfigLib.inf | 1 +
6 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/PeiPchPolicyUpdatePreMem.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/PeiPchPolicyUpdatePreMem.c
index 2d48b09175..ac5b583f89 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/PeiPchPolicyUpdatePreMem.c
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/Policy/Library/PeiPolicyUpdateLib/PeiPchPolicyUpdatePreMem.c
@@ -83,7 +83,6 @@ UpdatePeiPchPolicyPreMem (
Status = GetConfigBlock ((VOID *) SiPreMemPolicy, &gIshPreMemConfigGuid, (VOID *) &IshPreMemConfig);
ASSERT_EFI_ERROR (Status);
- DciPreMemConfig->DciUsb3TypecUfpDbg = 2;
PchTraceHubPreMemConfig->MemReg0Size = 3;
PchTraceHubPreMemConfig->MemReg1Size = 3;
//
diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/Library/PeiPolicyBoardConfigLib/PeiCpuPolicyBoardConfig.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/Library/PeiPolicyBoardConfigLib/PeiCpuPolicyBoardConfig.c
index d1d1920823..d4c5136c0a 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/Library/PeiPolicyBoardConfigLib/PeiCpuPolicyBoardConfig.c
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/Library/PeiPolicyBoardConfigLib/PeiCpuPolicyBoardConfig.c
@@ -44,6 +44,11 @@ UpdatePeiCpuPolicyBoardConfig (
Status = GetConfigBlock ((VOID *) SiPolicyPpi, &gCpuConfigGuid, (VOID *) &CpuConfig);
ASSERT_EFI_ERROR (Status);
+ //
+ //Enable processor debug features
+ //
+ CpuConfig->DebugInterfaceEnable = 1;
+
return Status;
}
diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/Library/PeiPolicyBoardConfigLib/PeiPchPolicyBoardConfigPreMem.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/Library/PeiPolicyBoardConfigLib/PeiPchPolicyBoardConfigPreMem.c
index 01bb75525b..c79718f4ee 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/Library/PeiPolicyBoardConfigLib/PeiPchPolicyBoardConfigPreMem.c
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/Library/PeiPolicyBoardConfigLib/PeiPchPolicyBoardConfigPreMem.c
@@ -25,12 +25,19 @@ UpdatePeiPchPolicyBoardConfigPreMem (
{
EFI_STATUS Status;
PCH_GENERAL_PREMEM_CONFIG *PchGeneralPreMemConfig;
+ PCH_DCI_PREMEM_CONFIG *DciPreMemConfig;
DEBUG((DEBUG_INFO, "Updating PCH Policy by board config in Pre Mem\n"));
Status = GetConfigBlock ((VOID *) SiPreMemPolicyPpi, &gPchGeneralPreMemConfigGuid, (VOID *) &PchGeneralPreMemConfig);
ASSERT_EFI_ERROR (Status);
+ Status = GetConfigBlock ((VOID *) SiPreMemPolicyPpi, &gDciPreMemConfigGuid, (VOID *) &DciPreMemConfig);
+ ASSERT_EFI_ERROR (Status);
+
+ DciPreMemConfig->PlatformDebugConsent = 3;
+ DciPreMemConfig->DciUsb3TypecUfpDbg = 1;
+
return Status;
}
diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/Library/PeiPolicyBoardConfigLib/PeiPolicyBoardConfigLib.inf b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/Library/PeiPolicyBoardConfigLib/PeiPolicyBoardConfigLib.inf
index aaf0abbf04..affb322c59 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/Library/PeiPolicyBoardConfigLib/PeiPolicyBoardConfigLib.inf
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/UpXtreme/Library/PeiPolicyBoardConfigLib/PeiPolicyBoardConfigLib.inf
@@ -54,6 +54,7 @@
gPchGeneralConfigGuid ## CONSUMES
gEfiTpmDeviceInstanceTpm20DtpmGuid
gEfiTpmDeviceInstanceTpm12Guid
+ gDciPreMemConfigGuid
[Ppis]
gEfiPeiReadOnlyVariable2PpiGuid ## CONSUMES
diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/PeiPolicyBoardConfigLib/PeiPchPolicyBoardConfigPreMem.c b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/PeiPolicyBoardConfigLib/PeiPchPolicyBoardConfigPreMem.c
index 00cf73dfd9..5d75bc5e1c 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/PeiPolicyBoardConfigLib/PeiPchPolicyBoardConfigPreMem.c
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/PeiPolicyBoardConfigLib/PeiPchPolicyBoardConfigPreMem.c
@@ -25,12 +25,18 @@ UpdatePeiPchPolicyBoardConfigPreMem (
{
EFI_STATUS Status;
PCH_GENERAL_PREMEM_CONFIG *PchGeneralPreMemConfig;
+ PCH_DCI_PREMEM_CONFIG *DciPreMemConfig;
DEBUG((DEBUG_INFO, "Updating PCH Policy by board config in Pre Mem\n"));
Status = GetConfigBlock ((VOID *) SiPreMemPolicyPpi, &gPchGeneralPreMemConfigGuid, (VOID *) &PchGeneralPreMemConfig);
ASSERT_EFI_ERROR (Status);
+ Status = GetConfigBlock ((VOID *) SiPreMemPolicyPpi, &gDciPreMemConfigGuid, (VOID *) &DciPreMemConfig);
+ ASSERT_EFI_ERROR (Status);
+
+ DciPreMemConfig->DciUsb3TypecUfpDbg = 2;
+
return Status;
}
diff --git a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/PeiPolicyBoardConfigLib/PeiPolicyBoardConfigLib.inf b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/PeiPolicyBoardConfigLib/PeiPolicyBoardConfigLib.inf
index 15ef223050..5de11d62e4 100644
--- a/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/PeiPolicyBoardConfigLib/PeiPolicyBoardConfigLib.inf
+++ b/Platform/Intel/WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/Library/PeiPolicyBoardConfigLib/PeiPolicyBoardConfigLib.inf
@@ -54,6 +54,7 @@
gPchGeneralConfigGuid ## CONSUMES
gEfiTpmDeviceInstanceTpm20DtpmGuid
gEfiTpmDeviceInstanceTpm12Guid
+ gDciPreMemConfigGuid
[Ppis]
gEfiPeiReadOnlyVariable2PpiGuid ## CONSUMES
--
2.24.0.windows.2
next reply other threads:[~2020-11-20 5:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-20 5:23 Heng Luo [this message]
2020-12-09 10:30 ` [PATCH] UpXtreme: Enable USB DCI debug Nate DeSimone
2020-12-14 1:31 ` Heng Luo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201120052316.3707-1-heng.luo@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox