1. 27 Mar, 2013 1 commit
  2. 16 Mar, 2013 1 commit
    • Stefan Tauner's avatar
      Fix evil twins of Macronix MX25L1605, MX25L3205, MX25L6405 · 226037da
      Stefan Tauner authored
      Similarly to the patch in r1647 this one updates the chips identified as above
      with references to and data about their respective twins. Unlike previously this
      one deals with the more evil details.
      
      Helge Wagner from GE discovered some problems with chips sharing IDs
      and proposed a patch to tackle (some of) them, see:
      http://patchwork.coreboot.org/patch/3709/
      That patch was bitrotting in our mailboxes for a long time and it is still not
      ready for merge, but we increasingly get reports about problems (e.g.
      http://paste.flashrom.org/view.php?id=1525
      
      ) regarding these chips and
      hence must act to ensure users' safety.
      
      This patch splits the chip definitions of evil twins into separate ones which
      correctly declare the respective attributes (the main problems are the erase
      block sizes for the 0x20 opcode and hence my changes combine different
      chips with partly different attributes apart from their names as long as the
      erasers layout it the same). This forces the user to select the (right) chip
      definition with the -c/--chip parameter and hence will break a number of
      previously perfectly working environments.
      
      0x2015 is used by and split to
       - MX25L1605 (64kB sectors in 0x20 erases)
       - MX25L1605A/MX25L1606E (4kB in 0x20 erases and an additional 0x52 opcode with 64kB blocks)
       - MX25L1605D/MX25L1608D (4k sectors in 0x20 erases)
      
      0x2016 is used by and split to
       - MX25L3205/MX25L3205A (64kB 0x20)
       - MX25L3205D/MX25L3208D (4kB 0x20)
       - MX25L3206E (4k 0x20, 64k 0x52)
      
      0x2017 is used by and split to
       - MX25L6405/MX25L6405D (64k 0x20)
       - MX25L6406E/MX25L6436E (4k 0x20)
       - MX25L6445E (4k 0x20, 64k 0x52)
      
      Bonus: add some minor details to MX25L1635D, MX25L1635E, MX25L3235D,
      MX25L12805D.
      
      Tested with MX25L3206E, MX25L64036E.
      
      Corresponding to flashrom svn r1657.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      226037da
  3. 15 Mar, 2013 2 commits
  4. 09 Mar, 2013 1 commit
  5. 04 Mar, 2013 2 commits
  6. 03 Mar, 2013 1 commit
  7. 22 Feb, 2013 1 commit
  8. 20 Feb, 2013 1 commit
  9. 04 Feb, 2013 1 commit
    • Stefan Tauner's avatar
      Fix building for MacOSX · e038e908
      Stefan Tauner authored
      
      - Add a new macro named IS_MACOSX to hwaccess.c and use it to enable iopl().
        This was broken since r1638. This fix does *not* restore the very permissive
        concept where iopl() was activated in an #else branch that was inplace before
        r1638.
      - Make printing the image file's size in flashrom.c platform independent.
      
      Bonus: remove definitions of off64_t and lseek64 which are not necessary
      anymore for about 1000 commits.
      
      Thanks to SJ for reporting the issue and testing the solution.
      
      Corresponding to flashrom svn r1648.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      e038e908
  10. 02 Feb, 2013 1 commit
  11. 15 Jan, 2013 1 commit
  12. 08 Jan, 2013 1 commit
  13. 05 Jan, 2013 1 commit
  14. 04 Jan, 2013 2 commits
  15. 03 Jan, 2013 1 commit
  16. 01 Jan, 2013 1 commit
  17. 30 Dec, 2012 1 commit
  18. 29 Dec, 2012 5 commits
    • Peter Lemenkov's avatar
      Simplify hwaccess.c · 6282966c
      Peter Lemenkov authored
      
      Previously the code was focused on architectures which led to lots of
      duplicate code and spread the information regarding differences between
      the architectures accross the file.
      
      With this patch there is a single function header for any function and the
      differentiation between architectures (and OS where needed) happens
      in one place for each function. Also, this patch adds simple defines to bundle
      often used arch and os checks. A central check for unknown architectures
      and OSes has been added on top.
      
      Corresponding to flashrom svn r1638.
      Signed-off-by: default avatarPeter Lemenkov <lemenkov@gmail.com>
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      6282966c
    • Stefan Tauner's avatar
      Add support for Atmel's AT25F series of SPI flash chips · 57794ac1
      Stefan Tauner authored
      
      This adds support for the following chips:
       - AT25F512, AT25F512A, AT25F512B
       - AT25F1024, AT25F1024A
       - AT25F2048
       - AT25F4096
      
      Besides the definitions of the the chips in flashchips.c this includes
      - a dedicated probing method (probe_spi_at25f)
      - pretty printing methods (spi_prettyprint_status_register_at25f*), and
      - unlocking methods (spi_disable_blockprotect_at25f*)
      
      Corresponding to flashrom svn r1637.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      57794ac1
    • Stefan Tauner's avatar
      Add support for Intel S33 series flash chips · 54aaa4ae
      Stefan Tauner authored
      
      This includes:
      Bottom boot block:
      * 16Mb/2MB:
        QB25F160S33B8, QB25F016S33B8, QH25F160S33B8, QH25F016S33B8
      * 32Mb/4MB:
        QB25F320S33B8, QH25F320S33B8
      * 64Mb/8MB:
        QB25F640S33B8, QH25F640S33B8
      
      Top boot block:
      * 16Mb/2MB:
        QB25F160S33T8, QB25F016S33T8, QH25F160S33T8, QH25F016S33T8
      * 32Mb/4MB:
        QB25F320S33T8, QH25F320S33T8
      * 64Mb/8MB:
        QB25F640S33T8, QH25F640S33T8
      
      At least some seem to be marketed by other vendors (too?) but also with
      Intel's vendor ID.
      
      Besides a 0xC7 chip erase and a 0xD8 uniform 64kB block erase they
      support also erasing the top/bottom 8 8kB blocks with opcode 0x40.
      But since this command fails for all addresses outside those ranges,
      it is not easily implemented with flashrom's current code base and
      hence left out.
      
      Corresponding to flashrom svn r1636.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      54aaa4ae
    • Stefan Tauner's avatar
      Add a generic SPI block unprotect function · 9530a022
      Stefan Tauner authored
      
      This does not only remove a huge pile of duplicate code, it does
      also fix a bug in spi_disable_blockprotect_at25df(), which is also
      a good example why duplicated code is a bad idea.
      
      Corresponding to flashrom svn r1635.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      9530a022
    • Stefan Tauner's avatar
      Improve SPI status register pretty printing · 6ee37e28
      Stefan Tauner authored
      
       - Move all functions related to SPI status registers to a new file
         spi25_statusreg.c. This includes the generic as well as the
         SST-specific functions from spi25.c and the chip-specific functions
         from a25.c and at25.c.
       - introduce helper functions
          * spi_prettyprint_status_register_hex()
          * spi_prettyprint_status_register_bpl()
          * spi_prettyprint_status_register_plain()
         Use the latter on every compatible flash chip that has no better printlock
         function set and get rid of the implicit pretty printing in the SPI probing
         functions.
       - remove
          * spi_prettyprint_status_register_common()
          * spi_prettyprint_status_register_amic_a25lq032() because it can be fully
            substituted with spi_prettyprint_status_register_amic_a25l032().
          * spi_prettyprint_status_register() (old switch, no longer needed)
       - promote and export
          * spi_prettyprint_status_register_amic_a25l05p() as spi_prettyprint_status_register_default_bp1().
          * spi_prettyprint_status_register_amic_a25l40p() as spi_prettyprint_status_register_default_bp2().
          * spi_prettyprint_status_register_st_m25p() as spi_prettyprint_status_register_default_bp3().
       - add #define TEST_BAD_REW and use it for a number of Atmel chips which
         had only TEST_BAD_READ set even though they dont have erasers or a write
         function set.
      
      Corresponding to flashrom svn r1634.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      6ee37e28
  19. 27 Dec, 2012 3 commits
  20. 26 Dec, 2012 2 commits
  21. 24 Dec, 2012 1 commit
  22. 30 Nov, 2012 2 commits
  23. 29 Nov, 2012 1 commit
  24. 24 Nov, 2012 1 commit
  25. 20 Nov, 2012 1 commit
  26. 05 Nov, 2012 1 commit
  27. 01 Nov, 2012 1 commit
  28. 28 Oct, 2012 1 commit
  29. 27 Oct, 2012 1 commit
    • Stefan Tauner's avatar
      Do not read the flash chip twice in verification mode · 78ffbeaa
      Stefan Tauner authored
      
      Kyösti Mälkki noticed that we unnecessarily read the flash chip twice when
      called with --verify. The first one is the mandatory read before everything
      (to be able to detect the seriousness of errors), but the second one is not
      necessary because we can just use the former for the comparison.
      
      This introduces a small output change: previously we printed ERASE or
      VERIFY depending on the callee. This special case has been dropped
      because it is unnecessary to print it (and wrong for the verification
      function to need to know why it is verifying exactly).
      If an erase fails we mention that fact explicitly already, similar for verify.
      
      Corresponding to flashrom svn r1619.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      78ffbeaa