aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/tables/tbutils.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2006-01-27 16:43:00 -0500
committerLen Brown <len.brown@intel.com>2006-01-31 03:25:09 -0500
commitb8e4d89357fc434618a59c1047cac72641191805 (patch)
treeac97fcc6fdc277c682365900663872c96f2420bd /drivers/acpi/tables/tbutils.c
parent292dd876ee765c478b27c93cc51e93a558ed58bf (diff)
[ACPI] ACPICA 20060127
Implemented support in the Resource Manager to allow unresolved namestring references within resource package objects for the _PRT method. This support is in addition to the previously implemented unresolved reference support within the AML parser. If the interpreter slack mode is enabled (true on Linux unless acpi=strict), these unresolved references will be passed through to the caller as a NULL package entry. http://bugzilla.kernel.org/show_bug.cgi?id=5741 Implemented and deployed new macros and functions for error and warning messages across the subsystem. These macros are simpler and generate less code than their predecessors. The new macros ACPI_ERROR, ACPI_EXCEPTION, ACPI_WARNING, and ACPI_INFO replace the ACPI_REPORT_* macros. Implemented the acpi_cpu_flags type to simplify host OS integration of the Acquire/Release Lock OSL interfaces. Suggested by Steven Rostedt and Andrew Morton. Fixed a problem where Alias ASL operators are sometimes not correctly resolved. causing AE_AML_INTERNAL http://bugzilla.kernel.org/show_bug.cgi?id=5189 http://bugzilla.kernel.org/show_bug.cgi?id=5674 Fixed several problems with the implementation of the ConcatenateResTemplate ASL operator. As per the ACPI specification, zero length buffers are now treated as a single EndTag. One-length buffers always cause a fatal exception. Non-zero length buffers that do not end with a full 2-byte EndTag cause a fatal exception. Fixed a possible structure overwrite in the AcpiGetObjectInfo external interface. (With assistance from Thomas Renninger) Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/tables/tbutils.c')
-rw-r--r--drivers/acpi/tables/tbutils.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/drivers/acpi/tables/tbutils.c b/drivers/acpi/tables/tbutils.c
index 38c6749e43d5..bc571592f087 100644
--- a/drivers/acpi/tables/tbutils.c
+++ b/drivers/acpi/tables/tbutils.c
@@ -149,8 +149,8 @@ acpi_tb_validate_table_header(struct acpi_table_header *table_header)
149 /* Verify that this is a valid address */ 149 /* Verify that this is a valid address */
150 150
151 if (!acpi_os_readable(table_header, sizeof(struct acpi_table_header))) { 151 if (!acpi_os_readable(table_header, sizeof(struct acpi_table_header))) {
152 ACPI_REPORT_ERROR(("Cannot read table header at %p\n", 152 ACPI_ERROR((AE_INFO,
153 table_header)); 153 "Cannot read table header at %p", table_header));
154 154
155 return (AE_BAD_ADDRESS); 155 return (AE_BAD_ADDRESS);
156 } 156 }
@@ -159,10 +159,12 @@ acpi_tb_validate_table_header(struct acpi_table_header *table_header)
159 159
160 ACPI_MOVE_32_TO_32(&signature, table_header->signature); 160 ACPI_MOVE_32_TO_32(&signature, table_header->signature);
161 if (!acpi_ut_valid_acpi_name(signature)) { 161 if (!acpi_ut_valid_acpi_name(signature)) {
162 ACPI_REPORT_ERROR(("Table signature at %p [%p] has invalid characters\n", table_header, &signature)); 162 ACPI_ERROR((AE_INFO,
163 "Table signature at %p [%p] has invalid characters",
164 table_header, &signature));
163 165
164 ACPI_REPORT_WARNING(("Invalid table signature found: [%4.4s]\n", 166 ACPI_WARNING((AE_INFO, "Invalid table signature found: [%4.4s]",
165 ACPI_CAST_PTR(char, &signature))); 167 ACPI_CAST_PTR(char, &signature)));
166 168
167 ACPI_DUMP_BUFFER(table_header, 169 ACPI_DUMP_BUFFER(table_header,
168 sizeof(struct acpi_table_header)); 170 sizeof(struct acpi_table_header));
@@ -172,9 +174,13 @@ acpi_tb_validate_table_header(struct acpi_table_header *table_header)
172 /* Validate the table length */ 174 /* Validate the table length */
173 175
174 if (table_header->length < sizeof(struct acpi_table_header)) { 176 if (table_header->length < sizeof(struct acpi_table_header)) {
175 ACPI_REPORT_ERROR(("Invalid length in table header %p name %4.4s\n", table_header, (char *)&signature)); 177 ACPI_ERROR((AE_INFO,
178 "Invalid length in table header %p name %4.4s",
179 table_header, (char *)&signature));
176 180
177 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));
178 184
179 ACPI_DUMP_BUFFER(table_header, 185 ACPI_DUMP_BUFFER(table_header,
180 sizeof(struct acpi_table_header)); 186 sizeof(struct acpi_table_header));
@@ -213,7 +219,10 @@ acpi_tb_verify_table_checksum(struct acpi_table_header * table_header)
213 /* Return the appropriate exception */ 219 /* Return the appropriate exception */
214 220
215 if (checksum) { 221 if (checksum) {
216 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));
217 226
218 status = AE_BAD_CHECKSUM; 227 status = AE_BAD_CHECKSUM;
219 } 228 }
@@ -286,7 +295,7 @@ acpi_tb_handle_to_object(u16 table_id,
286 } 295 }
287 } 296 }
288 297
289 ACPI_REPORT_ERROR(("table_id=%X does not exist\n", table_id)); 298 ACPI_ERROR((AE_INFO, "table_id=%X does not exist", table_id));
290 return (AE_BAD_PARAMETER); 299 return (AE_BAD_PARAMETER);
291} 300}
292#endif 301#endif