Author: stefanct Date: Sat Oct 20 11:13:16 2012 New Revision: 1613 URL: http://flashrom.org/trac/flashrom/changeset/1613
Log: Add a bunch of new/tested stuff and various small changes 15.
Tested Mainboards: OK: - Foxconn P55MX http://www.flashrom.org/pipermail/flashrom/2012-October/010002.html
Tested flash chips: - Eon EN25F64 to PR (+PR) http://paste.flashrom.org/view.php?id=1426 - Macronix MX25L1005 to PREW (+PREW) http://www.flashrom.org/pipermail/flashrom/2012-October/010004.html - Set SST39VF512 to PREW (+W) http://www.flashrom.org/pipermail/flashrom/2012-September/009958.html
Tested chipsets: - Z77 (only reading was really tested)
Miscellaneous: - Fix ft2232_spi's parameter parsing. - Fix nicrealtek's init (always segfaulted since r1586 oops). - Add another T60 variant to the laptop whitelist. - Improve message shown when image file size does not match flash chip - Refine messages regarding the flash descriptor override strap according to the findings by Vladislav Bykov on his P55MX. - Fix the ID of EN25F64. - Demote and clarify debug message in serprog_delay(). - Minor other cleanups.
Signed-off-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at Acked-by: Stefan Tauner stefan.tauner@student.tuwien.ac.at
Modified: trunk/board_enable.c trunk/chipset_enable.c trunk/flashchips.c trunk/flashrom.c trunk/ft2232_spi.c trunk/ichspi.c trunk/nicrealtek.c trunk/print.c trunk/serprog.c
Modified: trunk/board_enable.c ============================================================================== --- trunk/board_enable.c Thu Oct 4 16:41:20 2012 (r1612) +++ trunk/board_enable.c Sat Oct 20 11:13:16 2012 (r1613) @@ -2407,10 +2407,11 @@ {0x8086, 0x7190, 0, 0, 0x8086, 0x7110, 0, 0, "^SE440BX-2$", NULL, NULL, P3, "Intel", "SE440BX-2", 0, NT, intel_piix4_gpo27_lower}, {0x1022, 0x7468, 0, 0, 0x1022, 0x7460, 0, 0, NULL, "iwill", "dk8_htx", P3, "IWILL", "DK8-HTX", 0, OK, w83627hf_gpio24_raise_2e}, {0x8086, 0x27A0, 0x8086, 0x27a0, 0x8086, 0x27b8, 0x8086, 0x27b8, NULL, "kontron", "986lcd-m", P3, "Kontron", "986LCD-M", 0, OK, board_kontron_986lcd_m}, + {0x8086, 0x27a0, 0x17aa, 0x2015, 0x8086, 0x27b9, 0x17aa, 0x2009, "^ThinkPad T60", NULL, NULL, P2, "Lenovo", "T60", 0, OK, p2_whitelist_laptop}, {0x8086, 0x27a0, 0x17aa, 0x2017, 0x8086, 0x27b9, 0x17aa, 0x2009, "^ThinkPad T60", NULL, NULL, P2, "Lenovo", "T60(s)", 0, OK, p2_whitelist_laptop}, {0x8086, 0x27a0, 0x17aa, 0x2017, 0x8086, 0x27b9, 0x17aa, 0x2009, "^ThinkPad X60", NULL, NULL, P2, "Lenovo", "X60(s)", 0, OK, p2_whitelist_laptop}, {0x8086, 0x2411, 0x8086, 0x2411, 0x8086, 0x7125, 0x0e11, 0xb165, NULL, NULL, NULL, P3, "Mitac", "6513WU", 0, OK, board_mitac_6513wu}, - {0x8086, 0x8186, 0x8086, 0x8186, 0x8086, 0x8800, 0x0000, 0x0000, "^MSC Vertriebs GmbH$", NULL, NULL, P2, "MSC", "Q7-TCTC", 0, OK, p2_not_a_laptop}, + {0x8086, 0x8186, 0x8086, 0x8186, 0x8086, 0x8800, 0, 0, "^MSC Vertriebs GmbH$", NULL, NULL, P2, "MSC", "Q7-TCTC", 0, OK, p2_not_a_laptop}, {0x10DE, 0x005E, 0x1462, 0x7125, 0x10DE, 0x0052, 0x1462, 0x7125, NULL, NULL, NULL, P3, "MSI", "K8N Neo4-F", 0, OK, nvidia_mcp_gpio2_raise}, /* TODO: Should probably be K8N Neo4 Platinum, see http://www.coreboot.org/pipermail/flashrom/2010-August/004362.html. */ {0x8086, 0x7190, 0, 0, 0x8086, 0x7110, 0, 0, "^MS-6163 (i440BX)$", NULL, NULL, P3, "MSI", "MS-6163 (MS-6163 Pro)", 0, OK, intel_piix4_gpo14_raise}, {0x1039, 0x0745, 0, 0, 0x1039, 0x0018, 0, 0, "^MS-6561", NULL, NULL, P3, "MSI", "MS-6561 (745 Ultra)", 0, OK, w836xx_memw_enable_2e},
Modified: trunk/chipset_enable.c ============================================================================== --- trunk/chipset_enable.c Thu Oct 4 16:41:20 2012 (r1612) +++ trunk/chipset_enable.c Sat Oct 20 11:13:16 2012 (r1613) @@ -1406,7 +1406,7 @@ {0x8086, 0x1c5c, OK, "Intel", "H61", enable_flash_pch6}, {0x8086, 0x1d40, OK, "Intel", "X79", enable_flash_pch6}, {0x8086, 0x1d41, OK, "Intel", "X79", enable_flash_pch6}, - {0x8086, 0x1e44, NT, "Intel", "Z77", enable_flash_pch7}, + {0x8086, 0x1e44, OK, "Intel", "Z77", enable_flash_pch7}, {0x8086, 0x1e46, NT, "Intel", "Z75", enable_flash_pch7}, {0x8086, 0x1e47, NT, "Intel", "Q77", enable_flash_pch7}, {0x8086, 0x1e48, NT, "Intel", "Q75", enable_flash_pch7},
Modified: trunk/flashchips.c ============================================================================== --- trunk/flashchips.c Thu Oct 4 16:41:20 2012 (r1612) +++ trunk/flashchips.c Sat Oct 20 11:13:16 2012 (r1613) @@ -954,7 +954,7 @@ }, { .eraseblocks = { { 64 * 1024, 1 } }, .block_erase = spi_block_erase_c7, - } + } }, .printlock = spi_prettyprint_status_register_amic_a25l40p, .unlock = spi_disable_blockprotect, @@ -986,7 +986,7 @@ }, { .eraseblocks = { { 128 * 1024, 1 } }, .block_erase = spi_block_erase_c7, - } + } }, .printlock = spi_prettyprint_status_register_amic_a25l40p, .unlock = spi_disable_blockprotect, @@ -1018,7 +1018,7 @@ }, { .eraseblocks = { { 256 * 1024, 1 } }, .block_erase = spi_block_erase_c7, - } + } }, .printlock = spi_prettyprint_status_register_amic_a25l40p, .unlock = spi_disable_blockprotect, @@ -1050,7 +1050,7 @@ }, { .eraseblocks = { { 512 * 1024, 1 } }, .block_erase = spi_block_erase_c7, - } + } }, .printlock = spi_prettyprint_status_register_amic_a25l40p, .unlock = spi_disable_blockprotect, @@ -1082,7 +1082,7 @@ }, { .eraseblocks = { { 1024 * 1024, 1 } }, .block_erase = spi_block_erase_c7, - } + } }, .printlock = spi_prettyprint_status_register_amic_a25l40p, .unlock = spi_disable_blockprotect, @@ -1114,7 +1114,7 @@ }, { .eraseblocks = { { 2048 * 1024, 1 } }, .block_erase = spi_block_erase_c7, - } + } }, .printlock = spi_prettyprint_status_register_amic_a25l40p, .unlock = spi_disable_blockprotect, @@ -1153,7 +1153,7 @@ }, { .eraseblocks = { { 4096 * 1024, 1 } }, .block_erase = spi_block_erase_c7, - } + } }, .printlock = spi_prettyprint_status_register_amic_a25l032, .unlock = NULL, /* Two status reg bytes (read with 0x35 and 0x05) */ @@ -1192,7 +1192,7 @@ }, { .eraseblocks = { { 4096 * 1024, 1 } }, .block_erase = spi_block_erase_c7, - } + } }, .printlock = spi_prettyprint_status_register_amic_a25lq032, .unlock = NULL, /* Two status reg bytes (read with 0x35 and 0x05) */ @@ -3413,11 +3413,11 @@ .name = "EN25F64", .bustype = BUS_SPI, .manufacture_id = EON_ID_NOPREFIX, - .model_id = EON_EN25F32, + .model_id = EON_EN25F64, .total_size = 8192, .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, - .tested = TEST_UNTESTED, + .tested = TEST_OK_PR, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, .block_erasers = @@ -4680,7 +4680,7 @@ .total_size = 128, .page_size = 256, .feature_bits = FEATURE_WRSR_WREN, - .tested = TEST_UNTESTED, + .tested = TEST_OK_PREW, .probe = probe_spi_rdid, .probe_timing = TIMING_ZERO, .block_erasers = @@ -7053,7 +7053,7 @@ .total_size = 64, .page_size = 4096, .feature_bits = FEATURE_EITHER_RESET, - .tested = TEST_OK_PRE, + .tested = TEST_OK_PREW, .probe = probe_jedec, .probe_timing = 1, /* 150 ns */ .block_erasers =
Modified: trunk/flashrom.c ============================================================================== --- trunk/flashrom.c Thu Oct 4 16:41:20 2012 (r1612) +++ trunk/flashrom.c Sat Oct 20 11:13:16 2012 (r1613) @@ -1086,7 +1086,8 @@ return 1; } if (image_stat.st_size != size) { - msg_gerr("Error: Image size doesn't match\n"); + msg_gerr("Error: Image size (%ld B) doesn't match the flash chip's size (%ld B)!\n", + image_stat.st_size, size); fclose(image); return 1; }
Modified: trunk/ft2232_spi.c ============================================================================== --- trunk/ft2232_spi.c Thu Oct 4 16:41:20 2012 (r1612) +++ trunk/ft2232_spi.c Sat Oct 20 11:13:16 2012 (r1613) @@ -271,11 +271,11 @@ channel_count = -1; break; } - } - if (channel_count < 0 || strlen(arg) != 1) { - msg_perr("Error: Invalid channel/port/interface specified: "%s".\n", arg); - free(arg); - return -2; + if (channel_count < 0 || strlen(arg) != 1) { + msg_perr("Error: Invalid channel/port/interface specified: "%s".\n", arg); + free(arg); + return -2; + } } free(arg);
Modified: trunk/ichspi.c ============================================================================== --- trunk/ichspi.c Thu Oct 4 16:41:20 2012 (r1612) +++ trunk/ichspi.c Sat Oct 20 11:13:16 2012 (r1613) @@ -1675,11 +1675,9 @@ if (tmp2 & HSFS_FDV) desc_valid = 1; if (!(tmp2 & HSFS_FDOPSS) && desc_valid) - msg_pinfo("The Flash Descriptor Security Override " - "Strap-Pin is set. Restrictions implied\n" - "by the FRAP and FREG registers are NOT in " - "effect. Please note that Protected\n" - "Range (PR) restrictions still apply.\n"); + msg_pinfo("The Flash Descriptor Override Strap-Pin is set. Restrictions implied by\n" + "the Master Section of the flash descriptor are NOT in effect. Please note\n" + "that Protected Range (PR) restrictions still apply.\n"); ich_init_opcodes();
if (desc_valid) { @@ -1720,15 +1718,13 @@ "yet.\n"); if (!ich_spi_force) programmer_may_write = 0; - msg_pinfo("Writes have been disabled. You can enforce " - "write support with the\nich_spi_force " - "programmer option, but it will most likely " - "harm your hardware!\nIf you force flashrom " - "you will get no support if something " - "breaks.\n"); + msg_pinfo("Writes have been disabled for safety reasons. You can enforce write\n" + "support with the ich_spi_force programmer option, but you will most likely\n" + "harm your hardware! If you force flashrom you will get no support if\n" + "something breaks. On a few mainboards it is possible to enable write\n" + "access by setting a jumper (see its documentation or the board itself).\n"); if (ich_spi_force) - msg_pinfo("Continuing with write support " - "because the user forced us to!\n"); + msg_pinfo("Continuing with write support because the user forced us to!\n"); }
tmp = mmio_readl(ich_spibar + ICH9_REG_SSFS);
Modified: trunk/nicrealtek.c ============================================================================== --- trunk/nicrealtek.c Thu Oct 4 16:41:20 2012 (r1612) +++ trunk/nicrealtek.c Sat Oct 20 11:13:16 2012 (r1613) @@ -60,6 +60,14 @@
int nicrealtek_init(void) { + if (rget_io_perms()) + return 1; + + io_base_addr = pcidev_init(PCI_BASE_ADDRESS_0, nics_realtek); + + if (register_shutdown(nicrealtek_shutdown, NULL)) + return 1; + /* Beware, this ignores the vendor ID! */ switch (pcidev_dev->device_id) { case 0x8139: /* RTL8139 */ @@ -74,14 +82,6 @@ break; }
- if (rget_io_perms()) - return 1; - - io_base_addr = pcidev_init(PCI_BASE_ADDRESS_0, nics_realtek); - - if (register_shutdown(nicrealtek_shutdown, NULL)) - return 1; - register_par_programmer(&par_programmer_nicrealtek, BUS_PARALLEL);
return 0;
Modified: trunk/print.c ============================================================================== --- trunk/print.c Thu Oct 4 16:41:20 2012 (r1612) +++ trunk/print.c Sat Oct 20 11:13:16 2012 (r1613) @@ -795,6 +795,7 @@ B("Foxconn", "6150K8MD-8EKRSH", OK, "http://www.foxconnchannel.com/ProductDetail.aspx?T=Motherboard&U=en-us00...", NULL), B("Foxconn", "A6VMX", OK, "http://www.foxconnchannel.com/ProductDetail.aspx?T=Motherboard&U=en-us00...", NULL), B("Foxconn", "P4M800P7MA-RS2", OK, "http://www.foxconnchannel.com/ProductDetail.aspx?T=Motherboard&U=en-us00...", NULL), + B("Foxconn", "P55MX", OK, "http://www.foxconnchannel.com/ProductDetail.aspx?T=motherboard&U=en-us00...", "Needs the MFG jumper to be set correctly before flashing to enable the Flash Descriptor Override Strap."), B("Freetech", "P6F91i", OK, "http://web.archive.org/web/20010417035034/http://www.freetech.com/prod/P6F91...", NULL), B("Foxconn", "Q45M", BAD, "http://www.foxconnchannel.com/ProductDetail.aspx?T=Motherboard&U=en-us00...", "Probing works (Hardware sequencing, 4096 kB, SPI), but parts of the flash are problematic: descriptor is r/o (conforming to ICH reqs), ME is locked."), B("Fujitsu-Siemens", "ESPRIMO P5915", OK, "http://uk.ts.fujitsu.com/rl/servicesupport/techsupport/professionalpc/ESPRIM...", "Mainboard model is D2312-A2."),
Modified: trunk/serprog.c ============================================================================== --- trunk/serprog.c Thu Oct 4 16:41:20 2012 (r1612) +++ trunk/serprog.c Sat Oct 20 11:13:16 2012 (r1613) @@ -877,8 +877,7 @@ unsigned char buf[4]; msg_pspew("%s usecs=%d\n", __func__, usecs); if (!sp_check_commandavail(S_CMD_O_DELAY)) { - msg_pdbg("Note: serprog_delay used, but the programmer doesn't " - "support delay\n"); + msg_pdbg2("serprog_delay used, but programmer doesn't support delays natively - emulating\n"); internal_delay(usecs); return; }