AcpiUtSafeStrncpy - copy and terminate string. Strncpy is not
guaranteed to terminate the copied string if the input is longer
than the length of the target.
The following commit added utstrsuppt.c but didn't update EFI build
files, and hence triggered build problems:
Commit: 610046d444ad781cc36673bf1f030abe50cbc61f
Subject: Restructure/cleanup all string-to-integer conversion functions
The following patch adds utstrsuppt.c build support to fix the issue.
Reported by Li, ZhijianX and Li, Philip, fixed by Lv Zheng.
Link: https://jira01.devtools.intel.com/browse/OLT-1390
Reported-and-tested-by: Li, ZhijianX <zhijianx.li@intel.com>
Reported-by: Philip Li <philip.li@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
This module was not being included in any ACPICA tool, and thus
not even built until it was included in a kernel.
Also add a few small tests in acpiexec that invoke the timer
interfaces in hwtimer.
Improve adherence to ACPI spec for implicit and explicit conversions
Adds octal support for constants in ASL code
Adds integer overflow errors for constants during ASL compilation
Eliminates most of the existing complex flags parameters
Simplify support for implicit/explicit runtime conversions
Adds one new file, utilities/utstrsuppt.c
This change defers the resolution of package elements that
are named references until after the entire namespace has been
loaded from the definition block. This allows such references
to be in fact forward references for both module level code
and control methods.
/WX turns warning into fatal erros for MSVC builds. We need /WX- during
EDK2 porting to allow agile development.
Now it is time to enable /WX. Lv Zheng.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
This patch adds support in edksetup.sh to allow StdLib build target to
use different inf/dsc files. Lv Zheng.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Several changes are needed to compile EDK-II port of acpidump on
Windows:
1. sort acpi.h inclusion: va_list is used before it's definition, we
only need to ensure order of acenv.h/acenvex.h/actypes.h.
2. /GL-: enabling global optimization causes memset() to be linked by
MSVC builds.
3. /DUSE_MS_ABI: to enable simpler uefi_call_wrapper().
4. /D__x86_64__|__i386__: they are strictly required by ACPICA headers,
but not defined by MSVC.
Signed-off-by: "Shao, Ming" <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Fix some confusion between "parse op" and "parse node".
Adds a new file, aslparseop.c
Consistently use "parse op" to describe the elements of the
parse tree data structure.
An "Op" is the primary data structure element, even though
it sounds odd.
Converter related structures are released to Linux kernel while they
are not correctly linuxized. This patch fixes this issue. Lv Zheng.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
There are enough of these strings to justify a separate file.
Also, these strings are only used for the disassembler and
the debugger. Thus, this change improves ACPICA modularity.
Changes the resource descriptor parse tree walk to a general
preprocessing walk and calls the Switch conversion code from here.
Move Switch code to new dmswitch.c file. Also improves algorithm to
handle multiple levels of Switch statements and perform legacy
disassembly for older or otherwise non-spec compliant Switch
implementations.
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
This is to facilitate compiling ACPICA tools as 32-bit programs on 64-bit machines.
To build as 32 bit programs, set the M32 variable to true when running make
Example: make M32=TRUE
Note: if the above results in a compilation error, there is a possibility
that 32-bit libraries may not be installed. If this is the case, run the
following command (on Ubuntu compiling with gcc)
sudo apt-get install g++-multilib libc6-dev-i386
and run make again.
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
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)
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>
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>
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>
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>
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>
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>
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>