aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Makefile.d/arch_test.h: Add detection for ARC64 architectureVeronika Kremneva2022-08-091-0/+2
| | | | | | | | | Change-Id: I8707394871994f600b345d76614c5689fd081db4 Signed-off-by: Veronika Kremneva <kremneva@synopsys.com> Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/flashrom/+/63896 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Thomas Heijligen <src@posteo.de>
* Makefile: Add support for Elbrus (e2k) architectureAnton Samsonov2022-08-092-1/+3
| | | | | | | | Signed-off-by: Anton Samsonov <devel@zxlab.ru> Change-Id: Ifc834e943ae93c59447afc86454b22ca662d3ef6 Reviewed-on: https://review.coreboot.org/c/flashrom/+/66426 Reviewed-by: Thomas Heijligen <src@posteo.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* Makefile: fix rebuild issuesThomas Heijligen2022-08-091-2/+2
| | | | | | | | | | | | | | | | | Flashrom does no longer rebuild everything if `make` is executed. Now the rule config will run, if needed, before any ‘.o’ is built, but no ‘.o’ will be built because there is no config file. https://www.gnu.org/software/make/manual/make.html#Prerequisite-Types Change-Id: Ie9225b79c0eb27cb041654d703cde5efc769cbf2 Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66130 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Idwer Vollering <vidwer@gmail.com> Reviewed-by: Nico Huber <nico.h@gmx.de>
* ich_descriptors.c: Reduce i/o op paths in read_descriptor_reg()Edward O'Callaghan2022-08-081-4/+11
| | | | | | | | | | | | Simplify I/O operations to one path after all branch logic is complete. Work towards consolidated enum ich gen branch logic. Change-Id: I37d22217a7cfc4cffc4f6cfe7b1df6f30df3ca92 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66349 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Thomas Heijligen <src@posteo.de>
* include/ich_descriptors.h: Add missing includeEdward O'Callaghan2022-08-081-0/+1
| | | | | | | | | | | | | Avoid transitively including the bool type for the ich_descriptor functionality. Change-Id: I2d9eb833ca9198c0586543d3f0074893aac5c6fb Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66348 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matei Dibu <matdibu@protonmail.com> Reviewed-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Felix Singer <felixsinger@posteo.net>
* test_build.sh: Move commands into functionsFelix Singer2022-08-081-5/+14
| | | | | | | | | | | In preparation to follow up commits, move the commands into functions so that it's clear what belongs to what. Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: Ia2dc6f1d4d53b4d6a1255ef31c66799a484302fc Reviewed-on: https://review.coreboot.org/c/flashrom/+/66093 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Thomas Heijligen <src@posteo.de>
* tests: Add basic lifecycle test for mediatek_i2c_spiAnastasia Klimchuk2022-08-084-0/+39
| | | | | | | | | | | | | | | | | | | | | | This unit test does not require any additional mocks because init and shutdown of i2c infra was covered in realtek programmer lifecycle. Default mocking of i2c is sufficient to run a basic lifecycle. To run the test, config option for the programmer needs to be enabled explicitly, since by default this programmer is disabled. BUG=b:238816884 TEST=meson configure -Dconfig_mediatek_i2c_spi=true ninja test Change-Id: I98a12067d165c90013d33ffc45d20dab5c364c83 Signed-off-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66261 Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Alexander Goncharov <chat@joursoir.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* tests: Add basic lifecycle test for parade_lspconAnastasia Klimchuk2022-08-084-0/+39
| | | | | | | | | | | | | | | | | | | | | This unit test does not require any additional mocks because init and shutdown of i2c infra was covered in realtek programmer lifecycle. Default mocking of i2c is sufficient to run a basic lifecycle. To run the test, config option for the programmer needs to be enabled explicitly, since by default this programmer is disabled. BUG=b:238816889 TEST=meson configure -Dconfig_parade_lspcon=true ninja test Change-Id: I0dcfae4a58c64b2e8d56ec51b4b050534cbb4cd2 Signed-off-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66003 Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Thomas Heijligen <src@posteo.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* pickit2_spi.c: Use a variable to store the total packetsizeFelix Singer2022-08-051-2/+3
| | | | | | | | | | | | Instead of calculating the total packetsize multiple times, use a variable instead. Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: I714054669e16dcf531a57174f9522b3af72d2754 Reviewed-on: https://review.coreboot.org/c/flashrom/+/66251 Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Thomas Heijligen <src@posteo.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* pickit2_spi.c: Replace hard-coded value with define in msg_perr()Felix Singer2022-08-051-2/+2
| | | | | | | | | Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: Ia3fa89285d8761e51078afa486df50a7b8247fc5 Reviewed-on: https://review.coreboot.org/c/flashrom/+/66250 Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Thomas Heijligen <src@posteo.de>
* nicnatsemi: Refactor singleton states into reentrant patternAlexander Goncharov2022-08-051-6/+28
| | | | | | | | | | | | | | | | | | | | | Move global singleton states into a struct and store within the par_master data field for the life-time of the driver. This is one of the steps on the way to move par_master data memory management behind the initialisation API, for more context see other patches under the same topic specified below. TOPIC=register_master_api TEST=builds Change-Id: I58ad1f0222338fc107e7ac2b9cdd361ae7033912 Signed-off-by: Alexander Goncharov <chat@joursoir.net> Ticket: https://ticket.coreboot.org/issues/391 Reviewed-on: https://review.coreboot.org/c/flashrom/+/65970 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
* satasii: drop unused variable from par data structAlexander Goncharov2022-08-051-2/+0
| | | | | | | | | Change-Id: I17725195d0523068453325742d7e2aae31a0208d Signed-off-by: Alexander Goncharov <chat@joursoir.net> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66293 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
* satasii: Drop sii_ prefix for par data struct membersAlexander Goncharov2022-08-051-11/+11
| | | | | | | | | | | | | | The name of the struct type already contains satasii_ prefix, so prefix doesn't need to be repeated in members name TEST=builds Change-Id: I92e59bf89e44cde631dfde2df4c9ff0f86b5f417 Signed-off-by: Alexander Goncharov <chat@joursoir.net> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66292 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
* satasii: Refactor singleton states into reentrant patternAlexander Goncharov2022-08-051-20/+41
| | | | | | | | | | | | | | | | | | | | | | | Move global singleton states into a struct and store within the par_master data field for the life-time of the driver. This patchset also includes stdlib.h to be able to work with memory allocation. This is one of the steps on the way to move par_master data memory management behind the initialisation API, for more context see other patches under the same topic specified below. TOPIC=register_master_api TEST=builds Change-Id: I63fea00623c149ad304b44aa6265f32ecc1c53eb Signed-off-by: Alexander Goncharov <chat@joursoir.net> Ticket: https://ticket.coreboot.org/issues/391 Reviewed-on: https://review.coreboot.org/c/flashrom/+/66075 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
* satamv: Drop mv_ prefix for par data struct membersAlexander Goncharov2022-08-051-6/+6
| | | | | | | | | | | | | | The name of the struct type already contains satamv_ prefix, so prefix doesn't need to be repeated in members name TEST=builds Change-Id: I10ddb734e0d091cbafb439b288b393cf209dfc2e Signed-off-by: Alexander Goncharov <chat@joursoir.net> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66294 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
* satamv: Refactor singleton states into reentrant patternAlexander Goncharov2022-08-051-21/+44
| | | | | | | | | | | | | | | | | | | | | Move global singleton states into a struct and store within the par_master data field for the life-time of the driver. This is one of the steps on the way to move par_master data memory management behind the initialisation API, for more context see other patches under the same topic specified below. TOPIC=register_master_api TEST=builds Change-Id: I084cf826a8a594ade80eed43008e286c7bd1b553 Signed-off-by: Alexander Goncharov <chat@joursoir.net> Ticket: https://ticket.coreboot.org/issues/391 Reviewed-on: https://review.coreboot.org/c/flashrom/+/65978 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
* nicintel: Refactor singleton states into reentrant patternAlexander Goncharov2022-08-031-10/+33
| | | | | | | | | | | | | | | | | | | | | Move global singleton states into a struct and store within the par_master data field for the life-time of the driver. This is one of the steps on the way to move par_master data memory management behind the initialisation API, for more context see other patches under the same topic specified below. TOPIC=register_master_api TEST=builds Change-Id: I839baad1e6085958a29652f23c9027b6a10edd15 Signed-off-by: Alexander Goncharov <chat@joursoir.net> Ticket: https://ticket.coreboot.org/issues/391 Reviewed-on: https://review.coreboot.org/c/flashrom/+/65974 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
* maintainers: Add Felix Singer for Nix shellFelix Singer2022-08-031-0/+9
| | | | | | | | Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: I1d246ad8e1270a53275ab12adb8c3d858009d176 Reviewed-on: https://review.coreboot.org/c/flashrom/+/66006 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
* maintainers: Add Anastasia Klimchuk for MAINTAINERSFelix Singer2022-08-031-0/+1
| | | | | | | | | Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: Ibd024b07c3cf2b537bb055694ff2654fed305400 Reviewed-on: https://review.coreboot.org/c/flashrom/+/66005 Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
* maintainers: Add Felix Singer for MAINTAINERSFelix Singer2022-08-031-0/+9
| | | | | | | | Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: I9ad71346111a0c42a4424557b3bda6ee1cc3484f Reviewed-on: https://review.coreboot.org/c/flashrom/+/66004 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
* flashrom_tester: Move all subprocess stderr logging to dispatchEvan Benn2022-08-031-62/+34
| | | | | | | | | | | | | | | Instead of printing stderr in each function separately, print all stderr in the dispatch function. BUG=None BRANCH=None TEST=/usr/bin/flashrom_tester --debug host Lock_top_quad Change-Id: Id76f83c8c089537aa44aa13533c75900eb6ed175 Signed-off-by: Evan Benn <evanbenn@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65279 Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* flashrom_tester: Parse fmap header as little endianEvan Benn2022-08-021-1/+1
| | | | | | | | | | | | | The fmap header was incorrectly parsed as big endian. BUG=b:240097529 BRANCH=None TEST=/usr/bin/flashrom_tester --debug :lib: host Coreboot_ELOG_sanity Change-Id: Ia683ce7a6ce3bc009218c300abb9c3a16ea06a6d Reviewed-on: https://review.coreboot.org/c/flashrom/+/66119 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* tests/test.c: Allow filtering of tests using cmocka APIEvan Benn2022-08-021-1/+4
| | | | | | | | | | | | | | | | | | | | | | Tests can be filtered by providing patterns on the command line. The pattern is the first argument provided to the test binary, if present. Only tests matching the string provided are run, wildcards * and ? match any characters, or one character respectively. `meson test` or `ninja test` will continue to run all tests, as they do not provide an argument to the test binary. https://api.cmocka.org/group__cmocka.html TEST=tests/flashrom_unit_tests 'layout_*' Change-Id: I45f4ac5ef0cfb74156408022a19769d6598ad2ea Signed-off-by: Evan Benn <evanbenn@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65998 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
* flashrom_tester: update to built-0.5George Burgess IV2022-08-021-2/+2
| | | | | | | | | | | | | | | | | built-0.3 depends on git2-0.9, which is our only user of url-1, which is our only user of idna-0.1, which depends on rustc-serialize, which suffers from RUSTSEC-2022-0004. That's a mouthful :) BUG=b:239449434 TEST=CQ BRANCH=none Change-Id: I0d39b417fd2291838e85f91a2af1c8a4fe28a6c2 Signed-off-by: George Burgess IV <gbiv@google.com> Signed-off-by: Evan Benn <evanbenn@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66140 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* parade_lspcon.c: Clarify coincidentally JEDEC command usageEdward O'Callaghan2022-08-021-3/+4
| | | | | | | | | | | | | | | | | | Clarify that SWSPI_WDATA_* coincidentally uses the same commands as specified by JEDEC. A similar data sheet does not really shed light if these literally are raw JEDEC command values or 'virtual' ones. As to avoid confusion, comment but perhaps not use the JEDEC literals from spi.h until it is certain. Change-Id: I851319ad4c36baad1e280309a6df8c86d6c4ad3d Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65557 Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Thomas Heijligen <src@posteo.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
* parade_lspcon.c: Leverage the BIT() macroEdward O'Callaghan2022-07-301-14/+14
| | | | | | | | | | Change-Id: Iad51fb4b3440e281e842bcaecf0c060084681635 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65558 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
* parade_lspcon.c: Add allow_brick=yes programmer paramEdward O'Callaghan2022-07-301-0/+37
| | | | | | | | | | | | | | | | | | | Currently i2c programmers do not have a safe allow listing mechanism via board_enable to facilitate fully qualified chip detection. Since i2c addresses alone can overlap a user may make the mistake of using the wrong programmer. Although unlikely, it is within the realm of possibility that a user could accidently somehow program another chip on their board. Change-Id: I819f9a5e0f3102bec8d01dd52a0025a0fbe46970 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65555 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Thomas Heijligen <src@posteo.de>
* parade_lspcon.c: Drop unused defineEdward O'Callaghan2022-07-301-1/+0
| | | | | | | | | | Change-Id: I35e800dec8295059d7cd0fa4503379e059993757 Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65556 Reviewed-by: Felix Singer <felixsinger@posteo.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Thomas Heijligen <src@posteo.de>
* mediatek_i2c_spi.c: Add allow_brick=yes programmer paramEdward O'Callaghan2022-07-301-0/+37
| | | | | | | | | | | | | | | | | | | Currently i2c programmers do not have a safe allow listing mechanism via board_enable to facilitate fully qualified chip detection. Since i2c addresses alone can overlap a user may make the mistake of using the wrong programmer. Although unlikely, it is within the realm of possibility that a user could accidently somehow program another chip on their board. Change-Id: I2b8f7a9bfae68354105f3196cc40b9d5e795afdf Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65554 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Thomas Heijligen <src@posteo.de>
* it8212: Drop it8212_ prefix for par data struct membersAlexander Goncharov2022-07-281-4/+4
| | | | | | | | | | | | | | The name of the struct type already contains it8212_ prefix, so prefix doesn't need to be repeated in members name TEST=builds Change-Id: I02810d3a7ee1f8caac09d92342c5ebca6d41cbaa Signed-off-by: Alexander Goncharov <chat@joursoir.net> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66086 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Thomas Heijligen <src@posteo.de>
* atapromise: Drop atapromise_ prefix for par data struct membersAlexander Goncharov2022-07-281-3/+3
| | | | | | | | | | | | | | The name of the struct type already contains atapromise_ prefix, so prefix doesn't need to be repeated in members name TEST=builds Change-Id: Iac647bfe74d4b6f508f06e78b80a020cdf75f562 Signed-off-by: Alexander Goncharov <chat@joursoir.net> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66087 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Thomas Heijligen <src@posteo.de>
* meson: fix various meson build warnings and formattingNikolai Artemiev2022-07-282-8/+6
| | | | | | | | | | | | | | | | | | | | | | - Make run_command() calls check for failures to fix warnings about ignoring errors, see https://github.com/mesonbuild/meson/issues/9300. - Remove `include_directories('../subprojects')` from tests/meson.build. It isn't necessary and caused build warnings due to referencing files outside the tests/ directory. - Fix indent level and formatting in a few places. BUG=none BRANCH=none TEST=meson; ninja; ninja test Change-Id: I17ae0c51d68ed004772a237641f08345f4893200 Signed-off-by: Nikolai Artemiev <nartemiev@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/66060 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
* pickit2_spi.c: Add `pickit2_interrupt_transfer()` helperAngel Pons2022-07-261-15/+13
| | | | | | | | | | | | | | Introduce the `pickit2_interrupt_transfer()` helper function to simplify calls to the `libusb_interrupt_transfer()` function, as the last three arguments are always the same: two constants and an unused output value. Change-Id: I7ff704243b63a7ea2872fbc6e596190573dc13f6 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65915 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Tested-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Thomas Heijligen <src@posteo.de>
* maintainers: Add Nikolai Artemiev for write-protectAnastasia Klimchuk2022-07-261-0/+6
| | | | | | | | | | Change-Id: Ic0c1cacc8519ba2691dcbf959c3e667ef38f0198 Signed-off-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65942 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Nikolai Artemiev <nartemiev@google.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* maintainers: Add Anastasia Klimchuk for unit testsAnastasia Klimchuk2022-07-261-0/+10
| | | | | | | | Change-Id: I945746751be713c07b30d67dbe270edf129d54c2 Signed-off-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65941 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net>
* maintainers: Add Nikolai Artemiev for linux_mtdAnastasia Klimchuk2022-07-261-0/+5
| | | | | | | | | | Change-Id: I67c9d5fd6aa0a45770ab35bf684237cc932f9309 Signed-off-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65940 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Nikolai Artemiev <nartemiev@google.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* maintainers: Add Peter Marheine for i2c programmersAnastasia Klimchuk2022-07-261-0/+11
| | | | | | | | | | Change-Id: I93df452846d8cbbfdac443e6f0f67dc8a69581f6 Signed-off-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65939 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* maintainers: Add Peter Marheine for i2c coreAnastasia Klimchuk2022-07-261-0/+5
| | | | | | | | | | Change-Id: I1e2884451aa0dbc40f09ef0e6a61c157d6a734a5 Signed-off-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65938 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* maintainers: Add Thomas Heijligen for build systemAnastasia Klimchuk2022-07-261-1/+12
| | | | | | | | | | Change-Id: I48f88caf1b9f2477674100ef39c3bb800c2909d5 Signed-off-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65937 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
* Introduce MAINTAINERS fileFelix Singer2022-07-261-0/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MAINTAINERS file is a list of people who take special care of specific things and places of the tree. Also, it gives an overview about which people are good points for contact in case of questions appear. In addition to that, this file is hooked up to Gerrit so that when a patch is pushed, which touches any of these places, the related people are added to reviewers or CC. This is done by a tool which looks up the changed places in the MAINTAINERS file. To clarify: This MAINTAINERS file does *not* mean that any reviews, comments or thoughts from other people not listed there aren't welcome anymore. We just want to make sure that patches don't get lost. The initial file was copied from the coreboot repository. The format is the same as the one which is used for coreboot. Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: Ic9a302055d941eeb2499a84c62c5fe1d4c9944cf Reviewed-on: https://review.coreboot.org/c/flashrom/+/65569 Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Thomas Heijligen <src@posteo.de>
* Makefile: Fix dependencies for developerbox_spiFelix Singer2022-07-251-0/+1
| | | | | | | | | | | | The developerbox_spi programmer depends on bitbang SPI support. Thus, fix that. Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: Ic0fe589ffdccede0fbf6360c2bebe58a36654f10 Reviewed-on: https://review.coreboot.org/c/flashrom/+/66096 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Thomas Heijligen <src@posteo.de>
* Makefile: Fix option name of parade_lspcon programmerFelix Singer2022-07-251-1/+1
| | | | | | | | | | | | Commit df0bbf0 renamed the programmer lspcon_i2c_spi to parade_lspcon but also introduced a typo in its Makefile config option. Fix that. Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: Ie9193931a4483bba129da513554ce7ca0b790374 Reviewed-on: https://review.coreboot.org/c/flashrom/+/66095 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Thomas Heijligen <src@posteo.de>
* realtek_mst_i2c_spi.c: Use bool type for parametersFelix Singer2022-07-221-11/+11
| | | | | | | | | | | | | | | | | | | Use the bool type instead of integer for options, since this represents the purpose of their variables much better. Also, use the bool type for the attribute `reset` from the struct `realtek_mst_i2c_spi_data`, which is used to store the value of the parameter `reset_mcu`. Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: Idffd860e0de0bb82eec6102087e2e19783c32521 Reviewed-on: https://review.coreboot.org/c/flashrom/+/65943 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Thomas Heijligen <src@posteo.de> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
* realtek_mst_i2c_spi.c: Clean up get_params()Felix Singer2022-07-221-6/+3
| | | | | | | | | | | | | | | | | Set the default value for programmer options just before the user-provided parameters are evaluated. The values get overridden if the user specified their own values, else the pre-set values are used. This way, we get rid of these else-blocks. Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: Ibb43aaa4d70ee0827587288c658f01bcef583ddd Reviewed-on: https://review.coreboot.org/c/flashrom/+/65936 Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Thomas Heijligen <src@posteo.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
* realtek_mst_i2c_spi: Use underscores for parameters instead hyphensFelix Singer2022-07-223-15/+15
| | | | | | | | | | | | | | | | realtek_mst_i2c_spi is the only programmer which uses hyphens instead of underscores in its parameter names. Thus, for consistency, rename the parameters so that they use underscores. Signed-off-by: Felix Singer <felixsinger@posteo.net> Change-Id: I5ff6d8d432d875670fcaa2088e9cf9d9f1b83dc2 Reviewed-on: https://review.coreboot.org/c/flashrom/+/65935 Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Thomas Heijligen <src@posteo.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
* flashrom_tester: Add write_file_with_layout positive testEvan Benn2022-07-212-2/+26
| | | | | | | | | | | | | | | | | | write_file_with_layout test was checking that writing to a region was failing, and assuming that was because write protect is working as expected. Other failures are possible, so check that a write to a non write protected region can succeed. BUG=b:235916336 BRANCH=None TEST=/usr/bin/flashrom_tester --debug host Lock_top_quad Change-Id: I2b220f323e259f5c7bfae06f6cf996b22e264555 Signed-off-by: Evan Benn <evanbenn@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65278 Reviewed-by: Edward O'Callaghan <quasisec@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
* flashrom_tester: Refactor Error typeEvan Benn2022-07-213-21/+46
| | | | | | | | | | | | | | | | | Use a type implementing Error instead of a string for errors. Error implements Display so can be easily converted to a String. This will allow libflashrom to be more easily integrated. BUG=b:230545739 BRANCH=None TEST=cargo test Change-Id: Id166053c7edfd07576e7823692cfa0ea4d438948 Signed-off-by: Evan Benn <evanbenn@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65277 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
* flashrom_tester: Remove subprocess from elog_sanity_testEvan Benn2022-07-214-33/+43
| | | | | | | | | | | | | | | | | Make elog_sanity_test read the elog region itself, instead of calling out to elogtool. This avoids the need to subprocess and resolves a deadlock when elogtool attempts to obtain a flash reading lock. TEST=/usr/bin/flashrom_tester host Coreboot_ELOG_sanity TEST=flashrom --image RW_ELOG -p host -r /tmp/file.tmp2 # comparison TEST=hexdump the file and check magic signature == 0x474f4c45 Change-Id: I8ac63e15e063f9c0928e3e185154bb083b367ba9 Signed-off-by: Evan Benn <evanbenn@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/65119 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
* flashrom_tester: Use Flashrom trait instead of struct FlashromCmdEvan Benn2022-07-215-319/+356
| | | | | | | | | | | | | | To allow FlashromCmd to be reimplemented with libflashrom move all concrete cmd functions into the FlashromCmd type that implements the Flashrom trait. This allows users to be generalised upon the Flashrom trait as the contract rather than the concrete FlashromCmd type. Change-Id: Ie2b4e7e91d69043fd50d1c57f6585fc9946fab10 Signed-off-by: Evan Benn <evanbenn@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/64849 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
* atapromise: Refactor singleton states into reentrant patternAlexander Goncharov2022-07-191-17/+41
| | | | | | | | | | | | | | | | | | | | Move global singleton states into a struct and store within the par_master data field for the life-time of the driver. This is one of the steps on the way to move par_master data memory management behind the initialisation API, for more context see other patches under the same topic "register_master_api". BUG=b:185191942 TEST=builds Change-Id: I981e2f32926c1696bd0e3248ada92b9e37dafde0 Signed-off-by: Alexander Goncharov <chat@joursoir.net> Ticket: https://ticket.coreboot.org/issues/391 Reviewed-on: https://review.coreboot.org/c/flashrom/+/65706 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Reviewed-by: Thomas Heijligen <src@posteo.de>