Commit Graph

119 Commits

Author SHA1 Message Date
Lv Zheng d63f37901e ACPICA: acpidump: Fix truncated RSDP signature validation.
This patch enforces a rule to always use ACPI_VALIDATE_RSDP_SIG for RSDP
signatures passed from table header or ACPI_SIG_RSDP so that truncated
string comparison can be avoided.  This could help to fix the issue that
"RSD " matches but "RSD PTR " doesn't match.  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-05-07 00:55:01 +02:00
Lv Zheng d87a2b75cd ACPICA: acpidump: Fix code issue in invoking fread in the loop.
This patch fixes an issue that the while loop is not needed as fread()
should return exact the bytes of expected.

The patch is tested by runing diff against the output of "-c" mode and
the normal mode, and only finds the following differences:
1. table addresses: the "-c" mode will always fill 0x0000000000000000 for
                    the address.
2. RSDP/RSDT/XSDT: there is no generation of such tables for "-c" mode.
So the test result shows the fix is valid.  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-05-07 00:54:59 +02:00
Rafael J. Wysocki 23a75c52be Merge back earlier ACPICA material. 2014-05-07 00:45:27 +02:00
Thomas Renninger d7cddbb07b ACPI / tools: Introduce ec_access.c - tool to access the EC
This userspace tool accesses the EC through the ec_sys debug driver
(through /sys/kernel/debug/ec/ec0/io).

The EC command/data registers cannot be accessed directly, because they
may be manipulated by the AML interpreter in parallel.

The ec_sys driver synchronizes user space (debug) access with the AML
interpreter.

Signed-off-by: Thomas Renninger <trenn@suse.de>
[rjw: Changelog]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-04-28 12:36:56 +02:00
Thomas Renninger 75e4f206c9 tools/power/acpi: Minor bugfixes
- bindir is created, but sbindir is used -> fix that
 - the debug parts are there twice (copy paste bug?). Remove one of the
   exact same parts

Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-04-21 22:51:58 +02:00
Lv Zheng 6c870213d6 ACPICA: acpidump: Update man page.
This patch updates man file of acpidump.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
[rjw: Subject]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-04-20 22:59:40 +02:00
Lv Zheng bf5afef992 ACPICA: acpidump: Remove old acpidump source.
This patch removes old acpidump source.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-04-20 22:59:40 +02:00
Lv Zheng edbe47c186 ACPICA: acpidump: Update Makefile to build acpidump from ACPICA.
This patch updates tools Makefile to use new acpidump.

ACPICA's acpidump relies on various ACPICA components/common/os_specific
source code.  They are located in various kernel folders, being searched
and compiled using vpath technique in Makefile.  These files include:
1. drivers/acpi/acpica/acapps.h
2. tools/power/acpi/common/getopt.c
3. tools/power/acpi/common/cmfsize.c
4. tools/power/acpi/os_specific/service_layers/oslinuxtbl.c
5. tools/power/acpi/os_specific/service_layers/osunixdir.c
6. tools/power/acpi/os_specific/service_layers/osunixmap.c

This patch has been tested on DELL Inspiron Mini, acpidump output can be
successfully generated by typing the following commands:
# cd tools/power/acpi
# make DEBUG=false
# sudo make install DESTDIR=/opt
# sudo make uninstall DESTDIR=/opt
# make clean
Or
# cd tools
# make acpi
# sudo make acpi_install
# sudo make acpi_uninstall
# make acpi_clean
A kernel build test is also performed on DELL Inspiron Mini to verify that
the changes done to actypes.h and aclinux.h won't affect the kernel
build process.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
[rjw: Subject]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-04-20 22:59:40 +02:00
Lv Zheng e2b9035f73 ACPICA: acpidump: Update new structures and add missing file.
This patch is the generation of a commit that updates release automation
with newly added structures and files that are referenced by the acpidump.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-04-20 22:59:40 +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
Lv Zheng f677b30b48 ACPICA: acpidump: Cleanup tools/power/acpi makefiles.
This patch cleans up old tools/power/acpi Makefile for further porting,
make it compiled in a similar way as the other tools.  No functional
changes.

The CFLAGS is modified as follows:
1. Previous cc flags:
   -Wall -Wstrict-prototypes -Wdeclaration-after-statement -Os -s \
   -D_LINUX -DDEFINE_ALTERNATE_TYPES -I../../../include
2. Current cc flags:
   DEBUG=false:
   -D_LINUX -DDEFINE_ALTERNATE_TYPES -I../../../include -Wall \
   -Wstrict-prototypes -Wdeclaration-after-statement -Os \
   -fomit-frame-pointer
   Normal:
   -D_LINUX -DDEFINE_ALTERNATE_TYPES -I../../../include -Wall \
   -Wstrict-prototypes -Wdeclaration-after-statement -O1 -g -DDEBUG

There is only one difference: -fomit-frame-pointer.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-01-16 01:50:31 +01:00
Thomas Renninger e183fcb344 ACPI tools / acpidump: must be run as root - install it into /usr/sbin
Change the default location to install acpidump into from /usr/bin
to /usr/sbin, as this tool needs to be run as root.

[rjw: Subject and changelog]
Signed-off-by: Thomas Renninger <trenn@suse.de>
Tested-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-02-05 23:35:32 +01:00
Wei Yongjun 4084a9b99c tools/power/acpi/acpidump: remove duplicated include from acpidump.c
Remove duplicated include.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Len Brown <len.brown@intel.com>
2012-10-09 00:53:23 -04:00
Len Brown 0e7cc27935 tools/power/acpi/acpidump: create acpidump(8), local make install targets
Signed-off-by: Len Brown <len.brown@intel.com>
2012-09-22 23:32:08 -04:00
Len Brown d4bb1c90c8 tools/power/acpi/acpidump: version 20101221 - find dynamic tables in sysfs
This is unchanged version 20101221, plus a small bit in
DEFINE_ALTERNATE_TYPES to enable building with latest kernel headers.

This version finds dynamic tables exported by Linux in
/sys/firmware/acpi/tables/dynamic

Signed-off-by: Len Brown <len.brown@intel.com>
2012-09-22 23:09:15 -04:00
Len Brown 39a55ff2c3 tools/power/acpi/acpidump: version 20071116
This is unchanged version 20071116, plus a small bit in
DEFINE_ALTERNATE_TYPES to enable building with latest kernel headers.

Signed-off-by: Len Brown <len.brown@intel.com>
2012-09-22 22:52:17 -04:00
Len Brown 981efe9ab9 tools/power/acpi/acpidump: version 20070714
This is unchanged version 20070714, plus a small bit in
DEFINE_ALTERNATE_TYPES to enable building with latest kernel headers.

Signed-off-by: Len Brown <len.brown@intel.com>
2012-09-22 22:49:25 -04:00
Len Brown 4f1004207e tools/power/acpi/acpidump: version 20060606
This is unchanged version 20060606, plus a small bit in
DEFINE_ALTERNATE_TYPES to enable building with latest kernel headers.

Signed-off-by: Len Brown <len.brown@intel.com>
2012-09-22 22:43:08 -04:00
Len Brown 0efea7b6b2 tools/power/acpi/acpidump: version 20051111
This is unchanged version 20051111, plus a small bit in
DEFINE_ALTERNATE_TYPES to enable building with latest kernel headers.

Signed-off-by: Len Brown <len.brown@intel.com>
2012-09-22 22:33:19 -04:00