1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00

Update ACPICA to 20181003.

Approved by:	re (gjb)
This commit is contained in:
Jung-uk Kim 2018-10-09 18:40:36 +00:00
commit 6f1f1a6395
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=339262
93 changed files with 2294 additions and 1784 deletions

View File

@ -439,6 +439,7 @@ contrib/dev/acpica/components/executer/exregion.c optional acpi
contrib/dev/acpica/components/executer/exresnte.c optional acpi
contrib/dev/acpica/components/executer/exresolv.c optional acpi
contrib/dev/acpica/components/executer/exresop.c optional acpi
contrib/dev/acpica/components/executer/exserial.c optional acpi
contrib/dev/acpica/components/executer/exstore.c optional acpi
contrib/dev/acpica/components/executer/exstoren.c optional acpi
contrib/dev/acpica/components/executer/exstorob.c optional acpi

View File

@ -1,3 +1,110 @@
----------------------------------------
03 October 2018. Summary of changes for version 20181003:
2) iASL Compiler/Disassembler and Tools:
Fixed a regression introduced in version 20180927 that could cause the
compiler to fault, especially with NamePaths containing one or more
carats (^). Such as: ^^_SB_PCI0
Added a new remark for the Sleep() operator when the sleep time operand
is larger than one second. This is a very long time for the ASL/BIOS code
and may not be what was intended by the ASL writer.
----------------------------------------
27 September 2018. Summary of changes for version 20180927:
1) ACPICA kernel-resident subsystem:
Updated the GPE support to clear the status of all ACPI events when
entering any/all sleep states in order to avoid premature wakeups. In
theory, this may cause some wakeup events to be missed, but the
likelihood of this is small. This change restores the original behavior
of the ACPICA code in order to fix a regression seen from the previous
"Stop unconditionally clearing ACPI IRQs during suspend/resume" change.
This regression could cause some systems to incorrectly wake immediately.
Updated the execution of the _REG methods during initialization and
namespace loading to bring the behavior into closer conformance to the
ACPI specification and other ACPI implementations:
From the ACPI specification 6.2A, section 6.5.4 "_REG (Region):
"Control methods must assume all operation regions are inaccessible
until the _REG(RegionSpace, 1) method is executed"
"The exceptions to this rule are:
1. OSPM must guarantee that the following operation regions are always
accessible:
SystemIO operation regions.
SystemMemory operation regions when accessing memory returned by the
System Address Map reporting interfaces."
Since the state of both the SystemIO and SystemMemory address spaces are
defined by the specification to never change, this ACPICA change ensures
that now _REG is never called on them. This solves some problems seen in
the field and provides compatibility with other ACPI implementations. An
update to the upcoming new version of the ACPI specification will help
clarify this behavior.
Updated the implementation of support for the Generic Serial Bus. For the
"bidirectional" protocols, the internal implementation now automatically
creates a return data buffer of the maximum size (255). This handles the
worst-case for data that is returned from the serial bus handler, and
fixes some problems seen in the field. This new buffer is directly
returned to the ASL. As such, there is no true "bidirectional" buffer,
which matches the ACPI specification. This is the reason for the "double
store" seen in the example ASL code in the specification, shown below:
Word Process Call (AttribProcessCall):
OperationRegion(TOP1, GenericSerialBus, 0x00, 0x100)
Field(TOP1, BufferAcc, NoLock, Preserve)
{
FLD1, 8, // Virtual register at command value 1.
}
Name(BUFF, Buffer(20){}) // Create GenericSerialBus data buffer
// as BUFF
CreateWordField(BUFF, 0x02, DATA) // DATA = Data (Word)
Store(0x5416, DATA) // Save 0x5416 into the data buffer
Store(Store(BUFF, FLD1), BUFF) // Invoke a write/read Process Call
transaction
// This is the "double store". The write to
// FLD1 returns a new buffer, which is stored
// back into BUFF with the second Store.
2) iASL Compiler/Disassembler and Tools:
iASL: Implemented detection of extraneous/redundant uses of the Offset()
operator within a Field Unit list. A remark is now issued for these. For
example, the first two of the Offset() operators below are extraneous.
Because both the compiler and the interpreter track the offsets
automatically, these Offsets simply refer to the current offset and are
unnecessary. Note, when optimization is enabled, the iASL compiler will
in fact remove the redundant Offset operators and will not emit any AML
code for them.
OperationRegion (OPR1, SystemMemory, 0x100, 0x100)
Field (OPR1)
{
Offset (0), // Never needed
FLD1, 32,
Offset (4), // Redundant, offset is already 4 (bytes)
FLD2, 8,
Offset (64), // OK use of Offset.
FLD3, 16,
}
dsdt.asl 14: Offset (0),
Remark 2158 - ^ Unnecessary/redundant use of Offset
operator
dsdt.asl 16: Offset (4),
Remark 2158 - ^ Unnecessary/redundant use of Offset
operator
----------------------------------------
10 August 2018. Summary of changes for version 20180810:

View File

@ -576,11 +576,11 @@ AdDisassembleOneTable (
DisasmFilename, CmGetFileSize (File));
}
if (Gbl_MapfileFlag)
if (AslGbl_MapfileFlag)
{
fprintf (stderr, "%14s %s - %u bytes\n",
Gbl_Files[ASL_FILE_MAP_OUTPUT].ShortDescription,
Gbl_Files[ASL_FILE_MAP_OUTPUT].Filename,
AslGbl_Files[ASL_FILE_MAP_OUTPUT].ShortDescription,
AslGbl_Files[ASL_FILE_MAP_OUTPUT].Filename,
FlGetFileSize (ASL_FILE_MAP_OUTPUT));
}
}

View File

@ -159,7 +159,7 @@ const AH_TABLE *
AcpiAhGetTableInfo (
char *Signature);
extern const AH_TABLE Gbl_AcpiSupportedTables[];
extern const AH_TABLE AcpiGbl_SupportedTables[];
/*******************************************************************************
@ -181,7 +181,7 @@ AcpiAhGetTableInfo (
const AH_TABLE *Info;
for (Info = Gbl_AcpiSupportedTables; Info->Signature; Info++)
for (Info = AcpiGbl_SupportedTables; Info->Signature; Info++)
{
if (ACPI_COMPARE_NAME (Signature, Info->Signature))
{
@ -197,7 +197,7 @@ AcpiAhGetTableInfo (
* Note: Any tables added here should be duplicated within AcpiDmTableData
* in the file common/dmtable.c
*/
const AH_TABLE Gbl_AcpiSupportedTables[] =
const AH_TABLE AcpiGbl_SupportedTables[] =
{
{ACPI_SIG_ASF, "Alert Standard Format table"},
{ACPI_SIG_BERT, "Boot Error Record Table"},

View File

@ -520,27 +520,27 @@ AcpiDmGetExternalsFromFile (
UINT32 ImportCount = 0;
if (!Gbl_ExternalRefFilename)
if (!AslGbl_ExternalRefFilename)
{
return;
}
/* Open the file */
ExternalRefFile = fopen (Gbl_ExternalRefFilename, "r");
ExternalRefFile = fopen (AslGbl_ExternalRefFilename, "r");
if (!ExternalRefFile)
{
fprintf (stderr, "Could not open external reference file \"%s\"\n",
Gbl_ExternalRefFilename);
AslGbl_ExternalRefFilename);
AslAbort ();
return;
}
/* Each line defines a method */
while (fgets (StringBuffer, ASL_STRING_BUFFER_SIZE, ExternalRefFile))
while (fgets (AslGbl_StringBuffer, ASL_STRING_BUFFER_SIZE, ExternalRefFile))
{
Token = strtok (StringBuffer, METHOD_SEPARATORS); /* "External" */
Token = strtok (AslGbl_StringBuffer, METHOD_SEPARATORS); /* "External" */
if (!Token)
{
continue;
@ -593,7 +593,7 @@ AcpiDmGetExternalsFromFile (
/* Add this external to the global list */
AcpiOsPrintf ("%s: Importing method external (%u arguments) %s\n",
Gbl_ExternalRefFilename, ArgCount, MethodName);
AslGbl_ExternalRefFilename, ArgCount, MethodName);
AcpiDmAddPathToExternalList (MethodName, ACPI_TYPE_METHOD,
ArgCount, (ACPI_EXT_RESOLVED_REFERENCE | ACPI_EXT_ORIGIN_FROM_FILE));
@ -604,7 +604,7 @@ AcpiDmGetExternalsFromFile (
{
fprintf (stderr,
"Did not find any external methods in reference file \"%s\"\n",
Gbl_ExternalRefFilename);
AslGbl_ExternalRefFilename);
}
else
{
@ -613,7 +613,7 @@ AcpiDmGetExternalsFromFile (
AcpiDmAddExternalListToNamespace ();
AcpiOsPrintf ("%s: Imported %u external method definitions\n",
Gbl_ExternalRefFilename, ImportCount);
AslGbl_ExternalRefFilename, ImportCount);
}
fclose (ExternalRefFile);
@ -1394,12 +1394,12 @@ AcpiDmEmitExternals (
AcpiDmUnresolvedWarning (1);
if (Gbl_ExternalRefFilename)
if (AslGbl_ExternalRefFilename)
{
AcpiOsPrintf (
" /*\n * External declarations were imported from\n"
" * a reference file -- %s\n */\n\n",
Gbl_ExternalRefFilename);
AslGbl_ExternalRefFilename);
}
/*

View File

@ -637,7 +637,7 @@ AcpiDmDumpDataTable (
if (AcpiUtIsAmlTable (Table))
{
if (Gbl_VerboseTemplates)
if (AslGbl_VerboseTemplates)
{
/* Dump the raw table data */
@ -732,7 +732,7 @@ AcpiDmDumpDataTable (
}
}
if (!Gbl_DoTemplates || Gbl_VerboseTemplates)
if (!AslGbl_DoTemplates || AslGbl_VerboseTemplates)
{
/* Dump the raw table data */
@ -774,7 +774,7 @@ AcpiDmLineHeader (
Name = "";
}
if (Gbl_DoTemplates && !Gbl_VerboseTemplates) /* Terse template */
if (AslGbl_DoTemplates && !AslGbl_VerboseTemplates) /* Terse template */
{
if (ByteLength)
{
@ -821,7 +821,7 @@ AcpiDmLineHeader2 (
UINT32 Value)
{
if (Gbl_DoTemplates && !Gbl_VerboseTemplates) /* Terse template */
if (AslGbl_DoTemplates && !AslGbl_VerboseTemplates) /* Terse template */
{
if (ByteLength)
{
@ -1232,9 +1232,9 @@ AcpiDmDumpTable (
/* Convert 16-byte UUID buffer to 36-byte formatted UUID string */
(void) AuConvertUuidToString ((char *) Target, MsgBuffer);
(void) AuConvertUuidToString ((char *) Target, AslGbl_MsgBuffer);
AcpiOsPrintf ("%s\n", MsgBuffer);
AcpiOsPrintf ("%s\n", AslGbl_MsgBuffer);
break;
case ACPI_DMT_STRING:

View File

@ -186,16 +186,16 @@ UtLocalCalloc (
if (!Allocated)
{
AslCommonError (ASL_ERROR, ASL_MSG_MEMORY_ALLOCATION,
Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
Gbl_InputByteCount, Gbl_CurrentColumn,
Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
AslGbl_CurrentLineNumber, AslGbl_LogicalLineNumber,
AslGbl_InputByteCount, AslGbl_CurrentColumn,
AslGbl_Files[ASL_FILE_INPUT].Filename, NULL);
CmCleanupAndExit ();
exit (1);
}
TotalAllocations++;
TotalAllocated += Size;
AslGbl_TotalAllocations++;
AslGbl_TotalAllocated += Size;
return (Allocated);
}
@ -209,7 +209,7 @@ UtLocalCalloc (
* RETURN: None. Reallocates the global line buffers
*
* DESCRIPTION: Called if the current line buffer becomes filled. Reallocates
* all global line buffers and updates Gbl_LineBufferSize. NOTE:
* all global line buffers and updates AslGbl_LineBufferSize. NOTE:
* Also used for the initial allocation of the buffers, when
* all of the buffer pointers are NULL. Initial allocations are
* of size ASL_DEFAULT_LINE_BUFFER_SIZE
@ -225,21 +225,21 @@ UtExpandLineBuffers (
/* Attempt to double the size of all line buffers */
NewSize = Gbl_LineBufferSize * 2;
if (Gbl_CurrentLineBuffer)
NewSize = AslGbl_LineBufferSize * 2;
if (AslGbl_CurrentLineBuffer)
{
DbgPrint (ASL_DEBUG_OUTPUT,
"Increasing line buffer size from %u to %u\n",
Gbl_LineBufferSize, NewSize);
AslGbl_LineBufferSize, NewSize);
}
UtReallocLineBuffers (&Gbl_CurrentLineBuffer, Gbl_LineBufferSize, NewSize);
UtReallocLineBuffers (&Gbl_MainTokenBuffer, Gbl_LineBufferSize, NewSize);
UtReallocLineBuffers (&Gbl_MacroTokenBuffer, Gbl_LineBufferSize, NewSize);
UtReallocLineBuffers (&Gbl_ExpressionTokenBuffer, Gbl_LineBufferSize, NewSize);
UtReallocLineBuffers (&AslGbl_CurrentLineBuffer, AslGbl_LineBufferSize, NewSize);
UtReallocLineBuffers (&AslGbl_MainTokenBuffer, AslGbl_LineBufferSize, NewSize);
UtReallocLineBuffers (&AslGbl_MacroTokenBuffer, AslGbl_LineBufferSize, NewSize);
UtReallocLineBuffers (&AslGbl_ExpressionTokenBuffer, AslGbl_LineBufferSize, NewSize);
Gbl_LineBufPtr = Gbl_CurrentLineBuffer;
Gbl_LineBufferSize = NewSize;
AslGbl_LineBufPtr = AslGbl_CurrentLineBuffer;
AslGbl_LineBufferSize = NewSize;
}
@ -296,8 +296,8 @@ UtFreeLineBuffers (
void)
{
free (Gbl_CurrentLineBuffer);
free (Gbl_MainTokenBuffer);
free (Gbl_MacroTokenBuffer);
free (Gbl_ExpressionTokenBuffer);
free (AslGbl_CurrentLineBuffer);
free (AslGbl_MainTokenBuffer);
free (AslGbl_MacroTokenBuffer);
free (AslGbl_ExpressionTokenBuffer);
}

View File

@ -452,8 +452,8 @@ AnCheckMethodReturnValue (
{
/* Method returns a value, but the type is wrong */
AnFormatBtype (StringBuffer, ThisNodeBtype);
AnFormatBtype (StringBuffer2, RequiredBtypes);
AnFormatBtype (AslGbl_StringBuffer, ThisNodeBtype);
AnFormatBtype (AslGbl_StringBuffer2, RequiredBtypes);
/*
* The case where the method does not return any value at all
@ -463,11 +463,11 @@ AnCheckMethodReturnValue (
*/
if (ThisNodeBtype != 0)
{
sprintf (MsgBuffer,
sprintf (AslGbl_MsgBuffer,
"Method returns [%s], %s operator requires [%s]",
StringBuffer, OpInfo->Name, StringBuffer2);
AslGbl_StringBuffer, OpInfo->Name, AslGbl_StringBuffer2);
AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ArgOp, MsgBuffer);
AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE, ArgOp, AslGbl_MsgBuffer);
}
}
}

View File

@ -187,25 +187,25 @@ UtLocalCacheCalloc (
{
CacheSize = Length;
if (Gbl_StringCacheList)
if (AslGbl_StringCacheList)
{
Cache = UtLocalCalloc (sizeof (Cache->Next) + CacheSize);
/* Link new cache buffer just following head of list */
Cache->Next = Gbl_StringCacheList->Next;
Gbl_StringCacheList->Next = Cache;
Cache->Next = AslGbl_StringCacheList->Next;
AslGbl_StringCacheList->Next = Cache;
/* Leave cache management pointers alone as they pertain to head */
Gbl_StringCount++;
Gbl_StringSize += Length;
AslGbl_StringCount++;
AslGbl_StringSize += Length;
return (Cache->Buffer);
}
}
if ((Gbl_StringCacheNext + Length) >= Gbl_StringCacheLast)
if ((AslGbl_StringCacheNext + Length) >= AslGbl_StringCacheLast)
{
/* Allocate a new buffer */
@ -213,20 +213,20 @@ UtLocalCacheCalloc (
/* Link new cache buffer to head of list */
Cache->Next = Gbl_StringCacheList;
Gbl_StringCacheList = Cache;
Cache->Next = AslGbl_StringCacheList;
AslGbl_StringCacheList = Cache;
/* Setup cache management pointers */
Gbl_StringCacheNext = Cache->Buffer;
Gbl_StringCacheLast = Gbl_StringCacheNext + CacheSize;
AslGbl_StringCacheNext = Cache->Buffer;
AslGbl_StringCacheLast = AslGbl_StringCacheNext + CacheSize;
}
Gbl_StringCount++;
Gbl_StringSize += Length;
AslGbl_StringCount++;
AslGbl_StringSize += Length;
Buffer = Gbl_StringCacheNext;
Gbl_StringCacheNext += Length;
Buffer = AslGbl_StringCacheNext;
AslGbl_StringCacheNext += Length;
return (Buffer);
}
@ -252,7 +252,7 @@ UtParseOpCacheCalloc (
ASL_CACHE_INFO *Cache;
if (Gbl_ParseOpCacheNext >= Gbl_ParseOpCacheLast)
if (AslGbl_ParseOpCacheNext >= AslGbl_ParseOpCacheLast)
{
/* Allocate a new buffer */
@ -261,17 +261,17 @@ UtParseOpCacheCalloc (
/* Link new cache buffer to head of list */
Cache->Next = Gbl_ParseOpCacheList;
Gbl_ParseOpCacheList = Cache;
Cache->Next = AslGbl_ParseOpCacheList;
AslGbl_ParseOpCacheList = Cache;
/* Setup cache management pointers */
Gbl_ParseOpCacheNext = ACPI_CAST_PTR (ACPI_PARSE_OBJECT, Cache->Buffer);
Gbl_ParseOpCacheLast = Gbl_ParseOpCacheNext + ASL_PARSEOP_CACHE_SIZE;
AslGbl_ParseOpCacheNext = ACPI_CAST_PTR (ACPI_PARSE_OBJECT, Cache->Buffer);
AslGbl_ParseOpCacheLast = AslGbl_ParseOpCacheNext + ASL_PARSEOP_CACHE_SIZE;
}
Gbl_ParseOpCount++;
return (Gbl_ParseOpCacheNext++);
AslGbl_ParseOpCount++;
return (AslGbl_ParseOpCacheNext++);
}
@ -296,7 +296,7 @@ UtSubtableCacheCalloc (
ASL_CACHE_INFO *Cache;
if (Gbl_SubtableCacheNext >= Gbl_SubtableCacheLast)
if (AslGbl_SubtableCacheNext >= AslGbl_SubtableCacheLast)
{
/* Allocate a new buffer */
@ -305,17 +305,17 @@ UtSubtableCacheCalloc (
/* Link new cache buffer to head of list */
Cache->Next = Gbl_SubtableCacheList;
Gbl_SubtableCacheList = Cache;
Cache->Next = AslGbl_SubtableCacheList;
AslGbl_SubtableCacheList = Cache;
/* Setup cache management pointers */
Gbl_SubtableCacheNext = ACPI_CAST_PTR (DT_SUBTABLE, Cache->Buffer);
Gbl_SubtableCacheLast = Gbl_SubtableCacheNext + ASL_SUBTABLE_CACHE_SIZE;
AslGbl_SubtableCacheNext = ACPI_CAST_PTR (DT_SUBTABLE, Cache->Buffer);
AslGbl_SubtableCacheLast = AslGbl_SubtableCacheNext + ASL_SUBTABLE_CACHE_SIZE;
}
Gbl_SubtableCount++;
return (Gbl_SubtableCacheNext++);
AslGbl_SubtableCount++;
return (AslGbl_SubtableCacheNext++);
}
@ -340,7 +340,7 @@ UtFieldCacheCalloc (
ASL_CACHE_INFO *Cache;
if (Gbl_FieldCacheNext >= Gbl_FieldCacheLast)
if (AslGbl_FieldCacheNext >= AslGbl_FieldCacheLast)
{
/* Allocate a new buffer */
@ -349,17 +349,17 @@ UtFieldCacheCalloc (
/* Link new cache buffer to head of list */
Cache->Next = Gbl_FieldCacheList;
Gbl_FieldCacheList = Cache;
Cache->Next = AslGbl_FieldCacheList;
AslGbl_FieldCacheList = Cache;
/* Setup cache management pointers */
Gbl_FieldCacheNext = ACPI_CAST_PTR (DT_FIELD, Cache->Buffer);
Gbl_FieldCacheLast = Gbl_FieldCacheNext + ASL_FIELD_CACHE_SIZE;
AslGbl_FieldCacheNext = ACPI_CAST_PTR (DT_FIELD, Cache->Buffer);
AslGbl_FieldCacheLast =AslGbl_FieldCacheNext + ASL_FIELD_CACHE_SIZE;
}
Gbl_FieldCount++;
return (Gbl_FieldCacheNext++);
AslGbl_FieldCount++;
return (AslGbl_FieldCacheNext++);
}
@ -387,95 +387,92 @@ UtDeleteLocalCaches (
* Generic cache, arbitrary size allocations
*/
BufferCount = 0;
while (Gbl_StringCacheList)
while (AslGbl_StringCacheList)
{
Next = Gbl_StringCacheList->Next;
ACPI_FREE (Gbl_StringCacheList);
Gbl_StringCacheList = Next;
Next = AslGbl_StringCacheList->Next;
ACPI_FREE (AslGbl_StringCacheList);
AslGbl_StringCacheList = Next;
BufferCount++;
}
DbgPrint (ASL_DEBUG_OUTPUT,
"%u Strings (%u bytes), Buffer size: %u bytes, %u Buffers\n",
Gbl_StringCount, Gbl_StringSize, ASL_STRING_CACHE_SIZE, BufferCount);
AslGbl_StringCount, AslGbl_StringSize, ASL_STRING_CACHE_SIZE, BufferCount);
/* Reset cache globals */
Gbl_StringSize = 0;
Gbl_StringCount = 0;
Gbl_StringCacheNext = NULL;
Gbl_StringCacheLast = NULL;
AslGbl_StringSize = 0;
AslGbl_StringCount = 0;
AslGbl_StringCacheNext = NULL;
AslGbl_StringCacheLast = NULL;
/*
* Parse Op cache
*/
BufferCount = 0;
while (Gbl_ParseOpCacheList)
while (AslGbl_ParseOpCacheList)
{
Next = Gbl_ParseOpCacheList->Next;
ACPI_FREE (Gbl_ParseOpCacheList);
Gbl_ParseOpCacheList = Next;
Next = AslGbl_ParseOpCacheList->Next;
ACPI_FREE (AslGbl_ParseOpCacheList);
AslGbl_ParseOpCacheList = Next;
BufferCount++;
}
DbgPrint (ASL_DEBUG_OUTPUT,
"%u ParseOps, Buffer size: %u ops (%u bytes), %u Buffers\n",
Gbl_ParseOpCount, ASL_PARSEOP_CACHE_SIZE,
AslGbl_ParseOpCount, ASL_PARSEOP_CACHE_SIZE,
(sizeof (ACPI_PARSE_OBJECT) * ASL_PARSEOP_CACHE_SIZE), BufferCount);
/* Reset cache globals */
Gbl_ParseOpCount = 0;
Gbl_ParseOpCacheNext = NULL;
Gbl_ParseOpCacheLast = NULL;
Gbl_ParseTreeRoot = NULL;
AslGbl_ParseOpCount = 0;
AslGbl_ParseOpCacheNext = NULL;
AslGbl_ParseOpCacheLast = NULL;
AslGbl_ParseTreeRoot = NULL;
/*
* Table Compiler - Field cache
*/
BufferCount = 0;
while (Gbl_FieldCacheList)
while (AslGbl_FieldCacheList)
{
Next = Gbl_FieldCacheList->Next;
ACPI_FREE (Gbl_FieldCacheList);
Gbl_FieldCacheList = Next;
Next = AslGbl_FieldCacheList->Next;
ACPI_FREE (AslGbl_FieldCacheList);
AslGbl_FieldCacheList = Next;
BufferCount++;
}
DbgPrint (ASL_DEBUG_OUTPUT,
"%u Fields, Buffer size: %u fields (%u bytes), %u Buffers\n",
Gbl_FieldCount, ASL_FIELD_CACHE_SIZE,
AslGbl_FieldCount, ASL_FIELD_CACHE_SIZE,
(sizeof (DT_FIELD) * ASL_FIELD_CACHE_SIZE), BufferCount);
/* Reset cache globals */
Gbl_FieldCount = 0;
Gbl_FieldCacheNext = NULL;
Gbl_FieldCacheLast = NULL;
AslGbl_FieldCount = 0;
AslGbl_FieldCacheNext = NULL;
AslGbl_FieldCacheLast = NULL;
/*
* Table Compiler - Subtable cache
*/
BufferCount = 0;
while (Gbl_SubtableCacheList)
while (AslGbl_SubtableCacheList)
{
Next = Gbl_SubtableCacheList->Next;
ACPI_FREE (Gbl_SubtableCacheList);
Gbl_SubtableCacheList = Next;
Next = AslGbl_SubtableCacheList->Next;
ACPI_FREE (AslGbl_SubtableCacheList);
AslGbl_SubtableCacheList = Next;
BufferCount++;
}
DbgPrint (ASL_DEBUG_OUTPUT,
"%u Subtables, Buffer size: %u subtables (%u bytes), %u Buffers\n",
Gbl_SubtableCount, ASL_SUBTABLE_CACHE_SIZE,
AslGbl_SubtableCount, ASL_SUBTABLE_CACHE_SIZE,
(sizeof (DT_SUBTABLE) * ASL_SUBTABLE_CACHE_SIZE), BufferCount);
/* Reset cache globals */
Gbl_SubtableCount = 0;
Gbl_SubtableCacheNext = NULL;
Gbl_SubtableCacheLast = NULL;
AslGbl_SubtableCount = 0;
AslGbl_SubtableCacheNext = NULL;
AslGbl_SubtableCacheLast = NULL;
}

View File

@ -203,10 +203,10 @@ CgGenerateAmlOutput (
/* Generate the AML output file */
FlSeekFile (ASL_FILE_SOURCE_OUTPUT, 0);
Gbl_SourceLine = 0;
Gbl_NextError = Gbl_ErrorLog;
AslGbl_SourceLine = 0;
AslGbl_NextError = AslGbl_ErrorLog;
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
CgAmlWriteWalk, NULL, NULL);
DbgPrint (ASL_TREE_OUTPUT, ASL_PARSE_TREE_HEADER2);
@ -237,7 +237,7 @@ CgAmlWriteWalk (
CgWriteNode (Op);
if (!Gbl_DebugFlag)
if (!AslGbl_DebugFlag)
{
return (AE_OK);
}
@ -556,46 +556,46 @@ CgWriteTableHeader (
Child->Asl.Value.String = ACPI_SIG_XXXX;
}
strncpy (TableHeader.Signature, Child->Asl.Value.String, ACPI_NAME_SIZE);
strncpy (AslGbl_TableHeader.Signature, Child->Asl.Value.String, ACPI_NAME_SIZE);
/* Revision */
Child = Child->Asl.Next;
TableHeader.Revision = (UINT8) Child->Asl.Value.Integer;
AslGbl_TableHeader.Revision = (UINT8) Child->Asl.Value.Integer;
/* Command-line Revision override */
if (Gbl_RevisionOverride)
if (AslGbl_RevisionOverride)
{
TableHeader.Revision = Gbl_RevisionOverride;
AslGbl_TableHeader.Revision = AslGbl_RevisionOverride;
}
/* OEMID */
Child = Child->Asl.Next;
strncpy (TableHeader.OemId, Child->Asl.Value.String, ACPI_OEM_ID_SIZE);
strncpy (AslGbl_TableHeader.OemId, Child->Asl.Value.String, ACPI_OEM_ID_SIZE);
/* OEM TableID */
Child = Child->Asl.Next;
strncpy (TableHeader.OemTableId, Child->Asl.Value.String, ACPI_OEM_TABLE_ID_SIZE);
strncpy (AslGbl_TableHeader.OemTableId, Child->Asl.Value.String, ACPI_OEM_TABLE_ID_SIZE);
/* OEM Revision */
Child = Child->Asl.Next;
TableHeader.OemRevision = (UINT32) Child->Asl.Value.Integer;
AslGbl_TableHeader.OemRevision = (UINT32) Child->Asl.Value.Integer;
/* Compiler ID */
ACPI_MOVE_NAME (TableHeader.AslCompilerId, ASL_CREATOR_ID);
ACPI_MOVE_NAME (AslGbl_TableHeader.AslCompilerId, ASL_CREATOR_ID);
/* Compiler version */
TableHeader.AslCompilerRevision = ACPI_CA_VERSION;
AslGbl_TableHeader.AslCompilerRevision = ACPI_CA_VERSION;
/* Table length. Checksum zero for now, will rewrite later */
TableHeader.Length = sizeof (ACPI_TABLE_HEADER) +
AslGbl_TableHeader.Length = sizeof (ACPI_TABLE_HEADER) +
Op->Asl.AmlSubtreeLength;
/* Calculate the comment lengths for this definition block parseOp */
@ -609,12 +609,14 @@ CgWriteTableHeader (
* Take the filename without extensions, add 3 for the new extension
* and another 3 for the a908 bytecode and null terminator.
*/
TableHeader.Length += strrchr (Gbl_ParseTreeRoot->Asl.Filename, '.')
- Gbl_ParseTreeRoot->Asl.Filename + 1 + 3 + 3;
AslGbl_TableHeader.Length += strrchr (AslGbl_ParseTreeRoot->Asl.Filename, '.')
- AslGbl_ParseTreeRoot->Asl.Filename + 1 + 3 + 3;
Op->Asl.AmlSubtreeLength +=
strlen (Gbl_ParseTreeRoot->Asl.Filename) + 3;
CvDbgPrint (" Length: %lu\n",
strlen (Gbl_ParseTreeRoot->Asl.Filename) + 3);
strlen (AslGbl_ParseTreeRoot->Asl.Filename) + 3;
CvDbgPrint (" Length: %lu\n",
strlen (AslGbl_ParseTreeRoot->Asl.Filename) + 3);
if (Op->Asl.CommentList)
{
@ -624,10 +626,10 @@ CgWriteTableHeader (
CommentLength = strlen (Current->Comment)+3;
CvDbgPrint ("Length of standard comment): %d\n", CommentLength);
CvDbgPrint (" Comment string: %s\n\n", Current->Comment);
TableHeader.Length += CommentLength;
AslGbl_TableHeader.Length += CommentLength;
Op->Asl.AmlSubtreeLength += CommentLength;
Current = Current->Next;
CvDbgPrint (" Length: %u\n", CommentLength);
CvDbgPrint (" Length: %u\n", CommentLength);
}
}
if (Op->Asl.CloseBraceComment)
@ -635,20 +637,19 @@ CgWriteTableHeader (
CommentLength = strlen (Op->Asl.CloseBraceComment)+3;
CvDbgPrint ("Length of inline comment +3: %d\n", CommentLength);
CvDbgPrint (" Comment string: %s\n\n", Op->Asl.CloseBraceComment);
TableHeader.Length += CommentLength;
AslGbl_TableHeader.Length += CommentLength;
Op->Asl.AmlSubtreeLength += CommentLength;
CvDbgPrint (" Length: %u\n", CommentLength);
CvDbgPrint (" Length: %u\n", CommentLength);
}
}
TableHeader.Checksum = 0;
Op->Asl.FinalAmlOffset = ftell (Gbl_Files[ASL_FILE_AML_OUTPUT].Handle);
AslGbl_TableHeader.Checksum = 0;
Op->Asl.FinalAmlOffset = ftell (AslGbl_Files[ASL_FILE_AML_OUTPUT].Handle);
/* Write entire header and clear the table header global */
CgLocalWriteAmlData (Op, &TableHeader, sizeof (ACPI_TABLE_HEADER));
memset (&TableHeader, 0, sizeof (ACPI_TABLE_HEADER));
CgLocalWriteAmlData (Op, &AslGbl_TableHeader, sizeof (ACPI_TABLE_HEADER));
memset (&AslGbl_TableHeader, 0, sizeof (ACPI_TABLE_HEADER));
}
@ -727,7 +728,7 @@ CgCloseTable (
/* Process all definition blocks */
Op = Gbl_ParseTreeRoot->Asl.Child;
Op = AslGbl_ParseTreeRoot->Asl.Child;
while (Op)
{
CgUpdateHeader (Op);
@ -773,7 +774,7 @@ CgWriteNode (
}
if ((Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) &&
Gbl_DoExternals == FALSE)
AslGbl_DoExternals == FALSE)
{
return;
}

View File

@ -205,7 +205,7 @@ CmDoCompile (
UtEndEvent (Event);
Event = UtBeginEvent ("Preprocess input file");
if (Gbl_PreprocessFlag)
if (AslGbl_PreprocessFlag)
{
/* Enter compiler name as a #define */
@ -214,10 +214,10 @@ CmDoCompile (
/* Preprocessor */
PrDoPreprocess ();
Gbl_CurrentLineNumber = 1;
Gbl_LogicalLineNumber = 1;
AslGbl_CurrentLineNumber = 1;
AslGbl_LogicalLineNumber = 1;
if (Gbl_PreprocessOnly)
if (AslGbl_PreprocessOnly)
{
UtEndEvent (Event);
CmCleanupAndExit ();
@ -235,7 +235,7 @@ CmDoCompile (
/* Check for parser-detected syntax errors */
if (Gbl_SyntaxError)
if (AslGbl_SyntaxError)
{
fprintf (stderr,
"Compiler aborting due to parser-detected syntax error(s)\n");
@ -245,7 +245,7 @@ CmDoCompile (
/* Did the parse tree get successfully constructed? */
if (!Gbl_ParseTreeRoot)
if (!AslGbl_ParseTreeRoot)
{
/*
* If there are no errors, then we have some sort of
@ -264,23 +264,23 @@ CmDoCompile (
/* Prune the parse tree if requested (debug purposes only) */
if (Gbl_PruneParseTree)
if (AslGbl_PruneParseTree)
{
AslPruneParseTree (Gbl_PruneDepth, Gbl_PruneType);
AslPruneParseTree (AslGbl_PruneDepth, AslGbl_PruneType);
}
/* Optional parse tree dump, compiler debug output only */
LsDumpParseTree ();
OpcGetIntegerWidth (Gbl_ParseTreeRoot->Asl.Child);
OpcGetIntegerWidth (AslGbl_ParseTreeRoot->Asl.Child);
UtEndEvent (Event);
/* Pre-process parse tree for any operator transforms */
Event = UtBeginEvent ("Parse tree transforms");
DbgPrint (ASL_DEBUG_OUTPUT, "\nParse tree transforms\n\n");
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE,
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE,
TrAmlTransformWalkBegin, TrAmlTransformWalkEnd, NULL);
UtEndEvent (Event);
@ -288,7 +288,7 @@ CmDoCompile (
Event = UtBeginEvent ("Generate AML opcodes");
DbgPrint (ASL_DEBUG_OUTPUT, "Generating AML opcodes\n\n");
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD, NULL,
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD, NULL,
OpcAmlOpcodeWalk, NULL);
UtEndEvent (Event);
@ -298,7 +298,7 @@ CmDoCompile (
* descriptor within the input file.
*/
Event = UtBeginEvent ("Open AML output file");
Status = FlOpenAmlOutputFile (Gbl_OutputFilenamePrefix);
Status = FlOpenAmlOutputFile (AslGbl_OutputFilenamePrefix);
UtEndEvent (Event);
if (ACPI_FAILURE (Status))
{
@ -312,9 +312,9 @@ CmDoCompile (
DbgPrint (ASL_DEBUG_OUTPUT,
"Interpreting compile-time constant expressions\n\n");
if (Gbl_FoldConstants)
if (AslGbl_FoldConstants)
{
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD,
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD,
NULL, OpcAmlConstantWalk, NULL);
}
else
@ -328,7 +328,7 @@ CmDoCompile (
Event = UtBeginEvent ("Updating AML opcodes after constant folding");
DbgPrint (ASL_DEBUG_OUTPUT,
"Updating AML opcodes after constant folding\n\n");
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD,
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD,
NULL, OpcAmlOpcodeUpdateWalk, NULL);
UtEndEvent (Event);
@ -336,15 +336,15 @@ CmDoCompile (
Event = UtBeginEvent ("Generate AML package lengths");
DbgPrint (ASL_DEBUG_OUTPUT, "Generating Package lengths\n\n");
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD, NULL,
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD, NULL,
LnPackageLengthWalk, NULL);
UtEndEvent (Event);
if (Gbl_ParseOnlyFlag)
if (AslGbl_ParseOnlyFlag)
{
AePrintErrorLog (ASL_FILE_STDERR);
UtDisplaySummary (ASL_FILE_STDERR);
if (Gbl_DebugFlag)
if (AslGbl_DebugFlag)
{
/* Print error summary to the stdout also */
@ -363,7 +363,7 @@ CmDoCompile (
Event = UtBeginEvent ("Create ACPI Namespace");
DbgPrint (ASL_DEBUG_OUTPUT, "Creating ACPI Namespace\n\n");
Status = LdLoadNamespace (Gbl_ParseTreeRoot);
Status = LdLoadNamespace (AslGbl_ParseTreeRoot);
UtEndEvent (Event);
if (ACPI_FAILURE (Status))
{
@ -388,19 +388,19 @@ CmDoCompile (
/* Resolve External Declarations */
if (Gbl_DoExternals)
if (AslGbl_DoExternals)
{
Event = UtBeginEvent ("Resolve all Externals");
DbgPrint (ASL_DEBUG_OUTPUT, "\nResolve Externals\n\n");
if (Gbl_DoExternalsInPlace)
if (AslGbl_DoExternalsInPlace)
{
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
ExAmlExternalWalkBegin, NULL, NULL);
}
else
{
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE,
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE,
ExAmlExternalWalkBegin, ExAmlExternalWalkEnd, NULL);
}
UtEndEvent (Event);
@ -413,19 +413,19 @@ CmDoCompile (
* part one - check control methods
*/
Event = UtBeginEvent ("Analyze control method return types");
AnalysisWalkInfo.MethodStack = NULL;
AslGbl_AnalysisWalkInfo.MethodStack = NULL;
DbgPrint (ASL_DEBUG_OUTPUT, "Semantic analysis - Method analysis\n\n");
if (Gbl_CrossReferenceOutput)
if (AslGbl_CrossReferenceOutput)
{
OtPrintHeaders ("Part 1: Object Reference Map "
"(Object references from within each control method)");
}
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE,
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE,
MtMethodAnalysisWalkBegin,
MtMethodAnalysisWalkEnd, &AnalysisWalkInfo);
MtMethodAnalysisWalkEnd, &AslGbl_AnalysisWalkInfo);
UtEndEvent (Event);
/* Generate the object cross-reference file if requested */
@ -438,7 +438,7 @@ CmDoCompile (
Event = UtBeginEvent ("Determine object types returned by methods");
DbgPrint (ASL_DEBUG_OUTPUT, "Semantic analysis - Method typing\n\n");
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD,
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD,
NULL, AnMethodTypingWalkEnd, NULL);
UtEndEvent (Event);
@ -447,10 +447,10 @@ CmDoCompile (
Event = UtBeginEvent ("Analyze AML operand types");
DbgPrint (ASL_DEBUG_OUTPUT,
"Semantic analysis - Operand type checking\n\n");
if (Gbl_DoTypechecking)
if (AslGbl_DoTypechecking)
{
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD,
NULL, AnOperandTypecheckWalkEnd, &AnalysisWalkInfo);
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD,
NULL, AnOperandTypecheckWalkEnd, &AslGbl_AnalysisWalkInfo);
}
UtEndEvent (Event);
@ -458,9 +458,9 @@ CmDoCompile (
Event = UtBeginEvent ("Miscellaneous analysis");
DbgPrint (ASL_DEBUG_OUTPUT, "Semantic analysis - miscellaneous\n\n");
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
AnOtherSemanticAnalysisWalkBegin,
NULL, &AnalysisWalkInfo);
NULL, &AslGbl_AnalysisWalkInfo);
UtEndEvent (Event);
/*
@ -471,17 +471,17 @@ CmDoCompile (
*/
if (AcpiGbl_CaptureComments)
{
AcpiGbl_LastListHead = Gbl_ParseTreeRoot->Asl.CommentList;
Gbl_ParseTreeRoot->Asl.CommentList = NULL;
AcpiGbl_LastListHead = AslGbl_ParseTreeRoot->Asl.CommentList;
AslGbl_ParseTreeRoot->Asl.CommentList = NULL;
}
/* Calculate all AML package lengths */
Event = UtBeginEvent ("Finish AML package length generation");
DbgPrint (ASL_DEBUG_OUTPUT, "Generating Package lengths\n\n");
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD, NULL,
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD, NULL,
LnInitLengthsWalk, NULL);
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD, NULL,
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD, NULL,
LnPackageLengthWalk, NULL);
UtEndEvent (Event);
@ -539,12 +539,12 @@ AslCompilerSignon (
case ASL_FILE_HEX_OUTPUT:
if (Gbl_HexOutputFlag == HEX_OUTPUT_ASM)
if (AslGbl_HexOutputFlag == HEX_OUTPUT_ASM)
{
Prefix = "; ";
}
else if ((Gbl_HexOutputFlag == HEX_OUTPUT_C) ||
(Gbl_HexOutputFlag == HEX_OUTPUT_ASL))
else if ((AslGbl_HexOutputFlag == HEX_OUTPUT_C) ||
(AslGbl_HexOutputFlag == HEX_OUTPUT_ASL))
{
FlPrintFile (ASL_FILE_HEX_OUTPUT, "/*\n");
Prefix = " * ";
@ -616,12 +616,12 @@ AslCompilerFileHeader (
case ASL_FILE_HEX_OUTPUT:
if (Gbl_HexOutputFlag == HEX_OUTPUT_ASM)
if (AslGbl_HexOutputFlag == HEX_OUTPUT_ASM)
{
Prefix = "; ";
}
else if ((Gbl_HexOutputFlag == HEX_OUTPUT_C) ||
(Gbl_HexOutputFlag == HEX_OUTPUT_ASL))
else if ((AslGbl_HexOutputFlag == HEX_OUTPUT_C) ||
(AslGbl_HexOutputFlag == HEX_OUTPUT_ASL))
{
Prefix = " * ";
}
@ -648,7 +648,7 @@ AslCompilerFileHeader (
FlPrintFile (FileId,
"%sCompilation of \"%s\" - %s%s\n",
Prefix, Gbl_Files[ASL_FILE_INPUT].Filename, asctime (NewTime),
Prefix, AslGbl_Files[ASL_FILE_INPUT].Filename, asctime (NewTime),
Prefix);
switch (FileId)
@ -756,7 +756,7 @@ CmDumpAllEvents (
Event = AslGbl_Events;
DbgPrint (ASL_DEBUG_OUTPUT, "\n\nElapsed time for major events\n\n");
if (Gbl_CompileTimesFlag)
if (AslGbl_CompileTimesFlag)
{
printf ("\nElapsed time for major events\n\n");
}
@ -782,7 +782,7 @@ CmDumpAllEvents (
DbgPrint (ASL_DEBUG_OUTPUT, "%8u usec %8u msec - %s\n",
MicroSeconds, MilliSeconds, Event->EventName);
if (Gbl_CompileTimesFlag)
if (AslGbl_CompileTimesFlag)
{
printf ("%8u usec %8u msec - %s\n",
MicroSeconds, MilliSeconds, Event->EventName);
@ -816,7 +816,7 @@ CmCleanupAndExit (
AslCheckExpectedExceptions ();
AePrintErrorLog (ASL_FILE_STDERR);
if (Gbl_DebugFlag)
if (AslGbl_DebugFlag)
{
/* Print error summary to stdout also */
@ -827,36 +827,36 @@ CmCleanupAndExit (
CmDumpAllEvents ();
if (Gbl_CompileTimesFlag)
if (AslGbl_CompileTimesFlag)
{
printf ("\nMiscellaneous compile statistics\n\n");
printf ("%11u : %s\n", TotalParseNodes, "Parse nodes");
printf ("%11u : %s\n", Gbl_NsLookupCount, "Namespace searches");
printf ("%11u : %s\n", TotalNamedObjects, "Named objects");
printf ("%11u : %s\n", TotalMethods, "Control methods");
printf ("%11u : %s\n", TotalAllocations, "Memory Allocations");
printf ("%11u : %s\n", TotalAllocated, "Total allocated memory");
printf ("%11u : %s\n", TotalFolds, "Constant subtrees folded");
printf ("%11u : %s\n", AslGbl_TotalParseNodes, "Parse nodes");
printf ("%11u : %s\n", AslGbl_NsLookupCount, "Namespace searches");
printf ("%11u : %s\n", AslGbl_TotalNamedObjects, "Named objects");
printf ("%11u : %s\n", AslGbl_TotalMethods, "Control methods");
printf ("%11u : %s\n", AslGbl_TotalAllocations, "Memory Allocations");
printf ("%11u : %s\n", AslGbl_TotalAllocated, "Total allocated memory");
printf ("%11u : %s\n", AslGbl_TotalFolds, "Constant subtrees folded");
printf ("\n");
}
if (Gbl_NsLookupCount)
if (AslGbl_NsLookupCount)
{
DbgPrint (ASL_DEBUG_OUTPUT,
"\n\nMiscellaneous compile statistics\n\n");
DbgPrint (ASL_DEBUG_OUTPUT,
"%32s : %u\n", "Total Namespace searches",
Gbl_NsLookupCount);
AslGbl_NsLookupCount);
DbgPrint (ASL_DEBUG_OUTPUT,
"%32s : %u usec\n", "Time per search", ((UINT32)
(AslGbl_Events[AslGbl_NamespaceEvent].EndTime -
AslGbl_Events[AslGbl_NamespaceEvent].StartTime) / 10) /
Gbl_NsLookupCount);
AslGbl_NsLookupCount);
}
if (Gbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT)
if (AslGbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT)
{
printf ("\nMaximum error count (%u) exceeded\n",
ASL_MAX_ERROR_COUNT);
@ -868,9 +868,9 @@ CmCleanupAndExit (
* We will delete the AML file if there are errors and the
* force AML output option has not been used.
*/
if ((Gbl_ExceptionCount[ASL_ERROR] > 0) &&
(!Gbl_IgnoreErrors) &&
Gbl_Files[ASL_FILE_AML_OUTPUT].Handle)
if ((AslGbl_ExceptionCount[ASL_ERROR] > 0) &&
(!AslGbl_IgnoreErrors) &&
AslGbl_Files[ASL_FILE_AML_OUTPUT].Handle)
{
DeleteAmlFile = TRUE;
}
@ -883,10 +883,10 @@ CmCleanupAndExit (
* or aborted. Prevent attempt to close the same file twice in
* loop below.
*/
if (Gbl_Files[ASL_FILE_PREPROCESSOR].Handle ==
Gbl_Files[ASL_FILE_INPUT].Handle)
if (AslGbl_Files[ASL_FILE_PREPROCESSOR].Handle ==
AslGbl_Files[ASL_FILE_INPUT].Handle)
{
Gbl_Files[ASL_FILE_PREPROCESSOR].Handle = NULL;
AslGbl_Files[ASL_FILE_PREPROCESSOR].Handle = NULL;
}
/* Close the standard I/O files */
@ -905,7 +905,7 @@ CmCleanupAndExit (
/* Delete the preprocessor temp file unless full debug was specified */
if (Gbl_PreprocessFlag && !Gbl_KeepPreprocessorTempFile)
if (AslGbl_PreprocessFlag && !AslGbl_KeepPreprocessorTempFile)
{
FlDeleteFile (ASL_FILE_PREPROCESSOR);
}
@ -922,16 +922,15 @@ CmCleanupAndExit (
* filename instead, to determine if the .SRC file was actually
* created.
*/
if (!Gbl_SourceOutputFlag)
if (!AslGbl_SourceOutputFlag)
{
FlDeleteFile (ASL_FILE_SOURCE_OUTPUT);
}
/* Final cleanup after compiling one file */
if (!Gbl_DoAslConversion)
if (!AslGbl_DoAslConversion)
{
UtDeleteLocalCaches ();
}
}

View File

@ -566,7 +566,7 @@ NamePathTail [.]{NameSeg}
/* ExtendedAttribKeyword: Bus attributes, AccessAs operator (ACPI 5.0) */
"AttribBytes" { count (0); return (PARSEOP_ACCESSATTRIB_MULTIBYTE); }
"AttribBytes" { count (0); return (PARSEOP_ACCESSATTRIB_BYTES); }
"AttribRawBytes" { count (0); return (PARSEOP_ACCESSATTRIB_RAW_BYTES); }
"AttribRawProcessBytes" { count (0); return (PARSEOP_ACCESSATTRIB_RAW_PROCESS); }
@ -836,17 +836,17 @@ NamePathTail [.]{NameSeg}
. { count (1);
if (isprint ((int) *AslCompilertext))
{
sprintf (MsgBuffer,
sprintf (AslGbl_MsgBuffer,
"Invalid character (%c), expecting ASL keyword or name",
*AslCompilertext);
}
else
{
sprintf (MsgBuffer,
sprintf (AslGbl_MsgBuffer,
"Invalid character (0x%2.2X), expecting ASL keyword or name",
*AslCompilertext);
}
AslCompilererror (MsgBuffer);}
AslCompilererror (AslGbl_MsgBuffer);}
<<EOF>> { if (AslPopInputFileStack ())
{yyterminate();}

View File

@ -295,8 +295,8 @@
/*
* Macros for ASL/ASL+ converter
*/
#define COMMENT_CAPTURE_ON Gbl_CommentState.CaptureComments = TRUE;
#define COMMENT_CAPTURE_OFF Gbl_CommentState.CaptureComments = FALSE;
#define COMMENT_CAPTURE_ON AslGbl_CommentState.CaptureComments = TRUE;
#define COMMENT_CAPTURE_OFF AslGbl_CommentState.CaptureComments = FALSE;
#endif /* ASLDEFINE.H */

View File

@ -221,7 +221,7 @@ AslAbort (
{
AePrintErrorLog (ASL_FILE_STDERR);
if (Gbl_DebugFlag)
if (AslGbl_DebugFlag)
{
/* Print error summary to stdout also */
@ -248,7 +248,7 @@ void
AeClearErrorLog (
void)
{
ASL_ERROR_MSG *Enode = Gbl_ErrorLog;
ASL_ERROR_MSG *Enode = AslGbl_ErrorLog;
ASL_ERROR_MSG *Next;
@ -261,7 +261,7 @@ AeClearErrorLog (
Enode = Next;
}
Gbl_ErrorLog = NULL;
AslGbl_ErrorLog = NULL;
}
@ -289,9 +289,9 @@ AeAddToErrorLog (
/* If Gbl_ErrorLog is null, this is the first error node */
if (!Gbl_ErrorLog)
if (!AslGbl_ErrorLog)
{
Gbl_ErrorLog = Enode;
AslGbl_ErrorLog = Enode;
return;
}
@ -300,7 +300,7 @@ AeAddToErrorLog (
* List is sorted according to line number.
*/
Prev = NULL;
Next = Gbl_ErrorLog;
Next = AslGbl_ErrorLog;
while ((Next) && (Next->LogicalLineNumber <= Enode->LogicalLineNumber))
{
@ -318,7 +318,7 @@ AeAddToErrorLog (
}
else
{
Gbl_ErrorLog = Enode;
AslGbl_ErrorLog = Enode;
}
}
@ -382,7 +382,7 @@ AeDecodeErrorMessageId (
ExtraMessage = NULL;
}
if (Gbl_VerboseErrors && !PrematureEOF)
if (AslGbl_VerboseErrors && !PrematureEOF)
{
if (Total >= 256)
{
@ -426,7 +426,7 @@ AeDecodeErrorMessageId (
}
fprintf (OutputFile, "\n");
if (Gbl_VerboseErrors && !Enode->SubError)
if (AslGbl_VerboseErrors && !Enode->SubError)
{
fprintf (OutputFile, "\n");
}
@ -469,10 +469,10 @@ AePrintErrorSourceLine (
* Use the merged header/source file if present, otherwise
* use input file
*/
SourceFile = Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Handle;
SourceFile = AslGbl_Files[ASL_FILE_SOURCE_OUTPUT].Handle;
if (!SourceFile)
{
SourceFile = Gbl_Files[ASL_FILE_INPUT].Handle;
SourceFile = AslGbl_Files[ASL_FILE_INPUT].Handle;
}
if (SourceFile)
@ -497,7 +497,7 @@ AePrintErrorSourceLine (
/* Print filename and line number if present and valid */
if (Gbl_VerboseErrors)
if (AslGbl_VerboseErrors)
{
fprintf (OutputFile, "%-8s", Enode->Filename);
@ -530,7 +530,7 @@ AePrintErrorSourceLine (
{
fprintf (OutputFile,
"[*** iASL: Seek error on source code temp file %s ***]",
Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename);
AslGbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename);
fprintf (OutputFile, "\n");
return AE_OK;
@ -540,7 +540,7 @@ AePrintErrorSourceLine (
{
fprintf (OutputFile,
"[*** iASL: Read error on source code temp file %s ***]",
Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename);
AslGbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename);
return AE_IO_ERROR;
}
/* Read/write the source line, up to the maximum line length */
@ -569,7 +569,7 @@ AePrintErrorSourceLine (
{
fprintf (OutputFile,
"[*** iASL: Read error on source code temp file %s ***]",
Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename);
AslGbl_Files[ASL_FILE_SOURCE_OUTPUT].Filename);
return AE_IO_ERROR;
}
@ -629,7 +629,7 @@ AePrintException (
ASL_ERROR_MSG *Child = Enode->SubError;
if (Gbl_NoErrors)
if (AslGbl_NoErrors)
{
return;
}
@ -648,7 +648,7 @@ AePrintException (
case ASL_WARNING2:
case ASL_WARNING3:
if (!Gbl_DisplayWarnings)
if (!AslGbl_DisplayWarnings)
{
return;
}
@ -656,7 +656,7 @@ AePrintException (
case ASL_REMARK:
if (!Gbl_DisplayRemarks)
if (!AslGbl_DisplayRemarks)
{
return;
}
@ -664,7 +664,7 @@ AePrintException (
case ASL_OPTIMIZATION:
if (!Gbl_DisplayOptimizations)
if (!AslGbl_DisplayOptimizations)
{
return;
}
@ -678,7 +678,7 @@ AePrintException (
/* Get the various required file handles */
OutputFile = Gbl_Files[FileId].Handle;
OutputFile = AslGbl_Files[FileId].Handle;
if (Header)
{
@ -764,7 +764,7 @@ void
AePrintErrorLog (
UINT32 FileId)
{
ASL_ERROR_MSG *Enode = Gbl_ErrorLog;
ASL_ERROR_MSG *Enode = AslGbl_ErrorLog;
/* Walk the error node list */
@ -978,20 +978,20 @@ AslLogNewError (
AeAddToErrorLog (Enode);
if (Gbl_DebugFlag)
if (AslGbl_DebugFlag)
{
/* stderr is a file, send error to it immediately */
AePrintException (ASL_FILE_STDERR, Enode, NULL);
}
Gbl_ExceptionCount[Level]++;
if (Gbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT)
AslGbl_ExceptionCount[Level]++;
if (AslGbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT)
{
printf ("\nMaximum error count (%u) exceeded\n", ASL_MAX_ERROR_COUNT);
Gbl_SourceLine = 0;
Gbl_NextError = Gbl_ErrorLog;
AslGbl_SourceLine = 0;
AslGbl_NextError = AslGbl_ErrorLog;
CmCleanupAndExit ();
exit(1);
}
@ -1026,7 +1026,7 @@ AslIsExceptionIgnored (
ExceptionIgnored = AslIsExceptionDisabled (Level, MessageId);
ExceptionIgnored |= AslIsExceptionExpected (Level, MessageId);
return (Gbl_AllExceptionsDisabled || ExceptionIgnored);
return (AslGbl_AllExceptionsDisabled || ExceptionIgnored);
}
@ -1050,12 +1050,12 @@ AslCheckExpectedExceptions (
UINT8 i;
for (i = 0; i < Gbl_ExpectedMessagesIndex; ++i)
for (i = 0; i < AslGbl_ExpectedMessagesIndex; ++i)
{
if (!Gbl_ExpectedMessages[i].MessageReceived)
if (!AslGbl_ExpectedMessages[i].MessageReceived)
{
AslError (ASL_ERROR, ASL_MSG_EXCEPTION_NOT_RECEIVED, NULL,
Gbl_ExpectedMessages[i].MessageIdStr);
AslGbl_ExpectedMessages[i].MessageIdStr);
}
}
}
@ -1095,17 +1095,17 @@ AslExpectException (
/* Insert value into the global expected message array */
if (Gbl_ExpectedMessagesIndex >= ASL_MAX_EXPECTED_MESSAGES)
if (AslGbl_ExpectedMessagesIndex >= ASL_MAX_EXPECTED_MESSAGES)
{
printf ("Too many messages have been registered as expected (max %u)\n",
ASL_MAX_DISABLED_MESSAGES);
return (AE_LIMIT);
}
Gbl_ExpectedMessages[Gbl_ExpectedMessagesIndex].MessageId = MessageId;
Gbl_ExpectedMessages[Gbl_ExpectedMessagesIndex].MessageIdStr = MessageIdString;
Gbl_ExpectedMessages[Gbl_ExpectedMessagesIndex].MessageReceived = FALSE;
Gbl_ExpectedMessagesIndex++;
AslGbl_ExpectedMessages[AslGbl_ExpectedMessagesIndex].MessageId = MessageId;
AslGbl_ExpectedMessages[AslGbl_ExpectedMessagesIndex].MessageIdStr = MessageIdString;
AslGbl_ExpectedMessages[AslGbl_ExpectedMessagesIndex].MessageReceived = FALSE;
AslGbl_ExpectedMessagesIndex++;
return (AE_OK);
}
@ -1142,15 +1142,15 @@ AslDisableException (
/* Insert value into the global disabled message array */
if (Gbl_DisabledMessagesIndex >= ASL_MAX_DISABLED_MESSAGES)
if (AslGbl_DisabledMessagesIndex >= ASL_MAX_DISABLED_MESSAGES)
{
printf ("Too many messages have been disabled (max %u)\n",
ASL_MAX_DISABLED_MESSAGES);
return (AE_LIMIT);
}
Gbl_DisabledMessages[Gbl_DisabledMessagesIndex] = MessageId;
Gbl_DisabledMessagesIndex++;
AslGbl_DisabledMessages[AslGbl_DisabledMessagesIndex] = MessageId;
AslGbl_DisabledMessagesIndex++;
return (AE_OK);
}
@ -1181,13 +1181,13 @@ AslIsExceptionExpected (
/* Mark this exception as received */
EncodedMessageId = AeBuildFullExceptionCode (Level, MessageId);
for (i = 0; i < Gbl_ExpectedMessagesIndex; i++)
for (i = 0; i < AslGbl_ExpectedMessagesIndex; i++)
{
/* Simple implementation via fixed array */
if (EncodedMessageId == Gbl_ExpectedMessages[i].MessageId)
if (EncodedMessageId == AslGbl_ExpectedMessages[i].MessageId)
{
return (Gbl_ExpectedMessages[i].MessageReceived = TRUE);
return (AslGbl_ExpectedMessages[i].MessageReceived = TRUE);
}
}
@ -1225,7 +1225,7 @@ AslIsExceptionDisabled (
/* Check for global disable via -w1/-w2/-w3 options */
if (Level > Gbl_WarningLevel)
if (Level > AslGbl_WarningLevel)
{
return (TRUE);
}
@ -1239,11 +1239,11 @@ AslIsExceptionDisabled (
* the user (-vw option)
*/
EncodedMessageId = AeBuildFullExceptionCode (Level, MessageId);
for (i = 0; i < Gbl_DisabledMessagesIndex; i++)
for (i = 0; i < AslGbl_DisabledMessagesIndex; i++)
{
/* Simple implementation via fixed array */
if (EncodedMessageId == Gbl_DisabledMessages[i])
if (EncodedMessageId == AslGbl_DisabledMessages[i])
{
return (TRUE);
}
@ -1376,7 +1376,7 @@ AslCoreSubsystemError (
BOOLEAN Abort)
{
sprintf (MsgBuffer, "%s %s", AcpiFormatException (Status), ExtraMessage);
sprintf (AslGbl_MsgBuffer, "%s %s", AcpiFormatException (Status), ExtraMessage);
if (Op)
{
@ -1385,12 +1385,12 @@ AslCoreSubsystemError (
Op->Asl.LogicalLineNumber,
Op->Asl.LogicalByteOffset,
Op->Asl.Column,
Op->Asl.Filename, MsgBuffer);
Op->Asl.Filename, AslGbl_MsgBuffer);
}
else
{
AslCommonError (ASL_ERROR, ASL_MSG_CORE_EXCEPTION,
0, 0, 0, 0, NULL, MsgBuffer);
0, 0, 0, 0, NULL, AslGbl_MsgBuffer);
}
if (Abort)
@ -1419,11 +1419,11 @@ AslCompilererror (
const char *CompilerMessage)
{
Gbl_SyntaxError++;
AslGbl_SyntaxError++;
AslCommonError (ASL_ERROR, ASL_MSG_SYNTAX, Gbl_CurrentLineNumber,
Gbl_LogicalLineNumber, Gbl_CurrentLineOffset,
Gbl_CurrentColumn, Gbl_Files[ASL_FILE_INPUT].Filename,
AslCommonError (ASL_ERROR, ASL_MSG_SYNTAX, AslGbl_CurrentLineNumber,
AslGbl_LogicalLineNumber, AslGbl_CurrentLineOffset,
AslGbl_CurrentColumn, AslGbl_Files[ASL_FILE_INPUT].Filename,
ACPI_CAST_PTR (char, CompilerMessage));
return (0);

View File

@ -209,11 +209,11 @@ ExDoExternal (
ListOp->Asl.Child = Op;
ListOp->Asl.Next = NULL;
if (Gbl_ExternalsListHead)
if (AslGbl_ExternalsListHead)
{
/* Link new External to end of list */
Prev = Gbl_ExternalsListHead;
Prev = AslGbl_ExternalsListHead;
Next = Prev;
while (Next)
{
@ -225,7 +225,7 @@ ExDoExternal (
}
else
{
Gbl_ExternalsListHead = ListOp;
AslGbl_ExternalsListHead = ListOp;
}
}
@ -259,7 +259,7 @@ ExInsertArgCount (
CallName = AcpiNsGetNormalizedPathname (Op->Asl.Node, TRUE);
Next = Gbl_ExternalsListHead;
Next = AslGbl_ExternalsListHead;
while (Next)
{
ArgCount = 0;
@ -344,10 +344,10 @@ ExAmlExternalWalkBegin (
if (Op->Asl.ParseOpcode == PARSEOP_DEFINITION_BLOCK)
{
Gbl_ExternalsListHead = Op->Asl.Value.Arg;
AslGbl_ExternalsListHead = Op->Asl.Value.Arg;
}
if (!Gbl_ExternalsListHead)
if (!AslGbl_ExternalsListHead)
{
return (AE_OK);
}
@ -401,7 +401,7 @@ ExAmlExternalWalkEnd (
* multiple definition blocks in a single file/compile)
*/
ExMoveExternals (Op);
Gbl_ExternalsListHead = NULL;
AslGbl_ExternalsListHead = NULL;
}
return (AE_OK);
@ -439,14 +439,14 @@ ExMoveExternals (
UINT32 i;
if (!Gbl_ExternalsListHead)
if (!AslGbl_ExternalsListHead)
{
return;
}
/* Remove the External nodes from the tree */
NextOp = Gbl_ExternalsListHead;
NextOp = AslGbl_ExternalsListHead;
while (NextOp)
{
/*
@ -520,7 +520,7 @@ ExMoveExternals (
Prev->Asl.Next = ExternalOp->Asl.Next;
ExternalOp->Asl.Next = NULL;
ExternalOp->Asl.Parent = Gbl_ExternalsListHead;
ExternalOp->Asl.Parent = AslGbl_ExternalsListHead;
/* Point the External to the next in the list */
@ -536,7 +536,7 @@ ExMoveExternals (
* Loop again to remove MethodObj Externals for which
* a MethodCall was not found (dead external reference)
*/
Prev = Gbl_ExternalsListHead->Asl.Child;
Prev = AslGbl_ExternalsListHead->Asl.Child;
Next = Prev;
while (Next)
{
@ -548,9 +548,9 @@ ExMoveExternals (
{
if (Next == Prev)
{
Gbl_ExternalsListHead->Asl.Child = Next->Asl.Next;
AslGbl_ExternalsListHead->Asl.Child = Next->Asl.Next;
Next->Asl.Next = NULL;
Prev = Gbl_ExternalsListHead->Asl.Child;
Prev = AslGbl_ExternalsListHead->Asl.Child;
Next = Prev;
continue;
}
@ -569,32 +569,32 @@ ExMoveExternals (
/* If list is now empty, don't bother to make If (0) block */
if (!Gbl_ExternalsListHead->Asl.Child)
if (!AslGbl_ExternalsListHead->Asl.Child)
{
return;
}
/* Convert Gbl_ExternalsListHead parent to If(). */
Gbl_ExternalsListHead->Asl.ParseOpcode = PARSEOP_IF;
Gbl_ExternalsListHead->Asl.AmlOpcode = AML_IF_OP;
Gbl_ExternalsListHead->Asl.CompileFlags = OP_AML_PACKAGE;
UtSetParseOpName (Gbl_ExternalsListHead);
AslGbl_ExternalsListHead->Asl.ParseOpcode = PARSEOP_IF;
AslGbl_ExternalsListHead->Asl.AmlOpcode = AML_IF_OP;
AslGbl_ExternalsListHead->Asl.CompileFlags = OP_AML_PACKAGE;
UtSetParseOpName (AslGbl_ExternalsListHead);
/* Create a Zero op for the If predicate */
PredicateOp = TrAllocateOp (PARSEOP_ZERO);
PredicateOp->Asl.AmlOpcode = AML_ZERO_OP;
PredicateOp->Asl.Parent = Gbl_ExternalsListHead;
PredicateOp->Asl.Parent = AslGbl_ExternalsListHead;
PredicateOp->Asl.Child = NULL;
PredicateOp->Asl.Next = Gbl_ExternalsListHead->Asl.Child;
Gbl_ExternalsListHead->Asl.Child = PredicateOp;
PredicateOp->Asl.Next = AslGbl_ExternalsListHead->Asl.Child;
AslGbl_ExternalsListHead->Asl.Child = PredicateOp;
/* Set line numbers (for listings, etc.) */
Gbl_ExternalsListHead->Asl.LineNumber = 0;
Gbl_ExternalsListHead->Asl.LogicalLineNumber = 0;
AslGbl_ExternalsListHead->Asl.LineNumber = 0;
AslGbl_ExternalsListHead->Asl.LogicalLineNumber = 0;
PredicateOp->Asl.LineNumber = 0;
PredicateOp->Asl.LogicalLineNumber = 0;
@ -616,15 +616,15 @@ ExMoveExternals (
{
/* Definition Block is not empty */
Gbl_ExternalsListHead->Asl.Next = Next;
AslGbl_ExternalsListHead->Asl.Next = Next;
}
else
{
/* Definition Block is empty. */
Gbl_ExternalsListHead->Asl.Next = NULL;
AslGbl_ExternalsListHead->Asl.Next = NULL;
}
Prev->Asl.Next = Gbl_ExternalsListHead;
Gbl_ExternalsListHead->Asl.Parent = Prev->Asl.Parent;
Prev->Asl.Next = AslGbl_ExternalsListHead;
AslGbl_ExternalsListHead->Asl.Parent = Prev->Asl.Parent;
}

View File

@ -176,10 +176,10 @@ FlFileError (
UINT8 ErrorId)
{
sprintf (MsgBuffer, "\"%s\" (%s) - %s", Gbl_Files[FileId].Filename,
Gbl_Files[FileId].Description, strerror (errno));
sprintf (AslGbl_MsgBuffer, "\"%s\" (%s) - %s", AslGbl_Files[FileId].Filename,
AslGbl_Files[FileId].Description, strerror (errno));
AslCommonError (ASL_ERROR, ErrorId, 0, 0, 0, 0, NULL, MsgBuffer);
AslCommonError (ASL_ERROR, ErrorId, 0, 0, 0, 0, NULL, AslGbl_MsgBuffer);
}
@ -207,8 +207,8 @@ FlOpenFile (
FILE *File;
Gbl_Files[FileId].Filename = Filename;
Gbl_Files[FileId].Handle = NULL;
AslGbl_Files[FileId].Filename = Filename;
AslGbl_Files[FileId].Handle = NULL;
File = fopen (Filename, Mode);
if (!File)
@ -217,7 +217,7 @@ FlOpenFile (
AslAbort ();
}
Gbl_Files[FileId].Handle = File;
AslGbl_Files[FileId].Handle = File;
}
@ -241,7 +241,7 @@ FlGetFileSize (
UINT32 FileSize;
FileSize = CmGetFileSize (Gbl_Files[FileId].Handle);
FileSize = CmGetFileSize (AslGbl_Files[FileId].Handle);
if (FileSize == ACPI_UINT32_MAX)
{
AslAbort();
@ -277,10 +277,10 @@ FlReadFile (
/* Read and check for error */
Actual = fread (Buffer, 1, Length, Gbl_Files[FileId].Handle);
Actual = fread (Buffer, 1, Length, AslGbl_Files[FileId].Handle);
if (Actual < Length)
{
if (feof (Gbl_Files[FileId].Handle))
if (feof (AslGbl_Files[FileId].Handle))
{
/* End-of-file, just return error */
@ -321,19 +321,19 @@ FlWriteFile (
/* Write and check for error */
Actual = fwrite ((char *) Buffer, 1, Length, Gbl_Files[FileId].Handle);
Actual = fwrite ((char *) Buffer, 1, Length, AslGbl_Files[FileId].Handle);
if (Actual != Length)
{
FlFileError (FileId, ASL_MSG_WRITE);
AslAbort ();
}
if ((FileId == ASL_FILE_PREPROCESSOR) && Gbl_PreprocessorOutputFlag)
if ((FileId == ASL_FILE_PREPROCESSOR) && AslGbl_PreprocessorOutputFlag)
{
/* Duplicate the output to the user preprocessor (.i) file */
Actual = fwrite ((char *) Buffer, 1, Length,
Gbl_Files[ASL_FILE_PREPROCESSOR_USER].Handle);
AslGbl_Files[ASL_FILE_PREPROCESSOR_USER].Handle);
if (Actual != Length)
{
FlFileError (FileId, ASL_MSG_WRITE);
@ -369,7 +369,7 @@ FlPrintFile (
va_start (Args, Format);
Actual = vfprintf (Gbl_Files[FileId].Handle, Format, Args);
Actual = vfprintf (AslGbl_Files[FileId].Handle, Format, Args);
va_end (Args);
if (Actual == -1)
@ -379,7 +379,7 @@ FlPrintFile (
}
if ((FileId == ASL_FILE_PREPROCESSOR) &&
Gbl_PreprocessorOutputFlag)
AslGbl_PreprocessorOutputFlag)
{
/*
* Duplicate the output to the user preprocessor (.i) file,
@ -391,7 +391,7 @@ FlPrintFile (
}
va_start (Args, Format);
Actual = vfprintf (Gbl_Files[ASL_FILE_PREPROCESSOR_USER].Handle,
Actual = vfprintf (AslGbl_Files[ASL_FILE_PREPROCESSOR_USER].Handle,
Format, Args);
va_end (Args);
@ -426,7 +426,7 @@ FlSeekFile (
int Error;
Error = fseek (Gbl_Files[FileId].Handle, Offset, SEEK_SET);
Error = fseek (AslGbl_Files[FileId].Handle, Offset, SEEK_SET);
if (Error)
{
FlFileError (FileId, ASL_MSG_SEEK);
@ -454,12 +454,12 @@ FlCloseFile (
int Error;
if (!Gbl_Files[FileId].Handle)
if (!AslGbl_Files[FileId].Handle)
{
return;
}
Error = fclose (Gbl_Files[FileId].Handle);
Error = fclose (AslGbl_Files[FileId].Handle);
if (Error)
{
FlFileError (FileId, ASL_MSG_CLOSE);
@ -468,7 +468,7 @@ FlCloseFile (
/* Do not clear/free the filename string */
Gbl_Files[FileId].Handle = NULL;
AslGbl_Files[FileId].Handle = NULL;
return;
}
@ -489,7 +489,7 @@ void
FlDeleteFile (
UINT32 FileId)
{
ASL_FILE_INFO *Info = &Gbl_Files[FileId];
ASL_FILE_INFO *Info = &AslGbl_Files[FileId];
if (!Info->Filename)

View File

@ -188,9 +188,9 @@ FlSetLineNumber (
{
DbgPrint (ASL_PARSE_OUTPUT, "\n#line: New line number %u (old %u)\n",
LineNumber, Gbl_LogicalLineNumber);
LineNumber, AslGbl_LogicalLineNumber);
Gbl_CurrentLineNumber = LineNumber;
AslGbl_CurrentLineNumber = LineNumber;
}
@ -212,11 +212,11 @@ FlSetFilename (
{
DbgPrint (ASL_PARSE_OUTPUT, "\n#line: New filename %s (old %s)\n",
Filename, Gbl_Files[ASL_FILE_INPUT].Filename);
Filename, AslGbl_Files[ASL_FILE_INPUT].Filename);
/* No need to free any existing filename */
Gbl_Files[ASL_FILE_INPUT].Filename = Filename;
AslGbl_Files[ASL_FILE_INPUT].Filename = Filename;
}
@ -257,8 +257,9 @@ FlAddIncludeDirectory (
NeedsSeparator = 1;
}
NewDir = ACPI_ALLOCATE_ZEROED (sizeof (ASL_INCLUDE_DIR));
NewDir->Dir = ACPI_ALLOCATE (DirLength + 1 + NeedsSeparator);
NewDir = ACPI_CAST_PTR (ASL_INCLUDE_DIR,
UtLocalCacheCalloc (sizeof (ASL_INCLUDE_DIR)));
NewDir->Dir = UtLocalCacheCalloc (DirLength + 1 + NeedsSeparator);
strcpy (NewDir->Dir, Dir);
if (NeedsSeparator)
{
@ -269,7 +270,7 @@ FlAddIncludeDirectory (
* Preserve command line ordering of -I options by adding new elements
* at the end of the list
*/
NextDir = Gbl_IncludeDirList;
NextDir = AslGbl_IncludeDirList;
while (NextDir)
{
PrevDir = NextDir;
@ -282,7 +283,7 @@ FlAddIncludeDirectory (
}
else
{
Gbl_IncludeDirList = NewDir;
AslGbl_IncludeDirList = NewDir;
}
}
@ -441,19 +442,19 @@ FlOpenIncludeWithPrefix (
* Note: DtGetNextLine strips/ignores comments.
* Save current line number since DtGetNextLine modifies it.
*/
Gbl_CurrentLineNumber--;
OriginalLineNumber = Gbl_CurrentLineNumber;
AslGbl_CurrentLineNumber--;
OriginalLineNumber = AslGbl_CurrentLineNumber;
while (DtGetNextLine (IncludeFile, DT_ALLOW_MULTILINE_QUOTES) != ASL_EOF)
{
if (Gbl_CurrentLineBuffer[0] == '#')
if (AslGbl_CurrentLineBuffer[0] == '#')
{
AslError (ASL_ERROR, ASL_MSG_INCLUDE_FILE,
Op, "use #include instead");
}
}
Gbl_CurrentLineNumber = OriginalLineNumber;
AslGbl_CurrentLineNumber = OriginalLineNumber;
/* Must seek back to the start of the file */
@ -491,9 +492,9 @@ FlOpenIncludeFile (
if (!Op)
{
AslCommonError (ASL_ERROR, ASL_MSG_INCLUDE_FILE_OPEN,
Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
Gbl_InputByteCount, Gbl_CurrentColumn,
Gbl_Files[ASL_FILE_INPUT].Filename, " - Null parse node");
AslGbl_CurrentLineNumber, AslGbl_LogicalLineNumber,
AslGbl_InputByteCount, AslGbl_CurrentColumn,
AslGbl_Files[ASL_FILE_INPUT].Filename, " - Null parse node");
return;
}
@ -504,7 +505,7 @@ FlOpenIncludeFile (
*/
AslResetCurrentLineBuffer ();
FlPrintFile (ASL_FILE_SOURCE_OUTPUT, "\n");
Gbl_CurrentLineOffset++;
AslGbl_CurrentLineOffset++;
/* Attempt to open the include file */
@ -532,7 +533,7 @@ FlOpenIncludeFile (
* Construct the file pathname from the global directory name.
*/
IncludeFile = FlOpenIncludeWithPrefix (
Gbl_DirectoryPath, Op, Op->Asl.Value.String);
AslGbl_DirectoryPath, Op, Op->Asl.Value.String);
if (IncludeFile)
{
return;
@ -542,7 +543,7 @@ FlOpenIncludeFile (
* Second, search for the file within the (possibly multiple) directories
* specified by the -I option on the command line.
*/
NextDir = Gbl_IncludeDirList;
NextDir = AslGbl_IncludeDirList;
while (NextDir)
{
IncludeFile = FlOpenIncludeWithPrefix (
@ -558,8 +559,8 @@ FlOpenIncludeFile (
/* We could not open the include file after trying very hard */
ErrorExit:
sprintf (MsgBuffer, "%s, %s", Op->Asl.Value.String, strerror (errno));
AslError (ASL_ERROR, ASL_MSG_INCLUDE_FILE_OPEN, Op, MsgBuffer);
sprintf (AslGbl_MsgBuffer, "%s, %s", Op->Asl.Value.String, strerror (errno));
AslError (ASL_ERROR, ASL_MSG_INCLUDE_FILE_OPEN, Op, AslGbl_MsgBuffer);
}
@ -586,7 +587,7 @@ FlOpenInputFile (
/* Open the input ASL file, text mode */
FlOpenFile (ASL_FILE_INPUT, InputFilename, "rt");
AslCompilerin = Gbl_Files[ASL_FILE_INPUT].Handle;
AslCompilerin = AslGbl_Files[ASL_FILE_INPUT].Handle;
return (AE_OK);
}
@ -614,7 +615,7 @@ FlOpenAmlOutputFile (
/* Output filename usually comes from the ASL itself */
Filename = Gbl_Files[ASL_FILE_AML_OUTPUT].Filename;
Filename = AslGbl_Files[ASL_FILE_AML_OUTPUT].Filename;
if (!Filename)
{
/* Create the output AML filename */
@ -633,7 +634,7 @@ FlOpenAmlOutputFile (
return (AE_ERROR);
}
Gbl_Files[ASL_FILE_AML_OUTPUT].Filename = Filename;
AslGbl_Files[ASL_FILE_AML_OUTPUT].Filename = Filename;
}
/* Open the output AML file in binary mode */
@ -665,7 +666,7 @@ FlOpenMiscOutputFiles (
/* Create/Open a map file if requested */
if (Gbl_MapfileFlag)
if (AslGbl_MapfileFlag)
{
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_MAP);
if (!Filename)
@ -685,14 +686,14 @@ FlOpenMiscOutputFiles (
/* All done for disassembler */
if (Gbl_FileType == ASL_INPUT_TYPE_BINARY_ACPI_TABLE)
if (AslGbl_FileType == ASL_INPUT_TYPE_BINARY_ACPI_TABLE)
{
return (AE_OK);
}
/* Create/Open a hex output file if asked */
if (Gbl_HexOutputFlag)
if (AslGbl_HexOutputFlag)
{
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_HEX_DUMP);
if (!Filename)
@ -712,7 +713,7 @@ FlOpenMiscOutputFiles (
/* Create/Open a debug output file if asked */
if (Gbl_DebugFlag)
if (AslGbl_DebugFlag)
{
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_DEBUG);
if (!Filename)
@ -724,11 +725,11 @@ FlOpenMiscOutputFiles (
/* Open the debug file as STDERR, text mode */
Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Filename = Filename;
Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle =
AslGbl_Files[ASL_FILE_DEBUG_OUTPUT].Filename = Filename;
AslGbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle =
freopen (Filename, "w+t", stderr);
if (!Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle)
if (!AslGbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle)
{
/*
* A problem with freopen is that on error, we no longer
@ -748,7 +749,7 @@ FlOpenMiscOutputFiles (
/* Create/Open a cross-reference output file if asked */
if (Gbl_CrossReferenceOutput)
if (AslGbl_CrossReferenceOutput)
{
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_XREF);
if (!Filename)
@ -766,7 +767,7 @@ FlOpenMiscOutputFiles (
/* Create/Open a listing output file if asked */
if (Gbl_ListingFlag)
if (AslGbl_ListingFlag)
{
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_LISTING);
if (!Filename)
@ -786,7 +787,7 @@ FlOpenMiscOutputFiles (
/* Create the preprocessor output temp file if preprocessor enabled */
if (Gbl_PreprocessFlag)
if (AslGbl_PreprocessFlag)
{
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_PREPROCESSOR);
if (!Filename)
@ -803,7 +804,7 @@ FlOpenMiscOutputFiles (
* Create the "user" preprocessor output file if -li flag set.
* Note, this file contains no embedded #line directives.
*/
if (Gbl_PreprocessorOutputFlag)
if (AslGbl_PreprocessorOutputFlag)
{
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_PREPROC_USER);
if (!Filename)
@ -818,7 +819,7 @@ FlOpenMiscOutputFiles (
/* All done for data table compiler */
if (Gbl_FileType == ASL_INPUT_TYPE_ASCII_DATA)
if (AslGbl_FileType == ASL_INPUT_TYPE_ASCII_DATA)
{
return (AE_OK);
}
@ -842,11 +843,11 @@ FlOpenMiscOutputFiles (
/*
// TBD: TEMP
// AslCompilerin = Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Handle;
// AslCompilerin = AslGbl_Files[ASL_FILE_SOURCE_OUTPUT].Handle;
*/
/* Create/Open a assembly code source output file if asked */
if (Gbl_AsmOutputFlag)
if (AslGbl_AsmOutputFlag)
{
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_ASM_SOURCE);
if (!Filename)
@ -866,7 +867,7 @@ FlOpenMiscOutputFiles (
/* Create/Open a C code source output file if asked */
if (Gbl_C_OutputFlag)
if (AslGbl_C_OutputFlag)
{
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_C_SOURCE);
if (!Filename)
@ -887,7 +888,7 @@ FlOpenMiscOutputFiles (
/* Create/Open a C code source output file for the offset table if asked */
if (Gbl_C_OffsetTableFlag)
if (AslGbl_C_OffsetTableFlag)
{
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_C_OFFSET);
if (!Filename)
@ -908,7 +909,7 @@ FlOpenMiscOutputFiles (
/* Create/Open a assembly include output file if asked */
if (Gbl_AsmIncludeOutputFlag)
if (AslGbl_AsmIncludeOutputFlag)
{
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_ASM_INCLUDE);
if (!Filename)
@ -928,7 +929,7 @@ FlOpenMiscOutputFiles (
/* Create/Open a C include output file if asked */
if (Gbl_C_IncludeOutputFlag)
if (AslGbl_C_IncludeOutputFlag)
{
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_C_INCLUDE);
if (!Filename)
@ -949,7 +950,7 @@ FlOpenMiscOutputFiles (
/* Create a namespace output file if asked */
if (Gbl_NsOutputFlag)
if (AslGbl_NsOutputFlag)
{
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_NAMESPACE);
if (!Filename)
@ -986,7 +987,7 @@ FlOpenMiscOutputFiles (
AslCompilerSignon (ASL_FILE_CONV_DEBUG_OUTPUT);
AslCompilerFileHeader (ASL_FILE_CONV_DEBUG_OUTPUT);
AcpiGbl_ConvDebugFile = Gbl_Files[ASL_FILE_CONV_DEBUG_OUTPUT].Handle;
AcpiGbl_ConvDebugFile = AslGbl_Files[ASL_FILE_CONV_DEBUG_OUTPUT].Handle;
}
return (AE_OK);
@ -1023,40 +1024,40 @@ FlParseInputPathname (
/* Get the path to the input filename's directory */
Gbl_DirectoryPath = strdup (InputFilename);
if (!Gbl_DirectoryPath)
AslGbl_DirectoryPath = strdup (InputFilename);
if (!AslGbl_DirectoryPath)
{
return (AE_NO_MEMORY);
}
Substring = strrchr (Gbl_DirectoryPath, '\\');
Substring = strrchr (AslGbl_DirectoryPath, '\\');
if (!Substring)
{
Substring = strrchr (Gbl_DirectoryPath, '/');
Substring = strrchr (AslGbl_DirectoryPath, '/');
if (!Substring)
{
Substring = strrchr (Gbl_DirectoryPath, ':');
Substring = strrchr (AslGbl_DirectoryPath, ':');
}
}
if (!Substring)
{
Gbl_DirectoryPath[0] = 0;
if (Gbl_UseDefaultAmlFilename)
AslGbl_DirectoryPath[0] = 0;
if (AslGbl_UseDefaultAmlFilename)
{
Gbl_OutputFilenamePrefix = strdup (InputFilename);
AslGbl_OutputFilenamePrefix = strdup (InputFilename);
}
}
else
{
if (Gbl_UseDefaultAmlFilename)
if (AslGbl_UseDefaultAmlFilename)
{
Gbl_OutputFilenamePrefix = strdup (Substring + 1);
AslGbl_OutputFilenamePrefix = strdup (Substring + 1);
}
*(Substring+1) = 0;
}
UtConvertBackslashes (Gbl_OutputFilenamePrefix);
UtConvertBackslashes (AslGbl_OutputFilenamePrefix);
return (AE_OK);
}
#endif

View File

@ -795,7 +795,7 @@ TrInstallReducedConstant (
ACPI_PARSE_OBJECT *DataOp;
TotalFolds++;
AslGbl_TotalFolds++;
AslError (ASL_OPTIMIZATION, ASL_MSG_CONSTANT_FOLDED, Op,
Op->Asl.ParseOpName);

View File

@ -169,11 +169,11 @@
#ifdef _DECLARE_GLOBALS
UINT32 Gbl_ExceptionCount[ASL_NUM_REPORT_LEVELS] = {0,0,0,0,0,0};
UINT32 AslGbl_ExceptionCount[ASL_NUM_REPORT_LEVELS] = {0,0,0,0,0,0};
/* Table below must match ASL_FILE_TYPES in asltypes.h */
ASL_FILE_INFO Gbl_Files [ASL_NUM_FILES] =
ASL_FILE_INFO AslGbl_Files [ASL_NUM_FILES] =
{
{NULL, NULL, "stdout: ", "Standard Output"},
{NULL, NULL, "stderr: ", "Standard Error"},
@ -198,7 +198,7 @@ ASL_FILE_INFO Gbl_Files [ASL_NUM_FILES] =
/* Table below must match the defines with the same names in actypes.h */
const char *Gbl_OpFlagNames[ACPI_NUM_OP_FLAGS] =
const char *AslGbl_OpFlagNames[ACPI_NUM_OP_FLAGS] =
{
"OP_VISITED",
"OP_AML_PACKAGE",
@ -225,9 +225,9 @@ const char *Gbl_OpFlagNames[ACPI_NUM_OP_FLAGS] =
};
#else
extern UINT32 Gbl_ExceptionCount[ASL_NUM_REPORT_LEVELS];
extern ASL_FILE_INFO Gbl_Files [ASL_NUM_FILES];
extern const char *Gbl_OpFlagNames[ACPI_NUM_OP_FLAGS];
extern UINT32 AslGbl_ExceptionCount[ASL_NUM_REPORT_LEVELS];
extern ASL_FILE_INFO AslGbl_Files [ASL_NUM_FILES];
extern const char *AslGbl_OpFlagNames[ACPI_NUM_OP_FLAGS];
#endif
@ -261,69 +261,68 @@ extern int AslCompilerdebug;
/* Source code buffers and pointers for error reporting */
ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_CurrentLineBuffer, NULL);
ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_LineBufPtr, NULL);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_LineBufferSize, ASL_DEFAULT_LINE_BUFFER_SIZE);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_CurrentColumn, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_CurrentLineNumber, 1);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_LogicalLineNumber, 1);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_CurrentLineOffset, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_OriginalInputFileSize, 0);
ASL_EXTERN UINT8 ASL_INIT_GLOBAL (Gbl_SyntaxError, 0);
ASL_EXTERN char ASL_INIT_GLOBAL (*AslGbl_CurrentLineBuffer, NULL);
ASL_EXTERN char ASL_INIT_GLOBAL (*AslGbl_LineBufPtr, NULL);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_LineBufferSize, ASL_DEFAULT_LINE_BUFFER_SIZE);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_CurrentColumn, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_CurrentLineNumber, 1);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_LogicalLineNumber, 1);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_CurrentLineOffset, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_OriginalInputFileSize, 0);
ASL_EXTERN UINT8 ASL_INIT_GLOBAL (AslGbl_SyntaxError, 0);
/* Exception reporting */
ASL_EXTERN ASL_ERROR_MSG ASL_INIT_GLOBAL (*Gbl_ErrorLog,NULL);
ASL_EXTERN ASL_ERROR_MSG ASL_INIT_GLOBAL (*Gbl_NextError,NULL);
ASL_EXTERN ASL_ERROR_MSG ASL_INIT_GLOBAL (*AslGbl_ErrorLog,NULL);
ASL_EXTERN ASL_ERROR_MSG ASL_INIT_GLOBAL (*AslGbl_NextError,NULL);
/* Option flags */
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DoCompile, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DoSignon, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_PreprocessOnly, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_PreprocessFlag, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DisassembleAll, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_UseDefaultAmlFilename, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_MapfileFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_NsOutputFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_PreprocessorOutputFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_KeepPreprocessorTempFile, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DebugFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_CrossReferenceOutput, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_AsmOutputFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_C_OutputFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_C_OffsetTableFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_AsmIncludeOutputFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_C_IncludeOutputFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_ListingFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_IgnoreErrors, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_SourceOutputFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_ParseOnlyFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_CompileTimesFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_FoldConstants, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_VerboseErrors, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_NoErrors, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_WarningsAsErrors, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_NoResourceChecking, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_IntegerOptimizationFlag, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_ReferenceOptimizationFlag, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DisplayRemarks, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DisplayWarnings, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DisplayOptimizations, FALSE);
ASL_EXTERN UINT8 ASL_INIT_GLOBAL (Gbl_WarningLevel, ASL_WARNING);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_UseOriginalCompilerId, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_VerboseTemplates, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DoTemplates, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_CompileGeneric, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_AllExceptionsDisabled, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_PruneParseTree, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DoTypechecking, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_EnableReferenceTypechecking, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DoExternals, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DoExternalsInPlace, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DoAslConversion, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_OptimizeTrivialParseNodes, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DoCompile, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DoSignon, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_PreprocessOnly, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_PreprocessFlag, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DisassembleAll, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_UseDefaultAmlFilename, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_MapfileFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_NsOutputFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_PreprocessorOutputFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_KeepPreprocessorTempFile, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DebugFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_CrossReferenceOutput, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_AsmOutputFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_C_OutputFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_C_OffsetTableFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_AsmIncludeOutputFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_C_IncludeOutputFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_ListingFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_IgnoreErrors, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_SourceOutputFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_ParseOnlyFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_CompileTimesFlag, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_FoldConstants, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_VerboseErrors, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_NoErrors, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_WarningsAsErrors, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_NoResourceChecking, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_IntegerOptimizationFlag, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_ReferenceOptimizationFlag, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DisplayRemarks, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DisplayWarnings, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DisplayOptimizations, FALSE);
ASL_EXTERN UINT8 ASL_INIT_GLOBAL (AslGbl_WarningLevel, ASL_WARNING);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_UseOriginalCompilerId, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_VerboseTemplates, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DoTemplates, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_CompileGeneric, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_AllExceptionsDisabled, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_PruneParseTree, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DoTypechecking, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_EnableReferenceTypechecking, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DoExternals, TRUE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DoExternalsInPlace, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_DoAslConversion, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_OptimizeTrivialParseNodes, TRUE);
#define HEX_OUTPUT_NONE 0
@ -331,102 +330,95 @@ ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_OptimizeTrivialParseNod
#define HEX_OUTPUT_ASM 2
#define HEX_OUTPUT_ASL 3
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_HexOutputFlag, HEX_OUTPUT_NONE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_HexOutputFlag, HEX_OUTPUT_NONE);
/* Files */
ASL_EXTERN char *Gbl_DirectoryPath;
ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_IncludeFilename, NULL);
ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_OutputFilenamePrefix, NULL);
ASL_EXTERN ASL_INCLUDE_DIR ASL_INIT_GLOBAL (*Gbl_IncludeDirList, NULL);
ASL_EXTERN char *Gbl_CurrentInputFilename;
ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_ExternalRefFilename, NULL);
ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_PreviousIncludeFilename, NULL);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_HasIncludeFiles, FALSE);
ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (AslGbl_HasIncludeFiles, FALSE);
ASL_EXTERN char *AslGbl_DirectoryPath;
ASL_EXTERN char *AslGbl_CurrentInputFilename;
ASL_EXTERN char ASL_INIT_GLOBAL (*AslGbl_IncludeFilename, NULL);
ASL_EXTERN char ASL_INIT_GLOBAL (*AslGbl_OutputFilenamePrefix, NULL);
ASL_EXTERN ASL_INCLUDE_DIR ASL_INIT_GLOBAL (*AslGbl_IncludeDirList, NULL);
ASL_EXTERN char ASL_INIT_GLOBAL (*AslGbl_ExternalRefFilename, NULL);
ASL_EXTERN char ASL_INIT_GLOBAL (*AslGbl_PreviousIncludeFilename, NULL);
/* Statistics */
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_InputByteCount, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_InputFieldCount, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_NsLookupCount, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (TotalKeywords, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (TotalNamedObjects, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (TotalExecutableOpcodes, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (TotalParseNodes, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (TotalMethods, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (TotalAllocations, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (TotalAllocated, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (TotalFolds, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_InputByteCount, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_InputFieldCount, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_NsLookupCount, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_TotalKeywords, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_TotalNamedObjects, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_TotalExecutableOpcodes, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_TotalParseNodes, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_TotalMethods, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_TotalAllocations, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_TotalAllocated, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_TotalFolds, 0);
/* Local caches */
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_ParseOpCount, 0);
ASL_EXTERN ASL_CACHE_INFO ASL_INIT_GLOBAL (*Gbl_ParseOpCacheList, NULL);
ASL_EXTERN ACPI_PARSE_OBJECT ASL_INIT_GLOBAL (*Gbl_ParseOpCacheNext, NULL);
ASL_EXTERN ACPI_PARSE_OBJECT ASL_INIT_GLOBAL (*Gbl_ParseOpCacheLast, NULL);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_ParseOpCount, 0);
ASL_EXTERN ASL_CACHE_INFO ASL_INIT_GLOBAL (*AslGbl_ParseOpCacheList, NULL);
ASL_EXTERN ACPI_PARSE_OBJECT ASL_INIT_GLOBAL (*AslGbl_ParseOpCacheNext, NULL);
ASL_EXTERN ACPI_PARSE_OBJECT ASL_INIT_GLOBAL (*AslGbl_ParseOpCacheLast, NULL);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_StringCount, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_StringSize, 0);
ASL_EXTERN ASL_CACHE_INFO ASL_INIT_GLOBAL (*Gbl_StringCacheList, NULL);
ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_StringCacheNext, NULL);
ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_StringCacheLast, NULL);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_StringCount, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_StringSize, 0);
ASL_EXTERN ASL_CACHE_INFO ASL_INIT_GLOBAL (*AslGbl_StringCacheList, NULL);
ASL_EXTERN char ASL_INIT_GLOBAL (*AslGbl_StringCacheNext, NULL);
ASL_EXTERN char ASL_INIT_GLOBAL (*AslGbl_StringCacheLast, NULL);
/* Map file */
ASL_EXTERN ACPI_GPIO_INFO ASL_INIT_GLOBAL (*Gbl_GpioList, NULL);
ASL_EXTERN ACPI_SERIAL_INFO ASL_INIT_GLOBAL (*Gbl_SerialList, NULL);
ASL_EXTERN ACPI_GPIO_INFO ASL_INIT_GLOBAL (*AslGbl_GpioList, NULL);
ASL_EXTERN ACPI_SERIAL_INFO ASL_INIT_GLOBAL (*AslGbl_SerialList, NULL);
/* Misc */
ASL_EXTERN UINT8 ASL_INIT_GLOBAL (Gbl_RevisionOverride, 0);
ASL_EXTERN UINT8 ASL_INIT_GLOBAL (Gbl_TempCount, 0);
ASL_EXTERN ACPI_PARSE_OBJECT ASL_INIT_GLOBAL (*Gbl_ParseTreeRoot, NULL);
ASL_EXTERN ACPI_PARSE_OBJECT ASL_INIT_GLOBAL (*Gbl_ExternalsListHead, NULL);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_TableLength, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_SourceLine, 0);
ASL_EXTERN ASL_LISTING_NODE ASL_INIT_GLOBAL (*Gbl_ListingNode, NULL);
ASL_EXTERN UINT8 ASL_INIT_GLOBAL (Gbl_FileType, 0);
ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_Signature, NULL);
ASL_EXTERN UINT8 ASL_INIT_GLOBAL (AslGbl_RevisionOverride, 0);
ASL_EXTERN UINT8 ASL_INIT_GLOBAL (AslGbl_TempCount, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_TableLength, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_SourceLine, 0);
ASL_EXTERN UINT8 ASL_INIT_GLOBAL (AslGbl_FileType, 0);
ASL_EXTERN char ASL_INIT_GLOBAL (*AslGbl_Signature, NULL);
ASL_EXTERN ACPI_PARSE_OBJECT ASL_INIT_GLOBAL (*AslGbl_ParseTreeRoot, NULL);
ASL_EXTERN ACPI_PARSE_OBJECT ASL_INIT_GLOBAL (*AslGbl_ExternalsListHead, NULL);
ASL_EXTERN ASL_LISTING_NODE ASL_INIT_GLOBAL (*AslGbl_ListingNode, NULL);
ASL_EXTERN ACPI_PARSE_OBJECT *AslGbl_FirstLevelInsertionNode;
ASL_EXTERN ACPI_PARSE_OBJECT *Gbl_FirstLevelInsertionNode;
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_CurrentHexColumn, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_CurrentAmlOffset, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_CurrentLine, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_DisabledMessagesIndex, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_ExpectedMessagesIndex, 0);
ASL_EXTERN UINT8 ASL_INIT_GLOBAL (Gbl_HexBytesWereWritten, FALSE);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_NumNamespaceObjects, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (Gbl_ReservedMethods, 0);
ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_TableSignature, "NO_SIG");
ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_TableId, "NO_ID");
ASL_EXTERN UINT8 ASL_INIT_GLOBAL (Gbl_PruneDepth, 0);
ASL_EXTERN UINT16 ASL_INIT_GLOBAL (Gbl_PruneType, 0);
ASL_EXTERN ASL_FILE_NODE ASL_INIT_GLOBAL (*Gbl_IncludeFileStack, NULL);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_CurrentHexColumn, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_CurrentAmlOffset, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_CurrentLine, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_DisabledMessagesIndex, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_ExpectedMessagesIndex, 0);
ASL_EXTERN UINT8 ASL_INIT_GLOBAL (AslGbl_HexBytesWereWritten, FALSE);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_NumNamespaceObjects, 0);
ASL_EXTERN UINT32 ASL_INIT_GLOBAL (AslGbl_ReservedMethods, 0);
ASL_EXTERN UINT8 ASL_INIT_GLOBAL (AslGbl_PruneDepth, 0);
ASL_EXTERN UINT16 ASL_INIT_GLOBAL (AslGbl_PruneType, 0);
ASL_EXTERN ASL_FILE_NODE ASL_INIT_GLOBAL (*AslGbl_IncludeFileStack, NULL);
ASL_EXTERN char ASL_INIT_GLOBAL (*AslGbl_TableSignature, "NO_SIG");
ASL_EXTERN char ASL_INIT_GLOBAL (*AslGbl_TableId, "NO_ID");
/* Specific to the -q option */
ASL_EXTERN ASL_COMMENT_STATE Gbl_CommentState;
ASL_EXTERN ASL_COMMENT_STATE AslGbl_CommentState;
/*
* Determines if an inline comment should be saved in the InlineComment or NodeEndComment
* field of ACPI_PARSE_OBJECT.
*/
ASL_EXTERN ACPI_COMMENT_NODE ASL_INIT_GLOBAL (*Gbl_CommentListHead, NULL);
ASL_EXTERN ACPI_COMMENT_NODE ASL_INIT_GLOBAL (*Gbl_CommentListTail, NULL);
ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_InlineCommentBuffer, NULL);
ASL_EXTERN ACPI_COMMENT_NODE ASL_INIT_GLOBAL (*AslGbl_CommentListHead, NULL);
ASL_EXTERN ACPI_COMMENT_NODE ASL_INIT_GLOBAL (*AslGbl_CommentListTail, NULL);
ASL_EXTERN char ASL_INIT_GLOBAL (*AslGbl_InlineCommentBuffer, NULL);
/* Static structures */
ASL_EXTERN ASL_ANALYSIS_WALK_INFO AnalysisWalkInfo;
ASL_EXTERN ACPI_TABLE_HEADER TableHeader;
ASL_EXTERN ASL_ANALYSIS_WALK_INFO AslGbl_AnalysisWalkInfo;
ASL_EXTERN ACPI_TABLE_HEADER AslGbl_TableHeader;
/* Event timing */
@ -437,12 +429,12 @@ ASL_EXTERN UINT8 AslGbl_NamespaceEvent;
/* Scratch buffers */
ASL_EXTERN UINT8 Gbl_AmlBuffer[HEX_LISTING_LINE_SIZE];
ASL_EXTERN char MsgBuffer[ASL_MSG_BUFFER_SIZE];
ASL_EXTERN char StringBuffer[ASL_STRING_BUFFER_SIZE];
ASL_EXTERN char StringBuffer2[ASL_STRING_BUFFER_SIZE];
ASL_EXTERN UINT32 Gbl_DisabledMessages[ASL_MAX_DISABLED_MESSAGES];
ASL_EXTERN ASL_EXPECTED_MESSAGE Gbl_ExpectedMessages[ASL_MAX_EXPECTED_MESSAGES];
ASL_EXTERN UINT8 AslGbl_AmlBuffer[HEX_LISTING_LINE_SIZE];
ASL_EXTERN char AslGbl_MsgBuffer[ASL_MSG_BUFFER_SIZE];
ASL_EXTERN char AslGbl_StringBuffer[ASL_STRING_BUFFER_SIZE];
ASL_EXTERN char AslGbl_StringBuffer2[ASL_STRING_BUFFER_SIZE];
ASL_EXTERN UINT32 AslGbl_DisabledMessages[ASL_MAX_DISABLED_MESSAGES];
ASL_EXTERN ASL_EXPECTED_MESSAGE AslGbl_ExpectedMessages[ASL_MAX_EXPECTED_MESSAGES];
#endif /* __ASLGLOBAL_H */

View File

@ -196,7 +196,7 @@ HxDoHexOutput (
void)
{
switch (Gbl_HexOutputFlag)
switch (AslGbl_HexOutputFlag)
{
case HEX_OUTPUT_C:
@ -242,9 +242,9 @@ HxReadAmlOutputFile (
Actual = fread (Buffer, 1, HEX_TABLE_LINE_SIZE,
Gbl_Files[ASL_FILE_AML_OUTPUT].Handle);
AslGbl_Files[ASL_FILE_AML_OUTPUT].Handle);
if (ferror (Gbl_Files[ASL_FILE_AML_OUTPUT].Handle))
if (ferror (AslGbl_Files[ASL_FILE_AML_OUTPUT].Handle))
{
FlFileError (ASL_FILE_AML_OUTPUT, ASL_MSG_READ);
AslAbort ();
@ -285,7 +285,7 @@ HxDoHexOutputC (
/* Obtain the file basename (filename with no extension) */
FileBasename = FlGetFileBasename (Gbl_Files [ASL_FILE_HEX_OUTPUT].Filename);
FileBasename = FlGetFileBasename (AslGbl_Files [ASL_FILE_HEX_OUTPUT].Filename);
/* Get AML size, seek back to start */

View File

@ -166,8 +166,8 @@ AccessAttribKeyword
| PARSEOP_ACCESSATTRIB_SND_RCV {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_SND_RCV);}
| PARSEOP_ACCESSATTRIB_WORD {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_WORD);}
| PARSEOP_ACCESSATTRIB_WORD_CALL {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_WORD_CALL);}
| PARSEOP_ACCESSATTRIB_MULTIBYTE
PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_MULTIBYTE);}
| PARSEOP_ACCESSATTRIB_BYTES
PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_BYTES);}
ByteConst
PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
| PARSEOP_ACCESSATTRIB_RAW_BYTES

View File

@ -446,7 +446,7 @@ CgGenerateAmlLengths (
{
case PARSEOP_DEFINITION_BLOCK:
Gbl_TableLength = sizeof (ACPI_TABLE_HEADER) + Op->Asl.AmlSubtreeLength;
AslGbl_TableLength = sizeof (ACPI_TABLE_HEADER) + Op->Asl.AmlSubtreeLength;
break;
case PARSEOP_NAMESEG:
@ -519,7 +519,7 @@ CgGenerateAmlLengths (
case PARSEOP_EXTERNAL:
if (Gbl_DoExternals == TRUE)
if (AslGbl_DoExternals == TRUE)
{
CgGenerateAmlOpcodeLength (Op);
}
@ -568,6 +568,6 @@ LnAdjustLengthToRoot (
/* Adjust the global table length */
Gbl_TableLength -= LengthDelta;
AslGbl_TableLength -= LengthDelta;
}
#endif

View File

@ -205,32 +205,32 @@ LsDoListings (
void)
{
if (Gbl_C_OutputFlag)
if (AslGbl_C_OutputFlag)
{
LsGenerateListing (ASL_FILE_C_SOURCE_OUTPUT);
}
if (Gbl_ListingFlag)
if (AslGbl_ListingFlag)
{
LsGenerateListing (ASL_FILE_LISTING_OUTPUT);
}
if (Gbl_AsmOutputFlag)
if (AslGbl_AsmOutputFlag)
{
LsGenerateListing (ASL_FILE_ASM_SOURCE_OUTPUT);
}
if (Gbl_C_IncludeOutputFlag)
if (AslGbl_C_IncludeOutputFlag)
{
LsGenerateListing (ASL_FILE_C_INCLUDE_OUTPUT);
}
if (Gbl_AsmIncludeOutputFlag)
if (AslGbl_AsmIncludeOutputFlag)
{
LsGenerateListing (ASL_FILE_ASM_INCLUDE_OUTPUT);
}
if (Gbl_C_OffsetTableFlag)
if (AslGbl_C_OffsetTableFlag)
{
LsGenerateListing (ASL_FILE_C_OFFSET_OUTPUT);
}
@ -259,19 +259,19 @@ LsGenerateListing (
FlSeekFile (ASL_FILE_SOURCE_OUTPUT, 0);
FlSeekFile (ASL_FILE_AML_OUTPUT, 0);
Gbl_SourceLine = 0;
Gbl_CurrentHexColumn = 0;
LsPushNode (Gbl_Files[ASL_FILE_INPUT].Filename);
AslGbl_SourceLine = 0;
AslGbl_CurrentHexColumn = 0;
LsPushNode (AslGbl_Files[ASL_FILE_INPUT].Filename);
if (FileId == ASL_FILE_C_OFFSET_OUTPUT)
{
Gbl_CurrentAmlOffset = 0;
AslGbl_CurrentAmlOffset = 0;
/* Offset table file has a special header and footer */
LsDoOffsetTableHeader (FileId);
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
LsAmlOffsetWalk, NULL, (void *) ACPI_TO_POINTER (FileId));
LsDoOffsetTableFooter (FileId);
return;
@ -279,7 +279,7 @@ LsGenerateListing (
/* Process all parse nodes */
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
LsAmlListingWalk, NULL, (void *) ACPI_TO_POINTER (FileId));
/* Final processing */
@ -360,7 +360,7 @@ LsDumpParseTree (
void)
{
if (!Gbl_DebugFlag)
if (!AslGbl_DebugFlag)
{
return;
}
@ -368,7 +368,7 @@ LsDumpParseTree (
DbgPrint (ASL_TREE_OUTPUT, "\nOriginal parse tree from parser:\n\n");
DbgPrint (ASL_TREE_OUTPUT, ASL_PARSE_TREE_HEADER1);
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
LsTreeWriteWalk, NULL, NULL);
DbgPrint (ASL_TREE_OUTPUT, ASL_PARSE_TREE_HEADER1);
@ -539,7 +539,7 @@ LsWriteNodeToListing (
/* Always start a definition block at AML offset zero */
Gbl_CurrentAmlOffset = 0;
AslGbl_CurrentAmlOffset = 0;
LsWriteSourceLines (Op->Asl.EndLine, Op->Asl.EndLogicalLine, FileId);
/* Use the table Signature and TableId to build a unique name */
@ -550,28 +550,28 @@ LsWriteNodeToListing (
FlPrintFile (FileId,
"%s_%s_Header \\\n",
Gbl_TableSignature, Gbl_TableId);
AslGbl_TableSignature, AslGbl_TableId);
break;
case ASL_FILE_C_SOURCE_OUTPUT:
FlPrintFile (FileId,
" unsigned char %s_%s_Header [] =\n {\n",
Gbl_TableSignature, Gbl_TableId);
AslGbl_TableSignature, AslGbl_TableId);
break;
case ASL_FILE_ASM_INCLUDE_OUTPUT:
FlPrintFile (FileId,
"extrn %s_%s_Header : byte\n",
Gbl_TableSignature, Gbl_TableId);
AslGbl_TableSignature, AslGbl_TableId);
break;
case ASL_FILE_C_INCLUDE_OUTPUT:
FlPrintFile (FileId,
"extern unsigned char %s_%s_Header [];\n",
Gbl_TableSignature, Gbl_TableId);
AslGbl_TableSignature, AslGbl_TableId);
break;
default:
@ -732,28 +732,28 @@ LsWriteNodeToListing (
FlPrintFile (FileId,
"%s_%s_%s \\\n",
Gbl_TableSignature, Gbl_TableId, &Pathname[1]);
AslGbl_TableSignature, AslGbl_TableId, &Pathname[1]);
break;
case ASL_FILE_C_SOURCE_OUTPUT:
FlPrintFile (FileId,
" unsigned char %s_%s_%s [] =\n {\n",
Gbl_TableSignature, Gbl_TableId, &Pathname[1]);
AslGbl_TableSignature, AslGbl_TableId, &Pathname[1]);
break;
case ASL_FILE_ASM_INCLUDE_OUTPUT:
FlPrintFile (FileId,
"extrn %s_%s_%s : byte\n",
Gbl_TableSignature, Gbl_TableId, &Pathname[1]);
AslGbl_TableSignature, AslGbl_TableId, &Pathname[1]);
break;
case ASL_FILE_C_INCLUDE_OUTPUT:
FlPrintFile (FileId,
"extern unsigned char %s_%s_%s [];\n",
Gbl_TableSignature, Gbl_TableId, &Pathname[1]);
AslGbl_TableSignature, AslGbl_TableId, &Pathname[1]);
break;
default:
@ -821,7 +821,7 @@ LsFinishSourceListing (
}
LsFlushListingBuffer (FileId);
Gbl_CurrentAmlOffset = 0;
AslGbl_CurrentAmlOffset = 0;
/* Flush any remaining text in the source file */

View File

@ -269,7 +269,7 @@ LsDumpAsciiInComment (
*
* DESCRIPTION: Check if there is an exception for this line, and if there is,
* put it in the listing immediately. Handles multiple errors
* per line. Gbl_NextError points to the next error in the
* per line. AslGbl_NextError points to the next error in the
* sorted (by line #) list of compile errors/warnings.
*
******************************************************************************/
@ -280,8 +280,8 @@ LsCheckException (
UINT32 FileId)
{
if ((!Gbl_NextError) ||
(LineNumber < Gbl_NextError->LogicalLineNumber ))
if ((!AslGbl_NextError) ||
(LineNumber < AslGbl_NextError->LogicalLineNumber ))
{
return;
}
@ -290,11 +290,11 @@ LsCheckException (
if (FileId == ASL_FILE_LISTING_OUTPUT)
{
while (Gbl_NextError &&
(LineNumber >= Gbl_NextError->LogicalLineNumber))
while (AslGbl_NextError &&
(LineNumber >= AslGbl_NextError->LogicalLineNumber))
{
AePrintException (FileId, Gbl_NextError, "\n[****iasl****]\n");
Gbl_NextError = Gbl_NextError->Next;
AePrintException (FileId, AslGbl_NextError, "\n[****iasl****]\n");
AslGbl_NextError = AslGbl_NextError->Next;
}
FlPrintFile (FileId, "\n");
@ -333,9 +333,9 @@ LsWriteListingHexBytes (
{
/* Print line header when buffer is empty */
if (Gbl_CurrentHexColumn == 0)
if (AslGbl_CurrentHexColumn == 0)
{
if (Gbl_HasIncludeFiles)
if (AslGbl_HasIncludeFiles)
{
FlPrintFile (FileId, "%*s", 10, " ");
}
@ -344,7 +344,7 @@ LsWriteListingHexBytes (
{
case ASL_FILE_LISTING_OUTPUT:
FlPrintFile (FileId, "%8.8X%s", Gbl_CurrentAmlOffset,
FlPrintFile (FileId, "%8.8X%s", AslGbl_CurrentAmlOffset,
ASL_LISTING_LINE_PREFIX);
break;
@ -368,14 +368,14 @@ LsWriteListingHexBytes (
/* Transfer AML byte and update counts */
Gbl_AmlBuffer[Gbl_CurrentHexColumn] = Buffer[i];
AslGbl_AmlBuffer[AslGbl_CurrentHexColumn] = Buffer[i];
Gbl_CurrentHexColumn++;
Gbl_CurrentAmlOffset++;
AslGbl_CurrentHexColumn++;
AslGbl_CurrentAmlOffset++;
/* Flush buffer when it is full */
if (Gbl_CurrentHexColumn >= HEX_LISTING_LINE_SIZE)
if (AslGbl_CurrentHexColumn >= HEX_LISTING_LINE_SIZE)
{
LsFlushListingBuffer (FileId);
}
@ -416,7 +416,7 @@ LsWriteSourceLines (
return;
}
Gbl_CurrentLine = ToLogicalLineNumber;
AslGbl_CurrentLine = ToLogicalLineNumber;
/* Flush any hex bytes remaining from the last opcode */
@ -424,16 +424,16 @@ LsWriteSourceLines (
/* Read lines and write them as long as we are not caught up */
if (Gbl_SourceLine < Gbl_CurrentLine)
if (AslGbl_SourceLine < AslGbl_CurrentLine)
{
/*
* If we just completed writing some AML hex bytes, output a linefeed
* to add some whitespace for readability.
*/
if (Gbl_HexBytesWereWritten)
if (AslGbl_HexBytesWereWritten)
{
FlPrintFile (FileId, "\n");
Gbl_HexBytesWereWritten = FALSE;
AslGbl_HexBytesWereWritten = FALSE;
}
if (FileId == ASL_FILE_C_SOURCE_OUTPUT)
@ -443,7 +443,7 @@ LsWriteSourceLines (
/* Write one line at a time until we have reached the target line # */
while ((Gbl_SourceLine < Gbl_CurrentLine) &&
while ((AslGbl_SourceLine < AslGbl_CurrentLine) &&
LsWriteOneSourceLine (FileId))
{ ; }
@ -482,8 +482,8 @@ LsWriteOneSourceLine (
BOOLEAN ProcessLongLine = FALSE;
Gbl_SourceLine++;
Gbl_ListingNode->LineNumber++;
AslGbl_SourceLine++;
AslGbl_ListingNode->LineNumber++;
/* Ignore lines that are completely blank (but count the line above) */
@ -512,21 +512,21 @@ LsWriteOneSourceLine (
FlPrintFile (FileId, "; ");
}
if (Gbl_HasIncludeFiles)
if (AslGbl_HasIncludeFiles)
{
/*
* This file contains "include" statements, print the current
* filename and line number within the current file
*/
FlPrintFile (FileId, "%12s %5d%s",
Gbl_ListingNode->Filename, Gbl_ListingNode->LineNumber,
AslGbl_ListingNode->Filename, AslGbl_ListingNode->LineNumber,
ASL_LISTING_LINE_PREFIX);
}
else
{
/* No include files, just print the line number */
FlPrintFile (FileId, "%8u%s", Gbl_SourceLine,
FlPrintFile (FileId, "%8u%s", AslGbl_SourceLine,
ASL_LISTING_LINE_PREFIX);
}
@ -601,7 +601,7 @@ LsWriteOneSourceLine (
* Check if an error occurred on this source line during the compile.
* If so, we print the error message after the source line.
*/
LsCheckException (Gbl_SourceLine, FileId);
LsCheckException (AslGbl_SourceLine, FileId);
return (1);
}
}
@ -615,7 +615,7 @@ LsWriteOneSourceLine (
* Check if an error occurred on this source line during the compile.
* If so, we print the error message after the source line.
*/
LsCheckException (Gbl_SourceLine, FileId);
LsCheckException (AslGbl_SourceLine, FileId);
return (1);
}
}
@ -649,7 +649,7 @@ LsFlushListingBuffer (
UINT32 i;
if (Gbl_CurrentHexColumn == 0)
if (AslGbl_CurrentHexColumn == 0)
{
return;
}
@ -660,58 +660,58 @@ LsFlushListingBuffer (
{
case ASL_FILE_LISTING_OUTPUT:
for (i = 0; i < Gbl_CurrentHexColumn; i++)
for (i = 0; i < AslGbl_CurrentHexColumn; i++)
{
FlPrintFile (FileId, "%2.2X ", Gbl_AmlBuffer[i]);
FlPrintFile (FileId, "%2.2X ", AslGbl_AmlBuffer[i]);
}
for (i = 0; i < ((HEX_LISTING_LINE_SIZE - Gbl_CurrentHexColumn) * 3); i++)
for (i = 0; i < ((HEX_LISTING_LINE_SIZE - AslGbl_CurrentHexColumn) * 3); i++)
{
FlWriteFile (FileId, ".", 1);
}
/* Write the ASCII character associated with each of the bytes */
LsDumpAscii (FileId, Gbl_CurrentHexColumn, Gbl_AmlBuffer);
LsDumpAscii (FileId, AslGbl_CurrentHexColumn, AslGbl_AmlBuffer);
break;
case ASL_FILE_ASM_SOURCE_OUTPUT:
for (i = 0; i < Gbl_CurrentHexColumn; i++)
for (i = 0; i < AslGbl_CurrentHexColumn; i++)
{
if (i > 0)
{
FlPrintFile (FileId, ",");
}
FlPrintFile (FileId, "0%2.2Xh", Gbl_AmlBuffer[i]);
FlPrintFile (FileId, "0%2.2Xh", AslGbl_AmlBuffer[i]);
}
for (i = 0; i < ((HEX_LISTING_LINE_SIZE - Gbl_CurrentHexColumn) * 5); i++)
for (i = 0; i < ((HEX_LISTING_LINE_SIZE - AslGbl_CurrentHexColumn) * 5); i++)
{
FlWriteFile (FileId, " ", 1);
}
FlPrintFile (FileId, " ;%8.8X",
Gbl_CurrentAmlOffset - HEX_LISTING_LINE_SIZE);
AslGbl_CurrentAmlOffset - HEX_LISTING_LINE_SIZE);
/* Write the ASCII character associated with each of the bytes */
LsDumpAscii (FileId, Gbl_CurrentHexColumn, Gbl_AmlBuffer);
LsDumpAscii (FileId, AslGbl_CurrentHexColumn, AslGbl_AmlBuffer);
break;
case ASL_FILE_C_SOURCE_OUTPUT:
for (i = 0; i < Gbl_CurrentHexColumn; i++)
for (i = 0; i < AslGbl_CurrentHexColumn; i++)
{
FlPrintFile (FileId, "0x%2.2X,", Gbl_AmlBuffer[i]);
FlPrintFile (FileId, "0x%2.2X,", AslGbl_AmlBuffer[i]);
}
/* Pad hex output with spaces if line is shorter than max line size */
for (i = 0; i < ((HEX_LISTING_LINE_SIZE - Gbl_CurrentHexColumn) * 5); i++)
for (i = 0; i < ((HEX_LISTING_LINE_SIZE - AslGbl_CurrentHexColumn) * 5); i++)
{
FlWriteFile (FileId, " ", 1);
}
@ -719,11 +719,11 @@ LsFlushListingBuffer (
/* AML offset for the start of the line */
FlPrintFile (FileId, " /* %8.8X",
Gbl_CurrentAmlOffset - Gbl_CurrentHexColumn);
AslGbl_CurrentAmlOffset - AslGbl_CurrentHexColumn);
/* Write the ASCII character associated with each of the bytes */
LsDumpAsciiInComment (FileId, Gbl_CurrentHexColumn, Gbl_AmlBuffer);
LsDumpAsciiInComment (FileId, AslGbl_CurrentHexColumn, AslGbl_AmlBuffer);
FlPrintFile (FileId, " */");
break;
@ -736,8 +736,8 @@ LsFlushListingBuffer (
FlPrintFile (FileId, "\n");
Gbl_CurrentHexColumn = 0;
Gbl_HexBytesWereWritten = TRUE;
AslGbl_CurrentHexColumn = 0;
AslGbl_HexBytesWereWritten = TRUE;
}
@ -774,8 +774,8 @@ LsPushNode (
/* Link (push) */
Lnode->Next = Gbl_ListingNode;
Gbl_ListingNode = Lnode;
Lnode->Next = AslGbl_ListingNode;
AslGbl_ListingNode = Lnode;
}
@ -801,19 +801,19 @@ LsPopNode (
/* Just grab the node at the head of the list */
Lnode = Gbl_ListingNode;
Lnode = AslGbl_ListingNode;
if ((!Lnode) ||
(!Lnode->Next))
{
AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, NULL,
"Could not pop empty listing stack");
return (Gbl_ListingNode);
return (AslGbl_ListingNode);
}
Gbl_ListingNode = Lnode->Next;
AslGbl_ListingNode = Lnode->Next;
ACPI_FREE (Lnode);
/* New "Current" node is the new head */
return (Gbl_ListingNode);
return (AslGbl_ListingNode);
}

View File

@ -731,7 +731,7 @@ LdNamespace1Begin (
* 10/2015.
*/
if ((Node->Flags & ANOBJ_IS_EXTERNAL) &&
(ACPI_COMPARE_NAME (Gbl_TableSignature, "DSDT")))
(ACPI_COMPARE_NAME (AslGbl_TableSignature, "DSDT")))
{
/* However, allowed if the reference is within a method */
@ -777,9 +777,9 @@ LdNamespace1Begin (
* Which is used to workaround the fact that the MS interpreter
* does not allow Scope() forward references.
*/
sprintf (MsgBuffer, "%s [%s], changing type to [Scope]",
sprintf (AslGbl_MsgBuffer, "%s [%s], changing type to [Scope]",
Op->Asl.ExternalName, AcpiUtGetTypeName (Node->Type));
AslError (ASL_REMARK, ASL_MSG_SCOPE_TYPE, Op, MsgBuffer);
AslError (ASL_REMARK, ASL_MSG_SCOPE_TYPE, Op, AslGbl_MsgBuffer);
/* Switch the type to scope, open the new scope */
@ -796,9 +796,9 @@ LdNamespace1Begin (
/* All other types are an error */
sprintf (MsgBuffer, "%s [%s]", Op->Asl.ExternalName,
sprintf (AslGbl_MsgBuffer, "%s [%s]", Op->Asl.ExternalName,
AcpiUtGetTypeName (Node->Type));
AslError (ASL_ERROR, ASL_MSG_SCOPE_TYPE, Op, MsgBuffer);
AslError (ASL_ERROR, ASL_MSG_SCOPE_TYPE, Op, AslGbl_MsgBuffer);
/*
* However, switch the type to be an actual scope so
@ -899,9 +899,9 @@ LdNamespace1Begin (
}
else
{
sprintf (MsgBuffer, "%s [%s]", Op->Asl.ExternalName,
sprintf (AslGbl_MsgBuffer, "%s [%s]", Op->Asl.ExternalName,
AcpiUtGetTypeName (Node->Type));
AslError (ASL_ERROR, ASL_MSG_SCOPE_TYPE, Op, MsgBuffer);
AslError (ASL_ERROR, ASL_MSG_SCOPE_TYPE, Op, AslGbl_MsgBuffer);
return_ACPI_STATUS (AE_OK);
}
}

View File

@ -252,9 +252,9 @@ LkIsObjectUsed (
if ((MethodLocals[i].Flags & ASL_LOCAL_INITIALIZED) &&
(!(MethodLocals[i].Flags & ASL_LOCAL_REFERENCED)))
{
sprintf (MsgBuffer, "Local%u", i);
sprintf (AslGbl_MsgBuffer, "Local%u", i);
AslError (ASL_WARNING, ASL_MSG_LOCAL_NOT_USED,
MethodLocals[i].Op, MsgBuffer);
MethodLocals[i].Op, AslGbl_MsgBuffer);
}
}
@ -271,9 +271,9 @@ LkIsObjectUsed (
if ((MethodArgs[i].Flags & ASL_ARG_INITIALIZED) &&
(!(MethodArgs[i].Flags & ASL_ARG_REFERENCED)))
{
sprintf (MsgBuffer, "Arg%u", i);
sprintf (AslGbl_MsgBuffer, "Arg%u", i);
AslError (ASL_WARNING, ASL_MSG_ARG_AS_LOCAL_NOT_USED,
MethodArgs[i].Op, MsgBuffer);
MethodArgs[i].Op, AslGbl_MsgBuffer);
}
}
else
@ -286,9 +286,9 @@ LkIsObjectUsed (
if ((Node->Name.Ascii[0] != '_') &&
(!(MethodArgs[i].Flags & ASL_ARG_REFERENCED)))
{
sprintf (MsgBuffer, "Arg%u", i);
sprintf (AslGbl_MsgBuffer, "Arg%u", i);
AslError (ASL_REMARK, ASL_MSG_ARG_NOT_USED,
MethodArgs[i].Op, MsgBuffer);
MethodArgs[i].Op, AslGbl_MsgBuffer);
}
}
}
@ -336,10 +336,10 @@ LkIsObjectUsed (
* Issue a remark even if it is a reserved name (starts
* with an underscore).
*/
sprintf (MsgBuffer, "Name [%4.4s] is within a method [%4.4s]",
sprintf (AslGbl_MsgBuffer, "Name [%4.4s] is within a method [%4.4s]",
Node->Name.Ascii, Next->Name.Ascii);
AslError (ASL_REMARK, ASL_MSG_NOT_REFERENCED,
LkGetNameOp (Node->Op), MsgBuffer);
LkGetNameOp (Node->Op), AslGbl_MsgBuffer);
return (AE_OK);
}

View File

@ -236,12 +236,12 @@ main (
/* Allocate the line buffer(s), must be after command line */
Gbl_LineBufferSize /= 2;
AslGbl_LineBufferSize /= 2;
UtExpandLineBuffers ();
/* Perform global actions first/only */
if (Gbl_DisassembleAll)
if (AslGbl_DisassembleAll)
{
while (argv[Index1])
{
@ -264,10 +264,10 @@ main (
* If -p not specified, we will use the input filename as the
* output filename prefix
*/
if (Gbl_UseDefaultAmlFilename)
if (AslGbl_UseDefaultAmlFilename)
{
Gbl_OutputFilenamePrefix = argv[Index2];
UtConvertBackslashes (Gbl_OutputFilenamePrefix);
AslGbl_OutputFilenamePrefix = argv[Index2];
UtConvertBackslashes (AslGbl_OutputFilenamePrefix);
}
Status = AslDoOneFile (argv[Index2]);
@ -337,7 +337,7 @@ AslSignalHandler (
* Close all open files
* Note: the .pre file is the same as the input source file
*/
Gbl_Files[ASL_FILE_PREPROCESSOR].Handle = NULL;
AslGbl_Files[ASL_FILE_PREPROCESSOR].Handle = NULL;
for (i = ASL_FILE_INPUT; i < ASL_MAX_FILE_TYPE; i++)
{
@ -385,13 +385,13 @@ AslInitialize (
for (i = 0; i < ASL_NUM_FILES; i++)
{
Gbl_Files[i].Handle = NULL;
Gbl_Files[i].Filename = NULL;
AslGbl_Files[i].Handle = NULL;
AslGbl_Files[i].Filename = NULL;
}
Gbl_Files[ASL_FILE_STDOUT].Handle = stdout;
Gbl_Files[ASL_FILE_STDOUT].Filename = "STDOUT";
AslGbl_Files[ASL_FILE_STDOUT].Handle = stdout;
AslGbl_Files[ASL_FILE_STDOUT].Filename = "STDOUT";
Gbl_Files[ASL_FILE_STDERR].Handle = stderr;
Gbl_Files[ASL_FILE_STDERR].Filename = "STDERR";
AslGbl_Files[ASL_FILE_STDERR].Handle = stderr;
AslGbl_Files[ASL_FILE_STDERR].Filename = "STDERR";
}

View File

@ -233,17 +233,18 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
/* AML Opcode Value Flags Btype */
/* ACCESSAS */ OP_TABLE_ENTRY (AML_INT_ACCESSFIELD_OP, 0, 0, 0),
/* ACCESSATTRIB_BLOCK */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_BLOCK, 0, 0),
/* ACCESSATTRIB_BLOCK_CALL */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_BLOCK_CALL, 0, 0),
/* ACCESSATTRIB_BYTE */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_BYTE, 0, 0),
/* ACCESSATTRIB_MULTIBYTE */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_MULTIBYTE, 0, 0),
/* ACCESSATTRIB_QUICK */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_QUICK, 0, 0),
/* ACCESSATTRIB_RAW_BYTES */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_RAW_BYTES, 0, 0),
/* ACCESSATTRIB_RAW_PROCESS */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_RAW_PROCESS, 0, 0),
/* ACCESSATTRIB_SND_RCV */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_SEND_RCV, 0, 0),
/* ACCESSATTRIB_WORD */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_WORD, 0, 0),
/* ACCESSATTRIB_WORD_CALL */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_WORD_CALL, 0, 0),
/* ACCESSAS */ OP_TABLE_ENTRY (AML_INT_ACCESSFIELD_OP, 0, 0, 0),
/* ACCESSATTRIB_BLOCK */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_BLOCK, 0, 0),
/* ACCESSATTRIB_BLOCK_PROCESS_CALL */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_BLOCK_PROCESS_CALL, 0, 0),
/* ACCESSATTRIB_BYTE */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_BYTE, 0, 0),
/* ACCESSATTRIB_BYTES */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_BYTES, 0, 0),
/* ACCESSATTRIB_QUICK */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_QUICK, 0, 0),
/* ACCESSATTRIB_RAW_BYTES */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_RAW_BYTES, 0, 0),
/* ACCESSATTRIB_RAW_PROCESS_BYTES */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_RAW_PROCESS_BYTES, 0, 0),
/* ACCESSATTRIB_SEND_RECEIVE */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_SEND_RECEIVE, 0, 0),
/* ACCESSATTRIB_WORD */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_WORD, 0, 0),
/* ACCESSATTRIB_PROCESS_CALL */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ATTRIB_PROCESS_CALL, 0, 0),
/* ACCESSTYPE_ANY */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ACCESS_ANY, 0, 0),
/* ACCESSTYPE_BUF */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ACCESS_BUFFER, 0, 0),
/* ACCESSTYPE_BYTE */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_ACCESS_BYTE, 0, 0),

View File

@ -204,7 +204,7 @@ MpSaveGpioInfo (
/* Mapfile option enabled? */
if (!Gbl_MapfileFlag)
if (!AslGbl_MapfileFlag)
{
return;
}
@ -255,7 +255,7 @@ MpSaveSerialInfo (
/* Mapfile option enabled? */
if (!Gbl_MapfileFlag)
if (!AslGbl_MapfileFlag)
{
return;
}
@ -335,11 +335,11 @@ MpCreateGpioInfo (
Buffer = UtLocalCacheCalloc (sizeof (ACPI_GPIO_INFO));
Info = ACPI_CAST_PTR (ACPI_GPIO_INFO, Buffer);
NextGpio = Gbl_GpioList;
NextGpio = AslGbl_GpioList;
PrevGpio = NULL;
if (!Gbl_GpioList)
if (!AslGbl_GpioList)
{
Gbl_GpioList = Info;
AslGbl_GpioList = Info;
Info->Next = NULL;
return (Info);
}
@ -371,7 +371,7 @@ MpCreateGpioInfo (
}
else
{
Gbl_GpioList = Info;
AslGbl_GpioList = Info;
}
Info->Next = NextGpio;
@ -412,11 +412,11 @@ MpCreateSerialInfo (
Buffer = UtLocalCacheCalloc (sizeof (ACPI_SERIAL_INFO));
Info = ACPI_CAST_PTR (ACPI_SERIAL_INFO, Buffer);
NextSerial = Gbl_SerialList;
NextSerial = AslGbl_SerialList;
PrevSerial = NULL;
if (!Gbl_SerialList)
if (!AslGbl_SerialList)
{
Gbl_SerialList = Info;
AslGbl_SerialList = Info;
Info->Next = NULL;
return (Info);
}
@ -448,7 +448,7 @@ MpCreateSerialInfo (
}
else
{
Gbl_SerialList = Info;
AslGbl_SerialList = Info;
}
Info->Next = NextSerial;

View File

@ -237,24 +237,24 @@ MpEmitMappingInfo (
/* Mapfile option enabled? */
if (!Gbl_MapfileFlag)
if (!AslGbl_MapfileFlag)
{
return;
}
if (!Gbl_GpioList)
if (!AslGbl_GpioList)
{
FlPrintFile (ASL_FILE_MAP_OUTPUT,
"\nNo GPIO devices found\n");
}
if (!Gbl_SerialList)
if (!AslGbl_SerialList)
{
FlPrintFile (ASL_FILE_MAP_OUTPUT,
"\nNo Serial devices found (I2C/SPI/UART)\n");
}
if (!Gbl_GpioList && !Gbl_SerialList)
if (!AslGbl_GpioList && !AslGbl_SerialList)
{
return;
}
@ -272,8 +272,8 @@ MpEmitMappingInfo (
/* Clear the lists - no need to free memory here */
Gbl_SerialList = NULL;
Gbl_GpioList = NULL;
AslGbl_SerialList = NULL;
AslGbl_GpioList = NULL;
}
@ -307,7 +307,7 @@ MpEmitGpioInfo (
/* Walk the GPIO descriptor list */
Info = Gbl_GpioList;
Info = AslGbl_GpioList;
while (Info)
{
HidString = MpGetHidViaNamestring (Info->DeviceName);
@ -440,7 +440,7 @@ MpEmitSerialInfo (
/* Walk the constructed serial descriptor list */
Info = Gbl_SerialList;
Info = AslGbl_SerialList;
while (Info)
{
Resource = Info->Resource;
@ -641,7 +641,7 @@ MpXrefDevices (
/* Walk the entire parse tree */
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
MpNamespaceXrefBegin, NULL, Info);
if (!Info->References)

View File

@ -357,7 +357,9 @@ const char *AslCompilerMsgs [] =
/* ASL_MSG_FOUND_HERE_EXTERN */ "Remove one of the declarations indicated above or below:",
/* ASL_MSG_OEM_TABLE_ID */ "Invalid OEM Table ID",
/* ASL_MSG_OEM_ID */ "Invalid OEM ID",
/* ASL_MSG_UNLOAD */ "Unload is not supported by all operating systems"
/* ASL_MSG_UNLOAD */ "Unload is not supported by all operating systems",
/* ASL_MSG_OFFSET */ "Unnecessary/redundant use of Offset operator",
/* ASL_MSG_LONG_SLEEP */ "Very long Sleep, greater than 1 second"
};
/* Table compiler */
@ -495,7 +497,7 @@ AeDecodeExceptionLevel (
/* Differentiate the string type to be used (IDE is all lower case) */
if (Gbl_VerboseErrors)
if (AslGbl_VerboseErrors)
{
return (AslErrorLevel[Level]);
}

View File

@ -360,6 +360,8 @@ typedef enum
ASL_MSG_OEM_TABLE_ID,
ASL_MSG_OEM_ID,
ASL_MSG_UNLOAD,
ASL_MSG_OFFSET,
ASL_MSG_LONG_SLEEP,
/* These messages are used by the Data Table compiler only */

View File

@ -203,7 +203,7 @@ MtMethodAnalysisWalkBegin (
/* Build cross-reference output file if requested */
if (Gbl_CrossReferenceOutput)
if (AslGbl_CrossReferenceOutput)
{
OtXrefWalkPart1 (Op, Level, MethodInfo);
}
@ -212,7 +212,7 @@ MtMethodAnalysisWalkBegin (
{
case PARSEOP_METHOD:
TotalMethods++;
AslGbl_TotalMethods++;
/* Create and init method info */
@ -249,11 +249,11 @@ MtMethodAnalysisWalkBegin (
if (!ApFindNameInScope (METHOD_NAME__PS0, Op))
{
sprintf (MsgBuffer,
sprintf (AslGbl_MsgBuffer,
"%4.4s requires _PS0 in same scope", Op->Asl.NameSeg);
AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
MsgBuffer);
AslGbl_MsgBuffer);
}
}

View File

@ -191,8 +191,8 @@ NsSetupNamespaceListing (
void *Handle)
{
Gbl_NsOutputFlag = TRUE;
Gbl_Files[ASL_FILE_NAMESPACE_OUTPUT].Handle = Handle;
AslGbl_NsOutputFlag = TRUE;
AslGbl_Files[ASL_FILE_NAMESPACE_OUTPUT].Handle = Handle;
}
@ -217,12 +217,12 @@ NsDisplayNamespace (
ACPI_STATUS Status;
if (!Gbl_NsOutputFlag)
if (!AslGbl_NsOutputFlag)
{
return (AE_OK);
}
Gbl_NumNamespaceObjects = 0;
AslGbl_NumNamespaceObjects = 0;
/* File header */
@ -272,10 +272,10 @@ NsDoOneNamespaceObject (
ACPI_PARSE_OBJECT *Op;
Gbl_NumNamespaceObjects++;
AslGbl_NumNamespaceObjects++;
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "%5u [%u] %*s %4.4s - %s",
Gbl_NumNamespaceObjects, Level, (Level * 3), " ",
AslGbl_NumNamespaceObjects, Level, (Level * 3), " ",
&Node->Name, AcpiUtGetTypeName (Node->Type));
Op = Node->Op;

View File

@ -221,7 +221,7 @@ LsAmlOffsetWalk (
Node = Op->Asl.Node;
if (!Node)
{
Gbl_CurrentAmlOffset += Op->Asl.FinalAmlLength;
AslGbl_CurrentAmlOffset += Op->Asl.FinalAmlLength;
return (AE_OK);
}
@ -230,10 +230,10 @@ LsAmlOffsetWalk (
if ((Node->Type == ACPI_TYPE_LOCAL_RESOURCE) &&
(Op->Asl.CompileFlags & OP_IS_RESOURCE_DESC))
{
LsEmitOffsetTableEntry (FileId, Node, 0, Gbl_CurrentAmlOffset,
LsEmitOffsetTableEntry (FileId, Node, 0, AslGbl_CurrentAmlOffset,
Op->Asl.ParseOpName, 0, Op->Asl.Extra, AML_BUFFER_OP);
Gbl_CurrentAmlOffset += Op->Asl.FinalAmlLength;
AslGbl_CurrentAmlOffset += Op->Asl.FinalAmlLength;
return (AE_OK);
}
@ -245,7 +245,7 @@ LsAmlOffsetWalk (
if (!Op->Asl.Child)
{
FlPrintFile (FileId, "%s NO CHILD!\n", MsgBuffer);
FlPrintFile (FileId, "%s NO CHILD!\n", AslGbl_MsgBuffer);
return (AE_OK);
}
@ -257,10 +257,10 @@ LsAmlOffsetWalk (
/* Get offset of last nameseg and the actual data */
NamepathOffset = Gbl_CurrentAmlOffset + Length +
NamepathOffset = AslGbl_CurrentAmlOffset + Length +
(Op->Asl.FinalAmlLength - ACPI_NAME_SIZE);
DataOffset = Gbl_CurrentAmlOffset + Length +
DataOffset = AslGbl_CurrentAmlOffset + Length +
Op->Asl.FinalAmlLength;
/* Get actual value associated with the name */
@ -307,7 +307,7 @@ LsAmlOffsetWalk (
break;
}
Gbl_CurrentAmlOffset += Length;
AslGbl_CurrentAmlOffset += Length;
return (AE_OK);
case AML_REGION_OP:
@ -322,10 +322,10 @@ LsAmlOffsetWalk (
/* Get offset of last nameseg and the actual data */
NamepathOffset = Gbl_CurrentAmlOffset + Length +
NamepathOffset = AslGbl_CurrentAmlOffset + Length +
(NextOp->Asl.FinalAmlLength - ACPI_NAME_SIZE);
DataOffset = Gbl_CurrentAmlOffset + Length +
DataOffset = AslGbl_CurrentAmlOffset + Length +
(NextOp->Asl.FinalAmlLength + 1);
/* Get the SpaceId node, then the Offset (address) node */
@ -349,7 +349,7 @@ LsAmlOffsetWalk (
Op->Asl.ParseOpName, NextOp->Asl.Value.Integer,
(UINT8) NextOp->Asl.AmlOpcode, AML_REGION_OP);
Gbl_CurrentAmlOffset += Length;
AslGbl_CurrentAmlOffset += Length;
return (AE_OK);
default:
@ -369,10 +369,10 @@ LsAmlOffsetWalk (
/* Get offset of last nameseg and the actual data (flags byte) */
NamepathOffset = Gbl_CurrentAmlOffset + Length +
NamepathOffset = AslGbl_CurrentAmlOffset + Length +
(NextOp->Asl.FinalAmlLength - ACPI_NAME_SIZE);
DataOffset = Gbl_CurrentAmlOffset + Length +
DataOffset = AslGbl_CurrentAmlOffset + Length +
NextOp->Asl.FinalAmlLength;
/* Get the flags byte Op */
@ -393,10 +393,10 @@ LsAmlOffsetWalk (
/* Get offset of last nameseg and the actual data (PBlock address) */
NamepathOffset = Gbl_CurrentAmlOffset + Length +
NamepathOffset = AslGbl_CurrentAmlOffset + Length +
(NextOp->Asl.FinalAmlLength - ACPI_NAME_SIZE);
DataOffset = Gbl_CurrentAmlOffset + Length +
DataOffset = AslGbl_CurrentAmlOffset + Length +
(NextOp->Asl.FinalAmlLength + 1);
NextOp = NextOp->Asl.Next; /* Get ProcessorID (BYTE) */
@ -418,7 +418,7 @@ LsAmlOffsetWalk (
/* Get offset of last nameseg */
NamepathOffset = Gbl_CurrentAmlOffset + Length +
NamepathOffset = AslGbl_CurrentAmlOffset + Length +
(NextOp->Asl.FinalAmlLength - ACPI_NAME_SIZE);
LsEmitOffsetTableEntry (FileId, Node, NamepathOffset, 0,
@ -429,7 +429,7 @@ LsAmlOffsetWalk (
break;
}
Gbl_CurrentAmlOffset += Op->Asl.FinalAmlLength;
AslGbl_CurrentAmlOffset += Op->Asl.FinalAmlLength;
return (AE_OK);
}
@ -478,9 +478,9 @@ LsEmitOffsetTableEntry (
/* [1] - Skip the opening backslash for the path */
strcpy (MsgBuffer, "\"");
strcat (MsgBuffer, &((char *) TargetPath.Pointer)[1]);
strcat (MsgBuffer, "\",");
strcpy (AslGbl_MsgBuffer, "\"");
strcat (AslGbl_MsgBuffer, &((char *) TargetPath.Pointer)[1]);
strcat (AslGbl_MsgBuffer, "\",");
ACPI_FREE (TargetPath.Pointer);
/*
@ -489,7 +489,7 @@ LsEmitOffsetTableEntry (
*/
FlPrintFile (FileId,
" {%-29s 0x%4.4X, 0x%8.8X, 0x%2.2X, 0x%8.8X, 0x%8.8X%8.8X}, /* %s */\n",
MsgBuffer, ParentOpcode, NamepathOffset, AmlOpcode,
AslGbl_MsgBuffer, ParentOpcode, NamepathOffset, AmlOpcode,
Offset, ACPI_FORMAT_UINT64 (Value), OpName);
}
@ -564,7 +564,7 @@ LsDoOffsetTableHeader (
FlPrintFile (FileId,
"AML_OFFSET_TABLE_ENTRY %s_%s_OffsetTable[] =\n{\n",
Gbl_TableSignature, Gbl_TableId);
AslGbl_TableSignature, AslGbl_TableId);
}
@ -575,5 +575,5 @@ LsDoOffsetTableFooter (
FlPrintFile (FileId,
" {NULL,0,0,0,0,0} /* Table terminator */\n};\n\n");
Gbl_CurrentAmlOffset = 0;
AslGbl_CurrentAmlOffset = 0;
}

View File

@ -239,7 +239,7 @@ OpcAmlOpcodeWalk (
void *Context)
{
TotalParseNodes++;
AslGbl_TotalParseNodes++;
OpcGenerateAmlOpcode (Op);
OpnGenerateAmlOperands (Op);
@ -271,9 +271,9 @@ OpcGetIntegerWidth (
return;
}
if (Gbl_RevisionOverride)
if (AslGbl_RevisionOverride)
{
AcpiUtSetIntegerWidth (Gbl_RevisionOverride);
AcpiUtSetIntegerWidth (AslGbl_RevisionOverride);
}
else
{
@ -328,7 +328,7 @@ OpcSetOptimalIntegerSize (
*
* This optimization is optional.
*/
if (Gbl_IntegerOptimizationFlag)
if (AslGbl_IntegerOptimizationFlag)
{
switch (Op->Asl.Value.Integer)
{
@ -404,7 +404,7 @@ OpcSetOptimalIntegerSize (
AslError (ASL_WARNING, ASL_MSG_INTEGER_LENGTH,
Op, NULL);
if (!Gbl_IgnoreErrors)
if (!AslGbl_IgnoreErrors)
{
/* Truncate the integer to 32-bit */
@ -466,9 +466,9 @@ OpcDoAccessAs (
/* Only a few AccessAttributes support AccessLength */
Attribute = (UINT8) AttribOp->Asl.Value.Integer;
if ((Attribute != AML_FIELD_ATTRIB_MULTIBYTE) &&
if ((Attribute != AML_FIELD_ATTRIB_BYTES) &&
(Attribute != AML_FIELD_ATTRIB_RAW_BYTES) &&
(Attribute != AML_FIELD_ATTRIB_RAW_PROCESS))
(Attribute != AML_FIELD_ATTRIB_RAW_PROCESS_BYTES))
{
return;
}
@ -924,12 +924,12 @@ OpcGenerateAmlOpcode (
case PARSEOP_INCLUDE:
Gbl_HasIncludeFiles = TRUE;
AslGbl_HasIncludeFiles = TRUE;
break;
case PARSEOP_EXTERNAL:
if (Gbl_DoExternals == FALSE)
if (AslGbl_DoExternals == FALSE)
{
Op->Asl.Child->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
Op->Asl.Child->Asl.Next->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;

View File

@ -429,14 +429,35 @@ OpnDoFieldCommon (
Next->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
PkgLengthNode->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
}
else if ((NewBitOffset == CurrentBitOffset) && Gbl_OptimizeTrivialParseNodes)
else if (NewBitOffset == CurrentBitOffset)
{
/*
* Offset is redundant; we don't need to output an
* offset opcode. Just set these nodes to default
* This Offset() operator is redundant and not needed,
* because the offset value is the same as the current
* offset.
*/
Next->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
PkgLengthNode->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
AslError (ASL_REMARK, ASL_MSG_OFFSET, PkgLengthNode, NULL);
if (AslGbl_OptimizeTrivialParseNodes)
{
/*
* Optimize this Offset() operator by removing/ignoring
* it. Set the related nodes to default.
*/
Next->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
PkgLengthNode->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
AslError (ASL_OPTIMIZATION, ASL_MSG_OFFSET, PkgLengthNode,
"Optimizer has removed statement");
}
else
{
/* Optimization is disabled, treat as a valid Offset */
PkgLengthNode->Asl.Value.Integer =
NewBitOffset - CurrentBitOffset;
CurrentBitOffset = NewBitOffset;
}
}
else
{
@ -461,7 +482,7 @@ OpnDoFieldCommon (
if ((NewBitOffset == 0) &&
(Next->Asl.ParseOpcode == PARSEOP_RESERVED_BYTES) &&
Gbl_OptimizeTrivialParseNodes)
AslGbl_OptimizeTrivialParseNodes)
{
/*
* Unnamed field with a bit length of zero. We can
@ -1031,22 +1052,22 @@ OpnDoDefinitionBlock (
Child = Op->Asl.Child;
if (Child->Asl.Value.Buffer &&
*Child->Asl.Value.Buffer &&
(Gbl_UseDefaultAmlFilename))
(AslGbl_UseDefaultAmlFilename))
{
/*
* We will use the AML filename that is embedded in the source file
* for the output filename.
*/
Filename = UtLocalCacheCalloc (strlen (Gbl_DirectoryPath) +
Filename = UtLocalCacheCalloc (strlen (AslGbl_DirectoryPath) +
strlen ((char *) Child->Asl.Value.Buffer) + 1);
/* Prepend the current directory path */
strcpy (Filename, Gbl_DirectoryPath);
strcpy (Filename, AslGbl_DirectoryPath);
strcat (Filename, (char *) Child->Asl.Value.Buffer);
Gbl_OutputFilenamePrefix = Filename;
UtConvertBackslashes (Gbl_OutputFilenamePrefix);
AslGbl_OutputFilenamePrefix = Filename;
UtConvertBackslashes (AslGbl_OutputFilenamePrefix);
}
Child->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
@ -1057,8 +1078,8 @@ OpnDoDefinitionBlock (
Child->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
if (Child->Asl.Value.String)
{
Gbl_TableSignature = Child->Asl.Value.String;
if (strlen (Gbl_TableSignature) != ACPI_NAME_SIZE)
AslGbl_TableSignature = Child->Asl.Value.String;
if (strlen (AslGbl_TableSignature) != ACPI_NAME_SIZE)
{
AslError (ASL_ERROR, ASL_MSG_TABLE_SIGNATURE, Child,
"Length must be exactly 4 characters");
@ -1066,7 +1087,7 @@ OpnDoDefinitionBlock (
for (i = 0; i < ACPI_NAME_SIZE; i++)
{
if (!isalnum ((int) Gbl_TableSignature[i]))
if (!isalnum ((int) AslGbl_TableSignature[i]))
{
AslError (ASL_ERROR, ASL_MSG_TABLE_SIGNATURE, Child,
"Contains non-alphanumeric characters");
@ -1107,8 +1128,8 @@ OpnDoDefinitionBlock (
"Length cannot exceed 8 characters");
}
Gbl_TableId = UtLocalCacheCalloc (Length + 1);
strcpy (Gbl_TableId, Child->Asl.Value.String);
AslGbl_TableId = UtLocalCacheCalloc (Length + 1);
strcpy (AslGbl_TableId, Child->Asl.Value.String);
/*
* Convert anything non-alphanumeric to an underscore. This
@ -1116,9 +1137,9 @@ OpnDoDefinitionBlock (
*/
for (i = 0; i < Length; i++)
{
if (!isalnum ((int) Gbl_TableId[i]))
if (!isalnum ((int) AslGbl_TableId[i]))
{
Gbl_TableId[i] = '_';
AslGbl_TableId[i] = '_';
}
}
}

View File

@ -406,7 +406,7 @@ OptBuildShortestPath (
* Construct a new target string
*/
NewPathExternal =
ACPI_ALLOCATE_ZEROED (TargetPath->Length + NumCarats + 1);
UtLocalCacheCalloc (TargetPath->Length + NumCarats + 1);
/* Insert the Carats into the Target string */
@ -522,7 +522,6 @@ OptBuildShortestPath (
Cleanup:
ACPI_FREE (NewPathExternal);
return (Status);
}
@ -679,7 +678,7 @@ OptOptimizeNamePath (
/* This is an optional optimization */
if (!Gbl_ReferenceOptimizationFlag)
if (!AslGbl_ReferenceOptimizationFlag)
{
return_VOID;
}

View File

@ -212,7 +212,7 @@ AslCommandLine (
BadCommandLine = AslDoOptions (argc, argv, FALSE);
if (Gbl_DoTemplates)
if (AslGbl_DoTemplates)
{
Status = DtCreateTemplates (argv);
if (ACPI_FAILURE (Status))
@ -231,10 +231,10 @@ AslCommandLine (
BadCommandLine = TRUE;
}
if (Gbl_DoSignon)
if (AslGbl_DoSignon)
{
printf (ACPI_COMMON_SIGNON (ASL_COMPILER_NAME));
if (Gbl_IgnoreErrors)
if (AslGbl_IgnoreErrors)
{
printf ("Ignoring all errors, forcing AML file generation\n\n");
}
@ -297,7 +297,7 @@ AslDoOptions (
{
case 'r':
Gbl_EnableReferenceTypechecking = TRUE;
AslGbl_EnableReferenceTypechecking = TRUE;
break;
default:
@ -318,16 +318,16 @@ AslDoOptions (
printf ("Debug ASL to ASL+ conversion\n");
Gbl_DoAslConversion = TRUE;
Gbl_FoldConstants = FALSE;
Gbl_IntegerOptimizationFlag = FALSE;
Gbl_ReferenceOptimizationFlag = FALSE;
Gbl_OptimizeTrivialParseNodes = FALSE;
AslGbl_DoAslConversion = TRUE;
AslGbl_FoldConstants = FALSE;
AslGbl_IntegerOptimizationFlag = FALSE;
AslGbl_ReferenceOptimizationFlag = FALSE;
AslGbl_OptimizeTrivialParseNodes = FALSE;
AcpiGbl_CaptureComments = TRUE;
AcpiGbl_DoDisassemblerOptimizations = FALSE;
AcpiGbl_DebugAslConversion = TRUE;
AcpiGbl_DmEmitExternalOpcodes = TRUE;
Gbl_DoExternalsInPlace = TRUE;
AslGbl_DoExternalsInPlace = TRUE;
return (0);
@ -336,8 +336,8 @@ AslDoOptions (
AslCompilerdebug = 1; /* same as yydebug */
DtParserdebug = 1;
PrParserdebug = 1;
Gbl_DebugFlag = TRUE;
Gbl_KeepPreprocessorTempFile = TRUE;
AslGbl_DebugFlag = TRUE;
AslGbl_KeepPreprocessorTempFile = TRUE;
break;
case 'p': /* Prune ASL parse tree */
@ -349,13 +349,13 @@ AslDoOptions (
return (-1);
}
Gbl_PruneParseTree = TRUE;
Gbl_PruneDepth = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
AslGbl_PruneParseTree = TRUE;
AslGbl_PruneDepth = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
break;
case 's':
Gbl_DebugFlag = TRUE;
AslGbl_DebugFlag = TRUE;
break;
case 't':
@ -367,7 +367,7 @@ AslDoOptions (
return (-1);
}
Gbl_PruneType = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
AslGbl_PruneType = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
break;
default:
@ -386,21 +386,21 @@ AslDoOptions (
case 'a':
printf ("Convert ASL to ASL+ with comments\n");
Gbl_DoAslConversion = TRUE;
Gbl_FoldConstants = FALSE;
Gbl_IntegerOptimizationFlag = FALSE;
Gbl_ReferenceOptimizationFlag = FALSE;
Gbl_OptimizeTrivialParseNodes = FALSE;
AslGbl_DoAslConversion = TRUE;
AslGbl_FoldConstants = FALSE;
AslGbl_IntegerOptimizationFlag = FALSE;
AslGbl_ReferenceOptimizationFlag = FALSE;
AslGbl_OptimizeTrivialParseNodes = FALSE;
AcpiGbl_CaptureComments = TRUE;
AcpiGbl_DoDisassemblerOptimizations = FALSE;
AcpiGbl_DmEmitExternalOpcodes = TRUE;
Gbl_DoExternalsInPlace = TRUE;
AslGbl_DoExternalsInPlace = TRUE;
return (0);
case 'r':
Gbl_NoResourceChecking = TRUE;
AslGbl_NoResourceChecking = TRUE;
break;
default:
@ -416,13 +416,13 @@ AslDoOptions (
{
case '^':
Gbl_DoCompile = FALSE;
AslGbl_DoCompile = FALSE;
break;
case 'a':
Gbl_DoCompile = FALSE;
Gbl_DisassembleAll = TRUE;
AslGbl_DoCompile = FALSE;
AslGbl_DisassembleAll = TRUE;
break;
case 'b': /* Do not convert buffers to resource descriptors */
@ -441,7 +441,7 @@ AslDoOptions (
case 'l': /* Use legacy ASL code (not ASL+) for disassembly */
Gbl_DoCompile = FALSE;
AslGbl_DoCompile = FALSE;
AcpiGbl_CstyleDisassembly = FALSE;
break;
@ -487,7 +487,7 @@ AslDoOptions (
{
case '^': /* Ignore errors and force creation of aml file */
Gbl_IgnoreErrors = TRUE;
AslGbl_IgnoreErrors = TRUE;
break;
case 'e': /* Disassembler: Get external declaration file */
@ -497,7 +497,7 @@ AslDoOptions (
return (-1);
}
Gbl_ExternalRefFilename = AcpiGbl_Optarg;
AslGbl_ExternalRefFilename = AcpiGbl_Optarg;
break;
default:
@ -509,7 +509,7 @@ AslDoOptions (
case 'G':
Gbl_CompileGeneric = TRUE;
AslGbl_CompileGeneric = TRUE;
break;
case 'g': /* Get all ACPI tables */
@ -572,14 +572,14 @@ AslDoOptions (
/* Produce assembly code include file */
Gbl_AsmIncludeOutputFlag = TRUE;
AslGbl_AsmIncludeOutputFlag = TRUE;
break;
case 'c':
/* Produce C include file */
Gbl_C_IncludeOutputFlag = TRUE;
AslGbl_C_IncludeOutputFlag = TRUE;
break;
case 'n':
@ -604,7 +604,7 @@ AslDoOptions (
/* Produce listing file (Mixed source/aml) */
Gbl_ListingFlag = TRUE;
AslGbl_ListingFlag = TRUE;
AcpiGbl_DmOpt_Listing = TRUE;
break;
@ -612,35 +612,35 @@ AslDoOptions (
/* Produce preprocessor output file */
Gbl_PreprocessorOutputFlag = TRUE;
AslGbl_PreprocessorOutputFlag = TRUE;
break;
case 'm':
/* Produce hardware map summary file */
Gbl_MapfileFlag = TRUE;
AslGbl_MapfileFlag = TRUE;
break;
case 'n':
/* Produce namespace file */
Gbl_NsOutputFlag = TRUE;
AslGbl_NsOutputFlag = TRUE;
break;
case 's':
/* Produce combined source file */
Gbl_SourceOutputFlag = TRUE;
AslGbl_SourceOutputFlag = TRUE;
break;
case 'x':
/* Produce cross-reference file */
Gbl_CrossReferenceOutput = TRUE;
AslGbl_CrossReferenceOutput = TRUE;
break;
default:
@ -652,17 +652,17 @@ AslDoOptions (
case 'm': /* Set line buffer size */
Gbl_LineBufferSize = (UINT32) strtoul (AcpiGbl_Optarg, NULL, 0) * 1024;
if (Gbl_LineBufferSize < ASL_DEFAULT_LINE_BUFFER_SIZE)
AslGbl_LineBufferSize = (UINT32) strtoul (AcpiGbl_Optarg, NULL, 0) * 1024;
if (AslGbl_LineBufferSize < ASL_DEFAULT_LINE_BUFFER_SIZE)
{
Gbl_LineBufferSize = ASL_DEFAULT_LINE_BUFFER_SIZE;
AslGbl_LineBufferSize = ASL_DEFAULT_LINE_BUFFER_SIZE;
}
printf ("Line Buffer Size: %u\n", Gbl_LineBufferSize);
printf ("Line Buffer Size: %u\n", AslGbl_LineBufferSize);
break;
case 'n': /* Parse only */
Gbl_ParseOnlyFlag = TRUE;
AslGbl_ParseOnlyFlag = TRUE;
break;
case 'o': /* Control compiler AML optimizations */
@ -673,10 +673,10 @@ AslDoOptions (
/* Disable all optimizations */
Gbl_FoldConstants = FALSE;
Gbl_IntegerOptimizationFlag = FALSE;
Gbl_ReferenceOptimizationFlag = FALSE;
Gbl_OptimizeTrivialParseNodes = FALSE;
AslGbl_FoldConstants = FALSE;
AslGbl_IntegerOptimizationFlag = FALSE;
AslGbl_ReferenceOptimizationFlag = FALSE;
AslGbl_OptimizeTrivialParseNodes = FALSE;
break;
@ -684,7 +684,7 @@ AslDoOptions (
/* Display compile time(s) */
Gbl_CompileTimesFlag = TRUE;
AslGbl_CompileTimesFlag = TRUE;
break;
case 'd':
@ -708,35 +708,35 @@ AslDoOptions (
* No affect if Gbl_DoExternals is false.
*/
Gbl_DoExternalsInPlace = TRUE;
AslGbl_DoExternalsInPlace = TRUE;
break;
case 'f':
/* Disable folding on "normal" expressions */
Gbl_FoldConstants = FALSE;
AslGbl_FoldConstants = FALSE;
break;
case 'i':
/* Disable integer optimization to constants */
Gbl_IntegerOptimizationFlag = FALSE;
AslGbl_IntegerOptimizationFlag = FALSE;
break;
case 'n':
/* Disable named reference optimization */
Gbl_ReferenceOptimizationFlag = FALSE;
AslGbl_ReferenceOptimizationFlag = FALSE;
break;
case 't':
/* Disable heavy typechecking */
Gbl_DoTypechecking = FALSE;
AslGbl_DoTypechecking = FALSE;
break;
default:
@ -752,13 +752,13 @@ AslDoOptions (
{
case '^': /* Proprocess only, emit (.i) file */
Gbl_PreprocessOnly = TRUE;
Gbl_PreprocessorOutputFlag = TRUE;
AslGbl_PreprocessOnly = TRUE;
AslGbl_PreprocessorOutputFlag = TRUE;
break;
case 'n': /* Disable preprocessor */
Gbl_PreprocessFlag = FALSE;
AslGbl_PreprocessFlag = FALSE;
break;
default:
@ -770,25 +770,25 @@ AslDoOptions (
case 'p': /* Override default AML output filename */
Gbl_OutputFilenamePrefix = AcpiGbl_Optarg;
UtConvertBackslashes (Gbl_OutputFilenamePrefix);
Gbl_UseDefaultAmlFilename = FALSE;
AslGbl_OutputFilenamePrefix = AcpiGbl_Optarg;
UtConvertBackslashes (AslGbl_OutputFilenamePrefix);
AslGbl_UseDefaultAmlFilename = FALSE;
break;
case 'q': /* ASL/ASl+ converter: compile only and leave badaml. */
printf ("Convert ASL to ASL+ with comments\n");
Gbl_FoldConstants = FALSE;
Gbl_IntegerOptimizationFlag = FALSE;
Gbl_ReferenceOptimizationFlag = FALSE;
Gbl_OptimizeTrivialParseNodes = FALSE;
Gbl_DoExternalsInPlace = TRUE;
AslGbl_FoldConstants = FALSE;
AslGbl_IntegerOptimizationFlag = FALSE;
AslGbl_ReferenceOptimizationFlag = FALSE;
AslGbl_OptimizeTrivialParseNodes = FALSE;
AslGbl_DoExternalsInPlace = TRUE;
AcpiGbl_CaptureComments = TRUE;
return (0);
case 'r': /* Override revision found in table header */
Gbl_RevisionOverride = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
AslGbl_RevisionOverride = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
break;
case 's': /* Create AML in a source code file */
@ -799,21 +799,21 @@ AslDoOptions (
/* Produce assembly code output file */
Gbl_AsmOutputFlag = TRUE;
AslGbl_AsmOutputFlag = TRUE;
break;
case 'c':
/* Produce C hex output file */
Gbl_C_OutputFlag = TRUE;
AslGbl_C_OutputFlag = TRUE;
break;
case 'o':
/* Produce AML offset table in C */
Gbl_C_OffsetTableFlag = TRUE;
AslGbl_C_OffsetTableFlag = TRUE;
break;
default:
@ -829,17 +829,17 @@ AslDoOptions (
{
case 'a':
Gbl_HexOutputFlag = HEX_OUTPUT_ASM;
AslGbl_HexOutputFlag = HEX_OUTPUT_ASM;
break;
case 'c':
Gbl_HexOutputFlag = HEX_OUTPUT_C;
AslGbl_HexOutputFlag = HEX_OUTPUT_C;
break;
case 's':
Gbl_HexOutputFlag = HEX_OUTPUT_ASL;
AslGbl_HexOutputFlag = HEX_OUTPUT_ASL;
break;
default:
@ -851,7 +851,7 @@ AslDoOptions (
case 'T': /* Create a ACPI table template file */
Gbl_DoTemplates = TRUE;
AslGbl_DoTemplates = TRUE;
break;
case 'v': /* Version and verbosity settings */
@ -867,15 +867,15 @@ AslDoOptions (
/* Disable all error/warning/remark messages */
Gbl_NoErrors = TRUE;
AslGbl_NoErrors = TRUE;
break;
case 'e':
/* Disable all warning/remark messages (errors only) */
Gbl_DisplayRemarks = FALSE;
Gbl_DisplayWarnings = FALSE;
AslGbl_DisplayRemarks = FALSE;
AslGbl_DisplayWarnings = FALSE;
break;
case 'i':
@ -888,29 +888,29 @@ AslDoOptions (
* 4) Error/warning messages are formatted appropriately to
* be recognized by MS Visual Studio
*/
Gbl_VerboseErrors = FALSE;
Gbl_DoSignon = FALSE;
Gbl_Files[ASL_FILE_STDERR].Handle = stdout;
AslGbl_VerboseErrors = FALSE;
AslGbl_DoSignon = FALSE;
AslGbl_Files[ASL_FILE_STDERR].Handle = stdout;
break;
case 'o':
Gbl_DisplayOptimizations = TRUE;
AslGbl_DisplayOptimizations = TRUE;
break;
case 'r':
Gbl_DisplayRemarks = FALSE;
AslGbl_DisplayRemarks = FALSE;
break;
case 's':
Gbl_DoSignon = FALSE;
AslGbl_DoSignon = FALSE;
break;
case 't':
Gbl_VerboseTemplates = TRUE;
AslGbl_VerboseTemplates = TRUE;
break;
case 'w':
@ -958,22 +958,22 @@ AslDoOptions (
{
case '1':
Gbl_WarningLevel = ASL_WARNING;
AslGbl_WarningLevel = ASL_WARNING;
break;
case '2':
Gbl_WarningLevel = ASL_WARNING2;
AslGbl_WarningLevel = ASL_WARNING2;
break;
case '3':
Gbl_WarningLevel = ASL_WARNING3;
AslGbl_WarningLevel = ASL_WARNING3;
break;
case 'e':
Gbl_WarningsAsErrors = TRUE;
AslGbl_WarningsAsErrors = TRUE;
break;
default:
@ -990,7 +990,7 @@ AslDoOptions (
case 'z':
Gbl_UseOriginalCompilerId = TRUE;
AslGbl_UseOriginalCompilerId = TRUE;
break;
default:
@ -1050,7 +1050,7 @@ static int
AslDoResponseFile (
char *Filename)
{
char *argv = StringBuffer2;
char *argv = AslGbl_StringBuffer2;
FILE *ResponseFile;
int OptStatus = 0;
int Opterr;
@ -1074,11 +1074,11 @@ AslDoResponseFile (
* Process all lines in the response file. There must be one complete
* option per line
*/
while (fgets (StringBuffer, ASL_STRING_BUFFER_SIZE, ResponseFile))
while (fgets (AslGbl_StringBuffer, ASL_STRING_BUFFER_SIZE, ResponseFile))
{
/* Compress all tokens, allowing us to use a single argv entry */
AslMergeOptionTokens (StringBuffer, StringBuffer2);
AslMergeOptionTokens (AslGbl_StringBuffer, AslGbl_StringBuffer2);
/* Process the option */
@ -1089,7 +1089,7 @@ AslDoResponseFile (
if (OptStatus)
{
printf ("Invalid option in command file %s: %s\n",
Filename, StringBuffer);
Filename, AslGbl_StringBuffer);
break;
}
}

View File

@ -205,7 +205,7 @@ TrCreateOp (
{
case PARSEOP_ASL_CODE:
Gbl_ParseTreeRoot = Op;
AslGbl_ParseTreeRoot = Op;
Op->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
DbgPrint (ASL_PARSE_OUTPUT, "ASLCODE (Tree Completed)->");
break;
@ -784,11 +784,11 @@ TrAllocateOp (
Op = UtParseOpCacheCalloc ();
Op->Asl.ParseOpcode = (UINT16) ParseOpcode;
Op->Asl.Filename = Gbl_Files[ASL_FILE_INPUT].Filename;
Op->Asl.LineNumber = Gbl_CurrentLineNumber;
Op->Asl.LogicalLineNumber = Gbl_LogicalLineNumber;
Op->Asl.LogicalByteOffset = Gbl_CurrentLineOffset;
Op->Asl.Column = Gbl_CurrentColumn;
Op->Asl.Filename = AslGbl_Files[ASL_FILE_INPUT].Filename;
Op->Asl.LineNumber = AslGbl_CurrentLineNumber;
Op->Asl.LogicalLineNumber = AslGbl_LogicalLineNumber;
Op->Asl.LogicalByteOffset = AslGbl_CurrentLineOffset;
Op->Asl.Column = AslGbl_CurrentColumn;
UtSetParseOpName (Op);
@ -796,7 +796,7 @@ TrAllocateOp (
if (AcpiGbl_CaptureComments)
{
LatestOp = Gbl_CommentState.LatestParseOp;
LatestOp = AslGbl_CommentState.LatestParseOp;
Op->Asl.InlineComment = NULL;
Op->Asl.EndNodeComment = NULL;
Op->Asl.CommentList = NULL;
@ -813,9 +813,9 @@ TrAllocateOp (
{
CvDbgPrint ("latest op: %s\n", LatestOp->Asl.ParseOpName);
Op->Asl.FileChanged = TRUE;
if (Gbl_IncludeFileStack)
if (AslGbl_IncludeFileStack)
{
Op->Asl.ParentFilename = Gbl_IncludeFileStack->Filename;
Op->Asl.ParentFilename = AslGbl_IncludeFileStack->Filename;
}
else
{
@ -823,10 +823,10 @@ TrAllocateOp (
}
}
Gbl_CommentState.LatestParseOp = Op;
AslGbl_CommentState.LatestParseOp = Op;
CvDbgPrint ("TrAllocateOp=Set latest parse op to this op.\n");
CvDbgPrint (" Op->Asl.ParseOpName = %s\n",
Gbl_CommentState.LatestParseOp->Asl.ParseOpName);
AslGbl_CommentState.LatestParseOp->Asl.ParseOpName);
CvDbgPrint (" Op->Asl.ParseOpcode = 0x%x\n", ParseOpcode);
if (Op->Asl.FileChanged)
@ -843,23 +843,23 @@ TrAllocateOp (
(ParseOpcode != PARSEOP_DEFINITION_BLOCK))
{
CvDbgPrint ("Parsing paren/Brace op now!\n");
Gbl_CommentState.ParsingParenBraceNode = Op;
AslGbl_CommentState.ParsingParenBraceNode = Op;
}
if (Gbl_CommentListHead)
if (AslGbl_CommentListHead)
{
CvDbgPrint ("Transferring...\n");
Op->Asl.CommentList = Gbl_CommentListHead;
Gbl_CommentListHead = NULL;
Gbl_CommentListTail = NULL;
Op->Asl.CommentList = AslGbl_CommentListHead;
AslGbl_CommentListHead = NULL;
AslGbl_CommentListTail = NULL;
CvDbgPrint (" Transferred current comment list to this op.\n");
CvDbgPrint (" %s\n", Op->Asl.CommentList->Comment);
}
if (Gbl_InlineCommentBuffer)
if (AslGbl_InlineCommentBuffer)
{
Op->Asl.InlineComment = Gbl_InlineCommentBuffer;
Gbl_InlineCommentBuffer = NULL;
Op->Asl.InlineComment = AslGbl_InlineCommentBuffer;
AslGbl_InlineCommentBuffer = NULL;
CvDbgPrint ("Transferred current inline comment list to this op.\n");
}
}
@ -894,7 +894,7 @@ TrPrintOpFlags (
{
if (Flags & FlagBit)
{
DbgPrint (OutputLevel, " %s", Gbl_OpFlagNames[i]);
DbgPrint (OutputLevel, " %s", AslGbl_OpFlagNames[i]);
}
FlagBit <<= 1;

View File

@ -728,11 +728,7 @@ OpcEncodePldBuffer (
UINT32 Dword;
Buffer = ACPI_ALLOCATE_ZEROED (ACPI_PLD_BUFFER_SIZE);
if (!Buffer)
{
return (NULL);
}
Buffer = ACPI_CAST_PTR (UINT32, UtLocalCacheCalloc (ACPI_PLD_BUFFER_SIZE));
/* First 32 bits */

View File

@ -216,16 +216,16 @@ ApCheckForPredefinedMethod (
case ACPI_EVENT_RESERVED_NAME: /* _Lxx/_Exx/_Wxx/_Qxx methods */
Gbl_ReservedMethods++;
AslGbl_ReservedMethods++;
/* NumArguments must be zero for all _Lxx/_Exx/_Wxx/_Qxx methods */
if (MethodInfo->NumArguments != 0)
{
sprintf (MsgBuffer, "%s requires %u", Op->Asl.ExternalName, 0);
sprintf (AslGbl_MsgBuffer, "%s requires %u", Op->Asl.ExternalName, 0);
AslError (ASL_WARNING, ASL_MSG_RESERVED_ARG_COUNT_HI, Op,
MsgBuffer);
AslGbl_MsgBuffer);
}
break;
@ -238,25 +238,25 @@ ApCheckForPredefinedMethod (
* Some methods are allowed to have a "minimum" number of args
* (_SCP) because their definition in ACPI has changed over time.
*/
Gbl_ReservedMethods++;
AslGbl_ReservedMethods++;
ThisName = &AcpiGbl_PredefinedMethods[Index];
RequiredArgCount = METHOD_GET_ARG_COUNT (ThisName->Info.ArgumentList);
if (MethodInfo->NumArguments != RequiredArgCount)
{
sprintf (MsgBuffer, "%4.4s requires %u",
sprintf (AslGbl_MsgBuffer, "%4.4s requires %u",
ThisName->Info.Name, RequiredArgCount);
if (MethodInfo->NumArguments < RequiredArgCount)
{
AslError (ASL_WARNING, ASL_MSG_RESERVED_ARG_COUNT_LO, Op,
MsgBuffer);
AslGbl_MsgBuffer);
}
else if ((MethodInfo->NumArguments > RequiredArgCount) &&
!(ThisName->Info.ArgumentList & ARG_COUNT_IS_MINIMUM))
{
AslError (ASL_WARNING, ASL_MSG_RESERVED_ARG_COUNT_HI, Op,
MsgBuffer);
AslGbl_MsgBuffer);
}
}
@ -267,14 +267,14 @@ ApCheckForPredefinedMethod (
if (MethodInfo->NumReturnNoValue &&
ThisName->Info.ExpectedBtypes)
{
AcpiUtGetExpectedReturnTypes (StringBuffer,
AcpiUtGetExpectedReturnTypes (AslGbl_StringBuffer,
ThisName->Info.ExpectedBtypes);
sprintf (MsgBuffer, "%s required for %4.4s",
StringBuffer, ThisName->Info.Name);
sprintf (AslGbl_MsgBuffer, "%s required for %4.4s",
AslGbl_StringBuffer, ThisName->Info.Name);
AslError (ASL_WARNING, ASL_MSG_RESERVED_RETURN_VALUE, Op,
MsgBuffer);
AslGbl_MsgBuffer);
}
break;
}
@ -365,10 +365,10 @@ ApCheckPredefinedReturnValue (
* Note: Disable compiler errors/warnings because any errors will be
* caught when analyzing the parent method. Eliminates duplicate errors.
*/
Gbl_AllExceptionsDisabled = TRUE;
AslGbl_AllExceptionsDisabled = TRUE;
Index = ApCheckForPredefinedName (MethodInfo->Op,
MethodInfo->Op->Asl.NameSeg);
Gbl_AllExceptionsDisabled = FALSE;
AslGbl_AllExceptionsDisabled = FALSE;
switch (Index)
{
@ -804,20 +804,20 @@ ApCheckObjectType (
/* Format the expected types and emit an error message */
AcpiUtGetExpectedReturnTypes (StringBuffer, ExpectedBtypes);
AcpiUtGetExpectedReturnTypes (AslGbl_StringBuffer, ExpectedBtypes);
if (PackageIndex == ACPI_NOT_PACKAGE_ELEMENT)
{
sprintf (MsgBuffer, "%4.4s: found %s, %s required",
PredefinedName, TypeName, StringBuffer);
sprintf (AslGbl_MsgBuffer, "%4.4s: found %s, %s required",
PredefinedName, TypeName, AslGbl_StringBuffer);
}
else
{
sprintf (MsgBuffer, "%4.4s: found %s at index %u, %s required",
PredefinedName, TypeName, PackageIndex, StringBuffer);
sprintf (AslGbl_MsgBuffer, "%4.4s: found %s at index %u, %s required",
PredefinedName, TypeName, PackageIndex, AslGbl_StringBuffer);
}
AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, MsgBuffer);
AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, AslGbl_MsgBuffer);
return (AE_TYPE);
}
@ -853,7 +853,7 @@ ApDisplayReservedNames (
ThisName = AcpiGbl_PredefinedMethods;
while (ThisName->Info.Name[0])
{
AcpiUtDisplayPredefinedMethod (MsgBuffer, ThisName, FALSE);
AcpiUtDisplayPredefinedMethod (AslGbl_MsgBuffer, ThisName, FALSE);
Count++;
ThisName = AcpiUtGetNextPredefinedMethod (ThisName);
}
@ -869,11 +869,11 @@ ApDisplayReservedNames (
ThisName = AcpiGbl_ResourceNames;
while (ThisName->Info.Name[0])
{
NumTypes = AcpiUtGetResourceBitWidth (MsgBuffer,
NumTypes = AcpiUtGetResourceBitWidth (AslGbl_MsgBuffer,
ThisName->Info.ArgumentList);
printf ("%4.4s Field is %s bits wide%s\n",
ThisName->Info.Name, MsgBuffer,
ThisName->Info.Name, AslGbl_MsgBuffer,
(NumTypes > 1) ? " (depending on descriptor type)" : "");
Count++;

View File

@ -417,11 +417,11 @@ ApCheckPackage (
if (Count & 1)
{
sprintf (MsgBuffer, "%4.4s: Package length, %d, must be even.",
sprintf (AslGbl_MsgBuffer, "%4.4s: Package length, %d, must be even.",
Predefined->Info.Name, Count);
AslError (ASL_ERROR, ASL_MSG_RESERVED_PACKAGE_LENGTH,
ParentOp->Asl.Child, MsgBuffer);
ParentOp->Asl.Child, AslGbl_MsgBuffer);
}
/* Validate the alternating types */
@ -538,7 +538,7 @@ ApCustomPackage (
Version = (UINT32) Op->Asl.Value.Integer;
if (Op->Asl.ParseOpcode != PARSEOP_INTEGER)
{
AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, MsgBuffer);
AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, AslGbl_MsgBuffer);
return;
}
@ -917,10 +917,10 @@ ApPackageTooSmall (
UINT32 ExpectedCount)
{
sprintf (MsgBuffer, "%s: length %u, required minimum is %u",
sprintf (AslGbl_MsgBuffer, "%s: length %u, required minimum is %u",
PredefinedName, Count, ExpectedCount);
AslError (ASL_ERROR, ASL_MSG_RESERVED_PACKAGE_LENGTH, Op, MsgBuffer);
AslError (ASL_ERROR, ASL_MSG_RESERVED_PACKAGE_LENGTH, Op, AslGbl_MsgBuffer);
}
@ -946,9 +946,9 @@ ApZeroLengthPackage (
ACPI_PARSE_OBJECT *Op)
{
sprintf (MsgBuffer, "%s: length is zero", PredefinedName);
sprintf (AslGbl_MsgBuffer, "%s: length is zero", PredefinedName);
AslError (ASL_ERROR, ASL_MSG_RESERVED_PACKAGE_LENGTH, Op, MsgBuffer);
AslError (ASL_ERROR, ASL_MSG_RESERVED_PACKAGE_LENGTH, Op, AslGbl_MsgBuffer);
}
@ -975,8 +975,8 @@ ApPackageTooLarge (
UINT32 ExpectedCount)
{
sprintf (MsgBuffer, "%s: length is %u, only %u required",
sprintf (AslGbl_MsgBuffer, "%s: length is %u, only %u required",
PredefinedName, Count, ExpectedCount);
AslError (ASL_REMARK, ASL_MSG_RESERVED_PACKAGE_LENGTH, Op, MsgBuffer);
AslError (ASL_REMARK, ASL_MSG_RESERVED_PACKAGE_LENGTH, Op, AslGbl_MsgBuffer);
}

View File

@ -230,7 +230,7 @@ AslPruneParseTree (
AcpiOsPrintf ("\nRemoving Objects:\n");
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
PrTreePruneWalk, NULL, ACPI_CAST_PTR (void, &PruneObj));
AcpiOsPrintf ("\n%u Total Objects Removed\n", PruneObj.Count);

View File

@ -197,7 +197,7 @@ RsSmallAddressCheck (
ACPI_PARSE_OBJECT *Op)
{
if (Gbl_NoResourceChecking)
if (AslGbl_NoResourceChecking)
{
return;
}
@ -329,7 +329,7 @@ RsLargeAddressCheck (
ACPI_PARSE_OBJECT *Op)
{
if (Gbl_NoResourceChecking)
if (AslGbl_NoResourceChecking)
{
return;
}

View File

@ -197,49 +197,49 @@ AslInitializeGlobals (
/* Init compiler globals */
Gbl_SyntaxError = 0;
Gbl_CurrentColumn = 0;
Gbl_CurrentLineNumber = 1;
Gbl_LogicalLineNumber = 1;
Gbl_CurrentLineOffset = 0;
Gbl_InputFieldCount = 0;
Gbl_InputByteCount = 0;
Gbl_NsLookupCount = 0;
Gbl_LineBufPtr = Gbl_CurrentLineBuffer;
AslGbl_SyntaxError = 0;
AslGbl_CurrentColumn = 0;
AslGbl_CurrentLineNumber = 1;
AslGbl_LogicalLineNumber = 1;
AslGbl_CurrentLineOffset = 0;
AslGbl_InputFieldCount = 0;
AslGbl_InputByteCount = 0;
AslGbl_NsLookupCount = 0;
AslGbl_LineBufPtr = AslGbl_CurrentLineBuffer;
Gbl_ErrorLog = NULL;
Gbl_NextError = NULL;
Gbl_Signature = NULL;
Gbl_FileType = 0;
AslGbl_ErrorLog = NULL;
AslGbl_NextError = NULL;
AslGbl_Signature = NULL;
AslGbl_FileType = 0;
TotalExecutableOpcodes = 0;
TotalNamedObjects = 0;
TotalKeywords = 0;
TotalParseNodes = 0;
TotalMethods = 0;
TotalAllocations = 0;
TotalAllocated = 0;
TotalFolds = 0;
AslGbl_TotalExecutableOpcodes = 0;
AslGbl_TotalNamedObjects = 0;
AslGbl_TotalKeywords = 0;
AslGbl_TotalParseNodes = 0;
AslGbl_TotalMethods = 0;
AslGbl_TotalAllocations = 0;
AslGbl_TotalAllocated = 0;
AslGbl_TotalFolds = 0;
AslGbl_NextEvent = 0;
for (i = 0; i < ASL_NUM_REPORT_LEVELS; i++)
{
Gbl_ExceptionCount[i] = 0;
AslGbl_ExceptionCount[i] = 0;
}
for (i = ASL_FILE_INPUT; i <= ASL_MAX_FILE_TYPE; i++)
{
Gbl_Files[i].Handle = NULL;
Gbl_Files[i].Filename = NULL;
AslGbl_Files[i].Handle = NULL;
AslGbl_Files[i].Filename = NULL;
}
if (AcpiGbl_CaptureComments)
{
Gbl_CommentState.SpacesBefore = 0;
Gbl_CommentState.CommentType = 1;
Gbl_CommentState.LatestParseOp = NULL;
Gbl_CommentState.ParsingParenBraceNode = NULL;
Gbl_CommentState.CaptureComments = TRUE;
AslGbl_CommentState.SpacesBefore = 0;
AslGbl_CommentState.CommentType = 1;
AslGbl_CommentState.LatestParseOp = NULL;
AslGbl_CommentState.ParsingParenBraceNode = NULL;
AslGbl_CommentState.CaptureComments = TRUE;
}
}
@ -275,11 +275,11 @@ AslDetectSourceFileType (
* File contains ASCII source code. Determine if this is an ASL
* file or an ACPI data table file.
*/
while (fgets (Gbl_CurrentLineBuffer, Gbl_LineBufferSize, Info->Handle))
while (fgets (AslGbl_CurrentLineBuffer, AslGbl_LineBufferSize, Info->Handle))
{
/* Uppercase the buffer for caseless compare */
FileChar = Gbl_CurrentLineBuffer;
FileChar = AslGbl_CurrentLineBuffer;
while (*FileChar)
{
*FileChar = (char) toupper ((int) *FileChar);
@ -288,7 +288,7 @@ AslDetectSourceFileType (
/* Presence of "DefinitionBlock" indicates actual ASL code */
if (strstr (Gbl_CurrentLineBuffer, "DEFINITIONBLOCK"))
if (strstr (AslGbl_CurrentLineBuffer, "DEFINITIONBLOCK"))
{
/* Appears to be an ASL file */
@ -372,15 +372,15 @@ AslDoDisassembly (
/* Handle additional output files for disassembler */
Gbl_FileType = ASL_INPUT_TYPE_BINARY_ACPI_TABLE;
Status = FlOpenMiscOutputFiles (Gbl_OutputFilenamePrefix);
AslGbl_FileType = ASL_INPUT_TYPE_BINARY_ACPI_TABLE;
Status = FlOpenMiscOutputFiles (AslGbl_OutputFilenamePrefix);
/* This is where the disassembly happens */
AcpiGbl_DmOpt_Disasm = TRUE;
Status = AdAmlDisassemble (AslToFile,
Gbl_Files[ASL_FILE_INPUT].Filename, Gbl_OutputFilenamePrefix,
&Gbl_Files[ASL_FILE_INPUT].Filename);
AslGbl_Files[ASL_FILE_INPUT].Filename, AslGbl_OutputFilenamePrefix,
&AslGbl_Files[ASL_FILE_INPUT].Filename);
if (ACPI_FAILURE (Status))
{
return (Status);
@ -396,19 +396,19 @@ AslDoDisassembly (
(void) AcpiTerminate ();
/*
* Gbl_Files[ASL_FILE_INPUT].Filename was replaced with the
* AslGbl_Files[ASL_FILE_INPUT].Filename was replaced with the
* .DSL disassembly file, which can now be compiled if requested
*/
if (Gbl_DoCompile)
if (AslGbl_DoCompile)
{
AcpiOsPrintf ("\nCompiling \"%s\"\n",
Gbl_Files[ASL_FILE_INPUT].Filename);
AslGbl_Files[ASL_FILE_INPUT].Filename);
return (AE_CTRL_CONTINUE);
}
/* No need to free the filename string */
Gbl_Files[ASL_FILE_INPUT].Filename = NULL;
AslGbl_Files[ASL_FILE_INPUT].Filename = NULL;
UtDeleteLocalCaches ();
return (AE_OK);
@ -444,7 +444,7 @@ AslDoOneFile (
* files and the optional AML filename embedded in the input file
* DefinitionBlock declaration.
*/
Status = FlSplitInputPathname (Filename, &Gbl_DirectoryPath, NULL);
Status = FlSplitInputPathname (Filename, &AslGbl_DirectoryPath, NULL);
if (ACPI_FAILURE (Status))
{
return (Status);
@ -452,11 +452,11 @@ AslDoOneFile (
/* Take a copy of the input filename, convert any backslashes */
Gbl_Files[ASL_FILE_INPUT].Filename =
AslGbl_Files[ASL_FILE_INPUT].Filename =
UtLocalCacheCalloc (strlen (Filename) + 1);
strcpy (Gbl_Files[ASL_FILE_INPUT].Filename, Filename);
UtConvertBackslashes (Gbl_Files[ASL_FILE_INPUT].Filename);
strcpy (AslGbl_Files[ASL_FILE_INPUT].Filename, Filename);
UtConvertBackslashes (AslGbl_Files[ASL_FILE_INPUT].Filename);
/*
* AML Disassembly (Optional)
@ -474,19 +474,19 @@ AslDoOneFile (
* Open the input file. Here, this should be an ASCII source file,
* either an ASL file or a Data Table file
*/
Status = FlOpenInputFile (Gbl_Files[ASL_FILE_INPUT].Filename);
Status = FlOpenInputFile (AslGbl_Files[ASL_FILE_INPUT].Filename);
if (ACPI_FAILURE (Status))
{
AePrintErrorLog (ASL_FILE_STDERR);
return (AE_ERROR);
}
Gbl_OriginalInputFileSize = FlGetFileSize (ASL_FILE_INPUT);
AslGbl_OriginalInputFileSize = FlGetFileSize (ASL_FILE_INPUT);
/* Determine input file type */
Gbl_FileType = AslDetectSourceFileType (&Gbl_Files[ASL_FILE_INPUT]);
if (Gbl_FileType == ASL_INPUT_TYPE_BINARY)
AslGbl_FileType = AslDetectSourceFileType (&AslGbl_Files[ASL_FILE_INPUT]);
if (AslGbl_FileType == ASL_INPUT_TYPE_BINARY)
{
return (AE_ERROR);
}
@ -495,14 +495,14 @@ AslDoOneFile (
* If -p not specified, we will use the input filename as the
* output filename prefix
*/
if (Gbl_UseDefaultAmlFilename)
if (AslGbl_UseDefaultAmlFilename)
{
Gbl_OutputFilenamePrefix = Gbl_Files[ASL_FILE_INPUT].Filename;
AslGbl_OutputFilenamePrefix = AslGbl_Files[ASL_FILE_INPUT].Filename;
}
/* Open the optional output files (listings, etc.) */
Status = FlOpenMiscOutputFiles (Gbl_OutputFilenamePrefix);
Status = FlOpenMiscOutputFiles (AslGbl_OutputFilenamePrefix);
if (ACPI_FAILURE (Status))
{
AePrintErrorLog (ASL_FILE_STDERR);
@ -513,7 +513,7 @@ AslDoOneFile (
* Compilation of ASL source versus DataTable source uses different
* compiler subsystems
*/
switch (Gbl_FileType)
switch (AslGbl_FileType)
{
/*
* Data Table Compilation
@ -526,9 +526,9 @@ AslDoOneFile (
return (Status);
}
if (Gbl_Signature)
if (AslGbl_Signature)
{
Gbl_Signature = NULL;
AslGbl_Signature = NULL;
}
/* Check if any errors occurred during compile */
@ -576,16 +576,16 @@ AslDoOneFile (
/* ASL-to-ASL+ conversion - Perform immediate disassembly */
if (Gbl_DoAslConversion)
if (AslGbl_DoAslConversion)
{
/*
* New input file is the output AML file from above.
* New output is from the input ASL file from above.
*/
Gbl_OutputFilenamePrefix = Gbl_Files[ASL_FILE_INPUT].Filename;
CvDbgPrint ("OUTPUTFILENAME: %s\n", Gbl_OutputFilenamePrefix);
Gbl_Files[ASL_FILE_INPUT].Filename =
Gbl_Files[ASL_FILE_AML_OUTPUT].Filename;
AslGbl_OutputFilenamePrefix = AslGbl_Files[ASL_FILE_INPUT].Filename;
CvDbgPrint ("OUTPUTFILENAME: %s\n", AslGbl_OutputFilenamePrefix);
AslGbl_Files[ASL_FILE_INPUT].Filename =
AslGbl_Files[ASL_FILE_AML_OUTPUT].Filename;
AcpiGbl_DisasmFlag = TRUE;
fprintf (stderr, "\n");
AslDoDisassembly ();
@ -605,7 +605,7 @@ AslDoOneFile (
/* We have what appears to be an ACPI table, disassemble it */
FlCloseFile (ASL_FILE_INPUT);
Gbl_DoCompile = FALSE;
AslGbl_DoCompile = FALSE;
AcpiGbl_DisasmFlag = TRUE;
Status = AslDoDisassembly ();
return (Status);
@ -619,7 +619,7 @@ AslDoOneFile (
default:
printf ("Unknown file type %X\n", Gbl_FileType);
printf ("Unknown file type %X\n", AslGbl_FileType);
return (AE_ERROR);
}
}
@ -646,20 +646,20 @@ AslCheckForErrorExit (
* Return non-zero exit code if there have been errors, unless the
* global ignore error flag has been set
*/
if (!Gbl_IgnoreErrors)
if (!AslGbl_IgnoreErrors)
{
if (Gbl_ExceptionCount[ASL_ERROR] > 0)
if (AslGbl_ExceptionCount[ASL_ERROR] > 0)
{
return (AE_ERROR);
}
/* Optionally treat warnings as errors */
if (Gbl_WarningsAsErrors)
if (AslGbl_WarningsAsErrors)
{
if ((Gbl_ExceptionCount[ASL_WARNING] > 0) ||
(Gbl_ExceptionCount[ASL_WARNING2] > 0) ||
(Gbl_ExceptionCount[ASL_WARNING3] > 0))
if ((AslGbl_ExceptionCount[ASL_WARNING] > 0) ||
(AslGbl_ExceptionCount[ASL_WARNING2] > 0) ||
(AslGbl_ExceptionCount[ASL_WARNING3] > 0))
{
return (AE_ERROR);
}

View File

@ -212,22 +212,22 @@ AslDoLineDirective (
char *Filename;
UINT32 i;
Gbl_HasIncludeFiles = TRUE;
AslGbl_HasIncludeFiles = TRUE;
/* Eat the entire line that contains the #line directive */
Gbl_LineBufPtr = Gbl_CurrentLineBuffer;
AslGbl_LineBufPtr = AslGbl_CurrentLineBuffer;
while ((c = input()) != '\n' && c != EOF)
{
*Gbl_LineBufPtr = c;
Gbl_LineBufPtr++;
*AslGbl_LineBufPtr = c;
AslGbl_LineBufPtr++;
}
*Gbl_LineBufPtr = 0;
*AslGbl_LineBufPtr = 0;
/* First argument is the actual line number */
Token = strtok (Gbl_CurrentLineBuffer, " ");
Token = strtok (AslGbl_CurrentLineBuffer, " ");
if (!Token)
{
goto ResetAndExit;
@ -239,13 +239,13 @@ AslDoLineDirective (
/* Emit the appropriate number of newlines */
Gbl_CurrentColumn = 0;
if (LineNumber > Gbl_CurrentLineNumber)
AslGbl_CurrentColumn = 0;
if (LineNumber > AslGbl_CurrentLineNumber)
{
for (i = 0; i < (LineNumber - Gbl_CurrentLineNumber); i++)
for (i = 0; i < (LineNumber - AslGbl_CurrentLineNumber); i++)
{
FlWriteFile (ASL_FILE_SOURCE_OUTPUT, "\n", 1);
Gbl_CurrentColumn++;
AslGbl_CurrentColumn++;
}
}
@ -256,7 +256,7 @@ AslDoLineDirective (
Token = strtok (NULL, " \"");
if (Token)
{
Filename = ACPI_ALLOCATE_ZEROED (strlen (Token) + 1);
Filename = UtLocalCacheCalloc (strlen (Token) + 1);
strcpy (Filename, Token);
FlSetFilename (Filename);
}
@ -267,9 +267,9 @@ ResetAndExit:
/* Reset globals for a new line */
Gbl_CurrentLineOffset += Gbl_CurrentColumn;
Gbl_CurrentColumn = 0;
Gbl_LineBufPtr = Gbl_CurrentLineBuffer;
AslGbl_CurrentLineOffset += AslGbl_CurrentColumn;
AslGbl_CurrentColumn = 0;
AslGbl_LineBufPtr = AslGbl_CurrentLineBuffer;
}
@ -295,13 +295,13 @@ AslPopInputFileStack (
ASL_FILE_NODE *Fnode;
Gbl_PreviousIncludeFilename = Gbl_Files[ASL_FILE_INPUT].Filename;
Fnode = Gbl_IncludeFileStack;
AslGbl_PreviousIncludeFilename = AslGbl_Files[ASL_FILE_INPUT].Filename;
Fnode = AslGbl_IncludeFileStack;
DbgPrint (ASL_PARSE_OUTPUT,
"\nPop InputFile Stack, Fnode %p\n", Fnode);
DbgPrint (ASL_PARSE_OUTPUT,
"Include: Closing \"%s\"\n\n", Gbl_Files[ASL_FILE_INPUT].Filename);
"Include: Closing \"%s\"\n\n", AslGbl_Files[ASL_FILE_INPUT].Filename);
if (!Fnode)
{
@ -314,12 +314,12 @@ AslPopInputFileStack (
/* Update the top-of-stack */
Gbl_IncludeFileStack = Fnode->Next;
AslGbl_IncludeFileStack = Fnode->Next;
/* Reset global line counter and filename */
Gbl_Files[ASL_FILE_INPUT].Filename = Fnode->Filename;
Gbl_CurrentLineNumber = Fnode->CurrentLineNumber;
AslGbl_Files[ASL_FILE_INPUT].Filename = Fnode->Filename;
AslGbl_CurrentLineNumber = Fnode->CurrentLineNumber;
/* Point the parser to the popped file */
@ -362,14 +362,14 @@ AslPushInputFileStack (
Fnode = UtLocalCalloc (sizeof (ASL_FILE_NODE));
Fnode->File = yyin;
Fnode->Next = Gbl_IncludeFileStack;
Fnode->Next = AslGbl_IncludeFileStack;
Fnode->State = YY_CURRENT_BUFFER;
Fnode->Filename = Gbl_Files[ASL_FILE_INPUT].Filename;
Fnode->CurrentLineNumber = Gbl_CurrentLineNumber;
Fnode->Filename = AslGbl_Files[ASL_FILE_INPUT].Filename;
Fnode->CurrentLineNumber = AslGbl_CurrentLineNumber;
/* Push it on the stack */
Gbl_IncludeFileStack = Fnode;
AslGbl_IncludeFileStack = Fnode;
/* Point the parser to this file */
@ -381,17 +381,17 @@ AslPushInputFileStack (
/* Reset the global line count and filename */
Gbl_Files[ASL_FILE_INPUT].Filename =
AslGbl_Files[ASL_FILE_INPUT].Filename =
UtLocalCacheCalloc (strlen (Filename) + 1);
strcpy (Gbl_Files[ASL_FILE_INPUT].Filename, Filename);
strcpy (AslGbl_Files[ASL_FILE_INPUT].Filename, Filename);
Gbl_CurrentLineNumber = 1;
AslGbl_CurrentLineNumber = 1;
yyin = InputFile;
/* converter: reset the comment state to STANDARD_COMMENT */
Gbl_CommentState.CommentType = STANDARD_COMMENT;
AslGbl_CommentState.CommentType = STANDARD_COMMENT;
}
@ -412,18 +412,18 @@ AslResetCurrentLineBuffer (
void)
{
if (Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Handle)
if (AslGbl_Files[ASL_FILE_SOURCE_OUTPUT].Handle)
{
FlWriteFile (ASL_FILE_SOURCE_OUTPUT, Gbl_CurrentLineBuffer,
Gbl_LineBufPtr - Gbl_CurrentLineBuffer);
FlWriteFile (ASL_FILE_SOURCE_OUTPUT, AslGbl_CurrentLineBuffer,
AslGbl_LineBufPtr - AslGbl_CurrentLineBuffer);
}
Gbl_CurrentLineOffset += Gbl_CurrentColumn;
Gbl_CurrentColumn = 0;
AslGbl_CurrentLineOffset += AslGbl_CurrentColumn;
AslGbl_CurrentColumn = 0;
Gbl_CurrentLineNumber++;
Gbl_LogicalLineNumber++;
Gbl_LineBufPtr = Gbl_CurrentLineBuffer;
AslGbl_CurrentLineNumber++;
AslGbl_LogicalLineNumber++;
AslGbl_LineBufPtr = AslGbl_CurrentLineBuffer;
}
@ -452,7 +452,7 @@ AslInsertLineBuffer (
return;
}
Gbl_InputByteCount++;
AslGbl_InputByteCount++;
/* Handle tabs. Convert to spaces */
@ -460,31 +460,31 @@ AslInsertLineBuffer (
{
SourceChar = ' ';
Count = ASL_SPACES_PER_TAB -
(Gbl_CurrentColumn & (ASL_SPACES_PER_TAB-1));
(AslGbl_CurrentColumn & (ASL_SPACES_PER_TAB-1));
}
for (i = 0; i < Count; i++)
{
Gbl_CurrentColumn++;
AslGbl_CurrentColumn++;
/* Insert the character into the line buffer */
*Gbl_LineBufPtr = (UINT8) SourceChar;
Gbl_LineBufPtr++;
*AslGbl_LineBufPtr = (UINT8) SourceChar;
AslGbl_LineBufPtr++;
if (Gbl_LineBufPtr >
(Gbl_CurrentLineBuffer + (Gbl_LineBufferSize - 1)))
if (AslGbl_LineBufPtr >
(AslGbl_CurrentLineBuffer + (AslGbl_LineBufferSize - 1)))
{
#if 0
/*
* Warning if we have split a long source line.
* <Probably overkill>
*/
sprintf (MsgBuffer, "Max %u", Gbl_LineBufferSize);
sprintf (MsgBuffer, "Max %u", AslGbl_LineBufferSize);
AslCommonError (ASL_WARNING, ASL_MSG_LONG_LINE,
Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
Gbl_CurrentLineOffset, Gbl_CurrentColumn,
Gbl_Files[ASL_FILE_INPUT].Filename, MsgBuffer);
AslGbl_CurrentLineNumber, AslGbl_LogicalLineNumber,
AslGbl_CurrentLineOffset, AslGbl_CurrentColumn,
AslGbl_Files[ASL_FILE_INPUT].Filename, MsgBuffer);
#endif
AslResetCurrentLineBuffer ();
@ -532,14 +532,14 @@ count (
{
case 2:
TotalKeywords++;
TotalNamedObjects++;
AslGbl_TotalKeywords++;
AslGbl_TotalNamedObjects++;
break;
case 3:
TotalKeywords++;
TotalExecutableOpcodes++;
AslGbl_TotalKeywords++;
AslGbl_TotalExecutableOpcodes++;
break;
default:
@ -550,7 +550,7 @@ count (
for (p = yytext; *p != '\0'; p++)
{
AslInsertLineBuffer (*p);
*Gbl_LineBufPtr = 0;
*AslGbl_LineBufPtr = 0;
}
}
@ -573,9 +573,9 @@ AslDoComment (
{
int c;
int c1 = 0;
char *StringBuffer = MsgBuffer;
char *EndBuffer = MsgBuffer + ASL_MSG_BUFFER_SIZE;
ASL_COMMENT_STATE CurrentState = Gbl_CommentState; /* to reference later on */
char *StringBuffer = AslGbl_MsgBuffer;
char *EndBuffer = AslGbl_MsgBuffer + ASL_MSG_BUFFER_SIZE;
ASL_COMMENT_STATE CurrentState = AslGbl_CommentState; /* to reference later on */
AslInsertLineBuffer ('/');
@ -615,9 +615,9 @@ loop:
if ((c1 == '/') && (c == '*'))
{
AslCommonError (ASL_WARNING, ASL_MSG_NESTED_COMMENT,
Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
Gbl_InputByteCount, Gbl_CurrentColumn,
Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
AslGbl_CurrentLineNumber, AslGbl_LogicalLineNumber,
AslGbl_InputByteCount, AslGbl_CurrentColumn,
AslGbl_Files[ASL_FILE_INPUT].Filename, NULL);
}
/* Comment is closed only if the NEXT character is a slash */
@ -654,9 +654,9 @@ EarlyEOF:
* Premature End-Of-File
*/
AslCommonError (ASL_ERROR, ASL_MSG_EARLY_EOF,
Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
Gbl_CurrentLineOffset, Gbl_CurrentColumn,
Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
AslGbl_CurrentLineNumber, AslGbl_LogicalLineNumber,
AslGbl_CurrentLineOffset, AslGbl_CurrentColumn,
AslGbl_Files[ASL_FILE_INPUT].Filename, NULL);
return (FALSE);
@ -665,9 +665,9 @@ BufferOverflow:
/* Comment was too long */
AslCommonError (ASL_ERROR, ASL_MSG_STRING_LENGTH,
Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
Gbl_CurrentLineOffset, Gbl_CurrentColumn,
Gbl_Files[ASL_FILE_INPUT].Filename, "Max length 4096");
AslGbl_CurrentLineNumber, AslGbl_LogicalLineNumber,
AslGbl_CurrentLineOffset, AslGbl_CurrentColumn,
AslGbl_Files[ASL_FILE_INPUT].Filename, "Max length 4096");
return (FALSE);
}
@ -691,9 +691,9 @@ AslDoCommentType2 (
void)
{
int c;
char *StringBuffer = MsgBuffer;
char *EndBuffer = MsgBuffer + ASL_MSG_BUFFER_SIZE;
ASL_COMMENT_STATE CurrentState = Gbl_CommentState;
char *StringBuffer = AslGbl_MsgBuffer;
char *EndBuffer = AslGbl_MsgBuffer + ASL_MSG_BUFFER_SIZE;
ASL_COMMENT_STATE CurrentState = AslGbl_CommentState;
AslInsertLineBuffer ('/');
@ -743,9 +743,9 @@ BufferOverflow:
/* Comment was too long */
AslCommonError (ASL_ERROR, ASL_MSG_STRING_LENGTH,
Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
Gbl_CurrentLineOffset, Gbl_CurrentColumn,
Gbl_Files[ASL_FILE_INPUT].Filename, "Max length 4096");
AslGbl_CurrentLineNumber, AslGbl_LogicalLineNumber,
AslGbl_CurrentLineOffset, AslGbl_CurrentColumn,
AslGbl_Files[ASL_FILE_INPUT].Filename, "Max length 4096");
return (FALSE);
}
@ -767,8 +767,8 @@ static char
AslDoStringLiteral (
void)
{
char *StringBuffer = MsgBuffer;
char *EndBuffer = MsgBuffer + ASL_MSG_BUFFER_SIZE;
char *StringBuffer = AslGbl_MsgBuffer;
char *EndBuffer = AslGbl_MsgBuffer + ASL_MSG_BUFFER_SIZE;
char *CleanString;
int StringChar;
UINT32 State = ASL_NORMAL_CHAR;
@ -882,9 +882,9 @@ DoCharacter:
/* Unknown escape sequence issue warning, but use the character */
AslCommonError (ASL_WARNING, ASL_MSG_INVALID_ESCAPE,
Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
Gbl_CurrentLineOffset, Gbl_CurrentColumn,
Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
AslGbl_CurrentLineNumber, AslGbl_LogicalLineNumber,
AslGbl_CurrentLineOffset, AslGbl_CurrentColumn,
AslGbl_Files[ASL_FILE_INPUT].Filename, NULL);
break;
}
break;
@ -909,9 +909,9 @@ DoCharacter:
if ((Digit == 0) || (Digit > ACPI_ASCII_MAX))
{
AslCommonError (ASL_WARNING, ASL_MSG_INVALID_STRING,
Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
Gbl_CurrentLineOffset, Gbl_CurrentColumn,
Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
AslGbl_CurrentLineNumber, AslGbl_LogicalLineNumber,
AslGbl_CurrentLineOffset, AslGbl_CurrentColumn,
AslGbl_Files[ASL_FILE_INPUT].Filename, NULL);
}
else
{
@ -953,9 +953,9 @@ DoCharacter:
if ((Digit == 0) || (Digit > ACPI_ASCII_MAX))
{
AslCommonError (ASL_WARNING, ASL_MSG_INVALID_STRING,
Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
Gbl_CurrentLineOffset, Gbl_CurrentColumn,
Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
AslGbl_CurrentLineNumber, AslGbl_LogicalLineNumber,
AslGbl_CurrentLineOffset, AslGbl_CurrentColumn,
AslGbl_Files[ASL_FILE_INPUT].Filename, NULL);
}
else
{
@ -997,9 +997,9 @@ DoCharacter:
* Premature End-Of-File
*/
AslCommonError (ASL_ERROR, ASL_MSG_EARLY_EOF,
Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
Gbl_CurrentLineOffset, Gbl_CurrentColumn,
Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
AslGbl_CurrentLineNumber, AslGbl_LogicalLineNumber,
AslGbl_CurrentLineOffset, AslGbl_CurrentColumn,
AslGbl_Files[ASL_FILE_INPUT].Filename, NULL);
return (FALSE);
@ -1009,8 +1009,8 @@ CompletedString:
*/
*StringBuffer = 0;
CleanString = UtLocalCacheCalloc (strlen (MsgBuffer) + 1);
strcpy (CleanString, MsgBuffer);
CleanString = UtLocalCacheCalloc (strlen (AslGbl_MsgBuffer) + 1);
strcpy (CleanString, AslGbl_MsgBuffer);
AslCompilerlval.s = CleanString;
return (TRUE);
@ -1020,8 +1020,8 @@ BufferOverflow:
/* Literal was too long */
AslCommonError (ASL_ERROR, ASL_MSG_STRING_LENGTH,
Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
Gbl_CurrentLineOffset, Gbl_CurrentColumn,
Gbl_Files[ASL_FILE_INPUT].Filename, "Max length 4096");
AslGbl_CurrentLineNumber, AslGbl_LogicalLineNumber,
AslGbl_CurrentLineOffset, AslGbl_CurrentColumn,
AslGbl_Files[ASL_FILE_INPUT].Filename, "Max length 4096");
return (FALSE);
}

View File

@ -181,9 +181,9 @@ AslLocalAllocate (
if (!Mem)
{
AslCommonError (ASL_ERROR, ASL_MSG_MEMORY_ALLOCATION,
Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
Gbl_InputByteCount, Gbl_CurrentColumn,
Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
AslGbl_CurrentLineNumber, AslGbl_LogicalLineNumber,
AslGbl_InputByteCount, AslGbl_CurrentColumn,
AslGbl_Files[ASL_FILE_INPUT].Filename, NULL);
exit (1);
}

View File

@ -175,7 +175,7 @@ NoEcho('
%token <i> PARSEOP_ACCESSATTRIB_BLOCK
%token <i> PARSEOP_ACCESSATTRIB_BLOCK_CALL
%token <i> PARSEOP_ACCESSATTRIB_BYTE
%token <i> PARSEOP_ACCESSATTRIB_MULTIBYTE
%token <i> PARSEOP_ACCESSATTRIB_BYTES
%token <i> PARSEOP_ACCESSATTRIB_QUICK
%token <i> PARSEOP_ACCESSATTRIB_RAW_BYTES
%token <i> PARSEOP_ACCESSATTRIB_RAW_PROCESS

View File

@ -404,8 +404,8 @@ TrAmlTransformWalkEnd (
if (Op->Asl.ParseOpcode == PARSEOP_DEFINITION_BLOCK)
{
Op->Asl.Value.Arg = Gbl_ExternalsListHead;
Gbl_ExternalsListHead = NULL;
Op->Asl.Value.Arg = AslGbl_ExternalsListHead;
AslGbl_ExternalsListHead = NULL;
}
return (AE_OK);
@ -455,12 +455,12 @@ TrTransformSubtree (
* TBD: Zero the tempname (_T_x) count. Probably shouldn't be a global,
* however
*/
Gbl_TempCount = 0;
AslGbl_TempCount = 0;
break;
case PARSEOP_EXTERNAL:
if (Gbl_DoExternals == TRUE)
if (AslGbl_DoExternals == TRUE)
{
ExDoExternal (Op);
}
@ -501,6 +501,16 @@ TrTransformSubtree (
AslError (ASL_WARNING, ASL_MSG_UNLOAD, Op, NULL);
break;
case PARSEOP_SLEEP:
/* Remark for very long sleep values */
if (Op->Asl.Child->Asl.Value.Integer > 1000)
{
AslError (ASL_REMARK, ASL_MSG_LONG_SLEEP, Op, NULL);
}
break;
default:
/* Nothing to do here for other opcodes */
@ -534,7 +544,7 @@ TrDoDefinitionBlock (
/* Reset external list when starting a definition block */
Gbl_ExternalsListHead = NULL;
AslGbl_ExternalsListHead = NULL;
Next = Op->Asl.Child;
for (i = 0; i < 5; i++)
@ -549,12 +559,12 @@ TrDoDefinitionBlock (
*/
if (!ACPI_COMPARE_NAME (Next->Asl.Value.String, ACPI_SIG_DSDT))
{
Gbl_ReferenceOptimizationFlag = FALSE;
AslGbl_ReferenceOptimizationFlag = FALSE;
}
}
}
Gbl_FirstLevelInsertionNode = Next;
AslGbl_FirstLevelInsertionNode = Next;
}
@ -600,7 +610,7 @@ TrDoSwitch (
/* Create a new temp name of the form _T_x */
PredicateValueName = TrAmlGetNextTempName (StartNode, &Gbl_TempCount);
PredicateValueName = TrAmlGetNextTempName (StartNode, &AslGbl_TempCount);
if (!PredicateValueName)
{
return;

View File

@ -256,7 +256,7 @@ TrSetOpIntegerValue (
if (AcpiGbl_CaptureComments &&
(ParseOpcode == PARSEOP_METHODCALL))
{
Gbl_CommentState.CaptureComments = FALSE;
AslGbl_CommentState.CaptureComments = FALSE;
}
return (Op);
@ -372,7 +372,7 @@ TrSetOpCurrentFilename (
ACPI_PARSE_OBJECT *Op)
{
Op->Asl.Filename = Gbl_PreviousIncludeFilename;
Op->Asl.Filename = AslGbl_PreviousIncludeFilename;
}
@ -398,9 +398,9 @@ TrSetOpIntegerWidth (
/* Handle command-line version override */
if (Gbl_RevisionOverride)
if (AslGbl_RevisionOverride)
{
AcpiUtSetIntegerWidth (Gbl_RevisionOverride);
AcpiUtSetIntegerWidth (AslGbl_RevisionOverride);
}
else
{
@ -434,8 +434,8 @@ TrSetOpEndLineNumber (
return;
}
Op->Asl.EndLine = Gbl_CurrentLineNumber;
Op->Asl.EndLogicalLine = Gbl_LogicalLineNumber;
Op->Asl.EndLine = AslGbl_CurrentLineNumber;
Op->Asl.EndLogicalLine = AslGbl_LogicalLineNumber;
}
@ -480,7 +480,7 @@ TrLinkOpChildren (
{
case PARSEOP_ASL_CODE:
Gbl_ParseTreeRoot = Op;
AslGbl_ParseTreeRoot = Op;
Op->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
DbgPrint (ASL_PARSE_OUTPUT, "ASLCODE (Tree Completed)->");
break;
@ -516,13 +516,13 @@ TrLinkOpChildren (
* then is an endBlk comment. Categorize it as so and distribute
* all regular comments to this parse op.
*/
if (Gbl_CommentListHead)
if (AslGbl_CommentListHead)
{
Op->Asl.EndBlkComment = Gbl_CommentListHead;
Op->Asl.EndBlkComment = AslGbl_CommentListHead;
CvDbgPrint ("EndBlk Comment for %s: %s",
Op->Asl.ParseOpName, Gbl_CommentListHead->Comment);
Gbl_CommentListHead = NULL;
Gbl_CommentListTail = NULL;
Op->Asl.ParseOpName, AslGbl_CommentListHead->Comment);
AslGbl_CommentListHead = NULL;
AslGbl_CommentListTail = NULL;
}
}
@ -592,7 +592,7 @@ TrLinkOpChildren (
if (AcpiGbl_CaptureComments)
{
Gbl_CommentState.LatestParseOp = Op;
AslGbl_CommentState.LatestParseOp = Op;
CvDbgPrint ("TrLinkOpChildren=====Set latest parse op to this op.\n");
}
@ -772,9 +772,9 @@ TrLinkChildOp (
{
if (Op1->Asl.ParseOpcode == PARSEOP_METHODCALL)
{
Gbl_CommentState.CaptureComments = TRUE;
AslGbl_CommentState.CaptureComments = TRUE;
}
Gbl_CommentState.LatestParseOp = Op1;
AslGbl_CommentState.LatestParseOp = Op1;
}
if (!Op1 || !Op2)
@ -827,7 +827,7 @@ TrWalkParseTree (
ACPI_STATUS Status;
if (!Gbl_ParseTreeRoot)
if (!AslGbl_ParseTreeRoot)
{
return (AE_OK);
}

View File

@ -354,7 +354,7 @@ UtDisplaySupportedTables (
/* All ACPI tables with the common table header */
printf ("\n Supported ACPI tables:\n");
for (TableData = Gbl_AcpiSupportedTables, i = 1;
for (TableData = AcpiGbl_SupportedTables, i = 1;
TableData->Signature; TableData++, i++)
{
printf ("%8u) %s %s\n", i,
@ -478,7 +478,7 @@ DbgPrint (
va_list Args;
if (!Gbl_DebugFlag)
if (!AslGbl_DebugFlag)
{
return;
}
@ -547,20 +547,20 @@ UtDisplaySummary (
/* Summary of main input and output files */
if (Gbl_FileType == ASL_INPUT_TYPE_ASCII_DATA)
if (AslGbl_FileType == ASL_INPUT_TYPE_ASCII_DATA)
{
FlPrintFile (FileId,
"%-14s %s - %u lines, %u bytes, %u fields\n",
"Table Input:",
Gbl_Files[ASL_FILE_INPUT].Filename, Gbl_CurrentLineNumber,
Gbl_InputByteCount, Gbl_InputFieldCount);
AslGbl_Files[ASL_FILE_INPUT].Filename, AslGbl_CurrentLineNumber,
AslGbl_InputByteCount, AslGbl_InputFieldCount);
if ((Gbl_ExceptionCount[ASL_ERROR] == 0) || (Gbl_IgnoreErrors))
if ((AslGbl_ExceptionCount[ASL_ERROR] == 0) || (AslGbl_IgnoreErrors))
{
FlPrintFile (FileId,
"%-14s %s - %u bytes\n",
"Binary Output:",
Gbl_Files[ASL_FILE_AML_OUTPUT].Filename, Gbl_TableLength);
AslGbl_Files[ASL_FILE_AML_OUTPUT].Filename, AslGbl_TableLength);
}
}
else
@ -568,22 +568,22 @@ UtDisplaySummary (
FlPrintFile (FileId,
"%-14s %s - %u lines, %u bytes, %u keywords\n",
"ASL Input:",
Gbl_Files[ASL_FILE_INPUT].Filename, Gbl_CurrentLineNumber,
Gbl_OriginalInputFileSize, TotalKeywords);
AslGbl_Files[ASL_FILE_INPUT].Filename, AslGbl_CurrentLineNumber,
AslGbl_OriginalInputFileSize, AslGbl_TotalKeywords);
/* AML summary */
if ((Gbl_ExceptionCount[ASL_ERROR] == 0) || (Gbl_IgnoreErrors))
if ((AslGbl_ExceptionCount[ASL_ERROR] == 0) || (AslGbl_IgnoreErrors))
{
if (Gbl_Files[ASL_FILE_AML_OUTPUT].Handle)
if (AslGbl_Files[ASL_FILE_AML_OUTPUT].Handle)
{
FlPrintFile (FileId,
"%-14s %s - %u bytes, %u named objects, "
"%u executable opcodes\n",
"AML Output:",
Gbl_Files[ASL_FILE_AML_OUTPUT].Filename,
AslGbl_Files[ASL_FILE_AML_OUTPUT].Filename,
FlGetFileSize (ASL_FILE_AML_OUTPUT),
TotalNamedObjects, TotalExecutableOpcodes);
AslGbl_TotalNamedObjects, AslGbl_TotalExecutableOpcodes);
}
}
}
@ -592,48 +592,48 @@ UtDisplaySummary (
for (i = ASL_FILE_SOURCE_OUTPUT; i <= ASL_MAX_FILE_TYPE; i++)
{
if (!Gbl_Files[i].Filename || !Gbl_Files[i].Handle)
if (!AslGbl_Files[i].Filename || !AslGbl_Files[i].Handle)
{
continue;
}
/* .SRC is a temp file unless specifically requested */
if ((i == ASL_FILE_SOURCE_OUTPUT) && (!Gbl_SourceOutputFlag))
if ((i == ASL_FILE_SOURCE_OUTPUT) && (!AslGbl_SourceOutputFlag))
{
continue;
}
/* .PRE is the preprocessor intermediate file */
if ((i == ASL_FILE_PREPROCESSOR) && (!Gbl_KeepPreprocessorTempFile))
if ((i == ASL_FILE_PREPROCESSOR) && (!AslGbl_KeepPreprocessorTempFile))
{
continue;
}
FlPrintFile (FileId, "%14s %s - %u bytes\n",
Gbl_Files[i].ShortDescription,
Gbl_Files[i].Filename, FlGetFileSize (i));
AslGbl_Files[i].ShortDescription,
AslGbl_Files[i].Filename, FlGetFileSize (i));
}
/* Error summary */
FlPrintFile (FileId,
"\nCompilation complete. %u Errors, %u Warnings, %u Remarks",
Gbl_ExceptionCount[ASL_ERROR],
Gbl_ExceptionCount[ASL_WARNING] +
Gbl_ExceptionCount[ASL_WARNING2] +
Gbl_ExceptionCount[ASL_WARNING3],
Gbl_ExceptionCount[ASL_REMARK]);
AslGbl_ExceptionCount[ASL_ERROR],
AslGbl_ExceptionCount[ASL_WARNING] +
AslGbl_ExceptionCount[ASL_WARNING2] +
AslGbl_ExceptionCount[ASL_WARNING3],
AslGbl_ExceptionCount[ASL_REMARK]);
if (Gbl_FileType != ASL_INPUT_TYPE_ASCII_DATA)
if (AslGbl_FileType != ASL_INPUT_TYPE_ASCII_DATA)
{
FlPrintFile (FileId, ", %u Optimizations",
Gbl_ExceptionCount[ASL_OPTIMIZATION]);
AslGbl_ExceptionCount[ASL_OPTIMIZATION]);
if (TotalFolds)
if (AslGbl_TotalFolds)
{
FlPrintFile (FileId, ", %u Constants Folded", TotalFolds);
FlPrintFile (FileId, ", %u Constants Folded", AslGbl_TotalFolds);
}
}
@ -670,10 +670,10 @@ UtCheckIntegerRange (
if ((Op->Asl.Value.Integer < LowValue) ||
(Op->Asl.Value.Integer > HighValue))
{
sprintf (MsgBuffer, "0x%X, allowable: 0x%X-0x%X",
sprintf (AslGbl_MsgBuffer, "0x%X, allowable: 0x%X-0x%X",
(UINT32) Op->Asl.Value.Integer, LowValue, HighValue);
AslError (ASL_ERROR, ASL_MSG_RANGE, Op, MsgBuffer);
AslError (ASL_ERROR, ASL_MSG_RANGE, Op, AslGbl_MsgBuffer);
return (NULL);
}
@ -899,9 +899,9 @@ UtDoConstant (
sprintf (ErrBuf, "While creating 64-bit constant: %s\n",
AcpiFormatException (Status));
AslCommonError (ASL_ERROR, ASL_MSG_SYNTAX, Gbl_CurrentLineNumber,
Gbl_LogicalLineNumber, Gbl_CurrentLineOffset,
Gbl_CurrentColumn, Gbl_Files[ASL_FILE_INPUT].Filename, ErrBuf);
AslCommonError (ASL_ERROR, ASL_MSG_SYNTAX, AslGbl_CurrentLineNumber,
AslGbl_LogicalLineNumber, AslGbl_CurrentLineOffset,
AslGbl_CurrentColumn, AslGbl_Files[ASL_FILE_INPUT].Filename, ErrBuf);
}
return (ConvertedInteger);

View File

@ -616,14 +616,14 @@ AnOperandTypecheckWalkEnd (
{
/* No match -- this is a type mismatch error */
AnFormatBtype (StringBuffer, ThisNodeBtype);
AnFormatBtype (StringBuffer2, RequiredBtypes);
AnFormatBtype (AslGbl_StringBuffer, ThisNodeBtype);
AnFormatBtype (AslGbl_StringBuffer2, RequiredBtypes);
sprintf (MsgBuffer, "[%s] found, %s operator requires [%s]",
StringBuffer, OpInfo->Name, StringBuffer2);
sprintf (AslGbl_MsgBuffer, "[%s] found, %s operator requires [%s]",
AslGbl_StringBuffer, OpInfo->Name, AslGbl_StringBuffer2);
AslError (ASL_ERROR, ASL_MSG_INVALID_TYPE,
ArgOp, MsgBuffer);
ArgOp, AslGbl_MsgBuffer);
}
NextArgument:
@ -742,7 +742,7 @@ AnOtherSemanticAnalysisWalkBegin (
{
case PARSEOP_STORE:
if (Gbl_DoTypechecking)
if (AslGbl_DoTypechecking)
{
AnAnalyzeStoreOperator (Op);
}
@ -935,7 +935,7 @@ AnAnalyzeStoreOperator (
case PARSEOP_INDEX:
case PARSEOP_REFOF:
if (!Gbl_EnableReferenceTypechecking)
if (!AslGbl_EnableReferenceTypechecking)
{
return;
}

View File

@ -237,7 +237,7 @@ XfCrossReferenceNamespace (
/* Walk the entire parse tree */
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE,
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE,
XfNamespaceLocateBegin, XfNamespaceLocateEnd, WalkState);
ACPI_FREE (WalkState);
@ -683,7 +683,7 @@ XfNamespaceLocateBegin (
* The namespace is also used as a lookup table for references to resource
* descriptors and the fields within them.
*/
Gbl_NsLookupCount++;
AslGbl_NsLookupCount++;
Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ObjectType,
ACPI_IMODE_EXECUTE, Flags, WalkState, &Node);
@ -881,12 +881,12 @@ XfNamespaceLocateBegin (
if (Message)
{
sprintf (MsgBuffer,
sprintf (AslGbl_MsgBuffer,
"Size mismatch, Tag: %u bit%s, Field: %u bit%s",
TagBitLength, (TagBitLength > 1) ? "s" : "",
FieldBitLength, (FieldBitLength > 1) ? "s" : "");
AslError (ASL_WARNING, Message, Op, MsgBuffer);
AslError (ASL_WARNING, Message, Op, AslGbl_MsgBuffer);
}
}
@ -952,10 +952,10 @@ XfNamespaceLocateBegin (
*/
if (Node->Type != ACPI_TYPE_METHOD)
{
sprintf (MsgBuffer, "%s is a %s",
sprintf (AslGbl_MsgBuffer, "%s is a %s",
Op->Asl.ExternalName, AcpiUtGetTypeName (Node->Type));
AslError (ASL_ERROR, ASL_MSG_NOT_METHOD, Op, MsgBuffer);
AslError (ASL_ERROR, ASL_MSG_NOT_METHOD, Op, AslGbl_MsgBuffer);
return_ACPI_STATUS (AE_OK);
}
@ -993,16 +993,16 @@ XfNamespaceLocateBegin (
*/
if (PassedArgs != Node->Value)
{
sprintf (MsgBuffer, "%s requires %u", Op->Asl.ExternalName,
Node->Value);
sprintf (AslGbl_MsgBuffer, "%s requires %u", Op->Asl.ExternalName,
Node->Value);
if (PassedArgs < Node->Value)
{
AslError (ASL_ERROR, ASL_MSG_ARG_COUNT_LO, Op, MsgBuffer);
AslError (ASL_ERROR, ASL_MSG_ARG_COUNT_LO, Op, AslGbl_MsgBuffer);
}
else
{
AslError (ASL_ERROR, ASL_MSG_ARG_COUNT_HI, Op, MsgBuffer);
AslError (ASL_ERROR, ASL_MSG_ARG_COUNT_HI, Op, AslGbl_MsgBuffer);
}
}
}

View File

@ -248,7 +248,7 @@ OtCreateXrefFile (
/* Build cross-reference output file if requested */
if (!Gbl_CrossReferenceOutput)
if (!AslGbl_CrossReferenceOutput)
{
return;
}
@ -260,7 +260,7 @@ OtCreateXrefFile (
OtPrintHeaders ("Part 2: Method Reference Map "
"(Invocations of each user-defined control method)");
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
OtXrefWalkPart2, NULL, &XrefInfo);
/* Cross-reference output file, part 3 (All other object refs) */
@ -268,7 +268,7 @@ OtCreateXrefFile (
OtPrintHeaders ("Part 3: Full Object Reference Map "
"(Methods that reference each object in namespace");
TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
OtXrefWalkPart3, NULL, &XrefInfo);
/* Cross-reference summary */
@ -620,7 +620,7 @@ OtXrefWalkPart2 (
XrefInfo->ThisMethodInvocations = 0;
XrefInfo->MethodOp = Op;
(void) TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
(void) TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
OtXrefAnalysisWalkPart2, NULL, XrefInfo);
if (!XrefInfo->ThisMethodInvocations)
@ -787,7 +787,7 @@ OtXrefWalkPart3 (
XrefInfo->ThisObjectReferences = 0;
XrefInfo->TotalObjects = 0;
(void) TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
(void) TrWalkParseTree (AslGbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
OtXrefAnalysisWalkPart3, NULL, XrefInfo);
if (!XrefInfo->ThisObjectReferences)

View File

@ -193,8 +193,8 @@ CvProcessComment (
*StringBuffer = 0;
CvDbgPrint ("Multi-line comment\n");
CommentString = UtLocalCacheCalloc (strlen (MsgBuffer) + 1);
strcpy (CommentString, MsgBuffer);
CommentString = UtLocalCacheCalloc (strlen (AslGbl_MsgBuffer) + 1);
strcpy (CommentString, AslGbl_MsgBuffer);
CvDbgPrint ("CommentString: %s\n", CommentString);
@ -313,8 +313,8 @@ CvProcessCommentType2 (
{
*StringBuffer = 0; /* null terminate */
CvDbgPrint ("Single-line comment\n");
CommentString = UtLocalCacheCalloc (strlen (MsgBuffer) + 1);
strcpy (CommentString, MsgBuffer);
CommentString = UtLocalCacheCalloc (strlen (AslGbl_MsgBuffer) + 1);
strcpy (CommentString, AslGbl_MsgBuffer);
/* If this comment lies on the same line as the latest parse op,
* assign it to that op's CommentAfter field. Saving in this field
@ -825,53 +825,53 @@ CvProcessCommentState (
if (Input != ' ')
{
Gbl_CommentState.SpacesBefore = 0;
AslGbl_CommentState.SpacesBefore = 0;
}
switch (Input)
{
case '\n':
Gbl_CommentState.CommentType = ASL_COMMENT_STANDARD;
AslGbl_CommentState.CommentType = ASL_COMMENT_STANDARD;
break;
case ' ':
/* Keep the CommentType the same */
Gbl_CommentState.SpacesBefore++;
AslGbl_CommentState.SpacesBefore++;
break;
case '(':
Gbl_CommentState.CommentType = ASL_COMMENT_OPEN_PAREN;
AslGbl_CommentState.CommentType = ASL_COMMENT_OPEN_PAREN;
break;
case ')':
Gbl_CommentState.CommentType = ASL_COMMENT_CLOSE_PAREN;
AslGbl_CommentState.CommentType = ASL_COMMENT_CLOSE_PAREN;
break;
case '{':
Gbl_CommentState.CommentType = ASL_COMMENT_STANDARD;
Gbl_CommentState.ParsingParenBraceNode = NULL;
AslGbl_CommentState.CommentType = ASL_COMMENT_STANDARD;
AslGbl_CommentState.ParsingParenBraceNode = NULL;
CvDbgPrint ("End Parsing paren/Brace node!\n");
break;
case '}':
Gbl_CommentState.CommentType = ASL_COMMENT_CLOSE_BRACE;
AslGbl_CommentState.CommentType = ASL_COMMENT_CLOSE_BRACE;
break;
case ',':
Gbl_CommentState.CommentType = ASLCOMMENT_INLINE;
AslGbl_CommentState.CommentType = ASLCOMMENT_INLINE;
break;
default:
Gbl_CommentState.CommentType = ASLCOMMENT_INLINE;
AslGbl_CommentState.CommentType = ASLCOMMENT_INLINE;
break;
}
}
@ -895,18 +895,18 @@ CvAddToCommentList (
char *ToAdd)
{
if (Gbl_CommentListHead)
if (AslGbl_CommentListHead)
{
Gbl_CommentListTail->Next = CvCommentNodeCalloc ();
Gbl_CommentListTail = Gbl_CommentListTail->Next;
AslGbl_CommentListTail->Next = CvCommentNodeCalloc ();
AslGbl_CommentListTail = AslGbl_CommentListTail->Next;
}
else
{
Gbl_CommentListHead = CvCommentNodeCalloc ();
Gbl_CommentListTail = Gbl_CommentListHead;
AslGbl_CommentListHead = CvCommentNodeCalloc ();
AslGbl_CommentListTail = AslGbl_CommentListHead;
}
Gbl_CommentListTail->Comment = ToAdd;
AslGbl_CommentListTail->Comment = ToAdd;
}
@ -976,8 +976,8 @@ CvPlaceComment(
ACPI_PARSE_OBJECT *ParenBraceNode;
LatestParseNode = Gbl_CommentState.LatestParseOp;
ParenBraceNode = Gbl_CommentState.ParsingParenBraceNode;
LatestParseNode = AslGbl_CommentState.LatestParseOp;
ParenBraceNode = AslGbl_CommentState.ParsingParenBraceNode;
CvDbgPrint ("Placing comment %s for type %d\n", CommentString, Type);
switch (Type)
@ -996,8 +996,8 @@ CvPlaceComment(
case ASL_COMMENT_OPEN_PAREN:
Gbl_InlineCommentBuffer =
CvAppendInlineComment(Gbl_InlineCommentBuffer,
AslGbl_InlineCommentBuffer =
CvAppendInlineComment(AslGbl_InlineCommentBuffer,
CommentString);
break;

View File

@ -522,10 +522,10 @@ CvSwitchFiles(
* if it does not exist, then abort.
*/
FlDeleteFile (ASL_FILE_AML_OUTPUT);
sprintf (MsgBuffer, "\"Cannot find %s\" - %s",
sprintf (AslGbl_MsgBuffer, "\"Cannot find %s\" - %s",
Filename, strerror (errno));
AslCommonError (ASL_ERROR, ASL_MSG_OPEN, 0, 0, 0, 0,
NULL, MsgBuffer);
NULL, AslGbl_MsgBuffer);
AslAbort ();
}

View File

@ -638,9 +638,9 @@ CvAddToFileTree (
/* delete the .xxx file */
FlDeleteFile (ASL_FILE_AML_OUTPUT);
sprintf (MsgBuffer, "\"%s\" - %s", Filename, strerror (errno));
sprintf (AslGbl_MsgBuffer, "\"%s\" - %s", Filename, strerror (errno));
AslCommonError (ASL_ERROR, ASL_MSG_OPEN, 0, 0, 0, 0,
NULL, MsgBuffer);
NULL, AslGbl_MsgBuffer);
AslAbort ();
}
}

View File

@ -184,7 +184,7 @@ DtInsertCompilerIds (
*
* DESCRIPTION: Main entry point for the data table compiler.
*
* Note: Assumes Gbl_Files[ASL_FILE_INPUT] is initialized and the file is
* Note: Assumes AslGbl_Files[ASL_FILE_INPUT] is initialized and the file is
* open at seek offset zero.
*
*****************************************************************************/
@ -209,7 +209,7 @@ DtDoCompile (
/* Preprocessor */
if (Gbl_PreprocessFlag)
if (AslGbl_PreprocessFlag)
{
/* Preprocessor */
@ -217,7 +217,7 @@ DtDoCompile (
PrDoPreprocess ();
UtEndEvent (Event);
if (Gbl_PreprocessOnly)
if (AslGbl_PreprocessOnly)
{
return (AE_OK);
}
@ -228,7 +228,7 @@ DtDoCompile (
* build the parse tree
*/
Event = UtBeginEvent ("Scan and parse input file");
FieldList = DtScanFile (Gbl_Files[ASL_FILE_INPUT].Handle);
FieldList = DtScanFile (AslGbl_Files[ASL_FILE_INPUT].Handle);
UtEndEvent (Event);
/* Did the parse tree get successfully constructed? */
@ -264,8 +264,8 @@ DtDoCompile (
/* Create/open the binary output file */
Gbl_Files[ASL_FILE_AML_OUTPUT].Filename = NULL;
Status = FlOpenAmlOutputFile (Gbl_OutputFilenamePrefix);
AslGbl_Files[ASL_FILE_AML_OUTPUT].Filename = NULL;
Status = FlOpenAmlOutputFile (AslGbl_OutputFilenamePrefix);
if (ACPI_FAILURE (Status))
{
goto CleanupAndExit;
@ -273,7 +273,7 @@ DtDoCompile (
/* Write the binary, then the optional hex file */
DtOutputBinary (Gbl_RootTable);
DtOutputBinary (AslGbl_RootTable);
HxDoHexOutput ();
DtWriteTableToListing ();
@ -319,9 +319,9 @@ DtInitialize (
AcpiUtSetIntegerWidth (2); /* Set width to 64 bits */
Gbl_FieldList = NULL;
Gbl_RootTable = NULL;
Gbl_SubtableStack = NULL;
AslGbl_FieldList = NULL;
AslGbl_RootTable = NULL;
AslGbl_SubtableStack = NULL;
sprintf (VersionString, "%X", (UINT32) ACPI_CA_VERSION);
return (AE_OK);
@ -353,7 +353,7 @@ DtInsertCompilerIds (
* Don't insert current compiler ID if requested. Used for compiler
* debug/validation only.
*/
if (Gbl_UseOriginalCompilerId)
if (AslGbl_UseOriginalCompilerId)
{
return;
}
@ -404,14 +404,14 @@ DtCompileDataTable (
Signature = DtGetFieldValue (*FieldList);
if (!Signature)
{
sprintf (MsgBuffer, "Expected \"%s\"", "Signature");
sprintf (AslGbl_MsgBuffer, "Expected \"%s\"", "Signature");
DtNameError (ASL_ERROR, ASL_MSG_INVALID_FIELD_NAME,
*FieldList, MsgBuffer);
*FieldList, AslGbl_MsgBuffer);
return (AE_ERROR);
}
Gbl_Signature = UtLocalCacheCalloc (strlen (Signature) + 1);
strcpy (Gbl_Signature, Signature);
AslGbl_Signature = UtLocalCacheCalloc (strlen (Signature) + 1);
strcpy (AslGbl_Signature, Signature);
/*
* Handle tables that don't use the common ACPI table header structure.
@ -453,18 +453,18 @@ DtCompileDataTable (
DtInsertCompilerIds (*FieldList);
Status = DtCompileTable (FieldList, AcpiDmTableInfoHeader,
&Gbl_RootTable);
&AslGbl_RootTable);
if (ACPI_FAILURE (Status))
{
return (Status);
}
DtPushSubtable (Gbl_RootTable);
DtPushSubtable (AslGbl_RootTable);
/* Validate the signature via the ACPI table list */
TableData = AcpiDmGetTableData (Signature);
if (!TableData || Gbl_CompileGeneric)
if (!TableData || AslGbl_CompileGeneric)
{
/* Unknown table signature and/or force generic compile */
@ -498,7 +498,7 @@ DtCompileDataTable (
return (Status);
}
DtInsertSubtable (Gbl_RootTable, Subtable);
DtInsertSubtable (AslGbl_RootTable, Subtable);
DtPopSubtable ();
}
}
@ -515,7 +515,7 @@ DtCompileDataTable (
DtSetTableLength ();
AcpiTableHeader = ACPI_CAST_PTR (
ACPI_TABLE_HEADER, Gbl_RootTable->Buffer);
ACPI_TABLE_HEADER, AslGbl_RootTable->Buffer);
DtSetTableChecksum (&AcpiTableHeader->Checksum);
DtDumpFieldList (RootField);
@ -612,21 +612,21 @@ DtCompileTable (
if (!LocalField)
{
sprintf (MsgBuffer, "Found NULL field - Field name \"%s\" needed",
sprintf (AslGbl_MsgBuffer, "Found NULL field - Field name \"%s\" needed",
Info->Name);
DtFatal (ASL_MSG_COMPILER_INTERNAL, NULL, MsgBuffer);
DtFatal (ASL_MSG_COMPILER_INTERNAL, NULL, AslGbl_MsgBuffer);
Status = AE_BAD_DATA;
goto Error;
}
/* Maintain table offsets */
LocalField->TableOffset = Gbl_CurrentTableOffset;
LocalField->TableOffset = AslGbl_CurrentTableOffset;
FieldLength = DtGetFieldLength (LocalField, Info);
Gbl_CurrentTableOffset += FieldLength;
AslGbl_CurrentTableOffset += FieldLength;
FieldType = DtGetFieldType (Info);
Gbl_InputFieldCount++;
AslGbl_InputFieldCount++;
switch (FieldType)
{
@ -696,9 +696,9 @@ DtCompileTable (
break;
default:
sprintf (MsgBuffer, "Invalid DMT opcode: 0x%.2X",
sprintf (AslGbl_MsgBuffer, "Invalid DMT opcode: 0x%.2X",
Info->Opcode);
DtFatal (ASL_MSG_COMPILER_INTERNAL, NULL, MsgBuffer);
DtFatal (ASL_MSG_COMPILER_INTERNAL, NULL, AslGbl_MsgBuffer);
Status = AE_BAD_DATA;
break;
}

View File

@ -238,35 +238,35 @@ typedef struct dt_subtable
/* List of all field names and values from the input source */
DT_EXTERN DT_FIELD DT_INIT_GLOBAL (*Gbl_FieldList, NULL);
DT_EXTERN DT_FIELD DT_INIT_GLOBAL (*AslGbl_FieldList, NULL);
/* List of all compiled tables and subtables */
DT_EXTERN DT_SUBTABLE DT_INIT_GLOBAL (*Gbl_RootTable, NULL);
DT_EXTERN DT_SUBTABLE DT_INIT_GLOBAL (*AslGbl_RootTable, NULL);
/* Stack for subtables */
DT_EXTERN DT_SUBTABLE DT_INIT_GLOBAL (*Gbl_SubtableStack, NULL);
DT_EXTERN DT_SUBTABLE DT_INIT_GLOBAL (*AslGbl_SubtableStack, NULL);
/* List for defined labels */
DT_EXTERN DT_FIELD DT_INIT_GLOBAL (*Gbl_LabelList, NULL);
DT_EXTERN DT_FIELD DT_INIT_GLOBAL (*AslGbl_LabelList, NULL);
/* Current offset within the binary output table */
DT_EXTERN UINT32 DT_INIT_GLOBAL (Gbl_CurrentTableOffset, 0);
DT_EXTERN UINT32 DT_INIT_GLOBAL (AslGbl_CurrentTableOffset, 0);
/* Local caches */
DT_EXTERN UINT32 DT_INIT_GLOBAL (Gbl_SubtableCount, 0);
DT_EXTERN ASL_CACHE_INFO DT_INIT_GLOBAL (*Gbl_SubtableCacheList, NULL);
DT_EXTERN DT_SUBTABLE DT_INIT_GLOBAL (*Gbl_SubtableCacheNext, NULL);
DT_EXTERN DT_SUBTABLE DT_INIT_GLOBAL (*Gbl_SubtableCacheLast, NULL);
DT_EXTERN UINT32 DT_INIT_GLOBAL (AslGbl_SubtableCount, 0);
DT_EXTERN ASL_CACHE_INFO DT_INIT_GLOBAL (*AslGbl_SubtableCacheList, NULL);
DT_EXTERN DT_SUBTABLE DT_INIT_GLOBAL (*AslGbl_SubtableCacheNext, NULL);
DT_EXTERN DT_SUBTABLE DT_INIT_GLOBAL (*AslGbl_SubtableCacheLast, NULL);
DT_EXTERN UINT32 DT_INIT_GLOBAL (Gbl_FieldCount, 0);
DT_EXTERN ASL_CACHE_INFO DT_INIT_GLOBAL (*Gbl_FieldCacheList, NULL);
DT_EXTERN DT_FIELD DT_INIT_GLOBAL (*Gbl_FieldCacheNext, NULL);
DT_EXTERN DT_FIELD DT_INIT_GLOBAL (*Gbl_FieldCacheLast, NULL);
DT_EXTERN UINT32 DT_INIT_GLOBAL (AslGbl_FieldCount, 0);
DT_EXTERN ASL_CACHE_INFO DT_INIT_GLOBAL (*AslGbl_FieldCacheList, NULL);
DT_EXTERN DT_FIELD DT_INIT_GLOBAL (*AslGbl_FieldCacheNext, NULL);
DT_EXTERN DT_FIELD DT_INIT_GLOBAL (*AslGbl_FieldCacheLast, NULL);
/* dtcompiler - main module */

View File

@ -168,7 +168,7 @@ DtLookupLabel (
/* Global used for errors during parse and related functions */
DT_FIELD *Gbl_CurrentField;
DT_FIELD *AslGbl_CurrentField;
/******************************************************************************
@ -196,7 +196,7 @@ DtResolveIntegerExpression (
DbgPrint (ASL_DEBUG_OUTPUT, "Full Integer expression: %s\n",
Field->Value);
Gbl_CurrentField = Field;
AslGbl_CurrentField = Field;
Result = DtEvaluateExpression (Field->Value);
*ReturnValue = Result;
@ -251,7 +251,7 @@ DtDoOperator (
if (!RightValue)
{
DtError (ASL_ERROR, ASL_MSG_DIVIDE_BY_ZERO,
Gbl_CurrentField, NULL);
AslGbl_CurrentField, NULL);
return (0);
}
@ -263,7 +263,7 @@ DtDoOperator (
if (!RightValue)
{
DtError (ASL_ERROR, ASL_MSG_DIVIDE_BY_ZERO,
Gbl_CurrentField, NULL);
AslGbl_CurrentField, NULL);
return (0);
}
@ -349,7 +349,7 @@ DtDoOperator (
/* Unknown operator */
DtFatal (ASL_MSG_INVALID_EXPRESSION,
Gbl_CurrentField, NULL);
AslGbl_CurrentField, NULL);
return (0);
}
@ -396,7 +396,7 @@ DtResolveLabel (
if (!LabelField)
{
DtError (ASL_ERROR, ASL_MSG_UNKNOWN_LABEL,
Gbl_CurrentField, LabelString);
AslGbl_CurrentField, LabelString);
return (0);
}
@ -431,7 +431,7 @@ DtDetectAllLabels (
UINT32 TableOffset;
TableOffset = Gbl_CurrentTableOffset;
TableOffset = AslGbl_CurrentTableOffset;
GenericField = FieldList;
/*
@ -485,8 +485,8 @@ DtInsertLabelField (
"DtInsertLabelField: Found Label : %s at output table offset %X\n",
Field->Value, Field->TableOffset);
Field->NextLabel = Gbl_LabelList;
Gbl_LabelList = Field;
Field->NextLabel = AslGbl_LabelList;
AslGbl_LabelList = Field;
}
@ -519,7 +519,7 @@ DtLookupLabel (
/* Search global list */
LabelField = Gbl_LabelList;
LabelField = AslGbl_LabelList;
while (LabelField)
{
if (!strcmp (Name, LabelField->Value))

View File

@ -280,8 +280,8 @@ DtCompileString (
if (Length > ByteLength)
{
sprintf (MsgBuffer, "Maximum %u characters", ByteLength);
DtError (ASL_ERROR, ASL_MSG_STRING_LENGTH, Field, MsgBuffer);
sprintf (AslGbl_MsgBuffer, "Maximum %u characters", ByteLength);
DtError (ASL_ERROR, ASL_MSG_STRING_LENGTH, Field, AslGbl_MsgBuffer);
Length = ByteLength;
}
@ -360,8 +360,8 @@ DtCompileUuid (
Status = AuValidateUuid (InString);
if (ACPI_FAILURE (Status))
{
sprintf (MsgBuffer, "%s", Field->Value);
DtNameError (ASL_ERROR, ASL_MSG_INVALID_UUID, Field, MsgBuffer);
sprintf (AslGbl_MsgBuffer, "%s", Field->Value);
DtNameError (ASL_ERROR, ASL_MSG_INVALID_UUID, Field, AslGbl_MsgBuffer);
}
else
{
@ -462,9 +462,9 @@ DtCompileInteger (
if (Value > MaxValue)
{
sprintf (MsgBuffer, "%8.8X%8.8X - max %u bytes",
sprintf (AslGbl_MsgBuffer, "%8.8X%8.8X - max %u bytes",
ACPI_FORMAT_UINT64 (Value), ByteLength);
DtError (ASL_ERROR, ASL_MSG_INTEGER_SIZE, Field, MsgBuffer);
DtError (ASL_ERROR, ASL_MSG_INTEGER_SIZE, Field, AslGbl_MsgBuffer);
}
memcpy (Buffer, &Value, ByteLength);
@ -712,8 +712,8 @@ DtCompileFlag (
if (Value >= ((UINT64) 1 << BitLength))
{
sprintf (MsgBuffer, "Maximum %u bit", BitLength);
DtError (ASL_ERROR, ASL_MSG_FLAG_VALUE, Field, MsgBuffer);
sprintf (AslGbl_MsgBuffer, "Maximum %u bit", BitLength);
DtError (ASL_ERROR, ASL_MSG_FLAG_VALUE, Field, AslGbl_MsgBuffer);
Value = 0;
}

View File

@ -209,7 +209,7 @@ DtDumpSubtableTree (
#define DT_MERGE_LINES 6
#define DT_ESCAPE_SEQUENCE 7
static UINT32 Gbl_NextLineOffset;
static UINT32 AslGbl_NextLineOffset;
/******************************************************************************
@ -317,7 +317,7 @@ DtLinkField (
DT_FIELD *Next;
Prev = Next = Gbl_FieldList;
Prev = Next = AslGbl_FieldList;
while (Next)
{
@ -331,7 +331,7 @@ DtLinkField (
}
else
{
Gbl_FieldList = Field;
AslGbl_FieldList = Field;
}
}
@ -507,8 +507,8 @@ DtParseLine (
* Handles both slash-asterisk and slash-slash comments.
* Also, quoted strings, but no escapes within.
*
* Line is returned in Gbl_CurrentLineBuffer.
* Line number in original file is returned in Gbl_CurrentLineNumber.
* Line is returned in AslGbl_CurrentLineBuffer.
* Line number in original file is returned in AslGbl_CurrentLineNumber.
*
*****************************************************************************/
@ -524,14 +524,14 @@ DtGetNextLine (
int c;
memset (Gbl_CurrentLineBuffer, 0, Gbl_LineBufferSize);
memset (AslGbl_CurrentLineBuffer, 0, AslGbl_LineBufferSize);
for (i = 0; ;)
{
/*
* If line is too long, expand the line buffers. Also increases
* Gbl_LineBufferSize.
* AslGbl_LineBufferSize.
*/
if (i >= Gbl_LineBufferSize)
if (i >= AslGbl_LineBufferSize)
{
UtExpandLineBuffers ();
}
@ -576,7 +576,7 @@ DtGetNextLine (
/* Normal text, insert char into line buffer */
Gbl_CurrentLineBuffer[i] = (char) c;
AslGbl_CurrentLineBuffer[i] = (char) c;
switch (c)
{
case '/':
@ -601,9 +601,9 @@ DtGetNextLine (
case '\n':
CurrentLineOffset = Gbl_NextLineOffset;
Gbl_NextLineOffset = (UINT32) ftell (Handle);
Gbl_CurrentLineNumber++;
CurrentLineOffset = AslGbl_NextLineOffset;
AslGbl_NextLineOffset = (UINT32) ftell (Handle);
AslGbl_CurrentLineNumber++;
/*
* Exit if line is complete. Ignore empty lines (only \n)
@ -611,12 +611,12 @@ DtGetNextLine (
*/
if ((i != 0) && LineNotAllBlanks)
{
if ((i + 1) >= Gbl_LineBufferSize)
if ((i + 1) >= AslGbl_LineBufferSize)
{
UtExpandLineBuffers ();
}
Gbl_CurrentLineBuffer[i+1] = 0; /* Terminate string */
AslGbl_CurrentLineBuffer[i+1] = 0; /* Terminate string */
return (CurrentLineOffset);
}
@ -642,7 +642,7 @@ DtGetNextLine (
/* Insert raw chars until end of quoted string */
Gbl_CurrentLineBuffer[i] = (char) c;
AslGbl_CurrentLineBuffer[i] = (char) c;
i++;
switch (c)
@ -663,7 +663,7 @@ DtGetNextLine (
{
AcpiOsPrintf (
"ERROR at line %u: Unterminated quoted string\n",
Gbl_CurrentLineNumber++);
AslGbl_CurrentLineNumber++);
State = DT_NORMAL_TEXT;
}
break;
@ -678,7 +678,7 @@ DtGetNextLine (
/* Just copy the escaped character. TBD: sufficient for table compiler? */
Gbl_CurrentLineBuffer[i] = (char) c;
AslGbl_CurrentLineBuffer[i] = (char) c;
i++;
State = DT_START_QUOTED_STRING;
break;
@ -702,12 +702,12 @@ DtGetNextLine (
default: /* Not a comment */
i++; /* Save the preceding slash */
if (i >= Gbl_LineBufferSize)
if (i >= AslGbl_LineBufferSize)
{
UtExpandLineBuffers ();
}
Gbl_CurrentLineBuffer[i] = (char) c;
AslGbl_CurrentLineBuffer[i] = (char) c;
i++;
State = DT_NORMAL_TEXT;
break;
@ -722,8 +722,8 @@ DtGetNextLine (
{
case '\n':
Gbl_NextLineOffset = (UINT32) ftell (Handle);
Gbl_CurrentLineNumber++;
AslGbl_NextLineOffset = (UINT32) ftell (Handle);
AslGbl_CurrentLineNumber++;
break;
case '*':
@ -763,9 +763,9 @@ DtGetNextLine (
case '\n':
CurrentLineOffset = Gbl_NextLineOffset;
Gbl_NextLineOffset = (UINT32) ftell (Handle);
Gbl_CurrentLineNumber++;
CurrentLineOffset = AslGbl_NextLineOffset;
AslGbl_NextLineOffset = (UINT32) ftell (Handle);
AslGbl_CurrentLineNumber++;
break;
case '*':
@ -800,14 +800,14 @@ DtGetNextLine (
* immediately by a newline. Insert a space between the
* lines (overwrite the backslash)
*/
Gbl_CurrentLineBuffer[i] = ' ';
AslGbl_CurrentLineBuffer[i] = ' ';
i++;
/* Ignore newline, this will merge the lines */
CurrentLineOffset = Gbl_NextLineOffset;
Gbl_NextLineOffset = (UINT32) ftell (Handle);
Gbl_CurrentLineNumber++;
CurrentLineOffset = AslGbl_NextLineOffset;
AslGbl_NextLineOffset = (UINT32) ftell (Handle);
AslGbl_CurrentLineNumber++;
State = DT_NORMAL_TEXT;
}
break;
@ -830,7 +830,7 @@ DtGetNextLine (
* RETURN: Pointer to start of the constructed parse tree.
*
* DESCRIPTION: Scan source file, link all field names and values
* to the global parse tree: Gbl_FieldList
* to the global parse tree: AslGbl_FieldList
*
*****************************************************************************/
@ -847,25 +847,25 @@ DtScanFile (
/* Get the file size */
Gbl_InputByteCount = CmGetFileSize (Handle);
if (Gbl_InputByteCount == ACPI_UINT32_MAX)
AslGbl_InputByteCount = CmGetFileSize (Handle);
if (AslGbl_InputByteCount == ACPI_UINT32_MAX)
{
AslAbort ();
}
Gbl_CurrentLineNumber = 0;
Gbl_CurrentLineOffset = 0;
Gbl_NextLineOffset = 0;
AslGbl_CurrentLineNumber = 0;
AslGbl_CurrentLineOffset = 0;
AslGbl_NextLineOffset = 0;
/* Scan line-by-line */
while ((Offset = DtGetNextLine (Handle, 0)) != ASL_EOF)
{
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Line %2.2u/%4.4X - %s",
Gbl_CurrentLineNumber, Offset, Gbl_CurrentLineBuffer));
AslGbl_CurrentLineNumber, Offset, AslGbl_CurrentLineBuffer));
Status = DtParseLine (Gbl_CurrentLineBuffer,
Gbl_CurrentLineNumber, Offset);
Status = DtParseLine (AslGbl_CurrentLineBuffer,
AslGbl_CurrentLineNumber, Offset);
if (Status == AE_NOT_FOUND)
{
break;
@ -874,8 +874,8 @@ DtScanFile (
/* Dump the parse tree if debug enabled */
DtDumpFieldList (Gbl_FieldList);
return (Gbl_FieldList);
DtDumpFieldList (AslGbl_FieldList);
return (AslGbl_FieldList);
}
@ -932,8 +932,8 @@ DtOutputBinary (
DtWalkTableTree (RootTable, DtWriteBinary, NULL, NULL);
Gbl_TableLength = CmGetFileSize (Gbl_Files[ASL_FILE_AML_OUTPUT].Handle);
if (Gbl_TableLength == ACPI_UINT32_MAX)
AslGbl_TableLength = CmGetFileSize (AslGbl_Files[ASL_FILE_AML_OUTPUT].Handle);
if (AslGbl_TableLength == ACPI_UINT32_MAX)
{
AslAbort ();
}
@ -1048,7 +1048,7 @@ DtDumpFieldList (
DT_FIELD *Field)
{
if (!Gbl_DebugFlag || !Field)
if (!AslGbl_DebugFlag || !Field)
{
return;
}
@ -1132,7 +1132,7 @@ DtDumpSubtableList (
void)
{
if (!Gbl_DebugFlag || !Gbl_RootTable)
if (!AslGbl_DebugFlag || !AslGbl_RootTable)
{
return;
}
@ -1141,11 +1141,11 @@ DtDumpSubtableList (
"Subtable Info:\n"
"Depth Name Length TotalLen LenSize Flags "
"This Parent Child Peer\n\n");
DtWalkTableTree (Gbl_RootTable, DtDumpSubtableInfo, NULL, NULL);
DtWalkTableTree (AslGbl_RootTable, DtDumpSubtableInfo, NULL, NULL);
DbgPrint (ASL_DEBUG_OUTPUT,
"\nSubtable Tree: (Depth, Name, Subtable, Length, TotalLength)\n\n");
DtWalkTableTree (Gbl_RootTable, DtDumpSubtableTree, NULL, NULL);
DtWalkTableTree (AslGbl_RootTable, DtDumpSubtableTree, NULL, NULL);
DbgPrint (ASL_DEBUG_OUTPUT, "\n");
}
@ -1174,7 +1174,7 @@ DtWriteFieldToListing (
UINT8 FileByte;
if (!Gbl_ListingFlag || !Field)
if (!AslGbl_ListingFlag || !Field)
{
return;
}
@ -1232,24 +1232,24 @@ DtWriteTableToListing (
UINT8 *Buffer;
if (!Gbl_ListingFlag)
if (!AslGbl_ListingFlag)
{
return;
}
/* Read the entire table from the output file */
Buffer = UtLocalCalloc (Gbl_TableLength);
Buffer = UtLocalCalloc (AslGbl_TableLength);
FlSeekFile (ASL_FILE_AML_OUTPUT, 0);
FlReadFile (ASL_FILE_AML_OUTPUT, Buffer, Gbl_TableLength);
FlReadFile (ASL_FILE_AML_OUTPUT, Buffer, AslGbl_TableLength);
/* Dump the raw table data */
AcpiOsRedirectOutput (Gbl_Files[ASL_FILE_LISTING_OUTPUT].Handle);
AcpiOsRedirectOutput (AslGbl_Files[ASL_FILE_LISTING_OUTPUT].Handle);
AcpiOsPrintf ("\n%s: Length %d (0x%X)\n\n",
ACPI_RAW_TABLE_DATA_HEADER, Gbl_TableLength, Gbl_TableLength);
AcpiUtDumpBuffer (Buffer, Gbl_TableLength, DB_BYTE_DISPLAY, 0);
ACPI_RAW_TABLE_DATA_HEADER, AslGbl_TableLength, AslGbl_TableLength);
AcpiUtDumpBuffer (Buffer, AslGbl_TableLength, DB_BYTE_DISPLAY, 0);
AcpiOsRedirectOutput (stdout);
ACPI_FREE (Buffer);

View File

@ -166,7 +166,7 @@ int DtParserlex (void);
int DtParserparse (void);
void DtParsererror (char const *msg);
extern char *DtParsertext;
extern DT_FIELD *Gbl_CurrentField;
extern DT_FIELD *AslGbl_CurrentField;
UINT64 DtParserResult; /* Expression return value */
@ -321,7 +321,7 @@ DtParsererror (
char const *Message)
{
DtError (ASL_ERROR, ASL_MSG_SYNTAX,
Gbl_CurrentField, (char *) Message);
AslGbl_CurrentField, (char *) Message);
}
@ -381,7 +381,7 @@ DtEvaluateExpression (
if (DtInitLexer (ExprString))
{
DtError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL,
Gbl_CurrentField, "Could not initialize lexer");
AslGbl_CurrentField, "Could not initialize lexer");
return (0);
}

View File

@ -261,8 +261,8 @@ DtPushSubtable (
DT_SUBTABLE *Subtable)
{
Subtable->StackTop = Gbl_SubtableStack;
Gbl_SubtableStack = Subtable;
Subtable->StackTop = AslGbl_SubtableStack;
AslGbl_SubtableStack = Subtable;
}
@ -285,11 +285,11 @@ DtPopSubtable (
DT_SUBTABLE *Subtable;
Subtable = Gbl_SubtableStack;
Subtable = AslGbl_SubtableStack;
if (Subtable)
{
Gbl_SubtableStack = Subtable->StackTop;
AslGbl_SubtableStack = Subtable->StackTop;
}
}
@ -311,7 +311,7 @@ DtPeekSubtable (
void)
{
return (Gbl_SubtableStack);
return (AslGbl_SubtableStack);
}
@ -455,9 +455,9 @@ DtGetSubtableLength (
Error:
if (!Field)
{
sprintf (MsgBuffer, "Found NULL field - Field name \"%s\" needed",
sprintf (AslGbl_MsgBuffer, "Found NULL field - Field name \"%s\" needed",
Info->Name);
DtFatal (ASL_MSG_COMPILER_INTERNAL, NULL, MsgBuffer);
DtFatal (ASL_MSG_COMPILER_INTERNAL, NULL, AslGbl_MsgBuffer);
}
return (ASL_EOF);

View File

@ -182,13 +182,13 @@ DtCompileRsdp (
/* Compile the "common" RSDP (ACPI 1.0) */
Status = DtCompileTable (PFieldList, AcpiDmTableInfoRsdp1,
&Gbl_RootTable);
&AslGbl_RootTable);
if (ACPI_FAILURE (Status))
{
return (Status);
}
Rsdp = ACPI_CAST_PTR (ACPI_TABLE_RSDP, Gbl_RootTable->Buffer);
Rsdp = ACPI_CAST_PTR (ACPI_TABLE_RSDP, AslGbl_RootTable->Buffer);
DtSetTableChecksum (&Rsdp->Checksum);
if (Rsdp->Revision > 0)
@ -202,12 +202,12 @@ DtCompileRsdp (
return (Status);
}
DtInsertSubtable (Gbl_RootTable, Subtable);
DtInsertSubtable (AslGbl_RootTable, Subtable);
/* Set length and extended checksum for entire RSDP */
RsdpExtension = ACPI_CAST_PTR (ACPI_RSDP_EXTENSION, Subtable->Buffer);
RsdpExtension->Length = Gbl_RootTable->Length + Subtable->Length;
RsdpExtension->Length = AslGbl_RootTable->Length + Subtable->Length;
DtSetTableChecksum (&RsdpExtension->ExtendedChecksum);
}
@ -326,7 +326,7 @@ DtCompileFacs (
Status = DtCompileTable (PFieldList, AcpiDmTableInfoFacs,
&Gbl_RootTable);
&AslGbl_RootTable);
if (ACPI_FAILURE (Status))
{
return (Status);
@ -340,6 +340,6 @@ DtCompileFacs (
DtCreateSubtable (ReservedBuffer, ReservedSize, &Subtable);
ACPI_FREE (ReservedBuffer);
DtInsertSubtable (Gbl_RootTable, Subtable);
DtInsertSubtable (AslGbl_RootTable, Subtable);
return (AE_OK);
}

View File

@ -1288,13 +1288,13 @@ DtCompileS3pt (
Status = DtCompileTable (PFieldList, AcpiDmTableInfoS3pt,
&Gbl_RootTable);
&AslGbl_RootTable);
if (ACPI_FAILURE (Status))
{
return (Status);
}
DtPushSubtable (Gbl_RootTable);
DtPushSubtable (AslGbl_RootTable);
while (*PFieldList)
{
@ -2274,10 +2274,10 @@ DtCompileGeneric (
Info = DtGetGenericTableInfo ((*PFieldList)->Name);
if (!Info)
{
sprintf (MsgBuffer, "Generic data type \"%s\" not found",
sprintf (AslGbl_MsgBuffer, "Generic data type \"%s\" not found",
(*PFieldList)->Name);
DtNameError (ASL_ERROR, ASL_MSG_INVALID_FIELD_NAME,
(*PFieldList), MsgBuffer);
(*PFieldList), AslGbl_MsgBuffer);
*PFieldList = (*PFieldList)->Next;
continue;
@ -2299,10 +2299,10 @@ DtCompileGeneric (
if (Status == AE_NOT_FOUND)
{
sprintf (MsgBuffer, "Generic data type \"%s\" not found",
sprintf (AslGbl_MsgBuffer, "Generic data type \"%s\" not found",
(*PFieldList)->Name);
DtNameError (ASL_ERROR, ASL_MSG_INVALID_FIELD_NAME,
(*PFieldList), MsgBuffer);
(*PFieldList), AslGbl_MsgBuffer);
}
}
}

View File

@ -546,7 +546,7 @@ DtCreateOneTemplate (
AcpiOsPrintf (" (static data table)\n");
if (Gbl_VerboseTemplates)
if (AslGbl_VerboseTemplates)
{
AcpiOsPrintf (" * Format: [HexOffset DecimalOffset ByteLength]"
" FieldName : HexFieldValue\n */\n\n");

View File

@ -201,7 +201,7 @@ DtError (
FieldObject->Line,
FieldObject->ByteOffset,
FieldObject->Column,
Gbl_Files[ASL_FILE_INPUT].Filename, ExtraMessage);
AslGbl_Files[ASL_FILE_INPUT].Filename, ExtraMessage);
}
else
{
@ -239,7 +239,7 @@ DtNameError (
case ASL_WARNING2:
case ASL_WARNING3:
if (Gbl_WarningLevel < Level)
if (AslGbl_WarningLevel < Level)
{
return;
}
@ -257,7 +257,7 @@ DtNameError (
FieldObject->Line,
FieldObject->ByteOffset,
FieldObject->NameColumn,
Gbl_Files[ASL_FILE_INPUT].Filename, ExtraMessage);
AslGbl_Files[ASL_FILE_INPUT].Filename, ExtraMessage);
}
else
{
@ -640,8 +640,8 @@ DtGetFieldLength (
else
{ /* At this point, this is a fatal error */
sprintf (MsgBuffer, "Expected \"%s\"", Info->Name);
DtFatal (ASL_MSG_COMPILER_INTERNAL, NULL, MsgBuffer);
sprintf (AslGbl_MsgBuffer, "Expected \"%s\"", Info->Name);
DtFatal (ASL_MSG_COMPILER_INTERNAL, NULL, AslGbl_MsgBuffer);
return (0);
}
break;
@ -672,8 +672,8 @@ DtGetFieldLength (
else
{ /* At this point, this is a fatal error */
sprintf (MsgBuffer, "Expected \"%s\"", Info->Name);
DtFatal (ASL_MSG_COMPILER_INTERNAL, NULL, MsgBuffer);
sprintf (AslGbl_MsgBuffer, "Expected \"%s\"", Info->Name);
DtFatal (ASL_MSG_COMPILER_INTERNAL, NULL, AslGbl_MsgBuffer);
return (0);
}
break;
@ -768,7 +768,7 @@ DtSetTableChecksum (
UINT8 OldSum;
DtWalkTableTree (Gbl_RootTable, DtSum, NULL, &Checksum);
DtWalkTableTree (AslGbl_RootTable, DtSum, NULL, &Checksum);
OldSum = *ChecksumPointer;
Checksum = (UINT8) (Checksum - OldSum);
@ -800,7 +800,7 @@ DtSetTableLength (
DT_SUBTABLE *ChildTable;
ParentTable = Gbl_RootTable;
ParentTable = AslGbl_RootTable;
ChildTable = NULL;
if (!ParentTable)
@ -838,7 +838,7 @@ DtSetTableLength (
{
ChildTable = ParentTable;
if (ChildTable == Gbl_RootTable)
if (ChildTable == AslGbl_RootTable)
{
break;
}
@ -907,7 +907,7 @@ DtWalkTableTree (
else
{
ChildTable = ParentTable;
if (ChildTable == Gbl_RootTable)
if (ChildTable == AslGbl_RootTable)
{
break;
}

View File

@ -183,7 +183,7 @@
#define PR_PREFIX_ID "Pr(%.4u) - " /* Used for debug output */
#define THIS_TOKEN_OFFSET(t) ((t-Gbl_MainTokenBuffer) + 1)
#define THIS_TOKEN_OFFSET(t) ((AslGbl_MainTokenBuffer - t) + 1)
/*
@ -247,21 +247,22 @@ typedef struct directive_info
/*
* Globals
*/
PR_EXTERN char PR_INIT_GLOBAL (*AslGbl_MainTokenBuffer, NULL); /* [ASL_LINE_BUFFER_SIZE]; */
PR_EXTERN char PR_INIT_GLOBAL (*AslGbl_MacroTokenBuffer, NULL); /* [ASL_LINE_BUFFER_SIZE]; */
PR_EXTERN char PR_INIT_GLOBAL (*AslGbl_ExpressionTokenBuffer, NULL); /* [ASL_LINE_BUFFER_SIZE]; */
PR_EXTERN UINT32 AslGbl_PreprocessorLineNumber;
PR_EXTERN int AslGbl_IfDepth;
PR_EXTERN PR_FILE_NODE *AslGbl_InputFileList;
PR_EXTERN BOOLEAN PR_INIT_GLOBAL (AslGbl_PreprocessorError, FALSE);
PR_EXTERN BOOLEAN PR_INIT_GLOBAL (AslGbl_IgnoringThisCodeBlock, FALSE);
PR_EXTERN PR_DEFINE_INFO PR_INIT_GLOBAL (*AslGbl_DefineList, NULL);
PR_EXTERN DIRECTIVE_INFO PR_INIT_GLOBAL (*AslGbl_DirectiveStack, NULL);
#if 0 /* TBD for macros */
PR_EXTERN char PR_INIT_GLOBAL (*XXXEvalBuffer, NULL); /* [ASL_LINE_BUFFER_SIZE]; */
#endif
PR_EXTERN char PR_INIT_GLOBAL (*Gbl_MainTokenBuffer, NULL); /* [ASL_LINE_BUFFER_SIZE]; */
PR_EXTERN char PR_INIT_GLOBAL (*Gbl_MacroTokenBuffer, NULL); /* [ASL_LINE_BUFFER_SIZE]; */
PR_EXTERN char PR_INIT_GLOBAL (*Gbl_ExpressionTokenBuffer, NULL); /* [ASL_LINE_BUFFER_SIZE]; */
PR_EXTERN UINT32 Gbl_PreprocessorLineNumber;
PR_EXTERN int Gbl_IfDepth;
PR_EXTERN PR_FILE_NODE *Gbl_InputFileList;
PR_EXTERN PR_DEFINE_INFO PR_INIT_GLOBAL (*Gbl_DefineList, NULL);
PR_EXTERN BOOLEAN PR_INIT_GLOBAL (Gbl_PreprocessorError, FALSE);
PR_EXTERN BOOLEAN PR_INIT_GLOBAL (Gbl_IgnoringThisCodeBlock, FALSE);
PR_EXTERN DIRECTIVE_INFO PR_INIT_GLOBAL (*Gbl_DirectiveStack, NULL);
/*
* prscan - Preprocessor entry

View File

@ -223,8 +223,8 @@ PrExpandMacros (
int OffsetAdjust;
strcpy (Gbl_ExpressionTokenBuffer, Gbl_CurrentLineBuffer);
Token = PrGetNextToken (Gbl_ExpressionTokenBuffer, PR_EXPR_SEPARATORS, &Next);
strcpy (AslGbl_ExpressionTokenBuffer, AslGbl_CurrentLineBuffer);
Token = PrGetNextToken (AslGbl_ExpressionTokenBuffer, PR_EXPR_SEPARATORS, &Next);
OffsetAdjust = 0;
while (Token)
@ -238,10 +238,10 @@ PrExpandMacros (
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
"Matched Macro: %s->%s\n",
Gbl_CurrentLineNumber, DefineInfo->Identifier,
AslGbl_CurrentLineNumber, DefineInfo->Identifier,
DefineInfo->Replacement);
PrDoMacroInvocation (Gbl_ExpressionTokenBuffer, Token,
PrDoMacroInvocation (AslGbl_ExpressionTokenBuffer, Token,
DefineInfo, &Next);
}
else
@ -250,9 +250,9 @@ PrExpandMacros (
/* Replace the name in the original line buffer */
TokenOffset = Token - Gbl_ExpressionTokenBuffer + OffsetAdjust;
TokenOffset = Token - AslGbl_ExpressionTokenBuffer + OffsetAdjust;
PrReplaceData (
&Gbl_CurrentLineBuffer[TokenOffset], strlen (Token),
&AslGbl_CurrentLineBuffer[TokenOffset], strlen (Token),
ReplaceString, strlen (ReplaceString));
/* Adjust for length difference between old and new name length */
@ -261,7 +261,7 @@ PrExpandMacros (
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
"Matched #define within expression: %s->%s\n",
Gbl_CurrentLineNumber, Token,
AslGbl_CurrentLineNumber, Token,
*ReplaceString ? ReplaceString : "(NULL STRING)");
}
}
@ -294,7 +294,7 @@ PrIsDefined (
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
"**** Is defined?: %s\n", Gbl_CurrentLineNumber, Identifier);
"**** Is defined?: %s\n", AslGbl_CurrentLineNumber, Identifier);
Value = 0; /* Default is "Not defined" -- FALSE */
@ -306,7 +306,7 @@ PrIsDefined (
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
"[#if defined %s] resolved to: %8.8X%8.8X\n",
Gbl_CurrentLineNumber, Identifier, ACPI_FORMAT_UINT64 (Value));
AslGbl_CurrentLineNumber, Identifier, ACPI_FORMAT_UINT64 (Value));
return (Value);
}
@ -333,7 +333,7 @@ PrResolveDefine (
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
"**** Resolve #define: %s\n", Gbl_CurrentLineNumber, Identifier);
"**** Resolve #define: %s\n", AslGbl_CurrentLineNumber, Identifier);
Value = 0; /* Default is "Not defined" -- FALSE */
@ -345,7 +345,7 @@ PrResolveDefine (
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
"[#if defined %s] resolved to: %8.8X%8.8X\n",
Gbl_CurrentLineNumber, Identifier, ACPI_FORMAT_UINT64 (Value));
AslGbl_CurrentLineNumber, Identifier, ACPI_FORMAT_UINT64 (Value));
return (Value);
}
@ -376,7 +376,7 @@ PrResolveIntegerExpression (
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
"**** Resolve #if: %s\n", Gbl_CurrentLineNumber, Line);
"**** Resolve #if: %s\n", AslGbl_CurrentLineNumber, Line);
/* Expand all macros within the expression first */
@ -387,7 +387,7 @@ PrResolveIntegerExpression (
Result = PrEvaluateExpression (ExpandedLine);
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
"**** Expression Resolved to: %8.8X%8.8X\n",
Gbl_CurrentLineNumber, ACPI_FORMAT_UINT64 (Result));
AslGbl_CurrentLineNumber, ACPI_FORMAT_UINT64 (Result));
*ReturnValue = Result;
return (AE_OK);
@ -404,7 +404,7 @@ PrResolveIntegerExpression (
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
"**** Expression Resolved to: %8.8X%8.8X\n",
Gbl_CurrentLineNumber, ACPI_FORMAT_UINT64 (Value1));
AslGbl_CurrentLineNumber, ACPI_FORMAT_UINT64 (Value1));
*ReturnValue = Value1;
return (AE_OK);

View File

@ -176,7 +176,7 @@ PrDumpPredefinedNames (
PR_DEFINE_INFO *DefineInfo;
DefineInfo = Gbl_DefineList;
DefineInfo = AslGbl_DefineList;
while (DefineInfo)
{
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
@ -225,7 +225,7 @@ PrAddDefine (
{
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID,
"#define: name already exists: %s\n",
Gbl_CurrentLineNumber, Identifier);
AslGbl_CurrentLineNumber, Identifier);
/*
* Name already exists. This is only an error if the target name
@ -257,13 +257,13 @@ PrAddDefine (
DefineInfo->Identifier = IdentifierString;
DefineInfo->Persist = Persist;
if (Gbl_DefineList)
if (AslGbl_DefineList)
{
Gbl_DefineList->Previous = DefineInfo;
AslGbl_DefineList->Previous = DefineInfo;
}
DefineInfo->Next = Gbl_DefineList;
Gbl_DefineList = DefineInfo;
DefineInfo->Next = AslGbl_DefineList;
AslGbl_DefineList = DefineInfo;
return (DefineInfo);
}
@ -291,7 +291,7 @@ PrRemoveDefine (
/* Match name and delete the node */
DefineInfo = Gbl_DefineList;
DefineInfo = AslGbl_DefineList;
while (DefineInfo)
{
if (!strcmp (DefineName, DefineInfo->Identifier))
@ -304,7 +304,7 @@ PrRemoveDefine (
}
else
{
Gbl_DefineList = DefineInfo->Next;
AslGbl_DefineList = DefineInfo->Next;
}
if (DefineInfo->Next)
@ -325,7 +325,7 @@ PrRemoveDefine (
*/
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
"#undef: could not find %s\n",
Gbl_CurrentLineNumber, DefineName);
AslGbl_CurrentLineNumber, DefineName);
}
@ -348,7 +348,7 @@ PrMatchDefine (
PR_DEFINE_INFO *DefineInfo;
DefineInfo = Gbl_DefineList;
DefineInfo = AslGbl_DefineList;
while (DefineInfo)
{
if (!strcmp (MatchString, DefineInfo->Identifier))
@ -399,10 +399,10 @@ PrAddMacro (
/* Find the end of the arguments list */
TokenOffset = Name - Gbl_MainTokenBuffer + strlen (Name) + 1;
TokenOffset = Name - AslGbl_MainTokenBuffer + strlen (Name) + 1;
while (1)
{
BufferChar = Gbl_CurrentLineBuffer[TokenOffset];
BufferChar = AslGbl_CurrentLineBuffer[TokenOffset];
if (BufferChar == '(')
{
Depth++;
@ -447,7 +447,7 @@ PrAddMacro (
/* Don't go beyond the argument list */
TokenOffset = Token - Gbl_MainTokenBuffer + strlen (Token);
TokenOffset = Token - AslGbl_MainTokenBuffer + strlen (Token);
if (TokenOffset > EndOfArgList)
{
break;
@ -455,7 +455,7 @@ PrAddMacro (
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
"Macro arg: %s \n",
Gbl_CurrentLineNumber, Token);
AslGbl_CurrentLineNumber, Token);
Args[i].Name = UtLocalCalloc (strlen (Token) + 1);
strcpy (Args[i].Name, Token);
@ -472,7 +472,7 @@ PrAddMacro (
/* Get the macro body. Token now points to start of body */
MacroBodyOffset = Token - Gbl_MainTokenBuffer;
MacroBodyOffset = Token - AslGbl_MainTokenBuffer;
/* Match each method arg in the macro body for later use */
@ -494,11 +494,11 @@ PrAddMacro (
UseCount = Args[i].UseCount;
Args[i].Offset[UseCount] =
(Token - Gbl_MainTokenBuffer) - MacroBodyOffset;
(Token - AslGbl_MainTokenBuffer) - MacroBodyOffset;
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
"Macro Arg #%u: %s UseCount %u Offset %u \n",
Gbl_CurrentLineNumber, i, Token,
AslGbl_CurrentLineNumber, i, Token,
UseCount+1, Args[i].Offset[UseCount]);
Args[i].UseCount++;
@ -516,7 +516,7 @@ PrAddMacro (
Token = PrGetNextToken (NULL, PR_MACRO_SEPARATORS, Next);
}
BodyInSource = &Gbl_CurrentLineBuffer[MacroBodyOffset];
BodyInSource = &AslGbl_CurrentLineBuffer[MacroBodyOffset];
AddMacroToList:
@ -528,7 +528,7 @@ PrAddMacro (
{
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
"#define: macro name already exists: %s\n",
Gbl_CurrentLineNumber, Name);
AslGbl_CurrentLineNumber, Name);
/* Error only if not exactly the same macro */
@ -544,7 +544,7 @@ PrAddMacro (
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
"Macro body: %s \n",
Gbl_CurrentLineNumber, BodyInSource);
AslGbl_CurrentLineNumber, BodyInSource);
/* Add macro to the #define list */
@ -600,7 +600,7 @@ PrDoMacroInvocation (
/* Take a copy of the macro body for expansion */
strcpy (Gbl_MacroTokenBuffer, DefineInfo->Body);
strcpy (AslGbl_MacroTokenBuffer, DefineInfo->Body);
/* Replace each argument within the prototype body */
@ -619,8 +619,8 @@ PrDoMacroInvocation (
Length = Token - MacroStart + strlen (Token) + 1;
PrReplaceData (
&Gbl_CurrentLineBuffer[TokenOffset], Length,
Gbl_MacroTokenBuffer, strlen (Gbl_MacroTokenBuffer));
&AslGbl_CurrentLineBuffer[TokenOffset], Length,
AslGbl_MacroTokenBuffer, strlen (AslGbl_MacroTokenBuffer));
return;
}
@ -647,12 +647,12 @@ PrDoMacroInvocation (
}
PrReplaceData (
&Gbl_MacroTokenBuffer[Args->Offset[i]], strlen (Args->Name),
&AslGbl_MacroTokenBuffer[Args->Offset[i]], strlen (Args->Name),
Token, strlen (Token));
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
"ExpandArg: %s \n",
Gbl_CurrentLineNumber, Gbl_MacroTokenBuffer);
AslGbl_CurrentLineNumber, AslGbl_MacroTokenBuffer);
}
Args++;
@ -671,8 +671,8 @@ PrDoMacroInvocation (
Length = Token - MacroStart + strlen (Token) + 1;
PrReplaceData (
&Gbl_CurrentLineBuffer[TokenOffset], Length,
Gbl_MacroTokenBuffer, strlen (Gbl_MacroTokenBuffer));
&AslGbl_CurrentLineBuffer[TokenOffset], Length,
AslGbl_MacroTokenBuffer, strlen (AslGbl_MacroTokenBuffer));
return;
@ -683,6 +683,6 @@ PrDoMacroInvocation (
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
"Bad macro invocation: %s \n",
Gbl_CurrentLineNumber, Gbl_MacroTokenBuffer);
AslGbl_CurrentLineNumber, AslGbl_MacroTokenBuffer);
return;
}

View File

@ -155,8 +155,8 @@
/* Buffer to pass strings to the parser */
#define STRING_SETUP strcpy (StringBuffer, PrParsertext);\
PrParserlval.str = StringBuffer
#define STRING_SETUP strcpy (AslGbl_StringBuffer, PrParsertext);\
PrParserlval.str = AslGbl_StringBuffer
#define _COMPONENT ACPI_COMPILER
ACPI_MODULE_NAME ("prscanner")

View File

@ -321,10 +321,10 @@ PrParsererror (
char const *Message)
{
sprintf (StringBuffer, "Preprocessor Parser : %s (near line %u)",
Message, Gbl_CurrentLineNumber);
sprintf (AslGbl_StringBuffer, "Preprocessor Parser : %s (near line %u)",
Message, AslGbl_CurrentLineNumber);
DtError (ASL_ERROR, ASL_MSG_SYNTAX,
NULL, (char *) StringBuffer);
NULL, (char *) AslGbl_StringBuffer);
}

View File

@ -214,7 +214,7 @@ PrDoIncludeFile (
* Supported preprocessor directives
* Each entry is of the form "Name, ArgumentCount"
*/
static const PR_DIRECTIVE_INFO Gbl_DirectiveInfo[] =
static const PR_DIRECTIVE_INFO AslGbl_DirectiveInfo[] =
{
{"define", 1},
{"elif", 0}, /* Converted to #else..#if internally */
@ -275,7 +275,7 @@ PrInitializePreprocessor (
/* Init globals and the list of #defines */
PrInitializeGlobals ();
Gbl_DefineList = NULL;
AslGbl_DefineList = NULL;
}
@ -299,16 +299,16 @@ PrInitializeGlobals (
{
/* Init globals */
Gbl_InputFileList = NULL;
Gbl_CurrentLineNumber = 1;
Gbl_PreprocessorLineNumber = 1;
Gbl_PreprocessorError = FALSE;
AslGbl_InputFileList = NULL;
AslGbl_CurrentLineNumber = 1;
AslGbl_PreprocessorLineNumber = 1;
AslGbl_PreprocessorError = FALSE;
/* These are used to track #if/#else blocks (possibly nested) */
Gbl_IfDepth = 0;
Gbl_IgnoringThisCodeBlock = FALSE;
Gbl_DirectiveStack = NULL;
AslGbl_IfDepth = 0;
AslGbl_IgnoringThisCodeBlock = FALSE;
AslGbl_DirectiveStack = NULL;
}
@ -337,10 +337,10 @@ PrTerminatePreprocessor (
* The persistent defines (created on the command line) are always at the
* end of the list. We save them.
*/
while ((Gbl_DefineList) && (!Gbl_DefineList->Persist))
while ((AslGbl_DefineList) && (!AslGbl_DefineList->Persist))
{
DefineInfo = Gbl_DefineList;
Gbl_DefineList = DefineInfo->Next;
DefineInfo = AslGbl_DefineList;
AslGbl_DefineList = DefineInfo->Next;
ACPI_FREE (DefineInfo->Replacement);
ACPI_FREE (DefineInfo->Identifier);
@ -388,15 +388,15 @@ PrDoPreprocess (
/* Point compiler input to the new preprocessor output file (.pre) */
FlCloseFile (ASL_FILE_INPUT);
Gbl_Files[ASL_FILE_INPUT].Handle = Gbl_Files[ASL_FILE_PREPROCESSOR].Handle;
AslCompilerin = Gbl_Files[ASL_FILE_INPUT].Handle;
AslGbl_Files[ASL_FILE_INPUT].Handle = AslGbl_Files[ASL_FILE_PREPROCESSOR].Handle;
AslCompilerin = AslGbl_Files[ASL_FILE_INPUT].Handle;
/* Reset globals to allow compiler to run */
FlSeekFile (ASL_FILE_INPUT, 0);
if (!Gbl_PreprocessOnly)
if (!AslGbl_PreprocessOnly)
{
Gbl_CurrentLineNumber = 0;
AslGbl_CurrentLineNumber = 0;
}
DbgPrint (ASL_DEBUG_OUTPUT, "Preprocessing phase complete \n\n");
@ -436,10 +436,10 @@ PrPreprocessInputFile (
/* Scan source line-by-line and process directives. Then write the .i file */
while ((Status = PrGetNextLine (Gbl_Files[ASL_FILE_INPUT].Handle)) != ASL_EOF)
while ((Status = PrGetNextLine (AslGbl_Files[ASL_FILE_INPUT].Handle)) != ASL_EOF)
{
Gbl_CurrentLineNumber++;
Gbl_LogicalLineNumber++;
AslGbl_CurrentLineNumber++;
AslGbl_LogicalLineNumber++;
if (Status == ASL_IGNORE_LINE)
{
@ -448,8 +448,8 @@ PrPreprocessInputFile (
/* Need a copy of the input line for strok() */
strcpy (Gbl_MainTokenBuffer, Gbl_CurrentLineBuffer);
Token = PrGetNextToken (Gbl_MainTokenBuffer, PR_TOKEN_SEPARATORS, &Next);
strcpy (AslGbl_MainTokenBuffer, AslGbl_CurrentLineBuffer);
Token = PrGetNextToken (AslGbl_MainTokenBuffer, PR_TOKEN_SEPARATORS, &Next);
OffsetAdjust = 0;
/* All preprocessor directives must begin with '#' */
@ -476,7 +476,7 @@ PrPreprocessInputFile (
* FALSE, ignore the line and do not write it to the output file.
* This continues until an #else or #endif is encountered.
*/
if (Gbl_IgnoringThisCodeBlock)
if (AslGbl_IgnoringThisCodeBlock)
{
continue;
}
@ -494,10 +494,10 @@ PrPreprocessInputFile (
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
"Matched Macro: %s->%s\n",
Gbl_CurrentLineNumber, DefineInfo->Identifier,
AslGbl_CurrentLineNumber, DefineInfo->Identifier,
DefineInfo->Replacement);
PrDoMacroInvocation (Gbl_MainTokenBuffer, Token,
PrDoMacroInvocation (AslGbl_MainTokenBuffer, Token,
DefineInfo, &Next);
}
else
@ -506,9 +506,9 @@ PrPreprocessInputFile (
/* Replace the name in the original line buffer */
TokenOffset = Token - Gbl_MainTokenBuffer + OffsetAdjust;
TokenOffset = Token - AslGbl_MainTokenBuffer + OffsetAdjust;
PrReplaceData (
&Gbl_CurrentLineBuffer[TokenOffset], strlen (Token),
&AslGbl_CurrentLineBuffer[TokenOffset], strlen (Token),
ReplaceString, strlen (ReplaceString));
/* Adjust for length difference between old and new name length */
@ -517,7 +517,7 @@ PrPreprocessInputFile (
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
"Matched #define: %s->%s\n",
Gbl_CurrentLineNumber, Token,
AslGbl_CurrentLineNumber, Token,
*ReplaceString ? ReplaceString : "(NULL STRING)");
}
}
@ -525,7 +525,7 @@ PrPreprocessInputFile (
Token = PrGetNextToken (NULL, PR_TOKEN_SEPARATORS, &Next);
}
Gbl_PreprocessorLineNumber++;
AslGbl_PreprocessorLineNumber++;
WriteEntireLine:
@ -533,8 +533,8 @@ PrPreprocessInputFile (
* Now we can write the possibly modified source line to the
* preprocessor file(s).
*/
FlWriteFile (ASL_FILE_PREPROCESSOR, Gbl_CurrentLineBuffer,
strlen (Gbl_CurrentLineBuffer));
FlWriteFile (ASL_FILE_PREPROCESSOR, AslGbl_CurrentLineBuffer,
strlen (AslGbl_CurrentLineBuffer));
}
}
@ -557,7 +557,7 @@ PrDoDirective (
char *DirectiveToken,
char **Next)
{
char *Token = Gbl_MainTokenBuffer;
char *Token = AslGbl_MainTokenBuffer;
char *Token2 = NULL;
char *End;
UINT64 Value;
@ -579,7 +579,7 @@ PrDoDirective (
DbgPrint (ASL_PARSE_OUTPUT, PR_PREFIX_ID
"#%s: Unknown directive\n",
Gbl_CurrentLineNumber, DirectiveToken);
AslGbl_CurrentLineNumber, DirectiveToken);
return;
}
@ -590,25 +590,25 @@ PrDoDirective (
* original source file.
*/
FlPrintFile (ASL_FILE_PREPROCESSOR, "#line %u \"%s\" // #%s\n",
Gbl_CurrentLineNumber, Gbl_Files[ASL_FILE_INPUT].Filename,
Gbl_DirectiveInfo[Directive].Name);
AslGbl_CurrentLineNumber, AslGbl_Files[ASL_FILE_INPUT].Filename,
AslGbl_DirectiveInfo[Directive].Name);
/*
* If we are currently ignoring this block and we encounter a #else or
* #elif, we must ignore their blocks also if the parent block is also
* being ignored.
*/
if (Gbl_IgnoringThisCodeBlock)
if (AslGbl_IgnoringThisCodeBlock)
{
switch (Directive)
{
case PR_DIRECTIVE_ELSE:
case PR_DIRECTIVE_ELIF:
if (Gbl_DirectiveStack &&
Gbl_DirectiveStack->IgnoringThisCodeBlock)
if (AslGbl_DirectiveStack &&
AslGbl_DirectiveStack->IgnoringThisCodeBlock)
{
PrDbgPrint ("Ignoring", Gbl_DirectiveInfo[Directive].Name);
PrDbgPrint ("Ignoring", AslGbl_DirectiveInfo[Directive].Name);
return;
}
break;
@ -627,16 +627,16 @@ PrDoDirective (
{
case PR_DIRECTIVE_ELSE:
Gbl_IgnoringThisCodeBlock = !(Gbl_IgnoringThisCodeBlock);
AslGbl_IgnoringThisCodeBlock = !(AslGbl_IgnoringThisCodeBlock);
PrDbgPrint ("Executing", "else block");
return;
case PR_DIRECTIVE_ELIF:
Gbl_IgnoringThisCodeBlock = !(Gbl_IgnoringThisCodeBlock);
AslGbl_IgnoringThisCodeBlock = !(AslGbl_IgnoringThisCodeBlock);
Directive = PR_DIRECTIVE_IF;
if (Gbl_IgnoringThisCodeBlock == TRUE)
if (AslGbl_IgnoringThisCodeBlock == TRUE)
{
/* Not executing the ELSE part -- all done here */
PrDbgPrint ("Ignoring", "elif block");
@ -675,7 +675,7 @@ PrDoDirective (
/* Most directives have at least one argument */
if (Gbl_DirectiveInfo[Directive].ArgCount >= 1)
if (AslGbl_DirectiveInfo[Directive].ArgCount >= 1)
{
Token = PrGetNextToken (NULL, PR_TOKEN_SEPARATORS, Next);
if (!Token)
@ -684,7 +684,7 @@ PrDoDirective (
}
}
if (Gbl_DirectiveInfo[Directive].ArgCount >= 2)
if (AslGbl_DirectiveInfo[Directive].ArgCount >= 2)
{
Token2 = PrGetNextToken (NULL, PR_TOKEN_SEPARATORS, Next);
if (!Token2)
@ -699,7 +699,7 @@ PrDoDirective (
* For "if" style directives, open/push a new block anyway. We
* must do this to keep track of #endif directives
*/
if (Gbl_IgnoringThisCodeBlock)
if (AslGbl_IgnoringThisCodeBlock)
{
switch (Directive)
{
@ -708,7 +708,7 @@ PrDoDirective (
case PR_DIRECTIVE_IFNDEF:
PrPushDirective (Directive, Token);
PrDbgPrint ("Ignoring", Gbl_DirectiveInfo[Directive].Name);
PrDbgPrint ("Ignoring", AslGbl_DirectiveInfo[Directive].Name);
break;
default:
@ -721,18 +721,18 @@ PrDoDirective (
/*
* Execute the directive
*/
PrDbgPrint ("Begin execution", Gbl_DirectiveInfo[Directive].Name);
PrDbgPrint ("Begin execution", AslGbl_DirectiveInfo[Directive].Name);
switch (Directive)
{
case PR_DIRECTIVE_IF:
TokenOffset = Token - Gbl_MainTokenBuffer;
TokenOffset = Token - AslGbl_MainTokenBuffer;
/* Need to expand #define macros in the expression string first */
Status = PrResolveIntegerExpression (
&Gbl_CurrentLineBuffer[TokenOffset-1], &Value);
&AslGbl_CurrentLineBuffer[TokenOffset-1], &Value);
if (ACPI_FAILURE (Status))
{
return;
@ -741,13 +741,13 @@ PrDoDirective (
PrPushDirective (Directive, Token);
if (!Value)
{
Gbl_IgnoringThisCodeBlock = TRUE;
AslGbl_IgnoringThisCodeBlock = TRUE;
}
DbgPrint (ASL_PARSE_OUTPUT, PR_PREFIX_ID
"Resolved #if: %8.8X%8.8X %s\n",
Gbl_CurrentLineNumber, ACPI_FORMAT_UINT64 (Value),
Gbl_IgnoringThisCodeBlock ? "<Skipping Block>" : "<Executing Block>");
AslGbl_CurrentLineNumber, ACPI_FORMAT_UINT64 (Value),
AslGbl_IgnoringThisCodeBlock ? "<Skipping Block>" : "<Executing Block>");
break;
case PR_DIRECTIVE_IFDEF:
@ -755,7 +755,7 @@ PrDoDirective (
PrPushDirective (Directive, Token);
if (!PrMatchDefine (Token))
{
Gbl_IgnoringThisCodeBlock = TRUE;
AslGbl_IgnoringThisCodeBlock = TRUE;
}
PrDbgPrint ("Evaluated", "ifdef");
@ -766,7 +766,7 @@ PrDoDirective (
PrPushDirective (Directive, Token);
if (PrMatchDefine (Token))
{
Gbl_IgnoringThisCodeBlock = TRUE;
AslGbl_IgnoringThisCodeBlock = TRUE;
}
PrDbgPrint ("Evaluated", "ifndef");
@ -777,13 +777,13 @@ PrDoDirective (
* By definition, if first char after the name is a paren,
* this is a function macro.
*/
TokenOffset = Token - Gbl_MainTokenBuffer + strlen (Token);
if (*(&Gbl_CurrentLineBuffer[TokenOffset]) == '(')
TokenOffset = Token - AslGbl_MainTokenBuffer + strlen (Token);
if (*(&AslGbl_CurrentLineBuffer[TokenOffset]) == '(')
{
#ifndef MACROS_SUPPORTED
AcpiOsPrintf (
"%s ERROR - line %u: #define macros are not supported yet\n",
Gbl_CurrentLineBuffer, Gbl_LogicalLineNumber);
AslGbl_CurrentLineBuffer, AslGbl_LogicalLineNumber);
exit(1);
#else
PrAddMacro (Token, Next);
@ -822,7 +822,7 @@ PrDoDirective (
#endif
DbgPrint (ASL_PARSE_OUTPUT, PR_PREFIX_ID
"New #define: %s->%s\n",
Gbl_LogicalLineNumber, Token, Token2);
AslGbl_LogicalLineNumber, Token, Token2);
PrAddDefine (Token, Token2, FALSE);
}
@ -835,8 +835,8 @@ PrDoDirective (
PrError (ASL_ERROR, ASL_MSG_ERROR_DIRECTIVE,
THIS_TOKEN_OFFSET (Token));
Gbl_SourceLine = 0;
Gbl_NextError = Gbl_ErrorLog;
AslGbl_SourceLine = 0;
AslGbl_NextError = AslGbl_ErrorLog;
CmCleanupAndExit ();
exit(1);
@ -849,8 +849,8 @@ PrDoDirective (
}
DbgPrint (ASL_PARSE_OUTPUT, PR_PREFIX_ID
"Start #include file \"%s\"\n", Gbl_CurrentLineNumber,
Token, Gbl_CurrentLineNumber);
"Start #include file \"%s\"\n", AslGbl_CurrentLineNumber,
Token, AslGbl_CurrentLineNumber);
PrDoIncludeFile (Token);
break;
@ -871,32 +871,32 @@ PrDoDirective (
DbgPrint (ASL_PARSE_OUTPUT, PR_PREFIX_ID
"Start #includebuffer input from file \"%s\", buffer name %s\n",
Gbl_CurrentLineNumber, Token, Token2);
AslGbl_CurrentLineNumber, Token, Token2);
PrDoIncludeBuffer (Token, Token2);
break;
case PR_DIRECTIVE_LINE:
TokenOffset = Token - Gbl_MainTokenBuffer;
TokenOffset = Token - AslGbl_MainTokenBuffer;
Status = PrResolveIntegerExpression (
&Gbl_CurrentLineBuffer[TokenOffset-1], &Value);
&AslGbl_CurrentLineBuffer[TokenOffset-1], &Value);
if (ACPI_FAILURE (Status))
{
return;
}
DbgPrint (ASL_PARSE_OUTPUT, PR_PREFIX_ID
"User #line invocation %s\n", Gbl_CurrentLineNumber,
"User #line invocation %s\n", AslGbl_CurrentLineNumber,
Token);
Gbl_CurrentLineNumber = (UINT32) Value;
AslGbl_CurrentLineNumber = (UINT32) Value;
/* Emit #line into the preprocessor file */
FlPrintFile (ASL_FILE_PREPROCESSOR, "#line %u \"%s\"\n",
Gbl_CurrentLineNumber, Gbl_Files[ASL_FILE_INPUT].Filename);
AslGbl_CurrentLineNumber, AslGbl_Files[ASL_FILE_INPUT].Filename);
break;
case PR_DIRECTIVE_PRAGMA:
@ -909,8 +909,8 @@ PrDoDirective (
goto SyntaxError;
}
TokenOffset = Token - Gbl_MainTokenBuffer;
AslDisableException (&Gbl_CurrentLineBuffer[TokenOffset]);
TokenOffset = Token - AslGbl_MainTokenBuffer;
AslDisableException (&AslGbl_CurrentLineBuffer[TokenOffset]);
}
else if (!strcmp (Token, "message"))
{
@ -920,8 +920,8 @@ PrDoDirective (
goto SyntaxError;
}
TokenOffset = Token - Gbl_MainTokenBuffer;
AcpiOsPrintf ("%s\n", &Gbl_CurrentLineBuffer[TokenOffset]);
TokenOffset = Token - AslGbl_MainTokenBuffer;
AcpiOsPrintf ("%s\n", &AslGbl_CurrentLineBuffer[TokenOffset]);
}
else
{
@ -935,7 +935,7 @@ PrDoDirective (
case PR_DIRECTIVE_UNDEF:
DbgPrint (ASL_PARSE_OUTPUT, PR_PREFIX_ID
"#undef: %s\n", Gbl_CurrentLineNumber, Token);
"#undef: %s\n", AslGbl_CurrentLineNumber, Token);
PrRemoveDefine (Token);
break;
@ -945,8 +945,8 @@ PrDoDirective (
PrError (ASL_WARNING, ASL_MSG_WARNING_DIRECTIVE,
THIS_TOKEN_OFFSET (Token));
Gbl_SourceLine = 0;
Gbl_NextError = Gbl_ErrorLog;
AslGbl_SourceLine = 0;
AslGbl_NextError = AslGbl_ErrorLog;
break;
default:
@ -954,7 +954,7 @@ PrDoDirective (
/* Should never get here */
DbgPrint (ASL_PARSE_OUTPUT, PR_PREFIX_ID
"Unrecognized directive: %u\n",
Gbl_CurrentLineNumber, Directive);
AslGbl_CurrentLineNumber, Directive);
break;
}
@ -1010,14 +1010,14 @@ PrGetNextLine (
/* Always clear the global line buffer */
memset (Gbl_CurrentLineBuffer, 0, Gbl_LineBufferSize);
memset (AslGbl_CurrentLineBuffer, 0, AslGbl_LineBufferSize);
for (i = 0; ;)
{
/*
* If line is too long, expand the line buffers. Also increases
* Gbl_LineBufferSize.
* AslGbl_LineBufferSize.
*/
if (i >= Gbl_LineBufferSize)
if (i >= AslGbl_LineBufferSize)
{
UtExpandLineBuffers ();
}
@ -1033,7 +1033,7 @@ PrGetNextLine (
*/
if (i > 0)
{
Gbl_CurrentLineBuffer[i] = '\n';
AslGbl_CurrentLineBuffer[i] = '\n';
return (AE_OK);
}
@ -1093,7 +1093,7 @@ PrGetNextLine (
/* Always copy the character into line buffer */
Gbl_CurrentLineBuffer[i] = (char) c;
AslGbl_CurrentLineBuffer[i] = (char) c;
i++;
/* Always exit on end-of-line */
@ -1152,9 +1152,9 @@ PrMatchDirective (
return (ASL_DIRECTIVE_NOT_FOUND);
}
for (i = 0; Gbl_DirectiveInfo[i].Name; i++)
for (i = 0; AslGbl_DirectiveInfo[i].Name; i++)
{
if (!strcmp (Gbl_DirectiveInfo[i].Name, Directive))
if (!strcmp (AslGbl_DirectiveInfo[i].Name, Directive))
{
return (i);
}
@ -1191,25 +1191,26 @@ PrPushDirective (
/* Allocate and populate a stack info item */
Info = ACPI_ALLOCATE (sizeof (DIRECTIVE_INFO));
Info = ACPI_CAST_PTR (DIRECTIVE_INFO,
UtLocalCacheCalloc (sizeof (DIRECTIVE_INFO)));
Info->Next = Gbl_DirectiveStack;
Info->Next = AslGbl_DirectiveStack;
Info->Directive = Directive;
Info->IgnoringThisCodeBlock = Gbl_IgnoringThisCodeBlock;
Info->IgnoringThisCodeBlock = AslGbl_IgnoringThisCodeBlock;
AcpiUtSafeStrncpy (Info->Argument, Argument, MAX_ARGUMENT_LENGTH);
DbgPrint (ASL_DEBUG_OUTPUT,
"Pr(%.4u) - [%u %s] %*s Pushed [#%s %s]: IgnoreFlag = %s\n",
Gbl_CurrentLineNumber, Gbl_IfDepth,
Gbl_IgnoringThisCodeBlock ? "I" : "E",
Gbl_IfDepth * 4, " ",
Gbl_DirectiveInfo[Directive].Name,
Argument, Gbl_IgnoringThisCodeBlock ? "TRUE" : "FALSE");
AslGbl_CurrentLineNumber, AslGbl_IfDepth,
AslGbl_IgnoringThisCodeBlock ? "I" : "E",
AslGbl_IfDepth * 4, " ",
AslGbl_DirectiveInfo[Directive].Name,
Argument, AslGbl_IgnoringThisCodeBlock ? "TRUE" : "FALSE");
/* Push new item */
Gbl_DirectiveStack = Info;
Gbl_IfDepth++;
AslGbl_DirectiveStack = Info;
AslGbl_IfDepth++;
}
@ -1238,7 +1239,7 @@ PrPopDirective (
/* Check for empty stack */
Info = Gbl_DirectiveStack;
Info = AslGbl_DirectiveStack;
if (!Info)
{
return (AE_ERROR);
@ -1246,17 +1247,17 @@ PrPopDirective (
/* Pop one item, keep globals up-to-date */
Gbl_IfDepth--;
Gbl_IgnoringThisCodeBlock = Info->IgnoringThisCodeBlock;
Gbl_DirectiveStack = Info->Next;
AslGbl_IfDepth--;
AslGbl_IgnoringThisCodeBlock = Info->IgnoringThisCodeBlock;
AslGbl_DirectiveStack = Info->Next;
DbgPrint (ASL_DEBUG_OUTPUT,
"Pr(%.4u) - [%u %s] %*s Popped [#%s %s]: IgnoreFlag now = %s\n",
Gbl_CurrentLineNumber, Gbl_IfDepth,
Gbl_IgnoringThisCodeBlock ? "I" : "E",
Gbl_IfDepth * 4, " ",
Gbl_DirectiveInfo[Info->Directive].Name,
Info->Argument, Gbl_IgnoringThisCodeBlock ? "TRUE" : "FALSE");
AslGbl_CurrentLineNumber, AslGbl_IfDepth,
AslGbl_IgnoringThisCodeBlock ? "I" : "E",
AslGbl_IfDepth * 4, " ",
AslGbl_DirectiveInfo[Info->Directive].Name,
Info->Argument, AslGbl_IgnoringThisCodeBlock ? "TRUE" : "FALSE");
ACPI_FREE (Info);
return (AE_OK);
@ -1284,10 +1285,10 @@ PrDbgPrint (
DbgPrint (ASL_DEBUG_OUTPUT, "Pr(%.4u) - [%u %s] "
"%*s %s #%s, IfDepth %u\n",
Gbl_CurrentLineNumber, Gbl_IfDepth,
Gbl_IgnoringThisCodeBlock ? "I" : "E",
Gbl_IfDepth * 4, " ",
Action, DirectiveName, Gbl_IfDepth);
AslGbl_CurrentLineNumber, AslGbl_IfDepth,
AslGbl_IgnoringThisCodeBlock ? "I" : "E",
AslGbl_IfDepth * 4, " ",
Action, DirectiveName, AslGbl_IfDepth);
}
@ -1365,7 +1366,7 @@ PrDoIncludeBuffer (
DbgPrint (ASL_PARSE_OUTPUT, PR_PREFIX_ID
"#includebuffer: read %u bytes from %s\n",
Gbl_CurrentLineNumber, i, FullPathname);
AslGbl_CurrentLineNumber, i, FullPathname);
/* Close the Name() operator */

View File

@ -261,8 +261,8 @@ PrError (
UINT32 Column)
{
#if 0
AcpiOsPrintf ("%s (%u) : %s", Gbl_Files[ASL_FILE_INPUT].Filename,
Gbl_CurrentLineNumber, Gbl_CurrentLineBuffer);
AcpiOsPrintf ("%s (%u) : %s", AslGbl_Files[ASL_FILE_INPUT].Filename,
AslGbl_CurrentLineNumber, AslGbl_CurrentLineBuffer);
#endif
@ -274,11 +274,11 @@ PrError (
/* TBD: Need Logical line number? */
AslCommonError2 (Level, MessageId,
Gbl_CurrentLineNumber, Column,
Gbl_CurrentLineBuffer,
Gbl_Files[ASL_FILE_INPUT].Filename, "Preprocessor");
AslGbl_CurrentLineNumber, Column,
AslGbl_CurrentLineBuffer,
AslGbl_Files[ASL_FILE_INPUT].Filename, "Preprocessor");
Gbl_PreprocessorError = TRUE;
AslGbl_PreprocessorError = TRUE;
}
@ -358,7 +358,7 @@ PrOpenIncludeFile (
/* Start the actual include file on the next line */
Gbl_CurrentLineOffset++;
AslGbl_CurrentLineOffset++;
/* Attempt to open the include file */
/* If the file specifies an absolute path, just open it */
@ -385,7 +385,7 @@ PrOpenIncludeFile (
* Construct the file pathname from the global directory name.
*/
IncludeFile = PrOpenIncludeWithPrefix (
Gbl_DirectoryPath, Filename, OpenMode, FullPathname);
AslGbl_DirectoryPath, Filename, OpenMode, FullPathname);
if (IncludeFile)
{
return (IncludeFile);
@ -395,7 +395,7 @@ PrOpenIncludeFile (
* Second, search for the file within the (possibly multiple)
* directories specified by the -I option on the command line.
*/
NextDir = Gbl_IncludeDirList;
NextDir = AslGbl_IncludeDirList;
while (NextDir)
{
IncludeFile = PrOpenIncludeWithPrefix (
@ -411,7 +411,7 @@ PrOpenIncludeFile (
/* We could not open the include file after trying very hard */
ErrorExit:
sprintf (Gbl_MainTokenBuffer, "%s, %s", Filename, strerror (errno));
sprintf (AslGbl_MainTokenBuffer, "%s, %s", Filename, strerror (errno));
PrError (ASL_ERROR, ASL_MSG_INCLUDE_FILE_OPEN, 0);
return (NULL);
}
@ -448,7 +448,7 @@ PrOpenIncludeWithPrefix (
DbgPrint (ASL_PARSE_OUTPUT, PR_PREFIX_ID
"Include: Opening file - \"%s\"\n",
Gbl_CurrentLineNumber, Pathname);
AslGbl_CurrentLineNumber, Pathname);
/* Attempt to open the file, push if successful */
@ -490,33 +490,33 @@ PrPushInputFileStack (
PR_FILE_NODE *Fnode;
Gbl_HasIncludeFiles = TRUE;
AslGbl_HasIncludeFiles = TRUE;
/* Save the current state in an Fnode */
Fnode = UtLocalCalloc (sizeof (PR_FILE_NODE));
Fnode->File = Gbl_Files[ASL_FILE_INPUT].Handle;
Fnode->Next = Gbl_InputFileList;
Fnode->Filename = Gbl_Files[ASL_FILE_INPUT].Filename;
Fnode->CurrentLineNumber = Gbl_CurrentLineNumber;
Fnode->File = AslGbl_Files[ASL_FILE_INPUT].Handle;
Fnode->Next = AslGbl_InputFileList;
Fnode->Filename = AslGbl_Files[ASL_FILE_INPUT].Filename;
Fnode->CurrentLineNumber = AslGbl_CurrentLineNumber;
/* Push it on the stack */
Gbl_InputFileList = Fnode;
AslGbl_InputFileList = Fnode;
DbgPrint (ASL_PARSE_OUTPUT, PR_PREFIX_ID
"Push InputFile Stack: handle %p\n\n",
Gbl_CurrentLineNumber, InputFile);
AslGbl_CurrentLineNumber, InputFile);
/* Reset the global line count and filename */
Gbl_Files[ASL_FILE_INPUT].Filename =
AslGbl_Files[ASL_FILE_INPUT].Filename =
UtLocalCacheCalloc (strlen (Filename) + 1);
strcpy (Gbl_Files[ASL_FILE_INPUT].Filename, Filename);
strcpy (AslGbl_Files[ASL_FILE_INPUT].Filename, Filename);
Gbl_Files[ASL_FILE_INPUT].Handle = InputFile;
Gbl_CurrentLineNumber = 1;
AslGbl_Files[ASL_FILE_INPUT].Handle = InputFile;
AslGbl_CurrentLineNumber = 1;
/* Emit a new #line directive for the include file */
@ -546,10 +546,10 @@ PrPopInputFileStack (
PR_FILE_NODE *Fnode;
Fnode = Gbl_InputFileList;
Fnode = AslGbl_InputFileList;
DbgPrint (ASL_PARSE_OUTPUT, "\n" PR_PREFIX_ID
"Pop InputFile Stack, Fnode %p\n\n",
Gbl_CurrentLineNumber, Fnode);
AslGbl_CurrentLineNumber, Fnode);
if (!Fnode)
{
@ -558,22 +558,22 @@ PrPopInputFileStack (
/* Close the current include file */
fclose (Gbl_Files[ASL_FILE_INPUT].Handle);
fclose (AslGbl_Files[ASL_FILE_INPUT].Handle);
/* Update the top-of-stack */
Gbl_InputFileList = Fnode->Next;
AslGbl_InputFileList = Fnode->Next;
/* Reset global line counter and filename */
Gbl_Files[ASL_FILE_INPUT].Filename = Fnode->Filename;
Gbl_Files[ASL_FILE_INPUT].Handle = Fnode->File;
Gbl_CurrentLineNumber = Fnode->CurrentLineNumber;
AslGbl_Files[ASL_FILE_INPUT].Filename = Fnode->Filename;
AslGbl_Files[ASL_FILE_INPUT].Handle = Fnode->File;
AslGbl_CurrentLineNumber = Fnode->CurrentLineNumber;
/* Emit a new #line directive after the include file */
FlPrintFile (ASL_FILE_PREPROCESSOR, "#line %u \"%s\"\n",
Gbl_CurrentLineNumber, Fnode->Filename);
AslGbl_CurrentLineNumber, Fnode->Filename);
/* All done with this node */

View File

@ -1088,7 +1088,7 @@ AcpiDbCommandDispatch (
case CMD_LIST:
#ifdef ACPI_DISASSEMBLER
AcpiDbDisassembleAml (AcpiGbl_DbArgs[1], Op);;
AcpiDbDisassembleAml (AcpiGbl_DbArgs[1], Op);
#else
AcpiOsPrintf ("The AML Disassembler is not configured/present\n");
#endif

View File

@ -259,7 +259,7 @@ AcpiDmDecodeAttribute (
AcpiOsPrintf ("AttribQuick");
break;
case AML_FIELD_ATTRIB_SEND_RCV:
case AML_FIELD_ATTRIB_SEND_RECEIVE:
AcpiOsPrintf ("AttribSendReceive");
break;
@ -279,17 +279,17 @@ AcpiDmDecodeAttribute (
AcpiOsPrintf ("AttribBlock");
break;
case AML_FIELD_ATTRIB_MULTIBYTE:
case AML_FIELD_ATTRIB_BYTES:
AcpiOsPrintf ("AttribBytes");
break;
case AML_FIELD_ATTRIB_WORD_CALL:
case AML_FIELD_ATTRIB_PROCESS_CALL:
AcpiOsPrintf ("AttribProcessCall");
break;
case AML_FIELD_ATTRIB_BLOCK_CALL:
case AML_FIELD_ATTRIB_BLOCK_PROCESS_CALL:
AcpiOsPrintf ("AttribBlockProcessCall");
break;
@ -299,7 +299,7 @@ AcpiDmDecodeAttribute (
AcpiOsPrintf ("AttribRawBytes");
break;
case AML_FIELD_ATTRIB_RAW_PROCESS:
case AML_FIELD_ATTRIB_RAW_PROCESS_BYTES:
AcpiOsPrintf ("AttribRawProcessBytes");
break;

View File

@ -838,6 +838,20 @@ AcpiEvExecuteRegMethods (
ACPI_FUNCTION_TRACE (EvExecuteRegMethods);
/*
* These address spaces do not need a call to _REG, since the ACPI
* specification defines them as: "must always be accessible". Since
* they never change state (never become unavailable), no need to ever
* call _REG on them. Also, a DataTable is not a "real" address space,
* so do not call _REG. September 2018.
*/
if ((SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY) ||
(SpaceId == ACPI_ADR_SPACE_SYSTEM_IO) ||
(SpaceId == ACPI_ADR_SPACE_DATA_TABLE))
{
return_VOID;
}
Info.SpaceId = SpaceId;
Info.Function = Function;
Info.RegRunCount = 0;
@ -904,8 +918,8 @@ AcpiEvRegRun (
}
/*
* We only care about regions.and objects that are allowed to have address
* space handlers
* We only care about regions and objects that are allowed to have
* address space handlers
*/
if ((Node->Type != ACPI_TYPE_REGION) &&
(Node != AcpiGbl_RootNode))

View File

@ -158,12 +158,6 @@
#define _COMPONENT ACPI_EVENTS
ACPI_MODULE_NAME ("evrgnini")
/* Local prototypes */
static BOOLEAN
AcpiEvIsPciRootBridge (
ACPI_NAMESPACE_NODE *Node);
/*******************************************************************************
*
@ -490,7 +484,7 @@ AcpiEvPciConfigRegionSetup (
*
******************************************************************************/
static BOOLEAN
BOOLEAN
AcpiEvIsPciRootBridge (
ACPI_NAMESPACE_NODE *Node)
{

View File

@ -354,7 +354,6 @@ AcpiRemoveAddressSpaceHandler (
* DetachRegion removed the previous head.
*/
RegionObj = HandlerObj->AddressSpace.RegionList;
}
/* Remove this Handler object from the list */

View File

@ -1,6 +1,6 @@
/******************************************************************************
*
* Module Name: exfield - ACPI AML (p-code) execution - field manipulation
* Module Name: exfield - AML execution - FieldUnit read/write
*
*****************************************************************************/
@ -159,72 +159,68 @@
#define _COMPONENT ACPI_EXECUTER
ACPI_MODULE_NAME ("exfield")
/* Local prototypes */
static UINT32
AcpiExGetSerialAccessLength (
UINT32 AccessorType,
UINT32 AccessLength);
/*
* This table maps the various Attrib protocols to the byte transfer
* length. Used for the generic serial bus.
*/
#define ACPI_INVALID_PROTOCOL_ID 0x80
#define ACPI_MAX_PROTOCOL_ID 0x0F
const UINT8 AcpiProtocolLengths[] =
{
ACPI_INVALID_PROTOCOL_ID, /* 0 - reserved */
ACPI_INVALID_PROTOCOL_ID, /* 1 - reserved */
0x00, /* 2 - ATTRIB_QUICK */
ACPI_INVALID_PROTOCOL_ID, /* 3 - reserved */
0x01, /* 4 - ATTRIB_SEND_RECEIVE */
ACPI_INVALID_PROTOCOL_ID, /* 5 - reserved */
0x01, /* 6 - ATTRIB_BYTE */
ACPI_INVALID_PROTOCOL_ID, /* 7 - reserved */
0x02, /* 8 - ATTRIB_WORD */
ACPI_INVALID_PROTOCOL_ID, /* 9 - reserved */
0xFF, /* A - ATTRIB_BLOCK */
0xFF, /* B - ATTRIB_BYTES */
0x02, /* C - ATTRIB_PROCESS_CALL */
0xFF, /* D - ATTRIB_BLOCK_PROCESS_CALL */
0xFF, /* E - ATTRIB_RAW_BYTES */
0xFF /* F - ATTRIB_RAW_PROCESS_BYTES */
};
/*******************************************************************************
*
* FUNCTION: AcpiExGetSerialAccessLength
* FUNCTION: AcpiExGetProtocolBufferLength
*
* PARAMETERS: AccessorType - The type of the protocol indicated by region
* PARAMETERS: ProtocolId - The type of the protocol indicated by region
* field access attributes
* AccessLength - The access length of the region field
* ReturnLength - Where the protocol byte transfer length is
* returned
*
* RETURN: Decoded access length
* RETURN: Status and decoded byte transfer length
*
* DESCRIPTION: This routine returns the length of the GenericSerialBus
* protocol bytes
*
******************************************************************************/
static UINT32
AcpiExGetSerialAccessLength (
UINT32 AccessorType,
UINT32 AccessLength)
ACPI_STATUS
AcpiExGetProtocolBufferLength (
UINT32 ProtocolId,
UINT32 *ReturnLength)
{
UINT32 Length;
switch (AccessorType)
if ((ProtocolId > ACPI_MAX_PROTOCOL_ID) ||
(AcpiProtocolLengths[ProtocolId] == ACPI_INVALID_PROTOCOL_ID))
{
case AML_FIELD_ATTRIB_QUICK:
ACPI_ERROR ((AE_INFO,
"Invalid Field/AccessAs protocol ID: 0x%4.4X", ProtocolId));
Length = 0;
break;
case AML_FIELD_ATTRIB_SEND_RCV:
case AML_FIELD_ATTRIB_BYTE:
Length = 1;
break;
case AML_FIELD_ATTRIB_WORD:
case AML_FIELD_ATTRIB_WORD_CALL:
Length = 2;
break;
case AML_FIELD_ATTRIB_MULTIBYTE:
case AML_FIELD_ATTRIB_RAW_BYTES:
case AML_FIELD_ATTRIB_RAW_PROCESS:
Length = AccessLength;
break;
case AML_FIELD_ATTRIB_BLOCK:
case AML_FIELD_ATTRIB_BLOCK_CALL:
default:
Length = ACPI_GSBUS_BUFFER_SIZE - 2;
break;
return (AE_AML_PROTOCOL);
}
return (Length);
*ReturnLength = AcpiProtocolLengths[ProtocolId];
return (AE_OK);
}
@ -251,10 +247,8 @@ AcpiExReadDataFromField (
{
ACPI_STATUS Status;
ACPI_OPERAND_OBJECT *BufferDesc;
ACPI_SIZE Length;
void *Buffer;
UINT32 Function;
UINT16 AccessorType;
UINT32 BufferLength;
ACPI_FUNCTION_TRACE_PTR (ExReadDataFromField, ObjDesc);
@ -287,63 +281,14 @@ AcpiExReadDataFromField (
}
}
else if ((ObjDesc->Common.Type == ACPI_TYPE_LOCAL_REGION_FIELD) &&
(ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_SMBUS ||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS ||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI))
(ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_SMBUS ||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS ||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI))
{
/*
* This is an SMBus, GSBus or IPMI read. We must create a buffer to
* hold the data and then directly access the region handler.
*
* Note: SMBus and GSBus protocol value is passed in upper 16-bits
* of Function
*/
if (ObjDesc->Field.RegionObj->Region.SpaceId ==
ACPI_ADR_SPACE_SMBUS)
{
Length = ACPI_SMBUS_BUFFER_SIZE;
Function = ACPI_READ | (ObjDesc->Field.Attribute << 16);
}
else if (ObjDesc->Field.RegionObj->Region.SpaceId ==
ACPI_ADR_SPACE_GSBUS)
{
AccessorType = ObjDesc->Field.Attribute;
Length = AcpiExGetSerialAccessLength (
AccessorType, ObjDesc->Field.AccessLength);
/* SMBus, GSBus, IPMI serial */
/*
* Add additional 2 bytes for the GenericSerialBus data buffer:
*
* Status; (Byte 0 of the data buffer)
* Length; (Byte 1 of the data buffer)
* Data[x-1]: (Bytes 2-x of the arbitrary length data buffer)
*/
Length += 2;
Function = ACPI_READ | (AccessorType << 16);
}
else /* IPMI */
{
Length = ACPI_IPMI_BUFFER_SIZE;
Function = ACPI_READ;
}
BufferDesc = AcpiUtCreateBufferObject (Length);
if (!BufferDesc)
{
return_ACPI_STATUS (AE_NO_MEMORY);
}
/* Lock entire transaction if requested */
AcpiExAcquireGlobalLock (ObjDesc->CommonField.FieldFlags);
/* Call the region handler for the read */
Status = AcpiExAccessRegion (ObjDesc, 0,
ACPI_CAST_PTR (UINT64, BufferDesc->Buffer.Pointer), Function);
AcpiExReleaseGlobalLock (ObjDesc->CommonField.FieldFlags);
goto Exit;
Status = AcpiExReadSerialBus (ObjDesc, RetBufferDesc);
return_ACPI_STATUS (Status);
}
/*
@ -356,14 +301,14 @@ AcpiExReadDataFromField (
*
* Note: Field.length is in bits.
*/
Length = (ACPI_SIZE) ACPI_ROUND_BITS_UP_TO_BYTES (
BufferLength = (ACPI_SIZE) ACPI_ROUND_BITS_UP_TO_BYTES (
ObjDesc->Field.BitLength);
if (Length > AcpiGbl_IntegerByteWidth)
if (BufferLength > AcpiGbl_IntegerByteWidth)
{
/* Field is too large for an Integer, create a Buffer instead */
BufferDesc = AcpiUtCreateBufferObject (Length);
BufferDesc = AcpiUtCreateBufferObject (BufferLength);
if (!BufferDesc)
{
return_ACPI_STATUS (AE_NO_MEMORY);
@ -380,47 +325,22 @@ AcpiExReadDataFromField (
return_ACPI_STATUS (AE_NO_MEMORY);
}
Length = AcpiGbl_IntegerByteWidth;
BufferLength = AcpiGbl_IntegerByteWidth;
Buffer = &BufferDesc->Integer.Value;
}
if ((ObjDesc->Common.Type == ACPI_TYPE_LOCAL_REGION_FIELD) &&
(ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GPIO))
{
/*
* For GPIO (GeneralPurposeIo), the Address will be the bit offset
* from the previous Connection() operator, making it effectively a
* pin number index. The BitLength is the length of the field, which
* is thus the number of pins.
*/
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
"GPIO FieldRead [FROM]: Pin %u Bits %u\n",
ObjDesc->Field.PinNumberIndex, ObjDesc->Field.BitLength));
/* General Purpose I/O */
/* Lock entire transaction if requested */
AcpiExAcquireGlobalLock (ObjDesc->CommonField.FieldFlags);
/* Perform the write */
Status = AcpiExAccessRegion (
ObjDesc, 0, (UINT64 *) Buffer, ACPI_READ);
AcpiExReleaseGlobalLock (ObjDesc->CommonField.FieldFlags);
if (ACPI_FAILURE (Status))
{
AcpiUtRemoveReference (BufferDesc);
}
else
{
*RetBufferDesc = BufferDesc;
}
return_ACPI_STATUS (Status);
Status = AcpiExReadGpio (ObjDesc, Buffer);
goto Exit;
}
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
"FieldRead [TO]: Obj %p, Type %X, Buf %p, ByteLen %X\n",
ObjDesc, ObjDesc->Common.Type, Buffer, (UINT32) Length));
ObjDesc, ObjDesc->Common.Type, Buffer, BufferLength));
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
"FieldRead [FROM]: BitLen %X, BitOff %X, ByteOff %X\n",
ObjDesc->CommonField.BitLength,
@ -433,7 +353,7 @@ AcpiExReadDataFromField (
/* Read from the field */
Status = AcpiExExtractFromField (ObjDesc, Buffer, (UINT32) Length);
Status = AcpiExExtractFromField (ObjDesc, Buffer, BufferLength);
AcpiExReleaseGlobalLock (ObjDesc->CommonField.FieldFlags);
@ -472,11 +392,8 @@ AcpiExWriteDataToField (
ACPI_OPERAND_OBJECT **ResultDesc)
{
ACPI_STATUS Status;
UINT32 Length;
UINT32 BufferLength;
void *Buffer;
ACPI_OPERAND_OBJECT *BufferDesc;
UINT32 Function;
UINT16 AccessorType;
ACPI_FUNCTION_TRACE_PTR (ExWriteDataToField, ObjDesc);
@ -505,131 +422,21 @@ AcpiExWriteDataToField (
}
}
else if ((ObjDesc->Common.Type == ACPI_TYPE_LOCAL_REGION_FIELD) &&
(ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_SMBUS ||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS ||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI))
(ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GPIO))
{
/*
* This is an SMBus, GSBus or IPMI write. We will bypass the entire
* field mechanism and handoff the buffer directly to the handler.
* For these address spaces, the buffer is bi-directional; on a
* write, return data is returned in the same buffer.
*
* Source must be a buffer of sufficient size:
* ACPI_SMBUS_BUFFER_SIZE, ACPI_GSBUS_BUFFER_SIZE, or
* ACPI_IPMI_BUFFER_SIZE.
*
* Note: SMBus and GSBus protocol type is passed in upper 16-bits
* of Function
*/
if (SourceDesc->Common.Type != ACPI_TYPE_BUFFER)
{
ACPI_ERROR ((AE_INFO,
"SMBus/IPMI/GenericSerialBus write requires "
"Buffer, found type %s",
AcpiUtGetObjectTypeName (SourceDesc)));
/* General Purpose I/O */
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
if (ObjDesc->Field.RegionObj->Region.SpaceId ==
ACPI_ADR_SPACE_SMBUS)
{
Length = ACPI_SMBUS_BUFFER_SIZE;
Function = ACPI_WRITE | (ObjDesc->Field.Attribute << 16);
}
else if (ObjDesc->Field.RegionObj->Region.SpaceId ==
ACPI_ADR_SPACE_GSBUS)
{
AccessorType = ObjDesc->Field.Attribute;
Length = AcpiExGetSerialAccessLength (
AccessorType, ObjDesc->Field.AccessLength);
/*
* Add additional 2 bytes for the GenericSerialBus data buffer:
*
* Status; (Byte 0 of the data buffer)
* Length; (Byte 1 of the data buffer)
* Data[x-1]: (Bytes 2-x of the arbitrary length data buffer)
*/
Length += 2;
Function = ACPI_WRITE | (AccessorType << 16);
}
else /* IPMI */
{
Length = ACPI_IPMI_BUFFER_SIZE;
Function = ACPI_WRITE;
}
if (SourceDesc->Buffer.Length < Length)
{
ACPI_ERROR ((AE_INFO,
"SMBus/IPMI/GenericSerialBus write requires "
"Buffer of length %u, found length %u",
Length, SourceDesc->Buffer.Length));
return_ACPI_STATUS (AE_AML_BUFFER_LIMIT);
}
/* Create the bi-directional buffer */
BufferDesc = AcpiUtCreateBufferObject (Length);
if (!BufferDesc)
{
return_ACPI_STATUS (AE_NO_MEMORY);
}
Buffer = BufferDesc->Buffer.Pointer;
memcpy (Buffer, SourceDesc->Buffer.Pointer, Length);
/* Lock entire transaction if requested */
AcpiExAcquireGlobalLock (ObjDesc->CommonField.FieldFlags);
/*
* Perform the write (returns status and perhaps data in the
* same buffer)
*/
Status = AcpiExAccessRegion (
ObjDesc, 0, (UINT64 *) Buffer, Function);
AcpiExReleaseGlobalLock (ObjDesc->CommonField.FieldFlags);
*ResultDesc = BufferDesc;
Status = AcpiExWriteGpio (SourceDesc, ObjDesc, ResultDesc);
return_ACPI_STATUS (Status);
}
else if ((ObjDesc->Common.Type == ACPI_TYPE_LOCAL_REGION_FIELD) &&
(ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GPIO))
(ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_SMBUS ||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS ||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI))
{
/*
* For GPIO (GeneralPurposeIo), we will bypass the entire field
* mechanism and handoff the bit address and bit width directly to
* the handler. The Address will be the bit offset
* from the previous Connection() operator, making it effectively a
* pin number index. The BitLength is the length of the field, which
* is thus the number of pins.
*/
if (SourceDesc->Common.Type != ACPI_TYPE_INTEGER)
{
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
/* SMBus, GSBus, IPMI serial */
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
"GPIO FieldWrite [FROM]: (%s:%X), Val %.8X [TO]: Pin %u Bits %u\n",
AcpiUtGetTypeName (SourceDesc->Common.Type),
SourceDesc->Common.Type, (UINT32) SourceDesc->Integer.Value,
ObjDesc->Field.PinNumberIndex, ObjDesc->Field.BitLength));
Buffer = &SourceDesc->Integer.Value;
/* Lock entire transaction if requested */
AcpiExAcquireGlobalLock (ObjDesc->CommonField.FieldFlags);
/* Perform the write */
Status = AcpiExAccessRegion (
ObjDesc, 0, (UINT64 *) Buffer, ACPI_WRITE);
AcpiExReleaseGlobalLock (ObjDesc->CommonField.FieldFlags);
Status = AcpiExWriteSerialBus (SourceDesc, ObjDesc, ResultDesc);
return_ACPI_STATUS (Status);
}
@ -640,30 +447,29 @@ AcpiExWriteDataToField (
case ACPI_TYPE_INTEGER:
Buffer = &SourceDesc->Integer.Value;
Length = sizeof (SourceDesc->Integer.Value);
BufferLength = sizeof (SourceDesc->Integer.Value);
break;
case ACPI_TYPE_BUFFER:
Buffer = SourceDesc->Buffer.Pointer;
Length = SourceDesc->Buffer.Length;
BufferLength = SourceDesc->Buffer.Length;
break;
case ACPI_TYPE_STRING:
Buffer = SourceDesc->String.Pointer;
Length = SourceDesc->String.Length;
BufferLength = SourceDesc->String.Length;
break;
default:
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
"FieldWrite [FROM]: Obj %p (%s:%X), Buf %p, ByteLen %X\n",
SourceDesc, AcpiUtGetTypeName (SourceDesc->Common.Type),
SourceDesc->Common.Type, Buffer, Length));
SourceDesc->Common.Type, Buffer, BufferLength));
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
"FieldWrite [TO]: Obj %p (%s:%X), BitLen %X, BitOff %X, ByteOff %X\n",
@ -679,8 +485,7 @@ AcpiExWriteDataToField (
/* Write to the field */
Status = AcpiExInsertIntoField (ObjDesc, Buffer, Length);
Status = AcpiExInsertIntoField (ObjDesc, Buffer, BufferLength);
AcpiExReleaseGlobalLock (ObjDesc->CommonField.FieldFlags);
return_ACPI_STATUS (Status);
}

View File

@ -0,0 +1,524 @@
/******************************************************************************
*
* Module Name: exserial - FieldUnit support for serial address spaces
*
*****************************************************************************/
/******************************************************************************
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp.
* All rights reserved.
*
* 2. License
*
* 2.1. This is your license from Intel Corp. under its intellectual property
* rights. You may have additional license terms from the party that provided
* you this software, covering your right to use that party's intellectual
* property rights.
*
* 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
* copy of the source code appearing in this file ("Covered Code") an
* irrevocable, perpetual, worldwide license under Intel's copyrights in the
* base code distributed originally by Intel ("Original Intel Code") to copy,
* make derivatives, distribute, use and display any portion of the Covered
* Code in any form, with the right to sublicense such rights; and
*
* 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
* license (with the right to sublicense), under only those claims of Intel
* patents that are infringed by the Original Intel Code, to make, use, sell,
* offer to sell, and import the Covered Code and derivative works thereof
* solely to the minimum extent necessary to exercise the above copyright
* license, and in no event shall the patent license extend to any additions
* to or modifications of the Original Intel Code. No other license or right
* is granted directly or by implication, estoppel or otherwise;
*
* The above copyright and patent license is granted only if the following
* conditions are met:
*
* 3. Conditions
*
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
* Redistribution of source code of any substantial portion of the Covered
* Code or modification with rights to further distribute source must include
* the above Copyright Notice, the above License, this list of Conditions,
* and the following Disclaimer and Export Compliance provision. In addition,
* Licensee must cause all Covered Code to which Licensee contributes to
* contain a file documenting the changes Licensee made to create that Covered
* Code and the date of any change. Licensee must include in that file the
* documentation of any changes made by any predecessor Licensee. Licensee
* must include a prominent statement that the modification is derived,
* directly or indirectly, from Original Intel Code.
*
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
* Redistribution of source code of any substantial portion of the Covered
* Code or modification without rights to further distribute source must
* include the following Disclaimer and Export Compliance provision in the
* documentation and/or other materials provided with distribution. In
* addition, Licensee may not authorize further sublicense of source of any
* portion of the Covered Code, and must include terms to the effect that the
* license from Licensee to its licensee is limited to the intellectual
* property embodied in the software Licensee provides to its licensee, and
* not to intellectual property embodied in modifications its licensee may
* make.
*
* 3.3. Redistribution of Executable. Redistribution in executable form of any
* substantial portion of the Covered Code or modification must reproduce the
* above Copyright Notice, and the following Disclaimer and Export Compliance
* provision in the documentation and/or other materials provided with the
* distribution.
*
* 3.4. Intel retains all right, title, and interest in and to the Original
* Intel Code.
*
* 3.5. Neither the name Intel nor any other trademark owned or controlled by
* Intel shall be used in advertising or otherwise to promote the sale, use or
* other dealings in products derived from or relating to the Covered Code
* without prior written authorization from Intel.
*
* 4. Disclaimer and Export Compliance
*
* 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
* HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
* IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
* PARTICULAR PURPOSE.
*
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
* COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
* SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
* CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
* HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
* SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
* LIMITED REMEDY.
*
* 4.3. Licensee shall not export, either directly or indirectly, any of this
* software or system incorporating such software without first obtaining any
* required license or other approval from the U. S. Department of Commerce or
* any other agency or department of the United States Government. In the
* event Licensee exports any such software from the United States or
* re-exports any such software from a foreign destination, Licensee shall
* ensure that the distribution and export/re-export of the software is in
* compliance with all laws, regulations, orders, or other restrictions of the
* U.S. Export Administration Regulations. Licensee agrees that neither it nor
* any of its subsidiaries will export/re-export any technical data, process,
* software, or service, directly or indirectly, to any country for which the
* United States government or any agency thereof requires an export license,
* other governmental approval, or letter of assurance, without first obtaining
* such license, approval or letter.
*
*****************************************************************************
*
* Alternatively, you may choose to be licensed under the terms of the
* following license:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
* substantially similar to the "NO WARRANTY" disclaimer below
* ("Disclaimer") and any redistribution must be conditioned upon
* including a substantially similar Disclaimer requirement for further
* binary redistribution.
* 3. Neither the names of the above-listed copyright holders nor the names
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Alternatively, you may choose to be licensed under the terms of the
* GNU General Public License ("GPL") version 2 as published by the Free
* Software Foundation.
*
*****************************************************************************/
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/acdispat.h>
#include <contrib/dev/acpica/include/acinterp.h>
#include <contrib/dev/acpica/include/amlcode.h>
#define _COMPONENT ACPI_EXECUTER
ACPI_MODULE_NAME ("exserial")
/*******************************************************************************
*
* FUNCTION: AcpiExReadGpio
*
* PARAMETERS: ObjDesc - The named field to read
* Buffer - Where the return data is returnd
*
* RETURN: Status
*
* DESCRIPTION: Read from a named field that references a Generic Serial Bus
* field
*
******************************************************************************/
ACPI_STATUS
AcpiExReadGpio (
ACPI_OPERAND_OBJECT *ObjDesc,
void *Buffer)
{
ACPI_STATUS Status;
ACPI_FUNCTION_TRACE_PTR (ExReadGpio, ObjDesc);
/*
* For GPIO (GeneralPurposeIo), the Address will be the bit offset
* from the previous Connection() operator, making it effectively a
* pin number index. The BitLength is the length of the field, which
* is thus the number of pins.
*/
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
"GPIO FieldRead [FROM]: Pin %u Bits %u\n",
ObjDesc->Field.PinNumberIndex, ObjDesc->Field.BitLength));
/* Lock entire transaction if requested */
AcpiExAcquireGlobalLock (ObjDesc->CommonField.FieldFlags);
/* Perform the read */
Status = AcpiExAccessRegion (
ObjDesc, 0, (UINT64 *) Buffer, ACPI_READ);
AcpiExReleaseGlobalLock (ObjDesc->CommonField.FieldFlags);
return_ACPI_STATUS (Status);
}
/*******************************************************************************
*
* FUNCTION: AcpiExWriteGpio
*
* PARAMETERS: SourceDesc - Contains data to write. Expect to be
* an Integer object.
* ObjDesc - The named field
* ResultDesc - Where the return value is returned, if any
*
* RETURN: Status
*
* DESCRIPTION: Write to a named field that references a General Purpose I/O
* field.
*
******************************************************************************/
ACPI_STATUS
AcpiExWriteGpio (
ACPI_OPERAND_OBJECT *SourceDesc,
ACPI_OPERAND_OBJECT *ObjDesc,
ACPI_OPERAND_OBJECT **ReturnBuffer)
{
ACPI_STATUS Status;
void *Buffer;
ACPI_FUNCTION_TRACE_PTR (ExWriteGpio, ObjDesc);
/*
* For GPIO (GeneralPurposeIo), we will bypass the entire field
* mechanism and handoff the bit address and bit width directly to
* the handler. The Address will be the bit offset
* from the previous Connection() operator, making it effectively a
* pin number index. The BitLength is the length of the field, which
* is thus the number of pins.
*/
if (SourceDesc->Common.Type != ACPI_TYPE_INTEGER)
{
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
"GPIO FieldWrite [FROM]: (%s:%X), Value %.8X [TO]: Pin %u Bits %u\n",
AcpiUtGetTypeName (SourceDesc->Common.Type),
SourceDesc->Common.Type, (UINT32) SourceDesc->Integer.Value,
ObjDesc->Field.PinNumberIndex, ObjDesc->Field.BitLength));
Buffer = &SourceDesc->Integer.Value;
/* Lock entire transaction if requested */
AcpiExAcquireGlobalLock (ObjDesc->CommonField.FieldFlags);
/* Perform the write */
Status = AcpiExAccessRegion (
ObjDesc, 0, (UINT64 *) Buffer, ACPI_WRITE);
AcpiExReleaseGlobalLock (ObjDesc->CommonField.FieldFlags);
return_ACPI_STATUS (Status);
}
/*******************************************************************************
*
* FUNCTION: AcpiExReadSerialBus
*
* PARAMETERS: ObjDesc - The named field to read
* ReturnBuffer - Where the return value is returned, if any
*
* RETURN: Status
*
* DESCRIPTION: Read from a named field that references a serial bus
* (SMBus, IPMI, or GSBus).
*
******************************************************************************/
ACPI_STATUS
AcpiExReadSerialBus (
ACPI_OPERAND_OBJECT *ObjDesc,
ACPI_OPERAND_OBJECT **ReturnBuffer)
{
ACPI_STATUS Status;
UINT32 BufferLength;
ACPI_OPERAND_OBJECT *BufferDesc;
UINT32 Function;
UINT16 AccessorType;
ACPI_FUNCTION_TRACE_PTR (ExReadSerialBus, ObjDesc);
/*
* This is an SMBus, GSBus or IPMI read. We must create a buffer to
* hold the data and then directly access the region handler.
*
* Note: SMBus and GSBus protocol value is passed in upper 16-bits
* of Function
*
* Common buffer format:
* Status; (Byte 0 of the data buffer)
* Length; (Byte 1 of the data buffer)
* Data[x-1]: (Bytes 2-x of the arbitrary length data buffer)
*/
switch (ObjDesc->Field.RegionObj->Region.SpaceId)
{
case ACPI_ADR_SPACE_SMBUS:
BufferLength = ACPI_SMBUS_BUFFER_SIZE;
Function = ACPI_READ | (ObjDesc->Field.Attribute << 16);
break;
case ACPI_ADR_SPACE_IPMI:
BufferLength = ACPI_IPMI_BUFFER_SIZE;
Function = ACPI_READ;
break;
case ACPI_ADR_SPACE_GSBUS:
AccessorType = ObjDesc->Field.Attribute;
if (AccessorType == AML_FIELD_ATTRIB_RAW_PROCESS_BYTES)
{
ACPI_ERROR ((AE_INFO,
"Invalid direct read using bidirectional write-then-read protocol"));
return_ACPI_STATUS (AE_AML_PROTOCOL);
}
Status = AcpiExGetProtocolBufferLength (AccessorType, &BufferLength);
if (ACPI_FAILURE (Status))
{
ACPI_ERROR ((AE_INFO,
"Invalid protocol ID for GSBus: 0x%4.4X", AccessorType));
return_ACPI_STATUS (Status);
}
/* Add header length to get the full size of the buffer */
BufferLength += ACPI_SERIAL_HEADER_SIZE;
Function = ACPI_READ | (AccessorType << 16);
break;
default:
return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID);
}
/* Create the local transfer buffer that is returned to the caller */
BufferDesc = AcpiUtCreateBufferObject (BufferLength);
if (!BufferDesc)
{
return_ACPI_STATUS (AE_NO_MEMORY);
}
/* Lock entire transaction if requested */
AcpiExAcquireGlobalLock (ObjDesc->CommonField.FieldFlags);
/* Call the region handler for the write-then-read */
Status = AcpiExAccessRegion (ObjDesc, 0,
ACPI_CAST_PTR (UINT64, BufferDesc->Buffer.Pointer), Function);
AcpiExReleaseGlobalLock (ObjDesc->CommonField.FieldFlags);
*ReturnBuffer = BufferDesc;
return_ACPI_STATUS (Status);
}
/*******************************************************************************
*
* FUNCTION: AcpiExWriteSerialBus
*
* PARAMETERS: SourceDesc - Contains data to write
* ObjDesc - The named field
* ReturnBuffer - Where the return value is returned, if any
*
* RETURN: Status
*
* DESCRIPTION: Write to a named field that references a serial bus
* (SMBus, IPMI, GSBus).
*
******************************************************************************/
ACPI_STATUS
AcpiExWriteSerialBus (
ACPI_OPERAND_OBJECT *SourceDesc,
ACPI_OPERAND_OBJECT *ObjDesc,
ACPI_OPERAND_OBJECT **ReturnBuffer)
{
ACPI_STATUS Status;
UINT32 BufferLength;
UINT32 DataLength;
void *Buffer;
ACPI_OPERAND_OBJECT *BufferDesc;
UINT32 Function;
UINT16 AccessorType;
ACPI_FUNCTION_TRACE_PTR (ExWriteSerialBus, ObjDesc);
/*
* This is an SMBus, GSBus or IPMI write. We will bypass the entire
* field mechanism and handoff the buffer directly to the handler.
* For these address spaces, the buffer is bidirectional; on a
* write, return data is returned in the same buffer.
*
* Source must be a buffer of sufficient size, these are fixed size:
* ACPI_SMBUS_BUFFER_SIZE, or ACPI_IPMI_BUFFER_SIZE.
*
* Note: SMBus and GSBus protocol type is passed in upper 16-bits
* of Function
*
* Common buffer format:
* Status; (Byte 0 of the data buffer)
* Length; (Byte 1 of the data buffer)
* Data[x-1]: (Bytes 2-x of the arbitrary length data buffer)
*/
if (SourceDesc->Common.Type != ACPI_TYPE_BUFFER)
{
ACPI_ERROR ((AE_INFO,
"SMBus/IPMI/GenericSerialBus write requires "
"Buffer, found type %s",
AcpiUtGetObjectTypeName (SourceDesc)));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
switch (ObjDesc->Field.RegionObj->Region.SpaceId)
{
case ACPI_ADR_SPACE_SMBUS:
BufferLength = ACPI_SMBUS_BUFFER_SIZE;
DataLength = ACPI_SMBUS_DATA_SIZE;
Function = ACPI_WRITE | (ObjDesc->Field.Attribute << 16);
break;
case ACPI_ADR_SPACE_IPMI:
BufferLength = ACPI_IPMI_BUFFER_SIZE;
DataLength = ACPI_IPMI_DATA_SIZE;
Function = ACPI_WRITE;
break;
case ACPI_ADR_SPACE_GSBUS:
AccessorType = ObjDesc->Field.Attribute;
Status = AcpiExGetProtocolBufferLength (AccessorType, &BufferLength);
if (ACPI_FAILURE (Status))
{
ACPI_ERROR ((AE_INFO,
"Invalid protocol ID for GSBus: 0x%4.4X", AccessorType));
return_ACPI_STATUS (Status);
}
/* Add header length to get the full size of the buffer */
BufferLength += ACPI_SERIAL_HEADER_SIZE;
DataLength = SourceDesc->Buffer.Pointer[1];
Function = ACPI_WRITE | (AccessorType << 16);
break;
default:
return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID);
}
#if 0
OBSOLETE?
/* Check for possible buffer overflow */
if (DataLength > SourceDesc->Buffer.Length)
{
ACPI_ERROR ((AE_INFO,
"Length in buffer header (%u)(%u) is greater than "
"the physical buffer length (%u) and will overflow",
DataLength, BufferLength, SourceDesc->Buffer.Length));
return_ACPI_STATUS (AE_AML_BUFFER_LIMIT);
}
#endif
/* Create the transfer/bidirectional/return buffer */
BufferDesc = AcpiUtCreateBufferObject (BufferLength);
if (!BufferDesc)
{
return_ACPI_STATUS (AE_NO_MEMORY);
}
/* Copy the input buffer data to the transfer buffer */
Buffer = BufferDesc->Buffer.Pointer;
memcpy (Buffer, SourceDesc->Buffer.Pointer, DataLength);
/* Lock entire transaction if requested */
AcpiExAcquireGlobalLock (ObjDesc->CommonField.FieldFlags);
/*
* Perform the write (returns status and perhaps data in the
* same buffer)
*/
Status = AcpiExAccessRegion (
ObjDesc, 0, (UINT64 *) Buffer, Function);
AcpiExReleaseGlobalLock (ObjDesc->CommonField.FieldFlags);
*ReturnBuffer = BufferDesc;
return_ACPI_STATUS (Status);
}

View File

@ -205,16 +205,10 @@ AcpiHwLegacySleep (
{
return_ACPI_STATUS (Status);
}
/*
* If the target sleep state is S5, clear all GPEs and fixed events too
*/
if (SleepState == ACPI_STATE_S5)
Status = AcpiHwClearAcpiStatus();
if (ACPI_FAILURE(Status))
{
Status = AcpiHwClearAcpiStatus();
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
return_ACPI_STATUS(Status);
}
AcpiGbl_SystemAwakeAndRunning = FALSE;

View File

@ -318,11 +318,21 @@
#define ACPI_RSDP_CHECKSUM_LENGTH 20
#define ACPI_RSDP_XCHECKSUM_LENGTH 36
/* SMBus, GSBus and IPMI bidirectional buffer size */
/*
* SMBus, GSBus and IPMI buffer sizes. All have a 2-byte header,
* containing both Status and Length.
*/
#define ACPI_SERIAL_HEADER_SIZE 2 /* Common for below. Status and Length fields */
#define ACPI_SMBUS_DATA_SIZE 32
#define ACPI_SMBUS_BUFFER_SIZE ACPI_SERIAL_HEADER_SIZE + ACPI_SMBUS_DATA_SIZE
#define ACPI_IPMI_DATA_SIZE 64
#define ACPI_IPMI_BUFFER_SIZE ACPI_SERIAL_HEADER_SIZE + ACPI_IPMI_DATA_SIZE
#define ACPI_MAX_GSBUS_DATA_SIZE 255
#define ACPI_MAX_GSBUS_BUFFER_SIZE ACPI_SERIAL_HEADER_SIZE + ACPI_MAX_GSBUS_DATA_SIZE
#define ACPI_SMBUS_BUFFER_SIZE 34
#define ACPI_GSBUS_BUFFER_SIZE 34
#define ACPI_IPMI_BUFFER_SIZE 66
/* _SxD and _SxW control methods */

View File

@ -580,7 +580,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoGeneric[][2];
* dmtable and ahtable
*/
extern const ACPI_DMTABLE_DATA AcpiDmTableData[];
extern const AH_TABLE Gbl_AcpiSupportedTables[];
extern const AH_TABLE AcpiGbl_SupportedTables[];
UINT8
AcpiDmGenerateChecksum (

View File

@ -467,6 +467,10 @@ ACPI_STATUS
AcpiEvInitializeRegion (
ACPI_OPERAND_OBJECT *RegionObj);
BOOLEAN
AcpiEvIsPciRootBridge (
ACPI_NAMESPACE_NODE *Node);
/*
* evsci - SCI (System Control Interrupt) handling/dispatch

View File

@ -320,8 +320,10 @@ typedef struct acpi_exception_info
#define AE_AML_LOOP_TIMEOUT EXCEP_AML (0x0021)
#define AE_AML_UNINITIALIZED_NODE EXCEP_AML (0x0022)
#define AE_AML_TARGET_TYPE EXCEP_AML (0x0023)
#define AE_AML_PROTOCOL EXCEP_AML (0x0024)
#define AE_AML_BUFFER_LENGTH EXCEP_AML (0x0025)
#define AE_CODE_AML_MAX 0x0023
#define AE_CODE_AML_MAX 0x0025
/*
@ -452,7 +454,9 @@ static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Aml[] =
EXCEP_TXT ("AE_AML_ILLEGAL_ADDRESS", "A memory, I/O, or PCI configuration address is invalid"),
EXCEP_TXT ("AE_AML_LOOP_TIMEOUT", "An AML While loop exceeded the maximum execution time"),
EXCEP_TXT ("AE_AML_UNINITIALIZED_NODE", "A namespace node is uninitialized or unresolved"),
EXCEP_TXT ("AE_AML_TARGET_TYPE", "A target operand of an incorrect type was encountered")
EXCEP_TXT ("AE_AML_TARGET_TYPE", "A target operand of an incorrect type was encountered"),
EXCEP_TXT ("AE_AML_PROTOCOL", "Violation of a fixed ACPI protocol"),
EXCEP_TXT ("AE_AML_BUFFER_LENGTH", "The length of the buffer is invalid/incorrect")
};
static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Ctrl[] =

View File

@ -285,6 +285,11 @@ AcpiExTracePoint (
* exfield - ACPI AML (p-code) execution - field manipulation
*/
ACPI_STATUS
AcpiExGetProtocolBufferLength (
UINT32 ProtocolId,
UINT32 *ReturnLength);
ACPI_STATUS
AcpiExCommonBufferSetup (
ACPI_OPERAND_OBJECT *ObjDesc,
UINT32 BufferLength,
@ -494,6 +499,32 @@ AcpiExPrepFieldValue (
ACPI_CREATE_FIELD_INFO *Info);
/*
* exserial - FieldUnit support for serial address spaces
*/
ACPI_STATUS
AcpiExReadSerialBus (
ACPI_OPERAND_OBJECT *ObjDesc,
ACPI_OPERAND_OBJECT **ReturnBuffer);
ACPI_STATUS
AcpiExWriteSerialBus (
ACPI_OPERAND_OBJECT *SourceDesc,
ACPI_OPERAND_OBJECT *ObjDesc,
ACPI_OPERAND_OBJECT **ReturnBuffer);
ACPI_STATUS
AcpiExReadGpio (
ACPI_OPERAND_OBJECT *ObjDesc,
void *Buffer);
ACPI_STATUS
AcpiExWriteGpio (
ACPI_OPERAND_OBJECT *SourceDesc,
ACPI_OPERAND_OBJECT *ObjDesc,
ACPI_OPERAND_OBJECT **ReturnBuffer);
/*
* exsystem - Interface to OS services
*/

View File

@ -597,9 +597,9 @@ typedef struct acpi_simple_repair_info
typedef struct acpi_reg_walk_info
{
ACPI_ADR_SPACE_TYPE SpaceId;
UINT32 Function;
UINT32 RegRunCount;
ACPI_ADR_SPACE_TYPE SpaceId;
} ACPI_REG_WALK_INFO;

View File

@ -154,7 +154,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
#define ACPI_CA_VERSION 0x20180810
#define ACPI_CA_VERSION 0x20181003
#include <contrib/dev/acpica/include/acconfig.h>
#include <contrib/dev/acpica/include/actypes.h>

View File

@ -594,16 +594,16 @@ typedef enum
*/
typedef enum
{
AML_FIELD_ATTRIB_QUICK = 0x02,
AML_FIELD_ATTRIB_SEND_RCV = 0x04,
AML_FIELD_ATTRIB_BYTE = 0x06,
AML_FIELD_ATTRIB_WORD = 0x08,
AML_FIELD_ATTRIB_BLOCK = 0x0A,
AML_FIELD_ATTRIB_MULTIBYTE = 0x0B,
AML_FIELD_ATTRIB_WORD_CALL = 0x0C,
AML_FIELD_ATTRIB_BLOCK_CALL = 0x0D,
AML_FIELD_ATTRIB_RAW_BYTES = 0x0E,
AML_FIELD_ATTRIB_RAW_PROCESS = 0x0F
AML_FIELD_ATTRIB_QUICK = 0x02,
AML_FIELD_ATTRIB_SEND_RECEIVE = 0x04,
AML_FIELD_ATTRIB_BYTE = 0x06,
AML_FIELD_ATTRIB_WORD = 0x08,
AML_FIELD_ATTRIB_BLOCK = 0x0A,
AML_FIELD_ATTRIB_BYTES = 0x0B,
AML_FIELD_ATTRIB_PROCESS_CALL = 0x0C,
AML_FIELD_ATTRIB_BLOCK_PROCESS_CALL = 0x0D,
AML_FIELD_ATTRIB_RAW_BYTES = 0x0E,
AML_FIELD_ATTRIB_RAW_PROCESS_BYTES = 0x0F
} AML_ACCESS_ATTRIBUTE;

View File

@ -32,8 +32,8 @@ SRCS+= exconcat.c exconfig.c exconvrt.c excreate.c exdebug.c \
exdump.c exfield.c exfldio.c exmisc.c exmutex.c \
exnames.c exoparg1.c exoparg2.c exoparg3.c exoparg6.c \
exprep.c exregion.c exresnte.c exresolv.c exresop.c \
exstore.c exstoren.c exstorob.c exsystem.c extrace.c \
exutils.c
exserial.c exstore.c exstoren.c exstorob.c exsystem.c \
extrace.c exutils.c
# components/hardware
SRCS+= hwacpi.c hwesleep.c hwgpe.c hwpci.c hwregs.c hwsleep.c \