aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/tables/tbconvrt.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2006-03-31 00:00:00 -0500
committerLen Brown <len.brown@intel.com>2006-06-14 02:04:16 -0400
commit793c2388cae3fd023b3b5166354931752d42353c (patch)
tree6859cde48677cf1e9b9766cd1d95081a863c060c /drivers/acpi/tables/tbconvrt.c
parent61686124f47d7c4b78610346c5f8f9d8a6d46bb5 (diff)
ACPI: ACPICA 20060331
Implemented header file support for the following additional ACPI tables: ASF!, BOOT, CPEP, DBGP, MCFG, SPCR, SPMI, TCPA, and WDRT. With this support, all current and known ACPI tables are now defined in the ACPICA headers and are available for use by device drivers and other software. Implemented support to allow tables that contain ACPI names with invalid characters to be loaded. Previously, this would cause the table load to fail, but since there are several known cases of such tables on existing machines, this change was made to enable ACPI support for them. Also, this matches the behavior of the Microsoft ACPI implementation. https://bugzilla.novell.com/show_bug.cgi?id=147621 Fixed a couple regressions introduced during the memory optimization in the 20060317 release. The namespace node definition required additional reorganization and an internal datatype that had been changed to 8-bit was restored to 32-bit. (Valery Podrezov) Fixed a problem where a null pointer passed to acpi_ut_delete_generic_state() could be passed through to acpi_os_release_object which is unexpected. Such null pointers are now trapped and ignored, matching the behavior of the previous implementation before the deployment of acpi_os_release_object(). (Valery Podrezov, Fiodor Suietov) Fixed a memory mapping leak during the deletion of a SystemMemory operation region where a cached memory mapping was not deleted. This became a noticeable problem for operation regions that are defined within frequently used control methods. (Dana Meyers) Reorganized the ACPI table header files into two main files: one for the ACPI tables consumed by the ACPICA core, and another for the miscellaneous ACPI tables that are consumed by the drivers and other software. The various FADT definitions were merged into one common section and three different tables (ACPI 1.0, 1.0+, and 2.0) Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/tables/tbconvrt.c')
-rw-r--r--drivers/acpi/tables/tbconvrt.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/acpi/tables/tbconvrt.c b/drivers/acpi/tables/tbconvrt.c
index 5155b27cf032..a913a927d321 100644
--- a/drivers/acpi/tables/tbconvrt.c
+++ b/drivers/acpi/tables/tbconvrt.c
@@ -54,12 +54,12 @@ acpi_tb_init_generic_address(struct acpi_generic_address *new_gas_struct,
54 acpi_physical_address address); 54 acpi_physical_address address);
55 55
56static void 56static void
57acpi_tb_convert_fadt1(struct fadt_descriptor_rev2 *local_fadt, 57acpi_tb_convert_fadt1(struct fadt_descriptor *local_fadt,
58 struct fadt_descriptor_rev1 *original_fadt); 58 struct fadt_descriptor_rev1 *original_fadt);
59 59
60static void 60static void
61acpi_tb_convert_fadt2(struct fadt_descriptor_rev2 *local_fadt, 61acpi_tb_convert_fadt2(struct fadt_descriptor *local_fadt,
62 struct fadt_descriptor_rev2 *original_fadt); 62 struct fadt_descriptor *original_fadt);
63 63
64u8 acpi_fadt_is_v1; 64u8 acpi_fadt_is_v1;
65ACPI_EXPORT_SYMBOL(acpi_fadt_is_v1) 65ACPI_EXPORT_SYMBOL(acpi_fadt_is_v1)
@@ -120,7 +120,7 @@ acpi_status acpi_tb_convert_to_xsdt(struct acpi_table_desc *table_info)
120{ 120{
121 acpi_size table_size; 121 acpi_size table_size;
122 u32 i; 122 u32 i;
123 XSDT_DESCRIPTOR *new_table; 123 struct xsdt_descriptor *new_table;
124 124
125 ACPI_FUNCTION_ENTRY(); 125 ACPI_FUNCTION_ENTRY();
126 126
@@ -151,12 +151,12 @@ acpi_status acpi_tb_convert_to_xsdt(struct acpi_table_desc *table_info)
151 if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) { 151 if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) {
152 ACPI_STORE_ADDRESS(new_table->table_offset_entry[i], 152 ACPI_STORE_ADDRESS(new_table->table_offset_entry[i],
153 (ACPI_CAST_PTR 153 (ACPI_CAST_PTR
154 (struct rsdt_descriptor_rev1, 154 (struct rsdt_descriptor,
155 table_info->pointer))-> 155 table_info->pointer))->
156 table_offset_entry[i]); 156 table_offset_entry[i]);
157 } else { 157 } else {
158 new_table->table_offset_entry[i] = 158 new_table->table_offset_entry[i] =
159 (ACPI_CAST_PTR(XSDT_DESCRIPTOR, 159 (ACPI_CAST_PTR(struct xsdt_descriptor,
160 table_info->pointer))-> 160 table_info->pointer))->
161 table_offset_entry[i]; 161 table_offset_entry[i];
162 } 162 }
@@ -218,7 +218,7 @@ acpi_tb_init_generic_address(struct acpi_generic_address *new_gas_struct,
218 ******************************************************************************/ 218 ******************************************************************************/
219 219
220static void 220static void
221acpi_tb_convert_fadt1(struct fadt_descriptor_rev2 *local_fadt, 221acpi_tb_convert_fadt1(struct fadt_descriptor *local_fadt,
222 struct fadt_descriptor_rev1 *original_fadt) 222 struct fadt_descriptor_rev1 *original_fadt)
223{ 223{
224 224
@@ -364,14 +364,13 @@ acpi_tb_convert_fadt1(struct fadt_descriptor_rev2 *local_fadt,
364 ******************************************************************************/ 364 ******************************************************************************/
365 365
366static void 366static void
367acpi_tb_convert_fadt2(struct fadt_descriptor_rev2 *local_fadt, 367acpi_tb_convert_fadt2(struct fadt_descriptor *local_fadt,
368 struct fadt_descriptor_rev2 *original_fadt) 368 struct fadt_descriptor *original_fadt)
369{ 369{
370 370
371 /* We have an ACPI 2.0 FADT but we must copy it to our local buffer */ 371 /* We have an ACPI 2.0 FADT but we must copy it to our local buffer */
372 372
373 ACPI_MEMCPY(local_fadt, original_fadt, 373 ACPI_MEMCPY(local_fadt, original_fadt, sizeof(struct fadt_descriptor));
374 sizeof(struct fadt_descriptor_rev2));
375 374
376 /* 375 /*
377 * "X" fields are optional extensions to the original V1.0 fields, so 376 * "X" fields are optional extensions to the original V1.0 fields, so
@@ -490,7 +489,7 @@ acpi_tb_convert_fadt2(struct fadt_descriptor_rev2 *local_fadt,
490 489
491acpi_status acpi_tb_convert_table_fadt(void) 490acpi_status acpi_tb_convert_table_fadt(void)
492{ 491{
493 struct fadt_descriptor_rev2 *local_fadt; 492 struct fadt_descriptor *local_fadt;
494 struct acpi_table_desc *table_desc; 493 struct acpi_table_desc *table_desc;
495 494
496 ACPI_FUNCTION_TRACE("tb_convert_table_fadt"); 495 ACPI_FUNCTION_TRACE("tb_convert_table_fadt");
@@ -507,13 +506,13 @@ acpi_status acpi_tb_convert_table_fadt(void)
507 506
508 /* Allocate buffer for the ACPI 2.0(+) FADT */ 507 /* Allocate buffer for the ACPI 2.0(+) FADT */
509 508
510 local_fadt = ACPI_ALLOCATE_ZEROED(sizeof(struct fadt_descriptor_rev2)); 509 local_fadt = ACPI_ALLOCATE_ZEROED(sizeof(struct fadt_descriptor));
511 if (!local_fadt) { 510 if (!local_fadt) {
512 return_ACPI_STATUS(AE_NO_MEMORY); 511 return_ACPI_STATUS(AE_NO_MEMORY);
513 } 512 }
514 513
515 if (acpi_gbl_FADT->revision >= FADT2_REVISION_ID) { 514 if (acpi_gbl_FADT->revision >= FADT2_REVISION_ID) {
516 if (acpi_gbl_FADT->length < sizeof(struct fadt_descriptor_rev2)) { 515 if (acpi_gbl_FADT->length < sizeof(struct fadt_descriptor)) {
517 516
518 /* Length is too short to be a V2.0 table */ 517 /* Length is too short to be a V2.0 table */
519 518
@@ -538,7 +537,7 @@ acpi_status acpi_tb_convert_table_fadt(void)
538 /* Global FADT pointer will point to the new common V2.0 FADT */ 537 /* Global FADT pointer will point to the new common V2.0 FADT */
539 538
540 acpi_gbl_FADT = local_fadt; 539 acpi_gbl_FADT = local_fadt;
541 acpi_gbl_FADT->length = sizeof(FADT_DESCRIPTOR); 540 acpi_gbl_FADT->length = sizeof(struct fadt_descriptor);
542 541
543 /* Free the original table */ 542 /* Free the original table */
544 543
@@ -550,7 +549,7 @@ acpi_status acpi_tb_convert_table_fadt(void)
550 table_desc->pointer = 549 table_desc->pointer =
551 ACPI_CAST_PTR(struct acpi_table_header, acpi_gbl_FADT); 550 ACPI_CAST_PTR(struct acpi_table_header, acpi_gbl_FADT);
552 table_desc->allocation = ACPI_MEM_ALLOCATED; 551 table_desc->allocation = ACPI_MEM_ALLOCATED;
553 table_desc->length = sizeof(struct fadt_descriptor_rev2); 552 table_desc->length = sizeof(struct fadt_descriptor);
554 553
555 /* Dump the entire FADT */ 554 /* Dump the entire FADT */
556 555