Commit Graph

1042 Commits

Author SHA1 Message Date
Daniil Tatianin
0f0b704ef7 tools/acpixtract: handle AX_OPTIONAL_TABLES correctly
The previous commit introduced a regression while attempting to make
acpixtract not exit with -1 in case of a missing optional table.

Add an extra condition that checks that the number of detected instances
was 0 before checking AX_OPTIONAL_TABLES.

Fixes: ad5755dd80 ("acpixtract: don't abort AxExtractTables for AX_OPTIONAL_TABLES")
Resolves: #978
Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
2024-10-20 15:51:05 +03:00
Daniil Tatianin
ad5755dd80 acpixtract: don't abort AxExtractTables for AX_OPTIONAL_TABLES
Otherwise this makes the utility return an error for invocations like
"acpixtract <FILE>", where FILE contains a DSDT but no SSDTs.

Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
2024-08-17 16:24:40 +03:00
Daniil Tatianin
361891b007 acpixtract: zero-fill UpperSignature in AxExtractTables
Since we use strncpy below to copy a user-provided buffer into this
variable, we have no guarantees about the size of the source. Moreover,
this would leave the last byte of the UpperSignature uninitialized due
to how strncpy works.

From https://en.cppreference.com/w/cpp/string/byte/strncpy:
    Copies at most count characters of the byte string pointed to by
    src (including the terminating null character) to character array
    pointed to by dest.

Signed-off-by: Daniil Tatianin <99danilt@gmail.com>
2024-08-17 16:24:40 +03:00
Saket Dumbre
8ff276b77c
Merge pull request #911 from winterddd/master
iASL: Add support for the AEST V2 table
2024-03-26 16:54:03 -07:00
Ruidong Tian
ebb49799c7 iASL: Add support for the AEST V2 table
AEST V2 was published[1], add V2 support based on AEST V1.

[1]: https://developer.arm.com/documentation/den0085/latest/

Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
2024-03-26 17:08:40 +08:00
Saket Dumbre
68bc01cec3
Update efihello.c license header from 2023 to 2024 2024-03-21 21:31:35 -07:00
Saket Dumbre
c18edfb1ab Update the copyright year in the license header from 2023 to 2024 2024-03-21 20:23:36 -07:00
Saket Dumbre
1d903739ca
Merge pull request #926 from xiaobo55x/riscv_numa
RISC-V: Code First ECR for RINTC Affinity Structure Support
2024-03-04 16:41:33 -08:00
Haibo Xu
b9423c1d35 SRAT: Add dump and compiler support for RINTC affinity structure
After adding RISC-V RINTC affinity structure definition,
enable corresponding dump and compiler support.

Reference: Mantis ID: 2433

Signed-off-by: Haibo Xu <haibo1.xu@intel.com>
2024-01-17 21:21:59 +08:00
Cezary Rojewski
31a16a32e7 acpisrc: Add identifiers for the NHLT table
To support conversion of NHLT related types, update the identifier table
with all the structs and unions that define the NHLT.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
2023-11-21 15:59:09 +01:00
Shiju Jose
c581606cf4 ACPI 6.5: RAS2: Add support for RAS2 table
Add support for ACPI RAS2 feature table(RAS2) defined in the ACPI 6.5
Specification & upwards revision, section 5.2.21.

The RAS2 table provides interfaces for platform RAS features. RAS2 offers
the same services as RASF, but is more scalable than the latter.
RAS2 supports independent RAS controls and capabilities for a given RAS
feature for multiple instances of the same component in a given system.
The platform can support either RAS2 or RASF but not both.

Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
2023-09-27 17:41:52 +01:00
Cezary Rojewski
0c7379eae2 NHLT: Drop preliminary support
Specification on which current implementation is based on, does not list
all important table components and contains outdated information.
Because of this, the implementation is flawed. To make it easier to
reintroduce the table representation in the future, drop its support and
remove related code.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
2023-09-08 10:40:30 +02:00
Jose Marinho
dc6fd1d129 Detect GED device and keep track of _EVT
The GED device is described by a _HID of ACPI0013.
This code traverses the namespace identifying all GED devices.
For each GED device in the namespace we record 1) the Interrupt objects
and the _EVT method.

This information is used when an interrupt is simulate.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@arm.com>

Signed-off-by: Jose Marinho <jose.marinho@arm.com>
2023-05-09 09:24:04 +01:00
Jung-uk Kim
08c5f84a4f Remove write-only variables
This fixes build with Clang 15 and later.
2023-02-28 19:30:59 -05:00
Robert Moore
0c9616eed6
Merge pull request #822 from heatd/acpisrc-linux-fix
acpisrc Linux generation fix
2023-02-07 12:45:00 -08:00
Robert Moore
c05f747c8d
Merge pull request #819 from heshamelmatary/mpam
Add support for Arm's MPAM ACPI table version 2
2023-02-07 10:13:24 -08:00
Robert Moore
25bddd1824 Update all copyrights/signons to 2023
Copyright updates to 2023.
2023-02-07 09:33:27 -08:00
Hesham Almatary
005e24bcaa Add support for Arm's MPAM ACPI table version 2
Complies with ACPI for Memory System Resource Partitioning and
Monitoring 2.0 [1]. Document number: DEN0065, as of December 2022.

Support for all types of MPAM resources. No support yet for:
1) MPAM PCC Interface Type
2) The optional Resource-specific data per MSC node, introduced in v2 of the
MPAM ACPI spec.

[1] https://developer.arm.com/documentation/den0065/latest

Signed-off-by: Hesham Almatary <hesham.almatary@huawei.com>
2023-01-31 09:30:53 +00:00
Pedro Falcato
d4a2c93198 acpisrc: Add missing tables to astable
Also renames ACPI_DATA_TABLE_MAPPING's struct to
acpi_data_table_mapping, just so conversion goes smoothly.

Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
2022-12-21 02:45:45 +00:00
Pedro Falcato
616e2befdc asconvert: Fix prefix detection in AsInsertPrefix
Previously, it was assumed prefixes would be directly before the keyword
itself. This is a wrong assumption that got broken by some code in
actbl2.h. Therefore, look for the prefix on the whole line.

Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
2022-12-21 01:13:30 +00:00
Robert Moore
085e76126c
Merge pull request #799 from ElyesH/MCHI
Remove duplicated MCHI table
2022-10-20 12:52:54 -07:00
Robert Moore
8ac4e5116f Finish support for the CDAT table, in both the data table
compiler and the disassembler.
2022-10-19 13:23:10 -07:00
Elyes Haouas
65e7107467 tools/acpisrc/astable.c: Remove duplicated MCHI table
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
2022-09-28 09:34:32 +02:00
Robert Moore
7021087eed Remove a duplicate of ACPI_SIG_CEDT 2022-08-26 12:20:07 -07:00
Robert Moore
da94551b7e Remove duplicate from the struct list.
Remove duplicate of "ACPI_PHAT_VERSION_ELEMENT".
2022-08-17 08:45:55 -07:00
Robert Moore
efba032dc5
Merge pull request #778 from sathyaintel/ccel-v1
iASL: Add CCEL table to both compiler/disassembler
2022-08-12 14:09:11 -07:00
Robert Moore
761b6f167d AcpiHelp: Fix fault using -v option standalone.
reported by: sbockowx.
2022-07-05 13:43:46 -07:00
Kuppuswamy Sathyanarayanan
10e4763f15 iASL: Add CCEL table to both compiler/disassembler
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
2022-05-26 20:14:58 +00:00
Colin Ian King
bbc7151605 acpixtract: Make ThisLineByteCount an INT32
Variable ThisLineByteCount is assigned a signed int value from the
call to AxConvertToBinary and is also compared to EOF which is -1,
so it makes sense to make ThisLineByteCount an INT32 type rather
than a UINT32.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
2022-04-26 15:10:38 +00:00
Robert Moore
cda7b36af5 Use _exit instead of exit in signal handlers
This is apparently much safer.
2022-02-17 13:26:16 -08:00
Robert Moore
738d7b0726 Update copyright notices to the year 2022
Affects all source modules and utility signons.
2022-02-17 13:15:32 -08:00
Piotr Maziarz
68c7e54207 iASL: NHLT: Rename linux specific strucures to DeviceInfo
Those structures aren't used by Linux drivers, and in other NHLT related
tools they are called DeviceInfo.
2022-01-13 19:27:53 +01:00
Piotr Maziarz
961221a768 iASL: NHLT: Fix parsing undocumented bytes at the end of Endpoint
Descriptor

Undocumented bytes at the end of Endpoint Descriptor can be present
independently of Linux-specific structures. Their size can also vary.
2022-01-13 19:25:39 +01:00
Robert Moore
26f8c721fb iASL/NHLT table: add support for optional "Specific Data" field
for the optional Linux-specific structure that appears at the end
of an Endpoint Descriptor.
2021-12-17 09:41:35 -08:00
Robert Moore
dd4acd9614 acpisrc: Add suppoprt for AGDI table
Add conversion info for AGDI.
2021-12-15 07:44:39 -08:00
Robert Moore
403f9965ab iASL: Add TDEL table to both compiler/disassembler
Added ACPI_PCC_INFO to AcpiSrc.
2021-12-09 12:41:46 -08:00
Robert Moore
6de0131ecd iASL Table Compiler: Completed the full table compiler support
for the NHLT table. (Non-HD Audio Endpoint Description Table).
2021-12-08 12:59:24 -08:00
Robert Moore
94abe85858 iASL table disassembler: Added disassembly support for the NHLT ACPI table.
Note: support for Vendor-defined microphone arrays and SNR extensions are
not supported at this time -- mostly due to a lack of example tables.
Actual compiler support for NHLT is forthcoming.
2021-09-30 08:31:57 -07:00
Robert Moore
d93601cc4d AcpiHelp: Cleanup output for list of supported tables
Output cleanup.
2021-07-22 08:42:09 -07:00
Robert Moore
d648716449 iASL: Fix for WPBT table with no command-line arguments
Handle the case where the Command-line Arguments table field
does not exist.
2021-07-14 13:25:22 -07:00
Robert Moore
9e9b5ad4b2
Merge pull request #701 from SchmErik/prmt-module-header
Add PRMT module header to facilitate parsing
2021-07-01 10:35:53 -07:00
Robert Moore
d2696260e5 acpisrc: add new symbols for the AEST table
Add new symbols for linux conversion.
2021-07-01 09:21:12 -07:00
Erik Kaneda
bd46cb07e6 Add PRMT module header to facilitate parsing
This structure is used in to parse PRMT in other Operating Systems
that relies on using subtable headers in order to parse ACPI tables.
Although the PRMT doesn't have "subtables" it has a list of module
information structures that act as subtables.

Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
2021-06-09 13:34:40 -07:00
Erik Kaneda
cdf48b141d Add support for PlatformRtMechanism OperationRegion handler
Writing a buffer to a PlatformRtMechanism fieldunit invokes a
bidirectional transaction. The input buffer contains 26 bytes
containing 9 bytes of status, a command byte and a 16-byte UUID.
This change will will simply pass this incoming buffer to a handler
registered by the OS.

Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
2021-05-25 12:55:08 -07:00
Erik Kaneda
f70e7593e3 iASL: add disassembler support for PRMT
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
2021-05-25 11:18:47 -07:00
Robert Moore
81eb9c383e iASL: Add support for the BDAT ACPI table
Includes: Table compiler, disassembler, and template generator.
2021-05-19 08:14:00 -07:00
Robert Moore
6949e1dd2d iASL Table Compiler: Add full support for RGRT ACPI table
Includes compiler, disassembler, and template generator.
2021-05-14 09:30:42 -07:00
Robert Moore
27a434379e iASL: Add support for the SVKL table
Includes the table compiler, the disassembler and the template
generator.
2021-05-12 12:06:30 -07:00
Kuppuswamy Sathyanarayanan
b5e6bcf69d Add SVKL table headers
SVKL (Storage Volume Key Location Table) is used by BIOS/Firmware
to share storage volume encryption key's with OS. It will be used
by userspace to decrypt and mount encrypted drives.

So add SVKL table signature and add it to known signatures array
support SVKL.

You can find details about the SVKL table in TDX specfication
titled "Guest-Host-Communication Interface (GHCI) for Intel
Trust Domain Extensions (Intel® TDX)", sec 4.4 and in ACPI
specification r6.4, sec 5.2.6.

https://software.intel.com/content/dam/develop/external/us/en/documents/intel-tdx-guest-hypervisor-communication-interface.pdf

Cc: Robert Moore <robert.moore@intel.com>
Cc: Erik Kaneda <erik.kaneda@intel.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
2021-04-14 16:55:28 -07:00
Kuppuswamy Sathyanarayanan
f1ee04207a ACPI 6.4: MADT: add Multiprocessor Wakeup Mailbox Structure
Add Multiprocessor Wakeup Mailbox Structure definition. It is useful
in parsing MADT Wake table.

Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
2021-04-14 16:55:23 -07:00