Skip to content

Commit

Permalink
ACPICA: Add write support for DataTable operation regions
Browse files Browse the repository at this point in the history
The original implementation only supported reading from a DataTable
region. However, some machines have been seen that actually write
to the ACPI table contained in such a region. This change adds
support for writing to a DataTable region.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Bob Moore authored and Len Brown committed Apr 20, 2010
1 parent 333b04a commit c1637e9
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions drivers/acpi/acpica/exregion.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,10 @@ acpi_ex_data_table_space_handler(u32 function,
{
ACPI_FUNCTION_TRACE(ex_data_table_space_handler);

/* Perform the memory read or write */

/*
* Perform the memory read or write. The bit_width was already
* validated.
*/
switch (function) {
case ACPI_READ:

Expand All @@ -502,9 +504,14 @@ acpi_ex_data_table_space_handler(u32 function,
break;

case ACPI_WRITE:

ACPI_MEMCPY(ACPI_PHYSADDR_TO_PTR(address),
ACPI_CAST_PTR(char, value), ACPI_DIV_8(bit_width));
break;

default:

return_ACPI_STATUS(AE_SUPPORT);
return_ACPI_STATUS(AE_BAD_PARAMETER);
}

return_ACPI_STATUS(AE_OK);
Expand Down

0 comments on commit c1637e9

Please sign in to comment.