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>
This commit is contained in:
Aaron Durbin 2017-06-08 10:51:33 -05:00
parent acd02b5b3f
commit ea0497c786
1 changed files with 2 additions and 4 deletions

View File

@ -43,7 +43,7 @@
#define MTRR_FIX_4K_F0000 0x26e #define MTRR_FIX_4K_F0000 0x26e
#define MTRR_FIX_4K_F8000 0x26f #define MTRR_FIX_4K_F8000 0x26f
#if !defined(__ASSEMBLER__) && !defined(__PRE_RAM__) #if !defined(__ASSEMBLER__) && !defined(__ROMCC__)
#include <stdint.h> #include <stdint.h>
#include <stddef.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. /* 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. */ * 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); 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, void set_var_mtrr(unsigned int reg, unsigned int base, unsigned int size,
unsigned int type); unsigned int type);
int get_free_var_mtrr(void); int get_free_var_mtrr(void);
@ -114,7 +112,7 @@ static inline unsigned int fls(unsigned int x)
"1:" : "=r" (r) : "g" (x)); "1:" : "=r" (r) : "g" (x));
return r; return r;
} }
#endif #endif /* !defined(__ASSEMBLER__) && !defined(__ROMCC__) */
/* Align up to next power of 2, suitable for ROMCC and assembler too. /* Align up to next power of 2, suitable for ROMCC and assembler too.
* Range of result 256kB to 128MB is good enough here. * Range of result 256kB to 128MB is good enough here.