summaryrefslogtreecommitdiff
path: root/src/include/cpu
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2015-03-05 14:35:04 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2015-03-07 21:22:20 +0100
commit0127c6c80865384faa43602bf22b3a70147343d9 (patch)
treefc56798fa2d98ff7eb0f248156dd6c2d9e1bb40a /src/include/cpu
parentc13fc15a45560b84da77a9ca74af050d1bc19bec (diff)
AMD: Uniformly define MSRs for TOP_MEM and TOP_MEM2
Make the build tolerate re-definitions. Change-Id: Ia7505837c70b1f749262508b26576e95c7865576 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/8609 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/include/cpu')
-rw-r--r--src/include/cpu/amd/mtrr.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/include/cpu/amd/mtrr.h b/src/include/cpu/amd/mtrr.h
index a9e672b48b..be816ba5aa 100644
--- a/src/include/cpu/amd/mtrr.h
+++ b/src/include/cpu/amd/mtrr.h
@@ -25,13 +25,12 @@
#define IORRBase_MSR(reg) (0xC0010016 + 2 * (reg))
#define IORRMask_MSR(reg) (0xC0010016 + 2 * (reg) + 1)
-#define TOP_MEM_MSR 0xC001001A
-#define TOP_MEM2_MSR 0xC001001D
-#ifndef TOP_MEM
- #define TOP_MEM TOP_MEM_MSR
-#endif
-#ifndef TOP_MEM2
- #define TOP_MEM2 TOP_MEM2_MSR
+#if defined(__ASSEMBLER__)
+#define TOP_MEM 0xC001001A
+#define TOP_MEM2 0xC001001D
+#else
+#define TOP_MEM 0xC001001Aul
+#define TOP_MEM2 0xC001001Dul
#endif
#define TOP_MEM_MASK 0x007fffff