Import ACPICA 20191018.
This commit is contained in:
parent
e63852a753
commit
858f47305d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/vendor-sys/acpica/dist/; revision=353735 svn path=/vendor-sys/acpica/20191018/; revision=353736; tag=vendor/acpica/20191018
47
changes.txt
47
changes.txt
@ -1,3 +1,50 @@
|
||||
----------------------------------------
|
||||
18 October 2019. Summary of changes for version 20191018:
|
||||
|
||||
|
||||
1) ACPICA kernel-resident subsystem:
|
||||
|
||||
Debugger: added a new command: ?Fields [address space ID]?. This command
|
||||
dumps the contents of all field units that are defined within the
|
||||
namespace with a particular address space ID.
|
||||
|
||||
Modified the external interface AcpiLoadTable() to return a table index.
|
||||
This table index can be used for unloading a table for debugging.
|
||||
ACPI_STATUS
|
||||
AcpiLoadTable (
|
||||
ACPI_TABLE_HEADER *Table,
|
||||
UINT32 *TableIndex))
|
||||
|
||||
Implemented a new external interface: AcpiUnloadTable() This new function
|
||||
takes a table index as an argument and unloads the table. Useful for
|
||||
debugging only.
|
||||
ACPI_STATUS
|
||||
AcpiUnloadTable (
|
||||
UINT32 TableIndex))
|
||||
|
||||
Ported the AcpiNames utility to use the new table initialization
|
||||
sequence. The utility was broken before this change. Also, it was
|
||||
required to include most of the AML interpreter into the utility in order
|
||||
to process table initialization (module-level code execution.)
|
||||
|
||||
Update for results from running Clang V8.0.1. This fixes all "dead
|
||||
assignment" warnings. There are still several "Dereference of NULL
|
||||
pointer" warnings, but these have been found to be false positive
|
||||
warnings.
|
||||
|
||||
|
||||
2) iASL Compiler/Disassembler and ACPICA tools:
|
||||
|
||||
iASL: numerous table compiler changes to ensure that the usage of
|
||||
yacc/bison syntax is POSIX-compliant.
|
||||
|
||||
iASL/disassembler: several simple bug fixes in the data table
|
||||
disassembler.
|
||||
|
||||
Acpiexec: expanded the initialization file (the -fi option) to initialize
|
||||
strings, buffers, packages, and field units.
|
||||
|
||||
|
||||
----------------------------------------
|
||||
16 August 2019. Summary of changes for version 20190816:
|
||||
|
||||
|
@ -22,7 +22,9 @@ PROG = $(OBJDIR)/acpinames
|
||||
vpath %.c \
|
||||
$(ACPINAMES)\
|
||||
$(ACPICA_DISPATCHER)\
|
||||
$(ACPICA_EVENTS)\
|
||||
$(ACPICA_EXECUTER)\
|
||||
$(ACPICA_HARDWARE)\
|
||||
$(ACPICA_NAMESPACE)\
|
||||
$(ACPICA_PARSER)\
|
||||
$(ACPICA_TABLES)\
|
||||
@ -39,34 +41,69 @@ OBJECTS = \
|
||||
$(OBJDIR)/anstubs.o\
|
||||
$(OBJDIR)/antables.o\
|
||||
$(OBJDIR)/cmfsize.o\
|
||||
$(OBJDIR)/dscontrol.o\
|
||||
$(OBJDIR)/dsdebug.o\
|
||||
$(OBJDIR)/dsfield.o\
|
||||
$(OBJDIR)/dsinit.o\
|
||||
$(OBJDIR)/dsmethod.o\
|
||||
$(OBJDIR)/dsmthdat.o\
|
||||
$(OBJDIR)/dsobject.o\
|
||||
$(OBJDIR)/dsopcode.o\
|
||||
$(OBJDIR)/dspkginit.o\
|
||||
$(OBJDIR)/dsutils.o\
|
||||
$(OBJDIR)/dswexec.o\
|
||||
$(OBJDIR)/dswload.o\
|
||||
$(OBJDIR)/dswload2.o\
|
||||
$(OBJDIR)/dswscope.o\
|
||||
$(OBJDIR)/dswstate.o\
|
||||
$(OBJDIR)/evhandler.o\
|
||||
$(OBJDIR)/evmisc.o\
|
||||
$(OBJDIR)/evregion.o\
|
||||
$(OBJDIR)/evrgnini.o\
|
||||
$(OBJDIR)/evxfregn.o\
|
||||
$(OBJDIR)/exconcat.o\
|
||||
$(OBJDIR)/exconfig.o\
|
||||
$(OBJDIR)/exconvrt.o\
|
||||
$(OBJDIR)/excreate.o\
|
||||
$(OBJDIR)/exdump.o\
|
||||
$(OBJDIR)/exfield.o\
|
||||
$(OBJDIR)/exfldio.o\
|
||||
$(OBJDIR)/exmisc.o\
|
||||
$(OBJDIR)/exmutex.o\
|
||||
$(OBJDIR)/exnames.o\
|
||||
$(OBJDIR)/exoparg1.o\
|
||||
$(OBJDIR)/exoparg2.o\
|
||||
$(OBJDIR)/exoparg3.o\
|
||||
$(OBJDIR)/exoparg6.o\
|
||||
$(OBJDIR)/exprep.o\
|
||||
$(OBJDIR)/exregion.o\
|
||||
$(OBJDIR)/exresnte.o\
|
||||
$(OBJDIR)/exresolv.o\
|
||||
$(OBJDIR)/exresop.o\
|
||||
$(OBJDIR)/exserial.o\
|
||||
$(OBJDIR)/exstore.o\
|
||||
$(OBJDIR)/exstoren.o\
|
||||
$(OBJDIR)/exstorob.o\
|
||||
$(OBJDIR)/exsystem.o\
|
||||
$(OBJDIR)/exutils.o\
|
||||
$(OBJDIR)/getopt.o\
|
||||
$(OBJDIR)/hwpci.o\
|
||||
$(OBJDIR)/hwvalid.o\
|
||||
$(OBJDIR)/nsaccess.o\
|
||||
$(OBJDIR)/nsalloc.o\
|
||||
$(OBJDIR)/nsarguments.o\
|
||||
$(OBJDIR)/nsconvert.o\
|
||||
$(OBJDIR)/nsdump.o\
|
||||
$(OBJDIR)/nseval.o\
|
||||
$(OBJDIR)/nsinit.o\
|
||||
$(OBJDIR)/nsload.o\
|
||||
$(OBJDIR)/nsnames.o\
|
||||
$(OBJDIR)/nsobject.o\
|
||||
$(OBJDIR)/nsparse.o\
|
||||
$(OBJDIR)/nspredef.o\
|
||||
$(OBJDIR)/nsprepkg.o\
|
||||
$(OBJDIR)/nsrepair.o\
|
||||
$(OBJDIR)/nsrepair2.o\
|
||||
$(OBJDIR)/nssearch.o\
|
||||
$(OBJDIR)/nsutils.o\
|
||||
$(OBJDIR)/nswalk.o\
|
||||
@ -99,6 +136,7 @@ OBJECTS = \
|
||||
$(OBJDIR)/utascii.o\
|
||||
$(OBJDIR)/utbuffer.o\
|
||||
$(OBJDIR)/utcache.o\
|
||||
$(OBJDIR)/utcopy.o\
|
||||
$(OBJDIR)/utdebug.o\
|
||||
$(OBJDIR)/utdecode.o\
|
||||
$(OBJDIR)/utdelete.o\
|
||||
@ -117,8 +155,12 @@ OBJECTS = \
|
||||
$(OBJDIR)/utobject.o\
|
||||
$(OBJDIR)/utosi.o\
|
||||
$(OBJDIR)/utownerid.o\
|
||||
$(OBJDIR)/utpredef.o\
|
||||
$(OBJDIR)/utresrc.o\
|
||||
$(OBJDIR)/utstate.o\
|
||||
$(OBJDIR)/utstring.o\
|
||||
$(OBJDIR)/utstrsuppt.o\
|
||||
$(OBJDIR)/utstrtoul64.o\
|
||||
$(OBJDIR)/utxface.o\
|
||||
$(OBJDIR)/utxferror.o\
|
||||
$(OBJDIR)/utxfinit.o
|
||||
|
@ -532,7 +532,7 @@ AcpiOsGetLine (
|
||||
* Ignore the various keys like insert/delete/home/end, etc.
|
||||
* But we must eat the final character of the ESC sequence.
|
||||
*/
|
||||
InputChar = getchar ();
|
||||
(void) getchar ();
|
||||
continue;
|
||||
|
||||
default:
|
||||
|
@ -746,7 +746,6 @@ AdDoExternalFileList (
|
||||
{
|
||||
ExternalFileList = ExternalFileList->Next;
|
||||
GlobalStatus = AE_TYPE;
|
||||
Status = AE_OK;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -601,7 +601,9 @@ AcpiDmFindOrphanDescending (
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
#ifdef ACPI_UNDER_DEVELOPMENT
|
||||
OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
|
||||
#endif
|
||||
|
||||
switch (Op->Common.AmlOpcode)
|
||||
{
|
||||
@ -1100,7 +1102,7 @@ AcpiDmCommonDescendingOp (
|
||||
/* Switch/Case conversion */
|
||||
|
||||
Status = AcpiDmProcessSwitch (Op);
|
||||
return (AE_OK);
|
||||
return (Status);
|
||||
}
|
||||
|
||||
|
||||
|
@ -327,7 +327,7 @@ AdCreateTableHeader (
|
||||
* makes it easier to rename the disassembled ASL file if needed.
|
||||
*/
|
||||
AcpiOsPrintf (
|
||||
"DefinitionBlock (\"\", \"%4.4s\", %hu, \"%.6s\", \"%.8s\", 0x%8.8X)\n",
|
||||
"DefinitionBlock (\"\", \"%4.4s\", %u, \"%.6s\", \"%.8s\", 0x%8.8X)\n",
|
||||
Table->Signature, Table->Revision,
|
||||
Table->OemId, Table->OemTableId, Table->OemRevision);
|
||||
}
|
||||
@ -601,7 +601,7 @@ AdParseTable (
|
||||
fprintf (stderr,
|
||||
"Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)\n");
|
||||
|
||||
Status = AcpiDmParseDeferredOps (AcpiGbl_ParseOpRoot);
|
||||
(void) AcpiDmParseDeferredOps (AcpiGbl_ParseOpRoot);
|
||||
fprintf (stderr, "\n");
|
||||
|
||||
/* Process Resource Templates */
|
||||
|
@ -474,7 +474,6 @@ AcpiDmDumpCsrt (
|
||||
{
|
||||
return;
|
||||
}
|
||||
SubSubOffset += InfoLength;
|
||||
}
|
||||
|
||||
/* Point to next sub-subtable */
|
||||
@ -1401,7 +1400,6 @@ AcpiDmDumpHmat (
|
||||
while (Offset < Table->Length)
|
||||
{
|
||||
AcpiOsPrintf ("\n");
|
||||
SubtableOffset = 0;
|
||||
|
||||
/* Dump HMAT structure header */
|
||||
|
||||
@ -1484,6 +1482,11 @@ AcpiDmDumpHmat (
|
||||
Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
|
||||
ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset),
|
||||
4, AcpiDmTableInfoHmat1a);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SubtableOffset += 4;
|
||||
}
|
||||
|
||||
@ -1500,6 +1503,11 @@ AcpiDmDumpHmat (
|
||||
Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
|
||||
ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset),
|
||||
4, AcpiDmTableInfoHmat1b);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SubtableOffset += 4;
|
||||
}
|
||||
|
||||
@ -1519,6 +1527,11 @@ AcpiDmDumpHmat (
|
||||
Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
|
||||
ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset),
|
||||
2, AcpiDmTableInfoHmat1c);
|
||||
if (ACPI_FAILURE(Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SubtableOffset += 2;
|
||||
}
|
||||
}
|
||||
@ -1542,6 +1555,11 @@ AcpiDmDumpHmat (
|
||||
Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
|
||||
ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset),
|
||||
2, AcpiDmTableInfoHmat2a);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SubtableOffset += 2;
|
||||
}
|
||||
break;
|
||||
|
@ -187,6 +187,7 @@ AcpiDmDumpIort (
|
||||
ACPI_DMTABLE_INFO *InfoTable;
|
||||
char *String;
|
||||
UINT32 i;
|
||||
UINT32 MappingByteLength;
|
||||
|
||||
|
||||
/* Main table */
|
||||
@ -314,6 +315,11 @@ AcpiDmDumpIort (
|
||||
Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset,
|
||||
ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, NodeOffset),
|
||||
4, AcpiDmTableInfoIort0a);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
NodeOffset += 4;
|
||||
}
|
||||
}
|
||||
@ -325,8 +331,10 @@ AcpiDmDumpIort (
|
||||
|
||||
if (IortNode->Length > NodeOffset)
|
||||
{
|
||||
MappingByteLength =
|
||||
IortNode->MappingCount * sizeof (ACPI_IORT_ID_MAPPING);
|
||||
Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset,
|
||||
Table, IortNode->Length - NodeOffset,
|
||||
Table, IortNode->Length - NodeOffset - MappingByteLength,
|
||||
AcpiDmTableInfoIort1a);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
@ -410,7 +418,6 @@ AcpiDmDumpIort (
|
||||
/* Point to next node subtable */
|
||||
|
||||
Offset += IortNode->Length;
|
||||
IortNode = ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, IortNode->Length);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1211,7 +1218,6 @@ AcpiDmDumpNfit (
|
||||
/* Has a variable number of 32-bit values at the end */
|
||||
|
||||
InfoTable = AcpiDmTableInfoNfit2;
|
||||
Interleave = ACPI_CAST_PTR (ACPI_NFIT_INTERLEAVE, Subtable);
|
||||
FieldOffset = sizeof (ACPI_NFIT_INTERLEAVE);
|
||||
break;
|
||||
|
||||
@ -1236,7 +1242,6 @@ AcpiDmDumpNfit (
|
||||
/* Has a variable number of 64-bit addresses at the end */
|
||||
|
||||
InfoTable = AcpiDmTableInfoNfit6;
|
||||
Hint = ACPI_CAST_PTR (ACPI_NFIT_FLUSH_ADDRESS, Subtable);
|
||||
FieldOffset = sizeof (ACPI_NFIT_FLUSH_ADDRESS) - sizeof (UINT64);
|
||||
break;
|
||||
|
||||
@ -1273,6 +1278,7 @@ AcpiDmDumpNfit (
|
||||
{
|
||||
case ACPI_NFIT_TYPE_INTERLEAVE:
|
||||
|
||||
Interleave = ACPI_CAST_PTR (ACPI_NFIT_INTERLEAVE, Subtable);
|
||||
for (i = 0; i < Interleave->LineCount; i++)
|
||||
{
|
||||
Status = AcpiDmDumpTable (Table->Length, Offset + FieldOffset,
|
||||
@ -1308,6 +1314,7 @@ AcpiDmDumpNfit (
|
||||
|
||||
case ACPI_NFIT_TYPE_FLUSH_ADDRESS:
|
||||
|
||||
Hint = ACPI_CAST_PTR (ACPI_NFIT_FLUSH_ADDRESS, Subtable);
|
||||
for (i = 0; i < Hint->HintCount; i++)
|
||||
{
|
||||
Status = AcpiDmDumpTable (Table->Length, Offset + FieldOffset,
|
||||
@ -1806,6 +1813,11 @@ AcpiDmDumpPptt (
|
||||
Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
|
||||
ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Subtable, SubtableOffset),
|
||||
4, AcpiDmTableInfoPptt0a);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SubtableOffset += 4;
|
||||
}
|
||||
break;
|
||||
@ -2063,6 +2075,10 @@ AcpiDmDumpSdev (
|
||||
Status = AcpiDmDumpTable (Table->Length, 0,
|
||||
ACPI_ADD_PTR (UINT8, Pcie, VendorDataOffset),
|
||||
VendorDataLength, AcpiDmTableInfoSdev1b);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -410,7 +410,7 @@ AcpiDmDumpStao (
|
||||
Namepath = ACPI_ADD_PTR (char, Table, Offset);
|
||||
StringLength = strlen (Namepath) + 1;
|
||||
|
||||
AcpiDmLineHeader (Offset, StringLength, "Namestring");
|
||||
AcpiDmLineHeader (Offset, StringLength, "Namepath");
|
||||
AcpiOsPrintf ("\"%s\"\n", Namepath);
|
||||
|
||||
/* Point to next namepath */
|
||||
@ -526,7 +526,7 @@ AcpiDmDumpTpm2Rev3 (
|
||||
{
|
||||
case ACPI_TPM23_ACPI_START_METHOD:
|
||||
|
||||
Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
|
||||
(void) AcpiDmDumpTable (Table->Length, Offset, Subtable,
|
||||
Table->Length - Offset, AcpiDmTableInfoTpm23a);
|
||||
break;
|
||||
|
||||
@ -591,7 +591,7 @@ AcpiDmDumpTpm2 (
|
||||
Offset += sizeof (ACPI_TPM2_TRAILER);
|
||||
|
||||
AcpiOsPrintf ("\n");
|
||||
Status = AcpiDmDumpTable (Table->Length, Offset, ArmSubtable,
|
||||
(void) AcpiDmDumpTable (Table->Length, Offset, ArmSubtable,
|
||||
Table->Length - Offset, AcpiDmTableInfoTpm211);
|
||||
break;
|
||||
|
||||
|
@ -569,7 +569,7 @@ ApCheckForGpeNameConflict (
|
||||
|
||||
/* Need a null-terminated string version of NameSeg */
|
||||
|
||||
ACPI_MOVE_32_TO_32 (Name, &Op->Asl.NameSeg);
|
||||
ACPI_MOVE_32_TO_32 (Name, Op->Asl.NameSeg);
|
||||
Name[ACPI_NAMESEG_SIZE] = 0;
|
||||
|
||||
/*
|
||||
|
@ -474,7 +474,6 @@ AnFormatBtype (
|
||||
strcat (Buffer, "|");
|
||||
}
|
||||
|
||||
First = FALSE;
|
||||
strcat (Buffer, "Resource");
|
||||
}
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ AddressKeyword
|
||||
;
|
||||
|
||||
AddressSpaceKeyword
|
||||
: ByteConst {$$ = UtCheckIntegerRange ($1, 0x0A, 0xFF);}
|
||||
: ByteConst {$$ = UtCheckIntegerRange ($1, ACPI_NUM_PREDEFINED_REGIONS, 0xFF);}
|
||||
| RegionSpaceKeyword {}
|
||||
;
|
||||
|
||||
|
@ -526,13 +526,12 @@ LdNamespace1Begin (
|
||||
|
||||
case AML_INT_CONNECTION_OP:
|
||||
|
||||
|
||||
if (Op->Asl.Child->Asl.AmlOpcode != AML_INT_NAMEPATH_OP)
|
||||
{
|
||||
break;
|
||||
}
|
||||
Arg = Op->Asl.Child;
|
||||
|
||||
Arg = Op->Asl.Child;
|
||||
Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Asl.ExternalName,
|
||||
ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
|
||||
WalkState, &Node);
|
||||
@ -541,15 +540,6 @@ LdNamespace1Begin (
|
||||
break;
|
||||
}
|
||||
|
||||
if (Node->Type == ACPI_TYPE_BUFFER)
|
||||
{
|
||||
Arg->Asl.Node = Node;
|
||||
|
||||
Arg = Node->Op->Asl.Child; /* Get namepath */
|
||||
Arg = Arg->Asl.Next; /* Get actual buffer */
|
||||
Arg = Arg->Asl.Child; /* Buffer length */
|
||||
Arg = Arg->Asl.Next; /* RAW_DATA buffer */
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -576,7 +566,6 @@ LdNamespace1Begin (
|
||||
* These opcodes are guaranteed to have a parent.
|
||||
* Examine the parent opcode.
|
||||
*/
|
||||
Status = AE_OK;
|
||||
ParentOp = Op->Asl.Parent;
|
||||
OpInfo = AcpiPsGetOpcodeInfo (ParentOp->Asl.AmlOpcode);
|
||||
|
||||
|
@ -387,7 +387,10 @@ const char *AslTableCompilerMsgs [] =
|
||||
/* ASL_MSG_UNKNOWN_LABEL */ "Label is undefined",
|
||||
/* ASL_MSG_UNKNOWN_SUBTABLE */ "Unknown subtable type",
|
||||
/* ASL_MSG_UNKNOWN_TABLE */ "Unknown ACPI table signature",
|
||||
/* ASL_MSG_ZERO_VALUE */ "Value must be non-zero"
|
||||
/* ASL_MSG_ZERO_VALUE */ "Value must be non-zero",
|
||||
/* ASL_MSG_INVALID_LABEL */ "Invalid field label detected",
|
||||
/* ASL_MSG_BUFFER_LIST */ "Invalid buffer initializer list",
|
||||
/* ASL_MSG_ENTRY_LIST */ "Invalid entry initializer list"
|
||||
};
|
||||
|
||||
/* Preprocessor */
|
||||
|
@ -387,6 +387,9 @@ typedef enum
|
||||
ASL_MSG_UNKNOWN_SUBTABLE,
|
||||
ASL_MSG_UNKNOWN_TABLE,
|
||||
ASL_MSG_ZERO_VALUE,
|
||||
ASL_MSG_INVALID_LABEL,
|
||||
ASL_MSG_BUFFER_LIST,
|
||||
ASL_MSG_ENTRY_LIST,
|
||||
|
||||
/* These messages are used by the Preprocessor only */
|
||||
|
||||
|
@ -199,6 +199,8 @@ MtMethodAnalysisWalkBegin (
|
||||
ACPI_PARSE_OBJECT *NextType;
|
||||
ACPI_PARSE_OBJECT *NextParamType;
|
||||
UINT8 ActualArgs = 0;
|
||||
BOOLEAN HidExists;
|
||||
BOOLEAN AdrExists;
|
||||
|
||||
|
||||
/* Build cross-reference output file if requested */
|
||||
@ -535,12 +537,26 @@ MtMethodAnalysisWalkBegin (
|
||||
|
||||
case PARSEOP_DEVICE:
|
||||
|
||||
if (!ApFindNameInDeviceTree (METHOD_NAME__HID, Op) &&
|
||||
!ApFindNameInDeviceTree (METHOD_NAME__ADR, Op))
|
||||
/* Check usage of _HID and _ADR objects */
|
||||
|
||||
HidExists = ApFindNameInDeviceTree (METHOD_NAME__HID, Op);
|
||||
AdrExists = ApFindNameInDeviceTree (METHOD_NAME__ADR, Op);
|
||||
|
||||
if (!HidExists && !AdrExists)
|
||||
{
|
||||
AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
|
||||
"Device object requires a _HID or _ADR in same scope");
|
||||
}
|
||||
else if (HidExists && AdrExists)
|
||||
{
|
||||
/*
|
||||
* According to the ACPI spec, "A device object must contain
|
||||
* either an _HID object or an _ADR object, but should not contain
|
||||
* both".
|
||||
*/
|
||||
AslError (ASL_WARNING, ASL_MSG_MULTIPLE_TYPES, Op,
|
||||
"Device object requires either a _HID or _ADR, but not both");
|
||||
}
|
||||
break;
|
||||
|
||||
case PARSEOP_EVENT:
|
||||
|
@ -234,6 +234,10 @@ NsDisplayNamespace (
|
||||
Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
|
||||
ACPI_UINT32_MAX, FALSE, NsDoOneNamespaceObject, NULL,
|
||||
NULL, NULL);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
|
||||
/* Print the full pathname for each namespace node */
|
||||
|
||||
|
@ -458,7 +458,7 @@ ApCheckPackage (
|
||||
|
||||
for (i = 0; i < Package->RetInfo4.Count1; ++i)
|
||||
{
|
||||
Status = ApCheckObjectType (Predefined->Info.Name, Op,
|
||||
ApCheckObjectType (Predefined->Info.Name, Op,
|
||||
Package->RetInfo4.ObjectType1, i);
|
||||
Op = Op->Asl.Next;
|
||||
}
|
||||
|
@ -1226,7 +1226,7 @@ RsDoResourceTemplate (
|
||||
BufferOp->Asl.AmlOpcode = AML_RAW_DATA_CHAIN;
|
||||
BufferOp->Asl.AmlOpcodeLength = 0;
|
||||
BufferOp->Asl.AmlLength = CurrentByteOffset;
|
||||
BufferOp->Asl.Value.Buffer = (UINT8 *) HeadRnode.Next;
|
||||
BufferOp->Asl.Value.Buffer = ACPI_CAST_PTR (UINT8, HeadRnode.Next);
|
||||
BufferOp->Asl.CompileFlags |= OP_IS_RESOURCE_DATA;
|
||||
UtSetParseOpName (BufferOp);
|
||||
|
||||
|
@ -487,10 +487,7 @@ RsDoInterruptDescriptor (
|
||||
|
||||
if (StringLength && ResSourceString)
|
||||
{
|
||||
|
||||
strcpy ((char *) Rover, (char *) ResSourceString);
|
||||
Rover = ACPI_ADD_PTR (
|
||||
AML_RESOURCE, &(Rover->ByteItem), StringLength);
|
||||
|
||||
Descriptor->ExtendedIrq.ResourceLength = (UINT16)
|
||||
(Descriptor->ExtendedIrq.ResourceLength + StringLength);
|
||||
|
@ -674,7 +674,6 @@ RsDoGpioIoDescriptor (
|
||||
ResSourceLength = RsGetStringDataLength (InitializerOp);
|
||||
VendorLength = RsGetBufferDataLength (InitializerOp);
|
||||
InterruptLength = RsGetInterruptDataLength (InitializerOp, 10);
|
||||
PinList = InterruptList;
|
||||
|
||||
DescriptorSize = ACPI_AML_SIZE_LARGE (AML_RESOURCE_GPIO) +
|
||||
ResSourceLength + VendorLength + InterruptLength;
|
||||
|
@ -223,7 +223,7 @@ UtQueryForOverwrite (
|
||||
char *Pathname)
|
||||
{
|
||||
struct stat StatInfo;
|
||||
int InChar = 0x34;
|
||||
int InChar;
|
||||
|
||||
|
||||
if (!stat (Pathname, &StatInfo))
|
||||
|
@ -544,8 +544,11 @@ CvSwitchFiles(
|
||||
Current = Current->Parent;
|
||||
}
|
||||
|
||||
/* Redirect output to Op->Common.CvFilename */
|
||||
if (FNode)
|
||||
{
|
||||
/* Redirect output to Op->Common.CvFilename */
|
||||
|
||||
AcpiOsRedirectOutput (FNode->File);
|
||||
AcpiGbl_CurrentFilename = FNode->Filename;
|
||||
AcpiOsRedirectOutput (FNode->File);
|
||||
AcpiGbl_CurrentFilename = FNode->Filename;
|
||||
}
|
||||
}
|
||||
|
@ -912,7 +912,6 @@ CvCaptureCommentsOnly (
|
||||
|
||||
/* Not a valid comment option. Revert the AML */
|
||||
|
||||
Aml -= 2;
|
||||
goto DefBlock;
|
||||
|
||||
} /* End switch statement */
|
||||
|
@ -276,7 +276,10 @@ DtDoCompile (
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
FileNode->ParserErrorDetected = TRUE;
|
||||
if (FileNode)
|
||||
{
|
||||
FileNode->ParserErrorDetected = TRUE;
|
||||
}
|
||||
|
||||
/* TBD: temporary error message. Msgs should come from function above */
|
||||
|
||||
@ -572,7 +575,7 @@ DtCompileTable (
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
|
||||
|
||||
if (!Field)
|
||||
if (!Field || !Info)
|
||||
{
|
||||
return (AE_BAD_PARAMETER);
|
||||
}
|
||||
@ -643,6 +646,14 @@ DtCompileTable (
|
||||
FieldType = DtGetFieldType (Info);
|
||||
AslGbl_InputFieldCount++;
|
||||
|
||||
if (FieldType != DT_FIELD_TYPE_INLINE_SUBTABLE &&
|
||||
strcmp (Info->Name, LocalField->Name))
|
||||
{
|
||||
sprintf (AslGbl_MsgBuffer, "found \"%s\" expected \"%s\"",
|
||||
LocalField->Name, Info->Name);
|
||||
DtError (ASL_ERROR, ASL_MSG_INVALID_LABEL, LocalField, AslGbl_MsgBuffer);
|
||||
}
|
||||
|
||||
switch (FieldType)
|
||||
{
|
||||
case DT_FIELD_TYPE_FLAGS_INTEGER:
|
||||
|
@ -210,6 +210,17 @@ typedef struct dt_field
|
||||
|
||||
#define DT_FIELD_NOT_ALLOCATED 1
|
||||
|
||||
/*
|
||||
* Structure used for each individual key or value
|
||||
*/
|
||||
typedef struct dt_table_unit
|
||||
{
|
||||
char *Value; /* Field value (from name : value) */
|
||||
UINT32 Line; /* Line number for this field */
|
||||
UINT32 Column; /* Start column for field value */
|
||||
|
||||
} DT_TABLE_UNIT;
|
||||
|
||||
|
||||
/*
|
||||
* Structure used for individual subtables within an ACPI table
|
||||
@ -292,14 +303,6 @@ DtCompilePadding (
|
||||
UINT32 Length,
|
||||
DT_SUBTABLE **RetSubtable);
|
||||
|
||||
void
|
||||
DtCreateField (
|
||||
char *Name,
|
||||
char *Value,
|
||||
UINT32 Line,
|
||||
UINT32 Offset,
|
||||
UINT32 Column,
|
||||
UINT32 NameColumn);
|
||||
|
||||
/* dtio - binary and text input/output */
|
||||
|
||||
@ -437,6 +440,26 @@ DtCompileFlag (
|
||||
ACPI_DMTABLE_INFO *Info);
|
||||
|
||||
|
||||
/* dtfield - DT_FIELD operations */
|
||||
|
||||
void
|
||||
DtLinkField (
|
||||
DT_FIELD *Field);
|
||||
|
||||
void
|
||||
DtCreateField (
|
||||
DT_TABLE_UNIT *FieldKey,
|
||||
DT_TABLE_UNIT *FieldValue,
|
||||
UINT32 Offset);
|
||||
|
||||
DT_TABLE_UNIT *
|
||||
DtCreateTableUnit (
|
||||
char *Data,
|
||||
UINT32 Line,
|
||||
UINT32 Column);
|
||||
|
||||
|
||||
|
||||
/* dtparser - lex/yacc files */
|
||||
|
||||
UINT64 DtCompilerParserResult; /* Expression return value */
|
||||
|
@ -161,18 +161,20 @@ YYSTYPE DtCompilerlval;
|
||||
/* handle locations */
|
||||
|
||||
int DtCompilerParsercolumn = 1;
|
||||
int DtLabelByteOffset = 0;
|
||||
int DtCompilerParserByteOffset = 0;
|
||||
|
||||
UINT32 DtTokenFirstLine = 0;
|
||||
UINT32 DtTokenFirstColumn = 0;
|
||||
|
||||
#define YY_USER_ACTION \
|
||||
DtCompilerParserlloc.first_line = DtCompilerParserlloc.last_line = DtCompilerParserlineno; \
|
||||
DtCompilerParserlloc.first_column = DtCompilerParsercolumn; \
|
||||
DtCompilerParserlloc.first_byte_offset = DtCompilerParserByteOffset; \
|
||||
DtCompilerParserlloc.last_column = DtCompilerParsercolumn + DtCompilerParserleng-1; \
|
||||
DtTokenFirstLine = DtCompilerParserlineno; \
|
||||
DtTokenFirstColumn = DtCompilerParsercolumn; \
|
||||
DtCompilerParsercolumn += DtCompilerParserleng; \
|
||||
DtCompilerParserByteOffset += DtCompilerParserleng; \
|
||||
DbgPrint (ASL_PARSE_OUTPUT,\
|
||||
"user action occurred. DtCompilerParserlloc.first_line: %u offset: %u\n",\
|
||||
DtCompilerParserlloc.first_line, DtCompilerParserlloc.first_byte_offset);
|
||||
"user action occurred. DtCompilerParserlloc.first_line: %u\n",\
|
||||
DtTokenFirstLine);
|
||||
%}
|
||||
|
||||
%option nounput noinput yylineno
|
||||
@ -236,7 +238,11 @@ CommentField {LabelName}{WhiteSpace}*:{WhiteSpace}{Comment}?$
|
||||
int size = strlen (DtCompilerParsertext);
|
||||
s=UtLocalCacheCalloc (size + 1);
|
||||
AcpiUtSafeStrncpy (s, DtCompilerParsertext, size + 1);
|
||||
DtCompilerParserlval.s = s;
|
||||
DtCompilerParserlval.u = (DT_TABLE_UNIT *) UtLocalCacheCalloc (sizeof (DT_TABLE_UNIT));
|
||||
DtCompilerParserlval.u->Value = s;
|
||||
DtCompilerParserlval.u->Line = DtCompilerParserlineno;
|
||||
DtCompilerParserlval.u->Column = DtCompilerParsercolumn;
|
||||
DtLabelByteOffset = DtCompilerParserByteOffset;
|
||||
DbgPrint (ASL_PARSE_OUTPUT, "Label: %s\n", s);
|
||||
return (DT_PARSEOP_LABEL);
|
||||
}
|
||||
|
@ -169,9 +169,13 @@ void DtCompilerParsererror (char const *msg);
|
||||
extern char *DtCompilerParsertext;
|
||||
extern DT_FIELD *AslGbl_CurrentField;
|
||||
|
||||
extern int DtLabelByteOffset;
|
||||
extern UINT64 DtCompilerParserResult; /* Expression return value */
|
||||
extern UINT64 DtCompilerParserlineno; /* Current line number */
|
||||
|
||||
extern UINT32 DtTokenFirstLine;
|
||||
extern UINT32 DtTokenFirstColumn;
|
||||
|
||||
/* Bison/yacc configuration */
|
||||
|
||||
#define yytname DtCompilerParsername
|
||||
@ -186,42 +190,30 @@ extern UINT64 DtCompilerParserlineno; /* Current line number */
|
||||
|
||||
%}
|
||||
|
||||
%code requires {
|
||||
|
||||
typedef struct YYLTYPE {
|
||||
int first_line;
|
||||
int last_line;
|
||||
int first_column;
|
||||
int last_column;
|
||||
int first_byte_offset;
|
||||
} YYLTYPE;
|
||||
|
||||
#define YYLTYPE_IS_DECLARED 1
|
||||
}
|
||||
|
||||
|
||||
%union {
|
||||
char *s;
|
||||
DT_FIELD *f;
|
||||
DT_TABLE_UNIT *u;
|
||||
}
|
||||
|
||||
|
||||
%type <f> Table
|
||||
%token <s> DT_PARSEOP_DATA
|
||||
%token <s> DT_PARSEOP_LABEL
|
||||
%token <s> DT_PARSEOP_STRING_DATA
|
||||
%token <s> DT_PARSEOP_LINE_CONTINUATION
|
||||
%type <s> Data
|
||||
%type <s> Datum
|
||||
%type <s> MultiLineData
|
||||
%type <s> MultiLineDataList
|
||||
%token <u> DT_PARSEOP_DATA
|
||||
%token <u> DT_PARSEOP_LABEL
|
||||
%token <u> DT_PARSEOP_STRING_DATA
|
||||
%token <u> DT_PARSEOP_LINE_CONTINUATION
|
||||
%type <u> Data
|
||||
%type <u> Datum
|
||||
%type <u> MultiLineData
|
||||
%type <u> MultiLineDataList
|
||||
|
||||
|
||||
%%
|
||||
|
||||
Table
|
||||
:
|
||||
FieldList { DtCompilerParserResult = 5;}
|
||||
FieldList { }
|
||||
;
|
||||
|
||||
FieldList
|
||||
@ -230,7 +222,7 @@ FieldList
|
||||
;
|
||||
|
||||
Field
|
||||
: DT_PARSEOP_LABEL ':' Data { DtCreateField ($1, $3, (@3).first_line, (@1).first_byte_offset, (@1).first_column, (@3).first_column); }
|
||||
: DT_PARSEOP_LABEL ':' Data { DtCreateField ($1, $3, DtLabelByteOffset); }
|
||||
;
|
||||
|
||||
Data
|
||||
@ -240,7 +232,7 @@ Data
|
||||
;
|
||||
|
||||
MultiLineDataList
|
||||
: MultiLineDataList MultiLineData { $$ = AcpiUtStrcat(AcpiUtStrcat($1, " "), $2); } /* combine the strings with strcat */
|
||||
: MultiLineDataList MultiLineData { $$ = DtCreateTableUnit (AcpiUtStrcat(AcpiUtStrcat($1->Value, " "), $2->Value), $1->Line, $1->Column); } /* combine the strings with strcat */
|
||||
| MultiLineData { $$ = $1; }
|
||||
;
|
||||
|
||||
@ -249,8 +241,14 @@ MultiLineData
|
||||
;
|
||||
|
||||
Datum
|
||||
: DT_PARSEOP_DATA { DbgPrint (ASL_PARSE_OUTPUT, "parser data: [%s]\n", DtCompilerParserlval.s); $$ = AcpiUtStrdup(DtCompilerParserlval.s); }
|
||||
| DT_PARSEOP_STRING_DATA { DbgPrint (ASL_PARSE_OUTPUT, "parser string data: [%s]\n", DtCompilerParserlval.s); $$ = AcpiUtStrdup(DtCompilerParserlval.s); }
|
||||
: DT_PARSEOP_DATA {
|
||||
DbgPrint (ASL_PARSE_OUTPUT, "parser data: [%s]\n", DtCompilerParserlval.s);
|
||||
$$ = DtCreateTableUnit (AcpiUtStrdup(DtCompilerParserlval.s), DtTokenFirstLine, DtTokenFirstColumn);
|
||||
}
|
||||
| DT_PARSEOP_STRING_DATA {
|
||||
DbgPrint (ASL_PARSE_OUTPUT, "parser string data: [%s]\n", DtCompilerParserlval.s);
|
||||
$$ = DtCreateTableUnit (AcpiUtStrdup(DtCompilerParserlval.s), DtTokenFirstLine, DtTokenFirstColumn);
|
||||
}
|
||||
;
|
||||
|
||||
|
||||
|
@ -576,6 +576,14 @@ DtCompileBuffer (
|
||||
|
||||
StringValue = DtNormalizeBuffer (StringValue, &Count);
|
||||
Substring = StringValue;
|
||||
if (Count != ByteLength)
|
||||
{
|
||||
sprintf(AslGbl_MsgBuffer,
|
||||
"Found %u values, must match expected count: %u",
|
||||
Count, ByteLength);
|
||||
DtError (ASL_ERROR, ASL_MSG_BUFFER_LIST, Field, AslGbl_MsgBuffer);
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
/* Each element of StringValue is now three chars (2 hex + 1 space) */
|
||||
|
||||
@ -721,3 +729,122 @@ DtCompileFlag (
|
||||
|
||||
*Buffer |= (UINT8) (Value << BitPosition);
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DtCreateField
|
||||
*
|
||||
* PARAMETERS: Name
|
||||
* Value
|
||||
* Line
|
||||
* Offset
|
||||
* Column
|
||||
* NameColumn
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Create a field
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
void
|
||||
DtCreateField (
|
||||
DT_TABLE_UNIT *FieldKey,
|
||||
DT_TABLE_UNIT *FieldValue,
|
||||
UINT32 Offset)
|
||||
{
|
||||
DT_FIELD *Field = UtFieldCacheCalloc ();
|
||||
|
||||
|
||||
Field->StringLength = 0;
|
||||
if (FieldKey->Value)
|
||||
{
|
||||
Field->Name =
|
||||
strcpy (UtLocalCacheCalloc (strlen (FieldKey->Value) + 1), FieldKey->Value);
|
||||
}
|
||||
|
||||
if (FieldValue->Value)
|
||||
{
|
||||
Field->StringLength = strlen (FieldValue->Value);
|
||||
Field->Value =
|
||||
strcpy (UtLocalCacheCalloc (Field->StringLength + 1), FieldValue->Value);
|
||||
}
|
||||
|
||||
Field->Line = FieldValue->Line;
|
||||
Field->ByteOffset = Offset;
|
||||
Field->NameColumn = FieldKey->Column;
|
||||
Field->Column = FieldValue->Column;
|
||||
DtLinkField (Field);
|
||||
|
||||
DtDumpFieldList (AslGbl_FieldList);
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DtCreateTableUnit
|
||||
*
|
||||
* PARAMETERS: Data
|
||||
* Line
|
||||
* Column
|
||||
*
|
||||
* RETURN: a table unit
|
||||
*
|
||||
* DESCRIPTION: Create a table unit
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
DT_TABLE_UNIT *
|
||||
DtCreateTableUnit (
|
||||
char *Data,
|
||||
UINT32 Line,
|
||||
UINT32 Column)
|
||||
{
|
||||
DT_TABLE_UNIT *Unit = (DT_TABLE_UNIT *) UtFieldCacheCalloc ();
|
||||
|
||||
|
||||
Unit->Value = Data;
|
||||
Unit->Line = Line;
|
||||
Unit->Column = Column;
|
||||
return (Unit);
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DtLinkField
|
||||
*
|
||||
* PARAMETERS: Field - New field object to link
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Link one field name and value to the list
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
void
|
||||
DtLinkField (
|
||||
DT_FIELD *Field)
|
||||
{
|
||||
DT_FIELD *Prev;
|
||||
DT_FIELD *Next;
|
||||
|
||||
|
||||
Prev = Next = AslGbl_FieldList;
|
||||
|
||||
while (Next)
|
||||
{
|
||||
Prev = Next;
|
||||
Next = Next->Next;
|
||||
}
|
||||
|
||||
if (Prev)
|
||||
{
|
||||
Prev->Next = Field;
|
||||
}
|
||||
else
|
||||
{
|
||||
AslGbl_FieldList = Field;
|
||||
}
|
||||
}
|
||||
|
@ -162,10 +162,6 @@ static char *
|
||||
DtTrim (
|
||||
char *String);
|
||||
|
||||
static void
|
||||
DtLinkField (
|
||||
DT_FIELD *Field);
|
||||
|
||||
static ACPI_STATUS
|
||||
DtParseLine (
|
||||
char *LineBuffer,
|
||||
@ -297,45 +293,6 @@ DtTrim (
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DtLinkField
|
||||
*
|
||||
* PARAMETERS: Field - New field object to link
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Link one field name and value to the list
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
static void
|
||||
DtLinkField (
|
||||
DT_FIELD *Field)
|
||||
{
|
||||
DT_FIELD *Prev;
|
||||
DT_FIELD *Next;
|
||||
|
||||
|
||||
Prev = Next = AslGbl_FieldList;
|
||||
|
||||
while (Next)
|
||||
{
|
||||
Prev = Next;
|
||||
Next = Next->Next;
|
||||
}
|
||||
|
||||
if (Prev)
|
||||
{
|
||||
Prev->Next = Field;
|
||||
}
|
||||
else
|
||||
{
|
||||
AslGbl_FieldList = Field;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DtParseLine
|
||||
@ -493,59 +450,6 @@ DtParseLine (
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DtCreateField
|
||||
*
|
||||
* PARAMETERS: Name
|
||||
* Value
|
||||
* Line
|
||||
* Offset
|
||||
* Column
|
||||
* NameColumn
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Create a field
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
void
|
||||
DtCreateField (
|
||||
char *Name,
|
||||
char *Value,
|
||||
UINT32 Line,
|
||||
UINT32 Offset,
|
||||
UINT32 Column,
|
||||
UINT32 NameColumn)
|
||||
{
|
||||
DT_FIELD *Field = UtFieldCacheCalloc ();
|
||||
|
||||
|
||||
Field->StringLength = 0;
|
||||
if (Name)
|
||||
{
|
||||
Field->Name =
|
||||
strcpy (UtLocalCacheCalloc (strlen (Name) + 1), Name);
|
||||
}
|
||||
|
||||
if (Value)
|
||||
{
|
||||
Field->StringLength = strlen (Value);
|
||||
Field->Value =
|
||||
strcpy (UtLocalCacheCalloc (Field->StringLength + 1), Value);
|
||||
}
|
||||
|
||||
Field->Line = Line;
|
||||
Field->ByteOffset = Offset;
|
||||
Field->NameColumn = NameColumn;
|
||||
Field->Column = Column;
|
||||
DtLinkField (Field);
|
||||
|
||||
DtDumpFieldList (AslGbl_FieldList);
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DtGetNextLine
|
||||
@ -840,7 +744,6 @@ DtGetNextLine (
|
||||
|
||||
case '\n':
|
||||
|
||||
CurrentLineOffset = AslGbl_NextLineOffset;
|
||||
AslGbl_NextLineOffset = (UINT32) ftell (Handle);
|
||||
AslGbl_CurrentLineNumber++;
|
||||
break;
|
||||
@ -882,7 +785,6 @@ DtGetNextLine (
|
||||
|
||||
/* Ignore newline, this will merge the lines */
|
||||
|
||||
CurrentLineOffset = AslGbl_NextLineOffset;
|
||||
AslGbl_NextLineOffset = (UINT32) ftell (Handle);
|
||||
AslGbl_CurrentLineNumber++;
|
||||
State = DT_NORMAL_TEXT;
|
||||
|
@ -1474,13 +1474,14 @@ DtCompileSdev (
|
||||
Namesp->DeviceIdOffset + Namesp->DeviceIdLength;
|
||||
Namesp->VendorDataLength =
|
||||
(UINT16) Subtable->Length;
|
||||
|
||||
/* Final size of entire namespace structure */
|
||||
|
||||
SdevHeader->Length = (UINT16)(sizeof(ACPI_SDEV_NAMESPACE) +
|
||||
Subtable->Length + Namesp->DeviceIdLength);
|
||||
}
|
||||
}
|
||||
|
||||
/* Final size of entire namespace structure */
|
||||
|
||||
SdevHeader->Length = (UINT16) (sizeof (ACPI_SDEV_NAMESPACE) +
|
||||
Subtable->Length + Namesp->DeviceIdLength);
|
||||
break;
|
||||
|
||||
case ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE:
|
||||
@ -1620,7 +1621,9 @@ DtCompileSlit (
|
||||
DT_SUBTABLE *ParentTable;
|
||||
DT_FIELD **PFieldList = (DT_FIELD **) List;
|
||||
DT_FIELD *FieldList;
|
||||
DT_FIELD *EndOfFieldList = NULL;
|
||||
UINT32 Localities;
|
||||
UINT32 LocalityListLength;
|
||||
UINT8 *LocalityBuffer;
|
||||
|
||||
|
||||
@ -1636,6 +1639,7 @@ DtCompileSlit (
|
||||
|
||||
Localities = *ACPI_CAST_PTR (UINT32, Subtable->Buffer);
|
||||
LocalityBuffer = UtLocalCalloc (Localities);
|
||||
LocalityListLength = 0;
|
||||
|
||||
/* Compile each locality buffer */
|
||||
|
||||
@ -1645,11 +1649,22 @@ DtCompileSlit (
|
||||
DtCompileBuffer (LocalityBuffer,
|
||||
FieldList->Value, FieldList, Localities);
|
||||
|
||||
LocalityListLength++;
|
||||
DtCreateSubtable (LocalityBuffer, Localities, &Subtable);
|
||||
DtInsertSubtable (ParentTable, Subtable);
|
||||
EndOfFieldList = FieldList;
|
||||
FieldList = FieldList->Next;
|
||||
}
|
||||
|
||||
if (LocalityListLength != Localities)
|
||||
{
|
||||
sprintf(AslGbl_MsgBuffer,
|
||||
"Found %u entries, must match LocalityCount: %u",
|
||||
LocalityListLength, Localities);
|
||||
DtError (ASL_ERROR, ASL_MSG_ENTRY_LIST, EndOfFieldList, AslGbl_MsgBuffer);
|
||||
return (AE_LIMIT);
|
||||
}
|
||||
|
||||
ACPI_FREE (LocalityBuffer);
|
||||
return (AE_OK);
|
||||
}
|
||||
|
@ -274,6 +274,10 @@ AcpiDbConvertToBuffer (
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
/* Skip all preceding white space*/
|
||||
|
||||
AcpiUtRemoveWhitespace (&String);
|
||||
|
||||
/* Generate the final buffer length */
|
||||
|
||||
for (i = 0, Length = 0; String[i];)
|
||||
|
@ -713,7 +713,6 @@ AcpiDbDisplayResults (
|
||||
return;
|
||||
}
|
||||
|
||||
ObjDesc = WalkState->MethodDesc;
|
||||
Node = WalkState->MethodNode;
|
||||
|
||||
if (WalkState->Results)
|
||||
@ -773,7 +772,6 @@ AcpiDbDisplayCallingTree (
|
||||
return;
|
||||
}
|
||||
|
||||
Node = WalkState->MethodNode;
|
||||
AcpiOsPrintf ("Current Control Method Call Tree\n");
|
||||
|
||||
while (WalkState)
|
||||
|
@ -253,7 +253,7 @@ AcpiDbLoadTables (
|
||||
{
|
||||
Table = TableListHead->Table;
|
||||
|
||||
Status = AcpiLoadTable (Table);
|
||||
Status = AcpiLoadTable (Table, NULL);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
if (Status == AE_ALREADY_EXISTS)
|
||||
|
@ -208,6 +208,7 @@ enum AcpiExDebuggerCommands
|
||||
CMD_EVALUATE,
|
||||
CMD_EXECUTE,
|
||||
CMD_EXIT,
|
||||
CMD_FIELDS,
|
||||
CMD_FIND,
|
||||
CMD_GO,
|
||||
CMD_HANDLERS,
|
||||
@ -287,6 +288,7 @@ static const ACPI_DB_COMMAND_INFO AcpiGbl_DbCommands[] =
|
||||
{"EVALUATE", 1},
|
||||
{"EXECUTE", 1},
|
||||
{"EXIT", 0},
|
||||
{"FIELDS", 1},
|
||||
{"FIND", 1},
|
||||
{"GO", 0},
|
||||
{"HANDLERS", 0},
|
||||
@ -360,6 +362,7 @@ static const ACPI_DB_COMMAND_HELP AcpiGbl_DbCommandHelp[] =
|
||||
{1, " Find <AcpiName> (? is wildcard)", "Find ACPI name(s) with wildcards\n"},
|
||||
{1, " Integrity", "Validate namespace integrity\n"},
|
||||
{1, " Methods", "Display list of loaded control methods\n"},
|
||||
{1, " Fields <AddressSpaceId>", "Display list of loaded field units by space ID\n"},
|
||||
{1, " Namespace [Object] [Depth]", "Display loaded namespace tree/subtree\n"},
|
||||
{1, " Notify <Object> <Value>", "Send a notification on Object\n"},
|
||||
{1, " Objects [ObjectType]", "Display summary of all objects or just given type\n"},
|
||||
@ -683,6 +686,22 @@ AcpiDbGetNextToken (
|
||||
}
|
||||
break;
|
||||
|
||||
case '{':
|
||||
|
||||
/* This is the start of a field unit, scan until closing brace */
|
||||
|
||||
String++;
|
||||
Start = String;
|
||||
Type = ACPI_TYPE_FIELD_UNIT;
|
||||
|
||||
/* Find end of buffer */
|
||||
|
||||
while (*String && (*String != '}'))
|
||||
{
|
||||
String++;
|
||||
}
|
||||
break;
|
||||
|
||||
case '[':
|
||||
|
||||
/* This is the start of a package, scan until closing bracket */
|
||||
@ -877,6 +896,7 @@ AcpiDbCommandDispatch (
|
||||
ACPI_PARSE_OBJECT *Op)
|
||||
{
|
||||
UINT32 Temp;
|
||||
UINT64 Temp64;
|
||||
UINT32 CommandIndex;
|
||||
UINT32 ParamCount;
|
||||
char *CommandLine;
|
||||
@ -894,7 +914,6 @@ AcpiDbCommandDispatch (
|
||||
|
||||
ParamCount = AcpiDbGetLine (InputBuffer);
|
||||
CommandIndex = AcpiDbMatchCommand (AcpiGbl_DbArgs[0]);
|
||||
Temp = 0;
|
||||
|
||||
/*
|
||||
* We don't want to add the !! command to the history buffer. It
|
||||
@ -993,6 +1012,21 @@ AcpiDbCommandDispatch (
|
||||
Status = AcpiDbFindNameInNamespace (AcpiGbl_DbArgs[1]);
|
||||
break;
|
||||
|
||||
case CMD_FIELDS:
|
||||
|
||||
Status = AcpiUtStrtoul64 (AcpiGbl_DbArgs[1], &Temp64);
|
||||
|
||||
if (ACPI_FAILURE (Status) || Temp64 >= ACPI_NUM_PREDEFINED_REGIONS)
|
||||
{
|
||||
AcpiOsPrintf (
|
||||
"Invalid adress space ID: must be between 0 and %u inclusive\n",
|
||||
ACPI_NUM_PREDEFINED_REGIONS - 1);
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
Status = AcpiDbDisplayFields ((UINT32) Temp64);
|
||||
break;
|
||||
|
||||
case CMD_GO:
|
||||
|
||||
AcpiGbl_CmSingleStep = FALSE;
|
||||
|
@ -515,6 +515,11 @@ AcpiDbDisassembleMethod (
|
||||
WalkState->ParseFlags |= ACPI_PARSE_DISASSEMBLE;
|
||||
|
||||
Status = AcpiPsParseAml (WalkState);
|
||||
if (ACPI_FAILURE(Status))
|
||||
{
|
||||
return (Status);
|
||||
}
|
||||
|
||||
(void) AcpiDmParseDeferredOps (Op);
|
||||
|
||||
/* Now we can disassemble the method */
|
||||
|
@ -154,6 +154,7 @@
|
||||
#include "acnamesp.h"
|
||||
#include "acdebug.h"
|
||||
#include "acpredef.h"
|
||||
#include "acinterp.h"
|
||||
|
||||
|
||||
#define _COMPONENT ACPI_CA_DEBUGGER
|
||||
@ -722,6 +723,91 @@ AcpiDbWalkForObjectCounts (
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbWalkForFields
|
||||
*
|
||||
* PARAMETERS: Callback from WalkNamespace
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Display short info about objects in the namespace
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static ACPI_STATUS
|
||||
AcpiDbWalkForFields (
|
||||
ACPI_HANDLE ObjHandle,
|
||||
UINT32 NestingLevel,
|
||||
void *Context,
|
||||
void **ReturnValue)
|
||||
{
|
||||
ACPI_OBJECT *RetValue;
|
||||
ACPI_REGION_WALK_INFO *Info = (ACPI_REGION_WALK_INFO *) Context;
|
||||
ACPI_BUFFER Buffer;
|
||||
ACPI_STATUS Status;
|
||||
ACPI_NAMESPACE_NODE *Node = AcpiNsValidateHandle (ObjHandle);
|
||||
|
||||
|
||||
if (!Node)
|
||||
{
|
||||
return (AE_OK);
|
||||
}
|
||||
if (Node->Object->Field.RegionObj->Region.SpaceId != Info->AddressSpaceId)
|
||||
{
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
Info->Count++;
|
||||
|
||||
/* Get and display the full pathname to this object */
|
||||
|
||||
Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
|
||||
Status = AcpiNsHandleToPathname (ObjHandle, &Buffer, TRUE);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
AcpiOsPrintf ("Could Not get pathname for object %p\n", ObjHandle);
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("%s ", (char *) Buffer.Pointer);
|
||||
ACPI_FREE (Buffer.Pointer);
|
||||
|
||||
Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
|
||||
AcpiEvaluateObject (ObjHandle, NULL, NULL, &Buffer);
|
||||
|
||||
/*
|
||||
* Since this is a field unit, surround the output in braces
|
||||
*/
|
||||
AcpiOsPrintf ("{");
|
||||
|
||||
RetValue = (ACPI_OBJECT *) Buffer.Pointer;
|
||||
switch (RetValue->Type)
|
||||
{
|
||||
case ACPI_TYPE_INTEGER:
|
||||
|
||||
AcpiOsPrintf ("%8.8X%8.8X", ACPI_FORMAT_UINT64 (RetValue->Integer.Value));
|
||||
break;
|
||||
|
||||
case ACPI_TYPE_BUFFER:
|
||||
|
||||
AcpiUtDumpBuffer (RetValue->Buffer.Pointer,
|
||||
RetValue->Buffer.Length, DB_DISPLAY_DATA_ONLY | DB_BYTE_DISPLAY, 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
AcpiOsPrintf ("}\n");
|
||||
|
||||
ACPI_FREE (Buffer.Pointer);
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbWalkForSpecificObjects
|
||||
@ -857,6 +943,42 @@ AcpiDbDisplayObjects (
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbDisplayFields
|
||||
*
|
||||
* PARAMETERS: ObjTypeArg - Type of object to display
|
||||
* DisplayCountArg - Max depth to display
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Display objects in the namespace of the requested type
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbDisplayFields (
|
||||
UINT32 AddressSpaceId)
|
||||
{
|
||||
ACPI_REGION_WALK_INFO Info;
|
||||
|
||||
|
||||
Info.Count = 0;
|
||||
Info.OwnerId = ACPI_OWNER_ID_MAX;
|
||||
Info.DebugLevel = ACPI_UINT32_MAX;
|
||||
Info.DisplayType = ACPI_DISPLAY_SUMMARY | ACPI_DISPLAY_SHORT;
|
||||
Info.AddressSpaceId = AddressSpaceId;
|
||||
|
||||
/* Walk the namespace from the root */
|
||||
|
||||
(void) AcpiWalkNamespace (ACPI_TYPE_LOCAL_REGION_FIELD, ACPI_ROOT_OBJECT,
|
||||
ACPI_UINT32_MAX, AcpiDbWalkForFields, NULL,
|
||||
(void *) &Info, NULL);
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiDbIntegrityWalk
|
||||
|
@ -649,7 +649,6 @@ AcpiDbDecodeArguments (
|
||||
|
||||
|
||||
Node = WalkState->MethodNode;
|
||||
ObjDesc = WalkState->MethodDesc;
|
||||
|
||||
/* There are no arguments for the module-level code case */
|
||||
|
||||
|
@ -309,6 +309,10 @@ AcpiDmDeferredParse (
|
||||
WalkState->ParseFlags &= ~ACPI_PARSE_DELETE_TREE;
|
||||
WalkState->ParseFlags |= ACPI_PARSE_DISASSEMBLE;
|
||||
Status = AcpiPsParseAml (WalkState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS(Status);
|
||||
}
|
||||
|
||||
StartOp = (Op->Common.Value.Arg)->Common.Next;
|
||||
SearchOp = StartOp;
|
||||
|
@ -441,7 +441,6 @@ AcpiDmResourceTemplate (
|
||||
* missing EndDependentDescriptor.
|
||||
*/
|
||||
Level--;
|
||||
DependentFns = FALSE;
|
||||
|
||||
/* Go ahead and insert EndDependentFn() */
|
||||
|
||||
|
@ -957,7 +957,6 @@ AcpiDmDescendingOp (
|
||||
* the buffer size Op. Open up a new block
|
||||
*/
|
||||
NextOp->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
|
||||
NextOp = NextOp->Common.Next;
|
||||
ASL_CV_CLOSE_PAREN (Op, Level);
|
||||
|
||||
/* Emit description comment for Name() with a predefined ACPI name */
|
||||
|
@ -235,7 +235,7 @@ AcpiDsExecBeginControlOp (
|
||||
ControlState->Control.Opcode =
|
||||
Op->Common.AmlOpcode;
|
||||
ControlState->Control.LoopTimeout = AcpiOsGetTimer () +
|
||||
(UINT64) (AcpiGbl_MaxLoopIterations * ACPI_100NSEC_PER_SEC);
|
||||
((UINT64) AcpiGbl_MaxLoopIterations * ACPI_100NSEC_PER_SEC);
|
||||
|
||||
/* Push the control state on this walk's control stack */
|
||||
|
||||
|
@ -309,7 +309,6 @@ AcpiDsCreateBufferField (
|
||||
if (WalkState->DeferredNode)
|
||||
{
|
||||
Node = WalkState->DeferredNode;
|
||||
Status = AE_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -435,7 +434,6 @@ AcpiDsGetFieldNames (
|
||||
ACPI_PARSE_OBJECT *Child;
|
||||
|
||||
#ifdef ACPI_EXEC_APP
|
||||
UINT64 Value = 0;
|
||||
ACPI_OPERAND_OBJECT *ResultDesc;
|
||||
ACPI_OPERAND_OBJECT *ObjDesc;
|
||||
char *NamePath;
|
||||
@ -577,14 +575,13 @@ AcpiDsGetFieldNames (
|
||||
}
|
||||
#ifdef ACPI_EXEC_APP
|
||||
NamePath = AcpiNsGetExternalPathname (Info->FieldNode);
|
||||
ObjDesc = AcpiUtCreateIntegerObject (Value);
|
||||
if (ACPI_SUCCESS (AeLookupInitFileEntry (NamePath, &Value)))
|
||||
if (ACPI_SUCCESS (AeLookupInitFileEntry (NamePath, &ObjDesc)))
|
||||
{
|
||||
AcpiExWriteDataToField (ObjDesc,
|
||||
AcpiNsGetAttachedObject (Info->FieldNode),
|
||||
&ResultDesc);
|
||||
AcpiUtRemoveReference (ObjDesc);
|
||||
}
|
||||
AcpiUtRemoveReference (ObjDesc);
|
||||
ACPI_FREE (NamePath);
|
||||
#endif
|
||||
}
|
||||
@ -813,8 +810,6 @@ AcpiDsInitFieldObjects (
|
||||
}
|
||||
|
||||
/* Name already exists, just ignore this error */
|
||||
|
||||
Status = AE_OK;
|
||||
}
|
||||
|
||||
Arg->Common.Node = Node;
|
||||
|
@ -272,6 +272,10 @@ AcpiEvDeleteGpeBlock (
|
||||
/* Disable all GPEs in this block */
|
||||
|
||||
Status = AcpiHwDisableGpeBlock (GpeBlock->XruptBlock, GpeBlock, NULL);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
if (!GpeBlock->Previous && !GpeBlock->Next)
|
||||
{
|
||||
@ -542,7 +546,7 @@ AcpiEvCreateGpeBlock (
|
||||
WalkInfo.GpeDevice = GpeDevice;
|
||||
WalkInfo.ExecuteByOwnerId = FALSE;
|
||||
|
||||
Status = AcpiNsWalkNamespace (ACPI_TYPE_METHOD, GpeDevice,
|
||||
(void) AcpiNsWalkNamespace (ACPI_TYPE_METHOD, GpeDevice,
|
||||
ACPI_UINT32_MAX, ACPI_NS_WALK_NO_UNLOCK,
|
||||
AcpiEvMatchGpeMethod, NULL, &WalkInfo, NULL);
|
||||
|
||||
|
@ -302,8 +302,6 @@ AcpiEvGpeInitialize (
|
||||
* GPE0 and GPE1 do not have to be contiguous in the GPE number
|
||||
* space. However, GPE0 always starts at GPE number zero.
|
||||
*/
|
||||
GpeNumberMax = AcpiGbl_FADT.Gpe1Base +
|
||||
((RegisterCount1 * ACPI_GPE_REGISTER_WIDTH) - 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -315,7 +313,6 @@ AcpiEvGpeInitialize (
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INIT,
|
||||
"There are no GPE blocks defined in the FADT\n"));
|
||||
Status = AE_OK;
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
|
@ -400,11 +400,16 @@ AcpiEvTerminate (
|
||||
/* Disable all GPEs in all GPE blocks */
|
||||
|
||||
Status = AcpiEvWalkGpeList (AcpiHwDisableGpeBlock, NULL);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_EXCEPTION ((AE_INFO, Status,
|
||||
"Could not disable GPEs in GPE block"));
|
||||
}
|
||||
|
||||
Status = AcpiEvRemoveGlobalLockHandler ();
|
||||
if (ACPI_FAILURE(Status))
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_ERROR ((AE_INFO,
|
||||
ACPI_EXCEPTION ((AE_INFO, Status,
|
||||
"Could not remove Global Lock handler"));
|
||||
}
|
||||
|
||||
@ -414,7 +419,7 @@ AcpiEvTerminate (
|
||||
/* Remove SCI handlers */
|
||||
|
||||
Status = AcpiEvRemoveAllSciHandlers ();
|
||||
if (ACPI_FAILURE(Status))
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_ERROR ((AE_INFO,
|
||||
"Could not remove SCI handler"));
|
||||
@ -423,6 +428,12 @@ AcpiEvTerminate (
|
||||
/* Deallocate all handler objects installed within GPE info structs */
|
||||
|
||||
Status = AcpiEvWalkGpeList (AcpiEvDeleteGpeHandlers, NULL);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_EXCEPTION ((AE_INFO, Status,
|
||||
"Could not delete GPE handlers"));
|
||||
}
|
||||
|
||||
|
||||
/* Return to original mode if necessary */
|
||||
|
||||
|
@ -1037,11 +1037,11 @@ AcpiEvOrphanEcRegMethod (
|
||||
Objects[1].Type = ACPI_TYPE_INTEGER;
|
||||
Objects[1].Integer.Value = ACPI_REG_CONNECT;
|
||||
|
||||
Status = AcpiEvaluateObject (RegMethod, NULL, &Args, NULL);
|
||||
(void) AcpiEvaluateObject (RegMethod, NULL, &Args, NULL);
|
||||
|
||||
Exit:
|
||||
/* We ignore all errors from above, don't care */
|
||||
|
||||
Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
|
||||
(void) AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
|
||||
return_VOID;
|
||||
}
|
||||
|
@ -363,7 +363,6 @@ AcpiEvPciConfigRegionSetup (
|
||||
* root bridge. Still need to return a context object
|
||||
* for the new PCI_Config operation region, however.
|
||||
*/
|
||||
Status = AE_OK;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -357,6 +357,10 @@ AcpiEnterSleepStateS4bios (
|
||||
|
||||
Status = AcpiHwWritePort (AcpiGbl_FADT.SmiCommand,
|
||||
(UINT32) AcpiGbl_FADT.S4BiosRequest, 8);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
do {
|
||||
AcpiOsStall (ACPI_USEC_PER_MSEC);
|
||||
|
@ -670,5 +670,5 @@ AcpiNsConvertToReference (
|
||||
ErrorExit:
|
||||
ACPI_FREE (Name);
|
||||
*ReturnObject = NewObject;
|
||||
return (AE_OK);
|
||||
return (Status);
|
||||
}
|
||||
|
@ -478,7 +478,7 @@ AcpiNsDumpOneObject (
|
||||
AcpiOsPrintf (" =");
|
||||
for (i = 0; (i < ObjDesc->Buffer.Length && i < 12); i++)
|
||||
{
|
||||
AcpiOsPrintf (" %.2hX", ObjDesc->Buffer.Pointer[i]);
|
||||
AcpiOsPrintf (" %2.2X", ObjDesc->Buffer.Pointer[i]);
|
||||
}
|
||||
}
|
||||
AcpiOsPrintf ("\n");
|
||||
@ -575,7 +575,7 @@ AcpiNsDumpOneObject (
|
||||
case ACPI_TYPE_LOCAL_BANK_FIELD:
|
||||
case ACPI_TYPE_LOCAL_INDEX_FIELD:
|
||||
|
||||
AcpiOsPrintf (" Off %.3X Len %.2X Acc %.2hd\n",
|
||||
AcpiOsPrintf (" Off %.3X Len %.2X Acc %.2X\n",
|
||||
(ObjDesc->CommonField.BaseByteOffset * 8)
|
||||
+ ObjDesc->CommonField.StartFieldBitOffset,
|
||||
ObjDesc->CommonField.BitLength,
|
||||
@ -760,8 +760,6 @@ AcpiNsDumpOneObject (
|
||||
|
||||
goto Cleanup;
|
||||
}
|
||||
|
||||
ObjType = ACPI_TYPE_INVALID; /* Terminate loop after next pass */
|
||||
}
|
||||
|
||||
Cleanup:
|
||||
|
@ -611,7 +611,7 @@ AcpiGetObjectInfo (
|
||||
|
||||
if (Cls)
|
||||
{
|
||||
NextIdString = AcpiNsCopyDeviceId (&Info->ClassCode,
|
||||
(void) AcpiNsCopyDeviceId (&Info->ClassCode,
|
||||
Cls, NextIdString);
|
||||
}
|
||||
|
||||
|
@ -652,7 +652,7 @@ AcpiPsCompleteOp (
|
||||
WalkState->Opcode = (*Op)->Common.AmlOpcode;
|
||||
|
||||
Status = WalkState->AscendingCallback (WalkState);
|
||||
Status = AcpiPsNextParseState (WalkState, *Op, Status);
|
||||
(void) AcpiPsNextParseState (WalkState, *Op, Status);
|
||||
|
||||
Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
|
||||
if (ACPI_FAILURE (Status2))
|
||||
@ -661,7 +661,6 @@ AcpiPsCompleteOp (
|
||||
}
|
||||
}
|
||||
|
||||
Status = AE_OK;
|
||||
break;
|
||||
|
||||
case AE_CTRL_BREAK:
|
||||
@ -682,7 +681,7 @@ AcpiPsCompleteOp (
|
||||
WalkState->Opcode = (*Op)->Common.AmlOpcode;
|
||||
|
||||
Status = WalkState->AscendingCallback (WalkState);
|
||||
Status = AcpiPsNextParseState (WalkState, *Op, Status);
|
||||
(void) AcpiPsNextParseState (WalkState, *Op, Status);
|
||||
|
||||
Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
|
||||
if (ACPI_FAILURE (Status2))
|
||||
@ -690,7 +689,6 @@ AcpiPsCompleteOp (
|
||||
return_ACPI_STATUS (Status2);
|
||||
}
|
||||
|
||||
Status = AE_OK;
|
||||
break;
|
||||
|
||||
case AE_CTRL_TERMINATE:
|
||||
|
@ -481,6 +481,10 @@ AcpiRsCreatePciRoutingTable (
|
||||
|
||||
Status = AcpiNsHandleToPathname (
|
||||
(ACPI_HANDLE) Node, &PathBuffer, FALSE);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/* +1 to include null terminator */
|
||||
|
||||
|
@ -1190,6 +1190,10 @@ AcpiTbLoadTable (
|
||||
}
|
||||
|
||||
Status = AcpiNsLoadTable (TableIndex, ParentNode);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/*
|
||||
* Update GPEs for any new _Lxx/_Exx methods. Ignore errors. The host is
|
||||
|
@ -445,6 +445,8 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiInstallTable)
|
||||
*
|
||||
* PARAMETERS: Table - Pointer to a buffer containing the ACPI
|
||||
* table to be loaded.
|
||||
* TableIdx - Pointer to a UINT32 for storing the table
|
||||
* index, might be NULL
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
@ -458,7 +460,8 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiInstallTable)
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiLoadTable (
|
||||
ACPI_TABLE_HEADER *Table)
|
||||
ACPI_TABLE_HEADER *Table,
|
||||
UINT32 *TableIdx)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
UINT32 TableIndex;
|
||||
@ -479,6 +482,11 @@ AcpiLoadTable (
|
||||
ACPI_INFO (("Host-directed Dynamic ACPI Table Load:"));
|
||||
Status = AcpiTbInstallAndLoadTable (ACPI_PTR_TO_PHYSADDR (Table),
|
||||
ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, FALSE, &TableIndex);
|
||||
if (TableIdx)
|
||||
{
|
||||
*TableIdx = TableIndex;
|
||||
}
|
||||
|
||||
if (ACPI_SUCCESS (Status))
|
||||
{
|
||||
/* Complete the initialization/resolution of new objects */
|
||||
@ -582,3 +590,42 @@ AcpiUnloadParentTable (
|
||||
}
|
||||
|
||||
ACPI_EXPORT_SYMBOL (AcpiUnloadParentTable)
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiUnloadTable
|
||||
*
|
||||
* PARAMETERS: TableIndex - Index as returned by AcpiLoadTable
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Via the TableIndex representing an SSDT or OEMx table, unloads
|
||||
* the table and deletes all namespace objects associated with
|
||||
* that table. Unloading of the DSDT is not allowed.
|
||||
* Note: Mainly intended to support hotplug removal of SSDTs.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiUnloadTable (
|
||||
UINT32 TableIndex)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE (AcpiUnloadTable);
|
||||
|
||||
|
||||
if (TableIndex == 1)
|
||||
{
|
||||
/* TableIndex==1 means DSDT is the owner. DSDT cannot be unloaded */
|
||||
|
||||
return_ACPI_STATUS (AE_TYPE);
|
||||
}
|
||||
|
||||
Status = AcpiTbUnloadTable (TableIndex);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
ACPI_EXPORT_SYMBOL (AcpiUnloadTable)
|
||||
|
@ -186,8 +186,10 @@ AcpiUtDumpBuffer (
|
||||
UINT32 j;
|
||||
UINT32 Temp32;
|
||||
UINT8 BufChar;
|
||||
UINT32 DisplayDataOnly = Display & DB_DISPLAY_DATA_ONLY;
|
||||
|
||||
|
||||
Display &= ~DB_DISPLAY_DATA_ONLY;
|
||||
if (!Buffer)
|
||||
{
|
||||
AcpiOsPrintf ("Null Buffer Pointer in DumpBuffer!\n");
|
||||
@ -205,7 +207,10 @@ AcpiUtDumpBuffer (
|
||||
{
|
||||
/* Print current offset */
|
||||
|
||||
AcpiOsPrintf ("%8.4X: ", (BaseOffset + i));
|
||||
if (!DisplayDataOnly)
|
||||
{
|
||||
AcpiOsPrintf ("%8.4X: ", (BaseOffset + i));
|
||||
}
|
||||
|
||||
/* Print 16 hex chars */
|
||||
|
||||
@ -257,38 +262,41 @@ AcpiUtDumpBuffer (
|
||||
* Print the ASCII equivalent characters but watch out for the bad
|
||||
* unprintable ones (printable chars are 0x20 through 0x7E)
|
||||
*/
|
||||
AcpiOsPrintf (" ");
|
||||
for (j = 0; j < 16; j++)
|
||||
if (!DisplayDataOnly)
|
||||
{
|
||||
if (i + j >= Count)
|
||||
AcpiOsPrintf (" ");
|
||||
for (j = 0; j < 16; j++)
|
||||
{
|
||||
AcpiOsPrintf ("\n");
|
||||
return;
|
||||
if (i + j >= Count)
|
||||
{
|
||||
AcpiOsPrintf ("\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add comment characters so rest of line is ignored when
|
||||
* compiled
|
||||
*/
|
||||
if (j == 0)
|
||||
{
|
||||
AcpiOsPrintf ("// ");
|
||||
}
|
||||
|
||||
BufChar = Buffer[(ACPI_SIZE) i + j];
|
||||
if (isprint (BufChar))
|
||||
{
|
||||
AcpiOsPrintf ("%c", BufChar);
|
||||
}
|
||||
else
|
||||
{
|
||||
AcpiOsPrintf (".");
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Add comment characters so rest of line is ignored when
|
||||
* compiled
|
||||
*/
|
||||
if (j == 0)
|
||||
{
|
||||
AcpiOsPrintf ("// ");
|
||||
}
|
||||
/* Done with that line. */
|
||||
|
||||
BufChar = Buffer[(ACPI_SIZE) i + j];
|
||||
if (isprint (BufChar))
|
||||
{
|
||||
AcpiOsPrintf ("%c", BufChar);
|
||||
}
|
||||
else
|
||||
{
|
||||
AcpiOsPrintf (".");
|
||||
}
|
||||
AcpiOsPrintf ("\n");
|
||||
}
|
||||
|
||||
/* Done with that line. */
|
||||
|
||||
AcpiOsPrintf ("\n");
|
||||
i += 16;
|
||||
}
|
||||
|
||||
|
@ -466,7 +466,8 @@ AcpiUtExecute_CID (
|
||||
{
|
||||
/* Copy the String CID from the returned object */
|
||||
|
||||
strcpy (NextIdString, CidObjects[i]->String.Pointer);
|
||||
AcpiUtSafeStrcpy (NextIdString, CidObjects[i]->String.Length + 1,
|
||||
CidObjects[i]->String.Pointer);
|
||||
Length = CidObjects[i]->String.Length + 1;
|
||||
}
|
||||
|
||||
|
@ -864,7 +864,7 @@ AcpiUtDumpAllocations (
|
||||
|
||||
case ACPI_DESC_TYPE_PARSER:
|
||||
|
||||
AcpiOsPrintf ("AmlOpcode 0x%04hX\n",
|
||||
AcpiOsPrintf ("AmlOpcode 0x%04X\n",
|
||||
Descriptor->Op.Asl.AmlOpcode);
|
||||
break;
|
||||
|
||||
|
@ -392,6 +392,10 @@ void
|
||||
AcpiDbGetBusInfo (
|
||||
void);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDbDisplayFields (
|
||||
UINT32 AddressSpaceId);
|
||||
|
||||
|
||||
/*
|
||||
* dbdisply - debug display commands
|
||||
|
@ -154,7 +154,7 @@
|
||||
|
||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20190816
|
||||
#define ACPI_CA_VERSION 0x20191018
|
||||
|
||||
#include "acconfig.h"
|
||||
#include "actypes.h"
|
||||
@ -664,7 +664,13 @@ AcpiInstallTable (
|
||||
ACPI_EXTERNAL_RETURN_STATUS (
|
||||
ACPI_STATUS
|
||||
AcpiLoadTable (
|
||||
ACPI_TABLE_HEADER *Table))
|
||||
ACPI_TABLE_HEADER *Table,
|
||||
UINT32 *TableIdx))
|
||||
|
||||
ACPI_EXTERNAL_RETURN_STATUS (
|
||||
ACPI_STATUS
|
||||
AcpiUnloadTable (
|
||||
UINT32 TableIndex))
|
||||
|
||||
ACPI_EXTERNAL_RETURN_STATUS (
|
||||
ACPI_STATUS
|
||||
|
@ -357,6 +357,19 @@ typedef struct acpi_device_walk_info
|
||||
} ACPI_DEVICE_WALK_INFO;
|
||||
|
||||
|
||||
/* Info used by Acpi AcpiDbDisplayFields */
|
||||
|
||||
typedef struct acpi_region_walk_info
|
||||
{
|
||||
UINT32 DebugLevel;
|
||||
UINT32 Count;
|
||||
ACPI_OWNER_ID OwnerId;
|
||||
UINT8 DisplayType;
|
||||
UINT32 AddressSpaceId;
|
||||
|
||||
} ACPI_REGION_WALK_INFO;
|
||||
|
||||
|
||||
/* TBD: [Restructure] Merge with struct above */
|
||||
|
||||
typedef struct acpi_walk_info
|
||||
|
@ -290,10 +290,11 @@ typedef struct acpi_pkg_info
|
||||
|
||||
/* AcpiUtDumpBuffer */
|
||||
|
||||
#define DB_BYTE_DISPLAY 1
|
||||
#define DB_WORD_DISPLAY 2
|
||||
#define DB_DWORD_DISPLAY 4
|
||||
#define DB_QWORD_DISPLAY 8
|
||||
#define DB_BYTE_DISPLAY 0x01
|
||||
#define DB_WORD_DISPLAY 0x02
|
||||
#define DB_DWORD_DISPLAY 0x04
|
||||
#define DB_QWORD_DISPLAY 0x08
|
||||
#define DB_DISPLAY_DATA_ONLY 0x10
|
||||
|
||||
|
||||
/*
|
||||
|
@ -203,6 +203,10 @@
|
||||
|
||||
#define DEBUGGER_THREADING 0 /* integrated with DDB */
|
||||
|
||||
#ifdef INVARIANTS
|
||||
#define ACPI_MUTEX_DEBUG
|
||||
#endif
|
||||
|
||||
#else /* _KERNEL */
|
||||
|
||||
#if __STDC_HOSTED__
|
||||
|
@ -458,7 +458,7 @@ AcpiOsGetTimer (
|
||||
{
|
||||
/* Convert milliseconds to 100 nanosecond ticks */
|
||||
|
||||
return ((UINT64) GetTickCount() * ACPI_100NSEC_PER_MSEC);
|
||||
return (GetTickCount64() * ACPI_100NSEC_PER_MSEC);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -195,7 +195,8 @@ typedef struct ae_debug_regions
|
||||
typedef struct init_file_entry
|
||||
{
|
||||
char *Name;
|
||||
UINT64 Value;
|
||||
ACPI_OPERAND_OBJECT *ObjDesc;
|
||||
|
||||
} INIT_FILE_ENTRY;
|
||||
|
||||
extern BOOLEAN AcpiGbl_UseLocalFaultHandler;
|
||||
@ -356,7 +357,7 @@ AeSetupConfiguration (
|
||||
ACPI_STATUS
|
||||
AeLookupInitFileEntry (
|
||||
char *Pathname,
|
||||
UINT64 *Value);
|
||||
ACPI_OPERAND_OBJECT **ObjDesc);
|
||||
|
||||
/* aeexec */
|
||||
|
||||
|
@ -683,20 +683,27 @@ AeInstallLateHandlers (
|
||||
{
|
||||
Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
|
||||
AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
|
||||
ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
|
||||
|
||||
Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
|
||||
AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
|
||||
ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
|
||||
|
||||
Status = AcpiRemoveNotifyHandler (Handle, ACPI_ALL_NOTIFY,
|
||||
AeNotifyHandler1);
|
||||
ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
|
||||
|
||||
Status = AcpiRemoveNotifyHandler (Handle, ACPI_ALL_NOTIFY,
|
||||
AeNotifyHandler2);
|
||||
ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
|
||||
|
||||
Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
|
||||
AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
|
||||
ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
|
||||
|
||||
Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
|
||||
AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
|
||||
ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
|
||||
}
|
||||
|
||||
Status = AcpiGetHandle (NULL, "\\_PR.CPU0", &Handle);
|
||||
@ -704,9 +711,11 @@ AeInstallLateHandlers (
|
||||
{
|
||||
Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,
|
||||
AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
|
||||
ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
|
||||
|
||||
Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
|
||||
AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
|
||||
ACPI_CHECK_OK (AcpiInstallNotifyHandler, Status);
|
||||
}
|
||||
|
||||
#if (!ACPI_REDUCED_HARDWARE)
|
||||
@ -855,13 +864,15 @@ AeInstallEarlyHandlers (
|
||||
|
||||
Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
|
||||
AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));
|
||||
ACPI_CHECK_OK(AcpiInstallNotifyHandler, Status);
|
||||
|
||||
Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
|
||||
AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));
|
||||
ACPI_CHECK_OK(AcpiInstallNotifyHandler, Status);
|
||||
|
||||
/* Attempt duplicate handler installation, should fail */
|
||||
|
||||
Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
|
||||
(void) AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,
|
||||
AeNotifyHandler1, ACPI_CAST_PTR (void, 0x77777777));
|
||||
|
||||
Status = AcpiAttachData (Handle, AeAttachedDataHandler, Handle);
|
||||
|
@ -224,9 +224,13 @@ AeProcessInitFile(
|
||||
void)
|
||||
{
|
||||
ACPI_WALK_STATE *WalkState;
|
||||
int i;
|
||||
UINT64 idx;
|
||||
ACPI_STATUS Status;
|
||||
char *Token;
|
||||
char *ObjectBuffer;
|
||||
char *TempNameBuffer;
|
||||
ACPI_OBJECT_TYPE Type;
|
||||
ACPI_OBJECT TempObject;
|
||||
|
||||
|
||||
if (!InitFile)
|
||||
@ -249,26 +253,44 @@ AeProcessInitFile(
|
||||
AcpiOsAllocate (sizeof (INIT_FILE_ENTRY) * AcpiGbl_InitFileLineCount);
|
||||
for (idx = 0; fgets (LineBuffer, AE_FILE_BUFFER_SIZE, InitFile); ++idx)
|
||||
{
|
||||
if (sscanf (LineBuffer, "%s %s\n",
|
||||
&NameBuffer[1], ValueBuffer) != 2)
|
||||
|
||||
TempNameBuffer = AcpiDbGetNextToken (LineBuffer, &Token, &Type);
|
||||
if (LineBuffer[0] == '\\')
|
||||
{
|
||||
goto CleanupAndExit;
|
||||
strcpy (NameBuffer, TempNameBuffer);
|
||||
}
|
||||
|
||||
/* Add a root prefix if not present in the string */
|
||||
|
||||
i = 0;
|
||||
if (NameBuffer[1] == '\\')
|
||||
else
|
||||
{
|
||||
i = 1;
|
||||
/* Add a root prefix if not present in the string */
|
||||
|
||||
strcpy (NameBuffer + 1, TempNameBuffer);
|
||||
}
|
||||
|
||||
AcpiGbl_InitEntries[idx].Name =
|
||||
AcpiOsAllocateZeroed (strnlen (NameBuffer + i, AE_FILE_BUFFER_SIZE) + 1);
|
||||
AcpiOsAllocateZeroed (strnlen (NameBuffer, AE_FILE_BUFFER_SIZE) + 1);
|
||||
|
||||
strcpy (AcpiGbl_InitEntries[idx].Name, NameBuffer + i);
|
||||
strcpy (AcpiGbl_InitEntries[idx].Name, NameBuffer);
|
||||
|
||||
ObjectBuffer = AcpiDbGetNextToken (Token, &Token, &Type);
|
||||
|
||||
if (Type == ACPI_TYPE_FIELD_UNIT)
|
||||
{
|
||||
Status = AcpiDbConvertToObject (ACPI_TYPE_BUFFER, ObjectBuffer,
|
||||
&TempObject);
|
||||
}
|
||||
else
|
||||
{
|
||||
Status = AcpiDbConvertToObject (Type, ObjectBuffer, &TempObject);
|
||||
}
|
||||
|
||||
Status = AcpiUtCopyEobjectToIobject (&TempObject,
|
||||
&AcpiGbl_InitEntries[idx].ObjDesc);
|
||||
|
||||
if (Type == ACPI_TYPE_BUFFER || Type == ACPI_TYPE_FIELD_UNIT)
|
||||
{
|
||||
ACPI_FREE (TempObject.Buffer.Pointer);
|
||||
}
|
||||
|
||||
Status = AcpiUtStrtoul64 (ValueBuffer, &AcpiGbl_InitEntries[idx].Value);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
AcpiOsPrintf ("%s %s\n", ValueBuffer,
|
||||
@ -276,7 +298,16 @@ AeProcessInitFile(
|
||||
goto CleanupAndExit;
|
||||
}
|
||||
|
||||
AeEnterInitFileEntry (AcpiGbl_InitEntries[idx], WalkState);
|
||||
/*
|
||||
* Special case for field units. Field units are dependent on the
|
||||
* parent region. This parent region has yet to be created so defer the
|
||||
* initialization until the dispatcher. For all other types, initialize
|
||||
* the namespace node with the value found in the init file.
|
||||
*/
|
||||
if (Type != ACPI_TYPE_FIELD_UNIT)
|
||||
{
|
||||
AeEnterInitFileEntry (AcpiGbl_InitEntries[idx], WalkState);
|
||||
}
|
||||
}
|
||||
|
||||
/* Cleanup */
|
||||
@ -309,14 +340,12 @@ AeEnterInitFileEntry (
|
||||
ACPI_WALK_STATE *WalkState)
|
||||
{
|
||||
char *Pathname = InitEntry.Name;
|
||||
UINT64 Value = InitEntry.Value;
|
||||
ACPI_OPERAND_OBJECT *ObjDesc;
|
||||
ACPI_OPERAND_OBJECT *ObjDesc = InitEntry.ObjDesc;
|
||||
ACPI_NAMESPACE_NODE *NewNode;
|
||||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
AcpiOsPrintf ("Initializing namespace element: %s\n", Pathname);
|
||||
Status = AcpiNsLookup (NULL, Pathname, ACPI_TYPE_INTEGER,
|
||||
Status = AcpiNsLookup (NULL, Pathname, ObjDesc->Common.Type,
|
||||
ACPI_IMODE_LOAD_PASS2, ACPI_NS_ERROR_IF_FOUND | ACPI_NS_NO_UPSEARCH |
|
||||
ACPI_NS_EARLY_INIT, NULL, &NewNode);
|
||||
if (ACPI_FAILURE (Status))
|
||||
@ -327,15 +356,17 @@ AeEnterInitFileEntry (
|
||||
return;
|
||||
}
|
||||
|
||||
ObjDesc = AcpiUtCreateIntegerObject (Value);
|
||||
|
||||
AcpiOsPrintf ("New value: 0x%8.8X%8.8X\n",
|
||||
ACPI_FORMAT_UINT64 (Value));
|
||||
|
||||
/* Store pointer to value descriptor in the Node */
|
||||
|
||||
Status = AcpiNsAttachObject (NewNode, ObjDesc,
|
||||
ACPI_TYPE_INTEGER);
|
||||
ObjDesc->Common.Type);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
ACPI_EXCEPTION ((AE_INFO, Status,
|
||||
"While attaching object to node from namespace initialization file: %s",
|
||||
Pathname));
|
||||
return;
|
||||
}
|
||||
|
||||
/* Remove local reference to the object */
|
||||
|
||||
@ -359,7 +390,7 @@ AeEnterInitFileEntry (
|
||||
ACPI_STATUS
|
||||
AeLookupInitFileEntry (
|
||||
char *Pathname,
|
||||
UINT64 *Value)
|
||||
ACPI_OPERAND_OBJECT **ObjDesc)
|
||||
{
|
||||
UINT32 i;
|
||||
|
||||
@ -372,7 +403,7 @@ AeLookupInitFileEntry (
|
||||
{
|
||||
if (!strcmp(AcpiGbl_InitEntries[i].Name, Pathname))
|
||||
{
|
||||
*Value = AcpiGbl_InitEntries[i].Value;
|
||||
*ObjDesc = AcpiGbl_InitEntries[i].ObjDesc;
|
||||
return AE_OK;
|
||||
}
|
||||
}
|
||||
|
@ -841,8 +841,8 @@ main (
|
||||
|
||||
ErrorExit:
|
||||
AeLateTest ();
|
||||
AcpiOsFree (AcpiGbl_InitEntries);
|
||||
(void) AcpiTerminate ();
|
||||
AcDeleteTableList (ListHead);
|
||||
AcpiOsFree (AcpiGbl_InitEntries);
|
||||
return (ExitCode);
|
||||
}
|
||||
|
@ -190,6 +190,7 @@ AeMiscellaneousTests (
|
||||
ACPI_STATUS Status;
|
||||
ACPI_STATISTICS Stats;
|
||||
ACPI_HANDLE Handle;
|
||||
UINT32 TableIndex;
|
||||
|
||||
#if (!ACPI_REDUCED_HARDWARE)
|
||||
UINT32 Temp;
|
||||
@ -218,18 +219,15 @@ AeMiscellaneousTests (
|
||||
|
||||
/* Load and unload SSDT4 */
|
||||
|
||||
Status = AcpiLoadTable ((ACPI_TABLE_HEADER *) Ssdt4Code);
|
||||
Status = AcpiLoadTable ((ACPI_TABLE_HEADER *) Ssdt4Code, &TableIndex);
|
||||
ACPI_CHECK_OK (AcpiLoadTable, Status);
|
||||
|
||||
Status = AcpiGetHandle (NULL, "\\_T96", &Handle);
|
||||
ACPI_CHECK_OK (AcpiGetHandle, Status);
|
||||
|
||||
Status = AcpiUnloadParentTable (Handle);
|
||||
ACPI_CHECK_OK (AcpiUnloadParentTable, Status);
|
||||
Status = AcpiUnloadTable (TableIndex);
|
||||
ACPI_CHECK_OK (AcpiUnloadTable, Status);
|
||||
|
||||
/* Re-load SSDT4 */
|
||||
|
||||
Status = AcpiLoadTable ((ACPI_TABLE_HEADER *) Ssdt4Code);
|
||||
Status = AcpiLoadTable ((ACPI_TABLE_HEADER *) Ssdt4Code, NULL);
|
||||
ACPI_CHECK_OK (AcpiLoadTable, Status);
|
||||
|
||||
/* Unload and re-load SSDT2 (SSDT2 is in the XSDT) */
|
||||
@ -240,12 +238,12 @@ AeMiscellaneousTests (
|
||||
Status = AcpiUnloadParentTable (Handle);
|
||||
ACPI_CHECK_OK (AcpiUnloadParentTable, Status);
|
||||
|
||||
Status = AcpiLoadTable ((ACPI_TABLE_HEADER *) Ssdt2Code);
|
||||
Status = AcpiLoadTable ((ACPI_TABLE_HEADER *) Ssdt2Code, NULL);
|
||||
ACPI_CHECK_OK (AcpiLoadTable, Status);
|
||||
|
||||
/* Load OEM9 table (causes table override) */
|
||||
|
||||
Status = AcpiLoadTable ((ACPI_TABLE_HEADER *) Ssdt3Code);
|
||||
Status = AcpiLoadTable ((ACPI_TABLE_HEADER *) Ssdt3Code, NULL);
|
||||
ACPI_CHECK_OK (AcpiLoadTable, Status);
|
||||
}
|
||||
|
||||
|
@ -302,7 +302,7 @@ AhFindPredefinedNames (
|
||||
|
||||
if (!NamePrefix || (*NamePrefix == '*'))
|
||||
{
|
||||
Found = AhDisplayPredefinedName (NULL, 0);
|
||||
(void) AhDisplayPredefinedName (NULL, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -168,6 +168,8 @@
|
||||
|
||||
/* Utilities */
|
||||
|
||||
#ifdef ACPI_OBSOLETE_FUNCTIONS
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiUtCopyIobjectToEobject (
|
||||
ACPI_OPERAND_OBJECT *Obj,
|
||||
@ -201,6 +203,7 @@ AcpiUtCopyIobjectToIobject (
|
||||
|
||||
return (AE_NOT_IMPLEMENTED);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Hardware */
|
||||
|
||||
@ -213,6 +216,8 @@ AcpiHwGetMode (
|
||||
|
||||
/* Event manager */
|
||||
|
||||
#ifdef ACPI_OBSOLETE_FUNCTIONS
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiEvInstallRegionHandlers (
|
||||
void)
|
||||
@ -233,6 +238,7 @@ AcpiEvInitializeRegion (
|
||||
{
|
||||
return (AE_OK);
|
||||
}
|
||||
#endif
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiEvInstallXruptHandlers (
|
||||
@ -251,6 +257,8 @@ AcpiEvInitializeEvents (
|
||||
|
||||
/* AML Interpreter */
|
||||
|
||||
#ifdef ACPI_OBSOLETE_FUNCTIONS
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiExReadDataFromField (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
@ -288,7 +296,6 @@ AcpiExStoreObjectToNode (
|
||||
return (AE_NOT_IMPLEMENTED);
|
||||
}
|
||||
|
||||
|
||||
/* Namespace manager */
|
||||
|
||||
ACPI_STATUS
|
||||
@ -300,6 +307,7 @@ AcpiNsEvaluate (
|
||||
|
||||
return (AE_NOT_IMPLEMENTED);
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
AcpiExDoDebugObject (
|
||||
@ -358,6 +366,8 @@ AcpiExTracePoint (
|
||||
|
||||
/* Dispatcher */
|
||||
|
||||
#ifdef ACPI_OBSOLETE_FUNCTIONS
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsAutoSerializeMethod (
|
||||
ACPI_NAMESPACE_NODE *Node,
|
||||
@ -436,6 +446,7 @@ AcpiDsGetPredicateValue (
|
||||
|
||||
return (AE_NOT_IMPLEMENTED);
|
||||
}
|
||||
#endif
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsGetBufferFieldArguments (
|
||||
@ -472,6 +483,8 @@ AcpiDsGetPackageArguments (
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
#ifdef ACPI_OBSOLETE_FUNCTIONS
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiDsExecBeginOp (
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
@ -492,3 +505,5 @@ AcpiDsExecEndOp (
|
||||
|
||||
return (AE_NOT_IMPLEMENTED);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -546,7 +546,7 @@ AsConvertFile (
|
||||
{
|
||||
/* Decode the function bitmap */
|
||||
|
||||
switch ((1 << i) & Functions)
|
||||
switch (((UINT32) 1 << i) & Functions)
|
||||
{
|
||||
case 0:
|
||||
|
||||
|
@ -264,7 +264,6 @@ AsRemoveConditionalCompile (
|
||||
|
||||
|
||||
KeywordLength = strlen (Keyword);
|
||||
SubBuffer = Buffer;
|
||||
SubString = Buffer;
|
||||
|
||||
while (SubString)
|
||||
@ -401,7 +400,7 @@ AsRemoveConditionalCompile (
|
||||
|
||||
/* Remove the lines */
|
||||
|
||||
SubBuffer = AsRemoveData (SubString, SubBuffer);
|
||||
(void) AsRemoveData (SubString, SubBuffer);
|
||||
}
|
||||
}
|
||||
|
||||
@ -591,7 +590,7 @@ AsReduceTypedefs (
|
||||
/* Remove the typedef itself */
|
||||
|
||||
SubBuffer = SubString + strlen ("typedef") + 1;
|
||||
SubBuffer = AsRemoveData (SubString, SubBuffer);
|
||||
(void) AsRemoveData (SubString, SubBuffer);
|
||||
|
||||
/* Find the opening brace of the struct or union */
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Before running this file, we assume we have generated all tables by running
|
||||
# the command `iasl -T ALL`
|
||||
# the command `$(ASL) -T ALL`
|
||||
#
|
||||
# Note: the NAME flag is required when running the test
|
||||
|
||||
@ -12,17 +12,17 @@ all: $(aml_obj2)
|
||||
|
||||
# recompile and binary compare
|
||||
$(aml_obj2): %_recomp.aml: %.dsl
|
||||
iasl -p `basename $@` $< > /dev/null 2> /dev/null
|
||||
acpibin -c $@ $(patsubst %_recomp.aml,%.aml,$@) > /dev/null 2> /dev/null
|
||||
$(ASL) -p `basename $@` $< > /dev/null 2> /dev/null
|
||||
$(acpibin) -c $@ $(patsubst %_recomp.aml,%.aml,$@) > /dev/null 2> /dev/null
|
||||
printf "Data table %s PASS\n" $(basename $< .dsl)
|
||||
|
||||
# disassemble
|
||||
$(dsl_obj): %.dsl: %.aml
|
||||
iasl -d $< > /dev/null 2> /dev/null
|
||||
$(ASL) -d $< > /dev/null 2> /dev/null
|
||||
|
||||
# initial compile
|
||||
$(aml_obj): %.aml: %.asl
|
||||
iasl $< > /dev/null 2> /dev/null
|
||||
$(ASL) $< > /dev/null 2> /dev/null
|
||||
|
||||
|
||||
templates :
|
||||
|
Loading…
Reference in New Issue
Block a user