aboutsummaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/compiler/aslcompiler.l2
-rw-r--r--source/compiler/aslfiles.c2
-rw-r--r--source/compiler/aslfold.c11
-rw-r--r--source/compiler/dtcompiler.h8
-rw-r--r--source/compiler/dtio.c14
-rw-r--r--source/components/hardware/hwxfsleep.c4
-rw-r--r--source/components/namespace/nssearch.c10
-rw-r--r--source/components/tables/tbutils.c21
-rw-r--r--source/components/utilities/utclib.c6
-rw-r--r--source/components/utilities/utxfinit.c11
-rw-r--r--source/include/acclib.h167
-rw-r--r--source/include/accommon.h3
-rw-r--r--source/include/acpixf.h2
-rw-r--r--source/include/actypes.h1
-rw-r--r--source/include/acutils.h136
-rw-r--r--source/include/platform/acefi.h31
16 files changed, 236 insertions, 193 deletions
diff --git a/source/compiler/aslcompiler.l b/source/compiler/aslcompiler.l
index d7b7e08370f9..e0b2423331b0 100644
--- a/source/compiler/aslcompiler.l
+++ b/source/compiler/aslcompiler.l
@@ -709,7 +709,7 @@ NamePathTail [.]{NameSeg}
return (PARSEOP_NAMESTRING); }
. { count (1);
- if (isprint (*AslCompilertext))
+ if (isprint ((int) *AslCompilertext))
{
sprintf (MsgBuffer,
"Invalid character (%c), expecting ASL keyword or name",
diff --git a/source/compiler/aslfiles.c b/source/compiler/aslfiles.c
index fcdc3c28d84a..2ad62ecc18a4 100644
--- a/source/compiler/aslfiles.c
+++ b/source/compiler/aslfiles.c
@@ -336,7 +336,7 @@ FlOpenIncludeWithPrefix (
*/
Gbl_CurrentLineNumber--;
OriginalLineNumber = Gbl_CurrentLineNumber;
- while (DtGetNextLine (IncludeFile) != ASL_EOF)
+ while (DtGetNextLine (IncludeFile, DT_ALLOW_MULTILINE_QUOTES) != ASL_EOF)
{
if (Gbl_CurrentLineBuffer[0] == '#')
{
diff --git a/source/compiler/aslfold.c b/source/compiler/aslfold.c
index 6baa081359d8..0b3ef8d166a9 100644
--- a/source/compiler/aslfold.c
+++ b/source/compiler/aslfold.c
@@ -236,6 +236,8 @@ OpcAmlCheckForConstant (
*/
if (WalkState->Opcode == AML_BUFFER_OP)
{
+ DbgPrint (ASL_PARSE_OUTPUT,
+ "\nBuffer+Buffer->Buffer constant reduction is not supported yet");
Status = AE_TYPE;
goto CleanupAndExit;
}
@@ -496,6 +498,10 @@ TrTransformToStoreOp (
goto EvalError;
}
+ /* Truncate any subtree expressions, they have been evaluated */
+
+ Child1->Asl.Child = NULL;
+
/* Folded constant is in ObjDesc, store into Child1 */
TrInstallReducedConstant (Child1, ObjDesc);
@@ -507,11 +513,6 @@ TrTransformToStoreOp (
UtSetParseOpName (Op);
Op->Common.Parent = OriginalParent;
- /* Truncate any subtree expressions, they have been evaluated */
-
- Child1->Asl.Child = NULL;
- Child2->Asl.Child = NULL;
-
/* First child is the folded constant */
/* Second child will be the target */
diff --git a/source/compiler/dtcompiler.h b/source/compiler/dtcompiler.h
index 765e61cadd3d..44fc56de812b 100644
--- a/source/compiler/dtcompiler.h
+++ b/source/compiler/dtcompiler.h
@@ -181,7 +181,13 @@ DtCompilePadding (
UINT32
DtGetNextLine (
- FILE *Handle);
+ FILE *Handle,
+ UINT32 Flags);
+
+/* Flags for DtGetNextLine */
+
+#define DT_ALLOW_MULTILINE_QUOTES 0x01
+
DT_FIELD *
DtScanFile (
diff --git a/source/compiler/dtio.c b/source/compiler/dtio.c
index 3b108ec5071d..41b46b525593 100644
--- a/source/compiler/dtio.c
+++ b/source/compiler/dtio.c
@@ -406,7 +406,8 @@ DtParseLine (
UINT32
DtGetNextLine (
- FILE *Handle)
+ FILE *Handle,
+ UINT32 Flags)
{
BOOLEAN LineNotAllBlanks = FALSE;
UINT32 State = DT_NORMAL_TEXT;
@@ -550,9 +551,12 @@ DtGetNextLine (
case '\n':
- AcpiOsPrintf ("ERROR at line %u: Unterminated quoted string\n",
- Gbl_CurrentLineNumber++);
- State = DT_NORMAL_TEXT;
+ if (!(Flags & DT_ALLOW_MULTILINE_QUOTES))
+ {
+ AcpiOsPrintf ("ERROR at line %u: Unterminated quoted string\n",
+ Gbl_CurrentLineNumber++);
+ State = DT_NORMAL_TEXT;
+ }
break;
default: /* Get next character */
@@ -746,7 +750,7 @@ DtScanFile (
/* Scan line-by-line */
- while ((Offset = DtGetNextLine (Handle)) != ASL_EOF)
+ while ((Offset = DtGetNextLine (Handle, 0)) != ASL_EOF)
{
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Line %2.2u/%4.4X - %s",
Gbl_CurrentLineNumber, Offset, Gbl_CurrentLineBuffer));
diff --git a/source/components/hardware/hwxfsleep.c b/source/components/hardware/hwxfsleep.c
index 7837c6f56bab..1642aa3e0d0d 100644
--- a/source/components/hardware/hwxfsleep.c
+++ b/source/components/hardware/hwxfsleep.c
@@ -51,11 +51,13 @@
/* Local prototypes */
+#if (!ACPI_REDUCED_HARDWARE)
static ACPI_STATUS
AcpiHwSetFirmwareWakingVector (
ACPI_TABLE_FACS *Facs,
ACPI_PHYSICAL_ADDRESS PhysicalAddress,
ACPI_PHYSICAL_ADDRESS PhysicalAddress64);
+#endif
static ACPI_STATUS
AcpiHwSleepDispatch (
@@ -171,7 +173,7 @@ AcpiSetFirmwareWakingVector (
if (AcpiGbl_ReducedHardware)
{
- return (AE_OK);
+ return_ACPI_STATUS (AE_OK);
}
if (AcpiGbl_Facs32)
diff --git a/source/components/namespace/nssearch.c b/source/components/namespace/nssearch.c
index c67abb59d3ff..bdd4e8684e1a 100644
--- a/source/components/namespace/nssearch.c
+++ b/source/components/namespace/nssearch.c
@@ -349,6 +349,11 @@ AcpiNsSearchAndEnter (
*/
if (Flags & ACPI_NS_OVERRIDE_IF_FOUND)
{
+ ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
+ "Namespace override: %4.4s pass %u type %X Owner %X\n",
+ ACPI_CAST_PTR(char, &TargetName), InterpreterMode,
+ (*ReturnNode)->Type, WalkState->OwnerId));
+
AcpiNsDeleteChildren (*ReturnNode);
if (AcpiGbl_RuntimeNamespaceOverride)
{
@@ -361,11 +366,6 @@ AcpiNsSearchAndEnter (
AcpiNsRemoveNode (*ReturnNode);
*ReturnNode = ACPI_ENTRY_NOT_FOUND;
}
-
- ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
- "Namespace override: %4.4s pass %u type %X Owner %X\n",
- ACPI_CAST_PTR(char, &TargetName), InterpreterMode,
- (*ReturnNode)->Type, WalkState->OwnerId));
}
/* Return an error if we don't expect to find the object */
diff --git a/source/components/tables/tbutils.c b/source/components/tables/tbutils.c
index 79dde9ac9735..df1e053fbfe8 100644
--- a/source/components/tables/tbutils.c
+++ b/source/components/tables/tbutils.c
@@ -76,13 +76,6 @@ AcpiTbInitializeFacs (
void)
{
- /* If there is no FACS, just continue. There was already an error msg */
-
- if (!AcpiGbl_FACS)
- {
- return (AE_OK);
- }
-
/* If Hardware Reduced flag is set, there is no FACS */
if (AcpiGbl_ReducedHardware)
@@ -95,20 +88,18 @@ AcpiTbInitializeFacs (
ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &AcpiGbl_Facs32));
(void) AcpiGetTableByIndex (ACPI_TABLE_INDEX_X_FACS,
ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &AcpiGbl_Facs64));
- if (!AcpiGbl_Facs32 && !AcpiGbl_Facs64)
- {
- return (AE_NO_MEMORY);
- }
- if (AcpiGbl_Use32BitFacsAddresses)
+ if (AcpiGbl_Facs64 && (!AcpiGbl_Facs32 || !AcpiGbl_Use32BitFacsAddresses))
{
- AcpiGbl_FACS = AcpiGbl_Facs32 ? AcpiGbl_Facs32 : AcpiGbl_Facs64;
+ AcpiGbl_FACS = AcpiGbl_Facs64;
}
- else
+ else if (AcpiGbl_Facs32)
{
- AcpiGbl_FACS = AcpiGbl_Facs64 ? AcpiGbl_Facs64 : AcpiGbl_Facs32;
+ AcpiGbl_FACS = AcpiGbl_Facs32;
}
+ /* If there is no FACS, just continue. There was already an error msg */
+
return (AE_OK);
}
#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/source/components/utilities/utclib.c b/source/components/utilities/utclib.c
index 6e3e9b4eb5b2..a93ed867a4d8 100644
--- a/source/components/utilities/utclib.c
+++ b/source/components/utilities/utclib.c
@@ -64,7 +64,6 @@
* instead of the functions in this module.
*/
-
/*******************************************************************************
*
* Functions implemented in this module:
@@ -88,7 +87,6 @@
*
******************************************************************************/
-
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME ("utclib")
@@ -772,13 +770,13 @@ tolower (
/*******************************************************************************
*
- * FUNCTION: is* functions
+ * FUNCTION: is* function array
*
* DESCRIPTION: is* functions use the ctype table below
*
******************************************************************************/
-const UINT8 _acpi_ctype[257] = {
+const UINT8 AcpiGbl_Ctypes[257] = {
_ACPI_CN, /* 0x00 0 NUL */
_ACPI_CN, /* 0x01 1 SOH */
_ACPI_CN, /* 0x02 2 STX */
diff --git a/source/components/utilities/utxfinit.c b/source/components/utilities/utxfinit.c
index cd43870b6ee9..701b171f68e2 100644
--- a/source/components/utilities/utxfinit.c
+++ b/source/components/utilities/utxfinit.c
@@ -194,11 +194,14 @@ AcpiEnableSubsystem (
* Obtain a permanent mapping for the FACS. This is required for the
* Global Lock and the Firmware Waking Vector
*/
- Status = AcpiTbInitializeFacs ();
- if (ACPI_FAILURE (Status))
+ if (!(Flags & ACPI_NO_FACS_INIT))
{
- ACPI_WARNING ((AE_INFO, "Could not map the FACS table"));
- return_ACPI_STATUS (Status);
+ Status = AcpiTbInitializeFacs ();
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_WARNING ((AE_INFO, "Could not map the FACS table"));
+ return_ACPI_STATUS (Status);
+ }
}
#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/source/include/acclib.h b/source/include/acclib.h
new file mode 100644
index 000000000000..ed310cc2fb42
--- /dev/null
+++ b/source/include/acclib.h
@@ -0,0 +1,167 @@
+/******************************************************************************
+ *
+ * Name: acclib.h -- C library support. Prototypes for the (optional) local
+ * implementations of required C library functions.
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2015, Intel Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ * of any contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#ifndef _ACCLIB_H
+#define _ACCLIB_H
+
+
+/*
+ * Prototypes and macros for local implementations of C library functions
+ */
+
+/* is* functions. The AcpiGbl_Ctypes array is defined in utclib.c */
+
+extern const UINT8 AcpiGbl_Ctypes[];
+
+#define _ACPI_XA 0x00 /* extra alphabetic - not supported */
+#define _ACPI_XS 0x40 /* extra space */
+#define _ACPI_BB 0x00 /* BEL, BS, etc. - not supported */
+#define _ACPI_CN 0x20 /* CR, FF, HT, NL, VT */
+#define _ACPI_DI 0x04 /* '0'-'9' */
+#define _ACPI_LO 0x02 /* 'a'-'z' */
+#define _ACPI_PU 0x10 /* punctuation */
+#define _ACPI_SP 0x08 /* space, tab, CR, LF, VT, FF */
+#define _ACPI_UP 0x01 /* 'A'-'Z' */
+#define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */
+
+#define isdigit(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_DI))
+#define isspace(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_SP))
+#define isxdigit(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_XD))
+#define isupper(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_UP))
+#define islower(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_LO))
+#define isprint(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_XS | _ACPI_PU))
+#define isalpha(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP))
+
+
+/* Strings */
+
+char *
+strcat (
+ char *DstString,
+ const char *SrcString);
+
+char *
+strchr (
+ const char *String,
+ int ch);
+
+char *
+strcpy (
+ char *DstString,
+ const char *SrcString);
+
+int
+strcmp (
+ const char *String1,
+ const char *String2);
+
+ACPI_SIZE
+strlen (
+ const char *String);
+
+char *
+strncat (
+ char *DstString,
+ const char *SrcString,
+ ACPI_SIZE Count);
+
+int
+strncmp (
+ const char *String1,
+ const char *String2,
+ ACPI_SIZE Count);
+
+char *
+strncpy (
+ char *DstString,
+ const char *SrcString,
+ ACPI_SIZE Count);
+
+char *
+strstr (
+ char *String1,
+ char *String2);
+
+
+/* Conversion */
+
+UINT32
+strtoul (
+ const char *String,
+ char **Terminator,
+ UINT32 Base);
+
+
+/* Memory */
+
+int
+memcmp (
+ void *Buffer1,
+ void *Buffer2,
+ ACPI_SIZE Count);
+
+void *
+memcpy (
+ void *Dest,
+ const void *Src,
+ ACPI_SIZE Count);
+
+void *
+memset (
+ void *Dest,
+ int Value,
+ ACPI_SIZE Count);
+
+
+/* upper/lower case */
+
+int
+tolower (
+ int c);
+
+int
+toupper (
+ int c);
+
+#endif /* _ACCLIB_H */
diff --git a/source/include/accommon.h b/source/include/accommon.h
index e10471ecc09b..15a05b5c5fbd 100644
--- a/source/include/accommon.h
+++ b/source/include/accommon.h
@@ -59,6 +59,9 @@
#include "acglobal.h" /* All global variables */
#include "achware.h" /* Hardware defines and interfaces */
#include "acutils.h" /* Utility interfaces */
+#ifndef ACPI_USE_SYSTEM_CLIBRARY
+#include "acclib.h" /* C library interfaces */
+#endif /* !ACPI_USE_SYSTEM_CLIBRARY */
#endif /* __ACCOMMON_H__ */
diff --git a/source/include/acpixf.h b/source/include/acpixf.h
index ab640f3a3261..9177fbdbb19f 100644
--- a/source/include/acpixf.h
+++ b/source/include/acpixf.h
@@ -46,7 +46,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
-#define ACPI_CA_VERSION 0x20150616
+#define ACPI_CA_VERSION 0x20150619
#include "acconfig.h"
#include "actypes.h"
diff --git a/source/include/actypes.h b/source/include/actypes.h
index ad00713139e9..837c784d6da2 100644
--- a/source/include/actypes.h
+++ b/source/include/actypes.h
@@ -582,6 +582,7 @@ typedef UINT64 ACPI_INTEGER;
#define ACPI_NO_ACPI_ENABLE 0x10
#define ACPI_NO_DEVICE_INIT 0x20
#define ACPI_NO_OBJECT_INIT 0x40
+#define ACPI_NO_FACS_INIT 0x80
/*
* Initialization state
diff --git a/source/include/acutils.h b/source/include/acutils.h
index 5cd6ecf81a82..94f8591214c3 100644
--- a/source/include/acutils.h
+++ b/source/include/acutils.h
@@ -246,144 +246,8 @@ AcpiUtSubsystemShutdown (
void);
-/*
- * utclib - Local implementations of C library functions
- */
-#ifndef ACPI_USE_SYSTEM_CLIBRARY
-
-#ifdef memcmp
-#error memcmp defined!
-#endif
-
-#undef strstr
-#undef strchr
-#undef strlen
-#undef strcpy
-#undef strncpy
-#undef strncmp
-#undef strcmp
-#undef strcat
-#undef strncat
-#undef strtoul
-#undef memcmp
-#undef memcpy
-#undef memset
-#undef toupper
-#undef tolower
-#undef isxdigit
-#undef isdigit
-#undef isspace
-#undef isupper
-#undef isprint
-#undef isalpha
-
-ACPI_SIZE
-strlen (
- const char *String);
-
-char *
-strchr (
- const char *String,
- int ch);
-
-char *
-strcpy (
- char *DstString,
- const char *SrcString);
-
-char *
-strncpy (
- char *DstString,
- const char *SrcString,
- ACPI_SIZE Count);
-
-int
-strncmp (
- const char *String1,
- const char *String2,
- ACPI_SIZE Count);
-
-int
-strcmp (
- const char *String1,
- const char *String2);
-
-char *
-strcat (
- char *DstString,
- const char *SrcString);
-
-char *
-strncat (
- char *DstString,
- const char *SrcString,
- ACPI_SIZE Count);
-
-UINT32
-strtoul (
- const char *String,
- char **Terminator,
- UINT32 Base);
-
-char *
-strstr (
- char *String1,
- char *String2);
-
-int
-memcmp (
- void *Buffer1,
- void *Buffer2,
- ACPI_SIZE Count);
-
-void *
-memcpy (
- void *Dest,
- const void *Src,
- ACPI_SIZE Count);
-
-void *
-memset (
- void *Dest,
- int Value,
- ACPI_SIZE Count);
-
-int
-toupper (
- int c);
-
-int
-tolower (
- int c);
-
-
-
-extern const UINT8 _acpi_ctype[];
-
-#define _ACPI_XA 0x00 /* extra alphabetic - not supported */
-#define _ACPI_XS 0x40 /* extra space */
-#define _ACPI_BB 0x00 /* BEL, BS, etc. - not supported */
-#define _ACPI_CN 0x20 /* CR, FF, HT, NL, VT */
-#define _ACPI_DI 0x04 /* '0'-'9' */
-#define _ACPI_LO 0x02 /* 'a'-'z' */
-#define _ACPI_PU 0x10 /* punctuation */
-#define _ACPI_SP 0x08 /* space, tab, CR, LF, VT, FF */
-#define _ACPI_UP 0x01 /* 'A'-'Z' */
-#define _ACPI_XD 0x80 /* '0'-'9', 'A'-'F', 'a'-'f' */
-
-#define isdigit(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI))
-#define isspace(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP))
-#define isxdigit(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD))
-#define isupper(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_UP))
-#define islower(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO))
-#define isprint(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_XS | _ACPI_PU))
-#define isalpha(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP))
-
-#endif /* !ACPI_USE_SYSTEM_CLIBRARY */
-
#define ACPI_IS_ASCII(c) ((c) < 0x80)
-
/*
* utcopy - Object construction and conversion interfaces
*/
diff --git a/source/include/platform/acefi.h b/source/include/platform/acefi.h
index c19ce01586a8..5deaa05d6593 100644
--- a/source/include/platform/acefi.h
+++ b/source/include/platform/acefi.h
@@ -64,17 +64,17 @@
#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
+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__)
@@ -89,13 +89,13 @@ typedef uint16_t CHAR16;
#endif
#ifdef _MSC_EXTENSIONS
-#pragma warning ( disable : 4731 ) // Suppress warnings about modification of EBP
+#pragma warning ( disable : 4731 ) /* Suppress warnings about modification of EBP */
#endif
#endif
-typedef uint64_t UINTN;
-typedef int64_t INTN;
+typedef uint64_t UINTN;
+typedef int64_t INTN;
#define EFIERR(a) (0x8000000000000000 | a)
@@ -130,6 +130,7 @@ typedef int32_t INTN;
prefix ## nargs
/* Prototypes of EFI cdecl -> stdcall trampolines */
+
UINT64 efi_call0(void *func);
UINT64 efi_call1(void *func, UINT64 arg1);
UINT64 efi_call2(void *func, UINT64 arg1, UINT64 arg2);
@@ -153,6 +154,7 @@ UINT64 efi_call10(void *func, UINT64 arg1, UINT64 arg2, UINT64 arg3,
UINT64 arg8, UINT64 arg9, UINT64 arg10);
/* Front-ends to efi_callX to avoid compiler warnings */
+
#define _cast64_efi_call0(f) \
efi_call0(f)
#define _cast64_efi_call1(f,a1) \
@@ -185,6 +187,7 @@ UINT64 efi_call10(void *func, UINT64 arg1, UINT64 arg2, UINT64 arg3,
(UINT64)(a9), (UINT64)(a10))
/* main wrapper (va_num ignored) */
+
#define uefi_call_wrapper(func,va_num,...) \
__VA_ARG_NSUFFIX__(_cast64_efi_call, __VA_ARGS__) (func , ##__VA_ARGS__)