diff options
author | Bob Moore <robert.moore@intel.com> | 2006-05-26 16:36:00 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-06-14 02:44:35 -0400 |
commit | 4119532c95547821dbe72d6916dfa1b2148475b3 (patch) | |
tree | 564eb8f69924fb7dc72e93526faf1547acac7d30 /drivers/acpi/tables | |
parent | b8d35192c55fb055792ff0641408eaaec7c88988 (diff) |
ACPI: ACPICA 20060526
Restructured, flattened, and simplified the internal
interfaces for namespace object evaluation - resulting
in smaller code, less CPU stack use, and fewer
interfaces. (With assistance from Mikhail Kouzmich)
Fixed a problem with the CopyObject operator where the
first parameter was not typed correctly for the parser,
interpreter, compiler, and disassembler. Caused various
errors and unexpected behavior.
Fixed a problem where a ShiftLeft or ShiftRight of
more than 64 bits produced incorrect results with some
C compilers. Since the behavior of C compilers when
the shift value is larger than the datatype width is
apparently not well defined, the interpreter now detects
this condition and simply returns zero as expected in all
such cases. (BZ 395)
Fixed problem reports (Valery Podrezov) integrated: -
Update String-to-Integer conversion to match ACPI 3.0A spec
http://bugzilla.kernel.org/show_bug.cgi?id=5329
Allow interpreter to handle nested method declarations
http://bugzilla.kernel.org/show_bug.cgi?id=5361
Fixed problem reports (Fiodor Suietov) integrated: -
acpi_terminate() doesn't free debug memory allocation
list objects (BZ 355) - After Core Subsystem
shutdown, acpi_subsystem_status() returns AE_OK (BZ 356) -
acpi_os_unmap_memory() for RSDP can be invoked inconsistently
(BZ 357) - Resource Manager should return AE_TYPE for
non-device objects (BZ 358) - Incomplete cleanup branch
in AcpiNsEvaluateRelative (BZ 359) - Use acpi_os_free()
instead of ACPI_FREE in acpi_rs_set_srs_method_data (BZ 360)
- Incomplete cleanup branch in acpi_ps_parse_aml (BZ 361) -
Incomplete cleanup branch in acpi_ds_delete_walk_state (BZ 362)
- acpi_get_table_header returns AE_NO_ACPI_TABLES until DSDT
is loaded (BZ 365) - Status of the Global Initialization
Handler call not used (BZ 366) - Incorrect object parameter
to Global Initialization Handler (BZ 367)
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/tables')
-rw-r--r-- | drivers/acpi/tables/tbget.c | 40 | ||||
-rw-r--r-- | drivers/acpi/tables/tbrsdt.c | 11 |
2 files changed, 16 insertions, 35 deletions
diff --git a/drivers/acpi/tables/tbget.c b/drivers/acpi/tables/tbget.c index 3a4f46ca3884..99eacceff563 100644 --- a/drivers/acpi/tables/tbget.c +++ b/drivers/acpi/tables/tbget.c | |||
@@ -417,7 +417,7 @@ acpi_tb_get_this_table(struct acpi_pointer *address, | |||
417 | * | 417 | * |
418 | * PARAMETERS: table_type - one of the defined table types | 418 | * PARAMETERS: table_type - one of the defined table types |
419 | * Instance - Which table of this type | 419 | * Instance - Which table of this type |
420 | * table_ptr_loc - pointer to location to place the pointer for | 420 | * return_table - pointer to location to place the pointer for |
421 | * return | 421 | * return |
422 | * | 422 | * |
423 | * RETURN: Status | 423 | * RETURN: Status |
@@ -428,58 +428,34 @@ acpi_tb_get_this_table(struct acpi_pointer *address, | |||
428 | 428 | ||
429 | acpi_status | 429 | acpi_status |
430 | acpi_tb_get_table_ptr(acpi_table_type table_type, | 430 | acpi_tb_get_table_ptr(acpi_table_type table_type, |
431 | u32 instance, struct acpi_table_header **table_ptr_loc) | 431 | u32 instance, struct acpi_table_header **return_table) |
432 | { | 432 | { |
433 | struct acpi_table_desc *table_desc; | 433 | struct acpi_table_desc *table_desc; |
434 | u32 i; | 434 | u32 i; |
435 | 435 | ||
436 | ACPI_FUNCTION_TRACE(tb_get_table_ptr); | 436 | ACPI_FUNCTION_TRACE(tb_get_table_ptr); |
437 | 437 | ||
438 | if (!acpi_gbl_DSDT) { | ||
439 | return_ACPI_STATUS(AE_NO_ACPI_TABLES); | ||
440 | } | ||
441 | |||
442 | if (table_type > ACPI_TABLE_ID_MAX) { | 438 | if (table_type > ACPI_TABLE_ID_MAX) { |
443 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 439 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
444 | } | 440 | } |
445 | 441 | ||
446 | /* | 442 | /* Check for instance out of range of the current table count */ |
447 | * For all table types (Single/Multiple), the first | ||
448 | * instance is always in the list head. | ||
449 | */ | ||
450 | if (instance == 1) { | ||
451 | |||
452 | /* Get the first */ | ||
453 | |||
454 | *table_ptr_loc = NULL; | ||
455 | if (acpi_gbl_table_lists[table_type].next) { | ||
456 | *table_ptr_loc = | ||
457 | acpi_gbl_table_lists[table_type].next->pointer; | ||
458 | } | ||
459 | return_ACPI_STATUS(AE_OK); | ||
460 | } | ||
461 | |||
462 | /* Check for instance out of range */ | ||
463 | 443 | ||
464 | if (instance > acpi_gbl_table_lists[table_type].count) { | 444 | if (instance > acpi_gbl_table_lists[table_type].count) { |
465 | return_ACPI_STATUS(AE_NOT_EXIST); | 445 | return_ACPI_STATUS(AE_NOT_EXIST); |
466 | } | 446 | } |
467 | 447 | ||
468 | /* Walk the list to get the desired table | 448 | /* |
469 | * Since the if (Instance == 1) check above checked for the | 449 | * Walk the list to get the desired table |
470 | * first table, setting table_desc equal to the .Next member | 450 | * Note: Instance is one-based |
471 | * is actually pointing to the second table. Therefore, we | ||
472 | * need to walk from the 2nd table until we reach the Instance | ||
473 | * that the user is looking for and return its table pointer. | ||
474 | */ | 451 | */ |
475 | table_desc = acpi_gbl_table_lists[table_type].next; | 452 | table_desc = acpi_gbl_table_lists[table_type].next; |
476 | for (i = 2; i < instance; i++) { | 453 | for (i = 1; i < instance; i++) { |
477 | table_desc = table_desc->next; | 454 | table_desc = table_desc->next; |
478 | } | 455 | } |
479 | 456 | ||
480 | /* We are now pointing to the requested table's descriptor */ | 457 | /* We are now pointing to the requested table's descriptor */ |
481 | 458 | ||
482 | *table_ptr_loc = table_desc->pointer; | 459 | *return_table = table_desc->pointer; |
483 | |||
484 | return_ACPI_STATUS(AE_OK); | 460 | return_ACPI_STATUS(AE_OK); |
485 | } | 461 | } |
diff --git a/drivers/acpi/tables/tbrsdt.c b/drivers/acpi/tables/tbrsdt.c index 494965229fa2..abcb08c2592a 100644 --- a/drivers/acpi/tables/tbrsdt.c +++ b/drivers/acpi/tables/tbrsdt.c | |||
@@ -78,7 +78,7 @@ acpi_status acpi_tb_verify_rsdp(struct acpi_pointer *address) | |||
78 | */ | 78 | */ |
79 | status = acpi_os_map_memory(address->pointer.physical, | 79 | status = acpi_os_map_memory(address->pointer.physical, |
80 | sizeof(struct rsdp_descriptor), | 80 | sizeof(struct rsdp_descriptor), |
81 | (void *)&rsdp); | 81 | ACPI_CAST_PTR(void, &rsdp)); |
82 | if (ACPI_FAILURE(status)) { | 82 | if (ACPI_FAILURE(status)) { |
83 | return_ACPI_STATUS(status); | 83 | return_ACPI_STATUS(status); |
84 | } | 84 | } |
@@ -95,11 +95,16 @@ acpi_status acpi_tb_verify_rsdp(struct acpi_pointer *address) | |||
95 | goto cleanup; | 95 | goto cleanup; |
96 | } | 96 | } |
97 | 97 | ||
98 | /* The RSDP supplied is OK */ | 98 | /* RSDP is ok. Init the table info */ |
99 | 99 | ||
100 | table_info.pointer = ACPI_CAST_PTR(struct acpi_table_header, rsdp); | 100 | table_info.pointer = ACPI_CAST_PTR(struct acpi_table_header, rsdp); |
101 | table_info.length = sizeof(struct rsdp_descriptor); | 101 | table_info.length = sizeof(struct rsdp_descriptor); |
102 | table_info.allocation = ACPI_MEM_MAPPED; | 102 | |
103 | if (address->pointer_type == ACPI_PHYSICAL_POINTER) { | ||
104 | table_info.allocation = ACPI_MEM_MAPPED; | ||
105 | } else { | ||
106 | table_info.allocation = ACPI_MEM_NOT_ALLOCATED; | ||
107 | } | ||
103 | 108 | ||
104 | /* Save the table pointers and allocation info */ | 109 | /* Save the table pointers and allocation info */ |
105 | 110 | ||