Import ACPICA 20151124.

This commit is contained in:
Jung-uk Kim
2015-11-25 21:04:42 +00:00
parent 1e24cf365b
commit b9098066cd
276 changed files with 9713 additions and 8215 deletions
+81
View File
@@ -1,3 +1,84 @@
----------------------------------------
24 November 2015. Summary of changes for version 20151124:
This release is available at https://acpica.org/downloads
1) ACPICA kernel-resident subsystem:
Fixed a possible regression for a previous update to FADT handling. The
FADT no longer has a fixed table ID, causing some issues with code that
was hardwired to a specific ID. Lv Zheng.
Fixed a problem where the method auto-serialization could interfere with
the current SyncLevel. This change makes the auto-serialization support
transparent to the SyncLevel support and management.
Removed support for the _SUB predefined name in AcpiGetObjectInfo. This
interface is intended for early access to the namespace during the
initial namespace device discovery walk. The _SUB method has been seen to
access operation regions in some cases, causing errors because the
operation regions are not fully initialized.
AML Debugger: Fixed some issues with the terminate/quit/exit commands
that can cause faults. Lv Zheng.
AML Debugger: Add thread ID support so that single-step mode only applies
to the AML Debugger thread. This prevents runtime errors within some
kernels. Lv Zheng.
Eliminated extraneous warnings from AcpiGetSleepTypeData. Since the _Sx
methods that are invoked by this interface are optional, removed warnings
emitted for the case where one or more of these methods do not exist.
ACPICA BZ 1208, original change by Prarit Bhargava.
Made a major pass through the entire ACPICA source code base to
standardize formatting that has diverged a bit over time. There are no
functional changes, but this will of course cause quite a few code
differences from the previous ACPICA release.
Example Code and Data Size: These are the sizes for the OS-independent
acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The
debug version of the code includes the debug output trace mechanism and
has a much larger code and data size.
Current Release:
Non-Debug Version: 102.0K Code, 28.3K Data, 130.3K Total
Debug Version: 199.6K Code, 81.8K Data, 281.4K Total
Previous Release:
Non-Debug Version: 101.7K Code, 27.9K Data, 129.6K Total
Debug Version: 199.3K Code, 81.4K Data, 280.7K Total
2) iASL Compiler/Disassembler and Tools:
iASL/acpiexec/acpixtract/disassembler: Added support to allow multiple
definition blocks within a single ASL file and the resulting AML file.
Support for this type of file was also added to the various tools that
use binary AML files: acpiexec, acpixtract, and the AML disassembler. The
example code below shows two definition blocks within the same file:
DefinitionBlock ("dsdt.aml", "DSDT", 2, "Intel", "Template",
0x12345678)
{
}
DefinitionBlock ("", "SSDT", 2, "Intel", "Template", 0xABCDEF01)
{
}
iASL: Enhanced typechecking for the Name() operator. All expressions for
the value of the named object must be reduced/folded to a single constant
at compile time, as per the ACPI specification (the AML definition of
Name()).
iASL: Fixed some code indentation issues for the -ic and -ia options (C
and assembly headers). Now all emitted code correctly begins in column 1.
iASL: Added an error message for an attempt to open a Scope() on an
object defined in an SSDT. The DSDT is always loaded into the namespace
first, so any attempt to open a Scope on an SSDT object will fail at
runtime.
----------------------------------------
30 September 2015. Summary of changes for version 20150930:
+1
View File
@@ -82,6 +82,7 @@ OBJECTS = \
$(OBJDIR)/exstoren.o\
$(OBJDIR)/exstorob.o\
$(OBJDIR)/exsystem.o\
$(OBJDIR)/extrace.o\
$(OBJDIR)/exutils.o\
$(OBJDIR)/hwpci.o\
$(OBJDIR)/nsaccess.o\
+2 -1
View File
@@ -40,6 +40,7 @@ HEADERS = \
OBJECTS = \
$(OBJDIR)/acgetline.o\
$(OBJDIR)/acfileio.o\
$(OBJDIR)/aeexec.o\
$(OBJDIR)/aehandlers.o\
$(OBJDIR)/aeinitfile.o\
@@ -127,6 +128,7 @@ OBJECTS = \
$(OBJDIR)/exstoren.o\
$(OBJDIR)/exstorob.o\
$(OBJDIR)/exsystem.o\
$(OBJDIR)/extrace.o\
$(OBJDIR)/exutils.o\
$(OBJDIR)/getopt.o\
$(OBJDIR)/hwacpi.o\
@@ -207,7 +209,6 @@ OBJECTS = \
$(OBJDIR)/uterror.o\
$(OBJDIR)/uteval.o\
$(OBJDIR)/utexcep.o\
$(OBJDIR)/utfileio.o\
$(OBJDIR)/utglobal.o\
$(OBJDIR)/uthex.o\
$(OBJDIR)/utids.o\
+1 -1
View File
@@ -34,6 +34,7 @@ HEADERS = \
$(wildcard $(ACPINAMES)/*.h)
OBJECTS = \
$(OBJDIR)/acfileio.o\
$(OBJDIR)/anmain.o\
$(OBJDIR)/anstubs.o\
$(OBJDIR)/antables.o\
@@ -103,7 +104,6 @@ OBJECTS = \
$(OBJDIR)/uterror.o\
$(OBJDIR)/uteval.o\
$(OBJDIR)/utexcep.o\
$(OBJDIR)/utfileio.o\
$(OBJDIR)/utglobal.o\
$(OBJDIR)/uthex.o\
$(OBJDIR)/utids.o\
+1
View File
@@ -29,6 +29,7 @@ HEADERS = \
OBJECTS = \
$(OBJDIR)/acpixtract.o\
$(OBJDIR)/axmain.o\
$(OBJDIR)/axutils.o\
$(OBJDIR)/getopt.o\
$(OBJDIR)/oslibcfs.o\
$(OBJDIR)/osunixxf.o\
+5 -1
View File
@@ -43,6 +43,7 @@ OBJECTS = \
$(OBJDIR)/dtparserparse.o\
$(OBJDIR)/prparserlex.o\
$(OBJDIR)/prparserparse.o\
$(OBJDIR)/acfileio.o\
$(OBJDIR)/adfile.o\
$(OBJDIR)/adisasm.o\
$(OBJDIR)/adwalk.o\
@@ -113,6 +114,7 @@ OBJECTS = \
$(OBJDIR)/dmresrcs.o\
$(OBJDIR)/dmrestag.o\
$(OBJDIR)/dmtable.o\
$(OBJDIR)/dmtables.o\
$(OBJDIR)/dmtbdump.o\
$(OBJDIR)/dmtbinfo.o\
$(OBJDIR)/dmutils.o\
@@ -134,6 +136,8 @@ OBJECTS = \
$(OBJDIR)/dtio.o\
$(OBJDIR)/dtsubtable.o\
$(OBJDIR)/dttable.o\
$(OBJDIR)/dttable1.o\
$(OBJDIR)/dttable2.o\
$(OBJDIR)/dttemplate.o\
$(OBJDIR)/dtutils.o\
$(OBJDIR)/exconvrt.o\
@@ -189,6 +193,7 @@ OBJECTS = \
$(OBJDIR)/tbprint.o\
$(OBJDIR)/tbutils.o\
$(OBJDIR)/tbxface.o\
$(OBJDIR)/tbxfload.o\
$(OBJDIR)/utaddress.o\
$(OBJDIR)/utalloc.o\
$(OBJDIR)/utbuffer.o\
@@ -199,7 +204,6 @@ OBJECTS = \
$(OBJDIR)/utdelete.o\
$(OBJDIR)/uterror.o\
$(OBJDIR)/utexcep.o\
$(OBJDIR)/utfileio.o\
$(OBJDIR)/utglobal.o\
$(OBJDIR)/uthex.o\
$(OBJDIR)/utinit.o\
+357
View File
@@ -0,0 +1,357 @@
/******************************************************************************
*
* Module Name: acfileio - Get ACPI tables from file
*
*****************************************************************************/
/*
* Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
* substantially similar to the "NO WARRANTY" disclaimer below
* ("Disclaimer") and any redistribution must be conditioned upon
* including a substantially similar Disclaimer requirement for further
* binary redistribution.
* 3. Neither the names of the above-listed copyright holders nor the names
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* Alternatively, this software may be distributed under the terms of the
* GNU General Public License ("GPL") version 2 as published by the Free
* Software Foundation.
*
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*/
#include "acpi.h"
#include "accommon.h"
#include "acapps.h"
#include "actables.h"
#include "acutils.h"
#include <errno.h>
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME ("acfileio")
/* Local prototypes */
static ACPI_STATUS
AcpiAcGetOneTableFromFile (
char *Filename,
FILE *File,
UINT8 GetOnlyAmlTables,
ACPI_TABLE_HEADER **Table);
static ACPI_STATUS
AcpiAcCheckTextModeCorruption (
ACPI_TABLE_HEADER *Table);
/*******************************************************************************
*
* FUNCTION: AcpiAcGetAllTablesFromFile
*
* PARAMETERS: Filename - Table filename
* GetOnlyAmlTables - TRUE if the tables must be AML tables
* ReturnListHead - Where table list is returned
*
* RETURN: Status
*
* DESCRIPTION: Get all ACPI tables from within a single file.
*
******************************************************************************/
ACPI_STATUS
AcpiAcGetAllTablesFromFile (
char *Filename,
UINT8 GetOnlyAmlTables,
ACPI_NEW_TABLE_DESC **ReturnListHead)
{
ACPI_NEW_TABLE_DESC *ListHead = NULL;
ACPI_NEW_TABLE_DESC *ListTail = NULL;
ACPI_NEW_TABLE_DESC *TableDesc;
FILE *File;
ACPI_TABLE_HEADER *Table = NULL;
UINT32 FileSize;
ACPI_STATUS Status = AE_OK;
File = fopen (Filename, "rb");
if (!File)
{
perror ("Could not open input file");
if (errno == ENOENT)
{
return (AE_NOT_EXIST);
}
return (AE_ERROR);
}
/* Get the file size */
FileSize = CmGetFileSize (File);
if (FileSize == ACPI_UINT32_MAX)
{
return (AE_ERROR);
}
if (FileSize < 4)
{
return (AE_BAD_HEADER);
}
/* Read all tables within the file */
while (ACPI_SUCCESS (Status))
{
/* Get one entire ACPI table */
Status = AcpiAcGetOneTableFromFile (
Filename, File, GetOnlyAmlTables, &Table);
if (Status == AE_CTRL_TERMINATE)
{
Status = AE_OK;
break;
}
else if (Status == AE_TYPE)
{
continue;
}
else if (ACPI_FAILURE (Status))
{
return (Status);
}
/* Allocate and link a table descriptor */
TableDesc = AcpiOsAllocate (sizeof (ACPI_NEW_TABLE_DESC));
TableDesc->Table = Table;
TableDesc->Next = NULL;
/* Link at the end of the local table list */
if (!ListHead)
{
ListHead = TableDesc;
ListTail = TableDesc;
}
else
{
ListTail->Next = TableDesc;
ListTail = TableDesc;
}
}
/* Add the local table list to the end of the global list */
if (*ReturnListHead)
{
ListTail = *ReturnListHead;
while (ListTail->Next)
{
ListTail = ListTail->Next;
}
ListTail->Next = ListHead;
}
else
{
*ReturnListHead = ListHead;
}
fclose(File);
return (Status);
}
/*******************************************************************************
*
* FUNCTION: AcpiAcGetOneTableFromFile
*
* PARAMETERS: Filename - File where table is located
* File - Open FILE pointer to Filename
* GetOnlyAmlTables - TRUE if the tables must be AML tables.
* ReturnTable - Where a pointer to the table is returned
*
* RETURN: Status
*
* DESCRIPTION: Read the next ACPI table from a file. Implements support
* for multiple tables within a single file. File must already
* be open.
*
* Note: Loading an RSDP is not supported.
*
******************************************************************************/
static ACPI_STATUS
AcpiAcGetOneTableFromFile (
char *Filename,
FILE *File,
UINT8 GetOnlyAmlTables,
ACPI_TABLE_HEADER **ReturnTable)
{
ACPI_STATUS Status = AE_OK;
ACPI_TABLE_HEADER TableHeader;
ACPI_TABLE_HEADER *Table;
INT32 Count;
long Position;
*ReturnTable = NULL;
/* Get just the table header to get signature and length */
Position = ftell (File);
Count = fread (&TableHeader, 1, sizeof (ACPI_TABLE_HEADER), File);
if (Count != sizeof (ACPI_TABLE_HEADER))
{
return (AE_CTRL_TERMINATE);
}
if (GetOnlyAmlTables)
{
/* Table must be an AML table (DSDT/SSDT) or FADT */
if (!ACPI_COMPARE_NAME (TableHeader.Signature, ACPI_SIG_FADT) &&
!AcpiUtIsAmlTable (&TableHeader))
{
fprintf (stderr,
" %s: [%4.4s] is not an AML table - ignoring\n",
Filename, TableHeader.Signature);
return (AE_TYPE);
}
}
/* Allocate a buffer for the entire table */
Table = AcpiOsAllocate ((size_t) TableHeader.Length);
if (!Table)
{
return (AE_NO_MEMORY);
}
/* Now read the entire table */
fseek (File, Position, SEEK_SET);
Count = fread (Table, 1, TableHeader.Length, File);
if (Count != (INT32) TableHeader.Length)
{
Status = AE_ERROR;
goto ErrorExit;
}
/* Validate the checksum (just issue a warning) */
Status = AcpiTbVerifyChecksum (Table, TableHeader.Length);
if (ACPI_FAILURE (Status))
{
Status = AcpiAcCheckTextModeCorruption (Table);
if (ACPI_FAILURE (Status))
{
goto ErrorExit;
}
}
fprintf (stderr,
"Loading ACPI table [%4.4s] from file %12s - Length 0x%06X (%u)\n",
TableHeader.Signature, Filename,
TableHeader.Length, TableHeader.Length);
*ReturnTable = Table;
return (AE_OK);
ErrorExit:
AcpiOsFree (Table);
return (Status);
}
/*******************************************************************************
*
* FUNCTION: AcpiAcCheckTextModeCorruption
*
* PARAMETERS: Table - Table buffer starting with table header
*
* RETURN: Status
*
* DESCRIPTION: Check table for text mode file corruption where all linefeed
* characters (LF) have been replaced by carriage return linefeed
* pairs (CR/LF).
*
******************************************************************************/
static ACPI_STATUS
AcpiAcCheckTextModeCorruption (
ACPI_TABLE_HEADER *Table)
{
UINT32 i;
UINT32 Pairs = 0;
UINT8 *Buffer = ACPI_CAST_PTR (UINT8, Table);
/* Scan entire table to determine if each LF has been prefixed with a CR */
for (i = 1; i < Table->Length; i++)
{
if (Buffer[i] == 0x0A)
{
if (Buffer[i - 1] != 0x0D)
{
/* The LF does not have a preceding CR, table not corrupted */
return (AE_OK);
}
else
{
/* Found a CR/LF pair */
Pairs++;
}
i++;
}
}
if (!Pairs)
{
return (AE_OK);
}
/*
* Entire table scanned, each CR is part of a CR/LF pair --
* meaning that the table was treated as a text file somewhere.
*
* NOTE: We can't "fix" the table, because any existing CR/LF pairs in the
* original table are left untouched by the text conversion process --
* meaning that we cannot simply replace CR/LF pairs with LFs.
*/
AcpiOsPrintf ("Table has been corrupted by text mode conversion\n");
AcpiOsPrintf ("All LFs (%u) were changed to CR/LF pairs\n", Pairs);
AcpiOsPrintf ("Table cannot be repaired!\n");
return (AE_BAD_VALUE);
}
+1
View File
@@ -262,6 +262,7 @@ AcpiOsGetLine (
ACPI_BACKUP_CURSOR (i, EndOfLine - CursorPosition + 1);
EndOfLine--;
if (CursorPosition > 0)
{
CursorPosition--;
+363 -692
View File
File diff suppressed because it is too large Load Diff
+23 -11
View File
@@ -135,6 +135,7 @@ AcpiDmDumpTree (
Info.Count = 0;
Info.Level = 0;
Info.WalkState = NULL;
AcpiDmWalkParseTree (Origin, AcpiDmDumpDescending, NULL, &Info);
AcpiOsPrintf ("*/\n\n");
}
@@ -168,6 +169,7 @@ AcpiDmFindOrphanMethods (
Info.Flags = 0;
Info.Level = 0;
Info.WalkState = NULL;
AcpiDmWalkParseTree (Origin, AcpiDmFindOrphanDescending, NULL, &Info);
}
@@ -211,7 +213,8 @@ AcpiDmFinishNamespaceLoad (
return;
}
Status = AcpiDsScopeStackPush (NamespaceRoot, NamespaceRoot->Type, WalkState);
Status = AcpiDsScopeStackPush (NamespaceRoot, NamespaceRoot->Type,
WalkState);
if (ACPI_FAILURE (Status))
{
return;
@@ -220,6 +223,7 @@ AcpiDmFinishNamespaceLoad (
Info.Flags = 0;
Info.Level = 0;
Info.WalkState = WalkState;
AcpiDmWalkParseTree (ParseTreeRoot, AcpiDmLoadDescendingOp,
AcpiDmCommonAscendingOp, &Info);
ACPI_FREE (WalkState);
@@ -264,7 +268,8 @@ AcpiDmCrossReferenceNamespace (
return;
}
Status = AcpiDsScopeStackPush (NamespaceRoot, NamespaceRoot->Type, WalkState);
Status = AcpiDsScopeStackPush (NamespaceRoot, NamespaceRoot->Type,
WalkState);
if (ACPI_FAILURE (Status))
{
return;
@@ -273,6 +278,7 @@ AcpiDmCrossReferenceNamespace (
Info.Flags = 0;
Info.Level = 0;
Info.WalkState = WalkState;
AcpiDmWalkParseTree (ParseTreeRoot, AcpiDmXrefDescendingOp,
AcpiDmCommonAscendingOp, &Info);
ACPI_FREE (WalkState);
@@ -317,7 +323,8 @@ AcpiDmConvertResourceIndexes (
return;
}
Status = AcpiDsScopeStackPush (NamespaceRoot, NamespaceRoot->Type, WalkState);
Status = AcpiDsScopeStackPush (NamespaceRoot, NamespaceRoot->Type,
WalkState);
if (ACPI_FAILURE (Status))
{
return;
@@ -326,6 +333,7 @@ AcpiDmConvertResourceIndexes (
Info.Flags = 0;
Info.Level = 0;
Info.WalkState = WalkState;
AcpiDmWalkParseTree (ParseTreeRoot, AcpiDmResourceDescendingOp,
AcpiDmCommonAscendingOp, &Info);
ACPI_FREE (WalkState);
@@ -396,7 +404,7 @@ AcpiDmDumpDescending (
if (Op->Common.Value.String)
{
AcpiNsExternalizeName (ACPI_UINT32_MAX, Op->Common.Value.String,
NULL, &Path);
NULL, &Path);
AcpiOsPrintf ("%s %p", Path, Op->Common.Node);
ACPI_FREE (Path);
}
@@ -655,6 +663,7 @@ AcpiDmLoadDescendingOp (
{
NextOp = NextOp->Common.Next;
}
Path = NextOp->Common.Value.String;
}
@@ -666,8 +675,8 @@ AcpiDmLoadDescendingOp (
/* Insert the name into the namespace */
Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ObjectType,
ACPI_IMODE_LOAD_PASS2, ACPI_NS_DONT_OPEN_SCOPE,
WalkState, &Node);
ACPI_IMODE_LOAD_PASS2, ACPI_NS_DONT_OPEN_SCOPE,
WalkState, &Node);
Op->Common.Node = Node;
@@ -708,7 +717,8 @@ AcpiDmLoadDescendingOp (
{
if (Op->Common.Node)
{
Status = AcpiDsScopeStackPush (Op->Common.Node, ObjectType, WalkState);
Status = AcpiDsScopeStackPush (Op->Common.Node, ObjectType,
WalkState);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -825,8 +835,8 @@ AcpiDmXrefDescendingOp (
*/
Node = NULL;
Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_ANY,
ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
WalkState, &Node);
ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
WalkState, &Node);
if (ACPI_SUCCESS (Status) && (Node->Flags & ANOBJ_IS_EXTERNAL))
{
/* Node was created by an External() statement */
@@ -908,7 +918,8 @@ AcpiDmXrefDescendingOp (
{
if (Op->Common.Node)
{
Status = AcpiDsScopeStackPush (Op->Common.Node, ObjectType, WalkState);
Status = AcpiDsScopeStackPush (Op->Common.Node, ObjectType,
WalkState);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -956,7 +967,8 @@ AcpiDmResourceDescendingOp (
if (Op->Common.Node)
{
Status = AcpiDsScopeStackPush (Op->Common.Node, ObjectType, WalkState);
Status = AcpiDsScopeStackPush (Op->Common.Node, ObjectType,
WalkState);
if (ACPI_FAILURE (Status))
{
return (Status);
+1
View File
@@ -48,6 +48,7 @@
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME ("ahuuids")
/*
* Table of "known" (ACPI-related) UUIDs
*/
+9 -6
View File
@@ -140,7 +140,6 @@ AcpiDmGetObjectTypeName (
{
Type = ACPI_TYPE_DEVICE;
}
else if (Type > ACPI_TYPE_LOCAL_INDEX_FIELD)
{
return ("");
@@ -410,6 +409,7 @@ AcpiDmGetExternalsFromFile (
{
continue;
}
if (strcmp (Token, "External"))
{
continue;
@@ -447,6 +447,7 @@ AcpiDmGetExternalsFromFile (
fprintf (stderr, "Invalid argument count (%s)\n", Token);
continue;
}
if (ArgCount > 7)
{
fprintf (stderr, "Invalid argument count (%u)\n", ArgCount);
@@ -465,7 +466,8 @@ AcpiDmGetExternalsFromFile (
if (!ImportCount)
{
fprintf (stderr, "Did not find any external methods in reference file \"%s\"\n",
fprintf (stderr,
"Did not find any external methods in reference file \"%s\"\n",
Gbl_ExternalRefFilename);
}
else
@@ -815,7 +817,8 @@ AcpiDmCreateNewExternal (
(Value > 0))
{
ACPI_ERROR ((AE_INFO,
"External method arg count mismatch %s: Current %u, attempted %u",
"External method arg count mismatch %s: "
"Current %u, attempted %u",
NextExternal->Path, NextExternal->Value, Value));
}
@@ -917,9 +920,9 @@ AcpiDmAddExternalsToNamespace (
/* Add the external name (object) into the namespace */
Status = AcpiNsLookup (NULL, External->InternalPath, External->Type,
ACPI_IMODE_LOAD_PASS1,
ACPI_NS_ERROR_IF_FOUND | ACPI_NS_EXTERNAL | ACPI_NS_DONT_OPEN_SCOPE,
NULL, &Node);
ACPI_IMODE_LOAD_PASS1,
ACPI_NS_ERROR_IF_FOUND | ACPI_NS_EXTERNAL | ACPI_NS_DONT_OPEN_SCOPE,
NULL, &Node);
if (ACPI_FAILURE (Status))
{
+10 -9
View File
@@ -498,9 +498,9 @@ AcpiDmCheckResourceReference (
/* Lookup the buffer in the namespace */
Status = AcpiNsLookup (WalkState->ScopeInfo,
BufferNameOp->Common.Value.String, ACPI_TYPE_BUFFER,
ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, WalkState,
&BufferNode);
BufferNameOp->Common.Value.String, ACPI_TYPE_BUFFER,
ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, WalkState,
&BufferNode);
if (ACPI_FAILURE (Status))
{
return;
@@ -621,8 +621,8 @@ AcpiGetTagPathname (
/* Get the individual resource descriptor and validate it */
Aml = ACPI_CAST_PTR (AML_RESOURCE,
&Op->Named.Data[ResourceNode->Value]);
Aml = ACPI_CAST_PTR (
AML_RESOURCE, &Op->Named.Data[ResourceNode->Value]);
Status = AcpiUtValidateResource (NULL, Aml, &ResourceTableIndex);
if (ACPI_FAILURE (Status))
@@ -663,7 +663,7 @@ AcpiGetTagPathname (
}
(void) AcpiNsBuildNormalizedPath (BufferNode, Pathname,
RequiredSize, FALSE);
RequiredSize, FALSE);
/*
* Create the full path to the resource and tag by: remove the buffer name,
@@ -742,6 +742,7 @@ AcpiDmUpdateResourceName (
{
AcpiGbl_NextResourceId = 0;
AcpiGbl_NextPrefix++;
if (AcpiGbl_NextPrefix > ACPI_NUM_RES_PREFIX)
{
AcpiGbl_NextPrefix = 0;
@@ -1028,9 +1029,9 @@ AcpiDmAddResourceToNamespace (
ScopeInfo.Scope.Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Context);
Status = AcpiNsLookup (&ScopeInfo, "_TMP", ACPI_TYPE_LOCAL_RESOURCE,
ACPI_IMODE_LOAD_PASS2,
ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_PREFIX_IS_SCOPE,
NULL, &Node);
ACPI_IMODE_LOAD_PASS2,
ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_PREFIX_IS_SCOPE,
NULL, &Node);
if (ACPI_FAILURE (Status))
{
return (AE_OK);
+6
View File
@@ -875,6 +875,7 @@ AcpiDmDumpTable (
AcpiOsPrintf ("\n");
LastOutputBlankLine = TRUE;
}
ByteLength = sizeof (ACPI_GENERIC_ADDRESS);
break;
@@ -885,6 +886,7 @@ AcpiDmDumpTable (
AcpiOsPrintf ("\n");
LastOutputBlankLine = TRUE;
}
ByteLength = sizeof (ACPI_HEST_NOTIFY);
break;
@@ -894,6 +896,7 @@ AcpiDmDumpTable (
{
LastOutputBlankLine = FALSE;
}
ByteLength = sizeof (ACPI_IORT_MEMORY_ACCESS);
break;
@@ -1027,6 +1030,7 @@ AcpiDmDumpTable (
}
}
}
AcpiOsPrintf ("\n");
break;
@@ -1050,6 +1054,7 @@ AcpiDmDumpTable (
AcpiDmCheckAscii (Target, RepairedName, 4);
AcpiOsPrintf ("\"%.4s\" ", RepairedName);
TableData = AcpiAhGetTableInfo (ACPI_CAST_PTR (char, Target));
if (TableData)
{
@@ -1095,6 +1100,7 @@ AcpiDmDumpTable (
AcpiOsPrintf (
" /* Incorrect checksum, should be %2.2X */", Temp8);
}
AcpiOsPrintf ("\n");
break;
+499
View File
@@ -0,0 +1,499 @@
/******************************************************************************
*
* Module Name: dmtables - disassembler ACPI table support
*
*****************************************************************************/
/*
* Copyright (C) 2000 - 2015, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
* substantially similar to the "NO WARRANTY" disclaimer below
* ("Disclaimer") and any redistribution must be conditioned upon
* including a substantially similar Disclaimer requirement for further
* binary redistribution.
* 3. Neither the names of the above-listed copyright holders nor the names
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* Alternatively, this software may be distributed under the terms of the
* GNU General Public License ("GPL") version 2 as published by the Free
* Software Foundation.
*
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*/
#include "aslcompiler.h"
#include "acapps.h"
#include "acdispat.h"
#include "acnamesp.h"
#include "actables.h"
#include "acparser.h"
#include <stdio.h>
#include <time.h>
#define _COMPONENT ACPI_TOOLS
ACPI_MODULE_NAME ("dmtables")
/* Local prototypes */
static void
AdCreateTableHeader (
char *Filename,
ACPI_TABLE_HEADER *Table);
static ACPI_STATUS
AdStoreTable (
ACPI_TABLE_HEADER *Table,
UINT32 *TableIndex);
extern ACPI_TABLE_DESC LocalTables[1];
extern ACPI_PARSE_OBJECT *AcpiGbl_ParseOpRoot;
/******************************************************************************
*
* FUNCTION: AdDisassemblerHeader
*
* PARAMETERS: Filename - Input file for the table
* TableType - Either AML or DataTable
*
* RETURN: None
*
* DESCRIPTION: Create the disassembler header, including ACPICA signon with
* current time and date.
*
*****************************************************************************/
void
AdDisassemblerHeader (
char *Filename,
UINT8 TableType)
{
time_t Timer;
time (&Timer);
/* Header and input table info */
AcpiOsPrintf ("/*\n");
AcpiOsPrintf (ACPI_COMMON_HEADER (AML_DISASSEMBLER_NAME, " * "));
if (TableType == ACPI_IS_AML_TABLE)
{
if (AcpiGbl_CstyleDisassembly)
{
AcpiOsPrintf (
" * Disassembling to symbolic ASL+ operators\n"
" *\n");
}
else
{
AcpiOsPrintf (
" * Disassembling to non-symbolic legacy ASL operators\n"
" *\n");
}
}
AcpiOsPrintf (" * Disassembly of %s, %s", Filename, ctime (&Timer));
AcpiOsPrintf (" *\n");
}
/******************************************************************************
*
* FUNCTION: AdCreateTableHeader
*
* PARAMETERS: Filename - Input file for the table
* Table - Pointer to the raw table
*
* RETURN: None
*
* DESCRIPTION: Create the ASL table header, including ACPICA signon with
* current time and date.
*
*****************************************************************************/
static void
AdCreateTableHeader (
char *Filename,
ACPI_TABLE_HEADER *Table)
{
char *NewFilename;
UINT8 Checksum;
/*
* Print file header and dump original table header
*/
AdDisassemblerHeader (Filename, ACPI_IS_AML_TABLE);
AcpiOsPrintf (" * Original Table Header:\n");
AcpiOsPrintf (" * Signature \"%4.4s\"\n", Table->Signature);
AcpiOsPrintf (" * Length 0x%8.8X (%u)\n", Table->Length, Table->Length);
/* Print and validate the revision */
AcpiOsPrintf (" * Revision 0x%2.2X", Table->Revision);
switch (Table->Revision)
{
case 0:
AcpiOsPrintf (" **** Invalid Revision");
break;
case 1:
/* Revision of DSDT controls the ACPI integer width */
if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT))
{
AcpiOsPrintf (" **** 32-bit table (V1), no 64-bit math support");
}
break;
default:
break;
}
AcpiOsPrintf ("\n");
/* Print and validate the table checksum */
AcpiOsPrintf (" * Checksum 0x%2.2X", Table->Checksum);
Checksum = AcpiTbChecksum (ACPI_CAST_PTR (UINT8, Table), Table->Length);
if (Checksum)
{
AcpiOsPrintf (" **** Incorrect checksum, should be 0x%2.2X",
(UINT8) (Table->Checksum - Checksum));
}
AcpiOsPrintf ("\n");
AcpiOsPrintf (" * OEM ID \"%.6s\"\n", Table->OemId);
AcpiOsPrintf (" * OEM Table ID \"%.8s\"\n", Table->OemTableId);
AcpiOsPrintf (" * OEM Revision 0x%8.8X (%u)\n", Table->OemRevision, Table->OemRevision);
AcpiOsPrintf (" * Compiler ID \"%.4s\"\n", Table->AslCompilerId);
AcpiOsPrintf (" * Compiler Version 0x%8.8X (%u)\n", Table->AslCompilerRevision, Table->AslCompilerRevision);
AcpiOsPrintf (" */\n");
/* Create AML output filename based on input filename */
if (Filename)
{
NewFilename = FlGenerateFilename (Filename, "aml");
}
else
{
NewFilename = UtStringCacheCalloc (9);
if (NewFilename)
{
strncat (NewFilename, Table->Signature, 4);
strcat (NewFilename, ".aml");
}
}
if (!NewFilename)
{
AcpiOsPrintf (" **** Could not generate AML output filename\n");
return;
}
/* Open the ASL definition block */
AcpiOsPrintf (
"DefinitionBlock (\"%s\", \"%4.4s\", %hu, \"%.6s\", \"%.8s\", 0x%8.8X)\n",
NewFilename, Table->Signature, Table->Revision,
Table->OemId, Table->OemTableId, Table->OemRevision);
}
/******************************************************************************
*
* FUNCTION: AdDisplayTables
*
* PARAMETERS: Filename - Input file for the table
* Table - Pointer to the raw table
*
* RETURN: Status
*
* DESCRIPTION: Display (disassemble) loaded tables and dump raw tables
*
*****************************************************************************/
ACPI_STATUS
AdDisplayTables (
char *Filename,
ACPI_TABLE_HEADER *Table)
{
if (!AcpiGbl_ParseOpRoot)
{
return (AE_NOT_EXIST);
}
if (!AcpiGbl_DmOpt_Listing)
{
AdCreateTableHeader (Filename, Table);
}
AcpiDmDisassemble (NULL, AcpiGbl_ParseOpRoot, ACPI_UINT32_MAX);
MpEmitMappingInfo ();
if (AcpiGbl_DmOpt_Listing)
{
AcpiOsPrintf ("\n\nTable Header:\n");
AcpiUtDebugDumpBuffer ((UINT8 *) Table, sizeof (ACPI_TABLE_HEADER),
DB_BYTE_DISPLAY, ACPI_UINT32_MAX);
AcpiOsPrintf ("Table Body (Length 0x%X)\n", Table->Length);
AcpiUtDebugDumpBuffer (((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER)),
Table->Length, DB_BYTE_DISPLAY, ACPI_UINT32_MAX);
}
return (AE_OK);
}
/*******************************************************************************
*
* FUNCTION: AdStoreTable
*
* PARAMETERS: Table - Table header
* TableIndex - Where the table index is returned
*
* RETURN: Status and table index.
*
* DESCRIPTION: Add an ACPI table to the global table list
*
******************************************************************************/
static ACPI_STATUS
AdStoreTable (
ACPI_TABLE_HEADER *Table,
UINT32 *TableIndex)
{
ACPI_STATUS Status;
ACPI_TABLE_DESC *TableDesc;
Status = AcpiTbGetNextTableDescriptor (TableIndex, &TableDesc);
if (ACPI_FAILURE (Status))
{
return (Status);
}
/* Initialize added table */
AcpiTbInitTableDescriptor (TableDesc, ACPI_PTR_TO_PHYSADDR (Table),
ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL, Table);
Status = AcpiTbValidateTable (TableDesc);
return (Status);
}
/******************************************************************************
*
* FUNCTION: AdGetLocalTables
*
* PARAMETERS: None
*
* RETURN: Status
*
* DESCRIPTION: Get the ACPI tables from either memory or a file
*
*****************************************************************************/
ACPI_STATUS
AdGetLocalTables (
void)
{
ACPI_STATUS Status;
ACPI_TABLE_HEADER TableHeader;
ACPI_TABLE_HEADER *NewTable;
UINT32 TableIndex;
/* Get the DSDT via table override */
ACPI_MOVE_32_TO_32 (TableHeader.Signature, ACPI_SIG_DSDT);
AcpiOsTableOverride (&TableHeader, &NewTable);
if (!NewTable)
{
fprintf (stderr, "Could not obtain DSDT\n");
return (AE_NO_ACPI_TABLES);
}
AdWriteTable (NewTable, NewTable->Length,
ACPI_SIG_DSDT, NewTable->OemTableId);
/* Store DSDT in the Table Manager */
Status = AdStoreTable (NewTable, &TableIndex);
if (ACPI_FAILURE (Status))
{
fprintf (stderr, "Could not store DSDT\n");
return (AE_NO_ACPI_TABLES);
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: AdParseTable
*
* PARAMETERS: Table - Pointer to the raw table
* OwnerId - Returned OwnerId of the table
* LoadTable - If add table to the global table list
* External - If this is an external table
*
* RETURN: Status
*
* DESCRIPTION: Parse an ACPI AML table
*
*****************************************************************************/
ACPI_STATUS
AdParseTable (
ACPI_TABLE_HEADER *Table,
ACPI_OWNER_ID *OwnerId,
BOOLEAN LoadTable,
BOOLEAN External)
{
ACPI_STATUS Status = AE_OK;
ACPI_WALK_STATE *WalkState;
UINT8 *AmlStart;
UINT32 AmlLength;
UINT32 TableIndex;
if (!Table)
{
return (AE_NOT_EXIST);
}
/* Pass 1: Parse everything except control method bodies */
fprintf (stderr, "Pass 1 parse of [%4.4s]\n", (char *) Table->Signature);
AmlLength = Table->Length - sizeof (ACPI_TABLE_HEADER);
AmlStart = ((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER));
/* Create the root object */
AcpiGbl_ParseOpRoot = AcpiPsCreateScopeOp (AmlStart);
if (!AcpiGbl_ParseOpRoot)
{
return (AE_NO_MEMORY);
}
/* Create and initialize a new walk state */
WalkState = AcpiDsCreateWalkState (0, AcpiGbl_ParseOpRoot, NULL, NULL);
if (!WalkState)
{
return (AE_NO_MEMORY);
}
Status = AcpiDsInitAmlWalk (WalkState, AcpiGbl_ParseOpRoot,
NULL, AmlStart, AmlLength, NULL, ACPI_IMODE_LOAD_PASS1);
if (ACPI_FAILURE (Status))
{
return (Status);
}
WalkState->ParseFlags &= ~ACPI_PARSE_DELETE_TREE;
WalkState->ParseFlags |= ACPI_PARSE_DISASSEMBLE;
Status = AcpiPsParseAml (WalkState);
if (ACPI_FAILURE (Status))
{
return (Status);
}
/* If LoadTable is FALSE, we are parsing the last loaded table */
TableIndex = AcpiGbl_RootTableList.CurrentTableCount - 1;
/* Pass 2 */
if (LoadTable)
{
Status = AdStoreTable (Table, &TableIndex);
if (ACPI_FAILURE (Status))
{
return (Status);
}
Status = AcpiTbAllocateOwnerId (TableIndex);
if (ACPI_FAILURE (Status))
{
return (Status);
}
if (OwnerId)
{
Status = AcpiTbGetOwnerId (TableIndex, OwnerId);
if (ACPI_FAILURE (Status))
{
return (Status);
}
}
}
fprintf (stderr, "Pass 2 parse of [%4.4s]\n", (char *) Table->Signature);
Status = AcpiNsOneCompleteParse (ACPI_IMODE_LOAD_PASS2, TableIndex, NULL);
if (ACPI_FAILURE (Status))
{
return (Status);
}
/* No need to parse control methods of external table */
if (External)
{
return (AE_OK);
}
/*
* Pass 3: Parse control methods and link their parse trees
* into the main parse tree
*/
fprintf (stderr,
"Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)\n");
Status = AcpiDmParseDeferredOps (AcpiGbl_ParseOpRoot);
fprintf (stderr, "\n");
/* Process Resource Templates */
AcpiDmFindResources (AcpiGbl_ParseOpRoot);
fprintf (stderr, "Parsing completed\n");
return (AE_OK);
}
+192 -147
View File
File diff suppressed because it is too large Load Diff
+6 -2
View File
@@ -90,6 +90,7 @@ AcpiGetoptArgument (
int argc,
char **argv)
{
AcpiGbl_Optind--;
CurrentCharPtr++;
@@ -182,7 +183,8 @@ AcpiGetopt(
}
else if (++AcpiGbl_Optind >= argc)
{
ACPI_OPTION_ERROR ("Option requires an argument: -", CurrentChar);
ACPI_OPTION_ERROR (
"Option requires an argument: -", CurrentChar);
CurrentCharPtr = 1;
return ('?');
@@ -243,7 +245,9 @@ AcpiGetopt(
}
else
{
ACPI_OPTION_ERROR ("Option requires a single-character suboption: -", CurrentChar);
ACPI_OPTION_ERROR (
"Option requires a single-character suboption: -",
CurrentChar);
CurrentCharPtr = 1;
return ('?');
+8 -7
View File
@@ -139,8 +139,7 @@ AnCheckId (
Length = strlen (Op->Asl.Value.String);
if (!Length)
{
AslError (ASL_ERROR, ASL_MSG_NULL_STRING,
Op, NULL);
AslError (ASL_ERROR, ASL_MSG_NULL_STRING, Op, NULL);
return;
}
@@ -191,7 +190,7 @@ AnCheckId (
return;
}
/* _HID Length is valid (7 or 8), now check the prefix (first 3 or 4 chars) */
/* _HID Length is valid (7 or 8), now check prefix (first 3 or 4 chars) */
if (Length == 7)
{
@@ -231,8 +230,8 @@ AnCheckId (
{
if (!isxdigit ((int) Op->Asl.Value.String[i]))
{
AslError (ASL_ERROR, ASL_MSG_HID_SUFFIX,
Op, &Op->Asl.Value.String[i]);
AslError (ASL_ERROR, ASL_MSG_HID_SUFFIX,
Op, &Op->Asl.Value.String[i]);
break;
}
}
@@ -323,7 +322,8 @@ AnCheckMethodReturnValue (
{
/* Method SOMETIMES returns a value, SOMETIMES not */
AslError (ASL_WARNING, ASL_MSG_SOME_NO_RETVAL, Op, Op->Asl.ExternalName);
AslError (ASL_WARNING, ASL_MSG_SOME_NO_RETVAL,
Op, Op->Asl.ExternalName);
}
else if (!(ThisNodeBtype & RequiredBtypes))
{
@@ -400,12 +400,13 @@ AnIsResultUsed (
{
return (TRUE);
}
return (FALSE);
/* Not used if one of these is the parent */
case PARSEOP_METHOD:
case PARSEOP_DEFINITIONBLOCK:
case PARSEOP_DEFINITION_BLOCK:
case PARSEOP_ELSE:
return (FALSE);
+6 -4
View File
@@ -78,7 +78,6 @@ AnMapArgTypeToBtype (
switch (ArgType)
{
/* Simple types */
case ARGI_ANYTYPE:
@@ -221,7 +220,6 @@ AnMapEtypeToBtype (
UINT32 Etype)
{
if (Etype == ACPI_TYPE_ANY)
{
return (ACPI_BTYPE_OBJECTS_AND_REFS);
@@ -328,7 +326,6 @@ AnFormatBtype (
*Buffer = 0;
if (Btype == 0)
{
strcat (Buffer, "NoReturnValue");
@@ -343,6 +340,7 @@ AnFormatBtype (
{
strcat (Buffer, "|");
}
First = FALSE;
strcat (Buffer, AcpiUtGetTypeName (Type));
}
@@ -355,6 +353,7 @@ AnFormatBtype (
{
strcat (Buffer, "|");
}
First = FALSE;
strcat (Buffer, "Reference");
}
@@ -366,6 +365,7 @@ AnFormatBtype (
{
strcat (Buffer, "|");
}
First = FALSE;
strcat (Buffer, "Resource");
}
@@ -409,7 +409,8 @@ AnGetBtype (
if (!Node)
{
DbgPrint (ASL_DEBUG_OUTPUT,
"No attached Nsnode: [%s] at line %u name [%s], ignoring typecheck\n",
"No attached Nsnode: [%s] at line %u name [%s], "
"ignoring typecheck\n",
Op->Asl.ParseOpName, Op->Asl.LineNumber,
Op->Asl.ExternalName);
return (ACPI_UINT32_MAX);
@@ -457,6 +458,7 @@ AnGetBtype (
return (ThisNodeBtype);
}
/*******************************************************************************
*
* FUNCTION: AnMapObjTypeToBtype
+96 -43
View File
@@ -168,28 +168,28 @@ CgAmlWriteWalk (
}
DbgPrint (ASL_TREE_OUTPUT,
"%08X %04X %04X %01X %04X %04X %04X %04X "
"%08X %08X %08X %08X %08X %08X %04X %02d %02d %02d %02d %02d\n",
/* 1 */ (UINT32) Op->Asl.Value.Integer,
/* 2 */ Op->Asl.ParseOpcode,
/* 3 */ Op->Asl.AmlOpcode,
/* 4 */ Op->Asl.AmlOpcodeLength,
/* 5 */ Op->Asl.AmlPkgLenBytes,
/* 6 */ Op->Asl.AmlLength,
/* 7 */ Op->Asl.AmlSubtreeLength,
/* 8 */ Op->Asl.Parent ? Op->Asl.Parent->Asl.AmlSubtreeLength : 0,
/* 9 */ Op,
/* 10 */ Op->Asl.Parent,
/* 11 */ Op->Asl.Child,
/* 12 */ Op->Asl.Next,
/* 13 */ Op->Asl.CompileFlags,
/* 14 */ Op->Asl.AcpiBtype,
/* 15 */ Op->Asl.FinalAmlLength,
/* 16 */ Op->Asl.Column,
/* 17 */ Op->Asl.LineNumber,
/* 18 */ Op->Asl.EndLine,
/* 19 */ Op->Asl.LogicalLineNumber,
/* 20 */ Op->Asl.EndLogicalLine);
"%08X %04X %04X %01X %04X %04X %04X %04X "
"%08X %08X %08X %08X %08X %08X %04X %02d %02d %02d %02d %02d\n",
/* 1 */ (UINT32) Op->Asl.Value.Integer,
/* 2 */ Op->Asl.ParseOpcode,
/* 3 */ Op->Asl.AmlOpcode,
/* 4 */ Op->Asl.AmlOpcodeLength,
/* 5 */ Op->Asl.AmlPkgLenBytes,
/* 6 */ Op->Asl.AmlLength,
/* 7 */ Op->Asl.AmlSubtreeLength,
/* 8 */ Op->Asl.Parent ? Op->Asl.Parent->Asl.AmlSubtreeLength : 0,
/* 9 */ Op,
/* 10 */ Op->Asl.Parent,
/* 11 */ Op->Asl.Child,
/* 12 */ Op->Asl.Next,
/* 13 */ Op->Asl.CompileFlags,
/* 14 */ Op->Asl.AcpiBtype,
/* 15 */ Op->Asl.FinalAmlLength,
/* 16 */ Op->Asl.Column,
/* 17 */ Op->Asl.LineNumber,
/* 18 */ Op->Asl.EndLine,
/* 19 */ Op->Asl.LogicalLineNumber,
/* 20 */ Op->Asl.EndLogicalLine);
/* Generate the AML for this node */
@@ -274,7 +274,8 @@ CgWriteAmlOpcode (
/* These opcodes should not get here */
printf ("Found a node with an unassigned AML opcode\n");
FlPrintFile (ASL_FILE_STDERR, "Found a node with an unassigned AML opcode\n");
FlPrintFile (ASL_FILE_STDERR,
"Found a node with an unassigned AML opcode\n");
return;
case AML_INT_RESERVEDFIELD_OP:
@@ -357,8 +358,10 @@ CgWriteAmlOpcode (
*/
PkgLen.Len >>= 4;
/* Now we can write the remaining bytes - either 1, 2, or 3 bytes */
/*
* Now we can write the remaining bytes -
* either 1, 2, or 3 bytes
*/
for (i = 0; i < (UINT32) (Op->Asl.AmlPkgLenBytes - 1); i++)
{
CgLocalWriteAmlData (Op, &PkgLen.LenBytes[i], 1);
@@ -467,10 +470,68 @@ CgWriteTableHeader (
/* Table length. Checksum zero for now, will rewrite later */
TableHeader.Length = Gbl_TableLength;
TableHeader.Length = sizeof (ACPI_TABLE_HEADER) +
Op->Asl.AmlSubtreeLength;
TableHeader.Checksum = 0;
Op->Asl.FinalAmlOffset = ftell (Gbl_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));
}
/*******************************************************************************
*
* FUNCTION: CgUpdateHeader
*
* PARAMETERS: Op - Op for the Definition Block
*
* RETURN: None.
*
* DESCRIPTION: Complete the ACPI table by calculating the checksum and
* re-writing the header for the input definition block
*
******************************************************************************/
static void
CgUpdateHeader (
ACPI_PARSE_OBJECT *Op)
{
signed char Sum;
UINT32 i;
UINT32 Length;
UINT8 FileByte;
UINT8 Checksum;
/* Calculate the checksum over the entire definition block */
Sum = 0;
Length = sizeof (ACPI_TABLE_HEADER) + Op->Asl.AmlSubtreeLength;
FlSeekFile (ASL_FILE_AML_OUTPUT, Op->Asl.FinalAmlOffset);
for (i = 0; i < Length; i++)
{
if (FlReadFile (ASL_FILE_AML_OUTPUT, &FileByte, 1) != AE_OK)
{
printf ("EOF while reading checksum bytes\n");
return;
}
Sum = (signed char) (Sum + FileByte);
}
Checksum = (UINT8) (0 - Sum);
/* Re-write the the checksum byte */
FlSeekFile (ASL_FILE_AML_OUTPUT, Op->Asl.FinalAmlOffset +
ACPI_OFFSET (ACPI_TABLE_HEADER, Checksum));
FlWriteFile (ASL_FILE_AML_OUTPUT, &Checksum, 1);
}
@@ -483,7 +544,8 @@ CgWriteTableHeader (
* RETURN: None.
*
* DESCRIPTION: Complete the ACPI table by calculating the checksum and
* re-writing the header.
* re-writing each table header. This allows support for
* multiple definition blocks in a single source file.
*
******************************************************************************/
@@ -491,26 +553,17 @@ static void
CgCloseTable (
void)
{
signed char Sum;
UINT8 FileByte;
ACPI_PARSE_OBJECT *Op;
FlSeekFile (ASL_FILE_AML_OUTPUT, 0);
Sum = 0;
/* Process all definition blocks */
/* Calculate the checksum over the entire file */
while (FlReadFile (ASL_FILE_AML_OUTPUT, &FileByte, 1) == AE_OK)
Op = RootNode->Asl.Child;
while (Op)
{
Sum = (signed char) (Sum + FileByte);
CgUpdateHeader (Op);
Op = Op->Asl.Next;
}
/* Re-write the table header with the checksum */
TableHeader.Checksum = (UINT8) (0 - Sum);
FlSeekFile (ASL_FILE_AML_OUTPUT, 0);
CgLocalWriteAmlData (NULL, &TableHeader, sizeof (ACPI_TABLE_HEADER));
}
@@ -586,7 +639,7 @@ CgWriteNode (
break;
case PARSEOP_DEFINITIONBLOCK:
case PARSEOP_DEFINITION_BLOCK:
CgWriteTableHeader (Op);
break;
+17 -14
View File
@@ -130,7 +130,8 @@ CmDoCompile (
if (Gbl_SyntaxError)
{
fprintf (stderr, "Compiler aborting due to parser-detected syntax error(s)\n");
fprintf (stderr,
"Compiler aborting due to parser-detected syntax error(s)\n");
LsDumpParseTree ();
goto ErrorExit;
}
@@ -165,7 +166,7 @@ CmDoCompile (
LsDumpParseTree ();
OpcGetIntegerWidth (RootNode);
OpcGetIntegerWidth (RootNode->Asl.Child);
UtEndEvent (Event);
/* Pre-process parse tree for any operator transforms */
@@ -186,8 +187,8 @@ CmDoCompile (
/*
* Now that the input is parsed, we can open the AML output file.
* Note: by default, the name of this file comes from the table descriptor
* within the input file.
* Note: by default, the name of this file comes from the table
* descriptor within the input file.
*/
Event = UtBeginEvent ("Open AML output file");
Status = FlOpenAmlOutputFile (Gbl_OutputFilenamePrefix);
@@ -263,7 +264,8 @@ CmDoCompile (
/* Namespace cross-reference */
AslGbl_NamespaceEvent = UtBeginEvent ("Cross reference parse tree and Namespace");
AslGbl_NamespaceEvent = UtBeginEvent (
"Cross reference parse tree and Namespace");
Status = XfCrossReferenceNamespace ();
if (ACPI_FAILURE (Status))
{
@@ -301,7 +303,8 @@ CmDoCompile (
/* Semantic error checking part three - operand type checking */
Event = UtBeginEvent ("Analyze AML operand types");
DbgPrint (ASL_DEBUG_OUTPUT, "\nSemantic analysis - Operand type checking\n\n");
DbgPrint (ASL_DEBUG_OUTPUT,
"\nSemantic analysis - Operand type checking\n\n");
if (Gbl_DoTypechecking)
{
TrWalkParseTree (RootNode, ASL_WALK_VISIT_UPWARD,
@@ -590,8 +593,8 @@ CmDumpAllEvents (
{
ASL_EVENT_INFO *Event;
UINT32 Delta;
UINT32 USec;
UINT32 MSec;
UINT32 MicroSeconds;
UINT32 MilliSeconds;
UINT32 i;
@@ -611,23 +614,23 @@ CmDumpAllEvents (
Delta = (UINT32) (Event->EndTime - Event->StartTime);
USec = Delta / ACPI_100NSEC_PER_USEC;
MSec = Delta / ACPI_100NSEC_PER_MSEC;
MicroSeconds = Delta / ACPI_100NSEC_PER_USEC;
MilliSeconds = Delta / ACPI_100NSEC_PER_MSEC;
/* Round milliseconds up */
if ((USec - (MSec * ACPI_USEC_PER_MSEC)) >= 500)
if ((MicroSeconds - (MilliSeconds * ACPI_USEC_PER_MSEC)) >= 500)
{
MSec++;
MilliSeconds++;
}
DbgPrint (ASL_DEBUG_OUTPUT, "%8u usec %8u msec - %s\n",
USec, MSec, Event->EventName);
MicroSeconds, MilliSeconds, Event->EventName);
if (Gbl_CompileTimesFlag)
{
printf ("%8u usec %8u msec - %s\n",
USec, MSec, Event->EventName);
MicroSeconds, MilliSeconds, Event->EventName);
}
}
+1 -1
View File
@@ -210,7 +210,7 @@ NamePathTail [.]{NameSeg}
"Debug" { count (1); return (PARSEOP_DEBUG); }
"Decrement" { count (3); return (PARSEOP_DECREMENT); }
"Default" { count (3); return (PARSEOP_DEFAULT); }
"DefinitionBlock" { count (1); return (PARSEOP_DEFINITIONBLOCK); }
"DefinitionBlock" { count (1); return (PARSEOP_DEFINITION_BLOCK); }
"DeRefOf" { count (3); return (PARSEOP_DEREFOF); }
"Device" { count (2); return (PARSEOP_DEVICE); }
"Divide" { count (3); return (PARSEOP_DIVIDE); }
+19 -16
View File
@@ -267,8 +267,10 @@ AePrintException (
if (!Enode->SourceLine)
{
/* Use the merged header/source file if present, otherwise use input file */
/*
* Use the merged header/source file if present, otherwise
* use input file
*/
SourceFile = Gbl_Files[ASL_FILE_SOURCE_OUTPUT].Handle;
if (!SourceFile)
{
@@ -314,18 +316,18 @@ AePrintException (
fprintf (OutputFile, " %6u: ", Enode->LineNumber);
/*
* If not at EOF, get the corresponding source code line and
* display it. Don't attempt this if we have a premature EOF
* condition.
* If not at EOF, get the corresponding source code line
* and display it. Don't attempt this if we have a
* premature EOF condition.
*/
if (!PrematureEOF)
{
/*
* Seek to the offset in the combined source file, read
* the source line, and write it to the output.
* Seek to the offset in the combined source file,
* read the source line, and write it to the output.
*/
Actual = fseek (SourceFile, (long) Enode->LogicalByteOffset,
(int) SEEK_SET);
Actual = fseek (SourceFile,
(long) Enode->LogicalByteOffset, (int) SEEK_SET);
if (Actual)
{
fprintf (OutputFile,
@@ -880,16 +882,17 @@ AslCoreSubsystemError (
if (Op)
{
AslCommonError (ASL_ERROR, ASL_MSG_CORE_EXCEPTION, Op->Asl.LineNumber,
Op->Asl.LogicalLineNumber,
Op->Asl.LogicalByteOffset,
Op->Asl.Column,
Op->Asl.Filename, MsgBuffer);
AslCommonError (ASL_ERROR, ASL_MSG_CORE_EXCEPTION,
Op->Asl.LineNumber,
Op->Asl.LogicalLineNumber,
Op->Asl.LogicalByteOffset,
Op->Asl.Column,
Op->Asl.Filename, MsgBuffer);
}
else
{
AslCommonError (ASL_ERROR, ASL_MSG_CORE_EXCEPTION, 0,
0, 0, 0, NULL, MsgBuffer);
AslCommonError (ASL_ERROR, ASL_MSG_CORE_EXCEPTION,
0, 0, 0, 0, NULL, MsgBuffer);
}
if (Abort)
+3 -2
View File
@@ -70,6 +70,7 @@ FlFileError (
sprintf (MsgBuffer, "\"%s\" (%s) - %s", Gbl_Files[FileId].Filename,
Gbl_Files[FileId].Description, strerror (errno));
AslCommonError (ASL_ERROR, ErrorId, 0, 0, 0, 0, NULL, MsgBuffer);
}
@@ -269,7 +270,8 @@ FlPrintFile (
AslAbort ();
}
if ((FileId == ASL_FILE_PREPROCESSOR) && Gbl_PreprocessorOutputFlag)
if ((FileId == ASL_FILE_PREPROCESSOR) &&
Gbl_PreprocessorOutputFlag)
{
/*
* Duplicate the output to the user preprocessor (.i) file,
@@ -291,7 +293,6 @@ FlPrintFile (
AslAbort ();
}
}
}
+6 -4
View File
@@ -56,7 +56,6 @@ FlOpenIncludeWithPrefix (
ACPI_PARSE_OBJECT *Op,
char *Filename);
#ifdef ACPI_OBSOLETE_FUNCTIONS
ACPI_STATUS
FlParseInputPathname (
@@ -262,7 +261,8 @@ FlMergePathnames (
/* Build the final merged pathname */
ConcatenatePaths:
Pathname = UtStringCacheCalloc (strlen (CommonPath) + strlen (FilePathname) + 2);
Pathname = UtStringCacheCalloc (
strlen (CommonPath) + strlen (FilePathname) + 2);
if (LastElement && *CommonPath)
{
strcpy (Pathname, CommonPath);
@@ -422,7 +422,8 @@ FlOpenIncludeFile (
*
* Construct the file pathname from the global directory name.
*/
IncludeFile = FlOpenIncludeWithPrefix (Gbl_DirectoryPath, Op, Op->Asl.Value.String);
IncludeFile = FlOpenIncludeWithPrefix (
Gbl_DirectoryPath, Op, Op->Asl.Value.String);
if (IncludeFile)
{
return;
@@ -435,7 +436,8 @@ FlOpenIncludeFile (
NextDir = Gbl_IncludeDirList;
while (NextDir)
{
IncludeFile = FlOpenIncludeWithPrefix (NextDir->Dir, Op, Op->Asl.Value.String);
IncludeFile = FlOpenIncludeWithPrefix (
NextDir->Dir, Op, Op->Asl.Value.String);
if (IncludeFile)
{
return;
+115 -19
View File
@@ -100,7 +100,7 @@ TrInstallReducedConstant (
*
* RETURN: Status
*
* DESCRIPTION: Reduce an Op and its subtree to a constant if possible
* DESCRIPTION: Reduce an Op and its subtree to a constant if possible.
*
******************************************************************************/
@@ -206,7 +206,8 @@ OpcAmlConstantWalk (
*
* RETURN: Status
*
* DESCRIPTION: Check one Op for a type 3/4/5 AML opcode
* DESCRIPTION: Check one Op for a reducible type 3/4/5 AML opcode.
* This is performed via a downward walk of the parse subtree.
*
******************************************************************************/
@@ -218,6 +219,8 @@ OpcAmlCheckForConstant (
{
ACPI_WALK_STATE *WalkState = Context;
ACPI_STATUS Status = AE_OK;
ACPI_PARSE_OBJECT *NextOp;
const ACPI_OPCODE_INFO *OpInfo;
WalkState->Op = Op;
@@ -227,21 +230,6 @@ OpcAmlCheckForConstant (
DbgPrint (ASL_PARSE_OUTPUT, "[%.4d] Opcode: %12.12s ",
Op->Asl.LogicalLineNumber, Op->Asl.ParseOpName);
/*
* TBD: Ignore buffer constants for now. The problem is that these
* constants have been transformed into RAW_DATA at this point, from
* the parse tree transform process which currently happens before
* the constant folding process. We may need to defer this transform
* for buffer until after the constant folding.
*/
if (WalkState->Opcode == AML_BUFFER_OP)
{
DbgPrint (ASL_PARSE_OUTPUT,
"\nBuffer+Buffer->Buffer constant reduction is not supported yet");
Status = AE_TYPE;
goto CleanupAndExit;
}
/*
* These opcodes do not appear in the OpcodeInfo table, but
* they represent constants, so abort the constant walk now.
@@ -256,11 +244,95 @@ OpcAmlCheckForConstant (
goto CleanupAndExit;
}
/*
* Search upwards for a possible Name() operator. This is done
* because a type 3/4/5 opcode within a Name() expression
* MUST be reduced to a simple constant.
*/
NextOp = Op->Asl.Parent;
while (NextOp)
{
/* Finished if we find a Name() opcode */
if (NextOp->Asl.AmlOpcode == AML_NAME_OP)
{
break;
}
/*
* Any "deferred" opcodes contain one or more TermArg parameters,
* and thus are not required to be folded to constants at compile
* time. This affects things like Buffer() and Package() objects.
* We just ignore them here. However, any sub-expressions can and
* will still be typechecked. Note: These are called the
* "deferred" opcodes in the AML interpreter.
*/
OpInfo = AcpiPsGetOpcodeInfo (NextOp->Common.AmlOpcode);
if (OpInfo->Flags & AML_DEFER)
{
NextOp = NULL;
break;
}
NextOp = NextOp->Asl.Parent;
}
/* Type 3/4/5 opcodes have the AML_CONSTANT flag set */
if (!(WalkState->OpInfo->Flags & AML_CONSTANT))
{
/* Not 3/4/5 opcode, but maybe can convert to STORE */
/*
* From the ACPI specification:
*
* "The Type 3/4/5 opcodes return a value and can be used in an
* expression that evaluates to a constant. These opcodes may be
* evaluated at ASL compile-time. To ensure that these opcodes
* will evaluate to a constant, the following rules apply: The
* term cannot have a destination (target) operand, and must have
* either a Type3Opcode, Type4Opcode, Type5Opcode, ConstExprTerm,
* Integer, BufferTerm, Package, or String for all arguments."
*/
/*
* The value (second) operand for the Name() operator MUST
* reduce to a single constant, as per the ACPI specification
* (the operand is a DataObject). This also implies that there
* can be no target operand. Name() is the only ASL operator
* with a "DataObject" as an operand and is thus special-
* cased here.
*/
if (NextOp) /* Inspect a Name() operator */
{
/* Error if there is a target operand */
if (Op->Asl.CompileFlags & NODE_IS_TARGET)
{
AslError (ASL_ERROR, ASL_MSG_INVALID_TARGET, Op, NULL);
Status = AE_TYPE;
}
/* Error if expression cannot be reduced (folded) */
if (!(NextOp->Asl.CompileFlags & NODE_COULD_NOT_REDUCE))
{
/* Ensure only one error message per statement */
NextOp->Asl.CompileFlags |= NODE_COULD_NOT_REDUCE;
DbgPrint (ASL_PARSE_OUTPUT,
"**** Could not reduce operands for NAME opcode ****\n");
AslError (ASL_ERROR, ASL_MSG_CONSTANT_REQUIRED, Op,
"Constant is required for Name operator");
Status = AE_TYPE;
}
}
if (ACPI_FAILURE (Status))
{
goto CleanupAndExit;
}
/* This is not a 3/4/5 opcode, but maybe can convert to STORE */
if (Op->Asl.CompileFlags & NODE_IS_TARGET)
{
@@ -272,13 +344,36 @@ OpcAmlCheckForConstant (
/* Expression cannot be reduced */
DbgPrint (ASL_PARSE_OUTPUT,
"**** Not a Type 3/4/5 opcode (%s) ****",
"**** Not a Type 3/4/5 opcode or cannot reduce/fold (%s) ****\n",
Op->Asl.ParseOpName);
Status = AE_TYPE;
goto CleanupAndExit;
}
/*
* TBD: Ignore buffer constants for now. The problem is that these
* constants have been transformed into RAW_DATA at this point, from
* the parse tree transform process which currently happens before
* the constant folding process. We may need to defer this transform
* for buffer until after the constant folding.
*/
if (WalkState->Opcode == AML_BUFFER_OP)
{
DbgPrint (ASL_PARSE_OUTPUT,
"\nBuffer constant reduction is not supported yet\n");
if (NextOp) /* Found a Name() operator, error */
{
AslError (ASL_ERROR, ASL_MSG_UNSUPPORTED, Op,
"Buffer expression cannot be reduced");
}
Status = AE_TYPE;
goto CleanupAndExit;
}
/* Debug output */
DbgPrint (ASL_PARSE_OUTPUT, "TYPE_345");
@@ -294,6 +389,7 @@ OpcAmlCheckForConstant (
DbgPrint (ASL_PARSE_OUTPUT, "%-16s", " VALID TARGET");
}
}
if (Op->Asl.CompileFlags & NODE_IS_TERM_ARG)
{
DbgPrint (ASL_PARSE_OUTPUT, "%-16s", " TERMARG");
+3 -1
View File
@@ -50,7 +50,6 @@
* This module emits ASCII hex output files in either C, ASM, or ASL format
*/
/* Local prototypes */
static void
@@ -223,6 +222,7 @@ HxDoHexOutputC (
FlPrintFile (ASL_FILE_HEX_OUTPUT, " /* %8.8X", Offset);
LsDumpAsciiInComment (ASL_FILE_HEX_OUTPUT, LineLength, FileData);
FlPrintFile (ASL_FILE_HEX_OUTPUT, "%*s*/\n",
HEX_TABLE_LINE_SIZE - LineLength + 1, " ");
@@ -310,6 +310,7 @@ HxDoHexOutputAsl (
FlPrintFile (ASL_FILE_HEX_OUTPUT, " /* %8.8X", Offset);
LsDumpAsciiInComment (ASL_FILE_HEX_OUTPUT, LineLength, FileData);
FlPrintFile (ASL_FILE_HEX_OUTPUT, "%*s*/\n",
HEX_TABLE_LINE_SIZE - LineLength + 1, " ");
@@ -393,6 +394,7 @@ HxDoHexOutputAsm (
FlPrintFile (ASL_FILE_HEX_OUTPUT, " ; %8.8X", Offset);
LsDumpAsciiInComment (ASL_FILE_HEX_OUTPUT, LineLength, FileData);
FlPrintFile (ASL_FILE_HEX_OUTPUT, "\n");
Offset += LineLength;
+9 -10
View File
@@ -132,10 +132,11 @@ LnPackageLengthWalk (
if ((Op->Asl.Parent) &&
(Op->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG))
{
Op->Asl.Parent->Asl.AmlSubtreeLength += (Op->Asl.AmlLength +
Op->Asl.AmlOpcodeLength +
Op->Asl.AmlPkgLenBytes +
Op->Asl.AmlSubtreeLength);
Op->Asl.Parent->Asl.AmlSubtreeLength += (
Op->Asl.AmlLength +
Op->Asl.AmlOpcodeLength +
Op->Asl.AmlPkgLenBytes +
Op->Asl.AmlSubtreeLength);
}
return (AE_OK);
}
@@ -229,7 +230,7 @@ CgGenerateAmlOpcodeLength (
if (Op->Asl.CompileFlags & NODE_AML_PACKAGE)
{
Op->Asl.AmlPkgLenBytes = CgGetPackageLenByteCount (
Op, Op->Asl.AmlSubtreeLength);
Op, Op->Asl.AmlSubtreeLength);
}
/* Data opcode lengths are easy */
@@ -332,10 +333,9 @@ CgGenerateAmlLengths (
switch (Op->Asl.ParseOpcode)
{
case PARSEOP_DEFINITIONBLOCK:
case PARSEOP_DEFINITION_BLOCK:
Gbl_TableLength = sizeof (ACPI_TABLE_HEADER) +
Op->Asl.AmlSubtreeLength;
Gbl_TableLength = sizeof (ACPI_TABLE_HEADER) + Op->Asl.AmlSubtreeLength;
break;
case PARSEOP_NAMESEG:
@@ -365,7 +365,6 @@ CgGenerateAmlLengths (
Op->Asl.ExternalName = Op->Asl.Value.String;
Op->Asl.Value.String = Buffer;
Op->Asl.CompileFlags |= NODE_NAME_INTERNALIZED;
Op->Asl.AmlLength = strlen (Buffer);
/*
@@ -391,7 +390,7 @@ CgGenerateAmlLengths (
Op->Asl.AmlOpcodeLength = 0;
Op->Asl.AmlPkgLenBytes = CgGetPackageLenByteCount (Op,
(UINT32) Op->Asl.Value.Integer);
(UINT32) Op->Asl.Value.Integer);
break;
case PARSEOP_RAW_DATA:
+49 -22
View File
@@ -212,6 +212,12 @@ LsAmlListingWalk (
return (AE_OK);
}
if ((FileId == ASL_FILE_ASM_INCLUDE_OUTPUT) ||
(FileId == ASL_FILE_C_INCLUDE_OUTPUT))
{
return (AE_OK);
}
/* Write the hex bytes to the listing file(s) (if requested) */
for (i = 0; i < Op->Asl.FinalAmlLength; i++)
@@ -221,6 +227,7 @@ LsAmlListingWalk (
FlFileError (ASL_FILE_AML_OUTPUT, ASL_MSG_READ);
AslAbort ();
}
LsWriteListingHexBytes (&FileByte, 1, FileId);
}
@@ -316,7 +323,7 @@ LsWriteNodeToListing (
{
switch (Op->Asl.ParseOpcode)
{
case PARSEOP_DEFINITIONBLOCK:
case PARSEOP_DEFINITION_BLOCK:
case PARSEOP_METHODCALL:
case PARSEOP_INCLUDE:
case PARSEOP_INCLUDE_END:
@@ -362,36 +369,46 @@ LsWriteNodeToListing (
switch (Op->Asl.ParseOpcode)
{
case PARSEOP_DEFINITIONBLOCK:
case PARSEOP_DEFINITION_BLOCK:
LsWriteSourceLines (Op->Asl.EndLine, Op->Asl.EndLogicalLine, FileId);
/* Use the table Signature and TableId to build a unique name */
if (FileId == ASL_FILE_ASM_SOURCE_OUTPUT)
switch (FileId)
{
case ASL_FILE_ASM_SOURCE_OUTPUT:
FlPrintFile (FileId,
"%s_%s_Header \\\n",
Gbl_TableSignature, Gbl_TableId);
}
if (FileId == ASL_FILE_C_SOURCE_OUTPUT)
{
break;
case ASL_FILE_C_SOURCE_OUTPUT:
FlPrintFile (FileId,
" unsigned char %s_%s_Header [] =\n {\n",
Gbl_TableSignature, Gbl_TableId);
}
if (FileId == ASL_FILE_ASM_INCLUDE_OUTPUT)
{
break;
case ASL_FILE_ASM_INCLUDE_OUTPUT:
FlPrintFile (FileId,
"extrn %s_%s_Header : byte\n",
Gbl_TableSignature, Gbl_TableId);
}
if (FileId == ASL_FILE_C_INCLUDE_OUTPUT)
{
break;
case ASL_FILE_C_INCLUDE_OUTPUT:
FlPrintFile (FileId,
"extern unsigned char %s_%s_Header [];\n",
Gbl_TableSignature, Gbl_TableId);
break;
default:
break;
}
return;
@@ -540,31 +557,41 @@ LsWriteNodeToListing (
/* Create the appropriate symbol in the output file */
if (FileId == ASL_FILE_ASM_SOURCE_OUTPUT)
switch (FileId)
{
case ASL_FILE_ASM_SOURCE_OUTPUT:
FlPrintFile (FileId,
"%s_%s_%s \\\n",
Gbl_TableSignature, Gbl_TableId, &Pathname[1]);
}
if (FileId == ASL_FILE_C_SOURCE_OUTPUT)
{
break;
case ASL_FILE_C_SOURCE_OUTPUT:
FlPrintFile (FileId,
" unsigned char %s_%s_%s [] =\n {\n",
Gbl_TableSignature, Gbl_TableId, &Pathname[1]);
}
if (FileId == ASL_FILE_ASM_INCLUDE_OUTPUT)
{
break;
case ASL_FILE_ASM_INCLUDE_OUTPUT:
FlPrintFile (FileId,
"extrn %s_%s_%s : byte\n",
Gbl_TableSignature, Gbl_TableId, &Pathname[1]);
}
if (FileId == ASL_FILE_C_INCLUDE_OUTPUT)
{
break;
case ASL_FILE_C_INCLUDE_OUTPUT:
FlPrintFile (FileId,
"extern unsigned char %s_%s_%s [];\n",
Gbl_TableSignature, Gbl_TableId, &Pathname[1]);
break;
default:
break;
}
}
ACPI_FREE (Pathname);
}
break;
+2 -1
View File
@@ -88,6 +88,7 @@ LsDumpAscii (
FlPrintFile (FileId, ".");
}
}
FlPrintFile (FileId, "\"");
}
@@ -185,7 +186,6 @@ LsCheckException (
(LineNumber >= Gbl_NextError->LogicalLineNumber))
{
AePrintException (FileId, Gbl_NextError, "\n[****iasl****]\n");
Gbl_NextError = Gbl_NextError->Next;
}
@@ -576,6 +576,7 @@ LsFlushListingBuffer (
{
FlPrintFile (FileId, ",");
}
FlPrintFile (FileId, "0%2.2Xh", Gbl_AmlBuffer[i]);
}
+68 -28
View File
@@ -196,12 +196,11 @@ LdLoadFieldElements (
default:
Status = AcpiNsLookup (WalkState->ScopeInfo,
Child->Asl.Value.String,
ACPI_TYPE_LOCAL_REGION_FIELD,
ACPI_IMODE_LOAD_PASS1,
ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE |
ACPI_NS_ERROR_IF_FOUND,
NULL, &Node);
Child->Asl.Value.String,
ACPI_TYPE_LOCAL_REGION_FIELD,
ACPI_IMODE_LOAD_PASS1,
ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE |
ACPI_NS_ERROR_IF_FOUND, NULL, &Node);
if (ACPI_FAILURE (Status))
{
if (Status != AE_ALREADY_EXISTS)
@@ -266,9 +265,9 @@ LdLoadResourceElements (
* This opens a scope, so later field names are guaranteed to be new/unique.
*/
Status = AcpiNsLookup (WalkState->ScopeInfo, Op->Asl.Namepath,
ACPI_TYPE_LOCAL_RESOURCE, ACPI_IMODE_LOAD_PASS1,
ACPI_NS_NO_UPSEARCH | ACPI_NS_ERROR_IF_FOUND,
WalkState, &Node);
ACPI_TYPE_LOCAL_RESOURCE, ACPI_IMODE_LOAD_PASS1,
ACPI_NS_NO_UPSEARCH | ACPI_NS_ERROR_IF_FOUND,
WalkState, &Node);
if (ACPI_FAILURE (Status))
{
if (Status == AE_ALREADY_EXISTS)
@@ -296,11 +295,11 @@ LdLoadResourceElements (
if (InitializerOp->Asl.ExternalName)
{
Status = AcpiNsLookup (WalkState->ScopeInfo,
InitializerOp->Asl.ExternalName,
ACPI_TYPE_LOCAL_RESOURCE_FIELD,
ACPI_IMODE_LOAD_PASS1,
ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE,
NULL, &Node);
InitializerOp->Asl.ExternalName,
ACPI_TYPE_LOCAL_RESOURCE_FIELD,
ACPI_IMODE_LOAD_PASS1,
ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE,
NULL, &Node);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -344,6 +343,7 @@ LdNamespace1Begin (
{
ACPI_WALK_STATE *WalkState = (ACPI_WALK_STATE *) Context;
ACPI_NAMESPACE_NODE *Node;
ACPI_PARSE_OBJECT *MethodOp;
ACPI_STATUS Status;
ACPI_OBJECT_TYPE ObjectType;
ACPI_OBJECT_TYPE ActualObjectType = ACPI_TYPE_ANY;
@@ -500,8 +500,8 @@ LdNamespace1Begin (
* handle this case. Perhaps someday this case can go away.
*/
Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_ANY,
ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
WalkState, &(Node));
ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
WalkState, &(Node));
if (ACPI_FAILURE (Status))
{
if (Status == AE_NOT_FOUND)
@@ -509,9 +509,9 @@ LdNamespace1Begin (
/* The name was not found, go ahead and create it */
Status = AcpiNsLookup (WalkState->ScopeInfo, Path,
ACPI_TYPE_LOCAL_SCOPE,
ACPI_IMODE_LOAD_PASS1, Flags,
WalkState, &(Node));
ACPI_TYPE_LOCAL_SCOPE,
ACPI_IMODE_LOAD_PASS1, Flags,
WalkState, &(Node));
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -534,6 +534,35 @@ LdNamespace1Begin (
return_ACPI_STATUS (Status);
}
else /* Status AE_OK */
{
/*
* Do not allow references to external scopes from the DSDT.
* This is because the DSDT is always loaded first, and the
* external reference cannot be resolved -- causing a runtime
* error because Scope() must be resolved immediately.
* 10/2015.
*/
if ((Node->Flags & ANOBJ_IS_EXTERNAL) &&
(ACPI_COMPARE_NAME (Gbl_TableSignature, "DSDT")))
{
/* However, allowed if the reference is within a method */
MethodOp = Op->Asl.Parent;
while (MethodOp &&
(MethodOp->Asl.ParseOpcode != PARSEOP_METHOD))
{
MethodOp = MethodOp->Asl.Parent;
}
if (!MethodOp)
{
/* Not in a control method, error */
AslError (ASL_ERROR, ASL_MSG_CROSS_TABLE_SCOPE, Op, NULL);
}
}
}
/* We found a node with this name, now check the type */
@@ -569,7 +598,7 @@ LdNamespace1Begin (
Node->Type = ACPI_TYPE_LOCAL_SCOPE;
Status = AcpiDsScopeStackPush (Node, ACPI_TYPE_LOCAL_SCOPE,
WalkState);
WalkState);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -591,7 +620,7 @@ LdNamespace1Begin (
*/
Node->Type = ACPI_TYPE_LOCAL_SCOPE;
Status = AcpiDsScopeStackPush (Node, ACPI_TYPE_LOCAL_SCOPE,
WalkState);
WalkState);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -611,7 +640,7 @@ LdNamespace1Begin (
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Loading name: %s, (%s)\n",
Op->Asl.ExternalName, AcpiUtGetTypeName (ObjectType)));
Op->Asl.ExternalName, AcpiUtGetTypeName (ObjectType)));
/* The name must not already exist */
@@ -624,7 +653,7 @@ LdNamespace1Begin (
* parse tree later.
*/
Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ObjectType,
ACPI_IMODE_LOAD_PASS1, Flags, WalkState, &Node);
ACPI_IMODE_LOAD_PASS1, Flags, WalkState, &Node);
if (ACPI_FAILURE (Status))
{
if (Status == AE_ALREADY_EXISTS)
@@ -658,6 +687,17 @@ LdNamespace1Begin (
return_ACPI_STATUS (Status);
}
}
Status = AE_OK;
}
else if (!(Node->Flags & ANOBJ_IS_EXTERNAL) &&
(Op->Asl.ParseOpcode == PARSEOP_EXTERNAL))
{
/*
* Allow externals in same scope as the definition of the
* actual object. Similar to C. Allows multiple definition
* blocks that refer to each other in the same file.
*/
Status = AE_OK;
}
else
@@ -818,8 +858,8 @@ LdNamespace2Begin (
/* Get the NS node associated with the target. It must exist. */
Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_ANY,
ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
WalkState, &TargetNode);
ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
WalkState, &TargetNode);
if (ACPI_FAILURE (Status))
{
if (Status == AE_NOT_FOUND)
@@ -832,9 +872,9 @@ LdNamespace2Begin (
* This prevents more errors later.
*/
Status = AcpiNsLookup (WalkState->ScopeInfo, Path,
ACPI_TYPE_ANY,
ACPI_IMODE_LOAD_PASS1, ACPI_NS_NO_UPSEARCH,
WalkState, &(Node));
ACPI_TYPE_ANY,
ACPI_IMODE_LOAD_PASS1, ACPI_NS_NO_UPSEARCH,
WalkState, &(Node));
return (AE_OK);
}
+1
View File
@@ -479,6 +479,7 @@ const ASL_MAPPING_ENTRY AslKeywordMapping [] =
/* HORIZONTALOFFSET */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* PRINTF */ OP_TABLE_ENTRY (AML_STORE_OP, 0, 0, ACPI_BTYPE_DATA_REFERENCE),
/* FPRINTF */ OP_TABLE_ENTRY (AML_STORE_OP, 0, 0, ACPI_BTYPE_DATA_REFERENCE),
/* ASLCODE */ OP_TABLE_ENTRY (0, 0, 0, 0)
/*! [End] no source code translation !*/
};
+3 -3
View File
@@ -239,7 +239,7 @@ MpCreateGpioInfo (
/* Sort on source DeviceName first */
while (NextGpio &&
(strcmp (DeviceName, NextGpio->DeviceName) > 0))
(strcmp (DeviceName, NextGpio->DeviceName) > 0))
{
PrevGpio = NextGpio;
NextGpio = NextGpio->Next;
@@ -248,8 +248,8 @@ MpCreateGpioInfo (
/* Now sort on the PinNumber */
while (NextGpio &&
(NextGpio->PinNumber < PinNumber) &&
!strcmp (DeviceName, NextGpio->DeviceName))
(NextGpio->PinNumber < PinNumber) &&
!strcmp (DeviceName, NextGpio->DeviceName))
{
PrevGpio = NextGpio;
NextGpio = NextGpio->Next;
+1 -1
View File
@@ -453,7 +453,7 @@ MpEmitDeviceTree (
/* Walk the namespace from the root */
(void) AcpiNsWalkNamespace (ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
ACPI_UINT32_MAX, FALSE, MpEmitOneDevice, NULL, NULL, NULL);
ACPI_UINT32_MAX, FALSE, MpEmitOneDevice, NULL, NULL, NULL);
}
+3 -2
View File
@@ -238,8 +238,9 @@ const char *AslCompilerMsgs [] =
/* ASL_MSG_ILLEGAL_METHOD_REF */ "Illegal reference across two methods",
/* ASL_MSG_LOCAL_NOT_USED */ "Method Local is set but never used",
/* ASL_MSG_ARG_AS_LOCAL_NOT_USED */ "Method Argument (as a local) is set but never used",
/* ASL_MSG_ARG_NOT_USED */ "Method Argument is never used"
/* ASL_MSG_ARG_NOT_USED */ "Method Argument is never used",
/* ASL_MSG_CONSTANT_REQUIRED */ "Non-reducible expression",
/* ASL_MSG_CROSS_TABLE_SCOPE */ "Illegal open scope on external object from within DSDT"
};
/* Table compiler */
+2
View File
@@ -241,6 +241,8 @@ typedef enum
ASL_MSG_LOCAL_NOT_USED,
ASL_MSG_ARG_AS_LOCAL_NOT_USED,
ASL_MSG_ARG_NOT_USED,
ASL_MSG_CONSTANT_REQUIRED,
ASL_MSG_CROSS_TABLE_SCOPE,
/* These messages are used by the Data Table compiler only */
+17 -9
View File
@@ -101,7 +101,7 @@ MtMethodAnalysisWalkBegin (
/* Create and init method info */
MethodInfo = UtLocalCalloc (sizeof (ASL_METHOD_INFO));
MethodInfo = UtLocalCalloc (sizeof (ASL_METHOD_INFO));
MethodInfo->Next = WalkInfo->MethodStack;
MethodInfo->Op = Op;
@@ -186,7 +186,9 @@ MtMethodAnalysisWalkBegin (
NextParamType = NextType->Asl.Child;
while (NextParamType)
{
MethodInfo->ValidArgTypes[ActualArgs] |= AnMapObjTypeToBtype (NextParamType);
MethodInfo->ValidArgTypes[ActualArgs] |=
AnMapObjTypeToBtype (NextParamType);
NextParamType->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
NextParamType = NextParamType->Asl.Next;
}
@@ -195,6 +197,7 @@ MtMethodAnalysisWalkBegin (
{
MethodInfo->ValidArgTypes[ActualArgs] =
AnMapObjTypeToBtype (NextType);
NextType->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
ActualArgs++;
}
@@ -251,7 +254,8 @@ MtMethodAnalysisWalkBegin (
* Local was used outside a control method, or there was an error
* in the method declaration.
*/
AslError (ASL_REMARK, ASL_MSG_LOCAL_OUTSIDE_METHOD, Op, Op->Asl.ExternalName);
AslError (ASL_REMARK, ASL_MSG_LOCAL_OUTSIDE_METHOD,
Op, Op->Asl.ExternalName);
return (AE_ERROR);
}
@@ -294,7 +298,8 @@ MtMethodAnalysisWalkBegin (
* Arg was used outside a control method, or there was an error
* in the method declaration.
*/
AslError (ASL_REMARK, ASL_MSG_LOCAL_OUTSIDE_METHOD, Op, Op->Asl.ExternalName);
AslError (ASL_REMARK, ASL_MSG_LOCAL_OUTSIDE_METHOD,
Op, Op->Asl.ExternalName);
return (AE_ERROR);
}
@@ -317,7 +322,7 @@ MtMethodAnalysisWalkBegin (
* The only operator that accepts an uninitialized value is ObjectType()
*/
else if ((!MethodInfo->ArgInitialized[RegisterNumber]) &&
(Op->Asl.Parent->Asl.ParseOpcode != PARSEOP_OBJECTTYPE))
(Op->Asl.Parent->Asl.ParseOpcode != PARSEOP_OBJECTTYPE))
{
AslError (ASL_ERROR, ASL_MSG_ARG_INIT, Op, ArgName);
}
@@ -418,7 +423,8 @@ MtMethodAnalysisWalkBegin (
i = ApCheckForPredefinedName (Op, Op->Asl.NameSeg);
if (i < ACPI_VALID_RESERVED_NAME_MAX)
{
AslError (ASL_ERROR, ASL_MSG_RESERVED_USE, Op, Op->Asl.ExternalName);
AslError (ASL_ERROR, ASL_MSG_RESERVED_USE,
Op, Op->Asl.ExternalName);
}
break;
@@ -495,9 +501,10 @@ MtCheckNamedObjectInMethod (
const ACPI_OPCODE_INFO *OpInfo;
/* We don't care about actual method declarations */
/* We don't care about actual method declarations or scopes */
if (Op->Asl.AmlOpcode == AML_METHOD_OP)
if ((Op->Asl.AmlOpcode == AML_METHOD_OP) ||
(Op->Asl.AmlOpcode == AML_SCOPE_OP))
{
return;
}
@@ -677,7 +684,8 @@ MtMethodAnalysisWalkEnd (
*/
if (Op->Asl.Next)
{
AslError (ASL_WARNING, ASL_MSG_UNREACHABLE_CODE, Op->Asl.Next, NULL);
AslError (ASL_WARNING, ASL_MSG_UNREACHABLE_CODE,
Op->Asl.Next, NULL);
}
break;
+14 -7
View File
@@ -124,16 +124,16 @@ NsDisplayNamespace (
/* Walk entire namespace from the root */
Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
ACPI_UINT32_MAX, FALSE, NsDoOneNamespaceObject, NULL,
NULL, NULL);
ACPI_UINT32_MAX, FALSE, NsDoOneNamespaceObject, NULL,
NULL, NULL);
/* Print the full pathname for each namespace node */
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "\nNamespace pathnames\n\n");
Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
ACPI_UINT32_MAX, FALSE, NsDoOnePathname, NULL,
NULL, NULL);
ACPI_UINT32_MAX, FALSE, NsDoOnePathname, NULL,
NULL, NULL);
return (Status);
}
@@ -168,8 +168,7 @@ NsDoOneNamespaceObject (
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "%5u [%u] %*s %4.4s - %s",
Gbl_NumNamespaceObjects, Level, (Level * 3), " ",
&Node->Name,
AcpiUtGetTypeName (Node->Type));
&Node->Name, AcpiUtGetTypeName (Node->Type));
Op = Node->Op;
ObjDesc = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, Node->Object);
@@ -218,11 +217,13 @@ NsDoOneNamespaceObject (
{
Op = Op->Asl.Child;
}
if ((Op->Asl.ParseOpcode == PARSEOP_NAMESEG) ||
(Op->Asl.ParseOpcode == PARSEOP_NAMESTRING))
{
Op = Op->Asl.Next;
}
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT,
" [Initial Value 0x%8.8X%8.8X]",
ACPI_FORMAT_UINT64 (Op->Asl.Value.Integer));
@@ -234,11 +235,13 @@ NsDoOneNamespaceObject (
{
Op = Op->Asl.Child;
}
if ((Op->Asl.ParseOpcode == PARSEOP_NAMESEG) ||
(Op->Asl.ParseOpcode == PARSEOP_NAMESTRING))
{
Op = Op->Asl.Next;
}
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT,
" [Initial Value \"%s\"]",
Op->Asl.Value.String);
@@ -251,6 +254,7 @@ NsDoOneNamespaceObject (
{
Op = Op->Asl.Child;
}
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT,
" [Offset 0x%04X Length 0x%04X bits]",
Op->Asl.Parent->Asl.ExtraValue, (UINT32) Op->Asl.Value.Integer);
@@ -303,11 +307,13 @@ NsDoOneNamespaceObject (
{
Op = Op->Asl.Child;
}
if ((Op->Asl.ParseOpcode == PARSEOP_NAMESEG) ||
(Op->Asl.ParseOpcode == PARSEOP_NAMESTRING))
{
Op = Op->Asl.Next;
}
Op = Op->Asl.Child;
if ((Op->Asl.ParseOpcode == PARSEOP_BYTECONST) ||
@@ -325,11 +331,13 @@ NsDoOneNamespaceObject (
{
Op = Op->Asl.Child;
}
if ((Op->Asl.ParseOpcode == PARSEOP_NAMESEG) ||
(Op->Asl.ParseOpcode == PARSEOP_NAMESTRING))
{
Op = Op->Asl.Next;
}
Op = Op->Asl.Child;
if (Op && (Op->Asl.ParseOpcode == PARSEOP_INTEGER))
@@ -417,6 +425,5 @@ NsDoOnePathname (
FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "%s\n", TargetPath.Pointer);
ACPI_FREE (TargetPath.Pointer);
return (AE_OK);
}
+32 -29
View File
@@ -260,7 +260,7 @@ OpcSetOptimalIntegerSize (
*/
if (Op->Asl.Parent &&
Op->Asl.Parent->Asl.Parent &&
(Op->Asl.Parent->Asl.Parent->Asl.ParseOpcode == PARSEOP_DEFINITIONBLOCK))
(Op->Asl.Parent->Asl.Parent->Asl.ParseOpcode == PARSEOP_DEFINITION_BLOCK))
{
return (0);
}
@@ -330,11 +330,13 @@ OpcSetOptimalIntegerSize (
Op->Asl.AmlOpcode = AML_BYTE_OP;
return (1);
}
if (Op->Asl.Value.Integer <= ACPI_UINT16_MAX)
{
Op->Asl.AmlOpcode = AML_WORD_OP;
return (2);
}
if (Op->Asl.Value.Integer <= ACPI_UINT32_MAX)
{
Op->Asl.AmlOpcode = AML_DWORD_OP;
@@ -398,6 +400,7 @@ OpcDoAccessAs (
{
AttribOp->Asl.Value.Integer = 0;
}
AttribOp->Asl.AmlOpcode = AML_RAW_DATA_BYTE;
AttribOp->Asl.ParseOpcode = PARSEOP_RAW_DATA;
@@ -486,21 +489,21 @@ OpcDoConnection (
* First Child -> BufferLength
* Second Child -> Descriptor Buffer (raw byte data)
*/
BufferOp->Asl.ParseOpcode = PARSEOP_BUFFER;
BufferOp->Asl.AmlOpcode = AML_BUFFER_OP;
BufferOp->Asl.CompileFlags = NODE_AML_PACKAGE | NODE_IS_RESOURCE_DESC;
BufferOp->Asl.ParseOpcode = PARSEOP_BUFFER;
BufferOp->Asl.AmlOpcode = AML_BUFFER_OP;
BufferOp->Asl.CompileFlags = NODE_AML_PACKAGE | NODE_IS_RESOURCE_DESC;
UtSetParseOpName (BufferOp);
BufferLengthOp->Asl.ParseOpcode = PARSEOP_INTEGER;
BufferLengthOp->Asl.ParseOpcode = PARSEOP_INTEGER;
BufferLengthOp->Asl.Value.Integer = Rnode->BufferLength;
(void) OpcSetOptimalIntegerSize (BufferLengthOp);
UtSetParseOpName (BufferLengthOp);
BufferDataOp->Asl.ParseOpcode = PARSEOP_RAW_DATA;
BufferDataOp->Asl.AmlOpcode = AML_RAW_DATA_CHAIN;
BufferDataOp->Asl.AmlOpcodeLength = 0;
BufferDataOp->Asl.AmlLength = Rnode->BufferLength;
BufferDataOp->Asl.Value.Buffer = (UINT8 *) Rnode;
BufferDataOp->Asl.ParseOpcode = PARSEOP_RAW_DATA;
BufferDataOp->Asl.AmlOpcode = AML_RAW_DATA_CHAIN;
BufferDataOp->Asl.AmlOpcodeLength = 0;
BufferDataOp->Asl.AmlLength = Rnode->BufferLength;
BufferDataOp->Asl.Value.Buffer = (UINT8 *) Rnode;
UtSetParseOpName (BufferDataOp);
}
@@ -564,8 +567,8 @@ OpcDoUnicode (
* Just set the buffer size node to be the buffer length, regardless
* of whether it was previously an integer or a default_arg placeholder
*/
BufferLengthOp->Asl.ParseOpcode = PARSEOP_INTEGER;
BufferLengthOp->Asl.AmlOpcode = AML_DWORD_OP;
BufferLengthOp->Asl.ParseOpcode = PARSEOP_INTEGER;
BufferLengthOp->Asl.AmlOpcode = AML_DWORD_OP;
BufferLengthOp->Asl.Value.Integer = Length;
UtSetParseOpName (BufferLengthOp);
@@ -573,11 +576,11 @@ OpcDoUnicode (
/* The Unicode string is a raw data buffer */
InitializerOp->Asl.Value.Buffer = (UINT8 *) UnicodeString;
InitializerOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
InitializerOp->Asl.AmlLength = Length;
InitializerOp->Asl.ParseOpcode = PARSEOP_RAW_DATA;
InitializerOp->Asl.Child = NULL;
InitializerOp->Asl.Value.Buffer = (UINT8 *) UnicodeString;
InitializerOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
InitializerOp->Asl.AmlLength = Length;
InitializerOp->Asl.ParseOpcode = PARSEOP_RAW_DATA;
InitializerOp->Asl.Child = NULL;
UtSetParseOpName (InitializerOp);
}
@@ -1330,9 +1333,9 @@ OpcDoPld (
NewOp = TrAllocateNode (PARSEOP_INTEGER);
NewOp->Asl.AmlOpcode = AML_BYTE_OP;
NewOp->Asl.AmlOpcode = AML_BYTE_OP;
NewOp->Asl.Value.Integer = 20;
NewOp->Asl.Parent = Op;
NewOp->Asl.Parent = Op;
Op->Asl.Child = NewOp;
Op = NewOp;
@@ -1340,10 +1343,10 @@ OpcDoPld (
/* Peer to the child is the raw buffer data */
NewOp = TrAllocateNode (PARSEOP_RAW_DATA);
NewOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
NewOp->Asl.AmlLength = 20;
NewOp->Asl.Value.String = ACPI_CAST_PTR (char, Buffer);
NewOp->Asl.Parent = Op->Asl.Parent;
NewOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
NewOp->Asl.AmlLength = 20;
NewOp->Asl.Value.String = ACPI_CAST_PTR (char, Buffer);
NewOp->Asl.Parent = Op->Asl.Parent;
Op->Asl.Next = NewOp;
}
@@ -1398,9 +1401,9 @@ OpcDoUuId (
NewOp = TrAllocateNode (PARSEOP_INTEGER);
NewOp->Asl.AmlOpcode = AML_BYTE_OP;
NewOp->Asl.AmlOpcode = AML_BYTE_OP;
NewOp->Asl.Value.Integer = 16;
NewOp->Asl.Parent = Op;
NewOp->Asl.Parent = Op;
Op->Asl.Child = NewOp;
Op = NewOp;
@@ -1408,10 +1411,10 @@ OpcDoUuId (
/* Peer to the child is the raw buffer data */
NewOp = TrAllocateNode (PARSEOP_RAW_DATA);
NewOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
NewOp->Asl.AmlLength = 16;
NewOp->Asl.Value.String = ACPI_CAST_PTR (char, Buffer);
NewOp->Asl.Parent = Op->Asl.Parent;
NewOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
NewOp->Asl.AmlLength = 16;
NewOp->Asl.Value.String = ACPI_CAST_PTR (char, Buffer);
NewOp->Asl.Parent = Op->Asl.Parent;
Op->Asl.Next = NewOp;
}
+24 -21
View File
@@ -188,14 +188,16 @@ OpnDoMethod (
{
AslError (ASL_ERROR, ASL_MSG_SYNC_LEVEL, Next, NULL);
}
Concurrency = (UINT8) Next->Asl.Value.Integer;
}
/* Put the bits in their proper places */
MethodFlags = (UINT8) ((NumArgs & 0x7) |
((Serialized & 0x1) << 3) |
((Concurrency & 0xF) << 4));
MethodFlags = (UINT8)
((NumArgs & 0x7) |
((Serialized & 0x1) << 3) |
((Concurrency & 0xF) << 4));
/* Use the last node for the combined flags byte */
@@ -272,9 +274,9 @@ OpnDoFieldCommon (
/* Set the node to RAW_DATA */
Next->Asl.Value.Integer = FieldFlags;
Next->Asl.AmlOpcode = AML_RAW_DATA_BYTE;
Next->Asl.AmlLength = 1;
Next->Asl.ParseOpcode = PARSEOP_RAW_DATA;
Next->Asl.AmlOpcode = AML_RAW_DATA_BYTE;
Next->Asl.AmlLength = 1;
Next->Asl.ParseOpcode = PARSEOP_RAW_DATA;
/* Process the FieldUnitList */
@@ -345,8 +347,8 @@ OpnDoFieldCommon (
/* Named or reserved field entry */
PkgLengthNode = Next->Asl.Child;
NewBitOffset = (UINT32) PkgLengthNode->Asl.Value.Integer;
PkgLengthNode = Next->Asl.Child;
NewBitOffset = (UINT32) PkgLengthNode->Asl.Value.Integer;
CurrentBitOffset += NewBitOffset;
/* Save the current AccessAs value for error checking later */
@@ -601,9 +603,9 @@ OpnDoBuffer (
{
/* For buffers, this is a list of raw bytes */
InitializerOp->Asl.AmlOpcode = AML_RAW_DATA_BYTE;
InitializerOp->Asl.AmlLength = 1;
InitializerOp->Asl.ParseOpcode = PARSEOP_RAW_DATA;
InitializerOp->Asl.AmlOpcode = AML_RAW_DATA_BYTE;
InitializerOp->Asl.AmlLength = 1;
InitializerOp->Asl.ParseOpcode = PARSEOP_RAW_DATA;
BufferLength++;
InitializerOp = ASL_GET_PEER_NODE (InitializerOp);
@@ -618,9 +620,9 @@ OpnDoBuffer (
*/
BufferLength = strlen (InitializerOp->Asl.Value.String) + 1;
InitializerOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
InitializerOp->Asl.AmlLength = BufferLength;
InitializerOp->Asl.ParseOpcode = PARSEOP_RAW_DATA;
InitializerOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
InitializerOp->Asl.AmlLength = BufferLength;
InitializerOp->Asl.ParseOpcode = PARSEOP_RAW_DATA;
break;
case PARSEOP_RAW_DATA:
@@ -636,7 +638,7 @@ OpnDoBuffer (
AslError (ASL_ERROR, ASL_MSG_INVALID_OPERAND, InitializerOp,
"Unknown buffer initializer opcode");
printf ("Unknown buffer initializer opcode [%s]\n",
UtGetOpName (InitializerOp->Asl.ParseOpcode));
UtGetOpName (InitializerOp->Asl.ParseOpcode));
return;
}
@@ -660,8 +662,8 @@ OpnDoBuffer (
* Just set the buffer size node to be the buffer length, regardless
* of whether it was previously an integer or a default_arg placeholder
*/
BufferLengthOp->Asl.ParseOpcode = PARSEOP_INTEGER;
BufferLengthOp->Asl.AmlOpcode = AML_DWORD_OP;
BufferLengthOp->Asl.ParseOpcode = PARSEOP_INTEGER;
BufferLengthOp->Asl.AmlOpcode = AML_DWORD_OP;
BufferLengthOp->Asl.Value.Integer = BufferLength;
(void) OpcSetOptimalIntegerSize (BufferLengthOp);
@@ -839,9 +841,9 @@ OpnDoLoadTable (
Next = Next->Asl.Next;
if (Next->Asl.ParseOpcode == PARSEOP_ZERO)
{
Next->Asl.ParseOpcode = PARSEOP_STRING_LITERAL;
Next->Asl.Value.String = "\\";
Next->Asl.AmlLength = 2;
Next->Asl.ParseOpcode = PARSEOP_STRING_LITERAL;
Next->Asl.Value.String = "\\";
Next->Asl.AmlLength = 2;
OpcGenerateAmlOpcode (Next);
}
@@ -923,6 +925,7 @@ OpnDoDefinitionBlock (
Gbl_OutputFilenamePrefix = Filename;
UtConvertBackslashes (Gbl_OutputFilenamePrefix);
}
Child->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
/* Signature */
@@ -1131,7 +1134,7 @@ OpnGenerateAmlOperands (
switch (Op->Asl.ParseOpcode)
{
case PARSEOP_DEFINITIONBLOCK:
case PARSEOP_DEFINITION_BLOCK:
OpnDoDefinitionBlock (Op);
break;
+24 -21
View File
@@ -53,7 +53,7 @@
ACPI_MODULE_NAME ("aslopt")
static UINT32 OptTotal = 0;
static UINT32 OptTotal = 0;
/* Local prototypes */
@@ -132,15 +132,15 @@ OptSearchToRoot (
* name in the search path before the one we want, the nodes will
* not match, and we cannot use this optimization.
*/
Path = &(((char *) TargetPath->Pointer)[TargetPath->Length -
ACPI_NAME_SIZE]),
Path = &(((char *) TargetPath->Pointer)[
TargetPath->Length - ACPI_NAME_SIZE]),
ScopeInfo.Scope.Node = CurrentNode;
/* Lookup the NameSeg using SEARCH_PARENT (search-to-root) */
Status = AcpiNsLookup (&ScopeInfo, Path, ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
WalkState, &(Node));
ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
WalkState, &(Node));
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -172,8 +172,8 @@ OptSearchToRoot (
if (strncmp (*NewPath, "_T_", 3))
{
AslError (ASL_OPTIMIZATION, ASL_MSG_SINGLE_NAME_OPTIMIZATION, Op,
*NewPath);
AslError (ASL_OPTIMIZATION, ASL_MSG_SINGLE_NAME_OPTIMIZATION,
Op, *NewPath);
}
return (AE_OK);
@@ -292,7 +292,7 @@ OptBuildShortestPath (
/* Determine how many prefix Carats are required */
NumCarats = (CurrentPath->Length / ACPI_PATH_SEGMENT_LENGTH) -
NumCommonSegments;
NumCommonSegments;
/*
* Construct a new target string
@@ -373,8 +373,8 @@ OptBuildShortestPath (
* path that has been created.
*/
Status = AcpiNsLookup (&ScopeInfo, NewPath,
ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
ACPI_NS_DONT_OPEN_SCOPE, WalkState, &(Node));
ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
ACPI_NS_DONT_OPEN_SCOPE, WalkState, &(Node));
if (ACPI_SUCCESS (Status))
{
/* Found the namepath, but make sure the node is correct */
@@ -446,7 +446,7 @@ OptOptimizeNameDeclaration (
if (((CurrentNode == AcpiGbl_RootNode) ||
(Op->Common.Parent->Asl.ParseOpcode == PARSEOP_DEFINITIONBLOCK)) &&
(Op->Common.Parent->Asl.ParseOpcode == PARSEOP_DEFINITION_BLOCK)) &&
(ACPI_IS_ROOT_PREFIX (AmlNameString[0])))
{
/*
@@ -458,7 +458,7 @@ OptOptimizeNameDeclaration (
/* Debug output */
Status = AcpiNsExternalizeName (ACPI_UINT32_MAX, *NewPath,
NULL, &NewPathExternal);
NULL, &NewPathExternal);
if (ACPI_FAILURE (Status))
{
AslCoreSubsystemError (Op, Status, "Externalizing NamePath",
@@ -474,8 +474,8 @@ OptOptimizeNameDeclaration (
* We know that we are at the root, so NULL is used for the scope.
*/
Status = AcpiNsLookup (NULL, *NewPath,
ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
ACPI_NS_DONT_OPEN_SCOPE, WalkState, &(Node));
ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
ACPI_NS_DONT_OPEN_SCOPE, WalkState, &(Node));
if (ACPI_SUCCESS (Status))
{
/* Found the namepath, but make sure the node is correct */
@@ -633,6 +633,7 @@ OptOptimizeNamePath (
{
NextOp = NextOp->Asl.Parent;
}
if (NextOp && NextOp->Asl.Node)
{
CurrentNode = NextOp->Asl.Node;
@@ -662,6 +663,7 @@ OptOptimizeNamePath (
ASL_NO_ABORT);
return_VOID;
}
TargetPath.Length--; /* Subtract one for null terminator */
/* CurrentPath is the path to this scope (where we are in the namespace) */
@@ -674,12 +676,13 @@ OptOptimizeNamePath (
ASL_NO_ABORT);
return_VOID;
}
CurrentPath.Length--; /* Subtract one for null terminator */
/* Debug output only */
Status = AcpiNsExternalizeName (ACPI_UINT32_MAX, AmlNameString,
NULL, &ExternalNameString);
NULL, &ExternalNameString);
if (ACPI_FAILURE (Status))
{
AslCoreSubsystemError (Op, Status, "Externalizing NamePath",
@@ -705,7 +708,7 @@ OptOptimizeNamePath (
* a reference.
*/
Status = OptOptimizeNameDeclaration (Op, WalkState, CurrentNode,
TargetNode, AmlNameString, &NewPath);
TargetNode, AmlNameString, &NewPath);
if (ACPI_FAILURE (Status))
{
/*
@@ -713,8 +716,8 @@ OptOptimizeNamePath (
* optimize the namestring with carats (up-arrow)
*/
Status = OptBuildShortestPath (Op, WalkState, CurrentNode,
TargetNode, &CurrentPath, &TargetPath,
AmlNameStringLength, 1, &NewPath);
TargetNode, &CurrentPath, &TargetPath,
AmlNameStringLength, 1, &NewPath);
}
}
else
@@ -726,7 +729,7 @@ OptOptimizeNamePath (
* NameSeg of the NamePath
*/
Status = OptSearchToRoot (Op, WalkState, CurrentNode,
TargetNode, &TargetPath, &NewPath);
TargetNode, &TargetPath, &NewPath);
if (ACPI_FAILURE (Status))
{
/*
@@ -734,8 +737,8 @@ OptOptimizeNamePath (
* optimize the namestring with carats (up-arrow)
*/
Status = OptBuildShortestPath (Op, WalkState, CurrentNode,
TargetNode, &CurrentPath, &TargetPath,
AmlNameStringLength, 0, &NewPath);
TargetNode, &CurrentPath, &TargetPath,
AmlNameStringLength, 0, &NewPath);
}
}
+2 -1
View File
@@ -331,7 +331,8 @@ AslDoOptions (
Status = AcpiDmAddToExternalFileList (argv[AcpiGbl_Optind]);
if (ACPI_FAILURE (Status))
{
printf ("Could not add %s to external list\n", argv[AcpiGbl_Optind]);
printf ("Could not add %s to external list\n",
argv[AcpiGbl_Optind]);
return (-1);
}
+5 -4
View File
@@ -259,7 +259,7 @@ ApCheckPredefinedReturnValue (
*/
Gbl_AllExceptionsDisabled = TRUE;
Index = ApCheckForPredefinedName (MethodInfo->Op,
MethodInfo->Op->Asl.NameSeg);
MethodInfo->Op->Asl.NameSeg);
Gbl_AllExceptionsDisabled = FALSE;
switch (Index)
@@ -571,7 +571,8 @@ ApCheckForSpecialName (
* warning and force the user to manually change the names. So, we
* will issue a remark instead.
*/
AslError (ASL_REMARK, ASL_MSG_COMPILER_RESERVED, Op, Op->Asl.ExternalName);
AslError (ASL_REMARK, ASL_MSG_COMPILER_RESERVED,
Op, Op->Asl.ExternalName);
return (ACPI_COMPILER_RESERVED_NAME);
}
@@ -580,8 +581,8 @@ ApCheckForSpecialName (
* warning, since the entire namespace starting with an underscore is
* reserved by the ACPI spec.
*/
AslError (ASL_WARNING, ASL_MSG_UNKNOWN_RESERVED_NAME, Op,
Op->Asl.ExternalName);
AslError (ASL_WARNING, ASL_MSG_UNKNOWN_RESERVED_NAME,
Op, Op->Asl.ExternalName);
return (ACPI_NOT_RESERVED_NAME);
}
+1
View File
@@ -238,6 +238,7 @@ ApCheckPackage (
ApCheckObjectType (Predefined->Info.Name, Op,
Package->RetInfo3.TailObjectType, i);
}
Op = Op->Asl.Next;
}
break;
+2
View File
@@ -63,6 +63,8 @@ PrPrintObjectAtLevel (
const char *ObjectName);
/* Structure used for the pruning parse tree walk */
typedef struct acpi_prune_info
{
UINT32 PruneLevel;
+4 -4
View File
@@ -396,6 +396,7 @@ RsGetStringDataLength (
{
return ((UINT16) (strlen (InitializerOp->Asl.Value.String) + 1));
}
InitializerOp = ASL_GET_PEER_NODE (InitializerOp);
}
@@ -431,7 +432,6 @@ RsAllocateResourceNode (
Rnode->Buffer = UtLocalCalloc (Size);
Rnode->BufferLength = Size;
return (Rnode);
}
@@ -467,7 +467,6 @@ RsCreateResourceField (
Op->Asl.ExternalName = Name;
Op->Asl.CompileFlags |= NODE_IS_RESOURCE_FIELD;
Op->Asl.Value.Tag.BitOffset = (ByteOffset * 8) + BitOffset;
Op->Asl.Value.Tag.BitLength = BitLength;
}
@@ -888,7 +887,7 @@ RsDoOneResourceDescriptor (
default:
printf ("Unknown resource descriptor type [%s]\n",
Info->DescriptorTypeOp->Asl.ParseOpName);
Info->DescriptorTypeOp->Asl.ParseOpName);
break;
}
@@ -904,7 +903,8 @@ RsDoOneResourceDescriptor (
if (Rnode)
{
Info->DescriptorTypeOp->Asl.FinalAmlLength = Rnode->BufferLength;
Info->DescriptorTypeOp->Asl.Extra = ((AML_RESOURCE *) Rnode->Buffer)->DescriptorType;
Info->DescriptorTypeOp->Asl.Extra =
((AML_RESOURCE *) Rnode->Buffer)->DescriptorType;
}
return (Rnode);
+12 -13
View File
@@ -86,7 +86,6 @@ RsDoEndTagDescriptor (
Descriptor->EndTag.DescriptorType = ACPI_RESOURCE_NAME_END_TAG |
ASL_RDESC_END_TAG_SIZE;
Descriptor->EndTag.Checksum = 0;
return (Rnode);
}
@@ -114,8 +113,8 @@ RsDoEndDependentDescriptor (
Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_END_DEPENDENT));
Descriptor = Rnode->Buffer;
Descriptor->EndDpf.DescriptorType = ACPI_RESOURCE_NAME_END_DEPENDENT |
ASL_RDESC_END_DEPEND_SIZE;
Descriptor->EndDpf.DescriptorType =
ACPI_RESOURCE_NAME_END_DEPENDENT | ASL_RDESC_END_DEPEND_SIZE;
return (Rnode);
}
@@ -151,7 +150,7 @@ RsDoMemory24Descriptor (
Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_MEMORY24));
Descriptor = Rnode->Buffer;
Descriptor->Memory24.DescriptorType = ACPI_RESOURCE_NAME_MEMORY24;
Descriptor->Memory24.DescriptorType = ACPI_RESOURCE_NAME_MEMORY24;
Descriptor->Memory24.ResourceLength = 9;
/* Process all child initialization nodes */
@@ -257,7 +256,7 @@ RsDoMemory32Descriptor (
Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_MEMORY32));
Descriptor = Rnode->Buffer;
Descriptor->Memory32.DescriptorType = ACPI_RESOURCE_NAME_MEMORY32;
Descriptor->Memory32.DescriptorType = ACPI_RESOURCE_NAME_MEMORY32;
Descriptor->Memory32.ResourceLength = 17;
/* Process all child initialization nodes */
@@ -360,7 +359,7 @@ RsDoMemory32FixedDescriptor (
Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_FIXED_MEMORY32));
Descriptor = Rnode->Buffer;
Descriptor->FixedMemory32.DescriptorType = ACPI_RESOURCE_NAME_FIXED_MEMORY32;
Descriptor->FixedMemory32.DescriptorType = ACPI_RESOURCE_NAME_FIXED_MEMORY32;
Descriptor->FixedMemory32.ResourceLength = 9;
/* Process all child initialization nodes */
@@ -448,8 +447,8 @@ RsDoStartDependentDescriptor (
/* Descriptor has priority byte */
Descriptor->StartDpf.DescriptorType = ACPI_RESOURCE_NAME_START_DEPENDENT |
(ASL_RDESC_ST_DEPEND_SIZE + 0x01);
Descriptor->StartDpf.DescriptorType =
ACPI_RESOURCE_NAME_START_DEPENDENT | (ASL_RDESC_ST_DEPEND_SIZE + 0x01);
/* Process all child initialization nodes */
@@ -493,8 +492,8 @@ RsDoStartDependentDescriptor (
* must keep track of the offset of not only each descriptor, but each
* element (field) within each descriptor as well.
*/
CurrentByteOffset += RsLinkDescriptorChain (&PreviousRnode,
NextRnode);
CurrentByteOffset += RsLinkDescriptorChain (
&PreviousRnode, NextRnode);
break;
}
@@ -536,8 +535,8 @@ RsDoStartDependentNoPriDescriptor (
Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_START_DEPENDENT_NOPRIO));
Descriptor = Rnode->Buffer;
Descriptor->StartDpf.DescriptorType = ACPI_RESOURCE_NAME_START_DEPENDENT |
ASL_RDESC_ST_DEPEND_SIZE;
Descriptor->StartDpf.DescriptorType =
ACPI_RESOURCE_NAME_START_DEPENDENT | ASL_RDESC_ST_DEPEND_SIZE;
PreviousRnode = Rnode;
/* Increment offset past StartDependentNoPri descriptor */
@@ -599,7 +598,7 @@ RsDoVendorSmallDescriptor (
Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_VENDOR_SMALL) + 7);
Descriptor = Rnode->Buffer;
Descriptor->VendorSmall.DescriptorType = ACPI_RESOURCE_NAME_VENDOR_SMALL;
Descriptor->VendorSmall.DescriptorType = ACPI_RESOURCE_NAME_VENDOR_SMALL;
VendorData = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_SMALL_HEADER);
/* Process all child initialization nodes */
+10 -10
View File
@@ -88,8 +88,8 @@ RsDoDmaDescriptor (
Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_DMA));
Descriptor = Rnode->Buffer;
Descriptor->Dma.DescriptorType = ACPI_RESOURCE_NAME_DMA |
ASL_RDESC_DMA_SIZE;
Descriptor->Dma.DescriptorType =
ACPI_RESOURCE_NAME_DMA | ASL_RDESC_DMA_SIZE;
/* Process all child initialization nodes */
@@ -282,8 +282,8 @@ RsDoFixedIoDescriptor (
Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_FIXED_IO));
Descriptor = Rnode->Buffer;
Descriptor->Io.DescriptorType = ACPI_RESOURCE_NAME_FIXED_IO |
ASL_RDESC_FIXED_IO_SIZE;
Descriptor->Io.DescriptorType =
ACPI_RESOURCE_NAME_FIXED_IO | ASL_RDESC_FIXED_IO_SIZE;
/* Process all child initialization nodes */
@@ -365,8 +365,8 @@ RsDoIoDescriptor (
Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_IO));
Descriptor = Rnode->Buffer;
Descriptor->Io.DescriptorType = ACPI_RESOURCE_NAME_IO |
ASL_RDESC_IO_SIZE;
Descriptor->Io.DescriptorType =
ACPI_RESOURCE_NAME_IO | ASL_RDESC_IO_SIZE;
/* Process all child initialization nodes */
@@ -476,8 +476,8 @@ RsDoIrqDescriptor (
/* Length = 3 (with flag byte) */
Descriptor = Rnode->Buffer;
Descriptor->Irq.DescriptorType = ACPI_RESOURCE_NAME_IRQ |
(ASL_RDESC_IRQ_SIZE + 0x01);
Descriptor->Irq.DescriptorType =
ACPI_RESOURCE_NAME_IRQ | (ASL_RDESC_IRQ_SIZE + 0x01);
/* Process all child initialization nodes */
@@ -596,8 +596,8 @@ RsDoIrqNoFlagsDescriptor (
Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_IRQ_NOFLAGS));
Descriptor = Rnode->Buffer;
Descriptor->Irq.DescriptorType = ACPI_RESOURCE_NAME_IRQ |
ASL_RDESC_IRQ_SIZE;
Descriptor->Irq.DescriptorType =
ACPI_RESOURCE_NAME_IRQ | ASL_RDESC_IRQ_SIZE;
/* Process all child initialization nodes */
+8 -6
View File
@@ -147,6 +147,7 @@ RsDoGeneralRegisterDescriptor (
InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
}
return (Rnode);
}
@@ -213,7 +214,7 @@ RsDoInterruptDescriptor (
1 + OptionIndex + StringLength);
Descriptor = Rnode->Buffer;
Descriptor->ExtendedIrq.DescriptorType = ACPI_RESOURCE_NAME_EXTENDED_IRQ;
Descriptor->ExtendedIrq.DescriptorType = ACPI_RESOURCE_NAME_EXTENDED_IRQ;
/*
* Initial descriptor length -- may be enlarged if there are
@@ -223,7 +224,7 @@ RsDoInterruptDescriptor (
Descriptor->ExtendedIrq.InterruptCount = 0;
Rover = ACPI_CAST_PTR (AML_RESOURCE,
(&(Descriptor->ExtendedIrq.Interrupts[0])));
(&(Descriptor->ExtendedIrq.Interrupts[0])));
/* Process all child initialization nodes */
@@ -382,9 +383,10 @@ RsDoInterruptDescriptor (
(Descriptor->ExtendedIrq.ResourceLength + StringLength);
}
Rnode->BufferLength = (ASL_RESDESC_OFFSET (ExtendedIrq.Interrupts[0]) -
ASL_RESDESC_OFFSET (ExtendedIrq.DescriptorType))
+ OptionIndex + StringLength;
Rnode->BufferLength =
(ASL_RESDESC_OFFSET (ExtendedIrq.Interrupts[0]) -
ASL_RESDESC_OFFSET (ExtendedIrq.DescriptorType))
+ OptionIndex + StringLength;
return (Rnode);
}
@@ -431,7 +433,7 @@ RsDoVendorLargeDescriptor (
Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_VENDOR_LARGE) + i);
Descriptor = Rnode->Buffer;
Descriptor->VendorLarge.DescriptorType = ACPI_RESOURCE_NAME_VENDOR_LARGE;
Descriptor->VendorLarge.DescriptorType = ACPI_RESOURCE_NAME_VENDOR_LARGE;
Descriptor->VendorLarge.ResourceLength = (UINT16) i;
/* Point to end-of-descriptor for vendor data */
+4 -4
View File
@@ -91,11 +91,11 @@ RsDoDwordIoDescriptor (
CurrentByteOffset = Info->CurrentByteOffset;
Rnode = RsAllocateResourceNode (
sizeof (AML_RESOURCE_ADDRESS32) + 1 + StringLength);
sizeof (AML_RESOURCE_ADDRESS32) + 1 + StringLength);
Descriptor = Rnode->Buffer;
Descriptor->Address32.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS32;
Descriptor->Address32.ResourceType = ACPI_ADDRESS_TYPE_IO_RANGE;
Descriptor->Address32.ResourceType = ACPI_ADDRESS_TYPE_IO_RANGE;
/*
* Initial descriptor length -- may be enlarged if there are
@@ -325,7 +325,7 @@ RsDoDwordMemoryDescriptor (
Descriptor = Rnode->Buffer;
Descriptor->Address32.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS32;
Descriptor->Address32.ResourceType = ACPI_ADDRESS_TYPE_MEMORY_RANGE;
Descriptor->Address32.ResourceType = ACPI_ADDRESS_TYPE_MEMORY_RANGE;
/*
* Initial descriptor length -- may be enlarged if there are
@@ -556,7 +556,7 @@ RsDoDwordSpaceDescriptor (
CurrentByteOffset = Info->CurrentByteOffset;
Rnode = RsAllocateResourceNode (
sizeof (AML_RESOURCE_ADDRESS32) + 1 + StringLength);
sizeof (AML_RESOURCE_ADDRESS32) + 1 + StringLength);
Descriptor = Rnode->Buffer;
Descriptor->Address32.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS32;
+13 -13
View File
@@ -87,14 +87,14 @@ RsDoExtendedIoDescriptor (
CurrentByteOffset = Info->CurrentByteOffset;
Rnode = RsAllocateResourceNode (
sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + 1 + StringLength);
sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + 1 + StringLength);
Descriptor = Rnode->Buffer;
Descriptor->ExtAddress64.DescriptorType = ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64;
Descriptor->ExtAddress64.ResourceType = ACPI_ADDRESS_TYPE_IO_RANGE;
Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
Descriptor->ExtAddress64.DescriptorType = ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64;
Descriptor->ExtAddress64.ResourceType = ACPI_ADDRESS_TYPE_IO_RANGE;
Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
Descriptor->ExtAddress64.ResourceLength = (UINT16)
Descriptor->ExtAddress64.ResourceLength = (UINT16)
(sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
sizeof (AML_RESOURCE_LARGE_HEADER));
@@ -263,11 +263,11 @@ RsDoExtendedMemoryDescriptor (
sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + 1 + StringLength);
Descriptor = Rnode->Buffer;
Descriptor->ExtAddress64.DescriptorType = ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64;
Descriptor->ExtAddress64.ResourceType = ACPI_ADDRESS_TYPE_MEMORY_RANGE;
Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
Descriptor->ExtAddress64.DescriptorType = ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64;
Descriptor->ExtAddress64.ResourceType = ACPI_ADDRESS_TYPE_MEMORY_RANGE;
Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
Descriptor->ExtAddress64.ResourceLength = (UINT16)
Descriptor->ExtAddress64.ResourceLength = (UINT16)
(sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
sizeof (AML_RESOURCE_LARGE_HEADER));
@@ -441,13 +441,13 @@ RsDoExtendedSpaceDescriptor (
CurrentByteOffset = Info->CurrentByteOffset;
Rnode = RsAllocateResourceNode (
sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + 1 + StringLength);
sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + 1 + StringLength);
Descriptor = Rnode->Buffer;
Descriptor->ExtAddress64.DescriptorType = ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64;
Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
Descriptor->ExtAddress64.DescriptorType = ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64;
Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
Descriptor->ExtAddress64.ResourceLength = (UINT16)
Descriptor->ExtAddress64.ResourceLength = (UINT16)
(sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
sizeof (AML_RESOURCE_LARGE_HEADER));
+7 -7
View File
@@ -91,11 +91,11 @@ RsDoQwordIoDescriptor (
CurrentByteOffset = Info->CurrentByteOffset;
Rnode = RsAllocateResourceNode (
sizeof (AML_RESOURCE_ADDRESS64) + 1 + StringLength);
sizeof (AML_RESOURCE_ADDRESS64) + 1 + StringLength);
Descriptor = Rnode->Buffer;
Descriptor->Address64.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS64;
Descriptor->Address64.ResourceType = ACPI_ADDRESS_TYPE_IO_RANGE;
Descriptor->Address64.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS64;
Descriptor->Address64.ResourceType = ACPI_ADDRESS_TYPE_IO_RANGE;
/*
* Initial descriptor length -- may be enlarged if there are
@@ -312,11 +312,11 @@ RsDoQwordMemoryDescriptor (
CurrentByteOffset = Info->CurrentByteOffset;
Rnode = RsAllocateResourceNode (
sizeof (AML_RESOURCE_ADDRESS64) + 1 + StringLength);
sizeof (AML_RESOURCE_ADDRESS64) + 1 + StringLength);
Descriptor = Rnode->Buffer;
Descriptor->Address64.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS64;
Descriptor->Address64.ResourceType = ACPI_ADDRESS_TYPE_MEMORY_RANGE;
Descriptor->Address64.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS64;
Descriptor->Address64.ResourceType = ACPI_ADDRESS_TYPE_MEMORY_RANGE;
/*
* Initial descriptor length -- may be enlarged if there are
@@ -541,7 +541,7 @@ RsDoQwordSpaceDescriptor (
CurrentByteOffset = Info->CurrentByteOffset;
Rnode = RsAllocateResourceNode (
sizeof (AML_RESOURCE_ADDRESS64) + 1 + StringLength);
sizeof (AML_RESOURCE_ADDRESS64) + 1 + StringLength);
Descriptor = Rnode->Buffer;
Descriptor->Address64.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS64;
+56 -36
View File
@@ -313,17 +313,19 @@ RsDoGpioIntDescriptor (
/* Allocate the local resource node and initialize */
Rnode = RsAllocateResourceNode (DescriptorSize + sizeof (AML_RESOURCE_LARGE_HEADER));
Rnode = RsAllocateResourceNode (DescriptorSize +
sizeof (AML_RESOURCE_LARGE_HEADER));
Descriptor = Rnode->Buffer;
Descriptor->Gpio.ResourceLength = DescriptorSize;
Descriptor->Gpio.DescriptorType = ACPI_RESOURCE_NAME_GPIO;
Descriptor->Gpio.RevisionId = AML_RESOURCE_GPIO_REVISION;
Descriptor->Gpio.ConnectionType = AML_RESOURCE_GPIO_TYPE_INT;
Descriptor->Gpio.ResourceLength = DescriptorSize;
Descriptor->Gpio.DescriptorType = ACPI_RESOURCE_NAME_GPIO;
Descriptor->Gpio.RevisionId = AML_RESOURCE_GPIO_REVISION;
Descriptor->Gpio.ConnectionType = AML_RESOURCE_GPIO_TYPE_INT;
/* Build pointers to optional areas */
InterruptList = ACPI_ADD_PTR (UINT16, Descriptor, sizeof (AML_RESOURCE_GPIO));
InterruptList = ACPI_ADD_PTR (UINT16, Descriptor,
sizeof (AML_RESOURCE_GPIO));
PinList = InterruptList;
ResourceSource = ACPI_ADD_PTR (char, InterruptList, InterruptLength);
VendorData = ACPI_ADD_PTR (UINT8, ResourceSource, ResSourceLength);
@@ -337,8 +339,10 @@ RsDoGpioIntDescriptor (
ACPI_PTR_DIFF (ResourceSource, Descriptor);
DbgPrint (ASL_DEBUG_OUTPUT,
"%16s - Actual: %.2X, Base: %.2X, ResLen: %.2X, VendLen: %.2X, IntLen: %.2X\n",
"GpioInt", Descriptor->Gpio.ResourceLength, (UINT16) sizeof (AML_RESOURCE_GPIO),
"%16s - Actual: %.2X, Base: %.2X, ResLen: "
"%.2X, VendLen: %.2X, IntLen: %.2X\n",
"GpioInt", Descriptor->Gpio.ResourceLength,
(UINT16) sizeof (AML_RESOURCE_GPIO),
ResSourceLength, VendorLength, InterruptLength);
/* Process all child initialization nodes */
@@ -397,7 +401,8 @@ RsDoGpioIntDescriptor (
if (InitializerOp->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG)
{
Descriptor->Gpio.ResSourceIndex = (UINT8) InitializerOp->Asl.Value.Integer;
Descriptor->Gpio.ResSourceIndex =
(UINT8) InitializerOp->Asl.Value.Integer;
}
break;
@@ -422,7 +427,7 @@ RsDoGpioIntDescriptor (
ACPI_PTR_DIFF (VendorData, Descriptor);
if (RsGetVendorData (InitializerOp, VendorData,
(CurrentByteOffset + Descriptor->Gpio.VendorOffset)))
(CurrentByteOffset + Descriptor->Gpio.VendorOffset)))
{
Descriptor->Gpio.VendorLength = VendorLength;
}
@@ -468,7 +473,8 @@ RsDoGpioIntDescriptor (
InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
}
MpSaveGpioInfo (Info->MappingOp, Descriptor, PinCount, PinList, ResourceSource);
MpSaveGpioInfo (Info->MappingOp, Descriptor,
PinCount, PinList, ResourceSource);
return (Rnode);
}
@@ -524,13 +530,14 @@ RsDoGpioIoDescriptor (
/* Allocate the local resource node and initialize */
Rnode = RsAllocateResourceNode (DescriptorSize + sizeof (AML_RESOURCE_LARGE_HEADER));
Rnode = RsAllocateResourceNode (DescriptorSize +
sizeof (AML_RESOURCE_LARGE_HEADER));
Descriptor = Rnode->Buffer;
Descriptor->Gpio.ResourceLength = DescriptorSize;
Descriptor->Gpio.DescriptorType = ACPI_RESOURCE_NAME_GPIO;
Descriptor->Gpio.RevisionId = AML_RESOURCE_GPIO_REVISION;
Descriptor->Gpio.ConnectionType = AML_RESOURCE_GPIO_TYPE_IO;
Descriptor->Gpio.ResourceLength = DescriptorSize;
Descriptor->Gpio.DescriptorType = ACPI_RESOURCE_NAME_GPIO;
Descriptor->Gpio.RevisionId = AML_RESOURCE_GPIO_REVISION;
Descriptor->Gpio.ConnectionType = AML_RESOURCE_GPIO_TYPE_IO;
/* Build pointers to optional areas */
@@ -548,8 +555,10 @@ RsDoGpioIoDescriptor (
ACPI_PTR_DIFF (ResourceSource, Descriptor);
DbgPrint (ASL_DEBUG_OUTPUT,
"%16s - Actual: %.2X, Base: %.2X, ResLen: %.2X, VendLen: %.2X, IntLen: %.2X\n",
"GpioIo", Descriptor->Gpio.ResourceLength, (UINT16) sizeof (AML_RESOURCE_GPIO),
"%16s - Actual: %.2X, Base: %.2X, ResLen: "
"%.2X, VendLen: %.2X, IntLen: %.2X\n",
"GpioIo", Descriptor->Gpio.ResourceLength,
(UINT16) sizeof (AML_RESOURCE_GPIO),
ResSourceLength, VendorLength, InterruptLength);
/* Process all child initialization nodes */
@@ -632,7 +641,7 @@ RsDoGpioIoDescriptor (
ACPI_PTR_DIFF (VendorData, Descriptor);
if (RsGetVendorData (InitializerOp, VendorData,
(CurrentByteOffset + Descriptor->Gpio.VendorOffset)))
(CurrentByteOffset + Descriptor->Gpio.VendorOffset)))
{
Descriptor->Gpio.VendorLength = VendorLength;
}
@@ -678,7 +687,8 @@ RsDoGpioIoDescriptor (
InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
}
MpSaveGpioInfo (Info->MappingOp, Descriptor, PinCount, PinList, ResourceSource);
MpSaveGpioInfo (Info->MappingOp, Descriptor,
PinCount, PinList, ResourceSource);
return (Rnode);
}
@@ -727,14 +737,15 @@ RsDoI2cSerialBusDescriptor (
/* Allocate the local resource node and initialize */
Rnode = RsAllocateResourceNode (DescriptorSize + sizeof (AML_RESOURCE_LARGE_HEADER));
Rnode = RsAllocateResourceNode (DescriptorSize +
sizeof (AML_RESOURCE_LARGE_HEADER));
Descriptor = Rnode->Buffer;
Descriptor->I2cSerialBus.ResourceLength = DescriptorSize;
Descriptor->I2cSerialBus.DescriptorType = ACPI_RESOURCE_NAME_SERIAL_BUS;
Descriptor->I2cSerialBus.RevisionId = AML_RESOURCE_I2C_REVISION;
Descriptor->I2cSerialBus.RevisionId = AML_RESOURCE_I2C_REVISION;
Descriptor->I2cSerialBus.TypeRevisionId = AML_RESOURCE_I2C_TYPE_REVISION;
Descriptor->I2cSerialBus.Type = AML_RESOURCE_I2C_SERIALBUSTYPE;
Descriptor->I2cSerialBus.Type = AML_RESOURCE_I2C_SERIALBUSTYPE;
Descriptor->I2cSerialBus.TypeDataLength = AML_RESOURCE_I2C_MIN_DATA_LEN + VendorLength;
/* Build pointers to optional areas */
@@ -743,7 +754,8 @@ RsDoI2cSerialBusDescriptor (
ResourceSource = ACPI_ADD_PTR (char, VendorData, VendorLength);
DbgPrint (ASL_DEBUG_OUTPUT,
"%16s - Actual: %.2X, Base: %.2X, ResLen: %.2X, VendLen: %.2X, TypLen: %.2X\n",
"%16s - Actual: %.2X, Base: %.2X, ResLen: "
"%.2X, VendLen: %.2X, TypLen: %.2X\n",
"I2cSerialBus", Descriptor->I2cSerialBus.ResourceLength,
(UINT16) sizeof (AML_RESOURCE_I2C_SERIALBUS), ResSourceLength,
VendorLength, Descriptor->I2cSerialBus.TypeDataLength);
@@ -797,7 +809,8 @@ RsDoI2cSerialBusDescriptor (
if (InitializerOp->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG)
{
Descriptor->I2cSerialBus.ResSourceIndex = (UINT8) InitializerOp->Asl.Value.Integer;
Descriptor->I2cSerialBus.ResSourceIndex =
(UINT8) InitializerOp->Asl.Value.Integer;
}
break;
@@ -874,23 +887,26 @@ RsDoSpiSerialBusDescriptor (
/* Allocate the local resource node and initialize */
Rnode = RsAllocateResourceNode (DescriptorSize + sizeof (AML_RESOURCE_LARGE_HEADER));
Rnode = RsAllocateResourceNode (DescriptorSize +
sizeof (AML_RESOURCE_LARGE_HEADER));
Descriptor = Rnode->Buffer;
Descriptor->SpiSerialBus.ResourceLength = DescriptorSize;
Descriptor->SpiSerialBus.DescriptorType = ACPI_RESOURCE_NAME_SERIAL_BUS;
Descriptor->SpiSerialBus.RevisionId = AML_RESOURCE_SPI_REVISION;
Descriptor->SpiSerialBus.RevisionId = AML_RESOURCE_SPI_REVISION;
Descriptor->SpiSerialBus.TypeRevisionId = AML_RESOURCE_SPI_TYPE_REVISION;
Descriptor->SpiSerialBus.Type = AML_RESOURCE_SPI_SERIALBUSTYPE;
Descriptor->SpiSerialBus.Type = AML_RESOURCE_SPI_SERIALBUSTYPE;
Descriptor->SpiSerialBus.TypeDataLength = AML_RESOURCE_SPI_MIN_DATA_LEN + VendorLength;
/* Build pointers to optional areas */
VendorData = ACPI_ADD_PTR (UINT8, Descriptor, sizeof (AML_RESOURCE_SPI_SERIALBUS));
VendorData = ACPI_ADD_PTR (UINT8, Descriptor,
sizeof (AML_RESOURCE_SPI_SERIALBUS));
ResourceSource = ACPI_ADD_PTR (char, VendorData, VendorLength);
DbgPrint (ASL_DEBUG_OUTPUT,
"%16s - Actual: %.2X, Base: %.2X, ResLen: %.2X, VendLen: %.2X, TypLen: %.2X\n",
"%16s - Actual: %.2X, Base: %.2X, ResLen: "
"%.2X, VendLen: %.2X, TypLen: %.2X\n",
"SpiSerialBus", Descriptor->SpiSerialBus.ResourceLength,
(UINT16) sizeof (AML_RESOURCE_SPI_SERIALBUS), ResSourceLength,
VendorLength, Descriptor->SpiSerialBus.TypeDataLength);
@@ -972,7 +988,8 @@ RsDoSpiSerialBusDescriptor (
if (InitializerOp->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG)
{
Descriptor->SpiSerialBus.ResSourceIndex = (UINT8) InitializerOp->Asl.Value.Integer;
Descriptor->SpiSerialBus.ResSourceIndex =
(UINT8) InitializerOp->Asl.Value.Integer;
}
break;
@@ -1049,14 +1066,15 @@ RsDoUartSerialBusDescriptor (
/* Allocate the local resource node and initialize */
Rnode = RsAllocateResourceNode (DescriptorSize + sizeof (AML_RESOURCE_LARGE_HEADER));
Rnode = RsAllocateResourceNode (DescriptorSize +
sizeof (AML_RESOURCE_LARGE_HEADER));
Descriptor = Rnode->Buffer;
Descriptor->UartSerialBus.ResourceLength = DescriptorSize;
Descriptor->UartSerialBus.DescriptorType = ACPI_RESOURCE_NAME_SERIAL_BUS;
Descriptor->UartSerialBus.RevisionId = AML_RESOURCE_UART_REVISION;
Descriptor->UartSerialBus.RevisionId = AML_RESOURCE_UART_REVISION;
Descriptor->UartSerialBus.TypeRevisionId = AML_RESOURCE_UART_TYPE_REVISION;
Descriptor->UartSerialBus.Type = AML_RESOURCE_UART_SERIALBUSTYPE;
Descriptor->UartSerialBus.Type = AML_RESOURCE_UART_SERIALBUSTYPE;
Descriptor->UartSerialBus.TypeDataLength = AML_RESOURCE_UART_MIN_DATA_LEN + VendorLength;
/* Build pointers to optional areas */
@@ -1065,7 +1083,8 @@ RsDoUartSerialBusDescriptor (
ResourceSource = ACPI_ADD_PTR (char, VendorData, VendorLength);
DbgPrint (ASL_DEBUG_OUTPUT,
"%16s - Actual: %.2X, Base: %.2X, ResLen: %.2X, VendLen: %.2X, TypLen: %.2X\n",
"%16s - Actual: %.2X, Base: %.2X, ResLen: "
"%.2X, VendLen: %.2X, TypLen: %.2X\n",
"UartSerialBus", Descriptor->UartSerialBus.ResourceLength,
(UINT16) sizeof (AML_RESOURCE_UART_SERIALBUS), ResSourceLength,
VendorLength, Descriptor->UartSerialBus.TypeDataLength);
@@ -1154,7 +1173,8 @@ RsDoUartSerialBusDescriptor (
if (InitializerOp->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG)
{
Descriptor->UartSerialBus.ResSourceIndex = (UINT8) InitializerOp->Asl.Value.Integer;
Descriptor->UartSerialBus.ResSourceIndex =
(UINT8) InitializerOp->Asl.Value.Integer;
}
break;
+8 -8
View File
@@ -91,11 +91,11 @@ RsDoWordIoDescriptor (
CurrentByteOffset = Info->CurrentByteOffset;
Rnode = RsAllocateResourceNode (
sizeof (AML_RESOURCE_ADDRESS16) + 1 + StringLength);
sizeof (AML_RESOURCE_ADDRESS16) + 1 + StringLength);
Descriptor = Rnode->Buffer;
Descriptor->Address16.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS16;
Descriptor->Address16.ResourceType = ACPI_ADDRESS_TYPE_IO_RANGE;
Descriptor->Address16.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS16;
Descriptor->Address16.ResourceType = ACPI_ADDRESS_TYPE_IO_RANGE;
/*
* Initial descriptor length -- may be enlarged if there are
@@ -312,11 +312,11 @@ RsDoWordBusNumberDescriptor (
CurrentByteOffset = Info->CurrentByteOffset;
Rnode = RsAllocateResourceNode (
sizeof (AML_RESOURCE_ADDRESS16) + 1 + StringLength);
sizeof (AML_RESOURCE_ADDRESS16) + 1 + StringLength);
Descriptor = Rnode->Buffer;
Descriptor->Address16.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS16;
Descriptor->Address16.ResourceType = ACPI_ADDRESS_TYPE_BUS_NUMBER_RANGE;
Descriptor->Address16.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS16;
Descriptor->Address16.ResourceType = ACPI_ADDRESS_TYPE_BUS_NUMBER_RANGE;
/*
* Initial descriptor length -- may be enlarged if there are
@@ -517,10 +517,10 @@ RsDoWordSpaceDescriptor (
CurrentByteOffset = Info->CurrentByteOffset;
Rnode = RsAllocateResourceNode (
sizeof (AML_RESOURCE_ADDRESS16) + 1 + StringLength);
sizeof (AML_RESOURCE_ADDRESS16) + 1 + StringLength);
Descriptor = Rnode->Buffer;
Descriptor->Address16.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS16;
Descriptor->Address16.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS16;
/*
* Initial descriptor length -- may be enlarged if there are
+10 -3
View File
@@ -54,11 +54,12 @@ NoEcho('
* Root term. Allow multiple #line directives before the definition block
* to handle output from preprocessors
*/
ASLCode
: DefinitionBlockTerm
AslCode
: DefinitionBlockList {$<n>$ = TrLinkChildren (TrCreateLeafNode (PARSEOP_ASL_CODE),1, $1);}
| error {YYABORT; $$ = NULL;}
;
/*
* Note concerning support for "module-level code".
*
@@ -75,7 +76,7 @@ ASLCode
* of Type1 and Type2 opcodes at module level.
*/
DefinitionBlockTerm
: PARSEOP_DEFINITIONBLOCK '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DEFINITIONBLOCK);}
: PARSEOP_DEFINITION_BLOCK '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DEFINITION_BLOCK);}
String ','
String ','
ByteConst ','
@@ -86,6 +87,12 @@ DefinitionBlockTerm
'{' TermList '}' {$$ = TrLinkChildren ($<n>3,7,$4,$6,$8,$10,$12,$14,$18);}
;
DefinitionBlockList
: DefinitionBlockTerm
| DefinitionBlockTerm
DefinitionBlockList {$$ = TrLinkPeerNodes (2, $1,$2);}
;
SuperName
: NameString {}
| ArgTerm {}
+42
View File
@@ -270,3 +270,45 @@ AcpiTbFindTable (
{
return (AE_SUPPORT);
}
ACPI_STATUS
AcpiNsLoadTable (
UINT32 TableIndex,
ACPI_NAMESPACE_NODE *Node)
{
return (AE_NOT_IMPLEMENTED);
}
ACPI_STATUS
AcpiDsRestartControlMethod (
ACPI_WALK_STATE *WalkState,
ACPI_OPERAND_OBJECT *ReturnDesc)
{
return (AE_OK);
}
void
AcpiDsTerminateControlMethod (
ACPI_OPERAND_OBJECT *MethodDesc,
ACPI_WALK_STATE *WalkState)
{
return;
}
ACPI_STATUS
AcpiDsCallControlMethod (
ACPI_THREAD_STATE *Thread,
ACPI_WALK_STATE *WalkState,
ACPI_PARSE_OBJECT *Op)
{
return (AE_OK);
}
ACPI_STATUS
AcpiDsMethodDataInitArgs (
ACPI_OPERAND_OBJECT **Params,
UINT32 MaxParamCount,
ACPI_WALK_STATE *WalkState)
{
return (AE_OK);
}
+4 -1
View File
@@ -124,7 +124,7 @@ NoEcho('
%token <i> PARSEOP_DECREMENT
%token <i> PARSEOP_DEFAULT
%token <i> PARSEOP_DEFAULT_ARG
%token <i> PARSEOP_DEFINITIONBLOCK
%token <i> PARSEOP_DEFINITION_BLOCK
%token <i> PARSEOP_DEREFOF
%token <i> PARSEOP_DEVICE
%token <i> PARSEOP_DEVICEPOLARITY_HIGH
@@ -464,6 +464,9 @@ NoEcho('
/* PARSEOP_EXP_PAREN_OPEN */
/* PARSEOP_EXP_PAREN_CLOSE */
%token <i> PARSEOP_ASL_CODE
/*
* Special functions. These should probably stay at the end of this
* table.
+19 -17
View File
@@ -111,7 +111,7 @@ TrAmlGetNextTempName (
char *TempName;
if (*TempCount >= (10+26)) /* 0-35 valid: 0-9 and A-Z for TempName[3] */
if (*TempCount >= (10 + 26)) /* 0-35 valid: 0-9 and A-Z for TempName[3] */
{
/* Too many temps */
@@ -129,6 +129,7 @@ TrAmlGetNextTempName (
{
TempName[3] = (char) (*TempCount + ('A' - 10));
}
(*TempCount)++;
/* First three characters are always "_T_" */
@@ -217,7 +218,7 @@ TrAmlSetSubtreeParent (
while (Next)
{
Next->Asl.Parent = Parent;
Next = Next->Asl.Next;
Next = Next->Asl.Next;
}
}
@@ -242,7 +243,7 @@ TrAmlInsertPeer (
{
NewPeer->Asl.Next = Op->Asl.Next;
Op->Asl.Next = NewPeer;
Op->Asl.Next = NewPeer;
}
@@ -297,7 +298,7 @@ TrTransformSubtree (
switch (Op->Asl.ParseOpcode)
{
case PARSEOP_DEFINITIONBLOCK:
case PARSEOP_DEFINITION_BLOCK:
TrDoDefinitionBlock (Op);
break;
@@ -448,7 +449,7 @@ TrDoSwitch (
{
/* Add an ELSE to complete the previous CASE */
NewOp = TrCreateLeafNode (PARSEOP_ELSE);
NewOp = TrCreateLeafNode (PARSEOP_ELSE);
NewOp->Asl.Parent = Conditional->Asl.Parent;
TrAmlInitLineNumbers (NewOp, NewOp->Asl.Parent);
@@ -458,9 +459,9 @@ TrDoSwitch (
CurrentParentNode = NewOp;
}
CaseOp = Next;
CaseOp = Next;
Conditional = CaseOp;
CaseBlock = CaseOp->Asl.Child->Asl.Next;
CaseBlock = CaseOp->Asl.Child->Asl.Next;
Conditional->Asl.Child->Asl.Next = NULL;
Predicate = CaseOp->Asl.Child;
@@ -537,7 +538,7 @@ TrDoSwitch (
* CaseOp->Child->Peer is the beginning of the case block
*/
NewOp = TrCreateValuedLeafNode (PARSEOP_NAMESTRING,
(UINT64) ACPI_TO_INTEGER (PredicateValueName));
(UINT64) ACPI_TO_INTEGER (PredicateValueName));
NewOp->Asl.Next = Predicate;
TrAmlInitLineNumbers (NewOp, Predicate);
@@ -600,7 +601,7 @@ TrDoSwitch (
/* Unknown peer opcode */
AcpiOsPrintf ("Unknown parse opcode for switch statement: %s (%u)\n",
Next->Asl.ParseOpName, Next->Asl.ParseOpcode);
Next->Asl.ParseOpName, Next->Asl.ParseOpcode);
}
}
@@ -645,7 +646,7 @@ TrDoSwitch (
Next = StartNode;
while ((Next->Asl.ParseOpcode != PARSEOP_METHOD) &&
(Next->Asl.ParseOpcode != PARSEOP_DEFINITIONBLOCK))
(Next->Asl.ParseOpcode != PARSEOP_DEFINITION_BLOCK))
{
Next = Next->Asl.Parent;
}
@@ -668,7 +669,8 @@ TrDoSwitch (
*/
if (Next->Asl.ParseOpcode != PARSEOP_SERIALIZERULE_SERIAL)
{
AslError (ASL_REMARK, ASL_MSG_SERIALIZED, MethodOp, "Due to use of Switch operator");
AslError (ASL_REMARK, ASL_MSG_SERIALIZED, MethodOp,
"Due to use of Switch operator");
Next->Asl.ParseOpcode = PARSEOP_SERIALIZERULE_SERIAL;
}
@@ -682,7 +684,7 @@ TrDoSwitch (
/* Create the NameSeg child for the Name node */
NewOp2 = TrCreateValuedLeafNode (PARSEOP_NAMESEG,
(UINT64) ACPI_TO_INTEGER (PredicateValueName));
(UINT64) ACPI_TO_INTEGER (PredicateValueName));
TrAmlInitLineNumbers (NewOp2, NewOp);
NewOp2->Asl.CompileFlags |= NODE_IS_NAME_DECLARATION;
NewOp->Asl.Child = NewOp2;
@@ -694,25 +696,25 @@ TrDoSwitch (
case ACPI_BTYPE_INTEGER:
NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_ZERO,
(UINT64) 0);
(UINT64) 0);
TrAmlInitLineNumbers (NewOp2->Asl.Next, NewOp);
break;
case ACPI_BTYPE_STRING:
NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL,
(UINT64) ACPI_TO_INTEGER (""));
(UINT64) ACPI_TO_INTEGER (""));
TrAmlInitLineNumbers (NewOp2->Asl.Next, NewOp);
break;
case ACPI_BTYPE_BUFFER:
(void) TrLinkPeerNode (NewOp2, TrCreateValuedLeafNode (PARSEOP_BUFFER,
(UINT64) 0));
(UINT64) 0));
Next = NewOp2->Asl.Next;
TrAmlInitLineNumbers (Next, NewOp2);
(void) TrLinkChildren (Next, 1, TrCreateValuedLeafNode (PARSEOP_ZERO,
(UINT64) 1));
(UINT64) 1));
TrAmlInitLineNumbers (Next->Asl.Child, Next);
BufferOp = TrCreateValuedLeafNode (PARSEOP_DEFAULT_ARG, (UINT64) 0);
@@ -755,7 +757,7 @@ TrDoSwitch (
Predicate->Asl.Parent = StoreOp;
NewOp = TrCreateValuedLeafNode (PARSEOP_NAMESEG,
(UINT64) ACPI_TO_INTEGER (PredicateValueName));
(UINT64) ACPI_TO_INTEGER (PredicateValueName));
TrAmlInitLineNumbers (NewOp, StoreOp);
NewOp->Asl.Parent = StoreOp;
Predicate->Asl.Next = NewOp;
+27 -6
View File
@@ -340,6 +340,11 @@ TrPrintNodeCompileFlags (
FlagName = "NODE_METHOD_TYPED";
break;
case NODE_COULD_NOT_REDUCE:
FlagName = "NODE_COULD_NOT_REDUCE";
break;
case NODE_COMPILE_TIME_CONST:
FlagName = "NODE_COMPILE_TIME_CONST";
@@ -489,7 +494,7 @@ TrSetEndLineNumber (
return;
}
Op->Asl.EndLine = Gbl_CurrentLineNumber;
Op->Asl.EndLine = Gbl_CurrentLineNumber;
Op->Asl.EndLogicalLine = Gbl_LogicalLineNumber;
}
@@ -753,7 +758,8 @@ TrCreateConstantLeafNode (
}
DbgPrint (ASL_PARSE_OUTPUT,
"\nCreateConstantLeafNode Ln/Col %u/%u NewNode %p Op %s Value %8.8X%8.8X \n",
"\nCreateConstantLeafNode Ln/Col %u/%u NewNode %p "
"Op %s Value %8.8X%8.8X \n",
Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName (ParseOpcode),
ACPI_FORMAT_UINT64 (Op->Asl.Value.Integer));
return (Op);
@@ -860,7 +866,8 @@ TrCreateValuedLeafNode (
Op = TrAllocateNode (ParseOpcode);
DbgPrint (ASL_PARSE_OUTPUT,
"\nCreateValuedLeafNode Ln/Col %u/%u NewNode %p Op %s Value %8.8X%8.8X ",
"\nCreateValuedLeafNode Ln/Col %u/%u NewNode %p "
"Op %s Value %8.8X%8.8X ",
Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName(ParseOpcode),
ACPI_FORMAT_UINT64 (Value));
Op->Asl.Value.Integer = Value;
@@ -946,15 +953,22 @@ TrCreateNode (
DbgPrint (ASL_PARSE_OUTPUT,
"\nCreateNode Ln/Col %u/%u NewParent %p Child %u Op %s ",
Op->Asl.LineNumber, Op->Asl.Column, Op, NumChildren, UtGetOpName(ParseOpcode));
Op->Asl.LineNumber, Op->Asl.Column, Op,
NumChildren, UtGetOpName(ParseOpcode));
/* Some extra debug output based on the parse opcode */
switch (ParseOpcode)
{
case PARSEOP_DEFINITIONBLOCK:
case PARSEOP_ASL_CODE:
RootNode = Op;
Op->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
DbgPrint (ASL_PARSE_OUTPUT, "ASLCODE (Tree Completed)->");
break;
case PARSEOP_DEFINITION_BLOCK:
DbgPrint (ASL_PARSE_OUTPUT, "DEFINITION_BLOCK (Tree Completed)->");
break;
@@ -1075,9 +1089,15 @@ TrLinkChildren (
switch (Op->Asl.ParseOpcode)
{
case PARSEOP_DEFINITIONBLOCK:
case PARSEOP_ASL_CODE:
RootNode = Op;
Op->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
DbgPrint (ASL_PARSE_OUTPUT, "ASLCODE (Tree Completed)->");
break;
case PARSEOP_DEFINITION_BLOCK:
DbgPrint (ASL_PARSE_OUTPUT, "DEFINITION_BLOCK (Tree Completed)->");
break;
@@ -1155,6 +1175,7 @@ TrLinkChildren (
Child = Child->Asl.Next;
Child->Asl.Parent = Op;
}
PrevChild = Child;
}
+1 -1
View File
@@ -66,7 +66,7 @@
#define NODE_METHOD_SOME_NO_RETVAL 0x00000200
#define NODE_RESULT_NOT_USED 0x00000400
#define NODE_METHOD_TYPED 0x00000800
#define NODE_UNUSED_FLAG 0x00001000
#define NODE_COULD_NOT_REDUCE 0x00001000
#define NODE_COMPILE_TIME_CONST 0x00002000
#define NODE_IS_TERM_ARG 0x00004000
#define NODE_WAS_ONES_OP 0x00008000
+2 -1
View File
@@ -51,12 +51,13 @@ NoEcho('
*****************************************************************************/
%type <n> ArgList
%type <n> ASLCode
%type <n> AslCode
%type <n> BufferData
%type <n> BufferTermData
%type <n> CompilerDirective
%type <n> DataObject
%type <n> DefinitionBlockTerm
%type <n> DefinitionBlockList
%type <n> IntegerData
%type <n> NamedObject
%type <n> NameSpaceModifier
+2 -2
View File
@@ -199,7 +199,6 @@ UtBeginEvent (
AslGbl_Events[AslGbl_NextEvent].StartTime = AcpiOsGetTimer ();
AslGbl_Events[AslGbl_NextEvent].EventName = Name;
AslGbl_Events[AslGbl_NextEvent].Valid = TRUE;
return (AslGbl_NextEvent++);
}
@@ -806,6 +805,7 @@ UtPadNameWithUnderscores (
{
*PaddedNameSeg = '_';
}
PaddedNameSeg++;
}
}
@@ -1090,7 +1090,7 @@ stroul64 (
/* Check to see if value is out of range: */
if (ReturnValue > ((ACPI_UINT64_MAX - (UINT64) Index) /
(UINT64) Base))
(UINT64) Base))
{
goto ErrorExit;
}
+3 -4
View File
@@ -47,7 +47,7 @@
ACPI_MODULE_NAME ("asluuid")
extern UINT8 AcpiGbl_MapToUuidOffset[UUID_BUFFER_LENGTH];
extern UINT8 AcpiGbl_MapToUuidOffset[UUID_BUFFER_LENGTH];
/*******************************************************************************
@@ -90,11 +90,10 @@ AuValidateUuid (
return (AE_BAD_PARAMETER);
}
}
/* All other positions must contain hex digits */
else
{
/* All other positions must contain hex digits */
if (!isxdigit ((int) InString[i]))
{
return (AE_BAD_PARAMETER);
+17 -13
View File
@@ -148,7 +148,7 @@ XfCrossReferenceNamespace (
/* Walk the entire parse tree */
TrWalkParseTree (RootNode, ASL_WALK_VISIT_TWICE, XfNamespaceLocateBegin,
XfNamespaceLocateEnd, WalkState);
XfNamespaceLocateEnd, WalkState);
ACPI_FREE (WalkState);
return (AE_OK);
@@ -177,8 +177,8 @@ XfObjectExists (
/* Walk entire namespace from the supplied root */
Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
ACPI_UINT32_MAX, FALSE, XfCompareOneNamespaceObject, NULL,
Name, NULL);
ACPI_UINT32_MAX, FALSE, XfCompareOneNamespaceObject, NULL,
Name, NULL);
if (Status == AE_CTRL_TRUE)
{
/* At least one instance of the name was found */
@@ -575,6 +575,7 @@ XfNamespaceLocateBegin (
{
NextOp = NextOp->Asl.Next;
}
Path = NextOp->Asl.Value.String;
}
else
@@ -596,7 +597,7 @@ XfNamespaceLocateBegin (
Gbl_NsLookupCount++;
Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ObjectType,
ACPI_IMODE_EXECUTE, Flags, WalkState, &(Node));
ACPI_IMODE_EXECUTE, Flags, WalkState, &(Node));
if (ACPI_FAILURE (Status))
{
if (Status == AE_NOT_FOUND)
@@ -778,7 +779,8 @@ XfNamespaceLocateBegin (
if (Message)
{
sprintf (MsgBuffer, "Size mismatch, Tag: %u bit%s, Field: %u bit%s",
sprintf (MsgBuffer,
"Size mismatch, Tag: %u bit%s, Field: %u bit%s",
TagBitLength, (TagBitLength > 1) ? "s" : "",
FieldBitLength, (FieldBitLength > 1) ? "s" : "");
@@ -847,7 +849,7 @@ XfNamespaceLocateBegin (
if (Node->Type != ACPI_TYPE_METHOD)
{
sprintf (MsgBuffer, "%s is a %s",
Op->Asl.ExternalName, AcpiUtGetTypeName (Node->Type));
Op->Asl.ExternalName, AcpiUtGetTypeName (Node->Type));
AslError (ASL_ERROR, ASL_MSG_NOT_METHOD, Op, MsgBuffer);
return_ACPI_STATUS (AE_OK);
@@ -870,7 +872,7 @@ XfNamespaceLocateBegin (
UtSetParseOpName (Op);
PassedArgs = 0;
NextOp = Op->Asl.Child;
NextOp = Op->Asl.Child;
while (NextOp)
{
@@ -976,7 +978,8 @@ XfNamespaceLocateBegin (
case ACPI_ADR_SPACE_CMOS:
case ACPI_ADR_SPACE_GPIO:
if ((UINT8) Op->Asl.Parent->Asl.Value.Integer != AML_FIELD_ACCESS_BYTE)
if ((UINT8) Op->Asl.Parent->Asl.Value.Integer !=
AML_FIELD_ACCESS_BYTE)
{
AslError (ASL_ERROR, ASL_MSG_REGION_BYTE_ACCESS, Op, NULL);
}
@@ -986,7 +989,8 @@ XfNamespaceLocateBegin (
case ACPI_ADR_SPACE_IPMI:
case ACPI_ADR_SPACE_GSBUS:
if ((UINT8) Op->Asl.Parent->Asl.Value.Integer != AML_FIELD_ACCESS_BUFFER)
if ((UINT8) Op->Asl.Parent->Asl.Value.Integer !=
AML_FIELD_ACCESS_BUFFER)
{
AslError (ASL_ERROR, ASL_MSG_REGION_BUFFER_ACCESS, Op, NULL);
}
@@ -1014,10 +1018,10 @@ XfNamespaceLocateBegin (
if (Op->Asl.Parent->Asl.ExtraValue && Op->Asl.Child)
{
XfCheckFieldRange (Op,
Op->Asl.Parent->Asl.ExtraValue,
Op->Asl.ExtraValue,
(UINT32) Op->Asl.Child->Asl.Value.Integer,
Op->Asl.Child->Asl.ExtraValue);
Op->Asl.Parent->Asl.ExtraValue,
Op->Asl.ExtraValue,
(UINT32) Op->Asl.Child->Asl.Value.Integer,
Op->Asl.Child->Asl.ExtraValue);
}
}
}
+53 -2
View File
@@ -345,7 +345,7 @@ DtCompileDataTable (
DtInsertCompilerIds (*FieldList);
Status = DtCompileTable (FieldList, AcpiDmTableInfoHeader,
&Gbl_RootTable, TRUE);
&Gbl_RootTable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -382,7 +382,7 @@ DtCompileDataTable (
Subtable = NULL;
Status = DtCompileTable (FieldList, TableData->TableInfo,
&Subtable, TRUE);
&Subtable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -637,6 +637,57 @@ DtCompileTable (
}
/******************************************************************************
*
* FUNCTION: DtCompileTwoSubtables
*
* PARAMETERS: List - Current field list pointer
* TableInfo1 - Info table 1
* TableInfo1 - Info table 2
*
* RETURN: Status
*
* DESCRIPTION: Compile tables with a header and one or more same subtables.
* Include CPEP, EINJ, ERST, MCFG, MSCT, WDAT
*
*****************************************************************************/
ACPI_STATUS
DtCompileTwoSubtables (
void **List,
ACPI_DMTABLE_INFO *TableInfo1,
ACPI_DMTABLE_INFO *TableInfo2)
{
ACPI_STATUS Status;
DT_SUBTABLE *Subtable;
DT_SUBTABLE *ParentTable;
DT_FIELD **PFieldList = (DT_FIELD **) List;
Status = DtCompileTable (PFieldList, TableInfo1, &Subtable, TRUE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
while (*PFieldList)
{
Status = DtCompileTable (PFieldList, TableInfo2, &Subtable, FALSE);
if (ACPI_FAILURE (Status))
{
return (Status);
}
DtInsertSubtable (ParentTable, Subtable);
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompilePadding
+6
View File
@@ -171,6 +171,12 @@ DtCompileTable (
DT_SUBTABLE **RetSubtable,
BOOLEAN Required);
ACPI_STATUS
DtCompileTwoSubtables (
void **List,
ACPI_DMTABLE_INFO *TableInfo1,
ACPI_DMTABLE_INFO *TableInfo2);
ACPI_STATUS
DtCompilePadding (
UINT32 Length,
+3
View File
@@ -147,6 +147,7 @@ DtDoOperator (
Gbl_CurrentField, NULL);
return (0);
}
Result = LeftValue / RightValue;
break;
@@ -158,6 +159,7 @@ DtDoOperator (
Gbl_CurrentField, NULL);
return (0);
}
Result = LeftValue % RightValue;
break;
@@ -417,6 +419,7 @@ DtLookupLabel (
{
return (LabelField);
}
LabelField = LabelField->NextLabel;
}
+1
View File
@@ -99,6 +99,7 @@ DtCompileOneField (
{
ACPI_STATUS Status;
switch (Type)
{
case DT_FIELD_TYPE_INTEGER:
+8 -3
View File
@@ -102,7 +102,7 @@ DtDumpSubtableTree (
#define DT_MERGE_LINES 6
#define DT_ESCAPE_SEQUENCE 7
static UINT32 Gbl_NextLineOffset;
static UINT32 Gbl_NextLineOffset;
/******************************************************************************
@@ -354,6 +354,7 @@ DtParseLine (
End--;
break;
}
End++;
}
@@ -553,7 +554,8 @@ DtGetNextLine (
if (!(Flags & DT_ALLOW_MULTILINE_QUOTES))
{
AcpiOsPrintf ("ERROR at line %u: Unterminated quoted string\n",
AcpiOsPrintf (
"ERROR at line %u: Unterminated quoted string\n",
Gbl_CurrentLineNumber++);
State = DT_NORMAL_TEXT;
}
@@ -755,7 +757,8 @@ DtScanFile (
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Line %2.2u/%4.4X - %s",
Gbl_CurrentLineNumber, Offset, Gbl_CurrentLineBuffer));
Status = DtParseLine (Gbl_CurrentLineBuffer, Gbl_CurrentLineNumber, Offset);
Status = DtParseLine (Gbl_CurrentLineBuffer,
Gbl_CurrentLineNumber, Offset);
if (Status == AE_NOT_FOUND)
{
break;
@@ -946,6 +949,7 @@ DtDumpFieldList (
DbgPrint (ASL_DEBUG_OUTPUT, "\nField List:\n"
"LineNo ByteOff NameCol Column TableOff "
"Flags %32s : %s\n\n", "Name", "Value");
while (Field)
{
DbgPrint (ASL_DEBUG_OUTPUT,
@@ -1092,6 +1096,7 @@ DtWriteFieldToListing (
FlPrintFile (ASL_FILE_LISTING_OUTPUT, "...Additional data, length 0x%X\n",
strlen (Field->Value));
}
FlPrintFile (ASL_FILE_LISTING_OUTPUT, "\n");
/* Dump the hex data that will be output for this field */
+103 -3389
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1 -2
View File
@@ -189,7 +189,6 @@ DtCreateTemplates (
Status = DtCreateOneTemplate (Signature, TableData);
/* Shutdown ACPICA subsystem */
(void) AcpiTerminate ();
@@ -235,7 +234,7 @@ DtCreateAllTemplates (
if (TableData->Template)
{
Status = DtCreateOneTemplate (TableData->Signature,
TableData);
TableData);
if (ACPI_FAILURE (Status))
{
return (Status);
+1
View File
@@ -84,6 +84,7 @@ PrUnTokenize (
{
return;
}
if (Buffer[Length] != '\n')
{
Buffer[strlen(Buffer)] = ' ';
+2 -1
View File
@@ -387,7 +387,8 @@ PrAddMacro (
{
UseCount = Args[i].UseCount;
Args[i].Offset[UseCount] = (Token - Gbl_MainTokenBuffer) - MacroBodyOffset;
Args[i].Offset[UseCount] =
(Token - Gbl_MainTokenBuffer) - MacroBodyOffset;
DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID
"Macro Arg #%u: %s UseCount %u Offset %u \n",
+7 -2
View File
@@ -499,7 +499,8 @@ PrDoDirective (
case PR_DIRECTIVE_ELSE:
case PR_DIRECTIVE_ELIF:
if (Gbl_DirectiveStack && Gbl_DirectiveStack->IgnoringThisCodeBlock)
if (Gbl_DirectiveStack &&
Gbl_DirectiveStack->IgnoringThisCodeBlock)
{
PrDbgPrint ("Ignoring", Gbl_DirectiveInfo[Directive].Name);
return;
@@ -674,7 +675,8 @@ PrDoDirective (
if (*(&Gbl_CurrentLineBuffer[TokenOffset]) == '(')
{
#ifndef MACROS_SUPPORTED
AcpiOsPrintf ("%s ERROR - line %u: #define macros are not supported yet\n",
AcpiOsPrintf (
"%s ERROR - line %u: #define macros are not supported yet\n",
Gbl_CurrentLineBuffer, Gbl_LogicalLineNumber);
exit(1);
#else
@@ -692,11 +694,13 @@ PrDoDirective (
{
Token2++;
}
End = Token2;
while (*End != '\n')
{
End++;
}
*End = 0;
}
else
@@ -999,6 +1003,7 @@ PrGetNextLine (
{
return (ASL_BLANK_LINE);
}
return (AE_OK);
}
}
+2
View File
@@ -122,8 +122,10 @@ PrGetNextToken (
{
*Next = NULL;
}
return (TokenStart);
}
Buffer++;
}
+11 -19
View File
@@ -117,8 +117,7 @@ AcpiDbConvertToNode (
Node = ACPI_TO_POINTER (Address);
if (!AcpiOsReadable (Node, sizeof (ACPI_NAMESPACE_NODE)))
{
AcpiOsPrintf ("Address %p is invalid",
Node);
AcpiOsPrintf ("Address %p is invalid", Node);
return (NULL);
}
@@ -127,7 +126,7 @@ AcpiDbConvertToNode (
if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)
{
AcpiOsPrintf ("Address %p is not a valid namespace node [%s]\n",
Node, AcpiUtGetDescriptorName (Node));
Node, AcpiUtGetDescriptorName (Node));
return (NULL);
}
}
@@ -914,7 +913,7 @@ AcpiDbDeviceResources (
Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjHandle);
ParentPath = AcpiNsGetExternalPathname (Node);
ParentPath = AcpiNsGetNormalizedPathname (Node, TRUE);
if (!ParentPath)
{
return (AE_NO_MEMORY);
@@ -1005,7 +1004,7 @@ AcpiDbDeviceResources (
/* Get the _CRS resource list (test ALLOCATE buffer) */
ReturnBuffer.Pointer = NULL;
ReturnBuffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
ReturnBuffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
Status = AcpiGetCurrentResources (Node, &ReturnBuffer);
if (ACPI_FAILURE (Status))
@@ -1074,7 +1073,7 @@ AcpiDbDeviceResources (
}
ReturnBuffer.Pointer = AcpiGbl_DbBuffer;
ReturnBuffer.Length = ACPI_DEBUG_BUFFER_SIZE;
ReturnBuffer.Length = ACPI_DEBUG_BUFFER_SIZE;
Status = AcpiGetPossibleResources (Node, &ReturnBuffer);
if (ACPI_FAILURE (Status))
@@ -1097,7 +1096,7 @@ AcpiDbDeviceResources (
AcpiOsPrintf ("Evaluating _AEI\n");
ReturnBuffer.Pointer = AcpiGbl_DbBuffer;
ReturnBuffer.Length = ACPI_DEBUG_BUFFER_SIZE;
ReturnBuffer.Length = ACPI_DEBUG_BUFFER_SIZE;
Status = AcpiEvaluateObject (AeiNode, NULL, NULL, &ReturnBuffer);
if (ACPI_FAILURE (Status))
@@ -1108,7 +1107,7 @@ AcpiDbDeviceResources (
}
ReturnBuffer.Pointer = AcpiGbl_DbBuffer;
ReturnBuffer.Length = ACPI_DEBUG_BUFFER_SIZE;
ReturnBuffer.Length = ACPI_DEBUG_BUFFER_SIZE;
Status = AcpiGetEventResources (Node, &ReturnBuffer);
if (ACPI_FAILURE (Status))
@@ -1224,8 +1223,8 @@ AcpiDbGenerateGpe (
}
}
GpeEventInfo = AcpiEvGetGpeEventInfo (ACPI_TO_POINTER (BlockNumber),
GpeNumber);
GpeEventInfo = AcpiEvGetGpeEventInfo (
ACPI_TO_POINTER (BlockNumber), GpeNumber);
if (!GpeEventInfo)
{
AcpiOsPrintf ("Invalid GPE\n");
@@ -1284,15 +1283,8 @@ AcpiDbTrace (
UINT32 Flags = 0;
if (EnableArg)
{
AcpiUtStrupr (EnableArg);
}
if (OnceArg)
{
AcpiUtStrupr (OnceArg);
}
AcpiUtStrupr (EnableArg);
AcpiUtStrupr (OnceArg);
if (MethodArg)
{
+1 -1
View File
@@ -198,7 +198,7 @@ AcpiDbConvertToBuffer (
}
j++;
i+=2;
i += 2;
while (String[i] &&
((String[i] == ',') || (String[i] == ' ')))
{
+37 -40
View File
@@ -413,14 +413,13 @@ AcpiDbDisplayMethodInfo (
}
ObjDesc = WalkState->MethodDesc;
Node = WalkState->MethodNode;
Node = WalkState->MethodNode;
AcpiOsPrintf ("Currently executing control method is [%4.4s]\n",
AcpiUtGetNodeName (Node));
AcpiUtGetNodeName (Node));
AcpiOsPrintf ("%X Arguments, SyncLevel = %X\n",
(UINT32) ObjDesc->Method.ParamCount,
(UINT32) ObjDesc->Method.SyncLevel);
(UINT32) ObjDesc->Method.ParamCount,
(UINT32) ObjDesc->Method.SyncLevel);
RootOp = StartOp;
while (RootOp->Common.Parent)
@@ -581,7 +580,7 @@ AcpiDbDisplayResults (
}
ObjDesc = WalkState->MethodDesc;
Node = WalkState->MethodNode;
Node = WalkState->MethodNode;
if (WalkState->Results)
{
@@ -657,7 +656,7 @@ AcpiDbDisplayCallingTree (
*
* FUNCTION: AcpiDbDisplayObjectType
*
* PARAMETERS: Name - User entered NS node handle or name
* PARAMETERS: ObjectArg - User entered NS node handle
*
* RETURN: None
*
@@ -667,21 +666,17 @@ AcpiDbDisplayCallingTree (
void
AcpiDbDisplayObjectType (
char *Name)
char *ObjectArg)
{
ACPI_NAMESPACE_NODE *Node;
ACPI_HANDLE Handle;
ACPI_DEVICE_INFO *Info;
ACPI_STATUS Status;
UINT32 i;
Node = AcpiDbConvertToNode (Name);
if (!Node)
{
return;
}
Handle = ACPI_TO_POINTER (strtoul (ObjectArg, NULL, 16));
Status = AcpiGetObjectInfo (ACPI_CAST_PTR (ACPI_HANDLE, Node), &Info);
Status = AcpiGetObjectInfo (Handle, &Info);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("Could not get object info, %s\n",
@@ -689,25 +684,18 @@ AcpiDbDisplayObjectType (
return;
}
if (Info->Valid & ACPI_VALID_ADR)
{
AcpiOsPrintf ("ADR: %8.8X%8.8X, STA: %8.8X, Flags: %X\n",
ACPI_FORMAT_UINT64 (Info->Address),
Info->CurrentStatus, Info->Flags);
}
if (Info->Valid & ACPI_VALID_SXDS)
{
AcpiOsPrintf ("S1D-%2.2X S2D-%2.2X S3D-%2.2X S4D-%2.2X\n",
Info->HighestDstates[0], Info->HighestDstates[1],
Info->HighestDstates[2], Info->HighestDstates[3]);
}
if (Info->Valid & ACPI_VALID_SXWS)
{
AcpiOsPrintf ("S0W-%2.2X S1W-%2.2X S2W-%2.2X S3W-%2.2X S4W-%2.2X\n",
Info->LowestDstates[0], Info->LowestDstates[1],
Info->LowestDstates[2], Info->LowestDstates[3],
Info->LowestDstates[4]);
}
AcpiOsPrintf ("ADR: %8.8X%8.8X, STA: %8.8X, Flags: %X\n",
ACPI_FORMAT_UINT64 (Info->Address),
Info->CurrentStatus, Info->Flags);
AcpiOsPrintf ("S1D-%2.2X S2D-%2.2X S3D-%2.2X S4D-%2.2X\n",
Info->HighestDstates[0], Info->HighestDstates[1],
Info->HighestDstates[2], Info->HighestDstates[3]);
AcpiOsPrintf ("S0W-%2.2X S1W-%2.2X S2W-%2.2X S3W-%2.2X S4W-%2.2X\n",
Info->LowestDstates[0], Info->LowestDstates[1],
Info->LowestDstates[2], Info->LowestDstates[3],
Info->LowestDstates[4]);
if (Info->Valid & ACPI_VALID_HID)
{
@@ -719,11 +707,6 @@ AcpiDbDisplayObjectType (
AcpiOsPrintf ("UID: %s\n", Info->UniqueId.String);
}
if (Info->Valid & ACPI_VALID_SUB)
{
AcpiOsPrintf ("SUB: %s\n", Info->SubsystemId.String);
}
if (Info->Valid & ACPI_VALID_CID)
{
for (i = 0; i < Info->CompatibleIdList.Count; i++)
@@ -760,6 +743,13 @@ AcpiDbDisplayResultObject (
ACPI_WALK_STATE *WalkState)
{
#ifndef ACPI_APPLICATION
if (AcpiGbl_DbThreadId != AcpiOsGetThreadId())
{
return;
}
#endif
/* Only display if single stepping */
if (!AcpiGbl_CmSingleStep)
@@ -792,6 +782,13 @@ AcpiDbDisplayArgumentObject (
ACPI_WALK_STATE *WalkState)
{
#ifndef ACPI_APPLICATION
if (AcpiGbl_DbThreadId != AcpiOsGetThreadId())
{
return;
}
#endif
if (!AcpiGbl_CmSingleStep)
{
return;
@@ -1171,7 +1168,7 @@ AcpiDbDisplayNonRootHandlers (
return (AE_OK);
}
Pathname = AcpiNsGetExternalPathname (Node);
Pathname = AcpiNsGetNormalizedPathname (Node, TRUE);
if (!Pathname)
{
return (AE_OK);
+6 -5
View File
@@ -528,8 +528,8 @@ AcpiDbExecute (
/* Dump a _PLD buffer if present */
if (ACPI_COMPARE_NAME ((ACPI_CAST_PTR (ACPI_NAMESPACE_NODE,
AcpiGbl_DbMethodInfo.Method)->Name.Ascii),
METHOD_NAME__PLD))
AcpiGbl_DbMethodInfo.Method)->Name.Ascii),
METHOD_NAME__PLD))
{
AcpiDbDumpPldBuffer (ReturnObj.Pointer);
}
@@ -627,7 +627,8 @@ AcpiDbMethodThread (
if (ReturnObj.Length)
{
AcpiOsPrintf ("Evaluation of %s returned object %p Buflen %X\n",
Info->Pathname, ReturnObj.Pointer, (UINT32) ReturnObj.Length);
Info->Pathname, ReturnObj.Pointer,
(UINT32) ReturnObj.Length);
AcpiDbDumpExternalObject (ReturnObj.Pointer, 1);
}
#endif
@@ -694,7 +695,7 @@ AcpiDbCreateExecutionThreads (
/* Get the arguments */
NumThreads = strtoul (NumThreadsArg, NULL, 0);
NumLoops = strtoul (NumLoopsArg, NULL, 0);
NumLoops = strtoul (NumLoopsArg, NULL, 0);
if (!NumThreads || !NumLoops)
{
@@ -810,7 +811,7 @@ AcpiDbCreateExecutionThreads (
for (i = 0; i < (NumThreads); i++)
{
Status = AcpiOsExecute (OSL_DEBUGGER_THREAD, AcpiDbMethodThread,
Status = AcpiOsExecute (OSL_DEBUGGER_EXEC_THREAD, AcpiDbMethodThread,
&AcpiGbl_DbMethodInfo);
if (ACPI_FAILURE (Status))
{
+18 -122
View File
@@ -46,7 +46,10 @@
#include "accommon.h"
#include "acdebug.h"
#include "actables.h"
#include <stdio.h>
#ifdef ACPI_APPLICATION
#include "acapps.h"
#endif
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbfileio")
@@ -121,134 +124,35 @@ AcpiDbOpenDebugFile (
#endif
#ifdef ACPI_APPLICATION
#include "acapps.h"
/*******************************************************************************
*
* FUNCTION: AeLocalLoadTable
* FUNCTION: AcpiDbLoadTables
*
* PARAMETERS: Table - pointer to a buffer containing the entire
* table to be loaded
* PARAMETERS: ListHead - List of ACPI tables to load
*
* RETURN: Status
*
* DESCRIPTION: This function is called to load a table from the caller's
* buffer. The buffer must contain an entire ACPI Table including
* a valid header. The header fields will be verified, and if it
* is determined that the table is invalid, the call will fail.
*
******************************************************************************/
static ACPI_STATUS
AeLocalLoadTable (
ACPI_TABLE_HEADER *Table)
{
ACPI_STATUS Status = AE_OK;
ACPI_FUNCTION_TRACE (AeLocalLoadTable);
#if 0
/* ACPI_TABLE_DESC TableInfo; */
if (!Table)
{
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
TableInfo.Pointer = Table;
Status = AcpiTbRecognizeTable (&TableInfo, ACPI_TABLE_ALL);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
/* Install the new table into the local data structures */
Status = AcpiTbInitTableDescriptor (&TableInfo);
if (ACPI_FAILURE (Status))
{
if (Status == AE_ALREADY_EXISTS)
{
/* Table already exists, no error */
Status = AE_OK;
}
/* Free table allocated by AcpiTbGetTable */
AcpiTbDeleteSingleTable (&TableInfo);
return_ACPI_STATUS (Status);
}
#if (!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY))
Status = AcpiNsLoadTable (TableInfo.InstalledDesc, AcpiGbl_RootNode);
if (ACPI_FAILURE (Status))
{
/* Uninstall table and free the buffer */
AcpiTbDeleteTablesByType (ACPI_TABLE_ID_DSDT);
return_ACPI_STATUS (Status);
}
#endif
#endif
return_ACPI_STATUS (Status);
}
#endif
/*******************************************************************************
*
* FUNCTION: AcpiDbGetTableFromFile
*
* PARAMETERS: Filename - File where table is located
* ReturnTable - Where a pointer to the table is returned
*
* RETURN: Status
*
* DESCRIPTION: Load an ACPI table from a file
* DESCRIPTION: Load ACPI tables from a previously constructed table list.
*
******************************************************************************/
ACPI_STATUS
AcpiDbGetTableFromFile (
char *Filename,
ACPI_TABLE_HEADER **ReturnTable,
BOOLEAN MustBeAmlFile)
AcpiDbLoadTables (
ACPI_NEW_TABLE_DESC *ListHead)
{
#ifdef ACPI_APPLICATION
ACPI_STATUS Status;
ACPI_NEW_TABLE_DESC *TableListHead;
ACPI_TABLE_HEADER *Table;
BOOLEAN IsAmlTable = TRUE;
Status = AcpiUtReadTableFromFile (Filename, &Table);
if (ACPI_FAILURE (Status))
/* Load all ACPI tables in the list */
TableListHead = ListHead;
while (TableListHead)
{
return (Status);
}
Table = TableListHead->Table;
if (MustBeAmlFile)
{
IsAmlTable = AcpiUtIsAmlTable (Table);
if (!IsAmlTable)
{
ACPI_EXCEPTION ((AE_INFO, AE_OK,
"Input for -e is not an AML table: "
"\"%4.4s\" (must be DSDT/SSDT)",
Table->Signature));
return (AE_TYPE);
}
}
if (IsAmlTable)
{
/* Attempt to recognize and install the table */
Status = AeLocalLoadTable (Table);
Status = AcpiLoadTable (Table);
if (ACPI_FAILURE (Status))
{
if (Status == AE_ALREADY_EXISTS)
@@ -265,20 +169,12 @@ AcpiDbGetTableFromFile (
return (Status);
}
AcpiTbPrintTableHeader (0, Table);
fprintf (stderr,
"Acpi table [%4.4s] successfully installed and loaded\n",
Table->Signature);
TableListHead = TableListHead->Next;
}
AcpiGbl_AcpiHardwarePresent = FALSE;
if (ReturnTable)
{
*ReturnTable = Table;
}
#endif /* ACPI_APPLICATION */
return (AE_OK);
}
+21 -24
View File
@@ -45,6 +45,9 @@
#include "accommon.h"
#include "acdebug.h"
#ifdef ACPI_APPLICATION
#include "acapps.h"
#endif
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbinput")
@@ -679,10 +682,7 @@ AcpiDbGetLine (
/* Uppercase the actual command */
if (AcpiGbl_DbArgs[0])
{
AcpiUtStrupr (AcpiGbl_DbArgs[0]);
}
AcpiUtStrupr (AcpiGbl_DbArgs[0]);
Count = i;
if (Count)
@@ -762,7 +762,7 @@ AcpiDbCommandDispatch (
/* If AcpiTerminate has been called, terminate this thread */
if (AcpiGbl_DbTerminateThreads)
if (AcpiGbl_DbTerminateLoop)
{
return (AE_CTRL_TERMINATE);
}
@@ -942,8 +942,8 @@ AcpiDbCommandDispatch (
else if (ParamCount == 2)
{
Temp = AcpiGbl_DbConsoleDebugLevel;
AcpiGbl_DbConsoleDebugLevel = strtoul (AcpiGbl_DbArgs[1],
NULL, 16);
AcpiGbl_DbConsoleDebugLevel =
strtoul (AcpiGbl_DbArgs[1], NULL, 16);
AcpiOsPrintf (
"Debug Level for console output was %8.8lX, now %8.8lX\n",
Temp, AcpiGbl_DbConsoleDebugLevel);
@@ -1119,8 +1119,16 @@ AcpiDbCommandDispatch (
break;
case CMD_LOAD:
{
ACPI_NEW_TABLE_DESC *ListHead = NULL;
Status = AcpiDbGetTableFromFile (AcpiGbl_DbArgs[1], NULL, FALSE);
Status = AcpiAcGetAllTablesFromFile (AcpiGbl_DbArgs[1],
ACPI_GET_ALL_TABLES, &ListHead);
if (ACPI_SUCCESS (Status))
{
AcpiDbLoadTables (ListHead);
}
}
break;
case CMD_OPEN:
@@ -1140,6 +1148,7 @@ AcpiDbCommandDispatch (
* re-creating the semaphores!
*/
AcpiGbl_DbTerminateLoop = TRUE;
/* AcpiInitialize (NULL); */
break;
@@ -1184,7 +1193,7 @@ AcpiDbCommandDispatch (
#ifdef ACPI_APPLICATION
AcpiDbCloseDebugFile ();
#endif
AcpiGbl_DbTerminateThreads = TRUE;
AcpiGbl_DbTerminateLoop = TRUE;
return (AE_CTRL_TERMINATE);
case CMD_NOT_FOUND:
@@ -1224,7 +1233,7 @@ AcpiDbExecuteThread (
ACPI_STATUS MStatus;
while (Status != AE_CTRL_TERMINATE)
while (Status != AE_CTRL_TERMINATE && !AcpiGbl_DbTerminateLoop)
{
AcpiGbl_MethodExecuting = FALSE;
AcpiGbl_StepToNextCall = FALSE;
@@ -1240,6 +1249,7 @@ AcpiDbExecuteThread (
AcpiOsReleaseMutex (AcpiGbl_DbCommandComplete);
}
AcpiGbl_DbThreadsTerminated = TRUE;
}
@@ -1294,7 +1304,7 @@ AcpiDbUserCommands (
/* TBD: [Restructure] Need a separate command line buffer for step mode */
while (!AcpiGbl_DbTerminateThreads)
while (!AcpiGbl_DbTerminateLoop)
{
/* Force output to console until a command is entered */
@@ -1330,10 +1340,6 @@ AcpiDbUserCommands (
* and wait for the command to complete.
*/
AcpiOsReleaseMutex (AcpiGbl_DbCommandReady);
if (ACPI_FAILURE (Status))
{
return (Status);
}
Status = AcpiOsAcquireMutex (AcpiGbl_DbCommandComplete,
ACPI_WAIT_FOREVER);
@@ -1350,14 +1356,5 @@ AcpiDbUserCommands (
}
}
/* Shut down the debugger */
AcpiTerminateDebugger ();
/*
* Only this thread (the original thread) should actually terminate the
* subsystem, because all the semaphores are deleted during termination
*/
Status = AcpiTerminate ();
return (Status);
}
+1 -1
View File
@@ -89,7 +89,7 @@ AcpiDbSetMethodBreakpoint (
Address = strtoul (Location, NULL, 16);
AmlOffset = (UINT32) ACPI_PTR_DIFF (Op->Common.Aml,
WalkState->ParserState.AmlStart);
WalkState->ParserState.AmlStart);
if (Address <= AmlOffset)
{
AcpiOsPrintf ("Breakpoint %X is beyond current address %X\n",
+5 -4
View File
@@ -198,7 +198,7 @@ AcpiDbSetScope (
/* Build the final pathname */
if (AcpiUtSafeStrcat (AcpiGbl_DbScopeBuf, sizeof (AcpiGbl_DbScopeBuf),
Name))
Name))
{
Status = AE_BUFFER_OVERFLOW;
goto ErrorExit;
@@ -499,7 +499,7 @@ AcpiDbWalkForPredefinedNames (
return (AE_OK);
}
Pathname = AcpiNsGetExternalPathname (Node);
Pathname = AcpiNsGetNormalizedPathname (Node, TRUE);
if (!Pathname)
{
return (AE_OK);
@@ -560,7 +560,8 @@ AcpiDbCheckPredefinedNames (
/* Search all nodes in namespace */
(void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
ACPI_UINT32_MAX, AcpiDbWalkForPredefinedNames, NULL, (void *) &Count, NULL);
ACPI_UINT32_MAX, AcpiDbWalkForPredefinedNames,
NULL, (void *) &Count, NULL);
AcpiOsPrintf ("Found %u predefined names in the namespace\n", Count);
}
@@ -962,7 +963,7 @@ AcpiDbBusWalk (
/* Exit if there is no _PRT under this device */
Status = AcpiGetHandle (Node, METHOD_NAME__PRT,
ACPI_CAST_PTR (ACPI_HANDLE, &TempNode));
ACPI_CAST_PTR (ACPI_HANDLE, &TempNode));
if (ACPI_FAILURE (Status))
{
return (AE_OK);
+4 -2
View File
@@ -495,7 +495,8 @@ AcpiDbDecodeLocals (
}
else
{
AcpiOsPrintf ("No Local Variables are initialized for method [%4.4s]\n",
AcpiOsPrintf (
"No Local Variables are initialized for method [%4.4s]\n",
AcpiUtGetNodeName (Node));
}
}
@@ -572,7 +573,8 @@ AcpiDbDecodeArguments (
}
else
{
AcpiOsPrintf ("No Arguments are initialized for method [%4.4s]\n",
AcpiOsPrintf (
"No Arguments are initialized for method [%4.4s]\n",
AcpiUtGetNodeName (Node));
}
}
+2 -1
View File
@@ -339,7 +339,7 @@ AcpiDbClassifyOneObject (
Op = AcpiPsGetDepthNext (Root, Op);
SizeOfParseTree = (NumGrammarElements - NumMethodElements) *
(UINT32) sizeof (ACPI_PARSE_OBJECT);
(UINT32) sizeof (ACPI_PARSE_OBJECT);
SizeOfMethodTrees = NumMethodElements * (UINT32) sizeof (ACPI_PARSE_OBJECT);
SizeOfNodeEntries = NumNodes * (UINT32) sizeof (ACPI_NAMESPACE_NODE);
SizeOfAcpiObjects = NumNodes * (UINT32) sizeof (ACPI_OPERAND_OBJECT);
@@ -439,6 +439,7 @@ AcpiDbDisplayStatistics (
AcpiOsPrintf ("%16.16s % 10ld% 10ld\n", AcpiUtGetTypeName (i),
AcpiGbl_NodeTypeCount [i], AcpiGbl_ObjTypeCount [i]);
}
AcpiOsPrintf ("%16.16s % 10ld% 10ld\n", "Misc/Unknown",
AcpiGbl_NodeTypeCountMisc, AcpiGbl_ObjTypeCountMisc);
+3 -2
View File
@@ -980,7 +980,8 @@ AcpiDbEvaluateAllPredefinedNames (
ACPI_UINT32_MAX, AcpiDbEvaluateOnePredefinedName, NULL,
(void *) &Info, NULL);
AcpiOsPrintf ("Evaluated %u predefined names in the namespace\n", Info.Count);
AcpiOsPrintf (
"Evaluated %u predefined names in the namespace\n", Info.Count);
}
@@ -1033,7 +1034,7 @@ AcpiDbEvaluateOnePredefinedName (
return (AE_OK);
}
Pathname = AcpiNsGetExternalPathname (Node);
Pathname = AcpiNsGetNormalizedPathname (Node, TRUE);
if (!Pathname)
{
return (AE_OK);
+1
View File
@@ -199,6 +199,7 @@ AcpiDbDumpExternalObject (
{
AcpiOsPrintf ("\n");
}
AcpiUtDebugDumpBuffer (
ACPI_CAST_PTR (UINT8, ObjDesc->Buffer.Pointer),
ObjDesc->Buffer.Length, DB_BYTE_DISPLAY, _COMPONENT);
+90 -1
View File
@@ -150,6 +150,40 @@ AcpiDbStartCommand (
}
/*******************************************************************************
*
* FUNCTION: AcpiDbSignalBreakPoint
*
* PARAMETERS: WalkState - Current walk
*
* RETURN: Status
*
* DESCRIPTION: Called for AML_BREAK_POINT_OP
*
******************************************************************************/
void
AcpiDbSignalBreakPoint (
ACPI_WALK_STATE *WalkState)
{
#ifndef ACPI_APPLICATION
if (AcpiGbl_DbThreadId != AcpiOsGetThreadId ())
{
return;
}
#endif
/*
* Set the single-step flag. This will cause the debugger (if present)
* to break to the console within the AML debugger at the start of the
* next AML instruction.
*/
AcpiGbl_CmSingleStep = TRUE;
AcpiOsPrintf ("**break** Executed AML BreakPoint opcode\n");
}
/*******************************************************************************
*
* FUNCTION: AcpiDbSingleStep
@@ -181,6 +215,13 @@ AcpiDbSingleStep (
ACPI_FUNCTION_ENTRY ();
#ifndef ACPI_APPLICATION
if (AcpiGbl_DbThreadId != AcpiOsGetThreadId ())
{
return (AE_OK);
}
#endif
/* Check the abort flag */
if (AcpiGbl_AbortMethod)
@@ -439,6 +480,10 @@ AcpiInitializeDebugger (
AcpiGbl_DbScopeBuf [1] = 0;
AcpiGbl_DbScopeNode = AcpiGbl_RootNode;
/* Initialize user commands loop */
AcpiGbl_DbTerminateLoop = FALSE;
/*
* If configured for multi-thread support, the debug executor runs in
* a separate thread so that the front end can be in another address
@@ -466,15 +511,21 @@ AcpiInitializeDebugger (
/* Create the debug execution thread to execute commands */
Status = AcpiOsExecute (OSL_DEBUGGER_THREAD,
AcpiGbl_DbThreadsTerminated = FALSE;
Status = AcpiOsExecute (OSL_DEBUGGER_MAIN_THREAD,
AcpiDbExecuteThread, NULL);
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
"Could not start debugger thread"));
AcpiGbl_DbThreadsTerminated = TRUE;
return_ACPI_STATUS (Status);
}
}
else
{
AcpiGbl_DbThreadId = AcpiOsGetThreadId ();
}
return_ACPI_STATUS (AE_OK);
}
@@ -499,6 +550,22 @@ AcpiTerminateDebugger (
void)
{
/* Terminate the AML Debugger */
AcpiGbl_DbTerminateLoop = TRUE;
if (AcpiGbl_DebuggerConfiguration & DEBUGGER_MULTI_THREADED)
{
AcpiOsReleaseMutex (AcpiGbl_DbCommandReady);
/* Wait the AML Debugger threads */
while (!AcpiGbl_DbThreadsTerminated)
{
AcpiOsSleep (100);
}
}
if (AcpiGbl_DbBuffer)
{
AcpiOsFree (AcpiGbl_DbBuffer);
@@ -511,3 +578,25 @@ AcpiTerminateDebugger (
}
ACPI_EXPORT_SYMBOL (AcpiTerminateDebugger)
/*******************************************************************************
*
* FUNCTION: AcpiSetDebuggerThreadId
*
* PARAMETERS: ThreadId - Debugger thread ID
*
* RETURN: None
*
* DESCRIPTION: Set debugger thread ID
*
******************************************************************************/
void
AcpiSetDebuggerThreadId (
ACPI_THREAD_ID ThreadId)
{
AcpiGbl_DbThreadId = ThreadId;
}
ACPI_EXPORT_SYMBOL (AcpiSetDebuggerThreadId)
+6 -1
View File
@@ -254,7 +254,8 @@ AcpiDmByteList (
{
case ACPI_DASM_RESOURCE:
AcpiDmResourceTemplate (Info, Op->Common.Parent, ByteData, ByteCount);
AcpiDmResourceTemplate (
Info, Op->Common.Parent, ByteData, ByteCount);
break;
case ACPI_DASM_STRING:
@@ -751,13 +752,17 @@ AcpiDmPldBuffer (
AcpiOsPrintf (ACPI_PLD_OUTPUT08, "PLD_Lid", PldInfo->Lid);
AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_Panel",
AcpiDmFindNameByIndex(PldInfo->Panel, DmPanelList));
AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_VerticalPosition",
AcpiDmFindNameByIndex(PldInfo->VerticalPosition, DmVerticalPositionList));
AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_HorizontalPosition",
AcpiDmFindNameByIndex(PldInfo->HorizontalPosition, DmHorizontalPositionList));
AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_Shape",
AcpiDmFindNameByIndex(PldInfo->Shape, DmShapeList));
AcpiOsPrintf (ACPI_PLD_OUTPUT08, "PLD_GroupOrientation", PldInfo->GroupOrientation);
AcpiOsPrintf (ACPI_PLD_OUTPUT08, "PLD_GroupToken", PldInfo->GroupToken);
AcpiOsPrintf (ACPI_PLD_OUTPUT08, "PLD_GroupPosition", PldInfo->GroupPosition);
AcpiOsPrintf (ACPI_PLD_OUTPUT08, "PLD_Bay", PldInfo->Bay);
@@ -685,6 +685,7 @@ AcpiDmGetCompoundSymbol (
default:
/* No operator string for all other opcodes */
return (NULL);
}
+2 -1
View File
@@ -105,7 +105,8 @@ AcpiDmParseDeferredOps (
case AML_PACKAGE_OP:
case AML_VAR_PACKAGE_OP:
Status = AcpiDmDeferredParse (Op, Op->Named.Data, Op->Named.Length);
Status = AcpiDmDeferredParse (
Op, Op->Named.Data, Op->Named.Length);
if (ACPI_FAILURE (Status))
{
return (Status);
+7 -6
View File
@@ -155,15 +155,15 @@ AcpiPsDisplayObjectPathname (
/* Node not defined in this scope, look it up */
Status = AcpiNsLookup (WalkState->ScopeInfo, Op->Common.Value.String,
ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
WalkState, &(Node));
ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
WalkState, &(Node));
if (ACPI_FAILURE (Status))
{
/*
* We can't get the pathname since the object
* is not in the namespace. This can happen during single
* stepping where a dynamic named object is *about* to be created.
* We can't get the pathname since the object is not in the
* namespace. This can happen during single stepping
* where a dynamic named object is *about* to be created.
*/
AcpiOsPrintf (" [Path not found]");
goto Exit;
@@ -269,6 +269,7 @@ AcpiDmNamestring (
AcpiOsPrintf (".");
}
Name += ACPI_NAME_SIZE;
}
}
@@ -332,7 +333,6 @@ AcpiDmDisplayPath (
}
Prev = NULL; /* Start with Root Node */
while (Prev != Op)
{
/* Search upwards in the tree to find scope with "prev" as its parent */
@@ -390,6 +390,7 @@ AcpiDmDisplayPath (
DoDot = TRUE;
}
}
Prev = Search;
}
}
+5 -2
View File
@@ -820,7 +820,9 @@ AcpiDmDisassembleOneOp (
}
else if (Status == AE_AML_NO_RESOURCE_END_TAG)
{
AcpiOsPrintf ("/**** Is ResourceTemplate, but EndTag not at buffer end ****/ ");
AcpiOsPrintf (
"/**** Is ResourceTemplate, "
"but EndTag not at buffer end ****/ ");
}
}
@@ -895,7 +897,8 @@ AcpiDmDisassembleOneOp (
if (Op->Common.AmlOpcode == AML_INT_EXTACCESSFIELD_OP)
{
AcpiOsPrintf (" (0x%2.2X)", (unsigned) ((Op->Common.Value.Integer >> 16) & 0xFF));
AcpiOsPrintf (" (0x%2.2X)", (unsigned)
((Op->Common.Value.Integer >> 16) & 0xFF));
}
AcpiOsPrintf (")");
+5 -2
View File
@@ -212,6 +212,7 @@ AcpiDmBitList (
{
AcpiOsPrintf (",");
}
Previous = TRUE;
AcpiOsPrintf ("%u", i);
}
@@ -285,7 +286,8 @@ AcpiDmResourceTemplate (
Status = AcpiUtValidateResource (NULL, Aml, &ResourceIndex);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("/*** Could not validate Resource, type (%X) %s***/\n",
AcpiOsPrintf (
"/*** Could not validate Resource, type (%X) %s***/\n",
ResourceType, AcpiFormatException (Status));
return;
}
@@ -335,7 +337,8 @@ AcpiDmResourceTemplate (
AcpiDmIndent (Level);
AcpiOsPrintf (
"/*** Disassembler: inserted missing EndDependentFn () ***/\n");
"/*** Disassembler: inserted "
"missing EndDependentFn () ***/\n");
}
return;
+12 -6
View File
@@ -307,7 +307,8 @@ AcpiDmAddressCommon (
if ((ResourceType > 2) && (ResourceType < 0xC0))
{
AcpiOsPrintf ("/**** Invalid Resource Type: 0x%X ****/", ResourceType);
AcpiOsPrintf (
"/**** Invalid Resource Type: 0x%X ****/", ResourceType);
return;
}
@@ -327,7 +328,8 @@ AcpiDmAddressCommon (
/* This is either a Memory, IO, or BusNumber descriptor (0,1,2) */
AcpiOsPrintf ("%s (", AcpiGbl_WordDecode [ACPI_GET_2BIT_FLAG (ResourceType)]);
AcpiOsPrintf ("%s (",
AcpiGbl_WordDecode [ACPI_GET_2BIT_FLAG (ResourceType)]);
/* Decode the general and type-specific flags */
@@ -340,7 +342,8 @@ AcpiDmAddressCommon (
AcpiDmIoFlags (Flags);
if (ResourceType == ACPI_IO_RANGE)
{
AcpiOsPrintf (" %s,", AcpiGbl_RngDecode [ACPI_GET_2BIT_FLAG (SpecificFlags)]);
AcpiOsPrintf (" %s,",
AcpiGbl_RngDecode [ACPI_GET_2BIT_FLAG (SpecificFlags)]);
}
}
}
@@ -735,7 +738,8 @@ AcpiDmExtendedDescriptor (
/* Dump resource name and flags */
AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64, Level);
AcpiDmAddressCommon (
Resource, ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64, Level);
/* Dump the 5 contiguous QWORD values */
@@ -871,10 +875,12 @@ AcpiDmFixedMemory32Descriptor (
AcpiGbl_RwDecode [ACPI_GET_1BIT_FLAG (Resource->FixedMemory32.Flags)]);
AcpiDmIndent (Level + 1);
AcpiDmDumpInteger32 (Resource->FixedMemory32.Address, "Address Base");
AcpiDmDumpInteger32 (Resource->FixedMemory32.Address,
"Address Base");
AcpiDmIndent (Level + 1);
AcpiDmDumpInteger32 (Resource->FixedMemory32.AddressLength, "Address Length");
AcpiDmDumpInteger32 (Resource->FixedMemory32.AddressLength,
"Address Length");
/* Insert a descriptor name */
+7 -3
View File
@@ -152,6 +152,7 @@ AcpiDmDumpRawDataBuffer (
AcpiOsPrintf (", ");
}
AcpiOsPrintf ("\n");
AcpiDmIndent (Level + 2);
@@ -197,7 +198,8 @@ AcpiDmGpioCommon (
AcpiDmIndent (Level + 1);
if (Resource->Gpio.ResSourceOffset)
{
DeviceName = ACPI_ADD_PTR (char, Resource, Resource->Gpio.ResSourceOffset),
DeviceName = ACPI_ADD_PTR (char,
Resource, Resource->Gpio.ResSourceOffset),
AcpiUtPrintString (DeviceName, ACPI_UINT16_MAX);
}
@@ -241,13 +243,15 @@ AcpiDmGpioCommon (
for (i = 0; i < PinCount; i++)
{
AcpiDmIndent (Level + 2);
AcpiOsPrintf ("0x%4.4X%s\n", PinList[i], ((i + 1) < PinCount) ? "," : "");
AcpiOsPrintf ("0x%4.4X%s\n", PinList[i],
((i + 1) < PinCount) ? "," : "");
}
AcpiDmIndent (Level + 1);
AcpiOsPrintf ("}\n");
MpSaveGpioInfo (Info->MappingOp, Resource, PinCount, PinList, DeviceName);
MpSaveGpioInfo (Info->MappingOp, Resource,
PinCount, PinList, DeviceName);
}
+2 -1
View File
@@ -171,7 +171,8 @@ AcpiDmFixedDmaDescriptor (
}
else
{
AcpiOsPrintf ("%X /* INVALID DMA WIDTH */, ", Resource->FixedDma.Width);
AcpiOsPrintf ("%X /* INVALID DMA WIDTH */, ",
Resource->FixedDma.Width);
}
/* Insert a descriptor name */
+7 -7
View File
@@ -464,7 +464,7 @@ AcpiDmDescendingOp (
if (Info->WalkState)
{
AmlOffset = (UINT32) ACPI_PTR_DIFF (Op->Common.Aml,
Info->WalkState->ParserState.AmlStart);
Info->WalkState->ParserState.AmlStart);
if (AcpiGbl_DmOpt_Verbose)
{
AcpiOsPrintf (DB_FULL_OP_INFO,
@@ -487,8 +487,8 @@ AcpiDmDescendingOp (
}
}
else if ((AcpiDmBlockType (Op->Common.Parent) & BLOCK_BRACE) &&
(!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) &&
(Op->Common.AmlOpcode != AML_INT_BYTELIST_OP))
(!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) &&
(Op->Common.AmlOpcode != AML_INT_BYTELIST_OP))
{
/*
* This is a first-level element of a term list,
@@ -906,8 +906,8 @@ AcpiDmAscendingOp (
if (!AcpiDmCommaIfListMember (Op))
{
if ((AcpiDmBlockType (Op->Common.Parent) & BLOCK_BRACE) &&
(!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) &&
(Op->Common.AmlOpcode != AML_INT_BYTELIST_OP))
(!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) &&
(Op->Common.AmlOpcode != AML_INT_BYTELIST_OP))
{
/*
* This is a first-level element of a term list
@@ -968,8 +968,8 @@ AcpiDmAscendingOp (
if (!AcpiDmCommaIfListMember (Op))
{
if ((AcpiDmBlockType (Op->Common.Parent) & BLOCK_BRACE) &&
(!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) &&
(Op->Common.AmlOpcode != AML_INT_BYTELIST_OP))
(!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) &&
(Op->Common.AmlOpcode != AML_INT_BYTELIST_OP))
{
/*
* This is a first-level element of a term list

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