summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Refactor PCI and USB device status printingStefan Tauner2012-12-276-193/+228
| | | | | | | | | | | | | | | | | To be able to get rid of lots of #ifdefs and centralize programmer-specific data more... - introduce two new fields to struct programmer_entry, namely enum type (OTHER, USB, PCI) and union devs (pcidev_status, usbdev_status or char *note). - use those fields to generate device listings in print.c and print_wiki.c. Bonus: add printing of USB devices to print_wiki.c and count supported PCI and USB devices. Corresponding to flashrom svn r1631. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Add general programmer sanity checksStefan Tauner2012-12-262-4/+29
| | | | | | | | | And remove the completely unused vendor field. Corresponding to flashrom svn r1630. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Fix memleaks in cli_classic.cStefan Tauner2012-12-262-1/+19
| | | | | | | | | | | | | | | | | | | Frees the memory allocated for the following strings - log file name - layout file name - image file name - programmer parameter (and reset the associated global variable in flashrom.c) Also, free the flashchip structs allocated by probe_flash. The layout image names were not fixed due to the pending layout patches. These bugs were found thanks to valgrind. Corresponding to flashrom svn r1629. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add a "device" parameter for DediprogNathan Laredo2012-12-242-6/+45
| | | | | | | | | | | | | | | | | | | | | This patch adds a "device" parameter for Dediprog which enables use of multiple dediprogs connected to a single machine. Very handy for test racks. Example usage: flashrom -p dediprog:device=0 flashrom -p dediprog:device=1 etc... The patch was originally written by Nathan Laredo. Thanks to David Hendricks for submitting it upstream. Additional error handling, man page etc. by Stefan Tauner. Corresponding to flashrom svn r1628. Signed-off-by: Nathan Laredo <nil@google.com> Signed-off-by: David Hendricks <dhendrix@google.com> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Fix sp_openserport users on WindowsStefan Tauner2012-11-303-3/+3
| | | | | | | Corresponding to flashrom svn r1627. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Idwer Vollering <vidwer@gmail.com>
* Break endless loop in serialport_write()Stefan Tauner2012-11-301-3/+11
| | | | | | | | | | | Serialport_write could loop endlessly when used with a seemingly valid port that does always return 0 on writes instead of an error. Give up after about 125 ms i.e. 250 tries with a period of 500 us. Corresponding to flashrom svn r1626. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Idwer Vollering <vidwer@gmail.com>
* Fix linker flag bug introduced in r1623Carl-Daniel Hailfinger2012-11-291-3/+3
| | | | | | | | | Spotted by Idwer Vollering. Corresponding to flashrom svn r1625. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Improve --help and friendsStefan Tauner2012-11-243-45/+35
| | | | | | | | | | More clear "variable" names, better explanation if no programmer is selected etc. Corresponding to flashrom svn r1624. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>
* Explicitly detect libusb-0.1 in the MakefileCarl-Daniel Hailfinger2012-11-201-17/+50
| | | | | | | | | | Avoid funny interactions between libpci and libusb detection. Leave libftdi autodetection alone for now. Corresponding to flashrom svn r1623. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Add (untested) board enable for Asus DSAN-DXStefan Tauner2012-11-052-0/+3
| | | | | | | | | | | IDs are from the host bridge and LPC controller. The enable function was reverse engineered by roxfan, thanks! User mezzo vanished without reporting any test results. Corresponding to flashrom svn r1622. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Support the new fast SPI mode present in Bus Pirate firmware v5.5 or newerCarl-Daniel Hailfinger2012-11-011-13/+77
| | | | | | | Corresponding to flashrom svn r1621. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Add support for Winbond W39F010/W39L010/W39L020Kyösti Mälkki2012-10-284-0/+148
| | | | | | | | | | | | | | | | W39F010 is a 128kB parallel 5V flash chip, 16k bootblocks. W39L010 is a 128kB parallel 3.3V flash chip, 8k bootblocks. W39L020 is a 256kB parallel 3.3V flash chip, 64k/16k bootblocks. The W39F010 code was tested with a satasii programmer. The first write attempt after an erase returned with verify failure, but the second write attempt was succesful: http://paste.flashrom.org/view.php?id=1418 Corresponding to flashrom svn r1620. Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Do not read the flash chip twice in verification modeStefan Tauner2012-10-273-53/+43
| | | | | | | | | | | | | | | | | | Kyösti Mälkki noticed that we unnecessarily read the flash chip twice when called with --verify. The first one is the mandatory read before everything (to be able to detect the seriousness of errors), but the second one is not necessary because we can just use the former for the comparison. This introduces a small output change: previously we printed ERASE or VERIFY depending on the callee. This special case has been dropped because it is unnecessary to print it (and wrong for the verification function to need to know why it is verifying exactly). If an erase fails we mention that fact explicitly already, similar for verify. Corresponding to flashrom svn r1619. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* serprog: add opcode to control the programmer's output driversStefan Tauner2012-10-273-1/+24
| | | | | | | | | | This allowed me to let the clips remain attached on my D946GZIS while playing with coreboot/serialice. Corresponding to flashrom svn r1618. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* serprog: move the macro list to its own header fileStefan Tauner2012-10-273-49/+26
| | | | | | | Corresponding to flashrom svn r1617. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add support for Atmel AT26DF041Stefan Tauner2012-10-274-4/+102
| | | | | | | | | | | | | | | | | | Wicked chip: No WRSR, no write enable command (but swallows our default one without a problem), supports an auto-erasing page write (but even without that page writes are recommended to write the whole page i.e. operate on a completely erased page), mad requirements on block refreshments if only partly written. Found on my Intel D946GZIS and tested with my serprog in situ. Using the page write by setting JEDEC_BYTE_PROGRAM to 0x11 and using the spi_chip_write_256 command greatly improves performance and works flawlessly. Corresponding to flashrom svn r1616. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add support for Numonyx N25Q016 and N25Q032Stefan Tauner2012-10-262-4/+109
| | | | | | | | | | | | | The 32Mb version has 1.8V and 3.0V versions, the smaller one 1.8V only (or Numonyx/Micron forgot to publish it). Another difference is that the 16Mb chip has 32 kB subsectors (erase opcode 0x52). As long as there are no funky configurations like for the 128Mb chips, we got the smaller parts covered with this change. Corresponding to flashrom svn r1615. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Remove exit calls from print_supported_chipsNiklas Söderlund2012-10-233-9/+12
| | | | | | | | | | | | Propagate the error code using return values instead, but let cli_classic.c still decide the ultimate return value of the process. Also, remove setting the ret value again after print_supported_wiki() - success is the default. Corresponding to flashrom svn r1614. Signed-off-by: Niklas Söderlund <niso@kth.se> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add a bunch of new/tested stuff and various small changes 15Stefan Tauner2012-10-209-43/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Corresponding to flashrom svn r1613. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Differentiate Numonyx N25Q064 1.8V and 3.0V versionsDavid Hendricks2012-10-042-3/+41
| | | | | | | | | | | | | | | | | | | | | | | This patch differentiates between the N25Q064 1.8V version and 3.0V version which have different JEDEC IDs. It extends the chip name to include more characters of the part number. The first two of those characters indicate the process technology (65nm) and feature set (hold pin etc.), neither of which matter for flashrom at the moment. The third and fourth characters specify voltage and block/sector size and uniformity, which are important and hence included. To abstract the irrelevant portions of the part number leading up to the characters we care about, dots are used. This helps prevent unwanted changes in chip name that can break fragile scripts and confuse people. More about this schema here: http://www.flashrom.org/pipermail/flashrom/2012-July/009595.html Corresponding to flashrom svn r1612. Signed-off-by: David Hendricks <dhendrix@google.com> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add support for SST's 25WF series of SPI flash chipsStefan Tauner2012-10-011-0/+142
| | | | | | | | | | | | This includes SST25WF512, SST25WF010, SST25WF020 and SST25WF040. They require a VCC of 1.65 - 1.95V, which is why i could not test them. The SOIC version of the SST25WF512 is used on an AMD X300-based graphics card i own. Corresponding to flashrom svn r1611. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Cleanup ft2322.c and add more detail to error messagesStefan Tauner2012-09-261-27/+17
| | | | | | | | | | | - Use libftdi's error string to add more detail. - Add full stops to messages. - Minor white space fixes. Corresponding to flashrom svn r1610. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add support for FT232HIlya A. Volynets-Evenbakh2012-09-263-4/+27
| | | | | | | | | | | | For older versions of libftdi we define TYPE_232H ourselves and this seems to be enough to get at least basic support (and we don't need more than that AFAICT). Corresponding to flashrom svn r1609. Signed-off-by: Ilya A. Volynets-Evenbakh <ilya@total-knowledge.com> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add support for all 4 possible channels to the ft2232_spi programmerStefan Tauner2012-09-262-22/+44
| | | | | | | | | | | | | Add a check to validate the selected channel/interface, which not even libftdi seems to do yet. This patch changes default behavior: the new default channel/interface is A. Also, this patch uses the word 'channel' in addition or in place of 'interface' where possible without too much hassle because it is the term FTDI uses. Corresponding to flashrom svn r1608. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Introduce a compile time option to select a default programmerStefan Tauner2012-09-252-5/+25
| | | | | | | | | | Heavily influenced by a discussion with (and based on code from) Peter Stuge. Please read the comment in the Makefile before using this option. Corresponding to flashrom svn r1607. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Peter Stuge <peter@stuge.se>
* Whitelist known working Thinkpads of the T60 and X60 seriesStefan Tauner2012-09-251-0/+13
| | | | | | | | | | | | | | This should get rid of the need to specify the laptop force parameter on T60 and X60 series Thinkpads (including T60s and X60s) that are using one of the Intel 94x northbridges and are known to have no interfering EC. Please note that although the EC is no problem, flashrom is not able to access the entire flash chip with the vendor BIOS, see the coreboot wiki for details: http://www.coreboot.org/Lenovo_x60x Corresponding to flashrom svn r1606. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>
* Fix flashrom running on boards with corebootStefan Tauner2012-09-243-13/+19
| | | | | | | | | | | | | | In r1577 we removed the discrimination of coreboot IDs and user-specified mainboards. The problem is that the board enable code required to find a board enable if either of these model strings were set. Therefore boards running coreboot that do not need a board enable failed to execute flashrom since then. This patch fixes this by handling coreboot IDs and user-supplied IDs differently again. Corresponding to flashrom svn r1605. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Idwer Vollering <vidwer@gmail.com>
* Fix memleaks in dmi.cStefan Tauner2012-09-231-1/+14
| | | | | | | | | | | | | | | In dmi_init() we populate static char *dmistrings[] with values that get later compared in dmi_match(). Those strings are actually strduped in get_dmi_string() and hence need to be freed later. This patch accomplishes this by registering another shutdown method. Also, the tangling pointers are nulled when the memories are freed. This bug was found thanks to valgrind. Corresponding to flashrom svn r1604. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Fix a memleak in the dummyflasherStefan Tauner2012-09-221-2/+3
| | | | | | | | | | | Emu_persistent_image was not freed correctly. This bug was found thanks to valgrind. Corresponding to flashrom svn r1603. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Generify a25.c's SRWD printing function and move it to spi25.cStefan Tauner2012-09-223-15/+14
| | | | | | | Corresponding to flashrom svn r1602. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add a bunch of new/tested stuff and various small changes 14Stefan Tauner2012-09-2112-111/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tested Mainboards: OK: - ASUS M3A78-EH http://www.flashrom.org/pipermail/flashrom/2010-October/005297.html - ASUS P2B-LS http://www.flashrom.org/pipermail/flashrom/2010-November/005506.html - Biostar TA790GX A3+ http://paste.flashrom.org/view.php?id=1350 - ECS 848P-A7 http://www.flashrom.org/pipermail/flashrom/2011-January/005781.html - GIGABYTE GA-G41MT-S2PT Reported on IRC - GIGABYTE GA-H77-D3H Reported and tested by Alexander Gordeev on IRC. - Gigabyte GA-X79-UD5 http://www.flashrom.org/pipermail/flashrom/2012-August/009811.html - Shuttle FN78S http://www.flashrom.org/pipermail/flashrom/2012-August/009714.html - VIA EITX-3000 Reported on IRC by Tuju NOT OK: - Dell PowerEdge C6220 (0HYFFG) http://www.flashrom.org/pipermail/flashrom/2012-September/009900.html - Foxconn Q45M http://www.flashrom.org/pipermail/flashrom/2012-September/009923.html - MSI MS-7309 (K9N6SGM-V) http://www.flashrom.org/pipermail/flashrom/2012-August/009712.html - Supermicro X9QRi-F+ http://www.flashrom.org/pipermail/flashrom/2012-September/009887.html - ZOTAC H61-ITX WiFi (H61ITX-A-E) http://www.flashrom.org/pipermail/flashrom/2012-August/009649.html ASUS CUSL2-C has been tested to be working with the board enable once implemented for the TUSL2-C board. They seem to have the same PCI IDs as shown in the links below. Since only the CUSL2-C board enable has been tested yet, we distinguish the two by DMI strings. http://paste.flashrom.org/view.php?id=1393 http://www.flashrom.org/pipermail/flashrom/attachments/20091206/ddca2c6c/attachment-0002.eml Tested flash chips: - Set EMST F25L008A to PREW (+PREW) http://www.flashrom.org/pipermail/flashrom/2012-August/009714.html - Set GigaDevice GD25Q64 to PREW (+PREW) http://git.chromium.org/gitweb/?p=chromiumos/third_party/flashrom.git;a=commit;h=9e8ef49b1f626c2197e131fba6c5b65c8af4eeea - Set Macronix MX25L12805 to P (+P) http://www.flashrom.org/pipermail/flashrom/2012-September/009887.html - Set SST SST49LF003A/B to PREW (+EW) http://paste.flashrom.org/view.php?id=467 - Set Winbond W49V002FA to PREW (+EW) http://www.flashrom.org/pipermail/flashrom/2011-January/005781.html Tested chipsets: - Intel X79 (0x1d41) http://www.flashrom.org/pipermail/flashrom/2012-August/009811.html Board enables: - add ASUS P4P800-X Created by Idwer Vollering and tested by Mingsen Bao: http://paste.flashrom.org/view.php?id=467 - add DMI string to P4P800-VM Miscellaneous: - Add remaining Intel 7 series chipset (LPC) PCI IDs - Add generic SPI detection for chips from Winbond - Minor manpage changes - Minor other cleanups - Escape full stops after abbreviations in the manpage. - Add ICH9 and successors to spi_get_valid_read_addr Corresponding to flashrom svn r1601. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add spi_block_erase_62Stefan Tauner2012-09-214-0/+56
| | | | | | | | | | | | This is used by the AT25F series (only?), but is generic enough to reside in spi25.c. The only currently supported chip is the AT25F512B. Other members of that series need some additional infrastructure code, hence this patch adds the erase function to the AT25F512B only. Corresponding to flashrom svn r1600. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Allow to select FTDI device by serial numberShik Chen2012-09-172-1/+12
| | | | | | | | | | | | Requires libftdi > 0.5 (2004, commit ID a8f46ddc1595b1b07abfcce613acdafe5b8ddf9d). Idea stolen from chromiumos commit 5eb5624aeb7e2ee483e2fa0823c4e634c8ea3e68: http://git.chromium.org/gitweb/?p=chromiumos/third_party/flashrom.git;a=commit;h=5eb5624aeb7e2ee483e2fa0823c4e634c8ea3e68 Corresponding to flashrom svn r1599. Signed-off-by: Shik Chen <shik@chromium.org> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add support for GigaDevice GD25LQ32Bryan Freed2012-09-172-0/+38
| | | | | | | | | | | | | | | This is the low power version (vendor,device = 0xc8,0x6016) of GD25Q32 (0xc8,0x4016) which matches that of W25Q32 (0xef,0x4016) and W25Q32DW (0xef,0x6016). All their datasheets look pretty much the same with respect to commands, erase blocks, etc. Stolen from chromiumos: http://git.chromium.org/gitweb/?p=chromiumos/third_party/flashrom.git;a=commitdiff;h=9a0051f0ba0b67af6f08e052c31cba3e9dbbbdbf Corresponding to flashrom svn r1598. Signed-off-by: Bryan Freed <bfreed@chromium.org> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add board enable for MSI K8N Neo PlatinumStefan Tauner2012-09-152-0/+3
| | | | | | | | | | | It's the same as for the Neo2. Thanks to roxfan and twice11 who did the RE! Corresponding to flashrom svn r1597. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Tested-by: Jud Porter Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add untested board enable for ASUS P5LD2-VMIdwer Vollering2012-09-072-0/+3
| | | | | | | | | | | Based on http://patchwork.coreboot.org/patch/2881/ but with the right pin (i.e. 16) according to Joshua Roys. Corresponding to flashrom svn r1596. Signed-off-by: Idwer Vollering <vidwer@gmail.com> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Remove exit calls from sp_sync_read_timeout and sp_synchronizeNiklas Söderlund2012-09-072-28/+49
| | | | | | | | | | | | | | | | | | Add return values to sp_synchronize so we can signal a failure to the only upstream caller (serprog_init), which is prepared to propagate a failure. sp_sync_read_timeout was harder to fix because it already used a return value, but we needed to distinguish two different failure modes. This solution distinguishes them by the sign of the return values, which maintains readability as much as possible. Thanks to Niklas Söderlund for the original patch and idea. Corresponding to flashrom svn r1595. Signed-off-by: Niklas Söderlund <niso@kth.se> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add support for Eon EN25F64Stefan Tauner2012-09-062-0/+35
| | | | | | | | | | | | | Its ID was spotted in an ICH descriptor region update by Jetway: http://paste.flashrom.org/view.php?id=1217 and is used on ASUS P8B75-V boards according to some forum posts (2 chips per board actually). No datasheet was found, so most values are just guessed from the EN25F32. Corresponding to flashrom svn r1594. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Try to remove all read and write locks on CK804 (and MCP51)Jonathan Kollasch2012-09-043-34/+61
| | | | | | | | | | | | | | | | | | | | We made a first step into this direction in r1405, but failed to notice that there was already an extended patch by Jonathan which was refined to become this one. Allows the removal of board_shuttle_fn25 (which was also intended to be used on the ASUS A8N-SLI Deluxe, but this was never tested). Corresponding to flashrom svn r1593. A previous iteration was tested on CK804 and Signed-off-by: Jonathan Kollasch <jakllsch@kollasch.net> which was then Acked-by: Stefan Reinauer <stepan@coreboot.org> Rebasing, refining and making errors non-fatal is Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Nvidia chipset enables: refactor setting bit 0 in 0x6dStefan Tauner2012-09-041-32/+28
| | | | | | | | | | | | | | This patch also changes semantics: previously failing to set this was interpreted as a fatal error by enable_flash_ck804 and enable_flash_mcp55 although the output indicated otherwise. Also, in enable_flash_nvidia_nforce2 there was no check if settings the bit succeeds. Now all methods check for success and return ERROR_NONFATAL on failure. Corresponding to flashrom svn r1592. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Fix compilation with MinGWStefan Tauner2012-09-012-7/+9
| | | | | | | | | | This was broken since r1557 when we got rid of some exit calls, but returned -1 instead which is not a valid HANDLE value. Corresponding to flashrom svn r1591. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Idwer Vollering <vidwer@gmail.com>
* Add support for AJAWe to pony_spiVirgil-Adrian Teaca2012-09-012-60/+113
| | | | | | | | | | | | | http://www.ajawe.pl/ajawe0208.htm http://www.ajawe.pl/files/0208_R_DOK.pdf Corresponding to flashrom svn r1590. First version was Signed-off-by: Virgil-Adrian Teaca <darkstarlinux@gmail.com> Refinements and general cleanup is Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add RES/REMS support to all dummyflasher emulated chips as a test caseCarl-Daniel Hailfinger2012-08-301-10/+47
| | | | | | | | | | Fix a few odd corner cases in RES/REMS support in dummyflasher emulation which became noticeable once RES/REMS was used heavily. Corresponding to flashrom svn r1589. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Remove potential endless loops from satasii.cCarl-Daniel Hailfinger2012-08-291-8/+19
| | | | | | | | | | | | | Corresponding to flashrom svn r1588. This is based on the idea from the "Make satasii driver more robust" patch Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> It factors out the wait loop and replaces all potential endless loops instead of just a few. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* ichspi: ignore bogus FREGsStefan Tauner2012-08-271-1/+1
| | | | | | | | | | | | | | | | | | Some vendors forget to disable regions properly and set their FRAP bits and FREG to 0. While not documented publicly this is being ignored by the chipset(s)[1] and hence flashrom should do so too. Without this patch flashrom prints a warning and disables writes. The check for i (region index) excludes the descriptor region which should not be becessary because specs suggest that the descriptor region should not be locked, but if vendors would follow the specs this patch would not have been necessary in the first place. [1]: http://www.flashrom.org/pipermail/flashrom/2012-May/009303.html Corresponding to flashrom svn r1587. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Add support for Realtek RTL8169Sergey Lichack2012-08-273-24/+31
| | | | | | | | | | | | | | And some cleanups including the removal of any left traces of the nicsmc1211 programmer. The RTL8169 still needs someone to test it, but it's good enough to be in the tree now. Corresponding to flashrom svn r1586. Signed-off-by: Sergey Lichack <shadowpilot34@gmail.com> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> Acked-by: Mathias Krause <mathias.krause@secunet.com> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Some ISO C fixesCarl-Daniel Hailfinger2012-08-2728-30/+44
| | | | | | | | | | | | | | | | | This patch just fixes a limited number of bits not conforming to c99 by using - __asm__ instead of just asm - {0} instead of {} for struct initialization - h_addr_list[0] instead of h_addr to access the host address in struct hostent - #include <strings.h> where needed (for ffs and strcasecmp) Based on a previous patch by Carl-Daniel. Corresponding to flashrom svn r1585. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Use getpagesize() to determine the physmap's length in nicintel_spi.cStefan Tauner2012-08-261-2/+4
| | | | | | | Corresponding to flashrom svn r1584. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Rename AT25F512B-specific codeStefan Tauner2012-08-263-6/+6
| | | | | | | | | | | The AT25F512B is quite different from the other (older and yet unsupported) chips in the AT25F* familiy, hence rename 512B-specific stuff to make room for the generic AT25F* code. Corresponding to flashrom svn r1583. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Clean up enable_flash_ich and attempt to disable SMM write protectionStefan Reinauer2012-08-261-20/+27
| | | | | | | | | | | | | | | | | | | | | | This is based on chromiumos commit a5f4e82c59d6bcaf06b94623e5516d1db8cb843a. http://git.chromium.org/gitweb/?p=chromiumos/third_party/flashrom.git;a=commit;h=a5f4e82c59d6bcaf06b94623e5516d1db8cb843a See also http://www.flashrom.org/pipermail/flashrom/2011-November/008191.html Besides disabling the SMM protection this also fixes something that bothered me for a long time: the content of BIOS_CNTL was shown before we try to modify it. This is usually not what interests us and contradicts other outputs. With this patch we try to set the write enable and disable the SMM protection first and show the state of BIOS_CNTL afterwards. We now return an error only if the write enable is not set (which should be equivalent to the previous behavior on sane hardware, but it seems to be 'more correct' and makes the code clearer to do this explicitly). Corresponding to flashrom svn r1582. Signed-off-by: Stefan Reinauer <reinauer@chromium.org> Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>