aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/utmisc.c
AgeCommit message (Collapse)Author
2019-04-09ACPICA: Rename nameseg compare macro for clarityBob Moore
ACPICA commit 92ec0935f27e217dff0b176fca02c2ec3d782bb5 ACPI_COMPARE_NAME changed to ACPI_COMPARE_NAMESEG This clarifies (1) this is a compare on 4-byte namesegs, not a generic compare. Improves understanding of the code. Link: https://github.com/acpica/acpica/commit/92ec0935 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-12-13ACPICA: disassembler: disassemble OEMx tables as AMLErik Schmauss
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-03-18ACPICA: adding SPDX headersErik Schmauss
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-02-06ACPICA: All acpica: Update copyrights to 2018Bob Moore
including tool signons. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-08-03ACPICA: Ensure all instances of AE_AML_INTERNAL have error messagesBob Moore
ACPICA commit ea9152daaec30760fa4c25285998f58233ec0db5 This exception is only meaningful with an associated error message. Link: https://github.com/acpica/acpica/commit/ea9152da Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-08-03ACPICA: Implement deferred resolution of reference package elementsBob Moore
ACPICA commit 0c08790c56fdf0dc081ae869495a09d8c4230854 This change defers the resolution of package elements that are named references until after the entire namespace has been loaded from the definition block. This allows such references to be in fact forward references for both module level code and control methods. Link: https://github.com/acpica/acpica/commit/0c08790c Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-02-09ACPICA: Source tree: Update copyright notices to 2017Bob Moore
ACPICA commit 16577e5265923f4999b4d2c0addb2343b18135e1 Affects all files. Link: https://github.com/acpica/acpica/commit/16577e52 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-04-05ACPICA: All: const keyword changes across the ACPICA sourceBob Moore
ACPICA commit a240cbb93647bddf525b3daf6e9d31b8b9bca34e Integrated most changes proposed by net_BSD. >From joerg@net_BSD.org (Joerg Sonnenberger) ACPICA BZ 732. Link: https://github.com/acpica/acpica/commit/a240cbb9 Link: https://bugs.acpica.org/show_bug.cgi?id=732 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-01-15ACPICA: Additional 2016 copyright changesBob Moore
All tool/utility signons. Dual-license module header. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-01-01ACPICA: Core: Major update for code formatting, no functional changesBob Moore
ACPICA commit dfa394471f6c01b2ee9433dbc143ec70cb9bca72 Mostly indentation inconsistencies across the code. Split some long lines, etc. Link: https://github.com/acpica/acpica/commit/dfa39447 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-08-25ACPICA: Debugger: Cleanup debugging outputs to dump name path without ↵Lv Zheng
trailing underscores ACPICA commit 51a49c2fb4a73f302a6df2b8ddc1350dd261684d It is better to use unified ASL path name to interact with the developers. There are following acpi_ns_build_normalized_pathname() users invoking it for debugging purposes (acpiexec test results are attached): 1. acpi_ut_display_init_pathname (acpi_ns_handle_to_pathname): --------------------------------------------- Initializing Region \_SB.H_EC.ECF2 --------------------------------------------- 2. acpi_ns_print_node_pathname (acpi_ns_handle_to_pathname): --------------------------------------------- - ex \_SB.H_EC._STA Evaluating \_SB.H_EC._STA --------------------------------------------- 3. acpi_ds_print_node_pathname (acpi_ns_handle_to_pathname): --------------------------------------------- - level 211b console - execute \M1 ... **** Exception AE_AML_UNINITIALIZED_ARG during execution of method [\M1] (Node 009CB6B8) --------------------------------------------- 4. acpi_ex_dump_reference_obj (acpi_ns_handle_to_pathname): --------------------------------------------- - dump \_TZ.FAN4._PR0 ... [00] 00835E98 [Object Reference] Type [Named Object] 05 00828878 \_TZ.FN04 --------------------------------------------- 5. acpi_db_bus_walk (acpi_ns_handle_to_pathname): --------------------------------------------- - businfo \_SB.PCI0 Type 6 ... --------------------------------------------- 6. acpi_db_walk_and_match_name (acpi_ns_handle_to_pathname): --------------------------------------------- - find _PR0 \_TZ.FAN4._PR0 Package 002D8DF8 01 Elements 01 --------------------------------------------- 7. acpi_db_walk_for_specific_objects (acpi_ns_handle_to_pathname): --------------------------------------------- - methods ... \_SB.PCI0._PRT Method 0026D918 01 Args 0 Len 0005 Aml 0026B199 ... --------------------------------------------- 8. acpi_db_decode_and_dispaly_object (acpi_get_name): --------------------------------------------- - gpes Block 0 - Info 003AC7B0 device_node 003A0E08 [\_GPE] - FADT-defined GPE block ... --------------------------------------------- 9. acpi_db_display_gpes (acpi_get_name): --------------------------------------------- - dump \_GPE Object (003A0E08) Pathname: \_GPE --------------------------------------------- 10.ae_miscellaneous_tests (acpi_get_name): No output available This patch cleans up all of the above usages. ACPICA BZ 1178, Lv Zheng. Linux kernel's ACPICA debugging messages may also be changed. Link: https://github.com/acpica/acpica/commit/51a49c2f Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-08-25ACPICA: acpinames: Add new options and wildcard supportBob Moore
ACPICA commit 0ecf5b5a41c3d2e09af48f0fdbc9ae784f631788 - Add wilcard support for input filenames. - Add -l option to load tables and exit, no display. This is useful for validation of the namespace during BIOS generation. - Add -x option for specifying debug level. Linux kernel is not affected by this commit. Link: https://github.com/acpica/acpica/commit/0ecf5b5a Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-07-23ACPICA: Namespace: Add function to directly return normalized full pathLv Zheng
ACPICA commit 6e0229bb156d71675f2e07dc7960adb7ec0a60ea This patch adds functions to return normalized full path instead of "external path". The external path contains trailing "_" for each name segment while the normalized full path doesn't contain the trailing "_". Currently this function is used by the method tracing users to specify a none trailing "_" attached name path. Lv Zheng. Note that we need to validate and switch all Linux kernel acpi_get_name() users to use the new name type before removing the old name type from ACPICA. Link: https://github.com/acpica/acpica/commit/6e0229bb Signed-off-by: Lv Zheng <lv.zheng@intel.com> Reviewed-by: Ruiyi Zhang <ruiyi_zhang@hotmail.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-07-01ACPICA: De-macroize calls to standard C library functionsBob Moore
ACPICA commit 3b1026e0bdd3c32eb6d5d313f3ba0b1fee7597b4 ACPICA commit 00f0dc83f5cfca53b27a3213ae0d7719b88c2d6b ACPICA commit 47d22a738d0e19fd241ffe4e3e9d4e198e4afc69 Across all of ACPICA. Replace C library macros such as ACPI_STRLEN with the standard names such as strlen. The original purpose for these macros is long since obsolete. Also cast various invocations as necessary. Bob Moore, Jung-uk Kim, Lv Zheng. Link: https://github.com/acpica/acpica/commit/3b1026e0 Link: https://github.com/acpica/acpica/commit/00f0dc83 Link: https://github.com/acpica/acpica/commit/47d22a73 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-07-01ACPICA: Namespace: Add support of OSDT tableBob Moore
ACPICA commit 27415c82fcecf467446f66d1007a0691cc5f3709 This patch adds OSDT (Override System Definition Table) support. When OSDT is loaded, conflict namespace objects will be overridden by the AML interpreter. Bob Moore, Lv Zheng. Link: https://github.com/acpica/acpica/commit/27415c82 Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-14ACPICA: Utilities: Correct conditional compilation definitions.Lv Zheng
ACPICA commit 9a5982afbebc56289c4834b5f6dac87e0f04af14 Some conditional compilation definitions are wrong across header and source files. This patch corrects them for the utilities component. Link: https://github.com/acpica/acpica/commit/9a5982af Reported-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-02-05ACPICA: Update Copyright headers to 2015David E. Box
ACPICA commit 8990e73ab2aa15d6a0068b860ab54feff25bee36 Link: https://github.com/acpica/acpica/commit/8990e73a Signed-off-by: David E. Box <david.e.box@linux.intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-02-11ACPICA: Update ACPICA copyrights to 2014.Bob Moore
Update ACPICA copyrights to 2014. Includes all source headers and signons for the various tools. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-06-16ACPICA: Standardize all switch() blocksChao Guan
After many years, different formatting for switch() has crept in. This change makes every switch block identical. Chao Guan. ACPICA bugzilla 997. References: https://bugs.acpica.org/show_bug.cgi?id=997 Signed-off-by: Chao Guan <chao.guan@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-01-25ACPICA: Update ACPICA copyrights to 2013Bob Moore
Includes all source headers and signons for the various tools. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-01-11ACPICA: Source restructuring: split large files into 8 new files.Bob Moore
Created logical splits for eight new files. Improves modularity and configurability. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-01-10ACPICA: Enhance error messages.Lv Zheng
This patch decreases 29 lines of 20121018 divergence.diff. This patch updates error messages that already have been enhanced in ACPICA. This patch can also help to reduce the source code differences between Linux and ACPICA. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2012-11-15ACPICA: Enhance error reporting for invalid opcodes and bad ACPI_NAMEsBob Moore
For disassembler, dump the 48 bytes surrounding the invalid opcode. Fix incorrect table offset reported for invalid opcodes. Report original 32-bit value for bad ACPI_NAMEs. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2012-11-15ACPICA: Remove extra spaces after periods within commentsBob Moore
This makes all comments consistent. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2012-11-15ACPICA: Fix unmerged utility divergences.Lv Zheng
Utility improvements in ACPICA are partial ignored by ACPICA Linux release. This will lead to divergences between Linux and ACPICA. This patch ports the entire "utility" into Linux and makes them igored in the compilation stage by "ACPI_FUTURE_USAGE". The following "Utility" files have been ported into the Linux: drivers/acpi/uttrack.c drivers/acpi/utcache.c drivers/acpi/utids.c This patch will not affect the generated vmlinx binary. This will decrease 274 lines of 20120913 divergence.diff. Signed-off-by: Robert Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2012-11-15Cleanup of invalid ACPI name handling and repairBob Moore
Implemented a change/cleanup for the handling of invalid ACPI names. Names are now validated and repaired only when 1) entering a new name into the namespace and 2) disassembling a named AML opcode. A warning is only displayed in debug mode or when the interpreter is in "strict" mode, since some working machines do in fact contain invalid ACPI names. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2012-07-17ACPICA: AcpiSrc: Fix some translation issues for Linux conversionBob Moore
Fixes issues like this: i_aSL -> iASL 00-7_f -> 00-7F local_fADT -> local_FADT execute_oSI -> execute_OSI Also, in function headers, the parameters are now translated to lower case (with underscores if necessary.) Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-07-17ACPICA: Split exception code utilities to a new file, utexcep.cBob Moore
Simplifies sharing of these functions. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-07-14ACPICA: Utilities: conditionally compile backslash removal functionBob Moore
Only used for iASL and AcpiExec. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-06-01ACPICA: iASL: Improved pathname supportBob Moore
For include files, merge the prefix pathname with the file pathname. Convert backslashes in all pathnames to forward slashes, for readability. Include file pathname changes affect both #include and Include() type operators. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPICA: Update all copyrights to 2012Bob Moore
Update all copyrights to 2012. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2011-01-18ACPICA: Update all ACPICA copyrights and signons to 2011Bob Moore
Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2010-10-01ACPICA: iASL/Disassembler: Write ACPI errors to stderr instead of output fileBob Moore
This keeps the output files clean of random error messages that may originate from within the namespace/interpreter code. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2010-04-20ACPICA: Standardize integer output for ACPICA warnings/errorsBob Moore
Always use 0x prefix for hex output, use %u for integer output (all integers are unsigned.) Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2010-01-22ACPICA: Remove obsolete ACPI_INTEGER (acpi_integer) typeBob Moore
This type was introduced as the code was migrated from ACPI 1.0 (with 32-bit AML integers) to ACPI 2.0 (with 64-bit integers). It is now obsolete and this change removes it from the ACPICA code base, replaced by u64. The original typedef has been retained for now for compatibility with existing device driver code. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2010-01-22ACPICA: Update all ACPICA copyrights and signons to 2010Bob Moore
Add 2010 copyright to all module headers and signons, including the Linux header. This affects virtually every file in the ACPICA core subsystem, iASL compiler, and all utilities. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-11-24ACPICA: Reduce severity of predefined repair messages, Warning to InfoBob Moore
Since the object was successfully repaired, a Warning is too severe. Reduced to Info for now. We may eventually change these messages to debug-only. ACPICA BZ 812. http://www.acpica.org/bugzilla/show_bug.cgi?id=812 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-08-27ACPICA: Clarify common suffix for error/warning messagesBob Moore
Added parens around the acpica version/modulename/linenumber to clearly differentiate this group from the rest of the message. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-08-27ACPICA: Fix: Predefined object repair executed only onceBob Moore
This fixes a problem where the code that attempts to repair/convert an object of incorrect type is only executed on the first time the predefined method is called. The mechanism that disables warnings on subsequent calls was interfering with the repair mechanism. ACPICA BZ 781. http://acpica.org/bugzilla/show_bug.cgi?id=781 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-08-27ACPICA: Major update for acpi_get_object_info external interfaceBob Moore
Completed a major update for the acpi_get_object_info external interface. Changes include: - Support for variable, unlimited length HID, UID, and CID strings - Support Processor objects the same as Devices (HID,UID,CID,ADR,STA, etc.) - Call the _SxW power methods on behalf of a device object - Determine if a device is a PCI root bridge - Change the ACPI_BUFFER parameter to ACPI_DEVICE_INFO. These changes will require an update to all callers of this interface. See the ACPICA Programmer Reference for details. Also, update all invocations of acpi_get_object_info interface Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-27ACPICA: Update error/warning interfacesBob Moore
Moved the module name and line number to the end of the message. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-03-26ACPICA: Remove ACPI_GET_OBJECT_TYPE macroBob Moore
Remove all instances of this obsolete macro, since it is now a simple reference to ->common.type. There were about 150 invocations of the macro across 41 files. ACPICA BZ 755. http://www.acpica.org/bugzilla/show_bug.cgi?id=755 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-09ACPICA: hide private headersLen Brown
Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-09ACPICA: create acpica/ directoryLen Brown
also, delete sleep/ and delete ACPI_CFLAGS from Makefile Signed-off-by: Len Brown <len.brown@intel.com>