1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 14:11:15 +02:00

dummyflasher: Enable higher frequency emulation, add docs and tests

The patch adds a section on a manpage to explain the freq
parameter in dummyflasher, and tests for various valid and invalid
values of freq parameter.

Co-developed-by: Anastasia Klimchuk <aklm@flashrom.org>
Co-developed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Change-Id: Iaca5d95f8f977bf0c2283c6458d8977e6ce70251
Signed-off-by: Anastasia Klimchuk <aklm@flashrom.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/84423
Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Anastasia Klimchuk
2024-09-19 18:22:54 +10:00
parent aa1189039e
commit 88d31fc1b4
5 changed files with 41 additions and 7 deletions

View File

@ -616,6 +616,18 @@ Example::
syntax where ``state`` is ``yes`` or ``no`` (default value). ``yes`` means active state of the pin implies that chip is
write-protected (on real hardware the pin is usually negated, but not here).
**Frequency**
Frequency can be specified in ``Hz`` (default), ``KHz``, or ``MHz`` (not case sensitive).
If ``freq`` parameter is passed in from command line, commands will delay for certain time before returning,
so that to emulate the requested frequency.
Valid range is [1Hz, 8000Mhz] and there is no delay by default.
The delay of an SPI command is proportional to the number of bits send over SPI bus in both directions
and is calculated based on the assumption that we transfer at 1 bit/Hz::
flashrom -p dummy:emulate=W25Q128FV,freq=64mhz
nic3com, nicrealtek, nicnatsemi, nicintel, nicintel_eeprom, nicintel_spi, gfxnvidia, ogp_spi, drkaiser, satasii, satamv, atahpt, atavia, atapromise, it8212 programmers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^