1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 15:12:36 +02:00

2243 Commits

Author SHA1 Message Date
Nico Huber
519be66fc5 Fix -Wsign-compare trouble
Mostly by changing to `unsigned` types where applicable, sometimes
`signed` types, and casting as a last resort.

Change-Id: I08895543ffb7a48058bcf91ef6500ca113f2d305
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/30409
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jacob Garber <jgarber1@ualberta.ca>
2019-07-31 08:26:59 +00:00
Elyes HAOUAS
ef78de4a21 cli_classic: Fix Memory leak
Found-by: scan-build 7.0.1-8
Change-Id: I84e642b57b95953f376569e443ef8d8eda7bf98f
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/34405
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-07-19 16:20:08 +00:00
Elyes HAOUAS
5800f5841d spi25: Remove dead increment
Value stored in 'pos' is never read.

Found-by: scan-build 7.0.1-8
Change-Id: I9a70593f182d7558e71e831fc2b834ac58a25b2a
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/34404
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-07-19 16:17:58 +00:00
Elyes HAOUAS
3384fb6dda pickit2_spi: Fix "dead" assignment
We never read the first 'ret'. Let's check the first 'ret'
and exit if it failed.

Also, print the version only when the command succeeded.

Found-by: scan-build 7.0.1-8
Change-Id: I4aac5e1f3bd0604b079e1fdd9b7f09f1f4fc2d7f
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/34403
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-07-19 16:17:44 +00:00
Hemanth Guruva Reddy
a136d425ce flashchips: Add Macronix MX25L51245G as known chip
MX25L51245G is identical to handling of MX66L51235F.

Change-Id: I964e630197e33d69b199fdfb8816f18e3112bbb1
Signed-off-by: Hemanth Guruva Reddy <meethemanth@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/34234
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-07-17 10:45:16 +00:00
Thomas Heijligen
b221cd7048 pickit2_spi: update to libusb1 and drop libusb0 dependency
TESTED: read, write, verify

Change-Id: Icfc5372aa1789d35ed22d68297d5e68a74d40388
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/32213
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-07-10 18:59:55 +00:00
Nico Huber
d2d3993a25 ichspi: Add Apollo Lake support
It's almost identical to 100 series PCHs and later. There are some
additional FREGs (12..15). To not clutter the `if` conditions further,
make more use of `switch` statements.

Tested on Kontron mAL10. Mark it as DEP as usually the last sector
is not covered by the descriptor layout and can't be read.

Change-Id: I1c464b5b3d151e6d28d5db96495fe874a0a45718
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/30995
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-07-06 17:23:53 +00:00
Nico Huber
3750986348 chipset_enable: Add Apollo Lake
It works the same as 100 series PCHs and on. The SPI device is at
0:0d.2, though. Mark as BAD until `ichspi` is revised.

Change-Id: I7b1ad402ba562b7b977be111f8cf61f1be50843a
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/30994
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2019-07-06 17:15:58 +00:00
Alan Green
908adf4589 flashchips.c: Make .tested lines consistent
As per comments on https://review.coreboot.org/c/flashrom/+/33833/, make
placement of spaces in .tested attributes with literal definitions
consistent.

Signed-off-by: Alan Green <avg@google.com>
Change-Id: I18118f9f1e858547170fda8412bf6769f5cdcf53
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33998
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
2019-07-05 22:48:40 +00:00
Alan Green
1f9cc7d899 flashchips.c: Sort file by vendor and model
For self-consistency, and to allow tools to assist with merging the
chromium fork of flashrom, sort the entries of flashchips.c. The file is
already largely sorted, though deviations have crept in over time.

This is a non-clever mostly ASCII-order sorting. It is not intended to
be permanent.

Change-Id: I75a99583592526f60ba5264e92391bf8b1213b20
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33931
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-07-05 22:48:18 +00:00
Patrick Rudolph
2d7ab6963c layout: Increase max rom layout size
When trying to flash a single FMAP region on VBOOT enabled boards the
default of 32 entries is to small to store all regions. Flashrom will
bail out with "Cannot add fmap entries to layout - Too many entries."

Increase the maximum rom layout size to 128 to support complex FMAPs.

Tested on coreboot's UP/squared mainboard using SF600.
With this patch it's possible to update a single FMAP region.

Change-Id: I68084b08f7b35a162b5f2d3109d82a8b63c194ff
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/34025
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
2019-07-04 18:48:31 +00:00
Alan Green
69146f70a6 flashchips.c: Format SFDP-capable chip entry
To allow automated tools to manipulate flashchips.c, make the definition
of SFDP-capable chip more consistent with other definitions. This
involves
- reordering fields to match both other entries and the definition of
  struct flashchip.
- reformatting comments to make them consistent with other entries.

Signed-off-by: Alan Green <avg@google.com>
Change-Id: I8708a11993822085b3e8d8c80532dfb935d39876
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33834
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
2019-07-04 04:32:50 +00:00
Alan Green
f29ea362bb flashchips.c: Make comment placement consistent
For consistency, move a comment about an entry from inside the open
brace to outside it.

Signed-off-by: Alan Green <avg@google.com>
Change-Id: Ie9a745b7e7dc752cfd6fc14ebeb04754179893c6
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33837
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
2019-07-04 04:32:22 +00:00
Alan Green
c1863cad84 flashchips.c: Fix field order
For consistency and in order to allow automated tools to work with
flashchips.c, put fields in the same order as they are defined in struct
flashchip, in flash.h

Signed-off-by: Alan Green <avg@google.com>
Change-Id: I5e0d81cb71b2c50ffeb9bb70267f16e9ac7a263c
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33833
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-07-04 04:31:57 +00:00
Alan Green
f5ad688f8b flashchips.c: Add comma after every .voltage attribute
To allow automated tools to manipulate flashchips.c, ensure that every
voltage attribute ends with a comma, even if it is the last member in
the definition.

Signed-off-by: Alan Green <avg@google.com>
Change-Id: Ie609d11ab846361f375f7b024d6ca55f83b01682
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33832
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
2019-07-04 04:30:42 +00:00
Alan Green
86bf6ab887 flashchips: Drop dead code of AT26DF321
The definition for the AT26DF321 has been commented out since it was
first added in 2008. The chip now appears to be obsolete, being marked
"obsolete" and unstocked at Digikey. It is also only referred to in
historical documents on the manufacturer's website (microchip.com).

To avoid further bitrot of this dead code, drop it.

Signed-off-by: Alan Green <avg@google.com>
Change-Id: Ib30b3a16f25de5def508d90ec9375563b1d4d384
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33836
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
2019-07-04 04:29:26 +00:00
Alan Green
fdf5da4397 flashchips.c: format block_erasers members
To allow automated tools to manipulate flashchips.c, ensure all
.block_erasers definitions have consistent formatting:
- start with the opening brace on a new line.
- ensure end brace indented exactly two tabs.

SFDP-capable chip is the one exception to this rule as it has an empty
block instead.

Signed-off-by: Alan Green <avg@google.com>
Change-Id: Ib168bdbbef4cf097109805de15c97ecc1f7915b3
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33831
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-07-03 13:08:52 +00:00
Alan Green
cbb85c0076 flashchips.c: Make end of line comments consistent
To allow automated tools to manipulate flashchips.c, make end of line
comment formatting more consistent. Specifically, this change moves the
comma from end of line to immediately after the field value, before the
commment.

Signed-off-by: Alan Green <avg@google.com>
Change-Id: Ic4f97454766eff640b26a6c6eca29dc56c34c444
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33830
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-07-02 09:49:26 +00:00
Alan Green
57938f8699 flashchips.c: ATMEL->Atmel for consistency
Replace the single instance where a vendor name was spelled
inconsistently.

Signed-off-by: Alan Green <avg@google.com>
Change-Id: I6478bc29f640f789f3b35e7b4816133f4a0d292e
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33829
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-07-02 09:46:38 +00:00
Alan Green
fa3fcd3ab3 flashchips.c: Make whitespace consistent
For consistency, and to make the file amenable to manipulation by tools,
use only tabs when indenting. Some previous changes had introduced
spaces for indenting.

Also ensure that every table entry is separated by a single blank line.

Signed-off-by: Alan Green <avg@google.com>
Change-Id: Ib2193798cc52641d6c443f8851903c749b31cb74
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33828
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-07-02 09:45:53 +00:00
David Tomaschik
f75d8c5587 Add support for MX25U25635F
This is a 256Kb part with support for JEDEC 4 byte addressing modes.
Tested successfully for probe/read.

Change-Id: I5bdcd32acd1942edf65e50bce0f81c836095ee8c
Signed-off-by: David Tomaschik <davidtomaschik@google.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33639
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-06-28 06:44:59 +00:00
Jacob Garber
0a0b45bba6 cli_classic: Remove old usage warnings
We are at version 1.1 now, and the user interface change in 0.9.6 was
to make setting the programmer mandatory. This was done all the way
back in 2012, so it is safe to remove these warnings now.

Change-Id: If1b379b7b8234d50a2f0a4f522f15820a1a6603c
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33815
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-06-28 06:42:41 +00:00
Nico Huber
deeac7e41a spi: Drop spi_controller type
Not needed anymore. Drop it fast before it encourages anyone to
violate layers again!

Change-Id: I8eda93b429e3ebaef79e22aba76be62987e496f4
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33651
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-06-27 10:25:15 +00:00
Nico Huber
959aafa53e spi25: Fix layering violation in probe_spi_rdid4()
Move the message to a lower level where we can do a more generic check
and don't need internal knowledge of the SPI-master driver.

Change-Id: Idd21d20465cb214f3ff5bf3267b9014f8beee3f3
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33650
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2019-06-27 10:24:47 +00:00
Jacob Garber
afc3ad6430 tree: Make internal variables static
All these variables are only used in the files they are defined in, so
they can be made static.

Change-Id: I1e55138adef540e9d3a2237aa5b289cb338c0608
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33747
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-06-26 07:25:01 +00:00
Jacob Garber
cd8aeba7f1 Makefile: Enable -Wmissing-prototypes
Change-Id: Ia2ea3dee11e505c04a9e7956417615e39d511886
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33670
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-06-23 21:40:20 +00:00
Jacob Garber
cf3976e658 tree: Remove unused functions with no prototypes
These functions are no longer used, or were never used in the first place.

generate_testpattern() - Introduced in commit eaac68bf8b, never used
list_programmers() - Introduced in commit 552420b0d6, never used
pci_dev_find_filter() - Prototype removed in commit 5c316f9549
erase_chip_jedec() - Usage and prototype removed in commit f52f784bb3
printlock_regspace2_blocks() - Introduced in commit ef3ac8ac17, never used
spi_write_status_enable() - Usage dropped in commit fcbdbbc0d4

Change-Id: I742164670521fea65ffa3808446594848ce63cec
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33669
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-06-23 21:40:09 +00:00
Jacob Garber
6c68363d0c tree: Include missing headers for function prototypes
These files all contain functions whose prototypes are in header files,
so make sure those header files are included.

Change-Id: I0189a1550bf90d4a0b87dcef9f8a8449590cc9d7
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33668
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-06-23 21:39:48 +00:00
Jacob Garber
beeb8bc925 tree: Make internal functions static
None of these functions are used outside of the files they are defined
in, so make them all static.

Change-Id: Ie9cbe12d289bcedacf2f1bf483ae64ef8039ccc1
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33667
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-06-23 21:39:31 +00:00
Nico Huber
cb44eb7dad bitbang_spi: Drop bitbang_spi_master_type
It only existed to make maintenance harder and waste our time.

Change-Id: I7a3b5d9ff1e99d2d4f873c6f19fb318f93762037
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33638
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-06-23 13:06:51 +00:00
Elyes HAOUAS
712ba3a065 ft2232_spi.c: Remove unneeded 'else'
'else' is not needed after a 'break' or 'return'.

Change-Id: Ia4762d0c0601d56528de56658b869b62fbe5b263
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33346
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-06-21 15:08:58 +00:00
Elyes HAOUAS
e276411e82 fmap.c: Remove unneeded 'else'
'else' is not needed after a 'break' or 'return'.

Change-Id: I5df4d8075be012b9edf7be520d611042d9945094
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33345
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-06-21 15:08:30 +00:00
Elyes HAOUAS
a67ac58dd7 dmi.c: Remove unneeded 'else'
'else' is not needed after a 'break' or 'return'.

Change-Id: I71ab1fec98c2b61d73aeb646ddfc810662d4136d
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33344
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-06-21 15:07:47 +00:00
Elyes HAOUAS
ec819d6ccc serprog.c: Remove unneeded 'else'
'else' is not needed after a 'break' or 'return'.

Change-Id: I9015020889c25ecbd391a18f56f99affc8ea307d
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33348
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-06-21 15:07:09 +00:00
Elyes HAOUAS
29e46d0aa6 ichspi.c: Remove unneeded 'else'
'else' is not needed after a 'break' or 'return'.

Change-Id: Ie000732158f27632ee92404c66a9aab43f3b374c
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33347
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-06-21 15:06:47 +00:00
Nico Huber
504215b9f6 spi25: Fix layering violation in default_spi_write_aai()
Change-Id: I8aa3e2992f64906edc669060936f9522d32637fb
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33649
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2019-06-21 12:00:34 +00:00
Nico Huber
477e1693c8 dediprog: Bail out on unsupported, long transfers
Change-Id: I7b16701597909c015f98199e73ebb7d923f2b072
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33614
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Reviewed-by: Ryan O'Leary
Reviewed-by: ron minnich <rminnich@gmail.com>
2019-06-21 11:54:37 +00:00
Nico Huber
d8b2e808cd spi: Move 16MiB partitioning up into spi_chip_read()
We enforced a 16MiB limit in spi_read_chunked() for multi-die flash
chips that can't be fully read at once. The same limit can be useful
for dediprog programmers. So move it into a more generic place.

Change-Id: Iab1fd5b2ea550b4b3ef3e8402e0b6ca218485a51
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33613
Reviewed-by: Ryan O'Leary
Reviewed-by: ron minnich <rminnich@gmail.com>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
2019-06-21 11:54:19 +00:00
Paul Menzel
0373ce31fe print: Update Asus URLs to use more secure HTTPS
Asus set up HTTPS for their site, and redirects to that by default. So,
use this by default, which also saves one redirect.

```
$ curl -I http://www.asus.com/
HTTP/1.1 301 Moved Permanently
Content-Length: 0
Location: https://www.asus.com/
Date: Wed, 04 Oct 2017 11:15:14 GMT
Connection: keep-alive
X-Akamai-Device-Characteristics: desktop
X-Akamai-Device-Model: ; ; cURL; cURL
```

Use the command below to change the occurrences.

```
sed -i 's,http://www.asus.com,https://www.asus.com,g' print.c
```

Change-Id: I62319bfbf39c73f98ed3f865a11f4fe870befee4
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/21874
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-06-21 11:51:30 +00:00
Nico Huber
5ca5523fd8 layout: Introduce layout_next_included()
Change-Id: Ib01c8af06c3f84eafbd585760e74c3c287b9fa7d
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33518
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2019-06-17 08:33:09 +00:00
Nico Huber
70461a9524 layout: Make romentry.name a pointer
This should provide more flexibility while we don't have to allocate
256B extra per layout entry.

Change-Id: Ibb903113550ec13f43cbbd0a412c8f35fe1cf454
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33515
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2019-06-17 08:32:43 +00:00
Nico Huber
4f213285d7 layout: Move generic layout functions into layout.c
Change-Id: If1edde70fc51e88e6e1c560d79a0d51941b9627c
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33514
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2019-06-17 08:31:18 +00:00
Nico Huber
2b94cdb5cb layout: Never use global layout directly
And rename it to `global_layout` to free `layout` as a local variable
name. We will get rid of the global layout entirely later.

Change-Id: Ia2d7d1f4f649cd239b559ba6a40ee0977004e774
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33513
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-06-17 08:31:07 +00:00
Arthur Heymans
b04fef91c1 layout.c: Don't use global variables for included regions
This removes the use of global variables for included region arguments
and also uses a linked list to store the arguments.

Change-Id: I6534cc58b8dcc6256c2730c809286d8083669a6c
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/31247
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-06-17 08:03:12 +00:00
Nico Huber
ee13d0c8fa libflashrom: Add CPP guard to fix big-endian builds
Calm a compiler warning on big-endian builds about the unused static
flashrom_layout_parse_fmap(). The guard is ugly but gets the job done.
We should forbid endian-specific code in the future, I guess.

Change-Id: Id3f4a57e027f88cc469ed50312adddcc8af71a63
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33306
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-06-14 16:02:45 +00:00
Patrick Rudolph
911b8d8bc4 cli: Add error on missing IFD
When no IFD is present, but the option --ifd is specified, flashrom would just
exit without printing a helpful error message.

Add error message that IFD could not be read or parsed.

Tested on Intel platform without IFD present.

Change-Id: Ie1edd7f36f647c52b17799878185d1e69e10d3b0
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33245
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-06-14 16:00:56 +00:00
Nico Huber
a724602fe0 Makefile: Also blacklist J-Link SPI for DOS
libjaylink will probably never be available.

Change-Id: Ie9222f82e16fe4c76fe7dd0f9aac7de6a862ab98
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33305
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-06-08 20:47:32 +00:00
Nico Huber
84c6fb5fe2 Makefile: Blacklist Digilent SPI (using USB) for DOS
Change-Id: I9a7dd5a2afcd12dd247e1f5534db61b79d77525e
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33304
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-06-08 20:47:02 +00:00
Nico Huber
129e938e4c ich_descriptors: Drop line numbering comments
Change-Id: Ia895e35edfc86b6955395c4570d67477da70e2c7
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/33256
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2019-06-07 12:32:14 +00:00
Arthur Heymans
32b9f5c665 layout.c: Use the libflashrom function for included arguments
Use the libflashrom function to determine whether included regions are
present in the layout file.

Change-Id: I5e9375baad763612e179262973413a7161acba8b
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/31244
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-06-06 16:18:02 +00:00