1. 27 Jul, 2010 1 commit
    • Carl-Daniel Hailfinger's avatar
      Split off programmer.h from flash.h · 5b997c3e
      Carl-Daniel Hailfinger authored
      
      Programmer specific functions are of absolutely no interest to any file
      except those dealing with programmer specific actions (special SPI
      commands and the generic core).
      
      The new header structure is as follows (and yes, improvements are
      possible):
      flashchips.h  flash chip IDs
      chipdrivers.h  chip-specific read/write/... functions
      flash.h  common header for all stuff that doesn't fit elsewhere
      hwaccess.h hardware access functions
      programmer.h  programmer specific functions
      coreboot_tables.h  header from coreboot, internal programmer only
      spi.h SPI command definitions
      
      Corresponding to flashrom svn r1112.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      5b997c3e
  2. 21 Jul, 2010 1 commit
  3. 17 Jul, 2010 2 commits
  4. 13 Jul, 2010 3 commits
  5. 08 Jul, 2010 1 commit
  6. 06 Jul, 2010 1 commit
  7. 03 Jul, 2010 2 commits
  8. 07 Jun, 2010 1 commit
  9. 04 Jun, 2010 1 commit
  10. 31 May, 2010 1 commit
  11. 30 May, 2010 1 commit
  12. 26 May, 2010 1 commit
    • Carl-Daniel Hailfinger's avatar
      Handle the following architectures in generic flashrom code · cceafa2a
      Carl-Daniel Hailfinger authored
      
      - 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: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarMisha Manulis <misha@manulis.com>
      Acked-by: default avatarVladimir 'phcoder/φ-coder' Serbinenko <phcoder@gmail.com>
      Acked-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      Acked-by: default avatarSegher Boessenkool <segher@kernel.crashing.org>
      cceafa2a
  13. 21 May, 2010 1 commit
  14. 15 May, 2010 1 commit
  15. 07 May, 2010 1 commit
  16. 28 Apr, 2010 1 commit
    • Carl-Daniel Hailfinger's avatar
      One of the problems is that --force had multiple meanings · 27023768
      Carl-Daniel Hailfinger authored
      
      - Force chip read by faking probe success.
      - Force chip access even if the chip is bigger than max decode size for
        the flash bus.
      - Force erase even if erase is known bad.
      - Force write even if write is known bad.
      - Force writing even if cbtable tells us that this is the wrong image
        for this board.
      
      This patch cleans up --force usage:
      - Remove any suggestions to use --force for probe/read from flashrom
        output.
      - Don't talk about "success" or "Found chip" if the chip is forced.
      - Add a new internal programmer parameter boardmismatch=force. This
        overrides any mismatch detection from cbtable/image comparisons.
      - Add a new internal programmer parameter laptop=force_I_want_a_brick.
      - Adjust the documentation for --force.
      - Clean up the man page a bit whereever it talks about --force or
        laptops.
      
      Additional changes in this patch:
      - Add warnings about laptops to the documentation.
      - Abort if a laptop is detected. Can be overridden with the programmer
      parameter mentioned above.
      - Add "Portable" to the list of DMI strings indicating laptops.
      - Check if a chip specified with -c is known to flashrom.
      - Programmer parameter reliability and consistency fixes.
      - More paranoid self-checks.
      - Improve documentation.
      
      Corresponding to flashrom svn r996.
      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>
      27023768
  17. 27 Mar, 2010 1 commit
    • Carl-Daniel Hailfinger's avatar
      Add runtime and build environment info to the flashrom version message · 132e2ec6
      Carl-Daniel Hailfinger authored
      
      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: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Signed-off-by: default avatarIdwer Vollering <vidwer@gmail.com>
      Acked-by: default avatarMaciej Pijanka <maciej.pijanka@gmail.com>
      132e2ec6
  18. 22 Mar, 2010 1 commit
  19. 13 Mar, 2010 1 commit
  20. 08 Mar, 2010 1 commit
    • Carl-Daniel Hailfinger's avatar
      Write granularity is chip specific · e8e369fc
      Carl-Daniel Hailfinger authored
      
      The following write granularities exist according to my datasheet
      survey: - 1 bit. Each bit can be cleared individually. - 1 byte. A byte
      can be written once. Further writes to an already written byte cause
      the contents to be either undefined or to stay unchanged. - 128 bytes.
      If less than 128 bytes are written, the rest will be erased. Each write
      to a 128-byte region will trigger an automatic erase before anything is
      written. Very uncommon behaviour. - 256 bytes. If less than 256 bytes
      are written, the contents of the unwritten bytes are undefined.
      
      Note that chips with default 256-byte writes, which keep the original
      contents for unwritten bytes, have a granularity of 1 byte.
      
      Handle 1-bit, 1-byte and 256-byte write granularity.
      
      Corresponding to flashrom svn r927.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarSean Nelson <audiohacked@gmail.com>
      Acked-by: default avatarDavid Hendricks <dhendrix@google.com>
      e8e369fc
  21. 21 Feb, 2010 1 commit
  22. 19 Feb, 2010 1 commit
  23. 14 Feb, 2010 1 commit
    • Carl-Daniel Hailfinger's avatar
      Allow the registration of functions to be called at programmer shutdown · cc389fc6
      Carl-Daniel Hailfinger authored
      
      Some programmers want to run certain functions during programmer
      shutdown, but the function choice depends on the code path taken
      during programmer init. Rather than rebuilding the whole init logic in
      the shutdown function, it is now possible to register functions for
      execution on programmer shutdown. The behaviour is similar to atexit(),
      but the registered functions will be run on programmer shutdown instead
      of on exit and the functions will be called with a void * argument
      that is specified on registration. Registered functions must have
      the prototype void function(void *); and will be executed in reverse
      registration order directly before calling the programmer-specific
      shutdown() function. It is recommended to have shutdown() only disable
      programmer/hardware access and leave all code path sensitive shutdown to
      functions registered with register_shutdown().
      
      The most prominent use case is resetting the EC after flashing on
      laptops.
      
      Note: There are quite a few code paths in flashrom which proceed to
      terminate flashrom without any programmer shutdown. Those code paths
      will not get the benefit of register_shutdown() and they should be
      changed wherever possible.
      
      Corresponding to flashrom svn r904.
      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>
      cc389fc6
  24. 11 Feb, 2010 1 commit
  25. 25 Jan, 2010 1 commit
  26. 19 Jan, 2010 2 commits
  27. 18 Jan, 2010 1 commit
  28. 10 Jan, 2010 1 commit
  29. 07 Jan, 2010 1 commit
  30. 24 Dec, 2009 1 commit
  31. 14 Dec, 2009 1 commit
  32. 13 Dec, 2009 1 commit
    • Carl-Daniel Hailfinger's avatar
      Internal (onboard) programming was the only feature which could not be disabled · 66ef4e5f
      Carl-Daniel Hailfinger authored
      Make various pieces of code conditional on support for internal
      programming. Code shared between PCI device programmers and onboard
      programming is now conditional as well.
      
      It is now possible to build only with dummy support:
      make CONFIG_INTERNAL=no CONFIG_NIC3COM=no CONFIG_SATASII=no
      CONFIG_DRKAISER=no CONFIG_SERPROG=no CONFIG_FT2232SPI=no
      
      This allows building for a specific use case only, and it also
      facilitates porting to a new architecture because it is possible to
      focus on highlevel code only.
      
      Note: Either internal or dummy programmer needs to be compiled in due to
      the current behaviour of always picking a default programmer if -p is
      not specified. Picking an arbitrary external programmer as default  
      wouldn't make sense.
      
      Build and runtime tested in all 1024 possible build combinations. The
      only failures are by design as mentioned above.
      
      Corresponding to flashrom svn r797.
      
      Signed-off-by: Carl-Daniel Hailfinger <c-d.h...
      66ef4e5f
  33. 25 Nov, 2009 1 commit
  34. 24 Nov, 2009 2 commits