[flashrom] [PATCH] ICH6+ FWH IDSEL override

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Thu Aug 13 02:10:28 CEST 2009


Allow the user to override FWH IDSEL on ICH6 and later.
Usage:
flashrom -p internal=fwh_idsel=0

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>

Index: flashrom-ich6_fwh_idsel/chipset_enable.c
===================================================================
--- flashrom-ich6_fwh_idsel/chipset_enable.c	(Revision 683)
+++ flashrom-ich6_fwh_idsel/chipset_enable.c	(Arbeitskopie)
@@ -203,6 +203,7 @@
 {
 	uint32_t fwh_conf;
 	int i;
+	char *idsel = NULL;
 
 	/* Ignore all legacy ranges below 1 MB. */
 	/* FWH_SEL1 */
@@ -232,6 +233,19 @@
 			     (0xff0 + i) * 0x100000,
 			     (fwh_conf >> i) & 0x1 ? "en" : "dis");
 
+	if (programmer_param)
+		idsel = strstr(programmer_param, "fwh_idsel=");
+
+	if (idsel) {
+		idsel += strlen("fwh_idsel=");
+		fwh_conf = (uint32_t)strtoul(idsel, NULL, 0);
+
+		/* FIXME: Need to undo this on shutdown. */
+		printf("\nSetting IDSEL=0x%x for top 16 MB", fwh_conf);
+		pci_write_long(dev, 0xd0, fwh_conf);
+		pci_write_word(dev, 0xd4, fwh_conf);
+	}
+
 	return enable_flash_ich(dev, name, 0xdc);
 }
 


-- 
http://www.hailfinger.org/





More information about the flashrom mailing list