AGESA f15tn: Fix MemContext buffer parser for AmdInitPost()

Like commit c91ab1cfc that targeted AGESA f14.

MemRestore() is still broken after this fix.

Change-Id: I7457de5e0c52819560e2bfd46b9e351b00d3d386
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/20900
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Kyösti Mälkki 2017-07-24 03:35:11 +03:00
parent 111926a166
commit f710955b93
1 changed files with 6 additions and 2 deletions

View File

@ -408,7 +408,9 @@ MemMRestoreDqsTimings (
if (!MemMSetCSRNb (&NBArray[Node], Reg->SpecialCases, PciAddress, *((UINT32 *) OrMask) & Reg->RegisterList[j].AndMask)) {
return FALSE; // Restore fails
}
OrMask += (Reg->RegisterList[j].Type.RegisterSize == 0) ? 4 : Reg->RegisterList[j].Type.RegisterSize;
if (Reg->RegisterList[j].Type.RegisterSize != 3)
OrMask += (Reg->RegisterList[j].Type.RegisterSize == 0) ? 4 :
Reg->RegisterList[j].Type.RegisterSize;
}
if (MaxNode < Node) {
@ -431,7 +433,9 @@ MemMRestoreDqsTimings (
if (!MemMSetCSRNb (&NBArray[Node], CReg->SpecialCases, PciAddress, *((UINT32 *) OrMask) & CReg->RegisterList[j].AndMask)) {
return FALSE; // Restore fails
}
OrMask += (CReg->RegisterList[j].Type.RegisterSize == 0) ? 4 : CReg->RegisterList[j].Type.RegisterSize;
if (CReg->RegisterList[j].Type.RegisterSize != 3)
OrMask += (CReg->RegisterList[j].Type.RegisterSize == 0) ? 4 :
CReg->RegisterList[j].Type.RegisterSize;
}
}
} else if (((State == ST_PRE_ESR) && (Device.CommonDeviceHeader->Type == DEV_TYPE_MSR_PRE_ESR)) ||