Fix some commands that did not playback correctly from PBR
During playback of a PBR file, some commands (such as "show -topology")
were using the local PMTT on the system rather than the recorded PMTT
located in the PBR file that was recorded on the other system.
@@ -3301,13 +3301,19 @@ GetAcpiPMTT(
EFI_STATUS ReturnCode = EFI_INVALID_PARAMETER;
#ifdef OS_BUILD
UINT32 Size = 0;
+ PbrContext *pContext = PBR_CTX();
#endif
if (ppPMTTtbl == NULL) {
goto Finish;
}
#ifdef OS_BUILD
+ if (PBR_PLAYBACK_MODE == PBR_GET_MODE(pContext)) {
+ ReturnCode = PbrGetTableRecord(pContext, PBR_RECORD_TYPE_PMTT, ppPMTTtbl, &Size);
+ }
+ else {
ReturnCode = get_pmtt_table((EFI_ACPI_DESCRIPTION_HEADER**)ppPMTTtbl, &Size);
+ }
if (EFI_ERROR(ReturnCode) || NULL == *ppPMTTtbl) {
NVDIMM_DBG("Failed to retrieve PMTT table.");
ReturnCode = EFI_NOT_FOUND;
