1. 11 Sep, 2013 2 commits
    • 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 were printed in the order they were
      discovered, followed by the chassis-type, which is now output earlier (in dmi_fill).
      
      Because DJGPP does not support strnlen a simple implementation was added
      for it.
      
      This is still only available on x86; actually it is not even compiled in for other
      architectures at all anymore.
      
      Corresponding to flashrom svn r1735.
      Signed-off-by: default avatarSean Nelson <audiohacked@gmail.com>
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Tested-by: default avatarMaciej Pijanka <maciej.pijanka@gmail.com>
      Tested-by: default avatarIdwer Vollering <vidwer@gmail.com>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      4c6d3a4b
    • Stefan Tauner's avatar
      DOS refinements · 449abe28
      Stefan Tauner authored
      
      This allows to use the DOS library trees stored in a user-specified directory.
      
      I have mirrored the needed patches, sources and binaries (the latter
      are properly licensed to allow that) in the flashrom wiki, so use those
      URLs instead of the original sources.
      
      Corresponding to flashrom svn r1734.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      449abe28
  2. 29 Aug, 2013 2 commits
    • Joerg Mayer's avatar
      Automatically add version and date to the manpage · a93d9dc5
      Joerg Mayer authored
      
      To avoid funny effects of ever changing files tracked by the VCS this patch
      moves the manpage data to flashrom.8.tmpl and generates the actual
      manpage with a new makefile target if needed.
      
      Corresponding to flashrom svn r1728.
      Signed-off-by: default avatarJoerg Mayer <jmayer@loplof.de>
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      a93d9dc5
    • Stefan Tauner's avatar
      Improve getrevision.sh · ec7a35f7
      Stefan Tauner authored
      
       - remove bashism.
       - simplify some git-related code.
       - improved parameter and error handling.
       - additional -d/--date action which is similar to the timestamp action.
       - support for an optional path parameter.
       - there is only one sane time format.
       - and only one sane date format too.
       - use UTC dates and times only.
       - vastly improve git_url() to print the correct remote url and
         "nearest" branch.
       - remove username from repository URLs.
       - add "-dirty" to local revisions if there are uncommitted changes.
       - indicate in local revisions how many git-only commits were done
         since branching from upstream svn.
       - fix svn_revision() fallback to svn info and remove git-svn.
       - print leading r in script instead of hardcode it in the makefile;
         no more "0.9.7-runknown".
       - make retrieving the upstream revision work even in cloned git-svn
         repositories.
       - more abstractions and helper functions.
       - less fragmentation of actual functionality.
      
      Corresponding to flashrom svn r1727.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      ec7a35f7
  3. 28 Aug, 2013 1 commit
  4. 27 Aug, 2013 1 commit
  5. 25 Aug, 2013 1 commit
  6. 14 Aug, 2013 1 commit
  7. 13 Aug, 2013 1 commit
  8. 25 Jul, 2013 1 commit
  9. 13 Jul, 2013 1 commit
  10. 01 Apr, 2013 1 commit
  11. 27 Mar, 2013 1 commit
  12. 01 Jan, 2013 1 commit
  13. 29 Dec, 2012 1 commit
    • 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
  14. 29 Nov, 2012 1 commit
  15. 20 Nov, 2012 1 commit
  16. 26 Sep, 2012 1 commit
  17. 25 Sep, 2012 1 commit
  18. 15 Aug, 2012 1 commit
  19. 14 Aug, 2012 1 commit
  20. 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
  21. 08 Aug, 2012 1 commit
  22. 02 Aug, 2012 1 commit
  23. 28 Jul, 2012 1 commit
  24. 16 May, 2012 1 commit
  25. 30 Apr, 2012 1 commit
  26. 14 Apr, 2012 1 commit
  27. 13 Mar, 2012 1 commit
  28. 08 Mar, 2012 1 commit
  29. 25 Feb, 2012 1 commit
  30. 18 Feb, 2012 1 commit
  31. 17 Feb, 2012 1 commit
  32. 16 Feb, 2012 1 commit
  33. 13 Feb, 2012 1 commit
  34. 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
  35. 04 Nov, 2011 1 commit
  36. 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
  37. 03 Sep, 2011 1 commit
  38. 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