summaryrefslogtreecommitdiffstats
path: root/flashrom.c
Commit message (Collapse)AuthorAgeFilesLines
* Flashrom only checks for very few chips if the erase workedCarl-Daniel Hailfinger2009-06-151-0/+88
| | | | | | | | | | | | | | | | | | | And even when it checks if the erase worked, the result of that check is often ignored. Convert all erase functions and actually check return codes almost everywhere. Check inside all erase_* routines if erase worked, not outside. erase_sector_jedec and erase_block_jedec have changed prototypes to enable erase checking. Uwe successfully tested LPC on an CK804 box and SPI on some SB600 box. Corresponding to flashrom svn r595. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Signed-off-by: Urja Rannikko <urjaman@gmail.com> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Split flashchips.h from flash.hCarl-Daniel Hailfinger2009-06-151-0/+1
| | | | | | | | | | | | | | Flash.h not only contains function prototypes and general settings, it also has a huge chunk of chip and vendor IDs in the middle. Split them out into a separate flashchips.h and adjust #include wherever needed. Corresponding to flashrom svn r594. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Urja Rannikko <urjaman@gmail.com> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Every SPI host controller implemented its own way to read flash chipsCarl-Daniel Hailfinger2009-06-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | This was partly due to a design problem in the abstraction layer. There should be exactly two different functions for reading SPI chips: - memory mapped reads - SPI command reads. Each of them should be contained in a separate function, optionally taking parameters where needed. This patch solves the problems mentioned above, shortens the code and makes the code logic a lot more obvious. Since open-coding the min() function leads to errors, include it in this patch as well. Corresponding to flashrom svn r589. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Ronald G. Minnich <rminnich@gmail.com>
* Flashrom does not honor argument ordering for operationsCarl-Daniel Hailfinger2009-06-121-2/+24
| | | | | | | | | | | | | | Not only does this violate the principle of least surprise, it also caused one bug where -Ewv was specified and the flash ended up being empty. Support only one operation at a time. As a side benefit, this allows us to clean up main() quite a bit. Corresponding to flashrom svn r585. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Tell the user about the beginning and end of the write operationPaul Fox2009-06-121-0/+2
| | | | | | | Corresponding to flashrom svn r582. Signed-off-by: Paul Fox <pgf@laptop.org> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Sometimes we want to read/write more than 4 bytes of chip content at onceCarl-Daniel Hailfinger2009-06-051-17/+30
| | | | | | | | | | | | | | | | | | | | Add chip_{read,write}n to the external flasher infrastructure which read/write n bytes at once. Fix a few places where the code used memcpy/memcmp although that is strictly impossible with external flashers. Place a FIXME in the layout.c code because usage is not totally clear and needs to be fixed to support external flashers. As a nice side benefit, we get a noticeable speedup for builtin flash reading which is now a memcpy() of the full flash area instead of a series of single-byte reads. Corresponding to flashrom svn r579. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Urja Rannikko <urjaman@gmail.com> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Add programmer-specific delay functionsCarl-Daniel Hailfinger2009-06-051-0/+10
| | | | | | | | | | | Add external programmer delay functions so external programmers can handle the delay on their own if needed. Corresponding to flashrom svn r578. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Urja Rannikko <urjaman@gmail.com>
* Use read_flash() when flash chip probe is forcedStephan Guilloux2009-06-011-29/+6
| | | | | | | Corresponding to flashrom svn r563. Signed-off-by: Stephan Guilloux <stephan.guilloux@free.fr> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Add a missing free() in read_flash()Stephan Guilloux2009-06-011-0/+1
| | | | | | | Corresponding to flashrom svn r562. Signed-off-by: Stephan Guilloux <stephan.guilloux@free.fr> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Only probe for chips with compatible bus protocolsCarl-Daniel Hailfinger2009-06-011-0/+50
| | | | | | | | | | | | | | | | | | It doesn't make sense to probe for SPI chips on a LPC host, nor does it make sense to probe for LPC chips on a Parallel host. This change is backwards compatible, but adding host protocol info to chipset init functions will speed up probing. Once all chipset init functions are updated and the Winbond W29EE011 and AMIC A49LF040A chip definitions are updated, the W29EE011 workaround can be deleted as the W29/A49 conflict magically disappears. Corresponding to flashrom svn r560. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Tested on real hardware and Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Add bus type support to the dummy external programmerCarl-Daniel Hailfinger2009-06-011-0/+2
| | | | | | | | | | | | | | | The syntax is explained in the man page. Example: flashrom -p dummy=lpc,fwh Tested, works perfectly. ;-) As a nice benefit, it allows easy testing of the "probe only compatible flashes" patch. Corresponding to flashrom svn r559. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Add IT87xx SPI as external flasher optionCarl-Daniel Hailfinger2009-05-311-1/+16
| | | | | | | | | | This is a fast way to test if a IT87xx board_enable() would work. Corresponding to flashrom svn r557. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Tested-by: Harald Gutmann <harald.gutmann@gmx.net> Acked-by: Harald Gutmann <harald.gutmann@gmx.net>
* A bunch of output beautifications and improvements, as well as doc fixesUwe Hermann2009-05-221-10/+19
| | | | | | | | | | | | | | | | | | | | | | | - Update manpage, we now report supported boards via -L. - Add some missing escaping for '-' characters in the manpage. Corresponding to flashrom svn r543. - Shorten some of the really long device names, so that -L output looks nicer. - Display a "table header" for all entries/columns in -L output. - Make -L output tabular for all lists for better readability. - Do not print "unknown XXXX SPI chip" entries in -L output. - And random other cosmetics... Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>
* Improve flashrom test report text a bitUwe Hermann2009-05-211-4/+6
| | | | | | | | | | | | - Mention that we'd like to have -V output for all operations which were tested by the user. - Mention that we'd like to know the exact mainboard vendor/name. Corresponding to flashrom svn r540. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Documentation improvements and small code/whitespace fixesUwe Hermann2009-05-191-7/+10
| | | | | | | Corresponding to flashrom svn r535. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Factor out fallback_map/unmap, most external programmers don't need and ↵Uwe Hermann2009-05-171-4/+4
| | | | | | | | | special handling here Corresponding to flashrom svn r531. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Various smaller flashrom improvementsUwe Hermann2009-05-171-0/+1
| | | | | | | | | | | | | | | | | | - Document new 'satasii' programmer in -L output and manpage. - Drop PCI_IO_BASE_ADDRESS, pci.h has such #defines already. - Beautify flashrom output and make it more consistent. - Same for the 'make' output (reordered some $CC parameters). Build-tested on i386, shouldn't break any builds, I think. - Some variable renaming and other cosmetic fixes. Corresponding to flashrom svn r529. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* This patch adds support for BIOS flashing on the all SiliconImage SATA ↵Rudolf Marek2009-05-171-0/+17
| | | | | | | | | | | | | controllers It was easy because 1) flashrom has now nice API 2) documentation is public on the web site Corresponding to flashrom svn r527. Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* List all boards which areUwe Hermann2009-05-161-7/+12
| | | | | | | | | | | | | | - Supported out of the box (no flash enables required) - Verifiably not yet working (unknown flash enable) Also, move some structs to flash.h in preparation for later wiki output support. Corresponding to flashrom svn r523. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Eliminate all 'inline's from the flashrom codeUwe Hermann2009-05-161-0/+52
| | | | | | | | | | | | They serve pretty much no purpose, compilers can optimize pretty much all of what we might mark as inline anyway, _and_ inlines are not enforced in any way by the compiler either. They're totally unneeded. Kill them. Corresponding to flashrom svn r522. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Drop unused/duplicated #includes and some dead codeUwe Hermann2009-05-161-2/+0
| | | | | | | | | Build-tested on 32bit x86. Corresponding to flashrom svn r521. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Introduce a type "chipaddr" to abstract the offsets within flash regionsCarl-Daniel Hailfinger2009-05-161-4/+3
| | | | | | | | | | | | | | | | | | | Use chipaddr instead of volatile uint8_t * because when we access chips in external flashers, they are not accessed via pointers at all. Benefits: This allows us to differentiate between volatile machine memory accesses and flash chip accesses. It also enforces usage of chip_{read,write}[bwl] to access flash chips, so nobody will unintentionally use pointers to access chips anymore. Some unneeded casts are removed as well. Grepping for chip operations and machine memory operations doesn't yield any false positives anymore. Compile tested on 32 bit and 64 bit Linux. Corresponding to flashrom svn r519. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Add generic 16 bit and 32 bit chip read/write emulation to the external ↵Carl-Daniel Hailfinger2009-05-161-4/+4
| | | | | | | | | | | | | flasher infrastructure The emulation works by splitting 32 bit accesses into 16 bit accesses and 16 bit accesses into to 8 bit accesses. That way, external flashers can mix and match the amount of emulation they need. Corresponding to flashrom svn r517. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Refactor parts of the 3COM NIC codeUwe Hermann2009-05-151-2/+4
| | | | | | | | | | | | | | | Move the reusable PCI specific parts into pcidev.c, they'll be usable for other NIC code (Realtek, VIA, ...) and also for SATA/IDE controller cards as external programmers (for every PCI device which can program EEPROMs basically). Also add print_supported_pcidevs() to show the supported PCI devices (currently only NICs, soon more) in the 'flashrom -L' output. Corresponding to flashrom svn r515. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* nic3com: allow selection of a particular PCI device to use as programmerChristian Ruppert2009-05-141-0/+3
| | | | | | | | | | | | Add support for users to specify a certain NIC via PCI bus:slot.func notation, in case there are multiple NICs in one system. Usage: flashrom -p nic3com=bb:ss.f Corresponding to flashrom svn r510. Signed-off-by: Christian Ruppert <spooky85@gmail.com> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Add support for 3COM NICs as "external programmer" and Atmel AT49BV512Uwe Hermann2009-05-131-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows flashrom to identify, read, write, erase and verify flash chips on (some) 3COM network cards. The patch uses the external programmer infrastructure, the network card is basically treated as an external flash programmer. Usage: $ ./flashrom -p nic3com flashrom v0.9.0-r498 Found NIC "3COM 3C905C: EtherLink 10/100 PCI (TX)" (10b7:9200), addr = 0xa400 Calibrating delay loop... OK. Found chip "Atmel AT49BV512" (64 KB) at physical address 0xffff0000. No operations were specified. $ ./flashrom -p nic3com -E flashrom v0.9.0-r498 Found NIC "3COM 3C905C: EtherLink 10/100 PCI (TX)" (10b7:9200), addr = 0xa400 Calibrating delay loop... OK. Found chip "Atmel AT49BV512" (64 KB) at physical address 0xffff0000. Erasing flash chip... SUCCESS. $ ./flashrom -p nic3com -wv backup.bin flashrom v0.9.0-r498 Found NIC "3COM 3C905C: EtherLink 10/100 PCI (TX)" (10b7:9200), addr = 0xa400 Calibrating delay loop... OK. Found chip "Atmel AT49BV512" (64 KB) at physical address 0xffff0000. Flash image seems to be a legacy BIOS. Disabling checks. Programming page: 1023 at address: 0x0000ffc0 Verifying flash... VERIFIED. $ ./flashrom -p nic3com -r backup.bin flashrom v0.9.0-r498 Found NIC "3COM 3C905C: EtherLink 10/100 PCI (TX)" (10b7:9200), addr = 0xa400 Calibrating delay loop... OK. Found chip "Atmel AT49BV512" (64 KB) at physical address 0xffff0000. Reading flash... done. I have tested this on actual hardware (see PCI IDs above) and all operations worked fine. Support for other 3COM cards will follow (I added some more which should be supportable by this code, but they're untested so far), as well as support for NICs from other vendors. The patch also adds support for the Atmel AT49BV512 which is soldered onto the 3COM NIC I used for testing. Corresponding to flashrom svn r499. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Mateusz Murawski <matowy@tlen.pl> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Print dummy programmer messages only if verbose mode is selectedCarl-Daniel Hailfinger2009-05-111-16/+16
| | | | | | | | | | | | Print the return value of dummy_chip_read[bwl]. Align entries in programmer_table. This is a cosmetic patch and has no effect on code flow. Corresponding to flashrom svn r495. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Ronald G. Minnich <rminnich@gmail.com>
* Abstract mapping/unmapping of flash regionsCarl-Daniel Hailfinger2009-05-111-18/+8
| | | | | | | | | | | | | | | | Flash mapping/unmapping was performed without an abstraction layer, so even the dummy flasher caused memory mappings to be set up. Add map/unmap functions to the external flasher abstraction. Fix a possible scribble-over-low-memory corner case which fortunately never triggered so far. With this patch, --programmer dummy works fine as non-root. Corresponding to flashrom svn r493. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Handle (un)locking of SST FWH chipsCarl-Daniel Hailfinger2009-05-111-0/+1
| | | | | | | | | | | | | | | | Add lock bit handling (printing, setting and checking) to SST FWH chips and abort any writes to locked sectors. Verbose mode gives you all the info. Normal mode only tells you of unlocking failed, but gives enough details to debug. Add a comment about flash register placement to flashrom.c. Thanks to Uwe for testing multiple iterations of this patch. Corresponding to flashrom svn r492. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Kill one superfluous variable and improve code readabilityCarl-Daniel Hailfinger2009-05-091-3/+2
| | | | | | | Corresponding to flashrom svn r489. 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>
* Fix Elan SC520 handlingCarl-Daniel Hailfinger2009-05-091-2/+1
| | | | | | | | | | | | | | | | | | Flashbase is a variable which should never be set outside chipset code. It is only used to calculate the base address of the flash space at exactly one location in the code. Setting flashbase during probe caused subsequent probes to fail unless special handling code was used. We had such code and it caused every probe except the first to fail on Elan SC520. Remove the superfluous flashbase assignment and simplify the rest of the code. Corresponding to flashrom svn r488. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Ronald G. Minnich <rminnich@gmail.com>
* Add a dummy external flasher which just prints each operationCarl-Daniel Hailfinger2009-05-091-0/+13
| | | | | | | | | | | | Usage: flashrom --programmer dummy This is a great way to test flashrom without root access. Corresponding to flashrom svn r483. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Add --programmer to help text and man pageCarl-Daniel Hailfinger2009-05-091-0/+1
| | | | | | | Corresponding to flashrom svn r481. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Add external flasher supportCarl-Daniel Hailfinger2009-05-081-81/+29
| | | | | | | | | | | | | | | | | - Read/write accesses through function pointers - Command line parameter for internal/external flasher - Board and chipset setup moved to internal init function - Shutdown stuff moved to internal shutdown function As a side benefit, this will allow us to undo chipset write enable during shutdown. Tested by Uwe on real hardware. Corresponding to flashrom svn r476. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Re-add a line which got deleted in r473 by accidentCarl-Daniel Hailfinger2009-05-081-0/+2
| | | | | | | Corresponding to flashrom svn r475. 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>
* Don't assume flash is accessible via MMIO for chips with no read functionCarl-Daniel Hailfinger2009-05-081-13/+37
| | | | | | | | | | | | | | | | Flashrom assumes that the flash chip contents are available via mmap if no read function is defined. This special case is handled in lots of places all over the code. Remove the special case and use the read_memmapped function. Not only does this allow us to fix a read bug in flashrom I recently uncovered on ICH SPI, it also allows us to add support for Paraflasher to flashrom. Corresponding to flashrom svn r473. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Always print the flashrom version as first output lineCarl-Daniel Hailfinger2009-05-071-1/+3
| | | | | | | | | Suggested by Peter Stuge. Corresponding to flashrom svn r471. 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>
* Flashrom 0.9.0Carl-Daniel Hailfinger2009-05-041-1/+1
| | | | | | | Corresponding to flashrom svn r454. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Peter Stuge <peter@stuge.se>
* Allow compilation on SolarisCarl-Daniel Hailfinger2009-05-011-7/+0
| | | | | | | | | | | | Fix compilation on Solaris and tell people how to compile flashrom on Solaris, Darwin/Mac OS X and DragonFly BSD. Thanks to Joerg Schilling and Patrick Georgi for the Solaris part. Corresponding to flashrom svn r452. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Peter Stuge <peter@stuge.se>
* Since the command line interface for flashrom will change for 1.0Carl-Daniel Hailfinger2009-05-011-0/+4
| | | | | | | | | | (all-caps or no-caps for short options, exclude range syntax, etc.) we should tell users in the man page and the usage message about this. Corresponding to flashrom svn r447. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Handle DragonFly BSD definitions in flash.hPatrick Georgi2009-04-281-2/+2
| | | | | | | | | | | There are still some tweaks necessary to get flashrom to build on DragonFly, but this helps a lot. Corresponding to flashrom svn r445. Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* MAX may already be definedUwe Hermann2009-04-241-0/+2
| | | | | | | | | Also, fix smaller cosmetics Corresponding to flashrom svn r442 and coreboot v2 svn r4205. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* 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>
* 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>
* Abstract mmap() in physmap.c and only open /dev/mem on the first physmap() callStefan Reinauer2009-01-261-40/+3
| | | | | | | | 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-261-3/+1
| | | | | | | | | 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>
* 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>
* Check all mmap() calls and print helpful Linux error messagePeter Stuge2009-01-231-7/+13
| | | | | | | 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>
* Always print address when verification fails, not only with -VPeter Stuge2009-01-131-4/+5
| | | | | | | Corresponding to flashrom svn r381 and coreboot v2 svn r3860. Signed-off-by: Peter Stuge <peter@stuge.se> Acked-by: Peter Stuge <peter@stuge.se>
OpenPOWER on IntegriCloud