1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 23:22:37 +02:00

3855 Commits

Author SHA1 Message Date
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
Anastasia Klimchuk
4210f6ac59 doc: Fix Contact link in README
The link should be to another doc, that will work with any website
configuration. Old link only worked for wiki.

Change-Id: I6e2ec4f73494bebd5bd47bbeaa2051439d1d3bbd
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/76675
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
2023-07-28 00:41:26 +00:00
Anastasia Klimchuk
cc145f0a21 doc: Fix the example Signed-off-by line to be displayed properly
It was not displayed, so needed to be fixed. Secondly, it is just
one line and can be an inline code markup instead of a code-block
(the latter was not displayed for some reasons).

Change-Id: I0f26d6fb03d1491daefa4a362068f674230e94a6
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/76663
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-27 02:18:52 +00:00
Anastasia Klimchuk
9917fa0623 flash: Update the comment for flashchip eraseblocks
Change-Id: Ica7790667ac4c1baf961cb7a330e08178e2c0c28
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75744
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aarya <aarya.chaumal@gmail.com>
2023-07-27 02:18:18 +00:00
Anastasia Klimchuk
2b692d78c2 doc: Add new Development guidelines
Change-Id: I7fe9ab2e27fead8e795138294219b11240f15928
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75906
Reviewed-by: Alexander Goncharov <chat@joursoir.net>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-20 09:23:25 +00:00
Anastasia Klimchuk
f17c5069e3 doc: Add Team page which describes Gerrit groups
Change-Id: I3118b2b036eab93e901814447543b02c760c6a80
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/76075
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-by: Alexander Goncharov <chat@joursoir.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2023-07-19 13:06:22 +00:00
Alexander Goncharov
e0fe2c7ca1 ni845x_spi: refactor singleton states into reentrant pattern
Move global singleton states into a struct and store within
the spi_master data field for the life-time of the driver.

TOPIC=register_master_api

Change-Id: I45fcb8e20582cb0c532c4a9f0c78543a25f8d484
Signed-off-by: Alexander Goncharov <chat@joursoir.net>
Ticket: https://ticket.coreboot.org/issues/391
Reviewed-on: https://review.coreboot.org/c/flashrom/+/72160
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-19 02:23:21 +00:00
Alexander Goncharov
0f0f952740 ni845x_spi: handle errors using goto during initialization
This patch prepares the programmer to move global singleton states
into a struct.

TOPIC=register_master_api

Change-Id: Ie9620d59db229729fd8523f99b0917d938bcc4ed
Signed-off-by: Alexander Goncharov <chat@joursoir.net>
Ticket: https://ticket.coreboot.org/issues/391
Reviewed-on: https://review.coreboot.org/c/flashrom/+/72156
Reviewed-by: Miklós Márton <martonmiklosqdev@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2023-07-19 02:22:44 +00:00
Alexander Goncharov
51335a8eb9 ni845x_spi: pass global state through func params
Instead of relying on global variables, pass and use their value or
pointer to functions where possible.

The usage of `io_voltage_in_mV` global var in `usb8452_spi_set_io_voltage`
function is replaced with existing function argument `set_io_voltage_mV`
since `set_io_voltage_mV` already contains the pointer to global var.

This patch prepares the programmer to move global singleton states into
a struct.

TOPIC=register_master_api

Change-Id: I5daeb0839a4cc18b82d38cc06eeba88a619bec61
Signed-off-by: Alexander Goncharov <chat@joursoir.net>
Ticket: https://ticket.coreboot.org/issues/391
Reviewed-on: https://review.coreboot.org/c/flashrom/+/72154
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-19 02:21:52 +00:00
Brian Norris
e08899fcf4 libflashrom: Add layout "exclude" API
Layouts can be expensive to derive (reading from flash), so we might
want to reuse a layout for different purposes. Today, it's not possible
to undo a flashrom_layout_include_region() operation (to, say, operate
on a different region). Add such an API.

Change-Id: I7ea3e0674f25e34bf2cfc8f464ae7ca1c1a3fbfd
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/76005
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
2023-07-18 01:17:04 +00:00
WereCatf
91aa2d8526 flashchips: Add XTX XT25F64B
Datasheet:
http://file2.dzsc.com/product/19/06/22/216185_132959081.pdf
Tested probe, read, erase and write with CH341a.

Signed-off-by: Nita Vesa <werecatf@outlook.com>
Change-Id: I369db9ccfd5319d28424d10f77aab49ec73a8836
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/58173
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
2023-07-17 01:12:53 +00:00
Anastasia Klimchuk
ea54723cf8 doc: Add documentation license
Change-Id: Ied858b5f1e9c4a83a6eb21dcefb288c4474b08c0
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75727
Reviewed-by: Patrick Georgi <patrick@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-13 10:37:04 +00:00
Peter Marheine
819f6d7867 meson: improve error message for unsupported systems
This adds the current and supported system information to the error
message when an unsupported programmer is requested, making it easier
to tell what the incompatibility is.

TEST=(in mingw-ucrt64) meson setup -Dprogrammer=ni845x_spi build,
     error message says the programmer needs `['windows']/['x86']` but
     the system is `windows/x86_64`.

Change-Id: I6c8a8b47505f7a239160d565463ce7262fe5d5d6
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75490
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2023-07-13 09:41:44 +00:00
Thomas Heijligen
c3f1c7507a doc: Add build instructions for NI-845x on Windows
Because this patch adds a new footprint level, Sphinx incorrectly
interprets the 3 asterisks (***) as the start of a bold block,
rather than a footnote marker. To work around this, use sphinx
built-in footprints.

Change-Id: I97ad08632f35aa241b3d19d9ce7711146e3f1f4a
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Signed-off-by: Alexander Goncharov <chat@joursoir.net>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75270
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-13 09:32:12 +00:00
Thomas Heijligen
81c3f31f90 meson: Add support for ni845x_spi on Windows
TEST=On MSYS32 MINGW32 with ni845x library installed:
     meson setup -Dprogrammer=ni845x_spi build
     meson compile -C build
     ./build/flashrom.exe lists the ni845x_spi as choice.
     Without ni845x library installed but ni845x_spi disabled,
     build succeeds on all platforms.

Change-Id: I2d32f11852ac1a5184af8e8683ca1914a6e72973
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75236
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-13 09:29:14 +00:00
Thomas Heijligen
7538b74a11 tests/io_mock.h: add missing includes
When libusb is not around for the tests struct timeval and mode_t are
not defined on mingw. Add both missing header to compile the tests under
MSYS2 MINGW32/64 without libusb.

Change-Id: Ic76653c8f3b5d7043ab6080d4e2e1748590ad070
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75235
Reviewed-by: Alexander Goncharov <chat@joursoir.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-07-13 09:27:00 +00:00
Thomas Heijligen
f317a11ef1 Makefile: Simplify the NI-845X detection
The current auto detection is kind of broken. Since the NI-845X driver
package is likely not changing, hardcode `C:\Program Files
(x86)\National Instuments\NI-845x\MS Visual C` as default path to search
for the library and header. This can be overridden by setting
`CONFIG_NI845X_LIBRARY_PATH` to the custom path.

TEST=Run make HAS_LIB_NI845X=yes CONFIG_NI845X=yes successfully on MSYS2
MINGW32

Change-Id: I2115c30d0884e35eb549a31beef04d966ba4f491
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75234
Reviewed-by: Alexander Goncharov <chat@joursoir.net>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Miklós Márton <martonmiklosqdev@gmail.com>
2023-07-13 09:26:20 +00:00
Thomas Heijligen
751b16e56c doc: Add Windows MSYS2 build instructions
Change-Id: I847428535547242ff32af92c4fe8477241826814
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75189
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Alexander Goncharov <chat@joursoir.net>
2023-07-13 09:15:01 +00:00
Artur Kowalski
af8c203436 flashchips: add support for MX77L25650F chip
Add initial support for Macronix MX77L25650F. Can read, write and erase
the chip.

Change-Id: Iaea5485f8b59b8538dc47beada2c308376ea027c
Signed-off-by: Artur Kowalski <artur.kowalski@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: ServError <admin@serverror.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/68557
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2023-07-12 07:53:07 +00:00
Ao Zhong
aac723f184 flashchips.c: Adding support for ISSI IS25WP020/40/80
This patch added support for IS25WP020, IS25WP040, and IS25WP080
SPI flash chips. The datasheet for these chips can be
found at: https://www.issi.com/WW/pdf/25WP016_080_040_020.pdf

Tested read, write, and erase functions on IS25WP080.
Test log:
Write: https://paste.flashrom.org/view.php?id=3698
Write test 2: https://paste.flashrom.org/view.php?id=3699
Erase: https://paste.flashrom.org/view.php?id=3700

Change-Id: I8a786de5cf9ffefb2d57f89bbab71e289b5c2b28
Signed-off-by: Ao Zhong <hacc1225@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75830
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2023-07-12 07:42:36 +00:00
Anastasia Klimchuk
27a368a23b MAINTAINERS: Add Anastasia Klimchuk for flashchips
Change-Id: I82049c6686b7199dec55082ab9cbe71bfa89d2d7
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75895
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
2023-07-12 07:40:19 +00:00
Joseph Goh
b66f4766b5 flashchips: add support for MX25V16066/KH25V16066
Change-Id: Ic5f0548f023fcd09a970148586497e00414ad1ae
Signed-off-by: Joseph Goh <josephgoh7@gmail.com>
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/68278
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2023-06-30 07:59:44 +00:00
Stijn Segers
1ee04cd5ac flashchips: Add support for XMC XM25QH128A
Tested: read, write and erase.

Chip (and datasheet) have recenty been removed from XMC's website
but can still be retrieved through web archive:
https://web.archive.org/web/20221122191724/https://www.semiee.com/file/XMC/XMC-XM25QH128A.pdf

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
Change-Id: Iced40403c6694a55fd648ea2785cdcba21712234
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/69309
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2023-06-21 11:59:48 +00:00
Eshan Kelkar
7887df98b3 ichspi.c: Bug fix for ich_hwseq_get_flash_id
In ich_hwseq_get_flash_id, flash_id_to_entry would return
address of a structure present in flashchips array
corresponding to provided manufacture_id and model_id.
If this function returns NULL and if we don't return
after printing the warning using msg_pwarn, we'll be
dereferencing a NULL pointer, hence the return in that
if is provided.

Change-Id: I35c112cd032e3b94e30c347766764392d5bbfe3d
Signed-off-by: Eshan Kelkar <eshangalorithm@gmail.com>
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/71872
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
2023-06-21 02:02:05 +00:00
Jean THOMAS
885f792326 Makefile: Fix DirtyJTAG build
Fix typo where "FEATURE_FLAGS" is spelled "FEATURE_CFLAGS", preventing
the DirtyJTAG driver from being used.

Signed-off-by: Jean THOMAS <virgule@jeanthomas.me>
Change-Id: I4b6bce24f34848d11731f4bc118a3052fb24e639
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75891
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2023-06-19 11:21:33 +00:00
Arthur Heymans
17d1dc5f0c Revert "MAINTAINERS: Add Arthur Heymans for sb600spi"
This reverts commit 0bc84bfe4a2b9bb8cbfa719f6221eef2d8f866ca.

Change-Id: Ie538337a409f606b717d7104fad346b708f9e2f8
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75901
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2023-06-19 11:15:22 +00:00
Mario Kicherer
4652df95f1 flashchips: add support for ISSI IS25LP016
I took the original patch from Ondrej Hennel [1] and applied the
requested changes. Reading, erasing and writing works.

[1] https://patchwork.ozlabs.org/project/flashrom/list/?series=261647

Change-Id: Iffd7c4284d4d96b30a94f5dee882b5403fdfc183
Signed-off-by: Mario Kicherer <dev@kicherer.org>
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/68295
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
2023-06-16 01:16:47 +00:00
Hanno Heinrichs
4325bb5b1f flashchips: Add AT25DF011
Tested read/write/erase/probe operations with a ch341a_spi programmer.
Datasheet is available at https://www.mouser.de/datasheet/2/590/DS-AT25DF011_032-1098683.pdf

Signed-off-by: Hanno Heinrichs <hanno.heinrichs@rwth-aachen.de>
Change-Id: I5a2141f1380e864c843d6a3008fdb02dc1b75131
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/51048
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Nikolai Artemiev <nartemiev@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-16 01:03:10 +00:00
Anastasia Klimchuk
3239be535d doc: Add intro to the home page
The intro text is converted from wiki home page.

Change-Id: I2bf0d8a3b2e16c9bb7e6fbde5931ff816aede14a
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75723
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-11 09:33:17 +00:00
Anastasia Klimchuk
5dabb7c423 flashchips: Mark S25FL128L as tested for probe, read, write, erase
As reported on the mailing list:
https://mail.coreboot.org/hyperkitty/list/flashrom@flashrom.org/thread/3CC54GMEBXYVOXBJ7J5NZ5R4SQ42ZOXC/

Change-Id: I0700d3e4f684db096fea63eb9bc5add44e246758
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75604
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2023-06-11 09:32:00 +00:00
Alex Mikhalev
1c22de20ea flashchips: Add support for IS25WP016
Tested reading, writing and erasing using `linux_spi` programmer
on Raspberry Pi CM4.

Datasheet: https://web.archive.org/web/20221129211027/https://www.issi.com/WW/pdf/25LP-WP016D.pdf

Change-Id: I2b8caea229ffda72f1b04183c31715faccb64ad5
Signed-off-by: Alex Mikhalev <alex@corvus-robotics.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/70140
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-06-08 08:02:46 +00:00
Piotr Halama
104503375d flashchips: Add support for Boya BY25D80A
Read tested on Raspberry Pico with pico-serprog

Change-Id: I586f3455d925132bbda3fccdad00f0b1e22c2ea7
Signed-off-by: Piotr Halama <skrzynka@halamix2.pl>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/73513
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
2023-06-08 07:41:45 +00:00
Khoa Hoang
9b3a70158c flashchips.c: Add write protect support for W25Q16.V
Enable WRSR2 feature flag and define reg_bits and decode_range for
W25Q16.V to enable write protect support.

Based on W25Q16DV, Revision: 1, Release: Nov 18 2014 datasheet

TEST=flashrom --wp-{enable,disable,range,list,status}

Change-Id: I6c0b35f82b47a1169bccfd08222e9e3b3be30d75
Signed-off-by: Khoa Hoang <admin@khoahoang.com>
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67713
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2023-06-05 07:52:44 +00:00
Anastasia Klimchuk
c7812231bd doc/classic_cli_manpage: Mark progress feature as experimental
The feature will have patches coming soon and not completely
ideal yet.

At the moment, read and verify operations can show progress,
erase and write are not completely ready yet.

Change-Id: I9cacc60cb357c29f6625126d22a67a56de560887
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75439
Reviewed-by: Alexander Goncharov <chat@joursoir.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2023-05-31 20:55:45 +00:00
Anastasia Klimchuk
c728b8f7d5 doc/contact: Fix the nesting level of FAQ item
Change-Id: Idff89710c065cbe4fe3f2946d92ca7446f3e3663
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75437
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-05-29 09:10:50 +00:00
Miklós Márton
b09aad573b hwaccess_x86_io: Improve IO permission error messages
- Display the BSD hints only when compiled for a specific BSD
- On Linux check the user's uid to see if flashrom run with
  root privileges
- Add a note about the dmesg check if the flashrom run as
  root and have no IO privilege

TEST=Run flashrom with internal programmed on a
Secure boot enabled machine. You should not get the
privilege level error, but rather a suggestion about
the security policies.

Change-Id: I6a6f60a5f0ac8f2b51c74661f7dad30571819680
Signed-off-by: Miklós Márton <martonmiklosqdev@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/62878
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-05-29 00:35:53 +00:00
Stefan Reinauer
385b3374e3 MAINTAINERS: Add Stefan Reinauer for docker container
Change-Id: I771c6f67e0ed9beee50e8b142c34d24e96614c32
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75458
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2023-05-28 00:57:04 +00:00
Miklós Márton
ffc75aa710 git-hooks: echo back the commit message on failure
When using nano as a git commit message editor the contents of the
commit message could get lost if the git commit hook fails due to
the lack of Signed-off-by line. To prevent this unpleasant effect
for new contributors the commit hook was modified to echo back the
commit message to allow the user to copy-paste it to the message
of the next commit attempt.

Change-Id: I13289f81b3fa92640aecc43eae28c1643cd7c247
Signed-off-by: Miklós Márton <martonmiklosqdev@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/62879
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-05-26 10:40:36 +00:00
Anastasia Klimchuk
4fbb152402 README: Extract instructions for meson and make into separate docs
This patch extracts building/installing/packaging documentation for
meson and make into two separate doc files, and then links these files
from README.

Re-structure README so that it gives only a brief overview of build
instructions and links to full instructions for meson and make.

Ticket: https://ticket.coreboot.org/issues/489

Change-Id: I2d5900538d54c43efcc8c5b7010df5d867f3b190
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75125
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
2023-05-23 09:33:08 +00:00
Stefan Reinauer
5c8469953b util: Add docker to automate creation of documentation
Build with:
 docker build --force-rm -t "doc.flashrom.org" \
	      "$PWD/util/docker/flashrom.org/"

Generate HTML files:
 mkdir -p "$PWD/doc/_build/"
 docker run -it --rm \
            --user "$(id -u):$(id -g)" \
            -v "$PWD/:/data-in/:ro" \
            -v "$PWD/doc/_build/:/data-out/" \
            doc.flashrom.org

Live web server:
 docker run -it --rm \
            --net=host -v "$PWD/:/data-in/:ro" \
            doc.flashrom.org livehtml

Change-Id: I889fa5f98e2fd6ef896ba4bb30aa5d985ff82622
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75344
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: Anastasia Klimchuk <aklm@chromium.org>
2023-05-23 09:15:04 +00:00
Edward O'Callaghan
f15e6a105b programmer: Use correct type for flashbase
The flashbase is a machine-sized integer representation of
address space and so use the appropriate type that is correctly
sized to encode such data.

The flashbase is assigned to 'base' in 'map_flash()' and the
type correctly changed to uintptr_t in commit 4e32ec19b124a7
therefore makes for a consistent type usage whenever stored.

While `sizeof(unsigned long)` and `sizeof(uintptr_t)` are both `8` under
most circumstances on a 64bit platform and thus have enough bits to
represent all addresses on the platform, the C standard does not
guarantee this. Only `uintptr_t` and `void *` has a guaranteed
isomorphism as `uintptr_t` is defined by the platforms toolchain support
whereas the conversion from `void *` to an integer is implementation
defined and that the memory address value may contain additional bits
describing the validation data or provenance of the address. Therefore a
integer is insufficient to contain all the necessary information for
that specific platform so this may not always work out for all platforms
and toolchain combinations.

Spotted-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Change-Id: Ib9057e438731b9cccde0e24d5c8f758c3af1d47f
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75328
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2023-05-23 00:52:44 +00:00
Anastasia Klimchuk
2e81c05ad3 erasure_layout: Simplify include paths
Header files can be found without explicitly specifying include
directory on the file path.

Change-Id: I6ef34273d088d8fb4559fe3d801d1247ad9b3fa2
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75322
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Aarya <aarya.chaumal@gmail.com>
2023-05-22 00:46:47 +00:00
Angel Pons
59287a0bd0 chipset_enable.c: Drop _LARGEFILE64_SOURCE
This file does not access any large files, so there's no need to define
this feature test macro.

Change-Id: I866cfa2f996eeea5846e5d9189647ad7a4a4e3e4
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75271
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Alexander Goncharov <chat@joursoir.net>
2023-05-22 00:43:44 +00:00
Thomas Heijligen
0f541c216a meson.build: enable jlink_spi by default
Most systems are shipping libjaylink, so try to build the programmer by
default.

Change-Id: I80f204de1bb26f459a38177f54a167db72003dbd
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75171
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-05-19 09:04:20 +00:00
Thomas Heijligen
a1decbb5df meson.build: enable serial programmer on Windows
Change-Id: Ie60a25a9305374f9ed84a38f2650d517ec094387
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/75170
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-05-19 08:32:26 +00:00