summaryrefslogtreecommitdiff
path: root/generate/unix
Commit message (Collapse)AuthorAgeFilesLines
* acpihelp: Update makefiles for new filesRobert Moore2016-12-081-0/+2
| | | | Added ahasl.c and ahaml.c
* Debugger: Convert some mechanisms to OSPM specificLv Zheng2016-11-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Cleanup for all string-to-integer conversionsRobert Moore2016-08-126-0/+7
| | | | | | | | 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
* iASL: Split help screens to a new fileRobert Moore2016-07-291-0/+1
| | | | Adds aslhelp.c
* Merge pull request #154 from zetalog/acpica-efi2Robert Moore2016-07-269-20/+2
|\ | | | | Acpica efi2
| * Clib: Eliminate AcpiOsXXXFile()/AcpiLogError and link clibrary ↵Lv Zheng2016-07-229-9/+0
| | | | | | | | | | | | | | | | | | | | | | 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>
| * Clib: Add -nostdinc support for EFI layerLv Zheng2016-07-229-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Revert "Update for local 64-bit version of strtoul"Robert Moore2016-06-303-3/+0
| | | | | | | | | | | | This reverts commit 43fa9b91b4c4d74290664a98b54a3facb3434cd7. Needs extra partitioning to handle the multiple "types" of string-to-integer conversions defined in the ACPI spec.
* | Update for local 64-bit version of strtoulRobert Moore2016-06-303-0/+3
| | | | | | | | | | | | | | | | | | | | 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.
* | AcpiHelp: Add support for AML flags values and other grammarRobert Moore2016-06-241-0/+1
| | | | | | | | | | All flags values, name grammar, package length encoding, etc. Adds a new startup option, -g
* | Revert "Efi edk2"revert-143-efi-edk2Robert Moore2016-06-159-2/+11
| |
* | Merge pull request #143 from zetalog/efi-edk2Robert Moore2016-06-159-11/+2
|\ \ | | | | | | Efi edk2
| * | Clib: Eliminate AcpiOsXXXFile()/AcpiLogError and link clibrary ↵Lv Zheng2016-06-069-11/+2
| |/ | | | | | | | | | | | | | | | | | | | | 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>
* | iASL: update makefileRobert Moore2016-06-101-1/+0
| | | | | | | | Don't use new bison file (internal file for now).
* | iASL: Split some of the ASL parse rules files.Robert Moore2016-06-101-3/+6
|/ | | | Broken into more logical groups of rules.i
* Update makefiles/project-files for new source fileRobert Moore2016-04-198-0/+8
| | | | New file is utascii.c
* Do not use "-o" option at all.Jung-uk Kim2016-03-231-3/+5
| | | | | | | "-o" option is an extension for GNU Bison. Although many modern POSIX yacc implementations have this extension now, POSIX itself does not support it. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/yacc.html
* Work around a Berkeley Yacc (byacc) bug, simplify, and clean up.Jung-uk Kim2016-03-221-6/+6
| | | | | | | | | | | - byacc has a bug in "-o" option parsing. Prefix may not be set properly if its argument contains ".c" somewhere before the actual output file name. With "byacc -ofoo.cXXXXX/foo.c -d foo.y", for example, it generates "foo.h" instead of "foo.cXXXXX/foo.h" because ".cXXXXX/foo.c" is replaced with ".h". - Prefer a GNU make built-in function, suffix(), rather than a series of complex variable substitutions, to improve readability. - Use symbol prefix for output file name to reduce external command uses. - Exit with a meaningful exit status to make it more like a real function.
* Add support for QNX 6.6 platform.Will Miles2016-03-084-0/+24
|
* iASL: Split support for ToPLD macro to a new fileRobert Moore2016-03-031-0/+1
| | | | Adds aslpld.c
* Intepreter: Add object extensions to Concatenate operandRobert Moore2016-02-193-0/+3
| | | | | | | | | Allows all object types to be used with Concatenate. Objects other than Int/Str/Buf are convert to a string that contains the type of the object. Improves the utility of the Printf and Fprintf macros. Adds a new file, exconcat.c
* iASL: Add support for option to create cross-reference fileRobert Moore2016-02-111-0/+1
| | | | | -lx option: creates a large, multiple cross-reference file. Intended mostly for BIOS developers.
* ACPI 6.0/iASL: Add support for the External AML opcodeRobert Moore2016-01-291-0/+1
| | | | | | | Support for both the compiler and disassembler. Also, the interpreter will ignore this opcode if it is ever encountered (should not happen). David Box.
* iASL: Update for parse tree debug outputRobert Moore2016-01-221-0/+1
| | | | | | 1) Cleanup output 2) Enhance output with additional data (namestrings, etc.) 3) Adds a new file: asldebug.c
* Disassembler/tools: Support for multiple ACPI tables in one fileRobert Moore2015-11-053-3/+5
| | | | Matches the support in iASL and AcpiExec.
* Update makefiles/project-files for new acpixtract filesRobert Moore2015-10-231-0/+1
| | | | New files: acpixtract.h, axutils.c
* iASL: Split large data table compiler file into three filesRobert Moore2015-10-161-0/+2
| | | | dttable.c -> dttable, dttable1, dttable2
* Split interpreter tracing functions to a new fileRobert Moore2015-10-132-0/+2
| | | | Split out functions from exdebug.c to extrace.c
* Makefiles: Do not use -Woverride-init on some systemsRobert Moore2015-09-251-5/+5
| | | | Not available on FreeBSD or Apple.
* iASL: Additional restructuring of main parser rule files.Robert Moore2015-08-201-0/+1
| | | | Adds aslresources.y
* iASL: Split rules for symbolic operators to a new file.Robert Moore2015-08-201-0/+1
| | | | Adds aslcstyle.y
* Merge pull request #92 from juikim/masterRobert Moore2015-08-141-17/+18
|\ | | | | iASL: Support POSIX yacc again.
| * Set a variable before use. No functional change.Jung-uk Kim2015-08-061-1/+1
| |
| * iASL: Support POSIX yacc again.Jung-uk Kim2015-07-201-17/+18
| |
* | acpinames: Add new options and wildcard support.Robert Moore2015-08-051-0/+2
|/ | | | | | | - Add wilcard support for input filenames. - Add -l option to load tables and exit, no display. This is useful for validation of the namespace during BIOS generation. - Add -x option for specifying debug level.
* Makefiles: For "clean", add generic removal of *.o files.Robert Moore2015-07-161-1/+1
| | | | | | This ensures that all object files are deleted. This is especially important for files that have been made obsolete by makefile changes.
* Makefile/iASL: Remove obsolete dmobject.c file.Robert Moore2015-07-151-1/+0
| | | | This file no longer exists.
* Debugger: Move debugger specific APIs to debugger component.Lv Zheng2015-07-071-1/+1
| | | | | | | Some disassembler APIs should rather be debugger APIs. This patch moves them to the debugger folder to be ready for debugger porting. Signed-off-by: Lv Zheng <lv.zheng@intel.com>
* Cleanup use of all non-ANSI local C library functions.Robert Moore2015-06-267-0/+8
| | | | | | | | ACPICA implements all non-ANSI functions locally. However, there are sometimes two or more versions of the same function throughout the ACPICA code. This change fixes this. Adds a new file, utilities/utnonansi.c
* Update project/makefiles for method tracing feature.Robert Moore2015-06-252-2/+0
| | | | Also add stubs for some of the tracing functions.
* Executer: Add interpreter tracing mode for method tracing facility.Lv Zheng2015-06-102-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The AcpiDebugTrace() is the mechanism known as ACPI method tracing that is used by Linux as ACPICA debugging message reducer. This facility can be controlled through Linux ACPI subsystem - /sys/module/acpi/parameters. This facility requires CONFIG_ACPI_DEBUG to be enabled to see ACPICA trace logs in the kernel dmesg output. This patch enhances AcpiDebugTrace() to make it not only a message reducer, but a real tracer to trace AML interpreter execution. Note that in addition to the AML tracer enabling, this patch also updates the facility with the following enhancements: 1. Allow a full path to be specified by the AcpiDebugTrace() API. 2. Allow any method rather than just the entrance of AcpiEvaluateObject() to be traced. 3. All interpreter ACPI_LV_TRACE_POINT messages are collected for ACPI_EXECUTER layer. This patch also updates "trace" command to allow it to perform all Linux method tracing functionalities: 1. "trace aml" to always enable AML execution trace messages (level=TRACE_POINT, layer=EXECUTER) for all control methods. 2. "trace aml \MTHD" to always enable AML execution trace messages for only \MTHD method. 3. "trace aml \MTHD once" to enable AML execution trace messages only once for only \MTHD method. 4. "trace enable" to always enable all trace messsages (level=ALL, layer=ALL) for all control methods. 5. "trace enable \MTHD" to always enable all trace messages for only \MTHD method. 6. "trace enable \MTHD once" to enable all trace messages only once for only \MTHD method. 7. "trace disable" to disable trace facility. The Makefiles of acpinames/iasl are also updated to include exdebug.o and the duplicated stubs are removed after that. Note that since this patch has enhanced the method tracing facility, Linux need also be updated after applying this patch. Lv Zheng. Signed-off-by: Lv Zheng <lv.zheng@intel.com>
* Dispatcher: Move stack traversal code to dispatcher.Lv Zheng2015-06-102-0/+2
| | | | | | | | | | | | | | | This patch moves parts of AcpiDmDumpMethodInfo() to the dispatcher component. This patch also makes the new function dependent on ACPI_DEBUG_OUTPUT compile-stage definition so that it can be used by the trace facility. AcpiDmDumpMethodInfo() traverses method stack when an exception is encountered. Such traversal is needed to support method tracing for the exceptions. When an exception is encountered, the end indications of the aborted methods should be logged in order not to break the user space analysis tool. Lv Zheng. Signed-off-by: Lv Zheng <lv.zheng@intel.com>
* AcpiHelp: Add option to display all known/supported ACPI tables.Robert Moore2015-05-132-0/+2
| | | | -t option displays all ACPI tables.
* Additional DragonFly BSD support.Robert Moore2015-04-102-0/+8
| | | | Makefiles and environment defines.
* Rename osfreebsdtbl.c to osbsdtbl.c and reuse it on NetBSDKamil Rytarowski2015-03-081-1/+9
|
* Add new HOST type: _NetBSDKamil Rytarowski2015-03-081-1/+4
|
* Unix makefiles: Add C99 support option.Robert Moore2015-02-271-1/+1
| | | | Adds -std=c99 option to the makefiles. Replaces -ansi flag.
* Unix makefiles: Separate option to disable optimizations and _FORTIFY_SOURCEDavid E. Box2014-12-221-1/+9
| | | | | | | | | | This change removes the _FORTIFY_SOURCE flag from the NOOPT disable option and creates a separate flag (NOFORTIFY) for this purpose. Some toolchains may define _FORTIFY_SOURCE which leads redefined errors when building ACPICA. This allows disabling the option without also having to disable optimazations. ACPICA BZ 1127. Reported by Alan Stone <ahs3@redhat.com> Signed-off-by: David E. Box <david.e.box@linux.intel.com>
* iASL: Add support for Printf and Fprintf macros.Robert Moore2014-10-241-0/+1
| | | | | | | Printf stores to the debug object. Fprintf stores to any named object. %o is the main format specifier since only very limited typechecking can be performed at compile time.
* Disassembler: Add support for C-style operators and expressions.Robert Moore2014-10-242-8/+10
| | | | | Now emit ASL+ code which includes C-style operators. Optionally, legacy text ASL operators can still be emitted.