1. 17 Nov, 2009 1 commit
  2. 31 Oct, 2009 1 commit
    • Carl-Daniel Hailfinger's avatar
      Add infrastructure to check the maximum supported flash size of chipsets and mainboards · 115d390f
      Carl-Daniel Hailfinger authored
      
      The rationale is to warn users when they, for example, try to flash
      a 512KB parallel flash chip but their chipset only supports 256KB,
      or they try to flash 512KB and the chipset _does_ theoretically
      support 512KB but their special board doesn't wire all address lines
      and thus supports only 256 KB ROM chips at maximum.
      
      This has cost Uwe hours of debugging on some board already, until he
      figured out what was going on. We should try warn our users where
      possible about this.
      
      The chipset and the chip may have more than one bus in common (e.g.
      SB600 and Pm49* can both speak LPC+FWH) and on SB600/SB7x0/SB8x0 there
      are different limits for LPC and FWH. The only way to tell the user
      about the exact circumstances is to spew error messages per bus.
      
      The code will issue a warning during probe (which does fail for some
      chips if the size is too big) and abort before the first real
      read/write/erase action. If no action is specified, the warning is
      printed anyway.
      That way, a user can find out why probe might not have worked, and will
      be stopped before he/she gets incorrect results.
      
      Add a bitcount function to the infrastructure.
      
      Corresponding to flashrom svn r755.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      115d390f
  3. 01 Oct, 2009 2 commits
  4. 30 Sep, 2009 1 commit
    • Uwe Hermann's avatar
      Add initial support for flashing some NVIDIA graphics cards · 2bc98f6c
      Uwe Hermann authored
      
      The new option is '-p gfxnvidia', rest of the interface is as usual.
      
      I tested a successful identify and read on a "RIVA TNT2 Model 64/Model 64 Pro"
      card for now, erase and write did NOT work properly so far!
      
      Please do not attempt to write/erase cards yet, unless you can recover!
      
      In addition to the NVIDIA handling code it was required to call
      programmer_shutdown() in a lot more places, otherwise the graphics card
      will be disabled in the init function, but never enabled again as the
      shutdown function is not called.
      The shutdown handling may be changed to use atexit() later.
      
      Corresponding to flashrom svn r737.
      Signed-off-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      Acked-by: default avatarLuc Verhaegen <libv@skynet.be>
      2bc98f6c
  5. 28 Sep, 2009 1 commit
  6. 18 Sep, 2009 1 commit
  7. 16 Sep, 2009 2 commits
  8. 05 Sep, 2009 1 commit
    • Carl-Daniel Hailfinger's avatar
      Store block sizes and corresponding erase functions in struct flashchip · f38431a5
      Carl-Daniel Hailfinger authored
      
      I decided to fill in the info for a
      few chips to illustrate how this works both for uniform and non-uniform
      sector sizes.
      
      struct eraseblock{
      int size; /* Eraseblock size */
      int count; /* Number of contiguous blocks with that size */
      };
      
      struct eraseblock doesn't correspond with a single erase block, but with
      a group of contiguous erase blocks having the same size.
      Given a (top boot block) flash chip with the following weird, but
      real-life structure:
      
      top
      16384
      8192
      8192
      32768
      65536
      65536
      65536
      65536
      65536
      65536
      65536
      bottom
      
      we get the following encoding:
      {65536,7},{32768,1},{8192,2},{16384,1}
      
      Although the number of blocks is bigger than 4, the number of block
      groups is only 4. If you ever add some flash chips with more than 4
      contiguous block groups, the definition will not fit into the 4-member
      array anymore and gcc will recognize that and error out. No undetected
      overflow possible. In that case, you simply increase array size a bit.
      For modern flash chips with uniform erase block size, you only need one
      array member anyway.
      
      Of course data types will need to be changed if you ever get flash chips
      with more than 2^30 erase blocks, but even with the lowest known erase
      granularity of 256 bytes, these flash chips will have to have a size of
      a quarter Terabyte. I'm pretty confident we won't see such big EEPROMs
      in the near future (or at least not attached in a way that makes
      flashrom usable). For SPI chips, we even have a guaranteed safety factor
      of 4096 over the maximum SPI chip size (which is 2^24). And if such a
      big flash chip has uniform erase block size, you could even split it
      among the 4 array members. If you change int count to unsigned int
      count, the storable size doubles. So with a split and a slight change of
      data type, the maximum ROM chip size is 2 Terabytes.
      
      Since many chips have multiple block erase functions where the
      eraseblock layout depends on the block erase function, this patch
      couples the block erase functions with their eraseblock layouts.
      struct block_eraser {
        struct eraseblock{
          unsigned int size; /* Eraseblock size */
          unsigned int count; /* Number of contiguous blocks with that size */
        } eraseblocks[NUM_ERASEREGIONS];
        int (*block_erase) (struct flashchip *flash, unsigned int blockaddr, unsigned int blocklen);
      } block_erasers[NUM_ERASEFUNCTIONS];
      
      Corresponding to flashrom svn r719.
      Signed-off-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      Acked-by: default avatarStefan Reinauer <stepan@coresystems.de>
      f38431a5
  9. 02 Sep, 2009 1 commit
  10. 19 Aug, 2009 4 commits
  11. 13 Aug, 2009 1 commit
  12. 12 Aug, 2009 4 commits
  13. 30 Jul, 2009 1 commit
  14. 24 Jul, 2009 1 commit
  15. 23 Jul, 2009 1 commit
  16. 22 Jul, 2009 1 commit
  17. 11 Jul, 2009 1 commit
  18. 01 Jul, 2009 1 commit
  19. 28 Jun, 2009 3 commits
  20. 24 Jun, 2009 3 commits
  21. 23 Jun, 2009 1 commit
  22. 20 Jun, 2009 1 commit
    • Uwe Hermann's avatar
      Various wiki output changes · a2d05012
      Uwe Hermann authored
      
       - Move board_info_url struct to print.c, doesn't have to be global.
      
       - Simplify flashrom.c a bit by moving stuff to print.c.
         Eliminate two now-useless mini-functions in print.c.
      
       - Add a note that the wiki page contents are semi-automatically generated.
      
       - Mention date of last wiki page update as well as the flashrom revision
         that was used to generate the wiki output.
      
       - Also generate list of supported laptops in -z output now.
      
       - Add some more board URLs.
      
       - Add a boards_notes[] table to allow for arbitrary footnotes/comments for
         each board in the table. All notes will automatically be turned into
         wiki footnotes with correct numbers and will appear at the end of the
         respective table.
      
      Corresponding to flashrom svn r615.
      Signed-off-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      Acked-by: default avatarUwe Hermann <uwe@hermann-uwe.de>
      a2d05012
  23. 19 Jun, 2009 2 commits
  24. 17 Jun, 2009 1 commit
  25. 16 Jun, 2009 3 commits