[flashrom] [commit] r1250 - trunk

repository service svn at flashrom.org
Sat Jan 1 11:54:09 CET 2011


Author: krause
Date: Sat Jan  1 11:54:09 2011
New Revision: 1250
URL: http://flashrom.org/trac/flashrom/changeset/1250

Log:
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.

Signed-off-by: Mathias Krause <mathias.krause at secunet.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>

Modified:
   trunk/chipset_enable.c

Modified: trunk/chipset_enable.c
==============================================================================
--- trunk/chipset_enable.c	Mon Dec 27 00:55:19 2010	(r1249)
+++ trunk/chipset_enable.c	Sat Jan  1 11:54:09 2011	(r1250)
@@ -691,20 +691,20 @@
 		/* 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;




More information about the flashrom mailing list