3343 Commits

Author SHA1 Message Date
Maciej Pijanowski 9eaacede45 ast[1100,2400].c: drop hwaccess_x86_io.h
Change-Id: Ie355daf467b1e50b7a71e3512f908cbd0176e0e7
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
2022-12-01 21:07:40 +01:00
Maciej Pijanowski 2ad07b2e0b astxx00: new driver
Add support for AST1100 and AST2400, available on ASUS KGPE-D16
Based originally on:
https://github.com/osresearch/heads/blob/master/patches/flashrom-b1f858f65b2abd276542650d8cb9e382da258967/0100-enable-kgpe-d16.patch

Change-Id: I7dce35b63c446562a057114d15e83f8a92892a85
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
Signed-off-by: Karol Zmyslowski <karol.zmyslowski@3mdeb.com>
2022-12-01 10:42:24 +01:00
Tomasz Żyjewski 81d507caa4 meson.build: add missing source for config_realtek_mst_i2c_spi
Signed-off-by: Tomasz Żyjewski <tomasz.zyjewski@3mdeb.com>
2022-10-27 21:33:12 +02:00
Tomasz Żyjewski 44be8b7255 meson.build: use get_option to check value
Signed-off-by: Tomasz Żyjewski <tomasz.zyjewski@3mdeb.com>
2022-10-27 21:33:12 +02:00
Artur Kowalski 9bddf6233d ite_ec: fix Makefile
Use FEATURE_FLAGS (instead of FEATURE_CFLAGS) so that ite_ec programmer
is included into programmer table when enabled.

Change-Id: I9fd77606f024ae0f7e5b8ba628a66122a989c6df
Signed-off-by: Artur Kowalski <artur.kowalski@3mdeb.com>
dasharo-v1.2.2
2022-10-14 13:10:00 +02:00
Kacper Stojek ac9bb8ba0f Fix ec patch to work after rebase
Change-Id: I1dba0271fa9ef07b2cd30f99b4d05ead1740057b
Signed-off-by: Kacper Stojek <kacper.stojek@3mdeb.com>
2022-10-12 18:37:41 +02:00
Maciej Pijanowski 20b1863a02 meson: add ite_ec programmer
Change-Id: Ia72eea90cf0caa2890d93f344fb7eb531ec46e7a
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
2022-10-12 15:36:29 +02:00
Sergii Dmytruk 6e35b22fdf 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-10-12 15:36:01 +02:00
Michał Żygowski 5180d8bcfd 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-10-12 15:34:34 +02:00
Sergii Dmytruk c0565a0fa7 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-10-12 15:34:34 +02:00
Michał Żygowski e7451f0015 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-10-12 15:34:34 +02:00
Michał Żygowski 56b484af44 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-10-12 15:34:27 +02:00
Edward O'Callaghan 053d319141 flashrom.c: create is_internal_programmer() helper
As suggested by Angel Pons, add the function `is_internal_programmer`
to cut down on some pre-processor usage by moving it into the new
function.

The function then checks if the internal programmer is the
selected one. If the internal programmer is not built in, then it
just returns false.

Change-Id: I43243b990192077583a9a3a95d35844923d9c158
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/66684
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-10-10 04:20:13 +00:00
Nico Huber 5779452fcc manibuilder/apt-get: Drop apt-get dist-upgrade commands
Such invasive updates shouldn't be needed. And if, we'd notice.

Change-Id: I8915ad0f8b348c1bb532c261a73ea2ab6d602565
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67187
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-10-08 20:37:13 +00:00
Evan Benn 634da83f40 s25f.c: Fix undefined behaviour on shift
dev_id, a uint8_t, was shifted left by 24 bits. After promotion to int,
this results in shifting into the sign bit, which is undefined
behaviour. Cast to uint32_t to prevent the promotion to signed int.

BUG=None
BRANCH=None
TEST=None

Change-Id: I88188ef2ba2af919eeae9ba08916374d31d8b989
Signed-off-by: Evan Benn <evanbenn@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/68127
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
2022-10-08 20:29:47 +00:00
Jonathon Hall 7c40ba24fe flashrom.c: Remove custom mappers from opaque_master
No opaque masters have a custom mapper.  The returned chipaddr is not
fed back into the read/write/erase functions, so this would only be
useful for side effects.

Change-Id: I36f05154edda371b51f8ff416f019837ff1c243d
Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/68092
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-10-08 18:45:32 +00:00
Jonathon Hall a021cd0380 dummyflasher.c: Remove custom mapper from opaque_master
Dummy doesn't need a custom mapper on opaque_master; the returned
address is not used and the mapper has no side effects.

This is the only remaining opaque master with a custom mapper, so this
permits removing custom mapper support from opaque masters.

Change-Id: I76ae3e0c2e91ecba4fd320941bd1eff038050731
Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/68091
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-10-08 18:45:21 +00:00
Jonathon Hall 277b3fa670 ichspi: Do not attempt to map physical memory for hwseq
ICH hwseq does not need to actually mmap flash, and this fails for
flash chips >16 MB, since only the top 16 MB is mapped into the address
space.

Test: Read and write flash on ICH hwseq with 32 MB flash chip.

Change-Id: Ie698071c3181e988f10b750b0e50c9700efaa1a3
Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/68090
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-10-08 18:45:12 +00:00
Jonathon Hall 5afd4aeece drivers: Move (un)map_flash_region to par/spi/opaque_master
Move (un)map_flash_region function pointers from programmer_entry to
par_master, spi_master, and opaque_master.  This enables programmers to
specify a different mapper per bus, which is needed for the internal
programmer.  Mapping is closely tied to the way the memory is accessed
using the other functions in the bus master structs.

Validate that FWH/LPC programmers provide specialized mapping in
register_par_master(); this is needed for chips with
FEATURE_REGISTERMAP, which only exist on FWH or LPC buses.

programmer.c: Update comment in fallback_map(), NULL return is the
desired behavior.

Test: Read firmware on SB600 Promontory mainboard (requires physmap)
Test: Read firmware externally with ft2232_spi
Test: Read firmware on ICH hwseq, verify physmap still occurs

Change-Id: I9c3df6ae260bcdb246dfb0cd8e043919609b014b
Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
Co-Authored-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67695
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-10-08 18:45:03 +00:00
Edward O'Callaghan 67d5015617 drivers/: Make 'fallback_{un}map' the default unless defined
Drop the explicit need to specify the default 'fallback_{un}map'
callback function pointer from the 'programmer_entry' struct.
This is a reasonable default for every other driver in the tree
with only a select few exceptions [atavia, serprog, dummyflasher
and internal].

Thus this simplifies driver development and paves way
to remove the 'programmer' global handle.

Change-Id: I5ea7bd68f7ae2cd4af9902ef07255ab6ce0bfdb3
Signed-off-by: Edward O'Callaghan <quasisec@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67404
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: Angel Pons <th3fanbus@gmail.com>
2022-10-08 18:36:21 +00:00
Nikolai Artemiev 7e8d17a8bd cli_classic.c: Add error messages for invalid --wp-region use
Print errors if --wp-region is used without a layout file or the layout
file doesn't contain the region.

BUG=b:247055486
TEST=builds

Change-Id: Ie606ba7f8a423405099679ca62169c395d994b5d
Signed-off-by: Nikolai Artemiev <nartemiev@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67725
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
2022-09-30 00:29:09 +00:00
Nico Huber ad0ee5c606 manibuilder: Maintain list of broken images
Disable images that can't be built anymore by default. We keep them
listed, so existing images can still be used. Also add commands to
show and run all supposed-to-be working tags.

Change-Id: I0f0ffb6c5e28348656aac2ce265f8b1dc0e93362
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/66996
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
2022-09-27 13:52:13 +00:00
Nico Huber e9c63e2164 manibuilder/alpine: Disable https for Alpine 3.7 and 3.8
Alpine Linux 3.7 and 3.8 fell behind with their pre-installed cer-
tificates. Plus, there seems to be no way to override certificate
checks when downloading packages. Hence, disable https completely.

Change-Id: I49dc3a2a2d44f948182e7571f6289b74e6fa6eb4
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67186
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
2022-09-27 13:52:07 +00:00
Nico Huber c582ed5bcd mainbuilder/djgpp: Disable TLS verification for curl and Git
This image is based on an old unsupported SUSE version. The
ca-certificates don't get updates anymore.

Change-Id: Ie46e3772f030765d6abb092727e2fbed61d3d989
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67178
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
2022-09-27 13:51:59 +00:00
Nico Huber 79efb45da9 manibuilder: Switch Dockerfile.anita to Bullseye and Python 3
Basing the image on debian:stable turned out to be a bad idea once
stable switched to Bullseye. Instead of falling back to Buster, we
move forward to Bullseye and pin that version. Hopefully that works
for some years again.

With Bullseye it turned out to be easier to do things with Python 3,
so we use that now. To ease future changes, we use tinier RUN and ARG
steps which creates more intermediate images. Such intermediate images
can be reused if some later step is changed in the Dockerfile.

Change-Id: Ic064ddad807329a9bd81085775190615ad89273f
Signed-off-by: Nico Huber <nico.h@gmx.de>
Ticket: https://ticket.coreboot.org/issues/383
Reviewed-on: https://review.coreboot.org/c/flashrom/+/65633
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
2022-09-27 13:51:53 +00:00