1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-26 22:52:34 +02:00

1920 Commits

Author SHA1 Message Date
Peter Stuge
27c3e2dc23 Probe_flash() cleanup for better code readability
Corresponding to flashrom svn r291 and coreboot v2 svn r3407.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-07-02 17:15:47 +00:00
Stefan Reinauer
4c390c8943 Set w39v080fa to fully supported
I'm am flashing this chip several times a day. Also enable unlocking
which is only needed when running coreboot, that slipped in the original
commit and through the original review ;-) So it must be trivial enough.

Corresponding to flashrom svn r290 and coreboot v2 svn r3406.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-07-02 13:33:09 +00:00
Peter Stuge
5b1488562d Update to TEST_OK for Winbond W39V040FA PROBE READ
Thanks to Jake for the test report!

Corresponding to flashrom svn r289 and coreboot v2 svn r3405.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-07-02 03:07:46 +00:00
Peter Stuge
11103091b4 Don't rm *~ in make clean, who knows what files that could be
Corresponding to flashrom svn r288 and coreboot v2 svn r3404.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-07-02 03:03:58 +00:00
Peter Stuge
00019d959a Unknown vendor:board message can be triggered by -m too
Thanks to Stefan for pointing this one out.

Corresponding to flashrom svn r287 and coreboot v2 svn r3403.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-07-02 00:59:29 +00:00
Peter Stuge
0b9c5f3d89 Case insensitive matching of vendor:board strings in coreboot table
Needed at least for GIGABYTE:m57sli in coreboot to match gigabyte:m57sli in
flashrom.

Corresponding to flashrom svn r286 and coreboot v2 svn r3402.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-07-02 00:47:30 +00:00
Stefan Reinauer
2cb94e183b First attempt to clean up SPI probing and create a common construct: the flash bus
At some point the flash bus will be part of struct flashchip.

Pardon me for pushing this in, but I think it is important to beware of further
decay and it will improve things for other developers in the short run.

Carl-Daniel, I will consider your suggestions in another patch. I want to keep
things from getting too much for now. The patch includes Rudolf's VIA SPI
changes though.

Corresponding to flashrom svn r285 and coreboot v2 svn r3401.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-06-30 23:45:22 +00:00
Rudolf Marek
e3eb9c1d69 Mine AMIC flash chip needs 4 bytes RDID
This enables to use the new probing code.

Corresponding to flashrom svn r284 and coreboot v2 svn r3400.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-30 21:48:54 +00:00
Rudolf Marek
48a85e497e Mine AMIC flash chip needs 4 bytes RDID
Following patch adds support for that.

Corresponding to flashrom svn r283 and coreboot v2 svn r3399.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-30 21:45:17 +00:00
Rudolf Marek
3fdbccf697 This patch adds support for VIA SPI controller on VT8237S
It is similar with few documented exceptions to ICH7 SPI controller.

Corresponding to flashrom svn r282 and coreboot v2 svn r3398.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-30 21:38:30 +00:00
Carl-Daniel Hailfinger
10693353ee Add a debug marker after ICH SPI opcode programming
Corresponding to flashrom svn r281 and coreboot v2 svn r3397.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-06-29 10:57:13 +00:00
Peter Stuge
7e2c079367 Fix ICH7 non-SPI that broke in r3393
r3393 assumed that ICH7 always used SPI. This patch resets ich7_detected back
to 0 when BOOT BIOS Straps indicate something else than SPI.

Also fixes a build error in ichspi.c with gcc 4.2.2.

Corresponding to flashrom svn r280 and coreboot v2 svn r3395.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-06-29 01:30:41 +00:00
Carl-Daniel Hailfinger
a0a791963b Use symbolic constants for PCI subsystem probing
Corresponding to flashrom svn r279 and coreboot v2 svn r3394.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-06-28 23:02:22 +00:00
Stefan Reinauer
a9424d597d Multiple unrelated changes
* ICH7 SPI support
* fix some variable names in ichspi.c (Offset -> offset)
* Dump ICH7 SPI bar with -V
* Improve error message in case IOPL goes wrong. (It might not even be an IOPL)

Corresponding to flashrom svn r278 and coreboot v2 svn r3393.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-27 16:28:34 +00:00
Stefan Reinauer
325b5d47d8 Indent according to development guidelines
Corresponding to flashrom svn r277 and coreboot v2 svn r3392.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-06-27 15:18:20 +00:00
Jens Kühnel
43b2281f51 Winbond W39V080FA: Probe and Read are OK
Corresponding to flashrom svn r276 and coreboot v2 svn r3390.

Signed-off-by: Jens Kühnel <coreboot@jens.kuehnel.org>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-06-26 11:57:27 +00:00
Peter Stuge
e9117f7b05 Test status OK for ST M50FW040 PROBE READ
Per test report from Alex Perez. Thanks Alex!

Corresponding to flashrom svn r275 and coreboot v2 svn r3389.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-24 08:18:13 +00:00
Peter Stuge
e27fc84234 Test status OK for Macronix MX25L8005 PROBE READ ERASE WRITE
Per test report from Andrew Paprocki. Thanks Andrew!

Corresponding to flashrom svn r274 and coreboot v2 svn r3388.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-24 04:17:14 +00:00
Peter Stuge
8653b00461 Increase delay in probe_jedec() after Product ID Entry to 10ms
We should follow data sheet timing, even if chips have been tested to answer
faster in the field.

Corresponding to flashrom svn r273 and coreboot v2 svn r3387.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-24 02:09:09 +00:00
Peter Stuge
da4e5f3623 Slight restructure of SPI probe_ functions
Preparation for a probe optimization patch. This patch does not change any
functionality. spi_probe_rdid was tested to still work on my M57SLI rev 2.

The idea is to have error checks return error immediately when something
fails, rather than having code inside an if block where the condition
tests for success.

This means: Less indentation, more clear what the code is checking.

Corresponding to flashrom svn r272 and coreboot v2 svn r3386.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Ward Vandewege <ward@gnu.org>
2008-06-24 01:22:03 +00:00
Uwe Hermann
f8a49fee02 Some flashrom documentation fixes, and removal of duplicated info
Corresponding to flashrom svn r271 and coreboot v2 svn r3385.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-06-22 18:50:25 +00:00
Peter Stuge
87d51fb0b7 A few changes were committed before the DoC remove, update README
Corresponding to flashrom svn r270 and coreboot v2 svn r3384.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-22 17:54:03 +00:00
Peter Stuge
db52c58e06 Remove dead M-Systems Disk on Chip code
DOC support has been disabled by default for many years. The write function
does nothing but print text. It has a call to write_page_md2802() commented
out, but that function does not exist. This is dead code with ugly #ifdefs.

Updates README to reflect that there was a time when there was code, but it
didn't work. Removes M-Systems #defines and also includes svn rm msys_doc.*

Corresponding to flashrom svn r269 and coreboot v2 svn r3382.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-06-22 17:06:41 +00:00
Peter Stuge
f1614e8d1c Update test status to TEST_OK_PREW for ST M50FLW080A and SST49LF008A
Many thanks to Julio Cesar Costa for the test report!

Corresponding to flashrom svn r268 and coreboot v2 svn r3379.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-22 02:04:49 +00:00
Peter Stuge
681b190842 Some Makefile cleaning
Corresponding to flashrom svn r267 and coreboot v2 svn r3378.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-22 02:00:39 +00:00
Peter Stuge
08c2b02273 Fix OBJS in Makefile to compile stm50flw0x0x.c like the others
Corresponding to flashrom svn r266 and coreboot v2 svn r3377.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-21 04:39:17 +00:00
Peter Stuge
cd35f779b2 Uppercase AMIC since that's what they write in datasheets
Corresponding to flashrom svn r265 and coreboot v2 svn r3376.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-21 04:23:10 +00:00
Peter Stuge
bc0d857228 Update comment to match delay change in probe_jedec() r3373
Corresponding to flashrom svn r264 and coreboot v2 svn r3375.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-21 01:02:20 +00:00
Peter Stuge
0a0a795131 Update test status for Atmel AT29C020 and SST29EE010
Thanks to Urja Rannikko for reporting test results with these flash chips.

Corresponding to flashrom svn r263 and coreboot v2 svn r3374.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-21 00:21:22 +00:00
Peter Stuge
6a9fd1dc8c Increase delay in probe_jedec() to 2ms to reliably detect AT29C020
Run time is increased a few 100ms but this is needed for reliability.
I consider this trivial.

Corresponding to flashrom svn r262 and coreboot v2 svn r3373.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-21 00:19:52 +00:00
Peter Stuge
cb5c211a48 Show expected and read byte on verify failure
Corresponding to flashrom svn r261 and coreboot v2 svn r3372.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-20 02:58:42 +00:00
Jens Kuehnel
b9f617448d Add support for AMIC Technology A49LF040A and do not probe W29EE011 anymore
Jens sent the first patch that added A49LF040A to flash.h and flashchips.c
using _jedec and _49lf040 functions.

An issue was found with probe_w29ee011() for the Winbond W29EE011, which
caused the A49LF040A to no longer respond to any commands.

Ward made a patch to disable probing by default for the W29EE011 following
some discussion. Using -c W29EE011 will make flashrom probe for the chip.

Peter did some more datasheet diving and found that the Pm49FL00x functions
suited this chip quite well because of the block locking registers in
A49LF040A, and finally tested PROBE READ ERASE WRITE to work on ALIX.3c3.

Ward confirmed that this works on alix.2c3 too.

Corresponding to flashrom svn r260 and coreboot v2 svn r3368.

Signed-off-by: Jens Kuehnel <coreboot@jens.kuehnel.org>
Signed-off-by: Ward Vandewege <ward@gnu.org>
Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Ward Vandewege <ward@gnu.org>
2008-06-18 13:36:34 +00:00
Peter Stuge
7ffbc6f94d Force read unknown flash chips
When flash chip detection fails, it is still useful and possible to read the
flash chip contents. If no flash chip is found in normal probes and the
-f -r -c CHIPNAME options are given, a successful probe for the specified
chip is forced, and then flashrom reads the flash chip using either the read
function for the specified chip, or if there is none, a simple memcpy().

The patch also moves the global variable int force in flashrom.c into main()
and passes it as a parameter to layout.c:show_id(), which was the only other
function that used the variable. This is needed to avoid confusion with the
new parameter int force which is added to flashrom.c:probe_flash() and used
to force probe success for the chip named in char *chip_to_probe.

Corresponding to flashrom svn r259 and coreboot v2 svn r3367.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Ward Vandewege <ward@gnu.org>
2008-06-18 02:08:40 +00:00
Peter Stuge
663f17197c Board enable and autodetection for GIGABYTE GA-7VT600
Uses the VT8237 ISA bridge with mainboard subsystem ID and Realtek 8139 with
mainboard subsystem ID for board detection.

Corresponding to flashrom svn r258 and coreboot v2 svn r3366.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Lyos Gemini Norezel <lyos.gemininorezel@gmail.com>
2008-06-13 01:39:45 +00:00
Peter Stuge
f42b4e2134 Add support for Amic Technology A29040B flash chip
PROBE READ tested by Lyos Gemini Norezel on BioStar P4M80-M4.

Corresponding to flashrom svn r257 and coreboot v2 svn r3365.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Lyos Gemini Norezel <lyos.gemininorezel@gmail.com>
2008-06-11 02:24:15 +00:00
Peter Stuge
4aa7156f07 Board enable and autodetection for BioStar P4M80-M4
Thanks to Reinder for clean room reverse engineering and data sheet diving!

This board is autodetected because there are some good BioStar subsystem IDs.
Matching uses onboard VT6420 SATA RAID with subsystem BioStar 3206 and
onboard UniChrome Pro IGP graphics with subsystem BioStar 1202.

Corresponding to flashrom svn r256 and coreboot v2 svn r3364.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Lyos Gemini Norezel <lyos.gemininorezel@gmail.com>
2008-06-11 02:22:42 +00:00
Peter Stuge
1dbb9af151 Mark SST SST49LF160C as fully supported.:
SST SST49LF160C is confirmed to work for PROBE READ ERASE WRITE, at least on
2 MCP55-based boards (gigabyte m57sli v1 and supermicro h8dmr).

On the m57sli board, it only works > 512K when booted into coreboot; the
proprietary bios seems to do something weird where it locks rom access down
to the first 512K of the chip.

Corresponding to flashrom svn r255 and coreboot v2 svn r3360.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-06-03 00:22:00 +00:00
Mart Raudsepp
1d3b063917 Revert r3357 and fix it as intended to (forgotten header commit instead of typo)
Corresponding to flashrom svn r254 and coreboot v2 svn r3358.

Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Acked-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
2008-05-27 23:51:55 +00:00
Mart Raudsepp
22e4d30333 Fix typo introduced in r3356 that breaks build
Corresponding to flashrom svn r253 and coreboot v2 svn r3357.

Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Acked-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
2008-05-27 22:20:30 +00:00
Peter Stuge
9c4fa0ebdd MX25L4005, S25FL016A, W39V040B, W39V080A, SST49LF008A tests
I have tested MX25L4005, S25FL016A and W39V080A myself.

Thanks also to the following testers:
SST49LF008A Bernhard M. Wiedemann
W39V040B Dan Lenski

Corresponding to flashrom svn r252 and coreboot v2 svn r3356.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-05-27 20:54:09 +00:00
Mart Raudsepp
9c0dbcc007 Mark SST49LF004A/B as tested
Tested by me on actual hardware (all operations) - Artec Group DBE62
with SST 49LF004B

Corresponding to flashrom svn r251 and coreboot v2 svn r3350.

Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Acked-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
2008-05-27 09:10:52 +00:00
Uwe Hermann
e4f1a4266f Mark the following chips as tested
- AMD Am29F040B
  - SST SST39SF020A
  - Winbond W29C020C
  - Winbond W29EE011
  - Winbond W49F002U

All of them tested by me on actual hardware (all operations).

Corresponding to flashrom svn r250 and coreboot v2 svn r3349.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-05-26 23:12:25 +00:00
Uwe Hermann
793bdcd71e A bunch of cosmetic improvements
- Fix typos and inconsistencies.
 - Drop duplicate line which tells us the chip name twice.
 - Also print the chip vendor, not only the name.

Corresponding to flashrom svn r249 and coreboot v2 svn r3348.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-05-22 22:47:04 +00:00
Uwe Hermann
bf579488a4 Mark more chips as tested (all operations), tested on ASUS P4B266
Corresponding to flashrom svn r248 and coreboot v2 svn r3347.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-05-22 21:26:42 +00:00
Uwe Hermann
93f66db149 Add support for the ASUS P4B266 board
Tested on actual hardware.

This patch add an ich_gpio_raise() function which can be re-used by other
board-specific funtions which need to raise GPIOs on ICHx southbridges.

This also fixes bug #7, see http://tracker.coreboot.org/trac/coreboot/ticket/7,
as it turned out the ICH2 (and other ICHx) code works fine.

Corresponding to flashrom svn r247 and coreboot v2 svn r3346.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Peter Stuge <peter@stuge.se>
2008-05-22 21:19:38 +00:00
Rudolf Marek
dcf4653088 Add support for Amic A25L40P SPI flash
Corresponding to flashrom svn r246 and coreboot v2 svn r3345.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-05-22 13:42:23 +00:00
Andriy Gapon
65c1b86fe7 Changes to make flashrom compile (and work) on FreeBSD
This patch addresses different argument order of outX() calls,
FreeBSD-specific headers, difference in certain type names and system
interface names, and also FreeBSD-specific way of gaining IO port
access.

Corresponding to flashrom svn r245 and coreboot v2 svn r3344.

Signed-off-by: Andriy Gapon <avg@icyb.net.ua>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-05-22 13:22:45 +00:00
Peter Stuge
cdbca5b23c Myles reported SST49LF080A status -> TESTED_PREW
Corresponding to flashrom svn r244 and coreboot v2 svn r3341.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Peter Stuge <peter@stuge.se>
2008-05-21 07:10:15 +00:00
Nikolay Petukhov
4784c47a88 Support Pm49FL004/2 Block Locking Registers
The PMC chips understand both LPC and FWH flash commands. When in FWH mode
(MSR_DIVIL_BALL_OPT(0x51400015) = 0x00000f7d on 5536 boards) the Block
Locking Registers by default lock the flash chip for write and erase - in
addition to any chipset write protection.

This patch adds unlock operations before Pm49FL004/2 write and erase, and
it includes an svn mv pm49fl004.c pm49fl00x.c

Thanks go to Nikolay for this patch.

Corresponding to flashrom svn r243 and coreboot v2 svn r3332.

Signed-off-by: Nikolay Petukhov <nikolay.petukhov@gmail.com>
Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Bari Ari <bari@onelabs.com>
2008-05-17 01:08:58 +00:00
Carl-Daniel Hailfinger
fc52409252 I looked at the datasheet and erase_sector_39sf020() is totally and completely wrong
It was a straight cut'n'paste from SST 28SF040 code and the person doing
the cut'n'paste didn't even bother to check the data sheet. The SST
39SF020 is completely incompatible with the 28SF040.

No need for replacement. According to the data sheet, standard JEDEC
commands will work and we have those commands in the tree already.

Corresponding to flashrom svn r242 and coreboot v2 svn r3331.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Joseph Smith <joe@settoplinux.org>
2008-05-16 21:11:53 +00:00