From aa6ec56b574d16180d56d18256ded7d49c7212a0 Mon Sep 17 00:00:00 2001 From: Erik Schmauss Date: Fri, 22 Feb 2019 16:06:25 -0800 Subject: ACPICA: ACPI 6.3: add PCC operation region support for AML interpreter ACPICA commit a4849944e80f97970e99843f4975850753584a4e This change adds PCC operation region support in the AML interpreter and a default handler for acpiexec. According to the specification, the PCC operation region performs a transaction when the COMD field is written. This allows ASL to write data to other fields before sending the data. In order to accommodate this protocol, a temorary buffer is added to the regionfield object to accumulate writes. If any offset that spans COMD is written, the temporary buffer is sent to the PCC operation region handler to be processed. This change also renames the PCC keyword to platform_comm_channel. Link: https://github.com/acpica/acpica/commit/a4849944 Reviewed-by: Kyle Pelton Signed-off-by: Erik Schmauss Signed-off-by: Bob Moore Signed-off-by: Rafael J. Wysocki --- drivers/acpi/acpica/dsfield.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/acpi/acpica/dsfield.c') diff --git a/drivers/acpi/acpica/dsfield.c b/drivers/acpi/acpica/dsfield.c index d51216c9d891..cf4e061bb0f0 100644 --- a/drivers/acpi/acpica/dsfield.c +++ b/drivers/acpi/acpica/dsfield.c @@ -518,6 +518,13 @@ acpi_ds_create_field(union acpi_parse_object *op, info.region_node = region_node; status = acpi_ds_get_field_names(&info, walk_state, arg->common.next); + if (info.region_node->object->region.space_id == + ACPI_ADR_SPACE_PLATFORM_COMM + && !(region_node->object->field.internal_pcc_buffer = + ACPI_ALLOCATE_ZEROED(info.region_node->object->region. + length))) { + return_ACPI_STATUS(AE_NO_MEMORY); + } return_ACPI_STATUS(status); } -- cgit v1.2.3