diff options
author | Marc Jones <marcj.jones@amd.com> | 2008-10-15 17:50:29 +0000 |
---|---|---|
committer | Marc Jones <marcj.jones@amd.com> | 2008-10-15 17:50:29 +0000 |
commit | a3d371ff9b124d00a60efec29e2f4d1647c04a92 (patch) | |
tree | ced984deeba81546b9218b645dd738275fa68539 /chipset_enable.c | |
parent | f09064d30f89c64b492f2d6644e6af79843ef5f5 (diff) | |
download | flashrom-a3d371ff9b124d00a60efec29e2f4d1647c04a92.zip flashrom-a3d371ff9b124d00a60efec29e2f4d1647c04a92.tar.gz |
SB600 has four write once LPC ROM protect areas
It is not possible to write enable that area once the register is set so
print a warning.
Corresponding to flashrom svn r324 and coreboot v2 svn r3659.
Signed-off-by: Marc Jones <marcj.jones@amd.com>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'chipset_enable.c')
-rw-r--r-- | chipset_enable.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/chipset_enable.c b/chipset_enable.c index c6aa876..22c40df 100644 --- a/chipset_enable.c +++ b/chipset_enable.c @@ -571,6 +571,26 @@ static int enable_flash_amd8111(struct pci_dev *dev, const char *name) return 0; } +static int enable_flash_sb600(struct pci_dev *dev, const char *name) +{ + uint32_t old, new; + uint8_t reg; + + /* Clear ROM Protect 0-3 */ + for (reg = 0x50; reg < 0x60; reg+=4) { + old = pci_read_long(dev, reg); + new = old & 0xFFFFFFFC; + if (new != old) { + pci_write_byte(dev, reg, new); + if (pci_read_long(dev, reg) != new) { + printf("tried to set 0x%x to 0x%x on %s failed (WARNING ONLY)\n", 0x50, new, name); + } + } + } + + return 0; +} + static int enable_flash_ck804(struct pci_dev *dev, const char *name) { uint8_t old, new; @@ -744,6 +764,7 @@ static const FLASH_ENABLE enables[] = { {0x1039, 0x0008, "SiS5595", enable_flash_sis5595}, {0x1022, 0x2080, "AMD CS5536", enable_flash_cs5536}, {0x1022, 0x7468, "AMD8111", enable_flash_amd8111}, + {0x1002, 0x438D, "ATI(AMD) SB600", enable_flash_sb600}, {0x10B9, 0x1533, "ALi M1533", enable_flash_ali_m1533}, {0x10de, 0x0050, "NVIDIA CK804", enable_flash_ck804}, /* LPC */ {0x10de, 0x0051, "NVIDIA CK804", enable_flash_ck804}, /* Pro */ |