summaryrefslogtreecommitdiff
path: root/src/drivers/amd
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2020-05-28 21:34:43 -0600
committerAaron Durbin <adurbin@chromium.org>2020-06-02 16:10:05 +0000
commite1bf0656afaf4cdbb9759178b6b2af21baba42d7 (patch)
treebe803ec4e98d01f9a3faa457a9fdeb27dc33db3b /src/drivers/amd
parentfa5eded303ac25c95ca4300ebfb4788c149bf2ab (diff)
downloadcoreboot-e1bf0656afaf4cdbb9759178b6b2af21baba42d7.tar.xz
arch/x86/postcar_loader: utilize var_mtrr_context API
Now that there is a generic solution in mtrr subsystem utilize the API. BUG=b:155426691,b:155322763 Change-Id: Ie349d5669808928c7470c99d25c57c784174b4e9 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/41850 Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/amd')
-rw-r--r--src/drivers/amd/agesa/mtrr_fixme.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/amd/agesa/mtrr_fixme.c b/src/drivers/amd/agesa/mtrr_fixme.c
index 0a4f29a30d..a880ce7e01 100644
--- a/src/drivers/amd/agesa/mtrr_fixme.c
+++ b/src/drivers/amd/agesa/mtrr_fixme.c
@@ -59,7 +59,7 @@ void recover_postcar_frame(struct postcar_frame *pcf, int s3resume)
/* Replicate non-UC MTRRs as left behind by AGESA.
*/
- for (i = 0; i < pcf->max_var_mtrrs; i++) {
+ for (i = 0; i < pcf->ctx.max_var_mtrrs; i++) {
mask = rdmsr(MTRR_PHYS_MASK(i));
base = rdmsr(MTRR_PHYS_BASE(i));
u32 size = ~(mask.lo & ~0xfff) + 1;