Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 141834
b: refs/heads/master
c: d3ccaff
h: refs/heads/master
v: v3
  • Loading branch information
Bob Moore authored and Len Brown committed Mar 26, 2009
1 parent ed0b14b commit 88912a9
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 97cbb7d196845ec9a6c0e3cc33ec20503f8c4e73
refs/heads/master: d3ccaff827cef5a5c5a0f3c97e1e2e6d99f618cb
28 changes: 27 additions & 1 deletion trunk/drivers/acpi/acpica/tbinstal.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ acpi_status acpi_tb_verify_table(struct acpi_table_desc *table_desc)
*
* RETURN: Status
*
* DESCRIPTION: This function is called to add the ACPI table
* DESCRIPTION: This function is called to add an ACPI table. It is used to
* dynamically load tables via the Load and load_table AML
* operators.
*
******************************************************************************/

Expand All @@ -112,6 +114,7 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index)
{
u32 i;
acpi_status status = AE_OK;
struct acpi_table_header *override_table = NULL;

ACPI_FUNCTION_TRACE(tb_add_table);

Expand Down Expand Up @@ -201,6 +204,29 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index)
}
}

/*
* ACPI Table Override:
* Allow the host to override dynamically loaded tables.
*/
status = acpi_os_table_override(table_desc->pointer, &override_table);
if (ACPI_SUCCESS(status) && override_table) {
ACPI_INFO((AE_INFO,
"%4.4s @ 0x%p Table override, replaced with:",
table_desc->pointer->signature,
ACPI_CAST_PTR(void, table_desc->address)));

/* We can delete the table that was passed as a parameter */

acpi_tb_delete_table(table_desc);

/* Setup descriptor for the new table */

table_desc->address = ACPI_PTR_TO_PHYSADDR(override_table);
table_desc->pointer = override_table;
table_desc->length = override_table->length;
table_desc->flags = ACPI_TABLE_ORIGIN_OVERRIDE;
}

/* Add the table to the global root table list */

status = acpi_tb_store_table(table_desc->address, table_desc->pointer,
Expand Down

0 comments on commit 88912a9

Please sign in to comment.