aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/acpi
Commit message (Collapse)AuthorAgeFilesLines
* acpidump: quiet gcc -Wstrict-aliasingRyan Libby2025-10-091-3/+6
| | | | | | | Appease GCC. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D52941
* acpidump: quiet GCC -Wmaybe-uninitializedRyan Libby2025-10-031-2/+2
| | | | Reviewed by: kib
* acpidump: do not use pointer arithmetic to check for overflowKonstantin Belousov2025-02-261-4/+5
| | | | | | | | | | Pointer arithmetic overflow is UB. Convert to unsigned uintptr_t and do the check there. PR: 204945 Reported by: David Binderman <dcb314@hotmail.com> Sponsored by: The FreeBSD Foundation MFC after: 1 week
* acpidump(8): add const qualifier to the known tables arrayKonstantin Belousov2024-10-231-1/+1
| | | | | Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation
* acpidump: use acpica definitions for devscope types in DMAR decodingKonstantin Belousov2024-10-221-4/+6
| | | | | | | | and add missed acpi namespace device type entry decoding. Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week
* acpidump: correct memcmp() result checkKonstantin Belousov2024-10-221-1/+2
| | | | | Fixes: e9ab827df94fed8f129ca4f7756e23ce77d8a655 Sponsored by: The FreeBSD Foundation
* acpidump: Add -T TBLN to print a specific ACPI fixed tableWarner Losh2024-10-154-11/+32
| | | | | | | | Add the ability to dump a specific ACPI table rather than all of them. Sponsored by: Netflix Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D47082
* acpidump: Sort signature ifs alphabetically and make table drivenWarner Losh2024-10-151-43/+44
| | | | | | | | Sort the ACPI signatures alphabetically and move it into a table we can iterate through Sponsored by: Netflix Reviewed by: andrew, markj Differential Revision: https://reviews.freebsd.org/D47081
* acpidump: Document the alphabit soup of ACPI Table namesWarner Losh2024-10-151-27/+64
| | | | | | | | | | Clarify what's reported with -t (it's all the fixed acpi tables, not just the listed ones). The listed tables are more fully decoded, while all other tables just have their headers decoded. Sponsored by: Netflix Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D47080
* acpidump: Use ACPI_NAMESEG_SIZE instead of 4Warner Losh2024-10-151-2/+2
| | | | | | | In a couple of places, we use 4 instead of ACPI_NAMESEG_SIZE. Use the Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D47109
* acpidump: Move to acpi.rsdpWarner Losh2024-10-151-2/+2
| | | | | | | | | | Switch from the long obsolete hint.0.acpi.rsdp to acpi.rsdp to get the root of the ACPI tables. MFC After: 1 week Sponsored by: Netflix Reviewed by: andrew, markj Differential Revision: https://reviews.freebsd.org/D47079
* acpidump: Print SPCR v3 and v4 fieldsWarner Losh2024-10-111-1/+142
| | | | | | | | | This reapplies 593d7a1634b5 to implement printing of SPCR v3 and SPCR v4 fields after ACPI actble3.h update. ACPIca used different names and didn't do the weird nesting I did in the prior commit for better co-existance. Sponsored by: Netflix
* Revert "apcidump: Add dumping SPCR"Warner Losh2024-10-112-168/+3
| | | | | | | | | This reverts commit 593d7a1634b5: In preparation for importing new SPCR definitions, back out my hack since it conflicts with the new definitions. Sponsored by: Netflix
* apcidump: Add dumping SPCRWarner Losh2024-10-042-3/+168
| | | | | | | | | | | When we find a SPCR (Serial Port Console Redirection) TABLE, print all the details. This includes support for the recent Revision 3 and Revision 4 tables, though I've not encountered them in the wild yet, so that code is untested. https://learn.microsoft.com/en-us/windows-hardware/drivers/serports/serial-port-console-redirection-table Sponsored by: Netflix
* acpidump: add 's' option to parse dsdt and ssdt's separately. In some ↵Takanori Watanabe2024-10-024-3/+39
| | | | | | | | machine, they may not be parsed if they are concatinated into one image. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D46796
* Remove residual blank line at start of MakefileWarner Losh2024-07-153-3/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* acpidump: improve length calculation for several IVHD elementsKonstantin Belousov2024-05-311-2/+2
| | | | | | | | | Use sizeofs of structures corresponding to the parsed device entry. This does not change the calculation, but fixes logical inconsistency. Sponsored by: The FreeBSD Foundation Sponsored by: Advanced Micro Devices (AMD) MFC after: 1 week
* acpidump IVRS table format: change 'IOMMUId' into 'IOMMU DeviceId'Konstantin Belousov2024-05-191-1/+1
| | | | | | | | | | and apply the consistent format for device ids used in other IVRS elements. The field seems to be the PCI Device ID of the IOMMU itself, instead of an abstract unit ID. Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week
* acpidump: add Foundation copyrightKonstantin Belousov2024-04-051-0/+4
| | | | | Sponsored by: The FreeBSD Foundation MFC after: 1 week
* acpidump: dump AMD IVRS table describing IOMMU layoutKonstantin Belousov2024-04-051-0/+372
| | | | | | | | Reviewed by: markj Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44634
* acpidump: add printfield() helperKonstantin Belousov2024-04-051-0/+12
| | | | | | | | Reviewed by: markj Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44634
* acpidump: bump WARNS to 6Konstantin Belousov2024-04-052-1/+3
| | | | | | | | | | | and disable warnings about unused function args coming from the vendor acpi headers. Reviewed by: markj Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44634
* acpidump: the acpi_get_fadt_revision() argument is unusedKonstantin Belousov2024-04-051-1/+1
| | | | | | | | | | everywhere except i386. Reviewed by: markj Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44634
* acpidump: silent the warning about unaligned uuidKonstantin Belousov2024-04-051-1/+1
| | | | | | | | | | | The field comes from the ACPI NFIT table and must be already properly aligned by BIOS (at least so is written in the spec). Reviewed by: markj Sponsored by: Advanced Micro Devices (AMD) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44634
* acpidump(8) Fix typo in error messageSHENG-YI HONG2024-04-021-1/+1
| | | | | | | | acpidump(8) uses iasl(8) to parse acpi information. MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D44596
* acpiconf: remove trailing space in "Mesurement Accuracy" outputChristos Margiolis2024-01-231-1/+1
| | | | | | | | No functional change intended. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D43561
* Remove my middle name.Dag-Erling Smørgrav2023-08-171-1/+1
|
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-164-8/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-1610-10/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .h patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-165-10/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* iasl: Disable -Wunused-but-set-variable for a couple of files.John Baldwin2023-06-201-0/+2
| | | | | Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40669
* acpidump: Remove set but unused variable.John Baldwin2023-06-201-2/+0
| | | | | | | | | ACPICA's table dumper doesn't try to dump this subtable's contents either. Reported by: GCC Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D40657
* rc.suspend: update man pages for new keywordJohannes Totz2023-06-161-6/+9
| | | | | | | | rc.suspend has gained an rcorder keyword recently. Document it alongside the existing resume keyword. Reviewed By: mhorne, Pau Amma <pauamma@gundo.com> Differential Revision: https://reviews.freebsd.org/D40484
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-126-6/+6
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-194-4/+0
|
* acpica: Quiet a -Wdangling-pointer warning in AcpiUtInitStackPtrTrace.John Baldwin2022-12-052-0/+8
| | | | | | | | This function intentionally saves a pointer to an on-stack variable in a global as a dubious way of reading the stack pointer. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D37535
* acpica: Merge ACPICA 20221020Jung-uk Kim2022-10-282-13/+13
|
* Decode couple arrays in NFIT table.Alexander Motin2022-08-191-3/+9
| | | | MFC after: 1 week
* acpi(4): Fix a typo in a debug statementGordon Bergling2022-06-041-1/+1
| | | | | | | - s/Efficency/tEfficiency/ Obtained from: NetBSD MFC after: 3 days
* Add the Arm SPE interrupt to acpidumpAndrew Turner2022-02-011-0/+1
| | | | | | | | To support the Arm Statistical Profiling Extension (SPE) ACPI 6.3 added a place to hold the SPE interrupt. Add to acpidump to show when printing the Arm Generic Interrupt data. Sponsored by: The FreeBSD Foundation
* Fix "Mesurement" typo in usr.sbin/acpi/acpiconf/acpiconf.cMatt Audesse2022-01-071-1/+1
| | | | Pull Request: https://github.com/freebsd/freebsd-src/pull/572
* Only change the fadt revision in acpidump on i386Andrew Turner2021-10-211-0/+6
| | | | | | | | | | | | | There is a workaround in acpidump for an old IBM laptop. This is being hit on a modern arm64 system causing acpidump to use the wrong field when reading a later address. As the laptop has a 32-bit CPU the only FreeBSD support for it is i386. As such limit the workaround to that architecture. Reviewed by: emaste, jkim, jhb (all earlier version) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32573
* Print DeviceHandle and PhysicalId in hex.Alexander Motin2021-02-051-2/+2
| | | | | | | The first is actually a bitfield. The second is printed in hex by dmidecode, so uniformidy should be good. MFC after: 1 week
* Improve ACPI_NFIT_CONTROL_REGION formatting.Alexander Motin2021-02-051-7/+7
| | | | MFC after: 1 week
* Decode NFIT Platform Capabilities.Alexander Motin2021-01-251-1/+17
| | | | MFC after: 1 week
* 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