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>
This commit is contained in:
Florian Zumbiehl 2011-11-22 21:32:31 +01:00 committed by Marc Jones
parent 2a40ebca9c
commit 04a8d6239f
1 changed files with 10 additions and 1 deletions

View File

@ -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 */