14141 Commits

Author SHA1 Message Date
Robert Moore
fb492456ac badcode.asl: Update the compile-time statistics
Output from iASL.
2019-11-14 13:46:25 -08:00
Robert Moore
4b39f688d9
Merge pull request #523 from SchmErik/disasm-set-integer-width
Disassembler: set integer width for AML indicated by the table revision
2019-11-14 13:41:06 -08:00
Robert Moore
42519dbbcb
Merge pull request #522 from SchmErik/disasm-create-buffer-field
Disassembler: create buffer fields in ACPI_PARSE_LOAD_PASS1
2019-11-14 13:40:58 -08:00
Robert Moore
aabca3750c
Merge pull request #521 from SchmErik/iasl-move-traverse
iASL: move opcode walk and transformation
2019-11-14 13:40:37 -08:00
Robert Moore
a114b18fb3
Merge pull request #518 from SchmErik/get-current-file
iASL: abort with an error when current file is not found
2019-11-14 13:39:51 -08:00
Robert Moore
d5b78aac2d
Merge pull request #516 from SchmErik/acpisrc-add
Acpisrc: add ACPI_REGION_WALK_INFO for linuxization
2019-11-14 13:39:13 -08:00
Robert Moore
b18926aba0 iASL: Add error message for >255 NameSegs within a NameString
This is illegal because the number of namesegs is specified via
a BYTE in the AML for a NameString.

ACPICA BZ #1505 & #1506.
2019-11-14 13:35:31 -08:00
Erik Schmauss
793c1f3b00 Disassembler: set integer width for AML indicated by the table revision
By setting the integer width, the disassembler no longer trucates 64-
bit integers in AML tables with revision 2 or higher.

Reported-by: Elia Geretto <elia.f.geretto@gmail.com>
Tested-by: Elia Geretto <elia.f.geretto@gmail.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2019-11-14 10:34:19 -08:00
Erik Schmauss
29cc8dbc54 Disassembler: create buffer fields in ACPI_PARSE_LOAD_PASS1
CreateBufferField 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.

Reported-by: Elia Geretto <elia.f.geretto@gmail.com>
Tested-by: Elia Geretto <elia.f.geretto@gmail.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2019-11-14 10:12:43 -08:00
Erik Schmauss
82ebcac35e iASL: move opcode walk and transformation
This change fixes the opcode walk and the transformation walk to only
traverse the parse tree after the entire parse tree has been formed.
parse tree. Walking the entire tree any earlier would require repeated
calls to walk the parse tree and results in longer execution time.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2019-11-12 12:59:08 -08:00
Robert Moore
3f433b35f0 Fix a typo in hwxfsleep
Legacy_function -> LegacyFunction
Reported by Sascha Wildner (swildner@gmail.com).
AcpiCA bugzilla # 1502
2019-11-08 12:43:27 -08:00
Robert Moore
3dcd13aa62 iASL: Use ACPI_COMPARE_NAMESEG instead of strcmp
For _HID, _CID processing. Reported by Benjamin Berg
(benjamin@sipsolutions.net).
2019-11-08 07:33:54 -08:00
Robert Moore
33b527108f iASL: Use NUM_PREDEFINED_REGIONS instead of hardwired integer
Was 0xA0 previously.
2019-11-07 13:52:42 -08:00
Robert Moore
7819219b06 ASLTS: Remove trailing spaces
In the .asl files
From: ehaouas@noos.fr
2019-11-07 13:05:52 -08:00
Robert Moore
38eed936f9 .gitignore - ignore tests/misc directory
Ignore any .aml and/or .dsl files
2019-11-07 12:58:28 -08:00
Robert Moore
a57482fea5 MSVC project files - remove trailing spaces
Remove trailing spaces from each of the .dsp files
From: ehaouas@noos.fr
2019-11-07 12:55:19 -08:00
Robert Moore
1e34e64706
Merge pull request #519 from ColinIanKing/master
debugger: fix spelling mistake "adress" -> "address"
2019-11-06 07:08:20 -08:00
Colin Ian King
7aa72c5fdf debugger: fix spelling mistake "adress" -> "address"
There is a spelling mistake in an error message. Fix it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
2019-11-05 14:43:41 +00:00
Erik Schmauss
a2637bab58 iASL: abort with an error when current file is not found
In iASL, not being able to find the internal representation of an
input file is an unrecoverable condition. Instead of returning NULL
for this case, it's better to simply abort iASL instead of continuing
the compilation.

Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2019-10-31 14:47:27 -07:00
Robert Moore
f76bd7e33c
Merge pull request #517 from ahs3/badexit
compiler/asloptions.c : correct exit code for iasl -T ALL
2019-10-30 08:06:46 -07:00
Al Stone
13d0b49cee compiler/asloptions.c : correct exit code for iasl -T ALL
When all templates are being generated, iasl will exit with a non-zero
status even when everything works just fine.  Correct the exit() call
to exit(0) for this case, instead of exit(1).

Signed-off-by: Al Stone <ahs3@ahs3.net>
2019-10-29 17:27:07 -06:00
Erik Schmauss
896ed6eaf6 Acpisrc: add ACPI_REGION_WALK_INFO for linuxization
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2019-10-25 14:50:09 -07:00
Robert Moore
3e0d03893c Revert a clang change for strcpy->UtSafeStrcpy.
UtSafeStrcpy pulls in a module that is not part of the kernel.
2019-10-23 14:04:14 -07:00
Robert Moore
27d8166f97
Merge pull request #514 from ColinIanKing/master
iASL: fix memory leak of LocalityBuffer on error return path
2019-10-23 13:49:34 -07:00
Colin Ian King
e1413b42cb iASL: fix memory leak of LocalityBuffer on error return path
The error return path is not free'ing previously allocated
resource LocalityBuffer and hence there is a memory leak. Fix this
by free'ing it before returning.

Fixes: c22c0b1df98c ("Data table compiler: Add error messages for SLIT locality buffers")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
2019-10-19 16:30:28 +01:00
Robert Moore
3d70fd4894 Update version to 20191018
Version 20191018.
R10_18_19
2019-10-18 09:04:42 -07:00
Robert Moore
bbc8a6bcc0 Logfile: Changes for version 20191018
Version 20191018.
2019-10-18 09:03:17 -07:00
Robert Moore
d33d4046c5
Merge pull request #513 from SchmErik/debugger-convert-buffer-fix
debugger: remove leading whitespaces when converting a string to a bu…
2019-10-16 13:16:18 -07:00
Erik Schmauss
1b7228072f debugger: remove leading whitespaces when converting a string to a buffer
By removing leading whitespaces, the conversion computes the
correct number of elements in a given buffer or field encoding that
contains leading whitespaces.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2019-10-15 13:37:41 -07:00
Robert Moore
2340c495d2
Merge pull request #512 from SchmErik/ref-fix
dispatcher: fix reference count removal
2019-10-15 13:22:19 -07:00
Erik Schmauss
2ab266e598 dispatcher: fix reference count removal
The ObjDesc reference count should only be removed if we get an
actual reference to the object.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2019-10-15 12:57:26 -07:00
Robert Moore
431bd20a9a
Merge pull request #511 from SchmErik/acpiexec-fi
add support for simple types and field units in InitFile
2019-10-15 12:20:20 -07:00
Erik Schmauss
367b363edc acpiexec: initialize all simple types and field units from user input
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.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2019-10-15 11:24:29 -07:00
Erik Schmauss
d509afa88e debugger: add field unit support for AcpiDbGetNextToken
Since field unit data output from the debugger are now surrounded by
braces '{', support has been added to AcpiDbGetNextToken to recognize
strings beginning with this character as a ACPI_TYPE_FIELD_UNIT.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2019-10-15 11:17:05 -07:00
Erik Schmauss
76ca57291d debugger: surround field unit output with braces '{'
This helps differentiate the type of named objects between field
units and buffers. In other words, without this symbol, it would be
difficult to tell whether a particular named object is a buffer or a
field unit.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2019-10-15 11:13:05 -07:00
Robert Moore
ba04ee3db1
Merge pull request #507 from SchmErik/disasm-iort-fix
Disassembler: IORT: fix output of optional padding field
2019-10-10 09:42:35 -07:00
Robert Moore
b705fedce1 Debugger: Fix a format string for output of a 64-bit integer. 2019-10-10 09:13:53 -07:00
Robert Moore
bfeb33c69e
Merge pull request #509 from SchmErik/memdump
acpiexec: add fields command
2019-10-10 08:56:10 -07:00
Erik Schmauss
85cbe5e8b3 debugger: add command to dump all fields of a particular subtype
In acpiexec, this can be invoked by typing "fields" followed by a
number representing the address space ID of that field.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2019-10-09 15:29:04 -07:00
Robert Moore
06041d377f
Merge pull request #508 from SchmErik/gitignore
gitignore: ignore aslts tmp directory
2019-10-09 12:14:56 -07:00
Erik Schmauss
b1c3a012a6 gitignore: ignore aslts tmp directory
The tests/aslts/tmp directory contains previous test executions.
Since these are never committed to the ACPICA repository, ignore this
directory.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2019-10-09 11:01:01 -07:00
Erik Schmauss
fb18935fcf utilities: add flag to only display data when dumping buffers
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2019-10-08 10:39:25 -07:00
Erik Schmauss
cfdd87999b Disassembler: IORT: fix output of optional padding field
The disassembly of the optional padding field resulted in dumping
the remainder of the length in the subtable. This is problematic
when there are mappings that are describes after the padding field.

The length of the mappings are a part of the subtable length. When
dumping the optional padding field, the mapping length should be
subtracted from the rest of the field so that the proper length of
padding should be dumped.

Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2019-10-03 14:09:24 -07:00
Robert Moore
2083df71c9 iASL: Emit warning for both a _HID and a _ADR under a device
ACPI spec says: "A device object must contain either an _HID
object or an _ADR object, but should not contain both"
2019-10-02 09:01:09 -07:00
Robert Moore
28e914b016 acpisrc: fix warning about shifting into sign bit of signed integer
Cast a '1' constant to UINT32 before the shift.
BZ 1490.
2019-09-27 12:50:51 -07:00
Robert Moore
7310992aa3
Merge pull request #506 from SchmErik/tbload-with-idx
make acpi_load_table() return table index
2019-09-27 07:16:17 -07:00
Erik Schmauss
08062308e6 acpiexec: use new table load/unload functions in interface tests
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2019-09-26 10:55:48 -07:00
Robert Moore
c69369cd9c Add new external interface, AcpiUnloadTable
Unload a table via the TableIndex.
2019-09-26 09:56:11 -07:00
Nikolaus Voss
d1716a829d make acpi_load_table() return table index
For unloading an ACPI table, it is necessary to provide the index of
the table. The method intended for dynamically loading or hotplug
addition of tables, AcpiLoadTable(), should provide this information
via an optional pointer to the loaded table index.

This patch fixes the table unload function of acpi_configfs.

Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Fixes: d06c47e3dd07f ("ACPI: configfs: Resolve objects on host-directed
table loads")
Signed-off-by: Nikolaus Voss <nikolaus.voss@loewensteinmedical.de>
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2019-09-26 09:44:01 -07:00
Robert Moore
98fc399943 acpinames: Update unix makefile
Adds new files required for module-level code support.
2019-09-25 12:35:36 -07:00