summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/include/cpu/x86/mtrr.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/include/cpu/x86/mtrr.h b/src/include/cpu/x86/mtrr.h
index 188cd17a19..71278f32bf 100644
--- a/src/include/cpu/x86/mtrr.h
+++ b/src/include/cpu/x86/mtrr.h
@@ -43,7 +43,7 @@
#define MTRR_FIX_4K_F0000 0x26e
#define MTRR_FIX_4K_F8000 0x26f
-#if !defined(__ASSEMBLER__) && !defined(__PRE_RAM__)
+#if !defined(__ASSEMBLER__) && !defined(__ROMCC__)
#include <stdint.h>
#include <stddef.h>
@@ -84,9 +84,7 @@ void x86_mtrr_check(void);
/* Insert a temporary MTRR range for the duration of coreboot's runtime.
* This function needs to be called after the first MTRR solution is derived. */
void mtrr_use_temp_range(uintptr_t begin, size_t size, int type);
-#endif
-#if !defined(__ASSEMBLER__) && !defined(__ROMCC__)
void set_var_mtrr(unsigned int reg, unsigned int base, unsigned int size,
unsigned int type);
int get_free_var_mtrr(void);
@@ -114,7 +112,7 @@ static inline unsigned int fls(unsigned int x)
"1:" : "=r" (r) : "g" (x));
return r;
}
-#endif
+#endif /* !defined(__ASSEMBLER__) && !defined(__ROMCC__) */
/* Align up to next power of 2, suitable for ROMCC and assembler too.
* Range of result 256kB to 128MB is good enough here.