13129 Commits

Author SHA1 Message Date
Robert Moore
5bea13a9e1 Update version to 20161222
Version 20161222
R12_22_16
2016-12-22 07:55:47 -08:00
Robert Moore
749f251cc4 Logfile: Changes for version 20161222
Version 20161222.
2016-12-22 07:55:02 -08:00
Robert Moore
12fcdff5d2 efihello: Add standard legal header 2016-12-21 14:04:57 -08:00
Robert Moore
f464aca455 Automated tab removal, no functional change
Removed tab from exconfig.c
2016-12-21 13:17:34 -08:00
Robert Moore
832c3c4d08 Merge pull request #198 from debox1/switch_case
Disassembler: Add Switch/Case disassembly support
2016-12-21 12:20:23 -08:00
David E. Box
0f6cc80e8a Disassembler: Add Switch/Case disassembly support
iasl compiles Switch/Case statements into a single iteration While
loop with If/Else statements. This patch adds support to recognize
this generated compiler output and disassemble it back to the original
Switch statement.

Signed-off-by: David E. Box <david.e.box@linux.intel.com>
2016-12-21 12:05:02 -08:00
Robert Moore
5c204f0e59 Merge pull request #197 from acpica/revert-196-acpica-trivial
Revert "Acpica trivial"
2016-12-21 09:10:48 -08:00
Robert Moore
07d0f9453e Revert "Acpica trivial" 2016-12-21 09:07:53 -08:00
Robert Moore
73b741b605 Merge pull request #196 from zetalog/acpica-trivial
Acpica trivial
2016-12-21 08:34:01 -08:00
Robert Moore
b7dae343fb Fix a problem with recent extra support for control method invocations
This change fixes a problem with the recent support that enables
control method invocations as Target operands to many ASL
operators. Eliminates errors similar to:

Needed type [Reference], found [Processor]
2016-12-21 07:58:22 -08:00
Robert Moore
23b5bbe6d7 Fix a regression related to resource descriptors
This change fixes a problem where some valid descriptors were
incorrectly detected as invalid, and a AE_AML_NO_RESOURCE_END_TAG
was returned.
2016-12-21 07:54:50 -08:00
Lv Zheng
93d652bbfc Utilities: Add ACPI_DO_ONCE macros
This patch implements ACPI_DO_ONCE macros to avoid log floodings.

There could be OSPM gaps causing some ACPICA functionalities continously
reporting errors, filling up users' filesystem. Reported by Aaron Franke,
Fixed by Lv Zheng.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=188331
Reported-by: Aaron Franke <arnfranke@yahoo.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-12-21 16:12:03 +08:00
Lv Zheng
528528feeb acpiexec: Move an acpiexec specific purposed new line to acpiexec specific file
The new line is only useful for acpiexec, so moving it to acpiexec to
eliminate the #ifdef.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
--
2016-12-21 16:12:03 +08:00
Emese Revfy
afe4a18acf Utilities: Fix format string type mistakes
This adds the missing ACPI_PRINTF_LIKE attribute which allows compile time
format string checking (and will be used by the coming initify gcc plugin).
Additionally, this fixes the warnings exposed by the attribute.
Original by Emese Revfy and Kees Cook, Ported by Lv Zheng.

Signed-off-by: Emese Revfy <re.emese@gmail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-12-21 16:12:03 +08:00
Robert Moore
9e63bf92de Merge pull request #195 from zetalog/efi-hello
Efi hello
2016-12-20 07:26:32 -08:00
Robert Moore
86c2065d7d Merge pull request #194 from zetalog/acpica-linuxize
Acpica linuxize
2016-12-19 13:48:23 -08:00
Lv Zheng
3fcc59f475 EFI: Add efihello demo application.
This patch adds a demo EFI application for stdin/stdout testing. This
utility can be used to narrow down root causes of porting issues. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-12-14 16:33:22 +08:00
Lv Zheng
a92509ec14 Clib: Add putchar()/getchar() to improve portability
This patch implements putchar()/getchar() invoked in AcpiOsGetLine() to
improve the portability.
No functional changes for Unix/Windows environments. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-12-14 16:33:22 +08:00
Lv Zheng
d837f45057 Clib: Add generic strpbrk() and strtok() to improve portability
This patch implements the native string APIs of strpbrk()/strtok().
Unit tests have been done to these two functions in unix environment and no
bugs have been found. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-12-14 16:33:22 +08:00
Lv Zheng
30495a682e Clib/EFI: Add fgets() to improve portability
This patch adds fgets(). Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-12-14 16:33:22 +08:00
Lv Zheng
cc6947172d Clib/EFI: Add file position seeking/telling support
This patch adds file position seeking/telling support. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-12-14 16:33:22 +08:00
Lv Zheng
24abc25e62 Clib/EFI: Add standard input descriptor support
This patch implements stdin for EFI environment using
SIMPLE_INPUT_INTERFACE. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-12-14 16:33:22 +08:00
Lv Zheng
4dbfe66bf1 Clib/EFI: Add fgetc()/fputc() to improve portability
This patch added two new Clibrary functions: fgetc()/fputc() for EFI
environment, they are implemented using fread()/fwrite().

Note in this patch, stdin is simply defined as NULL for EFI
environment. Its EFI support should be implemented by further patches.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-12-14 16:33:22 +08:00
Lv Zheng
c684c88bd9 Clib: Add memmove() to improve portability
This patch implements memmove(). Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-12-14 16:33:22 +08:00
Lv Zheng
bfb70f26ce linuxize: cut commit ID now has conflicts breaking linuxize process
Following error can be seen in linuxize process:
  error: short SHA1 07630ad9 is ambiguous.
  error: short SHA1 07630ad9 is ambiguous.
  fatal: ambiguous argument '07630ad9': unknown revision or path not in the working tree.
  Use '--' to separate paths from revisions
Fixing this by stop cutting commit IDs into 8-digits.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-12-09 16:02:37 +08:00
Robert Moore
c62ca6b514 Project files: restructuring and cleanup
ease-of-use changes; abort on file copy errors.
2016-12-08 10:19:05 -08:00
Robert Moore
1fb3cbc7dc Merge branch 'master' of ssh://ssh.github.com/acpica/acpica 2016-12-08 09:02:16 -08:00
Robert Moore
082b5b3ee3 Utilities: Update debug output
Enhancement of miscellaneous debug output.
2016-12-08 09:00:10 -08:00
Robert Moore
28b6c0813d acpihelp: Update makefiles for new files
Added ahasl.c and ahaml.c
2016-12-08 08:58:20 -08:00
Robert Moore
6c5f27fedf acpihelp: Split files and generate cleanup
Split the AML and ASL decode into separate files.
2016-12-08 08:56:47 -08:00
Robert Moore
efc97d1d20 Macro header: Fix some typos in comments. No functional change
A few typos/errors.
2016-12-07 08:39:53 -08:00
Robert Moore
07630ad965 Merge pull request #193 from zetalog/acpica-trivial
Acpica trivial
2016-12-06 07:44:13 -08:00
Lv Zheng
09fdea4f11 Debugger: Improve code quality
Use safer strncpy() instead of strcpy() in AcpiDbRunRemoteDebugger().
Detected by Coverity tools.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-12-05 16:24:16 +08:00
Lv Zheng
fa0680030a MSVC: Fix MSVC6 build issues
Build environment has changed because of new improvements:
1. New files are split
2. New inclusion order
This patch updates MSVC project files accordingly.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-12-05 16:24:03 +08:00
Robert Moore
bee9af547c Merge branch 'master' of ssh://ssh.github.com/acpica/acpica 2016-12-02 12:54:50 -08:00
Robert Moore
aa72e7745f Fix a couple of debug output statements
Remove extraneous quotes around function names.
2016-12-02 12:53:57 -08:00
Robert Moore
e033071cf5 Merge pull request #190 from zetalog/acpica-sleep
Acpica sleep
2016-12-02 08:14:56 -08:00
Robert Moore
47614972f7 Merge pull request #161 from zetalog/acpica-gas
Acpica gas
2016-12-02 08:14:38 -08:00
Robert Moore
2f4aaeb703 Merge pull request #148 from zetalog/acpica-debugger
Acpica debugger
2016-12-02 08:14:06 -08:00
Robert Moore
df3db6f49b Merge pull request #192 from ColinIanKing/master
Linux-specific header: Add support for s390x compilation.
2016-11-30 08:19:05 -08:00
Colin Ian King
ecac9504e3 Linux-specific header: Add support for s390x compilation.
Adds s390x as a 64-bit architecture.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
2016-11-30 13:09:33 +00:00
Robert Moore
d1b8a8751d Grammar test: Deploy __LINE__ macro to simplify debugging
ERR_ method now accepts __LINE__ from caller
2016-11-18 08:57:40 -08:00
Robert Moore
0d5a056877 Update version to 20161117
Version 20161117.
R11_17_16
2016-11-17 09:17:14 -08:00
Robert Moore
092d442e7a Logfile: Changes for version 20161117
Version 20161117.
2016-11-17 09:16:40 -08:00
Robert Moore
35ce65feeb Table Manager: Fix error path memory leak while getting table(s) from file
Possible leak after allocation of table descriptor.
2016-11-17 08:34:17 -08:00
Robert Moore
040740976d Revert "FADT support cleanup"
This reverts commit 34ccd43af3fd1870fddfac0617dd0ba706963558.

This is an attempt to remove all references in the source to the
FADT version 2, which never was a legal version number. It was
skipped because it was an early version of 64-bit support that
was eventually abandoned for the current 64-bit support.

Appears to have caused problems on some machines. Another attempt
at this will be made later.
2016-11-17 08:03:51 -08:00
Robert Moore
fd0b3e1b86 Merge pull request #180 from coypoop/master
avoid resource leak, check for alloc failure
2016-11-16 10:40:00 -08:00
Robert Moore
a670da6d3d Merge pull request #186 from Lekensteyn/acpixtract-crlf
acpixtract: support CRLF in input files
2016-11-16 10:14:34 -08:00
Peter Wu
86167914ea acpixtract: change fopen mode from "rt" to "r"
fopen mode "t" is non-standard and specific to Windows. Since the
default mode is already text ("b" is needed for binary mode), just
remove it. (This matches all other fopen callers in ACPICA that open a
text file). There is no functional change.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2016-11-16 18:59:14 +01:00
Peter Wu
03de67d713 acpixtract: support CRLF in input files
Currently acpixtract expects that acpidump lines are terminated by LF.
This is not always true, for example when taking the acpidump output
from Windows or from pastebin websites (HTML forms always convert input
to CRLF per HTML5 specification). On such files with CRLFs, acpixtract
would output only the first table from the file.

That happens because `\r\n` is not considered an empty line. Then
AxListTables would continue trying to read a whole header (`\r\nSSDT @
0x...`) and discover that `\r\nSS` is not a valid signature and skip to
the next line. At that point however, the file pointer has advanced and
no new header can be matched anymore.

Affected functions are AxCountTableInstances, AxIsDataBlockHeader,
AxProcessOneTextLine (from axutils.c) and AxListTables (from
acpixtract.c). All of these functions skip the input line if it is
determined to be an empty line (ends with LF). To handle the above
situation, consider a CR (part of CRLF) also as newline.

There is no need to replace the CRLF by LF for normal use:

 - AxListTables first reads a line (presumably `SSDT @ 0x...`), then
   reads the actual data lines via AxGetTableHeader. That uses
   AxConvertLine which uses `sscanf(InputLine, "... %x")` and needs no
   further changes.
 - AxExtractTables and AxExtractToMultiAmlFile uses
   (1) AxIsDataBlockHeader to find the first line (`SSDT @ ...`) but
   only looks at the first four characters for the signature.
   (2) AxProcessOneTextLine for data lines which uses AxConvertLine
   which was already shown to be safe.
 - AxListTables may also check whether a table needs a number suffix and
   call AxGetNextInstance which calls AxCountTableInstances. That
   function is similar to AxIsDataBlockHeader, but additionally counts
   the number of occurrences. This is also safe.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
2016-11-16 18:59:01 +01:00