Commit Graph

41 Commits

Author SHA1 Message Date
Bob Moore 612c293284 ACPICA: Update all copyrights/signons to 2023
ACPICA commit 25bddd1824b1e450829468a64bbdcb38074ba3d2

Copyright updates to 2023.

Link: https://github.com/acpica/acpica/commit/25bddd18
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2023-04-06 20:29:11 +02:00
Bob Moore 487ea80a28 ACPICA: Update copyright notices to the year 2022
ACPICA commit 738d7b0726e6c0458ef93c0a01c0377490888d1e

Affects all source modules and utility signons.

Link: https://github.com/acpica/acpica/commit/738d7b07
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2022-04-13 20:24:57 +02:00
Bob Moore 4441e55d50 ACPICA: Updated all copyrights to 2021
This affects all ACPICA source code modules.

ACPICA commit c570953c914437e621dd5f160f26ddf352e0d2f4

Link: https://github.com/acpica/acpica/commit/c570953c
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2021-01-22 15:51:53 +01:00
Erik Kaneda 6bfe5344b2 ACPICA: Dispatcher: add status checks
ACPICA commit 3244c1eeba9f9fb9ccedb875f7923a3d85e0c6aa

The status chekcs are used to to avoid NULL pointer dereference on
field objects

Link: https://github.com/acpica/acpica/commit/3244c1ee
Reported-by: Kurt Kennett <kurt_kennett@hotmail.com>
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-05-09 10:55:54 +02:00
Erik Kaneda 034fdaa508 ACPICA: Disassembler: ignore AE_ALREADY_EXISTS status when parsing create operators
ACPICA commit cd66d0a50fdc9cc4dcd998e08e7aa3c4154bea2d

Disassembler is intended to emit existing ASL code as-is. Therefore,
error messages emitted during disassembly should be ignored or
handled in a way such that the disassembler can continue to parse the
AML. This change ignores AE_ALREADY_EXISTS errors during the deferred
Op parsing for create operators in order to complete parsing ASL
termlists.

Link: https://github.com/acpica/acpica/commit/cd66d0a5
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-05-09 10:55:54 +02:00
Bob Moore 800ba7c5ea ACPICA: All acpica: Update copyrights to 2020 Including tool signons.
ACPICA commit 8b9c69d0984067051ffbe8526f871448ead6a26b

Link: https://github.com/acpica/acpica/commit/8b9c69d0
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-01-13 11:52:48 +01:00
Erik Kaneda 5ddbd77181 ACPICA: Disassembler: create buffer fields in ACPI_PARSE_LOAD_PASS1
ACPICA commit 29cc8dbc5463a93625bed87d7550a8bed8913bf4

create_buffer_field is a deferred op that is typically processed in
load pass 2. However, disassembly of control method contents walk the
parse tree with ACPI_PARSE_LOAD_PASS1 and AML_CREATE operators are
processed in a later walk. This is a problem when there is a control
method that has the same name as the AML_CREATE object. In this case,
any use of the name segment will be detected as a method call rather
than a reference to a buffer field. If this is detected as a method
call, it can result in a mal-formed parse tree if the control methods
have parameters.

This change in processing AML_CREATE ops earlier solves this issue by
inserting the named object in the ACPI namespace so that references
to this name would be detected as a name string rather than a method
call.

Link: https://github.com/acpica/acpica/commit/29cc8dbc
Reported-by: Elia Geretto <elia.f.geretto@gmail.com>
Tested-by: Elia Geretto <elia.f.geretto@gmail.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-12-19 23:04:21 +01:00
Erik Schmauss 02b04f10b8 ACPICA: acpiexec: initialize all simple types and field units from user input
ACPICA commit 367b363edc5fa1f93bbc14e4a1e05f34fef765a2

acpiexec allows a user to provide a file that indicates values to
initialize named objects during table load with the -fi option. This
can provide more accurate simulation by setting named objects to
values found during OS runtime.

Previously, this option only supported integer objects. This change
adds user initialization support for field units, strings, buffers,
and packages.

Link: https://github.com/acpica/acpica/commit/367b363e
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-10-28 22:12:46 +01:00
Bob Moore edc5935ec7 ACPICA: Results from Clang
ACPICA commit 1f08279b3eb13f17004159c28c391a390cd68feb

Changes/fixes From Clang V5.0.1.  Mostly "set but never read"
warnings.

Link: https://github.com/acpica/acpica/commit/1f08279b
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>
2019-10-28 22:12:46 +01:00
Erik Schmauss aa6ec56b57 ACPICA: ACPI 6.3: add PCC operation region support for AML interpreter
ACPICA commit a4849944e80f97970e99843f4975850753584a4e

This change adds PCC operation region support in the AML interpreter
and a default handler for acpiexec. According to the specification,
the PCC operation region performs a transaction when the COMD field
is written. This allows ASL to write data to other fields before
sending the data.

In order to accommodate this protocol, a temorary buffer is added
to the regionfield object to accumulate writes. If any offset that
spans COMD is written, the temporary buffer is sent to the PCC
operation region handler to be processed.

This change also renames the PCC keyword to platform_comm_channel.

Link: https://github.com/acpica/acpica/commit/a4849944
Reviewed-by: Kyle Pelton <kyle.d.pelton@intel.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-02-24 21:11:20 +01:00
Bob Moore 840c02ca22 ACPICA: All acpica: Update copyrights to 2019
ACPICA commit 62f4f98e941d86e41969bf2ab5a93b8dc94dc49e

The update includes userspace tool signons.

Link: https://github.com/acpica/acpica/commit/62f4f98e
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>
2019-01-15 18:04:02 +01:00
Bob Moore 8b66fcfdee ACPICA: acpiexec: fix a small memory leak regression
Eliminates warnings only seen when acpiexec exits.

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-08-14 23:49:13 +02:00
Erik Schmauss 77d4e0966a ACPICA: acpi_exec: fixing -fi option
Field elements listed in the init file used to be initialized after
the table load and before executing module-level code blocks. The
recent changes in module-level code mean that the table load becomes
a method execution. If fields are used within module-level code and
we are executing with -fi option, then these values are populated
after the table has finished loading. This commit changes the
initialization of objects listed in the init file so that field unit
values are populated during the table load.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-08-14 23:49:13 +02:00
Erik Schmauss 9585763888 ACPICA: adding SPDX headers
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-03-18 19:08:05 +01:00
Bob Moore da6f8320d5 ACPICA: All acpica: Update copyrights to 2018
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>
2018-02-06 10:31:20 +01:00
Bob Moore 16ccf82920 ACPICA: Enhance error messages from namespace create/lookup operations
ACPICA commit b09c8d7bdc8c5a3db0a8d38bfd6182c023885e12

1) Emit the full pathname (scope+name) instead of just the name
2) For AE_ALREADY_EXISTS and AE_NOT_FOUND, use the "firmware error"
string to point to the true problem.

Link: https://github.com/acpica/acpica/commit/b09c8d7b
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-11-27 01:20:32 +01:00
Bob Moore 376a588cec ACPICA: Ensure all instances of AE_AML_INTERNAL have error messages
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-03 23:34:17 +02:00
Bob Moore 7735ca0eb4 ACPICA: Source tree: Update copyright notices to 2017
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>
2017-02-09 14:47:02 +01:00
Bob Moore c8100dc464 ACPICA: Additional 2016 copyright changes
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-15 22:18:09 +01:00
Bob Moore 1fad87385e ACPICA: Core: Major update for code formatting, no functional changes
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>
2016-01-01 03:36:53 +01:00
Lv Zheng 5431b6543f ACPICA: Linuxize: reduce divergences for 20151218 release
The patch reduces source code differences between the Linux kernel and the
ACPICA upstream so that the linuxized ACPICA 20151218 release can be
applied with reduced human intervention.

The pscode.c has already been out of sync for months, and it becomes more
and more difficult to merge pscode.c changes, so instead of update the
affected lines of pscode.c, this patch synchronizes entire pscode.c file.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-01-01 03:26:44 +01:00
Bob Moore 4fa4616e27 ACPICA: De-macroize calls to standard C library functions
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-01 23:17:55 +02:00
David E. Box 82a8094194 ACPICA: Update Copyright headers to 2015
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>
2015-02-05 15:31:43 +01:00
Bob Moore 75ec6e55f1 ACPICA: Update to GPIO region handler interface.
Changes to correct several GPIO issues:

1) The update_rule in a GPIO field definition is now ignored;
a read-modify-write operation is never performed for GPIO fields.
(Internally, this means that the field assembly/disassembly
code is completely bypassed for GPIO.)

2) The Address parameter passed to a GPIO region handler is
now the bit offset of the field from a previous Connection()
operator. Thus, it becomes a "Pin Number Index" into the
Connection() resource descriptor.

3) The bit_width parameter passed to a GPIO region handler is
now the exact bit width of the GPIO field. Thus, it can be
interpreted as "number of pins".

Overall, we can now say that the region handler interface
to GPIO handlers is a raw "bit/pin" addressed interface, not
a byte-addressed interface like the system_memory handler interface.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Cc: 3.15+ <stable@vger.kernel.org> # 3.15+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-09-24 22:53:46 +02:00
Bob Moore fbb7a2dc2b ACPICA: Update ACPICA copyrights to 2014.
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>
2014-02-11 00:30:25 +01:00
Bob Moore 5af2b6351b ACPICA: Disassembler: Improve pathname support for emitted External() statements.
This change adds full pathname support for external names that have been
resolved internally by the inclusion of additional ACPI tables (via the
iASL -e option). Without this change, the disassembler can emit multiple
externals for the same object, or it become confused when the Scope()
operator is used on an external object.

Linux kernel behaviour is not affected as the structure changes and the
new invocations are only used by compiler and disassembler which are
not shipped in the kernel currently.

Reported-by: Michael Tsirkin <mst@redhat.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-01-08 15:31:36 +01:00
Lv Zheng 10622bf8ce ACPICA: Linuxize: Change indentation of C labels.
It is reported by kernel build test systems that all ACPICA source
files in the kernel tree have incorrect label indentation.  This
patch changes default indent option used in the release process to
fix this bug.  Lv Zheng.

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>
2013-10-31 14:35:36 +01:00
Chao Guan 1d1ea1b723 ACPICA: Standardize all switch() blocks
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-06-16 00:55:05 +02:00
Bob Moore 25f044e645 ACPICA: Update ACPICA copyrights to 2013
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-25 13:30:47 +01:00
Bob Moore 73a3090a21 ACPICA: Remove extra spaces after periods within comments
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-15 00:31:26 +01:00
Bob Moore ba494beeaa ACPICA: AcpiSrc: Fix some translation issues for Linux conversion
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-17 00:05:51 -04:00
Bob Moore 6ccd7b5acc ACPICA: Disassembler: Add support for Operation Region externals
Adds missing support for operation regions defined in another
table, but referenced via a Field or BankField operator. Generate
the correct External statement.

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-01 11:51:51 -04:00
Bob Moore 77848130e5 ACPICA: Update all copyrights to 2012
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>
2012-01-17 03:38:51 -05:00
Bob Moore 9ce81784c9 ACPI 5.0: Implement Connection() and AccessAs() changes
Support within the interpreter and operation region dispatch.

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-17 03:36:29 -05:00
Bob Moore b4e104eaeb ACPICA: Update all ACPICA copyrights and signons to 2011
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-18 23:48:03 -05:00
Bob Moore f6a22b0bc4 ACPICA: Standardize integer output for ACPICA warnings/errors
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-04-20 10:42:52 -04:00
Bob Moore 5df7e6cb42 ACPICA: Remove obsolete ACPI_INTEGER (acpi_integer) type
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-22 12:30:06 -05:00
Bob Moore a8357b0c95 ACPICA: Update all ACPICA copyrights and signons to 2010
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>
2010-01-22 12:30:05 -05:00
Lin Ming 7f0c826a43 ACPICA: Add support for module-level executable AML code
Add limited support for executable AML code that exists outside
of any control method. This type of code has been illegal since
ACPI 2.0.  The code must exist in an If/Else/While block. All AML
tables are supported, including tables that are dynamically loaded.
ACPICA BZ 762.

http://acpica.org/bugzilla/show_bug.cgi?id=762

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2009-08-28 19:40:39 -04:00
Len Brown e2f7a77728 ACPICA: hide private headers
Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-09 03:31:01 -05:00
Len Brown 95b482a8d3 ACPICA: create acpica/ directory
also, delete sleep/ and delete ACPI_CFLAGS from Makefile

Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-09 03:30:47 -05:00