Skip to content

Instantly share code, notes, and snippets.

@tandasat
Created February 7, 2024 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tandasat/608af557a52ea9490b822efc59b86f44 to your computer and use it in GitHub Desktop.
Save tandasat/608af557a52ea9490b822efc59b86f44 to your computer and use it in GitHub Desktop.
A patch for https://github.com/microsoft/TSS.MSR/tree/main to parse DRTM TPM logs (WBCL)
diff --git a/PCPTool.v11/exe/SDKSample.cpp b/PCPTool.v11/exe/SDKSample.cpp
index edcc966..984690f 100644
--- a/PCPTool.v11/exe/SDKSample.cpp
+++ b/PCPTool.v11/exe/SDKSample.cpp
@@ -1813,7 +1813,7 @@ log can be used to calculate the PCRs in the TPM.
{
goto Cleanup;
}
- if(FAILED(hr = Tbsi_Get_TCG_Log(hContext, NULL, &cbLog)))
+ if(FAILED(hr = Tbsi_Get_TCG_Log_Ex(TBS_TCGLOG_DRTM_CURRENT, NULL, &cbLog)))
{
goto Cleanup;
}
@@ -1821,7 +1821,7 @@ log can be used to calculate the PCRs in the TPM.
{
goto Cleanup;
}
- if(FAILED(hr = Tbsi_Get_TCG_Log(hContext, pbLog, &cbLog)))
+ if(FAILED(hr = Tbsi_Get_TCG_Log_Ex(TBS_TCGLOG_DRTM_CURRENT, pbLog, &cbLog)))
{
goto Cleanup;
}
diff --git a/PCPTool.v11/exe/Support.cpp b/PCPTool.v11/exe/Support.cpp
index 9e5d4b8..33f2e5a 100644
--- a/PCPTool.v11/exe/Support.cpp
+++ b/PCPTool.v11/exe/Support.cpp
@@ -953,7 +953,7 @@ PcpToolDisplayLog(
// Decode SIPA events
if((((PcrIndex >= 12) &&
- (PcrIndex <= 14)) ||
+ (PcrIndex <= 32)) ||
(PcrIndex == 0xffffffff))&&
((EventType == EV_EVENT_TAG) ||
(EventType == EV_NO_ACTION)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment