summaryrefslogtreecommitdiff
path: root/source/include/platform/acefi.h
diff options
context:
space:
mode:
authorRobert Moore <Robert.Moore@intel.com>2016-06-15 10:51:12 -0700
committerGitHub <noreply@github.com>2016-06-15 10:51:12 -0700
commitd776c9ee6e67f3b7a186d809763558ca7a358710 (patch)
tree22aee76d7f384a2553421abf763747a229bf0680 /source/include/platform/acefi.h
parent8aac0be3c840747a032b63e7365c99190e2a0ba9 (diff)
downloadacpica-d776c9ee6e67f3b7a186d809763558ca7a358710.tar.gz
Revert "Efi edk2"revert-143-efi-edk2
Diffstat (limited to 'source/include/platform/acefi.h')
-rw-r--r--source/include/platform/acefi.h91
1 files changed, 38 insertions, 53 deletions
diff --git a/source/include/platform/acefi.h b/source/include/platform/acefi.h
index 4de3607b8..a252b2cd9 100644
--- a/source/include/platform/acefi.h
+++ b/source/include/platform/acefi.h
@@ -116,12 +116,10 @@
#ifndef __ACEFI_H__
#define __ACEFI_H__
-#ifdef __GNUC__
-#include "acgcc.h"
-#endif
-
-#ifdef _MSC_VER
-#include "acmsvc.h"
+#include <stdarg.h>
+#if defined(_GNU_EFI)
+#include <stdint.h>
+#include <unistd.h>
#endif
#if defined(__x86_64__)
@@ -131,13 +129,23 @@
#endif
#ifdef _MSC_EXTENSIONS
-#define ACPI_EFI_API __cdecl
+#define EFIAPI __cdecl
#elif USE_MS_ABI
-#define ACPI_EFI_API __attribute__((ms_abi))
+#define EFIAPI __attribute__((ms_abi))
#else
-#define ACPI_EFI_API
+#define EFIAPI
#endif
+typedef uint8_t UINT8;
+typedef uint16_t UINT16;
+typedef int16_t INT16;
+typedef uint32_t UINT32;
+typedef int32_t INT32;
+typedef uint64_t UINT64;
+typedef int64_t INT64;
+typedef uint8_t BOOLEAN;
+typedef uint16_t CHAR16;
+
#define VOID void
#if defined(__ia64__) || defined(__x86_64__)
@@ -158,24 +166,23 @@
#endif
-#define UINTN uint64_t
-#define INTN int64_t
+typedef uint64_t UINTN;
+typedef int64_t INTN;
-#define ACPI_EFI_ERR(a) (0x8000000000000000 | a)
+#define EFIERR(a) (0x8000000000000000 | a)
#else
#define ACPI_MACHINE_WIDTH 32
#define ACPI_USE_NATIVE_DIVIDE
-#define UINTN uint32_t
-#define INTN int32_t
+typedef uint32_t UINTN;
+typedef int32_t INTN;
-#define ACPI_EFI_ERR(a) (0x80000000 | a)
+#define EFIERR(a) (0x80000000 | a)
#endif
-#define CHAR16 uint16_t
#ifdef USE_EFI_FUNCTION_WRAPPER
#define __VA_NARG__(...) \
@@ -262,16 +269,6 @@ UINT64 efi_call10(void *func, UINT64 arg1, UINT64 arg2, UINT64 arg3,
#endif
-
-/* EDK2 EFI definitions */
-
-#if defined(_EDK2_EFI)
-
-#define _GNU_EFI
-
-#endif
-
-
/* AED EFI definitions */
#if defined(_AED_EFI)
@@ -305,21 +302,14 @@ UINT64 efi_call10(void *func, UINT64 arg1, UINT64 arg2, UINT64 arg3,
#if defined(_GNU_EFI)
-#ifdef DEBUGGER_THREADING
-#undef DEBUGGER_THREADING
-#endif /* DEBUGGER_THREADING */
+/* Using GCC for GNU EFI */
-#define DEBUGGER_THREADING 0 /* integrated with DDB */
+#include "acgcc.h"
+#undef ACPI_USE_SYSTEM_CLIBRARY
#undef ACPI_USE_STANDARD_HEADERS
#undef ACPI_USE_NATIVE_DIVIDE
-#undef ACPI_USE_SYSTEM_INTTYPES
-
-/* AcpiExec configuration */
-
-#ifdef ACPI_EXEC_APP
-#define ACPI_DISABLE_OBJECT_OVERRIDE
-#endif
+#define ACPI_USE_SYSTEM_INTTYPES
/*
* Math helpers
@@ -340,23 +330,18 @@ UINT64 efi_call10(void *func, UINT64 arg1, UINT64 arg2, UINT64 arg3,
#endif
-struct _ACPI_SIMPLE_TEXT_OUTPUT_INTERFACE;
-struct _ACPI_SIMPLE_INPUT_INTERFACE;
-struct _ACPI_EFI_FILE_IO_INTERFACE;
-struct _ACPI_EFI_FILE_HANDLE;
-struct _ACPI_EFI_BOOT_SERVICES;
-struct _ACPI_EFI_RUNTIME_SERVICES;
-struct _ACPI_EFI_SYSTEM_TABLE;
-
-extern struct _ACPI_EFI_SYSTEM_TABLE *ST;
-extern struct _ACPI_EFI_BOOT_SERVICES *BS;
-extern struct _ACPI_EFI_RUNTIME_SERVICES *RT;
+struct _SIMPLE_TEXT_OUTPUT_INTERFACE;
+struct _SIMPLE_INPUT_INTERFACE;
+struct _EFI_FILE_IO_INTERFACE;
+struct _EFI_FILE_HANDLE;
+struct _EFI_BOOT_SERVICES;
+struct _EFI_SYSTEM_TABLE;
-typedef union acpi_efi_file ACPI_EFI_FILE;
+extern struct _EFI_SYSTEM_TABLE *ST;
+extern struct _EFI_BOOT_SERVICES *BS;
-#define FILE ACPI_EFI_FILE
-#define stdout ((FILE *) (ST)->ConOut)
-#define stderr ((FILE *) (ST)->ConOut)
-#define stdin ((FILE *) (ST)->ConIn)
+#define ACPI_FILE struct _SIMPLE_TEXT_OUTPUT_INTERFACE *
+#define ACPI_FILE_OUT ST->ConOut
+#define ACPI_FILE_ERR ST->ConOut
#endif /* __ACEFI_H__ */