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
Carl-Daniel Hailfinger
1b18b3c076 ICH8 and ICH9 have an almost identical SPI interface, only the location of the SPIBAR differs
Add ICH8 support to the ICH9 code.

Corresponding to flashrom svn r241 and coreboot v2 svn r3327.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-05-16 14:39:39 +00:00
Dominik Geyer
f5430bde52 Add support for the Atmel AT25DF321 SPI flash (tested)
Change ST M25P32 status to tested.

Corresponding to flashrom svn r240 and coreboot v2 svn r3326.

Signed-off-by: Dominik Geyer <dominik.geyer@kontron.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-05-16 13:00:28 +00:00
Dominik Geyer
b46acba6e0 Add support for SPI chips on ICH9
This is done by using the generic SPI interface.

Corresponding to flashrom svn r239 and coreboot v2 svn r3325.

Signed-off-by: Dominik Geyer <dominik.geyer@kontron.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-05-16 12:55:55 +00:00
Carl-Daniel Hailfinger
337df1d618 IT8716F: Enable writes if decoding of any SPI addresses is enabled
Corresponding to flashrom svn r238 and coreboot v2 svn r3324.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>
2008-05-16 00:19:52 +00:00
Carl-Daniel Hailfinger
f43e6428db Print detailed status register information for SST25VF series flash
Corresponding to flashrom svn r237 and coreboot v2 svn r3323.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>
2008-05-15 22:32:08 +00:00
Carl-Daniel Hailfinger
0720292bd3 Lots of new SST flash chip IDs
Only a subset has been added to flashchips.c, but the IDs in flash.h
will make lookups easier if anybody wants to add support for them.

Corresponding to flashrom svn r236 and coreboot v2 svn r3321.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-05-15 03:24:43 +00:00
Carl-Daniel Hailfinger
42c5497180 Add support for the JEDEC RES
Add support for the JEDEC RES (Read Electronic Signature and Resume from
Powerdown) SPI command to identify older SPI chips which can't handle
JEDEC RDID.

Since RES gives a one-byte identifier which is shared among many
different vendors and even different sizes, we want to match RES as a
last resort if RDID returns 0xff 0xff 0xff.

Corresponding to flashrom svn r235 and coreboot v2 svn r3320.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>

This is a heavily reworked version of a patch by Fredrik Tolf, which was
Signed-off-by: Fredrik Tolf <fredrik@dolda2000.com>
2008-05-15 03:19:49 +00:00
Carl-Daniel Hailfinger
6dc1d3b8dc Add more infrastructure for flashrom ICH9 support
Corresponding to flashrom svn r234 and coreboot v2 svn r3314.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-05-14 14:51:22 +00:00
Claus Gindhart
a00e2a0edf Add the Intel 6300ESB as known chipset to the chipset struct enables
Corresponding to flashrom svn r233 and coreboot v2 svn r3310.

Signed-off-by: Claus Gindhart <claus.gindhart@kontron.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-05-14 12:22:38 +00:00
Carl-Daniel Hailfinger
09022e535f Fix crash caused by division by zero for unknown flash chips
Corresponding to flashrom svn r232 and coreboot v2 svn r3309.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-05-14 12:09:31 +00:00
Carl-Daniel Hailfinger
a758f5100d Check the JEDEC vendor ID for correct parity
Flash chips which can be detected by JEDEC probe routines all have
vendor IDs with correct parity. Use a parity check as additional hint
whether a vendor ID makes sense. Note: Device IDs have no parity
requirements whatsoever.

Corresponding to flashrom svn r231 and coreboot v2 svn r3308.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>
2008-05-14 12:03:06 +00:00
Carl-Daniel Hailfinger
4e84dfb784 Add lots of ATMEL SPI flash chips to flash.h
Add a few flashchips already mentioned in flash.h to flashchips.c

Corresponding to flashrom svn r230 and coreboot v2 svn r3306.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-05-14 04:27:02 +00:00
Carl-Daniel Hailfinger
bfe5b4ab74 Move all IT87xx specific SPI routines from spi.c to a separate file it87spi.c
No behavioural changes, but greatly improved SPI abstraction.

Corresponding to flashrom svn r229 and coreboot v2 svn r3305.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>
2008-05-13 23:03:12 +00:00
Carl-Daniel Hailfinger
d6cbf76ee5 Move the SPI #defines from spi.c to spi.h
This patch has no code changes.

Corresponding to flashrom svn r228 and coreboot v2 svn r3302.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>
2008-05-13 14:58:23 +00:00
Carl-Daniel Hailfinger
228231ff2c Change the SPI parts of flashrom to prepare for a merge of ICH9 SPI support
In theory, this patch has no behaviour changes.

Corresponding to flashrom svn r227 and coreboot v2 svn r3301.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>
2008-05-13 14:01:22 +00:00
Carl-Daniel Hailfinger
f51c92feb4 MX25L3205 and W25x40 have been confirmed to probe/read/erase/write OK by Harald Gutmann
SST39VF040 has been confirmed to probe OK by misi e.

Corresponding to flashrom svn r226 and coreboot v2 svn r3300.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-05-12 21:19:53 +00:00
Carl-Daniel Hailfinger
78c6dfe1f4 Add SST39VF512, SST39VF010, SST39VF040 support
The SST39LF series has the same IDs. Add short AMIC vendor ID to
flashrom.

Corresponding to flashrom svn r225 and coreboot v2 svn r3299.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>
2008-05-12 14:25:31 +00:00
Carl-Daniel Hailfinger
a5b8efd377 Improve flashrom SPI abstraction, second step
This paves the way to have a fully generic generic_spi_command without
knowledge about any SPI controller.

The third step would be calling SPI controller functions via a function
pointer.

Corresponding to flashrom svn r224 and coreboot v2 svn r3296.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>
2008-05-10 23:40:51 +00:00
Peter Stuge
fa8c550fb6 Rename generic_spi_*() functions to spi_*()
This is a very early step toward cleaning up SPI code in flashrom.

Corresponding to flashrom svn r223 and coreboot v2 svn r3295.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-05-10 23:07:52 +00:00
Claus Gindhart
2fd11d6a9b Probe for up to 3 flash chips
Currently there is an ongoing technology migration from LPC/FWH to SPI chips.
For this reason some boards have multiple chips of different technologies
onboard. This patch makes flashrom probe for up to 3 chips and if more than
one chip is found flashrom exits, asking the user to specify -c.

[root@localhost src]# ./flashrom
...
Multiple flash chips were detected: SST49LF008A M25P16@ICH9
Please specify which chip to use with the -c <chipname> option.
[root@localhost src]# 

Corresponding to flashrom svn r222 and coreboot v2 svn r3291.

Signed-off-by: Claus Gindhart <claus.gindhart@kontron.com>
Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Claus Gindhart <claus.gindhart@kontron.com>
2008-05-08 00:31:44 +00:00
Peter Stuge
1159d5864a Add a tested bitmap field to the flash chip table
Two bits indicate OK and BAD for each operation PROBE READ ERASE WRITE.
8 bits out of 32 are in use now. No bits set means nothing has been tested.
For chips with at least one operation that is not tested or not working, the
user is asked to email a report to a special email adress so that the table
can be updated.

All chips are TEST_UNTESTED for now.

Corresponding to flashrom svn r221 and coreboot v2 svn r3277.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-05-03 04:34:37 +00:00
Bari Ari
9477c4eca5 Enable ROM decode range to 1MB for vt8237r
Corresponding to flashrom svn r220 and coreboot v2 svn r3275.

Signed-off-by: Bari Ari <bari@onelabs.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-04-29 13:46:38 +00:00
Claus Gindhart
a7b3551bbc Separate ST M50FLW support from generic JEDEC code
The generic jedec.c does not work for the ST M50FLW flash devices,
because they need an unlock command first. For this reason, ST M50FLW
support is moved to a new HW support module, because any change in
jedec.c would bear the risk to cause problems with the already supported
devices.

It's already tested with ST M50FLW080A; the other chips of this family i
dont have available, so i couldnt test it.

Corresponding to flashrom svn r219 and coreboot v2 svn r3274.

Signed-off-by: Claus Gindhart <claus.gindhart@kontron.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-04-28 17:51:09 +00:00
Peter Stuge
f31104cf3b Handle NULL probe, erase and write function pointers in the flashchips table
The read pointer was already checked properly.

Corresponding to flashrom svn r218 and coreboot v2 svn r3273.

Signed-off-by: Peter Stuge <peter@stuge.se>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-04-28 14:47:30 +00:00
Claus Gindhart
ef300238b6 82802ab: touch only blocks that need updating
Flash pages, which where excluded from updating using the exclude or the
layout option, as well as areas, whose flash contents already contain
the desired data, will be skipped. These ensures absolute data security
of critical areas (BIOS boot block), e.g. against a sudden power off or
a CPU hangup during flashing. As a nice side effect, it speeds up the
flash process, if the BIOS to be flashed is very similar to the version
in flash.

Corresponding to flashrom svn r217 and coreboot v2 svn r3260.

Signed-off-by: Claus Gindhart <claus.gindhart@kontron.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-04-24 09:07:57 +00:00
Ed Swierk
47c94a5d48 ST M50FW016 and ST M50FW040 support the 82802ab command set, not jedec
Corresponding to flashrom svn r216 and coreboot v2 svn r3221.

Signed-off-by: Ed Swierk <eswierk@arastra.com>
Acked-by: Joseph Smith <joe@smittys.pointclark.net>
2008-04-07 22:33:33 +00:00
Carl-Daniel Hailfinger
b36a071717 Add ICH9 detection
Straight from the datasheet, untested.

Corresponding to flashrom svn r215 and coreboot v2 svn r3167.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-03-18 00:54:10 +00:00
Stefan Reinauer
c34ce2ecf7 Oops
Forgot to add the file.

Support for the Winbond W39V080FA series of chips. Support for flashing
on the Kontron 986LCD-M board.

Corresponding to flashrom svn r214 and coreboot v2 svn r3166.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-03-18 00:36:18 +00:00
Stefan Reinauer
ac37897259 Support for the Winbond W39V080FA series of chips
Support for flashing on the Kontron 986LCD-M board.

Corresponding to flashrom svn r213 and coreboot v2 svn r3165.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-03-17 22:59:40 +00:00
Stefan Reinauer
b7c8323399 Check whether SST FWH chip was successfully erased on flashchip -E, too
Corresponding to flashrom svn r212 and coreboot v2 svn r3153.

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-03-16 19:44:13 +00:00
Uwe Hermann
fc425e81ce Sort list of flash chips alphabetically, add comment
Corresponding to flashrom svn r211 and coreboot v2 svn r3152.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-03-16 02:06:25 +00:00
Stefan Reinauer
72123a5b07 Remove nasty warning that happened due to our vendor detection
Corresponding to flashrom svn r210 and coreboot v2 svn r3151.

mechanism.
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-03-15 23:41:19 +00:00
Uwe Hermann
7615868f0b Re-add code erroneously removed in r3140
Corresponding to flashrom svn r209 and coreboot v2 svn r3146.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-03-14 23:55:58 +00:00
Joseph Smith
1f3e530bea Changes M50FW080 to use 82802ab.c instead of jedec.c
This fixes the problem of not being able to erase the chip.

Corresponding to flashrom svn r208 and coreboot v2 svn r3145.

Signed-off-by: Joseph Smith <joe@smittys.pointclark.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-03-14 23:32:03 +00:00
Carl-Daniel Hailfinger
67f9ea3b71 Prepare for ICH7/ICH8 SPI support by adding some debugging for all ICH* chipsets
Functionality (except printing) should be unchanged.

Corresponding to flashrom svn r207 and coreboot v2 svn r3144.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>

Ward says:
This code detects the ICH8 chipset on my laptop, and it appears to use
SPI.

Acked-by: Ward Vandewege <ward@gnu.org>
2008-03-14 17:20:59 +00:00
Uwe Hermann
55bf8dfcab Fix broken flashrom build
Corresponding to flashrom svn r206 and coreboot v2 svn r3142.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-03-14 01:24:39 +00:00
Carl-Daniel Hailfinger
e7162b3680 Fix up one forgotten revert in r3140
Corresponding to flashrom svn r205 and coreboot v2 svn r3141.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-03-14 00:33:42 +00:00
Carl-Daniel Hailfinger
e7bcb19bf5 Revert the delete of 82802ab.c in r3137
Corresponding to flashrom svn r204 and coreboot v2 svn r3140.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
2008-03-14 00:02:25 +00:00
Uwe Hermann
eac1016437 Also print the chip vendor name in --list-supported output
Cosmetic changes in some files, partly bending the 80-characters-per-line
rule in this special case, as the 80-character-limited version looks
equally crappy even in an 80x25 console/xterm, so let's make it at least
look good in a high-resolution xterm.

Corresponding to flashrom svn r203 and coreboot v2 svn r3139.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-03-13 18:52:51 +00:00
Uwe Hermann
23c3d951b7 Also print the required -m option in --list-supported output
Corresponding to flashrom svn r202 and coreboot v2 svn r3138.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-03-13 18:41:07 +00:00
Carl-Daniel Hailfinger
fe7e929f49 Drop 82802ab.c as it is identical to sharplhf00l04.c
Corresponding to flashrom svn r201 and coreboot v2 svn r3137.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Peter Stuge <peter@stuge.se>
2008-03-13 12:43:31 +00:00
Uwe Hermann
7bd2f838c6 Drop the useless rom.layout file
It's just an example, likely never been used in the last few years, and
the contents are available in the README already anyway.

Corresponding to flashrom svn r200 and coreboot v2 svn r3134.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Ward Vandewege <ward@gnu.org>
2008-03-12 12:28:40 +00:00
Uwe Hermann
e5ac16445f Add --list-supported option which lists the supported ROM chips, chipsets, and mainboards
Corresponding to flashrom svn r199 and coreboot v2 svn r3133.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Ward Vandewege <ward@gnu.org>
2008-03-12 11:54:51 +00:00
Uwe Hermann
75f510768d Add missing license header to layout.c
The file was written by Stefan Reinauer for coresystems GmbH in 2005, as
confirmed on IRC.

Corresponding to flashrom svn r198 and coreboot v2 svn r3126.

Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-03-04 16:29:54 +00:00
Mart Raudsepp
faa62fb1ff Add board_enable for Artec Group DBE61 and DBE62
Also add a comment about NULL subsystem IDs leaving the board entry out
of auto-detection logic.

Corresponding to flashrom svn r197 and coreboot v2 svn r3110.

Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Acked-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
2008-02-20 11:11:18 +00:00
Clark Rawlins
02016f742c Fix compilation with custom CFLAGS
With this small change it is possible to build flashrom again when
specifying custom CFLAGS/LDFLAGS from the make command line like.

  make CFLAGS="..." LDFLAGS="..."

I need to do this when building flashrom in a cross compiler environment
like buildroot for a foreign target.

Corresponding to flashrom svn r196 and coreboot v2 svn r3102.

Signed-off-by: Clark Rawlins <clark@bit63.org>
Acked-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-02-14 23:22:20 +00:00
Mart Raudsepp
3697ac75d5 Further cleanups to enable_flash_cs5536
- Remove the "enable write to flash" message, as the caller appears to
   already report that.

 - Move the 'modprobe msr' suggestions to the first lseek64 error handling, as
   we get an error there already.

 - Rename a perror string from "read" to "read msr", as we use the latter
   already in this function for another read.

Corresponding to flashrom svn r195 and coreboot v2 svn r3101.

Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-02-11 14:32:45 +00:00
Luc Verhaegen
97866087ae Add board enable for VIA EPIA SP
Corresponding to flashrom svn r194 and coreboot v2 svn r3099.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Acked-by: Corey Osgood <corey.osgood@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>
2008-02-09 02:03:06 +00:00
Mart Raudsepp
e1344da898 Improve error handling and make RCONF_DEFAULT_MSR address be a constant
Also, move a big code comment to the top of enable_flash_cs5536().

Corresponding to flashrom svn r193 and coreboot v2 svn r3098.

Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-02-08 10:10:57 +00:00
Mart Raudsepp
0514a5f07a Write enable flash chips attached to CS3 of CS5536 chipsets (AMD Geode)
This implements support for devices using AMD Geode companion chip
CS5536 that have the Boot ROM on NOR flash that is directly connected to
FLASH_CS3 (Boot Flash Chip Select). We need to write enable it in the
NORF_CTL MSR register for flashrom to be able to write to it, including
JEDEC probe commands.

This patch allows us to stop using AMD gx_utils.ko for BIOS flashing on
the DBE61.

Corresponding to flashrom svn r192 and coreboot v2 svn r3097.

Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
2008-02-08 09:59:58 +00:00