aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/tbinstal.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2009-02-03 01:43:04 -0500
committerLen Brown <len.brown@intel.com>2009-03-26 16:38:20 -0400
commitd3ccaff827cef5a5c5a0f3c97e1e2e6d99f618cb (patch)
treec6c3d75d44f38d967a0f7333ed9eef4ab3d8999b /drivers/acpi/acpica/tbinstal.c
parent97cbb7d196845ec9a6c0e3cc33ec20503f8c4e73 (diff)
ACPICA: Add override for dynamic tables
Add a call to acpi_os_table_override during the installation of a dynamic table (loaded via the Load or LoadTable AML operators). 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>
Diffstat (limited to 'drivers/acpi/acpica/tbinstal.c')
-rw-r--r--drivers/acpi/acpica/tbinstal.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c
index 37374b21969d..ef269a297b57 100644
--- a/drivers/acpi/acpica/tbinstal.c
+++ b/drivers/acpi/acpica/tbinstal.c
@@ -103,7 +103,9 @@ acpi_status acpi_tb_verify_table(struct acpi_table_desc *table_desc)
103 * 103 *
104 * RETURN: Status 104 * RETURN: Status
105 * 105 *
106 * DESCRIPTION: This function is called to add the ACPI table 106 * DESCRIPTION: This function is called to add an ACPI table. It is used to
107 * dynamically load tables via the Load and load_table AML
108 * operators.
107 * 109 *
108 ******************************************************************************/ 110 ******************************************************************************/
109 111
@@ -112,6 +114,7 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index)
112{ 114{
113 u32 i; 115 u32 i;
114 acpi_status status = AE_OK; 116 acpi_status status = AE_OK;
117 struct acpi_table_header *override_table = NULL;
115 118
116 ACPI_FUNCTION_TRACE(tb_add_table); 119 ACPI_FUNCTION_TRACE(tb_add_table);
117 120
@@ -201,6 +204,29 @@ acpi_tb_add_table(struct acpi_table_desc *table_desc, u32 *table_index)
201 } 204 }
202 } 205 }
203 206
207 /*
208 * ACPI Table Override:
209 * Allow the host to override dynamically loaded tables.
210 */
211 status = acpi_os_table_override(table_desc->pointer, &override_table);
212 if (ACPI_SUCCESS(status) && override_table) {
213 ACPI_INFO((AE_INFO,
214 "%4.4s @ 0x%p Table override, replaced with:",
215 table_desc->pointer->signature,
216 ACPI_CAST_PTR(void, table_desc->address)));
217
218 /* We can delete the table that was passed as a parameter */
219
220 acpi_tb_delete_table(table_desc);
221
222 /* Setup descriptor for the new table */
223
224 table_desc->address = ACPI_PTR_TO_PHYSADDR(override_table);
225 table_desc->pointer = override_table;
226 table_desc->length = override_table->length;
227 table_desc->flags = ACPI_TABLE_ORIGIN_OVERRIDE;
228 }
229
204 /* Add the table to the global root table list */ 230 /* Add the table to the global root table list */
205 231
206 status = acpi_tb_store_table(table_desc->address, table_desc->pointer, 232 status = acpi_tb_store_table(table_desc->address, table_desc->pointer,