From 759bac821e5708d2d331b04e874d077738dc6f6c Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 8 Jun 2017 10:51:33 -0500 Subject: [PATCH] UPSTREAM: 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. BUG=none BRANCH=none TEST=none Change-Id: I174399f6957768e57d3cc87a157b260632ef45eb Signed-off-by: Patrick Georgi Original-Commit-Id: ea0497c786aa8103adc2b178cc4fe714cb008281 Original-Change-Id: Ie4dfc32f38890938b90ef8e4bc35652d1c44deb5 Original-Signed-off-by: Aaron Durbin Original-Reviewed-on: https://review.coreboot.org/20114 Original-Tested-by: build bot (Jenkins) Original-Reviewed-by: Furquan Shaikh Reviewed-on: https://chromium-review.googlesource.com/531699 Commit-Ready: Patrick Georgi Tested-by: Patrick Georgi Reviewed-by: Patrick Georgi --- src/include/cpu/x86/mtrr.h | 6 ++---- 1 file 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 #include @@ -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.