diff -Nru acpica-unix-20140114/changes.txt acpica-unix-20140214/changes.txt --- acpica-unix-20140114/changes.txt 2014-01-14 22:01:57.000000000 +0000 +++ acpica-unix-20140214/changes.txt 2014-02-14 23:23:32.000000000 +0000 @@ -1,4 +1,69 @@ ---------------------------------------- +14 February 2014. Summary of changes for version 20140214: + +1) ACPICA kernel-resident subsystem: + +Implemented a new mechanism to proactively prevent problems with ill- +behaved reentrant control methods that create named ACPI objects. This +behavior is illegal as per the ACPI specification, but is nonetheless +frequently seen in the field. Previously, this could lead to an +AE_ALREADY_EXISTS exception if the method was actually entered by more +than one thread. This new mechanism detects such methods at table load +time and marks them "serialized" to prevent reentrancy. A new global +option, AcpiGbl_AutoSerializeMethods, has been added to disable this +feature if desired. This mechanism and global option obsoletes and +supersedes the previous AcpiGbl_SerializeAllMethods option. + +Added the "Windows 2013" string to the _OSI support. ACPICA will now +respond TRUE to _OSI queries with this string. It is the stated policy of +ACPICA to add new strings to the _OSI support as soon as possible after +they are defined. See the full ACPICA _OSI policy which has been added to +the utilities/utosi.c file. + +Hardened/updated the _PRT return value auto-repair code: +1) Do not abort the repair on a single subpackage failure, continue to +check all subpackages. +2) Add check for the minimum subpackage length (4). +3) Properly handle extraneous NULL package elements. + +Added support to avoid the possibility of infinite loops when traversing +object linked lists. Never allow an infinite loop, even in the face of +corrupted object lists. + +ACPICA headers: Deployed the use of #pragma pack(push) and #pragma +pack(pop) directives to ensure that the ACPICA headers are independent of +compiler settings or other host headers. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 96.5K Code, 27.2K Data, 123.7K Total + Debug Version: 188.6K Code, 79.0K Data, 267.6K Total + Previous Release: + Non-Debug Version: 96.2K Code, 27.0K Data, 123.2K Total + Debug Version: 187.5K Code, 78.3K Data, 265.8K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL/Table-compiler: Fixed a problem with support for the SPMI table. The +first reserved field was incorrectly forced to have a value of zero. This +change correctly forces the field to have a value of one. ACPICA BZ 1081. + +Debugger: Added missing support for the "Extra" and "Data" subobjects +when displaying object data. + +Debugger: Added support to display entire object linked lists when +displaying object data. + +iASL: Removed the obsolete -g option to obtain ACPI tables from the +Windows registry. This feature has been superseded by the acpidump +utility. + +---------------------------------------- 14 January 2014. Summary of changes for version 20140114: 1) ACPICA kernel-resident subsystem: diff -Nru acpica-unix-20140114/debian/changelog acpica-unix-20140214/debian/changelog --- acpica-unix-20140114/debian/changelog 2014-01-24 00:36:20.000000000 +0000 +++ acpica-unix-20140214/debian/changelog 2014-02-28 03:30:03.000000000 +0000 @@ -1,3 +1,12 @@ +acpica-unix (20140214-1) unstable; urgency=medium + + * Upgrade to latest upstream. + * Remove temporary patch to fix aapits test suite Makefile. + * Closes: #737804 -- FTBS on big endian arches was caused by a faulty + warning message; added patch to fix. + + -- Al Stone Thu, 27 Feb 2014 20:12:53 -0700 + acpica-unix (20140114-1) unstable; urgency=medium * Upgrade to latest upstream. diff -Nru acpica-unix-20140114/debian/patches/aapits-ld.patch acpica-unix-20140214/debian/patches/aapits-ld.patch --- acpica-unix-20140114/debian/patches/aapits-ld.patch 2014-01-24 00:36:20.000000000 +0000 +++ acpica-unix-20140214/debian/patches/aapits-ld.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,12 +0,0 @@ -diff -urN acpica-unix-20140114/tests/aapits/Makefile acpica-unix-20140114.patch/tests/aapits/Makefile ---- acpica-unix-20140114/tests/aapits/Makefile 2014-01-14 15:02:45.000000000 -0700 -+++ acpica-unix-20140114.patch/tests/aapits/Makefile 2014-01-23 16:07:50.124972105 -0700 -@@ -29,6 +29,7 @@ - ../../source/components/debugger/dbmethod.c \ - ../../source/components/debugger/dbnames.c \ - ../../source/components/debugger/dbstats.c \ -+ ../../source/components/debugger/dbtest.c \ - ../../source/components/debugger/dbutils.c \ - ../../source/components/debugger/dbxface.c \ - ../../source/components/disassembler/dmbuffer.c \ - diff -Nru acpica-unix-20140114/debian/patches/aapits-linux.patch acpica-unix-20140214/debian/patches/aapits-linux.patch --- acpica-unix-20140114/debian/patches/aapits-linux.patch 2014-01-24 00:36:20.000000000 +0000 +++ acpica-unix-20140214/debian/patches/aapits-linux.patch 2014-02-28 03:30:03.000000000 +0000 @@ -1,7 +1,6 @@ -Index: foo/tests/aapits/atexec.c -=================================================================== ---- foo.orig/tests/aapits/atexec.c 2013-08-26 13:46:29.000000000 -0600 -+++ foo/tests/aapits/atexec.c 2013-08-26 13:46:29.000000000 -0600 +diff -urN acpica-unix2-20130626/tests/aapits/atexec.c acpica-unix2-20130626-aapits/tests/aapits/atexec.c +--- acpica-unix2-20130626/tests/aapits/atexec.c 2013-01-17 12:48:28.000000000 -0700 ++++ acpica-unix2-20130626-aapits/tests/aapits/atexec.c 2013-07-25 13:44:23.023894441 -0600 @@ -639,6 +639,7 @@ } @@ -10,7 +9,7 @@ /******************************************************************************* * * FUNCTION: AtBuildLocalRSDT -@@ -757,6 +758,7 @@ +@@ -757,8 +758,9 @@ LocalRSDT->Header.Checksum = (UINT8)~LocalRSDT->Header.Checksum; } } @@ -18,6 +17,8 @@ /******************************************************************************* + * + * FUNCTION: AtBuildLocalXSDT @@ -1424,7 +1426,7 @@ ACPI_WARNING ((AE_INFO, "Request on [%4.4s] is beyond region limit Req-%X+%X, Base=%X, Len-%X\n", @@ -27,7 +28,7 @@ return (AE_AML_REGION_LIMIT); } -@@ -1792,7 +1794,9 @@ +@@ -1792,7 +1796,9 @@ Path, Obj.Integer.Value, Value); #else printf ("API Error: Value of %s is 0x%llx instead of expected 0x%llx\n", @@ -38,7 +39,7 @@ #endif Status = AE_ERROR; } -@@ -1871,7 +1875,7 @@ +@@ -1871,7 +1877,7 @@ { TestErrors++; printf ("Test Error: cannot allocate buffer of %d bytes\n", @@ -57,7 +58,7 @@ } /* Initialize the return buffer structure */ -@@ -1961,7 +1966,7 @@ +@@ -1961,7 +1968,7 @@ { TestErrors++; printf ("Test Error: cannot allocate buffer of %d bytes\n", @@ -66,10 +67,9 @@ return (AE_NO_MEMORY); } Results.Pointer = Object; -Index: foo/tests/aapits/atinit.c -=================================================================== ---- foo.orig/tests/aapits/atinit.c 2013-08-26 13:46:29.000000000 -0600 -+++ foo/tests/aapits/atinit.c 2013-08-26 13:46:29.000000000 -0600 +diff -urN acpica-unix2-20130626/tests/aapits/atinit.c acpica-unix2-20130626-aapits/tests/aapits/atinit.c +--- acpica-unix2-20130626/tests/aapits/atinit.c 2013-01-17 12:48:28.000000000 -0700 ++++ acpica-unix2-20130626-aapits/tests/aapits/atinit.c 2013-07-25 13:20:19.706705960 -0600 @@ -3024,7 +3024,7 @@ AapiErrors++; printf ("API Error: AcpiGetSystemInfo() returned" @@ -115,10 +115,9 @@ return (AE_ERROR); } else -Index: foo/tests/aapits/atmain.c -=================================================================== ---- foo.orig/tests/aapits/atmain.c 2013-08-26 13:46:29.000000000 -0600 -+++ foo/tests/aapits/atmain.c 2013-08-26 13:46:29.000000000 -0600 +diff -urN acpica-unix2-20130626/tests/aapits/atmain.c acpica-unix2-20130626-aapits/tests/aapits/atmain.c +--- acpica-unix2-20130626/tests/aapits/atmain.c 2013-01-17 12:48:28.000000000 -0700 ++++ acpica-unix2-20130626-aapits/tests/aapits/atmain.c 2013-07-25 13:18:22.083323948 -0600 @@ -315,7 +315,7 @@ { printf ("ACPICA API TS err: test num %ld of test case %ld" @@ -128,7 +127,7 @@ return (AtRetNotImpl); } -@@ -430,7 +430,7 @@ +@@ -430,7 +432,7 @@ if (test_case < 1 || test_case > AT_TEST_CASE_NUM) { printf ("ACPICA API TS err: test case %ld is out of range 1 - %d\n", @@ -137,7 +136,7 @@ return (AtRetBadParam); } -@@ -438,7 +438,7 @@ +@@ -438,7 +440,7 @@ if (test_num < 0 || test_num > AtTestCase[test_case].TestsNum) { printf ("ACPICA API TS err: test num %ld is out of range 0 - %d\n", @@ -145,11 +144,10 @@ + (long int) test_num, AtTestCase[test_case].TestsNum); return (AtRetBadParam); } - -Index: foo/tests/aapits/atnamespace.c -=================================================================== ---- foo.orig/tests/aapits/atnamespace.c 2013-08-26 13:46:29.000000000 -0600 -+++ foo/tests/aapits/atnamespace.c 2013-08-26 13:46:29.000000000 -0600 + +diff -urN acpica-unix2-20130626/tests/aapits/atnamespace.c acpica-unix2-20130626-aapits/tests/aapits/atnamespace.c +--- acpica-unix2-20130626/tests/aapits/atnamespace.c 2013-01-17 12:48:28.000000000 -0700 ++++ acpica-unix2-20130626-aapits/tests/aapits/atnamespace.c 2013-07-25 13:24:15.366466707 -0600 @@ -2535,7 +2535,8 @@ #else printf ("API Error: Address of %s (0x%llX) != (0x%llX)\n", @@ -190,10 +188,9 @@ return (AE_ERROR); } } -Index: foo/tests/aapits/atosxfctrl.c -=================================================================== ---- foo.orig/tests/aapits/atosxfctrl.c 2013-08-26 13:46:29.000000000 -0600 -+++ foo/tests/aapits/atosxfctrl.c 2013-08-26 13:46:29.000000000 -0600 +diff -urN acpica-unix2-20130626/tests/aapits/atosxfctrl.c acpica-unix2-20130626-aapits/tests/aapits/atosxfctrl.c +--- acpica-unix2-20130626/tests/aapits/atosxfctrl.c 2013-01-17 12:48:28.000000000 -0700 ++++ acpica-unix2-20130626-aapits/tests/aapits/atosxfctrl.c 2013-07-25 13:30:00.375492751 -0600 @@ -737,13 +737,15 @@ #if ACPI_MACHINE_WIDTH == 64 #ifdef _MSC_VER @@ -270,10 +267,9 @@ Reg = Reg->Next; i++; } -Index: foo/tests/aapits/atresource.c -=================================================================== ---- foo.orig/tests/aapits/atresource.c 2013-08-26 13:46:29.000000000 -0600 -+++ foo/tests/aapits/atresource.c 2013-08-26 13:46:29.000000000 -0600 +diff -urN acpica-unix2-20130626/tests/aapits/atresource.c acpica-unix2-20130626-aapits/tests/aapits/atresource.c +--- acpica-unix2-20130626/tests/aapits/atresource.c 2013-01-17 12:48:29.000000000 -0700 ++++ acpica-unix2-20130626-aapits/tests/aapits/atresource.c 2013-07-25 13:25:49.423565947 -0600 @@ -174,7 +174,7 @@ AapiErrors++; printf ("API Error: AcpiGetCurrentResources(%s) returned Length %d," @@ -318,160 +314,11 @@ + Pathname, (int) OutBuffer.Length, 0xA48); return (AE_ERROR); } - -Index: foo/tests/aapits/Makefile -=================================================================== ---- foo.orig/tests/aapits/Makefile 2013-08-26 13:46:29.000000000 -0600 -+++ foo/tests/aapits/Makefile 2013-08-26 13:46:29.000000000 -0600 -@@ -20,37 +20,52 @@ - ../../source/components/hardware/hwxface.c \ - ../../source/common/getopt.c \ - ../../source/components/debugger/dbcmds.c \ -+ ../../source/components/debugger/dbconvert.c \ - ../../source/components/debugger/dbdisply.c \ - ../../source/components/debugger/dbexec.c \ - ../../source/components/debugger/dbfileio.c \ - ../../source/components/debugger/dbhistry.c \ - ../../source/components/debugger/dbinput.c \ -+ ../../source/components/debugger/dbmethod.c \ -+ ../../source/components/debugger/dbnames.c \ - ../../source/components/debugger/dbstats.c \ - ../../source/components/debugger/dbutils.c \ - ../../source/components/debugger/dbxface.c \ - ../../source/components/disassembler/dmbuffer.c \ -+ ../../source/components/disassembler/dmdeferred.c \ - ../../source/components/disassembler/dmnames.c \ - ../../source/components/disassembler/dmobject.c \ - ../../source/components/disassembler/dmopcode.c \ - ../../source/components/disassembler/dmresrc.c \ - ../../source/components/disassembler/dmresrcl.c \ -+ ../../source/components/disassembler/dmresrcl2.c \ - ../../source/components/disassembler/dmresrcs.c \ - ../../source/components/disassembler/dmutils.c \ - ../../source/components/disassembler/dmwalk.c \ - ../../source/components/events/evevent.c \ -+ ../../source/components/events/evglock.c \ - ../../source/components/events/evgpeblk.c \ - ../../source/components/events/evgpe.c \ -+ ../../source/components/events/evgpeinit.c \ -+ ../../source/components/events/evgpeutil.c \ -+ ../../source/components/events/evhandler.c \ - ../../source/components/events/evmisc.c \ - ../../source/components/events/evregion.c \ - ../../source/components/events/evrgnini.c \ - ../../source/components/events/evsci.c \ - ../../source/components/events/evxface.c \ - ../../source/components/events/evxfevnt.c \ -+ ../../source/components/events/evxfgpe.c \ - ../../source/components/events/evxfregn.c \ - ../../source/components/hardware/hwacpi.c \ -+ ../../source/components/hardware/hwesleep.c \ - ../../source/components/hardware/hwgpe.c \ -+ ../../source/components/hardware/hwpci.c \ - ../../source/components/hardware/hwregs.c \ - ../../source/components/hardware/hwsleep.c \ -+ ../../source/components/hardware/hwxfsleep.c \ -+ ../../source/components/dispatcher/dsargs.c \ -+ ../../source/components/dispatcher/dscontrol.c \ - ../../source/components/dispatcher/dsfield.c \ - ../../source/components/dispatcher/dsinit.c \ - ../../source/components/dispatcher/dsmethod.c \ -@@ -60,11 +75,13 @@ - ../../source/components/dispatcher/dsutils.c \ - ../../source/components/dispatcher/dswexec.c \ - ../../source/components/dispatcher/dswload.c \ -+ ../../source/components/dispatcher/dswload2.c \ - ../../source/components/dispatcher/dswscope.c \ - ../../source/components/dispatcher/dswstate.c \ - ../../source/components/executer/exconfig.c \ - ../../source/components/executer/exconvrt.c \ - ../../source/components/executer/excreate.c \ -+ ../../source/components/executer/exdebug.c \ - ../../source/components/executer/exdump.c \ - ../../source/components/executer/exfield.c \ - ../../source/components/executer/exfldio.c \ -@@ -87,7 +104,9 @@ - ../../source/components/executer/exutils.c \ - ../../source/components/parser/psargs.c \ - ../../source/components/parser/psloop.c \ -+ ../../source/components/parser/psobject.c \ - ../../source/components/parser/psopcode.c \ -+ ../../source/components/parser/psopinfo.c \ - ../../source/components/parser/psparse.c \ - ../../source/components/parser/psscope.c \ - ../../source/components/parser/pstree.c \ -@@ -96,6 +115,8 @@ - ../../source/components/parser/psxface.c \ - ../../source/components/namespace/nsaccess.c \ - ../../source/components/namespace/nsalloc.c \ -+ ../../source/components/namespace/nsarguments.c \ -+ ../../source/components/namespace/nsconvert.c \ - ../../source/components/namespace/nsdump.c \ - ../../source/components/namespace/nsdumpdv.c \ - ../../source/components/namespace/nseval.c \ -@@ -105,6 +126,7 @@ - ../../source/components/namespace/nsobject.c \ - ../../source/components/namespace/nsparse.c \ - ../../source/components/namespace/nspredef.c \ -+ ../../source/components/namespace/nsprepkg.c \ - ../../source/components/namespace/nsrepair.c \ - ../../source/components/namespace/nsrepair2.c \ - ../../source/components/namespace/nssearch.c \ -@@ -117,26 +139,35 @@ - ../../source/components/resources/rscalc.c \ - ../../source/components/resources/rscreate.c \ - ../../source/components/resources/rsdump.c \ -+ ../../source/components/resources/rsdumpinfo.c \ -+ ../../source/components/resources/rsinfo.c \ - ../../source/components/resources/rsio.c \ - ../../source/components/resources/rsirq.c \ - ../../source/components/resources/rslist.c \ - ../../source/components/resources/rsmemory.c \ - ../../source/components/resources/rsmisc.c \ -+ ../../source/components/resources/rsserial.c \ - ../../source/components/resources/rsutils.c \ - ../../source/components/resources/rsxface.c \ -- ../../source/components/resources/rsinfo.c \ - ../../source/components/tables/tbfadt.c \ - ../../source/components/tables/tbfind.c \ - ../../source/components/tables/tbinstal.c \ -+ ../../source/components/tables/tbprint.c \ - ../../source/components/tables/tbutils.c \ - ../../source/components/tables/tbxface.c \ -+ ../../source/components/tables/tbxfload.c \ - ../../source/components/tables/tbxfroot.c \ -+ ../../source/components/utilities/utaddress.c \ - ../../source/components/utilities/utalloc.c \ -+ ../../source/components/utilities/utbuffer.c \ - ../../source/components/utilities/utcache.c \ - ../../source/components/utilities/utcopy.c \ - ../../source/components/utilities/utdebug.c \ -+ ../../source/components/utilities/utdecode.c \ - ../../source/components/utilities/utdelete.c \ -+ ../../source/components/utilities/uterror.c \ - ../../source/components/utilities/uteval.c \ -+ ../../source/components/utilities/utexcep.c \ - ../../source/components/utilities/utglobal.c \ - ../../source/components/utilities/utids.c \ - ../../source/components/utilities/utinit.c \ -@@ -145,17 +176,23 @@ - ../../source/components/utilities/utmisc.c \ - ../../source/components/utilities/utmutex.c \ - ../../source/components/utilities/utobject.c \ -+ ../../source/components/utilities/utosi.c \ -+ ../../source/components/utilities/utownerid.c \ -+ ../../source/components/utilities/utpredef.c \ - ../../source/components/utilities/utresrc.c \ - ../../source/components/utilities/utstate.c \ -+ ../../source/components/utilities/utstring.c \ - ../../source/components/utilities/uttrack.c \ -- ../../source/components/utilities/utxface.c -+ ../../source/components/utilities/utxface.c \ -+ ../../source/components/utilities/utxferror.c \ -+ ../../source/components/utilities/utxfinit.c - # ../../source/components/osunixxf.c - - + +diff -urN acpica-unix2-20130626/tests/aapits/Makefile acpica-unix2-20130626-aapits/tests/aapits/Makefile +--- acpica-unix2-20130626/tests/aapits/Makefile 2013-01-17 12:48:29.000000000 -0700 ++++ acpica-unix2-20130626-aapits/tests/aapits/Makefile 2013-07-25 15:17:09.309236422 -0600 +@@ -193,7 +193,7 @@ CFLAGS+= -Wall -g -D_LINUX -DNDEBUG -D_CONSOLE -DACPI_EXEC_APP -D_MULTI_THREADED -Wstrict-prototypes -I../../source/include @@ -480,57 +327,3 @@ $(CC) $(LDFLAGS) $(patsubst %.c,%.o, $(SRCS)) -o $(PROG) CLEANFILES= $(PROG) -Index: foo/tests/aapits/osunixxf.c -=================================================================== ---- foo.orig/tests/aapits/osunixxf.c 2013-08-26 13:46:29.000000000 -0600 -+++ foo/tests/aapits/osunixxf.c 2013-08-26 13:46:29.000000000 -0600 -@@ -384,7 +384,6 @@ - const char *Fmt, - va_list Args) - { -- INT32 Count = 0; - UINT8 Flags; - - -@@ -397,7 +396,7 @@ - { - /* Output file is open, send the output there */ - -- Count = vfprintf (AcpiGbl_DebugFile, Fmt, Args); -+ vfprintf (AcpiGbl_DebugFile, Fmt, Args); - } - else - { -@@ -409,7 +408,7 @@ - - if (Flags & ACPI_DB_CONSOLE_OUTPUT) - { -- Count = vfprintf (AcpiGbl_OutputFile, Fmt, Args); -+ vfprintf (AcpiGbl_OutputFile, Fmt, Args); - } - - return; -@@ -1166,3 +1165,23 @@ - - return (AE_OK); - } -+ -+/****************************************************************************** -+ * -+ * FUNCTION: AcpiOsWaitEventsComplete -+ * -+ * PARAMETERS: None -+ * -+ * RETURN: None -+ * -+ * DESCRIPTION: Wait for all asynchronous events to complete. This -+ * implementation does nothing. -+ * -+ *****************************************************************************/ -+ -+void -+AcpiOsWaitEventsComplete ( -+ void) -+{ -+ return; -+} diff -Nru acpica-unix-20140114/debian/patches/add-testing.patch acpica-unix-20140214/debian/patches/add-testing.patch --- acpica-unix-20140114/debian/patches/add-testing.patch 2014-01-24 00:36:20.000000000 +0000 +++ acpica-unix-20140214/debian/patches/add-testing.patch 2014-02-28 03:30:03.000000000 +0000 @@ -15,7 +15,7 @@ + $(CURDIR)/debian/run-aapits.sh $(CURDIR)/tests/aapits $(CURDIR)/generate/unix/bin + + # misc tests -+ $(CURDIR)/debian/run-misc-tests.sh $(CURDIR) 20140114 ++ $(CURDIR)/debian/run-misc-tests.sh $(CURDIR) 20140214 + + # Template tests + cd $(CURDIR)/tests/templates diff -Nru acpica-unix-20140114/debian/patches/asllookup-miscompare.patch acpica-unix-20140214/debian/patches/asllookup-miscompare.patch --- acpica-unix-20140114/debian/patches/asllookup-miscompare.patch 1970-01-01 00:00:00.000000000 +0000 +++ acpica-unix-20140214/debian/patches/asllookup-miscompare.patch 2014-02-28 03:30:03.000000000 +0000 @@ -0,0 +1,22 @@ +diff -urN acpica-unix2-20140214/source/compiler/asllookup.c acpica-unix2-20140214-patch/source/compiler/asllookup.c +--- acpica-unix2-20140214/source/compiler/asllookup.c 2014-02-14 16:23:33.000000000 -0700 ++++ acpica-unix2-20140214-patch/source/compiler/asllookup.c 2014-02-27 11:50:52.168659866 -0700 +@@ -120,6 +120,7 @@ + { + ACPI_NAMESPACE_NODE *Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjHandle); + ACPI_NAMESPACE_NODE *Next; ++ ACPI_NAME_UNION tmp; + + + /* Referenced flag is set during the namespace xref */ +@@ -163,8 +164,9 @@ + * Issue a remark even if it is a reserved name (starts + * with an underscore). + */ ++ ACPI_MOVE_32_TO_32(&tmp.Ascii, Next->Name.Ascii); + sprintf (MsgBuffer, "Name is within method [%4.4s]", +- Next->Name.Ascii); ++ tmp.Ascii); + AslError (ASL_REMARK, ASL_MSG_NOT_REFERENCED, + LkGetNameOp (Node->Op), MsgBuffer); + return (AE_OK); diff -Nru acpica-unix-20140114/debian/patches/series acpica-unix-20140214/debian/patches/series --- acpica-unix-20140114/debian/patches/series 2014-01-24 00:36:20.000000000 +0000 +++ acpica-unix-20140214/debian/patches/series 2014-02-28 03:30:03.000000000 +0000 @@ -5,4 +5,4 @@ add-testing.patch name-miscompare.patch aapits-linux.patch -aapits-ld.patch +asllookup-miscompare.patch diff -Nru acpica-unix-20140114/debian/rules acpica-unix-20140214/debian/rules --- acpica-unix-20140114/debian/rules 2014-01-24 00:36:20.000000000 +0000 +++ acpica-unix-20140214/debian/rules 2014-02-28 03:30:03.000000000 +0000 @@ -13,7 +13,7 @@ DESTDIR ?= debian/acpica-tools -VERSION = 20140114 +VERSION = 20140214 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) diff -Nru acpica-unix-20140114/generate/unix/Makefile.config acpica-unix-20140214/generate/unix/Makefile.config --- acpica-unix-20140114/generate/unix/Makefile.config 2014-01-14 22:01:57.000000000 +0000 +++ acpica-unix-20140214/generate/unix/Makefile.config 2014-02-14 23:23:32.000000000 +0000 @@ -161,14 +161,15 @@ CWARNINGFLAGS += \ -Waddress\ -Waggregate-return\ - -Wchar-subscripts\ + -Winit-self\ + -Winline\ -Wmissing-declarations\ -Wmissing-field-initializers\ -Wnested-externs\ -Wold-style-definition\ + -Woverride-init\ -Wno-format-nonliteral\ -Wredundant-decls - # # Per-host flags and exclusions # diff -Nru acpica-unix-20140114/source/common/adisasm.c acpica-unix-20140214/source/common/adisasm.c --- acpica-unix-20140114/source/common/adisasm.c 2014-01-14 22:01:58.000000000 +0000 +++ acpica-unix-20140214/source/common/adisasm.c 2014-02-14 23:23:32.000000000 +0000 @@ -250,7 +250,6 @@ * OutToFile - TRUE if output should go to a file * Prefix - Path prefix for output * OutFilename - where the filename is returned - * GetAllTables - TRUE if all tables are desired * * RETURN: Status * @@ -263,8 +262,7 @@ BOOLEAN OutToFile, char *Filename, char *Prefix, - char **OutFilename, - BOOLEAN GetAllTables) + char **OutFilename) { ACPI_STATUS Status; char *DisasmFilename = NULL; @@ -348,7 +346,7 @@ } else { - Status = AdGetLocalTables (Filename, GetAllTables); + Status = AdGetLocalTables (); if (ACPI_FAILURE (Status)) { AcpiOsPrintf ("Could not get ACPI tables, %s\n", @@ -746,8 +744,7 @@ * * FUNCTION: AdGetLocalTables * - * PARAMETERS: Filename - Not used - * GetAllTables - TRUE if all tables are desired + * PARAMETERS: None * * RETURN: Status * @@ -757,105 +754,36 @@ ACPI_STATUS AdGetLocalTables ( - char *Filename, - BOOLEAN GetAllTables) + void) { ACPI_STATUS Status; ACPI_TABLE_HEADER TableHeader; ACPI_TABLE_HEADER *NewTable; - UINT32 NumTables; - UINT32 PointerSize; UINT32 TableIndex; - if (GetAllTables) - { - ACPI_MOVE_32_TO_32 (TableHeader.Signature, ACPI_SIG_RSDT); - AcpiOsTableOverride (&TableHeader, &NewTable); - if (!NewTable) - { - fprintf (stderr, "Could not obtain RSDT\n"); - return (AE_NO_ACPI_TABLES); - } - else - { - AdWriteTable (NewTable, NewTable->Length, - ACPI_SIG_RSDT, NewTable->OemTableId); - } - - if (ACPI_COMPARE_NAME (NewTable->Signature, ACPI_SIG_RSDT)) - { - PointerSize = sizeof (UINT32); - } - else - { - PointerSize = sizeof (UINT64); - } - - /* - * Determine the number of tables pointed to by the RSDT/XSDT. - * This is defined by the ACPI Specification to be the number of - * pointers contained within the RSDT/XSDT. The size of the pointers - * is architecture-dependent. - */ - NumTables = (NewTable->Length - sizeof (ACPI_TABLE_HEADER)) / PointerSize; - AcpiOsPrintf ("There are %u tables defined in the %4.4s\n\n", - NumTables, NewTable->Signature); - - /* Get the FADT */ - - ACPI_MOVE_32_TO_32 (TableHeader.Signature, ACPI_SIG_FADT); - AcpiOsTableOverride (&TableHeader, &NewTable); - if (NewTable) - { - AdWriteTable (NewTable, NewTable->Length, - ACPI_SIG_FADT, NewTable->OemTableId); - } - AcpiOsPrintf ("\n"); - - /* Don't bother with FACS, it is usually all zeros */ - } - - /* Always get the DSDT */ + /* Get the DSDT via table override */ ACPI_MOVE_32_TO_32 (TableHeader.Signature, ACPI_SIG_DSDT); AcpiOsTableOverride (&TableHeader, &NewTable); - if (NewTable) - { - AdWriteTable (NewTable, NewTable->Length, - ACPI_SIG_DSDT, NewTable->OemTableId); - - /* Store DSDT in the Table Manager */ - - Status = AcpiTbStoreTable (0, NewTable, NewTable->Length, - 0, &TableIndex); - if (ACPI_FAILURE (Status)) - { - fprintf (stderr, "Could not store DSDT\n"); - return (AE_NO_ACPI_TABLES); - } - } - else + if (!NewTable) { fprintf (stderr, "Could not obtain DSDT\n"); return (AE_NO_ACPI_TABLES); } -#if 0 - /* TBD: Future implementation */ - - AcpiOsPrintf ("\n"); + AdWriteTable (NewTable, NewTable->Length, + ACPI_SIG_DSDT, NewTable->OemTableId); - /* Get all SSDTs */ + /* Store DSDT in the Table Manager */ - ACPI_MOVE_32_TO_32 (TableHeader.Signature, ACPI_SIG_SSDT); - do + Status = AcpiTbStoreTable (0, NewTable, NewTable->Length, + 0, &TableIndex); + if (ACPI_FAILURE (Status)) { - NewTable = NULL; - Status = AcpiOsTableOverride (&TableHeader, &NewTable); - - } while (NewTable); -#endif + fprintf (stderr, "Could not store DSDT\n"); + return (AE_NO_ACPI_TABLES); + } return (AE_OK); } diff -Nru acpica-unix-20140114/source/common/dmextern.c acpica-unix-20140214/source/common/dmextern.c --- acpica-unix-20140114/source/common/dmextern.c 2014-01-14 22:01:58.000000000 +0000 +++ acpica-unix-20140214/source/common/dmextern.c 2014-02-14 23:23:32.000000000 +0000 @@ -1265,10 +1265,16 @@ " * were not specified. This resulting disassembler output file may not\n" " * compile because the disassembler did not know how many arguments\n" " * to assign to these methods. To specify the tables needed to resolve\n" - " * external control method references, use the one of the following\n" - " * example iASL invocations:\n" - " * iasl -e -d \n" - " * iasl -e -d \n" + " * external control method references, the -e option can be used to\n" + " * specify the filenames. Example iASL invocations:\n" + " * iasl -e ssdt1.aml ssdt2.aml ssdt3.aml -d dsdt.aml\n" + " * iasl -e dsdt.aml ssdt2.aml -d ssdt1.aml\n" + " * iasl -e ssdt*.aml -d dsdt.aml\n" + " *\n" + " * In addition, the -fe option can be used to specify a file containing\n" + " * control method external declarations with the associated method\n" + " * argument counts. Each line of the file must be of the form:\n" + " * External (, MethodObj, )\n" " */\n", AcpiGbl_NumExternalMethods); } @@ -1279,10 +1285,15 @@ AcpiOsPrintf (" /*\n" " * iASL Warning: There were %u external control methods found during\n" " * disassembly, but only %u %s resolved (%u unresolved). Additional\n" - " * ACPI tables are required to properly disassemble the code. This\n" + " * ACPI tables may be required to properly disassemble the code. This\n" " * resulting disassembler output file may not compile because the\n" " * disassembler did not know how many arguments to assign to the\n" " * unresolved methods.\n" + " *\n" + " * If necessary, the -fe option can be used to specify a file containing\n" + " * control method external declarations with the associated method\n" + " * argument counts. Each line of the file must be of the form:\n" + " * External (, MethodObj, )\n" " */\n", AcpiGbl_NumExternalMethods, AcpiGbl_ResolvedExternalMethods, (AcpiGbl_ResolvedExternalMethods > 1 ? "were" : "was"), @@ -1301,10 +1312,16 @@ "were not specified. The resulting disassembler output file may not\n" "compile because the disassembler did not know how many arguments\n" "to assign to these methods. To specify the tables needed to resolve\n" - "external control method references, use the one of the following\n" - "example iASL invocations:\n" - " iasl -e -d \n" - " iasl -e -d \n", + "external control method references, the -e option can be used to\n" + "specify the filenames. Example iASL invocations:\n" + " iasl -e ssdt1.aml ssdt2.aml ssdt3.aml -d dsdt.aml\n" + " iasl -e dsdt.aml ssdt2.aml -d ssdt1.aml\n" + " iasl -e ssdt*.aml -d dsdt.aml\n" + "\n" + "In addition, the -fe option can be used to specify a file containing\n" + "control method external declarations with the associated method\n" + "argument counts. Each line of the file must be of the form:\n" + " External (, MethodObj, )\n", AcpiGbl_NumExternalMethods); } else if (AcpiGbl_NumExternalMethods != AcpiGbl_ResolvedExternalMethods) @@ -1314,10 +1331,15 @@ fprintf (stderr, "\n" "iASL Warning: There were %u external control methods found during\n" "disassembly, but only %u %s resolved (%u unresolved). Additional\n" - "ACPI tables are required to properly disassemble the code. The\n" + "ACPI tables may be required to properly disassemble the code. The\n" "resulting disassembler output file may not compile because the\n" "disassembler did not know how many arguments to assign to the\n" - "unresolved methods.\n", + "unresolved methods.\n" + "\n" + "If necessary, the -fe option can be used to specify a file containing\n" + "control method external declarations with the associated method\n" + "argument counts. Each line of the file must be of the form:\n" + " External (, MethodObj, )\n", AcpiGbl_NumExternalMethods, AcpiGbl_ResolvedExternalMethods, (AcpiGbl_ResolvedExternalMethods > 1 ? "were" : "was"), (AcpiGbl_NumExternalMethods - AcpiGbl_ResolvedExternalMethods)); diff -Nru acpica-unix-20140114/source/common/dmtbinfo.c acpica-unix-20140214/source/common/dmtbinfo.c --- acpica-unix-20140114/source/common/dmtbinfo.c 2014-01-14 22:01:58.000000000 +0000 +++ acpica-unix-20140214/source/common/dmtbinfo.c 2014-02-14 23:23:32.000000000 +0000 @@ -1940,7 +1940,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoSpmi[] = { {ACPI_DMT_UINT8, ACPI_SPMI_OFFSET (InterfaceType), "Interface Type", 0}, - {ACPI_DMT_UINT8, ACPI_SPMI_OFFSET (Reserved), "Reserved", 0}, + {ACPI_DMT_UINT8, ACPI_SPMI_OFFSET (Reserved), "Reserved", DT_NON_ZERO}, /* Value must be 1 */ {ACPI_DMT_UINT16, ACPI_SPMI_OFFSET (SpecRevision), "IPMI Spec Version", 0}, {ACPI_DMT_UINT8, ACPI_SPMI_OFFSET (InterruptType), "Interrupt Type", 0}, {ACPI_DMT_UINT8, ACPI_SPMI_OFFSET (GpeNumber), "GPE Number", 0}, diff -Nru acpica-unix-20140114/source/compiler/aslcompiler.h acpica-unix-20140214/source/compiler/aslcompiler.h --- acpica-unix-20140114/source/compiler/aslcompiler.h 2014-01-14 22:01:58.000000000 +0000 +++ acpica-unix-20140214/source/compiler/aslcompiler.h 2014-02-14 23:23:32.000000000 +0000 @@ -280,6 +280,10 @@ * aslerror - error handling/reporting */ void +AslAbort ( + void); + +void AslError ( UINT8 Level, UINT8 MessageId, @@ -703,10 +707,6 @@ * aslfiles - File I/O support */ void -AslAbort ( - void); - -void FlAddIncludeDirectory ( char *Dir); diff -Nru acpica-unix-20140114/source/compiler/aslerror.c acpica-unix-20140214/source/compiler/aslerror.c --- acpica-unix-20140114/source/compiler/aslerror.c 2014-01-14 22:01:58.000000000 +0000 +++ acpica-unix-20140214/source/compiler/aslerror.c 2014-02-14 23:23:32.000000000 +0000 @@ -56,6 +56,36 @@ /******************************************************************************* * + * FUNCTION: AslAbort + * + * PARAMETERS: None + * + * RETURN: None + * + * DESCRIPTION: Dump the error log and abort the compiler. Used for serious + * I/O errors. + * + ******************************************************************************/ + +void +AslAbort ( + void) +{ + + AePrintErrorLog (ASL_FILE_STDERR); + if (Gbl_DebugFlag) + { + /* Print error summary to stdout also */ + + AePrintErrorLog (ASL_FILE_STDOUT); + } + + exit (1); +} + + +/******************************************************************************* + * * FUNCTION: AeClearErrorLog * * PARAMETERS: None @@ -817,7 +847,8 @@ /* Check if user wants to ignore this exception */ - if (AslIsExceptionDisabled (Level, MessageId)) + if (Gbl_AllExceptionsDisabled || + AslIsExceptionDisabled (Level, MessageId)) { return; } diff -Nru acpica-unix-20140114/source/compiler/aslfileio.c acpica-unix-20140214/source/compiler/aslfileio.c --- acpica-unix-20140114/source/compiler/aslfileio.c 2014-01-14 22:01:58.000000000 +0000 +++ acpica-unix-20140214/source/compiler/aslfileio.c 2014-02-14 23:23:32.000000000 +0000 @@ -46,35 +46,9 @@ #define _COMPONENT ACPI_COMPILER ACPI_MODULE_NAME ("aslfileio") - -/******************************************************************************* - * - * FUNCTION: AslAbort - * - * PARAMETERS: None - * - * RETURN: None - * - * DESCRIPTION: Dump the error log and abort the compiler. Used for serious - * I/O errors. - * - ******************************************************************************/ - -void -AslAbort ( - void) -{ - - AePrintErrorLog (ASL_FILE_STDERR); - if (Gbl_DebugFlag) - { - /* Print error summary to stdout also */ - - AePrintErrorLog (ASL_FILE_STDOUT); - } - - exit (1); -} +long +UtGetFileSize ( + FILE *fp); /******************************************************************************* @@ -141,13 +115,73 @@ /******************************************************************************* * + * FUNCTION: UtGetFileSize + * + * PARAMETERS: fp - Open file handle + * + * RETURN: File Size. -1 on error. + * + * DESCRIPTION: Get current file size. Uses seek-to-EOF. File must be open. + * TBD: This function should be used to replace other similar + * functions in ACPICA. + * + ******************************************************************************/ + +long +UtGetFileSize ( + FILE *fp) +{ + long FileSize; + long CurrentOffset; + + + CurrentOffset = ftell (fp); + if (CurrentOffset < 0) + { + goto OffsetError; + } + + if (fseek (fp, 0, SEEK_END)) + { + goto SeekError; + } + + FileSize = ftell (fp); + if (FileSize < 0) + { + goto OffsetError; + } + + /* Restore file pointer */ + + if (fseek (fp, CurrentOffset, SEEK_SET)) + { + goto SeekError; + } + + return (FileSize); + + +OffsetError: + perror ("Could not get file offset"); + return (-1); + +SeekError: + perror ("Could not seek file"); + return (-1); +} + + +/******************************************************************************* + * * FUNCTION: FlGetFileSize * * PARAMETERS: FileId - Index into file info array * * RETURN: File Size * - * DESCRIPTION: Get current file size. Uses seek-to-EOF. File must be open. + * DESCRIPTION: Get current file size. Uses common seek-to-EOF function. + * File must be open. Aborts compiler on error. * ******************************************************************************/ @@ -155,21 +189,16 @@ FlGetFileSize ( UINT32 FileId) { - FILE *fp; - UINT32 FileSize; - long Offset; - + long FileSize; - fp = Gbl_Files[FileId].Handle; - Offset = ftell (fp); - fseek (fp, 0, SEEK_END); - FileSize = (UINT32) ftell (fp); - - /* Restore file pointer */ + FileSize = UtGetFileSize (Gbl_Files[FileId].Handle); + if (FileSize == -1) + { + AslAbort(); + } - fseek (fp, Offset, SEEK_SET); - return (FileSize); + return ((UINT32) FileSize); } diff -Nru acpica-unix-20140114/source/compiler/aslglobal.h acpica-unix-20140214/source/compiler/aslglobal.h --- acpica-unix-20140114/source/compiler/aslglobal.h 2014-01-14 22:01:58.000000000 +0000 +++ acpica-unix-20140214/source/compiler/aslglobal.h 2014-02-14 23:23:32.000000000 +0000 @@ -159,7 +159,6 @@ ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_WarningsAsErrors, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_NoResourceChecking, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DisasmFlag, FALSE); -ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_GetAllTables, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_IntegerOptimizationFlag, TRUE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_ReferenceOptimizationFlag, TRUE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DisplayRemarks, TRUE); @@ -170,6 +169,7 @@ ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_VerboseTemplates, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DoTemplates, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_CompileGeneric, FALSE); +ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_AllExceptionsDisabled, FALSE); #define HEX_OUTPUT_NONE 0 diff -Nru acpica-unix-20140114/source/compiler/aslmain.c acpica-unix-20140214/source/compiler/aslmain.c --- acpica-unix-20140114/source/compiler/aslmain.c 2014-01-14 22:01:58.000000000 +0000 +++ acpica-unix-20140214/source/compiler/aslmain.c 2014-02-14 23:23:33.000000000 +0000 @@ -158,7 +158,6 @@ ACPI_OPTION ("", " (Obtain DSDT from current system if no input file)"); ACPI_OPTION ("-e ", "Include ACPI table(s) for external symbol resolution"); ACPI_OPTION ("-fe ", "Specify external symbol declaration file"); - ACPI_OPTION ("-g", "Get ACPI tables and write to files (*.dat)"); ACPI_OPTION ("-in", "Ignore NoOp opcodes"); ACPI_OPTION ("-vt", "Dump binary table data in hex format within output file"); @@ -319,16 +318,6 @@ /* Perform global actions first/only */ - if (Gbl_GetAllTables) - { - Status = AslDoOneFile (NULL); - if (ACPI_FAILURE (Status)) - { - return (-1); - } - return (0); - } - if (Gbl_DisassembleAll) { while (argv[Index1]) diff -Nru acpica-unix-20140114/source/compiler/aslmessages.h acpica-unix-20140214/source/compiler/aslmessages.h --- acpica-unix-20140114/source/compiler/aslmessages.h 2014-01-14 22:01:58.000000000 +0000 +++ acpica-unix-20140214/source/compiler/aslmessages.h 2014-02-14 23:23:33.000000000 +0000 @@ -445,7 +445,7 @@ /* ASL_MSG_INVALID_FIELD_NAME */ "Invalid Field Name", /* ASL_MSG_INVALID_HEX_INTEGER */ "Invalid hex integer constant", /* ASL_MSG_OEM_TABLE */ "OEM table - unknown contents", -/* ASL_MSG_RESERVED_VALUE */ "Reserved field must be zero", +/* ASL_MSG_RESERVED_VALUE */ "Reserved field", /* ASL_MSG_UNKNOWN_LABEL */ "Label is undefined", /* ASL_MSG_UNKNOWN_SUBTABLE */ "Unknown subtable type", /* ASL_MSG_UNKNOWN_TABLE */ "Unknown ACPI table signature", diff -Nru acpica-unix-20140114/source/compiler/asloptions.c acpica-unix-20140214/source/compiler/asloptions.c --- acpica-unix-20140114/source/compiler/asloptions.c 2014-01-14 22:01:58.000000000 +0000 +++ acpica-unix-20140214/source/compiler/asloptions.c 2014-02-14 23:23:33.000000000 +0000 @@ -118,8 +118,7 @@ /* Next parameter must be the input filename */ if (!argv[AcpiGbl_Optind] && - !Gbl_DisasmFlag && - !Gbl_GetAllTables) + !Gbl_DisasmFlag) { printf ("Missing input filename\n"); BadCommandLine = TRUE; @@ -318,9 +317,8 @@ case 'g': /* Get all ACPI tables */ - Gbl_GetAllTables = TRUE; - Gbl_DoCompile = FALSE; - break; + printf ("-g option is deprecated, use acpidump utility instead\n"); + exit (1); case 'h': diff -Nru acpica-unix-20140114/source/compiler/aslpredef.c acpica-unix-20140214/source/compiler/aslpredef.c --- acpica-unix-20140114/source/compiler/aslpredef.c 2014-01-14 22:01:58.000000000 +0000 +++ acpica-unix-20140214/source/compiler/aslpredef.c 2014-02-14 23:23:33.000000000 +0000 @@ -251,10 +251,16 @@ const ACPI_PREDEFINED_INFO *ThisName; - /* Check parent method for a match against the predefined name list */ - + /* + * Check parent method for a match against the predefined name list. + * + * Note: Disable compiler errors/warnings because any errors will be + * caught when analyzing the parent method. Eliminates duplicate errors. + */ + Gbl_AllExceptionsDisabled = TRUE; Index = ApCheckForPredefinedName (MethodInfo->Op, MethodInfo->Op->Asl.NameSeg); + Gbl_AllExceptionsDisabled = FALSE; switch (Index) { diff -Nru acpica-unix-20140114/source/compiler/aslprepkg.c acpica-unix-20140214/source/compiler/aslprepkg.c --- acpica-unix-20140114/source/compiler/aslprepkg.c 2014-01-14 22:01:58.000000000 +0000 +++ acpica-unix-20140214/source/compiler/aslprepkg.c 2014-02-14 23:23:33.000000000 +0000 @@ -169,7 +169,7 @@ { case ACPI_PTYPE1_FIXED: /* - * The package count is fixed and there are no sub-packages + * The package count is fixed and there are no subpackages * * If package is too small, exit. * If package is larger than expected, issue warning but continue @@ -194,7 +194,7 @@ case ACPI_PTYPE1_VAR: /* - * The package count is variable, there are no sub-packages, + * The package count is variable, there are no subpackages, * and all elements must be of the same type */ for (i = 0; i < Count; i++) @@ -207,7 +207,7 @@ case ACPI_PTYPE1_OPTION: /* - * The package count is variable, there are no sub-packages. + * The package count is variable, there are no subpackages. * There are a fixed number of required elements, and a variable * number of optional elements. * @@ -251,7 +251,7 @@ Op = Op->Asl.Next; Count--; - /* Examine the sub-packages */ + /* Examine the subpackages */ ApCheckPackageList (Predefined->Info.Name, Op, Package, 1, Count); @@ -259,7 +259,7 @@ case ACPI_PTYPE2_PKG_COUNT: - /* First element is the (Integer) count of sub-packages to follow */ + /* First element is the (Integer) count of subpackages to follow */ Status = ApCheckObjectType (Predefined->Info.Name, Op, ACPI_RTYPE_INTEGER, 0); @@ -283,7 +283,7 @@ Op = Op->Asl.Next; - /* Examine the sub-packages */ + /* Examine the subpackages */ ApCheckPackageList (Predefined->Info.Name, Op, Package, 1, Count); @@ -296,10 +296,10 @@ case ACPI_PTYPE2_FIX_VAR: /* * These types all return a single Package that consists of a - * variable number of sub-Packages. + * variable number of subpackages. */ - /* Examine the sub-packages */ + /* Examine the subpackages */ ApCheckPackageList (Predefined->Info.Name, Op, Package, 0, Count); @@ -494,7 +494,7 @@ case ACPI_PTYPE2_FIXED: - /* Each sub-package has a fixed length */ + /* Each subpackage has a fixed length */ ExpectedCount = Package->RetInfo2.Count; if (Count < ExpectedCount) @@ -517,7 +517,7 @@ case ACPI_PTYPE2_MIN: - /* Each sub-package has a variable but minimum length */ + /* Each subpackage has a variable but minimum length */ ExpectedCount = Package->RetInfo.Count1; if (Count < ExpectedCount) @@ -527,7 +527,7 @@ break; } - /* Check the type of each sub-package element */ + /* Check the type of each subpackage element */ ApCheckPackageElements (PredefinedName, Op, Package->RetInfo.ObjectType1, Count, 0, 0); @@ -576,7 +576,7 @@ Count = ExpectedCount; } - /* Check the type of each sub-package element */ + /* Check the type of each subpackage element */ Op = Op->Asl.Next; ApCheckPackageElements (PredefinedName, Op, diff -Nru acpica-unix-20140114/source/compiler/aslstartup.c acpica-unix-20140214/source/compiler/aslstartup.c --- acpica-unix-20140114/source/compiler/aslstartup.c 2014-01-14 22:01:59.000000000 +0000 +++ acpica-unix-20140214/source/compiler/aslstartup.c 2014-02-14 23:23:33.000000000 +0000 @@ -251,7 +251,7 @@ AcpiGbl_DbOpt_disasm = TRUE; Status = AdAmlDisassemble (AslToFile, Gbl_Files[ASL_FILE_INPUT].Filename, Gbl_OutputFilenamePrefix, - &Gbl_Files[ASL_FILE_INPUT].Filename, Gbl_GetAllTables); + &Gbl_Files[ASL_FILE_INPUT].Filename); if (ACPI_FAILURE (Status)) { return (Status); @@ -331,7 +331,7 @@ /* * AML Disassembly (Optional) */ - if (Gbl_DisasmFlag || Gbl_GetAllTables) + if (Gbl_DisasmFlag) { Status = AslDoDisassembly (); if (Status != AE_CTRL_CONTINUE) diff -Nru acpica-unix-20140114/source/compiler/asltransform.c acpica-unix-20140214/source/compiler/asltransform.c --- acpica-unix-20140114/source/compiler/asltransform.c 2014-01-14 22:01:59.000000000 +0000 +++ acpica-unix-20140214/source/compiler/asltransform.c 2014-02-14 23:23:33.000000000 +0000 @@ -450,10 +450,6 @@ { /* Add an ELSE to complete the previous CASE */ - if (!Conditional) - { - return; - } NewOp = TrCreateLeafNode (PARSEOP_ELSE); NewOp->Asl.Parent = Conditional->Asl.Parent; TrAmlInitLineNumbers (NewOp, NewOp->Asl.Parent); @@ -620,11 +616,6 @@ { /* Convert the DEFAULT node to an ELSE */ - if (!Conditional) - { - return; - } - TrAmlInitNode (DefaultOp, PARSEOP_ELSE); DefaultOp->Asl.Parent = Conditional->Asl.Parent; diff -Nru acpica-unix-20140114/source/compiler/dtfield.c acpica-unix-20140214/source/compiler/dtfield.c --- acpica-unix-20140114/source/compiler/dtfield.c 2014-01-14 22:01:59.000000000 +0000 +++ acpica-unix-20140214/source/compiler/dtfield.c 2014-02-14 23:23:33.000000000 +0000 @@ -311,21 +311,37 @@ return; } - /* Ensure that reserved fields are set to zero */ - /* TBD: should we set to zero, or just make this an ERROR? */ - /* TBD: Probably better to use a flag */ + /* + * Ensure that reserved fields are set properly. Note: uses + * the DT_NON_ZERO flag to indicate that the reserved value + * must be exactly one. Otherwise, the value must be zero. + * This is sufficient for now. + */ - if (!ACPI_STRCMP (Field->Name, "Reserved") && - (Value != 0)) + /* TBD: Should use a flag rather than compare "Reserved" */ + + if (!ACPI_STRCMP (Field->Name, "Reserved")) { - DtError (ASL_WARNING, ASL_MSG_RESERVED_VALUE, Field, - "Setting to zero"); - Value = 0; + if (Flags & DT_NON_ZERO) + { + if (Value != 1) + { + DtError (ASL_WARNING, ASL_MSG_RESERVED_VALUE, Field, + "Must be one, setting to one"); + Value = 1; + } + } + else if (Value != 0) + { + DtError (ASL_WARNING, ASL_MSG_RESERVED_VALUE, Field, + "Must be zero, setting to zero"); + Value = 0; + } } /* Check if the value must be non-zero */ - if ((Value == 0) && (Flags & DT_NON_ZERO)) + else if ((Flags & DT_NON_ZERO) && (Value == 0)) { DtError (ASL_ERROR, ASL_MSG_ZERO_VALUE, Field, NULL); } diff -Nru acpica-unix-20140114/source/compiler/dttemplate.h acpica-unix-20140214/source/compiler/dttemplate.h --- acpica-unix-20140114/source/compiler/dttemplate.h 2014-01-14 22:01:59.000000000 +0000 +++ acpica-unix-20140214/source/compiler/dttemplate.h 2014-02-14 23:23:33.000000000 +0000 @@ -897,10 +897,10 @@ const unsigned char TemplateSpmi[] = { 0x53,0x50,0x4D,0x49,0x41,0x00,0x00,0x00, /* 00000000 "SPMIA..." */ - 0x04,0xED,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */ + 0x04,0x00,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */ 0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */ 0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ - 0x28,0x05,0x10,0x20,0x00,0x00,0x00,0x00, /* 00000020 "(.. ...." */ + 0x14,0x01,0x14,0x20,0x00,0x01,0x00,0x00, /* 00000020 "... ...." */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */ 0x00,0x08,0x00,0x01,0x00,0x00,0x00,0x00, /* 00000030 "........" */ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */ diff -Nru acpica-unix-20140114/source/compiler/prmacros.c acpica-unix-20140214/source/compiler/prmacros.c --- acpica-unix-20140114/source/compiler/prmacros.c 2014-01-14 22:01:59.000000000 +0000 +++ acpica-unix-20140214/source/compiler/prmacros.c 2014-02-14 23:23:33.000000000 +0000 @@ -360,7 +360,7 @@ if (ArgCount >= PR_MAX_MACRO_ARGS) { PrError (ASL_ERROR, ASL_MSG_TOO_MANY_ARGUMENTS, TokenOffset); - return; + goto ErrorExit; } } @@ -400,7 +400,7 @@ PrError (ASL_ERROR, ASL_MSG_TOO_MANY_ARGUMENTS, THIS_TOKEN_OFFSET (Token)); - return; + goto ErrorExit; } break; } @@ -432,7 +432,7 @@ THIS_TOKEN_OFFSET (Name)); } - return; + goto ErrorExit; } DbgPrint (ASL_DEBUG_OUTPUT, PR_PREFIX_ID @@ -451,6 +451,13 @@ DefineInfo->Args = Args; DefineInfo->ArgCount = ArgCount; } + + return; + + +ErrorExit: + ACPI_FREE (Args); + return; } diff -Nru acpica-unix-20140114/source/components/debugger/dbdisply.c acpica-unix-20140214/source/components/debugger/dbdisply.c --- acpica-unix-20140114/source/components/debugger/dbdisply.c 2014-01-14 22:01:59.000000000 +0000 +++ acpica-unix-20140214/source/components/debugger/dbdisply.c 2014-02-14 23:23:34.000000000 +0000 @@ -303,6 +303,10 @@ /* Is not a recognizeable object */ + AcpiOsPrintf ( + "Not a known ACPI internal object, descriptor type %2.2X\n", + ACPI_GET_DESCRIPTOR_TYPE (ObjPtr)); + Size = 16; if (AcpiOsReadable (ObjPtr, 64)) { diff -Nru acpica-unix-20140114/source/components/dispatcher/dsinit.c acpica-unix-20140214/source/components/dispatcher/dsinit.c --- acpica-unix-20140114/source/components/dispatcher/dsinit.c 2014-01-14 22:02:00.000000000 +0000 +++ acpica-unix-20140214/source/components/dispatcher/dsinit.c 2014-02-14 23:23:34.000000000 +0000 @@ -52,6 +52,7 @@ #define _COMPONENT ACPI_DISPATCHER ACPI_MODULE_NAME ("dsinit") + /* Local prototypes */ static ACPI_STATUS @@ -91,8 +92,8 @@ { ACPI_INIT_WALK_INFO *Info = (ACPI_INIT_WALK_INFO *) Context; ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle; - ACPI_OBJECT_TYPE Type; ACPI_STATUS Status; + ACPI_OPERAND_OBJECT *ObjDesc; ACPI_FUNCTION_ENTRY (); @@ -111,9 +112,7 @@ /* And even then, we are only interested in a few object types */ - Type = AcpiNsGetType (ObjHandle); - - switch (Type) + switch (AcpiNsGetType (ObjHandle)) { case ACPI_TYPE_REGION: @@ -129,8 +128,45 @@ break; case ACPI_TYPE_METHOD: - + /* + * Auto-serialization support. We will examine each method that is + * NotSerialized to determine if it creates any Named objects. If + * it does, it will be marked serialized to prevent problems if + * the method is entered by two or more threads and an attempt is + * made to create the same named object twice -- which results in + * an AE_ALREADY_EXISTS exception and method abort. + */ Info->MethodCount++; + ObjDesc = AcpiNsGetAttachedObject (Node); + if (!ObjDesc) + { + break; + } + + /* Ignore if already serialized */ + + if (ObjDesc->Method.InfoFlags & ACPI_METHOD_SERIALIZED) + { + Info->SerialMethodCount++; + break; + } + + if (AcpiGbl_AutoSerializeMethods) + { + /* Parse/scan method and serialize it if necessary */ + + AcpiDsAutoSerializeMethod (Node, ObjDesc); + if (ObjDesc->Method.InfoFlags & ACPI_METHOD_SERIALIZED) + { + /* Method was just converted to Serialized */ + + Info->SerialMethodCount++; + Info->SerializedMethodCount++; + break; + } + } + + Info->NonSerialMethodCount++; break; case ACPI_TYPE_DEVICE: @@ -187,7 +223,6 @@ ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "**** Starting initialization of namespace objects ****\n")); - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "Parsing all Control Methods:")); /* Set all init info to zero */ @@ -223,12 +258,14 @@ } ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, - "\nTable [%4.4s](id %4.4X) - %u Objects with %u Devices %u Methods %u Regions\n", - Table->Signature, OwnerId, Info.ObjectCount, - Info.DeviceCount, Info.MethodCount, Info.OpRegionCount)); + "Table [%4.4s] (id %4.4X) - %4u Objects with %3u Devices, " + "%3u Regions, %3u Methods (%u/%u/%u Serial/Non/Cvt)\n", + Table->Signature, OwnerId, Info.ObjectCount, Info.DeviceCount, + Info.OpRegionCount, Info.MethodCount, Info.SerialMethodCount, + Info.NonSerialMethodCount, Info.SerializedMethodCount)); - ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, - "%u Methods, %u Regions\n", Info.MethodCount, Info.OpRegionCount)); + ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "%u Methods, %u Regions\n", + Info.MethodCount, Info.OpRegionCount)); return_ACPI_STATUS (AE_OK); } diff -Nru acpica-unix-20140114/source/components/dispatcher/dsmethod.c acpica-unix-20140214/source/components/dispatcher/dsmethod.c --- acpica-unix-20140114/source/components/dispatcher/dsmethod.c 2014-01-14 22:02:00.000000000 +0000 +++ acpica-unix-20140214/source/components/dispatcher/dsmethod.c 2014-02-14 23:23:34.000000000 +0000 @@ -49,6 +49,8 @@ #include "acinterp.h" #include "acnamesp.h" #include "acdisasm.h" +#include "acparser.h" +#include "amlcode.h" #define _COMPONENT ACPI_DISPATCHER @@ -57,11 +59,148 @@ /* Local prototypes */ static ACPI_STATUS +AcpiDsDetectNamedOpcodes ( + ACPI_WALK_STATE *WalkState, + ACPI_PARSE_OBJECT **OutOp); + +static ACPI_STATUS AcpiDsCreateMethodMutex ( ACPI_OPERAND_OBJECT *MethodDesc); /******************************************************************************* + * + * FUNCTION: AcpiDsAutoSerializeMethod + * + * PARAMETERS: Node - Namespace Node of the method + * ObjDesc - Method object attached to node + * + * RETURN: Status + * + * DESCRIPTION: Parse a control method AML to scan for control methods that + * need serialization due to the creation of named objects. + * + * NOTE: It is a bit of overkill to mark all such methods serialized, since + * there is only a problem if the method actually blocks during execution. + * A blocking operation is, for example, a Sleep() operation, or any access + * to an operation region. However, it is probably not possible to easily + * detect whether a method will block or not, so we simply mark all suspicious + * methods as serialized. + * + * NOTE2: This code is essentially a generic routine for parsing a single + * control method. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiDsAutoSerializeMethod ( + ACPI_NAMESPACE_NODE *Node, + ACPI_OPERAND_OBJECT *ObjDesc) +{ + ACPI_STATUS Status; + ACPI_PARSE_OBJECT *Op = NULL; + ACPI_WALK_STATE *WalkState; + + + ACPI_FUNCTION_TRACE_PTR (DsAutoSerializeMethod, Node); + + + ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, + "Method auto-serialization parse [%4.4s] %p\n", + AcpiUtGetNodeName (Node), Node)); + + /* Create/Init a root op for the method parse tree */ + + Op = AcpiPsAllocOp (AML_METHOD_OP); + if (!Op) + { + return_ACPI_STATUS (AE_NO_MEMORY); + } + + AcpiPsSetName (Op, Node->Name.Integer); + Op->Common.Node = Node; + + /* Create and initialize a new walk state */ + + WalkState = AcpiDsCreateWalkState (Node->OwnerId, NULL, NULL, NULL); + if (!WalkState) + { + return_ACPI_STATUS (AE_NO_MEMORY); + } + + Status = AcpiDsInitAmlWalk (WalkState, Op, Node, ObjDesc->Method.AmlStart, + ObjDesc->Method.AmlLength, NULL, 0); + if (ACPI_FAILURE (Status)) + { + AcpiDsDeleteWalkState (WalkState); + return_ACPI_STATUS (Status); + } + + WalkState->DescendingCallback = AcpiDsDetectNamedOpcodes; + + /* Parse the method, scan for creation of named objects */ + + Status = AcpiPsParseAml (WalkState); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + + AcpiPsDeleteParseTree (Op); + return_ACPI_STATUS (Status); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDsDetectNamedOpcodes + * + * PARAMETERS: WalkState - Current state of the parse tree walk + * OutOp - Unused, required for parser interface + * + * RETURN: Status + * + * DESCRIPTION: Descending callback used during the loading of ACPI tables. + * Currently used to detect methods that must be marked serialized + * in order to avoid problems with the creation of named objects. + * + ******************************************************************************/ + +static ACPI_STATUS +AcpiDsDetectNamedOpcodes ( + ACPI_WALK_STATE *WalkState, + ACPI_PARSE_OBJECT **OutOp) +{ + + ACPI_FUNCTION_NAME (AcpiDsDetectNamedOpcodes); + + + /* We are only interested in opcodes that create a new name */ + + if (!(WalkState->OpInfo->Flags & (AML_NAMED | AML_CREATE | AML_FIELD))) + { + return (AE_OK); + } + + /* + * At this point, we know we have a Named object opcode. + * Mark the method as serialized. Later code will create a mutex for + * this method to enforce serialization. + */ + WalkState->MethodDesc->Method.InfoFlags |= ACPI_METHOD_SERIALIZED; + + ACPI_DEBUG_PRINT ((ACPI_DB_INFO, + "Method serialized [%4.4s] %p - [%s] (%4.4X)\n", + WalkState->MethodNode->Name.Ascii, WalkState->MethodNode, + WalkState->OpInfo->Name, WalkState->Opcode)); + + /* Abort the parse, no need to examine this method any further */ + + return (AE_CTRL_TERMINATE); +} + + +/******************************************************************************* * * FUNCTION: AcpiDsMethodError * diff -Nru acpica-unix-20140114/source/components/dispatcher/dswload.c acpica-unix-20140214/source/components/dispatcher/dswload.c --- acpica-unix-20140114/source/components/dispatcher/dswload.c 2014-01-14 22:02:00.000000000 +0000 +++ acpica-unix-20140214/source/components/dispatcher/dswload.c 2014-02-14 23:23:34.000000000 +0000 @@ -80,8 +80,21 @@ switch (PassNumber) { + case 0: + + /* Parse only - caller will setup callbacks */ + + WalkState->ParseFlags = ACPI_PARSE_LOAD_PASS1 | + ACPI_PARSE_DELETE_TREE | + ACPI_PARSE_DISASSEMBLE; + WalkState->DescendingCallback = NULL; + WalkState->AscendingCallback = NULL; + break; + case 1: + /* Load pass 1 */ + WalkState->ParseFlags = ACPI_PARSE_LOAD_PASS1 | ACPI_PARSE_DELETE_TREE; WalkState->DescendingCallback = AcpiDsLoad1BeginOp; @@ -90,6 +103,8 @@ case 2: + /* Load pass 2 */ + WalkState->ParseFlags = ACPI_PARSE_LOAD_PASS1 | ACPI_PARSE_DELETE_TREE; WalkState->DescendingCallback = AcpiDsLoad2BeginOp; @@ -98,6 +113,8 @@ case 3: + /* Execution pass */ + #ifndef ACPI_NO_METHOD_EXECUTION WalkState->ParseFlags |= ACPI_PARSE_EXECUTE | ACPI_PARSE_DELETE_TREE; diff -Nru acpica-unix-20140114/source/components/events/evregion.c acpica-unix-20140214/source/components/events/evregion.c --- acpica-unix-20140114/source/components/events/evregion.c 2014-01-14 22:02:00.000000000 +0000 +++ acpica-unix-20140214/source/components/events/evregion.c 2014-02-14 23:23:34.000000000 +0000 @@ -333,6 +333,7 @@ { ACPI_OPERAND_OBJECT *HandlerObj; ACPI_OPERAND_OBJECT *ObjDesc; + ACPI_OPERAND_OBJECT *StartDesc; ACPI_OPERAND_OBJECT **LastObjPtr; ACPI_ADR_SPACE_SETUP RegionSetup; void **RegionContext; @@ -363,6 +364,7 @@ /* Find this region in the handler's list */ ObjDesc = HandlerObj->AddressSpace.RegionList; + StartDesc = ObjDesc; LastObjPtr = &HandlerObj->AddressSpace.RegionList; while (ObjDesc) @@ -457,6 +459,16 @@ LastObjPtr = &ObjDesc->Region.Next; ObjDesc = ObjDesc->Region.Next; + + /* Prevent infinite loop if list is corrupted */ + + if (ObjDesc == StartDesc) + { + ACPI_ERROR ((AE_INFO, + "Circular handler list in region object %p", + RegionObj)); + return_VOID; + } } /* If we get here, the region was not in the handler's region list */ diff -Nru acpica-unix-20140114/source/components/executer/exdump.c acpica-unix-20140214/source/components/executer/exdump.c --- acpica-unix-20140114/source/components/executer/exdump.c 2014-01-14 22:02:00.000000000 +0000 +++ acpica-unix-20140214/source/components/executer/exdump.c 2014-02-14 23:23:35.000000000 +0000 @@ -114,13 +114,14 @@ {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpBuffer), NULL}, {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Buffer.Length), "Length"}, {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Buffer.Pointer), "Pointer"}, - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Buffer.Node), "Parent Node"}, + {ACPI_EXD_NODE, ACPI_EXD_OFFSET (Buffer.Node), "Parent Node"}, {ACPI_EXD_BUFFER, 0, NULL} }; -static ACPI_EXDUMP_INFO AcpiExDumpPackage[5] = +static ACPI_EXDUMP_INFO AcpiExDumpPackage[6] = { {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpPackage), NULL}, + {ACPI_EXD_NODE, ACPI_EXD_OFFSET (Package.Node), "Parent Node"}, {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Package.Flags), "Flags"}, {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Package.Count), "Elements"}, {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Package.Elements), "Element List"}, @@ -130,9 +131,9 @@ static ACPI_EXDUMP_INFO AcpiExDumpDevice[4] = { {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpDevice), NULL}, - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Device.Handler), "Handler"}, {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Device.NotifyList[0]), "System Notify"}, - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Device.NotifyList[1]), "Device Notify"} + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Device.NotifyList[1]), "Device Notify"}, + {ACPI_EXD_HDLR_LIST,ACPI_EXD_OFFSET (Device.Handler), "Handler"} }; static ACPI_EXDUMP_INFO AcpiExDumpEvent[2] = @@ -163,24 +164,26 @@ {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Mutex.OsMutex), "OsMutex"} }; -static ACPI_EXDUMP_INFO AcpiExDumpRegion[7] = +static ACPI_EXDUMP_INFO AcpiExDumpRegion[8] = { {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpRegion), NULL}, {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Region.SpaceId), "Space Id"}, {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Region.Flags), "Flags"}, + {ACPI_EXD_NODE, ACPI_EXD_OFFSET (Region.Node), "Parent Node"}, {ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET (Region.Address), "Address"}, {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Region.Length), "Length"}, - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Region.Handler), "Handler"}, + {ACPI_EXD_HDLR_LIST,ACPI_EXD_OFFSET (Region.Handler), "Handler"}, {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Region.Next), "Next"} }; -static ACPI_EXDUMP_INFO AcpiExDumpPower[5] = +static ACPI_EXDUMP_INFO AcpiExDumpPower[6] = { {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpPower), NULL}, {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (PowerResource.SystemLevel), "System Level"}, {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (PowerResource.ResourceOrder), "Resource Order"}, {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (PowerResource.NotifyList[0]), "System Notify"}, - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (PowerResource.NotifyList[1]), "Device Notify"} + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (PowerResource.NotifyList[1]), "Device Notify"}, + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (PowerResource.Handler), "Handler"} }; static ACPI_EXDUMP_INFO AcpiExDumpProcessor[7] = @@ -243,7 +246,7 @@ {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Reference.TargetType), "Target Type"}, {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Reference.Value), "Value"}, {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Reference.Object), "Object Desc"}, - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Reference.Node), "Node"}, + {ACPI_EXD_NODE, ACPI_EXD_OFFSET (Reference.Node), "Node"}, {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Reference.Where), "Where"}, {ACPI_EXD_REFERENCE,0, NULL} }; @@ -252,16 +255,16 @@ { {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpAddressHandler), NULL}, {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (AddressSpace.SpaceId), "Space Id"}, - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (AddressSpace.Next), "Next"}, - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (AddressSpace.RegionList), "Region List"}, - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (AddressSpace.Node), "Node"}, + {ACPI_EXD_HDLR_LIST,ACPI_EXD_OFFSET (AddressSpace.Next), "Next"}, + {ACPI_EXD_RGN_LIST, ACPI_EXD_OFFSET (AddressSpace.RegionList), "Region List"}, + {ACPI_EXD_NODE, ACPI_EXD_OFFSET (AddressSpace.Node), "Node"}, {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (AddressSpace.Context), "Context"} }; static ACPI_EXDUMP_INFO AcpiExDumpNotify[7] = { {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpNotify), NULL}, - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Notify.Node), "Node"}, + {ACPI_EXD_NODE, ACPI_EXD_OFFSET (Notify.Node), "Node"}, {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Notify.HandlerType), "Handler Type"}, {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Notify.Handler), "Handler"}, {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Notify.Context), "Context"}, @@ -269,15 +272,32 @@ {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Notify.Next[1]), "Next Device Notify"} }; +static ACPI_EXDUMP_INFO AcpiExDumpExtra[6] = +{ + {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpExtra), NULL}, + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Extra.Method_REG), "_REG Method"}, + {ACPI_EXD_NODE, ACPI_EXD_OFFSET (Extra.ScopeNode), "Scope Node"}, + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Extra.RegionContext), "Region Context"}, + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Extra.AmlStart), "Aml Start"}, + {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Extra.AmlLength), "Aml Length"} +}; + +static ACPI_EXDUMP_INFO AcpiExDumpData[3] = +{ + {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpData), NULL}, + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Data.Handler), "Handler"}, + {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Data.Pointer), "Raw Data"} +}; /* Miscellaneous tables */ -static ACPI_EXDUMP_INFO AcpiExDumpCommon[4] = +static ACPI_EXDUMP_INFO AcpiExDumpCommon[5] = { {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpCommon), NULL}, {ACPI_EXD_TYPE , 0, NULL}, {ACPI_EXD_UINT16, ACPI_EXD_OFFSET (Common.ReferenceCount), "Reference Count"}, - {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Common.Flags), "Flags"} + {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Common.Flags), "Flags"}, + {ACPI_EXD_LIST, ACPI_EXD_OFFSET (Common.NextObject), "Object List"} }; static ACPI_EXDUMP_INFO AcpiExDumpFieldCommon[7] = @@ -288,16 +308,18 @@ {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (CommonField.BitLength), "Bit Length"}, {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (CommonField.StartFieldBitOffset),"Field Bit Offset"}, {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (CommonField.BaseByteOffset), "Base Byte Offset"}, - {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (CommonField.Node), "Parent Node"} + {ACPI_EXD_NODE, ACPI_EXD_OFFSET (CommonField.Node), "Parent Node"} }; -static ACPI_EXDUMP_INFO AcpiExDumpNode[5] = +static ACPI_EXDUMP_INFO AcpiExDumpNode[7] = { {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpNode), NULL}, {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET (Flags), "Flags"}, {ACPI_EXD_UINT8, ACPI_EXD_NSOFFSET (OwnerId), "Owner Id"}, - {ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET (Child), "Child List"}, - {ACPI_EXD_POINTER, ACPI_EXD_NSOFFSET (Peer), "Next Peer"} + {ACPI_EXD_LIST, ACPI_EXD_NSOFFSET (Object), "Object List"}, + {ACPI_EXD_NODE, ACPI_EXD_NSOFFSET (Parent), "Parent"}, + {ACPI_EXD_NODE, ACPI_EXD_NSOFFSET (Child), "Child"}, + {ACPI_EXD_NODE, ACPI_EXD_NSOFFSET (Peer), "Peer"} }; @@ -332,7 +354,9 @@ AcpiExDumpAddressHandler, NULL, NULL, - NULL + NULL, + AcpiExDumpExtra, + AcpiExDumpData }; @@ -359,6 +383,10 @@ char *Name; const char *ReferenceName; UINT8 Count; + ACPI_OPERAND_OBJECT *Start; + ACPI_OPERAND_OBJECT *Data = NULL; + ACPI_OPERAND_OBJECT *Next; + ACPI_NAMESPACE_NODE *Node; if (!Info) @@ -386,7 +414,8 @@ case ACPI_EXD_TYPE: - AcpiExOutString ("Type", AcpiUtGetObjectTypeName (ObjDesc)); + AcpiOsPrintf ("%20s : %2.2X [%s]\n", "Type", + ObjDesc->Common.Type, AcpiUtGetObjectTypeName (ObjDesc)); break; case ACPI_EXD_UINT8: @@ -447,6 +476,120 @@ AcpiExDumpReferenceObj (ObjDesc); break; + case ACPI_EXD_LIST: + + Start = *ACPI_CAST_PTR (void *, Target); + Next = Start; + + AcpiOsPrintf ("%20s : %p", Name, Next); + if (Next) + { + AcpiOsPrintf ("(%s %2.2X)", + AcpiUtGetObjectTypeName (Next), Next->Common.Type); + + while (Next->Common.NextObject) + { + if ((Next->Common.Type == ACPI_TYPE_LOCAL_DATA) && + !Data) + { + Data = Next; + } + + Next = Next->Common.NextObject; + AcpiOsPrintf ("->%p(%s %2.2X)", Next, + AcpiUtGetObjectTypeName (Next), Next->Common.Type); + + if ((Next == Start) || (Next == Data)) + { + AcpiOsPrintf ("\n**** Error: Object list appears to be circular linked"); + break; + } + } + } + + AcpiOsPrintf ("\n", Next); + break; + + case ACPI_EXD_HDLR_LIST: + + Start = *ACPI_CAST_PTR (void *, Target); + Next = Start; + + AcpiOsPrintf ("%20s : %p", Name, Next); + if (Next) + { + AcpiOsPrintf ("(%s %2.2X)", + AcpiUtGetObjectTypeName (Next), Next->Common.Type); + + while (Next->AddressSpace.Next) + { + if ((Next->Common.Type == ACPI_TYPE_LOCAL_DATA) && + !Data) + { + Data = Next; + } + + Next = Next->AddressSpace.Next; + AcpiOsPrintf ("->%p(%s %2.2X)", Next, + AcpiUtGetObjectTypeName (Next), Next->Common.Type); + + if ((Next == Start) || (Next == Data)) + { + AcpiOsPrintf ("\n**** Error: Handler list appears to be circular linked"); + break; + } + } + } + + AcpiOsPrintf ("\n", Next); + break; + + case ACPI_EXD_RGN_LIST: + + Start = *ACPI_CAST_PTR (void *, Target); + Next = Start; + + AcpiOsPrintf ("%20s : %p", Name, Next); + if (Next) + { + AcpiOsPrintf ("(%s %2.2X)", + AcpiUtGetObjectTypeName (Next), Next->Common.Type); + + while (Next->Region.Next) + { + if ((Next->Common.Type == ACPI_TYPE_LOCAL_DATA) && + !Data) + { + Data = Next; + } + + Next = Next->Region.Next; + AcpiOsPrintf ("->%p(%s %2.2X)", Next, + AcpiUtGetObjectTypeName (Next), Next->Common.Type); + + if ((Next == Start) || (Next == Data)) + { + AcpiOsPrintf ("\n**** Error: Region list appears to be circular linked"); + break; + } + } + } + + AcpiOsPrintf ("\n", Next); + break; + + case ACPI_EXD_NODE: + + Node = *ACPI_CAST_PTR (ACPI_NAMESPACE_NODE *, Target); + + AcpiOsPrintf ("%20s : %p", Name, Node); + if (Node) + { + AcpiOsPrintf (" [%4.4s]", Node->Name.Ascii); + } + AcpiOsPrintf ("\n"); + break; + default: AcpiOsPrintf ("**** Invalid table opcode [%X] ****\n", @@ -864,9 +1007,8 @@ } AcpiOsPrintf ("%20s : %4.4s\n", "Name", AcpiUtGetNodeName (Node)); - AcpiExOutString ("Type", AcpiUtGetTypeName (Node->Type)); - AcpiExOutPointer ("Attached Object", AcpiNsGetAttachedObject (Node)); - AcpiExOutPointer ("Parent", Node->Parent); + AcpiOsPrintf ("%20s : %2.2X [%s]\n", "Type", + Node->Type, AcpiUtGetTypeName (Node->Type)); AcpiExDumpObject (ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, Node), AcpiExDumpNode); @@ -1074,24 +1216,30 @@ AcpiOsPrintf ("\nAttached Object (%p):\n", ((ACPI_NAMESPACE_NODE *) ObjDesc)->Object); - AcpiExDumpObjectDescriptor ( - ((ACPI_NAMESPACE_NODE *) ObjDesc)->Object, Flags); - return_VOID; + ObjDesc = ((ACPI_NAMESPACE_NODE *) ObjDesc)->Object; + goto DumpObject; } if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND) { AcpiOsPrintf ( - "ExDumpObjectDescriptor: %p is not an ACPI operand object: [%s]\n", + "%p is not an ACPI operand object: [%s]\n", ObjDesc, AcpiUtGetDescriptorName (ObjDesc)); return_VOID; } - if (ObjDesc->Common.Type > ACPI_TYPE_NS_NODE_MAX) + /* Validate the object type */ + + if (ObjDesc->Common.Type > ACPI_TYPE_LOCAL_MAX) { + AcpiOsPrintf ("Not a known object type: %2.2X\n", + ObjDesc->Common.Type); return_VOID; } + +DumpObject: + /* Common Fields */ AcpiExDumpObject (ObjDesc, AcpiExDumpCommon); @@ -1099,6 +1247,22 @@ /* Object-specific fields */ AcpiExDumpObject (ObjDesc, AcpiExDumpInfo[ObjDesc->Common.Type]); + + if (ObjDesc->Common.Type == ACPI_TYPE_REGION) + { + ObjDesc = ObjDesc->Common.NextObject; + if (ObjDesc->Common.Type > ACPI_TYPE_LOCAL_MAX) + { + AcpiOsPrintf ("Secondary object is not a known object type: %2.2X\n", + ObjDesc->Common.Type); + + return_VOID; + } + + AcpiOsPrintf ("\nExtra attached Object (%p):\n", ObjDesc); + AcpiExDumpObject (ObjDesc, AcpiExDumpInfo[ObjDesc->Common.Type]); + } + return_VOID; } diff -Nru acpica-unix-20140114/source/components/executer/exsystem.c acpica-unix-20140214/source/components/executer/exsystem.c --- acpica-unix-20140114/source/components/executer/exsystem.c 2014-01-14 22:02:01.000000000 +0000 +++ acpica-unix-20140214/source/components/executer/exsystem.c 2014-02-14 23:23:35.000000000 +0000 @@ -87,7 +87,7 @@ { /* We must wait, so unlock the interpreter */ - AcpiExRelinquishInterpreter (); + AcpiExExitInterpreter (); Status = AcpiOsWaitSemaphore (Semaphore, 1, Timeout); @@ -97,7 +97,7 @@ /* Reacquire the interpreter */ - AcpiExReacquireInterpreter (); + AcpiExEnterInterpreter (); } return_ACPI_STATUS (Status); @@ -140,7 +140,7 @@ { /* We must wait, so unlock the interpreter */ - AcpiExRelinquishInterpreter (); + AcpiExExitInterpreter (); Status = AcpiOsAcquireMutex (Mutex, Timeout); @@ -150,7 +150,7 @@ /* Reacquire the interpreter */ - AcpiExReacquireInterpreter (); + AcpiExEnterInterpreter (); } return_ACPI_STATUS (Status); @@ -227,7 +227,7 @@ /* Since this thread will sleep, we must release the interpreter */ - AcpiExRelinquishInterpreter (); + AcpiExExitInterpreter (); /* * For compatibility with other ACPI implementations and to prevent @@ -242,7 +242,7 @@ /* And now we must get the interpreter again */ - AcpiExReacquireInterpreter (); + AcpiExEnterInterpreter (); return (AE_OK); } diff -Nru acpica-unix-20140114/source/components/executer/exutils.c acpica-unix-20140214/source/components/executer/exutils.c --- acpica-unix-20140114/source/components/executer/exutils.c 2014-01-14 22:02:01.000000000 +0000 +++ acpica-unix-20140214/source/components/executer/exutils.c 2014-02-14 23:23:35.000000000 +0000 @@ -112,42 +112,6 @@ /******************************************************************************* * - * FUNCTION: AcpiExReacquireInterpreter - * - * PARAMETERS: None - * - * RETURN: None - * - * DESCRIPTION: Reacquire the interpreter execution region from within the - * interpreter code. Failure to enter the interpreter region is a - * fatal system error. Used in conjunction with - * RelinquishInterpreter - * - ******************************************************************************/ - -void -AcpiExReacquireInterpreter ( - void) -{ - ACPI_FUNCTION_TRACE (ExReacquireInterpreter); - - - /* - * If the global serialized flag is set, do not release the interpreter, - * since it was not actually released by AcpiExRelinquishInterpreter. - * This forces the interpreter to be single threaded. - */ - if (!AcpiGbl_AllMethodsSerialized) - { - AcpiExEnterInterpreter (); - } - - return_VOID; -} - - -/******************************************************************************* - * * FUNCTION: AcpiExExitInterpreter * * PARAMETERS: None @@ -156,7 +120,16 @@ * * DESCRIPTION: Exit the interpreter execution region. This is the top level * routine used to exit the interpreter when all processing has - * been completed. + * been completed, or when the method blocks. + * + * Cases where the interpreter is unlocked internally: + * 1) Method will be blocked on a Sleep() AML opcode + * 2) Method will be blocked on an Acquire() AML opcode + * 3) Method will be blocked on a Wait() AML opcode + * 4) Method will be blocked to acquire the global lock + * 5) Method will be blocked waiting to execute a serialized control + * method that is currently executing + * 6) About to invoke a user-installed opregion handler * ******************************************************************************/ @@ -177,49 +150,6 @@ } return_VOID; -} - - -/******************************************************************************* - * - * FUNCTION: AcpiExRelinquishInterpreter - * - * PARAMETERS: None - * - * RETURN: None - * - * DESCRIPTION: Exit the interpreter execution region, from within the - * interpreter - before attempting an operation that will possibly - * block the running thread. - * - * Cases where the interpreter is unlocked internally - * 1) Method to be blocked on a Sleep() AML opcode - * 2) Method to be blocked on an Acquire() AML opcode - * 3) Method to be blocked on a Wait() AML opcode - * 4) Method to be blocked to acquire the global lock - * 5) Method to be blocked waiting to execute a serialized control method - * that is currently executing - * 6) About to invoke a user-installed opregion handler - * - ******************************************************************************/ - -void -AcpiExRelinquishInterpreter ( - void) -{ - ACPI_FUNCTION_TRACE (ExRelinquishInterpreter); - - - /* - * If the global serialized flag is set, do not release the interpreter. - * This forces the interpreter to be single threaded. - */ - if (!AcpiGbl_AllMethodsSerialized) - { - AcpiExExitInterpreter (); - } - - return_VOID; } diff -Nru acpica-unix-20140114/source/components/namespace/nsinit.c acpica-unix-20140214/source/components/namespace/nsinit.c --- acpica-unix-20140114/source/components/namespace/nsinit.c 2014-01-14 22:02:01.000000000 +0000 +++ acpica-unix-20140214/source/components/namespace/nsinit.c 2014-02-14 23:23:35.000000000 +0000 @@ -129,9 +129,8 @@ Info.PackageInit, Info.PackageCount, Info.ObjectCount)); ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, - "%u Control Methods found\n", Info.MethodCount)); - ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, - "%u Op Regions found\n", Info.OpRegionCount)); + "%u Control Methods found\n%u Op Regions found\n", + Info.MethodCount, Info.OpRegionCount)); return_ACPI_STATUS (AE_OK); } diff -Nru acpica-unix-20140114/source/components/namespace/nsload.c acpica-unix-20140214/source/components/namespace/nsload.c --- acpica-unix-20140114/source/components/namespace/nsload.c 2014-01-14 22:02:01.000000000 +0000 +++ acpica-unix-20140214/source/components/namespace/nsload.c 2014-02-14 23:23:35.000000000 +0000 @@ -148,12 +148,12 @@ * parse trees. */ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, - "**** Begin Table Method Parsing and Object Initialization\n")); + "**** Begin Table Object Initialization\n")); Status = AcpiDsInitializeObjects (TableIndex, Node); ACPI_DEBUG_PRINT ((ACPI_DB_INFO, - "**** Completed Table Method Parsing and Object Initialization\n")); + "**** Completed Table Object Initialization\n")); return_ACPI_STATUS (Status); } diff -Nru acpica-unix-20140114/source/components/namespace/nsobject.c acpica-unix-20140214/source/components/namespace/nsobject.c --- acpica-unix-20140114/source/components/namespace/nsobject.c 2014-01-14 22:02:01.000000000 +0000 +++ acpica-unix-20140214/source/components/namespace/nsobject.c 2014-02-14 23:23:35.000000000 +0000 @@ -247,14 +247,19 @@ } } - /* Clear the entry in all cases */ + /* Clear the Node entry in all cases */ Node->Object = NULL; if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_OPERAND) { + /* Unlink object from front of possible object list */ + Node->Object = ObjDesc->Common.NextObject; + + /* Handle possible 2-descriptor object */ + if (Node->Object && - ((Node->Object)->Common.Type != ACPI_TYPE_LOCAL_DATA)) + (Node->Object->Common.Type != ACPI_TYPE_LOCAL_DATA)) { Node->Object = Node->Object->Common.NextObject; } diff -Nru acpica-unix-20140114/source/components/namespace/nsprepkg.c acpica-unix-20140214/source/components/namespace/nsprepkg.c --- acpica-unix-20140114/source/components/namespace/nsprepkg.c 2014-01-14 22:02:01.000000000 +0000 +++ acpica-unix-20140214/source/components/namespace/nsprepkg.c 2014-02-14 23:23:35.000000000 +0000 @@ -144,13 +144,13 @@ * Decode the type of the expected package contents * * PTYPE1 packages contain no subpackages - * PTYPE2 packages contain sub-packages + * PTYPE2 packages contain subpackages */ switch (Package->RetInfo.Type) { case ACPI_PTYPE1_FIXED: /* - * The package count is fixed and there are no sub-packages + * The package count is fixed and there are no subpackages * * If package is too small, exit. * If package is larger than expected, issue warning but continue @@ -177,7 +177,7 @@ case ACPI_PTYPE1_VAR: /* - * The package count is variable, there are no sub-packages, and all + * The package count is variable, there are no subpackages, and all * elements must be of the same type */ for (i = 0; i < Count; i++) @@ -194,7 +194,7 @@ case ACPI_PTYPE1_OPTION: /* - * The package count is variable, there are no sub-packages. There are + * The package count is variable, there are no subpackages. There are * a fixed number of required elements, and a variable number of * optional elements. * @@ -250,14 +250,14 @@ Elements++; Count--; - /* Examine the sub-packages */ + /* Examine the subpackages */ Status = AcpiNsCheckPackageList (Info, Package, Elements, Count); break; case ACPI_PTYPE2_PKG_COUNT: - /* First element is the (Integer) count of sub-packages to follow */ + /* First element is the (Integer) count of subpackages to follow */ Status = AcpiNsCheckObjectType (Info, Elements, ACPI_RTYPE_INTEGER, 0); @@ -279,7 +279,7 @@ Count = ExpectedCount; Elements++; - /* Examine the sub-packages */ + /* Examine the subpackages */ Status = AcpiNsCheckPackageList (Info, Package, Elements, Count); break; @@ -291,9 +291,9 @@ case ACPI_PTYPE2_FIX_VAR: /* * These types all return a single Package that consists of a - * variable number of sub-Packages. + * variable number of subpackages. * - * First, ensure that the first element is a sub-Package. If not, + * First, ensure that the first element is a subpackage. If not, * the BIOS may have incorrectly returned the object as a single * package instead of a Package of Packages (a common error if * there is only one entry). We may be able to repair this by @@ -316,7 +316,7 @@ Count = 1; } - /* Examine the sub-packages */ + /* Examine the subpackages */ Status = AcpiNsCheckPackageList (Info, Package, Elements, Count); break; @@ -379,9 +379,9 @@ /* - * Validate each sub-Package in the parent Package + * Validate each subpackage in the parent Package * - * NOTE: assumes list of sub-packages contains no NULL elements. + * NOTE: assumes list of subpackages contains no NULL elements. * Any NULL elements should have been removed by earlier call * to AcpiNsRemoveNullElements. */ @@ -400,7 +400,7 @@ return (Status); } - /* Examine the different types of expected sub-packages */ + /* Examine the different types of expected subpackages */ Info->ParentPackage = SubPackage; switch (Package->RetInfo.Type) @@ -452,7 +452,7 @@ case ACPI_PTYPE2_FIXED: - /* Each sub-package has a fixed length */ + /* Each subpackage has a fixed length */ ExpectedCount = Package->RetInfo2.Count; if (SubPackage->Package.Count < ExpectedCount) @@ -460,7 +460,7 @@ goto PackageTooSmall; } - /* Check the type of each sub-package element */ + /* Check the type of each subpackage element */ for (j = 0; j < ExpectedCount; j++) { @@ -475,7 +475,7 @@ case ACPI_PTYPE2_MIN: - /* Each sub-package has a variable but minimum length */ + /* Each subpackage has a variable but minimum length */ ExpectedCount = Package->RetInfo.Count1; if (SubPackage->Package.Count < ExpectedCount) @@ -483,7 +483,7 @@ goto PackageTooSmall; } - /* Check the type of each sub-package element */ + /* Check the type of each subpackage element */ Status = AcpiNsCheckPackageElements (Info, SubElements, Package->RetInfo.ObjectType1, @@ -532,7 +532,7 @@ (*SubElements)->Integer.Value = ExpectedCount; } - /* Check the type of each sub-package element */ + /* Check the type of each subpackage element */ Status = AcpiNsCheckPackageElements (Info, (SubElements + 1), Package->RetInfo.ObjectType1, @@ -556,10 +556,10 @@ PackageTooSmall: - /* The sub-package count was smaller than required */ + /* The subpackage count was smaller than required */ ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags, - "Return Sub-Package[%u] is too small - found %u elements, expected %u", + "Return SubPackage[%u] is too small - found %u elements, expected %u", i, SubPackage->Package.Count, ExpectedCount)); return (AE_AML_OPERAND_VALUE); diff -Nru acpica-unix-20140114/source/components/namespace/nsrepair2.c acpica-unix-20140214/source/components/namespace/nsrepair2.c --- acpica-unix-20140114/source/components/namespace/nsrepair2.c 2014-01-14 22:02:01.000000000 +0000 +++ acpica-unix-20140214/source/components/namespace/nsrepair2.c 2014-02-14 23:23:35.000000000 +0000 @@ -478,8 +478,8 @@ * DESCRIPTION: Repair for the _CST object: * 1. Sort the list ascending by C state type * 2. Ensure type cannot be zero - * 3. A sub-package count of zero means _CST is meaningless - * 4. Count must match the number of C state sub-packages + * 3. A subpackage count of zero means _CST is meaningless + * 4. Count must match the number of C state subpackages * *****************************************************************************/ @@ -672,6 +672,7 @@ ACPI_OPERAND_OBJECT **TopObjectList; ACPI_OPERAND_OBJECT **SubObjectList; ACPI_OPERAND_OBJECT *ObjDesc; + ACPI_OPERAND_OBJECT *SubPackage; UINT32 ElementCount; UINT32 Index; @@ -681,9 +682,19 @@ TopObjectList = PackageObject->Package.Elements; ElementCount = PackageObject->Package.Count; - for (Index = 0; Index < ElementCount; Index++) + /* Examine each subpackage */ + + for (Index = 0; Index < ElementCount; Index++, TopObjectList++) { - SubObjectList = (*TopObjectList)->Package.Elements; + SubPackage = *TopObjectList; + SubObjectList = SubPackage->Package.Elements; + + /* Check for minimum required element count */ + + if (SubPackage->Package.Count < 4) + { + continue; + } /* * If the BIOS has erroneously reversed the _PRT SourceName (index 2) @@ -698,14 +709,11 @@ SubObjectList[2] = ObjDesc; Info->ReturnFlags |= ACPI_OBJECT_REPAIRED; - ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags, + ACPI_WARN_PREDEFINED ((AE_INFO, + Info->FullPathname, Info->NodeFlags, "PRT[%X]: Fixed reversed SourceName and SourceIndex", Index)); } - - /* Point to the next ACPI_OPERAND_OBJECT in the top level package */ - - TopObjectList++; } return (AE_OK); @@ -745,7 +753,7 @@ /* - * Entries (sub-packages) in the _PSS Package must be sorted by power + * Entries (subpackages) in the _PSS Package must be sorted by power * dissipation, in descending order. If it appears that the list is * incorrectly sorted, sort it. We sort by CpuFrequency, since this * should be proportional to the power. @@ -838,9 +846,9 @@ * * PARAMETERS: Info - Method execution information block * ReturnObject - Pointer to the top-level returned object - * StartIndex - Index of the first sub-package - * ExpectedCount - Minimum length of each sub-package - * SortIndex - Sub-package entry to sort on + * StartIndex - Index of the first subpackage + * ExpectedCount - Minimum length of each subpackage + * SortIndex - Subpackage entry to sort on * SortDirection - Ascending or descending * SortKeyName - Name of the SortIndex field * @@ -881,7 +889,7 @@ } /* - * NOTE: assumes list of sub-packages contains no NULL elements. + * NOTE: assumes list of subpackages contains no NULL elements. * Any NULL elements should have been removed by earlier call * to AcpiNsRemoveNullElements. */ @@ -911,7 +919,7 @@ return (AE_AML_OPERAND_TYPE); } - /* Each sub-package must have the minimum length */ + /* Each subpackage must have the minimum length */ if ((*OuterElements)->Package.Count < ExpectedCount) { diff -Nru acpica-unix-20140114/source/components/namespace/nsrepair.c acpica-unix-20140214/source/components/namespace/nsrepair.c --- acpica-unix-20140114/source/components/namespace/nsrepair.c 2014-01-14 22:02:01.000000000 +0000 +++ acpica-unix-20140214/source/components/namespace/nsrepair.c 2014-02-14 23:23:35.000000000 +0000 @@ -212,14 +212,29 @@ * this predefined name. Either one return value is expected, or none, * for both methods and other objects. * - * Exit now if there is no return object. Warning if one was expected. + * Try to fix if there was no return object. Warning if failed to fix. */ if (!ReturnObject) { if (ExpectedBtypes && (!(ExpectedBtypes & ACPI_RTYPE_NONE))) { - ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, - ACPI_WARN_ALWAYS, "Missing expected return value")); + if (PackageIndex != ACPI_NOT_PACKAGE_ELEMENT) + { + ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, + ACPI_WARN_ALWAYS, "Found unexpected NULL package element")); + + Status = AcpiNsRepairNullElement (Info, ExpectedBtypes, + PackageIndex, ReturnObjectPtr); + if (ACPI_SUCCESS (Status)) + { + return (AE_OK); /* Repair was successful */ + } + } + else + { + ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, + ACPI_WARN_ALWAYS, "Missing expected return value")); + } return (AE_AML_NO_RETURN_VALUE); } @@ -474,7 +489,7 @@ * RETURN: None. * * DESCRIPTION: Remove all NULL package elements from packages that contain - * a variable number of sub-packages. For these types of + * a variable number of subpackages. For these types of * packages, NULL elements can be safely removed. * *****************************************************************************/ @@ -498,7 +513,7 @@ /* * We can safely remove all NULL elements from these package types: * PTYPE1_VAR packages contain a variable number of simple data types. - * PTYPE2 packages contain a variable number of sub-packages. + * PTYPE2 packages contain a variable number of subpackages. */ switch (PackageType) { diff -Nru acpica-unix-20140114/source/components/parser/psloop.c acpica-unix-20140214/source/components/parser/psloop.c --- acpica-unix-20140114/source/components/parser/psloop.c 2014-01-14 22:02:01.000000000 +0000 +++ acpica-unix-20140214/source/components/parser/psloop.c 2014-02-14 23:23:35.000000000 +0000 @@ -489,6 +489,11 @@ Status = AE_OK; } + if (Status == AE_CTRL_TERMINATE) + { + return_ACPI_STATUS (Status); + } + Status = AcpiPsCompleteOp (WalkState, &Op, Status); if (ACPI_FAILURE (Status)) { diff -Nru acpica-unix-20140114/source/components/parser/psobject.c acpica-unix-20140214/source/components/parser/psobject.c --- acpica-unix-20140114/source/components/parser/psobject.c 2014-01-14 22:02:01.000000000 +0000 +++ acpica-unix-20140214/source/components/parser/psobject.c 2014-02-14 23:23:35.000000000 +0000 @@ -229,7 +229,10 @@ Status = WalkState->DescendingCallback (WalkState, Op); if (ACPI_FAILURE (Status)) { - ACPI_EXCEPTION ((AE_INFO, Status, "During name lookup/catalog")); + if (Status != AE_CTRL_TERMINATE) + { + ACPI_EXCEPTION ((AE_INFO, Status, "During name lookup/catalog")); + } return_ACPI_STATUS (Status); } @@ -243,7 +246,7 @@ { if (Status == AE_CTRL_PENDING) { - return_ACPI_STATUS (AE_CTRL_PARSE_PENDING); + Status = AE_CTRL_PARSE_PENDING; } return_ACPI_STATUS (Status); } diff -Nru acpica-unix-20140114/source/components/resources/rscalc.c acpica-unix-20140214/source/components/resources/rscalc.c --- acpica-unix-20140114/source/components/resources/rscalc.c 2014-01-14 22:02:02.000000000 +0000 +++ acpica-unix-20140214/source/components/resources/rscalc.c 2014-02-14 23:23:36.000000000 +0000 @@ -659,7 +659,7 @@ for (Index = 0; Index < NumberOfElements; Index++) { - /* Dereference the sub-package */ + /* Dereference the subpackage */ PackageElement = *TopObjectList; diff -Nru acpica-unix-20140114/source/components/resources/rscreate.c acpica-unix-20140214/source/components/resources/rscreate.c --- acpica-unix-20140114/source/components/resources/rscreate.c 2014-01-14 22:02:02.000000000 +0000 +++ acpica-unix-20140214/source/components/resources/rscreate.c 2014-02-14 23:23:36.000000000 +0000 @@ -297,7 +297,7 @@ */ UserPrt->Length = (sizeof (ACPI_PCI_ROUTING_TABLE) - 4); - /* Each sub-package must be of length 4 */ + /* Each subpackage must be of length 4 */ if ((*TopObjectList)->Package.Count != 4) { @@ -308,7 +308,7 @@ } /* - * Dereference the sub-package. + * Dereference the subpackage. * The SubObjectList will now point to an array of the four IRQ * elements: [Address, Pin, Source, SourceIndex] */ @@ -317,7 +317,7 @@ /* 1) First subobject: Dereference the PRT.Address */ ObjDesc = SubObjectList[0]; - if (ObjDesc->Common.Type != ACPI_TYPE_INTEGER) + if (!ObjDesc || ObjDesc->Common.Type != ACPI_TYPE_INTEGER) { ACPI_ERROR ((AE_INFO, "(PRT[%u].Address) Need Integer, found %s", Index, AcpiUtGetObjectTypeName (ObjDesc))); @@ -329,7 +329,7 @@ /* 2) Second subobject: Dereference the PRT.Pin */ ObjDesc = SubObjectList[1]; - if (ObjDesc->Common.Type != ACPI_TYPE_INTEGER) + if (!ObjDesc || ObjDesc->Common.Type != ACPI_TYPE_INTEGER) { ACPI_ERROR ((AE_INFO, "(PRT[%u].Pin) Need Integer, found %s", Index, AcpiUtGetObjectTypeName (ObjDesc))); @@ -410,7 +410,7 @@ /* 4) Fourth subobject: Dereference the PRT.SourceIndex */ ObjDesc = SubObjectList[3]; - if (ObjDesc->Common.Type != ACPI_TYPE_INTEGER) + if (!ObjDesc || ObjDesc->Common.Type != ACPI_TYPE_INTEGER) { ACPI_ERROR ((AE_INFO, "(PRT[%u].SourceIndex) Need Integer, found %s", diff -Nru acpica-unix-20140114/source/components/resources/rsdump.c acpica-unix-20140214/source/components/resources/rsdump.c --- acpica-unix-20140114/source/components/resources/rsdump.c 2014-01-14 22:02:02.000000000 +0000 +++ acpica-unix-20140214/source/components/resources/rsdump.c 2014-02-14 23:23:36.000000000 +0000 @@ -52,7 +52,7 @@ ACPI_MODULE_NAME ("rsdump") -#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) +#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER) /* Local prototypes */ diff -Nru acpica-unix-20140114/source/components/resources/rsdumpinfo.c acpica-unix-20140214/source/components/resources/rsdumpinfo.c --- acpica-unix-20140114/source/components/resources/rsdumpinfo.c 2014-01-14 22:02:02.000000000 +0000 +++ acpica-unix-20140214/source/components/resources/rsdumpinfo.c 2014-02-14 23:23:36.000000000 +0000 @@ -52,7 +52,7 @@ ACPI_MODULE_NAME ("rsdumpinfo") -#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) +#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER) #define ACPI_RSD_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_RESOURCE_DATA,f) diff -Nru acpica-unix-20140114/source/components/resources/rsinfo.c acpica-unix-20140214/source/components/resources/rsinfo.c --- acpica-unix-20140114/source/components/resources/rsinfo.c 2014-01-14 22:02:02.000000000 +0000 +++ acpica-unix-20140214/source/components/resources/rsinfo.c 2014-02-14 23:23:36.000000000 +0000 @@ -141,7 +141,7 @@ }; -#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) +#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER) /* Dispatch table for resource dump functions */ diff -Nru acpica-unix-20140114/source/components/utilities/utdelete.c acpica-unix-20140214/source/components/utilities/utdelete.c --- acpica-unix-20140114/source/components/utilities/utdelete.c 2014-01-14 22:02:02.000000000 +0000 +++ acpica-unix-20140214/source/components/utilities/utdelete.c 2014-02-14 23:23:36.000000000 +0000 @@ -86,6 +86,7 @@ ACPI_OPERAND_OBJECT *HandlerDesc; ACPI_OPERAND_OBJECT *SecondDesc; ACPI_OPERAND_OBJECT *NextDesc; + ACPI_OPERAND_OBJECT *StartDesc; ACPI_OPERAND_OBJECT **LastObjPtr; @@ -250,9 +251,10 @@ if (HandlerDesc) { NextDesc = HandlerDesc->AddressSpace.RegionList; + StartDesc = NextDesc; LastObjPtr = &HandlerDesc->AddressSpace.RegionList; - /* Remove the region object from the handler's list */ + /* Remove the region object from the handler list */ while (NextDesc) { @@ -262,10 +264,20 @@ break; } - /* Walk the linked list of handler */ + /* Walk the linked list of handlers */ LastObjPtr = &NextDesc->Region.Next; NextDesc = NextDesc->Region.Next; + + /* Prevent infinite loop if list is corrupted */ + + if (NextDesc == StartDesc) + { + ACPI_ERROR ((AE_INFO, + "Circular region list in address handler object %p", + HandlerDesc)); + return_VOID; + } } if (HandlerDesc->AddressSpace.HandlerFlags & diff -Nru acpica-unix-20140114/source/components/utilities/utglobal.c acpica-unix-20140214/source/components/utilities/utglobal.c --- acpica-unix-20140114/source/components/utilities/utglobal.c 2014-01-14 22:02:02.000000000 +0000 +++ acpica-unix-20140214/source/components/utilities/utglobal.c 2014-02-14 23:23:36.000000000 +0000 @@ -58,12 +58,7 @@ * ******************************************************************************/ -/* - * We want the debug switches statically initialized so they - * are already set when the debugger is entered. - */ - -/* Debug switch - level and trace mask */ +/* Debug output control masks */ #ifdef ACPI_DEBUG_OUTPUT UINT32 AcpiDbgLevel = ACPI_DEBUG_DEFAULT; @@ -71,24 +66,24 @@ UINT32 AcpiDbgLevel = ACPI_NORMAL_DEFAULT; #endif -/* Debug switch - layer (component) mask */ - UINT32 AcpiDbgLayer = ACPI_COMPONENT_DEFAULT; -UINT32 AcpiGbl_NestingLevel = 0; - -/* Debugger globals */ - -BOOLEAN AcpiGbl_DbTerminateThreads = FALSE; -BOOLEAN AcpiGbl_AbortMethod = FALSE; -BOOLEAN AcpiGbl_MethodExecuting = FALSE; -/* System flags */ +/* AcpiGbl_FADT is a local copy of the FADT, converted to a common format. */ -UINT32 AcpiGbl_StartupFlags = 0; +ACPI_TABLE_FADT AcpiGbl_FADT; +UINT32 AcpiGbl_TraceFlags; +ACPI_NAME AcpiGbl_TraceMethodName; +BOOLEAN AcpiGbl_SystemAwakeAndRunning; +UINT32 AcpiCurrentGpeCount; -/* System starts uninitialized */ +/* + * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning + * that the ACPI hardware is no longer required. A flag in the FADT indicates + * a reduced HW machine, and that flag is duplicated here for convenience. + */ +BOOLEAN AcpiGbl_ReducedHardware; -BOOLEAN AcpiGbl_Shutdown = TRUE; +/* Various state name strings */ const char *AcpiGbl_SleepStateNames[ACPI_S_STATE_COUNT] = { @@ -309,7 +304,6 @@ AcpiGbl_DSDT = NULL; AcpiGbl_CmSingleStep = FALSE; - AcpiGbl_DbTerminateThreads = FALSE; AcpiGbl_Shutdown = FALSE; AcpiGbl_NsLookupCount = 0; AcpiGbl_PsFindCount = 0; @@ -357,6 +351,10 @@ AcpiGbl_DisableMemTracking = FALSE; #endif +#ifdef ACPI_DEBUGGER + AcpiGbl_DbTerminateThreads = FALSE; +#endif + return_ACPI_STATUS (AE_OK); } diff -Nru acpica-unix-20140114/source/components/utilities/utosi.c acpica-unix-20140214/source/components/utilities/utosi.c --- acpica-unix-20140114/source/components/utilities/utosi.c 2014-01-14 22:02:02.000000000 +0000 +++ acpica-unix-20140214/source/components/utilities/utosi.c 2014-02-14 23:23:36.000000000 +0000 @@ -50,6 +50,34 @@ #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME ("utosi") + +/****************************************************************************** + * + * ACPICA policy for new _OSI strings: + * + * It is the stated policy of ACPICA that new _OSI strings will be integrated + * into this module as soon as possible after they are defined. It is strongly + * recommended that all ACPICA hosts mirror this policy and integrate any + * changes to this module as soon as possible. There are several historical + * reasons behind this policy: + * + * 1) New BIOSs tend to test only the case where the host responds TRUE to + * the latest version of Windows, which would respond to the latest/newest + * _OSI string. Not responding TRUE to the latest version of Windows will + * risk executing untested code paths throughout the DSDT and SSDTs. + * + * 2) If a new _OSI string is recognized only after a significant delay, this + * has the potential to cause problems on existing working machines because + * of the possibility that a new and different path through the ASL code + * will be executed. + * + * 3) New _OSI strings are tending to come out about once per year. A delay + * in recognizing a new string for a significant amount of time risks the + * release of another string which only compounds the initial problem. + * + *****************************************************************************/ + + /* * Strings supported by the _OSI predefined control method (which is * implemented internally within this module.) @@ -78,6 +106,7 @@ {"Windows 2006 SP2", NULL, 0, ACPI_OSI_WIN_VISTA_SP2}, /* Windows Vista SP2 - Added 09/2010 */ {"Windows 2009", NULL, 0, ACPI_OSI_WIN_7}, /* Windows 7 and Server 2008 R2 - Added 09/2009 */ {"Windows 2012", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8 and Server 2012 - Added 08/2012 */ + {"Windows 2013", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8.1 and Server 2012 R2 - Added 01/2014 */ /* Feature Group Strings */ diff -Nru acpica-unix-20140114/source/include/acapps.h acpica-unix-20140214/source/include/acapps.h --- acpica-unix-20140114/source/include/acapps.h 2014-01-14 22:02:02.000000000 +0000 +++ acpica-unix-20140214/source/include/acapps.h 2014-02-14 23:23:36.000000000 +0000 @@ -45,6 +45,8 @@ #define _ACAPPS +#pragma pack(push) /* Set default struct packing */ + #ifdef _MSC_VER /* disable some level-4 warnings */ #pragma warning(disable:4100) /* warning C4100: unreferenced formal parameter */ #endif @@ -123,8 +125,7 @@ BOOLEAN OutToFile, char *Filename, char *Prefix, - char **OutFilename, - BOOLEAN GetAllTables); + char **OutFilename); void AdPrintStatistics ( @@ -141,8 +142,7 @@ ACPI_STATUS AdGetLocalTables ( - char *Filename, - BOOLEAN GetAllTables); + void); ACPI_STATUS AdParseTable ( @@ -221,4 +221,6 @@ char *OemTableId); #endif +#pragma pack(pop) /* Restore original struct packing */ + #endif /* _ACAPPS */ diff -Nru acpica-unix-20140114/source/include/acbuffer.h acpica-unix-20140214/source/include/acbuffer.h --- acpica-unix-20140114/source/include/acbuffer.h 2014-01-14 22:02:02.000000000 +0000 +++ acpica-unix-20140214/source/include/acbuffer.h 2014-02-14 23:23:36.000000000 +0000 @@ -44,6 +44,9 @@ #ifndef __ACBUFFER_H__ #define __ACBUFFER_H__ + +#pragma pack(push) /* Set default struct packing */ + /* * Contains buffer structures for these predefined names: * _FDE, _GRT, _GTM, _PLD, _SRT @@ -243,4 +246,6 @@ #define ACPI_PLD_SET_HORIZ_OFFSET(dword,value) ACPI_SET_BITS (dword, 16, ACPI_16BIT_MASK, value) /* Offset 128+16=144, Len 16 */ +#pragma pack(pop) /* Restore original struct packing */ + #endif /* ACBUFFER_H */ diff -Nru acpica-unix-20140114/source/include/acconfig.h acpica-unix-20140214/source/include/acconfig.h --- acpica-unix-20140114/source/include/acconfig.h 2014-01-14 22:02:02.000000000 +0000 +++ acpica-unix-20140214/source/include/acconfig.h 2014-02-14 23:23:36.000000000 +0000 @@ -45,6 +45,8 @@ #define _ACCONFIG_H +#pragma pack(push) /* Set default struct packing */ + /****************************************************************************** * * Configuration options @@ -234,4 +236,6 @@ #define ACPI_DEBUGGER_EXECUTE_PROMPT '%' +#pragma pack(pop) /* Restore original struct packing */ + #endif /* _ACCONFIG_H */ diff -Nru acpica-unix-20140114/source/include/acdebug.h acpica-unix-20140214/source/include/acdebug.h --- acpica-unix-20140114/source/include/acdebug.h 2014-01-14 22:02:02.000000000 +0000 +++ acpica-unix-20140214/source/include/acdebug.h 2014-02-14 23:23:36.000000000 +0000 @@ -45,6 +45,8 @@ #define __ACDEBUG_H__ +#pragma pack(push) /* Set default struct packing */ + #define ACPI_DEBUG_BUFFER_SIZE 0x4000 /* 16K buffer for return objects */ typedef struct acpi_db_command_info @@ -466,4 +468,6 @@ UINT32 Value, char *Buffer); +#pragma pack(pop) /* Restore original struct packing */ + #endif /* __ACDEBUG_H__ */ diff -Nru acpica-unix-20140114/source/include/acdisasm.h acpica-unix-20140214/source/include/acdisasm.h --- acpica-unix-20140114/source/include/acdisasm.h 2014-01-14 22:02:02.000000000 +0000 +++ acpica-unix-20140214/source/include/acdisasm.h 2014-02-14 23:23:36.000000000 +0000 @@ -47,6 +47,8 @@ #include "amlresrc.h" +#pragma pack(push) /* Set default struct packing */ + #define BLOCK_NONE 0 #define BLOCK_PAREN 1 #define BLOCK_BRACE 2 @@ -929,4 +931,6 @@ char *Filename); +#pragma pack(pop) /* Restore original struct packing */ + #endif /* __ACDISASM_H__ */ diff -Nru acpica-unix-20140114/source/include/acdispat.h acpica-unix-20140214/source/include/acdispat.h --- acpica-unix-20140114/source/include/acdispat.h 2014-01-14 22:02:02.000000000 +0000 +++ acpica-unix-20140214/source/include/acdispat.h 2014-02-14 23:23:37.000000000 +0000 @@ -46,6 +46,8 @@ #define _ACDISPAT_H_ +#pragma pack(push) /* Set default struct packing */ + #define NAMEOF_LOCAL_NTE "__L0" #define NAMEOF_ARG_NTE "__A0" @@ -173,13 +175,15 @@ /* - * dsload - Parser/Interpreter interface, pass 1 namespace load callbacks + * dsload - Parser/Interpreter interface */ ACPI_STATUS AcpiDsInitCallbacks ( ACPI_WALK_STATE *WalkState, UINT32 PassNumber); +/* dsload - pass 1 namespace load callbacks */ + ACPI_STATUS AcpiDsLoad1BeginOp ( ACPI_WALK_STATE *WalkState, @@ -190,9 +194,8 @@ ACPI_WALK_STATE *WalkState); -/* - * dsload - Parser/Interpreter interface, pass 2 namespace load callbacks - */ +/* dsload - pass 2 namespace load callbacks */ + ACPI_STATUS AcpiDsLoad2BeginOp ( ACPI_WALK_STATE *WalkState, @@ -257,8 +260,9 @@ * dsmethod - Parser/Interpreter interface - control method parsing */ ACPI_STATUS -AcpiDsParseMethod ( - ACPI_NAMESPACE_NODE *Node); +AcpiDsAutoSerializeMethod ( + ACPI_NAMESPACE_NODE *Node, + ACPI_OPERAND_OBJECT *ObjDesc); ACPI_STATUS AcpiDsCallControlMethod ( @@ -460,4 +464,6 @@ ACPI_OPERAND_OBJECT *Object, ACPI_WALK_STATE *WalkState); +#pragma pack(pop) /* Restore original struct packing */ + #endif /* _ACDISPAT_H_ */ diff -Nru acpica-unix-20140114/source/include/acevents.h acpica-unix-20140214/source/include/acevents.h --- acpica-unix-20140114/source/include/acevents.h 2014-01-14 22:02:02.000000000 +0000 +++ acpica-unix-20140214/source/include/acevents.h 2014-02-14 23:23:37.000000000 +0000 @@ -45,6 +45,8 @@ #define __ACEVENTS_H__ +#pragma pack(push) /* Set default struct packing */ + /* * evevent */ @@ -356,4 +358,6 @@ AcpiEvTerminate ( void)) +#pragma pack(pop) /* Restore original struct packing */ + #endif /* __ACEVENTS_H__ */ diff -Nru acpica-unix-20140114/source/include/acexcep.h acpica-unix-20140214/source/include/acexcep.h --- acpica-unix-20140114/source/include/acexcep.h 2014-01-14 22:02:02.000000000 +0000 +++ acpica-unix-20140214/source/include/acexcep.h 2014-02-14 23:23:37.000000000 +0000 @@ -45,6 +45,8 @@ #define __ACEXCEP_H__ +#pragma pack(push) /* Set default struct packing */ + /* This module contains all possible exception codes for ACPI_STATUS */ /* @@ -345,4 +347,6 @@ #endif /* EXCEPTION_TABLE */ +#pragma pack(pop) /* Restore original struct packing */ + #endif /* __ACEXCEP_H__ */ diff -Nru acpica-unix-20140114/source/include/acglobal.h acpica-unix-20140214/source/include/acglobal.h --- acpica-unix-20140114/source/include/acglobal.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/acglobal.h 2014-02-14 23:23:37.000000000 +0000 @@ -45,6 +45,8 @@ #define __ACGLOBAL_H__ +#pragma pack(push) /* Set default struct packing */ + /* * Ensure that the globals are actually defined and initialized only once. * @@ -52,11 +54,19 @@ * to simplify maintenance of the code. */ #ifdef DEFINE_ACPI_GLOBALS -#define ACPI_EXTERN -#define ACPI_INIT_GLOBAL(a,b) a=b +#define ACPI_GLOBAL(type,name) \ + extern type name; \ + type name + +#define ACPI_INIT_GLOBAL(type,name,value) \ + type name=value + #else -#define ACPI_EXTERN extern -#define ACPI_INIT_GLOBAL(a,b) a +#define ACPI_GLOBAL(type,name) \ + extern type name + +#define ACPI_INIT_GLOBAL(type,name,value) \ + extern type name #endif @@ -84,33 +94,34 @@ * 5) Allow unresolved references (invalid target name) in package objects * 6) Enable warning messages for behavior that is not ACPI spec compliant */ -UINT8 ACPI_INIT_GLOBAL (AcpiGbl_EnableInterpreterSlack, FALSE); +ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableInterpreterSlack, FALSE); /* - * Automatically serialize ALL control methods? Default is FALSE, meaning - * to use the Serialized/NotSerialized method flags on a per method basis. - * Only change this if the ASL code is poorly written and cannot handle - * reentrancy even though methods are marked "NotSerialized". + * Automatically serialize all methods that create named objects? Default + * is TRUE, meaning that all NonSerialized methods are scanned once at + * table load time to determine those that create named objects. Methods + * that create named objects are marked Serialized in order to prevent + * possible run-time problems if they are entered by more than one thread. */ -UINT8 ACPI_INIT_GLOBAL (AcpiGbl_AllMethodsSerialized, FALSE); +ACPI_INIT_GLOBAL (UINT8, AcpiGbl_AutoSerializeMethods, TRUE); /* * Create the predefined _OSI method in the namespace? Default is TRUE * because ACPI CA is fully compatible with other ACPI implementations. * Changing this will revert ACPI CA (and machine ASL) to pre-OSI behavior. */ -UINT8 ACPI_INIT_GLOBAL (AcpiGbl_CreateOsiMethod, TRUE); +ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CreateOsiMethod, TRUE); /* * Optionally use default values for the ACPI register widths. Set this to * TRUE to use the defaults, if an FADT contains incorrect widths/lengths. */ -UINT8 ACPI_INIT_GLOBAL (AcpiGbl_UseDefaultRegisterWidths, TRUE); +ACPI_INIT_GLOBAL (UINT8, AcpiGbl_UseDefaultRegisterWidths, TRUE); /* * Optionally enable output from the AML Debug Object. */ -UINT8 ACPI_INIT_GLOBAL (AcpiGbl_EnableAmlDebugObject, FALSE); +ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableAmlDebugObject, FALSE); /* * Optionally copy the entire DSDT to local memory (instead of simply @@ -118,7 +129,7 @@ * DSDT, creating the need for this option. Default is FALSE, do not copy * the DSDT. */ -UINT8 ACPI_INIT_GLOBAL (AcpiGbl_CopyDsdtLocally, FALSE); +ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CopyDsdtLocally, FALSE); /* * Optionally ignore an XSDT if present and use the RSDT instead. @@ -126,8 +137,7 @@ * of the RSDT, the XSDT has been found to be corrupt or ill-formed on * some machines. Default behavior is to use the XSDT if present. */ -UINT8 ACPI_INIT_GLOBAL (AcpiGbl_DoNotUseXsdt, FALSE); - +ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DoNotUseXsdt, FALSE); /* * Optionally use 32-bit FADT addresses if and when there is a conflict @@ -137,7 +147,7 @@ * some machines have been found to have a corrupted non-zero 64-bit * address. Default is FALSE, do not favor the 32-bit addresses. */ -UINT8 ACPI_INIT_GLOBAL (AcpiGbl_Use32BitFadtAddresses, FALSE); +ACPI_INIT_GLOBAL (UINT8, AcpiGbl_Use32BitFadtAddresses, FALSE); /* * Optionally truncate I/O addresses to 16 bits. Provides compatibility @@ -145,47 +155,28 @@ * this value is set to TRUE if any Windows OSI strings have been * requested by the BIOS. */ -UINT8 ACPI_INIT_GLOBAL (AcpiGbl_TruncateIoAddresses, FALSE); +ACPI_INIT_GLOBAL (UINT8, AcpiGbl_TruncateIoAddresses, FALSE); /* * Disable runtime checking and repair of values returned by control methods. * Use only if the repair is causing a problem on a particular machine. */ -UINT8 ACPI_INIT_GLOBAL (AcpiGbl_DisableAutoRepair, FALSE); +ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableAutoRepair, FALSE); /* * Optionally do not load any SSDTs from the RSDT/XSDT during initialization. * This can be useful for debugging ACPI problems on some machines. */ -UINT8 ACPI_INIT_GLOBAL (AcpiGbl_DisableSsdtTableLoad, FALSE); +ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableSsdtTableLoad, FALSE); /* * We keep track of the latest version of Windows that has been requested by * the BIOS. */ -UINT8 ACPI_INIT_GLOBAL (AcpiGbl_OsiData, 0); - - -/* AcpiGbl_FADT is a local copy of the FADT, converted to a common format. */ - -ACPI_TABLE_FADT AcpiGbl_FADT; -UINT32 AcpiCurrentGpeCount; -UINT32 AcpiGbl_TraceFlags; -ACPI_NAME AcpiGbl_TraceMethodName; -BOOLEAN AcpiGbl_SystemAwakeAndRunning; - -/* - * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning - * that the ACPI hardware is no longer required. A flag in the FADT indicates - * a reduced HW machine, and that flag is duplicated here for convenience. - */ -BOOLEAN AcpiGbl_ReducedHardware; +ACPI_INIT_GLOBAL (UINT8, AcpiGbl_OsiData, 0); #endif /* DEFINE_ACPI_GLOBALS */ -/* Do not disassemble buffers to resource descriptors */ - -ACPI_EXTERN UINT8 ACPI_INIT_GLOBAL (AcpiGbl_NoResourceDisassembly, FALSE); /***************************************************************************** * @@ -194,37 +185,36 @@ ****************************************************************************/ /* - * AcpiGbl_RootTableList is the master list of ACPI tables that were - * found in the RSDT/XSDT. + * Master list of all ACPI tables that were found in the RSDT/XSDT. */ -ACPI_EXTERN ACPI_TABLE_LIST AcpiGbl_RootTableList; +ACPI_GLOBAL (ACPI_TABLE_LIST, AcpiGbl_RootTableList); + +/* DSDT information. Used to check for DSDT corruption */ + +ACPI_GLOBAL (ACPI_TABLE_HEADER *, AcpiGbl_DSDT); +ACPI_GLOBAL (ACPI_TABLE_HEADER, AcpiGbl_OriginalDsdtHeader); #if (!ACPI_REDUCED_HARDWARE) -ACPI_EXTERN ACPI_TABLE_FACS *AcpiGbl_FACS; +ACPI_GLOBAL (ACPI_TABLE_FACS *, AcpiGbl_FACS); #endif /* !ACPI_REDUCED_HARDWARE */ /* These addresses are calculated from the FADT Event Block addresses */ -ACPI_EXTERN ACPI_GENERIC_ADDRESS AcpiGbl_XPm1aStatus; -ACPI_EXTERN ACPI_GENERIC_ADDRESS AcpiGbl_XPm1aEnable; +ACPI_GLOBAL (ACPI_GENERIC_ADDRESS, AcpiGbl_XPm1aStatus); +ACPI_GLOBAL (ACPI_GENERIC_ADDRESS, AcpiGbl_XPm1aEnable); -ACPI_EXTERN ACPI_GENERIC_ADDRESS AcpiGbl_XPm1bStatus; -ACPI_EXTERN ACPI_GENERIC_ADDRESS AcpiGbl_XPm1bEnable; - -/* DSDT information. Used to check for DSDT corruption */ - -ACPI_EXTERN ACPI_TABLE_HEADER *AcpiGbl_DSDT; -ACPI_EXTERN ACPI_TABLE_HEADER AcpiGbl_OriginalDsdtHeader; +ACPI_GLOBAL (ACPI_GENERIC_ADDRESS, AcpiGbl_XPm1bStatus); +ACPI_GLOBAL (ACPI_GENERIC_ADDRESS, AcpiGbl_XPm1bEnable); /* - * Handle both ACPI 1.0 and ACPI 2.0 Integer widths. The integer width is + * Handle both ACPI 1.0 and ACPI 2.0+ Integer widths. The integer width is * determined by the revision of the DSDT: If the DSDT revision is less than * 2, use only the lower 32 bits of the internal 64-bit Integer. */ -ACPI_EXTERN UINT8 AcpiGbl_IntegerBitWidth; -ACPI_EXTERN UINT8 AcpiGbl_IntegerByteWidth; -ACPI_EXTERN UINT8 AcpiGbl_IntegerNybbleWidth; +ACPI_GLOBAL (UINT8, AcpiGbl_IntegerBitWidth); +ACPI_GLOBAL (UINT8, AcpiGbl_IntegerByteWidth); +ACPI_GLOBAL (UINT8, AcpiGbl_IntegerNybbleWidth); /***************************************************************************** @@ -238,36 +228,36 @@ * actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs. * (The table maps local handles to the real OS handles) */ -ACPI_EXTERN ACPI_MUTEX_INFO AcpiGbl_MutexInfo[ACPI_NUM_MUTEX]; +ACPI_GLOBAL (ACPI_MUTEX_INFO, AcpiGbl_MutexInfo[ACPI_NUM_MUTEX]); /* * Global lock mutex is an actual AML mutex object * Global lock semaphore works in conjunction with the actual global lock * Global lock spinlock is used for "pending" handshake */ -ACPI_EXTERN ACPI_OPERAND_OBJECT *AcpiGbl_GlobalLockMutex; -ACPI_EXTERN ACPI_SEMAPHORE AcpiGbl_GlobalLockSemaphore; -ACPI_EXTERN ACPI_SPINLOCK AcpiGbl_GlobalLockPendingLock; -ACPI_EXTERN UINT16 AcpiGbl_GlobalLockHandle; -ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockAcquired; -ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockPresent; -ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockPending; +ACPI_GLOBAL (ACPI_OPERAND_OBJECT *, AcpiGbl_GlobalLockMutex); +ACPI_GLOBAL (ACPI_SEMAPHORE, AcpiGbl_GlobalLockSemaphore); +ACPI_GLOBAL (ACPI_SPINLOCK, AcpiGbl_GlobalLockPendingLock); +ACPI_GLOBAL (UINT16, AcpiGbl_GlobalLockHandle); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_GlobalLockAcquired); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_GlobalLockPresent); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_GlobalLockPending); /* * Spinlocks are used for interfaces that can be possibly called at * interrupt level */ -ACPI_EXTERN ACPI_SPINLOCK AcpiGbl_GpeLock; /* For GPE data structs and registers */ -ACPI_EXTERN ACPI_SPINLOCK AcpiGbl_HardwareLock; /* For ACPI H/W except GPE registers */ -ACPI_EXTERN ACPI_SPINLOCK AcpiGbl_ReferenceCountLock; +ACPI_GLOBAL (ACPI_SPINLOCK, AcpiGbl_GpeLock); /* For GPE data structs and registers */ +ACPI_GLOBAL (ACPI_SPINLOCK, AcpiGbl_HardwareLock); /* For ACPI H/W except GPE registers */ +ACPI_GLOBAL (ACPI_SPINLOCK, AcpiGbl_ReferenceCountLock); /* Mutex for _OSI support */ -ACPI_EXTERN ACPI_MUTEX AcpiGbl_OsiMutex; +ACPI_GLOBAL (ACPI_MUTEX, AcpiGbl_OsiMutex); /* Reader/Writer lock is used for namespace walk and dynamic table unload */ -ACPI_EXTERN ACPI_RW_LOCK AcpiGbl_NamespaceRwLock; +ACPI_GLOBAL (ACPI_RW_LOCK, AcpiGbl_NamespaceRwLock); /***************************************************************************** @@ -278,69 +268,69 @@ /* Object caches */ -ACPI_EXTERN ACPI_CACHE_T *AcpiGbl_NamespaceCache; -ACPI_EXTERN ACPI_CACHE_T *AcpiGbl_StateCache; -ACPI_EXTERN ACPI_CACHE_T *AcpiGbl_PsNodeCache; -ACPI_EXTERN ACPI_CACHE_T *AcpiGbl_PsNodeExtCache; -ACPI_EXTERN ACPI_CACHE_T *AcpiGbl_OperandCache; +ACPI_GLOBAL (ACPI_CACHE_T *, AcpiGbl_NamespaceCache); +ACPI_GLOBAL (ACPI_CACHE_T *, AcpiGbl_StateCache); +ACPI_GLOBAL (ACPI_CACHE_T *, AcpiGbl_PsNodeCache); +ACPI_GLOBAL (ACPI_CACHE_T *, AcpiGbl_PsNodeExtCache); +ACPI_GLOBAL (ACPI_CACHE_T *, AcpiGbl_OperandCache); + +/* System */ + +ACPI_INIT_GLOBAL (UINT32, AcpiGbl_StartupFlags, 0); +ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_Shutdown, TRUE); /* Global handlers */ -ACPI_EXTERN ACPI_GLOBAL_NOTIFY_HANDLER AcpiGbl_GlobalNotify[2]; -ACPI_EXTERN ACPI_EXCEPTION_HANDLER AcpiGbl_ExceptionHandler; -ACPI_EXTERN ACPI_INIT_HANDLER AcpiGbl_InitHandler; -ACPI_EXTERN ACPI_TABLE_HANDLER AcpiGbl_TableHandler; -ACPI_EXTERN void *AcpiGbl_TableHandlerContext; -ACPI_EXTERN ACPI_WALK_STATE *AcpiGbl_BreakpointWalk; -ACPI_EXTERN ACPI_INTERFACE_HANDLER AcpiGbl_InterfaceHandler; -ACPI_EXTERN ACPI_SCI_HANDLER_INFO *AcpiGbl_SciHandlerList; +ACPI_GLOBAL (ACPI_GLOBAL_NOTIFY_HANDLER,AcpiGbl_GlobalNotify[2]); +ACPI_GLOBAL (ACPI_EXCEPTION_HANDLER, AcpiGbl_ExceptionHandler); +ACPI_GLOBAL (ACPI_INIT_HANDLER, AcpiGbl_InitHandler); +ACPI_GLOBAL (ACPI_TABLE_HANDLER, AcpiGbl_TableHandler); +ACPI_GLOBAL (void *, AcpiGbl_TableHandlerContext); +ACPI_GLOBAL (ACPI_WALK_STATE *, AcpiGbl_BreakpointWalk); +ACPI_GLOBAL (ACPI_INTERFACE_HANDLER, AcpiGbl_InterfaceHandler); +ACPI_GLOBAL (ACPI_SCI_HANDLER_INFO *, AcpiGbl_SciHandlerList); /* Owner ID support */ -ACPI_EXTERN UINT32 AcpiGbl_OwnerIdMask[ACPI_NUM_OWNERID_MASKS]; -ACPI_EXTERN UINT8 AcpiGbl_LastOwnerIdIndex; -ACPI_EXTERN UINT8 AcpiGbl_NextOwnerIdOffset; +ACPI_GLOBAL (UINT32, AcpiGbl_OwnerIdMask[ACPI_NUM_OWNERID_MASKS]); +ACPI_GLOBAL (UINT8, AcpiGbl_LastOwnerIdIndex); +ACPI_GLOBAL (UINT8, AcpiGbl_NextOwnerIdOffset); /* Initialization sequencing */ -ACPI_EXTERN BOOLEAN AcpiGbl_RegMethodsExecuted; +ACPI_GLOBAL (BOOLEAN, AcpiGbl_RegMethodsExecuted); /* Misc */ -ACPI_EXTERN UINT32 AcpiGbl_OriginalMode; -ACPI_EXTERN UINT32 AcpiGbl_RsdpOriginalLocation; -ACPI_EXTERN UINT32 AcpiGbl_NsLookupCount; -ACPI_EXTERN UINT32 AcpiGbl_PsFindCount; -ACPI_EXTERN UINT16 AcpiGbl_Pm1EnableRegisterSave; -ACPI_EXTERN UINT8 AcpiGbl_DebuggerConfiguration; -ACPI_EXTERN BOOLEAN AcpiGbl_StepToNextCall; -ACPI_EXTERN BOOLEAN AcpiGbl_AcpiHardwarePresent; -ACPI_EXTERN BOOLEAN AcpiGbl_EventsInitialized; -ACPI_EXTERN ACPI_INTERFACE_INFO *AcpiGbl_SupportedInterfaces; -ACPI_EXTERN ACPI_ADDRESS_RANGE *AcpiGbl_AddressRangeList[ACPI_ADDRESS_RANGE_MAX]; +ACPI_GLOBAL (UINT32, AcpiGbl_OriginalMode); +ACPI_GLOBAL (UINT32, AcpiGbl_RsdpOriginalLocation); +ACPI_GLOBAL (UINT32, AcpiGbl_NsLookupCount); +ACPI_GLOBAL (UINT32, AcpiGbl_PsFindCount); +ACPI_GLOBAL (UINT16, AcpiGbl_Pm1EnableRegisterSave); +ACPI_GLOBAL (UINT8, AcpiGbl_DebuggerConfiguration); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_StepToNextCall); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_AcpiHardwarePresent); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_EventsInitialized); +ACPI_GLOBAL (ACPI_INTERFACE_INFO *, AcpiGbl_SupportedInterfaces); +ACPI_GLOBAL (ACPI_ADDRESS_RANGE *, AcpiGbl_AddressRangeList[ACPI_ADDRESS_RANGE_MAX]); -#ifndef DEFINE_ACPI_GLOBALS +/* Other miscellaneous, declared and initialized in utglobal */ -/* Other miscellaneous */ - -extern BOOLEAN AcpiGbl_Shutdown; -extern UINT32 AcpiGbl_StartupFlags; extern const char *AcpiGbl_SleepStateNames[ACPI_S_STATE_COUNT]; extern const char *AcpiGbl_LowestDstateNames[ACPI_NUM_SxW_METHODS]; extern const char *AcpiGbl_HighestDstateNames[ACPI_NUM_SxD_METHODS]; -extern const ACPI_OPCODE_INFO AcpiGbl_AmlOpInfo[AML_NUM_OPCODES]; extern const char *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS]; -#endif +extern const ACPI_OPCODE_INFO AcpiGbl_AmlOpInfo[AML_NUM_OPCODES]; #ifdef ACPI_DBG_TRACK_ALLOCATIONS -/* Lists for tracking memory allocations */ +/* Lists for tracking memory allocations (debug only) */ -ACPI_EXTERN ACPI_MEMORY_LIST *AcpiGbl_GlobalList; -ACPI_EXTERN ACPI_MEMORY_LIST *AcpiGbl_NsNodeList; -ACPI_EXTERN BOOLEAN AcpiGbl_DisplayFinalMemStats; -ACPI_EXTERN BOOLEAN AcpiGbl_DisableMemTracking; +ACPI_GLOBAL (ACPI_MEMORY_LIST *, AcpiGbl_GlobalList); +ACPI_GLOBAL (ACPI_MEMORY_LIST *, AcpiGbl_NsNodeList); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_DisplayFinalMemStats); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_DisableMemTracking); #endif @@ -356,22 +346,23 @@ #define NUM_PREDEFINED_NAMES 9 #endif -ACPI_EXTERN ACPI_NAMESPACE_NODE AcpiGbl_RootNodeStruct; -ACPI_EXTERN ACPI_NAMESPACE_NODE *AcpiGbl_RootNode; -ACPI_EXTERN ACPI_NAMESPACE_NODE *AcpiGbl_FadtGpeDevice; -ACPI_EXTERN ACPI_OPERAND_OBJECT *AcpiGbl_ModuleCodeList; +ACPI_GLOBAL (ACPI_NAMESPACE_NODE, AcpiGbl_RootNodeStruct); +ACPI_GLOBAL (ACPI_NAMESPACE_NODE *, AcpiGbl_RootNode); +ACPI_GLOBAL (ACPI_NAMESPACE_NODE *, AcpiGbl_FadtGpeDevice); +ACPI_GLOBAL (ACPI_OPERAND_OBJECT *, AcpiGbl_ModuleCodeList); extern const UINT8 AcpiGbl_NsProperties [ACPI_NUM_NS_TYPES]; extern const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames [NUM_PREDEFINED_NAMES]; #ifdef ACPI_DEBUG_OUTPUT -ACPI_EXTERN UINT32 AcpiGbl_CurrentNodeCount; -ACPI_EXTERN UINT32 AcpiGbl_CurrentNodeSize; -ACPI_EXTERN UINT32 AcpiGbl_MaxConcurrentNodeCount; -ACPI_EXTERN ACPI_SIZE *AcpiGbl_EntryStackPointer; -ACPI_EXTERN ACPI_SIZE *AcpiGbl_LowestStackPointer; -ACPI_EXTERN UINT32 AcpiGbl_DeepestNesting; +ACPI_GLOBAL (UINT32, AcpiGbl_CurrentNodeCount); +ACPI_GLOBAL (UINT32, AcpiGbl_CurrentNodeSize); +ACPI_GLOBAL (UINT32, AcpiGbl_MaxConcurrentNodeCount); +ACPI_GLOBAL (ACPI_SIZE *, AcpiGbl_EntryStackPointer); +ACPI_GLOBAL (ACPI_SIZE *, AcpiGbl_LowestStackPointer); +ACPI_GLOBAL (UINT32, AcpiGbl_DeepestNesting); +ACPI_INIT_GLOBAL (UINT32, AcpiGbl_NestingLevel, 0); #endif @@ -381,11 +372,11 @@ * ****************************************************************************/ -ACPI_EXTERN ACPI_THREAD_STATE *AcpiGbl_CurrentWalkList; +ACPI_GLOBAL (ACPI_THREAD_STATE *, AcpiGbl_CurrentWalkList); /* Control method single step flag */ -ACPI_EXTERN UINT8 AcpiGbl_CmSingleStep; +ACPI_GLOBAL (UINT8, AcpiGbl_CmSingleStep); /***************************************************************************** @@ -394,9 +385,10 @@ * ****************************************************************************/ -extern ACPI_BIT_REGISTER_INFO AcpiGbl_BitRegisterInfo[ACPI_NUM_BITREG]; -ACPI_EXTERN UINT8 AcpiGbl_SleepTypeA; -ACPI_EXTERN UINT8 AcpiGbl_SleepTypeB; +extern ACPI_BIT_REGISTER_INFO AcpiGbl_BitRegisterInfo[ACPI_NUM_BITREG]; + +ACPI_GLOBAL (UINT8, AcpiGbl_SleepTypeA); +ACPI_GLOBAL (UINT8, AcpiGbl_SleepTypeB); /***************************************************************************** @@ -407,13 +399,14 @@ #if (!ACPI_REDUCED_HARDWARE) -ACPI_EXTERN UINT8 AcpiGbl_AllGpesInitialized; -ACPI_EXTERN ACPI_GPE_XRUPT_INFO *AcpiGbl_GpeXruptListHead; -ACPI_EXTERN ACPI_GPE_BLOCK_INFO *AcpiGbl_GpeFadtBlocks[ACPI_MAX_GPE_BLOCKS]; -ACPI_EXTERN ACPI_GBL_EVENT_HANDLER AcpiGbl_GlobalEventHandler; -ACPI_EXTERN void *AcpiGbl_GlobalEventHandlerContext; -ACPI_EXTERN ACPI_FIXED_EVENT_HANDLER AcpiGbl_FixedEventHandlers[ACPI_NUM_FIXED_EVENTS]; -extern ACPI_FIXED_EVENT_INFO AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS]; +ACPI_GLOBAL (UINT8, AcpiGbl_AllGpesInitialized); +ACPI_GLOBAL (ACPI_GPE_XRUPT_INFO *, AcpiGbl_GpeXruptListHead); +ACPI_GLOBAL (ACPI_GPE_BLOCK_INFO *, AcpiGbl_GpeFadtBlocks[ACPI_MAX_GPE_BLOCKS]); +ACPI_GLOBAL (ACPI_GBL_EVENT_HANDLER, AcpiGbl_GlobalEventHandler); +ACPI_GLOBAL (void *, AcpiGbl_GlobalEventHandlerContext); +ACPI_GLOBAL (ACPI_FIXED_EVENT_HANDLER, AcpiGbl_FixedEventHandlers[ACPI_NUM_FIXED_EVENTS]); + +extern ACPI_FIXED_EVENT_INFO AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS]; #endif /* !ACPI_REDUCED_HARDWARE */ @@ -423,23 +416,19 @@ * ****************************************************************************/ -/* Procedure nesting level for debug output */ - -extern UINT32 AcpiGbl_NestingLevel; - /* Event counters */ -ACPI_EXTERN UINT32 AcpiMethodCount; -ACPI_EXTERN UINT32 AcpiGpeCount; -ACPI_EXTERN UINT32 AcpiSciCount; -ACPI_EXTERN UINT32 AcpiFixedEventCount[ACPI_NUM_FIXED_EVENTS]; +ACPI_GLOBAL (UINT32, AcpiMethodCount); +ACPI_GLOBAL (UINT32, AcpiGpeCount); +ACPI_GLOBAL (UINT32, AcpiSciCount); +ACPI_GLOBAL (UINT32, AcpiFixedEventCount[ACPI_NUM_FIXED_EVENTS]); /* Support for dynamic control method tracing mechanism */ -ACPI_EXTERN UINT32 AcpiGbl_OriginalDbgLevel; -ACPI_EXTERN UINT32 AcpiGbl_OriginalDbgLayer; -ACPI_EXTERN UINT32 AcpiGbl_TraceDbgLevel; -ACPI_EXTERN UINT32 AcpiGbl_TraceDbgLayer; +ACPI_GLOBAL (UINT32, AcpiGbl_OriginalDbgLevel); +ACPI_GLOBAL (UINT32, AcpiGbl_OriginalDbgLayer); +ACPI_GLOBAL (UINT32, AcpiGbl_TraceDbgLevel); +ACPI_GLOBAL (UINT32, AcpiGbl_TraceDbgLayer); /***************************************************************************** @@ -448,63 +437,64 @@ * ****************************************************************************/ -ACPI_EXTERN UINT8 AcpiGbl_DbOutputFlags; +ACPI_GLOBAL (UINT8, AcpiGbl_DbOutputFlags); #ifdef ACPI_DISASSEMBLER -ACPI_EXTERN BOOLEAN ACPI_INIT_GLOBAL (AcpiGbl_IgnoreNoopOperator, FALSE); +/* Do not disassemble buffers to resource descriptors */ -ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_disasm; -ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_verbose; -ACPI_EXTERN BOOLEAN AcpiGbl_NumExternalMethods; -ACPI_EXTERN UINT32 AcpiGbl_ResolvedExternalMethods; -ACPI_EXTERN ACPI_EXTERNAL_LIST *AcpiGbl_ExternalList; -ACPI_EXTERN ACPI_EXTERNAL_FILE *AcpiGbl_ExternalFileList; -#endif +ACPI_INIT_GLOBAL (UINT8, AcpiGbl_NoResourceDisassembly, FALSE); +ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_IgnoreNoopOperator, FALSE); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_disasm); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_verbose); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_NumExternalMethods); +ACPI_GLOBAL (UINT32, AcpiGbl_ResolvedExternalMethods); +ACPI_GLOBAL (ACPI_EXTERNAL_LIST *, AcpiGbl_ExternalList); +ACPI_GLOBAL (ACPI_EXTERNAL_FILE *, AcpiGbl_ExternalFileList); +#endif #ifdef ACPI_DEBUGGER -extern BOOLEAN AcpiGbl_MethodExecuting; -extern BOOLEAN AcpiGbl_AbortMethod; -extern BOOLEAN AcpiGbl_DbTerminateThreads; - -ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_tables; -ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_stats; -ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_ini_methods; -ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_NoRegionSupport; -ACPI_EXTERN BOOLEAN AcpiGbl_DbOutputToFile; -ACPI_EXTERN char *AcpiGbl_DbBuffer; -ACPI_EXTERN char *AcpiGbl_DbFilename; -ACPI_EXTERN UINT32 AcpiGbl_DbDebugLevel; -ACPI_EXTERN UINT32 AcpiGbl_DbConsoleDebugLevel; -ACPI_EXTERN ACPI_NAMESPACE_NODE *AcpiGbl_DbScopeNode; +ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DbTerminateThreads, FALSE); +ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_AbortMethod, FALSE); +ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_MethodExecuting, FALSE); + +ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_tables); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_stats); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_ini_methods); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOpt_NoRegionSupport); +ACPI_GLOBAL (BOOLEAN, AcpiGbl_DbOutputToFile); +ACPI_GLOBAL (char *, AcpiGbl_DbBuffer); +ACPI_GLOBAL (char *, AcpiGbl_DbFilename); +ACPI_GLOBAL (UINT32, AcpiGbl_DbDebugLevel); +ACPI_GLOBAL (UINT32, AcpiGbl_DbConsoleDebugLevel); +ACPI_GLOBAL (ACPI_NAMESPACE_NODE *, AcpiGbl_DbScopeNode); -ACPI_EXTERN char *AcpiGbl_DbArgs[ACPI_DEBUGGER_MAX_ARGS]; -ACPI_EXTERN ACPI_OBJECT_TYPE AcpiGbl_DbArgTypes[ACPI_DEBUGGER_MAX_ARGS]; +ACPI_GLOBAL (char *, AcpiGbl_DbArgs[ACPI_DEBUGGER_MAX_ARGS]); +ACPI_GLOBAL (ACPI_OBJECT_TYPE, AcpiGbl_DbArgTypes[ACPI_DEBUGGER_MAX_ARGS]); /* These buffers should all be the same size */ -ACPI_EXTERN char AcpiGbl_DbLineBuf[ACPI_DB_LINE_BUFFER_SIZE]; -ACPI_EXTERN char AcpiGbl_DbParsedBuf[ACPI_DB_LINE_BUFFER_SIZE]; -ACPI_EXTERN char AcpiGbl_DbScopeBuf[ACPI_DB_LINE_BUFFER_SIZE]; -ACPI_EXTERN char AcpiGbl_DbDebugFilename[ACPI_DB_LINE_BUFFER_SIZE]; +ACPI_GLOBAL (char, AcpiGbl_DbLineBuf[ACPI_DB_LINE_BUFFER_SIZE]); +ACPI_GLOBAL (char, AcpiGbl_DbParsedBuf[ACPI_DB_LINE_BUFFER_SIZE]); +ACPI_GLOBAL (char, AcpiGbl_DbScopeBuf[ACPI_DB_LINE_BUFFER_SIZE]); +ACPI_GLOBAL (char, AcpiGbl_DbDebugFilename[ACPI_DB_LINE_BUFFER_SIZE]); /* * Statistic globals */ -ACPI_EXTERN UINT16 AcpiGbl_ObjTypeCount[ACPI_TYPE_NS_NODE_MAX+1]; -ACPI_EXTERN UINT16 AcpiGbl_NodeTypeCount[ACPI_TYPE_NS_NODE_MAX+1]; -ACPI_EXTERN UINT16 AcpiGbl_ObjTypeCountMisc; -ACPI_EXTERN UINT16 AcpiGbl_NodeTypeCountMisc; -ACPI_EXTERN UINT32 AcpiGbl_NumNodes; -ACPI_EXTERN UINT32 AcpiGbl_NumObjects; - - -ACPI_EXTERN UINT32 AcpiGbl_SizeOfParseTree; -ACPI_EXTERN UINT32 AcpiGbl_SizeOfMethodTrees; -ACPI_EXTERN UINT32 AcpiGbl_SizeOfNodeEntries; -ACPI_EXTERN UINT32 AcpiGbl_SizeOfAcpiObjects; +ACPI_GLOBAL (UINT16, AcpiGbl_ObjTypeCount[ACPI_TYPE_NS_NODE_MAX+1]); +ACPI_GLOBAL (UINT16, AcpiGbl_NodeTypeCount[ACPI_TYPE_NS_NODE_MAX+1]); +ACPI_GLOBAL (UINT16, AcpiGbl_ObjTypeCountMisc); +ACPI_GLOBAL (UINT16, AcpiGbl_NodeTypeCountMisc); +ACPI_GLOBAL (UINT32, AcpiGbl_NumNodes); +ACPI_GLOBAL (UINT32, AcpiGbl_NumObjects); + +ACPI_GLOBAL (UINT32, AcpiGbl_SizeOfParseTree); +ACPI_GLOBAL (UINT32, AcpiGbl_SizeOfMethodTrees); +ACPI_GLOBAL (UINT32, AcpiGbl_SizeOfNodeEntries); +ACPI_GLOBAL (UINT32, AcpiGbl_SizeOfAcpiObjects); #endif /* ACPI_DEBUGGER */ @@ -517,7 +507,7 @@ #ifdef ACPI_APPLICATION -ACPI_FILE ACPI_INIT_GLOBAL (AcpiGbl_DebugFile, NULL); +ACPI_INIT_GLOBAL (ACPI_FILE, AcpiGbl_DebugFile, NULL); #endif /* ACPI_APPLICATION */ @@ -528,7 +518,9 @@ * ****************************************************************************/ -extern const AH_PREDEFINED_NAME AslPredefinedInfo[]; +extern const AH_PREDEFINED_NAME AslPredefinedInfo[]; + +#pragma pack(pop) /* Restore original struct packing */ #endif /* __ACGLOBAL_H__ */ diff -Nru acpica-unix-20140114/source/include/achware.h acpica-unix-20140214/source/include/achware.h --- acpica-unix-20140114/source/include/achware.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/achware.h 2014-02-14 23:23:37.000000000 +0000 @@ -45,6 +45,8 @@ #define __ACHWARE_H__ +#pragma pack(push) /* Set default struct packing */ + /* Values for the _SST predefined method */ #define ACPI_SST_INDICATOR_OFF 0 @@ -224,4 +226,6 @@ ACPI_HANDLE PciRegion); +#pragma pack(pop) /* Restore original struct packing */ + #endif /* __ACHWARE_H__ */ diff -Nru acpica-unix-20140114/source/include/acinterp.h acpica-unix-20140214/source/include/acinterp.h --- acpica-unix-20140114/source/include/acinterp.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/acinterp.h 2014-02-14 23:23:37.000000000 +0000 @@ -45,6 +45,8 @@ #define __ACINTERP_H__ +#pragma pack(push) /* Set default struct packing */ + #define ACPI_WALK_OPERANDS (&(WalkState->Operands [WalkState->NumOperands -1])) /* Macros for tables used for debug output */ @@ -89,6 +91,10 @@ #define ACPI_EXD_PACKAGE 11 #define ACPI_EXD_FIELD 12 #define ACPI_EXD_REFERENCE 13 +#define ACPI_EXD_LIST 14 /* Operand object list */ +#define ACPI_EXD_HDLR_LIST 15 /* Address Handler list */ +#define ACPI_EXD_RGN_LIST 16 /* Region list */ +#define ACPI_EXD_NODE 17 /* Namespace Node */ /* restore default alignment */ @@ -612,14 +618,6 @@ AcpiExExitInterpreter ( void); -void -AcpiExReacquireInterpreter ( - void); - -void -AcpiExRelinquishInterpreter ( - void); - BOOLEAN AcpiExTruncateFor32bitTable ( ACPI_OPERAND_OBJECT *ObjDesc); @@ -723,4 +721,6 @@ void *HandlerContext, void *RegionContext); +#pragma pack(pop) /* Restore original struct packing */ + #endif /* __INTERP_H__ */ diff -Nru acpica-unix-20140114/source/include/aclocal.h acpica-unix-20140214/source/include/aclocal.h --- acpica-unix-20140114/source/include/aclocal.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/aclocal.h 2014-02-14 23:23:37.000000000 +0000 @@ -45,6 +45,8 @@ #define __ACLOCAL_H__ +#pragma pack(push) /* Set default struct packing */ + /* acpisrc:StructDefs -- for acpisrc conversion */ #define ACPI_SERIALIZED 0xFF @@ -1349,4 +1351,6 @@ } AH_PREDEFINED_NAME; +#pragma pack(pop) /* Restore original struct packing */ + #endif /* __ACLOCAL_H__ */ diff -Nru acpica-unix-20140114/source/include/acmacros.h acpica-unix-20140214/source/include/acmacros.h --- acpica-unix-20140114/source/include/acmacros.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/acmacros.h 2014-02-14 23:23:37.000000000 +0000 @@ -45,6 +45,8 @@ #define __ACMACROS_H__ +#pragma pack(push) /* Set default struct packing */ + /* * Extract data using a pointer. Any more than a byte and we * get into potential aligment issues -- see the STORE macros below. @@ -433,4 +435,6 @@ #define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7')) +#pragma pack(pop) /* Restore original struct packing */ + #endif /* ACMACROS_H */ diff -Nru acpica-unix-20140114/source/include/acnamesp.h acpica-unix-20140214/source/include/acnamesp.h --- acpica-unix-20140114/source/include/acnamesp.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/acnamesp.h 2014-02-14 23:23:37.000000000 +0000 @@ -45,6 +45,8 @@ #define __ACNAMESP_H__ +#pragma pack(push) /* Set default struct packing */ + /* To search the entire name space, pass this as SearchBase */ #define ACPI_NS_ALL ((ACPI_HANDLE)0) @@ -535,4 +537,6 @@ AcpiNsTerminate ( void); +#pragma pack(pop) /* Restore original struct packing */ + #endif /* __ACNAMESP_H__ */ diff -Nru acpica-unix-20140114/source/include/acobject.h acpica-unix-20140214/source/include/acobject.h --- acpica-unix-20140114/source/include/acobject.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/acobject.h 2014-02-14 23:23:37.000000000 +0000 @@ -44,6 +44,8 @@ #ifndef _ACOBJECT_H #define _ACOBJECT_H +#pragma pack(push) /* Set default struct packing */ + /* acpisrc:StructDefs -- for acpisrc conversion */ @@ -581,6 +583,6 @@ } ACPI_DESCRIPTOR; -#pragma pack() +#pragma pack(pop) /* Restore original struct packing */ #endif /* _ACOBJECT_H */ diff -Nru acpica-unix-20140114/source/include/acoutput.h acpica-unix-20140214/source/include/acoutput.h --- acpica-unix-20140114/source/include/acoutput.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/acoutput.h 2014-02-14 23:23:37.000000000 +0000 @@ -44,6 +44,8 @@ #ifndef __ACOUTPUT_H__ #define __ACOUTPUT_H__ +#pragma pack(push) /* Set default struct packing */ + /* * Debug levels and component IDs. These are used to control the * granularity of the output of the ACPI_DEBUG_PRINT macro -- on a @@ -464,4 +466,6 @@ #endif /* ACPI_DEBUG_OUTPUT */ +#pragma pack(pop) /* Restore original struct packing */ + #endif /* __ACOUTPUT_H__ */ diff -Nru acpica-unix-20140114/source/include/acparser.h acpica-unix-20140214/source/include/acparser.h --- acpica-unix-20140114/source/include/acparser.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/acparser.h 2014-02-14 23:23:37.000000000 +0000 @@ -46,6 +46,8 @@ #define __ACPARSER_H__ +#pragma pack(push) /* Set default struct packing */ + #define OP_HAS_RETURN_VALUE 1 /* Variable number of arguments. This field must be 32 bits */ @@ -353,4 +355,6 @@ ACPI_PARSE_OBJECT *op); +#pragma pack(pop) /* Restore original struct packing */ + #endif /* __ACPARSER_H__ */ diff -Nru acpica-unix-20140114/source/include/acpiosxf.h acpica-unix-20140214/source/include/acpiosxf.h --- acpica-unix-20140114/source/include/acpiosxf.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/acpiosxf.h 2014-02-14 23:23:37.000000000 +0000 @@ -50,6 +50,8 @@ #include "actypes.h" +#pragma pack(push) /* Set default struct packing */ + /* Types for AcpiOsExecute */ typedef enum @@ -551,4 +553,6 @@ #endif +#pragma pack(pop) /* Restore original struct packing */ + #endif /* __ACPIOSXF_H__ */ diff -Nru acpica-unix-20140114/source/include/acpixf.h acpica-unix-20140214/source/include/acpixf.h --- acpica-unix-20140114/source/include/acpixf.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/acpixf.h 2014-02-14 23:23:37.000000000 +0000 @@ -47,13 +47,15 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20140114 +#define ACPI_CA_VERSION 0x20140214 #include "acconfig.h" #include "actypes.h" #include "actbl.h" #include "acbuffer.h" +#pragma pack(push) /* Set default struct packing */ + /* * Globals that are publically available */ @@ -70,7 +72,7 @@ /* ACPICA runtime options */ -extern UINT8 AcpiGbl_AllMethodsSerialized; +extern UINT8 AcpiGbl_AutoSerializeMethods; extern UINT8 AcpiGbl_CopyDsdtLocally; extern UINT8 AcpiGbl_CreateOsiMethod; extern UINT8 AcpiGbl_DisableAutoRepair; @@ -831,4 +833,6 @@ ...); #endif +#pragma pack(pop) /* Restore original struct packing */ + #endif /* __ACXFACE_H__ */ diff -Nru acpica-unix-20140114/source/include/acpredef.h acpica-unix-20140214/source/include/acpredef.h --- acpica-unix-20140114/source/include/acpredef.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/acpredef.h 2014-02-14 23:23:37.000000000 +0000 @@ -45,11 +45,13 @@ #define __ACPREDEF_H__ +#pragma pack(push) /* Set default struct packing */ + /****************************************************************************** * * Return Package types * - * 1) PTYPE1 packages do not contain sub-packages. + * 1) PTYPE1 packages do not contain subpackages. * * ACPI_PTYPE1_FIXED: Fixed-length length, 1 or 2 object types: * object type @@ -64,8 +66,8 @@ * (Used for _PRW) * * - * 2) PTYPE2 packages contain a Variable-length number of sub-packages. Each - * of the different types describe the contents of each of the sub-packages. + * 2) PTYPE2 packages contain a Variable-length number of subpackages. Each + * of the different types describe the contents of each of the subpackages. * * ACPI_PTYPE2: Each subpackage contains 1 or 2 object types. Zero-length * parent package is allowed: @@ -554,7 +556,7 @@ /* * For _HPX, a single package is returned, containing a variable-length number - * of sub-packages. Each sub-package contains a PCI record setting. + * of subpackages. Each subpackage contains a PCI record setting. * There are several different type of record settings, of different * lengths, but all elements of all settings are Integers. */ @@ -684,6 +686,12 @@ METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Refs) */ PACKAGE_INFO (ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0,0,0,0), + {{"_PRP", METHOD_0ARGS, + METHOD_RETURNS (ACPI_RTYPE_PACKAGE)}}, /* Variable-length (Pkgs) each: 1 Str, 1 Int/Str/Pkg */ + PACKAGE_INFO (ACPI_PTYPE2, ACPI_RTYPE_STRING, 1, + ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING | + ACPI_RTYPE_PACKAGE | ACPI_RTYPE_REFERENCE, 1,0), + {{"_PRS", METHOD_0ARGS, METHOD_RETURNS (ACPI_RTYPE_BUFFER)}}, @@ -1061,4 +1069,6 @@ extern const ACPI_PREDEFINED_INFO AcpiGbl_ResourceNames[]; #endif +#pragma pack(pop) /* Restore original struct packing */ + #endif diff -Nru acpica-unix-20140114/source/include/acresrc.h acpica-unix-20140214/source/include/acresrc.h --- acpica-unix-20140114/source/include/acresrc.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/acresrc.h 2014-02-14 23:23:37.000000000 +0000 @@ -49,6 +49,8 @@ #include "amlresrc.h" +#pragma pack(push) /* Set default struct packing */ + /* * If possible, pack the following structures to byte alignment, since we * don't care about performance for debug output. Two cases where we cannot @@ -437,4 +439,6 @@ extern ACPI_RSDUMP_INFO AcpiRsDumpGeneralFlags[]; #endif +#pragma pack(pop) /* Restore original struct packing */ + #endif /* __ACRESRC_H__ */ diff -Nru acpica-unix-20140114/source/include/acrestyp.h acpica-unix-20140214/source/include/acrestyp.h --- acpica-unix-20140114/source/include/acrestyp.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/acrestyp.h 2014-02-14 23:23:37.000000000 +0000 @@ -45,6 +45,8 @@ #define __ACRESTYP_H__ +#pragma pack(push) /* Set default struct packing */ + /* * Definitions for Resource Attributes */ @@ -697,4 +699,6 @@ } ACPI_PCI_ROUTING_TABLE; +#pragma pack(pop) /* Restore original struct packing */ + #endif /* __ACRESTYP_H__ */ diff -Nru acpica-unix-20140114/source/include/acstruct.h acpica-unix-20140214/source/include/acstruct.h --- acpica-unix-20140114/source/include/acstruct.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/acstruct.h 2014-02-14 23:23:37.000000000 +0000 @@ -44,6 +44,9 @@ #ifndef __ACSTRUCT_H__ #define __ACSTRUCT_H__ + +#pragma pack(push) /* Set default struct packing */ + /* acpisrc:StructDefs -- for acpisrc conversion */ /***************************************************************************** @@ -139,6 +142,9 @@ UINT32 TableIndex; UINT32 ObjectCount; UINT32 MethodCount; + UINT32 SerialMethodCount; + UINT32 NonSerialMethodCount; + UINT32 SerializedMethodCount; UINT32 DeviceCount; UINT32 OpRegionCount; UINT32 FieldCount; @@ -267,4 +273,6 @@ #define ACPI_DISPLAY_SHORT (UINT8) 2 +#pragma pack(pop) /* Restore original struct packing */ + #endif diff -Nru acpica-unix-20140114/source/include/actables.h acpica-unix-20140214/source/include/actables.h --- acpica-unix-20140114/source/include/actables.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/actables.h 2014-02-14 23:23:37.000000000 +0000 @@ -45,6 +45,8 @@ #define __ACTABLES_H__ +#pragma pack(push) /* Set default struct packing */ + ACPI_STATUS AcpiAllocateRootTable ( UINT32 InitialTableCount); @@ -194,4 +196,6 @@ AcpiTbParseRootTable ( ACPI_PHYSICAL_ADDRESS RsdpAddress); +#pragma pack(pop) /* Restore original struct packing */ + #endif /* __ACTABLES_H__ */ diff -Nru acpica-unix-20140114/source/include/actbl1.h acpica-unix-20140214/source/include/actbl1.h --- acpica-unix-20140114/source/include/actbl1.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/actbl1.h 2014-02-14 23:23:37.000000000 +0000 @@ -45,6 +45,8 @@ #define __ACTBL1_H__ +#pragma pack(push) /* Set default struct packing */ + /******************************************************************************* * * Additional ACPI Tables (1) @@ -1141,8 +1143,6 @@ #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */ -/* Reset to default packing */ - -#pragma pack() +#pragma pack(pop) /* Restore original struct packing */ #endif /* __ACTBL1_H__ */ diff -Nru acpica-unix-20140114/source/include/actbl2.h acpica-unix-20140214/source/include/actbl2.h --- acpica-unix-20140114/source/include/actbl2.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/actbl2.h 2014-02-14 23:23:37.000000000 +0000 @@ -45,6 +45,8 @@ #define __ACTBL2_H__ +#pragma pack(push) /* Set default struct packing */ + /******************************************************************************* * * Additional ACPI Tables (2) @@ -1416,8 +1418,6 @@ } ACPI_TABLE_WDRT; -/* Reset to default packing */ - -#pragma pack() +#pragma pack(pop) /* Restore original struct packing */ #endif /* __ACTBL2_H__ */ diff -Nru acpica-unix-20140114/source/include/actbl3.h acpica-unix-20140214/source/include/actbl3.h --- acpica-unix-20140114/source/include/actbl3.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/actbl3.h 2014-02-14 23:23:37.000000000 +0000 @@ -45,6 +45,8 @@ #define __ACTBL3_H__ +#pragma pack(push) /* Set default struct packing */ + /******************************************************************************* * * Additional ACPI Tables (3) @@ -732,8 +734,6 @@ } ACPI_TPM2_CONTROL; -/* Reset to default packing */ - -#pragma pack() +#pragma pack(pop) /* Restore original struct packing */ #endif /* __ACTBL3_H__ */ diff -Nru acpica-unix-20140114/source/include/actbl.h acpica-unix-20140214/source/include/actbl.h --- acpica-unix-20140114/source/include/actbl.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/actbl.h 2014-02-14 23:23:37.000000000 +0000 @@ -45,6 +45,8 @@ #define __ACTBL_H__ +#pragma pack(push) /* Set default struct packing */ + /******************************************************************************* * * Fundamental ACPI tables @@ -440,4 +442,6 @@ #define ACPI_FADT_V3_SIZE (UINT32) (ACPI_FADT_OFFSET (SleepControl)) #define ACPI_FADT_V5_SIZE (UINT32) (sizeof (ACPI_TABLE_FADT)) +#pragma pack(pop) /* Restore original struct packing */ + #endif /* __ACTBL_H__ */ diff -Nru acpica-unix-20140114/source/include/actypes.h acpica-unix-20140214/source/include/actypes.h --- acpica-unix-20140114/source/include/actypes.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/actypes.h 2014-02-14 23:23:37.000000000 +0000 @@ -44,6 +44,8 @@ #ifndef __ACTYPES_H__ #define __ACTYPES_H__ +#pragma pack(push) /* Set default struct packing */ + /* acpisrc:StructDefs -- for acpisrc conversion */ /* @@ -1315,4 +1317,6 @@ #define ACPI_OSI_WIN_8 0x0C +#pragma pack(pop) /* Restore original struct packing */ + #endif /* __ACTYPES_H__ */ diff -Nru acpica-unix-20140114/source/include/acutils.h acpica-unix-20140214/source/include/acutils.h --- acpica-unix-20140114/source/include/acutils.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/acutils.h 2014-02-14 23:23:37.000000000 +0000 @@ -45,6 +45,8 @@ #define _ACUTILS_H +#pragma pack(push) /* Set default struct packing */ + extern const UINT8 AcpiGbl_ResourceAmlSizes[]; extern const UINT8 AcpiGbl_ResourceAmlSerialBusSizes[]; @@ -1099,4 +1101,7 @@ const char *Path, ACPI_STATUS LookupStatus); + +#pragma pack(pop) /* Restore original struct packing */ + #endif /* _ACUTILS_H */ diff -Nru acpica-unix-20140114/source/include/amlcode.h acpica-unix-20140214/source/include/amlcode.h --- acpica-unix-20140114/source/include/amlcode.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/amlcode.h 2014-02-14 23:23:37.000000000 +0000 @@ -46,6 +46,9 @@ #ifndef __AMLCODE_H__ #define __AMLCODE_H__ +#pragma pack(push) /* Set default struct packing */ + + /* primary opcodes */ #define AML_NULL_CHAR (UINT16) 0x00 @@ -509,4 +512,6 @@ #define AML_METHOD_SYNC_LEVEL 0xF0 +#pragma pack(pop) /* Restore original struct packing */ + #endif /* __AMLCODE_H__ */ diff -Nru acpica-unix-20140114/source/include/amlresrc.h acpica-unix-20140214/source/include/amlresrc.h --- acpica-unix-20140114/source/include/amlresrc.h 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/include/amlresrc.h 2014-02-14 23:23:37.000000000 +0000 @@ -47,6 +47,8 @@ #define __AMLRESRC_H +#pragma pack(push) /* Set default struct packing */ + /* * Resource descriptor tags, as defined in the ACPI specification. * Used to symbolically reference fields within a descriptor. @@ -574,4 +576,7 @@ } AML_RESOURCE; + +#pragma pack(pop) /* Restore original struct packing */ + #endif diff -Nru acpica-unix-20140114/source/os_specific/service_layers/oswindir.c acpica-unix-20140214/source/os_specific/service_layers/oswindir.c --- acpica-unix-20140114/source/os_specific/service_layers/oswindir.c 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/os_specific/service_layers/oswindir.c 2014-02-14 23:23:37.000000000 +0000 @@ -106,6 +106,7 @@ if (!FullWildcardSpec) { printf ("Could not allocate buffer for wildcard pathname\n"); + free (SearchInfo); return (NULL); } diff -Nru acpica-unix-20140114/source/os_specific/service_layers/oswinxf.c acpica-unix-20140214/source/os_specific/service_layers/oswinxf.c --- acpica-unix-20140114/source/os_specific/service_layers/oswinxf.c 2014-01-14 22:02:03.000000000 +0000 +++ acpica-unix-20140214/source/os_specific/service_layers/oswinxf.c 2014-02-14 23:23:37.000000000 +0000 @@ -238,10 +238,6 @@ ACPI_TABLE_HEADER *ExistingTable, ACPI_TABLE_HEADER **NewTable) { -#ifdef ACPI_ASL_COMPILER - ACPI_STATUS Status; - ACPI_PHYSICAL_ADDRESS Address; -#endif if (!ExistingTable || !NewTable) { @@ -258,29 +254,6 @@ AeTableOverride (ExistingTable, NewTable); #endif - -#ifdef ACPI_ASL_COMPILER - - /* Attempt to get the table from the registry */ - - /* Construct a null-terminated string from table signature */ - - ACPI_MOVE_NAME (TableName, ExistingTable->Signature); - TableName[ACPI_NAME_SIZE] = 0; - - Status = AcpiOsGetTableByName (TableName, 0, NewTable, &Address); - if (ACPI_SUCCESS (Status)) - { - AcpiOsPrintf ("Table [%s] obtained from registry, %u bytes\n", - TableName, (*NewTable)->Length); - } - else - { - AcpiOsPrintf ("Could not read table %s from registry (%s)\n", - TableName, AcpiFormatException (Status)); - } -#endif - return (AE_OK); } diff -Nru acpica-unix-20140114/source/tools/acpiexec/aecommon.h acpica-unix-20140214/source/tools/acpiexec/aecommon.h --- acpica-unix-20140114/source/tools/acpiexec/aecommon.h 2014-01-14 22:02:04.000000000 +0000 +++ acpica-unix-20140214/source/tools/acpiexec/aecommon.h 2014-02-14 23:23:37.000000000 +0000 @@ -63,6 +63,8 @@ #include #include +#pragma pack(push) /* Set default struct packing */ + extern BOOLEAN AcpiGbl_IgnoreErrors; extern UINT8 AcpiGbl_RegionFillValue; extern UINT8 AcpiGbl_UseHwReducedFadt; @@ -196,4 +198,7 @@ UINT32 EventNumber, void *Context); + +#pragma pack(pop) /* Restore original struct packing */ + #endif /* _AECOMMON */ diff -Nru acpica-unix-20140114/source/tools/acpiexec/aeexec.c acpica-unix-20140214/source/tools/acpiexec/aeexec.c --- acpica-unix-20140114/source/tools/acpiexec/aeexec.c 2014-01-14 22:02:04.000000000 +0000 +++ acpica-unix-20140214/source/tools/acpiexec/aeexec.c 2014-02-14 23:23:37.000000000 +0000 @@ -287,7 +287,7 @@ PkgElements[3].Package.Count = 2; PkgElements[3].Package.Elements = Pkg2Elements; - /* Sub-package elements */ + /* Subpackage elements */ Pkg2Elements[0].Type = ACPI_TYPE_INTEGER; Pkg2Elements[0].Integer.Value = 0xAAAABBBB; diff -Nru acpica-unix-20140114/source/tools/acpiexec/aehandlers.c acpica-unix-20140214/source/tools/acpiexec/aehandlers.c --- acpica-unix-20140114/source/tools/acpiexec/aehandlers.c 2014-01-14 22:02:04.000000000 +0000 +++ acpica-unix-20140214/source/tools/acpiexec/aehandlers.c 2014-02-14 23:23:37.000000000 +0000 @@ -4,114 +4,42 @@ * *****************************************************************************/ -/****************************************************************************** - * - * 1. Copyright Notice - * - * Some or all of this work - Copyright (c) 1999 - 2014, Intel Corp. +/* + * Copyright (C) 2000 - 2014, Intel Corp. * All rights reserved. * - * 2. License - * - * 2.1. This is your license from Intel Corp. under its intellectual property - * rights. You may have additional license terms from the party that provided - * you this software, covering your right to use that party's intellectual - * property rights. - * - * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a - * copy of the source code appearing in this file ("Covered Code") an - * irrevocable, perpetual, worldwide license under Intel's copyrights in the - * base code distributed originally by Intel ("Original Intel Code") to copy, - * make derivatives, distribute, use and display any portion of the Covered - * Code in any form, with the right to sublicense such rights; and - * - * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent - * license (with the right to sublicense), under only those claims of Intel - * patents that are infringed by the Original Intel Code, to make, use, sell, - * offer to sell, and import the Covered Code and derivative works thereof - * solely to the minimum extent necessary to exercise the above copyright - * license, and in no event shall the patent license extend to any additions - * to or modifications of the Original Intel Code. No other license or right - * is granted directly or by implication, estoppel or otherwise; - * - * The above copyright and patent license is granted only if the following - * conditions are met: - * - * 3. Conditions - * - * 3.1. Redistribution of Source with Rights to Further Distribute Source. - * Redistribution of source code of any substantial portion of the Covered - * Code or modification with rights to further distribute source must include - * the above Copyright Notice, the above License, this list of Conditions, - * and the following Disclaimer and Export Compliance provision. In addition, - * Licensee must cause all Covered Code to which Licensee contributes to - * contain a file documenting the changes Licensee made to create that Covered - * Code and the date of any change. Licensee must include in that file the - * documentation of any changes made by any predecessor Licensee. Licensee - * must include a prominent statement that the modification is derived, - * directly or indirectly, from Original Intel Code. - * - * 3.2. Redistribution of Source with no Rights to Further Distribute Source. - * Redistribution of source code of any substantial portion of the Covered - * Code or modification without rights to further distribute source must - * include the following Disclaimer and Export Compliance provision in the - * documentation and/or other materials provided with distribution. In - * addition, Licensee may not authorize further sublicense of source of any - * portion of the Covered Code, and must include terms to the effect that the - * license from Licensee to its licensee is limited to the intellectual - * property embodied in the software Licensee provides to its licensee, and - * not to intellectual property embodied in modifications its licensee may - * make. - * - * 3.3. Redistribution of Executable. Redistribution in executable form of any - * substantial portion of the Covered Code or modification must reproduce the - * above Copyright Notice, and the following Disclaimer and Export Compliance - * provision in the documentation and/or other materials provided with the - * distribution. - * - * 3.4. Intel retains all right, title, and interest in and to the Original - * Intel Code. - * - * 3.5. Neither the name Intel nor any other trademark owned or controlled by - * Intel shall be used in advertising or otherwise to promote the sale, use or - * other dealings in products derived from or relating to the Covered Code - * without prior written authorization from Intel. - * - * 4. Disclaimer and Export Compliance - * - * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED - * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE - * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, - * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY - * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY - * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A - * PARTICULAR PURPOSE. - * - * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES - * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR - * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, - * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY - * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL - * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS - * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY - * LIMITED REMEDY. - * - * 4.3. Licensee shall not export, either directly or indirectly, any of this - * software or system incorporating such software without first obtaining any - * required license or other approval from the U. S. Department of Commerce or - * any other agency or department of the United States Government. In the - * event Licensee exports any such software from the United States or - * re-exports any such software from a foreign destination, Licensee shall - * ensure that the distribution and export/re-export of the software is in - * compliance with all laws, regulations, orders, or other restrictions of the - * U.S. Export Administration Regulations. Licensee agrees that neither it nor - * any of its subsidiaries will export/re-export any technical data, process, - * software, or service, directly or indirectly, to any country for which the - * United States government or any agency thereof requires an export license, - * other governmental approval, or letter of assurance, without first obtaining - * such license, approval or letter. - * - *****************************************************************************/ + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions, and the following disclaimer, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * substantially similar to the "NO WARRANTY" disclaimer below + * ("Disclaimer") and any redistribution must be conditioned upon + * including a substantially similar Disclaimer requirement for further + * binary redistribution. + * 3. Neither the names of the above-listed copyright holders nor the names + * of any contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * Alternatively, this software may be distributed under the terms of the + * GNU General Public License ("GPL") version 2 as published by the Free + * Software Foundation. + * + * NO WARRANTY + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING + * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGES. + */ #include "aecommon.h" @@ -1579,7 +1507,7 @@ BufferResize = TRUE; } - else if ((BaseAddressEnd >= RegionAddress) && + else if ((BaseAddressEnd >= RegionAddress) && (BaseAddressEnd <= RegionAddressEnd) && (BaseAddress < RegionAddress)) { diff -Nru acpica-unix-20140114/source/tools/acpiexec/aemain.c acpica-unix-20140214/source/tools/acpiexec/aemain.c --- acpica-unix-20140114/source/tools/acpiexec/aemain.c 2014-01-14 22:02:04.000000000 +0000 +++ acpica-unix-20140214/source/tools/acpiexec/aemain.c 2014-02-14 23:23:38.000000000 +0000 @@ -126,13 +126,13 @@ ACPI_OPTION ("-di", "Disable execution of STA/INI methods during init"); ACPI_OPTION ("-do", "Disable Operation Region address simulation"); ACPI_OPTION ("-dr", "Disable repair of method return values"); + ACPI_OPTION ("-ds", "Disable method auto-serialization"); ACPI_OPTION ("-dt", "Disable allocation tracking (performance)"); printf ("\n"); ACPI_OPTION ("-ef", "Enable display of final memory statistics"); ACPI_OPTION ("-ei", "Enable additional tests for ACPICA interfaces"); ACPI_OPTION ("-el", "Enable loading of additional test tables"); - ACPI_OPTION ("-em", "Enable Interpreter Serialized Mode"); ACPI_OPTION ("-es", "Enable Interpreter Slack Mode"); ACPI_OPTION ("-et", "Enable debug semaphore timeout"); printf ("\n"); @@ -204,6 +204,11 @@ AcpiGbl_DisableAutoRepair = TRUE; break; + case 's': + + AcpiGbl_AutoSerializeMethods = FALSE; + break; + case 't': #ifdef ACPI_DBG_TRACK_ALLOCATIONS @@ -239,12 +244,6 @@ AcpiGbl_LoadTestTables = TRUE; break; - case 'm': - - AcpiGbl_AllMethodsSerialized = TRUE; - printf ("Enabling AML Interpreter serialized mode\n"); - break; - case 's': AcpiGbl_EnableInterpreterSlack = TRUE; diff -Nru acpica-unix-20140114/tests/aapits/Makefile acpica-unix-20140214/tests/aapits/Makefile --- acpica-unix-20140114/tests/aapits/Makefile 2014-01-14 22:02:45.000000000 +0000 +++ acpica-unix-20140214/tests/aapits/Makefile 2014-02-14 23:24:02.000000000 +0000 @@ -20,37 +20,53 @@ ../../source/components/hardware/hwxface.c \ ../../source/common/getopt.c \ ../../source/components/debugger/dbcmds.c \ + ../../source/components/debugger/dbconvert.c \ ../../source/components/debugger/dbdisply.c \ ../../source/components/debugger/dbexec.c \ ../../source/components/debugger/dbfileio.c \ ../../source/components/debugger/dbhistry.c \ ../../source/components/debugger/dbinput.c \ + ../../source/components/debugger/dbmethod.c \ + ../../source/components/debugger/dbnames.c \ ../../source/components/debugger/dbstats.c \ + ../../source/components/debugger/dbtest.c \ ../../source/components/debugger/dbutils.c \ ../../source/components/debugger/dbxface.c \ ../../source/components/disassembler/dmbuffer.c \ + ../../source/components/disassembler/dmdeferred.c \ ../../source/components/disassembler/dmnames.c \ ../../source/components/disassembler/dmobject.c \ ../../source/components/disassembler/dmopcode.c \ ../../source/components/disassembler/dmresrc.c \ ../../source/components/disassembler/dmresrcl.c \ + ../../source/components/disassembler/dmresrcl2.c \ ../../source/components/disassembler/dmresrcs.c \ ../../source/components/disassembler/dmutils.c \ ../../source/components/disassembler/dmwalk.c \ ../../source/components/events/evevent.c \ - ../../source/components/events/evgpeblk.c \ ../../source/components/events/evgpe.c \ + ../../source/components/events/evgpeblk.c \ + ../../source/components/events/evgpeinit.c \ + ../../source/components/events/evgpeutil.c \ + ../../source/components/events/evglock.c \ + ../../source/components/events/evhandler.c \ ../../source/components/events/evmisc.c \ ../../source/components/events/evregion.c \ ../../source/components/events/evrgnini.c \ ../../source/components/events/evsci.c \ ../../source/components/events/evxface.c \ ../../source/components/events/evxfevnt.c \ + ../../source/components/events/evxfgpe.c \ ../../source/components/events/evxfregn.c \ ../../source/components/hardware/hwacpi.c \ + ../../source/components/hardware/hwesleep.c \ ../../source/components/hardware/hwgpe.c \ + ../../source/components/hardware/hwpci.c \ ../../source/components/hardware/hwregs.c \ ../../source/components/hardware/hwsleep.c \ + ../../source/components/hardware/hwxfsleep.c \ + ../../source/components/dispatcher/dsargs.c \ + ../../source/components/dispatcher/dscontrol.c \ ../../source/components/dispatcher/dsfield.c \ ../../source/components/dispatcher/dsinit.c \ ../../source/components/dispatcher/dsmethod.c \ @@ -60,6 +76,7 @@ ../../source/components/dispatcher/dsutils.c \ ../../source/components/dispatcher/dswexec.c \ ../../source/components/dispatcher/dswload.c \ + ../../source/components/dispatcher/dswload2.c \ ../../source/components/dispatcher/dswscope.c \ ../../source/components/dispatcher/dswstate.c \ ../../source/components/executer/exconfig.c \ @@ -68,6 +85,7 @@ ../../source/components/executer/exdump.c \ ../../source/components/executer/exfield.c \ ../../source/components/executer/exfldio.c \ + ../../source/components/executer/exdebug.c \ ../../source/components/executer/exmisc.c \ ../../source/components/executer/exmutex.c \ ../../source/components/executer/exnames.c \ @@ -87,7 +105,9 @@ ../../source/components/executer/exutils.c \ ../../source/components/parser/psargs.c \ ../../source/components/parser/psloop.c \ + ../../source/components/parser/psobject.c \ ../../source/components/parser/psopcode.c \ + ../../source/components/parser/psopinfo.c \ ../../source/components/parser/psparse.c \ ../../source/components/parser/psscope.c \ ../../source/components/parser/pstree.c \ @@ -96,6 +116,8 @@ ../../source/components/parser/psxface.c \ ../../source/components/namespace/nsaccess.c \ ../../source/components/namespace/nsalloc.c \ + ../../source/components/namespace/nsarguments.c \ + ../../source/components/namespace/nsconvert.c \ ../../source/components/namespace/nsdump.c \ ../../source/components/namespace/nsdumpdv.c \ ../../source/components/namespace/nseval.c \ @@ -105,6 +127,7 @@ ../../source/components/namespace/nsobject.c \ ../../source/components/namespace/nsparse.c \ ../../source/components/namespace/nspredef.c \ + ../../source/components/namespace/nsprepkg.c \ ../../source/components/namespace/nsrepair.c \ ../../source/components/namespace/nsrepair2.c \ ../../source/components/namespace/nssearch.c \ @@ -117,26 +140,35 @@ ../../source/components/resources/rscalc.c \ ../../source/components/resources/rscreate.c \ ../../source/components/resources/rsdump.c \ + ../../source/components/resources/rsdumpinfo.c \ ../../source/components/resources/rsio.c \ ../../source/components/resources/rsirq.c \ ../../source/components/resources/rslist.c \ ../../source/components/resources/rsmemory.c \ ../../source/components/resources/rsmisc.c \ + ../../source/components/resources/rsserial.c \ ../../source/components/resources/rsutils.c \ ../../source/components/resources/rsxface.c \ ../../source/components/resources/rsinfo.c \ ../../source/components/tables/tbfadt.c \ ../../source/components/tables/tbfind.c \ ../../source/components/tables/tbinstal.c \ + ../../source/components/tables/tbprint.c \ ../../source/components/tables/tbutils.c \ ../../source/components/tables/tbxface.c \ + ../../source/components/tables/tbxfload.c \ ../../source/components/tables/tbxfroot.c \ + ../../source/components/utilities/utaddress.c \ ../../source/components/utilities/utalloc.c \ + ../../source/components/utilities/utbuffer.c \ ../../source/components/utilities/utcache.c \ ../../source/components/utilities/utcopy.c \ ../../source/components/utilities/utdebug.c \ + ../../source/components/utilities/utdecode.c \ ../../source/components/utilities/utdelete.c \ + ../../source/components/utilities/uterror.c \ ../../source/components/utilities/uteval.c \ + ../../source/components/utilities/utexcep.c \ ../../source/components/utilities/utglobal.c \ ../../source/components/utilities/utids.c \ ../../source/components/utilities/utinit.c \ @@ -145,10 +177,16 @@ ../../source/components/utilities/utmisc.c \ ../../source/components/utilities/utmutex.c \ ../../source/components/utilities/utobject.c \ + ../../source/components/utilities/utosi.c \ + ../../source/components/utilities/utownerid.c \ + ../../source/components/utilities/utpredef.c \ ../../source/components/utilities/utresrc.c \ ../../source/components/utilities/utstate.c \ + ../../source/components/utilities/utstring.c \ ../../source/components/utilities/uttrack.c \ - ../../source/components/utilities/utxface.c + ../../source/components/utilities/utxface.c \ + ../../source/components/utilities/utxferror.c \ + ../../source/components/utilities/utxfinit.c # ../../source/components/osunixxf.c diff -Nru acpica-unix-20140114/tests/aapits/osunixxf.c acpica-unix-20140214/tests/aapits/osunixxf.c --- acpica-unix-20140114/tests/aapits/osunixxf.c 2014-01-14 22:02:45.000000000 +0000 +++ acpica-unix-20140214/tests/aapits/osunixxf.c 2014-02-14 23:24:02.000000000 +0000 @@ -384,7 +384,6 @@ const char *Fmt, va_list Args) { - INT32 Count = 0; UINT8 Flags; @@ -397,7 +396,7 @@ { /* Output file is open, send the output there */ - Count = vfprintf (AcpiGbl_DebugFile, Fmt, Args); + vfprintf (AcpiGbl_DebugFile, Fmt, Args); } else { @@ -409,7 +408,7 @@ if (Flags & ACPI_DB_CONSOLE_OUTPUT) { - Count = vfprintf (AcpiGbl_OutputFile, Fmt, Args); + vfprintf (AcpiGbl_OutputFile, Fmt, Args); } return; @@ -1166,3 +1165,24 @@ return (AE_OK); } + + +/****************************************************************************** + * + * FUNCTION: AcpiOsWaitEventsComplete + * + * PARAMETERS: None + * + * RETURN: None + * + * DESCRIPTION: Wait for all asynchronous events to complete. This + * implementation does nothing. + * + *****************************************************************************/ + +void +AcpiOsWaitEventsComplete ( + void) +{ + return; +}