summaryrefslogtreecommitdiffstats
path: root/usr.sbin/acpi/acpidump/acpi.c
Commit message (Collapse)AuthorAgeFilesLines
* MFC r302788, r303026, r305471andrew2017-04-241-2/+72
| | | | | | | | | | | | | | | r302788: Fix the type used to hold the value returned from getopt. On arm64 char is unsigned so will never be -1. r303026: Add missing flags from acpidump. These are defined in the header, but not printed. The HW_REDUCED flag is useful as it should be set on arm64 to comply with the ARM Server Base Boot Requirements. r305471: Teach acpidump how to parse ACPI 5.1 tables found on the development ThunderX units in the netperf cluster.
* MFC r314987-r314989, r314993-r314994, r315046-r315049, r315102araujo2017-04-171-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r314987: Use nitems() from sys/param.h. Reviewed by: asomers MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9944 r314988: Use nitems() from sys/param.h. Reviewed by: ume MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9938 r314989: Use nitems() from sys/param.h and also remove the cast. Reviewed by: markj MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9937 r314993: Use nitems() from sys/param.h. Reviewed by: ngie MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9936 r314994: Use nitems() from sys/param.h. Reviewed by: ngie MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9940 r315046: Use nitems() from sys/param.h Reviewed by: jhb MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9941 r315047: Use nitems() from sys/param.h. Reviewed by: np MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9945 r315048: Use nitems() from sys/param.h. MFC after: 3 weeks. r315049: Bring back the cast removed in my previous commit to allow us build vmstat with WARNS 2. This cast was first introduced at r87690. Reported by: bde, pfg and ngie MFC after: 3 weeks. r315102: Use nitems() from sys/param.h. Reviewed by: ngie Differential Revision: https://reviews.freebsd.org/D9943
* Fix acpidump CID 1011278 (Buffer not null terminated) and other issuestruckman2016-05-241-18/+43
| | | | | | | | | | | | | | | | | | | | | | | Coverity reports that a buffer used for temporary file generation might not be NUL terminated by strncpy(). This is probably not true because the input gets passed through realpath(), but if the path name is sufficiently long the name could be truncated and cause other problems. The code for generating the temp file names is also overly complex. Instead of a bunch of calls to strncpy() and and strncat(), simplify the code by using snprintf() and add checks for unexpected truncation. The output file created by iasl -d is predictable. Fix this by using mkdtemp() to create a directory to hold the iasl input and output files. Check the return values of more syscalls. Reported by: Coverity CID: 1011278 Reviewed by: jkim MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6360
* Print 64-bit addresses cleary with leading zeros to avoid confusions.jkim2015-04-091-21/+25
| | | | MFC after: 1 week
* Do not crash when RSDT/XSDT contains an empty entry.jkim2015-04-091-26/+10
| | | | | Reported by: Slawa Olhovchenkov <slw@zxy.spb.ru> MFC after: 3 days
* Merge ACPICA 20140926.jkim2014-10-021-2/+2
|
* Teach acpidump(8) to display the 'Flags' field in the HPET Description Table.neel2013-11-221-0/+1
| | | | Reviewed by: jhb@
* Consistently cast ACPICA 64-bit integer types when we print them.jkim2013-06-261-8/+8
|
* Teach acpidump to dump the DMA Remapping Reporting table (aka DMAR).neel2012-12-211-13/+262
| | | | | | | The DMAR table is documented in chapter 8 of the Intel VT-d specification. Reviewed by: jhb Obtained from: NetApp
* More -Wmissing-variable-declarations fixes.ed2012-10-191-7/+8
| | | | | | | | | | | | | | | | In addition to adding `static' where possible: - bin/date: Move `retval' into extern.h to make it visible to date.c. - bin/ed: Move globally used variables into ed.h. - sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings. - usr.bin/calendar: Remove unneeded variables. - usr.bin/chat: Make `line' local instead of global. - usr.bin/elfdump: Comment out unneeded function. - usr.bin/rlogin: Use _Noreturn instead of __dead2. - usr.bin/tset: Pull `Ospeed' into extern.h. - usr.sbin/mfiutil: Put global variables in mfiutil.h. - usr.sbin/pkg: Remove unused `os_corres'. - usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.
* Display the matrix of inter-domain distances in the SLIT table. This isjhb2012-10-041-0/+30
| | | | | | used to complement the SRAT table on NUMA machines. MFC after: 1 week
* Add range and table revision checking to avoid abend.takawata2012-07-091-1/+9
| | | | | | PR:bin/169707 Submitted by:Dan Lukes <dan@obluda.cz> MFC after:3 days.
* Catch up with realpath(3) changes (r235266) and unbreak acpidump(8).jkim2012-05-251-3/+3
|
* use uintmax_t instead of uint64_t.takawata2010-08-131-1/+1
| | | | Pointed out by: des.
* Fix build on amd64 and ia64.takawata2010-08-131-4/+3
|
* Fix breakage on 64bit architecture by using inttypes.h macro.takawata2010-08-121-1/+2
|
* Fix tindebox breakage about format warning.takawata2010-08-121-1/+1
|
* Add TCG ACPI spec table (TCPA) support.takawata2010-08-111-0/+202
| | | | Submitted by: Hans-Joerg_Hoexer@genua.de
* - Use the headers from ACPI-CA to define various constants and structuresjhb2009-08-251-368/+460
| | | | | | | | | | | | for table layouts, etc. rather than homerolling our own structures and constants in acpidump.h. - Verify the extended checksum on the RSDP. - Handle new ACPI 3.0 fields in MADT including X2APIC entries and UIDs for local SAPICs. - Add handling for new ACPI 3.0 flags in the FADT. Reviewed by: jkim MFC after: 1 month
* Parse the System Resource Affinity Table ('SRAT') used to describe affinityjhb2009-07-291-8/+98
| | | | | | | | relationships between CPUs and memory. Reviewed by: jkim Approved by: re (kib) MFC after: 1 week
* Import ACPICA 20090521.jkim2009-06-051-7/+25
|
* Use an explicit pointer cast since NULL isn't guaranteed to be definedjb2007-11-181-1/+1
| | | | | | as a pointer type. Submitted by: Christoph Mallon - christoph mallon at gmx de
* Use a NULL instead of a zero to avoid a compiler warning about a missing ↵jb2007-11-181-1/+1
| | | | sentinel.
* Correct HPET header handling.takawata2007-03-271-1/+2
| | | | MFC after: 7 days
* Add support for parsing MCFG tables.scottl2005-02-141-0/+24
|
* Update a comment that was outdated.njl2004-10-051-1/+1
|
* Back out the -s flag and go back to dumping the SSDTs by default.njl2004-10-051-2/+2
|
* Add the -s flag to make dumping SSDTs optional (disabled by default).njl2004-10-051-2/+8
| | | | | | | | | Since we can only override the DSDT, a custom ASL dumped previously that contained SSDTs would result in lots of multiple definition errors. A longer-term fix involves adding the ability to override SSDTs to ACPI-CA. MFC after: 3 days
* When one entry in the RSDT is corrupted, just skip it instead of bailing out.njl2004-08-181-2/+5
| | | | | | | | | This gets us the info we need on systems which have proprietary tables that don't match the standard. For instance, an AMI system has a table of type "OEMB" with an invalid checksum. Tested by: Maxim Maximov <mcsi_at_mcsi.pp.ru> MFC after: 1 day
* Add support for SSDT tables. Dumping or disassembling the DSDT willmarcel2004-08-131-10/+44
| | | | | | | | | now include the contents if any SSDT table as well. This makes use of the property that one can concatenate the body of SSDT tables to the DSDT, updating the DSDT header (length and checksum) and end up with a larger and valid DSDT table. Hence, this also works with -f. Reviewed by: njl@
* Also print out the standard header for FADT since it has one.njl2004-06-301-7/+12
|
* Minor style issues.des2004-05-101-1/+1
|
* Instead of using a static, check for the FADT revision before using it.njl2004-04-181-12/+20
| | | | | | This fixes a bug where acpidump -d crashed (but not -t -d). Submitted by: Alex Vasylenko <lxv@omut.org>
* Clean up the check for invalid X_DSDT and X_FACS portions of the FADT.njl2004-01-041-16/+25
| | | | | Add fadt_revision for telling if the FADT has correct 64 bit addresses, separate from whether the XSDT has legal 64 bit addresses.
* Add a newline even if IAPC_BOOT_ARCH == 0.njl2003-10-291-1/+2
|
* Only print an end '}' if the field was non-zero (i.e. there were some flagsnjl2003-09-211-2/+4
| | | | to print).
* Correct typo in comment.njl2003-09-141-1/+1
|
* For dumping the DSDT (-o option), be sure to use the X_DSDT address ifnjl2003-09-141-1/+7
| | | | appropriate. This should be the last change to make ia64 work.
* C2/C3 latency is in microseconds (us), not ms.njl2003-09-131-1/+1
|
* Only print various optional fields if they are non-zero. Always print thenjl2003-09-131-24/+31
| | | | required fields, no matter what their value.
* Reduce the default width for IO port GAS printing.njl2003-09-131-4/+4
| | | | Courtesy of: rwatson's chart presentation
* Add dumping of the ECDT table.njl2003-09-101-0/+20
| | | | Courtesy of: USENIX hall track
* o Workaround a bug where my T23 reports that it is ACPI 2.0x compatiblenjl2003-09-101-27/+68
| | | | | | | | but has invalid 64 bit pointers for FACS and DSDT. o Finish work to print all of the FADT and FACS. o Resort the comment generating functions. Submitted by: marcel Courtesy of: BSDcon back wall
* Add support for ACPI 2.x and the XSDT.njl2003-09-091-25/+77
| | | | Submitted by: marcel
* Rename FACP to FADT throughout.njl2003-09-091-65/+168
| | | | | | | Update FADT for new fields including pm_profile, pstate_cnt, and cst_cnt. Add acpi_print_gas() for printing various address formats. Print FACS contents. Remove unused code.
* Modify acpidump to use iasl(8) as the backend for disassembling AML.njl2003-08-281-209/+148
| | | | | Also clean up the output of dumped tables. Update the man page for the new usage. Make WARNS=6 clean.
* Hoo sed I kan spel?peter2003-08-021-1/+1
|
* Dump the HPET information block.peter2003-08-021-0/+25
| | | | | | | | | | | | What is the HPET I hear you ask? It is the High Precision Event Timer that is supposed to supplement and eventually replace the 8254 timer and the RTC periodic interrupts. Among other things, it is 64 bit (can be run in 32 bit mode for 32 bit cpus), and is suitable as a replacement for the ACPI timer on SMP systems (the specs are much better) and as a replacement for the ITC based synthetic clock for on ia64 systems. It seems IA64 and AMD64 systems tend to have this. It is likely to start showing up in i386 systems if it isn't already on some of them.
* Fix a warning about deprecated string literals.njl2003-04-151-8/+8
| | | | Reviewed by: diff
* Add code to parse the contents of an ACPI MADT table and to dump itsjhb2003-01-081-0/+176
| | | | | | | contents in the form of a comment in the acpidump output. The output is not in the prettiest output, but it does work correctly. Approved by: marcel
OpenPOWER on IntegriCloud