summaryrefslogtreecommitdiff
path: root/src/include/cpu
diff options
context:
space:
mode:
authorAaron Durbin <adurbin@chromium.org>2017-06-08 10:51:33 -0500
committerAaron Durbin <adurbin@chromium.org>2017-06-09 18:28:16 +0200
commitea0497c786aa8103adc2b178cc4fe714cb008281 (patch)
tree1de388f9f1e43c1cce01eabae5a2b70e45b7ea46 /src/include/cpu
parentacd02b5b3fe6aa99d17cb9cb414969d67c848e36 (diff)
cpu/x86/mtrr: further expose declarations of functions
Like the previous commit allow the declarations of functions to be exposed to all stages unless ROMCC is employed. Change-Id: Ie4dfc32f38890938b90ef8e4bc35652d1c44deb5 Signed-off-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: https://review.coreboot.org/20114 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/include/cpu')
-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.