aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Add support for Atmel / Adesto AT25SF041 SPI flash chipjvm2018-03-142-0/+39
| | | | | | | | | | | probe/erase/read/write/verify hardware-tests were done. Change-Id: I0be930ff2258300508398e12fbe5abe10400fea2 Signed-off-by: Julian von Mendel <git@jinvent.de> Signed-off-by: jvm <git@jinvent.de> Reviewed-on: https://review.coreboot.org/25047 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
* dmi: Don't print dmidecode shell errorStefan Tauner2018-03-081-1/+6
| | | | | | | | | | | | | Don't print the error "sh: dmidecode: not found" if dmidecode is not there. Uses stderr redirection to /dev/null (or NUL on Windows). Change-Id: I3ded8e1bad14b5e809185a79c4e3a17329b1ecb9 Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at> Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/23802 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
* Whitelist Lenovo Thinkpad X220Arthur Heymans2018-03-071-0/+1
| | | | | | | | | | | | | | Coreboot uses the subvendor VID/DID of the Thinkpad X220-Tablet for all X220 variants. Don't specify a dmidecode string so that it can be used with coreboot on all X220 variants and on X220-Tablet with vendor firmare. Change-Id: Idd667da8209a664469c1a909a549d2b625714a78 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/23225 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
* flashchips: Add ZD25D20David Hendricks2018-02-222-0/+39
| | | | | | | | | This adds another Zetta Device chip, the ZD25D20. Change-Id: Idf805252647be44e28296a161d2e6160710bcc71 Signed-off-by: David Hendricks <david.hendricks@gmail.com> Reviewed-on: https://review.coreboot.org/23702 Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* git-hooks: Fix install script for various git versionsNico Huber2018-02-211-5/+15
| | | | | | | | | | | | | | | There are older versions of git-rev-parse that don't understand the `--git-path` switch. Also, when the install script was written, git- rev-parse had a bug when it wasn't run from the root directory. They fixed the behaviour by now. To simplify things and not have to account for that too, we just bail out when the script is run from a sub- directory. Change-Id: I7ee8d4d54db48f7207fe8abf895c7fbba7685ad2 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22971 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
* flashchips: Add Zettadevice ZD25D40nybash2018-02-212-1/+42
| | | | | | | | | | | | This introduces the Zettadevice manufacturer ID and adds support for the ZD25D40 chip. Based on PR20 from Github. Change-Id: I0400b059ddacdf166d1b77f619becec3a250cece Signed-off-by: David Hendricks <david.hendricks@gmail.com> Reviewed-on: https://review.coreboot.org/23701 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
* board_enable: Whitelist several ThinkPad laptopsLeah Rowe2018-02-201-0/+4
| | | | | | | | | | | | | | | | Newly whitelisted laptops include: * ThinkPad R400 * ThinkPad T500 * ThinkPad W500 * Libiquity Taurinus X200 Change-Id: I772f8e109c56a5fd40f6b1aff0f592b915669c17 Signed-off-by: Leah Rowe <leah@libreboot.org> Reviewed-on: https://review.coreboot.org/23781 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
* flashchips: Add Winbond W25P80/16/32 supportDavid Hendricks2018-02-202-0/+89
| | | | | | | | | | | This adds support for W25P80/16/32 chips. Most notably these chips only have two erase commands - one for 64KiB "sectors" and one for chip erase. Change-Id: Ie09ba8e28fee35c42e17ca05219dc673413de93b Signed-off-by: David Hendricks <david.hendricks@gmail.com> Reviewed-on: https://review.coreboot.org/23700 Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* Add support for reading the current flash contents from a filePaul Kocialkowski2018-02-114-28/+61
| | | | | | | | | | | | | | | | | | | When developing software that has to be flashed to a flash chip to be executed, it often takes a long time to read the current flash contents (for flashrom to know what pages to erase and reprogram) each time when writing the new image. However, when the flash was just reprogrammed, its current state is known to be the previous image that was flashed (assuming it was verified). Thus, it makes sense to provide that image as a file for the flash contents instead of wasting valuable time read the whole flash each time. Change-Id: Idf153b6955f37779ae9bfb228a434ed10c304947 Signed-off-by: Mike Banon <mikebdp2@gmail.com> Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-on: https://review.coreboot.org/23263 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* edi: Print debug info like others while probing for ENE chipsMike Banon2018-02-111-2/+8
| | | | | | | | | | | | | | | Instead of just "Probing for ENE KB9012 (EDI), 128 kB:", lets print some debug info - like it is currently being printed for other chips: Probing for ENE KB9012 (EDI), 128 kB: edi_chip_probe: hwversion 0xc3, ediid 0x04 Found ENE flash chip "KB9012 (EDI)" (128 kB, SPI) on ch341a_spi. Change-Id: Id8e62bc9f6785b4bf0be0aaf0f74c8120d77c0d4 Signed-off-by: Mike Banon <mikebdp2@gmail.com> Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-on: https://review.coreboot.org/23261 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* edi: Add dummy read to ensure proper detection of ENE chipsPaul Kocialkowski2018-02-111-0/+12
| | | | | | | | | | | | | | | | ENE chips enable EDI by detecting a clock frequency between 1 MHz and 8 MHz. In many cases, the chip won't be able to both detect the clock signal and serve the associated request at the same time. Thus, a dummy read has to be added to ensure that EDI is enabled and operational starting from the next request. Change-Id: I69ee71674649cd8ba4fc635f889cb39a1cd204b9 Signed-off-by: Mike Banon <mikebdp2@gmail.com> Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-on: https://review.coreboot.org/23260 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* Add support for the ENE Embedded Debug Interface EDI and KB9012 ECPaul Kocialkowski2018-02-117-2/+611
| | | | | | | | | | | | | | | | | | | | | | | | The ENE Embedded Debug Interface (EDI) is a SPI-based interface for accessing the memory of ENE embedded controllers. The ENE KB9012 EC is an embedded controller found on various laptops such as the Lenovo G505s. It features a 8051 microcontroller and has 128 KiB of internal storage for program data. EDI can be accessed on the KB9012 through pins 59-62 (CS-CLK-MOSI-MISO) when flash direct access is not in use. Some firmwares disable EDI at runtime so it might be necessary to ground pin 42 to reset the 8051 microcontroller before accessing the KB9012 via EDI. The example of flashing KB9012 at Lenovo G505S laptop could be found here: http://dangerousprototypes.com/docs/Flashing_KB9012_with_Bus_Pirate Change-Id: Ib8b2eb2feeef5c337d725d15ebf994a299897854 Signed-off-by: Mike Banon <mikebdp2@gmail.com> Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-on: https://review.coreboot.org/23259 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
* Add support for selecting the erased bit value with a flagPaul Kocialkowski2018-02-112-15/+26
| | | | | | | | | | | | Most flash chips are erased to ones and programmed to zeros. However, some other chips, such as the ENE KB9012 internal flash, work the opposite way. Change-Id: Ia7b0de8568e31f9bf263ba0ad6b051e837477b6b Signed-off-by: Mike Banon <mikebdp2@gmail.com> Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-on: https://review.coreboot.org/23258 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* Add a SPI command class to `struct flashchip`Mike Banon2018-02-112-0/+14
| | | | | | | | | | | | | | | | | | | | By default, we want to probe for SPI25 chips only. Other SPI use cases, like the ENE/EDI protocol, might use commands that can confuse these common chips. Now, flashrom will probe for a chip only if one of these conditions is true: 1) no chip has been specified AND the chip uses the SPI25 commands 2) this chip has been specified by -c | --chip <chipname> The CLI can later be extended to probe for a specific class of chips. Change-Id: I89a53ccaef2791a2ac32904d7ab813da7478a6f0 Signed-off-by: Mike Banon <mikebdp2@gmail.com> Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/23262 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Kocialkowski <contact@paulk.fr>
* chipset_enable: Mark VX855 as testedLubomir Rintel2018-01-261-1/+1
| | | | | | | | | | | | I can confirm a successful reading and writing of SST49LF080A (LPC) on a Wyse Cx0 Thin Client (Phoenix BIOS 1.0G). Change-Id: I8f48b49ccb760f69d676ec6cbb233e532b12fbe8 Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Reviewed-on: https://review.coreboot.org/23158 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Nico Huber <nico.h@gmx.de>
* buspirate_spi: Add support for variable serial speedsShawn Anastasio2018-01-263-11/+134
| | | | | | | | | | | | | | | | | | | | | | | | This patch sets the default baud rate for communication between the host device and the Bus Pirate for hardware versions 3.0 and greater to 2M baud. It also introduces the ability to manually set the baud rate via the added 'serialspeed' programmer parameter. This is done in two parts. Firstly, the requested serial speed is looked up in a table to determine the appropriate clock divisor and the divisor is sent to the bus pirate. Then, the system's baud rate for the selected serial port is set using serial.c's 'serialport_config'. This function's prototype had to be added to programmer.h. In testing, using the 2M baud rate was able to significantly decrease flash times (down from 20+ minutes to less than 2 minutes for an 8MB flash). Change-Id: I3706f17a94fdf056063f2ad4a5f0a219665cdcbf Signed-off-by: Shawn Anastasio <shawnanastasio@yahoo.com> Reviewed-on: https://review.coreboot.org/23057 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* Fix the documentation and DOS portRudolf Marek2018-01-062-26/+53
| | | | | | | | | | | | Update the DOS cross-compile documentation, and workaround issue with valloc() with the latest DJGPP. Change-Id: I909c5635aec5076440d2fde73d943f8ad10b8051 Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Reviewed-on: https://review.coreboot.org/23039 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* chipset_enable: Mark VX900 as testedLubomir Rintel2018-01-021-1/+1
| | | | | | | | | | | I can confirm a successful reading and writing of MX25L8005 (SPI) on a HP t5550 Thin Client (AMI BIOS 786R9 v1.04). Change-Id: I190253b0c1920747b710ed7155e78191cce139eb Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Reviewed-on: https://review.coreboot.org/23030 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* vt_vx: check whether the chipset's MMIO range is configuredLubomir Rintel2018-01-021-0/+8
| | | | | | | | | | | | Avoid attempting to read the SPI bases from the location 0x00000000, all zeroes mean that the chipset's MMIO area is not enabled. Change-Id: I5d3a1ba695153e854e0979ae634f8ed97e6b6293 Signed-off-by: Lubomir Rintel <lkundrak@v3.sk> Reviewed-on: https://review.coreboot.org/23029 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
* flashchips: Revise all 4BA chipsNico Huber2018-01-022-16/+50
| | | | | | | | | | | | | | | | Advertise all 4BA features that are currently supported by flashrom, plus add a new feature flag for the 4BA fast-read instruction. Also, list all supported 3BA and 4BA erase-block functions. As this adds a lot of new code paths that could be taken for these chips, mark them all as untested again. Change-Id: I0598496ee7058e3b170684d366f58e4014e0e871 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22423 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
* spi25: Revise decision when to enter/exit 4BA modeNico Huber2018-01-025-47/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of arbitrarily deciding whether to enter 4BA mode in the flash chip's declaration, advertise that entering 4BA mode is supported and only enter it if the SPI master supports 4-byte addresses. If not, exit 4BA mode (the chip might be in 4BA mode after reset). If we can't assure the state of 4BA mode, we bail out to simplify the code (we'd have to ensure that we don't run any instructions that can usually be switched to 4BA mode otherwise). Two new feature flags are introduced: * FEATURE_4BA_ENTER: Can enter/exit 4BA mode with instructions 0xb7/0xe9 w/o WREN. * FEATURE_4BA_ENTER_WREN Can enter/exit 4BA mode with instructions 0xb7/0xe9 after WREN. FEATURE_4BA_SUPPORT is dropped, it's completely implicit now. Also, draw the with/without WREN distinction into the enter/exit functions to reduce code redundancy. Change-Id: I877fe817f801fc54bd0ee2ce4e3ead324cbb3673 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22422 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
* spi_master: Introduce SPI_MASTER_4BA feature flagNico Huber2018-01-029-5/+30
| | | | | | | | | | | | | | | Add a feature flag SPI_MASTER_4BA to `struct spi_master` that advertises programmer-side support for 4-byte addresses in generic commands (and read/write commands if the master uses the default implementations). Set it for all masters that handle commands address-agnostic. Don't prefer native 4BA instructions if the master doesn't support them. Change-Id: Ife66e3fc49b9716f9c99cad957095b528135ec2c Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22421 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
* spi: Move ICH BBAR quirk out of the wayNico Huber2017-12-285-85/+29
| | | | | | | | | | | | | | | | | | | | | Get rid of the layering violations around ICH's BBAR. Move all the weird address handling into (surprise, surprise) `ichspi.c`. Might fix writes for the `BBAR != 0` case by accident. Background: Some ICHs have a BBAR (BIOS Base Address Configuration Register) that, if set, limits the valid address range to [BBAR, 2^24). Current code lifted addresses for REMS, RES and READ operations by BBAR, now we do it for all addresses in ichspi. Special care has to be taken if the BBAR is not aligned by the flash chip's size. In this case, the lower part of the chip (from BBAR aligned down, up to BBAR) is inacces- sible (this seems to be the original intend behind BBAR) and has to be left out in the address offset calculation. Change-Id: Icbac513c5339e8aff624870252133284ef85ab73 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22396 Reviewed-by: David Hendricks <david.hendricks@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* spi25: Merge remainder of spi4ba inNico Huber2017-12-287-466/+119
| | | | | | | | Change-Id: If581e24347e45cbb27002ea99ffd70e334c110cf Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22388 Reviewed-by: David Hendricks <david.hendricks@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* spi4ba: Drop now obsolete, redundant functionsNico Huber2017-12-281-651/+0
| | | | | | | | Change-Id: I1d04448fd1acbfc37b8e17288f497a4292dfd6d6 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22387 Reviewed-by: David Hendricks <david.hendricks@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* spi25: Remove now obsolete `four_bytes_addr_funcs` pathNico Huber2017-12-284-76/+22
| | | | | | | | Change-Id: Idb7c576cb159630da2268813388b497cb5f46b43 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22386 Reviewed-by: David Hendricks <david.hendricks@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* spi25: Enable native 4BA read and write using feature bitsNico Huber2017-12-283-21/+28
| | | | | | | | | | | Prefer the native 4BA instruction when they are supported. In this case, override our logic to decide to use a 4BA address. Change-Id: I2f6817ca198bf923671a7aa67e956e5477d71848 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22385 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* spi25: Integrate 4BA supportNico Huber2017-12-285-9/+57
| | | | | | | | | | | | | | | | | | Allow 4-byte addresses for instructions usually used with 3-byte addresses. Decide in which way the 4th byte will be communicated based on the state of the chip (i.e. have we enabled 4BA mode) and a new feature bit for an extended address register. If we are not in 4BA mode and no extended address register is available or the write to it fails, bail out. We cache the state of 4BA mode and the extended address register in the flashctx. Change-Id: I644600beaab9a571b97b67f7516abe571d3460c1 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22384 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* spi25: Use common code for nbyte read/write and block eraseNico Huber2017-12-283-429/+105
| | | | | | | | | | | | | | | | | | Introduce spi_prepare_address() and spi_write_cmd() and use them in nbyte_program, nbyte_read and block-erase procedures. The former abstracts over the address part of a SPI command to make it exten- sible for 4-byte adressing. spi_write_cmd() implements a WREN + write operation with address and optionally up to 256 bytes of data. It provides a common path to reduce overall redundancy. Also, reduce the polling delay in spi_block_erase_c4() from 500s to 500ms as the comment suggests. Change-Id: Ibc1ae48acbfbd427a30bcd64bdc080dc3dc20503 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22383 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
* spi25: Introduce spi_simple_write_cmd()Nico Huber2017-12-282-95/+39
| | | | | | | | | | | | spi_simple_write_cmd() executes WREN plus a single byte write and polls WIP afterwards. It's used to replace current spi_erase_chip_*() imple- mentations. Change-Id: Ib244356fa471e15863b52e6037899d19113cb4a9 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22382 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
* internal: Only build on x86 and mipselNico Huber2017-12-192-38/+12
| | | | | | | | | | | | | internal_init() explicitly fails on everything but x86 and mipsel. Instead, we can just never build the internal programmer on other architectures and drop a lot of #if boilerplate. Change-Id: I672ddab0415df3baa49ff39a1c9db1b41d8143a4 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22671 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
* Move endianness definitions and provide it inside MakefileNico Huber2017-12-194-83/+89
| | | | | | | | | | | | | | Add an `endiantest.c` similar to `archtest.c` to provide the endianness inside the Makefile. The __FLASHROM_(LITTLE|BIG)_ENDIAN__ definitions had to move from `hwaccess.h` into `platform.h`, therefor. This will be used to decide whether to build the internal programmer in a follow- up. Change-Id: I55dcf5a88da48f885cda9ad89ab87395d895a891 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22670 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
* ichspi: Fix 100 series PCH (Skylake) supportNico Huber2017-12-191-1/+1
| | | | | | | | | | | | | | Pretty subtle missing `else` made flashrom treat Skylake like older chipsets. Change-Id: I14bf578964124d4677cb5dfca01c9d1b0d279c9c Signed-off-by: Nico Huber <nico.h@gmx.de> Reported-by: Youness Alaoui <kakaroto@kakaroto.homelinux.net> Reviewed-on: https://review.coreboot.org/22832 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Youness Alaoui <snifikino@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
* flashchips: Add ISSI IS25LP128 and IS25WP128David Hendricks2017-12-112-0/+85
| | | | | | | | | | | | IS25LP128 is the 3.3V variant, IS25WP128 is the 1.8V variant. Tested read, erase, and write using Dediprog SF600 on each. Change-Id: Ia1c7a9a950043c30b7525196e03ee394689e89a5 Signed-off-by: David Hendricks <dhendricks@fb.com> Reviewed-on: https://review.coreboot.org/22784 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* Do not stop probing for flashchips after map_flash() failedMartin Schiller2017-12-111-1/+1
| | | | | | | | | | | | | | | Instead, continue probing the next chip. This fixes the problem that flashrom aborts probing for flashchips if one big flashchip (e.g. 32M/64M) can't be mapped because of activated CONFIG_STRICT_DEVMEM kernel option. Change-Id: Iaecfb6d30a5152c8c4b5d2804efacac85fc615f9 Signed-off-by: Martin Schiller <ms@dev.tdt.de> Reviewed-on: https://review.coreboot.org/22685 Reviewed-by: David Hendricks <david.hendricks@gmail.com> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* flashchips: Mark W25Q128.W as testedDavid Hendricks2017-12-101-1/+1
| | | | | | | | | | Tested read, erase, and write using W25Q128FWSIG and Dediprog SF600. Change-Id: Id0ef331ad3b3a8ab05a9472f3053f76c0789b1f9 Signed-off-by: David Hendricks <dhendricks@fb.com> Reviewed-on: https://review.coreboot.org/22790 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* flashchips: Add MX25L6473FNico Huber2017-12-091-1/+1
| | | | | | | | | | Just another chip sharing the same ID. Tested by somebody on IRC. Change-Id: Ibea956e48e10fda91930b65b3bf3b3ae4ad13f63 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22759 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
* internal: Fix warnings about unused constantsNico Huber2017-12-091-0/+4
| | | | | | | | | | | | By adding more #if guards, fix warnings about unused constants that are enabled by default in newer GCC versions. Change-Id: Ib3b6d7c0c2fadc4faeab971673bfadb1a6d25919 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22669 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
* README: Update packaging section for Git repositoriesNico Huber2017-12-011-8/+10
| | | | | | | | Change-Id: I8d9c56be8c1381b175ce7695c53f31b1767d9d17 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22454 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* chipset_enable: Mark SiS 630 as tested OKNico Huber2017-11-211-1/+1
| | | | | | | | | | | | | Tested on an Elitegroup P6STMT with an SST39SF020A parallel flash [1]. [1] https://mail.coreboot.org/pipermail/flashrom/2017-November/015193.html Change-Id: If8cc2af262e392bfba326a62c1a48c658c7d6ce8 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22522 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
* linux_spi: Dynamically detect max buffer sizeKeno Fischer2017-11-161-7/+45
| | | | | | | | | | | Read max buffer size from sysfs if available. Change-Id: Ic541e548ced8488f074d388f1c92174cad123064 Signed-off-by: Keno Fischer <keno@juliacomputing.com> Signed-off-by: David Hendricks <dhendricks@fb.com> Reviewed-on: https://review.coreboot.org/22441 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
* ichspi: Disable software sequencing by default for SkylakeNico Huber2017-11-051-0/+5
| | | | | | | | | | | | | | | Skylake is a mess, especially with coreboot. We have now a present and configured software sequencing interface with SCGO supposedly being readonly (Apollo Lake has that feature and a strap documented, Skylake behaviour might be the same). As we can't easily check if it's read- only, just enable hardware sequencing by default (even if the software sequencing interface seems usable). Change-Id: I8a13fb9c3ca679b3f7d39ad1dc56d5efdc80045b Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/22274 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
* spi25_statusreg: Return defined value on failed RDSRNico Huber2017-11-051-1/+4
| | | | | | | | | | | The interface of spi_read_status_register() is broken and can't return errors. Let's not return random stack data at least. Change-Id: I714b20001a5443bba665c2e0061ca14069777581 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22017 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
* ichspi: Fix software sequencing for SkylakeNico Huber2017-11-031-2/+2
| | | | | | | | | | | Two occurences of ICH9_REG_OPMENU were overlooked and not replaced, rendering the software sequencing unusable on Skylake. Change-Id: I16eebcf37ab8ba39b02f33135535552e380b0b92 Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/22273 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
* Fix standalone ich_descriptor_tool compilation with MinGW and DJGPPStefan Tauner2017-11-032-1/+14
| | | | | | | | | | | | | | | | TARGET_OS as well as EXEC_SUFFIX were only set when called via the main makefile and even then __USE_MINGW_ANSI_STDIO was not set for MinGW. While at it, also replace the hardcoded gnu_printf printf format attribute with __MINGW_PRINTF_FORMAT which is set according to __USE_MINGW_ANSI_STDIO respectively. Change-Id: Id146f5ba06a0e510397c6f32a2bd7c819a405a25 Signed-off-by: Stefan Tauner <stefan.tauner@gmx.at> Reviewed-on: https://review.coreboot.org/21838 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
* Use bzip2 when making a tarballDavid Hendricks2017-10-211-2/+2
| | | | | | | | | | | Tarballs on download.flashrom.org are generally packaged using bzip2, so we may as well be internally consistent. Change-Id: Ib9fb1ea6d5994cd0285ce8db9675640fae992773 Signed-off-by: David Hendricks <dhendricks@fb.com> Reviewed-on: https://review.coreboot.org/22116 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* fixup! nicintel_eeprom: Support for I210 emulated EEpromNico Huber2017-10-201-2/+7
| | | | | | | | | | Fix is_i210(), add a comment and break an overlong line. Change-Id: I5d3f71e4e0f77cc8793e7f395baf69e1fad930a3 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/21934 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
* Fix serprog on FreeBSDMichael Zhilin2017-10-191-1/+1
| | | | | | | | | | | | | | | | | | | | Using serprog on FreeBSD to read an SPI flash (MX25L6406) via an Arduino Nano V3 with flashrom hangs after 5 seconds while reading. The problem is that kernel method "ttydisc_rint" ignores some bytes. It happens due to enabled IEXTEN local flag of termios. TTY cuts a few bytes, Arduino reads 11264 bytes, but flashrom gets only 11244 bytes and waits for the remaining 20 bytes. The fix is simple: turn off the IEXTEN local flag. Tested on Arduino Nano V3 + FreeBSD 12-CURRENT. Change-Id: I7aa6a283d523c544d9b8923cd4c622bf08c0fb3f Signed-off-by: Michael Zhilin <mizhka@gmail.com> Reviewed-on: https://review.coreboot.org/21919 Reviewed-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Urja Rannikko <urjaman@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* serial: Support custom baud rates on linuxUrja Rannikko2017-10-194-11/+136
| | | | | | | | | | | The function to do this is contained in custom_baud.c because of broken include stuff. Change-Id: I2a20f9182cb85e7bce5d6654a2caf20e6202b195 Signed-off-by: Urja Rannikko <urjaman@gmail.com> Reviewed-on: https://review.coreboot.org/20224 Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* Move get_layout() from flashrom.c to layout.cdhendrix2017-10-173-8/+10
| | | | | | | | | Change-Id: Ic67cf53abddc0aa905674acbcde717d9aed2f66e Signed-off-by: David Hendricks <david.hendricks@gmail.com> Reviewed-on: https://review.coreboot.org/21367 Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>