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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
Add Multiprocessor Wakeup Mailbox Structure definition. It is useful
in parsing MADT Wake table.
Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>