summaryrefslogtreecommitdiff
path: root/src/cpu/amd
diff options
context:
space:
mode:
authorFlorian Zumbiehl <florz@florz.de>2011-11-22 21:32:31 +0100
committerMarc Jones <marcj303@gmail.com>2011-11-22 22:20:30 +0100
commit04a8d6239f43c16a2f8f2d0c9893ddecdc3340a6 (patch)
tree2ade9b635b022c9fcf4b77e63aa2550c4e89b21c /src/cpu/amd
parent2a40ebca9c21c527afd683beeec51a5fa5a77588 (diff)
downloadcoreboot-04a8d6239f43c16a2f8f2d0c9893ddecdc3340a6.tar.xz
k8 raminit: add workaround for erratum #181 on non-fam-f
Disable DRAM controller on non-fam-f CPUs not using fam-f register layout. Change-Id: I2cc87857452555011d69bfebe9f9c4c17cef8f6c Signed-off-by: Florian Zumbiehl <florz@florz.de> Reviewed-on: http://review.coreboot.org/448 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones <marcj303@gmail.com>
Diffstat (limited to 'src/cpu/amd')
-rw-r--r--src/cpu/amd/model_fxx/fidvid.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/cpu/amd/model_fxx/fidvid.c b/src/cpu/amd/model_fxx/fidvid.c
index 6395a1e1c6..06ff636659 100644
--- a/src/cpu/amd/model_fxx/fidvid.c
+++ b/src/cpu/amd/model_fxx/fidvid.c
@@ -45,10 +45,19 @@ static void enable_fid_change(void)
pci_write_config32(PCI_DEV(0, 0x18 + i, 3), 0xd4, dword);
/* disable the DRAM interface at first, it will be enabled
- * by raminit again */
+ * by raminit again (see also erratum #181) */
+#if CONFIG_K8_REV_F_SUPPORT
dword = pci_read_config32(PCI_DEV(0, 0x18 + i, 2), 0x94);
dword |= (1 << 14);
pci_write_config32(PCI_DEV(0, 0x18 + i, 2), 0x94, dword);
+#else
+ dword = pci_read_config32(PCI_DEV(0, 0x18 + i, 2), 0x90);
+ dword |= (1 << 24);
+ pci_write_config32(PCI_DEV(0, 0x18 + i, 2), 0x90, dword);
+ dword = pci_read_config32(PCI_DEV(0, 0x18 + i, 2), 0x94);
+ dword |= (1 << 25);
+ pci_write_config32(PCI_DEV(0, 0x18 + i, 2), 0x94, dword);
+#endif
dword = 0x23070700; /* enable FID/VID change */
// dword = 0x00070000; /* enable FID/VID change */