13989 Commits

Author SHA1 Message Date
Erik Schmauss
92569cb38b Reference Counts: increase max to 0x4000 for large servers
Reported-by: Mike Travis <mike.travis@hpe.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2018-08-09 14:21:10 -07:00
Robert Moore
95bc5363d2
Merge pull request #405 from SchmErik/trivialFix010
Reference count: add additional debugging details
2018-08-08 12:32:50 -07:00
Erik Schmauss
a171306ed1 Reference count: add additional debugging details
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2018-08-08 11:14:47 -07:00
Robert Moore
44cd14f169 VC project files: Update for acpiexec
Add source/tools/acpiexec to the include file search path.
2018-08-08 08:43:49 -07:00
Robert Moore
627f8fbfd2
Merge pull request #403 from SchmErik/fi-fix-03
Miscellaneous fixes for fi option
2018-08-08 07:18:33 -07:00
Erik Schmauss
d99899eaf4 Acpiexec: -fi option: change control flow to clean up walkstate memory 2018-08-07 14:55:34 -07:00
Erik Schmauss
4d3ddb4199 Acpiexec: replace getline with fgets 2018-08-07 14:46:48 -07:00
Robert Moore
bee7f92b02
Merge pull request #390 from SchmErik/fi-fix-03
AcpiExec: fixing -fi option
2018-08-07 13:37:41 -07:00
Erik Schmauss
2d1ac9cbf4 AcpiExec: 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 means 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>
2018-08-07 13:06:44 -07:00
Robert Moore
d8a0317d83 Debugger: Cleanup interface to the AML disassembler
If the disassembler is configured out (such as when the debugger
is part of a kernel), these debugger commands are disabled:
    List
    Disassemble
Further, the Debug (single-step) command is simplified because
each line of code cannot be disassembled.

With assistance from: Colin Ian King <colin.king@canonical.com>
2018-08-07 12:47:00 -07:00
Robert Moore
d095417d77
Merge pull request #401 from SchmErik/aml_parser04
AML Parser: ignore all exceptions that result from incorrect AML duri…
2018-08-06 13:37:24 -07:00
Robert Moore
43e5937933
Merge pull request #400 from SchmErik/aml_parser02
AML Parser: skip opcodes that open a scope upon parse failure
2018-08-06 13:37:08 -07:00
Robert Moore
1378597efe
Merge pull request #398 from SchmErik/trivialFix009
Utilities: split hex detection into smaller functions
2018-08-06 13:36:58 -07:00
Robert Moore
56ba0ac073
Merge pull request #396 from SchmErik/rafael-01
ACPICA: Drop leading newlines from error messages
2018-08-06 13:36:44 -07:00
Robert Moore
48d44a5cd2 acpiexec: Improve some of the debug and regular output
Adds more information.
2018-08-06 13:20:23 -07:00
Erik Schmauss
e884d78aab AML Parser: ignore all exceptions that result from incorrect AML during table load
Macros to classify different AML exception codes have been added in
order to ignore the exceptions,

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2018-08-03 09:14:01 -07:00
Erik Schmauss
5ed7f69832 AML Parser: skip opcodes that open a scope upon parse failure
This change skips the entire length of opcodes that open a scope
(Device, Scope, Processor, etc) if the creation of the op fails. The
failure could be caused by various errors including AE_ALREADY_EXISTS
and AE_NOT_FOUND.

Reported-by: Jeremy Linton <jeremy.linton@arm.com>
Tested-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2018-08-02 13:20:48 -07:00
Erik Schmauss
3fd8430492 Utilities: split hex detection into smaller functions
AcpiUtImplicitStrtoul64 called AcpiUtDetectHexPrefix and ignored the
return value. Instead, use AcpiUtRemoveHexPrefix.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2018-07-31 16:02:43 -07:00
Robert Moore
003f3946bf
Merge pull request #397 from SchmErik/trivialFix008
ACPICA: add status check for AcpiHwRead before assigning return value
2018-07-26 13:31:25 -07:00
Robert Moore
9aae1f8cfc Update an error message for a duplicate table
In this case, the exception AE_ALREADY_EXISTS is more
appropriate.
2018-07-26 13:15:08 -07:00
Erik Schmauss
4813c46e22 ACPICA: add status check for AcpiHwRead before assigning return value
Reported-by: Mark Gross <mark.gross@intel.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2018-07-26 11:02:45 -07:00
Rafael J. Wysocki
e08821d41b ACPICA: Drop leading newlines from error messages
Commit 5088814a6e93 (ACPICA: AML parser: attempt to continue loading table
after error) unintentionally added leading newlines to error messages emitted by
ACPICA which caused unexpected things to be printed to the kernel log.  Drop
these newlines (which effectively reverts the part of commit 5088814a6e93
adding them).

Fixes: 5088814a6e93 (ACPICA: AML parser: attempt to continue loading table
after error)
Reported-by: Toralf Förster <toralf.foerster@gmx.de>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2018-07-19 10:33:50 -07:00
Robert Moore
48f323728b
Merge pull request #394 from SchmErik/aml_parser01
AML Parser: ignore dispatcher error status during table load
2018-07-19 07:42:28 -07:00
Robert Moore
d6fc722dec
Merge pull request #395 from SchmErik/sleep-01
ACPICA: Clear status of all events when entering S5
2018-07-19 07:42:18 -07:00
Erik Schmauss
ded942cd65 AML Parser: ignore dispatcher error status during table load
The dispatcher and the executer process the parse nodes During table
load. Error status from the evaluation confuses the AML parser. This
results in the parser failing to complete parsing of the current
scope op which becomes problematic. For the incorrect AML below, _ADR
never gets created.

DefinitionBlock(...)
{
   Scope (\_SB)
   {
     Device (PCI0){...}
     Name (OBJ1, 0x0)
     OBJ1 = PCI0 + 5 // Results in an operand error.
   } // \_SB not closed

   // parser looks for \_SB._SB.PCI0, results in AE_NOT_FOUND error
   // Entire scope block gets skipped.
   Scope (\_SB.PCI0)
   {
       Name (_ADR, 0x0)
   }
}

This patch fixes the above error by properly completing the initial
\_SB scope after an error by clearing errors that occur during table
load. In the above case, this means that OBJ1 = PIC0 + 5 is skipped.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=200363

Tested-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2018-07-18 11:05:28 -07:00
Rafael J. Wysocki
5f6816b31e ACPICA: Clear status of all events when entering S5
After commit 18996f2db918 (ACPICA: Events: Stop unconditionally
clearing ACPI IRQs during suspend/resume) the status of ACPI events
is not cleared any more when entering the ACPI S5 system state (power
off) which causes some systems to power up immediately after turing
off power in certain situations.

That is a functional regression, so address it by making the code
clear the status of all ACPI events again when entering S5 (for
system-wide suspend or hibernation the clearing of the status of all
events is not desirable, as it might cause the kernel to miss wakeup
events sometimes).

Fixes: 18996f2db918 (ACPICA: Events: Stop unconditionally clearing ACPI IRQs during suspend/resume)
Reported-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Thomas Hänig <haenig@cosifan.de>
Cc: 4.17+ <stable@vger.kernel.org> # 4.17+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2018-07-16 10:29:21 -07:00
Robert Moore
44158acffd Update version to 20180629
Version 20180629.
R06_29_18
2018-06-29 08:14:41 -07:00
Robert Moore
a27ba89ded Logfile: Changes for version 20180629
Version 20180629.
2018-06-29 08:13:58 -07:00
Robert Moore
7860572a01 iASL: Make some ASL operator arguments optional
Update for Field, BankField, IndexField, and Mutex ASL
operators to make some of their arguments optional instead
of required.
2018-06-28 14:40:36 -07:00
Robert Moore
c4c3cca58b iASL: Remove a slash-slash comment
ACPICA does not use this type of commit for maximum compatibility
with older compilers.
2018-06-27 07:19:34 -07:00
Robert Moore
35773132ff Merge branch 'master' of ssh://ssh.github.com/acpica/acpica 2018-06-26 07:59:26 -07:00
Robert Moore
437da121c1
Merge pull request #391 from SchmErik/ext-fix
iASL: remove external errors
2018-06-14 13:42:23 -07:00
Erik Schmauss
9d907604e4 Revert "iasl: generate a different OwnerId for each definition block."
This reverts commit df74adb649cb392088913c02c50b54f4103b62e2.
2018-06-14 13:29:22 -07:00
Erik Schmauss
4d66a04a35 Revert "iasl: add extra conditionals to identify redeclarations of named objects and/or externals."
This reverts commit 24a5af09ee3a822b46045a27ee1f43328df3ea9b.
2018-06-14 13:29:22 -07:00
Erik Schmauss
7ec8096697 Revert "iASL: update the OwnerId when duplicate externals are found because they could have appeared in different tabels."
This reverts commit 531a66119555c38b6a45286bc8388b90def6cbc4.
2018-06-14 13:29:22 -07:00
Erik Schmauss
a7773a81b8 Revert "iASL compiler: allow compilation of externals with paths that refer to existing names"
This reverts commit 9a252114197409290813bee570e9d53c22b99d32.
2018-06-14 13:29:22 -07:00
Erik Schmauss
4c9fec1e71 Revert "iasl: fix field unit compilation"
This reverts commit 512859550948dc663bb45c5d2bccbee4390b2677.
2018-06-14 13:29:22 -07:00
Erik Schmauss
35c26985e2 Revert "iASL: change processing of external op namespace nodes for correctness"
This reverts commit aa866a9b4f24bbec9f158d10325b486d7d12d90f.
2018-06-14 13:29:22 -07:00
Robert Moore
e574d3a6b1 iASL: Add warning for Unload operator
This operator is not supported on all host operating systems.
2018-06-08 08:43:01 -07:00
Robert Moore
31531caa5b iASL: Update signal handling
remove support for SIGSEGV, not needed.
2018-06-08 08:41:53 -07:00
Robert Moore
1f78b218f4 Update ACPICA build instructions
Release build instruction file.
2018-06-07 07:13:08 -07:00
Robert Moore
654c11f3d4
Merge pull request #389 from SchmErik/trivialFix007
iASL: increase the length of MsgBuffer to avoid overflow
2018-06-05 07:31:14 -07:00
Erik Schmauss
935ca65f78 iASL: increase the length of MsgBuffer to avoid overflow
There are some functions that attempt to store 2 String buffers in
MsgBuffer. This causes compiler warnings due to potential overflow
of MsgBuffer.

By increasing the MsgBuffer, we retain current behavior for functions
using StringBuffer. This also results in separating the size between
MsgBuffer and StringBuffer.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2018-06-01 16:05:52 -07:00
Robert Moore
8146f9d3b8 Automated cleanup, no functional change
Cleanup via: acpisrc -c acpica/source
2018-06-01 08:30:08 -07:00
Robert Moore
b7bd5f9b33 Update case for AcpiSleepDispatch functions
Update to ACPICA code style.
2018-06-01 08:04:22 -07:00
Robert Moore
5936faef5a Update version to 20180531
Version 20180531.
R05_31_18
2018-05-31 13:13:04 -07:00
Robert Moore
5b3fa78025 Logfile: Changes for version 20180531
Version 20180531.
2018-05-31 13:12:17 -07:00
Robert Moore
d2f6a91d9a Interpreter: Begin deprecation of Unload operator
The Unload AML operator is no longer supported for the reasons below.
An AE_NOT_IMPLEMENTED exception is returned.
    1) A correct implementation on at least some hosts may not be possible.
    2) Other ACPI implementations do not correctly/fully support it.
    3) It requires host device driver support which is not known to exist.
        (To properly support namespace unload out from underneath.)
    4) This AML operator has never been seen in the field.
2018-05-31 12:56:56 -07:00
Robert Moore
9577be9f3c
Merge pull request #388 from SchmErik/tload00
AML parser: attempt to continue loading table after error
2018-05-30 13:56:52 -07:00
Erik Schmauss
f035ea02e8 AML parser: attempt to continue loading table after error
This change alters the parser so that the table load does not abort
upon an error.

Notable changes:

If there is an error while parsing an element of the termlist, we
will skip parsing the current termlist element and continue parsing
to the next opcode in the termlist.

If we get an error while parsing the conditional of If/Else/While or
the device name of Scope, we will skip the body of the statement all
together and pop the ParserState.

If we get an error while parsing the base offset and length of an
operation region declaration, we will remove the operation region
from the namespace.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2018-05-30 13:51:59 -07:00