Nico Huber has uploaded this change for review. ( https://review.coreboot.org/26761
Change subject: cpu/x86/mtrr.h: Clean up some guards
......................................................................
cpu/x86/mtrr.h: Clean up some guards
Move #includes to the top and remove unnecessary guards. Hopefully this
prevents future surprises.
Change-Id: Id4571c46a0c05a080b2b1cfec64b4eda07d793bb
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M src/include/cpu/x86/mtrr.h
1 file changed, 9 insertions(+), 13 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/26761/1
diff --git a/src/include/cpu/x86/mtrr.h b/src/include/cpu/x86/mtrr.h
index dde9a28..789edc7 100644
--- a/src/include/cpu/x86/mtrr.h
+++ b/src/include/cpu/x86/mtrr.h
@@ -2,6 +2,8 @@
#define CPU_X86_MTRR_H
#include <commonlib/helpers.h>
+#include <cpu/x86/msr.h>
+#include <arch/cpu.h>
/* These are the region types */
#define MTRR_TYPE_UNCACHEABLE 0
@@ -95,6 +97,13 @@
unsigned int type);
int get_free_var_mtrr(void);
+/*
+ * Set the MTRRs using the data on the stack from setup_stack_and_mtrrs.
+ * Return a new top_of_stack value which removes the setup_stack_and_mtrrs data.
+ */
+asmlinkage void *soc_set_mtrrs(void *top_of_stack);
+asmlinkage void soc_enable_mtrrs(void);
+
/* fms: find most significant bit set, stolen from Linux Kernel Source. */
static inline unsigned int fms(unsigned int x)
{
@@ -172,17 +181,4 @@
#define CACHE_ROM_BASE _FROM_4G_TOP(CACHE_ROM_SIZE)
-#if (IS_ENABLED(CONFIG_SOC_SETS_MSRS) && !defined(__ASSEMBLER__) \
- && !defined(__ROMCC__))
-#include <cpu/x86/msr.h>
-#include <arch/cpu.h>
-
-/*
- * Set the MTRRs using the data on the stack from setup_stack_and_mtrrs.
- * Return a new top_of_stack value which removes the setup_stack_and_mtrrs data.
- */
-asmlinkage void *soc_set_mtrrs(void *top_of_stack);
-asmlinkage void soc_enable_mtrrs(void);
-#endif /* CONFIG_SOC_SETS_MSRS ... */
-
#endif /* CPU_X86_MTRR_H */
--
To view, visit https://review.coreboot.org/26761
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4571c46a0c05a080b2b1cfec64b4eda07d793bb
Gerrit-Change-Number: 26761
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>