Commit graph

14 commits

Author SHA1 Message Date
Lv Zheng 911a9b8428 ACPICA: Applications: Fix a potential issue that help messages may be dumped to acpi_gbl_debug_file
ACPICA commit d1b7372c7eb89cdba3d3c239fb07e2fdc5abf880

This is a regression fix, restoring usage macro to its original
implementation.

There is an issue for usage macros, if an command line option changed
acpi_gbl_debug_file, then the follow up usage message may be errornously
dumped to the debug file.
This is just a bug in theory, because currently acpi_gbl_debug_file can only
be modified by acpibin and acpiexec. And this will not trigger such issue
because:
1. For acpibin, acpi_gbl_debug_file will be modified by "-t" option and the
   program exits after processing this option without dumping help message
   or other error options.
2. For acpiexec, acpi_gbl_debug_file will only be modified by the open
   command, which happens after parsing the command line options, so no
   help message will be dumped into the debug file.
But maintaining this logic is difficult, so this patch modifies
acpi_os_printf() into printf() for usage macros so that the help messages are
ensured to be dumped to the stdout. Lv Zheng.

Link: https://github.com/acpica/acpica/commit/d1b7372c
Link: https://bugs.acpica.org/show_bug.cgi?id=1142
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>
2016-08-13 03:16:39 +02:00
Lv Zheng e323c02dee ACPICA: MSVC9: Fix <sys/stat.h> inclusion order issue
ACPICA commit 9bb265c2afb9910e46f820d6759648580edabd09

When /Za is specified, headers of some Windows SDKs contain bugs breaking
VC builds, and MSVC9's default SDK is one of such header-buggy library.

In order to solve this issue, many VC developers stop using /Za. However
we've been asked to have this fixed without removing /Za.

In MSVC9 default SDK, this issue can be fixed by restricting <sys/stat.h>
to be the last standard file included by every source file in the projects.
This patch thus moves <sys/stat.h> inclusion to "acapps.h", so that this
issue can be fixed by ensuring that "acapps.h" is always the last standard
file included by all of the ACPICA source files. This is in fact also a
useful cleanup because applications can only include one header (e.x.,
acpidump.h) instead of including acapps.h separately. Lv Zheng.

Except some harmless header inclusion re-ordering, Linux kernel is not
affected by this change.

Link: https://github.com/acpica/acpica/commit/9bb265c2
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>
2016-08-13 03:09:35 +02:00
Lv Zheng 4e2fc6a0aa ACPICA: Clib/EFI: Fix wrong order of standard integer types/IO handles
ACPICA commit 7f9b359b7c78c69b07f62eb2d58f710c351fd75d

EFI header should use standard C library stuffs (integer types and IO
handles) rather than implementing such standard stuffs.
This patch fixes this issue by:
1. Implementing standard integer types for ACPI_USE_STANDARD_HADERS=n;
2. Defining EFI types using standard integer types and standard IO handles;
3. Tuning header inclusion order and environment definition order;
4. Removing wrong standard header inclusion from ACPICA core files;
5. Moving several application headers from acpidump.h to acenv.h.
This patch corrects some of them. Lv Zheng.

Except some harmless header inclusion re-ordering, Linux kernel is not
affected by this change.

Link: https://github.com/acpica/acpica/commit/7f9b359b
Link: https://bugs.acpica.org/show_bug.cgi?id=1300
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>
2016-08-13 03:09:35 +02: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
Colin Ian King adeb79dd6e ACPICA: Tools: Add spacing and missing options in acpibin tool
ACPICA commit e7c8ffbbef3f7ce340e012ae4db63ea16cd09714

The -e option is missing from the acpibin help options, so add
this.  Also, there should be spaces between the filenames for the
-c and -d optios, so add this and expand the field size from 18
to 20 characters in the ACPI_OPTION macro.

Link: https://github.com/acpica/acpica/commit/e7c8ffbb
Signed-off-by: Colin Ian King <colin.king@canonical.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>
2016-01-01 03:47:36 +01:00
Bob Moore 3727ec2a03 ACPICA: acpiexec/acpinames: Update for error checking macros
ACPICA commit 5bdfb4f43f4d315d23b31b39bac5a0b1ca420c2b

Standardize naming, deploy in common header.

Link: https://github.com/acpica/acpica/commit/5bdfb4f4
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:47:35 +01:00
Bob Moore 395ec73196 ACPICA: iasl/acpiexec: Update input file handling and verification
ACPICA commit 3a6f2a516dd35a4daacbc5b5144d1db763ff2cb0

Improve and cleanup verification of ACPI tables within input files.
Share more code between the disassembler and acpiexec.

This patch only affects application debugger commands, thus it is a
no-op chage for Linux kernel.

Link: https://github.com/acpica/acpica/commit/3a6f2a51
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:47:34 +01:00
Bob Moore 2ba7379b5a ACPICA: Disassembler/tools: Support for multiple ACPI tables in one file
ACPICA commit 5be7dc4d0d69b2953d156f5bc4d3e8a65a390837

Matches the support in iASL and acpi_exec.

Link: https://github.com/acpica/acpica/commit/5be7dc4d
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:47:34 +01:00
Bob Moore 842e71332e ACPICA: iASL: General cleanup of the file suffix #defines
ACPICA commit bed456ed2976bdaafdef406b982fdf6c539befc0

Removed some extraneous defines, reordered others.

Link: https://github.com/acpica/acpica/commit/bed456ed
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-10-22 02:01:12 +02:00
Rasmus Villemoes 1797d379f2 ACPICA: Applications: Remove use of __DATE__ macro.
ACPICA commit 3d9fb6d1f216a78ad098d3ad23f1304376c2f4ef

The macro __DATE__ and friends is not allowed in the Linux kernel. Also,
including the build time in output doesn't seem to provide any value.

Link: https://github.com/acpica/acpica/commit/3d9fb6d1
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-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-04-14 14:51:52 +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
Lv Zheng 3c9349c937 ACPICA: Common: Enhance cm_get_file_size() to improve portability
This patch uses abstract file IO and acpi_log_error() APIs to enhance
cm_get_file_size() so that applications that invoke this API could have
portability improved.

With actual references added to abstract file IO and acpi_log_error(), the
applications need to link oslibcfs.o, utdebug.o, utexcep.o, utmath.o,
utprint.o and utxferror.o.

It is also required to add acpi_os_initialize() invocations if an
application starts to use acpi_log_error().

acpidump has already invoked acpi_os_initialize() in this way.  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>
2014-07-08 14:22:26 +02:00
Lv Zheng d9cf147dbd ACPICA: Application: Enhance ACPI_USAGE_xxx/ACPI_OPTION with acpi_os_printf() to improve portability
This patch enhances ACPI_USAGE_xxx/ACPI_OPTION macros to use portable
acpi_os_printf() so that usage functions for applications no longer rely on
the printf() API.

To use acpi_os_printf() exported by osunixxf.c as a replacement of
printf(), applications need to initialize acpi_gbl_output_file to stdout
and initialize acpi_gbl_db_output_flags to ACPI_DB_CONSOLE_OUTPUT. The
latter is automatically done by ACPI_INIT_GLOBAL(), applications need to
link utglobal.o to utilize this mechanism. For GCC, assigning stdout to
acpi_gbl_output_file using ACPI_INIT_GLOBAL() is not possible as stdout is
not a constant in GCC environment. As an alternative solution, stdout
assignment has been put into acpi_os_initialize(). Thus
acpi_os_initialize() need to be invoked very early by the applications to
initialize the default output of acpi_os_printf() to keep behavior
consistency.

acpidump has already invoked acpi_os_initialize() in this way. 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>
2014-07-08 14:22:26 +02:00
Lv Zheng 506f57dd6d ACPICA: acpidump: Add support to generate acpidump release.
The acpidump is initiated by Bob Moore and Chao Guan, fixed and completed
by Lv Zheng.

This patch is a generation of the commit that adds acpidump release
automation into ACPICA release process. Lv Zheng.

Note that this patch doesn't replace the kernel shipped acpidump with the
new acpidump.  The replacement is done by further patches.

Original-by: Chao Guan <guanchao@mail.ustc.edu.cn>
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>
2014-04-20 22:59:40 +02:00