From 9b2d1d8f61f598fb69a0c69f997bd8ca5190ef3f Mon Sep 17 00:00:00 2001 From: Felix Held Date: Thu, 22 Sep 2022 16:12:58 +0200 Subject: include/cpu/x86/mtrr: define NUM_FIXED_MTRRS once in mtrr.h Instead of defining NUM_FIXED_MTRRS in both cpu/x86/mp_init.h and cpu/x86/mtrr/mtrr.c in two different ways that will evaluate to the same value, define it once in include/cpu/x86/mtrr.h which is included in both C files. TEST=Timeless build for amd/mandolin results in identical firmware image Signed-off-by: Felix Held Change-Id: I71cec61e22f5ce76baef21344c7427be29f193f8 Reviewed-on: https://review.coreboot.org/c/coreboot/+/67774 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons Reviewed-by: Martin Roth --- src/include/cpu/x86/mtrr.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/include') diff --git a/src/include/cpu/x86/mtrr.h b/src/include/cpu/x86/mtrr.h index ed55c04020..298947a982 100644 --- a/src/include/cpu/x86/mtrr.h +++ b/src/include/cpu/x86/mtrr.h @@ -44,6 +44,7 @@ #define NUM_FIXED_RANGES 88 #define RANGES_PER_FIXED_MTRR 8 +#define NUM_FIXED_MTRRS (NUM_FIXED_RANGES / RANGES_PER_FIXED_MTRR) #define MTRR_FIX_64K_00000 0x250 #define MTRR_FIX_16K_80000 0x258 #define MTRR_FIX_16K_A0000 0x259 -- cgit v1.2.3