1. 25 Sep, 2012 1 commit
  2. 15 Aug, 2012 1 commit
  3. 14 Aug, 2012 1 commit
  4. 09 Aug, 2012 1 commit
    • Carl-Daniel Hailfinger's avatar
      Portability fixes and cleanups · 60d9bd26
      Carl-Daniel Hailfinger authored
      
      Move Mac OS X IOKit/DirectHW availability checks in the Makefile from
      compiler check to pciutils check.
      
      Print the compiler error messages for feature detection.
      
      Add DOS libpci in the Makefile includes only if a PCI-based programmer
      was requested.
      
      Restrict mmap usage in ich_descriptors_tool to Unix style systems.
      
      Build ich_descriptors_tool with the correct .exe extension on
      DOS/Windows.
      
      Build ich_descriptors_tool by default on x86. (Patch by Stefan Tauner)
      
      Print the Windows version instead of "unknown machine" on Windows.
      
      Don't #define our own __DARWIN__, use the standard OS X detection
      method.
      
      Update the README.
      
      Add more generated files to svn:ignore
      
      Corresponding to flashrom svn r1567.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      60d9bd26
  5. 08 Aug, 2012 1 commit
  6. 02 Aug, 2012 1 commit
  7. 28 Jul, 2012 1 commit
  8. 16 May, 2012 1 commit
  9. 30 Apr, 2012 1 commit
  10. 14 Apr, 2012 1 commit
  11. 13 Mar, 2012 1 commit
  12. 08 Mar, 2012 1 commit
  13. 25 Feb, 2012 1 commit
  14. 18 Feb, 2012 1 commit
  15. 17 Feb, 2012 1 commit
  16. 16 Feb, 2012 1 commit
  17. 13 Feb, 2012 1 commit
  18. 20 Dec, 2011 1 commit
    • Carl-Daniel Hailfinger's avatar
      Cross-compilation fixes · 33a65a06
      Carl-Daniel Hailfinger authored
      
      Switch from host OS detection to target OS detection.
      Complain about unknown target OS/architecture.
      Disable annoying format string warnings on DJGPP.
      
      Native and cross-compilation now usually just require setting CC.
      Examples:
      make CC=i586-pc-msdosdjgpp-gcc
      make CC="clang -m64"
      make CC=i686-w64-mingw32-gcc
      
      Tested for a boatload of native and cross compilation configurations.
      
      There is a new target "make libpayload" in case you don't want to
      specify all tools by hand.
      
      Corresponding to flashrom svn r1476.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarDavid Hendricks <dhendrix@google.com>
      33a65a06
  19. 04 Nov, 2011 1 commit
  20. 15 Sep, 2011 1 commit
    • Stefan Tauner's avatar
      ichspi: add ICH/PCH flash descriptor decoding via FDOC/FDOD · 1e14639f
      Stefan Tauner authored
      
      Based on the work of Matthias 'mazzoo' Wenzel this patch adds pretty
      printing of those ICH/PCH flash descriptor sections that are
      cached/mapped by the chipset (and which are therefore reachable via
      FDOC/FDOD registers).
      
      this includes the following:
      - content section:
          describes the image and some generic properties (number of
          sections, offset of sections, PCH/ICH and MCH/PROC strap
          offsets and lengths)
      - component section:
          identify the different SPI flash chips and their capabilities.
      - region section
          similarly to a partition table this describes the different regions.
          the content of FLREG* is derived from this section.
      - master section
          defines SPI master (host, ME, GbE) access rights of the
          individual regions. the content of PR* is derived from this section.
      
      this is only a part of the data included in the descriptor. other
      information can be retrieved from a complete binary dump of the
      descriptor region only.
      
      this patch also adds macros and pretty printing for "Vendor Specific
      Component Capabilities" registers: there are two of them: lower and
      upper. they describe the properties of the address space divided by
      FPBA (which allows to use multiple flash chips or partitions with
      different properties). the properties of all supported flash chips
      (together with their RDIDs) are stored in the same format in table
      in a descriptor section (which is used by the ME apparently). a
      later patch will use the macros outside of ichspi.c which is the
      reason why the prettyprinting function and the register bit macros
      are not defined in ichspi.c but ich_descriptors.h (else they would
      be moved in the follow-up patch).
      
      because this patch relies on (compiler) implementation-specific
      layouting of bit-fields, it checks for correct layout before taking
      any action on runtime.
      
      Corresponding to flashrom svn r1443.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      1e14639f
  21. 03 Sep, 2011 1 commit
  22. 20 Aug, 2011 1 commit
    • Uwe Hermann's avatar
      Makefile: Fix MinGW build, improve output with bogus CC · 44ffd58a
      Uwe Hermann authored
      
      As per IRC discussion, the "ARCH :=" line should be moved after any
      lines which set CC, as it uses CC itself. This fixes the MinGW build.
      
      Also, add a "2>/dev/null" in the "ARCH :=" as per suggestion from
      Stefan Tauner to improve the output in the case CC is bogus:
      
      Before:
      $ make CC=foo
      /bin/sh: foo: not found
      Checking for a C compiler... not found.
      make: *** [compiler] Error 1
      
      After:
      $ make CC=foo
      Checking for a C compiler... not found.
      make: *** [compiler] Error 1
      
      Corresponding to flashrom svn r1418.
      Signed-off-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      44ffd58a
  23. 18 Aug, 2011 1 commit
    • Stefan Tauner's avatar
      Makefile: fix and simplify test program compilations · 56787086
      Stefan Tauner authored
      This was totally broken due to the make's shell function's temporal
      behavior.
      
      quote from the gnu make documentation
      (http://www.gnu.org/s/hello/manual/make/Shell-Function.html):
      "The commands run by calls to the shell function are run when the
      function calls are expanded"
      we have used the shell function to echo the test programs to a file.
      the file name used was equal for all tests and was overwritten for
      each test. the result was that all tests (in a single target?) used
      the last test program because the echoing of the test programs was
      done before all test compilations(!)
      see my mail for details:
      http://lists.gnu.org/archive/html/bug-make/2011-08/msg00010.html
      
      
      
      also the branching for testing ifeq ($(CONFIG_FT2232_SPI), yes) was
      unnecessarily complicated.
      
      in my approach here i am using verbatim variables (allows to define
      even complex test programs in the makefile without jumping through
      hoops) that get exported to environment variables (via "export",
      reference afterwards with "$$<varname>").
      
      i have also added the missing redirection of stderr to the compiler
      test and changed the definition of ARCH to use simple expansion (:=).
      
      the latter is still wrong, because it uses $(CC) before we check if
      a compiler is installed... makes the compiler check pretty much
      useless. The simple expansion just reduces the number of errors
      printed to 1.
      
      Corresponding to flashrom svn r1416.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      56787086
  24. 29 Jul, 2011 1 commit
  25. 26 Jul, 2011 1 commit
  26. 07 Jul, 2011 1 commit
  27. 03 Jul, 2011 1 commit
    • Uwe Hermann's avatar
      Fix and improve Windows/MinGW/MSYS build · d5e85d67
      Uwe Hermann authored
      
       - Makefile: Use $(OS_ARCH) to add some MinGW-specific workarounds and
         settings, so that a simple "make" is sufficient on MinGW (instead of
         manual Makefile hacking).
      
       - Explicitly set CC=gcc in the Makefile, otherwise you get an error like
         "cc: command not found" on MinGW.
      
       - MinGW doesn't have ffs(), use gcc's __builtin_ffs() instead.
      
       - Add /usr/local/include and /usr/local/lib to CPPFLAGS/LDFLAGS, that's
         where libusb-win32 and libftdi stuff is usually placed on MinGW/MSYS.
      
       - Disable serprog (no sockets) and all PCI-based programmers (no libpci)
         for now. That leaves dummy, ft2232_spi, and buspirate_spi enabled on
         MinGW per default.
      
       - serial.c: Use correct type for 'tmp', both on Windows/MinGW (DWORD)
         and POSIX (ssize_t).
      
      Corresponding to flashrom svn r1363.
      Signed-off-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      d5e85d67
  28. 26 Jun, 2011 1 commit
  29. 19 May, 2011 1 commit
    • Carl-Daniel Hailfinger's avatar
      Refine status register and lock printing of Atmel and AMIC SPI chips · 7a3bd8f2
      Carl-Daniel Hailfinger authored
      
      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: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      7a3bd8f2
  30. 08 May, 2011 1 commit
  31. 18 Mar, 2011 1 commit
  32. 08 Mar, 2011 1 commit
  33. 28 Feb, 2011 1 commit
  34. 04 Feb, 2011 1 commit
  35. 05 Dec, 2010 1 commit
    • Carl-Daniel Hailfinger's avatar
      Add support for Winbond W39V040FB and W39V040FC · 9188240a
      Carl-Daniel Hailfinger authored
      
      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: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarMichael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
      9188240a
  36. 03 Dec, 2010 1 commit
    • Mark Marshall's avatar
      Add support for the Open Graphics Project development card, OGD1, as a SPI flash programmer · 90021f28
      Mark Marshall authored
      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: default avatarMark Marshall <mark.marshall@csr.com>
      Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      90021f28
  37. 10 Oct, 2010 1 commit
    • Carl-Daniel Hailfinger's avatar
      Unify chip write functions · b30a5ed4
      Carl-Daniel Hailfinger authored
      
      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: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      b30a5ed4
  38. 08 Oct, 2010 2 commits
  39. 06 Oct, 2010 1 commit