summaryrefslogtreecommitdiffstats
path: root/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* Refine status register and lock printing of Atmel and AMIC SPI chipsCarl-Daniel Hailfinger2011-05-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add lock printing for AMIC A25L05PT, A25L05PU, A25L10PT, A25L10PU, A25L20PT, A25L20PU, A25L40PT, A25L40PU, A25L80P, A25L16PT, A25L16PU, A25L512, A25L010, A25L020, A25L040, A25L080, A25L016, A25L032, A25LQ032 to a25.c. Add lock printing for Atmel AT26DF081A, AT26DF161, AT26DF161A, AT26DF321. Move Atmel AT25*/AT26* lock related functions originally added in r1115 from spi25.c to at25.c. For SPI chips the lock printing was handled by one common function, but sharing a common function which only is a big switch() statement doesn't make sense, especially if we can define lock printing functions per flash chip anyway. The printlock function pointer in struct flashchip is used to print status register and locking information, and serves as replacement for implicit status register and lock printing during probe. That code will later be changed to store locking info in a machine- accessible data structure so flashrom can handle locked regions correctly. Corresponding to flashrom svn r1316. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
* Intel NIC with parallel flash supportCarl-Daniel Hailfinger2011-05-081-0/+9
| | | | | | | | | | Tested-by: Maciej Pijanka <maciej.pijanka@gmail.com> Corresponding to flashrom svn r1297. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Tested-by: Anton Kochkov <anton.kochkov@gmail.com> Acked-by: Anton Kochkov <anton.kochkov@gmail.com>
* Update port of flashrom package to Mac OS X using DirectHWStefan Reinauer2011-03-181-2/+2
| | | | | | | | | | http://www.coreboot.org/DirectHW Corresponding to flashrom svn r1282. Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>
* Fix and improve libpayload platform supportPatrick Georgi2011-03-081-2/+42
| | | | | | | | | | | | | | - Fix various minor compile issues (eg. include necessary standard headers) - Fix compilation of libpayload code paths - Provide libpayload support in Makefile - Add make target "libflashrom.a" which links non-CLI code to static library Corresponding to flashrom svn r1280. Signed-off-by: Patrick Georgi <patrick.georgi@secunet.com> Tested-with-DOS-crosscompiler-by: Idwer Vollering <vidwer@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Update the ITE IT8500 EC support to match the current state of the ↵David Hendricks2011-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | flashrom-chromium tree This code has been deployed and tested to work on the Cr-48. There are a few caveats, though: - The boot BIOS straps register must be modified to select LPC. This can be done with the "select_bbs.sh" script (Install iotools at http://code.google.com/p/iotools/ before using select_bbs). - It is very important to disable power management daemons before running flashrom on this EC. I commented out the brute force method we use in the Chromium OS branch that disables powerd, since IIRC Carl-Daniel has a better approach in the works. - Due to dependencies which may be introduced by the OEM/ODM EC firmware, the code is not guaranteed to work for anything other than the Cr-48. Corresponding to flashrom svn r1263. Signed-off-by: David Hendricks <dhendrix@google.com> Carl-Daniel comments: Code is not hooked up yet because probing needs to be sorted out. Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Support for Angelbird Wings PCIe SSD (solid-state drive)Carl-Daniel Hailfinger2011-02-041-0/+9
| | | | | | | | | | | | | | | It uses a Marvell 88SX7042 SATA controller internally which has access to a separate flash chip hosting the option ROM. Thanks to Angelbird Ltd for sponsoring development of this driver! I expect the code to work for that SATA controller even if it is not part of the Angelbird SSD. Corresponding to flashrom svn r1258. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
* Add support for Winbond W39V040FB and W39V040FCCarl-Daniel Hailfinger2010-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | Print lock status for all supported Winbond W39* chips: W39V040A, W39V040B, W39V040C, W39V040FA, W39V040FB, W39V040FC, W39V080A, W39V080FA, W39V080FA (dual mode). Fill in correct probe timing for Winbond W39V040C and W39V080FA. Please note that the W39V040B/W39V040FB pair has identical IDs, identical read/write/erase, but locking differs. Same applies to W39V040C/W39V040FC. This causes double detection on chipsets which support LPC and FWH, making flashing more difficult because the user has to select the correct chip. This is called the evil twin problem. A better evil twin handling (patch available) will resolve that problem. Corresponding to flashrom svn r1245. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
* Add support for the Open Graphics Project development card, OGD1, as a SPI ↵Mark Marshall2010-12-031-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | flash programmer The project is in the the process of designing and making a complete, open source, graphics card. More info at http://wiki.opengraphics.org. The first development card is a PCI add in card containing a couple of FPGAs and a couple of serial flash chips (amongst other things). The FPGAs are called XP10 and S3 (their part numbers). The XP10 contains its own flash and does not need to be programmed by flashrom - it ensures that the device can enumerate on the PCI bus without needing further configuration. The larger FPGA is the S3. This is configured from a large SPI flash (2 MBytes). The second SPI flash is used to store the VGA BIOS. It is smaller (128 KBytes). This patch adds support for programming either of the two SPI flash chips. The programmer device takes one configuration option which selects which of the two flash chips is accessed. This must be set to either "cprom" or "bprom". (The project refers to the two chips as "cprom" / "bprom", "s3" and "bios" are more readable alternatives). Add support for SST SST25VF010 (REMS). Mark SST SST25VF016B as tested for write. Corresponding to flashrom svn r1241. Signed-off-by: Mark Marshall <mark.marshall@csr.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Unify chip write functionsCarl-Daniel Hailfinger2010-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The currently used write functions (wrappers) all use helpers which perform the actual write (inner functions). The signature of the write wrappers is: int write_chip(struct flashchip *flash, uint8_t * buf); The signature of the inner write functions varied a lot. This patch changes them to: int write_part(struct flashchip *flash, uint8_t *src, int start, int len); Did you know that flashrom has only 8 inner write functions for all flash chips? write_page_write_jedec_common write_sector_jedec_common write_sector_28sf040 spi_chip_write_256_new spi_chip_write_1_new spi_aai_write_new write_page_82802ab write_page_m29f400bt Export all inner write functions. Change the function signature of wait_82802ab to eliminate single-use variables. Remove an error message in write_page_m29f400bt which was printed for every byte written regardless of success. Add sharplhf00l04.c to the list of flash chip drivers in the Makefile. While the functions in there are unused, I suspect we will need them later, and by hooking the file up we ensure that compilation won't break. Corresponding to flashrom svn r1208. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Increase flashrom release number to 0.9.3Carl-Daniel Hailfinger2010-10-081-1/+1
| | | | | | | Corresponding to flashrom svn r1204. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Multiple unrelated changesCarl-Daniel Hailfinger2010-10-081-15/+15
| | | | | | | | | | | | | | | CONFIG_BITBANG_SPI was not selected if CONFIG_NICINTEL_SPI was on by default. Wiki output was missing all flash chips if CONFIG_INTERNAL was not selected. Use correct type for toupper()/tolower()/isspace() functions. Specify software requirements in a generic way. Non-x86 compilation does not work with the default programmer set, so list the make parameters which result in a working build. Corresponding to flashrom svn r1203. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
* Rename Direct I/O library to DirectHWCarl-Daniel Hailfinger2010-10-061-0/+1
| | | | | | | | | | | | | The Direct I/O library for Mac OS X is now called DirectHW to make sure people can find it via an internet search. DirectIO was a generic name for a concept and thus not a good distinguisher for a library. Corresponding to flashrom svn r1198. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Idwer Vollering <vidwer@gmail.com>
* Add Intel Gigabit NIC SPI flashing supportIdwer Vollering2010-09-031-0/+13
| | | | | | | | | | | | | | | | | | | | Tested on a 82541PI (0x8086, 0x107c) using 32-bit hardware. The last line in nicintel_request_spibus() could be changed so that FL_BUSY is used instead. Shortened sample log: [...] Found "Intel 82541PI Gigabit Ethernet Controller" (8086:107c, BDF 01:03.0). Found chip "ST M25P10.RES" (128 KB, SPI) at physical address 0xfffe0000. Multiple flash chips were detected: M25P05.RES M25P10.RES Please specify which chip to use with the -c <chipname> option. [...] Corresponding to flashrom svn r1151. Signed-off-by: Idwer Vollering <vidwer@gmail.com> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Compile gfxnvidia by default, but disallow write/eraseCarl-Daniel Hailfinger2010-07-291-2/+2
| | | | | | | Corresponding to flashrom svn r1117. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Add Nvidia nForce MCP61/MCP65/MCP67/MCP78S/MCP73/MCP79 SPI flashing supportCarl-Daniel Hailfinger2010-07-281-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Huge thanks go to Michael Karcher for reverse engineering the interface and to Johannes Sjölund for testing the first iterations of my patch on his hardware until it worked. Thanks to the following testers of the patch: * MCP61, 10de:03e0, LPC OK, ECS Geforce6100SM-M, Andrew Cleveland * MCP61, 10de:03e0, LPC OK, Biostar NF520-A2 NF61D-A2, Vitaliy Buchynskyy * MCP65, 10de:0441, SPI OK, MSI MS-7369 K9N Neo-F v2, Kjell Braden * MCP65, 10de:0441, SPI OK, MSI MS-7369, Wolfgang Schnitker * MCP65, 10de:0441, SPI OK, MSI MS-7369, Johannes Sjölund * MCP65, 10de:0441, SPI OK, MSI MS-7369, Melchior Franz * MCP78S, 10de:075c, SPI OK, Asus M3N78 PRO, Brad Rogers * MCP78S, 10de:075c, SPI OK, Asus M3N78-VM, Marcel Partap * MCP78S, 10de:075c, SPI OK, Asus M4N78 PRO, Kimmo Vuorinen * MCP78S, 10de:075c, SPI OK, Asus M4N78 PRO, Vikram Ambrose * MCP79, 10de:0aad, SPI OK, Acer Aspire R3600, Andrew Morgan * MCP79, 10de:0aae, LPC ??, Lenovo Ideapad S12 laptop, Christian Schmitt * MCP79, 10de:0aae, SPI OK, Apple iMac9,1 Mac-F2218EA9, David "dledson" flashrom will refuse to write/erase for safety reasons if MCP6x/MCP7x SPI is detected. Corresponding to flashrom svn r1113. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Add support for RayeR SPIPGM hardware as described in ↵Carl-Daniel Hailfinger2010-07-211-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | http://rayer.ic.cz/elektro/spipgm.htm To use the RayeR driver, run flashrom -p rayer_spi -V Known bugs/limitations: - Won't compile/work on non-x86 architectures. - Will always use direct port I/O access. Log follows: flashrom v0.9.2-r1039 on MS-DOS 7 (i686), built with libpci 3.1.5, GCC 4.3.2, little endian Calibrating delay loop... OK. Initializing rayer_bitbang_spi programmer Using port 0x378 as I/O base for parallel port access. ... Probing for Macronix MX25L1605, 2048 KB: probe_spi_rdid_generic: id1 0xc2, id2 0x2015 ... Found chip "Macronix MX25L1605" (2048 KB, SPI) at physical address 0xffe00000. ... No operations were specified. Corresponding to flashrom svn r1093. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Martin Rehak <rayer@seznam.cz> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
* Add OpenBSD supportCarl-Daniel Hailfinger2010-07-021-0/+8
| | | | | | | | | | | | | | Add a requirements section to the man page which lists the needed access permissions for each programmer. This feature needs my pciutils/libpci 8/16-bit write emulation patch at http://marc.info/?l=openbsd-ports&m=127780030728045 titled [PATCH] Fix pciutils non-32bit PCI write on OpenBSD Corresponding to flashrom svn r1067. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stuart Henderson <sthen@openbsd.org>
* Work around shadowing warnings in libpci headersCarl-Daniel Hailfinger2010-06-251-1/+3
| | | | | | | | | | This is needed for warning-free compilation on older gcc versions (3.x and probably older). Such a gcc version is the default on i386 OpenBSD. Corresponding to flashrom svn r1061. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stuart Henderson <sthen@openbsd.org>
* Makefile: detect unsupported configuration optionsCarl-Daniel Hailfinger2010-06-141-5/+35
| | | | | | | | | | | | | | Detect incompatible CONFIG_FOO=yes for the specified target and refuse to compile with a meaningful error message. Set the default for incompatible CONFIG_FOO to no. Just running "make" should result in a a build which compiles the common subset of available and working features. Corresponding to flashrom svn r1048. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Idwer Vollering <vidwer+lists.flashrom@gmail.com>
* Handle OS where executables have a hardcoded suffix, e.gCarl-Daniel Hailfinger2010-06-141-19/+21
| | | | | | | | | | DOS with .exe This ensures that any temp files in the configure/check step of the Makefile are removed correctly. Corresponding to flashrom svn r1047. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Idwer Vollering <vidwer+flashrom@gmail.com>
* We already have NEED_PCI in the Makefile to link in PCI supportCarl-Daniel Hailfinger2010-06-141-12/+12
| | | | | | | | | | | | Add NEED_SERIAL and NEED_NET to decouple individual drivers from compilation and linking decisions. Move libgetopt from a DOS+PCI dependency to a DOS dependency to fix linking on DOS if no driver requiring PCI is enabled. Corresponding to flashrom svn r1044. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* National Semiconductor DP83815/DP83816 and DP83820 NIC programmer supportAndrew Morgan2010-06-071-0/+9
| | | | | | | | | | Some instability remains, but that may be due to hardware problems in the specific card (Netgear FA311) used for testing. Corresponding to flashrom svn r1039. Signed-off-by: Andrew Morgan <ziltro@ziltro.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Create dependencies on the fly rather than in a separate stepStefan Reinauer2010-06-071-9/+6
| | | | | | | Corresponding to flashrom svn r1034. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Fix libpci linkage on NetBSDCarl-Daniel Hailfinger2010-06-041-2/+4
| | | | | | | | | | | | | | NetBSD needs libpciutils (which is called libpci on pretty much every other platform and lives in the pciutils package) and apparently the libpciutils on NetBSD needs the NetBSD-native libpci (no equivalent on other platforms). Thanks to Jonathan A. Kollasch for reporting. Corresponding to flashrom svn r1033. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
* Internal: introduce processor enables and abort if top/bottom alignment is ↵Carl-Daniel Hailfinger2010-06-041-1/+1
| | | | | | | | | | | | | | | | unknown The internal programmer needs correct information about flash_base and chip window top/bottom alignment on non-x86 before it can be used. Abort any internal programmer action for now until the code is fixed. Add the concept of a processor enable for systems where flashing is impacted by processor settings or processor model. Corresponding to flashrom svn r1031. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Make the 'flashrom --help' output look a bit nicerUwe Hermann2010-06-041-1/+1
| | | | | | | | | | | | | | | | | | Only print "flashrom" as the program name unconditionally, not the full path and program name (e.g. "/home/foo/bar/baz/flashrom" or on Windows "C:\Foo\Bar\Whatever\flashrom.exe"). The path or exact executable name is not really useful to print here, if you managed to run --help you already know it, and it just makes the output look ugly. Also, add a missing newline to make the output look nicer. Finally, revert the "CONFIG_PRINT_WIKI ?= yes" change which accidentally slipped into r1029. Corresponding to flashrom svn r1030. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Fix URLs for GIGABYTE motherboardsPeter Lemenkov2010-06-041-1/+1
| | | | | | | Corresponding to flashrom svn r1029. Signed-off-by: Peter Lemenkov <lemenkov@gmail.com> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* So far, we have up to 4 different names for the same thing (ignoring ↵Carl-Daniel Hailfinger2010-05-311-21/+21
| | | | | | | | | | | | | | | | | | | | | | capitalization) CONFIG_FT2232SPI (makefile config option) FT2232_SPI_SUPPORT (#define) ft2232spi (programmer name) ft2232_spi.c (programmer file) Use CONFIG_* with underscores for makefile config options and #defines and kill the useless _SUPPORT idiom. Use lowercase names with underscores for programmer names and programmer files. With this, you can run "grep -i ft2232_spi" and find everything related to the ft2232_spi driver. Same applies to all other programmers. Corresponding to flashrom svn r1023. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Add flashrom.exe unconditionally to the list of files removed at make cleanCarl-Daniel Hailfinger2010-05-301-1/+3
| | | | | | | | | | | This allows users to run make clean without specifying the target architecture. Corresponding to flashrom svn r1022. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Idwer Vollering <vidwer@gmail.com> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Handle the following architectures in generic flashrom codeCarl-Daniel Hailfinger2010-05-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - x86/x86_64 (little endian) - PowerPC (big endian) - MIPS (big+little endian) No changes to programmer specific code. This means any drivers with MMIO access will _not_ suddenly start working on big endian systems, but with this patch everything is in place to fix them. Compilation should work on all architectures listed above for all drivers except nic3com and nicrealtek which require PCI Port IO which is x86-only for now. To compile without nic3com and nicrealtek, run make distclean make CONFIG_NIC3COM=no CONFIG_NICREALTEK=no Thanks to Misha Manulis for testing early versions of this patch on PowerPC (big endian) with the satasii programmer. Thanks to Segher Boessenkool for design review and for helping out with compiler tricks and pointing out that we need eieio on PowerPC. Thanks to Vladimir Serbinenko for compile testing on MIPS (little endian) and PowerPC (big endian) and for runtime testing on MIPS (little endian). Thanks to David Daney for compile testing on MIPS (big endian). Thanks to Uwe Hermann for compile and runtime testing on x86_64. DO NOT RUN flashrom ON NON-X86 AFTER APPLYING THIS PATCH! This patch only provides the infrastructure, but does not convert any drivers, so flashrom will compile, but it won't do the right thing on non-x86 platforms. Corresponding to flashrom svn r1013. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Misha Manulis <misha@manulis.com> Acked-by: Vladimir 'phcoder/φ-coder' Serbinenko <phcoder@gmail.com> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Segher Boessenkool <segher@kernel.crashing.org>
* Support for Realtek RTL8139 network card flashingJoerg Fischer2010-05-211-0/+9
| | | | | | | Corresponding to flashrom svn r1002. Signed-off-by: Joerg Fischer <turboj@gmx.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Increase flashrom release number to 0.9.2Carl-Daniel Hailfinger2010-05-191-1/+1
| | | | | | | | | | Corresponding to flashrom svn r1000. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> Acked-by: Luc Verhaegen <libv@skynet.be> Acked-by: Uwe Hermann <uwe@hermann-uwe.de>
* Fix assorted documentation, frontend and printing bugsCarl-Daniel Hailfinger2010-05-151-1/+1
| | | | | | | | | | Change the command line interface to make file names positional. Add more sanity checks to the command line parser. Corresponding to flashrom svn r998. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
* Fix the DOS portRudolf Marek2010-04-251-4/+0
| | | | | | | | | | | | Now the DS selector limit is set to 4GB and all mmio accesses goes through DS, the 1:1 mapping is fixed so the _DS base is taken onto account. Plus is that the hwaccess.c needs no change and memcpy etc can be used on mmaped space. Corresponding to flashrom svn r995. Signed-off-by: Rudolf Marek <r.marek@assembler.cz> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Add runtime and build environment info to the flashrom version messageCarl-Daniel Hailfinger2010-03-271-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch uses code from Idwer Vollering and Maciej Pijanka. I've added Makefile support and compiler version printing and restructured the code heavily. The code prints runtime system information and buildtime libpci information (I couldn't find any runtime libpci version function). Due to our ability to cross-compile flashrom, buildtime system information from "uname -mrs" doesn't help diagnosing any problems. That's why only libpci and gcc are buildtime info, and the rest is runtime info. Examples: openSUSE 10.3, i686, gcc 4.2.1, with PCI support: flashrom v0.9.1-r971 on Linux 2.6.22.19-0.2-default (i686), built with libpci 2.2.6, GCC 4.2.1 (SUSE Linux) openSUSE 10.3, i686, llvm-clang-2.6.99svn97231, with PCI support: flashrom v0.9.1-r971 on Linux 2.6.22.19-0.2-default (i686), built with libpci 2.2.6, LLVM 1/clang 1 openSUSE 11.1, x86_64, gcc 4.3.2, with PCI support: flashrom v0.9.1-r972 on Linux 2.6.27.29-0.1-default (x86_64), built with libpci 3.0.1, GCC 4.3.2 [gcc-4_3-branch revision 141291] openSUSE 10.3, i686, gcc 4.2.1, without PCI support: flashrom v0.9.1-r971 on Linux 2.6.22.19-0.2-default (i686), built with GCC 4.2.1 (SUSE Linux) Windows/cygwin, i686, gcc 4.3.4, without PCI support: flashrom v0.9.1-r973 on CYGWIN_NT-5.1 1.7.1(0.218/5/3) (i686), built with GCC 4.3.4 20090804 (release) 1 FreeBSD 8.0, i386, gcc 4.2.1, with PCI support: flashrom v0.9.1-r973 on FreeBSD 8.0-RELEASE-p2 (i386), built with libpci 3.1.7, GCC 4.2.1 20070719 [FreeBSD] Corresponding to flashrom svn r987. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Signed-off-by: Idwer Vollering <vidwer@gmail.com> Acked-by: Maciej Pijanka <maciej.pijanka@gmail.com>
* Refine compile-time checks for libpciCarl-Daniel Hailfinger2010-03-221-15/+6
| | | | | | | | | | | | | | | | | Idwer Vollering reported problems with the current libpci check on FreeBSD 8.0-RELEASE i386. This is caused by a strict linker. Parsing linker error messages is an exercise in futility, and library detection with $CC --print-file-name is totally useless for libraries outside the standard hardcoded builtin gcc search path (probably the same for other compilers as well). Look for libpciutils instead of libpci on NetBSD during the check. Corresponding to flashrom svn r968. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Idwer Vollering <vidwer@gmail.com>
* Add DOS cross-compilation support to the MakefileCarl-Daniel Hailfinger2010-03-211-6/+37
| | | | | | | | | Add a README with build instructions. Corresponding to flashrom svn r963. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Rudolf Marek <r.marek@assembler.cz>
* Various JEDEC refactorings touching 82802ab.c, sharplhf00l04.c and ↵Sean Nelson2010-03-191-1/+1
| | | | | | | | | | | | | | | | | | | stm50flw0x0x.c Rename print_82802ab_status to print_status_82802ab add unlock_82802ab strip unlock code from erase_block_82802ab rename erase_82802ab_block to erase_block_80280ab delete sharplhf00l04.o from Makefile delete *_lhf00l04* from chipdrivers.h. add unlock_stm50flw0x0x delete wait_stm50flw0x0x delete write_page_stm50flw0x0x convert erase_stm50flw0x0x to erase_chip_stm50flw0x0x delete write_stm50flw0x0x add unlock_82802ab to two Intel chips with TEST_BAD_WRITE change the status of 82802AB, 82802AC, M50FW040, M50FW080 to TEST_OK_PR Corresponding to flashrom svn r948. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Split spi.c into programmer and chip code Remove chipdriver.h include from ↵Sean Nelson2010-02-261-1/+1
| | | | | | | | | | | | | | | | | | | flash.h Some of the spi programmer drivers required chipdrivers.h, needs fixing later: it87spi.c ichspi.c sb600spi.c wbsio_spi.c buspirate_spi.c ft2232spi.c bitbang_spi.c dediprog.c Corresponding to flashrom svn r914. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Add initial (non-working) code for Highpoint ATA/RAID controllersUwe Hermann2010-02-211-0/+10
| | | | | | | | | | It's disabled by default. The current status is detailed at: http://www.flashrom.org/pipermail/flashrom/2010-January/001828.html Corresponding to flashrom svn r908. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Here's a very quick patch to fix the missing unlock codeSean Nelson2010-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Fixes missing unlock for certain chips: * unlock_49lf00x * Pm49fl002 * Pm49fl004 * unlock_49flxxxc * SST49LF160C * unlock_winbond_fwhub * W39V080FA * W39V080FA (dual mode) Fixes missing printlock for certain chip: * printlock_w39v040c * W39V040C Corresponding to flashrom svn r907. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
* Use uname -p instead of -m on NetBSD so we get the right architecture ↵Jonathan A. Kollasch2010-02-141-1/+1
| | | | | | | | | library name Corresponding to flashrom svn r903. Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Split internal.c into internal.c and hwaccess.cCarl-Daniel Hailfinger2010-02-121-7/+2
| | | | | | | | | | | | | | Linking in support for the internal programmer doesn't make sense if you only need hardware (ioport, memory) access. Note: This patch was created by "svn cp internal.c hwaccess.c" and then removing stuff from both files. That's why you can't apply the patch as-is before running the svn cp. Corresponding to flashrom svn r898. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Sean Nelson <audiohacked@gmail.com>
* Complete the addition of Feature Bits for all Jedec based chipsSean Nelson2010-01-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add FEATURE_SHORT_RESET, FEATURE_LONG_RESET, and FEATURE_EITHER_RESET rewrite jedec functions to use getaddrmask convert write_49f002 to write_jedec_1 convert write_w39v040c to write_jedec_1 convert probe_w39v040c to probe_jedec convert write_49lf040 to write_jedec_1 convert write_pm29f002 to write_jedec convert write_29f040b to write_jedec_1 convert probe_29f040b to probe_jedec convert erase_chip_29f040b to erase_chip_block_jedec convert erase_sector_29f040b to erase_sector_jedec convert write_m29f002b to write_jedec convert write_m29f002t to write_jedec convert *_29f002 to *_jedec decouple unused files from Makefile: am29f040b.c en29f002a.c m29f002.c mx29f002.c pm29f002.c sst49lf040.c w39v040c.c w49f002u.c Corresponding to flashrom svn r886. Signed-off-by: Sean Nelson <audiohacked@gmail.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Anders Juel Jensen <andersjjensen@gmail.com>
* Backout unintentional chunkStefan Reinauer2010-01-221-1/+1
| | | | | | | Corresponding to flashrom svn r880. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* This patch fixes the use of CFLAGS and CPPFLAGS in the flashrom makefileStefan Reinauer2010-01-211-8/+8
| | | | | | | Corresponding to flashrom svn r878. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Sean Nelson <audiohacked@gmail.com>
* Matching board via DMIMichael Karcher2010-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a board is not uniquely identifiable by PCI device/subsystem IDs, a string can be specified to be looked for (case-sensitive, substring or anchored) for now in one of the following DMI items in addition to matching the PCI IDs: - System Manufacturer - System Product Name - System Version - Baseboard Manufacturer - Baseboard Product Name - Baseboard Version Strings are anchored re-like (^ at the beginning, $ at the end), but there are no plans to support full regular expressions and matched to any of the mentioned fields. The match is only made if DMI info is available and the string matches. If no DMI info is available and the PCI IDs match, a warning is printed as the board can not be autodetected. It's still open to discussion whether we add an DMI override switch to specify a string that will definitely match, and whether this switch is only used if no DMI is available or whether it overrides or augments DMI data. DMI data is currently read using dmidecode. This tool is available for all major platforms except MacOS X. I heard that there also is a MacOS X version of dmidecode, but didn't investigate that. Corresponding to flashrom svn r874. Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> Acked-by: Luc Verhaegen <libv@skynet.be> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
* Dediprog SF100 supportCarl-Daniel Hailfinger2010-01-191-0/+9
| | | | | | | | | | | | | | | | | | | | | | | Reverse engineered from USB logs. I never touched that programmer nor did I ever see the associated software. Disabled by default until it is complete. The driver needs to be hooked up to the SPI core before it will do anything besides init and diagnostics. I successfully reverse engineered all commands, but some are still somewhat magic. Logs from "flashrom -p dediprog -V" are appreciated. Probe and read should work, erase/write is expected to explode. The programmer will set voltage to 0 on exit. Thanks a lot to Stefan Reinauer and Patrick Georgi for providing USB logs and for testing the result. Corresponding to flashrom svn r870. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Stefan Reinauer <stepan@coresystems.de>
* Enable -Wshadow, clean code for thatMichael Karcher2010-01-121-1/+1
| | | | | | | | | | | | | | This is not just for fun. We hit a real bug on BSD with the outl macros. The macro variable tmp collided with the tmp from outer scope. second revision, now also taking care of inb/inw/inl. While that shadowing did not introduce bugs (yet), of course it breaks the build on BSD when -Wshadow is enabled. Corresponding to flashrom svn r860. Signed-off-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de> Acked-by: Luc Verhaegen <libv@skynet.be>
* Fix Makefile dependencies if FT2232SPI is not selectedCarl-Daniel Hailfinger2010-01-091-2/+3
| | | | | | | | | | .features was always regenerated in that case, triggering whole-project recompiles even if nothing changed. Corresponding to flashrom svn r844. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Sean Nelson <audiohacked@gmail.com>
OpenPOWER on IntegriCloud