844 Commits

Author SHA1 Message Date
Robert Moore
c04d310039 iASL: add ASL conversion tool
The key feature of this utility is that the original comments within
the input ASL files are preserved during the conversion process, and
included within the converted ASL+ file -- thus creating a transparent
conversion of existing ASL files to ASL+ (ASL 2.0)
2017-02-24 14:47:30 -08:00
Lv Zheng
b59347d0b8 Linuxize: Restore and fix intel compiler build
This patch restores Intel compiler settings for ACPICA components.
And fixes its inclusion in acenv.h.

Reported-by: Stepan M Mishura <stepan.m.mishura@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-01-23 16:58:44 +08:00
Robert Moore
7cd8e96f08 Merge pull request #152 from tpetazzoni/remove-hardware-name
generate/unix/Makefile.common: remove HARDWARE_NAME
2017-01-18 14:48:51 -08:00
Lv Zheng
36884941bd Linuxize: Refine commit ID handling
The previous fix only helps to restore release automation, but the
generated Linux upstream patch contains wrong formatted commit links. This
patch enhances the previous fix by splitting commit name from full commit
ID. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-12-27 15:46:27 +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
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
28b6c0813d acpihelp: Update makefiles for new files
Added ahasl.c and ahaml.c
2016-12-08 08:58:20 -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
Lv Zheng
e76eb8b36a Debugger: Convert some mechanisms to OSPM specific
The following mechanisms are OSPM specific:
1. Redirect output destination to console: no file redirection will be
   needed by an in-kernel debugger, there is even no file can be accessed
   when the debugger is running in the kernel mode.
2. Output command prompts: programs other than acpiexec can have different
   prompt characters and the prompt characters may be implemented as a
   special character sequence to form a char device IO protocol.
3. Command ready/complete handshake: OSPM debugger may wait more conditions
   to implement OSPM specific semantics (for example, FIFO full/empty
   conditions for O_NONBLOCK or IO open/close conditions).
Leaving such OSPM specific stuffs in the ACPICA debugger core blocks
Linux debugger IO driver implementation.

Several new OSL APIs are provided by this patch:
1. AcpiOsInitializeDebugger: initialize debugger.
2. AcpiOsTerminateDebugger: reversal of AcpiOsInitializeDebugger.
3. AcpiOsWaitCommandReady: putting debugger task into wait state when a
   command is not ready. OSPMs can terminate command loop by returning
   AE_CTRL_TERMINATE from this API. Normally, wait_event() or
   WaitForMultipleObject() may be used to implement this API.
4. AcpiOsNotifyCommandComplete: putting user task into running state when a
   command has been completed. OSPMs can terminate command loop by
   returning AE_CTRL_TERMINATE from this API. Normally, wake_up() or
   SetEvent() may be used to implement this API.
This patch also converts current command signaling implementation into a
generic debugger layer (osgendbg.c) to be used by the existing OSPMs or
acpiexec, in return, Linux can have chance to implement its own command
handshake mechanism. This patch also implements acpiexec batch mode in a
multi-threading mode comaptible style as a demo (this can be confirmed by
configuring acpiexec into DEBUGGER_MULTI_THREADED mode where the batch mode
is still working). Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-11-03 01:17:13 +08:00
Lv Zheng
e97f20f3d6 Fix ACPICA release issues for recent distros
Several issues were found in recent cygwin/ubuntu distros:

1. Newer git implements "-c" with different meaning, removes it;
2. "tempfile" is mostly debian specific command, replaces it with
   "mktemp -u", the latter is more portable.

Singed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-10-14 22:09:39 +08:00
Lv Zheng
b7a5ea382b EFI: Fix build issues introduced by recent utility changes
This patch fixes build issues introduced by recent change. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-08-17 16:33:12 +08:00
Robert Moore
e2e72a3512 Cleanup for all string-to-integer conversions
Consolidate multiple versions of strtoul64 to one common version.
limit possible bases to either 10 or 16.
Handles both implicit and explicit conversions.
Added a 2-character ascii-to-hex function for GPEs and buffers.
Adds a new file, utsrttoul64.c
2016-08-12 10:20:29 -07:00
Robert Moore
265637ff2a iASL: Split help screens to a new file
Adds aslhelp.c
2016-07-29 14:12:31 -07:00
Robert Moore
fd167da830 Merge pull request #154 from zetalog/acpica-efi2
Acpica efi2
2016-07-26 10:32:17 -07:00
Lv Zheng
1a10d98611 EFI: Move EFI specific files to os_specific/efi
This patch moves EFI specific stuffs to os_specific/efi. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-07-22 23:50:01 +08:00
Lv Zheng
1342ddbc61 EFI: Add build instructions for EFI porting
This patch adds a build instruction file for EFI porting. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-07-22 23:48:23 +08:00
Lv Zheng
790b8bae85 EFI: Port acpidump to EDK2 environment
This patch adds necessary build files for EDK2 environment to build ACPICA
tools.
The command steps of building edk2 binaries are (if you are using gcc4.7):
  # cd edk2
  # . ./edksetup.sh
  # ln -s <path to acpica> AcpiPkg
  # AcpiPkg/generate/efi/edksetup.sh
  # build -p AcpiPkg/AcpiPkg.dsc -t GCC47
Note the above build test was done in Linux, and the Windows hasn't been
tested when this patch is generated. For building edk2 binaries in the MSVC
environment, you need to modify acpidump.inf, adding necessary options when
they cannot pass the build in the following configure items:
MSFT:*_*_IA32_CC_FLAGS/MSFT:*_*_X64_CC_FLAGS. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-07-22 23:48:23 +08:00
Lv Zheng
ac7a6802b5 MSVC6: Update project files for EFI porting
Removing oslibcfs.c for EFI porting changes.
Also updating according to the recent changes. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-07-22 23:48:22 +08:00
Lv Zheng
692fb3fa7d MSVC9: Update project files for EFI porting
oslibcfs.c has been deleted in the EFI porting, so update vcproj files
accordingly. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-07-22 23:48:22 +08:00
Lv Zheng
189429fb7d Clib: Eliminate AcpiOsXXXFile()/AcpiLogError and link clibrary fxxx()/errno/perror() instead
This patch follows new ACPICA design, eliminates old portable OSLs, and
implements fopen/fread/fwrite/fclose/fseek/ftell for GNU EFI
environment. This patch also eliminates AcpiLogError(), convering them
into fprintf(stderr)/perror(). Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-07-22 23:48:21 +08:00
Lv Zheng
d261d40ea1 Clib: Add -nostdinc support for EFI layer
This patch adds sprintf()/snprintf()/vsnprintf()/printf()/vfprintf()
support for OSPMs that have ACPI_USE_SYSTEM_CLIBRARY defined but do not
have ACPI_USE_STANDARD_HEADERS defined.

-iwithprefix include is required to include <stdarg.h> which contains
compiler specific implementation of vargs when -nostdinc is specified.
-fno-builtin is required for GCC to avoid optimization performed printf().
This optimization cannot be automatically disabled by specifying -nostdlib.
Please refer to the Link 1 for the details. Lv Zheng.

Link 1: http://www.ciselant.de/projects/gcc_printf/gcc_printf.html
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-07-22 23:48:21 +08:00
Lv Zheng
6c6d57360b MSVC9: Cleanup project file for AslCompiler
MSVC9 project file for AslCompiler contains file specific configurations
which are either default (same as project wide configuraiton) or wrong:
1. DisableLanguageExtensions should always be true except for oswinxf.c;
2. No file should define ACPI_DEBUGGER separately.
This patch cleansup such file specific configurations.

Note that yacc/lex related file specific configurations are not changed in
this patch. Lv Zheng

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-07-22 23:48:20 +08:00
Lv Zheng
0e5f76719f MSVC9: Cleanup project file for AcpiXtract
MSVC9 project file for AcpiXtract contains a file specific
configuration which is default (same as project wide configuraiton).

This patch cleansup such file specific configuration. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-07-22 23:48:19 +08:00
Lv Zheng
043fdd5c2a MSVC9: Cleanup project file for AcpiSubsystem
MSVC9 project file for AcpiSubsystem contains file specific configurations
which are either default (same as project wide configuraiton) or wrong:

1. DisableLanguageExtensions (only oswinxf.c should stop using /Za)
   utmath.c/hwtimer.c: They should always use /Za.
2. ExcludeFromBuild
   Some files originally were not built by the Linux kernel. The situation
   has been changed recently because of the debugger porting. This patch
   also updates build excludes in order to test Linux kernel builds in the
   ACPICA development environment:
   nsdump.c/rsdump.c/rsdumpinfo.c/exdump.c:
     They are built by Linux kernel.
   utclib.c/utprint.c/utuuid.c/dbfile.c:
     They are not built by Linux kernel.
   utdebug.c:
     It should be built for debug version, shouldn't be built for release
     version.

This patch cleansup such file specific configurations. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-07-22 23:48:19 +08:00
Lv Zheng
7dc145d9bd MSVC9: Cleanup project file for AcpiSrc
MSVC9 project file for AcpiSrc contains a file specific configuration
which is default (same as project wide configuraiton).

This patch cleansup such file specific configuration. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-07-22 23:48:19 +08:00
Lv Zheng
68fdc6be1a MSVC9: Cleanup project file for AcpiNames
MSVC9 project file for AcpiNames contains file specific configurations
which are either default (same as project wide configuraiton) or wrong:
1. utmath.c/aeexec.c/aemain.c:
   DisableLanguageExtensions should always be true except for oswinxf.c;
2. ACPI_DEBUGGER
   ACPI_DEBUGGER needn't be specified as ACPI_EXEC_APP has already convered
   this;

This patch cleansup such file specific configurations. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-07-22 23:48:18 +08:00
Lv Zheng
126276cc48 MSVC9: Cleanup project file for AcpiHelp
MSVC9 project file for AcpiHelp contains file specific configurations which
are either default (same as project wide configuraiton) or wrong
(DisableLanguageExtensions should always be true except for oswinxf.c).

This patch cleansup such file specific configurations. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-07-22 23:48:18 +08:00
Lv Zheng
1ceded824c MSVC9: Cleanup project file for AcpiExec
MSVC9 project file for AcpiExec contains file specific configurations which
are either default (same as project wide configuraiton) or wrong:
1. utmath.c/aeexec.c/aemain.c:
   DisableLanguageExtensions should always be true except for oswinxf.c;
2. ACPI_DEBUGGER
   ACPI_DEBUGGER needn't be specified as ACPI_EXEC_APP has already convered
   this;

This patch cleansup such file specific configurations. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-07-22 23:48:18 +08:00
Lv Zheng
62b75ec4ba MSVC9: Cleanup project file for AcpiDump
MSVC9 project file for AcpiDump contains a file specific configuration
which is default (same as project wide configuraiton).

This patch cleansup such file specific configuration. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-07-22 23:48:17 +08:00
Lv Zheng
6e926d4a92 MSVC9: Cleanup project file for AcpiBin
MSVC9 project file for AcpiBin contains file specific configurations which
are either default (same as project wide configuraiton) or wrong
(DisableLanguageExtensions should always be true except for oswinxf.c).

This patch cleansup such file specific configurations. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-07-22 23:48:17 +08:00
Lv Zheng
903efa767a EFI/acpidump: Add a missing object file which is split recently
This patch adds utnonansi.o/utascii.o/uadebug.o to EFI builds. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-07-22 23:48:13 +08:00
Marcelo Ferreira
80a01a2af2 EFI: Remove SHARED=false usage by enforcing -no-undefined
We've been using SHARED=false to capture unported stuff. However it can be
captured using -no-undefined. This patch removes SHARED option and adds
-no-undefined. Original by Marcelo Ferreira <joamarcelo@gmail.com>,
Improved by Lv Zheng <lv.zheng@intel.com>

Signed-off-by: Marcelo Ferreira <joamarcelo@gmail.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-07-22 23:48:12 +08:00
Thomas Petazzoni
0ba20f5f86 generate/unix/Makefile.common: remove HARDWARE_NAME
The HARDWARE_NAME variable is only used to display some messages saying
whether a 32-bit or a 64-bit build was done, which is pretty
useless. This commit gets rid of this variable entirely.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-05 10:08:51 +02:00
Robert Moore
badd47cbd3 Revert "Update for local 64-bit version of strtoul"
This reverts commit 43fa9b91b4c4d74290664a98b54a3facb3434cd7.
Needs extra partitioning to handle the multiple "types" of
string-to-integer conversions defined in the ACPI spec.
2016-06-30 12:17:37 -07:00
Robert Moore
43fa9b91b4 Update for local 64-bit version of strtoul
Update function AcpiUtStrtoul64:
Remove dead code.
Restructure to eliminate support for all numeric bases, only
base 16 and base 10 are needed.
Split off the base 10 and base 16 support into separate functions.
Added new exception for overflow during conversion.
Improved error detection and handling.
2016-06-30 08:19:21 -07:00
Robert Moore
135865a19d AcpiHelp: Add support for AML flags values and other grammar
All flags values, name grammar, package length encoding, etc.
Adds a new startup option, -g
2016-06-24 09:49:55 -07:00
Robert Moore
d776c9ee6e Revert "Efi edk2" 2016-06-15 10:51:12 -07:00
Robert Moore
8aac0be3c8 Merge pull request #143 from zetalog/efi-edk2
Efi edk2
2016-06-15 10:33:47 -07:00
Robert Moore
e62fd48444 iASL: update makefile
Don't use new bison file (internal file for now).
2016-06-10 18:42:24 -07:00
Robert Moore
5eb659ffbb iASL: Split some of the ASL parse rules files.
Broken into more logical groups of rules.i
2016-06-10 10:34:08 -07:00
Lv Zheng
4de4519bb6 EFI/acpiexec: Add EFI support for acpiexec
This patch enables acpiexec for EFI environment. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-06-06 12:58:34 +08:00
Lv Zheng
a33ba9f856 Clib: Eliminate AcpiOsXXXFile()/AcpiLogError and link clibrary fxxx()/errno/perror() instead
This patch follows new ACPICA design, eliminates old portable OSLs, and
implements fopen/fread/fwrite/fclose/fseek/ftell for GNU EFI
environment. This patch also eliminates AcpiLogError(), convering them
into fprintf(stderr)/perror(). Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-06-06 12:58:29 +08:00
Lv Zheng
70e4161656 Clib: Add -nostdinc support for EFI layer
This patch adds sprintf()/snprintf()/vsnprintf()/printf()/vfprintf()
support for OSPMs that have ACPI_USE_SYSTEM_CLIBRARY defined but do not
have ACPI_USE_STANDARD_HEADERS defined.

This patch also converts the entire EFI porting layer to use the standard
system Clibrary and implements GNU EFI specific standard Clibrary stdio
operations.

-fno-builtin is required for GCC to avoid optimization performed printf().
This optimization cannot be automatically disabled by specifying -nostdlib.
Please refer to the Link 1 for the details.
-iwithprefix include is required to include <stdarg.h> which contains
compiler specific implementation of vargs. It is unclear why there is the
vargs macros defined for OSPMs that do not have ACPI_USE_SYSTEM_CLIBRARY
defined. After applying this patch, this special vargs implementation
should also get deleted.

Standard C header files shouldn't be included here and there throughout the
entire ACPICA code base. This patch corrects some of them. Lv Zheng.

Link 1: http://www.ciselant.de/projects/gcc_printf/gcc_printf.html
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-06-06 12:58:28 +08:00
Lv Zheng
3a81e13d16 EFI: Add a missing object file which is split recently
This patch adds utnonansi.o linkage to EFI builds. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2016-06-06 12:58:26 +08:00
Robert Moore
702b3e3fdb Update ACPICA build/release instructions
Some changes for the recent website changes.
2016-04-22 08:26:15 -07:00
Robert Moore
2cf7a84384 Update makefiles/project-files for new source file
New file is utascii.c
2016-04-19 10:10:04 -07:00