Commit Graph

2894 Commits

Author SHA1 Message Date
Sergii Dmytruk
935a12c81d Add list of chips for which we intend to have WP
Change-Id: Ifcd6cffa22dffd05241515fc30e0f550f89b5b16
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2022-07-27 19:11:25 +02:00
Maciej Pijanowski
5618d82682 meson: add ite_ec programmer
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
2022-05-21 23:46:14 +02:00
Sergii Dmytruk
504ae14e6d ite_ec: Implement support for flashing ITE ECs found on TUXEDO laptops
Add a new programmer supporting ITE Embedded Controllers found on
TUXEDO laptops. Tested on TUXEDO InfinityBook S 14 Gen6 and 15 Gen6
with EC firmware updates from IBV, EC versions 1.07.02TR1 and
1.07.04TR4.

Example standard command to update EC firmware on a TUXEDO laptop:
"flashrom -p ite_ec:romsize=128K,autoload=disable -w eL14MU02.TR1"

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Change-Id: I0e42260155ffea38a6f60790871cd8da7b657031
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2022-05-09 20:32:20 +02:00
Michał Żygowski
ded2dd43e4 pcidev: Move pci device functions out of internal programmer
PCI device helper functions implemented in internal programmer are
generic, not specific to this particular programmer. Move them to
the common pcidev.c file which is included in all programmers
requiring PCI and may be used not only for internal programmer.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: Ice40783a05c01cc78b34eb2c4a575554e9d55f8e
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2022-05-09 20:32:20 +02:00
Sergii Dmytruk
671ad2740e acpi_ec: Implement basic ACPI embedded controller API
Implement basic functions to read/write EC registers and send standard
ACPI EC commands. Those may prove useful in possible future
implementations of embedded controllers in flashrom and are required
to support EC firmware flashing on Tuxedo laptops.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Change-Id: Ie3bae8d81c80ae2f286b619e974869e3f2f4545d
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2022-05-09 20:32:20 +02:00
Michał Żygowski
70b174701a flashrom.c: Add 64KiB write granularity
Add 64KiB write granularity for the incoming ITE Embedded Controllers
found on Tuxedo laptops. These ECs can only operate on 64KiB blocks and
any different operations result in a failure.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: I69801f581d0cb9b85f6596de7e1267ef9317673f
2022-05-09 20:32:20 +02:00
Michał Żygowski
7a5712a63a sio.c: Put generic Super I/O access scattered throughout files together
Put generic Super I/O helpers in one file and depend compiling it on raw
access and x86 architecture.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: Ie36370c22edb05ee59b036859b44a968bcc37980
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2022-05-09 20:32:20 +02:00
Maciej Pijanowski
3ec811585e Merge pull request #2 from Dasharo/dasharo-develop
Dasharo develop
2022-04-15 09:36:58 +02:00
Michał Żygowski
bbb599e5c4 Merge pull request #1 from Dasharo/alder_lake_s
Add initial ADL-S internal programmer support
2022-04-13 17:51:30 +02:00
Michał Kopeć
f4eb405157 Add initial ADL-S internal programmer support
Change-Id: Ifcb3a63a2386b9622e1e4bf3f77f0334136686fe
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2022-04-13 15:25:50 +02:00
Tim Crawford
b5dc7418e2 chipset_enable.c: Add TGP-H IDs
Add IDs for: H510, B560, H570, Q570, Z590, W580, HM570, QM570, WM590

Tested on system76/oryp8 (HM570). flashrom is able to read the image
using the internal programmer.

Change-Id: I96f63253d42578151f99dcbb42347afecc03f49d
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/57533
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Benjamin Doron <benjamin.doron00@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
v1.2.0.1
2022-01-05 16:27:57 +00:00
Thomas Heijligen
cad512f916 hwaccess_x86_msr: fix build for FreeBSD
Add missing includes for FreeBSD

Change-Id: I2045345878392436b0ea4d6bd4f2896edc645673
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/60342
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2022-01-05 12:16:03 +00:00
Thomas Heijligen
dda1933903 Makefile: list dependencies for RAW_MEM_ACCESS, X86_PORT_IO, X86_MSR
List all programmers which depend on the respective hwaccess features.
This is the base for a precise feature selecting in the build system.

Change-Id: I588f698780b5acd65084346bcef781cbfd1203ea
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/60114
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-12-22 22:54:15 +00:00
Thomas Heijligen
b8f364bece physmap: rename to hwaccess_physmap, create own header
Line up physmap with the other hwaccess related code.

Change-Id: Ieba6f4e94cfc3e668fcb8b3c978de5908aed2592
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/60113
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-12-22 22:53:47 +00:00
Thomas Heijligen
50720a4b0b hwaccess physmap: move x86 msr related code into own files
Allow x86 msr related code to be compiled independent from memory
mapping functionality. This enables for a better selection of needed
hardware access types.

Change-Id: Idc9ce9df3ea1e291ad469de59467646b294119c4
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/60111
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-12-22 12:35:29 +00:00
Thomas Heijligen
49d758698a hwaccess: move x86 port I/O related code into own files
Allow port I/O related code to be compiled independent from memory
mapping functionality. This enables for a better selection of needed
hardware access types.

Change-Id: I372b4a409f036da766c42bc406b596bc41b0f75a
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/60110
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-12-22 12:35:00 +00:00
Thomas Heijligen
88c871e74c pci.h: move include into own wrapper
Split the include of hwaccess and libpci. There is no need to have pci.h
included in hwaccess.

Change-Id: Ibf00356f0ef5cc92e0ec99f8fe5cdda56f47b166
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/58883
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-12-22 12:33:15 +00:00
Thomas Heijligen
9469f81d8f Makefile: Make pkg-config mandatory to find libusb1
Use `make HAS_LIBUSB1=yes/no` to override the pkg-config detection and
`CONFIG_LIBUSB1_CFLAGS` and `CONFIG_LIBUSB1_LDFLAGS` to set cflags and
ldflags manually.

Change-Id: I4f24be647d25dde24c41514f8964b7134205867c
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/59049
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-12-22 12:31:13 +00:00
Thomas Heijligen
82524f8411 Makefile: Make pkg-config mandatory to find libjaylink
Use `make HAS_LIBJAYLINK=yes/no` to override the pkg-config detection
and `CONFIG_LIBJAYLINK_CFLAGS` and `CONFIG_LIBJAYLINK_LDFLAGS` to set
cflags and ldflags manually.

Change-Id: I99df547046bb9820ab502f89f6d4452c1bc0cfd4
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/59048
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-12-22 12:31:07 +00:00
Thomas Heijligen
41f20c749e Makefile: Rework NI-845x detection
Since the NI-845x is a Windows only proprietary library, disable it by
default. Use `HAS_LIB_NI845X=yes` to enable it. The default search path
is `${PROGRAMFILES}\National Instruments\NI-845x\MS Visual C` and can be
overwritten by `CONFIG_NI845X_LIBRARY_PATH`. Use
`CONFIG_LIB_NI845X_CFLAGS` and `CONFIG_LIB_NI845X_LDFLAGS` for setting
the cflags and ld flags manually.

Change-Id: I918c3605a5ac168708a6a10fd92ee2a1aae9729b
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/59047
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-12-22 12:30:54 +00:00
Thomas Heijligen
22e5af78fe Makefile: Make pkg-config mandatory to find libftdi1
Use `make HAS_LIBFTDI1=yes/no` to override the pkg-config detection and
`CONFIG_LIBFTDI1_CFLAGS` and `CONFIG_LIBFTDI1_LDFLAGS` to set cflags and
ldflags manually.

Change-Id: I41f5186d9f3e063c12c8c6eea888d0b0bf534259
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/58623
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-12-22 12:30:23 +00:00
Sergii Dmytruk
073e205e3b flashrom.8.tmpl: document W25Q128FV is emulated by dummyflasher
It was absent from the list of emulated chips.

Change-Id: I50f6cd6c5d853d6c70921e8027ada52d27982708
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/59811
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2021-12-17 16:19:32 +00:00
Sergii Dmytruk
b6880f787a flashrom.8.tmpl: remove outdated warning about v1.0
This section is rather outdated and should be dispensed with.

Change-Id: Id7e0ce412901ccb27124a9958d5ef214ab289518
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/59408
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2021-12-17 14:53:59 +00:00
Edward O'Callaghan
43f998274f flashrom.c: Validate before allocate in verify_range()
Simplify a goto away for free'ing a buffer by validating
before attempting to allocate.

BUG=none
TEST=builds

Change-Id: Iae886f203d1c59ae9a89421f7483a4ec3f747256
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/59372
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2021-12-15 13:54:09 +00:00
Simon Buhrow
ea0ae153dd flashchips: Add W25Q64JV
I have successfully tested it with FT2232H-programmer.

Change-Id: Ia9a32146b225eca66e9a6bfef45be5f2b24aef46
Signed-off-by: Simon Buhrow <simon.buhrow@posteo.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/58971
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2021-12-09 19:14:09 +00:00