Skip to content

Commit

Permalink
Make media disabled check (for large payload downgrade) optional.
Browse files Browse the repository at this point in the history
Also print out message as to dump debug log duration over smbus.

Signed-off-by: Nolan Hergert <[email protected]>
  • Loading branch information
nolanhergert authored and StevenPontsler committed Aug 12, 2019
1 parent 2bea4b3 commit 2e7d589
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 13 deletions.
10 changes: 9 additions & 1 deletion DcpmPkg/cli/DumpDebugCommand.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,15 @@ DumpDebugCommand(
// For easier reading
PRINTER_SET_MSG(pPrinterCtx, ReturnCode, L"\n");

// If the dimm is an uninitialized dimm, warn the user of the operation time
if (Index < UninitializedDimmCount) {
#ifdef OS_BUILD
Print(L"Downloading debug logs for this DCPMM will take ~23 minutes.\n");
#else
Print(L"Downloading debug logs for this DCPMM will take ~6 minutes.\n");
#endif
}

// Collect logs from every debug log source on each dimm
for (IndexSource = 0; IndexSource < NUM_FW_DEBUG_LOG_SOURCES; IndexSource++) {

Expand All @@ -222,7 +231,6 @@ DumpDebugCommand(
goto FreeAndContinue;
}


ReturnCode = pNvmDimmConfigProtocol->GetFwDebugLog(pNvmDimmConfigProtocol,
pDimms[Index].DimmID, IndexSource, Reserved, &RawLogBuffer, &RawLogBufferSizeBytes, pCommandStatus);

Expand Down
31 changes: 19 additions & 12 deletions DcpmPkg/driver/Core/Dimm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2060,9 +2060,11 @@ FwCmdGetPlatformConfigData(
goto Finish;
}

CHECK_RESULT(OpenNvmDimmProtocol(gNvmDimmConfigProtocolGuid, (VOID **)&pNvmDimmConfigProtocol, NULL), Finish);
CHECK_RESULT(pNvmDimmConfigProtocol->GetBSRAndBootStatusBitMask(pNvmDimmConfigProtocol, pDimm->DimmID, &Bsr.AsUint64, NULL), Finish);
UseSmallPayload = (BOOLEAN)(Bsr.Separated_Current_FIS.MD);
// Optional check to see if DDRT large payload is disabled in hardware
CHECK_RESULT(OpenNvmDimmProtocol(gNvmDimmConfigProtocolGuid, (VOID **)&pNvmDimmConfigProtocol, NULL), SkipDDRTLargePayloadHardwareDisabledCheck);
CHECK_RESULT(pNvmDimmConfigProtocol->GetBSRAndBootStatusBitMask(pNvmDimmConfigProtocol, pDimm->DimmID, &Bsr.AsUint64, NULL), SkipDDRTLargePayloadHardwareDisabledCheck);
UseSmallPayload |= (BOOLEAN)(Bsr.Separated_Current_FIS.MD);
SkipDDRTLargePayloadHardwareDisabledCheck:
#ifdef OS_BUILD
UseSmallPayload |= config_is_large_payload_disabled();
#endif
Expand Down Expand Up @@ -2751,9 +2753,11 @@ FwCmdSetPlatformConfigData (
goto Finish;
}

CHECK_RESULT(OpenNvmDimmProtocol(gNvmDimmConfigProtocolGuid, (VOID **)&pNvmDimmConfigProtocol, NULL), Finish);
CHECK_RESULT(pNvmDimmConfigProtocol->GetBSRAndBootStatusBitMask(pNvmDimmConfigProtocol, pDimm->DimmID, &Bsr.AsUint64, NULL), Finish);
UseSmallPayload = (BOOLEAN)(Bsr.Separated_Current_FIS.MD);
// Optional check to see if DDRT large payload is disabled in hardware
CHECK_RESULT(OpenNvmDimmProtocol(gNvmDimmConfigProtocolGuid, (VOID **)&pNvmDimmConfigProtocol, NULL), SkipDDRTLargePayloadHardwareDisabledCheck);
CHECK_RESULT(pNvmDimmConfigProtocol->GetBSRAndBootStatusBitMask(pNvmDimmConfigProtocol, pDimm->DimmID, &Bsr.AsUint64, NULL), SkipDDRTLargePayloadHardwareDisabledCheck);
UseSmallPayload |= (BOOLEAN)(Bsr.Separated_Current_FIS.MD);
SkipDDRTLargePayloadHardwareDisabledCheck:
#ifdef OS_BUILD
UseSmallPayload |= config_is_large_payload_disabled();
#endif
Expand Down Expand Up @@ -3140,9 +3144,11 @@ FwCmdGetFwDebugLog (
goto Finish;
}

CHECK_RESULT(OpenNvmDimmProtocol(gNvmDimmConfigProtocolGuid, (VOID **)&pNvmDimmConfigProtocol, NULL), Finish);
CHECK_RESULT(pNvmDimmConfigProtocol->GetBSRAndBootStatusBitMask(pNvmDimmConfigProtocol, pDimm->DimmID, &Bsr.AsUint64, NULL), Finish);
UseSmallPayload = (BOOLEAN)(Bsr.Separated_Current_FIS.MD) || UseSmbus;
CHECK_RESULT(OpenNvmDimmProtocol(gNvmDimmConfigProtocolGuid, (VOID **)&pNvmDimmConfigProtocol, NULL), SkipDDRTLargePayloadHardwareDisabledCheck);
CHECK_RESULT(pNvmDimmConfigProtocol->GetBSRAndBootStatusBitMask(pNvmDimmConfigProtocol, pDimm->DimmID, &Bsr.AsUint64, NULL), SkipDDRTLargePayloadHardwareDisabledCheck);
UseSmallPayload |= (BOOLEAN)(Bsr.Separated_Current_FIS.MD);
SkipDDRTLargePayloadHardwareDisabledCheck:
UseSmallPayload |= UseSmbus;
#ifdef OS_BUILD
UseSmallPayload |= config_is_large_payload_disabled();
#endif
Expand Down Expand Up @@ -4551,9 +4557,10 @@ GetAndParseFwErrorLogForDimm(
goto Finish;
}

CHECK_RESULT(OpenNvmDimmProtocol(gNvmDimmConfigProtocolGuid, (VOID **)&pNvmDimmConfigProtocol, NULL), Finish);
CHECK_RESULT(pNvmDimmConfigProtocol->GetBSRAndBootStatusBitMask(pNvmDimmConfigProtocol, pDimm->DimmID, &Bsr.AsUint64, NULL), Finish);
UseSmallPayload = (BOOLEAN)(Bsr.Separated_Current_FIS.MD);
CHECK_RESULT(OpenNvmDimmProtocol(gNvmDimmConfigProtocolGuid, (VOID **)&pNvmDimmConfigProtocol, NULL), SkipDDRTLargePayloadHardwareDisabledCheck);
CHECK_RESULT(pNvmDimmConfigProtocol->GetBSRAndBootStatusBitMask(pNvmDimmConfigProtocol, pDimm->DimmID, &Bsr.AsUint64, NULL), SkipDDRTLargePayloadHardwareDisabledCheck);
UseSmallPayload |= (BOOLEAN)(Bsr.Separated_Current_FIS.MD);
SkipDDRTLargePayloadHardwareDisabledCheck:
#ifdef OS_BUILD
UseSmallPayload |= config_is_large_payload_disabled();
#endif
Expand Down

0 comments on commit 2e7d589

Please sign in to comment.