Skip to content

Commit

Permalink
EFI/EDK2: Add support to compile acpidump.efi on Windows
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
smwikipedia authored and Lv Zheng committed Jul 7, 2017
1 parent 167e48f commit 33cd54c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions generate/efi/acpidump/acpidump.inf
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
BaseLib

[BuildOptions]
MSFT:*_*_IA32_CC_FLAGS = /Oi- /WX- /D_EDK2_EFI /DACPI_DUMP_APP
MSFT:*_*_X64_CC_FLAGS = /Oi- /WX- /D_EDK2_EFI /DACPI_DUMP_APP
MSFT:*_*_IA32_CC_FLAGS = /GL- /Oi- /WX- /D_EDK2_EFI /DUSE_MS_ABI /D__i386__ /DACPI_DUMP_APP
MSFT:*_*_X64_CC_FLAGS = /GL- /Oi- /WX- /D_EDK2_EFI /DUSE_MS_ABI /D__x86_64__ /DACPI_DUMP_APP
GCC:*_*_IA32_CC_FLAGS = -U__linux__ -U_LINUX -D_EDK2_EFI -DACPI_DUMP_APP -fno-builtin -iwithprefix include
GCC:*_*_X64_CC_FLAGS = -U__linux__ -U_LINUX -D_EDK2_EFI -DACPI_DUMP_APP -fno-builtin -iwithprefix include
4 changes: 2 additions & 2 deletions source/include/acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,14 @@
* Note: The order of these include files is important.
*/
#include "platform/acenv.h" /* Environment-specific items */
#include "acnames.h" /* Common ACPI names and strings */
#include "actypes.h" /* ACPICA data types and structures */
#include "platform/acenvex.h" /* Extra environment-specific items */
#include "acnames.h" /* Common ACPI names and strings */
#include "acexcep.h" /* ACPICA exceptions */
#include "actbl.h" /* ACPI table definitions */
#include "acoutput.h" /* Error output and Debug macros */
#include "acrestyp.h" /* Resource Descriptor structs */
#include "acpiosxf.h" /* OSL interfaces (ACPICA-to-OS) */
#include "acpixf.h" /* ACPI core subsystem external interfaces */
#include "platform/acenvex.h" /* Extra environment-specific items */

#endif /* __ACPI_H__ */

0 comments on commit 33cd54c

Please sign in to comment.