diff options
Diffstat (limited to 'drivers/acpi/tables')
-rw-r--r-- | drivers/acpi/tables/tbconvrt.c | 23 | ||||
-rw-r--r-- | drivers/acpi/tables/tbget.c | 39 | ||||
-rw-r--r-- | drivers/acpi/tables/tbgetall.c | 27 | ||||
-rw-r--r-- | drivers/acpi/tables/tbinstal.c | 12 | ||||
-rw-r--r-- | drivers/acpi/tables/tbrsdt.c | 30 | ||||
-rw-r--r-- | drivers/acpi/tables/tbutils.c | 50 | ||||
-rw-r--r-- | drivers/acpi/tables/tbxface.c | 18 | ||||
-rw-r--r-- | drivers/acpi/tables/tbxfroot.c | 35 |
8 files changed, 126 insertions, 108 deletions
diff --git a/drivers/acpi/tables/tbconvrt.c b/drivers/acpi/tables/tbconvrt.c index a03939399fa9..03b37d2223bc 100644 --- a/drivers/acpi/tables/tbconvrt.c +++ b/drivers/acpi/tables/tbconvrt.c | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -501,8 +501,8 @@ acpi_status acpi_tb_convert_table_fadt(void) | |||
501 | * at least as long as the version 1.0 FADT | 501 | * at least as long as the version 1.0 FADT |
502 | */ | 502 | */ |
503 | if (acpi_gbl_FADT->length < sizeof(struct fadt_descriptor_rev1)) { | 503 | if (acpi_gbl_FADT->length < sizeof(struct fadt_descriptor_rev1)) { |
504 | ACPI_REPORT_ERROR(("FADT is invalid, too short: 0x%X\n", | 504 | ACPI_ERROR((AE_INFO, "FADT is invalid, too short: 0x%X", |
505 | acpi_gbl_FADT->length)); | 505 | acpi_gbl_FADT->length)); |
506 | return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH); | 506 | return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH); |
507 | } | 507 | } |
508 | 508 | ||
@@ -517,7 +517,10 @@ acpi_status acpi_tb_convert_table_fadt(void) | |||
517 | if (acpi_gbl_FADT->length < sizeof(struct fadt_descriptor_rev2)) { | 517 | if (acpi_gbl_FADT->length < sizeof(struct fadt_descriptor_rev2)) { |
518 | /* Length is too short to be a V2.0 table */ | 518 | /* Length is too short to be a V2.0 table */ |
519 | 519 | ||
520 | ACPI_REPORT_WARNING(("Inconsistent FADT length (0x%X) and revision (0x%X), using FADT V1.0 portion of table\n", acpi_gbl_FADT->length, acpi_gbl_FADT->revision)); | 520 | ACPI_WARNING((AE_INFO, |
521 | "Inconsistent FADT length (0x%X) and revision (0x%X), using FADT V1.0 portion of table", | ||
522 | acpi_gbl_FADT->length, | ||
523 | acpi_gbl_FADT->revision)); | ||
521 | 524 | ||
522 | acpi_tb_convert_fadt1(local_fadt, | 525 | acpi_tb_convert_fadt1(local_fadt, |
523 | (void *)acpi_gbl_FADT); | 526 | (void *)acpi_gbl_FADT); |
@@ -554,7 +557,9 @@ acpi_status acpi_tb_convert_table_fadt(void) | |||
554 | ACPI_DEBUG_PRINT((ACPI_DB_TABLES, | 557 | ACPI_DEBUG_PRINT((ACPI_DB_TABLES, |
555 | "Hex dump of common internal FADT, size %d (%X)\n", | 558 | "Hex dump of common internal FADT, size %d (%X)\n", |
556 | acpi_gbl_FADT->length, acpi_gbl_FADT->length)); | 559 | acpi_gbl_FADT->length, acpi_gbl_FADT->length)); |
557 | ACPI_DUMP_BUFFER((u8 *) (acpi_gbl_FADT), acpi_gbl_FADT->length); | 560 | |
561 | ACPI_DUMP_BUFFER(ACPI_CAST_PTR(u8, acpi_gbl_FADT), | ||
562 | acpi_gbl_FADT->length); | ||
558 | 563 | ||
559 | return_ACPI_STATUS(AE_OK); | 564 | return_ACPI_STATUS(AE_OK); |
560 | } | 565 | } |
@@ -580,13 +585,15 @@ acpi_status acpi_tb_build_common_facs(struct acpi_table_desc *table_info) | |||
580 | /* Absolute minimum length is 24, but the ACPI spec says 64 */ | 585 | /* Absolute minimum length is 24, but the ACPI spec says 64 */ |
581 | 586 | ||
582 | if (acpi_gbl_FACS->length < 24) { | 587 | if (acpi_gbl_FACS->length < 24) { |
583 | ACPI_REPORT_ERROR(("Invalid FACS table length: 0x%X\n", | 588 | ACPI_ERROR((AE_INFO, "Invalid FACS table length: 0x%X", |
584 | acpi_gbl_FACS->length)); | 589 | acpi_gbl_FACS->length)); |
585 | return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH); | 590 | return_ACPI_STATUS(AE_INVALID_TABLE_LENGTH); |
586 | } | 591 | } |
587 | 592 | ||
588 | if (acpi_gbl_FACS->length < 64) { | 593 | if (acpi_gbl_FACS->length < 64) { |
589 | ACPI_REPORT_WARNING(("FACS is shorter than the ACPI specification allows: 0x%X, using anyway\n", acpi_gbl_FACS->length)); | 594 | ACPI_WARNING((AE_INFO, |
595 | "FACS is shorter than the ACPI specification allows: 0x%X, using anyway", | ||
596 | acpi_gbl_FACS->length)); | ||
590 | } | 597 | } |
591 | 598 | ||
592 | /* Copy fields to the new FACS */ | 599 | /* Copy fields to the new FACS */ |
diff --git a/drivers/acpi/tables/tbget.c b/drivers/acpi/tables/tbget.c index 6acd5aeb093e..09b4ee6dfd60 100644 --- a/drivers/acpi/tables/tbget.c +++ b/drivers/acpi/tables/tbget.c | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -91,9 +91,9 @@ acpi_tb_get_table(struct acpi_pointer *address, | |||
91 | 91 | ||
92 | status = acpi_tb_get_table_body(address, &header, table_info); | 92 | status = acpi_tb_get_table_body(address, &header, table_info); |
93 | if (ACPI_FAILURE(status)) { | 93 | if (ACPI_FAILURE(status)) { |
94 | ACPI_REPORT_ERROR(("Could not get ACPI table (size %X), %s\n", | 94 | ACPI_EXCEPTION((AE_INFO, status, |
95 | header.length, | 95 | "Could not get ACPI table (size %X)", |
96 | acpi_format_exception(status))); | 96 | header.length)); |
97 | return_ACPI_STATUS(status); | 97 | return_ACPI_STATUS(status); |
98 | } | 98 | } |
99 | 99 | ||
@@ -148,7 +148,6 @@ acpi_tb_get_table_header(struct acpi_pointer *address, | |||
148 | sizeof(struct acpi_table_header), | 148 | sizeof(struct acpi_table_header), |
149 | (void *)&header); | 149 | (void *)&header); |
150 | if (ACPI_FAILURE(status)) { | 150 | if (ACPI_FAILURE(status)) { |
151 | ACPI_REPORT_ERROR(("Could not map memory at %8.8X%8.8X for length %X\n", ACPI_FORMAT_UINT64(address->pointer.physical), sizeof(struct acpi_table_header))); | ||
152 | return_ACPI_STATUS(status); | 151 | return_ACPI_STATUS(status); |
153 | } | 152 | } |
154 | 153 | ||
@@ -161,8 +160,8 @@ acpi_tb_get_table_header(struct acpi_pointer *address, | |||
161 | 160 | ||
162 | default: | 161 | default: |
163 | 162 | ||
164 | ACPI_REPORT_ERROR(("Invalid address flags %X\n", | 163 | ACPI_ERROR((AE_INFO, "Invalid address flags %X", |
165 | address->pointer_type)); | 164 | address->pointer_type)); |
166 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 165 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
167 | } | 166 | } |
168 | 167 | ||
@@ -253,8 +252,8 @@ acpi_tb_table_override(struct acpi_table_header *header, | |||
253 | if (ACPI_FAILURE(status)) { | 252 | if (ACPI_FAILURE(status)) { |
254 | /* Some severe error from the OSL, but we basically ignore it */ | 253 | /* Some severe error from the OSL, but we basically ignore it */ |
255 | 254 | ||
256 | ACPI_REPORT_ERROR(("Could not override ACPI table, %s\n", | 255 | ACPI_EXCEPTION((AE_INFO, status, |
257 | acpi_format_exception(status))); | 256 | "Could not override ACPI table")); |
258 | return_ACPI_STATUS(status); | 257 | return_ACPI_STATUS(status); |
259 | } | 258 | } |
260 | 259 | ||
@@ -273,15 +272,14 @@ acpi_tb_table_override(struct acpi_table_header *header, | |||
273 | 272 | ||
274 | status = acpi_tb_get_this_table(&address, new_table, table_info); | 273 | status = acpi_tb_get_this_table(&address, new_table, table_info); |
275 | if (ACPI_FAILURE(status)) { | 274 | if (ACPI_FAILURE(status)) { |
276 | ACPI_REPORT_ERROR(("Could not copy override ACPI table, %s\n", | 275 | ACPI_EXCEPTION((AE_INFO, status, "Could not copy ACPI table")); |
277 | acpi_format_exception(status))); | ||
278 | return_ACPI_STATUS(status); | 276 | return_ACPI_STATUS(status); |
279 | } | 277 | } |
280 | 278 | ||
281 | /* Copy the table info */ | 279 | /* Copy the table info */ |
282 | 280 | ||
283 | ACPI_REPORT_INFO(("Table [%4.4s] replaced by host OS\n", | 281 | ACPI_INFO((AE_INFO, "Table [%4.4s] replaced by host OS", |
284 | table_info->pointer->signature)); | 282 | table_info->pointer->signature)); |
285 | 283 | ||
286 | return_ACPI_STATUS(AE_OK); | 284 | return_ACPI_STATUS(AE_OK); |
287 | } | 285 | } |
@@ -327,7 +325,9 @@ acpi_tb_get_this_table(struct acpi_pointer *address, | |||
327 | 325 | ||
328 | full_table = ACPI_MEM_ALLOCATE(header->length); | 326 | full_table = ACPI_MEM_ALLOCATE(header->length); |
329 | if (!full_table) { | 327 | if (!full_table) { |
330 | ACPI_REPORT_ERROR(("Could not allocate table memory for [%4.4s] length %X\n", header->signature, header->length)); | 328 | ACPI_ERROR((AE_INFO, |
329 | "Could not allocate table memory for [%4.4s] length %X", | ||
330 | header->signature, header->length)); | ||
331 | return_ACPI_STATUS(AE_NO_MEMORY); | 331 | return_ACPI_STATUS(AE_NO_MEMORY); |
332 | } | 332 | } |
333 | 333 | ||
@@ -351,7 +351,12 @@ acpi_tb_get_this_table(struct acpi_pointer *address, | |||
351 | (acpi_size) header->length, | 351 | (acpi_size) header->length, |
352 | (void *)&full_table); | 352 | (void *)&full_table); |
353 | if (ACPI_FAILURE(status)) { | 353 | if (ACPI_FAILURE(status)) { |
354 | ACPI_REPORT_ERROR(("Could not map memory for table [%4.4s] at %8.8X%8.8X for length %X\n", header->signature, ACPI_FORMAT_UINT64(address->pointer.physical), header->length)); | 354 | ACPI_ERROR((AE_INFO, |
355 | "Could not map memory for table [%4.4s] at %8.8X%8.8X for length %X", | ||
356 | header->signature, | ||
357 | ACPI_FORMAT_UINT64(address->pointer. | ||
358 | physical), | ||
359 | header->length)); | ||
355 | return (status); | 360 | return (status); |
356 | } | 361 | } |
357 | 362 | ||
@@ -362,8 +367,8 @@ acpi_tb_get_this_table(struct acpi_pointer *address, | |||
362 | 367 | ||
363 | default: | 368 | default: |
364 | 369 | ||
365 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid address flags %X\n", | 370 | ACPI_ERROR((AE_INFO, "Invalid address flags %X", |
366 | address->pointer_type)); | 371 | address->pointer_type)); |
367 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 372 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
368 | } | 373 | } |
369 | 374 | ||
diff --git a/drivers/acpi/tables/tbgetall.c b/drivers/acpi/tables/tbgetall.c index 8d72343537e7..134e5dce0bc1 100644 --- a/drivers/acpi/tables/tbgetall.c +++ b/drivers/acpi/tables/tbgetall.c | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -152,7 +152,9 @@ acpi_tb_get_secondary_table(struct acpi_pointer *address, | |||
152 | /* Signature must match request */ | 152 | /* Signature must match request */ |
153 | 153 | ||
154 | if (ACPI_STRNCMP(header.signature, signature, ACPI_NAME_SIZE)) { | 154 | if (ACPI_STRNCMP(header.signature, signature, ACPI_NAME_SIZE)) { |
155 | ACPI_REPORT_ERROR(("Incorrect table signature - wanted [%s] found [%4.4s]\n", signature, header.signature)); | 155 | ACPI_ERROR((AE_INFO, |
156 | "Incorrect table signature - wanted [%s] found [%4.4s]", | ||
157 | signature, header.signature)); | ||
156 | return_ACPI_STATUS(AE_BAD_SIGNATURE); | 158 | return_ACPI_STATUS(AE_BAD_SIGNATURE); |
157 | } | 159 | } |
158 | 160 | ||
@@ -231,14 +233,18 @@ acpi_status acpi_tb_get_required_tables(void) | |||
231 | */ | 233 | */ |
232 | status = acpi_tb_get_primary_table(&address, &table_info); | 234 | status = acpi_tb_get_primary_table(&address, &table_info); |
233 | if ((status != AE_OK) && (status != AE_TABLE_NOT_SUPPORTED)) { | 235 | if ((status != AE_OK) && (status != AE_TABLE_NOT_SUPPORTED)) { |
234 | ACPI_REPORT_WARNING(("%s, while getting table at %8.8X%8.8X\n", acpi_format_exception(status), ACPI_FORMAT_UINT64(address.pointer.value))); | 236 | ACPI_WARNING((AE_INFO, |
237 | "%s, while getting table at %8.8X%8.8X", | ||
238 | acpi_format_exception(status), | ||
239 | ACPI_FORMAT_UINT64(address.pointer. | ||
240 | value))); | ||
235 | } | 241 | } |
236 | } | 242 | } |
237 | 243 | ||
238 | /* We must have a FADT to continue */ | 244 | /* We must have a FADT to continue */ |
239 | 245 | ||
240 | if (!acpi_gbl_FADT) { | 246 | if (!acpi_gbl_FADT) { |
241 | ACPI_REPORT_ERROR(("No FADT present in RSDT/XSDT\n")); | 247 | ACPI_ERROR((AE_INFO, "No FADT present in RSDT/XSDT")); |
242 | return_ACPI_STATUS(AE_NO_ACPI_TABLES); | 248 | return_ACPI_STATUS(AE_NO_ACPI_TABLES); |
243 | } | 249 | } |
244 | 250 | ||
@@ -248,7 +254,8 @@ acpi_status acpi_tb_get_required_tables(void) | |||
248 | */ | 254 | */ |
249 | status = acpi_tb_convert_table_fadt(); | 255 | status = acpi_tb_convert_table_fadt(); |
250 | if (ACPI_FAILURE(status)) { | 256 | if (ACPI_FAILURE(status)) { |
251 | ACPI_REPORT_ERROR(("Could not convert FADT to internal common format\n")); | 257 | ACPI_ERROR((AE_INFO, |
258 | "Could not convert FADT to internal common format")); | ||
252 | return_ACPI_STATUS(status); | 259 | return_ACPI_STATUS(status); |
253 | } | 260 | } |
254 | 261 | ||
@@ -258,8 +265,8 @@ acpi_status acpi_tb_get_required_tables(void) | |||
258 | 265 | ||
259 | status = acpi_tb_get_secondary_table(&address, FACS_SIG, &table_info); | 266 | status = acpi_tb_get_secondary_table(&address, FACS_SIG, &table_info); |
260 | if (ACPI_FAILURE(status)) { | 267 | if (ACPI_FAILURE(status)) { |
261 | ACPI_REPORT_ERROR(("Could not get/install the FACS, %s\n", | 268 | ACPI_EXCEPTION((AE_INFO, status, |
262 | acpi_format_exception(status))); | 269 | "Could not get/install the FACS")); |
263 | return_ACPI_STATUS(status); | 270 | return_ACPI_STATUS(status); |
264 | } | 271 | } |
265 | 272 | ||
@@ -278,7 +285,7 @@ acpi_status acpi_tb_get_required_tables(void) | |||
278 | 285 | ||
279 | status = acpi_tb_get_secondary_table(&address, DSDT_SIG, &table_info); | 286 | status = acpi_tb_get_secondary_table(&address, DSDT_SIG, &table_info); |
280 | if (ACPI_FAILURE(status)) { | 287 | if (ACPI_FAILURE(status)) { |
281 | ACPI_REPORT_ERROR(("Could not get/install the DSDT\n")); | 288 | ACPI_ERROR((AE_INFO, "Could not get/install the DSDT")); |
282 | return_ACPI_STATUS(status); | 289 | return_ACPI_STATUS(status); |
283 | } | 290 | } |
284 | 291 | ||
@@ -292,7 +299,9 @@ acpi_status acpi_tb_get_required_tables(void) | |||
292 | "Hex dump of entire DSDT, size %d (0x%X), Integer width = %d\n", | 299 | "Hex dump of entire DSDT, size %d (0x%X), Integer width = %d\n", |
293 | acpi_gbl_DSDT->length, acpi_gbl_DSDT->length, | 300 | acpi_gbl_DSDT->length, acpi_gbl_DSDT->length, |
294 | acpi_gbl_integer_bit_width)); | 301 | acpi_gbl_integer_bit_width)); |
295 | ACPI_DUMP_BUFFER((u8 *) acpi_gbl_DSDT, acpi_gbl_DSDT->length); | 302 | |
303 | ACPI_DUMP_BUFFER(ACPI_CAST_PTR(u8, acpi_gbl_DSDT), | ||
304 | acpi_gbl_DSDT->length); | ||
296 | 305 | ||
297 | /* Always delete the RSDP mapping, we are done with it */ | 306 | /* Always delete the RSDP mapping, we are done with it */ |
298 | 307 | ||
diff --git a/drivers/acpi/tables/tbinstal.c b/drivers/acpi/tables/tbinstal.c index 10db8484e462..7ffd0fddb4e5 100644 --- a/drivers/acpi/tables/tbinstal.c +++ b/drivers/acpi/tables/tbinstal.c | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -128,8 +128,8 @@ acpi_status acpi_tb_install_table(struct acpi_table_desc *table_info) | |||
128 | 128 | ||
129 | status = acpi_ut_acquire_mutex(ACPI_MTX_TABLES); | 129 | status = acpi_ut_acquire_mutex(ACPI_MTX_TABLES); |
130 | if (ACPI_FAILURE(status)) { | 130 | if (ACPI_FAILURE(status)) { |
131 | ACPI_REPORT_ERROR(("Could not acquire table mutex, %s\n", | 131 | ACPI_EXCEPTION((AE_INFO, status, |
132 | acpi_format_exception(status))); | 132 | "Could not acquire table mutex")); |
133 | return_ACPI_STATUS(status); | 133 | return_ACPI_STATUS(status); |
134 | } | 134 | } |
135 | 135 | ||
@@ -146,9 +146,9 @@ acpi_status acpi_tb_install_table(struct acpi_table_desc *table_info) | |||
146 | 146 | ||
147 | status = acpi_tb_init_table_descriptor(table_info->type, table_info); | 147 | status = acpi_tb_init_table_descriptor(table_info->type, table_info); |
148 | if (ACPI_FAILURE(status)) { | 148 | if (ACPI_FAILURE(status)) { |
149 | ACPI_REPORT_ERROR(("Could not install table [%4.4s], %s\n", | 149 | ACPI_EXCEPTION((AE_INFO, status, |
150 | table_info->pointer->signature, | 150 | "Could not install table [%4.4s]", |
151 | acpi_format_exception(status))); | 151 | table_info->pointer->signature)); |
152 | } | 152 | } |
153 | 153 | ||
154 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "%s located at %p\n", | 154 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "%s located at %p\n", |
diff --git a/drivers/acpi/tables/tbrsdt.c b/drivers/acpi/tables/tbrsdt.c index ad0252c2f7db..4d308220225d 100644 --- a/drivers/acpi/tables/tbrsdt.c +++ b/drivers/acpi/tables/tbrsdt.c | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -176,7 +176,7 @@ acpi_status acpi_tb_validate_rsdt(struct acpi_table_header *table_ptr) | |||
176 | { | 176 | { |
177 | int no_match; | 177 | int no_match; |
178 | 178 | ||
179 | ACPI_FUNCTION_NAME("tb_validate_rsdt"); | 179 | ACPI_FUNCTION_ENTRY(); |
180 | 180 | ||
181 | /* | 181 | /* |
182 | * Search for appropriate signature, RSDT or XSDT | 182 | * Search for appropriate signature, RSDT or XSDT |
@@ -192,24 +192,24 @@ acpi_status acpi_tb_validate_rsdt(struct acpi_table_header *table_ptr) | |||
192 | if (no_match) { | 192 | if (no_match) { |
193 | /* Invalid RSDT or XSDT signature */ | 193 | /* Invalid RSDT or XSDT signature */ |
194 | 194 | ||
195 | ACPI_REPORT_ERROR(("Invalid signature where RSDP indicates RSDT/XSDT should be located\n")); | 195 | ACPI_ERROR((AE_INFO, |
196 | "Invalid signature where RSDP indicates RSDT/XSDT should be located. RSDP:")); | ||
196 | 197 | ||
197 | ACPI_DUMP_BUFFER(acpi_gbl_RSDP, 20); | 198 | ACPI_DUMP_BUFFER(acpi_gbl_RSDP, 20); |
198 | 199 | ||
199 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_ERROR, | 200 | ACPI_ERROR((AE_INFO, |
200 | "RSDT/XSDT signature at %X (%p) is invalid\n", | 201 | "RSDT/XSDT signature at %X (%p) is invalid", |
201 | acpi_gbl_RSDP->rsdt_physical_address, | 202 | acpi_gbl_RSDP->rsdt_physical_address, |
202 | (void *)(acpi_native_uint) acpi_gbl_RSDP-> | 203 | (void *)(acpi_native_uint) acpi_gbl_RSDP-> |
203 | rsdt_physical_address)); | 204 | rsdt_physical_address)); |
204 | 205 | ||
205 | if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) { | 206 | if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) { |
206 | ACPI_REPORT_ERROR(("Looking for RSDT\n")) | 207 | ACPI_ERROR((AE_INFO, "Looking for RSDT")); |
207 | } else { | 208 | } else { |
208 | ACPI_REPORT_ERROR(("Looking for XSDT\n")) | 209 | ACPI_ERROR((AE_INFO, "Looking for XSDT")); |
209 | } | 210 | } |
210 | 211 | ||
211 | ACPI_DUMP_BUFFER((char *)table_ptr, 48); | 212 | ACPI_DUMP_BUFFER((char *)table_ptr, 48); |
212 | |||
213 | return (AE_BAD_SIGNATURE); | 213 | return (AE_BAD_SIGNATURE); |
214 | } | 214 | } |
215 | 215 | ||
@@ -243,15 +243,13 @@ acpi_status acpi_tb_get_table_rsdt(void) | |||
243 | table_info.type = ACPI_TABLE_XSDT; | 243 | table_info.type = ACPI_TABLE_XSDT; |
244 | status = acpi_tb_get_table(&address, &table_info); | 244 | status = acpi_tb_get_table(&address, &table_info); |
245 | if (ACPI_FAILURE(status)) { | 245 | if (ACPI_FAILURE(status)) { |
246 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 246 | ACPI_EXCEPTION((AE_INFO, status, |
247 | "Could not get the RSDT/XSDT, %s\n", | 247 | "Could not get the RSDT/XSDT")); |
248 | acpi_format_exception(status))); | ||
249 | |||
250 | return_ACPI_STATUS(status); | 248 | return_ACPI_STATUS(status); |
251 | } | 249 | } |
252 | 250 | ||
253 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 251 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
254 | "RSDP located at %p, points to RSDT physical=%8.8X%8.8X \n", | 252 | "RSDP located at %p, points to RSDT physical=%8.8X%8.8X\n", |
255 | acpi_gbl_RSDP, | 253 | acpi_gbl_RSDP, |
256 | ACPI_FORMAT_UINT64(address.pointer.value))); | 254 | ACPI_FORMAT_UINT64(address.pointer.value))); |
257 | 255 | ||
diff --git a/drivers/acpi/tables/tbutils.c b/drivers/acpi/tables/tbutils.c index 4b2fbb592f49..bc571592f087 100644 --- a/drivers/acpi/tables/tbutils.c +++ b/drivers/acpi/tables/tbutils.c | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -94,9 +94,8 @@ acpi_status acpi_tb_is_table_installed(struct acpi_table_desc *new_table_desc) | |||
94 | new_table_desc->pointer->length) | 94 | new_table_desc->pointer->length) |
95 | && | 95 | && |
96 | (!ACPI_MEMCMP | 96 | (!ACPI_MEMCMP |
97 | ((const char *)table_desc->pointer, | 97 | (table_desc->pointer, new_table_desc->pointer, |
98 | (const char *)new_table_desc->pointer, | 98 | new_table_desc->pointer->length))) { |
99 | (acpi_size) new_table_desc->pointer->length))) { | ||
100 | /* Match: this table is already installed */ | 99 | /* Match: this table is already installed */ |
101 | 100 | ||
102 | ACPI_DEBUG_PRINT((ACPI_DB_TABLES, | 101 | ACPI_DEBUG_PRINT((ACPI_DB_TABLES, |
@@ -145,14 +144,13 @@ acpi_tb_validate_table_header(struct acpi_table_header *table_header) | |||
145 | { | 144 | { |
146 | acpi_name signature; | 145 | acpi_name signature; |
147 | 146 | ||
148 | ACPI_FUNCTION_NAME("tb_validate_table_header"); | 147 | ACPI_FUNCTION_ENTRY(); |
149 | 148 | ||
150 | /* Verify that this is a valid address */ | 149 | /* Verify that this is a valid address */ |
151 | 150 | ||
152 | if (!acpi_os_readable(table_header, sizeof(struct acpi_table_header))) { | 151 | if (!acpi_os_readable(table_header, sizeof(struct acpi_table_header))) { |
153 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 152 | ACPI_ERROR((AE_INFO, |
154 | "Cannot read table header at %p\n", | 153 | "Cannot read table header at %p", table_header)); |
155 | table_header)); | ||
156 | 154 | ||
157 | return (AE_BAD_ADDRESS); | 155 | return (AE_BAD_ADDRESS); |
158 | } | 156 | } |
@@ -161,12 +159,12 @@ acpi_tb_validate_table_header(struct acpi_table_header *table_header) | |||
161 | 159 | ||
162 | ACPI_MOVE_32_TO_32(&signature, table_header->signature); | 160 | ACPI_MOVE_32_TO_32(&signature, table_header->signature); |
163 | if (!acpi_ut_valid_acpi_name(signature)) { | 161 | if (!acpi_ut_valid_acpi_name(signature)) { |
164 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 162 | ACPI_ERROR((AE_INFO, |
165 | "Table signature at %p [%p] has invalid characters\n", | 163 | "Table signature at %p [%p] has invalid characters", |
166 | table_header, &signature)); | 164 | table_header, &signature)); |
167 | 165 | ||
168 | ACPI_REPORT_WARNING(("Invalid table signature found: [%4.4s]\n", | 166 | ACPI_WARNING((AE_INFO, "Invalid table signature found: [%4.4s]", |
169 | (char *)&signature)); | 167 | ACPI_CAST_PTR(char, &signature))); |
170 | 168 | ||
171 | ACPI_DUMP_BUFFER(table_header, | 169 | ACPI_DUMP_BUFFER(table_header, |
172 | sizeof(struct acpi_table_header)); | 170 | sizeof(struct acpi_table_header)); |
@@ -176,11 +174,13 @@ acpi_tb_validate_table_header(struct acpi_table_header *table_header) | |||
176 | /* Validate the table length */ | 174 | /* Validate the table length */ |
177 | 175 | ||
178 | if (table_header->length < sizeof(struct acpi_table_header)) { | 176 | if (table_header->length < sizeof(struct acpi_table_header)) { |
179 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 177 | ACPI_ERROR((AE_INFO, |
180 | "Invalid length in table header %p name %4.4s\n", | 178 | "Invalid length in table header %p name %4.4s", |
181 | table_header, (char *)&signature)); | 179 | table_header, (char *)&signature)); |
182 | 180 | ||
183 | ACPI_REPORT_WARNING(("Invalid table header length (0x%X) found\n", (u32) table_header->length)); | 181 | ACPI_WARNING((AE_INFO, |
182 | "Invalid table header length (0x%X) found", | ||
183 | (u32) table_header->length)); | ||
184 | 184 | ||
185 | ACPI_DUMP_BUFFER(table_header, | 185 | ACPI_DUMP_BUFFER(table_header, |
186 | sizeof(struct acpi_table_header)); | 186 | sizeof(struct acpi_table_header)); |
@@ -219,7 +219,10 @@ acpi_tb_verify_table_checksum(struct acpi_table_header * table_header) | |||
219 | /* Return the appropriate exception */ | 219 | /* Return the appropriate exception */ |
220 | 220 | ||
221 | if (checksum) { | 221 | if (checksum) { |
222 | ACPI_REPORT_WARNING(("Invalid checksum in table [%4.4s] (%02X, sum %02X is not zero)\n", table_header->signature, (u32) table_header->checksum, (u32) checksum)); | 222 | ACPI_WARNING((AE_INFO, |
223 | "Invalid checksum in table [%4.4s] (%02X, sum %02X is not zero)", | ||
224 | table_header->signature, | ||
225 | (u32) table_header->checksum, (u32) checksum)); | ||
223 | 226 | ||
224 | status = AE_BAD_CHECKSUM; | 227 | status = AE_BAD_CHECKSUM; |
225 | } | 228 | } |
@@ -241,16 +244,16 @@ acpi_tb_verify_table_checksum(struct acpi_table_header * table_header) | |||
241 | 244 | ||
242 | u8 acpi_tb_generate_checksum(void *buffer, u32 length) | 245 | u8 acpi_tb_generate_checksum(void *buffer, u32 length) |
243 | { | 246 | { |
244 | const u8 *limit; | 247 | u8 *end_buffer; |
245 | const u8 *rover; | 248 | u8 *rover; |
246 | u8 sum = 0; | 249 | u8 sum = 0; |
247 | 250 | ||
248 | if (buffer && length) { | 251 | if (buffer && length) { |
249 | /* Buffer and Length are valid */ | 252 | /* Buffer and Length are valid */ |
250 | 253 | ||
251 | limit = (u8 *) buffer + length; | 254 | end_buffer = ACPI_ADD_PTR(u8, buffer, length); |
252 | 255 | ||
253 | for (rover = buffer; rover < limit; rover++) { | 256 | for (rover = buffer; rover < end_buffer; rover++) { |
254 | sum = (u8) (sum + *rover); | 257 | sum = (u8) (sum + *rover); |
255 | } | 258 | } |
256 | } | 259 | } |
@@ -292,8 +295,7 @@ acpi_tb_handle_to_object(u16 table_id, | |||
292 | } | 295 | } |
293 | } | 296 | } |
294 | 297 | ||
295 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "table_id=%X does not exist\n", | 298 | ACPI_ERROR((AE_INFO, "table_id=%X does not exist", table_id)); |
296 | table_id)); | ||
297 | return (AE_BAD_PARAMETER); | 299 | return (AE_BAD_PARAMETER); |
298 | } | 300 | } |
299 | #endif | 301 | #endif |
diff --git a/drivers/acpi/tables/tbxface.c b/drivers/acpi/tables/tbxface.c index 3f96a4909aad..9fe53c9d5b9a 100644 --- a/drivers/acpi/tables/tbxface.c +++ b/drivers/acpi/tables/tbxface.c | |||
@@ -6,7 +6,7 @@ | |||
6 | *****************************************************************************/ | 6 | *****************************************************************************/ |
7 | 7 | ||
8 | /* | 8 | /* |
9 | * Copyright (C) 2000 - 2005, R. Byron Moore | 9 | * Copyright (C) 2000 - 2006, R. Byron Moore |
10 | * All rights reserved. | 10 | * All rights reserved. |
11 | * | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | 12 | * Redistribution and use in source and binary forms, with or without |
@@ -75,8 +75,7 @@ acpi_status acpi_load_tables(void) | |||
75 | status = acpi_os_get_root_pointer(ACPI_LOGICAL_ADDRESSING, | 75 | status = acpi_os_get_root_pointer(ACPI_LOGICAL_ADDRESSING, |
76 | &rsdp_address); | 76 | &rsdp_address); |
77 | if (ACPI_FAILURE(status)) { | 77 | if (ACPI_FAILURE(status)) { |
78 | ACPI_REPORT_ERROR(("acpi_load_tables: Could not get RSDP, %s\n", | 78 | ACPI_EXCEPTION((AE_INFO, status, "Could not get the RSDP")); |
79 | acpi_format_exception(status))); | ||
80 | goto error_exit; | 79 | goto error_exit; |
81 | } | 80 | } |
82 | 81 | ||
@@ -86,7 +85,7 @@ acpi_status acpi_load_tables(void) | |||
86 | 85 | ||
87 | status = acpi_tb_verify_rsdp(&rsdp_address); | 86 | status = acpi_tb_verify_rsdp(&rsdp_address); |
88 | if (ACPI_FAILURE(status)) { | 87 | if (ACPI_FAILURE(status)) { |
89 | ACPI_REPORT_ERROR(("acpi_load_tables: RSDP Failed validation: %s\n", acpi_format_exception(status))); | 88 | ACPI_EXCEPTION((AE_INFO, status, "During RSDP validation")); |
90 | goto error_exit; | 89 | goto error_exit; |
91 | } | 90 | } |
92 | 91 | ||
@@ -94,7 +93,7 @@ acpi_status acpi_load_tables(void) | |||
94 | 93 | ||
95 | status = acpi_tb_get_table_rsdt(); | 94 | status = acpi_tb_get_table_rsdt(); |
96 | if (ACPI_FAILURE(status)) { | 95 | if (ACPI_FAILURE(status)) { |
97 | ACPI_REPORT_ERROR(("acpi_load_tables: Could not load RSDT: %s\n", acpi_format_exception(status))); | 96 | ACPI_EXCEPTION((AE_INFO, status, "Could not load RSDT")); |
98 | goto error_exit; | 97 | goto error_exit; |
99 | } | 98 | } |
100 | 99 | ||
@@ -102,7 +101,8 @@ acpi_status acpi_load_tables(void) | |||
102 | 101 | ||
103 | status = acpi_tb_get_required_tables(); | 102 | status = acpi_tb_get_required_tables(); |
104 | if (ACPI_FAILURE(status)) { | 103 | if (ACPI_FAILURE(status)) { |
105 | ACPI_REPORT_ERROR(("acpi_load_tables: Error getting required tables (DSDT/FADT/FACS): %s\n", acpi_format_exception(status))); | 104 | ACPI_EXCEPTION((AE_INFO, status, |
105 | "Could not get all required tables (DSDT/FADT/FACS)")); | ||
106 | goto error_exit; | 106 | goto error_exit; |
107 | } | 107 | } |
108 | 108 | ||
@@ -112,16 +112,14 @@ acpi_status acpi_load_tables(void) | |||
112 | 112 | ||
113 | status = acpi_ns_load_namespace(); | 113 | status = acpi_ns_load_namespace(); |
114 | if (ACPI_FAILURE(status)) { | 114 | if (ACPI_FAILURE(status)) { |
115 | ACPI_REPORT_ERROR(("acpi_load_tables: Could not load namespace: %s\n", acpi_format_exception(status))); | 115 | ACPI_EXCEPTION((AE_INFO, status, "Could not load namespace")); |
116 | goto error_exit; | 116 | goto error_exit; |
117 | } | 117 | } |
118 | 118 | ||
119 | return_ACPI_STATUS(AE_OK); | 119 | return_ACPI_STATUS(AE_OK); |
120 | 120 | ||
121 | error_exit: | 121 | error_exit: |
122 | ACPI_REPORT_ERROR(("acpi_load_tables: Could not load tables: %s\n", | 122 | ACPI_EXCEPTION((AE_INFO, status, "Could not load tables")); |
123 | acpi_format_exception(status))); | ||
124 | |||
125 | return_ACPI_STATUS(status); | 123 | return_ACPI_STATUS(status); |
126 | } | 124 | } |
127 | 125 | ||
diff --git a/drivers/acpi/tables/tbxfroot.c b/drivers/acpi/tables/tbxfroot.c index 3b8a7e063e8a..a62db6af83c9 100644 --- a/drivers/acpi/tables/tbxfroot.c +++ b/drivers/acpi/tables/tbxfroot.c | |||
@@ -5,7 +5,7 @@ | |||
5 | *****************************************************************************/ | 5 | *****************************************************************************/ |
6 | 6 | ||
7 | /* | 7 | /* |
8 | * Copyright (C) 2000 - 2005, R. Byron Moore | 8 | * Copyright (C) 2000 - 2006, R. Byron Moore |
9 | * All rights reserved. | 9 | * All rights reserved. |
10 | * | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without |
@@ -251,7 +251,7 @@ acpi_get_firmware_table(acpi_string signature, | |||
251 | 251 | ||
252 | acpi_tb_get_rsdt_address(&address); | 252 | acpi_tb_get_rsdt_address(&address); |
253 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 253 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
254 | "RSDP located at %p, RSDT physical=%8.8X%8.8X \n", | 254 | "RSDP located at %p, RSDT physical=%8.8X%8.8X\n", |
255 | acpi_gbl_RSDP, | 255 | acpi_gbl_RSDP, |
256 | ACPI_FORMAT_UINT64(address.pointer.value))); | 256 | ACPI_FORMAT_UINT64(address.pointer.value))); |
257 | 257 | ||
@@ -396,9 +396,8 @@ acpi_status acpi_find_root_pointer(u32 flags, struct acpi_pointer *rsdp_address) | |||
396 | 396 | ||
397 | status = acpi_tb_find_rsdp(&table_info, flags); | 397 | status = acpi_tb_find_rsdp(&table_info, flags); |
398 | if (ACPI_FAILURE(status)) { | 398 | if (ACPI_FAILURE(status)) { |
399 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 399 | ACPI_EXCEPTION((AE_INFO, status, |
400 | "RSDP structure not found, %s Flags=%X\n", | 400 | "RSDP structure not found - Flags=%X", flags)); |
401 | acpi_format_exception(status), flags)); | ||
402 | 401 | ||
403 | return_ACPI_STATUS(AE_NO_ACPI_TABLES); | 402 | return_ACPI_STATUS(AE_NO_ACPI_TABLES); |
404 | } | 403 | } |
@@ -503,10 +502,10 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags) | |||
503 | ACPI_EBDA_PTR_LENGTH, | 502 | ACPI_EBDA_PTR_LENGTH, |
504 | (void *)&table_ptr); | 503 | (void *)&table_ptr); |
505 | if (ACPI_FAILURE(status)) { | 504 | if (ACPI_FAILURE(status)) { |
506 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 505 | ACPI_ERROR((AE_INFO, |
507 | "Could not map memory at %8.8X for length %X\n", | 506 | "Could not map memory at %8.8X for length %X", |
508 | ACPI_EBDA_PTR_LOCATION, | 507 | ACPI_EBDA_PTR_LOCATION, |
509 | ACPI_EBDA_PTR_LENGTH)); | 508 | ACPI_EBDA_PTR_LENGTH)); |
510 | 509 | ||
511 | return_ACPI_STATUS(status); | 510 | return_ACPI_STATUS(status); |
512 | } | 511 | } |
@@ -530,10 +529,10 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags) | |||
530 | ACPI_EBDA_WINDOW_SIZE, | 529 | ACPI_EBDA_WINDOW_SIZE, |
531 | (void *)&table_ptr); | 530 | (void *)&table_ptr); |
532 | if (ACPI_FAILURE(status)) { | 531 | if (ACPI_FAILURE(status)) { |
533 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 532 | ACPI_ERROR((AE_INFO, |
534 | "Could not map memory at %8.8X for length %X\n", | 533 | "Could not map memory at %8.8X for length %X", |
535 | physical_address, | 534 | physical_address, |
536 | ACPI_EBDA_WINDOW_SIZE)); | 535 | ACPI_EBDA_WINDOW_SIZE)); |
537 | 536 | ||
538 | return_ACPI_STATUS(status); | 537 | return_ACPI_STATUS(status); |
539 | } | 538 | } |
@@ -563,10 +562,10 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags) | |||
563 | (void *)&table_ptr); | 562 | (void *)&table_ptr); |
564 | 563 | ||
565 | if (ACPI_FAILURE(status)) { | 564 | if (ACPI_FAILURE(status)) { |
566 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 565 | ACPI_ERROR((AE_INFO, |
567 | "Could not map memory at %8.8X for length %X\n", | 566 | "Could not map memory at %8.8X for length %X", |
568 | ACPI_HI_RSDP_WINDOW_BASE, | 567 | ACPI_HI_RSDP_WINDOW_BASE, |
569 | ACPI_HI_RSDP_WINDOW_SIZE)); | 568 | ACPI_HI_RSDP_WINDOW_SIZE)); |
570 | 569 | ||
571 | return_ACPI_STATUS(status); | 570 | return_ACPI_STATUS(status); |
572 | } | 571 | } |
@@ -635,7 +634,7 @@ acpi_tb_find_rsdp(struct acpi_table_desc *table_info, u32 flags) | |||
635 | 634 | ||
636 | /* A valid RSDP was not found */ | 635 | /* A valid RSDP was not found */ |
637 | 636 | ||
638 | ACPI_REPORT_ERROR(("No valid RSDP was found\n")); | 637 | ACPI_ERROR((AE_INFO, "No valid RSDP was found")); |
639 | return_ACPI_STATUS(AE_NOT_FOUND); | 638 | return_ACPI_STATUS(AE_NOT_FOUND); |
640 | } | 639 | } |
641 | 640 | ||