From e77b8d60677609524d10be96f5802f027b8187d8 Mon Sep 17 00:00:00 2001 From: jkim Date: Wed, 15 Jan 2014 00:10:20 +0000 Subject: Import ACPICA 20140414. --- source/components/debugger/dbcmds.c | 2 +- source/components/debugger/dbconvert.c | 2 +- source/components/debugger/dbdisply.c | 2 +- source/components/debugger/dbexec.c | 2 +- source/components/debugger/dbfileio.c | 13 +- source/components/debugger/dbhistry.c | 2 +- source/components/debugger/dbinput.c | 24 +- source/components/debugger/dbmethod.c | 203 +---- source/components/debugger/dbnames.c | 2 +- source/components/debugger/dbstats.c | 4 +- source/components/debugger/dbtest.c | 1137 +++++++++++++++++++++++++++ source/components/debugger/dbutils.c | 2 +- source/components/debugger/dbxface.c | 2 +- source/components/disassembler/dmbuffer.c | 2 +- source/components/disassembler/dmdeferred.c | 2 +- source/components/disassembler/dmnames.c | 2 +- source/components/disassembler/dmobject.c | 2 +- source/components/disassembler/dmopcode.c | 2 +- source/components/disassembler/dmresrc.c | 2 +- source/components/disassembler/dmresrcl.c | 2 +- source/components/disassembler/dmresrcl2.c | 2 +- source/components/disassembler/dmresrcs.c | 2 +- source/components/disassembler/dmutils.c | 2 +- source/components/disassembler/dmwalk.c | 2 +- source/components/dispatcher/dsargs.c | 2 +- source/components/dispatcher/dscontrol.c | 2 +- source/components/dispatcher/dsfield.c | 2 +- source/components/dispatcher/dsinit.c | 2 +- source/components/dispatcher/dsmethod.c | 2 +- source/components/dispatcher/dsmthdat.c | 2 +- source/components/dispatcher/dsobject.c | 2 +- source/components/dispatcher/dsopcode.c | 2 +- source/components/dispatcher/dsutils.c | 2 +- source/components/dispatcher/dswexec.c | 2 +- source/components/dispatcher/dswload.c | 2 +- source/components/dispatcher/dswload2.c | 2 +- source/components/dispatcher/dswscope.c | 2 +- source/components/dispatcher/dswstate.c | 2 +- source/components/events/evevent.c | 2 +- source/components/events/evglock.c | 2 +- source/components/events/evgpe.c | 2 +- source/components/events/evgpeblk.c | 2 +- source/components/events/evgpeinit.c | 2 +- source/components/events/evgpeutil.c | 2 +- source/components/events/evhandler.c | 2 +- source/components/events/evmisc.c | 2 +- source/components/events/evregion.c | 2 +- source/components/events/evrgnini.c | 2 +- source/components/events/evsci.c | 2 +- source/components/events/evxface.c | 2 +- source/components/events/evxfevnt.c | 2 +- source/components/events/evxfgpe.c | 24 +- source/components/events/evxfregn.c | 2 +- source/components/executer/exconfig.c | 2 +- source/components/executer/exconvrt.c | 2 +- source/components/executer/excreate.c | 2 +- source/components/executer/exdebug.c | 2 +- source/components/executer/exdump.c | 2 +- source/components/executer/exfield.c | 2 +- source/components/executer/exfldio.c | 2 +- source/components/executer/exmisc.c | 2 +- source/components/executer/exmutex.c | 2 +- source/components/executer/exnames.c | 2 +- source/components/executer/exoparg1.c | 2 +- source/components/executer/exoparg2.c | 2 +- source/components/executer/exoparg3.c | 2 +- source/components/executer/exoparg6.c | 2 +- source/components/executer/exprep.c | 2 +- source/components/executer/exregion.c | 2 +- source/components/executer/exresnte.c | 2 +- source/components/executer/exresolv.c | 2 +- source/components/executer/exresop.c | 2 +- source/components/executer/exstore.c | 2 +- source/components/executer/exstoren.c | 2 +- source/components/executer/exstorob.c | 2 +- source/components/executer/exsystem.c | 2 +- source/components/executer/exutils.c | 2 +- source/components/hardware/hwacpi.c | 2 +- source/components/hardware/hwesleep.c | 2 +- source/components/hardware/hwgpe.c | 2 +- source/components/hardware/hwpci.c | 2 +- source/components/hardware/hwregs.c | 2 +- source/components/hardware/hwsleep.c | 2 +- source/components/hardware/hwtimer.c | 2 +- source/components/hardware/hwvalid.c | 2 +- source/components/hardware/hwxface.c | 2 +- source/components/hardware/hwxfsleep.c | 2 +- source/components/namespace/nsaccess.c | 2 +- source/components/namespace/nsalloc.c | 2 +- source/components/namespace/nsarguments.c | 2 +- source/components/namespace/nsconvert.c | 2 +- source/components/namespace/nsdump.c | 2 +- source/components/namespace/nsdumpdv.c | 2 +- source/components/namespace/nseval.c | 2 +- source/components/namespace/nsinit.c | 2 +- source/components/namespace/nsload.c | 2 +- source/components/namespace/nsnames.c | 2 +- source/components/namespace/nsobject.c | 2 +- source/components/namespace/nsparse.c | 2 +- source/components/namespace/nspredef.c | 2 +- source/components/namespace/nsprepkg.c | 2 +- source/components/namespace/nsrepair.c | 2 +- source/components/namespace/nsrepair2.c | 2 +- source/components/namespace/nssearch.c | 2 +- source/components/namespace/nsutils.c | 2 +- source/components/namespace/nswalk.c | 2 +- source/components/namespace/nsxfeval.c | 2 +- source/components/namespace/nsxfname.c | 2 +- source/components/namespace/nsxfobj.c | 2 +- source/components/parser/psargs.c | 2 +- source/components/parser/psloop.c | 2 +- source/components/parser/psobject.c | 2 +- source/components/parser/psopcode.c | 2 +- source/components/parser/psopinfo.c | 2 +- source/components/parser/psparse.c | 2 +- source/components/parser/psscope.c | 2 +- source/components/parser/pstree.c | 2 +- source/components/parser/psutils.c | 2 +- source/components/parser/pswalk.c | 2 +- source/components/parser/psxface.c | 2 +- source/components/resources/rsaddr.c | 2 +- source/components/resources/rscalc.c | 2 +- source/components/resources/rscreate.c | 2 +- source/components/resources/rsdump.c | 2 +- source/components/resources/rsdumpinfo.c | 2 +- source/components/resources/rsinfo.c | 2 +- source/components/resources/rsio.c | 2 +- source/components/resources/rsirq.c | 2 +- source/components/resources/rslist.c | 2 +- source/components/resources/rsmemory.c | 2 +- source/components/resources/rsmisc.c | 2 +- source/components/resources/rsserial.c | 2 +- source/components/resources/rsutils.c | 2 +- source/components/resources/rsxface.c | 2 +- source/components/tables/tbfadt.c | 2 +- source/components/tables/tbfind.c | 2 +- source/components/tables/tbinstal.c | 15 +- source/components/tables/tbprint.c | 21 +- source/components/tables/tbutils.c | 2 +- source/components/tables/tbxface.c | 2 +- source/components/tables/tbxfload.c | 2 +- source/components/tables/tbxfroot.c | 2 +- source/components/utilities/utaddress.c | 2 +- source/components/utilities/utalloc.c | 2 +- source/components/utilities/utbuffer.c | 2 +- source/components/utilities/utcache.c | 2 +- source/components/utilities/utclib.c | 2 +- source/components/utilities/utcopy.c | 8 +- source/components/utilities/utdebug.c | 2 +- source/components/utilities/utdecode.c | 2 +- source/components/utilities/utdelete.c | 2 +- source/components/utilities/uterror.c | 2 +- source/components/utilities/uteval.c | 2 +- source/components/utilities/utexcep.c | 2 +- source/components/utilities/utglobal.c | 2 +- source/components/utilities/utids.c | 2 +- source/components/utilities/utinit.c | 2 +- source/components/utilities/utlock.c | 2 +- source/components/utilities/utmath.c | 2 +- source/components/utilities/utmisc.c | 2 +- source/components/utilities/utmutex.c | 2 +- source/components/utilities/utobject.c | 2 +- source/components/utilities/utosi.c | 2 +- source/components/utilities/utownerid.c | 2 +- source/components/utilities/utpredef.c | 2 +- source/components/utilities/utresrc.c | 4 +- source/components/utilities/utstate.c | 2 +- source/components/utilities/utstring.c | 2 +- source/components/utilities/uttrack.c | 5 +- source/components/utilities/utxface.c | 2 +- source/components/utilities/utxferror.c | 2 +- source/components/utilities/utxfinit.c | 2 +- source/components/utilities/utxfmutex.c | 2 +- 173 files changed, 1379 insertions(+), 403 deletions(-) create mode 100644 source/components/debugger/dbtest.c (limited to 'source/components') diff --git a/source/components/debugger/dbcmds.c b/source/components/debugger/dbcmds.c index 7a417155..8fde330 100644 --- a/source/components/debugger/dbcmds.c +++ b/source/components/debugger/dbcmds.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/debugger/dbconvert.c b/source/components/debugger/dbconvert.c index 098a9719..ab809f8 100644 --- a/source/components/debugger/dbconvert.c +++ b/source/components/debugger/dbconvert.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/debugger/dbdisply.c b/source/components/debugger/dbdisply.c index 046bbc3..e913b3d 100644 --- a/source/components/debugger/dbdisply.c +++ b/source/components/debugger/dbdisply.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/debugger/dbexec.c b/source/components/debugger/dbexec.c index 668dcdd..806b80f 100644 --- a/source/components/debugger/dbexec.c +++ b/source/components/debugger/dbexec.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/debugger/dbfileio.c b/source/components/debugger/dbfileio.c index 0785c7d..63ecfd8 100644 --- a/source/components/debugger/dbfileio.c +++ b/source/components/debugger/dbfileio.c @@ -6,7 +6,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -473,6 +473,7 @@ AcpiDbReadTableFromFile ( ACPI_TABLE_HEADER **Table) { FILE *File; + UINT32 FileSize; UINT32 TableLength; ACPI_STATUS Status; @@ -486,9 +487,17 @@ AcpiDbReadTableFromFile ( return (AE_ERROR); } + /* Get the file size */ + + fseek (File, 0, SEEK_END); + FileSize = (UINT32) ftell (File); + fseek (File, 0, SEEK_SET); + /* Get the entire file */ - fprintf (stderr, "Loading Acpi table from file %s\n", Filename); + fprintf (stderr, "Loading Acpi table from file %10s - Length %.8u (%06X)\n", + Filename, FileSize, FileSize); + Status = AcpiDbReadTable (File, Table, &TableLength); fclose(File); diff --git a/source/components/debugger/dbhistry.c b/source/components/debugger/dbhistry.c index 2daa01f..b56d4ef 100644 --- a/source/components/debugger/dbhistry.c +++ b/source/components/debugger/dbhistry.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c index e1beed3..a6c79f6 100644 --- a/source/components/debugger/dbinput.c +++ b/source/components/debugger/dbinput.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -93,7 +93,6 @@ enum AcpiExDebuggerCommands CMD_ALLOCATIONS, CMD_ARGS, CMD_ARGUMENTS, - CMD_BATCH, CMD_BREAKPOINT, CMD_BUSINFO, CMD_CALL, @@ -147,6 +146,7 @@ enum AcpiExDebuggerCommands CMD_TABLES, CMD_TEMPLATE, CMD_TERMINATE, + CMD_TEST, CMD_THREADS, CMD_TRACE, CMD_TREE, @@ -166,7 +166,6 @@ static const ACPI_DB_COMMAND_INFO AcpiGbl_DbCommands[] = {"ALLOCATIONS", 0}, {"ARGS", 0}, {"ARGUMENTS", 0}, - {"BATCH", 0}, {"BREAKPOINT", 1}, {"BUSINFO", 0}, {"CALL", 0}, @@ -220,6 +219,7 @@ static const ACPI_DB_COMMAND_INFO AcpiGbl_DbCommands[] = {"TABLES", 0}, {"TEMPLATE", 1}, {"TERMINATE", 0}, + {"TEST", 1}, {"THREADS", 3}, {"TRACE", 1}, {"TREE", 0}, @@ -246,8 +246,7 @@ static const ACPI_DB_COMMAND_HELP AcpiGbl_DbCommandHelp[] = {1, " Locks", "Current status of internal mutexes\n"}, {1, " Osi [Install|Remove ]", "Display or modify global _OSI list\n"}, {1, " Quit or Exit", "Exit this command\n"}, - {9, " Stats [Allocations|Memory|Misc|", "\n"}, - {1, " Objects|Sizes|Stack|Tables]", "Display namespace and memory statistics\n"}, + {8, " Stats ", "Display namespace and memory statistics\n"}, {1, " Allocations", "Display list of current memory allocations\n"}, {1, " Memory", "Dump internal memory lists\n"}, {1, " Misc", "Namespace search and mutex stats\n"}, @@ -315,6 +314,11 @@ static const ACPI_DB_COMMAND_HELP AcpiGbl_DbCommandHelp[] = {1, " Close", "Close debug output file\n"}, {1, " Load ", "Load ACPI table from a file\n"}, {1, " Open ", "Open a file for debug output\n"}, + + {0, "\nDebug Test Commands:", "\n"}, + {3, " Test ", "Invoke a debug test\n"}, + {1, " Objects", "Read/write/compare all namespace data objects\n"}, + {1, " Predefined", "Execute all ACPI predefined names (_STA, etc.)\n"}, {0, NULL, NULL} }; @@ -792,11 +796,6 @@ AcpiDbCommandDispatch ( AcpiDbDisplayArguments (); break; - case CMD_BATCH: - - AcpiDbBatchExecute (AcpiGbl_DbArgs[1]); - break; - case CMD_BREAKPOINT: AcpiDbSetMethodBreakpoint (AcpiGbl_DbArgs[1], WalkState, Op); @@ -1099,6 +1098,11 @@ AcpiDbCommandDispatch ( /* AcpiInitialize (NULL); */ break; + case CMD_TEST: + + AcpiDbExecuteTest (AcpiGbl_DbArgs[1]); + break; + case CMD_THREADS: AcpiDbCreateExecutionThreads (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2], diff --git a/source/components/debugger/dbmethod.c b/source/components/debugger/dbmethod.c index fe1c3d5..6e44eaf 100644 --- a/source/components/debugger/dbmethod.c +++ b/source/components/debugger/dbmethod.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -58,16 +58,6 @@ ACPI_MODULE_NAME ("dbmethod") -/* Local prototypes */ - -static ACPI_STATUS -AcpiDbWalkForExecute ( - ACPI_HANDLE ObjHandle, - UINT32 NestingLevel, - void *Context, - void **ReturnValue); - - /******************************************************************************* * * FUNCTION: AcpiDbSetMethodBreakpoint @@ -414,195 +404,4 @@ AcpiDbDisassembleMethod ( return (AE_OK); } - -/******************************************************************************* - * - * FUNCTION: AcpiDbWalkForExecute - * - * PARAMETERS: Callback from WalkNamespace - * - * RETURN: Status - * - * DESCRIPTION: Batch execution module. Currently only executes predefined - * ACPI names. - * - ******************************************************************************/ - -static ACPI_STATUS -AcpiDbWalkForExecute ( - ACPI_HANDLE ObjHandle, - UINT32 NestingLevel, - void *Context, - void **ReturnValue) -{ - ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle; - ACPI_DB_EXECUTE_WALK *Info = (ACPI_DB_EXECUTE_WALK *) Context; - char *Pathname; - const ACPI_PREDEFINED_INFO *Predefined; - ACPI_DEVICE_INFO *ObjInfo; - ACPI_OBJECT_LIST ParamObjects; - ACPI_OBJECT Params[ACPI_METHOD_NUM_ARGS]; - ACPI_OBJECT *ThisParam; - ACPI_BUFFER ReturnObj; - ACPI_STATUS Status; - UINT16 ArgTypeList; - UINT8 ArgCount; - UINT8 ArgType; - UINT32 i; - - - /* The name must be a predefined ACPI name */ - - Predefined = AcpiUtMatchPredefinedMethod (Node->Name.Ascii); - if (!Predefined) - { - return (AE_OK); - } - - if (Node->Type == ACPI_TYPE_LOCAL_SCOPE) - { - return (AE_OK); - } - - Pathname = AcpiNsGetExternalPathname (Node); - if (!Pathname) - { - return (AE_OK); - } - - /* Get the object info for number of method parameters */ - - Status = AcpiGetObjectInfo (ObjHandle, &ObjInfo); - if (ACPI_FAILURE (Status)) - { - return (Status); - } - - ParamObjects.Count = 0; - ParamObjects.Pointer = NULL; - - if (ObjInfo->Type == ACPI_TYPE_METHOD) - { - /* Setup default parameters (with proper types) */ - - ArgTypeList = Predefined->Info.ArgumentList; - ArgCount = METHOD_GET_ARG_COUNT (ArgTypeList); - - /* - * Setup the ACPI-required number of arguments, regardless of what - * the actual method defines. If there is a difference, then the - * method is wrong and a warning will be issued during execution. - */ - ThisParam = Params; - for (i = 0; i < ArgCount; i++) - { - ArgType = METHOD_GET_NEXT_TYPE (ArgTypeList); - ThisParam->Type = ArgType; - - switch (ArgType) - { - case ACPI_TYPE_INTEGER: - - ThisParam->Integer.Value = 1; - break; - - case ACPI_TYPE_STRING: - - ThisParam->String.Pointer = "This is the default argument string"; - ThisParam->String.Length = ACPI_STRLEN (ThisParam->String.Pointer); - break; - - case ACPI_TYPE_BUFFER: - - ThisParam->Buffer.Pointer = (UINT8 *) Params; /* just a garbage buffer */ - ThisParam->Buffer.Length = 48; - break; - - case ACPI_TYPE_PACKAGE: - - ThisParam->Package.Elements = NULL; - ThisParam->Package.Count = 0; - break; - - default: - - AcpiOsPrintf ("%s: Unsupported argument type: %u\n", - Pathname, ArgType); - break; - } - - ThisParam++; - } - - ParamObjects.Count = ArgCount; - ParamObjects.Pointer = Params; - } - - ACPI_FREE (ObjInfo); - ReturnObj.Pointer = NULL; - ReturnObj.Length = ACPI_ALLOCATE_BUFFER; - - /* Do the actual method execution */ - - AcpiGbl_MethodExecuting = TRUE; - - Status = AcpiEvaluateObject (Node, NULL, &ParamObjects, &ReturnObj); - - AcpiOsPrintf ("%-32s returned %s\n", Pathname, AcpiFormatException (Status)); - AcpiGbl_MethodExecuting = FALSE; - ACPI_FREE (Pathname); - - /* Ignore status from method execution */ - - Status = AE_OK; - - /* Update count, check if we have executed enough methods */ - - Info->Count++; - if (Info->Count >= Info->MaxCount) - { - Status = AE_CTRL_TERMINATE; - } - - return (Status); -} - - -/******************************************************************************* - * - * FUNCTION: AcpiDbBatchExecute - * - * PARAMETERS: CountArg - Max number of methods to execute - * - * RETURN: None - * - * DESCRIPTION: Namespace batch execution. Execute predefined names in the - * namespace, up to the max count, if specified. - * - ******************************************************************************/ - -void -AcpiDbBatchExecute ( - char *CountArg) -{ - ACPI_DB_EXECUTE_WALK Info; - - - Info.Count = 0; - Info.MaxCount = ACPI_UINT32_MAX; - - if (CountArg) - { - Info.MaxCount = ACPI_STRTOUL (CountArg, NULL, 0); - } - - - /* Search all nodes in namespace */ - - (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, - AcpiDbWalkForExecute, NULL, (void *) &Info, NULL); - - AcpiOsPrintf ("Evaluated %u predefined names in the namespace\n", Info.Count); -} - #endif /* ACPI_DEBUGGER */ diff --git a/source/components/debugger/dbnames.c b/source/components/debugger/dbnames.c index c071289..de02fb6 100644 --- a/source/components/debugger/dbnames.c +++ b/source/components/debugger/dbnames.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/debugger/dbstats.c b/source/components/debugger/dbstats.c index 181efbf..450afcb7 100644 --- a/source/components/debugger/dbstats.c +++ b/source/components/debugger/dbstats.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -401,7 +401,7 @@ AcpiDbDisplayStatistics ( AcpiUtStrupr (TypeArg); Temp = AcpiDbMatchArgument (TypeArg, AcpiDbStatTypes); - if (Temp == (UINT32) -1) + if (Temp == ACPI_TYPE_NOT_FOUND) { AcpiOsPrintf ("Invalid or unsupported argument\n"); return (AE_OK); diff --git a/source/components/debugger/dbtest.c b/source/components/debugger/dbtest.c new file mode 100644 index 0000000..d88372b --- /dev/null +++ b/source/components/debugger/dbtest.c @@ -0,0 +1,1137 @@ +/******************************************************************************* + * + * Module Name: dbtest - Various debug-related tests + * + ******************************************************************************/ + +/* + * Copyright (C) 2000 - 2014, 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. + */ + +#include "acpi.h" +#include "accommon.h" +#include "acdebug.h" +#include "acnamesp.h" +#include "acpredef.h" + +#ifdef ACPI_DEBUGGER + +#define _COMPONENT ACPI_CA_DEBUGGER + ACPI_MODULE_NAME ("dbtest") + + +/* Local prototypes */ + +static void +AcpiDbTestAllObjects ( + void); + +static ACPI_STATUS +AcpiDbTestOneObject ( + ACPI_HANDLE ObjHandle, + UINT32 NestingLevel, + void *Context, + void **ReturnValue); + +static ACPI_STATUS +AcpiDbTestIntegerType ( + ACPI_NAMESPACE_NODE *Node, + UINT32 BitLength); + +static ACPI_STATUS +AcpiDbTestBufferType ( + ACPI_NAMESPACE_NODE *Node, + UINT32 BitLength); + +static ACPI_STATUS +AcpiDbTestStringType ( + ACPI_NAMESPACE_NODE *Node, + UINT32 ByteLength); + +static ACPI_STATUS +AcpiDbReadFromObject ( + ACPI_NAMESPACE_NODE *Node, + ACPI_OBJECT_TYPE ExpectedType, + ACPI_OBJECT **Value); + +static ACPI_STATUS +AcpiDbWriteToObject ( + ACPI_NAMESPACE_NODE *Node, + ACPI_OBJECT *Value); + +static void +AcpiDbEvaluateAllPredefinedNames ( + char *CountArg); + +static ACPI_STATUS +AcpiDbEvaluateOnePredefinedName ( + ACPI_HANDLE ObjHandle, + UINT32 NestingLevel, + void *Context, + void **ReturnValue); + +/* + * Test subcommands + */ +static ACPI_DB_ARGUMENT_INFO AcpiDbTestTypes [] = +{ + {"OBJECTS"}, + {"PREDEFINED"}, + {NULL} /* Must be null terminated */ +}; + +#define CMD_TEST_OBJECTS 0 +#define CMD_TEST_PREDEFINED 1 + +#define BUFFER_FILL_VALUE 0xFF + +/* + * Support for the special debugger read/write control methods. + * These methods are installed into the current namespace and are + * used to read and write the various namespace objects. The point + * is to force the AML interpreter do all of the work. + */ +#define ACPI_DB_READ_METHOD "\\_T98" +#define ACPI_DB_WRITE_METHOD "\\_T99" + +static ACPI_HANDLE ReadHandle = NULL; +static ACPI_HANDLE WriteHandle = NULL; + +/* ASL Definitions of the debugger read/write control methods */ + +#if 0 +DefinitionBlock ("ssdt.aml", "SSDT", 2, "Intel", "DEBUG", 0x00000001) +{ + Method (_T98, 1, NotSerialized) /* Read */ + { + Return (DeRefOf (Arg0)) + } +} +DefinitionBlock ("ssdt2.aml", "SSDT", 2, "Intel", "DEBUG", 0x00000001) +{ + Method (_T99, 2, NotSerialized) /* Write */ + { + Store (Arg1, Arg0) + } +} +#endif + +static unsigned char ReadMethodCode[] = +{ + 0x53,0x53,0x44,0x54,0x2E,0x00,0x00,0x00, /* 00000000 "SSDT...." */ + 0x02,0xC9,0x49,0x6E,0x74,0x65,0x6C,0x00, /* 00000008 "..Intel." */ + 0x44,0x45,0x42,0x55,0x47,0x00,0x00,0x00, /* 00000010 "DEBUG..." */ + 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ + 0x18,0x12,0x13,0x20,0x14,0x09,0x5F,0x54, /* 00000020 "... .._T" */ + 0x39,0x38,0x01,0xA4,0x83,0x68 /* 00000028 "98...h" */ +}; + +static unsigned char WriteMethodCode[] = +{ + 0x53,0x53,0x44,0x54,0x2E,0x00,0x00,0x00, /* 00000000 "SSDT...." */ + 0x02,0x15,0x49,0x6E,0x74,0x65,0x6C,0x00, /* 00000008 "..Intel." */ + 0x44,0x45,0x42,0x55,0x47,0x00,0x00,0x00, /* 00000010 "DEBUG..." */ + 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ + 0x18,0x12,0x13,0x20,0x14,0x09,0x5F,0x54, /* 00000020 "... .._T" */ + 0x39,0x39,0x02,0x70,0x69,0x68 /* 00000028 "99.pih" */ +}; + + +/******************************************************************************* + * + * FUNCTION: AcpiDbExecuteTest + * + * PARAMETERS: TypeArg - Subcommand + * + * RETURN: None + * + * DESCRIPTION: Execute various debug tests. + * + * Note: Code is prepared for future expansion of the TEST command. + * + ******************************************************************************/ + +void +AcpiDbExecuteTest ( + char *TypeArg) +{ + UINT32 Temp; + + + AcpiUtStrupr (TypeArg); + Temp = AcpiDbMatchArgument (TypeArg, AcpiDbTestTypes); + if (Temp == ACPI_TYPE_NOT_FOUND) + { + AcpiOsPrintf ("Invalid or unsupported argument\n"); + return; + } + + switch (Temp) + { + case CMD_TEST_OBJECTS: + + AcpiDbTestAllObjects (); + break; + + case CMD_TEST_PREDEFINED: + + AcpiDbEvaluateAllPredefinedNames (NULL); + break; + + default: + break; + } +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDbTestAllObjects + * + * PARAMETERS: None + * + * RETURN: None + * + * DESCRIPTION: This test implements the OBJECTS subcommand. It exercises the + * namespace by reading/writing/comparing all data objects such + * as integers, strings, buffers, fields, buffer fields, etc. + * + ******************************************************************************/ + +static void +AcpiDbTestAllObjects ( + void) +{ + ACPI_STATUS Status; + + + /* Install the debugger read-object control method if necessary */ + + if (!ReadHandle) + { + Status = AcpiInstallMethod (ReadMethodCode); + if (ACPI_FAILURE (Status)) + { + AcpiOsPrintf ("%s, Could not install debugger read method\n", + AcpiFormatException (Status)); + return; + } + + Status = AcpiGetHandle (NULL, ACPI_DB_READ_METHOD, &ReadHandle); + if (ACPI_FAILURE (Status)) + { + AcpiOsPrintf ("Could not obtain handle for debug method %s\n", + ACPI_DB_READ_METHOD); + return; + } + } + + /* Install the debugger write-object control method if necessary */ + + if (!WriteHandle) + { + Status = AcpiInstallMethod (WriteMethodCode); + if (ACPI_FAILURE (Status)) + { + AcpiOsPrintf ("%s, Could not install debugger write method\n", + AcpiFormatException (Status)); + return; + } + + Status = AcpiGetHandle (NULL, ACPI_DB_WRITE_METHOD, &WriteHandle); + if (ACPI_FAILURE (Status)) + { + AcpiOsPrintf ("Could not obtain handle for debug method %s\n", + ACPI_DB_WRITE_METHOD); + return; + } + } + + /* Walk the entire namespace, testing each supported named data object */ + + (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, + ACPI_UINT32_MAX, AcpiDbTestOneObject, NULL, NULL, NULL); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDbTestOneObject + * + * PARAMETERS: ACPI_WALK_CALLBACK + * + * RETURN: Status + * + * DESCRIPTION: Test one namespace object. Supported types are Integer, + * String, Buffer, BufferField, and FieldUnit. All other object + * types are simply ignored. + * + * Note: Support for Packages is not implemented. + * + ******************************************************************************/ + +static ACPI_STATUS +AcpiDbTestOneObject ( + ACPI_HANDLE ObjHandle, + UINT32 NestingLevel, + void *Context, + void **ReturnValue) +{ + ACPI_NAMESPACE_NODE *Node; + ACPI_OPERAND_OBJECT *ObjDesc; + ACPI_OPERAND_OBJECT *RegionObj; + ACPI_OBJECT_TYPE LocalType; + UINT32 BitLength = 0; + UINT32 ByteLength = 0; + ACPI_STATUS Status = AE_OK; + + + Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjHandle); + ObjDesc = Node->Object; + + /* + * For the supported types, get the actual bit length or + * byte length. Map the type to one of Integer/String/Buffer. + */ + switch (Node->Type) + { + case ACPI_TYPE_INTEGER: + + /* Integer width is either 32 or 64 */ + + LocalType = ACPI_TYPE_INTEGER; + BitLength = AcpiGbl_IntegerBitWidth; + break; + + case ACPI_TYPE_STRING: + + LocalType = ACPI_TYPE_STRING; + ByteLength = ObjDesc->String.Length; + break; + + case ACPI_TYPE_BUFFER: + + LocalType = ACPI_TYPE_BUFFER; + ByteLength = ObjDesc->Buffer.Length; + BitLength = ByteLength * 8; + break; + + case ACPI_TYPE_FIELD_UNIT: + case ACPI_TYPE_BUFFER_FIELD: + case ACPI_TYPE_LOCAL_REGION_FIELD: + case ACPI_TYPE_LOCAL_INDEX_FIELD: + case ACPI_TYPE_LOCAL_BANK_FIELD: + + LocalType = ACPI_TYPE_INTEGER; + if (ObjDesc) + { + /* + * Returned object will be a Buffer if the field length + * is larger than the size of an Integer (32 or 64 bits + * depending on the DSDT version). + */ + BitLength = ObjDesc->CommonField.BitLength; + ByteLength = ACPI_ROUND_BITS_UP_TO_BYTES (BitLength); + if (BitLength > AcpiGbl_IntegerBitWidth) + { + LocalType = ACPI_TYPE_BUFFER; + } + } + break; + + default: + + /* Ignore all other types */ + + return (AE_OK); + } + + /* Emit the common prefix: Type:Name */ + + AcpiOsPrintf ("%14s: %4.4s", + AcpiUtGetTypeName (Node->Type), Node->Name.Ascii); + if (!ObjDesc) + { + AcpiOsPrintf (" Ignoring, no attached object\n"); + return (AE_OK); + } + + /* + * Check for unsupported region types. Note: AcpiExec simulates + * access to SystemMemory, SystemIO, PCI_Config, and EC. + */ + switch (Node->Type) + { + case ACPI_TYPE_LOCAL_REGION_FIELD: + + RegionObj = ObjDesc->Field.RegionObj; + switch (RegionObj->Region.SpaceId) + { + case ACPI_ADR_SPACE_SYSTEM_MEMORY: + case ACPI_ADR_SPACE_SYSTEM_IO: + case ACPI_ADR_SPACE_PCI_CONFIG: + case ACPI_ADR_SPACE_EC: + + break; + + default: + + AcpiOsPrintf (" %s space is not supported [%4.4s]\n", + AcpiUtGetRegionName (RegionObj->Region.SpaceId), + RegionObj->Region.Node->Name.Ascii); + return (AE_OK); + } + break; + + default: + break; + } + + /* At this point, we have resolved the object to one of the major types */ + + switch (LocalType) + { + case ACPI_TYPE_INTEGER: + + Status = AcpiDbTestIntegerType (Node, BitLength); + break; + + case ACPI_TYPE_STRING: + + Status = AcpiDbTestStringType (Node, ByteLength); + break; + + case ACPI_TYPE_BUFFER: + + Status = AcpiDbTestBufferType (Node, BitLength); + break; + + default: + + AcpiOsPrintf (" Ignoring, type not implemented (%2.2X)", + LocalType); + break; + } + + switch (Node->Type) + { + case ACPI_TYPE_LOCAL_REGION_FIELD: + + RegionObj = ObjDesc->Field.RegionObj; + AcpiOsPrintf (" (%s)", + AcpiUtGetRegionName (RegionObj->Region.SpaceId)); + break; + + default: + break; + } + + AcpiOsPrintf ("\n"); + return (Status); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDbTestIntegerType + * + * PARAMETERS: Node - Parent NS node for the object + * BitLength - Actual length of the object. Used for + * support of arbitrary length FieldUnit + * and BufferField objects. + * + * RETURN: Status + * + * DESCRIPTION: Test read/write for an Integer-valued object. Performs a + * write/read/compare of an arbitrary new value, then performs + * a write/read/compare of the original value. + * + ******************************************************************************/ + +static ACPI_STATUS +AcpiDbTestIntegerType ( + ACPI_NAMESPACE_NODE *Node, + UINT32 BitLength) +{ + ACPI_OBJECT *Temp1 = NULL; + ACPI_OBJECT *Temp2 = NULL; + ACPI_OBJECT *Temp3 = NULL; + ACPI_OBJECT WriteValue; + UINT64 ValueToWrite; + ACPI_STATUS Status; + + + if (BitLength > 64) + { + AcpiOsPrintf (" Invalid length for an Integer: %u", BitLength); + return (AE_OK); + } + + /* Read the original value */ + + Status = AcpiDbReadFromObject (Node, ACPI_TYPE_INTEGER, &Temp1); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + AcpiOsPrintf (" (%4.4X/%3.3X) %8.8X%8.8X", + BitLength, ACPI_ROUND_BITS_UP_TO_BYTES (BitLength), + ACPI_FORMAT_UINT64 (Temp1->Integer.Value)); + + ValueToWrite = ACPI_UINT64_MAX >> (64 - BitLength); + if (Temp1->Integer.Value == ValueToWrite) + { + ValueToWrite = 0; + } + + /* Write a new value */ + + WriteValue.Type = ACPI_TYPE_INTEGER; + WriteValue.Integer.Value = ValueToWrite; + Status = AcpiDbWriteToObject (Node, &WriteValue); + if (ACPI_FAILURE (Status)) + { + goto Exit; + } + + /* Ensure that we can read back the new value */ + + Status = AcpiDbReadFromObject (Node, ACPI_TYPE_INTEGER, &Temp2); + if (ACPI_FAILURE (Status)) + { + goto Exit; + } + + if (Temp2->Integer.Value != ValueToWrite) + { + AcpiOsPrintf (" MISMATCH 2: %8.8X%8.8X, expecting %8.8X%8.8X", + ACPI_FORMAT_UINT64 (Temp2->Integer.Value), + ACPI_FORMAT_UINT64 (ValueToWrite)); + } + + /* Write back the original value */ + + WriteValue.Integer.Value = Temp1->Integer.Value; + Status = AcpiDbWriteToObject (Node, &WriteValue); + if (ACPI_FAILURE (Status)) + { + goto Exit; + } + + /* Ensure that we can read back the original value */ + + Status = AcpiDbReadFromObject (Node, ACPI_TYPE_INTEGER, &Temp3); + if (ACPI_FAILURE (Status)) + { + goto Exit; + } + + if (Temp3->Integer.Value != Temp1->Integer.Value) + { + AcpiOsPrintf (" MISMATCH 3: %8.8X%8.8X, expecting %8.8X%8.8X", + ACPI_FORMAT_UINT64 (Temp3->Integer.Value), + ACPI_FORMAT_UINT64 (Temp1->Integer.Value)); + } + +Exit: + if (Temp1) {AcpiOsFree (Temp1);} + if (Temp2) {AcpiOsFree (Temp2);} + if (Temp3) {AcpiOsFree (Temp3);} + return (AE_OK); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDbTestBufferType + * + * PARAMETERS: Node - Parent NS node for the object + * BitLength - Actual length of the object. + * + * RETURN: Status + * + * DESCRIPTION: Test read/write for an Buffer-valued object. Performs a + * write/read/compare of an arbitrary new value, then performs + * a write/read/compare of the original value. + * + ******************************************************************************/ + +static ACPI_STATUS +AcpiDbTestBufferType ( + ACPI_NAMESPACE_NODE *Node, + UINT32 BitLength) +{ + ACPI_OBJECT *Temp1 = NULL; + ACPI_OBJECT *Temp2 = NULL; + ACPI_OBJECT *Temp3 = NULL; + UINT8 *Buffer; + ACPI_OBJECT WriteValue; + ACPI_STATUS Status; + UINT32 ByteLength; + UINT32 i; + UINT8 ExtraBits; + + + ByteLength = ACPI_ROUND_BITS_UP_TO_BYTES (BitLength); + if (ByteLength == 0) + { + AcpiOsPrintf (" Ignoring zero length buffer"); + return (AE_OK); + } + + /* Allocate a local buffer */ + + Buffer = ACPI_ALLOCATE_ZEROED (ByteLength); + if (!Buffer) + { + return (AE_NO_MEMORY); + } + + /* Read the original value */ + + Status = AcpiDbReadFromObject (Node, ACPI_TYPE_BUFFER, &Temp1); + if (ACPI_FAILURE (Status)) + { + goto Exit; + } + + /* Emit a few bytes of the buffer */ + + AcpiOsPrintf (" (%4.4X/%3.3X)", BitLength, Temp1->Buffer.Length); + for (i = 0; ((i < 4) && (i < ByteLength)); i++) + { + AcpiOsPrintf (" %2.2X", Temp1->Buffer.Pointer[i]); + } + AcpiOsPrintf ("... "); + + /* + * Write a new value. + * + * Handle possible extra bits at the end of the buffer. Can + * happen for FieldUnits larger than an integer, but the bit + * count is not an integral number of bytes. Zero out the + * unused bits. + */ + ACPI_MEMSET (Buffer, BUFFER_FILL_VALUE, ByteLength); + ExtraBits = BitLength % 8; + if (ExtraBits) + { + Buffer [ByteLength - 1] = ACPI_MASK_BITS_ABOVE (ExtraBits); + } + + WriteValue.Type = ACPI_TYPE_BUFFER; + WriteValue.Buffer.Length = ByteLength; + WriteValue.Buffer.Pointer = Buffer; + + Status = AcpiDbWriteToObject (Node, &WriteValue); + if (ACPI_FAILURE (Status)) + { + goto Exit; + } + + /* Ensure that we can read back the new value */ + + Status = AcpiDbReadFromObject (Node, ACPI_TYPE_BUFFER, &Temp2); + if (ACPI_FAILURE (Status)) + { + goto Exit; + } + + if (ACPI_MEMCMP (Temp2->Buffer.Pointer, Buffer, ByteLength)) + { + AcpiOsPrintf (" MISMATCH 2: New buffer value"); + } + + /* Write back the original value */ + + WriteValue.Buffer.Length = ByteLength; + WriteValue.Buffer.Pointer = Temp1->Buffer.Pointer; + + Status = AcpiDbWriteToObject (Node, &WriteValue); + if (ACPI_FAILURE (Status)) + { + goto Exit; + } + + /* Ensure that we can read back the original value */ + + Status = AcpiDbReadFromObject (Node, ACPI_TYPE_BUFFER, &Temp3); + if (ACPI_FAILURE (Status)) + { + goto Exit; + } + + if (ACPI_MEMCMP (Temp1->Buffer.Pointer, Temp3->Buffer.Pointer, ByteLength)) + { + AcpiOsPrintf (" MISMATCH 3: While restoring original buffer"); + } + +Exit: + ACPI_FREE (Buffer); + if (Temp1) {AcpiOsFree (Temp1);} + if (Temp2) {AcpiOsFree (Temp2);} + if (Temp3) {AcpiOsFree (Temp3);} + return (Status); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDbTestStringType + * + * PARAMETERS: Node - Parent NS node for the object + * ByteLength - Actual length of the object. + * + * RETURN: Status + * + * DESCRIPTION: Test read/write for an String-valued object. Performs a + * write/read/compare of an arbitrary new value, then performs + * a write/read/compare of the original value. + * + ******************************************************************************/ + +static ACPI_STATUS +AcpiDbTestStringType ( + ACPI_NAMESPACE_NODE *Node, + UINT32 ByteLength) +{ + ACPI_OBJECT *Temp1 = NULL; + ACPI_OBJECT *Temp2 = NULL; + ACPI_OBJECT *Temp3 = NULL; + char *ValueToWrite = "Test String from AML Debugger"; + ACPI_OBJECT WriteValue; + ACPI_STATUS Status; + + + /* Read the original value */ + + Status = AcpiDbReadFromObject (Node, ACPI_TYPE_STRING, &Temp1); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + AcpiOsPrintf (" (%4.4X/%3.3X) \"%s\"", (Temp1->String.Length * 8), + Temp1->String.Length, Temp1->String.Pointer); + + /* Write a new value */ + + WriteValue.Type = ACPI_TYPE_STRING; + WriteValue.String.Length = ACPI_STRLEN (ValueToWrite); + WriteValue.String.Pointer = ValueToWrite; + + Status = AcpiDbWriteToObject (Node, &WriteValue); + if (ACPI_FAILURE (Status)) + { + goto Exit; + } + + /* Ensure that we can read back the new value */ + + Status = AcpiDbReadFromObject (Node, ACPI_TYPE_STRING, &Temp2); + if (ACPI_FAILURE (Status)) + { + goto Exit; + } + + if (ACPI_STRCMP (Temp2->String.Pointer, ValueToWrite)) + { + AcpiOsPrintf (" MISMATCH 2: %s, expecting %s", + Temp2->String.Pointer, ValueToWrite); + } + + /* Write back the original value */ + + WriteValue.String.Length = ACPI_STRLEN (Temp1->String.Pointer); + WriteValue.String.Pointer = Temp1->String.Pointer; + + Status = AcpiDbWriteToObject (Node, &WriteValue); + if (ACPI_FAILURE (Status)) + { + goto Exit; + } + + /* Ensure that we can read back the original value */ + + Status = AcpiDbReadFromObject (Node, ACPI_TYPE_STRING, &Temp3); + if (ACPI_FAILURE (Status)) + { + goto Exit; + } + + if (ACPI_STRCMP (Temp1->String.Pointer, Temp3->String.Pointer)) + { + AcpiOsPrintf (" MISMATCH 3: %s, expecting %s", + Temp3->String.Pointer, Temp1->String.Pointer); + } + +Exit: + if (Temp1) {AcpiOsFree (Temp1);} + if (Temp2) {AcpiOsFree (Temp2);} + if (Temp3) {AcpiOsFree (Temp3);} + return (Status); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDbReadFromObject + * + * PARAMETERS: Node - Parent NS node for the object + * ExpectedType - Object type expected from the read + * Value - Where the value read is returned + * + * RETURN: Status + * + * DESCRIPTION: Performs a read from the specified object by invoking the + * special debugger control method that reads the object. Thus, + * the AML interpreter is doing all of the work, increasing the + * validity of the test. + * + ******************************************************************************/ + +static ACPI_STATUS +AcpiDbReadFromObject ( + ACPI_NAMESPACE_NODE *Node, + ACPI_OBJECT_TYPE ExpectedType, + ACPI_OBJECT **Value) +{ + ACPI_OBJECT *RetValue; + ACPI_OBJECT_LIST ParamObjects; + ACPI_OBJECT Params[2]; + ACPI_BUFFER ReturnObj; + ACPI_STATUS Status; + + + Params[0].Type = ACPI_TYPE_LOCAL_REFERENCE; + Params[0].Reference.ActualType = Node->Type; + Params[0].Reference.Handle = ACPI_CAST_PTR (ACPI_HANDLE, Node); + + ParamObjects.Count = 1; + ParamObjects.Pointer = Params; + + ReturnObj.Length = ACPI_ALLOCATE_BUFFER; + + AcpiGbl_MethodExecuting = TRUE; + Status = AcpiEvaluateObject (ReadHandle, NULL, &ParamObjects, &ReturnObj); + AcpiGbl_MethodExecuting = FALSE; + + if (ACPI_FAILURE (Status)) + { + AcpiOsPrintf ("Could not read from object, %s", + AcpiFormatException (Status)); + return (Status); + } + + RetValue = (ACPI_OBJECT *) ReturnObj.Pointer; + + switch (RetValue->Type) + { + case ACPI_TYPE_INTEGER: + case ACPI_TYPE_BUFFER: + case ACPI_TYPE_STRING: + /* + * Did we receive the type we wanted? Most important for the + * Integer/Buffer case (when a field is larger than an Integer, + * it should return a Buffer). + */ + if (RetValue->Type != ExpectedType) + { + AcpiOsPrintf (" Type mismatch: Expected %s, Received %s", + AcpiUtGetTypeName (ExpectedType), + AcpiUtGetTypeName (RetValue->Type)); + + return (AE_TYPE); + } + + *Value = RetValue; + break; + + default: + + AcpiOsPrintf (" Unsupported return object type, %s", + AcpiUtGetTypeName (RetValue->Type)); + AcpiOsFree (ReturnObj.Pointer); + + return (AE_TYPE); + } + + return (Status); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDbWriteToObject + * + * PARAMETERS: Node - Parent NS node for the object + * Value - Value to be written + * + * RETURN: Status + * + * DESCRIPTION: Performs a write to the specified object by invoking the + * special debugger control method that writes the object. Thus, + * the AML interpreter is doing all of the work, increasing the + * validity of the test. + * + ******************************************************************************/ + +static ACPI_STATUS +AcpiDbWriteToObject ( + ACPI_NAMESPACE_NODE *Node, + ACPI_OBJECT *Value) +{ + ACPI_OBJECT_LIST ParamObjects; + ACPI_OBJECT Params[2]; + ACPI_STATUS Status; + + + Params[0].Type = ACPI_TYPE_LOCAL_REFERENCE; + Params[0].Reference.ActualType = Node->Type; + Params[0].Reference.Handle = ACPI_CAST_PTR (ACPI_HANDLE, Node); + + /* Copy the incoming user parameter */ + + ACPI_MEMCPY (&Params[1], Value, sizeof (ACPI_OBJECT)); + + ParamObjects.Count = 2; + ParamObjects.Pointer = Params; + + AcpiGbl_MethodExecuting = TRUE; + Status = AcpiEvaluateObject (WriteHandle, NULL, &ParamObjects, NULL); + AcpiGbl_MethodExecuting = FALSE; + + if (ACPI_FAILURE (Status)) + { + AcpiOsPrintf ("Could not write to object, %s", + AcpiFormatException (Status)); + } + + return (Status); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDbEvaluateAllPredefinedNames + * + * PARAMETERS: CountArg - Max number of methods to execute + * + * RETURN: None + * + * DESCRIPTION: Namespace batch execution. Execute predefined names in the + * namespace, up to the max count, if specified. + * + ******************************************************************************/ + +static void +AcpiDbEvaluateAllPredefinedNames ( + char *CountArg) +{ + ACPI_DB_EXECUTE_WALK Info; + + + Info.Count = 0; + Info.MaxCount = ACPI_UINT32_MAX; + + if (CountArg) + { + Info.MaxCount = ACPI_STRTOUL (CountArg, NULL, 0); + } + + /* Search all nodes in namespace */ + + (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX, + AcpiDbEvaluateOnePredefinedName, NULL, (void *) &Info, NULL); + + AcpiOsPrintf ("Evaluated %u predefined names in the namespace\n", Info.Count); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDbEvaluateOnePredefinedName + * + * PARAMETERS: Callback from WalkNamespace + * + * RETURN: Status + * + * DESCRIPTION: Batch execution module. Currently only executes predefined + * ACPI names. + * + ******************************************************************************/ + +static ACPI_STATUS +AcpiDbEvaluateOnePredefinedName ( + ACPI_HANDLE ObjHandle, + UINT32 NestingLevel, + void *Context, + void **ReturnValue) +{ + ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle; + ACPI_DB_EXECUTE_WALK *Info = (ACPI_DB_EXECUTE_WALK *) Context; + char *Pathname; + const ACPI_PREDEFINED_INFO *Predefined; + ACPI_DEVICE_INFO *ObjInfo; + ACPI_OBJECT_LIST ParamObjects; + ACPI_OBJECT Params[ACPI_METHOD_NUM_ARGS]; + ACPI_OBJECT *ThisParam; + ACPI_BUFFER ReturnObj; + ACPI_STATUS Status; + UINT16 ArgTypeList; + UINT8 ArgCount; + UINT8 ArgType; + UINT32 i; + + + /* The name must be a predefined ACPI name */ + + Predefined = AcpiUtMatchPredefinedMethod (Node->Name.Ascii); + if (!Predefined) + { + return (AE_OK); + } + + if (Node->Type == ACPI_TYPE_LOCAL_SCOPE) + { + return (AE_OK); + } + + Pathname = AcpiNsGetExternalPathname (Node); + if (!Pathname) + { + return (AE_OK); + } + + /* Get the object info for number of method parameters */ + + Status = AcpiGetObjectInfo (ObjHandle, &ObjInfo); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + ParamObjects.Count = 0; + ParamObjects.Pointer = NULL; + + if (ObjInfo->Type == ACPI_TYPE_METHOD) + { + /* Setup default parameters (with proper types) */ + + ArgTypeList = Predefined->Info.ArgumentList; + ArgCount = METHOD_GET_ARG_COUNT (ArgTypeList); + + /* + * Setup the ACPI-required number of arguments, regardless of what + * the actual method defines. If there is a difference, then the + * method is wrong and a warning will be issued during execution. + */ + ThisParam = Params; + for (i = 0; i < ArgCount; i++) + { + ArgType = METHOD_GET_NEXT_TYPE (ArgTypeList); + ThisParam->Type = ArgType; + + switch (ArgType) + { + case ACPI_TYPE_INTEGER: + + ThisParam->Integer.Value = 1; + break; + + case ACPI_TYPE_STRING: + + ThisParam->String.Pointer = "This is the default argument string"; + ThisParam->String.Length = ACPI_STRLEN (ThisParam->String.Pointer); + break; + + case ACPI_TYPE_BUFFER: + + ThisParam->Buffer.Pointer = (UINT8 *) Params; /* just a garbage buffer */ + ThisParam->Buffer.Length = 48; + break; + + case ACPI_TYPE_PACKAGE: + + ThisParam->Package.Elements = NULL; + ThisParam->Package.Count = 0; + break; + + default: + + AcpiOsPrintf ("%s: Unsupported argument type: %u\n", + Pathname, ArgType); + break; + } + + ThisParam++; + } + + ParamObjects.Count = ArgCount; + ParamObjects.Pointer = Params; + } + + ACPI_FREE (ObjInfo); + ReturnObj.Pointer = NULL; + ReturnObj.Length = ACPI_ALLOCATE_BUFFER; + + /* Do the actual method execution */ + + AcpiGbl_MethodExecuting = TRUE; + + Status = AcpiEvaluateObject (Node, NULL, &ParamObjects, &ReturnObj); + + AcpiOsPrintf ("%-32s returned %s\n", Pathname, AcpiFormatException (Status)); + AcpiGbl_MethodExecuting = FALSE; + ACPI_FREE (Pathname); + + /* Ignore status from method execution */ + + Status = AE_OK; + + /* Update count, check if we have executed enough methods */ + + Info->Count++; + if (Info->Count >= Info->MaxCount) + { + Status = AE_CTRL_TERMINATE; + } + + return (Status); +} + +#endif /* ACPI_DEBUGGER */ diff --git a/source/components/debugger/dbutils.c b/source/components/debugger/dbutils.c index 268a496..fcc33ed 100644 --- a/source/components/debugger/dbutils.c +++ b/source/components/debugger/dbutils.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/debugger/dbxface.c b/source/components/debugger/dbxface.c index eedff1f..671a8f3 100644 --- a/source/components/debugger/dbxface.c +++ b/source/components/debugger/dbxface.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/disassembler/dmbuffer.c b/source/components/disassembler/dmbuffer.c index a9496a9..ce69459 100644 --- a/source/components/disassembler/dmbuffer.c +++ b/source/components/disassembler/dmbuffer.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/disassembler/dmdeferred.c b/source/components/disassembler/dmdeferred.c index 38e4134..dd0be81 100644 --- a/source/components/disassembler/dmdeferred.c +++ b/source/components/disassembler/dmdeferred.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/disassembler/dmnames.c b/source/components/disassembler/dmnames.c index 0fc7751..66d50a4 100644 --- a/source/components/disassembler/dmnames.c +++ b/source/components/disassembler/dmnames.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/disassembler/dmobject.c b/source/components/disassembler/dmobject.c index ab1d744..c938bde 100644 --- a/source/components/disassembler/dmobject.c +++ b/source/components/disassembler/dmobject.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/disassembler/dmopcode.c b/source/components/disassembler/dmopcode.c index bbe5af3..10c66b2 100644 --- a/source/components/disassembler/dmopcode.c +++ b/source/components/disassembler/dmopcode.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/disassembler/dmresrc.c b/source/components/disassembler/dmresrc.c index 44111e1..9bd47db 100644 --- a/source/components/disassembler/dmresrc.c +++ b/source/components/disassembler/dmresrc.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/disassembler/dmresrcl.c b/source/components/disassembler/dmresrcl.c index 0e53672..41cbc01 100644 --- a/source/components/disassembler/dmresrcl.c +++ b/source/components/disassembler/dmresrcl.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/disassembler/dmresrcl2.c b/source/components/disassembler/dmresrcl2.c index a81f9f8..3e48afc 100644 --- a/source/components/disassembler/dmresrcl2.c +++ b/source/components/disassembler/dmresrcl2.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/disassembler/dmresrcs.c b/source/components/disassembler/dmresrcs.c index 5c82a02..1041890 100644 --- a/source/components/disassembler/dmresrcs.c +++ b/source/components/disassembler/dmresrcs.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/disassembler/dmutils.c b/source/components/disassembler/dmutils.c index 8c10eec..2771d44 100644 --- a/source/components/disassembler/dmutils.c +++ b/source/components/disassembler/dmutils.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/disassembler/dmwalk.c b/source/components/disassembler/dmwalk.c index 863471a..79242f5 100644 --- a/source/components/disassembler/dmwalk.c +++ b/source/components/disassembler/dmwalk.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/dispatcher/dsargs.c b/source/components/dispatcher/dsargs.c index f409b20..4c9875e 100644 --- a/source/components/dispatcher/dsargs.c +++ b/source/components/dispatcher/dsargs.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/dispatcher/dscontrol.c b/source/components/dispatcher/dscontrol.c index 32efe10..0b48c46 100644 --- a/source/components/dispatcher/dscontrol.c +++ b/source/components/dispatcher/dscontrol.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/dispatcher/dsfield.c b/source/components/dispatcher/dsfield.c index 90428aa..f3d5cfa 100644 --- a/source/components/dispatcher/dsfield.c +++ b/source/components/dispatcher/dsfield.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/dispatcher/dsinit.c b/source/components/dispatcher/dsinit.c index a00e1b4..47a42bc 100644 --- a/source/components/dispatcher/dsinit.c +++ b/source/components/dispatcher/dsinit.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/dispatcher/dsmethod.c b/source/components/dispatcher/dsmethod.c index 283ef4c..3fb2135 100644 --- a/source/components/dispatcher/dsmethod.c +++ b/source/components/dispatcher/dsmethod.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/dispatcher/dsmthdat.c b/source/components/dispatcher/dsmthdat.c index e5578f6..e1c45ce 100644 --- a/source/components/dispatcher/dsmthdat.c +++ b/source/components/dispatcher/dsmthdat.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/dispatcher/dsobject.c b/source/components/dispatcher/dsobject.c index 77cc582..56cd22e 100644 --- a/source/components/dispatcher/dsobject.c +++ b/source/components/dispatcher/dsobject.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/dispatcher/dsopcode.c b/source/components/dispatcher/dsopcode.c index 63c20a3..0f53283 100644 --- a/source/components/dispatcher/dsopcode.c +++ b/source/components/dispatcher/dsopcode.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/dispatcher/dsutils.c b/source/components/dispatcher/dsutils.c index 08cb250..1180366 100644 --- a/source/components/dispatcher/dsutils.c +++ b/source/components/dispatcher/dsutils.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/dispatcher/dswexec.c b/source/components/dispatcher/dswexec.c index e9c178b..5d8276f 100644 --- a/source/components/dispatcher/dswexec.c +++ b/source/components/dispatcher/dswexec.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/dispatcher/dswload.c b/source/components/dispatcher/dswload.c index 339586a..d9bb12d 100644 --- a/source/components/dispatcher/dswload.c +++ b/source/components/dispatcher/dswload.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/dispatcher/dswload2.c b/source/components/dispatcher/dswload2.c index 07bd35e..a3490f0 100644 --- a/source/components/dispatcher/dswload2.c +++ b/source/components/dispatcher/dswload2.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/dispatcher/dswscope.c b/source/components/dispatcher/dswscope.c index b6362e7..8715691 100644 --- a/source/components/dispatcher/dswscope.c +++ b/source/components/dispatcher/dswscope.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/dispatcher/dswstate.c b/source/components/dispatcher/dswstate.c index c73b2dd..18208f3 100644 --- a/source/components/dispatcher/dswstate.c +++ b/source/components/dispatcher/dswstate.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/events/evevent.c b/source/components/events/evevent.c index b6d75e6..9a410c4 100644 --- a/source/components/events/evevent.c +++ b/source/components/events/evevent.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/events/evglock.c b/source/components/events/evglock.c index fffe8dd..fb12788 100644 --- a/source/components/events/evglock.c +++ b/source/components/events/evglock.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/events/evgpe.c b/source/components/events/evgpe.c index 0828606..75e3704 100644 --- a/source/components/events/evgpe.c +++ b/source/components/events/evgpe.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/events/evgpeblk.c b/source/components/events/evgpeblk.c index 0f0da18..a5122f9 100644 --- a/source/components/events/evgpeblk.c +++ b/source/components/events/evgpeblk.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/events/evgpeinit.c b/source/components/events/evgpeinit.c index dae7dc1..622c13d 100644 --- a/source/components/events/evgpeinit.c +++ b/source/components/events/evgpeinit.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/events/evgpeutil.c b/source/components/events/evgpeutil.c index a48520c..c238589 100644 --- a/source/components/events/evgpeutil.c +++ b/source/components/events/evgpeutil.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/events/evhandler.c b/source/components/events/evhandler.c index 9444b06..150f73f 100644 --- a/source/components/events/evhandler.c +++ b/source/components/events/evhandler.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/events/evmisc.c b/source/components/events/evmisc.c index ad95c5a..3bfa81c 100644 --- a/source/components/events/evmisc.c +++ b/source/components/events/evmisc.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/events/evregion.c b/source/components/events/evregion.c index 278c685..ce900ca 100644 --- a/source/components/events/evregion.c +++ b/source/components/events/evregion.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/events/evrgnini.c b/source/components/events/evrgnini.c index b8a632e..1c3dbbc 100644 --- a/source/components/events/evrgnini.c +++ b/source/components/events/evrgnini.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/events/evsci.c b/source/components/events/evsci.c index c254356..07c86d8 100644 --- a/source/components/events/evsci.c +++ b/source/components/events/evsci.c @@ -6,7 +6,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/events/evxface.c b/source/components/events/evxface.c index 9bce524..3755b09 100644 --- a/source/components/events/evxface.c +++ b/source/components/events/evxface.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/events/evxfevnt.c b/source/components/events/evxfevnt.c index ce1ce4d..f854145 100644 --- a/source/components/events/evxfevnt.c +++ b/source/components/events/evxfevnt.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/events/evxfgpe.c b/source/components/events/evxfgpe.c index e76b7f1..1ef1916 100644 --- a/source/components/events/evxfgpe.c +++ b/source/components/events/evxfgpe.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -791,6 +791,20 @@ AcpiInstallGpeBlock ( goto UnlockAndExit; } + /* Validate the parent device */ + + if (Node->Type != ACPI_TYPE_DEVICE) + { + Status = AE_TYPE; + goto UnlockAndExit; + } + + if (Node->Object) + { + Status = AE_ALREADY_EXISTS; + goto UnlockAndExit; + } + /* * For user-installed GPE Block Devices, the GpeBlockBaseNumber * is always zero @@ -884,6 +898,14 @@ AcpiRemoveGpeBlock ( goto UnlockAndExit; } + /* Validate the parent device */ + + if (Node->Type != ACPI_TYPE_DEVICE) + { + Status = AE_TYPE; + goto UnlockAndExit; + } + /* Get the DeviceObject attached to the node */ ObjDesc = AcpiNsGetAttachedObject (Node); diff --git a/source/components/events/evxfregn.c b/source/components/events/evxfregn.c index 5879da6..6b38b7e 100644 --- a/source/components/events/evxfregn.c +++ b/source/components/events/evxfregn.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exconfig.c b/source/components/executer/exconfig.c index 3e9f12b..3ed056e 100644 --- a/source/components/executer/exconfig.c +++ b/source/components/executer/exconfig.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exconvrt.c b/source/components/executer/exconvrt.c index 6f803c0..fbfd137 100644 --- a/source/components/executer/exconvrt.c +++ b/source/components/executer/exconvrt.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/excreate.c b/source/components/executer/excreate.c index 376e1fd..43168ba 100644 --- a/source/components/executer/excreate.c +++ b/source/components/executer/excreate.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exdebug.c b/source/components/executer/exdebug.c index 9db779f..df61b79 100644 --- a/source/components/executer/exdebug.c +++ b/source/components/executer/exdebug.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exdump.c b/source/components/executer/exdump.c index 197eda8..4bc104d 100644 --- a/source/components/executer/exdump.c +++ b/source/components/executer/exdump.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exfield.c b/source/components/executer/exfield.c index 2b4f5f7..aedc8d9 100644 --- a/source/components/executer/exfield.c +++ b/source/components/executer/exfield.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exfldio.c b/source/components/executer/exfldio.c index cd3c40f..448d455 100644 --- a/source/components/executer/exfldio.c +++ b/source/components/executer/exfldio.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exmisc.c b/source/components/executer/exmisc.c index 7520c9b..bca0594 100644 --- a/source/components/executer/exmisc.c +++ b/source/components/executer/exmisc.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exmutex.c b/source/components/executer/exmutex.c index 42f0ece..c3eb25f 100644 --- a/source/components/executer/exmutex.c +++ b/source/components/executer/exmutex.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exnames.c b/source/components/executer/exnames.c index ac12e1a..70c0a6d 100644 --- a/source/components/executer/exnames.c +++ b/source/components/executer/exnames.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exoparg1.c b/source/components/executer/exoparg1.c index bcd702a..3c38740 100644 --- a/source/components/executer/exoparg1.c +++ b/source/components/executer/exoparg1.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exoparg2.c b/source/components/executer/exoparg2.c index ff1d8bb..8f25f7b 100644 --- a/source/components/executer/exoparg2.c +++ b/source/components/executer/exoparg2.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exoparg3.c b/source/components/executer/exoparg3.c index b850485..0168d72 100644 --- a/source/components/executer/exoparg3.c +++ b/source/components/executer/exoparg3.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exoparg6.c b/source/components/executer/exoparg6.c index 974d4c8..148db36 100644 --- a/source/components/executer/exoparg6.c +++ b/source/components/executer/exoparg6.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exprep.c b/source/components/executer/exprep.c index c629224..77ccb87 100644 --- a/source/components/executer/exprep.c +++ b/source/components/executer/exprep.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exregion.c b/source/components/executer/exregion.c index 304cfe6..1fa07e3 100644 --- a/source/components/executer/exregion.c +++ b/source/components/executer/exregion.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exresnte.c b/source/components/executer/exresnte.c index 56a7a32..82f5dc3 100644 --- a/source/components/executer/exresnte.c +++ b/source/components/executer/exresnte.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exresolv.c b/source/components/executer/exresolv.c index e99d46c..0ce9da8 100644 --- a/source/components/executer/exresolv.c +++ b/source/components/executer/exresolv.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exresop.c b/source/components/executer/exresop.c index 59602ba..01057c0 100644 --- a/source/components/executer/exresop.c +++ b/source/components/executer/exresop.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exstore.c b/source/components/executer/exstore.c index f54428b..27b49d1 100644 --- a/source/components/executer/exstore.c +++ b/source/components/executer/exstore.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exstoren.c b/source/components/executer/exstoren.c index a21d8b9e..df8f5fd 100644 --- a/source/components/executer/exstoren.c +++ b/source/components/executer/exstoren.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exstorob.c b/source/components/executer/exstorob.c index 16840e6..30304e3 100644 --- a/source/components/executer/exstorob.c +++ b/source/components/executer/exstorob.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exsystem.c b/source/components/executer/exsystem.c index 54380ea..a5c1d40 100644 --- a/source/components/executer/exsystem.c +++ b/source/components/executer/exsystem.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/executer/exutils.c b/source/components/executer/exutils.c index c8f1b6e..a3a918b 100644 --- a/source/components/executer/exutils.c +++ b/source/components/executer/exutils.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/hardware/hwacpi.c b/source/components/hardware/hwacpi.c index deb2dfb..feedc15 100644 --- a/source/components/hardware/hwacpi.c +++ b/source/components/hardware/hwacpi.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/hardware/hwesleep.c b/source/components/hardware/hwesleep.c index 5ea8e26..be8b2ee 100644 --- a/source/components/hardware/hwesleep.c +++ b/source/components/hardware/hwesleep.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/hardware/hwgpe.c b/source/components/hardware/hwgpe.c index 4f123bc..b786ca3 100644 --- a/source/components/hardware/hwgpe.c +++ b/source/components/hardware/hwgpe.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/hardware/hwpci.c b/source/components/hardware/hwpci.c index c5b2dfc..08e5ecc 100644 --- a/source/components/hardware/hwpci.c +++ b/source/components/hardware/hwpci.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/hardware/hwregs.c b/source/components/hardware/hwregs.c index 88f8b4e..a24fc5c 100644 --- a/source/components/hardware/hwregs.c +++ b/source/components/hardware/hwregs.c @@ -6,7 +6,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/hardware/hwsleep.c b/source/components/hardware/hwsleep.c index e3631b5..1e16297 100644 --- a/source/components/hardware/hwsleep.c +++ b/source/components/hardware/hwsleep.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/hardware/hwtimer.c b/source/components/hardware/hwtimer.c index c42576e..f173fca 100644 --- a/source/components/hardware/hwtimer.c +++ b/source/components/hardware/hwtimer.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/hardware/hwvalid.c b/source/components/hardware/hwvalid.c index 832ca4a..c644076 100644 --- a/source/components/hardware/hwvalid.c +++ b/source/components/hardware/hwvalid.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/hardware/hwxface.c b/source/components/hardware/hwxface.c index a1d5a04..061f202 100644 --- a/source/components/hardware/hwxface.c +++ b/source/components/hardware/hwxface.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/hardware/hwxfsleep.c b/source/components/hardware/hwxfsleep.c index 9131f95..8c46eed 100644 --- a/source/components/hardware/hwxfsleep.c +++ b/source/components/hardware/hwxfsleep.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nsaccess.c b/source/components/namespace/nsaccess.c index d1271a4..6c04c7a 100644 --- a/source/components/namespace/nsaccess.c +++ b/source/components/namespace/nsaccess.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nsalloc.c b/source/components/namespace/nsalloc.c index 38ce8fc..0f29a84 100644 --- a/source/components/namespace/nsalloc.c +++ b/source/components/namespace/nsalloc.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nsarguments.c b/source/components/namespace/nsarguments.c index 912813c..eff527b 100644 --- a/source/components/namespace/nsarguments.c +++ b/source/components/namespace/nsarguments.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nsconvert.c b/source/components/namespace/nsconvert.c index 11aca36..4c8b12d 100644 --- a/source/components/namespace/nsconvert.c +++ b/source/components/namespace/nsconvert.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nsdump.c b/source/components/namespace/nsdump.c index 4f6a7f9..2801adc 100644 --- a/source/components/namespace/nsdump.c +++ b/source/components/namespace/nsdump.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nsdumpdv.c b/source/components/namespace/nsdumpdv.c index 42297ae..fe4bdad 100644 --- a/source/components/namespace/nsdumpdv.c +++ b/source/components/namespace/nsdumpdv.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nseval.c b/source/components/namespace/nseval.c index c92e6e7..8324dba 100644 --- a/source/components/namespace/nseval.c +++ b/source/components/namespace/nseval.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nsinit.c b/source/components/namespace/nsinit.c index 05d78c1..c60b8ef 100644 --- a/source/components/namespace/nsinit.c +++ b/source/components/namespace/nsinit.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nsload.c b/source/components/namespace/nsload.c index 2576dd4..982e5a3 100644 --- a/source/components/namespace/nsload.c +++ b/source/components/namespace/nsload.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nsnames.c b/source/components/namespace/nsnames.c index 4b32b30..e22f961 100644 --- a/source/components/namespace/nsnames.c +++ b/source/components/namespace/nsnames.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nsobject.c b/source/components/namespace/nsobject.c index afab694..a26ccc6 100644 --- a/source/components/namespace/nsobject.c +++ b/source/components/namespace/nsobject.c @@ -6,7 +6,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nsparse.c b/source/components/namespace/nsparse.c index 0341a05..c5c7e02 100644 --- a/source/components/namespace/nsparse.c +++ b/source/components/namespace/nsparse.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nspredef.c b/source/components/namespace/nspredef.c index 7b7e3e3..2059f93 100644 --- a/source/components/namespace/nspredef.c +++ b/source/components/namespace/nspredef.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nsprepkg.c b/source/components/namespace/nsprepkg.c index 6d74d57..acf7730 100644 --- a/source/components/namespace/nsprepkg.c +++ b/source/components/namespace/nsprepkg.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nsrepair.c b/source/components/namespace/nsrepair.c index 45b4660..282c75e 100644 --- a/source/components/namespace/nsrepair.c +++ b/source/components/namespace/nsrepair.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nsrepair2.c b/source/components/namespace/nsrepair2.c index 0cf604b..f2f72d6 100644 --- a/source/components/namespace/nsrepair2.c +++ b/source/components/namespace/nsrepair2.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nssearch.c b/source/components/namespace/nssearch.c index a492846..e8ac74b 100644 --- a/source/components/namespace/nssearch.c +++ b/source/components/namespace/nssearch.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nsutils.c b/source/components/namespace/nsutils.c index ccecd6d..54d1a18 100644 --- a/source/components/namespace/nsutils.c +++ b/source/components/namespace/nsutils.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nswalk.c b/source/components/namespace/nswalk.c index 577b89b..48b5a27 100644 --- a/source/components/namespace/nswalk.c +++ b/source/components/namespace/nswalk.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nsxfeval.c b/source/components/namespace/nsxfeval.c index e0022a8..1423da3 100644 --- a/source/components/namespace/nsxfeval.c +++ b/source/components/namespace/nsxfeval.c @@ -6,7 +6,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nsxfname.c b/source/components/namespace/nsxfname.c index 5ef49c4..48e2fa8 100644 --- a/source/components/namespace/nsxfname.c +++ b/source/components/namespace/nsxfname.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/namespace/nsxfobj.c b/source/components/namespace/nsxfobj.c index d3adfdb..86e1097 100644 --- a/source/components/namespace/nsxfobj.c +++ b/source/components/namespace/nsxfobj.c @@ -6,7 +6,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/parser/psargs.c b/source/components/parser/psargs.c index 42436fe..c1bc15a 100644 --- a/source/components/parser/psargs.c +++ b/source/components/parser/psargs.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/parser/psloop.c b/source/components/parser/psloop.c index 0afcb4c..bbcf525 100644 --- a/source/components/parser/psloop.c +++ b/source/components/parser/psloop.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/parser/psobject.c b/source/components/parser/psobject.c index f507e8e..23fade3 100644 --- a/source/components/parser/psobject.c +++ b/source/components/parser/psobject.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/parser/psopcode.c b/source/components/parser/psopcode.c index 1542fa6..bcfb57d 100644 --- a/source/components/parser/psopcode.c +++ b/source/components/parser/psopcode.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/parser/psopinfo.c b/source/components/parser/psopinfo.c index 081b808..af15d30 100644 --- a/source/components/parser/psopinfo.c +++ b/source/components/parser/psopinfo.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/parser/psparse.c b/source/components/parser/psparse.c index 925fa56..7b8e1b9 100644 --- a/source/components/parser/psparse.c +++ b/source/components/parser/psparse.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/parser/psscope.c b/source/components/parser/psscope.c index 8227092..1a51241 100644 --- a/source/components/parser/psscope.c +++ b/source/components/parser/psscope.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/parser/pstree.c b/source/components/parser/pstree.c index 6b67013..1d57826 100644 --- a/source/components/parser/pstree.c +++ b/source/components/parser/pstree.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/parser/psutils.c b/source/components/parser/psutils.c index 05b1d95..6c37839 100644 --- a/source/components/parser/psutils.c +++ b/source/components/parser/psutils.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/parser/pswalk.c b/source/components/parser/pswalk.c index 3af8905..4e41d4b 100644 --- a/source/components/parser/pswalk.c +++ b/source/components/parser/pswalk.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/parser/psxface.c b/source/components/parser/psxface.c index 3f99157..2068a86 100644 --- a/source/components/parser/psxface.c +++ b/source/components/parser/psxface.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/resources/rsaddr.c b/source/components/resources/rsaddr.c index b08b8d3..6901962 100644 --- a/source/components/resources/rsaddr.c +++ b/source/components/resources/rsaddr.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/resources/rscalc.c b/source/components/resources/rscalc.c index a5a8e5a..9f25e72 100644 --- a/source/components/resources/rscalc.c +++ b/source/components/resources/rscalc.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/resources/rscreate.c b/source/components/resources/rscreate.c index fa6b4aa..3c9c61a 100644 --- a/source/components/resources/rscreate.c +++ b/source/components/resources/rscreate.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/resources/rsdump.c b/source/components/resources/rsdump.c index 35d9a4a..a37161e 100644 --- a/source/components/resources/rsdump.c +++ b/source/components/resources/rsdump.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/resources/rsdumpinfo.c b/source/components/resources/rsdumpinfo.c index 6882537..090df2a 100644 --- a/source/components/resources/rsdumpinfo.c +++ b/source/components/resources/rsdumpinfo.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/resources/rsinfo.c b/source/components/resources/rsinfo.c index e94fc86..1e9cea6 100644 --- a/source/components/resources/rsinfo.c +++ b/source/components/resources/rsinfo.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/resources/rsio.c b/source/components/resources/rsio.c index 8877c6d..9a6a75e 100644 --- a/source/components/resources/rsio.c +++ b/source/components/resources/rsio.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/resources/rsirq.c b/source/components/resources/rsirq.c index 48d22c1..33da524 100644 --- a/source/components/resources/rsirq.c +++ b/source/components/resources/rsirq.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/resources/rslist.c b/source/components/resources/rslist.c index 80d6f78..639f7ee 100644 --- a/source/components/resources/rslist.c +++ b/source/components/resources/rslist.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/resources/rsmemory.c b/source/components/resources/rsmemory.c index 7c6ccf5..6f0b92b 100644 --- a/source/components/resources/rsmemory.c +++ b/source/components/resources/rsmemory.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/resources/rsmisc.c b/source/components/resources/rsmisc.c index f3e02a1..af65303 100644 --- a/source/components/resources/rsmisc.c +++ b/source/components/resources/rsmisc.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/resources/rsserial.c b/source/components/resources/rsserial.c index 90adc68..965c4b4 100644 --- a/source/components/resources/rsserial.c +++ b/source/components/resources/rsserial.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/resources/rsutils.c b/source/components/resources/rsutils.c index eb0d93c..e1fb777 100644 --- a/source/components/resources/rsutils.c +++ b/source/components/resources/rsutils.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/resources/rsxface.c b/source/components/resources/rsxface.c index 67049e0..49b0878 100644 --- a/source/components/resources/rsxface.c +++ b/source/components/resources/rsxface.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/tables/tbfadt.c b/source/components/tables/tbfadt.c index 5e315ef..9010825 100644 --- a/source/components/tables/tbfadt.c +++ b/source/components/tables/tbfadt.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/tables/tbfind.c b/source/components/tables/tbfind.c index 60bb87b..8940437 100644 --- a/source/components/tables/tbfind.c +++ b/source/components/tables/tbfind.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/tables/tbinstal.c b/source/components/tables/tbinstal.c index ecbf256..ce4a93d 100644 --- a/source/components/tables/tbinstal.c +++ b/source/components/tables/tbinstal.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -315,9 +315,10 @@ AcpiTbTableOverride ( if (!NewTable) { ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY, - "%4.4s %p Attempted physical table override failed", + "%4.4s " ACPI_PRINTF_UINT + " Attempted physical table override failed", TableHeader->Signature, - ACPI_CAST_PTR (void, TableDesc->Address))); + ACPI_FORMAT_TO_UINT (TableDesc->Address))); return (NULL); } @@ -331,11 +332,11 @@ AcpiTbTableOverride ( FinishOverride: - ACPI_INFO ((AE_INFO, - "%4.4s %p %s table override, new table: %p", + ACPI_INFO ((AE_INFO, "%4.4s " ACPI_PRINTF_UINT + " %s table override, new table: " ACPI_PRINTF_UINT, TableHeader->Signature, - ACPI_CAST_PTR (void, TableDesc->Address), - OverrideType, NewTable)); + ACPI_FORMAT_TO_UINT (TableDesc->Address), + OverrideType, ACPI_FORMAT_TO_UINT (NewTable))); /* We can now unmap/delete the original table (if fully mapped) */ diff --git a/source/components/tables/tbprint.c b/source/components/tables/tbprint.c index 719ade6..4317476 100644 --- a/source/components/tables/tbprint.c +++ b/source/components/tables/tbprint.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -147,15 +147,17 @@ AcpiTbPrintTableHeader ( /* - * The reason that the Address is cast to a void pointer is so that we - * can use %p which will work properly on both 32-bit and 64-bit hosts. + * The reason that we use ACPI_PRINTF_UINT and ACPI_FORMAT_TO_UINT is to + * support both 32-bit and 64-bit hosts/addresses in a consistent manner. + * The %p specifier does not emit uniform output on all hosts. On some, + * leading zeros are not supported. */ if (ACPI_COMPARE_NAME (Header->Signature, ACPI_SIG_FACS)) { /* FACS only has signature and length fields */ - ACPI_INFO ((AE_INFO, "%4.4s %p %06X", - Header->Signature, ACPI_CAST_PTR (void, Address), + ACPI_INFO ((AE_INFO, "%-4.4s " ACPI_PRINTF_UINT " %06X", + Header->Signature, ACPI_FORMAT_TO_UINT (Address), Header->Length)); } else if (ACPI_VALIDATE_RSDP_SIG (Header->Signature)) @@ -166,8 +168,8 @@ AcpiTbPrintTableHeader ( ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->OemId, ACPI_OEM_ID_SIZE); AcpiTbFixString (LocalHeader.OemId, ACPI_OEM_ID_SIZE); - ACPI_INFO ((AE_INFO, "RSDP %p %06X (v%.2d %6.6s)", - ACPI_CAST_PTR (void, Address), + ACPI_INFO ((AE_INFO, "RSDP " ACPI_PRINTF_UINT " %06X (v%.2d %-6.6s)", + ACPI_FORMAT_TO_UINT (Address), (ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->Revision > 0) ? ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->Length : 20, ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->Revision, @@ -180,8 +182,9 @@ AcpiTbPrintTableHeader ( AcpiTbCleanupTableHeader (&LocalHeader, Header); ACPI_INFO ((AE_INFO, - "%4.4s %p %06X (v%.2d %6.6s %8.8s %08X %4.4s %08X)", - LocalHeader.Signature, ACPI_CAST_PTR (void, Address), + "%-4.4s " ACPI_PRINTF_UINT + " %06X (v%.2d %-6.6s %-8.8s %08X %-4.4s %08X)", + LocalHeader.Signature, ACPI_FORMAT_TO_UINT (Address), LocalHeader.Length, LocalHeader.Revision, LocalHeader.OemId, LocalHeader.OemTableId, LocalHeader.OemRevision, LocalHeader.AslCompilerId, LocalHeader.AslCompilerRevision)); diff --git a/source/components/tables/tbutils.c b/source/components/tables/tbutils.c index 159a7d9..a9c2d13 100644 --- a/source/components/tables/tbutils.c +++ b/source/components/tables/tbutils.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/tables/tbxface.c b/source/components/tables/tbxface.c index 1644926..dc6374b 100644 --- a/source/components/tables/tbxface.c +++ b/source/components/tables/tbxface.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/tables/tbxfload.c b/source/components/tables/tbxfload.c index 6b2d5fa..f39c2c6 100644 --- a/source/components/tables/tbxfload.c +++ b/source/components/tables/tbxfload.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/tables/tbxfroot.c b/source/components/tables/tbxfroot.c index 812f180..b3b3ed6 100644 --- a/source/components/tables/tbxfroot.c +++ b/source/components/tables/tbxfroot.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utaddress.c b/source/components/utilities/utaddress.c index a361cb3..8de363e 100644 --- a/source/components/utilities/utaddress.c +++ b/source/components/utilities/utaddress.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utalloc.c b/source/components/utilities/utalloc.c index be7eaf07..c6c29e9 100644 --- a/source/components/utilities/utalloc.c +++ b/source/components/utilities/utalloc.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utbuffer.c b/source/components/utilities/utbuffer.c index e1b56d5..6b110f5 100644 --- a/source/components/utilities/utbuffer.c +++ b/source/components/utilities/utbuffer.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utcache.c b/source/components/utilities/utcache.c index 7d84f84..51b8bde 100644 --- a/source/components/utilities/utcache.c +++ b/source/components/utilities/utcache.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utclib.c b/source/components/utilities/utclib.c index 120f012..09fe7ad 100644 --- a/source/components/utilities/utclib.c +++ b/source/components/utilities/utclib.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utcopy.c b/source/components/utilities/utcopy.c index a251c06..26eb878 100644 --- a/source/components/utilities/utcopy.c +++ b/source/components/utilities/utcopy.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -564,10 +564,10 @@ AcpiUtCopyEsimpleToIsimple ( case ACPI_TYPE_LOCAL_REFERENCE: - /* TBD: should validate incoming handle */ + /* An incoming reference is defined to be a namespace node */ - InternalObject->Reference.Class = ACPI_REFCLASS_NAME; - InternalObject->Reference.Node = ExternalObject->Reference.Handle; + InternalObject->Reference.Class = ACPI_REFCLASS_REFOF; + InternalObject->Reference.Object = ExternalObject->Reference.Handle; break; default: diff --git a/source/components/utilities/utdebug.c b/source/components/utilities/utdebug.c index 0b9018b..4a25fb2 100644 --- a/source/components/utilities/utdebug.c +++ b/source/components/utilities/utdebug.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utdecode.c b/source/components/utilities/utdecode.c index 1a3339c..6c97c0c 100644 --- a/source/components/utilities/utdecode.c +++ b/source/components/utilities/utdecode.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utdelete.c b/source/components/utilities/utdelete.c index 5047bc1..480e1f7 100644 --- a/source/components/utilities/utdelete.c +++ b/source/components/utilities/utdelete.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/uterror.c b/source/components/utilities/uterror.c index 73e2568..e085520 100644 --- a/source/components/utilities/uterror.c +++ b/source/components/utilities/uterror.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/uteval.c b/source/components/utilities/uteval.c index 472bd30..afa0a26 100644 --- a/source/components/utilities/uteval.c +++ b/source/components/utilities/uteval.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utexcep.c b/source/components/utilities/utexcep.c index 2c35386..c941c56 100644 --- a/source/components/utilities/utexcep.c +++ b/source/components/utilities/utexcep.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utglobal.c b/source/components/utilities/utglobal.c index 70ad3f4..046f3bb 100644 --- a/source/components/utilities/utglobal.c +++ b/source/components/utilities/utglobal.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utids.c b/source/components/utilities/utids.c index 831875b..70a27d0 100644 --- a/source/components/utilities/utids.c +++ b/source/components/utilities/utids.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utinit.c b/source/components/utilities/utinit.c index adbd02b..f2de225 100644 --- a/source/components/utilities/utinit.c +++ b/source/components/utilities/utinit.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utlock.c b/source/components/utilities/utlock.c index 8d5e3b2..7ac315f 100644 --- a/source/components/utilities/utlock.c +++ b/source/components/utilities/utlock.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utmath.c b/source/components/utilities/utmath.c index 9b02cbf..871a3e6 100644 --- a/source/components/utilities/utmath.c +++ b/source/components/utilities/utmath.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utmisc.c b/source/components/utilities/utmisc.c index 6553d28..93cb288 100644 --- a/source/components/utilities/utmisc.c +++ b/source/components/utilities/utmisc.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utmutex.c b/source/components/utilities/utmutex.c index a74ef81..e787cd0 100644 --- a/source/components/utilities/utmutex.c +++ b/source/components/utilities/utmutex.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utobject.c b/source/components/utilities/utobject.c index 32b31d3..7990ef1 100644 --- a/source/components/utilities/utobject.c +++ b/source/components/utilities/utobject.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utosi.c b/source/components/utilities/utosi.c index c376256..c19ba41 100644 --- a/source/components/utilities/utosi.c +++ b/source/components/utilities/utosi.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utownerid.c b/source/components/utilities/utownerid.c index 5f108ea..55756e4 100644 --- a/source/components/utilities/utownerid.c +++ b/source/components/utilities/utownerid.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utpredef.c b/source/components/utilities/utpredef.c index 114abdb..d8442f6 100644 --- a/source/components/utilities/utpredef.c +++ b/source/components/utilities/utpredef.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utresrc.c b/source/components/utilities/utresrc.c index e21e56f..53ad155a 100644 --- a/source/components/utilities/utresrc.c +++ b/source/components/utilities/utresrc.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -53,7 +53,7 @@ ACPI_MODULE_NAME ("utresrc") -#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER) +#if defined(ACPI_DEBUG_OUTPUT) || defined (ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER) /* * Strings used to decode resource descriptors. diff --git a/source/components/utilities/utstate.c b/source/components/utilities/utstate.c index b2e4c1c..5dae932 100644 --- a/source/components/utilities/utstate.c +++ b/source/components/utilities/utstate.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utstring.c b/source/components/utilities/utstring.c index 282869c..8a1ee92 100644 --- a/source/components/utilities/utstring.c +++ b/source/components/utilities/utstring.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/uttrack.c b/source/components/utilities/uttrack.c index 70d4585..ac96758 100644 --- a/source/components/utilities/uttrack.c +++ b/source/components/utilities/uttrack.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -307,7 +307,8 @@ AcpiUtFreeAndTrack ( } AcpiOsFree (DebugBlock); - ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "%p freed\n", Allocation)); + ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS, "%p freed (block %p)\n", + Allocation, DebugBlock)); return_VOID; } diff --git a/source/components/utilities/utxface.c b/source/components/utilities/utxface.c index a093ec6..6e5628e 100644 --- a/source/components/utilities/utxface.c +++ b/source/components/utilities/utxface.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utxferror.c b/source/components/utilities/utxferror.c index 366eae1..4a06537 100644 --- a/source/components/utilities/utxferror.c +++ b/source/components/utilities/utxferror.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utxfinit.c b/source/components/utilities/utxfinit.c index 984a600..7c4b66d 100644 --- a/source/components/utilities/utxfinit.c +++ b/source/components/utilities/utxfinit.c @@ -5,7 +5,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/source/components/utilities/utxfmutex.c b/source/components/utilities/utxfmutex.c index 476bbf4..06245dc 100644 --- a/source/components/utilities/utxfmutex.c +++ b/source/components/utilities/utxfmutex.c @@ -5,7 +5,7 @@ ******************************************************************************/ /* - * Copyright (C) 2000 - 2013, Intel Corp. + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without -- cgit v1.1