summaryrefslogtreecommitdiff
path: root/src/cpu/amd/car/cache_as_ram.inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/amd/car/cache_as_ram.inc')
-rw-r--r--src/cpu/amd/car/cache_as_ram.inc20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/cpu/amd/car/cache_as_ram.inc b/src/cpu/amd/car/cache_as_ram.inc
index c773bd65bc..7cbf1dbcbb 100644
--- a/src/cpu/amd/car/cache_as_ram.inc
+++ b/src/cpu/amd/car/cache_as_ram.inc
@@ -17,6 +17,7 @@
#include <cpu/x86/mtrr.h>
#include <cpu/x86/cache.h>
+#include <cpu/amd/msr.h>
#include <cpu/amd/mtrr.h>
#define CacheSize CONFIG_DCACHE_RAM_SIZE
@@ -27,9 +28,6 @@
/* For CAR with Fam10h. */
#define CacheSizeAPStack CONFIG_DCACHE_AP_STACK_SIZE
-#define MSR_MCFG_BASE 0xC0010058
-#define MSR_BU_CFG2 0xC001102A
-
#define jmp_if_not_k8(x) comisd %xmm2, %xmm1; jae x
#define jmp_if_k8(x) comisd %xmm2, %xmm1; jb x
#define jmp_if_not_fam15h(x) comisd %xmm3, %xmm1; jb x
@@ -130,13 +128,13 @@ CAR_FAM10_out:
* Errata 193: Disable clean copybacks to L3 cache to allow cached ROM.
* Re-enable it in after RAM is initialized and before CAR is disabled.
*/
- movl $MSR_BU_CFG2, %ecx
+ movl $BU_CFG2_MSR, %ecx
rdmsr
bts $15, %eax /* Set bit 15 in EDX:EAX (bit 15 in EAX). */
wrmsr
/* Erratum 343, RevGuide for Fam10h, Pub#41322 Rev. 3.33 */
- movl $MSR_BU_CFG2, %ecx
+ movl $BU_CFG2_MSR, %ecx
rdmsr
bts $35-32, %edx /* Set bit 35 in EDX:EAX (bit 3 in EDX). */
wrmsr
@@ -171,7 +169,7 @@ CAR_FAM10_errata_applied:
#else
#error "bad MMCONF_BUS_NUMBER value"
#endif
- movl $MSR_MCFG_BASE, %ecx
+ movl $MMIO_CONF_BASE, %ecx
wrmsr
#endif
@@ -179,7 +177,7 @@ CAR_FAM10_out_post_errata:
/* Fam15h APIC IDs do not depend on NB config bit 54 */
jmp_if_not_fam15h(skip_nb54_set)
- movl $0xc001001f, %ecx /* NB_CFG_MSR */
+ movl $NB_CFG_MSR, %ecx
rdmsr
bts $(54 - 32), %edx /* Set NB config bit 54 */
wrmsr
@@ -227,7 +225,7 @@ skip_cu_check:
jmp_if_not_fam15h(CAR_FAM15_errata_applied)
/* Erratum 714, RevGuide for Fam15h, Pub#48063 Rev. 3.24 */
- movl $MSR_BU_CFG2, %ecx
+ movl $BU_CFG2_MSR, %ecx
rdmsr
bts $8, %eax /* Set bit 8 in EDX:EAX (bit 8 in EAX). */
wrmsr
@@ -410,7 +408,7 @@ fam10_mtrr_setup_complete:
post_code(0xa1)
/* Disable conversion of INVD to WBINVD (INVDWBINVD = 0) */
- mov $0xc0010015, %ecx
+ mov $HWCR_MSR, %ecx
rdmsr
btr $4, %eax
wrmsr
@@ -522,7 +520,7 @@ CAR_FAM10_ap:
* system with no obvious clues of what went wrong.
*
* So, need to get the NodeID and CoreID at first.
- * If NB_CFG bit 54 is set just use initial APIC ID, otherwise need
+ * If NB_CFG_MSR bit 54 is set just use initial APIC ID, otherwise need
* to reverse it.
*/
@@ -539,7 +537,7 @@ CAR_FAM10_ap:
shrl $24, %ebx
/* Get the nb cfg bit 54. */
- movl $0xc001001f, %ecx /* NB_CFG_MSR */
+ movl $NB_CFG_MSR, %ecx
rdmsr
movl %edi, %ecx /* CoreID bits */
bt $(54 - 32), %edx