aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/acpi
Commit message (Collapse)AuthorAgeFilesLines
* Decode APEI tables (BERT, EINJ, ERST, HEST).Alexander Motin2020-06-302-15/+290
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=362811
* Allow the FACS and XFACS to be zero in acpidump.Andrew Turner2020-05-181-5/+11
| | | | | | | | | | These are allowed to be zero when the hardware reduced APCI flag is set Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D23207 Notes: svn path=/head/; revision=361216
* Remove tests for obsolete compilers in the build systemEric van Gyzen2020-05-121-1/+1
| | | | | | | | | | | | | | Assume gcc is at least 6.4, the oldest xtoolchain in the ports tree. Assume clang is at least 6, which was in 11.2-RELEASE. Drop conditions for older compilers. Reviewed by: imp (earlier version), emaste, jhb MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D24802 Notes: svn path=/head/; revision=360964
* Add _BIX (Battery Information Extended) object support.Hiroki Sato2020-02-191-17/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ACPI Control Method Batteries have a _BIF and/or _BIX object which provide static properties of the battery. FreeBSD acpi_cmbat module supported _BIF object only, which was deprecated as of ACPI 4.0. _BIX is an extended version of _BIF defined in ACPI 4.0 or later. As of writing, _BIX has two revisions. One is in ACPI 4.0 (rev.0) and another is in ACPI 6.0 (rev.1). It seems that hardware vendors still stick to _BIF only or _BIX rev.0 + _BIF for the maximum compatibility. Microsoft requires _BIX rev.0 for Windows machines, so there are some laptop machines with _BIX rev.0 only. In this case, FreeBSD does not recognize the battery information. After this change, the acpi_cmbat module gets battery information from _BIX or _BIF object and internally uses _BIX rev.1 data structure as the primary information store in the kernel. ACPIIO_BATT_GET_BI[FX] returns an acpi_bi[fx] structure built by using information obtained from a _BIF or a _BIX object found on the system. The revision number field can be used to check which field is available. The acpiconf(8) utility will show additional information if _BIX is available. Although ABIs of ACPIIO_BATT_* were changed, the existing APIs for userland utilities are not changed and the backward-compatible ABIs are provided. This means that older versions of acpiconf(8) can also work with the new kernel. The (union acpi_battery_ioctl_arg) was padded to 256 byte long to avoid another ABI change in the future. A _BIX object with its revision number >1 will be treated as compatible with the rev.1 _BIX format. Reviewed by: takawata MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23728 Notes: svn path=/head/; revision=358095
* Merge ACPICA 20191018.Jung-uk Kim2019-10-191-8/+24
| | | | Notes: svn path=/head/; revision=353764
* Merge ACPICA 20190329.Jung-uk Kim2019-03-291-2/+2
| | | | Notes: svn path=/head/; revision=345713
* Fix 32-bit buildworld broken by r343438.Cy Schubert2019-01-251-1/+1
| | | | Notes: svn path=/head/; revision=343455
* Use ACPI TPM2 table to probe tpmtis and tpmcrb device.Takanori Watanabe2019-01-251-1/+14
| | | | | | | Differential Revision: https://reviews.freebsd.org/D18937 Notes: svn path=/head/; revision=343438
* Amend the `-i batt' option description and explain that the batteryAlexey Dokuchaev2018-12-271-2/+4
| | | | | | | | | | | | is specified by its number (index), starting with zero. Previously, sometimes users would try to literally invoke `acpiconf -i batt' in their console and become confused as to why this did not work. Approved by: bcr (manpages) Differential Revision: https://reviews.freebsd.org/D18659 Notes: svn path=/head/; revision=342550
* rcorder(8): add support for /etc/rc.resume, so it calls "rcorder -k resume"Eugene Grosbein2018-10-271-4/+26
| | | | | | | | | | | | | | | | and runs scripts containing "KEYWORD: resume" with single "resume" argument. Working example is the port sysutils/cpupdate that defines extra_commands="resume" to reload CPU microcode cleared by suspend/resume sequence. This change does nothing for a system having no scripts with KEYWORD: resume. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D15247 Notes: svn path=/head/; revision=339818
* Update ACPICA to 20181003.Jung-uk Kim2018-10-091-2/+2
| | | | | | | Approved by: re (gjb) Notes: svn path=/head/; revision=339262
* Merge ACPICA 20180810.Jung-uk Kim2018-08-131-1/+1
| | | | Notes: svn path=/head/; revision=337713
* acpidump(8): Add ACPI LPIT (Low Power Idle Table)Ben Widawsky2018-07-112-1/+78
| | | | | | | | | | | | | | | The LPIT is the part of the "standardized" way that one can enumerate various power state information on Intel platforms. The documentation for this change can be found here: http://www.uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdf Reviewed By: jhb Approved By: jhb Differential Revision: https://reviews.freebsd.org/D15931 Notes: svn path=/head/; revision=336185
* acpidump.8: include NFIT in the man page list of tablesEd Maste2018-06-201-1/+2
| | | | | | | | | | Was missed in r321298. Reported by: Ben Widawsky (in review D15931) MFC after: 1 week Notes: svn path=/head/; revision=335459
* MFV: r329072Jung-uk Kim2018-02-091-1/+2
| | | | | | | Merge ACPICA 20180209. Notes: svn path=/head/; revision=329085
* Add explanatory comment for r327622: clang 6.0.0 and higher warn aboutDimitry Andric2018-01-081-0/+6
| | | | | | | | | | | | the ACPI_ROOT_OBJECT and ACPI_TO_POINTER macros from acpica's actypes.h header, that they use arithmetic on a null pointer treated as a cast from integer to pointer, which is a GNU extension. We turn off the warning, because this is in contributed code. Requested by: rakuco Notes: svn path=/projects/clang600-import/; revision=327702
* Revert r327338, undoing the changes to the ACPI_ADD_PTR and ACPI_SUB_PTRDimitry Andric2018-01-061-0/+4
| | | | | | | | macros. Instead, turn off clang 6.0.0 warnings about null pointer arithmetic in usr.sbin/acpi/acpidb instead. Notes: svn path=/projects/clang600-import/; revision=327622
* Improve options and error handling.Niclas Zeising2017-12-091-9/+36
| | | | | | | | | | | | | | | Improve options handling and error out if multiple mutually exclusive options are passed to acpiconf. Switch from using atoi() to strtol() for argument parsing, and add error checking and handling, instead of blindly trusting that the integer conversion is OK. Cange err() to errx() in once case, the errno value was garbage there. Reviewed by: emaste Approved by: emaste Differential Revision: D13430 Notes: svn path=/head/; revision=326733
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-276-0/+12
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-314-4/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Merge ACPICA 20170929 (take 2).Jung-uk Kim2017-10-101-21/+21
| | | | Notes: svn path=/head/; revision=324502
* Revert r324109. This commit broke a number of systems.Jung-uk Kim2017-09-301-21/+21
| | | | | | | | Reported by: lwhsu, kib Requested by: ngie Notes: svn path=/head/; revision=324136
* Merge ACPICA 20170929.Jung-uk Kim2017-09-291-21/+21
| | | | Notes: svn path=/head/; revision=324109
* Add support for parsing the Watchdog Descriptor Table (WDDT)Scott Long2017-09-152-0/+38
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=323614
* Merge ACPICA 20170831.Jung-uk Kim2017-08-312-3/+5
| | | | Notes: svn path=/head/; revision=323076
* Fix flags field decoding in ACPI_NFIT_CONTROL_REGION.Alexander Motin2017-08-311-3/+2
| | | | | | | | | | | It looked like incomplete copy/paste, printing absolute garbage. While there, print ValidFields field ax hex, since it is a bitmask. MFC after: 3 days Notes: svn path=/head/; revision=323045
* Add two NFIT fields missed in r321298.Alexander Motin2017-08-101-0/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=322351
* Merge ACPICA 20170728.Jung-uk Kim2017-07-282-16/+18
| | | | Notes: svn path=/head/; revision=321670
* acpidump: add GIC ITS srat typeEd Maste2017-07-201-1/+2
| | | | | | | | | | From ACPI 6.2, 5.2.16.5 MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=321299
* acpidump: add ACPI NFIT (NVDIMM Firmware Interface Table)Ed Maste2017-07-201-0/+196
| | | | | | | | | | Submitted by: Guangyuan Yang <yzgyyang@outlook.com> MFC after: 3 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11479 Notes: svn path=/head/; revision=321298
* acpidump: use C99 designated initializersEd Maste2017-07-201-11/+25
| | | | | | | | | Submitted by: Guangyuan Yang <yzgyyang@outlook.com> Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D11659 Notes: svn path=/head/; revision=321294
* acpidump: warn and exit loop on invalid subtable lengthEd Maste2017-07-061-0/+4
| | | | | | | | Submitted by: Guangyuan Yang <yzgyyang@outlook.com> Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=320736
* Merge ACPICA 20170531.Jung-uk Kim2017-06-012-7/+7
| | | | Notes: svn path=/head/; revision=319365
* Use int to receive the return value of getopt function.Alexander Kabaev2017-04-071-2/+2
| | | | | | | | | getopt returns int and not char, so assigning the value to char is not ideal, especially on platforms with unsigned chars. Notes: svn path=/head/; revision=316627
* Use nitems() from sys/param.h.Marcelo Araujo2017-03-101-4/+3
| | | | | | | | | Reviewed by: ngie MFC after: 3 weeks. Differential Revision: https://reviews.freebsd.org/D9940 Notes: svn path=/head/; revision=314994
* usr.sbin: normalize paths using SRCTOP-relative paths or :H when possibleEnji Cooper2017-03-041-4/+4
| | | | | | | | | | This simplifies make logic/output MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314659
* Merge ACPICA 20170303.Jung-uk Kim2017-03-031-3/+4
| | | | Notes: svn path=/head/; revision=314611
* Merge ACPICA 20161222.Jung-uk Kim2017-01-052-2/+2
| | | | Notes: svn path=/head/; revision=311462
* Merge ACPICA 20160930.Jung-uk Kim2016-10-042-13/+14
| | | | Notes: svn path=/head/; revision=306686
* Teach acpidump how to parse ACPI 5.1 tables found on the developmentAndrew Turner2016-09-061-2/+69
| | | | | | | | | | | | | ThunderX units in the netperf cluster. Approved by: jkim Obtained from: ABT Systems Ltd MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7252 Notes: svn path=/head/; revision=305471
* o Move tmpstr varibale initialization out of assert(3) call.Maxim Konovalov2016-08-121-4/+4
| | | | | | | | | | This fixes acpidump(8) compiled with "WITHOUT_ASSERT_DEBUG=yes" that removes assert(3)'s from the code. Submitted by: Alexander Nedotsukov Notes: svn path=/head/; revision=304000
* Add missing flags from acpidump. These are defined in the header, but notAndrew Turner2016-07-191-0/+3
| | | | | | | | | | | | printed. The HW_REDUCED flag is useful as it should be set on arm64 to comply with the ARM Server Base Boot Requirements. Obtained from: ABT Systems Ltd MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=303026
* Fix the type used to hold the value returned from getopt. On arm64 char isAndrew Turner2016-07-131-1/+2
| | | | | | | | | | | unsigned so will never be -1. Obtained from: ABT Systems Ltd MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=302788
* WITH_META_MODE: Don't expect meta files for side-effect generated files.Bryan Drewery2016-06-031-0/+3
| | | | | | | | | | | | The first file in these lists will generate everything else so only it should be getting a .meta file. With bmake's missing=yes meta feature these would otherwise cause a rebuild without the .NOMETA hint. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=301285
* Fix acpidb CIDs 1011279 (Buffer not null terminated) and 978405 andDon Lewis2016-05-241-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1199380 (Resource leak). load_dsdt() calls strncpy() to copy a filename and Coverity warns that the destination buffer may not be NUL terminated. Fix this by using strlcpy() instead. If silent truncation occurs, then the filename was not valid anyway. load_dsdt() leaks an fd (CID 978405) and a memory region allocated using mmap() (CID 1199380) when it returns. Fix these by calling close() and munmap() as appropriate. Don't bother fixing the minor memory leak "list", allocated by AcGetAllTablesFromFile() (CID 1355191). Check for truncation when creating the temp file name. Set a flag to indicate that the temp file should be unlinked. Relying on a strcmp() test could delete the input file in contrived cases. Reported by: Coverity CID: 1011279, 978405, 1199380 Reviewed by: jkim MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D6368 Notes: svn path=/head/; revision=300633
* Fix acpidump CID 1011278 (Buffer not null terminated) and other issuesDon Lewis2016-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 Notes: svn path=/head/; revision=300632
* Merge ACPICA 20160422.Jung-uk Kim2016-04-273-45/+54
| | | | Notes: svn path=/head/; revision=298714
* MFHGlen Barber2016-03-021-88/+0
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296318
| * DIRDEPS_BUILD: Regenerate without local dependencies.Bryan Drewery2016-02-241-88/+0
| | | | | | | | | | | | | | | | | | | | | | These are no longer needed after the recent 'beforebuild: depend' changes and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports skipping 'make depend'. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=295989
* | MFH r289384-r293170Glen Barber2016-01-041-3/+3
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=293172