From owner-svn-src-all@FreeBSD.ORG Thu Jun 18 17:27:46 2015 Return-Path: Delivered-To: svn-src-all@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2AE4A96F; Thu, 18 Jun 2015 17:27:46 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 160DA379; Thu, 18 Jun 2015 17:27:46 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t5IHRkmO029725; Thu, 18 Jun 2015 17:27:46 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t5IHRffR029691; Thu, 18 Jun 2015 17:27:41 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201506181727.t5IHRffR029691@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Thu, 18 Jun 2015 17:27:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r284563 - in vendor-sys/acpica/dist: . source/compiler source/components/hardware source/components/namespace source/components/tables source/components/utilities source/include source/... X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2015 17:27:46 -0000 Author: jkim Date: Thu Jun 18 17:27:40 2015 New Revision: 284563 URL: https://svnweb.freebsd.org/changeset/base/284563 Log: Import ACPICA 20150619. Added: vendor-sys/acpica/dist/source/include/acclib.h (contents, props changed) Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/source/compiler/aslcompiler.l vendor-sys/acpica/dist/source/compiler/aslfiles.c vendor-sys/acpica/dist/source/compiler/aslfold.c vendor-sys/acpica/dist/source/compiler/dtcompiler.h vendor-sys/acpica/dist/source/compiler/dtio.c vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c vendor-sys/acpica/dist/source/components/namespace/nssearch.c vendor-sys/acpica/dist/source/components/tables/tbutils.c vendor-sys/acpica/dist/source/components/utilities/utclib.c vendor-sys/acpica/dist/source/components/utilities/utxfinit.c vendor-sys/acpica/dist/source/include/accommon.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/actypes.h vendor-sys/acpica/dist/source/include/acutils.h vendor-sys/acpica/dist/source/include/platform/acefi.h Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Thu Jun 18 16:51:49 2015 (r284562) +++ vendor-sys/acpica/dist/changes.txt Thu Jun 18 17:27:40 2015 (r284563) @@ -1,4 +1,20 @@ ---------------------------------------- +19 June 2015. Summary of changes for version 20150619: + +Two regressions in version 20150616 have been addressed: + +Fixes some problems/issues with the C library macro removal (ACPI_STRLEN, +etc.) This update changes ACPICA to only use the standard headers for +functions, or the prototypes for the local versions of the C library +functions. Across the source code, this required some additional casts +for some Clib invocations for portability. Moved all local prototypes to +a new file, acclib.h + +Fixes several problems with recent changes to the handling of the FACS +table that could cause some systems not to boot. + + +---------------------------------------- 16 June 2015. Summary of changes for version 20150616: Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.l ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.l Thu Jun 18 16:51:49 2015 (r284562) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.l Thu Jun 18 17:27:40 2015 (r284563) @@ -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", Modified: vendor-sys/acpica/dist/source/compiler/aslfiles.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfiles.c Thu Jun 18 16:51:49 2015 (r284562) +++ vendor-sys/acpica/dist/source/compiler/aslfiles.c Thu Jun 18 17:27:40 2015 (r284563) @@ -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] == '#') { Modified: vendor-sys/acpica/dist/source/compiler/aslfold.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfold.c Thu Jun 18 16:51:49 2015 (r284562) +++ vendor-sys/acpica/dist/source/compiler/aslfold.c Thu Jun 18 17:27:40 2015 (r284563) @@ -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 */ Modified: vendor-sys/acpica/dist/source/compiler/dtcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtcompiler.h Thu Jun 18 16:51:49 2015 (r284562) +++ vendor-sys/acpica/dist/source/compiler/dtcompiler.h Thu Jun 18 17:27:40 2015 (r284563) @@ -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 ( Modified: vendor-sys/acpica/dist/source/compiler/dtio.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/dtio.c Thu Jun 18 16:51:49 2015 (r284562) +++ vendor-sys/acpica/dist/source/compiler/dtio.c Thu Jun 18 17:27:40 2015 (r284563) @@ -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)); Modified: vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c ============================================================================== --- vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c Thu Jun 18 16:51:49 2015 (r284562) +++ vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c Thu Jun 18 17:27:40 2015 (r284563) @@ -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) Modified: vendor-sys/acpica/dist/source/components/namespace/nssearch.c ============================================================================== --- vendor-sys/acpica/dist/source/components/namespace/nssearch.c Thu Jun 18 16:51:49 2015 (r284562) +++ vendor-sys/acpica/dist/source/components/namespace/nssearch.c Thu Jun 18 17:27:40 2015 (r284563) @@ -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 */ Modified: vendor-sys/acpica/dist/source/components/tables/tbutils.c ============================================================================== --- vendor-sys/acpica/dist/source/components/tables/tbutils.c Thu Jun 18 16:51:49 2015 (r284562) +++ vendor-sys/acpica/dist/source/components/tables/tbutils.c Thu Jun 18 17:27:40 2015 (r284563) @@ -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 */ Modified: vendor-sys/acpica/dist/source/components/utilities/utclib.c ============================================================================== --- vendor-sys/acpica/dist/source/components/utilities/utclib.c Thu Jun 18 16:51:49 2015 (r284562) +++ vendor-sys/acpica/dist/source/components/utilities/utclib.c Thu Jun 18 17:27:40 2015 (r284563) @@ -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 */ Modified: vendor-sys/acpica/dist/source/components/utilities/utxfinit.c ============================================================================== --- vendor-sys/acpica/dist/source/components/utilities/utxfinit.c Thu Jun 18 16:51:49 2015 (r284562) +++ vendor-sys/acpica/dist/source/components/utilities/utxfinit.c Thu Jun 18 17:27:40 2015 (r284563) @@ -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 */ Added: vendor-sys/acpica/dist/source/include/acclib.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/acpica/dist/source/include/acclib.h Thu Jun 18 17:27:40 2015 (r284563) @@ -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 */ Modified: vendor-sys/acpica/dist/source/include/accommon.h ============================================================================== --- vendor-sys/acpica/dist/source/include/accommon.h Thu Jun 18 16:51:49 2015 (r284562) +++ vendor-sys/acpica/dist/source/include/accommon.h Thu Jun 18 17:27:40 2015 (r284563) @@ -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__ */ Modified: vendor-sys/acpica/dist/source/include/acpixf.h ============================================================================== --- vendor-sys/acpica/dist/source/include/acpixf.h Thu Jun 18 16:51:49 2015 (r284562) +++ vendor-sys/acpica/dist/source/include/acpixf.h Thu Jun 18 17:27:40 2015 (r284563) @@ -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" Modified: vendor-sys/acpica/dist/source/include/actypes.h ============================================================================== --- vendor-sys/acpica/dist/source/include/actypes.h Thu Jun 18 16:51:49 2015 (r284562) +++ vendor-sys/acpica/dist/source/include/actypes.h Thu Jun 18 17:27:40 2015 (r284563) @@ -582,6 +582,7 @@ typedef UINT64 #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 Modified: vendor-sys/acpica/dist/source/include/acutils.h ============================================================================== --- vendor-sys/acpica/dist/source/include/acutils.h Thu Jun 18 16:51:49 2015 (r284562) +++ vendor-sys/acpica/dist/source/include/acutils.h Thu Jun 18 17:27:40 2015 (r284563) @@ -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 */ Modified: vendor-sys/acpica/dist/source/include/platform/acefi.h ============================================================================== --- vendor-sys/acpica/dist/source/include/platform/acefi.h Thu Jun 18 16:51:49 2015 (r284562) +++ vendor-sys/acpica/dist/source/include/platform/acefi.h Thu Jun 18 17:27:40 2015 (r284563) @@ -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; +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 +#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 arg 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 arg (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__)