1. 05 Sep, 2014 1 commit
  2. 06 Aug, 2014 1 commit
    • Stefan Tauner's avatar
      Add a bunch of new/tested stuff and various small changes 21 · 6697f71a
      Stefan Tauner authored
      Tested mainboards:
      OK:
       - ASUS F2A85-M
         Reported by various corebooters
       - ASUS M2N-MX SE Plus
         Reported by Antonio
       - ASUS P5LD2
         Reported by François Revol
       - Lenovo ThinkPad T530
         Reported and partially authored by Edward O'Callaghan
       - MSI MS-7502 (Medion MD8833)
         Reported by naq on IRC
       - Shuttle AB61
         Reported by olofolleola4
       - ZOTAC IONITX-F-E
         Reported by Bernardo Kuri
      
      Flash chips:
       - Atmel AT45DB021D to PREW (+PREW)
         Reported by The Raven
       - Atmel AT25F4096 to PREW (+PREW)
         Reported by 공준혁
       - GigaDevice GD25Q16(B) to PREW (+PREW)
         Reported by luxflow@live.com using a GD25Q16BSIG
       - Catalyst CAT28F512
         Mark erase and write as known bad (not implemented)
      
      Miscellaneous:
       - Various spelling corrections by Daniele Forsi.
       - Added and refined a bunch of chips originally investigated by Carl-Daniel.
       - Marked the ARM-USB-OCD-H programmer as tested
         (reported by Ruud Schramp).
       - Tiny other stuff.
      
      Correspondin...
      6697f71a
  3. 13 Jul, 2014 1 commit
    • Stefan Tauner's avatar
      Fix garbage handling in DMI strings · 9972d15e
      Stefan Tauner authored
      
      Previously we tried to replace garbage characters with <space> directly in
      the read-only memory-mapped SMBIOS area(!). This could never have
      worked for any DMI strings with garbage and results in a segfault on
      machines with such strings.
      
      Thanks to Brian Rak (Supermicro X10SLE-F) and John Pohlman (HP XW9400)
      for reporting this issue.
      
      With this patch the strings are duplicated within dmi_string() already,
      just before we sanitize them. Also, the limit variable used everywhere
      points to the first invalid byte address. Refine respective checks
      accordingly.
      
      Corresponding to flashrom svn r1824.
      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>
      9972d15e
  4. 05 Mar, 2014 1 commit
  5. 29 Oct, 2013 1 commit
    • Stefan Tauner's avatar
      Ensure DMI strings used in dmi_compare() are not NULL · d1045d8b
      Stefan Tauner authored
      
      Previously the external DMI decoder did not allow this to happen because
      all possible pointers were initialized at startup by the output of
      'dmidecode -s ...' which has default values for all supported types.
      
      The now active internal DMI decoder does work differently: it scans the
      complete DMI table once and copies the available strings. Therefore, strings
      that are not set by the firmware are left at their default value of NULL.
      
      A segfault would arise if the following conditions are all true:
       - the firmware sets up a DMI/SMBIOS table which has at least a correct
         checksum, and
       - that table does *not* define at least one of the DMI strings we use
         for matching (as defined by dmi_strings[] in dmi.c), and
       - there exists a board enable whose PCI IDs are matched by the board,
         and which has a DMI string set that ends with a $ anchor, and
       - the user calls the internal programmer of flashrom without the
         optional mainboard parameter.
      
      This was first observed by Gelip on an abit BF6 using the coreboot port
      for the abit BE6-II V2.0.
      The segfault was reproduced by Idwer Vollering on an ASUS F2A85-M with
      the default DMI values of CONFIG_MAINBOARD_SMBIOS_MANUFACTURER etc.
      overwritten and a forged board enable matching his board.
      Idwer also verified that this patch fixes the problem, thanks a lot!
      
      Corresponding to flashrom svn r1763.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      d1045d8b
  6. 14 Sep, 2013 1 commit
  7. 11 Sep, 2013 1 commit
    • Sean Nelson's avatar
      Add an internal DMI decoder · 4c6d3a4b
      Sean Nelson authored
      Previously we had to rely on dmidecode to decode the DMI/SMBIOS table.
      This patch integrates a DMI decoder into flashrom. The old behavior of calling
      dmidecode can be brought back by using CONFIG_INTERNAL_DMI=no.
      
      Significant portions of this patch were taken from dmidecode, hence add its
      authors to the copyright notice (dmidecode is also GPL2+). We do a few things
      differently though. First of all we do more bounds checking to prevent accessing
      unmapped memory. We do not support disovery via EFI (yet), but memory
      scanning only. We handle the chassis-type lock bit correctly which dmidecode
      did not for a long while.
      
      The API to the rest of flashrom remains stable, but the output changes slightly.
      To share as much code as possible (which actually is not much), i have added
      dmi_fill methods that get called in dmi_init. They are reponsible to fill the
      dmi_strings array and setting the is_laptop variable. After it is called, dmi_init
      prints all dmi_strings. Previously the strings wer...
      4c6d3a4b
  8. 04 Jan, 2013 1 commit
  9. 23 Sep, 2012 1 commit
  10. 27 Aug, 2012 1 commit
  11. 17 Feb, 2012 1 commit
  12. 03 Sep, 2011 1 commit
  13. 15 Aug, 2011 1 commit
  14. 28 Jul, 2011 1 commit
  15. 26 Jul, 2011 1 commit
    • Stefan Tauner's avatar
      Be more refined regarding DMI chassis types · a34d7190
      Stefan Tauner authored
      
      We had broken laptops in the past that were not detected as such because
      their DMI chassis-type was either undefined/out-of-spec, or set to
      'other' or 'unknown'.
      
      this patch tries to mitigate this problem as follows:
      - if the DMI chassis-type clearly identifies the system as
        laptop/notebook/mobile platform then nothing changes: the user gets
        the laptop warning without a hint to the force switch.
      - if the DMI chassis-type is not specific enough, we warn the user
        similarly, but tell them the switch.
      
      to reduce the number of false positives i have added a few new
      chassis types that we have encountered in the last months to the list.
      
      Corresponding to flashrom svn r1390.
      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>
      a34d7190
  16. 07 Jul, 2011 1 commit
  17. 26 Sep, 2010 1 commit
  18. 08 Aug, 2010 1 commit
  19. 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
  20. 03 Jul, 2010 1 commit
  21. 23 Jun, 2010 1 commit
  22. 07 May, 2010 1 commit
  23. 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
  24. 24 Mar, 2010 1 commit
  25. 14 Mar, 2010 1 commit
  26. 13 Mar, 2010 1 commit
  27. 26 Feb, 2010 2 commits
  28. 24 Feb, 2010 1 commit
  29. 12 Feb, 2010 1 commit
  30. 27 Jan, 2010 1 commit
  31. 20 Jan, 2010 1 commit
    • Michael Karcher's avatar
      Matching board via DMI · 6701ee83
      Michael Karcher authored
      
      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: default avatarMichael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
      Acked-by: default avatarLuc Verhaegen <libv@skynet.be>
      Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
      6701ee83