summaryrefslogtreecommitdiffstats
path: root/chipset_enable.c
diff options
context:
space:
mode:
authorMathias Krause <mathias.krause@secunet.com>2011-01-01 10:54:09 +0000
committerMathias Krause <mathias.krause@secunet.com>2011-01-01 10:54:09 +0000
commit9fbdc03d9f01b3dcd75d65ad3dec4ea03a06b93f (patch)
treee1369b87080837dbf19fb8454266f58c0677a1d5 /chipset_enable.c
parent1a6162ed8d473c30a785e8e623cbe0e540bd4b4f (diff)
downloadast2050-flashrom-9fbdc03d9f01b3dcd75d65ad3dec4ea03a06b93f.zip
ast2050-flashrom-9fbdc03d9f01b3dcd75d65ad3dec4ea03a06b93f.tar.gz
Fix decoding of SB600 LPC ROM protection registers
The address part was using a bit of the size, the size was missing the upper bit, was off by 1023 bytes and included the protection bits. Corresponding to flashrom svn r1250. Signed-off-by: Mathias Krause <mathias.krause@secunet.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'chipset_enable.c')
-rw-r--r--chipset_enable.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/chipset_enable.c b/chipset_enable.c
index ec15996..6d6008e 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -691,20 +691,20 @@ static int enable_flash_sb600(struct pci_dev *dev, const char *name)
/* No protection flags for this region?*/
if ((prot & 0x3) == 0)
continue;
- msg_pinfo("SB600 %s%sprotected from %u to %u\n",
+ msg_pinfo("SB600 %s%sprotected from 0x%08x to 0x%08x\n",
(prot & 0x1) ? "write " : "",
(prot & 0x2) ? "read " : "",
- (prot & 0xfffffc00),
- (prot & 0xfffffc00) + ((prot & 0x3ff) << 8));
+ (prot & 0xfffff800),
+ (prot & 0xfffff800) + (((prot & 0x7fc) << 8) | 0x3ff));
prot &= 0xfffffffc;
rpci_write_byte(dev, reg, prot);
prot = pci_read_long(dev, reg);
if (prot & 0x3)
- msg_perr("SB600 %s%sunprotect failed from %u to %u\n",
+ msg_perr("SB600 %s%sunprotect failed from 0x%08x to 0x%08x\n",
(prot & 0x1) ? "write " : "",
(prot & 0x2) ? "read " : "",
- (prot & 0xfffffc00),
- (prot & 0xfffffc00) + ((prot & 0x3ff) << 8));
+ (prot & 0xfffff800),
+ (prot & 0xfffff800) + (((prot & 0x7fc) << 8) | 0x3ff));
}
buses_supported = CHIP_BUSTYPE_LPC | CHIP_BUSTYPE_FWH;
OpenPOWER on IntegriCloud