]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ACPI: APEI: EINJ: Discover EINJv2 parameters
authorZaid Alali <zaidal@os.amperecomputing.com>
Tue, 17 Jun 2025 19:30:23 +0000 (12:30 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 18 Jun 2025 18:49:31 +0000 (20:49 +0200)
commit691a0f0a557b19316ef533f9ca34c72ab6c7ae56
treedfc40a1f4926b39156751914635022e59160e166
parent21cd921b1a5a4c8d0097343bda7e6e78d21e9773
ACPI: APEI: EINJ: Discover EINJv2 parameters

The EINJv2 set_error_type_with_address structure has a flex array
to hold the component IDs and syndrome values used when injecting
multiple errors at once.

Discover the size of this array by taking the address from the
ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS entry in the EINJ table
and reading the BIOS copy of the structure.

Derive the maximum number of components from the length field
in the einjv2_extension_struct at the end of the BIOS copy.

Map the whole of the structure into kernel memory (and unmap
on module unload).

[Tony: Code unchanged from Zaid's original. New commit message]

Reviewed-by: Tony Luck <tony.luck@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Zaid Alali <zaidal@os.amperecomputing.com>
Link: https://patch.msgid.link/20250617193026.637510-5-zaidal@os.amperecomputing.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/apei/einj-core.c