From 05e740fc40e409dcf8d592f4bbeaf87dc92140c5 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Sat, 31 Mar 2012 12:52:21 +0200 Subject: Replace cache control magic numbers with symbols Instead of opaque numbers like (1<<29), use symbols like CR0_NoWriteThrough. Change-Id: Id845e087fb472cfaf5f71beaf37fbf0d407880b5 Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/833 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- src/include/cpu/x86/cache.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/include/cpu') diff --git a/src/include/cpu/x86/cache.h b/src/include/cpu/x86/cache.h index c2de073a52..a448228776 100644 --- a/src/include/cpu/x86/cache.h +++ b/src/include/cpu/x86/cache.h @@ -20,6 +20,11 @@ #ifndef CPU_X86_CACHE #define CPU_X86_CACHE +#define CR0_CacheDisable (1 << 30) +#define CR0_NoWriteThrough (1 << 29) + +#if !defined(__ASSEMBLER__) + /* * Need two versions because ROMCC chokes on certain clobbers: * cache.h:29.71: cache.h:60.24: earlymtrr.c:117.23: romstage.c:144.33: @@ -107,4 +112,5 @@ static inline __attribute__((always_inline)) void disable_cache(void) void x86_enable_cache(void); #endif +#endif /* !__ASSEMBLER__ */ #endif /* CPU_X86_CACHE */ -- cgit v1.2.3