1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 15:12:36 +02:00

3899 Commits

Author SHA1 Message Date
Anastasia Klimchuk
9a570318bb docs: Add guideline about Gerrit display names
If none of "Full name" or "Display name" is set for a Gerrit account,
code reviews emails are sent from "Name of user not set" instead of
a user name. It is worth clarifying explicitly in the docs.

Change-Id: I69b6f5c1c56a2798dd156582cb5fa246b2396ab3
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/79250
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-by: Stanislav Ponomarev <me@stasponomarev.com>
2023-11-30 01:44:35 +00:00
Fabrice Fontaine
fb456a6306 Makefile: CONFIG_INTERNAL depends on raw mem access
CONFIG_INTERNAL depends on raw mem access resulting in the following
build failure on sh4 since version 1.3.0:

/home/thomas/autobuild/instance-3/output-1/per-package/flashrom/host/bin/../lib/gcc/sh4a-buildroot-linux-gnu/12.3.0/../../../../sh4a-buildroot-linux-gnu/bin/ld: libflashrom.a(internal.o): in function `internal_chip_readn':
internal.c:(.text+0x8): undefined reference to `mmio_readn'

Fixes the build raised by buildroot autobuilders with the following
options:
- CONFIG_FT2232_SPI=no
- CONFIG_USBBLASTER_SPI=no
- CONFIG_ENABLE_LIBUSB1_PROGRAMMERS=yes
- CONFIG_ENABLE_LIBPCI_PROGRAMMERS=yes

Here is the target information:
C compiler found: sh4a-buildroot-linux-gnu-gcc.br_real (Buildroot 2022.08-rc1-5515-gf1a47904b63) 12.3.0
Target arch: sh
Target OS: Linux
Target endian: little

Full build log:
- http://autobuild.buildroot.org/results/f74a9d315fb519f284428234713f43fcf4e35fd0

Change-Id: I7610f5f7cc5b114ffa90d5752155acc8b6b7c9f7
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/78930
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Alexander Goncharov <chat@joursoir.net>
2023-11-30 01:27:05 +00:00
Anton Samsonov
8efe4fb708 Remove dependency on C23 __has_include()
Use build system to check header presence:
* getopt.h (from include/cli_classic.h)
* pciutils/pci.h (from include/platform/pci.h)

Tested with <getopt.h> and <pci/pci.h> using GNU Make 4.1, 4.2.1, 4.4.1
and Meson 0.56.0, 1.2.1 against GCC 13.2.1 and GCC 5.5-, 7.3-compatible
(EDG 4.14-, 5.1-based) on openSuSE Tumbleweed and a custom LFS distro.

Change-Id: Ic544963ffd29626ae0a21bdddb1c78850cc43ec6
Signed-off-by: Anton Samsonov <devel@zxlab.ru>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/77089
Reviewed-by: Alexander Goncharov <chat@joursoir.net>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-28 23:26:01 +00:00
Stanislav Ponomarev
bda8361453 serial: Fix sp_flush_incoming for serprog TCP connections
During the development of an esp32 serprog-compatible SPI programmer,
and implementation of the TCP over Wi-Fi for serprog,
I discovered that sp_flush_incoming() silently fails
if the underlying sp_fd descriptor is a TCP socket.

This patch adds a check for this case - tcflush returns ENOTTY,
meaning tcflush is not supported for not terminal objects,
in this case a fallback serialport_read_nonblock loop is used.

TESTED=esp32-serprog, TCP-over-WiFi mode, ~90% connection attempts fail to synchronize without patch; no synchronization issues with patch applied.

Signed-off-by: Stanislav Ponomarev <me@stasponomarev.com>

Change-Id: I9724a2fcd4a41dede2c15f83877efa6c3b0b7fae
Reviewed-on: https://review.coreboot.org/c/flashrom/+/79112
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-27 09:09:35 +00:00
Hsuan Ting Chen
abd9a1e9e8 flashchips: Split GD25Q127C/GD25Q128C and add GD25Q128E
Q127C and Q128C are not the same. Q127C doesn't support QPI but Q128C
does. So we need to split the existing GD25Q127C/GD25Q128C into two
separated entries. We also introduce the new flashchip Q128E and merge
it into Q127C.

Datasheets:
Q128E: https://www.gigadevice.com.cn/Public/Uploads/uploadfile/files/20220714/DS-00480-GD25Q128E-Rev1.2.pdf
Q127C: https://www.gigadevice.com.cn/Public/Uploads/uploadfile/files/20220714/DS-00220-GD25Q127C-Rev2.3.pdf
Q128C: https://www.endrich.com/sixcms/media.php/2/GD25Q128C-Rev2.pdf

Q128E and Q127C/Q128C have compatible main functions, their differences
are:
* Q128E uses 55 nm process, while Q127C/Q128C use 65nm
* Q128E/Q127C does not support QPI
* Q128E/Q127C have OTP: 3072B, while Q128C are 1536B
* Q128E's fast read clock frequency is 133MHz, while Q127C/Q128C are
  104MHZ

So we decided to merge Q128E into Q127C.

We also tested that Q128E could pass flashrom_tester while probing it as
127C/128C, so the main functionalities are compatible.

Change the chip name from GD25Q127C/GD25Q128C to two entries
GD25Q127C/GD25Q128E and GD25Q128C to make it more accurate.

Chip revision history:
- The 'GD25Q127C/GD25Q128C' definition was added in
  `commit e0c7abf219b81ad049d09a4671ebc9196153d308` as 'GD25Q128C' and
  later renamed to 'GD25Q127C/GD25Q128C'

BUG=b:304863141, b:293545382
BRANCH=none
TEST=flashrom_tester with flashrom binary could pass with Q128E,
     which contains probe, read, write, erase, and write protect

Signed-off-by: Hsuan Ting Chen <roccochen@google.com>
Change-Id: I3300671b1cf74b3ea0469b9c5a833489ab4914f5
Reviewed-on: https://review.coreboot.org/c/flashrom/+/78348
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2023-11-19 23:23:46 +00:00
Alexander Goncharov
41cb46672e flashchips: change print lock status funcs for Winbond chips
Decode status register bits for user friendly output.

Signed-off-by: Alexander Goncharov <chat@joursoir.net>
Change-Id: I5066863b514825aee0dffe496492514ac99b6e49
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75877
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2023-11-18 20:52:33 +00:00
Alexander Goncharov
8a7f8ade46 spi25_statusreg: rename amic_a25l032 print to a generic name
Other chips (at least Winbond) will benefit from this change.

Also, drop the FIXME comment, as it can be misleading. The
"pretty print" functions should only display values from the
Status Register, so using an inappropriate function might only
confuse user.

Signed-off-by: Alexander Goncharov <chat@joursoir.net>
Change-Id: I7169a2312698343e1065cdca91a3985e00cb3804
Reviewed-on: https://review.coreboot.org/c/flashrom/+/78874
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
2023-11-18 20:52:05 +00:00
Anastasia Klimchuk
ffa2159923 tests: Unit tests for erase function selection algo
The test checks that algorithm for erase functions selection
works and there are no regressions.

Specifically, test contains an array of test cases. Each case
initialises a given initial state of the memory for the mock chip,
and layout regions on the chip, and then performs erase and write
operations.
At the end of operation, test asserts the following:
- the state of mock chip memory is as expected, i.e. properly erased
  or written
- erase blocks are invoked in expected order and expected number
  of them
- chip operation (erase or write) returned 0.

Change-Id: I8f3fdefb76e71f6f8dc295d9dead5f38642aace7
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67535
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
2023-11-12 22:18:46 +00:00
Anastasia Klimchuk
9c130dbfcc erasure_layout: Add region boundaries to printed info message
Change-Id: I511a79754cff15e7dba26f5313d7015830780f60
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/78492
Reviewed-by: Alexander Goncharov <chat@joursoir.net>
Reviewed-by: Aarya <aarya.chaumal@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-12 22:18:04 +00:00
Anastasia Klimchuk
fa8808595a erasure_layout: Fix double invocation of erasers
Erasefn was invoked over the same block of memory twice.
This patch removes the second redundant invokation. It was
accidentally introduced during earlier refactoring of the code.

Change-Id: I92351eba0fd29114ce98b4a839358e92d176af28
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/77747
Reviewed-by: Alexander Goncharov <chat@joursoir.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
2023-11-12 22:17:28 +00:00
WereCatf
52b794ff26 flashchips: Add Puya P25Q21H/11H/06H
Datasheet:
https://semic-boutique.com/wp-content/uploads/2016/05/P25Q21H-SSH-IT.pdf

Tested P25Q21H read, write and probe with CH341a.

Signed-off-by: Nita Vesa <werecatf@outlook.com>
Change-Id: Idd43145c72607837cb7afa1b007e68eb8e63ebd9
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/58134
Reviewed-by: Alexander Goncharov <chat@joursoir.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-05 23:56:33 +00:00
Jes B. Klinke
ea91d4fcf4 raiden: Support target index with generic REQ_ENABLE
Some devices such as the GSC knows how it is wired to AP and EC flash
chips, and can be told which specific device to talk to.  Other devices
such as Servo Micro and HyperDebug are generic, and do not know how they
are wired, the caller is responsible for first configure the appropriate
MUXes or buffers, and then tell the debugger which port to use (Servo
Micro has just one SPI port, HyperDebug is the first that has multiple).
The Raiden protocol allows both the cases of USB devices knowing their
wiring and not.

If I were to declare the protocol in Rust, this is how the information
of the Raiden protocol "enable request" would be encoded:
```
enum {
  EnableGeneric(u8),
  EnableAp,
  EnableEc,
  ...
}
```

The first label `EnableGeneric(u8)` is to be used with HyperDebug that
does not know how its ports are wired, and allow access by index.
The other labels `EnableAp` and `EnableEc` are to be used with the GSC.

The actual transmission of the enum above uses the bRequest and low byte
of wValue of a USB control request, but that is a detail and not
conceptually important.

Until now, `-p raiden_debug_spi:target=AP` or `...:target=EC` could be
used to make flashrom use `EnableAp` or `EnableEc`, and if neither was
given, it would default to `EnableGeneric`, which now that wValue is
used means `EnableGeneric(0)`.

I find it rather straight-forward, that `-p raiden_debug_spi:target=1`,
`...:target=2`, etc. should translate to `EnableGeneric(1)`, etc.

This patchset achieves this, by adding a second 16-bit parameter value,
next to request_enable.

I have tested that flashrom can detect the same Winbond flash chip
"W25Q128.V..M" with two different Raiden USB devices as below.

TEST=flashrom -p raiden_debug_spi:serial=0701B044-91AC3132,target=AP
TEST=flashrom -p raiden_debug_spi:serial=205635783236,target=1

Signed-off-by: Jes B. Klinke <jbk@chromium.org>
Change-Id: I03bf4f3210186fb5937b42e298761907b03e08b7
Reviewed-on: https://review.coreboot.org/c/flashrom/+/77999
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2023-11-03 05:59:53 +00:00
Anastasia Klimchuk
86110b4077 doc: Add meson test command to TLDR for meson instructions
Running tests is one of the regular things to do in dev process,
same as compile, so it should be highlighted in the TLDR section
of the document.

The patch adds test command to TLDR version in README file, and
in dedicated meson instructions doc.

Change-Id: I67d5f4decdac15e6a72f4372135dab7d44396594
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/78689
Reviewed-by: Jes Klinke <jbk@chromium.org>
Reviewed-by: Alexander Goncharov <chat@joursoir.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
2023-11-02 06:56:29 +00:00
Patrick Rudolph
1dd7c88f41 ichspi: Add support for C740 PCH
Clean commit 51e1d0e4b7670e5822560acc724a6a8dd00b6af4
'Add support for Intel Emmitsburg PCH' which broke
CHIPSET_5_SERIES_IBEX_PEAK detection and which assumes C740 is the same
as C620, while its more a close relative to Intel's H570 PCH.

Based on Intel SPI Programming Guide #619386.

Test: Run on Intel ArcherCity CRB with Intel's C741 PCH
      using the 'internal' programmer.
Test: Run on BMC and accessed the SPI flash chip over
      'linux_mtd' programmer.
Change-Id: I80eebc0fcc14de9df823aceaee77870ad136f94a
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/78186
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-25 10:03:31 +00:00
Patrick Rudolph
95424a2b97 ich_descriptors: Fix table printing
The code uses "%-4s" to print the master names and thus assumes that
all names have 4 characters or less. Convert "unknown" to "DevE",
short for Device Expansion in order to properly display the table.

Test: Run flashrom -p internal -VV

Change-Id: I0d10e2771c7a27c1a73ed53a33e68a04eb9e1e00
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/78301
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-25 10:02:40 +00:00
Patrick Rudolph
0b8dcba50c ich_descriptors: Fix debug print
Allow nm, the number of flash masters, to be equal to
ARRAY_SIZE(master_names). The previous logic was probably overlooked
when ich_number_of_masters() was introduced. The loop below makes sure
that it doesn't access the master_names array out of bounds.

Change-Id: Ib9276a6c29952487db6e60fb583942c0f24cd6ef
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/78300
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2023-10-25 10:01:29 +00:00
Anastasia Klimchuk
fba29da188 flashchips: Mark FM25F01 as tested for read/write/probe/erase
As reported on the mailing list:
https://mail.coreboot.org/hyperkitty/list/flashrom@flashrom.org/thread/JSCQPE3XN3WV6SN4SQH3YNGK2TUKGIZF/

Change-Id: Ibb65a4cb3345eb67c049aa4d8bfd3260f4bf96db
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/78397
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-20 06:34:44 +00:00
Anastasia Klimchuk
b17fff0488 doc: Add first version of code of conduct
As a starting point, copying coreboot's one in the absence
of our own.
coreboot's CoC exists for some time and is known to work, so
it's a good starting point. We can iterate on this and make
upgrades and amendments that make sense for flashrom community.
Meanwhile we can share code of conduct with coreboot. We
do have the same servers and infrastructure anyway.

Change-Id: Icd82ba79687da3a2698d84f5cbfe824fbab0c426
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/78203
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2023-10-17 01:00:33 +00:00
rogeryou
47d3dcd4c9 flashchips: Add write-protect support for MXIC MX25U25643G
The MX25U25643G has a WPSEL bit in the security register, but the MX25U25635F does not.
Therefore, take them apart.

We have tested --wp-enable, --wp-disable, --wp-list and --wp-range
commands for write-protect feature.

The MX25U25643G has been tested by ch341a programmer : read, write,
erase and wp.

MX25U25643G datasheet is available at the following URL:
https://www.mxic.com.tw/en-us/products/NOR-Flash/Serial-NOR-Flash/Pages/spec.aspx?p=MX25U25643G&m=Serial%20NOR%20Flash&n=PM2832

MX25U25635F datasheet is available at the following URL:
https://www.macronix.com/en-us/products/NOR-Flash/Serial-NOR-Flash/Pages/spec.aspx?p=MX25U25635F&m=Serial%20NOR%20Flash&n=PM1712

Change-Id: I43de9ed123b9736c04d070754bcf9c32be5697ad
Signed-off-by: rogeryou <rogeryou@mxic.com.cn>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/78142
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-13 00:56:49 +00:00
Stefan Reinauer
49832e3c73 doc: Make Time of Meeting more consistent
Change-Id: I8b37d2913750946c71908e94fcd3041766f1b59d
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/78188
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-07 05:41:12 +00:00
Anastasia Klimchuk
6f14eadfac flashchips: Mark Atmel AT29C010A chip as tested for write operation
As reported on the mailing list in
https://mail.coreboot.org/hyperkitty/list/flashrom@flashrom.org/thread/4BU4LPRIBXCPOFI6MUG2CHOU5YBLUNN7/

Change-Id: I267ed5583e8a9bad0b34b12d73ab2928d65144eb
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/78069
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2023-10-07 04:42:11 +00:00
Anastasia Klimchuk
48afad297a doc: Convert release notes for v1.3
Change-Id: I5b66a957249c3025715eff2b00f1be9eb0d36096
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/78116
Reviewed-by: Alexander Goncharov <chat@joursoir.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-04 05:32:03 +00:00
Anastasia Klimchuk
230a1d56f1 doc: Convert write-protect docs to sphinx
Updated the information that WP is included in the v1.3 release,
and added links to dev guidelines on how to build from head
(instead of inlining the instructions).

Change-Id: I223f1aa5f4531b28b04bcfcecd9becfa7899c3d9
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/78113
Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-01 11:17:18 +00:00
Anastasia Klimchuk
f2a208c228 doc: Fix formatting for the example of commit message
Example of commit message was formatted with code-block directive
which has language argument required or optional depending on the
sphinx version. Replace code-block with simpler literal block
which never has arguments, and also since the text formatted is
not actually a code.

Change-Id: If0bc8327e973d9bc9a93eea38c83bfab412fb8f4
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/78120
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-by: Alexander Goncharov <chat@joursoir.net>
2023-10-01 07:03:55 +00:00
Vasily Galkin
5234c57e33 flashchips: add WP features for W25X* analogous to tested W25X20
These chips were not tested physically, just added since they are very similar to
just added and tested W25X20.
However basic logic test were done via running
--wp-list with dummy emulating those IDs

While there are per-chip datasheets like
https://www.winbond.com/resource-files/W25X05CL_G%2008012019.pdf

the combined datasheets that shows differences between WP modes
of different chips are more useful:
https://www.winbond.com/resource-files/w25x10a-20a-40a-80a%20revf%20080709.pdf
https://media.digikey.com/pdf/data%20sheets/winbond%20pdfs/w25x16,16a,32,64.pdf

Signed-off-by: Vasily Galkin <galkin-vv@ya.ru>
Change-Id: Ie69660a6f69e3cac31c5565792f401e69d43f8b8
Reviewed-on: https://review.coreboot.org/c/flashrom/+/77531
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
2023-09-30 00:20:58 +00:00
Stefan Reinauer
0fba888398 tree: Rename master branch to main
Change-Id: I8f4a377735f3f6ab4a22006949ff294a218bdf22
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75706
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2023-09-24 23:15:41 +00:00
Sungbo Eo
9ccbf1cf43 flashchips: Add support for XMC XM25QH80B
XM25QH80B has the same ID as M45PE80, but has more features.
Tested with CH341A.

Change-Id: Ib51225426d8d1a381d45af3574e5ba2bf02837aa
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/63516
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-09-22 05:32:40 +00:00
Anton Samsonov
879fa069fd meson.build: Upgrade minimum Meson version to 0.56.0
Since doc/meson.build uses `str.substring()` introduced in Meson 0.56.0,
the root meson.build should be updated from 0.53.0.

Change-Id: I53c6c42c27a58734742e3dce3cdbde4c65b89a90
Signed-off-by: Anton Samsonov <devel@zxlab.ru>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/77779
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2023-09-21 00:42:29 +00:00
xianzheng
ebda447ad9 flashchips: Add support for MXIC MX25U25643G
It is similar to the MX25U25635F and shares its RDID.

Tested by ch341a programmer : read, write and erase.

Datasheet is available at the following URL:
https://www.mxic.com.tw/en-us/products/NOR-Flash/Serial-NOR-Flash/Pages/spec.aspx?p=MX25U25643G&m=Serial%20NOR%20Flash&n=PM2832

Change-Id: Ie04a5e2325aab94bffb276675be3fa4a88c6e134
Signed-off-by: xianzheng <xianzheng@mxic.com.cn>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/76853
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-09-17 09:06:17 +00:00
Neil Armstrong
aa468cf0bd flashchips: add definition of the XT25F02E SPI NOR flash
This adds definition of the XT25F02E 2MBit SPI NOR Flash
from XTX Technology Limited.

Tested (Probe, Erase, Write, Read) with a VL805 USB3.0 bridge.

Datasheet:
https://datasheet.lcsc.com/lcsc/2006091008_XTX-XT25F02EDTIGT_C596313.pdf

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Change-Id: I295633c448c05520e4a6aa09c08bd7c9f2346d54
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/50263
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-09-16 08:41:46 +00:00
Vasily Galkin
7617467544 flashchips: Add WP features for Winbond W25X20
WP-related registers list from official datasheet
https://www.winbond.com/resource-files/w25x20cl_revf%2020150806.pdf

Commandline options tested with ft2232_spi-based "Tigard" programmer:
wp-disable wp-enable wp-list wp-status wp-range=0,0 wp-range=0,0x00040000

Signed-off-by: Vasily Galkin <galkin-vv@ya.ru>
Change-Id: I82c0cc52ca2a78d27f513234cc12d3e09d8905a5
Reviewed-on: https://review.coreboot.org/c/flashrom/+/77530
Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-09-03 08:30:21 +00:00
Vasily Galkin
f7ffe5ff6b spi25_statusreg: add verbose output on status registers read results
Useful during enabling/debugging WP operations on various SPI chips

Signed-off-by: Vasily Galkin <galkin-vv@ya.ru>
Change-Id: Ibc8e9229ab5d6578479564d11cc7aff9442e24ad
Reviewed-on: https://review.coreboot.org/c/flashrom/+/77529
Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-09-03 08:28:05 +00:00
Nikolai Artemiev
d59287d982 flashrom: only perform WP unlock for write/erase operations
Don't unlock using WP for read/verify operations because WP will only
disable write locks. Most chips don't have read locks anyway, but some
do, so we still call the chip's unlock function for read/verify
operations.

Unconditionally unlocking using WP slows down flashrom significantly
with some programmers, particularly linux_mtd due to inefficiency in the
current kernel MTD interface.

BUG=b:283779258
BRANCH=none
TEST=`ninja test`
TEST=`flashrom -{r,w,E,v}` on strongbad
TEST=`flashrom --wp-enable; flashrom -{w,E}` on strongbad

Change-Id: I5dc66474a0b7969b51b86ac9f5daa2c95ae968f1
Signed-off-by: Nikolai Artemiev <nartemiev@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75991
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
2023-08-31 02:57:34 +00:00
Anastasia Klimchuk
910ef0cad6 doc: Fix nesting of About flashrom group of menu items
Adding the title to About flashrom index page allows the engine
to recognise it as a group with a list of menu items inside, which
is as expected.
Without the title on the index page, all menu items inside About
flashrom are inlined into the menu.

Change-Id: I595acc282a536a6d5fa26cf2f8d18dbe549f9716
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/77293
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Alexander Goncharov <chat@joursoir.net>
2023-08-30 21:08:41 +00:00
Vasily Galkin
86907148c6 flashchips.c: Add support for IS25WQ040
Based on https://github.com/flashrom/flashrom/pull/204
squashed with fixes of IS25WQ040 size: it is 4Mbits, not 4MBytes, see
https://www.issi.com/WW/pdf/25WQ020-040.pdf

Tested read, write and erase with ft2232_spi-based "Tigard" programmer.

Change-Id: I072c6b94d7931637d1c2721c3316205f2d57320e
Signed-off-by: Roman Stingler <roman.stingler@gmail.com>
Signed-off-by: Vasily Galkin <galkin-vv@ya.ru>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/58179
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-30 08:53:40 +00:00
Bart De Schuymer
beaf9cd90b Makefile: Remove a bashism when searching for sphinx-build
e.g. when the shell is dash and sphinx-build is not installed, HAS_SPHINXBUILD would be wrongly set to yes.

Change-Id: I4d89e24ec3401446acec857eae134928bc3064d2
Signed-off-by: Bart De Schuymer <bdschuym@artinalgorithms.be>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/77288
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-by: Jan Samek <jan.samek@siemens.com>
2023-08-29 00:34:49 +00:00
Anastasia Klimchuk
d534100c05 doc: Add favicon to config to display in the browser tab
Initial set of logo images had no ico file, so this patch
adds ico files, which are just conversion from png to ico.

Change-Id: I7238890833d84b3799e873c8a37b4176822ff9a4
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/77285
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
2023-08-25 07:55:23 +00:00
Anastasia Klimchuk
e1b89fd33f doc: Add flashrom logo to index page
Change-Id: I44a35b16a29b850e2b49d6e75c52d80b17bf7f75
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/77250
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
2023-08-25 07:54:25 +00:00
Anastasia Klimchuk
cfffbded55 doc: Copy logo files into flashrom repository
This is needed to include logo image on the docs root index page.

Change-Id: I38c1d820be92f2688c5fc4c63a150ab324d8b647
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/77249
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-25 07:53:38 +00:00
Anastasia Klimchuk
cfc23898ad doc: Add Emergency help red box to the intro
Change-Id: Id7570b7f0773ec0e43662272e642bc807c8210c2
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/77292
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
2023-08-24 12:35:29 +00:00
Martin Roth
bf70daa429 MAINTAINERS: Add Martin Roth for AMD SPI
Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I27a07be1549ef070ad72b8e657d72170c7e85620
Reviewed-on: https://review.coreboot.org/c/flashrom/+/74954
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2023-08-24 04:30:16 +00:00
Stefan Reinauer
4afab4de49 MAINTAINERS: Add Stefan Reinauer to flashchips
Change-Id: Ib1f79d06cebf0f091382c857da0be2f5d7a73581
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/77273
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-24 04:22:07 +00:00
Joseph C. Lehner
2bfc85b2a6 flashchips: add Macronix MX25L3255E
Tested using the linux_spi programmer on a Raspberry Pi.

Datasheet:
https://media.digikey.com/pdf/Data%20Sheets/Macronix/MX25L3255E.pdf

Signed-off-by: Joseph C. Lehner <joseph.c.lehner@gmail.com>
Change-Id: I65968771e22e6b823d2d6192c33f5b0cba25d5b9
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/57410
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-23 09:43:05 +00:00
Nikolai Artemiev
c17be0b3fa MAINTAINERS: Add Nikolai Artemiev for flashchips
Change-Id: Iba4ae742f6500ef26edfc976d842ede656b916d4
Signed-off-by: Nikolai Artemiev <nartemiev@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/77205
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-20 23:03:16 +00:00
Angel Pons
8a3db802ea flashchips: Add ISSI IS25LQ016
Datasheet: http://www.issi.com/WW/pdf/25LQ016.pdf
Tested all four PREW functions with a FT2232H.

Change-Id: I02f19767b8a60fb2d37adab34894b6edb6ac4494
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/40431
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
2023-08-15 06:11:21 +00:00
Anastasia Klimchuk
d666a8189b doc: Fix broken link to old mailing list archives on pipermail
Change-Id: I3e88d5a86dabd453f2de9bbacf6054534bc3901a
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/76961
Reviewed-by: Patrick Georgi <patrick@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-08 10:09:34 +00:00
Anastasia Klimchuk
207dffd794 doc: Add link to flashrom patches to dev guide
People might be interested in what's currently ongoing in
development, and even more practically, have a look at examples
before creating their own patch. In fact, the latter is a good
idea to do. Giving the link in the intro of dev guide will
encourage that.

Viewing the patches does not require an account, so can be done
at the very beginning.

Change-Id: Iecd31a5e9a3683480b33fb9ba331545a0cf669b4
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/76771
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
2023-08-07 00:58:07 +00:00
Anastasia Klimchuk
c7f6f02316 MAINTAINERS: Fix the link to dev guides and simplify the paragraph
We can just say "follow the dev guide" here, the rest of information
should be in the dev guide.

Change-Id: Idf4df7426e5cf080416ba6691c7f11260c2b4623
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/76828
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2023-08-06 07:56:34 +00:00
Anastasia Klimchuk
9463535443 doc: Add link to old wiki in the side menu
While the process of migrating pages is ongoing, wiki can be useful
and is available in view-only mode.

Change-Id: I093dcb1d4ce2b3feeff61115e037cfa8075a8a52
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/76772
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2023-08-03 23:06:09 +00:00
Anastasia Klimchuk
8ce4f98fc7 website/gh workflow: Resolve 404 links
Fix broken links to dev guide and contact page

Change-Id: Ide4a675049ff245e46001da1c7ef5769baf5a14e
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/76821
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
2023-08-03 23:04:56 +00:00