diff options
author | Bob Moore <robert.moore@intel.com> | 2006-03-31 00:00:00 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-06-14 02:04:16 -0400 |
commit | 793c2388cae3fd023b3b5166354931752d42353c (patch) | |
tree | 6859cde48677cf1e9b9766cd1d95081a863c060c /drivers/acpi/namespace/nssearch.c | |
parent | 61686124f47d7c4b78610346c5f8f9d8a6d46bb5 (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/namespace/nssearch.c')
-rw-r--r-- | drivers/acpi/namespace/nssearch.c | 50 |
1 files changed, 30 insertions, 20 deletions
diff --git a/drivers/acpi/namespace/nssearch.c b/drivers/acpi/namespace/nssearch.c index c929f45071c0..51adec5a23d6 100644 --- a/drivers/acpi/namespace/nssearch.c +++ b/drivers/acpi/namespace/nssearch.c | |||
@@ -128,9 +128,8 @@ acpi_ns_search_node(u32 target_name, | |||
128 | next_node->object); | 128 | next_node->object); |
129 | } | 129 | } |
130 | 130 | ||
131 | /* | 131 | /* Found matching entry */ |
132 | * Found matching entry. | 132 | |
133 | */ | ||
134 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, | 133 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, |
135 | "Name [%4.4s] (%s) %p found in scope [%4.4s] %p\n", | 134 | "Name [%4.4s] (%s) %p found in scope [%4.4s] %p\n", |
136 | ACPI_CAST_PTR(char, &target_name), | 135 | ACPI_CAST_PTR(char, &target_name), |
@@ -248,10 +247,8 @@ acpi_ns_search_parent_tree(u32 target_name, | |||
248 | return_ACPI_STATUS(status); | 247 | return_ACPI_STATUS(status); |
249 | } | 248 | } |
250 | 249 | ||
251 | /* | 250 | /* Not found here, go up another level (until we reach the root) */ |
252 | * Not found here, go up another level | 251 | |
253 | * (until we reach the root) | ||
254 | */ | ||
255 | parent_node = acpi_ns_get_parent_node(parent_node); | 252 | parent_node = acpi_ns_get_parent_node(parent_node); |
256 | } | 253 | } |
257 | 254 | ||
@@ -307,12 +304,29 @@ acpi_ns_search_and_enter(u32 target_name, | |||
307 | return_ACPI_STATUS(AE_BAD_PARAMETER); | 304 | return_ACPI_STATUS(AE_BAD_PARAMETER); |
308 | } | 305 | } |
309 | 306 | ||
310 | /* Name must consist of printable characters */ | 307 | /* |
311 | 308 | * Name must consist of valid ACPI characters. We will repair the name if | |
309 | * necessary because we don't want to abort because of this, but we want | ||
310 | * all namespace names to be printable. A warning message is appropriate. | ||
311 | * | ||
312 | * This issue came up because there are in fact machines that exhibit | ||
313 | * this problem, and we want to be able to enable ACPI support for them, | ||
314 | * even though there are a few bad names. | ||
315 | */ | ||
312 | if (!acpi_ut_valid_acpi_name(target_name)) { | 316 | if (!acpi_ut_valid_acpi_name(target_name)) { |
313 | ACPI_ERROR((AE_INFO, "Bad character in ACPI Name: %X", | 317 | target_name = acpi_ut_repair_name(target_name); |
314 | target_name)); | 318 | |
315 | return_ACPI_STATUS(AE_BAD_CHARACTER); | 319 | /* Report warning only if in strict mode or debug mode */ |
320 | |||
321 | if (!acpi_gbl_enable_interpreter_slack) { | ||
322 | ACPI_WARNING((AE_INFO, | ||
323 | "Found bad character(s) in name, repaired: [%4.4s]\n", | ||
324 | ACPI_CAST_PTR(char, &target_name))); | ||
325 | } else { | ||
326 | ACPI_DEBUG_PRINT((ACPI_DB_WARN, | ||
327 | "Found bad character(s) in name, repaired: [%4.4s]\n", | ||
328 | ACPI_CAST_PTR(char, &target_name))); | ||
329 | } | ||
316 | } | 330 | } |
317 | 331 | ||
318 | /* Try to find the name in the namespace level specified by the caller */ | 332 | /* Try to find the name in the namespace level specified by the caller */ |
@@ -328,10 +342,8 @@ acpi_ns_search_and_enter(u32 target_name, | |||
328 | status = AE_ALREADY_EXISTS; | 342 | status = AE_ALREADY_EXISTS; |
329 | } | 343 | } |
330 | 344 | ||
331 | /* | 345 | /* Either found it or there was an error: finished either way */ |
332 | * Either found it or there was an error | 346 | |
333 | * -- finished either way | ||
334 | */ | ||
335 | return_ACPI_STATUS(status); | 347 | return_ACPI_STATUS(status); |
336 | } | 348 | } |
337 | 349 | ||
@@ -357,9 +369,8 @@ acpi_ns_search_and_enter(u32 target_name, | |||
357 | } | 369 | } |
358 | } | 370 | } |
359 | 371 | ||
360 | /* | 372 | /* In execute mode, just search, never add names. Exit now */ |
361 | * In execute mode, just search, never add names. Exit now. | 373 | |
362 | */ | ||
363 | if (interpreter_mode == ACPI_IMODE_EXECUTE) { | 374 | if (interpreter_mode == ACPI_IMODE_EXECUTE) { |
364 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, | 375 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, |
365 | "%4.4s Not found in %p [Not adding]\n", | 376 | "%4.4s Not found in %p [Not adding]\n", |
@@ -379,6 +390,5 @@ acpi_ns_search_and_enter(u32 target_name, | |||
379 | 390 | ||
380 | acpi_ns_install_node(walk_state, node, new_node, type); | 391 | acpi_ns_install_node(walk_state, node, new_node, type); |
381 | *return_node = new_node; | 392 | *return_node = new_node; |
382 | |||
383 | return_ACPI_STATUS(AE_OK); | 393 | return_ACPI_STATUS(AE_OK); |
384 | } | 394 | } |