EFI: Add OSL supports for those can be empty.

This patch adds OSLs that can be empty under EFI environment. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Yizhe Wang <yizhe.wang@intel.com>
EFI: Add stubs for multi-threading OSLs to make EFI ported applications running.

This patch only adds stub supports for multi-threading OSLs to make
EFI ported application running.

In order to fully support acpiexec in a non multi-threading environment,
ACPICA core itself need to be upgraded to contain full asynchrnous support.
Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Yizhe Wang <yizhe.wang@intel.com>
EFI: Add stubs for hardware access OSLs to make EFI ported applications running.

This patch only adds stub supports for hardware access OSLs to make EFI
ported application running.

This patch adds the following OSLs for efi:
1. AcpiOsInstallInterruptHandler()/RemoveInterruptHandler().
2. AcpiOsReadPort()/AcpiOsWritePort().
3. AcpiOsReadMemory()/AcpiOsWriteMemory().
3. AcpiOsReadPciConfigration()/AcpiOsWritePciConfiguration().
Currently we will not support real hardware accesses in the EFI
environment, so they can stay stubs. Yizhe Wang.

Signed-off-by: Yizhe Wang <yizhe.wang@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
EFI: Add table OSL supports for acpiexec.

This patch implements table OSLs for acpiexec in EFI environment:
1. Adds AcpiOsTableOverride() to use acpiexec loaded xSDT tables.
2. Adds a stub AcpiOsPhysicalTableOverride().
Note that currently we only support emulator mode acpiexec in EFI
environment, thus all table overrides, RSDP location are implemented in the
same way as its windows/unix versions. Yizhe Wang.

Signed-off-by: Yizhe Wang <yizhe.wang@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
EFI: Add AcpiOsGetTimer() support.

This patch adds AcpiOsGetTimer() support for EFI environment.
Note that currently we don't support timezone. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
EFI: Add AcpiOsStall()/AcpiOsSleep() support.

This patch adds AcpiOsStall() and AcpiOsSleep() support.
Currently we do not support asynchronous polling of key stroke and timer,
so AcpiOsSleep() is simply an invocation of AcpiOsStall(). Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
EFI/acpiexec: Replace printf() with ACPI_PRINTF() wrapper to improve portability.

This patch changes printf() invoked in acpiexec into ACPI_PRINTF()
wrapper. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Yizhe Wang <yizhe.wang@intel.com>
EFI/acpiexec: Replace C library string invocations with wrappers to improve portability.

This patch improves portability by replacing clib string functions with
ACPICA wrapper utilities. Yizhe Wang.

Signed-off-by: Yizhe Wang <yizhe.wang@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
EFI/acpiexec: Remove all exit() invocations.

We cannot link an exit() implementation in EFI shell. This patch tunes
acpiexec to use "return" statement instead. This patch also returns -1 for
"-?" option so that acpiexec will not enter interactive mode unexpectedly.
Yizhe Wang.

Signed-off-by: Yizhe Wang <yizhe.wang@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
EFI/acpiexec: Add stubs for Ctrl+C signal handling.

Currently we do not support console termination caused by Ctrl+C for EFI
environment. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
EFI/acpiexec: Add EFI support for acpiexec.

This patch enables acpiexec for EFI environment. Yizhe Wang.

Signed-off-by: Yizhe Wang <yizhe.wang@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
EFI/acpixtract: Replace C library invocations with wrappers to improve portability.

This patch replaces C library invocations with wrapper utilities to improve
portability. Yizhe Wang.

Signed-off-by: Yizhe Wang <yizhe.wang@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
EFI/acpixtract: Remove all exit() invocations.

We cannot link an exit() implementation in EFI shell. This patch tunes
acpixtract to use "return" statement instead. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
EFI/acpixtract: Remove scanf() invocations to improve portability.

Currently, scanf() in acpixtract is the only invocation that requires a
portable ACPI_SCANF() to be implemented for EFI environment. This patch
converts this piece of code not to use scanf() so that we don't have to
implement ACPI_SCANF(). Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
EFI/acpixtract: Add EFI support for acpixtract.

This patch enables acpixtract for EFI environment. Yizhe Wang.

Signed-off-by: Yizhe Wang <yizhe.wang@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>