19 Commits

Author SHA1 Message Date
Erik Schmauss
ff5a9c5437 Trivial: fix spelling mistakes
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
2019-02-14 15:14:57 -08:00
Lv Zheng
dfebc3a7a4 EFI: Fix missing utstrsuppt.o build
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>
2017-09-20 12:42:46 +08:00
Lv Zheng
a7c6d65a5d EFI/EDK2: Enable /WX for MSVC builds
/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>
2017-07-13 14:32:15 +08:00
Shao, Ming
f9450316d8 EFI/EDK2: Add support to compile acpidump.efi with StdLib
This patch ports acpidump EDKII build to the environment where EDKII
internal C-library StdLib is used. Shao Ming.

Signed-off-by: "Shao, Ming" <smbest163@163.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2017-07-13 14:21:48 +08:00
Lv Zheng
4683013633 EFI/EDK2: Allow StdLib target to use different inf/dsc files
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>
2017-07-13 14:14:26 +08:00
Shao Ming
43ff22215f EFI/EDK2: Add support to compile acpidump.efi on Windows
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>
2017-07-13 14:14:16 +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
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
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
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
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
David E. Box
6f05abc1e6 Unix makefiles: Separate option to disable optimizations and _FORTIFY_SOURCE
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>
2014-12-22 15:36:47 -08:00
Lv Zheng
6d94e241e3 EFI: Add EFI support for acpidump.
This patch enables acpidump for EFI. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2014-06-12 15:16:23 +08:00
Lv Zheng
da73e87ad9 EFI: Add generic OSL support for GNU EFI development.
This patch adds generic OSL for GNU EFI shell development.

The following files are enhanced with GNU EFI builds:
1. os_specific/service_layers/osefixf.c
2. include/platform/acefi.h

Note that this patch only uses GNU EFI definitions and the following 2
implementations:
1. Linking GNU EFI entry point and we implements efi_main();
2. Linking DivU64x32 to perform division.
This is because:
1. We do not want to maintain architecture specific code in ACPICA, the
   entry point and division implementation are architecture specific;
2. We do not want to define all EFI structures/macros again to inflate our
   initial implementation. Since for non-architecture specific code, we
   should try our best to implement our own to be more portable, we may
   redefine these stuff in the future as they are not architecture
   specific.

Note that linking DivU64x32() to implement ACPI_DIV_64_BY_32() can produce
correct division result for AcpiUtDivide(), but it is not performance
friendly as the two APIs have different meanings. This definitely will slow
down the applications. There is no architecture specific API in GNU EFI
that has implemented the same meaning as ACPI_DIV_64_BY_32(), so we have no
choice. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2014-06-12 15:16:22 +08:00
Lv Zheng
3d7add2b94 EFI: Add build environment support for GNU EFI development.
This patch adds build environment for GNU EFI shell development.

Note that only the Makefiles used by EFI development are created in this
patch, actual OSL is not implemented and ACPICA applications are enabled in
this patch. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
2014-06-12 15:16:22 +08:00