diff options
author | Nico Huber <nico.h@gmx.de> | 2020-05-27 17:29:30 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-06-02 07:17:23 +0000 |
commit | b781680d6edb876dbf5ce5a935b7918f590f5fdf (patch) | |
tree | 414a770cc2f3bd2b8bd0a8fdc4a2de8bc8875625 | |
parent | 4247ba362876db21507cdad9a681248e29771afe (diff) |
cpu/x86/mtrr.h: Get rid of commonlib/helpers.h dependency
We want to use the CACHE_ROM_* macros in linker scripts. Avoid
`commonlib/helpers.h` as it contains an ALIGN() macro definition
that conflicts with the ALIGN keyword in linker scripts.
Change-Id: I3bf20733418ca4135f364a3f6489e74d45e4f466
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41785
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r-- | src/include/cpu/x86/mtrr.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/include/cpu/x86/mtrr.h b/src/include/cpu/x86/mtrr.h index 50148ffd35..301ea3052d 100644 --- a/src/include/cpu/x86/mtrr.h +++ b/src/include/cpu/x86/mtrr.h @@ -1,7 +1,6 @@ #ifndef CPU_X86_MTRR_H #define CPU_X86_MTRR_H -#include <commonlib/helpers.h> #ifndef __ASSEMBLER__ #include <cpu/x86/msr.h> #include <arch/cpu.h> @@ -187,8 +186,8 @@ static inline unsigned int fls(unsigned int x) /* Last but not least, most (if not all) chipsets have MMIO between 0xfe000000 and 0xff000000, so limit to 16MiB. */ -#if CAR_CACHE_ROM_SIZE >= 16 * MiB -# define CACHE_ROM_SIZE (16 * MiB) +#if CAR_CACHE_ROM_SIZE >= 16 << 20 +# define CACHE_ROM_SIZE (16 << 20) #else # define CACHE_ROM_SIZE CAR_CACHE_ROM_SIZE #endif |