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@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); }
[root@k2 flashrom]# ./flashrom -p internal=fwh_idsel=0 flashrom v0.9.0-r670 coreboot table found at 0xcf7f3c00. Vendor ID: KONTRON, part ID: 986LCD-M Found chipset "Intel ICH7/ICH7R", enabling flash write... Setting IDSEL=0 for top 8 MBOK. This chipset supports the following protocols: LPC,FWH. Disabling flash write protection for board "Kontron 986LCD-M"... OK. Calibrating delay loop... OK. Found chip "SST SST49LF016C" (2048 KB, FWH) at physical address 0xffe00000. No operations were specified.
Carl-Daniel Hailfinger wrote:
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@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);
}
Acked-by: Chris Kinney cmkinne@sandia.gov
[root@k2 flashrom]# ./flashrom -p internal=fwh_idsel=0 flashrom v0.9.0-r670 coreboot table found at 0xcf7f3c00. Vendor ID: KONTRON, part ID: 986LCD-M Found chipset "Intel ICH7/ICH7R", enabling flash write... Setting IDSEL=0 for top 8 MBOK. This chipset supports the following protocols: LPC,FWH. Disabling flash write protection for board "Kontron 986LCD-M"... OK. Calibrating delay loop... OK. Found chip "SST SST49LF016C" (2048 KB, FWH) at physical address 0xffe00000. No operations were specified.
Chris Kinney wrote:
[root@k2 flashrom]# ./flashrom -p internal=fwh_idsel=0 flashrom v0.9.0-r670 coreboot table found at 0xcf7f3c00. Vendor ID: KONTRON, part ID: 986LCD-M Found chipset "Intel ICH7/ICH7R", enabling flash write... Setting IDSEL=0 for top 8 MBOK. This chipset supports the following protocols: LPC,FWH. Disabling flash write protection for board "Kontron 986LCD-M"... OK. Calibrating delay loop... OK. Found chip "SST SST49LF016C" (2048 KB, FWH) at physical address 0xffe00000. No operations were specified.
Carl-Daniel Hailfinger wrote:
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@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);
}
flashrom mailing list flashrom@flashrom.org http://www.flashrom.org/mailman/listinfo/flashrom
On 14.08.2009 01:11, Chris Kinney wrote:
Acked-by: Chris Kinney cmkinne@sandia.gov
Thanks, r685.
Regards, Carl-Daniel
On 8/14/09 12:55 AM, Chris Kinney wrote:
[root@k2 flashrom]# ./flashrom -p internal=fwh_idsel=0 flashrom v0.9.0-r670 coreboot table found at 0xcf7f3c00. Vendor ID: KONTRON, part ID: 986LCD-M Found chipset "Intel ICH7/ICH7R", enabling flash write... Setting IDSEL=0 for top 8 MBOK. This chipset supports the following protocols: LPC,FWH. Disabling flash write protection for board "Kontron 986LCD-M"... OK. Calibrating delay loop... OK. Found chip "SST SST49LF016C" (2048 KB, FWH) at physical address 0xffe00000. No operations were specified.
Why is this needed again? Does the Kontron default to a non-0 IDSEL?
I never had problems flashing on the Kontron without any such option..
Stefan
On 14.08.2009 15:09, Stefan Reinauer wrote:
On 8/14/09 12:55 AM, Chris Kinney wrote:
[root@k2 flashrom]# ./flashrom -p internal=fwh_idsel=0 flashrom v0.9.0-r670 Vendor ID: KONTRON, part ID: 986LCD-M Found chipset "Intel ICH7/ICH7R", enabling flash write... Setting IDSEL=0 for top 8 MBOK. Disabling flash write protection for board "Kontron 986LCD-M"... OK. Found chip "SST SST49LF016C" (2048 KB, FWH) at physical address 0xffe00000.
Why is this needed again? Does the Kontron default to a non-0 IDSEL?
It defaults to nonzero IDSEL for anything below the top 1 MB (and associated register space).
I never had problems flashing on the Kontron without any such option..
You will only hit this problem if you're using a FWH chip and if that chip is bigger than 1 MByte. SPI chips (all sizes) and FWH chips up to 1 MByte are not affected.
Regards, Carl-Daniel
[root@k2 flashrom]# ./flashrom flashrom v0.9.0-r685 coreboot table found at 0xcf7f3c00. Vendor ID: KONTRON, part ID: 986LCD-M Found chipset "Intel ICH7/ICH7R", enabling flash write... OK. This chipset supports the following protocols: LPC,FWH. Disabling flash write protection for board "Kontron 986LCD-M"... OK. Calibrating delay loop... OK. No EEPROM/flash device found. If you know which flash chip you have, and if this version of flashrom supports a similar flash chip, you can try to force read your chip. Run: flashrom -f -r -c similar_supported_flash_chip filename
Note: flashrom can never write when the flash chip isn't found automatically.
[root@k2 flashrom]# ./flashrom -p internal=fwh_idsel=0 flashrom v0.9.0-r685 coreboot table found at 0xcf7f3c00. Vendor ID: KONTRON, part ID: 986LCD-M Found chipset "Intel ICH7/ICH7R", enabling flash write... Setting IDSEL=0x0 for top 16 MBOK. This chipset supports the following protocols: LPC,FWH. Disabling flash write protection for board "Kontron 986LCD-M"... OK. Calibrating delay loop... OK. Found chip "SST SST49LF016C" (2048 KB, FWH) at physical address 0xffe00000. No operations were specified.
Re-Acted By: Chris Kinney cmkinne@sandia.gov
Carl-Daniel Hailfinger wrote:
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@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);
}