aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Trivial README change Flashrom->flashromPeter Stuge2009-04-201-5/+5
| | | | | | | Corresponding to flashrom svn r433 and coreboot v2 svn r4141. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* MX25L1605 and 1635 accept Chip Erase opcodes 60 and C7Stephan Guilloux2009-04-191-2/+2
| | | | | | | Corresponding to flashrom svn r432 and coreboot v2 svn r4139. Signed-off-by: Stephan Guilloux <stephan.guilloux@free.fr> Acked-by: Peter Stuge <peter@stuge.se>
* Add MX25L1635D support, as discussed on #corebootStephan Guilloux2009-04-191-0/+13
| | | | | | | Corresponding to flashrom svn r431 and coreboot v2 svn r4138. Signed-off-by: Stephan Guilloux <stephan.guilloux@free.fr> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Add VIA PC3500G boardPeter Stuge2009-04-171-0/+14
| | | | | | | | | It has SPI flash behind ITE8716 on LPC. Corresponding to flashrom svn r430 and coreboot v2 svn r4132. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: illdred <illdred@gmail.com>
* Some coding style and consistency fixesUwe Hermann2009-04-158-46/+60
| | | | | | | Corresponding to flashrom svn r429 and coreboot v2 svn r4117. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Fix typoUwe Hermann2009-04-131-1/+1
| | | | | | | | | Add missing copyright year. Corresponding to flashrom svn r428 and coreboot v2 svn r4107. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Mention a few more flash chip packages in README/manpageUwe Hermann2009-04-112-6/+8
| | | | | | | Corresponding to flashrom svn r427 and coreboot v2 svn r4092. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Fix typoUwe Hermann2009-04-101-1/+1
| | | | | | | Corresponding to flashrom svn r426 and coreboot v2 svn r4089. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Various manpage / README fixesUwe Hermann2009-04-102-29/+35
| | | | | | | | | | | | | | - Improve description a bit, especially wrt chip packages and protocols. - Add some missing parameters to manpage option descriptions. - Remove long obsolete DoC support note. Corresponding to flashrom svn r425 and coreboot v2 svn r4088. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Fix the typo should indeed be a 0x2eMondrian nuessle2009-04-091-2/+1
| | | | | | | | | Tested on an iWILL DK8-HTX board. Corresponding to flashrom svn r424 and coreboot v2 svn r4086. Signed-off-by: Mondrian nuessle <nuessle@uni-hd.de> Acked-by: Ronald G. Minnich <rminnich@gmail.com>
* Board enable support for HP DL145 G3Mondrian Nuessle2009-03-301-0/+27
| | | | | | | | | | | This is a BCM5785 based machine, WP# and TLB# need to be deasserted using GPIO 2 and 5 from the PM registers of the southbridge. This is very similar to the x3455 implementation. Corresponding to flashrom svn r423 and coreboot v2 svn r4031. Signed-off-by: Mondrian Nuessle <nuessle@uni-hd.de> Acked-by: Peter Stuge <peter@stuge.se>
* Improve readability of Atmel AT45 commentsCarl-Daniel Hailfinger2009-03-191-27/+28
| | | | | | | | | | Move the Atmel AT45 comments about block and page sizes from the end of the struct to the individual struct members to improve readability. Corresponding to flashrom svn r422 and coreboot v2 svn r4020. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Peter Stuge <peter@stuge.se>
* This patch adds "high coreboot table support" to coreboot version 2Stefan Reinauer2009-03-172-8/+29
| | | | | | | | | | | | | | | | | | | Some bootloaders seem to overwrite memory starting at 0x600, thus destroying the coreboot table integrity, rendering the table useless. By moving the table to the high tables area (if it's activated), this problem is fixed. In order to move the table, a 40 bytes mini coreboot table with a single sub table is placed at 0x500/0x530 that points to the real coreboot table. This is comparable to the ACPI RSDT or the MP floating table. This patch also adds "table forward" support to flashrom and nvramtool. Corresponding to flashrom svn r421 and coreboot v2 svn r4012. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Peter Stuge <peter@stuge.se>
* FreeBSD definitions of (read|write)[bwl] collide with our ownCarl-Daniel Hailfinger2009-03-0617-348/+348
| | | | | | | | | | | | Before we attempt trickery, we can simply rename the accessor functions. Patch created with the help of Coccinelle. Corresponding to flashrom svn r420 and coreboot v2 svn r3984. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Idwer Vollering <idwer_v@hotmail.com> Acked-by: Patrick Georgi <patrick@georgi-clan.de>
* Reduce use of volatile variablesCarl-Daniel Hailfinger2009-03-061-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the conversion of flash chip accesses to helper functions, I spotted assignments to volatile variables which were neither placed inside the mmapped ROM area nor were they counters. Due to the use of accessor functions, volatile usage can be reduced significantly because the accessor functions take care of actually performing the reads/writes correctly. The following semantic patch spotted them (linebreak in python string for readability reasons, please remove before usage): @r exists@ expression b; typedef uint8_t; volatile uint8_t a; position p1; @@ a@p1 = readb(b); @script:python@ p1 << r.p1; a << r.a; b << r.b; @@ print "* file: %s line %s has assignment to unnecessarily volatile variable: %s = readb(%s);" % (p1[0].file, p1[0].line, a, b) Result was: HANDLING: sst28sf040.c * file: sst28sf040.c line 44 has assignment to unnecessarily volatile variable: tmp = readb(TODO: Binary); * file: sst28sf040.c line 43 has assignment to unnecessarily volatile variable: tmp = readb(TODO: Binary); * file: sst28sf040.c line 42 has assignment to unnecessarily volatile variable: tmp = readb(TODO: Binary); * file: sst28sf040.c line 41 has assignment to unnecessarily volatile variable: tmp = readb(TODO: Binary); * file: sst28sf040.c line 40 has assignment to unnecessarily volatile variable: tmp = readb(TODO: Binary); * file: sst28sf040.c line 39 has assignment to unnecessarily volatile variable: tmp = readb(TODO: Binary); * file: sst28sf040.c line 38 has assignment to unnecessarily volatile variable: tmp = readb(TODO: Binary); * file: sst28sf040.c line 58 has assignment to unnecessarily volatile variable: tmp = readb(TODO: Binary); * file: sst28sf040.c line 57 has assignment to unnecessarily volatile variable: tmp = readb(TODO: Binary); * file: sst28sf040.c line 56 has assignment to unnecessarily volatile variable: tmp = readb(TODO: Binary); * file: sst28sf040.c line 55 has assignment to unnecessarily volatile variable: tmp = readb(TODO: Binary); * file: sst28sf040.c line 54 has assignment to unnecessarily volatile variable: tmp = readb(TODO: Binary); * file: sst28sf040.c line 53 has assignment to unnecessarily volatile variable: tmp = readb(TODO: Binary); * file: sst28sf040.c line 52 has assignment to unnecessarily volatile variable: tmp = readb(TODO: Binary); The following semantic patch uses the spatch builtin match printing functionality by prepending a "*" to the line with the pattern: @@ expression b; typedef uint8_t; volatile uint8_t a; @@ * a = readb(b); Result is: HANDLING: sst28sf040.c diff = - tmp = readb(bios + 0x1823); - tmp = readb(bios + 0x1820); - tmp = readb(bios + 0x1822); - tmp = readb(bios + 0x0418); - tmp = readb(bios + 0x041B); - tmp = readb(bios + 0x0419); - tmp = readb(bios + 0x040A); } static __inline__ void unprotect_28sf040(volatile uint8_t *bios) @@ -49,13 +42,6 @@ static __inline__ void unprotect_28sf040 /* ask compiler not to optimize this */ volatile uint8_t tmp; - tmp = readb(bios + 0x1823); - tmp = readb(bios + 0x1820); - tmp = readb(bios + 0x1822); - tmp = readb(bios + 0x0418); - tmp = readb(bios + 0x041B); - tmp = readb(bios + 0x0419); - tmp = readb(bios + 0x041A); } static __inline__ int erase_sector_28sf040(volatile uint8_t *bios, It's arguably a bit easier to read if you get used to the leading "-" for matching lines. This patch was enabled by Coccinelle: http://www.emn.fr/x-info/coccinelle/ Corresponding to flashrom svn r419 and coreboot v2 svn r3973. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Joseph Smith <joe@settoplinux.org>
* Use helper functions to access flash chipsCarl-Daniel Hailfinger2009-03-0517-342/+372
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now we perform direct pointer manipulation without any abstraction to read from and write to memory mapped flash chips. That makes it impossible to drive any flasher which does not mmap the whole chip. Using helper functions readb() and writeb() allows a driver for external flash programmers like Paraflasher to replace readb and writeb with calls to its own chip access routines. This patch has the additional advantage of removing lots of unnecessary casts to volatile uint8_t * and now-superfluous parentheses which caused poor readability. I used the semantic patcher Coccinelle to create this patch. The semantic patch follows: @@ expression a; typedef uint8_t; volatile uint8_t *b; @@ - *(b) = (a); + writeb(a, b); @@ volatile uint8_t *b; @@ - *(b) + readb(b) @@ type T; T b; @@ ( readb | writeb ) (..., - (T) - (b) + b ) In contrast to a sed script, the semantic patch performs type checking before converting anything. Tested-by: Joe Julian Corresponding to flashrom svn r418 and coreboot v2 svn r3971. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: FENG Yu Ning <fengyuning1984@gmail.com>
* Add SST25VF040.REMS with TEST_OK_ PROBE READZheng Bao2009-02-251-0/+14
| | | | | | | Corresponding to flashrom svn r417 and coreboot v2 svn r3958. Signed-off-by: Zheng Bao <zheng.bao@amd.com> Acked-by: Peter Stuge <peter@stuge.se>
* SST29EE020A TEST_OK_ PROBE READ ERASE WRITEPeter Stuge2009-02-221-1/+1
| | | | | | | | | Report by Holger Mickler. Thanks! Corresponding to flashrom svn r416 and coreboot v2 svn r3956. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Fix broken flash chip base address logicPeter Stuge2009-02-091-1/+1
| | | | | | | | | | | | | Elan SC520 requries us to deal with flash chip base addresses at locations other than top of 4GB. The logic for that was incorrectly triggered also when a board had more than one flash chip. This patch will honor flashbase only when probing for the first flash chip on the board, and look at top of 4GB for later chips. Corresponding to flashrom svn r415 and coreboot v2 svn r3932. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Myles Watson <mylesgw@gmail.com>
* MSI MS-7046 board enablePeter Stuge2009-02-021-0/+22
| | | | | | | Corresponding to flashrom svn r414 and coreboot v2 svn r3927. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: David Tiemann <davidtiemann@gmail.com>
* Following patch fixes VIA SPI (VT8237S)Rudolf Marek2009-02-011-0/+1
| | | | | | | | | It needs to have opcodes initialized same way as ICH7. Corresponding to flashrom svn r413 and coreboot v2 svn r3926. Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Acked-by: Peter Stuge <peter@stuge.se>
* Factor out read and erase functions from flashrom main()Carl-Daniel Hailfinger2009-01-281-38/+57
| | | | | | | Corresponding to flashrom svn r412 and coreboot v2 svn r3923. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Peter Stuge <peter@stuge.se>
* Add VT8237A PCI IDPeter Stuge2009-01-261-0/+1
| | | | | | | Corresponding to flashrom svn r411 and coreboot v2 svn r3919. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Fix one dead increment and one dead assignment as found by clangPeter Stuge2009-01-262-2/+1
| | | | | | | | | Thanks Patrick! Corresponding to flashrom svn r410 and coreboot v2 svn r3918. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Driver for ST M29F002T/NT/BPeter Stuge2009-01-264-6/+116
| | | | | | | | | | | T/NT TEST_OK_ PROBE READ ERASE WRITE Test report from Julia. Thanks! Corresponding to flashrom svn r409 and coreboot v2 svn r3917. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Julia Longtin <juri@solarnetone.org>
* Fix copypaste error in r3913Peter Stuge2009-01-261-1/+1
| | | | | | | Corresponding to flashrom svn r408 and coreboot v2 svn r3916. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* SST25VF040B using 0x90 identification and AAI writePeter Stuge2009-01-263-0/+41
| | | | | | | | | | | | | SST AAI is Auto Address Increment writing, a streamed write to the flash chip where the first write command sets a starting address and following commands simply append data. Unfortunately not supported by Winbond SPI masters. From July 2008. Corresponding to flashrom svn r407 and coreboot v2 svn r3913. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Decode SST25VF040B status register, also from July 2008Peter Stuge2009-01-261-1/+26
| | | | | | | Corresponding to flashrom svn r406 and coreboot v2 svn r3912. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Intel Desktop Board D201GLYPeter Stuge2009-01-261-0/+14
| | | | | | | Corresponding to flashrom svn r405 and coreboot v2 svn r3911. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Winbond SuperIO SPI driverPeter Stuge2009-01-264-3/+218
| | | | | | | | | | Developed and tested to work on Intel D201GLY in July 2008. Tested by a helpful person on IRC whose name I've since forgotten. Sorry! Corresponding to flashrom svn r404 and coreboot v2 svn r3910. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Ward Vandewege <ward@gnu.org>
* Export Winbond SuperIO register access functions in board_enable.cPeter Stuge2009-01-262-5/+10
| | | | | | | Corresponding to flashrom svn r403 and coreboot v2 svn r3909. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Document exit() codes introduced in r3907Peter Stuge2009-01-262-0/+9
| | | | | | | Corresponding to flashrom svn r402 and coreboot v2 svn r3908. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Ward Vandewege <ward@gnu.org>
* exit(2) on /dev/mem open() failure and exit(3) on mmap() failurePeter Stuge2009-01-261-2/+2
| | | | | | | Corresponding to flashrom svn r401 and coreboot v2 svn r3907. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Ward Vandewege <ward@gnu.org>
* Add license header to physmap.c so everyone is happyPeter Stuge2009-01-261-0/+18
| | | | | | | | | :) Corresponding to flashrom svn r400 and coreboot v2 svn r3906. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Darwin / Mac OS XStefan Reinauer2009-01-264-5/+45
| | | | | | | | | | | Through DirectIO from coresystems GmbH we now support Darwin/Mac OS X. DirectIO is available at http://www.coresystems.de/en/directio Corresponding to flashrom svn r399 and coreboot v2 svn r3905. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Small cleanup in MakefilePeter Stuge2009-01-261-4/+5
| | | | | | | Corresponding to flashrom svn r398 and coreboot v2 svn r3904. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Abstract mmap() in physmap.c and only open /dev/mem on the first physmap() callStefan Reinauer2009-01-266-88/+71
| | | | | | | | Corresponding to flashrom svn r397 and coreboot v2 svn r3903. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Change flashrom.c:map_flash_registers() from int to voidPeter Stuge2009-01-262-4/+2
| | | | | | | | | The function exit()s on failure, and no callers check the return value. Corresponding to flashrom svn r396 and coreboot v2 svn r3901. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Forgot some things in r3899Peter Stuge2009-01-261-3/+3
| | | | | | | Corresponding to flashrom svn r395 and coreboot v2 svn r3900. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Little readability improvement in cbtable.c:coreboot_init()Peter Stuge2009-01-261-15/+13
| | | | | | | Corresponding to flashrom svn r394 and coreboot v2 svn r3899. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Change FreeBSD #ifdef into #if defined()Stefan Reinauer2009-01-261-1/+1
| | | | | | | Corresponding to flashrom svn r393 and coreboot v2 svn r3898. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Peter Stuge <peter@stuge.se>
* Make Makefile a bit more portablePeter Stuge2009-01-251-1/+1
| | | | | | | | | Shell echo doesn't always know -n. Corresponding to flashrom svn r392 and coreboot v2 svn r3897. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Add dry Am29F080B Am29LV081B SST39VF080 definitions per data sheetsPeter Stuge2009-01-251-0/+39
| | | | | | | Corresponding to flashrom svn r391 and coreboot v2 svn r3896. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Beautify flash chip ID verbose printout a little, always use %02xPeter Stuge2009-01-2513-13/+13
| | | | | | | Corresponding to flashrom svn r390 and coreboot v2 svn r3895. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Fix stupid off-by-one error in erase verificationPeter Stuge2009-01-251-1/+1
| | | | | | | | | As reported by Jody McIntyre. Thanks! Corresponding to flashrom svn r389 and coreboot v2 svn r3894. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* ST M50FW080 TEST_OK_ PROBE READ ERASE WRITEPeter Stuge2009-01-241-1/+1
| | | | | | | | | Report by Jody McIntyre. Thanks! Corresponding to flashrom svn r388 and coreboot v2 svn r3893. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* SST25VF080B TEST_OK_PROBEPeter Stuge2009-01-241-1/+1
| | | | | | | | | Report by Scaldov M.V. Thanks! Corresponding to flashrom svn r387 and coreboot v2 svn r3892. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Check all mmap() calls and print helpful Linux error messagePeter Stuge2009-01-234-7/+19
| | | | | | | Corresponding to flashrom svn r386 and coreboot v2 svn r3890. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
* Provide some hints for the user in case /dev/mem mmap failsPeter Stuge2009-01-221-0/+7
| | | | | | | | | Resolves #121 Corresponding to flashrom svn r385 and coreboot v2 svn r3889. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Fix ICH9 locking register address and add important debug outputFENG yu ning2009-01-181-12/+26
| | | | | | | | Corresponding to flashrom svn r384 and coreboot v2 svn r3869. Signed-off-by: FENG yu ning <fengyuning1984@gmail.com> Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: FENG yu ning <fengyuning1984@gmail.com>