summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornima <nima@abc39116-655e-4be6-ad55-d661dc543056>2008-10-31 11:21:24 +0000
committernima <nima@abc39116-655e-4be6-ad55-d661dc543056>2008-10-31 11:21:24 +0000
commit28ddefea64e27dbcbd928cae362527b2d63dcb5a (patch)
treee8a6d8b2544a5b1d318a0a898b239bdb9b97b308
parent6f7a8bbe18e60f6691e7a7c566e28b2a5eda7c94 (diff)
downloadpython-dmidecode-28ddefea64e27dbcbd928cae362527b2d63dcb5a.tar.gz
python-dmidecode-28ddefea64e27dbcbd928cae362527b2d63dcb5a.tar.xz
python-dmidecode-28ddefea64e27dbcbd928cae362527b2d63dcb5a.zip
Cleanup.
git-svn-id: svn://svn.autonomy.net.au/python-dmidecode@98 abc39116-655e-4be6-ad55-d661dc543056
-rw-r--r--AUTHORS60
-rw-r--r--CHANGELOG993
-rw-r--r--biosdecode.c666
3 files changed, 5 insertions, 1714 deletions
diff --git a/AUTHORS b/AUTHORS
index e890a42..c67e26f 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,64 +1,14 @@
-PYTHON MODULE DEVELOPERS (http://projects.autonomy.net.au/dmidecode)
+DEVELOPER AND MAINTAINER OF SPYTHON MODULE (http://projects.autonomy.net.au/dmidecode)
Nima Talebi <nima@it.net.au>
+Stephen Darragh <srd@it.net.au>
+Joel Heenan <joel.heenan@det.nsw.edu.au>
Vaughan Whitteron <vaughan.whitteron@det.nsw.edu.au>
-Stephen Darragh <stephen.darragh@det.nsw.edu.au>
-DEVELOPER AND MAINTAINER (Please see http://www.nongnu.org/dmidecode)
+DEVELOPER AND MAINTAINER OF DMIDECODE (Please see http://www.nongnu.org/dmidecode)
Jean Delvare <khali@linux-fr.org>
ORIGINAL AUTHOR
Alan Cox <alan@redhat.com>
-CODE CONTRIBUTORS (IN CHRONOLOGICAL ORDER)
-Matt Domsch <Matt_Domsch@dell.com>
-Arjan van de Ven <arjanv@redhat.com>
-Mark D. Studebaker <mds@paradyne.com>
-Larry Lile <llile@dreamworks.com>
-Dave Johnson <ddj@cascv.brown.edu>
-Petter Reinholdtsen <pere@hungry.com>
-Roberto Nibali <ratz@tac.ch>
-John Cagle <jcagle@kernel.org>
-Jens Elkner <elkner@linofee.org>
-
MANY THANKS TO (IN CHRONOLOGICAL ORDER)
-Werner Heuser
-Alexandre Duret-Lutz
-Xavier Roche
-Pamela Huntley
-Gael Stephan
-Sebastian Henschel
-Richard Sharpe
-David Wilson
-Glen Foster
-Chad Smith
-Joshua Goldenhar
-Luc Van de Velde
-Mario Lang
-Hugues Lepesant
-Sergey Leonovich
-Mike Cooper
-Marc Rieffel
-Jeff Moyer
-Josef Moellers
-Zing Zing Shishak
-Rafael Avila de Espindola
-Roger Koot
-Martin Pool
-Doug Brenner
-Alex Williamson
-Durval Menezes
-Raphael Raimbault
-Raul Nunez de Arenas Coronado
-Francois Revol
-Dominik Klein
-Erwan Velu
-Don Howard
-Frans Pop
-Tomek Mateja
-Myke Olson
-Torsten Seemann
-Garry Belka
-Klaus Muth
-Antoine Fuselier
-Matthew Garrett
-Landry Breuil
+Justin Cook
diff --git a/CHANGELOG b/CHANGELOG
deleted file mode 100644
index eb420c6..0000000
--- a/CHANGELOG
+++ /dev/null
@@ -1,993 +0,0 @@
-2007-02-26 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Fix an array overrun while decoding the system
- event log status (DMI type 15).
- * biosdecode.c: Use printf instead of fwrite.
- * dmidecode.8: Some OEM-specific types can be decoded now.
- * biosdecode.8: List the FJKEYINF entry point type.
- * vpddecode.8: The product name is no longer displayed.
- * version.h: Set version to 2.9.
-
-2007-02-16 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Do not print the BIOS base address and runtime size
- if the base address is 0. This happens on IA-64 because there's
- no BIOS.
- * Makefile, README: Do not build biosdecode, ownership and
- vpddecode on IA-64, as IA-64 systems have no BIOS. This was
- quite tricky to keep both GNU make and BSD make happy, but it
- seems that I finally succeeded.
-
-2007-02-13 Jean Delvare <khali@linux-fr.org>
-
- Update to support SMBIOS specification version 2.5, second round.
-
- * dmidecode.c: Decode new processor characteristics (multi-core,
- multi-thread, 64-bit) (DMI type 4).
- * dmidecode.c: Decode slot ID of AGP 8x and PCI Express slots (DMI
- type 9).
-
- * dmidecode.c: Fix the mask of 3 bitfield tests. This will let
- the memory type of some systems be properly reported as SDRAM.
- * dmidecode.c: Fix the AMD processors signature decoding.
- * README: Minor edits.
-
-2007-02-12 Jens Elkner <elkner@linofee.org>
-
- Update to support SMBIOS specification version 2.5, first round.
-
- * dmidecode.c: Add chassis types "CompactPCI" and "AdvancedTCA"
- (DMI type 3).
- * dmidecode.c: Add processor types "Turion 64",
- "Dual-Core Opteron", "Athlon 64 X2", "Celeron D", "Pentium D"
- and "Pentium EE" (DMI type 4).
- * dmidecode.c: Add processor upgrade types "Socket mPGA604",
- "Socket LGA771" and "Socket LGA775" (DMI type 4).
- * dmidecode.c: Add connector type "SAS/SATA Plug Receptacle" and
- port types "SATA" and "SAS" (DMI type 8).
- * dmidecode.c: Add on-board device types "PATA Controller",
- "SATA Controller" and "SAS Controller" (DMI type 10).
- * dmidecode.c: Add memory device form factor "FB-DIMM" and memory
- device type "DDR2 FB-DIMM" (DMI type 17).
-
-2007-02-12 Jean Delvare <khali@linux-fr.org>
-
- * dmioem.c: Share the code between HP-specific types 209 and 221.
- Both types are really the same, only the title is different.
- * dmioem.c: Make the HP-specific types 209 and 221 output a bit
- more verbose.
- * dmidecode.c: Let --type decode OEM-specific entries when
- possible.
- * dmidecode.c: Include decoded OEM-specific entries in quiet mode
- output (--quiet).
- * dmidecode.c: Do not complain about truncated entries in quiet
- mode.
- * dmioem.c: Decode HP-specific type 204 entries in a safer way:
- check the length before decoding, and don't assume that all
- strings are provided in the same order as they are used.
-
- Update to support Intel AP-485 (CPUID) revision 31 (was 28).
-
- * dmidecode.c: New CPUID flag IA64.
- * dmidecode.c: Fix the decoding of Intel extended family.
-
-2007-02-11 Jean Delvare <khali@linux-fr.org>
-
- * dmioem.c, dmioem.h: New.
- * Makefile, dmidecode.c, dmidecode.h, dmioem.c, dmioem.h: Move the
- decoding of OEM-specific entries to a separate source file.
- * dmidecode.c: DMI type 38 is tested by now.
- * dmioem.c: The PCI function is typically represented as a single
- digit.
- * Makefile, dmiopt.c, vpdopt.c, util.h: Define an ARRAY_SIZE macro
- which computes the size of a static array, and use it where
- relevant.
-
-2007-02-11 John Cagle <jcagle@kernel.org>
-
- * dmidecode.c: Add support for 3 HP-specific entries: system/rack
- locator (type 204), NIC MAC information (type 209) and NIC iSCSI
- MAC information (type 221).
-
-2007-01-14 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Fix a rare warning.
- * biosdecode.c: Add support for the FJKEYINF entry point, which
- contains data related to the "application panel" on Fujitsu
- laptops.
-
-2006-05-23 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Fix a recently introduced compilation error with
- non-C99 compilers.
- * dmidecode.c: Check for short entries (less than 4 bytes), stop
- with an error when one is encountered.
-
-2006-05-13 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c, README: Drop the product name lookup table. It
- was reported to be unreliable too many times, and was also
- difficult to maintain.
-
-2006-05-10 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Don't cast from u8* to dmi_header*, else
- architectures which do not support unaligned memory accesses
- may break. Instead, copy the members individually. That's a
- bit slower, but that's also safer and we only need to do it
- once per DMI entry, so it's not time critical. So far, we
- were using a trick to later work around the unaligned memory
- access, but the compiler would still warn about the risk,
- which is always confusing.
- * config.h, types.h, README: Automatically enable the unaligned
- memory access workaround on ia64.
- * types.h: Inline U64. It makes sense per se and also lets us
- get rid of a warning about U64 being unused.
- * dmidecode.c: Detect EFI at run-time rather than compilation-
- time. Based on an original patch from Matthew Garrett. This
- will make x86 binaries work for both PC systems with BIOS and
- Macintosh systems with EFI. Also prevent a possible, though
- unlikely, NULL-pointer dereference in the EFI code.
-
-2006-02-25 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Fix typo reported by David Wilson (DMI case 3).
-
-2006-02-04 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Update lookup table from revision 2006-01-31 of IBM
- reference document (add product ID "7B").
- * version.h: Set version to 2.8.
-
-2006-01-21 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: The mysterious last character of xSeries records
- may be a BIOS revision. Display it as such when present and
- non zero, and ask users to report.
- * vpddecode.c: Adjust an error message.
- * dmidecode.8: Update the sample entry to match the new output
- format.
- * README: Improve the IA-64 specific section and the vpddecode
- tool description.
- * vpdopt.h: Add missing system header file include.
-
-2006-01-20 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Assume a constant length of 12 characters for the
- "Default Flash Image File Name" entry. The 13th character never
- contained anything useful, so it probably has a different
- meaning (unknown for now).
-
-2005-12-24 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Scan for VPD records on 4-byte boundaries instead
- of 16-byte boundaries. This is needed for some eServer xSeries
- 206. Still emit a warning if a VPD record is found not on a
- 16-byte boundary.
-
-2005-10-26 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Add product ID "NR". Reported by Klaus Muth.
- * vpddecode.c: Update lookup table from revision 2005-10-06 of IBM
- reference document (add product IDs "77" and "78").
-
-2005-10-05 Jean Delvare <khali@linux-fr.org>
-
- Update to support IPMI specification version 2.0 (was 1.5).
-
- * dmidecode.c: Support IPMI interface type SSIF. Original patch
- by Garry Belka.
-
-2005-10-04 Jean Delvare <khali@linux-fr.org>
-
- * vpdopt.c: Display the list of all valid string keywords when
- --string is used without an argument.
- * vpddecode.8: Document the new -s, --string option.
- * dmidecode.8: List the four new string keywords.
- * vpddecode.c: Keep quiet when --string is used, even when no VPD
- record is found.
-
-2005-10-03 Jean Delvare <khali@linux-fr.org>
-
- * biosdecode.c: Fix a potential (but highly improbable) buffer
- overrun in the VPD record decoding.
- * biosdecode.c: Change the xSeries checksumming method to
- accomodate a strange xSeries 440 VPD record, as was done in
- vpddecode.c some weeks ago. Do not display the default flash
- image file name anymore, it's not so useful and the field length
- is now uncertain.
- * vpdopt.c, vpdopt.h: New.
- * Makefile, vpddecode.c, vpdopt.c, vpdopt.h: Move the command line
- handling of vpddecode to a separate source file.
- * vpddecode.c, vpdopt.c, vpdopt.h: Add option -s, --string. It
- prints one selected VPD string instead of the regular output.
-
-2005-09-24 Jean Delvare <khali@linux-fr.org>
-
- * dmiopt.c: Fix incorrect header include. The strcasecmp function
- is defined in <strings.h>, not <string.h>. Reported by Petter
- Reinholdtsen.
-
-2005-09-14 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.h: New.
- * dmidecode.c, dmidecode.h, Makefile: Export four specific
- decoding functions, make them suitable for external call.
- * dmidecode.c, dmiopt.c, dmiopt.h, Makefile: Make it possible
- for --string to print decoded binary data rather than only
- DMI strings. Add four such string keywords.
- * dmidecode.c, dmiopt.c, dmiopt.h: Modify the opt structure
- to handle the string option more efficiently.
-
-2005-09-13 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Slightly change the xSeries checksumming method to
- accomodate a strange xSeries 440 VPD record. Also tweak the
- decoding of the "Default Flash Image File Name" entry. Thanks
- to Torsten Seemann for providing a test VPD record.
-
-2005-09-05 Jean Delvare <khali@linux-fr.org>
-
- * Makefile: Use -Wundef.
-
-2005-08-31 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Drop trailing dot from handle description line.
-
-2005-08-29 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Reword a comment about CPUID.
- * dmidecode.c: Claim to support revision 28 of Intel AP-485
- (CPUID). No relevant change since revision 27.
-
-2005-08-25 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Add product ID "VI". Reported by Torsten Seemann.
- * vpddecode.c: Update lookup table from revision 2005-06-24 of IBM
- reference document (add product IDs "1U", "1X", "70", "74", "75"
- and "76", update product ID "1Y").
- * dmiopt.c: Complain about unknown options again.
- * biosdecode.c, ownership.c, vpddecode.c: getopt_long() will never
- return ':'.
-
-2005-08-04 Jean Delvare <khali@linux-fr.org>
-
- * README: Manual pages document the command line interface.
- A discussion list exists for developers. Mmap is used on
- most systems, not just Linux.
- * version.h: Set version to 2.7.
-
-2005-08-02 Jean Delvare <khali@linux-fr.org>
-
- * dmiopt.c, dmidecode.8: Options --dump and --quiet are mutually
- exclusive.
-
-2005-06-23 Jean Delvare <khali@linux-fr.org>
-
- * dmiopt.c, dmidecode.8: Options --dump and --string are mutually
- exclusive.
-
-2005-06-22 Jean Delvare <khali@linux-fr.org>
-
- * dmiopt.c: Display the list of all valid type or string keywords
- when --type or --string, respectively, is used without an
- argument or with an invalid one.
- * dmidecode.8: Document the new -s, --string option. Update the
- -t, --type option documentation.
- * dmiopt.c, dmidecode.8: Add string keyword "bios-release-date",
- the Linux kernel uses it.
- * dmidecode.c, dmidecode.8: Fix typo ("Controler" becomes
- "Controller").
-
-2005-06-21 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c, dmiopt.c, dmiopt.h: Add option -s, --string. It
- prints one selected DMI string instead of the regular output.
-
-2005-06-18 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Hide handle references and entries of unknown
- type when --quiet is used.
- * dmidecode.8: Document the new -q, --quiet option.
- * dmidecode.c: Stop decoding at end of table entry when --quiet
- is used. Also don't warn about incorrect table length or entries
- count when --quiet is used.
-
-2005-06-17 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c, dmiopt.c, dmiopt.h: Add option -q, --quiet. It
- makes the output less verbose.
- * dmidecode.c: Suppress one level of indentation in the output,
- insert blank lines between records. This will hopefully make
- the output easier to read.
- * dmidecode.c: Hide table address and size when --type is used.
-
-2005-06-16 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.8: Document the new -t, --type option.
-
-2005-06-15 Jean Delvare <khali@linux-fr.org>
-
- * dmiopt.c, dmiopt.h: New.
- * Makefile, dmidecode.c, dmiopt.c, dmiopt.h: Move the command line
- handling of dmidecode to a separate source file.
- * dmiopt.c: Define keywords to be used with --type (instead of
- numeric values).
-
-2005-06-14 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Centralize the main exit point. This allows fixing
- a minor, recently introduced memory leak which was happening on
- error conditions.
-
-2005-06-13 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Add option -t, --type. It limits the output to
- the given type(s) of DMI entries.
-
-2005-05-25 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Add product IDs "KE", "NT" and "ZR". Reported by
- Bernd Krumboeck.
-
-2005-05-15 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.8, vpddecode.8: Document the new -u, --dump option.
-
- Update to support SMBIOS specification version 2.4 (was 2.4
- preliminary). There is actually no difference between 2.4
- preliminary and 2.4 final.
-
- * dmidecode.c: Update the "System Management BIOS Reference
- Specification" version.
-
-2005-04-26 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Add product ID "M1". Reported by Myke Olson.
- * vpddecode.c: Add option -u, --dump. It disables decoding of the
- VPD records, a raw dump is displayed instead. This option is
- mainly intended for debugging.
-
-2005-04-03 Jean Delvare <khali@linux-fr.org>
-
- * Makefile: Use variables for install and rm commands, so that these
- can be overriden by the caller.
-
-2005-03-25 Jean Delvare <khali@linux-fr.org>
-
- * Makefile: Install some documentation files (README, CHANGELOG,
- AUTHORS).
-
- Update to support SMBIOS specification version 2.4 preliminary
- [11/18/2004] (was 2.3.4).
-
- * dmidecode.c: Add BIOS characteristics (DMI type 0).
- * dmidecode.c: Display BIOS and firmware revisions where available
- (DMI type 0).
- * dmidecode.c: Display system SKU number and family where available
- (DMI type 1).
- * dmidecode.c: Add system slot types and widths (DMI type 9).
- * dmidecode.c: Add memory device type "DDR2" (DMI type 17).
-
-2005-03-20 Jean Delvare <khali@linux-fr.org>
-
- * Makefile: Install manual pages under $(prefix)/share/man by
- default, instead of $(prefix)/man, so as to comply with the FHS.
-
-2005-03-08 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Update lookup table from revision 2005-03-08 of IBM
- reference document (add product ID "1V", update product ID "1R").
- Thanks to Ingo van Lil for reporting about product ID "1V".
-
-2005-03-06 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Add option -u, --dump. It disables decoding of the
- entries, raw dumps are displayed instead. This option is mainly
- intended for debugging.
- * Makefile: Use -Winline.
- * dmidecode.c: Make ASCII filtering of strings faster.
-
-2005-02-28 Jean Delvare <khali@linux-fr.org>
-
- * version.h: Set version to 2.6.
- * Makefile: ownership.o depends on version.h.
-
-2005-02-24 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Add product ID "2C". Reported by Tomek Mateja.
-
-2005-02-17 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Add product IDs "OP" and "PN". Reported by Scott
- Denham.
- * vpddecode.c: Fix typo in one product name (560E improperly
- spelled 650E).
- * vpddecode.c: Add product IDs "IW" and "IY", as added recently
- on IBM's reference web page. Update reference.
- * config.h: Use mmap on all but BeOS, instead of only Linux.
-
-2005-02-12 Jean Delvare <khali@linux-fr.org>
-
- * util.c: Fix incorrect length in munmap call.
- * Makefile: Use -Wmissing-prototypes.
- * dmidecode.c: Fix maximum battery error value.
-
-2005-02-11 Jean Delvare <khali@linux-fr.org>
-
- * Makefile: Discard -pedantic, we don't really need this.
- * util.c: Display an error message on memory shortage. Suggested
- by Don Howard.
-
- Fix a bug causing dmidecode to crash on some systems with more than
- 2 GB of memory. This is a signedness issue, which existed up to
- version 2.2, was fixed in 2.3 but reintroduced in a different form
- in 2.5 as part of a code clean up and refactoring.
- https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=112355
- Thanks to Petter Reinholdtsen for reporting. Thanks to Don Howard
- for additional insight.
-
- * dmidecode.c, util.c, util.h: Use size_t instead of off_t when
- handling memory addresses.
-
-2005-02-10 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Add option -h, --help, display a usage summary.
- * biosdecode.c, ownership.c, vpddecode.c: Copy command-line handling
- from dmidecode.c.
- * biosdecode.8, dmidecode.8, ownership.8, vpddecode.8: Document
- the new command-line interface.
-
-2005-02-06 Jean Delvare <khali@linux-fr.org>
-
- * Makefile: Everything depends on config.h.
- * dmidecode.c: Add basic command-line handling. This was suggested
- a long time ago by Erwan Velu.
-
-2005-02-01 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Add product IDs "AP", "KP" and "RD". Reported by
- David Rosala.
-
-2005-01-17 Jean Delvare <khali@linux-fr.org>
-
- * README: Add a note about Cygwin. Thanks to Dominik Klein for
- reporting success.
-
-2004-12-10 Jean Delvare <khali@linux-fr.org>
-
- Increase portability and configurability to in order to support BeOS.
-
- * config.h: New.
- * config.h: Define a default memory device.
- * biosdecode.c, dmidecode.c, ownership.c, vpddecide.c: Include
- config.h and use the defined default memory device.
- * Makefile, config.h, util.c, README: Move USE_MMAP to config.h,
- use mmap on Linux only.
-
-2004-11-22 Jean Delvare <khali@linux-fr.org>
-
- * biosdecode.c: Avoid size_t in printf. Should remove a warning on
- ia64. Thanks to Petter Reinholdtsen for reporting.
- * util.c: Use sysconf(_SC_PAGESIZE) instead of getpagesize() where
- available. This may remove a warning on ia64 as a side effect.
- Thanks to Petter Reinholdtsen for reporting.
-
-2004-11-21 Jean Delvare <khali@linux-fr.org>
-
- * util.c, util.h: Function myread has no more user outside of util.c.
- * biosdecode.c: Speed improvements.
-
-2004-11-20 Jean Delvare <khali@linux-fr.org>
-
- * biosdecode.c, ownership.c, vpddecode.c: Make use of the mem_chunk
- function.
- * vpddecode.c: Simplify the mem loop code a bit.
-
-2004-11-12 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Hide bank connection type for uninstalled memory
- modules.
- * dmidecode.c: Reference comment fix.
- * dmidecode.c: Hide watchdog timer details when no watchdog is
- present. Change label for no watchdog.
- * README: Match case change for PREFIX (now prefix) in the Makefile
- file. Reported by Raul Nunez de Arenas Coronado.
-
-2004-11-12 Jean Delvare <khali@linux-fr.org>
-
- Update to support DMTF Master MIF version 040707 (was 030621).
-
- * dmidecode.c: One additional processor type (Sempron).
- * dmidecode.c: One additional processor type (Efficeon TM8800).
- * dmidecode.c: One additional processor upgrade type (Socket 939).
- * dmidecode.c: Add the AMD Sempron to the list of x86-class
- processors.
-
- Update to support Intel AP-485 (CPUID) revision 27 (was 25).
-
- * dmidecode.c: Rename SBF flag to PBE.
-
-2004-11-11 Jean Delvare <khali@linux-fr.org>
-
- * util.c: More helpful error messages.
- * util.c: Use MAP_SHARED instead of MAP_PRIVATE in mmap.
- * version.h: Set version to 2.5.
-
-2004-11-10 Jean Delvare <khali@linux-fr.org>
-
- * README: Update dmidecode presentation (copied from the web page).
- Move the list of supported systems from the documentation section
- to the installation section.
-
-2004-11-09 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Update product ID "1R". Reported by Marco Wertejuk.
-
-2004-10-24 Jean Delvare <khali@linux-fr.org>
-
- * util.c: Workaround missing MAP_FAILED definition, needed on
- old systems. Original patch from Durval Menezes.
-
-2004-10-14 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Search for EFI systab at /sys/firmware/efi/systab.
- Original patch from Alex Williamson.
- * dmidecode.c: Remove warning about legacy_decode not being used
- when USE_EFI is defined.
- * dmidecode.c: Detect missing SMBIOS entry point in efi/systab.
- * dmidecode.c: Fix fatal typo in USE_EFI-specific code.
-
-2004-10-01 Roberto Nibali <ratz@tac.ch>
-
- * Makefile: Be LDFLAGS aware.
-
-2004-07-24 Jean Delvare <khali@linux-fr.org>
-
- * util.c: Add missing header include.
-
-2004-06-11 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Add product IDs "GE" and "T2". Reported by Doug Brenner.
-
-2004-05-02 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Move legacy DMI entry point decoding to a separate
- function.
- * dmidecode.c: Use a 64 kB buffer for searching entry points,
- instead of repeated 16-byte reads.
- * util.c, util.h: New mem_chunk function. It returns a buffer
- containing a copy of a given chunk of the physical memory.
- * dmidecode.c: Make use of the new mem_chunk function.
-
-2004-04-30 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Add product ID "JP". Reported by Bernd Krumboeck.
-
-2004-04-22 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c, biosdecode.c, ownership.c, types.h: Refactor WORD-like
- macros into types.h.
-
-2004-04-21 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c, biosdecode.c: Fix my contact information.
- * dmidecode.c: Update copyright year.
-
-2004-04-20 Jean Delvare <khali@linux-fr.org>
-
- * README: Correct Chad Smith's name. Reported by Martin Pool.
-
-2004-04-15 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Add product ID "PL". Reported by Mark Syms.
-
-2004-04-14 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Add product ID "PD". Reported by Roger Koot.
-
-2004-04-11 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c, Makefile, README: Drop TABLE_LITTLEENDIAN.
- * README: Update manual pages information.
-
-2004-04-02 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Add product ID "NV". Reported by Shawn Starr.
-
-2004-03-27 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Add product ID "24". Reported by Paul Sturm.
- * dmidecode.c: Fix two missing comas in string enumerations. Thanks to
- Joshua Goldenhar for reporting the first one.
-
-2004-03-24 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Add product ID "PJ". Reported by Roger Koot.
- * vpddecode.c: Rename two Netvista systems to use their real name
- instead of machine type.
-
-2004-03-20 Petter Reinholdtsen <pere@hungry.com>
-
- * Makefile: Make it easier to select where to install the binaries
- and manual pages, and to use different paths when building and
- installing.
-
-2004-03-19 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Add product ID "2A". Reported by Rafael Avila
- de Espindola.
- * version.h: Set version to 2.4.
-
-2004-03-07 Jean Delvare <khali@linux-fr.org>
-
- * biosdecode.c, vpddecode.c: Add a third checksumming method for
- VPD records.
- * vpddecode.c: Add product ID "PI", update "20". Reported by
- Zing Zing Shishak.
-
-2004-03-05 Jean Delvare <khali@linux-fr.org>
-
- * README: Update.
-
-2004-02-25 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Support CPUID document revision 25 (no change).
- * dmidecode.c: Shorten the EOF error message.
-
-2004-02-23 Jean Delvare <khali@linux-fr.org>
-
- * man/biosdecode.8, man/dmidecode.8, man/ownership.8,
- man/vpddecode.8: New.
- * Makefile: Handle new manual pages.
-
-2003-12-28 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Add product ID "PT". Reported by Ramiro Barreiro.
-
-2003-12-17 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Add product ID "RE". Reported by Josef Moellers.
- * vpddecode.c, biosdecode.c: Handle longer VPD records as seen on
- xSeries. These have a different checksumming method.
-
-2003-12-03 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Add product ID "TT". Reported by Hugues Lepesant.
- * vpddecode.c, biosdecode.c: Fix typo ("Bios" becomes "BIOS").
- * dmidecode.c: Add another exception to the CPUID-supporting CPU list
- ("Pentium III MMX").
- * dmidecode.c: Number devices in multi-device on board device
- information structures (DMI case 10).
-
-2003-11-13 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Automatically detect architectures on which to use EFI
- (ia64 for now). Suggested by Jeff Moyer.
-
-2003-11-11 Jean Delvare <khali@linux-fr.org>
-
- * vpddecode.c: Add product ID "KX". Reported by Klaus Ade Johnstad,
- confirmed by Pamela Huntley.
- * dmidecode.c: Display CPUID values as decimal, not hexa. This is
- a reversal of the 2003-07-18 change to be consistent with
- /proc/cpuinfo under Linux.
- * dmidecode.c: Fix processor ID decoding for older 80486. Not very
- important since such systems are unlikely to support SMBIOS.
- * dmidecode.c: Modify CPU signature display for AMD processors.
- * vpddecode.c, biosdecode.c: Fix incorrect VPD checksumming.
-
-2003-10-24 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Add another exception to the CPUID-supporting CPU list.
-
-2003-10-19 Jean Delvare <khali@linux-fr.org>
-
- * README: Clarify why mmap is used. Fix typo.
- * Makefile: Add deleting core to the clean target.
- * version.h: Set version to 2.3.
-
-2003-10-17 Jean Delvare <khali@linux-fr.org>
-
- * biosdecode.c: Use (void) instead of __attribute__ ((usused)) to
- declare that a function parameter isn't used. According to Alexandre
- Duret-Lutz, this is the portable way do to it. Fix typo in comment.
- * dmidecode.c: Fix typo.
-
-2003-10-16 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Remove useless comparison in dmi_system_boot_status.
- Thanks to Alexandre Duret-Lutz for pointing this out.
- * biosdecode.c: Add a missing length check in acpi_decode. Found
- using Valgrind.
- * biosdecode.c: Fix buffer overrun in main. Found using Valgrind.
-
-2003-10-14 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Update DMTF reference addresses.
- * dmidecode.c: List two more processors (Athlon64 and Pentium M)
- as x86-class (i.e. supporting CPUID).
-
-2003-10-11 Jean Delvare <khali@linux-fr.org>
-
- Update to support DMTF Master MIF version 030621 (was 021205).
-
- * dmidecode.c: Handle unknown processor voltage.
- * dmidecode.c: Fix typo in event log method.
- * dmidecode.c: One additional processor type (Pentium M).
- * dmidecode.c: Add the AMD Opteron to the list of x86-class
- processors. Thanks to Mike Cooper for providing information.
- * vpddecode.c: New program for decoding a machine's VPD structure
- (only found in IBM machines).
- * Makefile: Update accordingly.
- * Makefile: Fix dependencies for ownership. Add strip target. Various
- cleanups (reordering, comments, optimization and debug flags).
- * README: Update to reflect the addition of the strip target and the
- vpddecode program. Some additional changes and fixes.
-
-2003-10-10 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Change mmap options to prevent dmidecode from being
- killed by the Linux kernel in some rare cases. Reported by
- Mike Cooper.
- * dmidecode.c: Various code cleanups and optimizations.
-
-2003-10-09 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Fix a bug that prevented dmidecode to reach DMI tables
- beyond the 2GB memory limit. Reported by Mike Cooper.
- * ownership.c: Add one reference. Code cleanups.
- * CHANGELOG: Fix typo.
-
-2003-10-08 Jean Delvare <khali@linux-fr.org>
-
- * biosdecode.c: Fix potentially wrong checksum on Sony-specific entry.
- * biosdecode.c: Unimportant changes (comment, typo...) in
- Compaq-specific section.
- * biosdecode.c: Add support for VPD (vital product data, IBM-specific).
- * CHANGELOG: Various updates.
-
-2003-10-07 Jean Delvare <khali@linux-fr.org>
-
- * ownership.c: Fix a harmless warning on x86_64. Reported by Mike
- Cooper.
-
-2003-09-19 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Explicitly say when no SMBIOS nor DMI entry point
- was found. Implicitly suggested by Sergey Leonovich.
-
-2003-09-11 Jean Delvare <khali@linux-fr.org>
-
- * Makefile: Don't use $^ since it isn't supported by BSD make.
- Reported by Hugues Lepesant.
-
-2003-09-05 Jean Delvare <khali@linux-fr.org>
-
- * Makefile: Fix missing ownership dependency for install target.
- Reported by Mario Lang.
-
-2003-08-08 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Update the README file (mainly the now solved laptop
- and IA-64 issues, and add a section for biosdecode and ownership).
- * version.h: Set version to 2.2.
-
-2003-07-18 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Display CPUID values as hexa, not decimal.
- * dmidecode.c: Shift the I2C slave address by one bit to the right
- (DMI case 38).
-
-2003-06-27 Jean Delvare <khali@linux-fr.org>
-
- * biosdecode.c: Better display of Compaq-specific entries (thank to
- some documentation).
-
-2003-06-25 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Remove fp_last (not useful anymore). Reworded the "table
- is unreachable" message to mention the -DUSE_MMAP solution.
-
-2003-06-19 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Add support for IA-64.
- * Makefile: Add new option CFLAGS modifier lines for IA-64.
-
-2003-06-17 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c, biosdecode.c: Move common "util" functions to util.c.
- * util.c, util.h: New.
- * types.h: New.
- * Makefile: Update accordingly.
- * biosdecode.c: Add detection of Compaq-specific entries.
- * ownership.c: New program for finding a machine's ownership tag
- (only found in Compaq machines). Requested by Luc Van de Velde.
- * Makefile: Update again.
-
-2003-06-10 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Fix typo in IPMI register spacing table.
- * version.h: Set version to 2.1.
-
-2003-06-04 Jean Delvare <khali@linux-fr.org>
-
- * Makefile: Restore optional CFLAGS modifier lines.
- * README: New.
-
-2003-05-30 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Cleaner handling of unreachable table.
-
-2003-05-27 Jean Delvare <khali@linux-fr.org>
-
- Update to support Intel AP-485 specification (CPUID) revision 023
- (was 021).
-
- * dmidecode.c: Add SBF flag to processor ID (DMI case 4). Add comment
- about new flags returned in ECX.
-
-2003-05-26 Jean Delvare <khali@linux-fr.org>
-
- Update to support SMBIOS specification version 2.3.4 (was 2.3.3).
-
- * dmidecode.c: Add processor and processor upgrade names (DMI case 4).
- * dmidecode.c: Add slot names (DMI case 9).
-
-2003-05-22 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Fix typo reported by David Wilson (DMI case 6).
-
-2003-03-08 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Decode more fields according to the IPMI specification
- (DMI case 38).
-
-2003-03-07 Jean Delvare <khali@linux-fr.org>
-
- Fixed IPMI device information (DMI case 38). Thanks to Richard Sharpe
- for pointing the bugs out.
-
- * dmidecode.c: Fix IPMI interface type being shifted by one.
- * dmidecode.c: Fix NV storage device being improperly displayed.
- * dmidecode.c: Reword IPMI specification revision into specification
- version, as suggested in the IPMI specification itself.
- * dmidecode.c: Add a reference to the IPMI specification.
- * dmidecode.c: Show I2C address as hexadecimal.
- * dmidecode.c: Base address is a QWORD, not DWORD.
- * dmidecode.c: Decode some extra fields according to the IPMI
- specification.
-
-2003-03-06 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c, biosdecode.c: Move all changelog entries to CHANGELOG.
- * CHANGELOG: New. Format inspired by Heroes' ChangeLog file.
- * dmidecode.c, biosdecode.c, Makefile: Update copyright years.
- * dmidecode.c, biosdecode.c, Makefile: Move version definition to
- version.h. Update dependencies accordingly.
- * version.h: New.
-
-2002-10-21 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Change supported log type descriptors display.
- * dmidecode.c: Code optimization in event log status.
- * dmidecode.c: Remove extra newline in voltage probe accuracy.
- * dmidecode.c: Display "OEM-specific" if type is 128 or more.
- * dmidecode.c: Do not display Strings on dump if there are no strings.
- * dmidecode.c: Add ASCII-filtering to dmi_string.
- * dmidecode.c: Convert all dates to ISO 8601.
-
-2002-10-18 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Complete rewrite.
- * dmidecode.c: Now complies with SMBIOS specification 2.3.3.
- * dmidecode.c: Move all non-DMI stuff to biosdecode.c.
- * biosdecode.c: New.
-
-2002-10-15 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Fix bad index in DMI case 27 (cooling device).
-
-2002-10-14 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Fix typo in dmi_memory_array_location.
- * dmidecode.c: Replace Kbyte by kB in DMI case 16.
- * dmidecode.c: Add DDR entry in dmi_memory_device_type.
- * dmidecode.c: Fix extra s in SYSID.
-
-2002-10-12 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Fix maximum cache size and installed size being
- inverted.
- * dmidecode.c: Fix typos in port types.
-
-2002-10-10 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Remove extra semicolon at the end of
- dmi_memory_array_use.
- * dmidecode.c: Fix compilation warnings.
- * dmidecode.c: Add missing backslash in DMI case 37.
- * dmidecode.c: Fix BIOS ROM size (DMI case 0).
-
-2002-10-05 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: More ACPI decoded.
- * dmidecode.c: More PNP decoded.
- * dmidecode.c: More SYSID decoded.
- * dmidecode.c: PCI Interrupt Routing decoded.
- * dmidecode.c: BIOS32 Service Directory decoded.
- * dmidecode.c: Sony system detection (unconfirmed).
- * dmidecode.c: Checksums verified whenever possible.
- * dmidecode.c: Better checks on file read and close.
- * dmidecode.c: Define VERSION and display version at beginning.
- * dmidecode.c: More secure decoding (won't run off the table in any
- case).
- * dmidecode.c: Do not try to decode more structures than announced.
- * dmidecode.c: Fix an off-by-one error that caused the last address
- being scanned to be 0x100000, not 0xFFFF0 as it should.
-
-2002-09-28 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Fix missing coma in dmi_bus_name.
- * dmidecode.c: Remove unwanted bitmaskings in dmi_mgmt_dev_type,
- dmi_mgmt_addr_type, dmi_fan_type, dmi_volt_loc, dmi_temp_loc and
- dmi_status.
- * dmidecode.c: Fix DMI table read bug ("dmi: read: Success").
- * dmidecode.c: Make the code pass -W again.
- * dmidecode.c: Fix return value of dmi_card_size.
-
-2002-09-20 Dave Johnson <ddj@cascv.brown.edu>
-
- * dmidecode.c: Fix comparisons in dmi_bus_name.
- * dmidecode.c: Fix comparison in dmi_processor_type.
- * dmidecode.c: Fix bitmasking in dmi_onboard_type.
- * dmidecode.c: Fix return value of dmi_temp_loc.
-
-2002-09-17 Larry Lile <llile@dreamworks.com>
-
- * dmidecode.c: Type 16 & 17 structures displayed per SMBIOS 2.3.1 spec.
-
-2002-08-23 Alan Cox <alan@redhat.com>
-
- * dmidecode.c: Make the code pass -Wall -pedantic by fixing a few
- harmless sign of pointer mismatches.
- * dmidecode.c: Correct main() prototype.
- * dmidecode.c: Check for compilers with wrong type sizes.
-
-2002-08-09 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Better DMI struct count/size error display.
- * dmidecode.c: More careful memory access in dmi_table.
- * dmidecode.c: DMI case 13 (Language) decoded.
- * dmidecode.c: C++ style comments removed. Commented out code removed.
- * dmidecode.c: DMI 0.0 case handled.
- * dmideocde.c: Fix return value of dmi_port_type and
- dmi_port_connector_type.
-
-2002-08-06 Jean Delvare <khali@linux-fr.org>
-
- * dmidecode.c: Reposition file pointer after DMI table display.
- * dmidecode.c: Disable first RSD PTR checksum (was not correct anyway).
- * dmidecode.c: Show actual DMI struct count and occupied size.
- * dmidecode.c: Check for NULL after malloc.
- * dmidecode.c: Use SEEK_* constants instead of numeric values.
- * dmidecode.c: Code optimization (and warning fix) in DMI cases 10 and
- 14.
- * dmidecode.c: Add else's to avoid unneeded cascaded if's in main loop.
- * dmidecode.c: Code optimization in DMI information display.
- * dmidecode.c: Fix all compilation warnings.
-
-2002-08-03 Mark D. Studebaker <mds@paradyne.com>
-
- * dmidecode.c: Better indent in dump_raw_data.
- * dmidecode.c: Fix return value of dmi_bus_name.
- * dmidecode.c: Additional sensor fields decoded.
- * dmidecode.c: Fix compilation warnings.
-
-2001-12-13 Arjan van de Ven <arjanv@redhat.com>
-
- * dmidecode.c: Fix memory bank type (DMI case 6).
-
-2001-07-02 Matt Domsch <Matt_Domsch@dell.com>
-
- * dmidecode.c: Additional structures displayed per SMBIOS 2.3.1 spec.
diff --git a/biosdecode.c b/biosdecode.c
deleted file mode 100644
index 354234e..0000000
--- a/biosdecode.c
+++ /dev/null
@@ -1,666 +0,0 @@
-/*
- * BIOS Decode
- *
- * (C) 2000-2002 Alan Cox <alan@redhat.com>
- * (C) 2002-2007 Jean Delvare <khali@linux-fr.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * For the avoidance of doubt the "preferred form" of this code is one which
- * is in an open unpatent encumbered format. Where cryptographic key signing
- * forms part of the process of creating an executable the information
- * including keys needed to generate an equivalently functional executable
- * are deemed to be part of the source code.
- *
- * References:
- * - DMTF "System Management BIOS Reference Specification"
- * Version 2.3.4
- * http://www.dmtf.org/standards/smbios
- * - Intel "Preboot Execution Environment (PXE) Specification"
- * Version 2.1
- * http://www.intel.com/labs/manage/wfm/wfmspecs.htm
- * - ACPI "Advanced Configuration and Power Interface Specification"
- * Revision 2.0
- * http://www.acpi.info/spec20.htm
- * - Phoenix "BIOS32 Service Directory"
- * Revision 0.4
- * http://www.phoenix.com/en/support/white+papers-specs/
- * - Microsoft "Plug and Play BIOS Specification"
- * Version 1.0A
- * http://www.microsoft.com/hwdev/tech/PnP/
- * - Microsoft "PCI IRQ Routing Table Specification"
- * Version 1.0
- * http://www.microsoft.com/hwdev/archive/BUSBIOS/pciirq.asp
- * - Compaq "Technical Reference Guide for Compaq Deskpro 4000 and 6000"
- * First Edition
- * http://h18000.www1.hp.com/support/techpubs/technical_reference_guides/113a1097.html
- * - IBM "Using the BIOS Build ID to identify Thinkpad systems"
- * Revision 2005-09-19
- * http://www-307.ibm.com/pc/support/site.wss/MIGR-45120.html
- * - Fujitsu application panel technical details
- * As of July 23rd, 2004
- * http://apanel.sourceforge.net/tech.php
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <getopt.h>
-
-#include "version.h"
-#include "config.h"
-#include "types.h"
-#include "util.h"
-
-/* Options are global */
-struct opt
-{
- const char* devmem;
- unsigned int flags;
-};
-static struct opt opt;
-
-#define FLAG_VERSION (1<<0)
-#define FLAG_HELP (1<<1)
-
-struct bios_entry {
- const char *anchor;
- size_t anchor_len; /* computed */
- off_t low_address;
- off_t high_address;
- size_t (*length)(const u8 *);
- int (*decode)(const u8*, size_t);
-};
-
-
-/*
- * SMBIOS
- */
-
-static size_t smbios_length(const u8 *p)
-{
- return(p[0x05]==0x1E?0x1F:p[0x05]);
-}
-
-static int smbios_decode(const u8 *p, size_t len)
-{
- if(len<0x1F || !checksum(p, p[0x05])
- || memcmp("_DMI_", p+0x10, 5)!=0
- || !checksum(p+0x10, 0x0F))
- return 0;
-
- printf("SMBIOS %u.%u present.\n",
- p[0x06], p[0x07]);
- printf("\tStructure Table Length: %u bytes\n",
- WORD(p+0x16));
- printf("\tStructure Table Address: 0x%08X\n",
- DWORD(p+0x18));
- printf("\tNumber Of Structures: %u\n",
- WORD(p+0x1C));
- printf("\tMaximum Structure Size: %u bytes\n",
- WORD(p+0x08));
-
- return 1;
-}
-
-static size_t dmi_length(const u8 *p)
-{
- (void) p;
-
- return(0x0F);
-}
-
-static int dmi_decode(const u8 *p, size_t len)
-{
- if(len<0x0F || !checksum(p, len))
- return 0;
-
- printf("Legacy DMI %u.%u present.\n",
- p[0x0E]>>4, p[0x0E]&0x0F);
- printf("\tStructure Table Length: %u bytes\n",
- WORD(p+0x06));
- printf("\tStructure Table Address: 0x%08X\n",
- DWORD(p+0x08));
- printf("\tNumber Of Structures: %u\n",
- WORD(p+0x0C));
-
- return 1;
-}
-
-/*
- * SYSID
- */
-
-static size_t sysid_length(const u8 *p)
-{
- return WORD(p+0x08);
-}
-
-static int sysid_decode(const u8 *p, size_t len)
-{
- if(len<0x11 || !checksum(p, WORD(p+0x08)))
- return 0;
-
- printf("SYSID present.\n");
- printf("\tRevision: %u\n",
- p[0x10]);
- printf("\tStructure Table Address: 0x%08X\n",
- DWORD(p+0x0A));
- printf("\tNumber Of Structures: %u\n",
- WORD(p+0x0E));
-
- return 1;
-}
-
-/*
- * PnP
- */
-
-static size_t pnp_length(const u8 *p)
-{
- return(p[0x05]);
-}
-
-static const char *pnp_event_notification(u8 code)
-{
- static const char *notification[]={
- "Not Supported", /* 0x0 */
- "Polling",
- "Asynchronous",
- "Unknown" /* 0x3 */
- };
-
- return notification[code];
-}
-
-static int pnp_decode(const u8 *p, size_t len)
-{
- if(len<0x21 || !checksum(p, p[0x05]))
- return 0;
-
- printf("PNP BIOS %u.%u present.\n",
- p[0x04]>>4, p[0x04]&0x0F);
- printf("\tEvent Notification: %s\n",
- pnp_event_notification(WORD(p+0x06)&0x03));
- if((WORD(p+0x06)&0x03)==0x01)
- printf("\tEvent Notification Flag Address: 0x%08X\n",
- DWORD(p+0x09));
- printf("\tReal Mode 16-bit Code Address: %04X:%04X\n",
- WORD(p+0x0F), WORD(p+0x0D));
- printf("\tReal Mode 16-bit Data Address: %04X:0000\n",
- WORD(p+0x1B));
- printf("\t16-bit Protected Mode Code Address: 0x%08X\n",
- DWORD(p+0x13)+WORD(p+0x11));
- printf("\t16-bit Protected Mode Data Address: 0x%08X\n",
- DWORD(p+0x1D));
- if(DWORD(p+0x17)!=0)
- printf("\tOEM Device Identifier: %c%c%c%02X%02X\n",
- 0x40+((p[0x17]>>2)&0x1F),
- 0x40+((p[0x17]&0x03)<<3)+((p[0x18]>>5)&0x07),
- 0x40+(p[0x18]&0x1F), p[0x19], p[0x20]);
-
- return 1;
-}
-
-/*
- * ACPI
- */
-
-static size_t acpi_length(const u8 *p)
-{
- return(p[15]==2?36:20);
-}
-
-static const char *acpi_revision(u8 code)
-{
- switch(code)
- {
- case 0:
- return " 1.0";
- case 2:
- return " 2.0";
- default:
- return "";
- }
-}
-
-static int acpi_decode(const u8 *p, size_t len)
-{
- if(len<20 || !checksum(p, 20))
- return 0;
-
- printf("ACPI%s present.\n",
- acpi_revision(p[15]));
- printf("\tOEM Identifier: %c%c%c%c%c%c\n",
- p[9], p[10], p[11], p[12], p[13], p[14]);
- printf("\tRSD Table 32-bit Address: 0x%08X\n",
- DWORD(p+16));
-
- if(len<36)
- return 1;
-
- if(DWORD(p+20)>len || !checksum(p, DWORD(p+20)))
- return 0;
-
- if(DWORD(p+20)<32) return 1;
-
- printf("\tXSD Table 64-bit Address: 0x%08X%08X\n",
- QWORD(p+24).h, QWORD(p+24).l);
-
- return 1;
-}
-
-/*
- * Sony
- */
-
-static size_t sony_length(const u8 *p)
-{
- return(p[0x05]);
-}
-
-static int sony_decode(const u8 *p, size_t len)
-{
- if(!checksum(p, len))
- return 0;
-
- printf("Sony system detected.\n");
-
- return 1;
-}
-
-/*
- * BIOS32
- */
-
-static size_t bios32_length(const u8 *p)
-{
- return p[0x09]<<4;
-}
-
-static int bios32_decode(const u8 *p, size_t len)
-{
- if(len<0x0A || !checksum(p, p[0x09]<<4))
- return 0;
-
- printf("BIOS32 Service Directory present.\n");
- printf("\tRevision: %u\n",
- p[0x08]);
- printf("\tCalling Interface Address: 0x%08X\n",
- DWORD(p+0x04));
-
- return 1;
-}
-
-/*
- * PIR
- */
-
-static void pir_irqs(u16 code)
-{
- if(code==0)
- printf(" None");
- else
- {
- u8 i;
-
- for(i=0; i<16; i++)
- if(code&(1<<i))
- printf(" %u", i);
- }
-}
-
-static void pir_slot_number(u8 code)
-{
- if(code==0)
- printf(" on-board");
- else
- printf(" slot number %u", code);
-}
-
-static size_t pir_length(const u8 *p)
-{
- return WORD(p+6);
-}
-
-static int pir_decode(const u8 *p, size_t len)
-{
- int i;
-
- if(len<32 || !checksum(p, WORD(p+6)))
- return 0;
-
- printf("PCI Interrupt Routing %u.%u present.\n",
- p[5], p[4]);
- printf("\tRouter ID: %02x:%02x.%1x\n",
- p[8], p[9]>>3, p[9]&0x07);
- printf("\tExclusive IRQs:");
- pir_irqs(WORD(p+10));
- printf("\n");
- if(DWORD(p+12)!=0)
- printf("\tCompatible Router: %04x:%04x\n",
- WORD(p+12), WORD(p+14));
- if(DWORD(p+16)!=0)
- printf("\tMiniport Data: 0x%08X\n",
- DWORD(p+16));
-
- for(i=1; i<=(WORD(p+6)-32)/16; i++)
- {
- printf("\tSlot Entry %u: ID %02x:%02x,",
- i, p[(i+1)*16], p[(i+1)*16+1]>>3);
- pir_slot_number(p[(i+1)*16+14]);
- printf("\n");
-/* printf("\tSlot Entry %u\n", i);
- printf("\t\tID: %02x:%02x\n",
- p[(i+1)*16], p[(i+1)*16+1]>>3);
- printf("\t\tLink Value for INTA#: %u\n",
- p[(i+1)*16+2]);
- printf("\t\tIRQ Bitmap for INTA#:");
- pir_irqs(WORD(p+(i+1)*16+3));
- printf("\n");
- printf("\t\tLink Value for INTB#: %u\n",
- p[(i+1)*16+5]);
- printf("\t\tIRQ Bitmap for INTB#:");
- pir_irqs(WORD(p+(i+1)*16+6));
- printf("\n");
- printf("\t\tLink Value for INTC#: %u\n",
- p[(i+1)*16+8]);
- printf("\t\tIRQ Bitmap for INTC#:");
- pir_irqs(WORD(p+(i+1)*16+9));
- printf("\n");
- printf("\t\tLink Value for INTD#: %u\n",
- p[(i+1)*16+11]);
- printf("\t\tIRQ Bitmap for INTD#:");
- pir_irqs(WORD(p+(i+1)*16+12));
- printf("\n");
- printf("\t\tSlot Number:");
- pir_slot_number(p[(i+1)*16+14]);
- printf("\n");*/
- }
-
- return 1;
-}
-
-/*
- * Compaq-specific entries
- */
-
-static size_t compaq_length(const u8 *p)
-{
- return (p[4]*10+5);
-}
-
-static int compaq_decode(const u8 *p, size_t len)
-{
- unsigned int i;
- (void) len;
-
- printf("Compaq-specific entries present.\n");
-
- /* integrity checking (lack of checksum) */
- for(i=0; i<p[4]; i++)
- {
- /*
- * We do not check for truncated entries, because the length
- * was computed from the number of records in compaq_length
- * right above, so it can't be wrong.
- */
- if(p[5+i*10]!='$' || !(p[6+i*10]>='A' && p[6+i*10]<='Z')
- || !(p[7+i*10]>='A' && p[7+i*10]<='Z')
- || !(p[8+i*10]>='A' && p[8+i*10]<='Z'))
- {
- printf("\t Abnormal entry! Please report. [%02X %02X "
- "%02X %02X]\n", p[5+i*10], p[6+i*10],
- p[7+i*10], p[8+i*10]);
- return 0;
- }
- }
-
- for(i=0; i<p[4]; i++)
- {
- printf("\tEntry %u: %c%c%c%c at 0x%08X (%u bytes)\n",
- i+1, p[5+i*10], p[6+i*10], p[7+i*10], p[8+i*10],
- DWORD(p+9+i*10), WORD(p+13+i*10));
- }
-
- return 1;
-}
-
-/*
- * VPD (vital product data, IBM-specific)
- */
-
-static void vpd_print_entry(const char *name, const u8 *p, size_t len)
-{
- size_t i;
-
- printf("\t%s: ", name);
- for(i=0; i<len; i++)
- if(p[i]>=32 && p[i]<127)
- printf("%c", p[i]);
- printf("\n");
-}
-
-static size_t vpd_length(const u8 *p)
-{
- return (p[5]);
-}
-
-static int vpd_decode(const u8 *p, size_t len)
-{
- if(len<0x30)
- return 0;
-
- /* XSeries have longer records. */
- if(!(len>=0x45 && checksum(p, len))
- /* Some Netvista seem to work with this. */
- && !checksum(p, 0x30)
- /* The Thinkpad checksum does *not* include the first 13 bytes. */
- && !checksum(p+0x0D, 0x30-0x0D))
- return 0;
-
- printf("VPD present.\n");
-
- vpd_print_entry("BIOS Build ID", p+0x0D, 9);
- vpd_print_entry("Box Serial Number", p+0x16, 7);
- vpd_print_entry("Motherboard Serial Number", p+0x1D, 11);
- vpd_print_entry("Machine Type/Model", p+0x28, 7);
-
- if(len<0x45)
- return 1;
-
- vpd_print_entry("BIOS Release Date", p+0x30, 8);
-
- return 1;
-}
-
-/*
- * Fujitsu application panel
- */
-
-static size_t fjkeyinf_length(const u8 *p)
-{
- (void) p;
- /*
- * We don't know at this point, it's somewhere between 12 and 32.
- * So we return the max, it shouldn't hurt.
- */
- return 32;
-}
-
-static int fjkeyinf_decode(const u8 *p, size_t len)
-{
- (void) len;
- int i;
-
- printf("Fujitsu application panel present.\n");
-
- for (i = 0; i < 6; i++)
- {
- if (*(p+8+i*4)==0)
- return 1;
- printf("\tDevice %d: type %u, chip %u", i+1,
- *(p+8+i*4), *(p+8+i*4+2));
- if (*(p+8+i*4+1)) /* Access method */
- printf(", SMBus address 0x%x", *(p+8+i*4+3) >> 1);
- printf("\n");
- }
-
- return 1;
-}
-
-/*
- * Main
- */
-
-static struct bios_entry bios_entries[]={
- { "_SM_", 0, 0xF0000, 0xFFFFF, smbios_length, smbios_decode },
- { "_DMI_", 0, 0xF0000, 0xFFFFF, dmi_length, dmi_decode },
- { "_SYSID_", 0, 0xE0000, 0xFFFFF, sysid_length, sysid_decode },
- { "$PnP", 0, 0xF0000, 0xFFFFF, pnp_length, pnp_decode },
- { "RSD PTR ", 0, 0xE0000, 0xFFFFF, acpi_length, acpi_decode },
- { "$SNY", 0, 0xE0000, 0xFFFFF, sony_length, sony_decode },
- { "_32_", 0, 0xE0000, 0xFFFFF, bios32_length, bios32_decode },
- { "$PIR", 0, 0xF0000, 0xFFFFF, pir_length, pir_decode },
- { "32OS", 0, 0xE0000, 0xFFFFF, compaq_length, compaq_decode },
- { "\252\125VPD", 0, 0xF0000, 0xFFFFF, vpd_length, vpd_decode },
- { "FJKEYINF", 0, 0xF0000, 0xFFFFF, fjkeyinf_length, fjkeyinf_decode },
- { NULL, 0, 0, 0, NULL, NULL }
-};
-
-/* Believe it or not, this is significantly faster than memcmp and strncmp */
-static inline int anchor_match(const struct bios_entry *entry, const char *p)
-{
- size_t i;
-
- for(i=0; i<entry->anchor_len; i++)
- if(entry->anchor[i]!=p[i])
- return 0;
-
- return 1;
-}
-
-/* Return -1 on error, 0 on success */
-static int parse_command_line(int argc, char * const argv[])
-{
- int option;
- const char *optstring = "d:hV";
- struct option longopts[]={
- { "dev-mem", required_argument, NULL, 'd' },
- { "help", no_argument, NULL, 'h' },
- { "version", no_argument, NULL, 'V' },
- { 0, 0, 0, 0 }
- };
-
- while((option=getopt_long(argc, argv, optstring, longopts, NULL))!=-1)
- switch(option)
- {
- case 'd':
- opt.devmem=optarg;
- break;
- case 'h':
- opt.flags|=FLAG_HELP;
- break;
- case 'V':
- opt.flags|=FLAG_VERSION;
- break;
- case '?':
- return -1;
- }
-
- return 0;
-}
-
-static void print_help(void)
-{
- static const char *help=
- "Usage: biosdecode [OPTIONS]\n"
- "Options are:\n"
- " -d, --dev-mem FILE Read memory from device FILE (default: " DEFAULT_MEM_DEV ")\n"
- " -h, --help Display this help text and exit\n"
- " -V, --version Display the version and exit\n";
-
- printf("%s", help);
-}
-
-int main(int argc, char * const argv[])
-{
- u8 *buf;
- off_t fp;
- int i;
-
- if(sizeof(u8)!=1 || sizeof(u16)!=2 || sizeof(u32)!=4)
- {
- fprintf(stderr, "%s: compiler incompatibility\n", argv[0]);
- exit(255);
- }
-
- /* Set default option values */
- opt.devmem=DEFAULT_MEM_DEV;
- opt.flags=0;
-
- if(parse_command_line(argc, argv)<0)
- exit(2);
-
- if(opt.flags & FLAG_HELP)
- {
- print_help();
- return 0;
- }
-
- if(opt.flags & FLAG_VERSION)
- {
- printf("%s\n", VERSION);
- return 0;
- }
-
- printf("# biosdecode %s\n", VERSION);
-
- if((buf=mem_chunk(0xE0000, 0x20000, opt.devmem))==NULL)
- exit(1);
-
- /* Compute anchor lengths once and for all */
- for(i=0; bios_entries[i].anchor!=NULL; i++)
- bios_entries[i].anchor_len = strlen(bios_entries[i].anchor);
-
- for(fp=0xE0000; fp<=0xFFFF0; fp+=16)
- {
- u8 *p=buf+fp-0xE0000;
-
- for(i=0; bios_entries[i].anchor!=NULL; i++)
- {
- if(anchor_match(&bios_entries[i], (char *)p)
- && fp>=bios_entries[i].low_address
- && fp<bios_entries[i].high_address)
- {
- off_t len=bios_entries[i].length(p);
-
- if(fp+len-1<=bios_entries[i].high_address)
- {
- if(bios_entries[i].decode(p, len))
- {
- fp+=(((len-1)>>4)<<4);
- break;
- }
- }
- }
- }
- }
-
- free(buf);
-
- return 0;
-}