aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/tables/tbinstal.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2006-04-21 17:15:00 -0400
committerLen Brown <len.brown@intel.com>2006-06-14 02:30:55 -0400
commitb229cf92eee616c7cb5ad8cdb35a19b119f00bc8 (patch)
tree74b52bec6ec029859c2320aba227290a503af31a /drivers/acpi/tables/tbinstal.c
parent793c2388cae3fd023b3b5166354931752d42353c (diff)
ACPI: ACPICA 20060421
Removed a device initialization optimization introduced in 20051216 where the _STA method was not run unless an _INI was also present for the same device. This optimization could cause problems because it could allow _INI methods to be run within a not-present device subtree (If a not-present device had no _INI, _STA would not be run, the not-present status would not be discovered, and the children of the device would be incorrectly traversed.) Implemented a new _STA optimization where namespace subtrees that do not contain _INI are identified and ignored during device initialization. Selectively running _STA can significantly improve boot time on large machines (with assistance from Len Brown.) Implemented support for the device initialization case where the returned _STA flags indicate a device not-present but functioning. In this case, _INI is not run, but the device children are examined for presence, as per the ACPI specification. Implemented an additional change to the IndexField support in order to conform to MS behavior. The value written to the Index Register is not simply a byte offset, it is a byte offset in units of the access width of the parent Index Field. (Fiodor Suietov) Defined and deployed a new OSL interface, acpi_os_validate_address(). This interface is called during the creation of all AML operation regions, and allows the host OS to exert control over what addresses it will allow the AML code to access. Operation Regions whose addresses are disallowed will cause a runtime exception when they are actually accessed (will not affect or abort table loading.) Defined and deployed a new OSL interface, acpi_os_validate_interface(). This interface allows the host OS to match the various "optional" interface/behavior strings for the _OSI predefined control method as appropriate (with assistance from Bjorn Helgaas.) Restructured and corrected various problems in the exception handling code paths within DsCallControlMethod and DsTerminateControlMethod in dsmethod (with assistance from Takayoshi Kochi.) Modified the Linux source converter to ignore quoted string literals while converting identifiers from mixed to lower case. This will correct problems with the disassembler and other areas where such strings must not be modified. The ACPI_FUNCTION_* macros no longer require quotes around the function name. This allows the Linux source converter to convert the names, now that the converter ignores quoted strings. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/tables/tbinstal.c')
-rw-r--r--drivers/acpi/tables/tbinstal.c41
1 files changed, 19 insertions, 22 deletions
diff --git a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c
index ce57a195577a..7ca2df75bb11 100644
--- a/drivers/acpi/tables/tbinstal.c
+++ b/drivers/acpi/tables/tbinstal.c
@@ -73,11 +73,11 @@ acpi_tb_match_signature(char *signature,
73{ 73{
74 acpi_native_uint i; 74 acpi_native_uint i;
75 75
76 ACPI_FUNCTION_TRACE("tb_match_signature"); 76 ACPI_FUNCTION_TRACE(tb_match_signature);
77 77
78 /* Search for a signature match among the known table types */ 78 /* Search for a signature match among the known table types */
79 79
80 for (i = 0; i < NUM_ACPI_TABLE_TYPES; i++) { 80 for (i = 0; i < (ACPI_TABLE_ID_MAX + 1); i++) {
81 if (!(acpi_gbl_table_data[i].flags & search_type)) { 81 if (!(acpi_gbl_table_data[i].flags & search_type)) {
82 continue; 82 continue;
83 } 83 }
@@ -123,7 +123,7 @@ acpi_status acpi_tb_install_table(struct acpi_table_desc *table_info)
123{ 123{
124 acpi_status status; 124 acpi_status status;
125 125
126 ACPI_FUNCTION_TRACE("tb_install_table"); 126 ACPI_FUNCTION_TRACE(tb_install_table);
127 127
128 /* Lock tables while installing */ 128 /* Lock tables while installing */
129 129
@@ -188,7 +188,7 @@ acpi_tb_recognize_table(struct acpi_table_desc *table_info, u8 search_type)
188 struct acpi_table_header *table_header; 188 struct acpi_table_header *table_header;
189 acpi_status status; 189 acpi_status status;
190 190
191 ACPI_FUNCTION_TRACE("tb_recognize_table"); 191 ACPI_FUNCTION_TRACE(tb_recognize_table);
192 192
193 /* Ensure that we have a valid table pointer */ 193 /* Ensure that we have a valid table pointer */
194 194
@@ -219,7 +219,6 @@ acpi_tb_recognize_table(struct acpi_table_desc *table_info, u8 search_type)
219 /* Return the table type and length via the info struct */ 219 /* Return the table type and length via the info struct */
220 220
221 table_info->length = (acpi_size) table_header->length; 221 table_info->length = (acpi_size) table_header->length;
222
223 return_ACPI_STATUS(status); 222 return_ACPI_STATUS(status);
224} 223}
225 224
@@ -244,7 +243,7 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type,
244 struct acpi_table_desc *table_desc; 243 struct acpi_table_desc *table_desc;
245 acpi_status status; 244 acpi_status status;
246 245
247 ACPI_FUNCTION_TRACE_U32("tb_init_table_descriptor", table_type); 246 ACPI_FUNCTION_TRACE_U32(tb_init_table_descriptor, table_type);
248 247
249 /* Allocate a descriptor for this table */ 248 /* Allocate a descriptor for this table */
250 249
@@ -313,15 +312,14 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type,
313 312
314 /* Finish initialization of the table descriptor */ 313 /* Finish initialization of the table descriptor */
315 314
315 table_desc->loaded_into_namespace = FALSE;
316 table_desc->type = (u8) table_type; 316 table_desc->type = (u8) table_type;
317 table_desc->pointer = table_info->pointer; 317 table_desc->pointer = table_info->pointer;
318 table_desc->length = table_info->length; 318 table_desc->length = table_info->length;
319 table_desc->allocation = table_info->allocation; 319 table_desc->allocation = table_info->allocation;
320 table_desc->aml_start = (u8 *) (table_desc->pointer + 1), 320 table_desc->aml_start = (u8 *) (table_desc->pointer + 1),
321 table_desc->aml_length = (u32) (table_desc->length - 321 table_desc->aml_length = (u32)
322 (u32) sizeof(struct 322 (table_desc->length - (u32) sizeof(struct acpi_table_header));
323 acpi_table_header));
324 table_desc->loaded_into_namespace = FALSE;
325 323
326 /* 324 /*
327 * Set the appropriate global pointer (if there is one) to point to the 325 * Set the appropriate global pointer (if there is one) to point to the
@@ -336,7 +334,6 @@ acpi_tb_init_table_descriptor(acpi_table_type table_type,
336 334
337 table_info->owner_id = table_desc->owner_id; 335 table_info->owner_id = table_desc->owner_id;
338 table_info->installed_desc = table_desc; 336 table_info->installed_desc = table_desc;
339
340 return_ACPI_STATUS(AE_OK); 337 return_ACPI_STATUS(AE_OK);
341} 338}
342 339
@@ -360,7 +357,7 @@ void acpi_tb_delete_all_tables(void)
360 * Free memory allocated for ACPI tables 357 * Free memory allocated for ACPI tables
361 * Memory can either be mapped or allocated 358 * Memory can either be mapped or allocated
362 */ 359 */
363 for (type = 0; type < NUM_ACPI_TABLE_TYPES; type++) { 360 for (type = 0; type < (ACPI_TABLE_ID_MAX + 1); type++) {
364 acpi_tb_delete_tables_by_type(type); 361 acpi_tb_delete_tables_by_type(type);
365 } 362 }
366} 363}
@@ -384,9 +381,9 @@ void acpi_tb_delete_tables_by_type(acpi_table_type type)
384 u32 count; 381 u32 count;
385 u32 i; 382 u32 i;
386 383
387 ACPI_FUNCTION_TRACE_U32("tb_delete_tables_by_type", type); 384 ACPI_FUNCTION_TRACE_U32(tb_delete_tables_by_type, type);
388 385
389 if (type > ACPI_TABLE_MAX) { 386 if (type > ACPI_TABLE_ID_MAX) {
390 return_VOID; 387 return_VOID;
391 } 388 }
392 389
@@ -397,28 +394,28 @@ void acpi_tb_delete_tables_by_type(acpi_table_type type)
397 /* Clear the appropriate "typed" global table pointer */ 394 /* Clear the appropriate "typed" global table pointer */
398 395
399 switch (type) { 396 switch (type) {
400 case ACPI_TABLE_RSDP: 397 case ACPI_TABLE_ID_RSDP:
401 acpi_gbl_RSDP = NULL; 398 acpi_gbl_RSDP = NULL;
402 break; 399 break;
403 400
404 case ACPI_TABLE_DSDT: 401 case ACPI_TABLE_ID_DSDT:
405 acpi_gbl_DSDT = NULL; 402 acpi_gbl_DSDT = NULL;
406 break; 403 break;
407 404
408 case ACPI_TABLE_FADT: 405 case ACPI_TABLE_ID_FADT:
409 acpi_gbl_FADT = NULL; 406 acpi_gbl_FADT = NULL;
410 break; 407 break;
411 408
412 case ACPI_TABLE_FACS: 409 case ACPI_TABLE_ID_FACS:
413 acpi_gbl_FACS = NULL; 410 acpi_gbl_FACS = NULL;
414 break; 411 break;
415 412
416 case ACPI_TABLE_XSDT: 413 case ACPI_TABLE_ID_XSDT:
417 acpi_gbl_XSDT = NULL; 414 acpi_gbl_XSDT = NULL;
418 break; 415 break;
419 416
420 case ACPI_TABLE_SSDT: 417 case ACPI_TABLE_ID_SSDT:
421 case ACPI_TABLE_PSDT: 418 case ACPI_TABLE_ID_PSDT:
422 default: 419 default:
423 break; 420 break;
424 } 421 }
@@ -504,7 +501,7 @@ struct acpi_table_desc *acpi_tb_uninstall_table(struct acpi_table_desc
504{ 501{
505 struct acpi_table_desc *next_desc; 502 struct acpi_table_desc *next_desc;
506 503
507 ACPI_FUNCTION_TRACE_PTR("tb_uninstall_table", table_desc); 504 ACPI_FUNCTION_TRACE_PTR(tb_uninstall_table, table_desc);
508 505
509 if (!table_desc) { 506 if (!table_desc) {
510 return_PTR(NULL); 507 return_PTR(NULL);