Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Nov 2009 21:47:12 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r199337 - in head: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/debugger sys/contrib/dev/acpica/dispatcher sys/contrib/dev/acpica/events sys/co...
Message-ID:  <200911162147.nAGLlCRV082494@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Mon Nov 16 21:47:12 2009
New Revision: 199337
URL: http://svn.freebsd.org/changeset/base/199337

Log:
  Merge ACPICA 20091112.

Added:
  head/sys/contrib/dev/acpica/namespace/nsrepair2.c
     - copied, changed from r199336, vendor-sys/acpica/dist/namespace/nsrepair2.c
Modified:
  head/sys/conf/files
  head/sys/contrib/dev/acpica/changes.txt
  head/sys/contrib/dev/acpica/compiler/aslcompile.c
  head/sys/contrib/dev/acpica/compiler/aslerror.c
  head/sys/contrib/dev/acpica/compiler/asllookup.c
  head/sys/contrib/dev/acpica/compiler/asloperands.c
  head/sys/contrib/dev/acpica/compiler/asltransform.c
  head/sys/contrib/dev/acpica/compiler/asltypes.h
  head/sys/contrib/dev/acpica/debugger/dbcmds.c
  head/sys/contrib/dev/acpica/debugger/dbexec.c
  head/sys/contrib/dev/acpica/debugger/dbstats.c
  head/sys/contrib/dev/acpica/dispatcher/dsinit.c
  head/sys/contrib/dev/acpica/dispatcher/dsmthdat.c
  head/sys/contrib/dev/acpica/dispatcher/dsobject.c
  head/sys/contrib/dev/acpica/events/evgpeblk.c
  head/sys/contrib/dev/acpica/events/evregion.c
  head/sys/contrib/dev/acpica/executer/exconfig.c
  head/sys/contrib/dev/acpica/executer/exconvrt.c
  head/sys/contrib/dev/acpica/executer/exfield.c
  head/sys/contrib/dev/acpica/executer/exoparg1.c
  head/sys/contrib/dev/acpica/executer/exoparg6.c
  head/sys/contrib/dev/acpica/executer/exregion.c
  head/sys/contrib/dev/acpica/include/acconfig.h
  head/sys/contrib/dev/acpica/include/acmacros.h
  head/sys/contrib/dev/acpica/include/acnamesp.h
  head/sys/contrib/dev/acpica/include/acpixf.h
  head/sys/contrib/dev/acpica/include/acutils.h
  head/sys/contrib/dev/acpica/namespace/nsdump.c
  head/sys/contrib/dev/acpica/namespace/nsdumpdv.c
  head/sys/contrib/dev/acpica/namespace/nseval.c
  head/sys/contrib/dev/acpica/namespace/nsinit.c
  head/sys/contrib/dev/acpica/namespace/nspredef.c
  head/sys/contrib/dev/acpica/namespace/nsrepair.c
  head/sys/contrib/dev/acpica/namespace/nswalk.c
  head/sys/contrib/dev/acpica/namespace/nsxfeval.c
  head/sys/contrib/dev/acpica/parser/psloop.c
  head/sys/contrib/dev/acpica/parser/psparse.c
  head/sys/contrib/dev/acpica/parser/psxface.c
  head/sys/contrib/dev/acpica/utilities/utmisc.c
  head/sys/contrib/dev/acpica/utilities/utobject.c
  head/sys/dev/acpica/acpi.c
  head/sys/dev/acpica/acpi_dock.c
  head/sys/dev/acpica/acpi_pci.c
  head/sys/dev/acpica/acpi_video.c
  head/usr.sbin/acpi/acpidb/Makefile
Directory Properties:
  head/sys/contrib/dev/acpica/   (props changed)

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/conf/files	Mon Nov 16 21:47:12 2009	(r199337)
@@ -171,107 +171,108 @@ contrib/dev/acpica/dispatcher/dswexec.c	
 contrib/dev/acpica/dispatcher/dswload.c		optional acpi
 contrib/dev/acpica/dispatcher/dswscope.c	optional acpi
 contrib/dev/acpica/dispatcher/dswstate.c	optional acpi
-contrib/dev/acpica/events/evevent.c	optional acpi
-contrib/dev/acpica/events/evgpe.c	optional acpi
-contrib/dev/acpica/events/evgpeblk.c	optional acpi
-contrib/dev/acpica/events/evmisc.c	optional acpi
-contrib/dev/acpica/events/evregion.c	optional acpi
-contrib/dev/acpica/events/evrgnini.c	optional acpi
-contrib/dev/acpica/events/evsci.c	optional acpi
-contrib/dev/acpica/events/evxface.c	optional acpi
-contrib/dev/acpica/events/evxfevnt.c	optional acpi
-contrib/dev/acpica/events/evxfregn.c	optional acpi
-contrib/dev/acpica/executer/exconfig.c	optional acpi
-contrib/dev/acpica/executer/exconvrt.c	optional acpi
-contrib/dev/acpica/executer/excreate.c	optional acpi
-contrib/dev/acpica/executer/exdump.c	optional acpi
-contrib/dev/acpica/executer/exfield.c	optional acpi
-contrib/dev/acpica/executer/exfldio.c	optional acpi
-contrib/dev/acpica/executer/exmisc.c	optional acpi
-contrib/dev/acpica/executer/exmutex.c	optional acpi
-contrib/dev/acpica/executer/exnames.c	optional acpi
-contrib/dev/acpica/executer/exoparg1.c	optional acpi
-contrib/dev/acpica/executer/exoparg2.c	optional acpi
-contrib/dev/acpica/executer/exoparg3.c	optional acpi
-contrib/dev/acpica/executer/exoparg6.c	optional acpi
-contrib/dev/acpica/executer/exprep.c	optional acpi
-contrib/dev/acpica/executer/exregion.c	optional acpi
-contrib/dev/acpica/executer/exresnte.c	optional acpi
-contrib/dev/acpica/executer/exresolv.c	optional acpi
-contrib/dev/acpica/executer/exresop.c	optional acpi
-contrib/dev/acpica/executer/exstore.c	optional acpi
-contrib/dev/acpica/executer/exstoren.c	optional acpi
-contrib/dev/acpica/executer/exstorob.c	optional acpi
-contrib/dev/acpica/executer/exsystem.c	optional acpi
-contrib/dev/acpica/executer/exutils.c	optional acpi
-contrib/dev/acpica/hardware/hwacpi.c	optional acpi
-contrib/dev/acpica/hardware/hwgpe.c	optional acpi
-contrib/dev/acpica/hardware/hwregs.c	optional acpi
-contrib/dev/acpica/hardware/hwsleep.c	optional acpi
-contrib/dev/acpica/hardware/hwtimer.c	optional acpi
-contrib/dev/acpica/hardware/hwvalid.c	optional acpi
-contrib/dev/acpica/hardware/hwxface.c	optional acpi
-contrib/dev/acpica/namespace/nsaccess.c	optional acpi
-contrib/dev/acpica/namespace/nsalloc.c	optional acpi
-contrib/dev/acpica/namespace/nsdump.c	optional acpi
-contrib/dev/acpica/namespace/nseval.c	optional acpi
-contrib/dev/acpica/namespace/nsinit.c	optional acpi
-contrib/dev/acpica/namespace/nsload.c	optional acpi
-contrib/dev/acpica/namespace/nsnames.c	optional acpi
-contrib/dev/acpica/namespace/nsobject.c	optional acpi
-contrib/dev/acpica/namespace/nsparse.c	optional acpi
-contrib/dev/acpica/namespace/nspredef.c	optional acpi
-contrib/dev/acpica/namespace/nsrepair.c	optional acpi
-contrib/dev/acpica/namespace/nssearch.c	optional acpi
-contrib/dev/acpica/namespace/nsutils.c	optional acpi
-contrib/dev/acpica/namespace/nswalk.c	optional acpi
-contrib/dev/acpica/namespace/nsxfeval.c	optional acpi
-contrib/dev/acpica/namespace/nsxfname.c	optional acpi
-contrib/dev/acpica/namespace/nsxfobj.c	optional acpi
-contrib/dev/acpica/parser/psargs.c	optional acpi
-contrib/dev/acpica/parser/psloop.c	optional acpi
-contrib/dev/acpica/parser/psopcode.c	optional acpi
-contrib/dev/acpica/parser/psparse.c	optional acpi
-contrib/dev/acpica/parser/psscope.c	optional acpi
-contrib/dev/acpica/parser/pstree.c	optional acpi
-contrib/dev/acpica/parser/psutils.c	optional acpi
-contrib/dev/acpica/parser/pswalk.c	optional acpi
-contrib/dev/acpica/parser/psxface.c	optional acpi
-contrib/dev/acpica/resources/rsaddr.c	optional acpi
-contrib/dev/acpica/resources/rscalc.c	optional acpi
-contrib/dev/acpica/resources/rscreate.c	optional acpi
-contrib/dev/acpica/resources/rsdump.c	optional acpi
-contrib/dev/acpica/resources/rsinfo.c	optional acpi
-contrib/dev/acpica/resources/rsio.c	optional acpi
-contrib/dev/acpica/resources/rsirq.c	optional acpi
-contrib/dev/acpica/resources/rslist.c	optional acpi
-contrib/dev/acpica/resources/rsmemory.c	optional acpi
-contrib/dev/acpica/resources/rsmisc.c	optional acpi
-contrib/dev/acpica/resources/rsutils.c	optional acpi
-contrib/dev/acpica/resources/rsxface.c	optional acpi
-contrib/dev/acpica/tables/tbfadt.c	optional acpi
-contrib/dev/acpica/tables/tbfind.c	optional acpi
-contrib/dev/acpica/tables/tbinstal.c	optional acpi
-contrib/dev/acpica/tables/tbutils.c	optional acpi
-contrib/dev/acpica/tables/tbxface.c	optional acpi
-contrib/dev/acpica/tables/tbxfroot.c	optional acpi
-contrib/dev/acpica/utilities/utalloc.c	optional acpi
-contrib/dev/acpica/utilities/utcache.c	optional acpi
-contrib/dev/acpica/utilities/utcopy.c	optional acpi
-contrib/dev/acpica/utilities/utdebug.c	optional acpi
-contrib/dev/acpica/utilities/utdelete.c	optional acpi
-contrib/dev/acpica/utilities/uteval.c	optional acpi
-contrib/dev/acpica/utilities/utglobal.c	optional acpi
-contrib/dev/acpica/utilities/utids.c	optional acpi
-contrib/dev/acpica/utilities/utinit.c	optional acpi
-contrib/dev/acpica/utilities/utlock.c	optional acpi
-contrib/dev/acpica/utilities/utmath.c	optional acpi
-contrib/dev/acpica/utilities/utmisc.c	optional acpi
-contrib/dev/acpica/utilities/utmutex.c	optional acpi
-contrib/dev/acpica/utilities/utobject.c	optional acpi
-contrib/dev/acpica/utilities/utresrc.c	optional acpi
-contrib/dev/acpica/utilities/utstate.c	optional acpi
-contrib/dev/acpica/utilities/utxface.c	optional acpi
+contrib/dev/acpica/events/evevent.c		optional acpi
+contrib/dev/acpica/events/evgpe.c		optional acpi
+contrib/dev/acpica/events/evgpeblk.c		optional acpi
+contrib/dev/acpica/events/evmisc.c		optional acpi
+contrib/dev/acpica/events/evregion.c		optional acpi
+contrib/dev/acpica/events/evrgnini.c		optional acpi
+contrib/dev/acpica/events/evsci.c		optional acpi
+contrib/dev/acpica/events/evxface.c		optional acpi
+contrib/dev/acpica/events/evxfevnt.c		optional acpi
+contrib/dev/acpica/events/evxfregn.c		optional acpi
+contrib/dev/acpica/executer/exconfig.c		optional acpi
+contrib/dev/acpica/executer/exconvrt.c		optional acpi
+contrib/dev/acpica/executer/excreate.c		optional acpi
+contrib/dev/acpica/executer/exdump.c		optional acpi
+contrib/dev/acpica/executer/exfield.c		optional acpi
+contrib/dev/acpica/executer/exfldio.c		optional acpi
+contrib/dev/acpica/executer/exmisc.c		optional acpi
+contrib/dev/acpica/executer/exmutex.c		optional acpi
+contrib/dev/acpica/executer/exnames.c		optional acpi
+contrib/dev/acpica/executer/exoparg1.c		optional acpi
+contrib/dev/acpica/executer/exoparg2.c		optional acpi
+contrib/dev/acpica/executer/exoparg3.c		optional acpi
+contrib/dev/acpica/executer/exoparg6.c		optional acpi
+contrib/dev/acpica/executer/exprep.c		optional acpi
+contrib/dev/acpica/executer/exregion.c		optional acpi
+contrib/dev/acpica/executer/exresnte.c		optional acpi
+contrib/dev/acpica/executer/exresolv.c		optional acpi
+contrib/dev/acpica/executer/exresop.c		optional acpi
+contrib/dev/acpica/executer/exstore.c		optional acpi
+contrib/dev/acpica/executer/exstoren.c		optional acpi
+contrib/dev/acpica/executer/exstorob.c		optional acpi
+contrib/dev/acpica/executer/exsystem.c		optional acpi
+contrib/dev/acpica/executer/exutils.c		optional acpi
+contrib/dev/acpica/hardware/hwacpi.c		optional acpi
+contrib/dev/acpica/hardware/hwgpe.c		optional acpi
+contrib/dev/acpica/hardware/hwregs.c		optional acpi
+contrib/dev/acpica/hardware/hwsleep.c		optional acpi
+contrib/dev/acpica/hardware/hwtimer.c		optional acpi
+contrib/dev/acpica/hardware/hwvalid.c		optional acpi
+contrib/dev/acpica/hardware/hwxface.c		optional acpi
+contrib/dev/acpica/namespace/nsaccess.c		optional acpi
+contrib/dev/acpica/namespace/nsalloc.c		optional acpi
+contrib/dev/acpica/namespace/nsdump.c		optional acpi
+contrib/dev/acpica/namespace/nseval.c		optional acpi
+contrib/dev/acpica/namespace/nsinit.c		optional acpi
+contrib/dev/acpica/namespace/nsload.c		optional acpi
+contrib/dev/acpica/namespace/nsnames.c		optional acpi
+contrib/dev/acpica/namespace/nsobject.c		optional acpi
+contrib/dev/acpica/namespace/nsparse.c		optional acpi
+contrib/dev/acpica/namespace/nspredef.c		optional acpi
+contrib/dev/acpica/namespace/nsrepair.c		optional acpi
+contrib/dev/acpica/namespace/nsrepair2.c	optional acpi
+contrib/dev/acpica/namespace/nssearch.c		optional acpi
+contrib/dev/acpica/namespace/nsutils.c		optional acpi
+contrib/dev/acpica/namespace/nswalk.c		optional acpi
+contrib/dev/acpica/namespace/nsxfeval.c		optional acpi
+contrib/dev/acpica/namespace/nsxfname.c		optional acpi
+contrib/dev/acpica/namespace/nsxfobj.c		optional acpi
+contrib/dev/acpica/parser/psargs.c		optional acpi
+contrib/dev/acpica/parser/psloop.c		optional acpi
+contrib/dev/acpica/parser/psopcode.c		optional acpi
+contrib/dev/acpica/parser/psparse.c		optional acpi
+contrib/dev/acpica/parser/psscope.c		optional acpi
+contrib/dev/acpica/parser/pstree.c		optional acpi
+contrib/dev/acpica/parser/psutils.c		optional acpi
+contrib/dev/acpica/parser/pswalk.c		optional acpi
+contrib/dev/acpica/parser/psxface.c		optional acpi
+contrib/dev/acpica/resources/rsaddr.c		optional acpi
+contrib/dev/acpica/resources/rscalc.c		optional acpi
+contrib/dev/acpica/resources/rscreate.c		optional acpi
+contrib/dev/acpica/resources/rsdump.c		optional acpi
+contrib/dev/acpica/resources/rsinfo.c		optional acpi
+contrib/dev/acpica/resources/rsio.c		optional acpi
+contrib/dev/acpica/resources/rsirq.c		optional acpi
+contrib/dev/acpica/resources/rslist.c		optional acpi
+contrib/dev/acpica/resources/rsmemory.c		optional acpi
+contrib/dev/acpica/resources/rsmisc.c		optional acpi
+contrib/dev/acpica/resources/rsutils.c		optional acpi
+contrib/dev/acpica/resources/rsxface.c		optional acpi
+contrib/dev/acpica/tables/tbfadt.c		optional acpi
+contrib/dev/acpica/tables/tbfind.c		optional acpi
+contrib/dev/acpica/tables/tbinstal.c		optional acpi
+contrib/dev/acpica/tables/tbutils.c		optional acpi
+contrib/dev/acpica/tables/tbxface.c		optional acpi
+contrib/dev/acpica/tables/tbxfroot.c		optional acpi
+contrib/dev/acpica/utilities/utalloc.c		optional acpi
+contrib/dev/acpica/utilities/utcache.c		optional acpi
+contrib/dev/acpica/utilities/utcopy.c		optional acpi
+contrib/dev/acpica/utilities/utdebug.c		optional acpi
+contrib/dev/acpica/utilities/utdelete.c		optional acpi
+contrib/dev/acpica/utilities/uteval.c		optional acpi
+contrib/dev/acpica/utilities/utglobal.c		optional acpi
+contrib/dev/acpica/utilities/utids.c		optional acpi
+contrib/dev/acpica/utilities/utinit.c		optional acpi
+contrib/dev/acpica/utilities/utlock.c		optional acpi
+contrib/dev/acpica/utilities/utmath.c		optional acpi
+contrib/dev/acpica/utilities/utmisc.c		optional acpi
+contrib/dev/acpica/utilities/utmutex.c		optional acpi
+contrib/dev/acpica/utilities/utobject.c		optional acpi
+contrib/dev/acpica/utilities/utresrc.c		optional acpi
+contrib/dev/acpica/utilities/utstate.c		optional acpi
+contrib/dev/acpica/utilities/utxface.c		optional acpi
 contrib/ipfilter/netinet/fil.c	optional ipfilter inet \
 	compile-with "${NORMAL_C} -I$S/contrib/ipfilter"
 contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet \

Modified: head/sys/contrib/dev/acpica/changes.txt
==============================================================================
--- head/sys/contrib/dev/acpica/changes.txt	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/changes.txt	Mon Nov 16 21:47:12 2009	(r199337)
@@ -1,4 +1,77 @@
 ----------------------------------------
+12 November 2009. Summary of changes for version 20091112:
+
+This release is available at www.acpica.org/downloads
+
+1) ACPI CA Core Subsystem:
+
+Implemented a post-order callback to AcpiWalkNamespace. The existing 
+interface only has a pre-order callback. This change adds an additional 
+parameter for a post-order callback which will be more useful for bus scans. 
+ACPICA BZ 779. Lin Ming. Updated the ACPICA Programmer Reference.
+
+Modified the behavior of the operation region memory mapping cache for 
+SystemMemory. Ensure that the memory mappings created for operation regions 
+do not cross 4K page boundaries. Crossing a page boundary while mapping 
+regions can cause kernel warnings on some hosts if the pages have different 
+attributes. Such regions are probably BIOS bugs, and this is the workaround. 
+Linux BZ 14445. Lin Ming.
+
+Implemented an automatic repair for predefined methods that must return 
+sorted lists. This change will repair (by sorting) packages returned by _ALR, 
+_PSS, and _TSS. Drivers can now assume that the packages are correctly sorted 
+and do not contain NULL package elements. Adds one new file, 
+namespace/nsrepair2.c. ACPICA BZ 784. Lin Ming, Bob Moore.
+
+Fixed a possible fault during predefined name validation if a return Package 
+object contains NULL elements. Also adds a warning if a NULL element is 
+followed by any non-null elements. ACPICA BZ 813, 814. Future enhancement may 
+include repair or removal of all such NULL elements where possible.
+
+Implemented additional module-level executable AML code support. This change 
+will execute module-level code that is not at the root of the namespace 
+(under a Device object, etc.) at table load time. Module-level executable AML 
+code has been illegal since ACPI 2.0. ACPICA BZ 762. Lin Ming.
+
+Implemented a new internal function to create Integer objects. This function 
+simplifies miscellaneous object creation code. ACPICA BZ 823.
+
+Reduced the severity of predefined repair messages, Warning to Info. Since 
+the object was successfully repaired, a warning is too severe. Reduced to an 
+info message for now. These messages may eventually be changed to debug-only. 
+ACPICA BZ 812.
+
+Example Code and Data Size: These are the sizes for the OS-independent 
+acpica.lib produced by the Microsoft Visual C++ 6.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.
+
+  Previous Release:
+    Non-Debug Version:  85.8K Code, 18.0K Data, 103.8K Total
+    Debug Version:     161.8K Code, 50.6K Data, 212.4K Total
+  Current Release:
+    Non-Debug Version:  86.6K Code, 18.2K Data, 104.8K Total
+    Debug Version:     162.7K Code, 50.8K Data, 213.5K Total
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL: Implemented Switch() with While(1) so that Break works correctly. This 
+change correctly implements the Switch operator with a surrounding While(1) 
+so that the Break operator works as expected. ACPICA BZ 461. Lin Ming.
+
+iASL: Added a message if a package initializer list is shorter than package 
+length. Adds a new remark for a Package() declaration if an initializer list 
+exists, but is shorter than the declared length of the package. Although 
+technically legal, this is probably a coding error and it is seen in the 
+field. ACPICA BZ 815. Lin Ming, Bob Moore.
+
+iASL: Fixed a problem where the compiler could fault after the maximum number 
+of errors was reached (200).
+
+acpixtract: Fixed a possible warning for pointer cast if the compiler warning 
+level set very high.
+
+----------------------------------------
 13 October 2009. Summary of changes for version 20091013:
 
 This release is available at www.acpica.org/downloads

Modified: head/sys/contrib/dev/acpica/compiler/aslcompile.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/aslcompile.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/compiler/aslcompile.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -895,13 +895,6 @@ CmCleanupAndExit (
                         10) / Gbl_NsLookupCount);
     }
 
-    /* Close all open files */
-
-    for (i = 2; i < ASL_MAX_FILE_TYPE; i++)
-    {
-        FlCloseFile (i);
-    }
-
     /*
      * TBD: SourceOutput should be .TMP, then rename if we want to keep it?
      */
@@ -923,6 +916,13 @@ CmCleanupAndExit (
     }
 
     UtDisplaySummary (ASL_FILE_STDOUT);
+
+    /* Close all open files */
+
+    for (i = 2; i < ASL_MAX_FILE_TYPE; i++)
+    {
+        FlCloseFile (i);
+    }
 }
 
 

Modified: head/sys/contrib/dev/acpica/compiler/aslerror.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/aslerror.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/compiler/aslerror.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -535,6 +535,7 @@ AslCommonError (
         Gbl_NextError = Gbl_ErrorLog;
         CmDoOutputFiles ();
         CmCleanupAndExit ();
+        exit(1);
     }
 
     return;

Modified: head/sys/contrib/dev/acpica/compiler/asllookup.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/asllookup.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/compiler/asllookup.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -526,7 +526,7 @@ LsDisplayNamespace (
     /* Walk entire namespace from the root */
 
     Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
-                ACPI_UINT32_MAX, FALSE, LsDoOneNamespaceObject,
+                ACPI_UINT32_MAX, FALSE, LsDoOneNamespaceObject, NULL,
                 NULL, NULL);
 
     /* Print the full pathname for each namespace node */
@@ -534,7 +534,7 @@ LsDisplayNamespace (
     FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "\nNamespace pathnames\n\n");
 
     Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
-                ACPI_UINT32_MAX, FALSE, LsDoOnePathname,
+                ACPI_UINT32_MAX, FALSE, LsDoOnePathname, NULL,
                 NULL, NULL);
 
     return (Status);
@@ -598,7 +598,7 @@ LkObjectExists (
     /* Walk entire namespace from the supplied root */
 
     Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
-                ACPI_UINT32_MAX, FALSE, LsCompareOneNamespaceObject,
+                ACPI_UINT32_MAX, FALSE, LsCompareOneNamespaceObject, NULL,
                 Name, NULL);
     if (Status == AE_CTRL_TRUE)
     {
@@ -753,7 +753,7 @@ LkFindUnreferencedObjects (
     /* Walk entire namespace from the supplied root */
 
     (void) AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
-                ACPI_UINT32_MAX, FALSE, LkIsObjectUsed,
+                ACPI_UINT32_MAX, FALSE, LkIsObjectUsed, NULL,
                 NULL, NULL);
 }
 

Modified: head/sys/contrib/dev/acpica/compiler/asloperands.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/asloperands.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/compiler/asloperands.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -788,20 +788,30 @@ OpnDoPackage (
     if ((PackageLengthOp->Asl.ParseOpcode == PARSEOP_INTEGER)      ||
         (PackageLengthOp->Asl.ParseOpcode == PARSEOP_QWORDCONST))
     {
-        if (PackageLengthOp->Asl.Value.Integer >= PackageLength)
+        if (PackageLengthOp->Asl.Value.Integer > PackageLength)
         {
-            /* Allow package to be longer than the initializer list */
+            /*
+             * Allow package length to be longer than the initializer
+             * list -- but if the length of initializer list is nonzero,
+             * issue a message since this is probably a coding error,
+             * even though technically legal.
+             */
+            if (PackageLength > 0)
+            {
+                AslError (ASL_REMARK, ASL_MSG_LIST_LENGTH_SHORT,
+                    PackageLengthOp, NULL);
+            }
 
             PackageLength = (UINT32) PackageLengthOp->Asl.Value.Integer;
         }
-        else
+        else if (PackageLengthOp->Asl.Value.Integer < PackageLength)
         {
             /*
-             * Initializer list is longer than the package length. This
-             * is an error as per the ACPI spec.
+             * The package length is smaller than the length of the
+             * initializer list. This is an error as per the ACPI spec.
              */
-            AslError (ASL_ERROR, ASL_MSG_LIST_LENGTH,
-                PackageLengthOp->Asl.Next, NULL);
+            AslError (ASL_ERROR, ASL_MSG_LIST_LENGTH_LONG,
+                PackageLengthOp, NULL);
         }
     }
 

Modified: head/sys/contrib/dev/acpica/compiler/asltransform.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/asltransform.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/compiler/asltransform.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -468,6 +468,8 @@ TrDoSwitch (
     ACPI_PARSE_OBJECT       *NewOp;
     ACPI_PARSE_OBJECT       *NewOp2;
     ACPI_PARSE_OBJECT       *MethodOp;
+    ACPI_PARSE_OBJECT       *StoreOp;
+    ACPI_PARSE_OBJECT       *BreakOp;
     char                    *PredicateValueName;
     UINT16                  Index;
     UINT32                  Btype;
@@ -638,11 +640,7 @@ TrDoSwitch (
              */
             if (CurrentParentNode == StartNode)
             {
-                Conditional->Asl.Parent = CurrentParentNode->Asl.Parent;
-
-                /* Link IF into the peer list */
-
-                TrAmlInsertPeer (CurrentParentNode, Conditional);
+                Conditional->Asl.Next = NULL;
             }
             else
             {
@@ -695,6 +693,7 @@ TrDoSwitch (
             {
                 return;
             }
+
             TrAmlInitNode (DefaultOp, PARSEOP_ELSE);
             DefaultOp->Asl.Parent = Conditional->Asl.Parent;
 
@@ -799,22 +798,44 @@ TrDoSwitch (
     TrAmlSetSubtreeParent (NewOp2, NewOp);
 
     /*
-     * Transform the Switch() into a Store() node which will be used to save the
+     * Transform the Switch() into a While(One)-Break node.
+     * And create a Store() node which will be used to save the
      * Switch() value.  The store is of the form: Store (Value, _T_x)
      * where _T_x is the temp variable.
      */
-    TrAmlInitNode (StartNode, PARSEOP_STORE);
-    StartNode->Asl.Child = NULL;
+    TrAmlInitNode (StartNode, PARSEOP_WHILE);
+    NewOp = TrCreateLeafNode (PARSEOP_ONE);
+    NewOp->Asl.Next = Predicate->Asl.Next;
+    NewOp->Asl.Parent = StartNode;
+    StartNode->Asl.Child = NewOp;
+
+    /* Create a Store() node */
+
+    StoreOp = TrCreateLeafNode (PARSEOP_STORE);
+    StoreOp->Asl.Parent = StartNode;
+    TrAmlInsertPeer (NewOp, StoreOp);
 
     /* Complete the Store subtree */
 
-    StartNode->Asl.Child = Predicate;
-    Predicate->Asl.Parent = StartNode;
+    StoreOp->Asl.Child = Predicate;
+    Predicate->Asl.Parent = StoreOp;
 
     NewOp = TrCreateValuedLeafNode (PARSEOP_NAMESEG,
                 (ACPI_INTEGER) ACPI_TO_INTEGER (PredicateValueName));
-    NewOp->Asl.Parent    = StartNode;
+    NewOp->Asl.Parent    = StoreOp;
     Predicate->Asl.Next  = NewOp;
+
+    /* Create a Break() node and insert it into the end of While() */
+
+    Conditional = StartNode->Asl.Child;
+    while (Conditional->Asl.Next)
+    {
+        Conditional = Conditional->Asl.Next;
+    }
+
+    BreakOp = TrCreateLeafNode (PARSEOP_BREAK);
+    BreakOp->Asl.Parent = StartNode;
+    TrAmlInsertPeer (Conditional, BreakOp);
 }
 
 

Modified: head/sys/contrib/dev/acpica/compiler/asltypes.h
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/asltypes.h	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/compiler/asltypes.h	Mon Nov 16 21:47:12 2009	(r199337)
@@ -369,7 +369,8 @@ typedef enum
     ASL_MSG_INVALID_TIME,
     ASL_MSG_INVALID_TYPE,
     ASL_MSG_INVALID_UUID,
-    ASL_MSG_LIST_LENGTH,
+    ASL_MSG_LIST_LENGTH_LONG,
+    ASL_MSG_LIST_LENGTH_SHORT,
     ASL_MSG_LISTING_FILE_OPEN,
     ASL_MSG_LISTING_FILENAME,
     ASL_MSG_LOCAL_INIT,
@@ -488,7 +489,8 @@ char                        *AslMessages
 /*    ASL_MSG_INVALID_TIME */               "Time parameter too long (255 max)",
 /*    ASL_MSG_INVALID_TYPE */               "Invalid type",
 /*    ASL_MSG_INVALID_UUID */               "UUID string must be of the form \"aabbccdd-eeff-gghh-iijj-kkllmmnnoopp\"",
-/*    ASL_MSG_LIST_LENGTH */                "Initializer list too long",
+/*    ASL_MSG_LIST_LENGTH_LONG */           "Initializer list longer than declared package length",
+/*    ASL_MSG_LIST_LENGTH_SHORT */          "Initializer list shorter than declared package length",
 /*    ASL_MSG_LISTING_FILE_OPEN */          "Could not open listing file",
 /*    ASL_MSG_LISTING_FILENAME */           "Could not create listing filename",
 /*    ASL_MSG_LOCAL_INIT */                 "Method local variable is not initialized",

Modified: head/sys/contrib/dev/acpica/debugger/dbcmds.c
==============================================================================
--- head/sys/contrib/dev/acpica/debugger/dbcmds.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/debugger/dbcmds.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -383,7 +383,7 @@ AcpiDbFindReferences (
     /* Search all nodes in namespace */
 
     (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
-                    AcpiDbWalkForReferences, (void *) ObjDesc, NULL);
+                    AcpiDbWalkForReferences, NULL, (void *) ObjDesc, NULL);
 }
 
 
@@ -475,7 +475,7 @@ AcpiDbCheckPredefinedNames (
     /* Search all nodes in namespace */
 
     (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
-                AcpiDbWalkForPredefinedNames, (void *) &Count, NULL);
+                AcpiDbWalkForPredefinedNames, NULL, (void *) &Count, NULL);
 
     AcpiOsPrintf ("Found %d predefined names in the namespace\n", Count);
 }
@@ -617,7 +617,7 @@ AcpiDbBatchExecute (
     /* Search all nodes in namespace */
 
     (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
-                AcpiDbWalkForExecute, (void *) &Info, NULL);
+                AcpiDbWalkForExecute, NULL, (void *) &Info, NULL);
 
     AcpiOsPrintf ("Executed %d predefined names in the namespace\n", Info.Count);
 }
@@ -1165,15 +1165,13 @@ AcpiDbSetMethodData (
 
     /* Create and initialize the new object */
 
-    ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+    ObjDesc = AcpiUtCreateIntegerObject ((UINT64) Value);
     if (!ObjDesc)
     {
         AcpiOsPrintf ("Could not create an internal object\n");
         return;
     }
 
-    ObjDesc->Integer.Value = Value;
-
     /* Store the new object into the target */
 
     switch (Type)
@@ -1325,7 +1323,7 @@ AcpiDbDisplayObjects (
     /* Walk the namespace from the root */
 
     (void) AcpiWalkNamespace (Type, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
-                AcpiDbWalkForSpecificObjects, (void *) &Info, NULL);
+                AcpiDbWalkForSpecificObjects, NULL, (void *) &Info, NULL);
 
     AcpiOsPrintf (
         "\nFound %u objects of type [%s] in the current ACPI Namespace\n",
@@ -1441,7 +1439,7 @@ AcpiDbFindNameInNamespace (
     /* Walk the namespace from the root */
 
     (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
-                        AcpiDbWalkAndMatchName, AcpiName, NULL);
+                        AcpiDbWalkAndMatchName, NULL, AcpiName, NULL);
 
     AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT);
     return (AE_OK);
@@ -1942,7 +1940,7 @@ AcpiDbCheckIntegrity (
     /* Search all nodes in namespace */
 
     (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
-                    AcpiDbIntegrityWalk, (void *) &Info, NULL);
+                    AcpiDbIntegrityWalk, NULL, (void *) &Info, NULL);
 
     AcpiOsPrintf ("Verified %d namespace nodes with %d Objects\n",
         Info.Nodes, Info.Objects);
@@ -2129,7 +2127,7 @@ AcpiDbGetBusInfo (
     /* Search all nodes in namespace */
 
     (void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
-                    AcpiDbBusWalk, NULL, NULL);
+                    AcpiDbBusWalk, NULL, NULL, NULL);
 }
 
 #endif /* ACPI_DEBUGGER */

Modified: head/sys/contrib/dev/acpica/debugger/dbexec.c
==============================================================================
--- head/sys/contrib/dev/acpica/debugger/dbexec.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/debugger/dbexec.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -453,7 +453,7 @@ AcpiDbExecute (
     if (*Name == '*')
     {
         (void) AcpiWalkNamespace (ACPI_TYPE_METHOD, ACPI_ROOT_OBJECT,
-                    ACPI_UINT32_MAX, AcpiDbExecutionWalk, NULL, NULL);
+                    ACPI_UINT32_MAX, AcpiDbExecutionWalk, NULL, NULL, NULL);
         return;
     }
     else

Modified: head/sys/contrib/dev/acpica/debugger/dbstats.c
==============================================================================
--- head/sys/contrib/dev/acpica/debugger/dbstats.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/debugger/dbstats.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -446,7 +446,7 @@ AcpiDbCountNamespaceObjects (
     }
 
     (void) AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
-                ACPI_UINT32_MAX, FALSE, AcpiDbClassifyOneObject, NULL, NULL);
+                ACPI_UINT32_MAX, FALSE, AcpiDbClassifyOneObject, NULL, NULL, NULL);
 }
 
 

Modified: head/sys/contrib/dev/acpica/dispatcher/dsinit.c
==============================================================================
--- head/sys/contrib/dev/acpica/dispatcher/dsinit.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/dispatcher/dsinit.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -283,7 +283,7 @@ AcpiDsInitializeObjects (
      * the namespace reader lock.
      */
     Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, StartNode, ACPI_UINT32_MAX,
-                ACPI_NS_WALK_UNLOCK, AcpiDsInitOneObject, &Info, NULL);
+                ACPI_NS_WALK_UNLOCK, AcpiDsInitOneObject, NULL, &Info, NULL);
     if (ACPI_FAILURE (Status))
     {
         ACPI_EXCEPTION ((AE_INFO, Status, "During WalkNamespace"));

Modified: head/sys/contrib/dev/acpica/dispatcher/dsmthdat.c
==============================================================================
--- head/sys/contrib/dev/acpica/dispatcher/dsmthdat.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/dispatcher/dsmthdat.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -524,13 +524,12 @@ AcpiDsMethodDataGetValue (
 
         if (AcpiGbl_EnableInterpreterSlack)
         {
-            Object = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+            Object = AcpiUtCreateIntegerObject ((UINT64) 0);
             if (!Object)
             {
                 return_ACPI_STATUS (AE_NO_MEMORY);
             }
 
-            Object->Integer.Value = 0;
             Node->Object = Object;
         }
 

Modified: head/sys/contrib/dev/acpica/dispatcher/dsobject.c
==============================================================================
--- head/sys/contrib/dev/acpica/dispatcher/dsobject.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/dispatcher/dsobject.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -574,7 +574,7 @@ AcpiDsBuildInternalPackageObj (
          *
          * Note: technically, this is an error, from ACPI spec: "It is an error
          * for NumElements to be less than the number of elements in the
-         * PackageList". However, we just print an error message and
+         * PackageList". However, we just print a message and
          * no exception is returned. This provides Windows compatibility. Some
          * BIOSs will alter the NumElements on the fly, creating this type
          * of ill-formed package object.
@@ -598,8 +598,8 @@ AcpiDsBuildInternalPackageObj (
             Arg = Arg->Common.Next;
         }
 
-        ACPI_ERROR ((AE_INFO,
-            "Package List length (0x%X) larger than NumElements count (0x%X), truncated\n",
+        ACPI_INFO ((AE_INFO,
+            "Actual Package length (0x%X) is larger than NumElements field (0x%X), truncated\n",
             i, ElementCount));
     }
     else if (i < ElementCount)

Modified: head/sys/contrib/dev/acpica/events/evgpeblk.c
==============================================================================
--- head/sys/contrib/dev/acpica/events/evgpeblk.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/events/evgpeblk.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -1110,7 +1110,7 @@ AcpiEvCreateGpeBlock (
 
     Status = AcpiNsWalkNamespace (ACPI_TYPE_METHOD, GpeDevice,
                 ACPI_UINT32_MAX, ACPI_NS_WALK_NO_UNLOCK,
-                AcpiEvSaveMethodInfo, GpeBlock, NULL);
+                AcpiEvSaveMethodInfo, NULL, GpeBlock, NULL);
 
     /* Return the new block */
 
@@ -1192,7 +1192,7 @@ AcpiEvInitializeGpeBlock (
 
         Status = AcpiNsWalkNamespace (ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
                     ACPI_UINT32_MAX, ACPI_NS_WALK_UNLOCK,
-                    AcpiEvMatchPrwAndGpe, &GpeInfo, NULL);
+                    AcpiEvMatchPrwAndGpe, NULL, &GpeInfo, NULL);
     }
 
     /*

Modified: head/sys/contrib/dev/acpica/events/evregion.c
==============================================================================
--- head/sys/contrib/dev/acpica/events/evregion.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/events/evregion.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -400,25 +400,21 @@ AcpiEvExecuteRegMethod (
      *  connection status 1 for connecting the handler, 0 for disconnecting
      *  the handler (Passed as a parameter)
      */
-    Args[0] = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+    Args[0] = AcpiUtCreateIntegerObject ((UINT64) RegionObj->Region.SpaceId);
     if (!Args[0])
     {
         Status = AE_NO_MEMORY;
         goto Cleanup1;
     }
 
-    Args[1] = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+    Args[1] = AcpiUtCreateIntegerObject ((UINT64) Function);
     if (!Args[1])
     {
         Status = AE_NO_MEMORY;
         goto Cleanup2;
     }
 
-    /* Setup the parameter objects */
-
-    Args[0]->Integer.Value = RegionObj->Region.SpaceId;
-    Args[1]->Integer.Value = Function;
-    Args[2] = NULL;
+    Args[2] = NULL; /* Terminate list */
 
     /* Execute the method, no return value */
 
@@ -1173,7 +1169,7 @@ AcpiEvInstallSpaceHandler (
      * of the branch
      */
     Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, Node, ACPI_UINT32_MAX,
-                ACPI_NS_WALK_UNLOCK, AcpiEvInstallHandler,
+                ACPI_NS_WALK_UNLOCK, AcpiEvInstallHandler, NULL,
                 HandlerObj, NULL);
 
 UnlockAndExit:
@@ -1213,7 +1209,7 @@ AcpiEvExecuteRegMethods (
      * regions of this Space ID before we can run any _REG methods)
      */
     Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, Node, ACPI_UINT32_MAX,
-                ACPI_NS_WALK_UNLOCK, AcpiEvRegRun,
+                ACPI_NS_WALK_UNLOCK, AcpiEvRegRun, NULL,
                 &SpaceId, NULL);
 
     return_ACPI_STATUS (Status);

Modified: head/sys/contrib/dev/acpica/executer/exconfig.c
==============================================================================
--- head/sys/contrib/dev/acpica/executer/exconfig.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/executer/exconfig.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -263,15 +263,13 @@ AcpiExLoadTableOp (
 
         /* Table not found, return an Integer=0 and AE_OK */
 
-        DdbHandle = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+        DdbHandle = AcpiUtCreateIntegerObject ((UINT64) 0);
         if (!DdbHandle)
         {
             return_ACPI_STATUS (AE_NO_MEMORY);
         }
 
-        DdbHandle->Integer.Value = 0;
         *ReturnDesc = DdbHandle;
-
         return_ACPI_STATUS (AE_OK);
     }
 

Modified: head/sys/contrib/dev/acpica/executer/exconvrt.c
==============================================================================
--- head/sys/contrib/dev/acpica/executer/exconvrt.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/executer/exconvrt.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -260,7 +260,7 @@ AcpiExConvertToInteger (
 
     /* Create a new integer */
 
-    ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+    ReturnDesc = AcpiUtCreateIntegerObject (Result);
     if (!ReturnDesc)
     {
         return_ACPI_STATUS (AE_NO_MEMORY);
@@ -271,7 +271,6 @@ AcpiExConvertToInteger (
 
     /* Save the Result */
 
-    ReturnDesc->Integer.Value = Result;
     AcpiExTruncateFor32bitTable (ReturnDesc);
     *ResultDesc = ReturnDesc;
     return_ACPI_STATUS (AE_OK);

Modified: head/sys/contrib/dev/acpica/executer/exfield.c
==============================================================================
--- head/sys/contrib/dev/acpica/executer/exfield.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/executer/exfield.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -249,14 +249,13 @@ AcpiExReadDataFromField (
     {
         /* Field will fit within an Integer (normal case) */
 
-        BufferDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+        BufferDesc = AcpiUtCreateIntegerObject ((UINT64) 0);
         if (!BufferDesc)
         {
             return_ACPI_STATUS (AE_NO_MEMORY);
         }
 
         Length = AcpiGbl_IntegerByteWidth;
-        BufferDesc->Integer.Value = 0;
         Buffer = &BufferDesc->Integer.Value;
     }
 

Modified: head/sys/contrib/dev/acpica/executer/exoparg1.c
==============================================================================
--- head/sys/contrib/dev/acpica/executer/exoparg1.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/executer/exoparg1.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -183,13 +183,12 @@ AcpiExOpcode_0A_0T_1R (
 
         /* Create a return object of type Integer */
 
-        ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+        ReturnDesc = AcpiUtCreateIntegerObject (AcpiOsGetTimer ());
         if (!ReturnDesc)
         {
             Status = AE_NO_MEMORY;
             goto Cleanup;
         }
-        ReturnDesc->Integer.Value = AcpiOsGetTimer ();
         break;
 
     default:                /*  Unknown opcode  */
@@ -733,7 +732,7 @@ AcpiExOpcode_1A_0T_1R (
     {
     case AML_LNOT_OP:               /* LNot (Operand) */
 
-        ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+        ReturnDesc = AcpiUtCreateIntegerObject ((UINT64) 0);
         if (!ReturnDesc)
         {
             Status = AE_NO_MEMORY;
@@ -838,14 +837,12 @@ AcpiExOpcode_1A_0T_1R (
 
         /* Allocate a descriptor to hold the type. */
 
-        ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+        ReturnDesc = AcpiUtCreateIntegerObject ((UINT64) Type);
         if (!ReturnDesc)
         {
             Status = AE_NO_MEMORY;
             goto Cleanup;
         }
-
-        ReturnDesc->Integer.Value = Type;
         break;
 
 
@@ -917,14 +914,12 @@ AcpiExOpcode_1A_0T_1R (
          * Now that we have the size of the object, create a result
          * object to hold the value
          */
-        ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+        ReturnDesc = AcpiUtCreateIntegerObject (Value);
         if (!ReturnDesc)
         {
             Status = AE_NO_MEMORY;
             goto Cleanup;
         }
-
-        ReturnDesc->Integer.Value = Value;
         break;
 
 
@@ -1089,21 +1084,18 @@ AcpiExOpcode_1A_0T_1R (
                      * NOTE: index into a buffer is NOT a pointer to a
                      * sub-buffer of the main buffer, it is only a pointer to a
                      * single element (byte) of the buffer!
+                     *
+                     * Since we are returning the value of the buffer at the
+                     * indexed location, we don't need to add an additional
+                     * reference to the buffer itself.
                      */
-                    ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+                    ReturnDesc = AcpiUtCreateIntegerObject ((UINT64)
+                        TempDesc->Buffer.Pointer[Operand[0]->Reference.Value]);
                     if (!ReturnDesc)
                     {
                         Status = AE_NO_MEMORY;
                         goto Cleanup;
                     }
-
-                    /*
-                     * Since we are returning the value of the buffer at the
-                     * indexed location, we don't need to add an additional
-                     * reference to the buffer itself.
-                     */
-                    ReturnDesc->Integer.Value =
-                        TempDesc->Buffer.Pointer[Operand[0]->Reference.Value];
                     break;
 
 

Modified: head/sys/contrib/dev/acpica/executer/exoparg6.c
==============================================================================
--- head/sys/contrib/dev/acpica/executer/exoparg6.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/executer/exoparg6.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -344,8 +344,9 @@ AcpiExOpcode_6A_0T_1R (
         }
 
         /* Create an integer for the return value */
+        /* Default return value is ACPI_INTEGER_MAX if no match found */
 
-        ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+        ReturnDesc = AcpiUtCreateIntegerObject (ACPI_INTEGER_MAX);
         if (!ReturnDesc)
         {
             Status = AE_NO_MEMORY;
@@ -353,10 +354,6 @@ AcpiExOpcode_6A_0T_1R (
 
         }
 
-        /* Default return value if no match found */
-
-        ReturnDesc->Integer.Value = ACPI_INTEGER_MAX;
-
         /*
          * Examine each element until a match is found. Both match conditions
          * must be satisfied for a match to occur. Within the loop,

Modified: head/sys/contrib/dev/acpica/executer/exregion.c
==============================================================================
--- head/sys/contrib/dev/acpica/executer/exregion.c	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/executer/exregion.c	Mon Nov 16 21:47:12 2009	(r199337)
@@ -157,7 +157,8 @@ AcpiExSystemMemorySpaceHandler (
     void                    *LogicalAddrPtr = NULL;
     ACPI_MEM_SPACE_CONTEXT  *MemInfo = RegionContext;
     UINT32                  Length;
-    ACPI_SIZE               WindowSize;
+    ACPI_SIZE               MapLength;
+    ACPI_SIZE               PageBoundaryMapLength;
 #ifdef ACPI_MISALIGNMENT_NOT_SUPPORTED
     UINT32                  Remainder;
 #endif
@@ -227,26 +228,45 @@ AcpiExSystemMemorySpaceHandler (
         }
 
         /*
-         * Don't attempt to map memory beyond the end of the region, and
-         * constrain the maximum mapping size to something reasonable.
+         * October 2009: Attempt to map from the requested address to the
+         * end of the region. However, we will never map more than one
+         * page, nor will we cross a page boundary.
          */
-        WindowSize = (ACPI_SIZE)
+        MapLength = (ACPI_SIZE)
             ((MemInfo->Address + MemInfo->Length) - Address);
 
-        if (WindowSize > ACPI_SYSMEM_REGION_WINDOW_SIZE)
+        /*
+         * If mapping the entire remaining portion of the region will cross
+         * a page boundary, just map up to the page boundary, do not cross.
+         * On some systems, crossing a page boundary while mapping regions
+         * can cause warnings if the pages have different attributes
+         * due to resource management.
+         *
+         * This has the added benefit of constraining a single mapping to
+         * one page, which is similar to the original code that used a 4k
+         * maximum window.
+         */
+        PageBoundaryMapLength =
+            ACPI_ROUND_UP (Address, ACPI_DEFAULT_PAGE_SIZE) - Address;
+        if (PageBoundaryMapLength == 0)
+        {
+            PageBoundaryMapLength = ACPI_DEFAULT_PAGE_SIZE;
+        }
+
+        if (MapLength > PageBoundaryMapLength)
         {
-            WindowSize = ACPI_SYSMEM_REGION_WINDOW_SIZE;
+            MapLength = PageBoundaryMapLength;
         }
 
         /* Create a new mapping starting at the address given */
 
         MemInfo->MappedLogicalAddress = AcpiOsMapMemory (
-            (ACPI_PHYSICAL_ADDRESS) Address, WindowSize);
+            (ACPI_PHYSICAL_ADDRESS) Address, MapLength);
         if (!MemInfo->MappedLogicalAddress)
         {
             ACPI_ERROR ((AE_INFO,
                 "Could not map memory at %8.8X%8.8X, size %X",
-                ACPI_FORMAT_NATIVE_UINT (Address), (UINT32) WindowSize));
+                ACPI_FORMAT_NATIVE_UINT (Address), (UINT32) MapLength));
             MemInfo->MappedLength = 0;
             return_ACPI_STATUS (AE_NO_MEMORY);
         }
@@ -254,7 +274,7 @@ AcpiExSystemMemorySpaceHandler (
         /* Save the physical address and mapping size */
 
         MemInfo->MappedPhysicalAddress = Address;
-        MemInfo->MappedLength = WindowSize;
+        MemInfo->MappedLength = MapLength;
     }
 
     /*

Modified: head/sys/contrib/dev/acpica/include/acconfig.h
==============================================================================
--- head/sys/contrib/dev/acpica/include/acconfig.h	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/include/acconfig.h	Mon Nov 16 21:47:12 2009	(r199337)
@@ -177,9 +177,9 @@
 
 #define ACPI_MAX_REFERENCE_COUNT        0x800
 
-/* Size of cached memory mapping for system memory operation region */
+/* Default page size for use in mapping memory for operation regions */
 
-#define ACPI_SYSMEM_REGION_WINDOW_SIZE  4096
+#define ACPI_DEFAULT_PAGE_SIZE          4096    /* Must be power of 2 */
 
 /* OwnerId tracking. 8 entries allows for 255 OwnerIds */
 

Modified: head/sys/contrib/dev/acpica/include/acmacros.h
==============================================================================
--- head/sys/contrib/dev/acpica/include/acmacros.h	Mon Nov 16 21:12:27 2009	(r199336)
+++ head/sys/contrib/dev/acpica/include/acmacros.h	Mon Nov 16 21:47:12 2009	(r199337)
@@ -403,6 +403,7 @@
 #define ACPI_ERROR_NAMESPACE(s, e)      AcpiNsReportError (AE_INFO, s, e);
 #define ACPI_ERROR_METHOD(s, n, p, e)   AcpiNsReportMethodError (AE_INFO, s, n, p, e);
 #define ACPI_WARN_PREDEFINED(plist)     AcpiUtPredefinedWarning plist
+#define ACPI_INFO_PREDEFINED(plist)     AcpiUtPredefinedInfo plist
 

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911162147.nAGLlCRV082494>