From 1c25c63c78512916bb61c693be64dcc78c2ee72e Mon Sep 17 00:00:00 2001 From: Felix Held Date: Thu, 20 Apr 2023 14:25:13 +0200 Subject: include/cpu/amd/mtrr: rename TOP_MEM(2) and remove workaround Both AGESA.h and cpu/amd/mtrr.h defined TOP_MEM and TOP_MEM2, but since it was defined as unsigned long in AGESA.h, a workaround was needed in cpu/amd/mtrr.h to not have the build fail due to a non-identical redefinition of TOP_MEM and TOP_MEM2. Just removing the workaround without reaming the defines isn't trivially possible, since the stoneyridge romstage.c still ends up including both definitions which can't be easily worked around. Now all non-vendorcode coreboot code uses TOP_MEM_MSR and TOP_MEM2_MSR while the vendorcode part uses TOP_MEM and TOP_MEM2 to avoid this. Signed-off-by: Felix Held Change-Id: Ibad72dac17bd0b05734709d42c6802b7c8a87455 Reviewed-on: https://review.coreboot.org/c/coreboot/+/74619 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/drivers/amd/agesa/s3_mtrr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/drivers') diff --git a/src/drivers/amd/agesa/s3_mtrr.c b/src/drivers/amd/agesa/s3_mtrr.c index b085b4d671..64a51ad903 100644 --- a/src/drivers/amd/agesa/s3_mtrr.c +++ b/src/drivers/amd/agesa/s3_mtrr.c @@ -38,8 +38,8 @@ static const uint32_t msr_backup[] = { MTRR_PHYS_BASE(7), MTRR_PHYS_MASK(7), SYSCFG_MSR, - TOP_MEM, - TOP_MEM2, + TOP_MEM_MSR, + TOP_MEM2_MSR, }; void backup_mtrr(void) -- cgit v1.2.3