Skip to content

Commit 0acf24a

Browse files
sudeep-hollarafaeljw
authored andcommitted
ACPICA: Add support for PCC Opregion special context data
ACPICA commit 55526e8a6133cbf5a9cc0fb75a95dbbac6eb98e6 PCC Opregion added in ACPIC 6.3 requires special context data similar to GPIO and Generic Serial Bus as it needs to know the internal PCC buffer and its length as well as the PCC channel index when the opregion handler is being executed by the OSPM. Lets add support for the special context data needed by PCC Opregion. Link: acpica/acpica@55526e8a Signed-off-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 9a3b865 commit 0acf24a

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

drivers/acpi/acpica/evregion.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,16 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
162162
return_ACPI_STATUS(AE_NOT_EXIST);
163163
}
164164

165+
if (region_obj->region.space_id == ACPI_ADR_SPACE_PLATFORM_COMM) {
166+
struct acpi_pcc_info *ctx =
167+
handler_desc->address_space.context;
168+
169+
ctx->internal_buffer =
170+
field_obj->field.internal_pcc_buffer;
171+
ctx->length = region_obj->region.length;
172+
ctx->subspace_id = region_obj->region.address;
173+
}
174+
165175
/*
166176
* We must exit the interpreter because the region setup will
167177
* potentially execute control methods (for example, the _REG method

include/acpi/actypes.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,6 +1103,14 @@ struct acpi_connection_info {
11031103
u8 access_length;
11041104
};
11051105

1106+
/* Special Context data for PCC Opregion (ACPI 6.3) */
1107+
1108+
struct acpi_pcc_info {
1109+
u8 subspace_id;
1110+
u16 length;
1111+
u8 *internal_buffer;
1112+
};
1113+
11061114
typedef
11071115
acpi_status (*acpi_adr_space_setup) (acpi_handle region_handle,
11081116
u32 function,

0 commit comments

Comments
 (0)