aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2019-10-18 18:00:41 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2019-10-18 18:00:41 +0000
commit858f47305dae045d81f39451ade697ba99b3266f (patch)
tree67a913169f2c94028780a7a2a0c84fc9f84e8c60
parente63852a7532181a14cec2928b31af2209e98414a (diff)
downloadsrc-858f47305dae045d81f39451ade697ba99b3266f.tar.gz
src-858f47305dae045d81f39451ade697ba99b3266f.zip
Import ACPICA 20191018.vendor/acpica/20191018
Notes
Notes: svn path=/vendor-sys/acpica/dist/; revision=353735 svn path=/vendor-sys/acpica/20191018/; revision=353736; tag=vendor/acpica/20191018
-rw-r--r--changes.txt47
-rw-r--r--generate/unix/acpinames/Makefile42
-rw-r--r--source/common/acgetline.c2
-rw-r--r--source/common/adisasm.c1
-rw-r--r--source/common/adwalk.c4
-rw-r--r--source/common/dmtables.c4
-rw-r--r--source/common/dmtbdump1.c22
-rw-r--r--source/common/dmtbdump2.c24
-rw-r--r--source/common/dmtbdump3.c6
-rw-r--r--source/compiler/aslanalyze.c2
-rw-r--r--source/compiler/aslbtypes.c1
-rw-r--r--source/compiler/aslkeywords.y2
-rw-r--r--source/compiler/aslload.c13
-rw-r--r--source/compiler/aslmessages.c5
-rw-r--r--source/compiler/aslmessages.h3
-rw-r--r--source/compiler/aslmethod.c20
-rw-r--r--source/compiler/aslnamesp.c4
-rw-r--r--source/compiler/aslprepkg.c2
-rw-r--r--source/compiler/aslresource.c2
-rw-r--r--source/compiler/aslrestype2.c3
-rw-r--r--source/compiler/aslrestype2s.c1
-rw-r--r--source/compiler/aslutils.c2
-rw-r--r--source/compiler/cvdisasm.c9
-rw-r--r--source/compiler/cvparser.c1
-rw-r--r--source/compiler/dtcompile.c15
-rw-r--r--source/compiler/dtcompiler.h39
-rw-r--r--source/compiler/dtcompilerparser.l20
-rw-r--r--source/compiler/dtcompilerparser.y50
-rw-r--r--source/compiler/dtfield.c127
-rw-r--r--source/compiler/dtio.c98
-rw-r--r--source/compiler/dttable2.c23
-rw-r--r--source/components/debugger/dbconvert.c4
-rw-r--r--source/components/debugger/dbdisply.c2
-rw-r--r--source/components/debugger/dbfileio.c2
-rw-r--r--source/components/debugger/dbinput.c36
-rw-r--r--source/components/debugger/dbmethod.c5
-rw-r--r--source/components/debugger/dbnames.c122
-rw-r--r--source/components/debugger/dbobject.c1
-rw-r--r--source/components/disassembler/dmdeferred.c4
-rw-r--r--source/components/disassembler/dmresrc.c1
-rw-r--r--source/components/disassembler/dmwalk.c1
-rw-r--r--source/components/dispatcher/dscontrol.c2
-rw-r--r--source/components/dispatcher/dsfield.c9
-rw-r--r--source/components/events/evgpeblk.c6
-rw-r--r--source/components/events/evgpeinit.c3
-rw-r--r--source/components/events/evmisc.c17
-rw-r--r--source/components/events/evregion.c4
-rw-r--r--source/components/events/evrgnini.c1
-rw-r--r--source/components/hardware/hwxfsleep.c4
-rw-r--r--source/components/namespace/nsconvert.c2
-rw-r--r--source/components/namespace/nsdump.c6
-rw-r--r--source/components/namespace/nsxfname.c2
-rw-r--r--source/components/parser/psobject.c6
-rw-r--r--source/components/resources/rscreate.c4
-rw-r--r--source/components/tables/tbdata.c4
-rw-r--r--source/components/tables/tbxfload.c49
-rw-r--r--source/components/utilities/utbuffer.c62
-rw-r--r--source/components/utilities/utids.c3
-rw-r--r--source/components/utilities/uttrack.c2
-rw-r--r--source/include/acdebug.h4
-rw-r--r--source/include/acpixf.h10
-rw-r--r--source/include/acstruct.h13
-rw-r--r--source/include/acutils.h9
-rw-r--r--source/include/platform/acfreebsd.h4
-rw-r--r--source/os_specific/service_layers/oswinxf.c2
-rw-r--r--source/tools/acpiexec/aecommon.h5
-rw-r--r--source/tools/acpiexec/aehandlers.c13
-rw-r--r--source/tools/acpiexec/aeinitfile.c81
-rw-r--r--source/tools/acpiexec/aemain.c2
-rw-r--r--source/tools/acpiexec/aetests.c16
-rw-r--r--source/tools/acpihelp/ahdecode.c2
-rw-r--r--source/tools/acpinames/anstubs.c17
-rw-r--r--source/tools/acpisrc/asfile.c2
-rw-r--r--source/tools/acpisrc/asremove.c5
-rw-r--r--tests/templates/Makefile10
75 files changed, 844 insertions, 309 deletions
diff --git a/changes.txt b/changes.txt
index 510a4ca24017..d7f84e92f670 100644
--- a/changes.txt
+++ b/changes.txt
@@ -1,4 +1,51 @@
----------------------------------------
+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:
This release is available at https://acpica.org/downloads
diff --git a/generate/unix/acpinames/Makefile b/generate/unix/acpinames/Makefile
index db87d8840e29..90d3afe29e4f 100644
--- a/generate/unix/acpinames/Makefile
+++ b/generate/unix/acpinames/Makefile
@@ -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
diff --git a/source/common/acgetline.c b/source/common/acgetline.c
index 702d046b2728..3865914b3f3d 100644
--- a/source/common/acgetline.c
+++ b/source/common/acgetline.c
@@ -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:
diff --git a/source/common/adisasm.c b/source/common/adisasm.c
index c73208f68df6..22a850090bf9 100644
--- a/source/common/adisasm.c
+++ b/source/common/adisasm.c
@@ -746,7 +746,6 @@ AdDoExternalFileList (
{
ExternalFileList = ExternalFileList->Next;
GlobalStatus = AE_TYPE;
- Status = AE_OK;
continue;
}
diff --git a/source/common/adwalk.c b/source/common/adwalk.c
index 6da2e8ec944d..1996c965c7a0 100644
--- a/source/common/adwalk.c
+++ b/source/common/adwalk.c
@@ -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);
}
diff --git a/source/common/dmtables.c b/source/common/dmtables.c
index a2dbea62a3b8..e5536ecf3979 100644
--- a/source/common/dmtables.c
+++ b/source/common/dmtables.c
@@ -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 */
diff --git a/source/common/dmtbdump1.c b/source/common/dmtbdump1.c
index c363ac8d5fad..9061ea11f9aa 100644
--- a/source/common/dmtbdump1.c
+++ b/source/common/dmtbdump1.c
@@ -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;
diff --git a/source/common/dmtbdump2.c b/source/common/dmtbdump2.c
index 418b6ec0cd15..e350d23cc158 100644
--- a/source/common/dmtbdump2.c
+++ b/source/common/dmtbdump2.c
@@ -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 @@ NextSubtable:
/* 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;
diff --git a/source/common/dmtbdump3.c b/source/common/dmtbdump3.c
index 0b9863cce596..561a0032a02d 100644
--- a/source/common/dmtbdump3.c
+++ b/source/common/dmtbdump3.c
@@ -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;
diff --git a/source/compiler/aslanalyze.c b/source/compiler/aslanalyze.c
index 58da5e2eec7c..0482775f424e 100644
--- a/source/compiler/aslanalyze.c
+++ b/source/compiler/aslanalyze.c
@@ -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;
/*
diff --git a/source/compiler/aslbtypes.c b/source/compiler/aslbtypes.c
index ed607f3bee9e..d7caea53f3ba 100644
--- a/source/compiler/aslbtypes.c
+++ b/source/compiler/aslbtypes.c
@@ -474,7 +474,6 @@ AnFormatBtype (
strcat (Buffer, "|");
}
- First = FALSE;
strcat (Buffer, "Resource");
}
}
diff --git a/source/compiler/aslkeywords.y b/source/compiler/aslkeywords.y
index a19b6425be0b..a505dc029468 100644
--- a/source/compiler/aslkeywords.y
+++ b/source/compiler/aslkeywords.y
@@ -202,7 +202,7 @@ AddressKeyword
;
AddressSpaceKeyword
- : ByteConst {$$ = UtCheckIntegerRange ($1, 0x0A, 0xFF);}
+ : ByteConst {$$ = UtCheckIntegerRange ($1, ACPI_NUM_PREDEFINED_REGIONS, 0xFF);}
| RegionSpaceKeyword {}
;
diff --git a/source/compiler/aslload.c b/source/compiler/aslload.c
index d918c0cc76ff..db6c2d41eeef 100644
--- a/source/compiler/aslload.c
+++ b/source/compiler/aslload.c
@@ -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);
diff --git a/source/compiler/aslmessages.c b/source/compiler/aslmessages.c
index 8dd989ca9ce3..d132935234f2 100644
--- a/source/compiler/aslmessages.c
+++ b/source/compiler/aslmessages.c
@@ -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 */
diff --git a/source/compiler/aslmessages.h b/source/compiler/aslmessages.h
index 55473fb5395f..47e5bf4314d8 100644
--- a/source/compiler/aslmessages.h
+++ b/source/compiler/aslmessages.h
@@ -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 */
diff --git a/source/compiler/aslmethod.c b/source/compiler/aslmethod.c
index 98884bc37ef8..667eaaaf8a81 100644
--- a/source/compiler/aslmethod.c
+++ b/source/compiler/aslmethod.c
@@ -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:
diff --git a/source/compiler/aslnamesp.c b/source/compiler/aslnamesp.c
index b5af0cb31be8..e38e397ff8b6 100644
--- a/source/compiler/aslnamesp.c
+++ b/source/compiler/aslnamesp.c
@@ -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 */
diff --git a/source/compiler/aslprepkg.c b/source/compiler/aslprepkg.c
index f55bb5e806e4..77969430cb07 100644
--- a/source/compiler/aslprepkg.c
+++ b/source/compiler/aslprepkg.c
@@ -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;
}
diff --git a/source/compiler/aslresource.c b/source/compiler/aslresource.c
index 82de51098e82..57b6440f2c12 100644
--- a/source/compiler/aslresource.c
+++ b/source/compiler/aslresource.c
@@ -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);
diff --git a/source/compiler/aslrestype2.c b/source/compiler/aslrestype2.c
index 5b8f026e8f24..0652272ff3be 100644
--- a/source/compiler/aslrestype2.c
+++ b/source/compiler/aslrestype2.c
@@ -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);
diff --git a/source/compiler/aslrestype2s.c b/source/compiler/aslrestype2s.c
index 2308505436b3..410ff2b2c7f6 100644
--- a/source/compiler/aslrestype2s.c
+++ b/source/compiler/aslrestype2s.c
@@ -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;
diff --git a/source/compiler/aslutils.c b/source/compiler/aslutils.c
index ed2948d04365..0faaec03dd8d 100644
--- a/source/compiler/aslutils.c
+++ b/source/compiler/aslutils.c
@@ -223,7 +223,7 @@ UtQueryForOverwrite (
char *Pathname)
{
struct stat StatInfo;
- int InChar = 0x34;
+ int InChar;
if (!stat (Pathname, &StatInfo))
diff --git a/source/compiler/cvdisasm.c b/source/compiler/cvdisasm.c
index 3ff636f84f62..5396b3c33142 100644
--- a/source/compiler/cvdisasm.c
+++ b/source/compiler/cvdisasm.c
@@ -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;
+ }
}
diff --git a/source/compiler/cvparser.c b/source/compiler/cvparser.c
index ca970b50a1cc..9a2f0f9c2217 100644
--- a/source/compiler/cvparser.c
+++ b/source/compiler/cvparser.c
@@ -912,7 +912,6 @@ CvCaptureCommentsOnly (
/* Not a valid comment option. Revert the AML */
- Aml -= 2;
goto DefBlock;
} /* End switch statement */
diff --git a/source/compiler/dtcompile.c b/source/compiler/dtcompile.c
index b6a144feb2bf..bdd8c1b70b8d 100644
--- a/source/compiler/dtcompile.c
+++ b/source/compiler/dtcompile.c
@@ -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:
diff --git a/source/compiler/dtcompiler.h b/source/compiler/dtcompiler.h
index 639c22cb7273..7c78b55bafa7 100644
--- a/source/compiler/dtcompiler.h
+++ b/source/compiler/dtcompiler.h
@@ -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 */
diff --git a/source/compiler/dtcompilerparser.l b/source/compiler/dtcompilerparser.l
index 0d68f41e4b2d..28dcf6af84bf 100644
--- a/source/compiler/dtcompilerparser.l
+++ b/source/compiler/dtcompilerparser.l
@@ -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);
}
diff --git a/source/compiler/dtcompilerparser.y b/source/compiler/dtcompilerparser.y
index ba9d2827e5aa..43eba4e9c8f6 100644
--- a/source/compiler/dtcompilerparser.y
+++ b/source/compiler/dtcompilerparser.y
@@ -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);
+ }
;
diff --git a/source/compiler/dtfield.c b/source/compiler/dtfield.c
index 1f7167618dc4..18d44110d507 100644
--- a/source/compiler/dtfield.c
+++ b/source/compiler/dtfield.c
@@ -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;
+ }
+}
diff --git a/source/compiler/dtio.c b/source/compiler/dtio.c
index d027353c71ce..b596fda8b87d 100644
--- a/source/compiler/dtio.c
+++ b/source/compiler/dtio.c
@@ -162,10 +162,6 @@ static char *
DtTrim (
char *String);
-static void
-DtLinkField (
- DT_FIELD *Field);
-
static ACPI_STATUS
DtParseLine (
char *LineBuffer,
@@ -299,45 +295,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
*
* PARAMETERS: LineBuffer - Current source code line
@@ -495,59 +452,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
*
* PARAMETERS: Handle - Open file handle for the source file
@@ -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;
diff --git a/source/compiler/dttable2.c b/source/compiler/dttable2.c
index 04f48cc0ca99..bbaaafaa763b 100644
--- a/source/compiler/dttable2.c
+++ b/source/compiler/dttable2.c
@@ -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);
}
diff --git a/source/components/debugger/dbconvert.c b/source/components/debugger/dbconvert.c
index 631e7e8ff98f..6b58bf5faf62 100644
--- a/source/components/debugger/dbconvert.c
+++ b/source/components/debugger/dbconvert.c
@@ -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];)
diff --git a/source/components/debugger/dbdisply.c b/source/components/debugger/dbdisply.c
index 539ff5af117d..72bf1c6be28e 100644
--- a/source/components/debugger/dbdisply.c
+++ b/source/components/debugger/dbdisply.c
@@ -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)
diff --git a/source/components/debugger/dbfileio.c b/source/components/debugger/dbfileio.c
index e937c3e4a631..7567fa75447a 100644
--- a/source/components/debugger/dbfileio.c
+++ b/source/components/debugger/dbfileio.c
@@ -253,7 +253,7 @@ AcpiDbLoadTables (
{
Table = TableListHead->Table;
- Status = AcpiLoadTable (Table);
+ Status = AcpiLoadTable (Table, NULL);
if (ACPI_FAILURE (Status))
{
if (Status == AE_ALREADY_EXISTS)
diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c
index d091d351b02c..c854cb37a7fe 100644
--- a/source/components/debugger/dbinput.c
+++ b/source/components/debugger/dbinput.c
@@ -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;
diff --git a/source/components/debugger/dbmethod.c b/source/components/debugger/dbmethod.c
index 6893c5502aba..24c014f9d7cb 100644
--- a/source/components/debugger/dbmethod.c
+++ b/source/components/debugger/dbmethod.c
@@ -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 */
diff --git a/source/components/debugger/dbnames.c b/source/components/debugger/dbnames.c
index 2c9af4be741d..ac366ab04ca2 100644
--- a/source/components/debugger/dbnames.c
+++ b/source/components/debugger/dbnames.c
@@ -154,6 +154,7 @@
#include "acnamesp.h"
#include "acdebug.h"
#include "acpredef.h"
+#include "acinterp.h"
#define _COMPONENT ACPI_CA_DEBUGGER
@@ -724,6 +725,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
*
* PARAMETERS: Callback from WalkNamespace
@@ -859,6 +945,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
*
* PARAMETERS: Callback from WalkNamespace
diff --git a/source/components/debugger/dbobject.c b/source/components/debugger/dbobject.c
index cebf4420528b..cffa0a533726 100644
--- a/source/components/debugger/dbobject.c
+++ b/source/components/debugger/dbobject.c
@@ -649,7 +649,6 @@ AcpiDbDecodeArguments (
Node = WalkState->MethodNode;
- ObjDesc = WalkState->MethodDesc;
/* There are no arguments for the module-level code case */
diff --git a/source/components/disassembler/dmdeferred.c b/source/components/disassembler/dmdeferred.c
index d0753bb0463c..d0a589c9c7ba 100644
--- a/source/components/disassembler/dmdeferred.c
+++ b/source/components/disassembler/dmdeferred.c
@@ -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;
diff --git a/source/components/disassembler/dmresrc.c b/source/components/disassembler/dmresrc.c
index bb36b7349581..c2e85b8a2e31 100644
--- a/source/components/disassembler/dmresrc.c
+++ b/source/components/disassembler/dmresrc.c
@@ -441,7 +441,6 @@ AcpiDmResourceTemplate (
* missing EndDependentDescriptor.
*/
Level--;
- DependentFns = FALSE;
/* Go ahead and insert EndDependentFn() */
diff --git a/source/components/disassembler/dmwalk.c b/source/components/disassembler/dmwalk.c
index 8ec8728e2225..97b330397190 100644
--- a/source/components/disassembler/dmwalk.c
+++ b/source/components/disassembler/dmwalk.c
@@ -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 */
diff --git a/source/components/dispatcher/dscontrol.c b/source/components/dispatcher/dscontrol.c
index 238c77bbff6b..85b4679eb268 100644
--- a/source/components/dispatcher/dscontrol.c
+++ b/source/components/dispatcher/dscontrol.c
@@ -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 */
diff --git a/source/components/dispatcher/dsfield.c b/source/components/dispatcher/dsfield.c
index 3aff4db10262..5477686f1b5c 100644
--- a/source/components/dispatcher/dsfield.c
+++ b/source/components/dispatcher/dsfield.c
@@ -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;
diff --git a/source/components/events/evgpeblk.c b/source/components/events/evgpeblk.c
index 80157dcd362f..e0e2780f34fc 100644
--- a/source/components/events/evgpeblk.c
+++ b/source/components/events/evgpeblk.c
@@ -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);
diff --git a/source/components/events/evgpeinit.c b/source/components/events/evgpeinit.c
index b7e02a060bcf..7e3c766c69d9 100644
--- a/source/components/events/evgpeinit.c
+++ b/source/components/events/evgpeinit.c
@@ -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;
}
diff --git a/source/components/events/evmisc.c b/source/components/events/evmisc.c
index f73cc2f3c8ac..68f1dc8a361a 100644
--- a/source/components/events/evmisc.c
+++ b/source/components/events/evmisc.c
@@ -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 */
diff --git a/source/components/events/evregion.c b/source/components/events/evregion.c
index 6f6d7ccc8b50..13a20918c886 100644
--- a/source/components/events/evregion.c
+++ b/source/components/events/evregion.c
@@ -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;
}
diff --git a/source/components/events/evrgnini.c b/source/components/events/evrgnini.c
index 718e2e87d933..3c865c59f267 100644
--- a/source/components/events/evrgnini.c
+++ b/source/components/events/evrgnini.c
@@ -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
{
diff --git a/source/components/hardware/hwxfsleep.c b/source/components/hardware/hwxfsleep.c
index 3df8f5a545f3..78dc19020334 100644
--- a/source/components/hardware/hwxfsleep.c
+++ b/source/components/hardware/hwxfsleep.c
@@ -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);
diff --git a/source/components/namespace/nsconvert.c b/source/components/namespace/nsconvert.c
index d2b32d25d2bf..ae590490783a 100644
--- a/source/components/namespace/nsconvert.c
+++ b/source/components/namespace/nsconvert.c
@@ -670,5 +670,5 @@ AcpiNsConvertToReference (
ErrorExit:
ACPI_FREE (Name);
*ReturnObject = NewObject;
- return (AE_OK);
+ return (Status);
}
diff --git a/source/components/namespace/nsdump.c b/source/components/namespace/nsdump.c
index 8a2a7e92da1b..0ed4d72cb123 100644
--- a/source/components/namespace/nsdump.c
+++ b/source/components/namespace/nsdump.c
@@ -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:
diff --git a/source/components/namespace/nsxfname.c b/source/components/namespace/nsxfname.c
index 7332a92f3e87..85be591f46ae 100644
--- a/source/components/namespace/nsxfname.c
+++ b/source/components/namespace/nsxfname.c
@@ -611,7 +611,7 @@ AcpiGetObjectInfo (
if (Cls)
{
- NextIdString = AcpiNsCopyDeviceId (&Info->ClassCode,
+ (void) AcpiNsCopyDeviceId (&Info->ClassCode,
Cls, NextIdString);
}
diff --git a/source/components/parser/psobject.c b/source/components/parser/psobject.c
index 61c3a868ac6e..6ceb7d91c36d 100644
--- a/source/components/parser/psobject.c
+++ b/source/components/parser/psobject.c
@@ -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:
diff --git a/source/components/resources/rscreate.c b/source/components/resources/rscreate.c
index 26640c209e94..172bc55fb11e 100644
--- a/source/components/resources/rscreate.c
+++ b/source/components/resources/rscreate.c
@@ -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 */
diff --git a/source/components/tables/tbdata.c b/source/components/tables/tbdata.c
index 84dd25bdf26c..6eb1f24a9495 100644
--- a/source/components/tables/tbdata.c
+++ b/source/components/tables/tbdata.c
@@ -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
diff --git a/source/components/tables/tbxfload.c b/source/components/tables/tbxfload.c
index 1e17db6c8c93..24daafcffbef 100644
--- a/source/components/tables/tbxfload.c
+++ b/source/components/tables/tbxfload.c
@@ -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)
diff --git a/source/components/utilities/utbuffer.c b/source/components/utilities/utbuffer.c
index 44fd30a6a16a..015c16f93939 100644
--- a/source/components/utilities/utbuffer.c
+++ b/source/components/utilities/utbuffer.c
@@ -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;
}
diff --git a/source/components/utilities/utids.c b/source/components/utilities/utids.c
index 5fcfbf66809e..513548c24a9e 100644
--- a/source/components/utilities/utids.c
+++ b/source/components/utilities/utids.c
@@ -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;
}
diff --git a/source/components/utilities/uttrack.c b/source/components/utilities/uttrack.c
index c6e6b45bd6de..76e439fee354 100644
--- a/source/components/utilities/uttrack.c
+++ b/source/components/utilities/uttrack.c
@@ -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;
diff --git a/source/include/acdebug.h b/source/include/acdebug.h
index 4e43bbee2235..f296cb9453b9 100644
--- a/source/include/acdebug.h
+++ b/source/include/acdebug.h
@@ -392,6 +392,10 @@ void
AcpiDbGetBusInfo (
void);
+ACPI_STATUS
+AcpiDbDisplayFields (
+ UINT32 AddressSpaceId);
+
/*
* dbdisply - debug display commands
diff --git a/source/include/acpixf.h b/source/include/acpixf.h
index a123eed7fd86..62e379096783 100644
--- a/source/include/acpixf.h
+++ b/source/include/acpixf.h
@@ -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
diff --git a/source/include/acstruct.h b/source/include/acstruct.h
index f81c8a7dd386..e6ab1d907412 100644
--- a/source/include/acstruct.h
+++ b/source/include/acstruct.h
@@ -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
diff --git a/source/include/acutils.h b/source/include/acutils.h
index 0c2327d2c3ca..6352b5ff304e 100644
--- a/source/include/acutils.h
+++ b/source/include/acutils.h
@@ -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
/*
diff --git a/source/include/platform/acfreebsd.h b/source/include/platform/acfreebsd.h
index aaeecfb3cfa7..46de7c830bed 100644
--- a/source/include/platform/acfreebsd.h
+++ b/source/include/platform/acfreebsd.h
@@ -203,6 +203,10 @@
#define DEBUGGER_THREADING 0 /* integrated with DDB */
+#ifdef INVARIANTS
+#define ACPI_MUTEX_DEBUG
+#endif
+
#else /* _KERNEL */
#if __STDC_HOSTED__
diff --git a/source/os_specific/service_layers/oswinxf.c b/source/os_specific/service_layers/oswinxf.c
index 138004e36d37..41d7ca3be923 100644
--- a/source/os_specific/service_layers/oswinxf.c
+++ b/source/os_specific/service_layers/oswinxf.c
@@ -458,7 +458,7 @@ AcpiOsGetTimer (
{
/* Convert milliseconds to 100 nanosecond ticks */
- return ((UINT64) GetTickCount() * ACPI_100NSEC_PER_MSEC);
+ return (GetTickCount64() * ACPI_100NSEC_PER_MSEC);
}
}
diff --git a/source/tools/acpiexec/aecommon.h b/source/tools/acpiexec/aecommon.h
index 602356de9dcc..257632f7b441 100644
--- a/source/tools/acpiexec/aecommon.h
+++ b/source/tools/acpiexec/aecommon.h
@@ -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 */
diff --git a/source/tools/acpiexec/aehandlers.c b/source/tools/acpiexec/aehandlers.c
index 75e8eb0a0948..f7dd012e9714 100644
--- a/source/tools/acpiexec/aehandlers.c
+++ b/source/tools/acpiexec/aehandlers.c
@@ -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);
diff --git a/source/tools/acpiexec/aeinitfile.c b/source/tools/acpiexec/aeinitfile.c
index f895e2ccec99..35e2b8b8d643 100644
--- a/source/tools/acpiexec/aeinitfile.c
+++ b/source/tools/acpiexec/aeinitfile.c
@@ -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);
+ }
+ else
+ {
+ /* Add a root prefix if not present in the string */
+
+ strcpy (NameBuffer + 1, TempNameBuffer);
}
- /* Add a root prefix if not present in the string */
+ AcpiGbl_InitEntries[idx].Name =
+ AcpiOsAllocateZeroed (strnlen (NameBuffer, AE_FILE_BUFFER_SIZE) + 1);
+
+ strcpy (AcpiGbl_InitEntries[idx].Name, NameBuffer);
+
+ ObjectBuffer = AcpiDbGetNextToken (Token, &Token, &Type);
- i = 0;
- if (NameBuffer[1] == '\\')
+ if (Type == ACPI_TYPE_FIELD_UNIT)
+ {
+ Status = AcpiDbConvertToObject (ACPI_TYPE_BUFFER, ObjectBuffer,
+ &TempObject);
+ }
+ else
{
- i = 1;
+ Status = AcpiDbConvertToObject (Type, ObjectBuffer, &TempObject);
}
- AcpiGbl_InitEntries[idx].Name =
- AcpiOsAllocateZeroed (strnlen (NameBuffer + i, AE_FILE_BUFFER_SIZE) + 1);
+ Status = AcpiUtCopyEobjectToIobject (&TempObject,
+ &AcpiGbl_InitEntries[idx].ObjDesc);
- strcpy (AcpiGbl_InitEntries[idx].Name, NameBuffer + i);
+ 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;
}
}
diff --git a/source/tools/acpiexec/aemain.c b/source/tools/acpiexec/aemain.c
index 65664b236021..b5dc37fb5e04 100644
--- a/source/tools/acpiexec/aemain.c
+++ b/source/tools/acpiexec/aemain.c
@@ -841,8 +841,8 @@ NormalExit:
ErrorExit:
AeLateTest ();
+ AcpiOsFree (AcpiGbl_InitEntries);
(void) AcpiTerminate ();
AcDeleteTableList (ListHead);
- AcpiOsFree (AcpiGbl_InitEntries);
return (ExitCode);
}
diff --git a/source/tools/acpiexec/aetests.c b/source/tools/acpiexec/aetests.c
index f11a61283655..24b4e35eaf5a 100644
--- a/source/tools/acpiexec/aetests.c
+++ b/source/tools/acpiexec/aetests.c
@@ -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);
}
diff --git a/source/tools/acpihelp/ahdecode.c b/source/tools/acpihelp/ahdecode.c
index 13b72d6bb149..4e5f9a8d139c 100644
--- a/source/tools/acpihelp/ahdecode.c
+++ b/source/tools/acpihelp/ahdecode.c
@@ -302,7 +302,7 @@ AhFindPredefinedNames (
if (!NamePrefix || (*NamePrefix == '*'))
{
- Found = AhDisplayPredefinedName (NULL, 0);
+ (void) AhDisplayPredefinedName (NULL, 0);
return;
}
diff --git a/source/tools/acpinames/anstubs.c b/source/tools/acpinames/anstubs.c
index af6cb9f8ea6e..5b56cf1eaa01 100644
--- a/source/tools/acpinames/anstubs.c
+++ b/source/tools/acpinames/anstubs.c
@@ -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
+
diff --git a/source/tools/acpisrc/asfile.c b/source/tools/acpisrc/asfile.c
index e6d764f6879a..6ed04695fb5c 100644
--- a/source/tools/acpisrc/asfile.c
+++ b/source/tools/acpisrc/asfile.c
@@ -546,7 +546,7 @@ AsConvertFile (
{
/* Decode the function bitmap */
- switch ((1 << i) & Functions)
+ switch (((UINT32) 1 << i) & Functions)
{
case 0:
diff --git a/source/tools/acpisrc/asremove.c b/source/tools/acpisrc/asremove.c
index a008e4149940..099e6dd4d4b7 100644
--- a/source/tools/acpisrc/asremove.c
+++ b/source/tools/acpisrc/asremove.c
@@ -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 */
diff --git a/tests/templates/Makefile b/tests/templates/Makefile
index bc08d6342e2e..88c78244cfb3 100644
--- a/tests/templates/Makefile
+++ b/tests/templates/Makefile
@@ -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 :