merge conflicts

This commit is contained in:
christos 2019-04-29 01:18:06 +00:00
parent 94783addb4
commit 5b948c02e3
113 changed files with 1275 additions and 488 deletions

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -455,14 +455,14 @@ ApCheckForGpeNameConflict (
{
ACPI_PARSE_OBJECT *NextOp;
UINT32 GpeNumber;
char Name[ACPI_NAME_SIZE + 1];
char Target[ACPI_NAME_SIZE];
char Name[ACPI_NAMESEG_SIZE + 1];
char Target[ACPI_NAMESEG_SIZE];
/* Need a null-terminated string version of NameSeg */
ACPI_MOVE_32_TO_32 (Name, &Op->Asl.NameSeg);
Name[ACPI_NAME_SIZE] = 0;
Name[ACPI_NAMESEG_SIZE] = 0;
/*
* For a GPE method:
@ -514,7 +514,7 @@ ApCheckForGpeNameConflict (
if ((NextOp->Asl.ParseOpcode == PARSEOP_METHOD) ||
(NextOp->Asl.ParseOpcode == PARSEOP_NAME))
{
if (ACPI_COMPARE_NAME (Target, NextOp->Asl.NameSeg))
if (ACPI_COMPARE_NAMESEG (Target, NextOp->Asl.NameSeg))
{
/* Found both _Exy and _Lxy in the same scope, error */
@ -558,7 +558,7 @@ ApCheckRegMethod (
/* We are only interested in _REG methods */
if (!ACPI_COMPARE_NAME (METHOD_NAME__REG, &Op->Asl.NameSeg))
if (!ACPI_COMPARE_NAMESEG (METHOD_NAME__REG, &Op->Asl.NameSeg))
{
return;
}
@ -664,7 +664,7 @@ ApDeviceSubtreeWalk (
/* These are what we are looking for */
if (ACPI_COMPARE_NAME (Name, Op->Asl.NameSeg))
if (ACPI_COMPARE_NAMESEG (Name, Op->Asl.NameSeg))
{
return (AE_CTRL_TRUE);
}
@ -723,7 +723,7 @@ ApFindNameInScope (
if ((Next->Asl.ParseOpcode == PARSEOP_METHOD) ||
(Next->Asl.ParseOpcode == PARSEOP_NAME))
{
if (ACPI_COMPARE_NAME (Name, Next->Asl.NameSeg))
if (ACPI_COMPARE_NAMESEG (Name, Next->Asl.NameSeg))
{
return (TRUE);
}

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -70,6 +70,10 @@ static void
CmDumpAllEvents (
void);
static void
CmFinishFiles(
BOOLEAN DeleteAmlFile);
/*******************************************************************************
*
@ -83,13 +87,13 @@ CmDumpAllEvents (
*
******************************************************************************/
int
ACPI_STATUS
CmDoCompile (
void)
{
ACPI_STATUS Status;
UINT8 FullCompile;
UINT8 Event;
ASL_GLOBAL_FILE_NODE *FileNode;
FullCompile = UtBeginEvent ("*** Total Compile time ***");
@ -113,7 +117,7 @@ CmDoCompile (
{
UtEndEvent (Event);
CmCleanupAndExit ();
return (0);
return (AE_OK);
}
}
UtEndEvent (Event);
@ -131,6 +135,12 @@ CmDoCompile (
{
fprintf (stderr,
"Compiler aborting due to parser-detected syntax error(s)\n");
/* Flag this error in the FileNode for compilation summary */
FileNode = FlGetCurrentFileNode ();
FileNode->ParserErrorDetected = TRUE;
AslGbl_ParserErrorDetected = TRUE;
LsDumpParseTree ();
goto ErrorExit;
}
@ -184,19 +194,35 @@ CmDoCompile (
OpcAmlOpcodeWalk, NULL);
UtEndEvent (Event);
/*
* Now that the input is parsed, we can open the AML output file.
* Note: by default, the name of this file comes from the table
* descriptor within the input file.
*/
Event = UtBeginEvent ("Open AML output file");
Status = FlOpenAmlOutputFile (AslGbl_OutputFilenamePrefix);
UtEndEvent (Event);
if (ACPI_FAILURE (Status))
{
AePrintErrorLog (ASL_FILE_STDERR);
return (-1);
}
UtEndEvent (FullCompile);
return (AE_OK);
ErrorExit:
UtEndEvent (FullCompile);
return (AE_ERROR);
}
/*******************************************************************************
*
* FUNCTION: CmDoAslMiddleAndBackEnd
*
* PARAMETERS: None
*
* RETURN: Status of middle-end and back-end
*
* DESCRIPTION: Perform compiler middle-end (type checking and semantic
* analysis) and back-end (code generation)
*
******************************************************************************/
int
CmDoAslMiddleAndBackEnd (
void)
{
UINT8 Event;
ACPI_STATUS Status;
/* Interpret and generate all compile-time constants */
@ -243,7 +269,6 @@ CmDoCompile (
AePrintErrorLog (ASL_FILE_STDOUT);
UtDisplaySummary (ASL_FILE_STDOUT);
}
UtEndEvent (FullCompile);
return (0);
}
@ -259,7 +284,7 @@ CmDoCompile (
UtEndEvent (Event);
if (ACPI_FAILURE (Status))
{
goto ErrorExit;
return (-1);
}
/* Namespace cross-reference */
@ -270,7 +295,7 @@ CmDoCompile (
Status = XfCrossReferenceNamespace ();
if (ACPI_FAILURE (Status))
{
goto ErrorExit;
return (-1);
}
/* Namespace - Check for non-referenced objects */
@ -378,21 +403,47 @@ CmDoCompile (
Event = UtBeginEvent ("Generate AML code and write output files");
DbgPrint (ASL_DEBUG_OUTPUT, "Writing AML byte code\n\n");
CgGenerateAmlOutput ();
AslGbl_CurrentDB = AslGbl_ParseTreeRoot->Asl.Child;
while (AslGbl_CurrentDB)
{
switch (FlSwitchFileSet(AslGbl_CurrentDB->Asl.Filename))
{
case SWITCH_TO_DIFFERENT_FILE:
/*
* Reset these parameters when definition blocks belong in
* different files. If they belong in the same file, there is
* no need to reset these parameters
*/
FlSeekFile (ASL_FILE_SOURCE_OUTPUT, 0);
AslGbl_SourceLine = 0;
AslGbl_NextError = AslGbl_ErrorLog;
/* fall-through */
case SWITCH_TO_SAME_FILE:
CgGenerateAmlOutput ();
CmDoOutputFiles ();
AslGbl_CurrentDB = AslGbl_CurrentDB->Asl.Next;
break;
default: /* FILE_NOT_FOUND */
/* The requested file could not be found. Get out of here */
AslGbl_CurrentDB = NULL;
break;
}
}
UtEndEvent (Event);
Event = UtBeginEvent ("Write optional output files");
CmDoOutputFiles ();
UtEndEvent (Event);
UtEndEvent (FullCompile);
CmCleanupAndExit ();
return (0);
ErrorExit:
UtEndEvent (FullCompile);
CmCleanupAndExit ();
return (-1);
}
@ -699,11 +750,14 @@ void
CmCleanupAndExit (
void)
{
UINT32 i;
BOOLEAN DeleteAmlFile = FALSE;
ASL_GLOBAL_FILE_NODE *CurrentFileNode = AslGbl_FilesList;
AslCheckExpectedExceptions ();
/* Check if any errors occurred during compile */
(void) AslCheckForErrorExit ();
AePrintErrorLog (ASL_FILE_STDERR);
if (AslGbl_DebugFlag)
{
@ -757,15 +811,63 @@ CmCleanupAndExit (
* We will delete the AML file if there are errors and the
* force AML output option has not been used.
*/
if ((AslGbl_ExceptionCount[ASL_ERROR] > 0) &&
if (AslGbl_ParserErrorDetected || ((AslGbl_ExceptionCount[ASL_ERROR] > 0) &&
(!AslGbl_IgnoreErrors) &&
AslGbl_Files[ASL_FILE_AML_OUTPUT].Handle)
AslGbl_Files[ASL_FILE_AML_OUTPUT].Handle))
{
DeleteAmlFile = TRUE;
}
/* Close all open files */
while (CurrentFileNode)
{
switch (FlSwitchFileSet (CurrentFileNode->Files[ASL_FILE_INPUT].Filename))
{
case SWITCH_TO_SAME_FILE:
case SWITCH_TO_DIFFERENT_FILE:
CmFinishFiles (DeleteAmlFile);
CurrentFileNode = CurrentFileNode->Next;
break;
case FILE_NOT_FOUND:
default:
CurrentFileNode = NULL;
break;
}
}
/* Final cleanup after compiling one file */
if (!AslGbl_DoAslConversion)
{
UtDeleteLocalCaches ();
}
}
/*******************************************************************************
*
* FUNCTION: CmFinishFiles
*
* PARAMETERS: DeleteAmlFile
*
* RETURN: None.
*
* DESCRIPTION: Close all open files, delete AML files depending on the
* function parameter is true.
*
******************************************************************************/
static void
CmFinishFiles(
BOOLEAN DeleteAmlFile)
{
UINT32 i;
/*
* Take care with the preprocessor file (.pre), it might be the same
* as the "input" file, depending on where the compiler has terminated
@ -782,7 +884,15 @@ CmCleanupAndExit (
for (i = ASL_FILE_INPUT; i < ASL_MAX_FILE_TYPE; i++)
{
FlCloseFile (i);
/*
* Some files such as debug output files could be pointing to
* stderr or stdout. Leave these alone.
*/
if (AslGbl_Files[i].Handle != stderr &&
AslGbl_Files[i].Handle != stdout)
{
FlCloseFile (i);
}
}
/* Delete AML file if there are errors */
@ -815,11 +925,4 @@ CmCleanupAndExit (
{
FlDeleteFile (ASL_FILE_SOURCE_OUTPUT);
}
/* Final cleanup after compiling one file */
if (!AslGbl_DoAslConversion)
{
UtDeleteLocalCaches ();
}
}

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -146,10 +146,14 @@ void
AslCompilerFileHeader (
UINT32 FileId);
int
ACPI_STATUS
CmDoCompile (
void);
int
CmDoAslMiddleAndBackEnd (
void);
void
CmDoOutputFiles (
void);
@ -158,6 +162,10 @@ void
CmCleanupAndExit (
void);
ACPI_STATUS
AslDoDisassembly (
void);
/*
* aslallocate - memory allocation
@ -594,7 +602,7 @@ OpnDoPackage (
/*
* aslopt - optmization
* aslopt - optimization
*/
void
OptOptimizeNamePath (
@ -767,9 +775,10 @@ ExDoExternal (
/* Values for "Visitation" parameter above */
#define ASL_WALK_VISIT_DOWNWARD 0x01
#define ASL_WALK_VISIT_UPWARD 0x02
#define ASL_WALK_VISIT_TWICE (ASL_WALK_VISIT_DOWNWARD | ASL_WALK_VISIT_UPWARD)
#define ASL_WALK_VISIT_DOWNWARD 0x01
#define ASL_WALK_VISIT_UPWARD 0x02
#define ASL_WALK_VISIT_DB_SEPARATELY 0x04
#define ASL_WALK_VISIT_TWICE (ASL_WALK_VISIT_DOWNWARD | ASL_WALK_VISIT_UPWARD)
/*
@ -926,6 +935,11 @@ FlSeekFile (
UINT32 FileId,
long Offset);
void
FlSeekFileSet (
UINT32 FileId,
long Offset);
void
FlCloseFile (
UINT32 FileId);
@ -960,6 +974,34 @@ ACPI_STATUS
FlOpenMiscOutputFiles (
char *InputFilename);
ACPI_STATUS
FlInitOneFile (
char *InputFilename);
ASL_FILE_SWITCH_STATUS
FlSwitchFileSet (
char *InputFilename);
FILE *
FlGetFileHandle (
UINT32 OutFileId,
UINT32 InFileId,
char *Filename);
ASL_GLOBAL_FILE_NODE *
FlGetFileNode (
UINT32 FileId,
char *Filename);
ASL_GLOBAL_FILE_NODE *
FlGetCurrentFileNode (
void);
BOOLEAN
FlInputFileExists (
char *InputFilename);
/*
* aslhwmap - hardware map summary
*/
@ -975,7 +1017,6 @@ ACPI_STATUS
LdLoadNamespace (
ACPI_PARSE_OBJECT *RootOp);
/*
* asllookup - namespace lookup functions
*/
@ -983,6 +1024,7 @@ void
LkFindUnreferencedObjects (
void);
/*
* aslhelp - help screens
*/
@ -1010,6 +1052,7 @@ void
NsSetupNamespaceListing (
void *Handle);
/*
* asloptions - command line processing
*/
@ -1018,6 +1061,7 @@ AslCommandLine (
int argc,
char **argv);
/*
* aslxref - namespace cross reference
*/
@ -1045,7 +1089,7 @@ OtXrefWalkPart1 (
/*
* aslutils - common compiler utilites
* aslutils - common compiler utilities
*/
void
DbgPrint (
@ -1113,6 +1157,11 @@ void
UtDisplaySummary (
UINT32 FileId);
void
UtDisplayOneSummary (
UINT32 FileId,
BOOLEAN DisplayErrorSummary);
void
UtConvertByteToHex (
UINT8 RawByte,
@ -1164,6 +1213,7 @@ AuConvertUuidToString (
char *UuIdBuffer,
char *OutString);
/*
* aslresource - Resource template generation utilities
*/
@ -1371,6 +1421,7 @@ ASL_RESOURCE_NODE *
RsDoPinGroupConfigDescriptor (
ASL_RESOURCE_INFO *Info);
/*
* aslrestype2d - DWord address descriptors
*/

View File

@ -6,7 +6,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -584,7 +584,7 @@ NamePathTail [.]{NameSeg}
"IPMI" { count (0); return (PARSEOP_REGIONSPACE_IPMI); }
"GeneralPurposeIo" { count (0); return (PARSEOP_REGIONSPACE_GPIO); } /* ACPI 5.0 */
"GenericSerialBus" { count (0); return (PARSEOP_REGIONSPACE_GSBUS); } /* ACPI 5.0 */
"PCC" { count (0); return (PARSEOP_REGIONSPACE_PCC); } /* ACPI 5.0 */
"PlatformCommChannel" { count (0); return (PARSEOP_REGIONSPACE_PCC); } /* ACPI 5.0 */
"FFixedHW" { count (0); return (PARSEOP_REGIONSPACE_FFIXEDHW); }
/* ResourceTypeKeyword: Resource Usage - Resource Descriptors */
@ -705,9 +705,16 @@ NamePathTail [.]{NameSeg}
{NameSeg} { char *s;
count (0);
s=UtLocalCacheCalloc (ACPI_NAME_SIZE + 1);
s=UtLocalCacheCalloc (ACPI_NAMESEG_SIZE + 1);
if (strcmp (AslCompilertext, "\\"))
{
/*
* According to the ACPI specification,
* NameSegments must have length of 4. If
* the NameSegment has length less than 4,
* they are padded with underscores to meet
* the required length.
*/
strcpy (s, "____");
AcpiUtStrupr (AslCompilertext);
}

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -366,10 +366,12 @@ AePrintErrorSourceLine (
* Use the merged header/source file if present, otherwise
* use input file
*/
SourceFile = AslGbl_Files[ASL_FILE_SOURCE_OUTPUT].Handle;
SourceFile = FlGetFileHandle (ASL_FILE_SOURCE_OUTPUT,
ASL_FILE_SOURCE_OUTPUT, Enode->SourceFilename);
if (!SourceFile)
{
SourceFile = AslGbl_Files[ASL_FILE_INPUT].Handle;
SourceFile = FlGetFileHandle (ASL_FILE_INPUT,
ASL_FILE_INPUT, Enode->Filename);
}
if (SourceFile)
@ -710,6 +712,7 @@ static void AslInitEnode (
ASL_ERROR_MSG *SubError)
{
ASL_ERROR_MSG *Enode;
ASL_GLOBAL_FILE_NODE *FileNode;
*InputEnode = UtLocalCalloc (sizeof (ASL_ERROR_MSG));
@ -751,6 +754,23 @@ static void AslInitEnode (
{
Enode->FilenameLength = 6;
}
FileNode = FlGetCurrentFileNode ();
if (!FileNode)
{
return;
}
if (!FlInputFileExists (Filename))
{
/*
* This means that this file is an include file. Record the .src
* file as the error message source because this file is not in
* the global file list.
*/
Enode->SourceFilename =
FileNode->Files[ASL_FILE_SOURCE_OUTPUT].Filename;
}
}
}
@ -884,7 +904,7 @@ AslLogNewError (
}
AslGbl_ExceptionCount[ModifiedLevel]++;
if (AslGbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT)
if (!AslGbl_IgnoreErrors && AslGbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT)
{
printf ("\nMaximum error count (%u) exceeded\n", ASL_MAX_ERROR_COUNT);
@ -1131,7 +1151,7 @@ AslElevateException (
return (AE_LIMIT);
}
AslGbl_ElevatedMessages[AslGbl_ExpectedMessagesIndex] = MessageId;
AslGbl_ElevatedMessages[AslGbl_ElevatedMessagesIndex] = MessageId;
AslGbl_ElevatedMessagesIndex++;
return (AE_OK);
}

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -69,7 +69,7 @@ FlFileError (
{
snprintf (AslGbl_MsgBuffer, sizeof(AslGbl_MsgBuffer), "\"%s\" (%s) - %s", AslGbl_Files[FileId].Filename,
AslGbl_Files[FileId].Description, strerror (errno));
AslGbl_FileDescs[FileId].Description, strerror (errno));
AslCommonError (ASL_ERROR, ErrorId, 0, 0, 0, 0, NULL, AslGbl_MsgBuffer);
}
@ -392,7 +392,7 @@ FlDeleteFile (
if (remove (Info->Filename))
{
printf ("%s (%s file) ",
Info->Filename, Info->Description);
Info->Filename, AslGbl_FileDescs[FileId].Description);
perror ("Could not delete");
}

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -62,6 +62,257 @@ FlParseInputPathname (
#endif
/*******************************************************************************
*
* FUNCTION: FlInitOneFile
*
* PARAMETERS: InputFilename - The user-specified ASL source file to be
* compiled
*
* RETURN: Status
*
* DESCRIPTION: Initialize global file structure for one input file. This file
* structure contains references to input, output, debugging, and
* other miscellaneous files that are associated for a single
* input ASL file.
*
******************************************************************************/
ACPI_STATUS
FlInitOneFile (
char *InputFilename)
{
UINT32 i;
ASL_GLOBAL_FILE_NODE *NewFileNode;
if (FlInputFileExists (InputFilename))
{
AslError (ASL_ERROR, ASL_MSG_DUPLICATE_INPUT_FILE, NULL, InputFilename);
return (AE_ALREADY_EXISTS);
}
NewFileNode = ACPI_CAST_PTR (ASL_GLOBAL_FILE_NODE,
UtLocalCacheCalloc (sizeof (ASL_GLOBAL_FILE_NODE)));
if (!NewFileNode)
{
AslError (ASL_ERROR, ASL_MSG_MEMORY_ALLOCATION, NULL, NULL);
return (AE_NO_MEMORY);
}
NewFileNode->ParserErrorDetected = FALSE;
NewFileNode->Next = AslGbl_FilesList;
AslGbl_FilesList = NewFileNode;
AslGbl_Files = NewFileNode->Files;
for (i = 0; i < ASL_NUM_FILES; i++)
{
AslGbl_Files[i].Handle = NULL;
AslGbl_Files[i].Filename = NULL;
}
AslGbl_Files[ASL_FILE_STDOUT].Handle = stdout;
AslGbl_Files[ASL_FILE_STDOUT].Filename = "STDOUT";
if (AslGbl_VerboseErrors)
{
AslGbl_Files[ASL_FILE_STDERR].Handle = stderr;
}
else
{
AslGbl_Files[ASL_FILE_STDERR].Handle = stdout;
}
AslGbl_Files[ASL_FILE_STDERR].Filename = "STDERR";
return (AE_OK);
}
/*******************************************************************************
*
* FUNCTION: FlInputFileExists
*
* PARAMETERS: Filename - File name to be searched
*
* RETURN: Status
*
* DESCRIPTION: Returns true if the file name already exists.
*
******************************************************************************/
BOOLEAN
FlInputFileExists (
char *Filename)
{
ASL_GLOBAL_FILE_NODE *Current = AslGbl_FilesList;
while (Current)
{
if (!strcmp (Filename, Current->Files[ASL_FILE_INPUT].Filename))
{
return (TRUE);
}
Current = Current->Next;
}
return (FALSE);
}
/*******************************************************************************
*
* FUNCTION: FlSwitchFileSet
*
* PARAMETERS: Op - Parse node for the LINE asl statement
*
* RETURN: None.
*
* DESCRIPTION: Set the current line number
*
******************************************************************************/
ASL_FILE_SWITCH_STATUS
FlSwitchFileSet (
char *InputFilename)
{
ASL_GLOBAL_FILE_NODE *Current = AslGbl_FilesList;
char *PrevFilename = Current->Files[ASL_FILE_INPUT].Filename;
while (Current)
{
if (!strcmp(Current->Files[ASL_FILE_INPUT].Filename, InputFilename))
{
AslGbl_Files = Current->Files;
AslGbl_TableSignature = Current->TableSignature;
AslGbl_TableId = Current->TableId;
if (!strcmp (InputFilename, PrevFilename))
{
return (SWITCH_TO_SAME_FILE);
}
else
{
return (SWITCH_TO_DIFFERENT_FILE);
}
}
Current = Current->Next;
}
return (FILE_NOT_FOUND);
}
/*******************************************************************************
*
* FUNCTION: FlGetFileHandle
*
* PARAMETERS: OutFileId - denotes file type of output handle
* InFileId - denotes file type of the input Filename
* Filename
*
* RETURN: File handle
*
* DESCRIPTION: Get the file handle for a particular filename/FileId. This
* function also allows the caller to specify the file Id of the
* desired type.
*
******************************************************************************/
FILE *
FlGetFileHandle (
UINT32 OutFileId,
UINT32 InFileId,
char *Filename)
{
ASL_GLOBAL_FILE_NODE *Current = AslGbl_FilesList;
if (!Filename)
{
return (NULL);
}
while (Current)
{
if (!strcmp (Current->Files[InFileId].Filename, Filename))
{
return (Current->Files[OutFileId].Handle);
}
Current = Current->Next;
}
return (NULL);
}
/*******************************************************************************
*
* FUNCTION: FlGetFileNode
*
* PARAMETERS: FileId - File type (ID) of the input Filename
* Filename - File to search for
*
* RETURN: A global file node
*
* DESCRIPTION: Get the file node for a particular filename/FileId.
*
******************************************************************************/
ASL_GLOBAL_FILE_NODE *
FlGetFileNode (
UINT32 FileId,
char *Filename)
{
ASL_GLOBAL_FILE_NODE *Current = AslGbl_FilesList;
if (!Filename)
{
return (NULL);
}
while (Current)
{
if (!strcmp (Current->Files[FileId].Filename, Filename))
{
return (Current);
}
Current = Current->Next;
}
return (NULL);
}
/*******************************************************************************
*
* FUNCTION: FlGetCurrentFileNode
*
* PARAMETERS: None
*
* RETURN: Global file node
*
* DESCRIPTION: Get the current input file node
*
******************************************************************************/
ASL_GLOBAL_FILE_NODE *
FlGetCurrentFileNode (
void)
{
return (FlGetFileNode (
ASL_FILE_INPUT,AslGbl_Files[ASL_FILE_INPUT].Filename));
}
/*******************************************************************************
*
* FUNCTION: FlSetLineNumber
@ -318,8 +569,6 @@ FlOpenIncludeWithPrefix (
IncludeFile = fopen (Pathname, "r");
if (!IncludeFile)
{
fprintf (stderr, "Could not open include file %s\n", Pathname);
ACPI_FREE (Pathname);
return (NULL);
}

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -216,6 +216,7 @@ LdLoadFieldElements (
(Node->Flags & ANOBJ_IS_EXTERNAL))
{
Node->Type = (UINT8) ACPI_TYPE_LOCAL_REGION_FIELD;
Node->Flags &= ~ANOBJ_IS_EXTERNAL;
}
else
{
@ -223,8 +224,8 @@ LdLoadFieldElements (
* The name already exists in this scope
* But continue processing the elements
*/
AslDualParseOpError (ASL_WARNING, ASL_MSG_EXTERN_COLLISION, Child,
Child->Asl.Value.String, ASL_MSG_EXTERN_FOUND_HERE, Node->Op,
AslDualParseOpError (ASL_WARNING, ASL_MSG_NAME_EXISTS, Child,
Child->Asl.Value.String, ASL_MSG_FOUND_HERE, Node->Op,
Node->Op->Asl.ExternalName);
}
}
@ -384,7 +385,7 @@ LdNamespace1Begin (
case AML_FIELD_OP:
Status = LdLoadFieldElements (Op, WalkState);
return (Status);
break;
case AML_INT_CONNECTION_OP:
@ -448,7 +449,8 @@ LdNamespace1Begin (
* We only want references to named objects:
* Store (2, WXYZ) -> Attempt to resolve the name
*/
if (OpInfo->Class == AML_CLASS_NAMED_OBJECT)
if ((OpInfo->Class == AML_CLASS_NAMED_OBJECT) &&
(OpInfo->Type != AML_TYPE_NAMED_FIELD))
{
return (AE_OK);
}
@ -467,7 +469,7 @@ LdNamespace1Begin (
if (Status == AE_NOT_FOUND)
{
/*
* This is either a foward reference or the object truly
* This is either a forward reference or the object truly
* does not exist. The two cases can only be differentiated
* during the cross-reference stage later. Mark the Op/Name
* as not-found for now to indicate the need for further
@ -594,7 +596,7 @@ LdNamespace1Begin (
/* However, this is an error -- operand to Scope must exist */
if (strlen (Op->Asl.ExternalName) == ACPI_NAME_SIZE)
if (strlen (Op->Asl.ExternalName) == ACPI_NAMESEG_SIZE)
{
AslError (ASL_ERROR, ASL_MSG_NOT_FOUND, Op,
Op->Asl.ExternalName);
@ -623,7 +625,7 @@ LdNamespace1Begin (
* 10/2015.
*/
if ((Node->Flags & ANOBJ_IS_EXTERNAL) &&
(ACPI_COMPARE_NAME (AslGbl_TableSignature, "DSDT")))
(ACPI_COMPARE_NAMESEG (AslGbl_TableSignature, "DSDT")))
{
/* However, allowed if the reference is within a method */
@ -987,7 +989,7 @@ LdNamespace2Begin (
{
/* Standalone NameSeg vs. NamePath */
if (strlen (Arg->Asl.ExternalName) == ACPI_NAME_SIZE)
if (strlen (Arg->Asl.ExternalName) == ACPI_NAMESEG_SIZE)
{
AslError (ASL_ERROR, ASL_MSG_NOT_FOUND, Op,
Arg->Asl.ExternalName);

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -133,7 +133,7 @@ OptSearchToRoot (
* not match, and we cannot use this optimization.
*/
Path = &(((char *) TargetPath->Pointer)[
TargetPath->Length - ACPI_NAME_SIZE]);
TargetPath->Length - ACPI_NAMESEG_SIZE]);
ScopeInfo.Scope.Node = CurrentNode;
/* Lookup the NameSeg using SEARCH_PARENT (search-to-root) */
@ -167,7 +167,7 @@ OptSearchToRoot (
/* We must allocate a new string for the name (TargetPath gets deleted) */
*NewPath = UtLocalCacheCalloc (ACPI_NAME_SIZE + 1);
*NewPath = UtLocalCacheCalloc (ACPI_NAMESEG_SIZE + 1);
strcpy (*NewPath, Path);
if (strncmp (*NewPath, "_T_", 3))
@ -235,7 +235,7 @@ OptBuildShortestPath (
* can possibly have in common. (To optimize, we have to have at least 1)
*
* Note: The external NamePath string lengths are always a multiple of 5
* (ACPI_NAME_SIZE + separator)
* (ACPI_NAMESEG_SIZE + separator)
*/
MaxCommonSegments = TargetPath->Length / ACPI_PATH_SEGMENT_LENGTH;
if (CurrentPath->Length < TargetPath->Length)
@ -255,7 +255,7 @@ OptBuildShortestPath (
Index = (NumCommonSegments * ACPI_PATH_SEGMENT_LENGTH) + 1;
if (!ACPI_COMPARE_NAME (
if (!ACPI_COMPARE_NAMESEG (
&(ACPI_CAST_PTR (char, TargetPath->Pointer)) [Index],
&(ACPI_CAST_PTR (char, CurrentPath->Pointer)) [Index]))
{
@ -605,7 +605,7 @@ OptOptimizeNamePath (
* to be any possibility that it can be optimized to a shorter string
*/
AmlNameStringLength = strlen (AmlNameString);
if (AmlNameStringLength <= ACPI_NAME_SIZE)
if (AmlNameStringLength <= ACPI_NAMESEG_SIZE)
{
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_OPTIMIZATIONS,
"NAMESEG %4.4s\n", AmlNameString));
@ -706,7 +706,7 @@ OptOptimizeNamePath (
ACPI_FREE (ExternalNameString);
/*
* Attempt an optmization depending on the type of namepath
* Attempt an optimization depending on the type of namepath
*/
if (Flags & (AML_NAMED | AML_CREATE))
{

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -788,7 +788,6 @@ AslDoOptions (
*/
AslGbl_VerboseErrors = FALSE;
AslGbl_DoSignon = FALSE;
AslGbl_Files[ASL_FILE_STDERR].Handle = stdout;
break;
case 'o':

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -341,7 +341,7 @@ ApCheckPredefinedReturnValue (
* DESCRIPTION: Check for a predefined name for a static object (created via
* the ASL Name operator). If it is a predefined ACPI name, ensure
* that the name does not require any arguments (which would
* require a control method implemenation of the name), and that
* require a control method implementation of the name), and that
* the type of the object is one of the expected types for the
* predefined name.
*
@ -470,7 +470,7 @@ ApCheckForPredefinedName (
ThisName = AcpiGbl_PredefinedMethods;
for (i = 0; ThisName->Info.Name[0]; i++)
{
if (ACPI_COMPARE_NAME (Name, ThisName->Info.Name))
if (ACPI_COMPARE_NAMESEG (Name, ThisName->Info.Name))
{
/* Return index into predefined array */
return (i);
@ -484,7 +484,7 @@ ApCheckForPredefinedName (
ThisName = AcpiGbl_ResourceNames;
while (ThisName->Info.Name[0])
{
if (ACPI_COMPARE_NAME (Name, ThisName->Info.Name))
if (ACPI_COMPARE_NAMESEG (Name, ThisName->Info.Name))
{
return (ACPI_PREDEFINED_NAME);
}
@ -495,7 +495,7 @@ ApCheckForPredefinedName (
ThisName = AcpiGbl_ScopeNames;
while (ThisName->Info.Name[0])
{
if (ACPI_COMPARE_NAME (Name, ThisName->Info.Name))
if (ACPI_COMPARE_NAMESEG (Name, ThisName->Info.Name))
{
return (ACPI_PREDEFINED_NAME);
}

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -6,7 +6,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -424,14 +424,18 @@ count (
{
case 2:
AslGbl_TotalKeywords++;
AslGbl_TotalNamedObjects++;
++AslGbl_TotalKeywords;
++AslGbl_TotalNamedObjects;
++AslGbl_FilesList->TotalKeywords;
++AslGbl_FilesList->TotalNamedObjects;
break;
case 3:
AslGbl_TotalKeywords++;
AslGbl_TotalExecutableOpcodes++;
++AslGbl_TotalKeywords;
++AslGbl_TotalExecutableOpcodes;
++AslGbl_FilesList->TotalKeywords;
++AslGbl_FilesList->TotalExecutableOpcodes;
break;
default:
@ -502,7 +506,7 @@ loop:
/*
* Check for nested comment -- can help catch cases where a previous
* comment was accidently left unterminated
* comment was accidentally left unterminated
*/
if ((c1 == '/') && (c == '*'))
{

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -354,6 +354,7 @@ TrLinkOpChildren (
{
ACPI_PARSE_OBJECT *Child;
ACPI_PARSE_OBJECT *PrevChild;
ACPI_PARSE_OBJECT *LastSibling;
va_list ap;
UINT32 i;
BOOLEAN FirstChild;
@ -372,8 +373,18 @@ TrLinkOpChildren (
{
case PARSEOP_ASL_CODE:
AslGbl_ParseTreeRoot = Op;
Op->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
if (!AslGbl_ParseTreeRoot)
{
DbgPrint (ASL_PARSE_OUTPUT, "Creating first Definition Block\n");
AslGbl_ParseTreeRoot = Op;
Op->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
}
else
{
DbgPrint (ASL_PARSE_OUTPUT, "Creating subsequent Definition Block\n");
Op = AslGbl_ParseTreeRoot;
}
DbgPrint (ASL_PARSE_OUTPUT, "ASLCODE (Tree Completed)->");
break;
@ -452,7 +463,27 @@ TrLinkOpChildren (
if (FirstChild)
{
FirstChild = FALSE;
Op->Asl.Child = Child;
/*
* In the case that multiple definition blocks are being compiled,
* append the definition block to the end of the child list as the
* last sibling. This is done to facilitate namespace cross-
* reference between multiple definition blocks.
*/
if (Op->Asl.Child &&
(Op->Asl.Child->Asl.ParseOpcode == PARSEOP_DEFINITION_BLOCK))
{
LastSibling = Op->Asl.Child;
while (LastSibling->Asl.Next)
{
LastSibling = LastSibling->Asl.Next;
}
LastSibling->Asl.Next = Child;
}
else
{
Op->Asl.Child = Child;
}
}
/* Point all children to parent */
@ -717,6 +748,8 @@ TrWalkParseTree (
BOOLEAN OpPreviouslyVisited;
ACPI_PARSE_OBJECT *StartOp = Op;
ACPI_STATUS Status;
ACPI_PARSE_OBJECT *Restore = NULL;
BOOLEAN WalkOneDefinitionBlock = Visitation & ASL_WALK_VISIT_DB_SEPARATELY;
if (!AslGbl_ParseTreeRoot)
@ -727,7 +760,13 @@ TrWalkParseTree (
Level = 0;
OpPreviouslyVisited = FALSE;
switch (Visitation)
if (Op->Asl.ParseOpcode == PARSEOP_DEFINITION_BLOCK &&
WalkOneDefinitionBlock)
{
Restore = Op->Asl.Next;
Op->Asl.Next = NULL;
}
switch (Visitation & ~ASL_WALK_VISIT_DB_SEPARATELY)
{
case ASL_WALK_VISIT_DOWNWARD:
@ -753,7 +792,7 @@ TrWalkParseTree (
{
/* Exit immediately on any error */
return (Status);
goto ErrorExit;
}
}
@ -799,7 +838,7 @@ TrWalkParseTree (
Status = AscendingCallback (Op, Level, Context);
if (ACPI_FAILURE (Status))
{
return (Status);
goto ErrorExit;
}
}
else
@ -848,7 +887,7 @@ TrWalkParseTree (
Status = AscendingCallback (Op, Level, Context);
if (ACPI_FAILURE (Status))
{
return (Status);
goto ErrorExit;
}
}
else
@ -871,7 +910,7 @@ TrWalkParseTree (
{
/* Exit immediately on any error */
return (Status);
goto ErrorExit;
}
}
@ -910,5 +949,20 @@ TrWalkParseTree (
/* If we get here, the walk completed with no errors */
if (Op->Asl.ParseOpcode == PARSEOP_DEFINITION_BLOCK &&
WalkOneDefinitionBlock)
{
Op->Asl.Next = Restore;
}
return (AE_OK);
ErrorExit:
if (Op->Asl.ParseOpcode == PARSEOP_DEFINITION_BLOCK &&
WalkOneDefinitionBlock)
{
Op->Asl.Next = Restore;
}
return (Status);
}

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -66,6 +66,10 @@ UtAttachNameseg (
ACPI_PARSE_OBJECT *Op,
char *Name);
static void
UtDisplayErrorSummary (
UINT32 FileId);
/*******************************************************************************
*
@ -412,21 +416,23 @@ UtSetParseOpName (
/*******************************************************************************
*
* FUNCTION: UtDisplaySummary
* FUNCTION: UtDisplayOneSummary
*
* PARAMETERS: FileID - ID of outpout file
*
* RETURN: None
*
* DESCRIPTION: Display compilation statistics
* DESCRIPTION: Display compilation statistics for one input file
*
******************************************************************************/
void
UtDisplaySummary (
UINT32 FileId)
UtDisplayOneSummary (
UINT32 FileId,
BOOLEAN DisplayErrorSummary)
{
UINT32 i;
ASL_GLOBAL_FILE_NODE *FileNode;
if (FileId != ASL_FILE_STDOUT)
@ -457,25 +463,41 @@ UtDisplaySummary (
}
else
{
FlPrintFile (FileId,
"%-14s %s - %u lines, %u bytes, %u keywords\n",
"ASL Input:",
AslGbl_Files[ASL_FILE_INPUT].Filename, AslGbl_CurrentLineNumber,
AslGbl_OriginalInputFileSize, AslGbl_TotalKeywords);
/* AML summary */
if ((AslGbl_ExceptionCount[ASL_ERROR] == 0) || (AslGbl_IgnoreErrors))
FileNode = FlGetCurrentFileNode ();
if (!FileNode)
{
if (AslGbl_Files[ASL_FILE_AML_OUTPUT].Handle)
fprintf (stderr, "Summary could not be generated");
return;
}
if (FileNode->ParserErrorDetected)
{
FlPrintFile (FileId,
"%-14s %s - Compilation aborted due to parser-detected syntax error(s)\n",
"ASL Input:", AslGbl_Files[ASL_FILE_INPUT].Filename);
}
else
{
FlPrintFile (FileId,
"%-14s %s - %7u bytes %6u keywords %6u source lines\n",
"ASL Input:",
AslGbl_Files[ASL_FILE_INPUT].Filename,
FileNode->OriginalInputFileSize,
FileNode->TotalKeywords,
FileNode->TotalLineCount);
/* AML summary */
if (!AslGbl_ParserErrorDetected &&
((AslGbl_ExceptionCount[ASL_ERROR] == 0) || AslGbl_IgnoreErrors) &&
AslGbl_Files[ASL_FILE_AML_OUTPUT].Handle)
{
FlPrintFile (FileId,
"%-14s %s - %u bytes, %u named objects, "
"%u executable opcodes\n",
"%-14s %s - %7u bytes %6u opcodes %6u named objects\n",
"AML Output:",
AslGbl_Files[ASL_FILE_AML_OUTPUT].Filename,
FlGetFileSize (ASL_FILE_AML_OUTPUT),
AslGbl_TotalNamedObjects, AslGbl_TotalExecutableOpcodes);
FileNode->TotalExecutableOpcodes,
FileNode->TotalNamedObjects);
}
}
}
@ -504,14 +526,55 @@ UtDisplaySummary (
}
FlPrintFile (FileId, "%14s %s - %u bytes\n",
AslGbl_Files[i].ShortDescription,
AslGbl_FileDescs[i].ShortDescription,
AslGbl_Files[i].Filename, FlGetFileSize (i));
}
/* Error summary */
/*
* Optionally emit an error summary for a file. This is used to enhance the
* appearance of listing files.
*/
if (DisplayErrorSummary)
{
UtDisplayErrorSummary (FileId);
}
}
/*******************************************************************************
*
* FUNCTION: UtDisplayErrorSummary
*
* PARAMETERS: FileID - ID of outpout file
*
* RETURN: None
*
* DESCRIPTION: Display compilation statistics for all input files
*
******************************************************************************/
static void
UtDisplayErrorSummary (
UINT32 FileId)
{
BOOLEAN ErrorDetected;
ErrorDetected = AslGbl_ParserErrorDetected ||
((AslGbl_ExceptionCount[ASL_ERROR] > 0) && !AslGbl_IgnoreErrors);
if (ErrorDetected)
{
FlPrintFile (FileId, "\nCompilation failed. ");
}
else
{
FlPrintFile (FileId, "\nCompilation successful. ");
}
FlPrintFile (FileId,
"\nCompilation complete. %u Errors, %u Warnings, %u Remarks",
"%u Errors, %u Warnings, %u Remarks",
AslGbl_ExceptionCount[ASL_ERROR],
AslGbl_ExceptionCount[ASL_WARNING] +
AslGbl_ExceptionCount[ASL_WARNING2] +
@ -520,6 +583,19 @@ UtDisplaySummary (
if (AslGbl_FileType != ASL_INPUT_TYPE_ASCII_DATA)
{
if (AslGbl_ParserErrorDetected)
{
FlPrintFile (FileId,
"\nNo AML files were generated due to syntax error(s)\n");
return;
}
else if (ErrorDetected)
{
FlPrintFile (FileId,
"\nNo AML files were generated due to compiler error(s)\n");
return;
}
FlPrintFile (FileId, ", %u Optimizations",
AslGbl_ExceptionCount[ASL_OPTIMIZATION]);
@ -533,6 +609,46 @@ UtDisplaySummary (
}
/*******************************************************************************
*
* FUNCTION: UtDisplaySummary
*
* PARAMETERS: FileID - ID of outpout file
*
* RETURN: None
*
* DESCRIPTION: Display compilation statistics for all input files
*
******************************************************************************/
void
UtDisplaySummary (
UINT32 FileId)
{
ASL_GLOBAL_FILE_NODE *Current = AslGbl_FilesList;
while (Current)
{
switch (FlSwitchFileSet(Current->Files[ASL_FILE_INPUT].Filename))
{
case SWITCH_TO_SAME_FILE:
case SWITCH_TO_DIFFERENT_FILE:
UtDisplayOneSummary (FileId, FALSE);
Current = Current->Next;
break;
case FILE_NOT_FOUND:
default:
Current = NULL;
break;
}
}
UtDisplayErrorSummary (FileId);
}
/*******************************************************************************
*
* FUNCTION: UtCheckIntegerRange
@ -644,7 +760,7 @@ UtPadNameWithUnderscores (
UINT32 i;
for (i = 0; (i < ACPI_NAME_SIZE); i++)
for (i = 0; (i < ACPI_NAMESEG_SIZE); i++)
{
if (*NameSeg)
{
@ -715,7 +831,7 @@ UtAttachNameseg (
UtPadNameWithUnderscores (Name, PaddedNameSeg);
}
ACPI_MOVE_NAME (Op->Asl.NameSeg, PaddedNameSeg);
ACPI_COPY_NAMESEG (Op->Asl.NameSeg, PaddedNameSeg);
}

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -66,6 +66,12 @@ XfNamespaceLocateEnd (
UINT32 Level,
void *Context);
static BOOLEAN
XfValidateCrossReference (
ACPI_PARSE_OBJECT *Op,
const ACPI_OPCODE_INFO *OpInfo,
ACPI_NAMESPACE_NODE *Node);
static ACPI_PARSE_OBJECT *
XfGetParentMethod (
ACPI_PARSE_OBJECT *Op);
@ -300,6 +306,7 @@ XfGetParentMethod (
return (NULL); /* No parent method found */
}
/*******************************************************************************
*
* FUNCTION: XfNamespaceLocateBegin
@ -380,7 +387,7 @@ XfNamespaceLocateBegin (
Node->ArgCount = (UINT8)
(((UINT8) NextOp->Asl.Value.Integer) & 0x07);
/* We will track all posible ArgXs */
/* We will track all possible ArgXs */
for (i = 0; i < ACPI_METHOD_NUM_ARGS; i++)
{
@ -498,7 +505,8 @@ XfNamespaceLocateBegin (
(Op->Asl.ParseOpcode != PARSEOP_NAMESTRING) &&
(Op->Asl.ParseOpcode != PARSEOP_NAMESEG) &&
(Op->Asl.ParseOpcode != PARSEOP_METHODCALL) &&
(Op->Asl.ParseOpcode != PARSEOP_EXTERNAL))
(Op->Asl.ParseOpcode != PARSEOP_EXTERNAL) &&
(OpInfo->Type != AML_TYPE_NAMED_FIELD))
{
return_ACPI_STATUS (AE_OK);
}
@ -522,7 +530,8 @@ XfNamespaceLocateBegin (
if ((Op->Asl.ParseOpcode == PARSEOP_NAMESTRING) ||
(Op->Asl.ParseOpcode == PARSEOP_NAMESEG) ||
(Op->Asl.ParseOpcode == PARSEOP_METHODCALL) ||
(Op->Asl.ParseOpcode == PARSEOP_EXTERNAL))
(Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) ||
(OpInfo->Type == AML_TYPE_NAMED_FIELD))
{
/*
* These are name references, do not push the scope stack
@ -559,6 +568,10 @@ XfNamespaceLocateBegin (
Path = NextOp->Asl.Value.String;
}
else if (OpInfo->Type == AML_TYPE_NAMED_FIELD)
{
Path = Op->Asl.Child->Asl.Value.String;
}
else
{
Path = Op->Asl.Value.String;
@ -587,7 +600,7 @@ XfNamespaceLocateBegin (
* We didn't find the name reference by path -- we can qualify this
* a little better before we print an error message
*/
if (strlen (Path) == ACPI_NAME_SIZE)
if (strlen (Path) == ACPI_NAMESEG_SIZE)
{
/* A simple, one-segment ACPI name */
@ -649,7 +662,7 @@ XfNamespaceLocateBegin (
* doesn't exist or just can't be reached. However, we
* can differentiate between a NameSeg vs. NamePath.
*/
if (strlen (Op->Asl.ExternalName) == ACPI_NAME_SIZE)
if (strlen (Op->Asl.ExternalName) == ACPI_NAMESEG_SIZE)
{
AslError (ASL_ERROR, ASL_MSG_NOT_FOUND, Op,
Op->Asl.ExternalName);
@ -668,6 +681,15 @@ XfNamespaceLocateBegin (
return_ACPI_STATUS (Status);
}
/* Check for an attempt to access an object in another method */
if (!XfValidateCrossReference (Op, OpInfo, Node))
{
AslError (ASL_ERROR, ASL_MSG_TEMPORARY_OBJECT, Op,
Op->Asl.ExternalName);
return_ACPI_STATUS (Status);
}
/* Object was found above, check for an illegal forward reference */
if (Op->Asl.CompileFlags & OP_NOT_FOUND_DURING_LOAD)
@ -1055,6 +1077,24 @@ XfNamespaceLocateBegin (
}
}
/*
* 5) Check for external resolution
* By this point, everything should be loaded in the namespace. If a
* namespace lookup results in a namespace node that is an external, it
* means that this named object was not defined in the input ASL. This
* causes issues because there are plenty of incidents where developers
* use the external keyword to suppress compiler errors about undefined
* objects. Note: this only applies when compiling multiple definition
* blocks.
*/
if (AslGbl_ParseTreeRoot->Asl.Child && AslGbl_ParseTreeRoot->Asl.Child->Asl.Next &&
(Op->Asl.ParseOpcode != PARSEOP_EXTERNAL &&
Op->Asl.Parent->Asl.ParseOpcode != PARSEOP_EXTERNAL) &&
(Node->Flags & ANOBJ_IS_EXTERNAL))
{
AslError (ASL_ERROR, ASL_MSG_UNDEFINED_EXTERNAL, Op, NULL);
}
/* 5) Check for a connection object */
#if 0
else if (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_CONNECTION)
@ -1126,3 +1166,103 @@ XfNamespaceLocateEnd (
return_ACPI_STATUS (AE_OK);
}
/*******************************************************************************
*
* FUNCTION: XfValidateCrossReference
*
* PARAMETERS: Op - Parse Op that references the object
* OpInfo - Parse Op info struct
* Node - Node for the referenced object
*
* RETURN: TRUE if the reference is legal, FALSE otherwise
*
* DESCRIPTION: Determine if a reference to another object is allowed.
*
* EXAMPLE:
* Method (A) {Name (INT1, 1)} Declaration of object INT1
* Method (B) (Store (2, \A.INT1)} Illegal reference to object INT1
* (INT1 is temporary, valid only during
* execution of A)
*
* NOTES:
* A null pointer returned by either XfGetParentMethod or
* UtGetParentMethod indicates that the parameter object is not
* within a control method.
*
* Five cases are handled: Case(Op, Node)
* 1) Case(0,0): Op is not within a method, Node is not --> OK
* 2) Case(0,1): Op is not within a method, but Node is --> Illegal
* 3) Case(1,0): Op is within a method, Node is not --> OK
* 4) Case(1,1): Both are within the same method --> OK
* 5) Case(1,1): Both are in methods, but not same method --> Illegal
*
******************************************************************************/
static BOOLEAN
XfValidateCrossReference (
ACPI_PARSE_OBJECT *Op,
const ACPI_OPCODE_INFO *OpInfo,
ACPI_NAMESPACE_NODE *Node)
{
ACPI_PARSE_OBJECT *ReferencingMethodOp;
ACPI_NAMESPACE_NODE *ReferencedMethodNode;
/* Ignore actual named (and related) object declarations */
if (OpInfo->Flags & (AML_NAMED | AML_CREATE | AML_DEFER | AML_HAS_ARGS))
{
return (TRUE);
}
/*
* 1) Search upwards in parse tree for owner of the referencing object
* 2) Search upwards in namespace to find the owner of the referenced object
*/
ReferencingMethodOp = XfGetParentMethod (Op);
ReferencedMethodNode = UtGetParentMethod (Node);
if (!ReferencingMethodOp && !ReferencedMethodNode)
{
/*
* 1) Case (0,0): Both Op and Node are not within methods
* --> OK
*/
return (TRUE);
}
if (!ReferencingMethodOp && ReferencedMethodNode)
{
/*
* 2) Case (0,1): Op is not in a method, but Node is within a
* method --> illegal
*/
return (FALSE);
}
else if (ReferencingMethodOp && !ReferencedMethodNode)
{
/*
* 3) Case (1,0): Op is within a method, but Node is not
* --> OK
*/
return (TRUE);
}
else if (ReferencingMethodOp->Asl.Node == ReferencedMethodNode)
{
/*
* 4) Case (1,1): Both Op and Node are within the same method
* --> OK
*/
return (TRUE);
}
else
{
/*
* 5) Case (1,1), Op and Node are in different methods
* --> Illegal
*/
return (FALSE);
}
}

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -132,8 +132,7 @@ DtDoCompile (
DtError (ASL_ERROR, ASL_MSG_SYNTAX, NULL,
"Input file does not appear to be an ASL or data table source file");
Status = AE_ERROR;
goto CleanupAndExit;
return (AE_ERROR);
}
Event = UtBeginEvent ("Compile parse tree");
@ -151,7 +150,7 @@ DtDoCompile (
DtError (ASL_ERROR, ASL_MSG_SYNTAX, NULL,
"Could not compile input file");
goto CleanupAndExit;
return (Status);
}
/* Create/open the binary output file */
@ -160,7 +159,7 @@ DtDoCompile (
Status = FlOpenAmlOutputFile (AslGbl_OutputFilenamePrefix);
if (ACPI_FAILURE (Status))
{
goto CleanupAndExit;
return (Status);
}
/* Write the binary, then the optional hex file */
@ -169,10 +168,6 @@ DtDoCompile (
HxDoHexOutput ();
DtWriteTableToListing ();
CleanupAndExit:
AcpiUtDeleteCaches ();
CmCleanupAndExit ();
return (Status);
}
@ -311,7 +306,7 @@ DtCompileDataTable (
* Currently, these are the FACS and RSDP. Also check for an OEMx table,
* these tables have user-defined contents.
*/
if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_FACS))
if (ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_FACS))
{
Status = DtCompileFacs (FieldList);
if (ACPI_FAILURE (Status))
@ -327,7 +322,7 @@ DtCompileDataTable (
Status = DtCompileRsdp (FieldList);
return (Status);
}
else if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_S3PT))
else if (ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_S3PT))
{
Status = DtCompileS3pt (FieldList);
if (ACPI_FAILURE (Status))

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -6,7 +6,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -6,7 +6,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -348,7 +348,6 @@ PrOpenIncludeWithPrefix (
IncludeFile = fopen (Pathname, OpenMode);
if (!IncludeFile)
{
fprintf (stderr, "Could not open include file %s\n", Pathname);
return (NULL);
}

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -302,7 +302,7 @@ AcpiDbDecodeAndDisplayObject (
default:
/* Is not a recognizeable object */
/* Is not a recognizable object */
AcpiOsPrintf (
"Not a known ACPI internal object, descriptor type %2.2X\n",
@ -758,7 +758,7 @@ AcpiDbDisplayObjectType (
*
* DESCRIPTION: Display the result of an AML opcode
*
* Note: Curently only displays the result object if we are single stepping.
* Note: Currently only displays the result object if we are single stepping.
* However, this output may be useful in other contexts and could be enabled
* to do so if needed.
*

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -223,12 +223,12 @@ AcpiDbExecuteMethod (
}
ACPI_EXCEPTION ((AE_INFO, Status,
"while executing %s from debugger", Info->Pathname));
"while executing %s from AML Debugger", Info->Pathname));
if (Status == AE_BUFFER_OVERFLOW)
{
ACPI_ERROR ((AE_INFO,
"Possible overflow of internal debugger "
"Possible buffer overflow within AML Debugger "
"buffer (size 0x%X needed 0x%X)",
ACPI_DEBUG_BUFFER_SIZE, (UINT32) ReturnObj->Length));
}
@ -552,7 +552,7 @@ AcpiDbExecute (
/* Dump a _PLD buffer if present */
if (ACPI_COMPARE_NAME ((ACPI_CAST_PTR (ACPI_NAMESPACE_NODE,
if (ACPI_COMPARE_NAMESEG ((ACPI_CAST_PTR (ACPI_NAMESPACE_NODE,
AcpiGbl_DbMethodInfo.Method)->Name.Ascii),
METHOD_NAME__PLD))
{

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -449,7 +449,7 @@ AcpiDbFindNameInNamespace (
char *AcpiNamePtr = AcpiName;
if (strlen (NameArg) > ACPI_NAME_SIZE)
if (strlen (NameArg) > ACPI_NAMESEG_SIZE)
{
AcpiOsPrintf ("Name must be no longer than 4 characters\n");
return (AE_OK);
@ -1067,7 +1067,7 @@ AcpiDbBusWalk (
*
* RETURN: None
*
* DESCRIPTION: Display info about system busses.
* DESCRIPTION: Display info about system buses.
*
******************************************************************************/

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -46,6 +46,7 @@
#include "acdebug.h"
#include "acnamesp.h"
#include "acpredef.h"
#include "acinterp.h"
#define _COMPONENT ACPI_CA_DEBUGGER
@ -84,6 +85,10 @@ static ACPI_STATUS
AcpiDbTestPackageType (
ACPI_NAMESPACE_NODE *Node);
static ACPI_STATUS
AcpiDbTestFieldUnitType (
ACPI_OPERAND_OBJECT *ObjDesc);
static ACPI_STATUS
AcpiDbReadFromObject (
ACPI_NAMESPACE_NODE *Node,
@ -133,7 +138,7 @@ static ACPI_DB_ARGUMENT_INFO AcpiDbTestTypes [] =
static ACPI_HANDLE ReadHandle = NULL;
static ACPI_HANDLE WriteHandle = NULL;
/* ASL Definitions of the debugger read/write control methods */
/* ASL Definitions of the debugger read/write control methods. AML below. */
#if 0
DefinitionBlock ("ssdt.aml", "SSDT", 2, "Intel", "DEBUG", 0x00000001)
@ -299,10 +304,8 @@ AcpiDbTestAllObjects (
* 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.
* String, Buffer, Package, BufferField, and FieldUnit.
* All other object types are simply ignored.
*
******************************************************************************/
@ -315,7 +318,6 @@ AcpiDbTestOneObject (
{
ACPI_NAMESPACE_NODE *Node;
ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_OPERAND_OBJECT *RegionObj;
ACPI_OBJECT_TYPE LocalType;
UINT32 BitLength = 0;
UINT32 ByteLength = 0;
@ -358,19 +360,22 @@ AcpiDbTestOneObject (
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_FIELD_UNIT;
break;
case ACPI_TYPE_BUFFER_FIELD:
/*
* The 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).
*/
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)
@ -380,9 +385,9 @@ AcpiDbTestOneObject (
}
break;
default:
default:
/* Ignore all other types */
/* Ignore all non-data types - Methods, Devices, Scopes, etc. */
return (AE_OK);
}
@ -394,40 +399,10 @@ AcpiDbTestOneObject (
if (!ObjDesc)
{
AcpiOsPrintf (" Ignoring, no attached object\n");
AcpiOsPrintf (" No attached sub-object, ignoring\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:
break;
default:
AcpiOsPrintf (" %s space is not supported in this command [%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)
@ -452,6 +427,11 @@ AcpiDbTestOneObject (
Status = AcpiDbTestPackageType (Node);
break;
case ACPI_TYPE_FIELD_UNIT:
Status = AcpiDbTestFieldUnitType (ObjDesc);
break;
default:
AcpiOsPrintf (" Ignoring, type not implemented (%2.2X)",
@ -464,24 +444,8 @@ AcpiDbTestOneObject (
if (ACPI_FAILURE (Status))
{
Status = AE_OK;
goto Exit;
}
switch (Node->Type)
{
case ACPI_TYPE_LOCAL_REGION_FIELD:
RegionObj = ObjDesc->Field.RegionObj;
AcpiOsPrintf (" (%s)",
AcpiUtGetRegionName (RegionObj->Region.SpaceId));
break;
default:
break;
}
Exit:
AcpiOsPrintf ("\n");
return (Status);
}
@ -531,7 +495,7 @@ AcpiDbTestIntegerType (
return (Status);
}
AcpiOsPrintf (" (%4.4X/%3.3X) %8.8X%8.8X",
AcpiOsPrintf (ACPI_DEBUG_LENGTH_FORMAT " %8.8X%8.8X",
BitLength, ACPI_ROUND_BITS_UP_TO_BYTES (BitLength),
ACPI_FORMAT_UINT64 (Temp1->Integer.Value));
@ -653,8 +617,8 @@ AcpiDbTestBufferType (
/* 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 (ACPI_DEBUG_LENGTH_FORMAT, BitLength, Temp1->Buffer.Length);
for (i = 0; ((i < 8) && (i < ByteLength)); i++)
{
AcpiOsPrintf (" %2.2X", Temp1->Buffer.Pointer[i]);
}
@ -768,7 +732,7 @@ AcpiDbTestStringType (
return (Status);
}
AcpiOsPrintf (" (%4.4X/%3.3X) \"%s\"", (Temp1->String.Length * 8),
AcpiOsPrintf (ACPI_DEBUG_LENGTH_FORMAT " \"%s\"", (Temp1->String.Length * 8),
Temp1->String.Length, Temp1->String.Pointer);
/* Write a new value */
@ -858,12 +822,79 @@ AcpiDbTestPackageType (
return (Status);
}
AcpiOsPrintf (" %8.8X Elements", Temp1->Package.Count);
AcpiOsPrintf (" %.2X Elements", Temp1->Package.Count);
AcpiOsFree (Temp1);
return (Status);
}
/*******************************************************************************
*
* FUNCTION: AcpiDbTestFieldUnitType
*
* PARAMETERS: ObjDesc - A field unit object
*
* RETURN: Status
*
* DESCRIPTION: Test read/write on a named field unit.
*
******************************************************************************/
static ACPI_STATUS
AcpiDbTestFieldUnitType (
ACPI_OPERAND_OBJECT *ObjDesc)
{
ACPI_OPERAND_OBJECT *RegionObj;
UINT32 BitLength = 0;
UINT32 ByteLength = 0;
ACPI_STATUS Status = AE_OK;
ACPI_OPERAND_OBJECT *RetBufferDesc;
/* Supported spaces are memory/io/pci_config */
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:
/* Need the interpreter to execute */
AcpiUtAcquireMutex (ACPI_MTX_INTERPRETER);
AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
/* Exercise read-then-write */
Status = AcpiExReadDataFromField (NULL, ObjDesc, &RetBufferDesc);
if (Status == AE_OK)
{
AcpiExWriteDataToField (RetBufferDesc, ObjDesc, NULL);
AcpiUtRemoveReference (RetBufferDesc);
}
AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
AcpiUtReleaseMutex (ACPI_MTX_INTERPRETER);
BitLength = ObjDesc->CommonField.BitLength;
ByteLength = ACPI_ROUND_BITS_UP_TO_BYTES (BitLength);
AcpiOsPrintf (ACPI_DEBUG_LENGTH_FORMAT " [%s]", BitLength,
ByteLength, AcpiUtGetRegionName (RegionObj->Region.SpaceId));
return (Status);
default:
AcpiOsPrintf (
" %s address space is not supported in this command [%4.4s]",
AcpiUtGetRegionName (RegionObj->Region.SpaceId),
RegionObj->Region.Node->Name.Ascii);
return (AE_OK);
}
}
/*******************************************************************************
*
* FUNCTION: AcpiDbReadFromObject

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -628,7 +628,7 @@ AcpiDmIsPldBuffer (
{
Node = ParentOp->Common.Node;
if (ACPI_COMPARE_NAME (Node->Name.Ascii, METHOD_NAME__PLD))
if (ACPI_COMPARE_NAMESEG (Node->Name.Ascii, METHOD_NAME__PLD))
{
/* Ignore the Size argument in the disassembly of this buffer op */
@ -662,7 +662,7 @@ AcpiDmIsPldBuffer (
{
Node = ParentOp->Common.Node;
if (ACPI_COMPARE_NAME (Node->Name.Ascii, METHOD_NAME__PLD))
if (ACPI_COMPARE_NAMESEG (Node->Name.Ascii, METHOD_NAME__PLD))
{
/* Ignore the Size argument in the disassembly of this buffer op */
@ -945,7 +945,7 @@ AcpiDmGetHardwareIdType (
}
}
/* Mark this node as convertable to an EISA ID string */
/* Mark this node as convertible to an EISA ID string */
Op->Common.DisasmOpcode = ACPI_DASM_EISAID;
break;
@ -992,7 +992,7 @@ AcpiDmCheckForHardwareId (
/* Check for _HID - has one argument */
if (ACPI_COMPARE_NAME (&Name, METHOD_NAME__HID))
if (ACPI_COMPARE_NAMESEG (&Name, METHOD_NAME__HID))
{
AcpiDmGetHardwareIdType (NextOp);
return;
@ -1000,7 +1000,7 @@ AcpiDmCheckForHardwareId (
/* Exit if not _CID */
if (!ACPI_COMPARE_NAME (&Name, METHOD_NAME__CID))
if (!ACPI_COMPARE_NAMESEG (&Name, METHOD_NAME__CID))
{
return;
}

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -967,7 +967,7 @@ AcpiDmIsValidTarget (
*
* DESCRIPTION: Determine if the Target duplicates the operand, in order to
* detect if the expression can be converted to a compound
* assigment. (+=, *=, etc.)
* assignment. (+=, *=, etc.)
*
******************************************************************************/
@ -1023,7 +1023,7 @@ AcpiDmIsTargetAnOperand (
}
}
/* Supress the duplicate operand at the top-level */
/* Suppress the duplicate operand at the top-level */
if (TopLevel)
{

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -234,7 +234,7 @@ AcpiDmBitList (
*
* FUNCTION: AcpiDmResourceTemplate
*
* PARAMETERS: Info - Curent parse tree walk info
* PARAMETERS: Info - Current parse tree walk info
* ByteData - Pointer to the byte list data
* ByteCount - Length of the byte list
*
@ -447,7 +447,7 @@ AcpiDmIsResourceTemplate (
/*
* Not a template if declared buffer length != actual length of the
* intialization byte list. Because the resource macros will create
* initialization byte list. Because the resource macros will create
* a buffer of the exact required length (buffer length will be equal
* to the actual length).
*

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -6,7 +6,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -178,7 +178,7 @@ AcpiDsInitBufferField (
if (BitCount == 0)
{
ACPI_ERROR ((AE_INFO,
ACPI_BIOS_ERROR ((AE_INFO,
"Attempt to CreateField of length zero"));
Status = AE_AML_OPERAND_VALUE;
goto Cleanup;
@ -244,12 +244,12 @@ AcpiDsInitBufferField (
if ((BitOffset + BitCount) >
(8 * (UINT32) BufferDesc->Buffer.Length))
{
ACPI_ERROR ((AE_INFO,
Status = AE_AML_BUFFER_LIMIT;
ACPI_BIOS_EXCEPTION ((AE_INFO, Status,
"Field [%4.4s] at bit offset/length %u/%u "
"exceeds size of target Buffer (%u bits)",
AcpiUtGetNodeName (ResultDesc), BitOffset, BitCount,
8 * (UINT32) BufferDesc->Buffer.Length));
Status = AE_AML_BUFFER_LIMIT;
goto Cleanup;
}
@ -413,6 +413,7 @@ AcpiDsEvalRegionOperands (
ACPI_OPERAND_OBJECT *OperandDesc;
ACPI_NAMESPACE_NODE *Node;
ACPI_PARSE_OBJECT *NextOp;
ACPI_ADR_SPACE_TYPE SpaceId;
ACPI_FUNCTION_TRACE_PTR (DsEvalRegionOperands, Op);
@ -422,11 +423,12 @@ AcpiDsEvalRegionOperands (
* This is where we evaluate the address and length fields of the
* OpRegion declaration
*/
Node = Op->Common.Node;
Node = Op->Common.Node;
/* NextOp points to the op that holds the SpaceID */
NextOp = Op->Common.Value.Arg;
SpaceId = (ACPI_ADR_SPACE_TYPE) NextOp->Common.Value.Integer;
/* NextOp points to address op */
@ -464,6 +466,15 @@ AcpiDsEvalRegionOperands (
ObjDesc->Region.Length = (UINT32) OperandDesc->Integer.Value;
AcpiUtRemoveReference (OperandDesc);
/* A zero-length operation region is unusable. Just warn */
if (!ObjDesc->Region.Length && (SpaceId < ACPI_NUM_PREDEFINED_REGIONS))
{
ACPI_WARNING ((AE_INFO,
"Operation Region [%4.4s] has zero length (SpaceId %X)",
Node->Name.Ascii, SpaceId));
}
/*
* Get the address and save it
* (at top of stack - 1)

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -301,7 +301,7 @@ AcpiEvAddressSpaceDispatch (
/*
* For handlers other than the default (supplied) handlers, we must
* exit the interpreter because the handler *might* block -- we don't
* know what it will do, so we can't hold the lock on the intepreter.
* know what it will do, so we can't hold the lock on the interpreter.
*/
AcpiExExitInterpreter();
}

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -616,24 +616,6 @@ AcpiEvInitializeRegion (
HandlerObj = ObjDesc->CommonNotify.Handler;
break;
case ACPI_TYPE_METHOD:
/*
* If we are executing module level code, the original
* Node's object was replaced by this Method object and we
* saved the handler in the method object.
*
* Note: Only used for the legacy MLC support. Will
* be removed in the future.
*
* See AcpiNsExecModuleCode
*/
if (!AcpiGbl_ExecuteTablesAsMethods &&
ObjDesc->Method.InfoFlags & ACPI_METHOD_MODULE_LEVEL)
{
HandlerObj = ObjDesc->Method.Dispatch.Handler;
}
break;
default:
/* Ignore other objects */

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -6,7 +6,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -6,7 +6,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -6,7 +6,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -51,7 +51,7 @@
/* Common info for tool signons */
#define ACPICA_NAME "Intel ACPI Component Architecture"
#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2018 Intel Corporation"
#define ACPICA_COPYRIGHT "Copyright (c) 2000 - 2019 Intel Corporation"
#if ACPI_MACHINE_WIDTH == 64
#define ACPI_WIDTH " (64-bit version)"

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -51,7 +51,8 @@
#endif
#define ACPI_DEBUG_BUFFER_SIZE 0x4000 /* 16K buffer for return objects */
#define ACPI_DEBUG_BUFFER_SIZE 0x4000 /* 16K buffer for return objects */
#define ACPI_DEBUG_LENGTH_FORMAT " (%.4X bits, %.3X bytes)"
typedef struct acpi_db_command_info
{

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -301,6 +301,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoFpdt1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoGas[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdt[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdtHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdtEl2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdt0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdt0a[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoGtdt1[];
@ -445,6 +446,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat3[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat4[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat5[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoStao[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoStaoStr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpaHdr[];

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -326,7 +326,7 @@ static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Aml[] =
EXCEP_TXT ("AE_AML_DIVIDE_BY_ZERO", "During execution of AML Divide operator"),
EXCEP_TXT ("AE_AML_BAD_NAME", "An ACPI name contains invalid character(s)"),
EXCEP_TXT ("AE_AML_NAME_NOT_FOUND", "Could not resolve a named reference"),
EXCEP_TXT ("AE_AML_INTERNAL", "An internal error within the interprete"),
EXCEP_TXT ("AE_AML_INTERNAL", "An internal error within the interpreter"),
EXCEP_TXT ("AE_AML_INVALID_SPACE_ID", "An Operation Region SpaceID is invalid"),
EXCEP_TXT ("AE_AML_STRING_LIMIT", "String is longer than 200 characters"),
EXCEP_TXT ("AE_AML_NO_RETURN_VALUE", "A method did not return a required value"),

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -200,6 +200,7 @@ ACPI_GLOBAL (ACPI_MEMORY_LIST *, AcpiGbl_GlobalList);
ACPI_GLOBAL (ACPI_MEMORY_LIST *, AcpiGbl_NsNodeList);
ACPI_GLOBAL (BOOLEAN, AcpiGbl_DisplayFinalMemStats);
ACPI_GLOBAL (BOOLEAN, AcpiGbl_DisableMemTracking);
ACPI_GLOBAL (BOOLEAN, AcpiGbl_VerboseLeakDump);
#endif

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -371,7 +371,7 @@ ACPI_STATUS (*ACPI_INTERNAL_METHOD) (
*/
typedef struct acpi_name_info
{
char Name[ACPI_NAME_SIZE];
char Name[ACPI_NAMESEG_SIZE];
UINT16 ArgumentList;
UINT8 ExpectedBtypes;
@ -459,7 +459,7 @@ typedef ACPI_STATUS (*ACPI_OBJECT_CONVERTER) (
typedef struct acpi_simple_repair_info
{
char Name[ACPI_NAME_SIZE];
char Name[ACPI_NAMESEG_SIZE];
UINT32 UnexpectedBtypes;
UINT32 PackageIndex;
ACPI_OBJECT_CONVERTER ObjectConverter;
@ -996,7 +996,7 @@ typedef struct acpi_comment_addr_node
/*
* File node - used for "Include" operator file stack and
* depdendency tree for the -ca option
* dependency tree for the -ca option
*/
typedef struct acpi_file_node
{

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -502,7 +502,7 @@
/*
* Macors used for the ASL-/ASL+ converter utility
* Macros used for the ASL-/ASL+ converter utility
*/
#ifdef ACPI_ASL_COMPILER

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -239,6 +239,7 @@
#define ACPI_EXCEPTION(plist) AcpiException plist
#define ACPI_ERROR(plist) AcpiError plist
#define ACPI_BIOS_WARNING(plist) AcpiBiosWarning plist
#define ACPI_BIOS_EXCEPTION(plist) AcpiBiosException plist
#define ACPI_BIOS_ERROR(plist) AcpiBiosError plist
#define ACPI_DEBUG_OBJECT(obj,l,i) AcpiExDoDebugObject(obj,l,i)
@ -251,6 +252,7 @@
#define ACPI_EXCEPTION(plist)
#define ACPI_ERROR(plist)
#define ACPI_BIOS_WARNING(plist)
#define ACPI_BIOS_EXCEPTION(plist)
#define ACPI_BIOS_ERROR(plist)
#define ACPI_DEBUG_OBJECT(obj,l,i)

View File

@ -7,7 +7,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -46,7 +46,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
#define ACPI_CA_VERSION 0x20181213
#define ACPI_CA_VERSION 0x20190405
#include "acconfig.h"
#include "actypes.h"
@ -192,14 +192,6 @@ ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CopyDsdtLocally, FALSE);
*/
ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DoNotUseXsdt, FALSE);
/*
* Optionally support module level code by parsing an entire table as
* a method as it is loaded. Default is TRUE.
* NOTE, this is essentially obsolete and will be removed soon
* (01/2018).
*/
ACPI_INIT_GLOBAL (UINT8, AcpiGbl_ExecuteTablesAsMethods, TRUE);
/*
* Optionally use 32-bit FADT addresses if and when there is a conflict
* (address mismatch) between the 32-bit and 64-bit versions of the
@ -1229,6 +1221,16 @@ AcpiBiosError (
const char *Format,
...))
ACPI_MSG_DEPENDENT_RETURN_VOID (
ACPI_PRINTF_LIKE(4)
void ACPI_INTERNAL_VAR_XFACE
AcpiBiosException (
const char *ModuleName,
UINT32 LineNumber,
ACPI_STATUS Status,
const char *Format,
...))
ACPI_MSG_DEPENDENT_RETURN_VOID (
ACPI_PRINTF_LIKE(3)
void ACPI_INTERNAL_VAR_XFACE

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -689,7 +689,7 @@ typedef struct acpi_dmar_hardware_unit
#define ACPI_DMAR_INCLUDE_ALL (1)
/* 1: Reserved Memory Defininition */
/* 1: Reserved Memory Definition */
typedef struct acpi_dmar_reserved_memory
{
@ -1211,6 +1211,12 @@ typedef struct acpi_table_gtdt
#define ACPI_GTDT_INTERRUPT_POLARITY (1<<1)
#define ACPI_GTDT_ALWAYS_ON (1<<2)
typedef struct acpi_gtdt_el2
{
UINT32 VirtualEL2TimerGsiv;
UINT32 VirtualEL2TimerFlags;
} ACPI_GTDT_EL2;
/* Common GTDT subtable header */
@ -1670,7 +1676,7 @@ typedef struct acpi_table_hmat
enum AcpiHmatType
{
ACPI_HMAT_TYPE_ADDRESS_RANGE = 0, /* Memory subystem address range */
ACPI_HMAT_TYPE_ADDRESS_RANGE = 0, /* Memory subsystem address range */
ACPI_HMAT_TYPE_LOCALITY = 1, /* System locality latency and bandwidth information */
ACPI_HMAT_TYPE_CACHE = 2, /* Memory side cache information */
ACPI_HMAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */
@ -1689,9 +1695,9 @@ typedef struct acpi_hmat_structure
* HMAT Structures, correspond to Type in ACPI_HMAT_STRUCTURE
*/
/* 0: Memory subystem address range */
/* 0: Memory proximity domain attributes */
typedef struct acpi_hmat_address_range
typedef struct acpi_hmat_proximity_domain
{
ACPI_HMAT_STRUCTURE Header;
UINT16 Flags;
@ -1699,10 +1705,10 @@ typedef struct acpi_hmat_address_range
UINT32 ProcessorPD; /* Processor proximity domain */
UINT32 MemoryPD; /* Memory proximity domain */
UINT32 Reserved2;
UINT64 PhysicalAddressBase; /* Physical address range base */
UINT64 PhysicalAddressLength; /* Physical address range length */
UINT64 Reserved3;
UINT64 Reserved4;
} ACPI_HMAT_ADDRESS_RANGE;
} ACPI_HMAT_PROXIMITY_DOMAIN;
/* Masks for Flags field above */

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -412,7 +412,7 @@ typedef UINT64 ACPI_PHYSICAL_ADDRESS;
/* Names within the namespace are 4 bytes long */
#define ACPI_NAME_SIZE 4
#define ACPI_NAMESEG_SIZE 4 /* Fixed by ACPI spec */
#define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */
#define ACPI_PATH_SEPARATOR '.'
@ -559,11 +559,11 @@ typedef UINT64 ACPI_INTEGER;
/* Optimizations for 4-character (32-bit) ACPI_NAME manipulation */
#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (UINT32, (a)) == *ACPI_CAST_PTR (UINT32, (b)))
#define ACPI_MOVE_NAME(dest,src) (*ACPI_CAST_PTR (UINT32, (dest)) = *ACPI_CAST_PTR (UINT32, (src)))
#define ACPI_COMPARE_NAMESEG(a,b) (*ACPI_CAST_PTR (UINT32, (a)) == *ACPI_CAST_PTR (UINT32, (b)))
#define ACPI_COPY_NAMESEG(dest,src) (*ACPI_CAST_PTR (UINT32, (dest)) = *ACPI_CAST_PTR (UINT32, (src)))
#else
#define ACPI_COMPARE_NAME(a,b) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAME_SIZE))
#define ACPI_MOVE_NAME(dest,src) (strncpy (ACPI_CAST_PTR (char, (dest)), ACPI_CAST_PTR (char, (src)), ACPI_NAME_SIZE))
#define ACPI_COMPARE_NAMESEG(a,b) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAMESEG_SIZE))
#define ACPI_COPY_NAMESEG(dest,src) (strncpy (ACPI_CAST_PTR (char, (dest)), ACPI_CAST_PTR (char, (src)), ACPI_NAMESEG_SIZE))
#endif
/* Support for the special RSDP signature (8 characters) */
@ -573,7 +573,7 @@ typedef UINT64 ACPI_INTEGER;
/* Support for OEMx signature (x can be any character) */
#define ACPI_IS_OEM_SIG(a) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_OEM_NAME, 3) &&\
strnlen (a, ACPI_NAME_SIZE) == ACPI_NAME_SIZE)
strnlen (a, ACPI_NAMESEG_SIZE) == ACPI_NAMESEG_SIZE)
/*
* Algorithm to obtain access bit width.
@ -660,8 +660,9 @@ typedef UINT64 ACPI_INTEGER;
#define ACPI_NOTIFY_SHUTDOWN_REQUEST (UINT8) 0x0C
#define ACPI_NOTIFY_AFFINITY_UPDATE (UINT8) 0x0D
#define ACPI_NOTIFY_MEMORY_UPDATE (UINT8) 0x0E
#define ACPI_NOTIFY_DISCONNECT_RECOVER (UINT8) 0x0F
#define ACPI_GENERIC_NOTIFY_MAX 0x0E
#define ACPI_GENERIC_NOTIFY_MAX 0x0F
#define ACPI_SPECIFIC_NOTIFY_MAX 0x84
/*

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -1,12 +1,12 @@
/******************************************************************************
*
* Name: acnetbsd.h - OS specific defines, etc.
* $Revision: 1.18 $
* $Revision: 1.19 $
*
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -743,7 +743,7 @@ AcpiNsLookup (
/* Point to next name segment and make this node current */
Path += ACPI_NAME_SIZE;
Path += ACPI_NAMESEG_SIZE;
CurrentNode = ThisNode;
}

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -127,7 +127,7 @@ AcpiNsPrintPathname (
AcpiOsPrintf ("?");
}
Pathname += ACPI_NAME_SIZE;
Pathname += ACPI_NAMESEG_SIZE;
NumSegments--;
if (NumSegments)
{

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -554,7 +554,7 @@ AcpiNsFindIniMethods (
/* We are only looking for methods named _INI */
if (!ACPI_COMPARE_NAME (Node->Name.Ascii, METHOD_NAME__INI))
if (!ACPI_COMPARE_NAMESEG (Node->Name.Ascii, METHOD_NAME__INI))
{
return (AE_OK);
}
@ -731,7 +731,7 @@ AcpiNsInitOneDevice (
* Note: We know there is an _INI within this subtree, but it may not be
* under this particular device, it may be lower in the branch.
*/
if (!ACPI_COMPARE_NAME (DeviceNode->Name.Ascii, "_SB_") ||
if (!ACPI_COMPARE_NAMESEG (DeviceNode->Name.Ascii, "_SB_") ||
DeviceNode->Parent != AcpiGbl_RootNode)
{
ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (

View File

@ -6,7 +6,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -61,7 +61,7 @@ ACPI_STATUS (*ACPI_REPAIR_FUNCTION) (
typedef struct acpi_repair_info
{
char Name[ACPI_NAME_SIZE];
char Name[ACPI_NAMESEG_SIZE];
ACPI_REPAIR_FUNCTION RepairFunction;
} ACPI_REPAIR_INFO;
@ -250,7 +250,7 @@ AcpiNsMatchComplexRepair (
ThisName = AcpiNsRepairableNames;
while (ThisName->RepairFunction)
{
if (ACPI_COMPARE_NAME (Node->Name.Ascii, ThisName->Name))
if (ACPI_COMPARE_NAMESEG (Node->Name.Ascii, ThisName->Name))
{
return (ThisName);
}

View File

@ -6,7 +6,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -6,7 +6,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -584,8 +584,8 @@ AcpiInstallMethod (
/* Table must be a DSDT or SSDT */
if (!ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT) &&
!ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_SSDT))
if (!ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_DSDT) &&
!ACPI_COMPARE_NAMESEG (Table->Signature, ACPI_SIG_SSDT))
{
return (AE_BAD_HEADER);
}

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -59,7 +59,7 @@ typedef struct osl_table_info
{
struct osl_table_info *Next;
UINT32 Instance;
char Signature[ACPI_NAME_SIZE];
char Signature[ACPI_NAMESEG_SIZE];
} OSL_TABLE_INFO;
@ -376,7 +376,7 @@ OslAddTableToList (
return (AE_NO_MEMORY);
}
ACPI_MOVE_NAME (NewInfo->Signature, Signature);
ACPI_COPY_NAMESEG (NewInfo->Signature, Signature);
if (!Gbl_TableListHead)
{
@ -387,7 +387,7 @@ OslAddTableToList (
Next = Gbl_TableListHead;
while (1)
{
if (ACPI_COMPARE_NAME (Next->Signature, Signature))
if (ACPI_COMPARE_NAMESEG (Next->Signature, Signature))
{
if (Next->Instance == Instance)
{
@ -942,11 +942,11 @@ OslGetBiosTable (
/* Handle special tables whose addresses are not in RSDT/XSDT */
if (ACPI_COMPARE_NAME (Signature, ACPI_RSDP_NAME) ||
ACPI_COMPARE_NAME (Signature, ACPI_SIG_RSDT) ||
ACPI_COMPARE_NAME (Signature, ACPI_SIG_XSDT) ||
ACPI_COMPARE_NAME (Signature, ACPI_SIG_DSDT) ||
ACPI_COMPARE_NAME (Signature, ACPI_SIG_FACS))
if (ACPI_COMPARE_NAMESEG (Signature, ACPI_RSDP_NAME) ||
ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_RSDT) ||
ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_XSDT) ||
ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_DSDT) ||
ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_FACS))
{
FindNextInstance:
@ -958,7 +958,7 @@ FindNextInstance:
* careful about the FADT length and validate table addresses.
* Note: The 64-bit addresses have priority.
*/
if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_DSDT))
if (ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_DSDT))
{
if (CurrentInstance < 2)
{
@ -974,7 +974,7 @@ FindNextInstance:
}
}
}
else if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_FACS))
else if (ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_FACS))
{
if (CurrentInstance < 2)
{
@ -990,7 +990,7 @@ FindNextInstance:
}
}
}
else if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_XSDT))
else if (ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_XSDT))
{
if (!Gbl_Revision)
{
@ -1002,7 +1002,7 @@ FindNextInstance:
(ACPI_PHYSICAL_ADDRESS) Gbl_Rsdp.XsdtPhysicalAddress;
}
}
else if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_RSDT))
else if (ACPI_COMPARE_NAMESEG (Signature, ACPI_SIG_RSDT))
{
if (CurrentInstance == 0)
{
@ -1098,7 +1098,7 @@ FindNextInstance:
/* Does this table match the requested signature? */
if (!ACPI_COMPARE_NAME (MappedTable->Signature, Signature))
if (!ACPI_COMPARE_NAMESEG (MappedTable->Signature, Signature))
{
OslUnmapTable (MappedTable);
MappedTable = NULL;
@ -1169,7 +1169,7 @@ OslListCustomizedTables (
{
void *TableDir;
UINT32 Instance;
char TempName[ACPI_NAME_SIZE];
char TempName[ACPI_NAMESEG_SIZE];
char *Filename;
ACPI_STATUS Status = AE_OK;
@ -1269,7 +1269,7 @@ OslMapTable (
return (AE_BAD_SIGNATURE);
}
}
else if (!ACPI_COMPARE_NAME (Signature, MappedTable->Signature))
else if (!ACPI_COMPARE_NAMESEG (Signature, MappedTable->Signature))
{
AcpiOsUnmapMemory (MappedTable, sizeof (ACPI_TABLE_HEADER));
return (AE_BAD_SIGNATURE);
@ -1349,18 +1349,18 @@ OslTableNameFromFile (
/* Ignore meaningless files */
if (strlen (Filename) < ACPI_NAME_SIZE)
if (strlen (Filename) < ACPI_NAMESEG_SIZE)
{
return (AE_BAD_SIGNATURE);
}
/* Extract instance number */
if (isdigit ((int) Filename[ACPI_NAME_SIZE]))
if (isdigit ((int) Filename[ACPI_NAMESEG_SIZE]))
{
sscanf (&Filename[ACPI_NAME_SIZE], "%u", Instance);
sscanf (&Filename[ACPI_NAMESEG_SIZE], "%u", Instance);
}
else if (strlen (Filename) != ACPI_NAME_SIZE)
else if (strlen (Filename) != ACPI_NAMESEG_SIZE)
{
return (AE_BAD_SIGNATURE);
}
@ -1371,7 +1371,7 @@ OslTableNameFromFile (
/* Extract signature */
ACPI_MOVE_NAME (Signature, Filename);
ACPI_COPY_NAMESEG (Signature, Filename);
return (AE_OK);
}
@ -1441,7 +1441,7 @@ OslReadTableFromFile (
goto Exit;
}
}
else if (!ACPI_COMPARE_NAME (Signature, Header.Signature))
else if (!ACPI_COMPARE_NAMESEG (Signature, Header.Signature))
{
fprintf (stderr, "Incorrect signature: Expecting %4.4s, found %4.4s\n",
Signature, Header.Signature);
@ -1521,7 +1521,7 @@ OslGetCustomizedTable (
{
void *TableDir;
UINT32 CurrentInstance = 0;
char TempName[ACPI_NAME_SIZE];
char TempName[ACPI_NAMESEG_SIZE];
char TableFilename[PATH_MAX];
char *Filename;
ACPI_STATUS Status;
@ -1541,7 +1541,7 @@ OslGetCustomizedTable (
{
/* Ignore meaningless files */
if (!ACPI_COMPARE_NAME (Filename, Signature))
if (!ACPI_COMPARE_NAMESEG (Filename, Signature))
{
continue;
}

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -72,7 +72,7 @@ ACPI_RSDUMP_INFO AcpiRsDumpIrq[7] =
{ACPI_RSD_UINT8 , ACPI_RSD_OFFSET (Irq.DescriptorLength), "Descriptor Length", NULL},
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (Irq.Triggering), "Triggering", AcpiGbl_HeDecode},
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (Irq.Polarity), "Polarity", AcpiGbl_LlDecode},
{ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (Irq.Sharable), "Sharing", AcpiGbl_ShrDecode},
{ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (Irq.Shareable), "Sharing", AcpiGbl_ShrDecode},
{ACPI_RSD_UINT8 , ACPI_RSD_OFFSET (Irq.InterruptCount), "Interrupt Count", NULL},
{ACPI_RSD_SHORTLIST,ACPI_RSD_OFFSET (Irq.Interrupts[0]), "Interrupt List", NULL}
};
@ -216,7 +216,7 @@ ACPI_RSDUMP_INFO AcpiRsDumpExtIrq[8] =
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (ExtendedIrq.ProducerConsumer), "Type", AcpiGbl_ConsumeDecode},
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (ExtendedIrq.Triggering), "Triggering", AcpiGbl_HeDecode},
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (ExtendedIrq.Polarity), "Polarity", AcpiGbl_LlDecode},
{ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (ExtendedIrq.Sharable), "Sharing", AcpiGbl_ShrDecode},
{ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (ExtendedIrq.Shareable), "Sharing", AcpiGbl_ShrDecode},
{ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (ExtendedIrq.ResourceSource), NULL, NULL},
{ACPI_RSD_UINT8, ACPI_RSD_OFFSET (ExtendedIrq.InterruptCount), "Interrupt Count", NULL},
{ACPI_RSD_DWORDLIST,ACPI_RSD_OFFSET (ExtendedIrq.Interrupts[0]), "Interrupt List", NULL}
@ -239,7 +239,7 @@ ACPI_RSDUMP_INFO AcpiRsDumpGpio[16] =
{ACPI_RSD_UINT8, ACPI_RSD_OFFSET (Gpio.ConnectionType), "ConnectionType", AcpiGbl_CtDecode},
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (Gpio.ProducerConsumer), "ProducerConsumer", AcpiGbl_ConsumeDecode},
{ACPI_RSD_UINT8, ACPI_RSD_OFFSET (Gpio.PinConfig), "PinConfig", AcpiGbl_PpcDecode},
{ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (Gpio.Sharable), "Sharing", AcpiGbl_ShrDecode},
{ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (Gpio.Shareable), "Sharing", AcpiGbl_ShrDecode},
{ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (Gpio.IoRestriction), "IoRestriction", AcpiGbl_IorDecode},
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (Gpio.Triggering), "Triggering", AcpiGbl_HeDecode},
{ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (Gpio.Polarity), "Polarity", AcpiGbl_LlDecode},
@ -257,7 +257,7 @@ ACPI_RSDUMP_INFO AcpiRsDumpPinFunction[10] =
{ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpPinFunction), "PinFunction", NULL},
{ACPI_RSD_UINT8, ACPI_RSD_OFFSET (PinFunction.RevisionId), "RevisionId", NULL},
{ACPI_RSD_UINT8, ACPI_RSD_OFFSET (PinFunction.PinConfig), "PinConfig", AcpiGbl_PpcDecode},
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinFunction.Sharable), "Sharing", AcpiGbl_ShrDecode},
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinFunction.Shareable), "Sharing", AcpiGbl_ShrDecode},
{ACPI_RSD_UINT16, ACPI_RSD_OFFSET (PinFunction.FunctionNumber), "FunctionNumber", NULL},
{ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (PinFunction.ResourceSource), "ResourceSource", NULL},
{ACPI_RSD_UINT16, ACPI_RSD_OFFSET (PinFunction.PinTableLength), "PinTableLength", NULL},
@ -271,7 +271,7 @@ ACPI_RSDUMP_INFO AcpiRsDumpPinConfig[11] =
{ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpPinConfig), "PinConfig", NULL},
{ACPI_RSD_UINT8, ACPI_RSD_OFFSET (PinConfig.RevisionId), "RevisionId", NULL},
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinConfig.ProducerConsumer), "ProducerConsumer", AcpiGbl_ConsumeDecode},
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinConfig.Sharable), "Sharing", AcpiGbl_ShrDecode},
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinConfig.Shareable), "Sharing", AcpiGbl_ShrDecode},
{ACPI_RSD_UINT8, ACPI_RSD_OFFSET (PinConfig.PinConfigType), "PinConfigType", NULL},
{ACPI_RSD_UINT32, ACPI_RSD_OFFSET (PinConfig.PinConfigValue), "PinConfigValue", NULL},
{ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (PinConfig.ResourceSource), "ResourceSource", NULL},
@ -298,7 +298,7 @@ ACPI_RSDUMP_INFO AcpiRsDumpPinGroupFunction[9] =
{ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpPinGroupFunction), "PinGroupFunction", NULL},
{ACPI_RSD_UINT8, ACPI_RSD_OFFSET (PinGroupFunction.RevisionId), "RevisionId", NULL},
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinGroupFunction.ProducerConsumer), "ProducerConsumer", AcpiGbl_ConsumeDecode},
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinGroupFunction.Sharable), "Sharing", AcpiGbl_ShrDecode},
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinGroupFunction.Shareable), "Sharing", AcpiGbl_ShrDecode},
{ACPI_RSD_UINT16, ACPI_RSD_OFFSET (PinGroupFunction.FunctionNumber), "FunctionNumber", NULL},
{ACPI_RSD_SOURCE_LABEL, ACPI_RSD_OFFSET (PinGroupFunction.ResourceSourceLabel), "ResourceSourceLabel", NULL},
{ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (PinGroupFunction.ResourceSource), "ResourceSource", NULL},
@ -311,7 +311,7 @@ ACPI_RSDUMP_INFO AcpiRsDumpPinGroupConfig[10] =
{ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpPinGroupConfig), "PinGroupConfig", NULL},
{ACPI_RSD_UINT8, ACPI_RSD_OFFSET (PinGroupConfig.RevisionId), "RevisionId", NULL},
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinGroupConfig.ProducerConsumer), "ProducerConsumer", AcpiGbl_ConsumeDecode},
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinGroupConfig.Sharable), "Sharing", AcpiGbl_ShrDecode},
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (PinGroupConfig.Shareable), "Sharing", AcpiGbl_ShrDecode},
{ACPI_RSD_UINT8, ACPI_RSD_OFFSET (PinGroupConfig.PinConfigType), "PinConfigType", NULL},
{ACPI_RSD_UINT32, ACPI_RSD_OFFSET (PinGroupConfig.PinConfigValue), "PinConfigValue", NULL},
{ACPI_RSD_SOURCE_LABEL, ACPI_RSD_OFFSET (PinGroupConfig.ResourceSourceLabel), "ResourceSourceLabel", NULL},

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -716,10 +716,10 @@ AcpiWalkResources (
/* Parameter validation */
if (!DeviceHandle || !UserFunction || !Name ||
(!ACPI_COMPARE_NAME (Name, METHOD_NAME__CRS) &&
!ACPI_COMPARE_NAME (Name, METHOD_NAME__PRS) &&
!ACPI_COMPARE_NAME (Name, METHOD_NAME__AEI) &&
!ACPI_COMPARE_NAME (Name, METHOD_NAME__DMA)))
(!ACPI_COMPARE_NAMESEG (Name, METHOD_NAME__CRS) &&
!ACPI_COMPARE_NAMESEG (Name, METHOD_NAME__PRS) &&
!ACPI_COMPARE_NAMESEG (Name, METHOD_NAME__AEI) &&
!ACPI_COMPARE_NAMESEG (Name, METHOD_NAME__DMA)))
{
return_ACPI_STATUS (AE_BAD_PARAMETER);
}

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -568,7 +568,7 @@ AcpiTbVerifyTempTable (
/* If a particular signature is expected (DSDT/FACS), it must match */
if (Signature &&
!ACPI_COMPARE_NAME (&TableDesc->Signature, Signature))
!ACPI_COMPARE_NAMESEG (&TableDesc->Signature, Signature))
{
ACPI_BIOS_ERROR ((AE_INFO,
"Invalid signature 0x%X for ACPI table, expected [%s]",

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -632,7 +632,7 @@ AcpiTbConvertFadt (
* 64-bit X length field.
* Note: If the legacy length field is > 0xFF bits, ignore
* this check. (GPE registers can be larger than the
* 64-bit GAS structure can accomodate, 0xFF bits).
* 64-bit GAS structure can accommodate, 0xFF bits).
*/
if ((ACPI_MUL_8 (Length) <= ACPI_UINT8_MAX) &&
(Address64->BitWidth != ACPI_MUL_8 (Length)))

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -166,7 +166,7 @@ AcpiTbInstallStandardTable (
*/
if (!Reload &&
AcpiGbl_DisableSsdtTableInstall &&
ACPI_COMPARE_NAME (&NewTableDesc.Signature, ACPI_SIG_SSDT))
ACPI_COMPARE_NAMESEG (&NewTableDesc.Signature, ACPI_SIG_SSDT))
{
ACPI_INFO ((
"Ignoring installation of %4.4s at %8.8X%8.8X",

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -395,7 +395,7 @@ AcpiTbParseRootTable (
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, FALSE, TRUE, &TableIndex);
if (ACPI_SUCCESS (Status) &&
ACPI_COMPARE_NAME (
ACPI_COMPARE_NAMESEG (
&AcpiGbl_RootTableList.Tables[TableIndex].Signature,
ACPI_SIG_FADT))
{

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -155,7 +155,7 @@ AcpiInitializeTables (
/*
* Get the root table (RSDT or XSDT) and extract all entries to the local
* Root Table Array. This array contains the information of the RSDT/XSDT
* in a common, more useable format.
* in a common, more usable format.
*/
Status = AcpiTbParseRootTable (RsdpAddress);
return_ACPI_STATUS (Status);
@ -226,7 +226,7 @@ AcpiReallocateRootTable (
{
/*
* Now it's safe to do full table validation. We can do deferred
* table initilization here once the flag is set.
* table initialization here once the flag is set.
*/
AcpiGbl_EnableTableValidation = TRUE;
for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i)
@ -289,7 +289,7 @@ AcpiGetTableHeader (
for (i = 0, j = 0; i < AcpiGbl_RootTableList.CurrentTableCount; i++)
{
if (!ACPI_COMPARE_NAME (
if (!ACPI_COMPARE_NAMESEG (
&(AcpiGbl_RootTableList.Tables[i].Signature), Signature))
{
continue;
@ -391,7 +391,7 @@ AcpiGetTable (
{
TableDesc = &AcpiGbl_RootTableList.Tables[i];
if (!ACPI_COMPARE_NAME (&TableDesc->Signature, Signature))
if (!ACPI_COMPARE_NAMESEG (&TableDesc->Signature, Signature))
{
continue;
}

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -111,25 +111,19 @@ AcpiLoadTables (
"While loading namespace from ACPI tables"));
}
if (AcpiGbl_ExecuteTablesAsMethods)
/*
* Initialize the objects in the namespace that remain uninitialized.
* This runs the executable AML that may be part of the declaration of
* these name objects:
* OperationRegions, BufferFields, Buffers, and Packages.
*
*/
Status = AcpiNsInitializeObjects ();
if (ACPI_SUCCESS (Status))
{
/*
* If the module-level code support is enabled, initialize the objects
* in the namespace that remain uninitialized. This runs the executable
* AML that may be part of the declaration of these name objects:
* OperationRegions, BufferFields, Buffers, and Packages.
*
* Note: The module-level code is optional at this time, but will
* become the default in the future.
*/
Status = AcpiNsInitializeObjects ();
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
AcpiGbl_NamespaceInitialized = TRUE;
}
AcpiGbl_NamespaceInitialized = TRUE;
return_ACPI_STATUS (Status);
}
@ -184,7 +178,7 @@ AcpiTbLoadNamespace (
Table = &AcpiGbl_RootTableList.Tables[AcpiGbl_DsdtIndex];
if (!AcpiGbl_RootTableList.CurrentTableCount ||
!ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_DSDT) ||
!ACPI_COMPARE_NAMESEG (Table->Signature.Ascii, ACPI_SIG_DSDT) ||
ACPI_FAILURE (AcpiTbValidateTable (Table)))
{
Status = AE_NO_ACPI_TABLES;
@ -243,9 +237,9 @@ AcpiTbLoadNamespace (
Table = &AcpiGbl_RootTableList.Tables[i];
if (!Table->Address ||
(!ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_SSDT) &&
!ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_PSDT) &&
!ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_OSDT)) ||
(!ACPI_COMPARE_NAMESEG (Table->Signature.Ascii, ACPI_SIG_SSDT) &&
!ACPI_COMPARE_NAMESEG (Table->Signature.Ascii, ACPI_SIG_PSDT) &&
!ACPI_COMPARE_NAMESEG (Table->Signature.Ascii, ACPI_SIG_OSDT)) ||
ACPI_FAILURE (AcpiTbValidateTable (Table)))
{
continue;
@ -465,7 +459,7 @@ AcpiUnloadParentTable (
* only these types can contain AML and thus are the only types
* that can create namespace objects.
*/
if (ACPI_COMPARE_NAME (
if (ACPI_COMPARE_NAMESEG (
AcpiGbl_RootTableList.Tables[i].Signature.Ascii,
ACPI_SIG_DSDT))
{

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -149,7 +149,7 @@ ApWriteToBinaryFile (
ACPI_TABLE_HEADER *Table,
UINT32 Instance)
{
char Filename[ACPI_NAME_SIZE + 16];
char Filename[ACPI_NAMESEG_SIZE + 16];
char InstanceStr [16];
ACPI_FILE File;
ACPI_SIZE Actual;
@ -164,18 +164,18 @@ ApWriteToBinaryFile (
if (ACPI_VALIDATE_RSDP_SIG (Table->Signature))
{
ACPI_MOVE_NAME (Filename, ACPI_RSDP_NAME);
ACPI_COPY_NAMESEG (Filename, ACPI_RSDP_NAME);
}
else
{
ACPI_MOVE_NAME (Filename, Table->Signature);
ACPI_COPY_NAMESEG (Filename, Table->Signature);
}
Filename[0] = (char) tolower ((int) Filename[0]);
Filename[1] = (char) tolower ((int) Filename[1]);
Filename[2] = (char) tolower ((int) Filename[2]);
Filename[3] = (char) tolower ((int) Filename[3]);
Filename[ACPI_NAME_SIZE] = 0;
Filename[ACPI_NAMESEG_SIZE] = 0;
/* Handle multiple SSDTs - create different filenames for each */

View File

@ -6,7 +6,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -96,7 +96,7 @@ AxExtractTables (
if (Signature)
{
strncpy (UpperSignature, Signature, ACPI_NAME_SIZE);
strncpy (UpperSignature, Signature, ACPI_NAMESEG_SIZE);
AcpiUtStrupr (UpperSignature);
/* Are there enough instances of the table to continue? */
@ -154,12 +154,12 @@ AxExtractTables (
continue;
}
ACPI_MOVE_NAME (ThisSignature, Gbl_LineBuffer);
ACPI_COPY_NAMESEG (ThisSignature, Gbl_LineBuffer);
if (Signature)
{
/* Ignore signatures that don't match */
if (!ACPI_COMPARE_NAME (ThisSignature, UpperSignature))
if (!ACPI_COMPARE_NAMESEG (ThisSignature, UpperSignature))
{
continue;
}
@ -358,12 +358,12 @@ AxExtractToMultiAmlFile (
continue;
}
ACPI_MOVE_NAME (ThisSignature, Gbl_LineBuffer);
ACPI_COPY_NAMESEG (ThisSignature, Gbl_LineBuffer);
/* Only want DSDT and SSDTs */
if (!ACPI_COMPARE_NAME (ThisSignature, ACPI_SIG_DSDT) &&
!ACPI_COMPARE_NAME (ThisSignature, ACPI_SIG_SSDT))
if (!ACPI_COMPARE_NAMESEG (ThisSignature, ACPI_SIG_DSDT) &&
!ACPI_COMPARE_NAMESEG (ThisSignature, ACPI_SIG_SSDT))
{
continue;
}

View File

@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2018, Intel Corp.
* Copyright (C) 2000 - 2019, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without

Some files were not shown because too many files have changed in this diff Show More