svn commit: r215521 - in stable/8: share/man/man4 sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/debugger sys/contrib/dev/acpic...

Andriy Gapon avg at FreeBSD.org
Fri Nov 19 14:26:46 UTC 2010


Author: avg
Date: Fri Nov 19 14:26:45 2010
New Revision: 215521
URL: http://svn.freebsd.org/changeset/base/215521

Log:
  MFC imports of ACPICA revisions 20100428 through 20101013
  
  Plus related changes and ehancements.
  
  Full list of revisions:
  
  o-----------------------------------------------------------------------
  r207344 | jkim | 2010-04-29 01:25:27 +0300 (Thu, 29 Apr 2010) | 2 lines
  Merge ACPICA 20100428.
  o-----------------------------------------------------------------------
  r209065 | jkim | 2010-06-11 22:58:41 +0300 (Fri, 11 Jun 2010) | 2 lines
  Simplify a function for getting brightness levels.
  o-----------------------------------------------------------------------
  r209746 | jkim | 2010-07-06 23:57:28 +0300 (Tue, 06 Jul 2010) | 2 lines
  Merge ACPICA 20100702.
  o-----------------------------------------------------------------------
  r209747 | jkim | 2010-07-07 00:41:08 +0300 (Wed, 07 Jul 2010) | 2 lines
  Fix mis-merges in the previous commit.
  o-----------------------------------------------------------------------
  r210150 | jkim | 2010-07-16 02:24:06 +0300 (Fri, 16 Jul 2010) | 3 lines
  If there is any pending sleep request, disallow entering S5 state.
  Otherwise, bad things may happen. ;-)
  o-----------------------------------------------------------------------
  r210976 | jkim | 2010-08-07 02:11:19 +0300 (Sat, 07 Aug 2010) | 2 lines
  Merge ACPICA 20100806.
  o-----------------------------------------------------------------------
  r211763 | mav | 2010-08-24 21:07:59 +0300 (Tue, 24 Aug 2010) | 4 lines
  When ACPI reports current battery consumption rate in mAmps, print it also
  in mWatts. Values in mAmps are not always suitable, because they depend on
  battery voltage, which depends on battery type and charge level.
  o-----------------------------------------------------------------------
  r212761 | jkim | 2010-09-16 23:08:00 +0300 (Thu, 16 Sep 2010) | 2 lines
  Merge ACPICA 20100915.
  o-----------------------------------------------------------------------
  r213772 | rpaulo | 2010-10-13 14:38:24 +0300 (Wed, 13 Oct 2010) | 3 lines
  Mark acpi_bus_number() as __unused. This allows clang to this file
  without any warnings.
  o-----------------------------------------------------------------------
  r213783 | jkim | 2010-10-13 19:30:41 +0300 (Wed, 13 Oct 2010) | 4 lines
  Remove acpi_bus_number() completely.  It had to be removed in r212761.
  Pointed out by:	jhb
  o-----------------------------------------------------------------------
  r213787 | jkim | 2010-10-13 20:06:25 +0300 (Wed, 13 Oct 2010) | 2 lines
  Clean up unused headers.
  o-----------------------------------------------------------------------
  r213806 | jkim | 2010-10-14 00:37:02 +0300 (Thu, 14 Oct 2010) | 2 lines
  Merge ACPICA 20101013.
  o-----------------------------------------------------------------------
  r214390 | jkim | 2010-10-26 21:59:50 +0300 (Tue, 26 Oct 2010) | 18 lines
  Add two new loader tunables 'hw.acpi.install_interface' and
  'hw.acpi.remove_interface'.  hw.acpi.install_interface lets you install new
  interfaces.  Conversely, hw.acpi.remove_interface lets you remove OS
  interfaces from the pre-defined list in ACPICA.  For example,
  	hw.acpi.install_interface="FreeBSD"
  lets _OSI("FreeBSD") method to return 0xffffffff (or success) and
  	hw.acpi.remove_interface="Windows 2009"
  lets _OSI("Windows 2009") method to return zero (or failure).  Both are
  comma-separated lists and leading white spaces are ignored.  For example,
  the following examples are valid:
  	hw.acpi.install_interface="Linux, FreeBSD"
  	hw.acpi.remove_interface="Windows 2006, Windows 2006.1"
  o-----------------------------------------------------------------------
  r214401 | jkim | 2010-10-27 00:22:55 +0300 (Wed, 27 Oct 2010) | 3 lines
  Document newly added loader tunables "hw.acpi.install_interface" and
  "hw.acpi.remove_interface".
  o-----------------------------------------------------------------------
  r214765 | jkim | 2010-11-04 01:16:35 +0200 (Thu, 04 Nov 2010) | 4 lines
  Adjust a comment to clarify why \_SB_ and \_TZ_ are defined as device type
  in ACPICA.  Reshuffle the code a bit to make sure this kludge only applies
  to these two specical cases and to make it cleaner.
  o-----------------------------------------------------------------------
  r214848 | jkim | 2010-11-05 21:50:09 +0200 (Fri, 05 Nov 2010) | 13 lines
  Fix a use-after-free bug for extended IRQ resource[1].  When _PRS buffer is
  copied as a template for _SRS, a string pointer for descriptor name is also
  copied and it becomes stale as soon as it gets de-allocated[2].  Now _CRS is
  used as a template for _SRS as ACPI specification suggests if it is usable.
  The template from _PRS is still utilized but only when _CRS is not available
  or broken.  To avoid use-after-free the problem in this case, however, only
  mandatory fields are copied, optional data is removed, and structure length
  is adjusted accordingly.
  Reported by:	hps[1]
  Analyzed by:	avg[2]
  Tested by:	hps
  o-----------------------------------------------------------------------
  r214849 | jkim | 2010-11-05 22:24:26 +0200 (Fri, 05 Nov 2010) | 2 lines
  Add a forgotten change from the previous commit.
  o-----------------------------------------------------------------------
  r214998 | jkim | 2010-11-08 21:52:14 +0200 (Mon, 08 Nov 2010) | 2 lines
  Consistently use padding `_' in the comment.
  o-----------------------------------------------------------------------
  
  Reviewed by:	jkim
  Tested by:	Alexandre "Sunny" Kovalenko <gaijin.k at ovi.com>
  On behalf of:	jkim

Added:
  stable/8/sys/contrib/dev/acpica/compiler/aslmessages.h
     - copied unchanged from r213806, head/sys/contrib/dev/acpica/compiler/aslmessages.h
  stable/8/sys/contrib/dev/acpica/compiler/aslrestype1i.c
     - copied, changed from r207344, head/sys/contrib/dev/acpica/compiler/aslrestype1i.c
  stable/8/sys/contrib/dev/acpica/compiler/aslrestype2d.c
     - copied, changed from r207344, head/sys/contrib/dev/acpica/compiler/aslrestype2d.c
  stable/8/sys/contrib/dev/acpica/compiler/aslrestype2e.c
     - copied, changed from r207344, head/sys/contrib/dev/acpica/compiler/aslrestype2e.c
  stable/8/sys/contrib/dev/acpica/compiler/aslrestype2q.c
     - copied, changed from r207344, head/sys/contrib/dev/acpica/compiler/aslrestype2q.c
  stable/8/sys/contrib/dev/acpica/compiler/aslrestype2w.c
     - copied, changed from r207344, head/sys/contrib/dev/acpica/compiler/aslrestype2w.c
  stable/8/sys/contrib/dev/acpica/compiler/dtcompile.c
     - copied, changed from r209746, head/sys/contrib/dev/acpica/compiler/dtcompile.c
  stable/8/sys/contrib/dev/acpica/compiler/dtcompiler.h
     - copied unchanged from r209746, head/sys/contrib/dev/acpica/compiler/dtcompiler.h
  stable/8/sys/contrib/dev/acpica/compiler/dtfield.c
     - copied unchanged from r209746, head/sys/contrib/dev/acpica/compiler/dtfield.c
  stable/8/sys/contrib/dev/acpica/compiler/dtio.c
     - copied, changed from r209746, head/sys/contrib/dev/acpica/compiler/dtio.c
  stable/8/sys/contrib/dev/acpica/compiler/dtsubtable.c
     - copied unchanged from r209746, head/sys/contrib/dev/acpica/compiler/dtsubtable.c
  stable/8/sys/contrib/dev/acpica/compiler/dttable.c
     - copied unchanged from r209746, head/sys/contrib/dev/acpica/compiler/dttable.c
  stable/8/sys/contrib/dev/acpica/compiler/dttemplate.c
     - copied, changed from r209746, head/sys/contrib/dev/acpica/compiler/dttemplate.c
  stable/8/sys/contrib/dev/acpica/compiler/dttemplate.h
     - copied unchanged from r209746, head/sys/contrib/dev/acpica/compiler/dttemplate.h
  stable/8/sys/contrib/dev/acpica/compiler/dtutils.c
     - copied unchanged from r209746, head/sys/contrib/dev/acpica/compiler/dtutils.c
  stable/8/sys/contrib/dev/acpica/events/evgpeinit.c
     - copied, changed from r207344, head/sys/contrib/dev/acpica/events/evgpeinit.c
  stable/8/sys/contrib/dev/acpica/events/evgpeutil.c
     - copied, changed from r207344, head/sys/contrib/dev/acpica/events/evgpeutil.c
  stable/8/sys/contrib/dev/acpica/hardware/hwpci.c
     - copied unchanged from r212761, head/sys/contrib/dev/acpica/hardware/hwpci.c
  stable/8/sys/contrib/dev/acpica/utilities/utosi.c
     - copied, changed from r210976, head/sys/contrib/dev/acpica/utilities/utosi.c
  stable/8/sys/contrib/dev/acpica/utilities/utxferror.c
     - copied unchanged from r212761, head/sys/contrib/dev/acpica/utilities/utxferror.c
Modified:
  stable/8/share/man/man4/acpi.4
  stable/8/sys/conf/files
  stable/8/sys/contrib/dev/acpica/acpica_prep.sh
  stable/8/sys/contrib/dev/acpica/changes.txt
  stable/8/sys/contrib/dev/acpica/common/adfile.c
  stable/8/sys/contrib/dev/acpica/common/adisasm.c
  stable/8/sys/contrib/dev/acpica/common/adwalk.c
  stable/8/sys/contrib/dev/acpica/common/dmextern.c
  stable/8/sys/contrib/dev/acpica/common/dmrestag.c
  stable/8/sys/contrib/dev/acpica/common/dmtable.c
  stable/8/sys/contrib/dev/acpica/common/dmtbdump.c
  stable/8/sys/contrib/dev/acpica/common/dmtbinfo.c
  stable/8/sys/contrib/dev/acpica/common/getopt.c
  stable/8/sys/contrib/dev/acpica/compiler/aslanalyze.c
  stable/8/sys/contrib/dev/acpica/compiler/aslcodegen.c
  stable/8/sys/contrib/dev/acpica/compiler/aslcompile.c
  stable/8/sys/contrib/dev/acpica/compiler/aslcompiler.h
  stable/8/sys/contrib/dev/acpica/compiler/aslcompiler.l
  stable/8/sys/contrib/dev/acpica/compiler/aslcompiler.y
  stable/8/sys/contrib/dev/acpica/compiler/asldefine.h
  stable/8/sys/contrib/dev/acpica/compiler/aslerror.c
  stable/8/sys/contrib/dev/acpica/compiler/aslfiles.c
  stable/8/sys/contrib/dev/acpica/compiler/aslglobal.h
  stable/8/sys/contrib/dev/acpica/compiler/asllisting.c
  stable/8/sys/contrib/dev/acpica/compiler/asllookup.c
  stable/8/sys/contrib/dev/acpica/compiler/aslmain.c
  stable/8/sys/contrib/dev/acpica/compiler/aslopcodes.c
  stable/8/sys/contrib/dev/acpica/compiler/aslopt.c
  stable/8/sys/contrib/dev/acpica/compiler/aslpredef.c
  stable/8/sys/contrib/dev/acpica/compiler/aslresource.c
  stable/8/sys/contrib/dev/acpica/compiler/aslrestype1.c
  stable/8/sys/contrib/dev/acpica/compiler/aslrestype2.c
  stable/8/sys/contrib/dev/acpica/compiler/aslstartup.c
  stable/8/sys/contrib/dev/acpica/compiler/asltransform.c
  stable/8/sys/contrib/dev/acpica/compiler/asltree.c
  stable/8/sys/contrib/dev/acpica/compiler/asltypes.h
  stable/8/sys/contrib/dev/acpica/compiler/aslutils.c
  stable/8/sys/contrib/dev/acpica/debugger/dbcmds.c
  stable/8/sys/contrib/dev/acpica/debugger/dbdisply.c
  stable/8/sys/contrib/dev/acpica/debugger/dbexec.c
  stable/8/sys/contrib/dev/acpica/debugger/dbfileio.c
  stable/8/sys/contrib/dev/acpica/debugger/dbhistry.c
  stable/8/sys/contrib/dev/acpica/debugger/dbinput.c
  stable/8/sys/contrib/dev/acpica/debugger/dbutils.c
  stable/8/sys/contrib/dev/acpica/disassembler/dmobject.c
  stable/8/sys/contrib/dev/acpica/disassembler/dmopcode.c
  stable/8/sys/contrib/dev/acpica/disassembler/dmresrc.c
  stable/8/sys/contrib/dev/acpica/dispatcher/dsinit.c
  stable/8/sys/contrib/dev/acpica/dispatcher/dsmethod.c
  stable/8/sys/contrib/dev/acpica/dispatcher/dsmthdat.c
  stable/8/sys/contrib/dev/acpica/dispatcher/dsobject.c
  stable/8/sys/contrib/dev/acpica/dispatcher/dsopcode.c
  stable/8/sys/contrib/dev/acpica/dispatcher/dsutils.c
  stable/8/sys/contrib/dev/acpica/events/evgpe.c
  stable/8/sys/contrib/dev/acpica/events/evgpeblk.c
  stable/8/sys/contrib/dev/acpica/events/evrgnini.c
  stable/8/sys/contrib/dev/acpica/events/evxface.c
  stable/8/sys/contrib/dev/acpica/events/evxfevnt.c
  stable/8/sys/contrib/dev/acpica/events/evxfregn.c
  stable/8/sys/contrib/dev/acpica/executer/exconfig.c
  stable/8/sys/contrib/dev/acpica/executer/exdump.c
  stable/8/sys/contrib/dev/acpica/executer/exfldio.c
  stable/8/sys/contrib/dev/acpica/executer/exmutex.c
  stable/8/sys/contrib/dev/acpica/executer/exoparg1.c
  stable/8/sys/contrib/dev/acpica/executer/exprep.c
  stable/8/sys/contrib/dev/acpica/executer/exregion.c
  stable/8/sys/contrib/dev/acpica/executer/exsystem.c
  stable/8/sys/contrib/dev/acpica/hardware/hwgpe.c
  stable/8/sys/contrib/dev/acpica/hardware/hwsleep.c
  stable/8/sys/contrib/dev/acpica/hardware/hwvalid.c
  stable/8/sys/contrib/dev/acpica/include/acapps.h
  stable/8/sys/contrib/dev/acpica/include/acconfig.h
  stable/8/sys/contrib/dev/acpica/include/acdebug.h
  stable/8/sys/contrib/dev/acpica/include/acdisasm.h
  stable/8/sys/contrib/dev/acpica/include/acevents.h
  stable/8/sys/contrib/dev/acpica/include/acexcep.h
  stable/8/sys/contrib/dev/acpica/include/acglobal.h
  stable/8/sys/contrib/dev/acpica/include/achware.h
  stable/8/sys/contrib/dev/acpica/include/acinterp.h
  stable/8/sys/contrib/dev/acpica/include/aclocal.h
  stable/8/sys/contrib/dev/acpica/include/acmacros.h
  stable/8/sys/contrib/dev/acpica/include/acnamesp.h
  stable/8/sys/contrib/dev/acpica/include/acobject.h
  stable/8/sys/contrib/dev/acpica/include/acoutput.h
  stable/8/sys/contrib/dev/acpica/include/acpiosxf.h
  stable/8/sys/contrib/dev/acpica/include/acpixf.h
  stable/8/sys/contrib/dev/acpica/include/acpredef.h
  stable/8/sys/contrib/dev/acpica/include/acstruct.h
  stable/8/sys/contrib/dev/acpica/include/actbl.h
  stable/8/sys/contrib/dev/acpica/include/actbl2.h
  stable/8/sys/contrib/dev/acpica/include/actypes.h
  stable/8/sys/contrib/dev/acpica/include/acutils.h
  stable/8/sys/contrib/dev/acpica/include/amlresrc.h
  stable/8/sys/contrib/dev/acpica/include/platform/acenv.h
  stable/8/sys/contrib/dev/acpica/include/platform/acfreebsd.h
  stable/8/sys/contrib/dev/acpica/include/platform/acgcc.h
  stable/8/sys/contrib/dev/acpica/namespace/nsaccess.c
  stable/8/sys/contrib/dev/acpica/namespace/nsalloc.c
  stable/8/sys/contrib/dev/acpica/namespace/nsdump.c
  stable/8/sys/contrib/dev/acpica/namespace/nsinit.c
  stable/8/sys/contrib/dev/acpica/namespace/nsnames.c
  stable/8/sys/contrib/dev/acpica/namespace/nsparse.c
  stable/8/sys/contrib/dev/acpica/namespace/nsrepair.c
  stable/8/sys/contrib/dev/acpica/namespace/nsrepair2.c
  stable/8/sys/contrib/dev/acpica/namespace/nssearch.c
  stable/8/sys/contrib/dev/acpica/namespace/nsutils.c
  stable/8/sys/contrib/dev/acpica/namespace/nswalk.c
  stable/8/sys/contrib/dev/acpica/namespace/nsxfobj.c
  stable/8/sys/contrib/dev/acpica/osunixxf.c
  stable/8/sys/contrib/dev/acpica/tables/tbfadt.c
  stable/8/sys/contrib/dev/acpica/tables/tbfind.c
  stable/8/sys/contrib/dev/acpica/tables/tbinstal.c
  stable/8/sys/contrib/dev/acpica/tables/tbutils.c
  stable/8/sys/contrib/dev/acpica/tables/tbxface.c
  stable/8/sys/contrib/dev/acpica/tools/acpiexec/aecommon.h
  stable/8/sys/contrib/dev/acpica/utilities/utcopy.c
  stable/8/sys/contrib/dev/acpica/utilities/utdebug.c
  stable/8/sys/contrib/dev/acpica/utilities/uteval.c
  stable/8/sys/contrib/dev/acpica/utilities/utglobal.c
  stable/8/sys/contrib/dev/acpica/utilities/utids.c
  stable/8/sys/contrib/dev/acpica/utilities/utinit.c
  stable/8/sys/contrib/dev/acpica/utilities/utmath.c
  stable/8/sys/contrib/dev/acpica/utilities/utmisc.c
  stable/8/sys/contrib/dev/acpica/utilities/utmutex.c
  stable/8/sys/contrib/dev/acpica/utilities/uttrack.c
  stable/8/sys/contrib/dev/acpica/utilities/utxface.c
  stable/8/sys/dev/acpica/Osd/OsdHardware.c
  stable/8/sys/dev/acpica/Osd/OsdMemory.c
  stable/8/sys/dev/acpica/acpi.c
  stable/8/sys/dev/acpica/acpi_button.c
  stable/8/sys/dev/acpica/acpi_ec.c
  stable/8/sys/dev/acpica/acpi_lid.c
  stable/8/sys/dev/acpica/acpi_pci_link.c
  stable/8/sys/dev/acpica/acpi_video.c
  stable/8/sys/modules/acpi/acpi/Makefile
  stable/8/usr.sbin/acpi/acpiconf/acpiconf.c
  stable/8/usr.sbin/acpi/acpidb/Makefile
  stable/8/usr.sbin/acpi/acpidump/acpi_user.c
  stable/8/usr.sbin/acpi/iasl/Makefile
Directory Properties:
  stable/8/share/man/man4/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)
  stable/8/usr.sbin/acpi/   (props changed)

Modified: stable/8/share/man/man4/acpi.4
==============================================================================
--- stable/8/share/man/man4/acpi.4	Fri Nov 19 12:56:13 2010	(r215520)
+++ stable/8/share/man/man4/acpi.4	Fri Nov 19 14:26:45 2010	(r215521)
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 12, 2010
+.Dd October 26, 2010
 .Dt ACPI 4
 .Os
 .Sh NAME
@@ -224,6 +224,26 @@ Try increasing this number if you get th
 .Qq Li AE_NO_HARDWARE_RESPONSE .
 .It Va hw.acpi.host_mem_start
 Override the assumed memory starting address for PCI host bridges.
+.It Va hw.acpi.install_interface , hw.acpi.remove_interface
+Install or remove OS interface(s) to control return value of
+.Ql _OSI
+query method.  When an OS interface is specified in
+.Va hw.acpi.install_interface ,
+.Li _OSI
+query for the interface returns it is
+.Em supported .
+Conversely, when an OS interface is specified in
+.Va hw.acpi.remove_interface ,
+.Li _OSI
+query returns it is
+.Em not supported .
+Multiple interfaces can be specified in a comma-separated list and
+any leading white spaces will be ignored.  For example,
+.Qq Li FreeBSD, Linux
+is a valid list of two interfaces
+.Qq Li FreeBSD
+and
+.Qq Li Linux .
 .It Va hw.acpi.reset_video
 Enables calling the VESA reset BIOS vector on the resume path.
 This can fix some graphics cards that have problems such as LCD white-out

Modified: stable/8/sys/conf/files
==============================================================================
--- stable/8/sys/conf/files	Fri Nov 19 12:56:13 2010	(r215520)
+++ stable/8/sys/conf/files	Fri Nov 19 14:26:45 2010	(r215521)
@@ -174,6 +174,8 @@ contrib/dev/acpica/dispatcher/dswstate.c
 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/evgpeinit.c		optional acpi
+contrib/dev/acpica/events/evgpeutil.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
@@ -207,6 +209,7 @@ contrib/dev/acpica/executer/exsystem.c		
 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/hwpci.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
@@ -271,9 +274,11 @@ contrib/dev/acpica/utilities/utmath.c		o
 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/utosi.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/utilities/utxferror.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: stable/8/sys/contrib/dev/acpica/acpica_prep.sh
==============================================================================
--- stable/8/sys/contrib/dev/acpica/acpica_prep.sh	Fri Nov 19 12:56:13 2010	(r215520)
+++ stable/8/sys/contrib/dev/acpica/acpica_prep.sh	Fri Nov 19 14:26:45 2010	(r215521)
@@ -19,11 +19,11 @@ fulldirs="common compiler debugger disas
 	tools utilities"
 
 # files to remove
-stripdirs="acpisrc acpixtract examples generate os_specific"
+stripdirs="acpisrc acpixtract examples generate os_specific tests"
 stripfiles="Makefile README acintel.h aclinux.h acmsvc.h acnetbsd.h	\
 	acos2.h accygwin.h acefi.h acwin.h acwin64.h aeexec.c		\
-	aehandlers.c aemain.c aetables.c osunixdir.c readme.txt		\
-	utclib.c"
+	aehandlers.c aemain.c aetables.c aetables.h osunixdir.c		\
+	readme.txt utclib.c"
 
 # include files to canonify
 src_headers="acapps.h accommon.h acconfig.h acdebug.h acdisasm.h	\
@@ -33,7 +33,8 @@ src_headers="acapps.h accommon.h acconfi
 	acresrc.h acrestyp.h acstruct.h actables.h actbl.h actbl1.h	\
 	actbl2.h actypes.h acutils.h amlcode.h amlresrc.h		\
 	platform/acenv.h platform/acfreebsd.h platform/acgcc.h"
-comp_headers="aslcompiler.h asldefine.h aslglobal.h asltypes.h"
+comp_headers="aslcompiler.h asldefine.h aslglobal.h aslmessages.h	\
+	asltypes.h dtcompiler.h dttemplate.h"
 platform_headers="acfreebsd.h acgcc.h"
 
 # pre-clean
@@ -49,7 +50,7 @@ tar -x -z -f ${src} -C ${wrk}
 # strip files
 echo strip
 for i in ${stripdirs}; do
-	find ${wrk} -name ${i} -type d | xargs rm -r
+	find ${wrk} -name ${i} -type d -print | xargs rm -r
 done
 for i in ${stripfiles}; do
 	find ${wrk} -name ${i} -type f -delete
@@ -58,22 +59,22 @@ done
 # copy files
 echo copying full dirs
 for i in ${fulldirs}; do
-	find ${wrk} -name ${i} -type d | xargs -J % mv % ${dst}
+	find ${wrk} -name ${i} -type d -print | xargs -J % mv % ${dst}
 done
 echo copying remaining files
-find ${wrk} -type f | xargs -J % mv % ${dst}
+find ${wrk} -type f -print | xargs -J % mv % ${dst}
 
 # canonify include paths
 for H in ${src_headers}; do
-	find ${dst} -name "*.[chy]" -type f |	\
+	find ${dst} -name "*.[chy]" -type f -print |	\
 	xargs sed -i "" -e "s|[\"<]$H[\">]|\<contrib/dev/acpica/include/$H\>|g"
 done
 for H in ${comp_headers}; do
-	find ${dst}/compiler -name "*.[chly]" -type f |	\
+	find ${dst}/common ${dst}/compiler -name "*.[chly]" -type f |	\
 	xargs sed -i "" -e "s|[\"<]$H[\">]|\<contrib/dev/acpica/compiler/$H\>|g"
 done
 for H in ${platform_headers}; do
-	find ${dst}/include/platform -name "*.h" -type f |	\
+	find ${dst}/include/platform -name "*.h" -type f -print |	\
 	xargs sed -i "" -e "s|[\"<]$H[\">]|\<contrib/dev/acpica/include/platform/$H\>|g"
 done
 

Modified: stable/8/sys/contrib/dev/acpica/changes.txt
==============================================================================
--- stable/8/sys/contrib/dev/acpica/changes.txt	Fri Nov 19 12:56:13 2010	(r215520)
+++ stable/8/sys/contrib/dev/acpica/changes.txt	Fri Nov 19 14:26:45 2010	(r215521)
@@ -1,4 +1,416 @@
 ----------------------------------------
+13 October 2010. Summary of changes for version 20101013:
+
+This release is available at www.acpica.org/downloads
+
+1) ACPI CA Core Subsystem:
+
+Added support to clear the PCIEXP_WAKE event. When clearing ACPI events, now 
+clear the PCIEXP_WAKE_STS bit in the ACPI PM1 Status Register, via 
+HwClearAcpiStatus. Original change from Colin King. ACPICA BZ 880.
+
+Changed the type of the predefined namespace object _TZ from ThermalZone to 
+Device. This was found to be confusing to the host software that processes 
+the various thermal zones, since _TZ is not really a ThermalZone. However, a 
+Notify() can still be performed on it. ACPICA BZ 876. Suggestion from Rui 
+Zhang.
+
+Added Windows Vista SP2 to the list of supported _OSI strings. The actual 
+string is "Windows 2006 SP2".
+
+Eliminated duplicate code in AcpiUtExecute* functions. Now that the nsrepair 
+code automatically repairs _HID-related strings, this type of code is no 
+longer needed in Execute_HID, Execute_CID, and Execute_UID. ACPICA BZ 878.
+
+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:  89.9K Code, 19.0K Data, 108.9K Total
+    Debug Version:     166.3K Code, 52.1K Data, 218.4K Total
+  Current Release:
+    Non-Debug Version:  89.9K Code, 19.0K Data, 108.9K Total
+    Debug Version:     166.3K Code, 52.1K Data, 218.4K Total
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL: Implemented additional compile-time validation for _HID strings. The 
+non-hex prefix (such as "PNP" or "ACPI") must be uppercase, and the length of 
+the string must be exactly seven or eight characters. For both _HID and _CID 
+strings, all characters must be alphanumeric. ACPICA BZ 874.
+
+iASL: Allow certain "null" resource descriptors. Some BIOS code creates 
+descriptors that are mostly or all zeros, with the expectation that they will 
+be filled in at runtime. iASL now allows this as long as there is a "resource 
+tag" (name) associated with the descriptor, which gives the ASL a handle 
+needed to modify the descriptor. ACPICA BZ 873.
+
+Added single-thread support to the generic Unix application OSL. Primarily 
+for iASL support, this change removes the use of semaphores in the single-
+threaded ACPICA tools/applications - increasing performance. The 
+_MULTI_THREADED option was replaced by the (reverse) ACPI_SINGLE_THREADED 
+option. ACPICA BZ 879.
+
+AcpiExec: several fixes for the 64-bit version. Adds XSDT support and support 
+for 64-bit DSDT/FACS addresses in the FADT. Lin Ming.
+
+iASL: Moved all compiler messages to a new file, aslmessages.h.
+
+----------------------------------------
+15 September 2010. Summary of changes for version 20100915:
+
+This release is available at www.acpica.org/downloads
+
+1) ACPI CA Core Subsystem:
+
+Removed the AcpiOsDerivePciId OSL interface. The various host implementations 
+of this function were not OS-dependent and are now obsolete and can be 
+removed from all host OSLs. This function has been replaced by 
+AcpiHwDerivePciId, which is now part of the ACPICA core code. 
+AcpiHwDerivePciId has been implemented without recursion. Adds one new 
+module, hwpci.c. ACPICA BZ 857.
+
+Implemented a dynamic repair for _HID and _CID strings. The following 
+problems are now repaired at runtime: 1) Remove a leading asterisk in the 
+string, and 2) the entire string is uppercased. Both repairs are in 
+accordance with the ACPI specification and will simplify host driver code. 
+ACPICA BZ 871.
+
+The ACPI_THREAD_ID type is no longer configurable, internally it is now 
+always UINT64. This simplifies the ACPICA code, especially any printf output. 
+UINT64 is the only common data type for all thread_id types across all 
+operating systems. It is now up to the host OSL to cast the native thread_id 
+type to UINT64 before returning the value to ACPICA (via AcpiOsGetThreadId). 
+Lin Ming, Bob Moore.
+
+Added the ACPI_INLINE type to enhance the ACPICA configuration. The "inline" 
+keyword is not standard across compilers, and this type allows inline to be 
+configured on a per-compiler basis. Lin Ming.
+
+Made the system global AcpiGbl_SystemAwakeAndRunning publically available. 
+Added an extern for this boolean in acpixf.h. Some hosts utilize this value 
+during suspend/restore operations. ACPICA BZ 869.
+
+All code that implements error/warning messages with the "ACPI:" prefix has 
+been moved to a new module, utxferror.c.
+
+The UINT64_OVERLAY was moved to utmath.c, which is the only module where it 
+is used. ACPICA BZ 829. Lin Ming, Bob Moore.
+
+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:  89.1K Code, 19.0K Data, 108.1K Total
+    Debug Version:     165.1K Code, 51.9K Data, 217.0K Total
+  Current Release:
+    Non-Debug Version:  89.9K Code, 19.0K Data, 108.9K Total
+    Debug Version:     166.3K Code, 52.1K Data, 218.4K Total
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL/Disassembler: Write ACPI errors to stderr instead of the output file. 
+This keeps the output files free of random error messages that may originate 
+from within the namespace/interpreter code. Used this opportunity to merge 
+all ACPI:-style messages into a single new module, utxferror.c. ACPICA BZ 
+866. Lin Ming, Bob Moore.
+
+Tools: update some printfs for ansi warnings on size_t. Handle width change 
+of size_t on 32-bit versus 64-bit generations. Lin Ming.
+
+----------------------------------------
+06 August 2010. Summary of changes for version 20100806:
+
+1) ACPI CA Core Subsystem:
+
+Designed and implemented a new host interface to the _OSI support code. This 
+will allow the host to dynamically add or remove multiple _OSI strings, as 
+well as install an optional handler that is called for each _OSI invocation. 
+Also added a new AML debugger command, 'osi' to display and modify the global 
+_OSI string table, and test support in the AcpiExec utility. See the ACPICA 
+reference manual for full details. Lin Ming, Bob Moore. ACPICA BZ 836.
+New Functions:
+    AcpiInstallInterface - Add an _OSI string.
+    AcpiRemoveInterface - Delete an _OSI string.
+    AcpiInstallInterfaceHandler - Install optional _OSI handler.
+Obsolete Functions:
+    AcpiOsValidateInterface - no longer used.
+New Files:
+    source/components/utilities/utosi.c
+
+Re-introduced the support to enable multi-byte transfers for Embedded 
+Controller (EC) operation regions. A reported problem was found to be a bug 
+in the host OS, not in the multi-byte support. Previously, the maximum data 
+size passed to the EC operation region handler was a single byte. There are 
+often EC Fields larger than one byte that need to be transferred, and it is 
+useful for the EC driver to lock these as a single transaction. This change 
+enables single transfers larger than 8 bits. This effectively changes the 
+access to the EC space from ByteAcc to AnyAcc, and will probably require 
+changes to the host OS Embedded Controller driver to enable 16/32/64/256-bit 
+transfers in addition to 8-bit transfers. Alexey Starikovskiy, Lin Ming.
+
+Fixed a problem with the prototype for AcpiOsReadPciConfiguration. The 
+prototype in acpiosxf.h had the output value pointer as a (void *).
+It should be a (UINT64 *). This may affect some host OSL code.
+
+Fixed a couple problems with the recently modified Linux makefiles for iASL 
+and AcpiExec. These new makefiles place the generated object files in the 
+local directory so that there can be no collisions between the files that are 
+shared between them that are compiled with different options.
+
+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:  88.3K Code, 18.8K Data, 107.1K Total
+    Debug Version:     164.0K Code, 51.5K Data, 215.5K Total
+  Current Release:
+    Non-Debug Version:  89.1K Code, 19.0K Data, 108.1K Total
+    Debug Version:     165.1K Code, 51.9K Data, 217.0K Total
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL/Disassembler: Added a new option (-da, "disassemble all") to load the 
+namespace from and disassemble an entire group of AML files. Useful for 
+loading all of the AML tables for a given machine (DSDT, SSDT1...SSDTn) and 
+disassembling with one simple command. ACPICA BZ 865. Lin Ming.
+
+iASL: Allow multiple invocations of -e option. This change allows multiple 
+uses of -e on the command line: "-e ssdt1.dat -e ssdt2.dat". ACPICA BZ 834. 
+Lin Ming.
+
+----------------------------------------
+02 July 2010. Summary of changes for version 20100702:
+
+1) ACPI CA Core Subsystem:
+
+Implemented several updates to the recently added GPE reference count 
+support. The model for "wake" GPEs is changing to give the host OS complete 
+control of these GPEs. Eventually, the ACPICA core will not execute any _PRW 
+methods, since the host already must execute them. Also, additional changes 
+were made to help ensure that the reference counts are kept in proper 
+synchronization with reality. Rafael J. Wysocki.
+
+1) Ensure that GPEs are not enabled twice during initialization.
+2) Ensure that GPE enable masks stay in sync with the reference count.
+3) Do not inadvertently enable GPEs when writing GPE registers.
+4) Remove the internal wake reference counter and add new AcpiGpeWakeup 
+interface. This interface will set or clear individual GPEs for wakeup.
+5) Remove GpeType argument from AcpiEnable and AcpiDisable. These interfaces 
+are now used for "runtime" GPEs only.
+
+Changed the behavior of the GPE install/remove handler interfaces. The GPE is 
+no longer disabled during this process, as it was found to cause problems on 
+some machines. Rafael J. Wysocki.
+
+Reverted a change introduced in version 20100528 to enable Embedded 
+Controller multi-byte transfers. This change was found to cause problems with 
+Index Fields and possibly Bank Fields. It will be reintroduced when these 
+problems have been resolved.
+
+Fixed a problem with references to Alias objects within Package Objects. A 
+reference to an Alias within the definition of a Package was not always 
+resolved properly. Aliases to objects like Processors, Thermal zones, etc. 
+were resolved to the actual object instead of a reference to the object as it 
+should be. Package objects are only allowed to contain integer, string, 
+buffer, package, and reference objects. Redhat bugzilla 608648.
+
+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:  88.3K Code, 18.8K Data, 107.1K Total
+    Debug Version:     164.1K Code, 51.5K Data, 215.6K Total
+  Current Release:
+    Non-Debug Version:  88.3K Code, 18.8K Data, 107.1K Total
+    Debug Version:     164.0K Code, 51.5K Data, 215.5K Total
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL: Implemented a new compiler subsystem to allow definition and 
+compilation of the non-AML ACPI tables such as FADT, MADT, SRAT, etc. These 
+are called "ACPI Data Tables", and the new compiler is the "Data Table 
+Compiler". This compiler is intended to simplify the existing error-prone 
+process of creating these tables for the BIOS, as well as allowing the 
+disassembly, modification, recompilation, and override of existing ACPI data 
+tables. See the iASL User Guide for detailed information.
+
+iASL: Implemented a new Template Generator option in support of the new Data 
+Table Compiler. This option will create examples of all known ACPI tables 
+that can be used as the basis for table development. See the iASL 
+documentation and the -T option.
+
+Disassembler and headers: Added support for the WDDT ACPI table (Watchdog 
+Descriptor Table).
+
+Updated the Linux makefiles for iASL and AcpiExec to place the generated 
+object files in the local directory so that there can be no collisions 
+between the shared files between them that are generated with different 
+options.
+
+Added support for Mac OS X in the Unix OSL used for iASL and AcpiExec. Use 
+the #define __APPLE__ to enable this support.
+
+----------------------------------------
+28 May 2010. Summary of changes for version 20100528:
+
+Note: The ACPI 4.0a specification was released on April 5, 2010 and is 
+available at www.acpi.info. This is primarily an errata release.
+
+1) ACPI CA Core Subsystem:
+
+Undefined ACPI tables: We are looking for the definitions for the following 
+ACPI tables that have been seen in the field: ATKG, IEIT, GSCI.
+
+Implemented support to enable multi-byte transfers for Embedded Controller 
+(EC) operation regions. Previously, the maximum data size passed to the EC 
+operation region handler was a single byte. There are often EC Fields larger 
+than one byte that need to be transferred, and it is useful for the EC driver 
+to lock these as a single transaction. This change enables single transfers 
+larger than 8 bits. This effectively changes the access to the EC space from 
+ByteAcc to AnyAcc, and will probably require changes to the host OS Embedded 
+Controller driver to enable 16/32/64/256-bit transfers in addition to 8-bit 
+transfers. Alexey Starikovskiy, Lin Ming
+
+Implemented a performance enhancement for namespace search and access. This 
+change enhances the performance of namespace searches and walks by adding a 
+backpointer to the parent in each namespace node. On large namespaces, this 
+change can improve overall ACPI performance by up to 9X. Adding a pointer to 
+each namespace node increases the overall size of the internal namespace by 
+about 5%, since each namespace entry usually consists of both a namespace 
+node and an ACPI operand object. However, this is the first growth of the 
+namespace in ten years. ACPICA bugzilla 817. Alexey Starikovskiy.
+
+Implemented a performance optimization that reduces the number of namespace 
+walks. On control method exit, only walk the namespace if the method is known 
+to have created namespace objects outside of its local scope. Previously, the 
+entire namespace was traversed on each control method exit. This change can 
+improve overall ACPI performance by up to 3X. Alexey Starikovskiy, Bob Moore.
+
+Added support to truncate I/O addresses to 16 bits for Windows compatibility. 
+Some ASL code has been seen in the field that inadvertently has bits set 
+above bit 15. This feature is optional and is enabled if the BIOS requests 
+any Windows OSI strings. It can also be enabled by the host OS. Matthew 
+Garrett, Bob Moore.
+
+Added support to limit the maximum time for the ASL Sleep() operator. To 
+prevent accidental deep sleeps, limit the maximum time that Sleep() will 
+actually sleep. Configurable, the default maximum is two seconds. ACPICA 
+bugzilla 854.
+
+Added run-time validation support for the _WDG and_WED Microsoft predefined 
+methods. These objects are defined by "Windows Instrumentation", and are not 
+part of the ACPI spec. ACPICA BZ 860.
+
+Expanded all statistic counters used during namespace and device 
+initialization from 16 to 32 bits in order to support very large namespaces.
+
+Replaced all instances of %d in printf format specifiers with %u since nearly 
+all integers in ACPICA are unsigned.
+
+Fixed the exception namestring for AE_WAKE_ONLY_GPE. Was incorrectly returned 
+as AE_NO_HANDLER.
+
+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:  88.4K Code, 18.8K Data, 107.2K Total
+    Debug Version:     164.2K Code, 51.5K Data, 215.7K Total
+  Current Release:
+    Non-Debug Version:  88.3K Code, 18.8K Data, 107.1K Total
+    Debug Version:     164.1K Code, 51.5K Data, 215.6K Total
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL: Added compiler support for the _WDG and_WED Microsoft predefined 
+methods. These objects are defined by "Windows Instrumentation", and are not 
+part of the ACPI spec. ACPICA BZ 860.
+
+AcpiExec: added option to disable the memory tracking mechanism. The -dt 
+option will disable the tracking mechanism, which improves performance 
+considerably.
+
+AcpiExec: Restructured the command line options into -d (disable) and -e 
+(enable) options.
+
+----------------------------------------
+28 April 2010. Summary of changes for version 20100428:
+
+1) ACPI CA Core Subsystem:
+
+Implemented GPE support for dynamically loaded ACPI tables. For all GPEs, 
+including FADT-based and GPE Block Devices, execute any _PRW methods in the 
+new table, and process any _Lxx/_Exx GPE methods in the new table. Any 
+runtime GPE that is referenced by an _Lxx/_Exx method in the new table is 
+immediately enabled. Handles the FADT-defined GPEs as well as GPE Block 
+Devices. Provides compatibility with other ACPI implementations. Two new 
+files added, evgpeinit.c and evgpeutil.c. ACPICA BZ 833. Lin Ming, Bob Moore.
+
+Fixed a regression introduced in version 20100331 within the table manager 
+where initial table loading could fail. This was introduced in the fix for 
+AcpiReallocateRootTable. Also, renamed some of fields in the table manager 
+data structures to clarify their meaning and use.
+
+Fixed a possible allocation overrun during internal object copy in 
+AcpiUtCopySimpleObject. The original code did not correctly handle the case 
+where the object to be copied was a namespace node. Lin Ming. ACPICA BZ 847.
+
+Updated the allocation dump routine, AcpiUtDumpAllocation and fixed a 
+possible access beyond end-of-allocation. Also, now fully validate descriptor 
+(size and type) before output. Lin Ming, Bob Moore. ACPICA BZ 847
+
+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:  87.9K Code, 18.6K Data, 106.5K Total
+    Debug Version:     163.5K Code, 51.3K Data, 214.8K Total
+  Current Release:
+    Non-Debug Version:  88.4K Code, 18.8K Data, 107.2K Total
+    Debug Version:     164.2K Code, 51.5K Data, 215.7K Total
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL: Implemented Min/Max/Len/Gran validation for address resource 
+descriptors. This change implements validation for the address fields that 
+are common to all address-type resource descriptors. These checks are 
+implemented: Checks for valid Min/Max, length within the Min/Max window, 
+valid granularity, Min/Max a multiple of granularity, and _MIF/_MAF as per 
+table 6-40 in the ACPI 4.0a specification. Also split the large aslrestype1.c 
+and aslrestype2.c files into five new files. ACPICA BZ 840.
+
+iASL: Added support for the _Wxx predefined names. This support was missing 
+and these names were not recognized by the compiler as valid predefined 
+names. ACPICA BZ 851.
+
+iASL: Added an error for all predefined names that are defined to return no 
+value and thus must be implemented as Control Methods. These include all of 
+the _Lxx, _Exx, _Wxx, and _Qxx names, as well as some other miscellaneous 
+names such as _DIS, _INI, _IRC, _OFF, _ON, and _PSx. ACPICA BZ 850, 856.
+
+iASL: Implemented the -ts option to emit hex AML data in ASL format, as an 
+ASL Buffer. Allows ACPI tables to be easily included within ASL files, to be 
+dynamically loaded via the Load() operator. Also cleaned up output for the -
+ta and -tc options. ACPICA BZ 853.
+
+Tests: Added a new file with examples of extended iASL error checking. 
+Demonstrates the advanced error checking ability of the iASL compiler. 
+Available at tests/misc/badcode.asl.
+
+----------------------------------------
 31 March 2010. Summary of changes for version 20100331:
 
 1) ACPI CA Core Subsystem:

Modified: stable/8/sys/contrib/dev/acpica/common/adfile.c
==============================================================================
--- stable/8/sys/contrib/dev/acpica/common/adfile.c	Fri Nov 19 12:56:13 2010	(r215520)
+++ stable/8/sys/contrib/dev/acpica/common/adfile.c	Fri Nov 19 14:26:45 2010	(r215521)
@@ -126,13 +126,13 @@
 
 /* Local prototypes */
 
-INT32
+static INT32
 AdWriteBuffer (
     char                    *Filename,
     char                    *Buffer,
     UINT32                  Length);
 
-char                        FilenameBuf[20];
+static char                 FilenameBuf[20];
 
 
 /******************************************************************************
@@ -190,7 +190,7 @@ AdGenerateFilename (
  *
  ******************************************************************************/
 
-INT32
+static INT32
 AdWriteBuffer (
     char                    *Filename,
     char                    *Buffer,

Modified: stable/8/sys/contrib/dev/acpica/common/adisasm.c
==============================================================================
--- stable/8/sys/contrib/dev/acpica/common/adisasm.c	Fri Nov 19 12:56:13 2010	(r215520)
+++ stable/8/sys/contrib/dev/acpica/common/adisasm.c	Fri Nov 19 14:26:45 2010	(r215521)
@@ -134,7 +134,6 @@
 
 
 extern int                  AslCompilerdebug;
-extern char                 *Gbl_ExternalFilename;
 
 
 ACPI_STATUS
@@ -148,22 +147,18 @@ LsSetupNsList (
 
 /* Local prototypes */
 
-void
+static void
 AdCreateTableHeader (
     char                    *Filename,
     ACPI_TABLE_HEADER       *Table);
 
-void
-AdDisassemblerHeader (
-    char                    *Filename);
-
-ACPI_STATUS
+static ACPI_STATUS
 AdDeferredParse (
     ACPI_PARSE_OBJECT       *Op,
     UINT8                   *Aml,
     UINT32                  AmlLength);
 
-ACPI_STATUS
+static ACPI_STATUS
 AdParseDeferredOps (
     ACPI_PARSE_OBJECT       *Root);
 
@@ -282,8 +277,8 @@ AdInitialize (
 
     /* Setup the Table Manager (cheat - there is no RSDT) */
 
-    AcpiGbl_RootTableList.Size = 1;
-    AcpiGbl_RootTableList.Count = 0;
+    AcpiGbl_RootTableList.MaxTableCount = 1;
+    AcpiGbl_RootTableList.CurrentTableCount = 0;
     AcpiGbl_RootTableList.Tables = LocalTables;
 
     return (Status);
@@ -317,6 +312,7 @@ AdAmlDisassemble (
     ACPI_STATUS             Status;
     char                    *DisasmFilename = NULL;
     char                    *ExternalFilename;
+    ACPI_EXTERNAL_FILE      *ExternalFileList = AcpiGbl_ExternalFileList;
     FILE                    *File = NULL;
     ACPI_TABLE_HEADER       *Table = NULL;
     ACPI_TABLE_HEADER       *ExternalTable;
@@ -339,46 +335,54 @@ AdAmlDisassemble (
          * External filenames separated by commas
          * Example: iasl -e file1,file2,file3 -d xxx.aml
          */
-        if (Gbl_ExternalFilename)
+        while (ExternalFileList)
         {
-            ExternalFilename = strtok (Gbl_ExternalFilename, ",");
+            ExternalFilename = ExternalFileList->Path;
+            if (!ACPI_STRCMP (ExternalFilename, Filename))
+            {
+                /* Next external file */
+
+                ExternalFileList = ExternalFileList->Next;
+
+                continue;
+            }
+
+            Status = AcpiDbGetTableFromFile (ExternalFilename, &ExternalTable);
+            if (ACPI_FAILURE (Status))
+            {
+                return Status;
+            }
 
-            while (ExternalFilename)
+            /* Load external table for symbol resolution */
+
+            if (ExternalTable)
             {
-                Status = AcpiDbGetTableFromFile (ExternalFilename, &ExternalTable);
+                Status = AdParseTable (ExternalTable, &OwnerId, TRUE, TRUE);
                 if (ACPI_FAILURE (Status))
                 {
+                    AcpiOsPrintf ("Could not parse external ACPI tables, %s\n",
+                        AcpiFormatException (Status));
                     return Status;
                 }
 
-                /* Load external table for symbol resolution */
-
-                if (ExternalTable)
-                {
-                    Status = AdParseTable (ExternalTable, &OwnerId, TRUE, TRUE);
-                    if (ACPI_FAILURE (Status))
-                    {
-                        AcpiOsPrintf ("Could not parse external ACPI tables, %s\n",
-                            AcpiFormatException (Status));
-                        return Status;
-                    }
-
-                    /*
-                     * Load namespace from names created within control methods
-                     * Set owner id of nodes in external table
-                     */
-                    AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot,
-                        AcpiGbl_RootNode, OwnerId);
-                    AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot);
-                }
+                /*
+                 * Load namespace from names created within control methods
+                 * Set owner id of nodes in external table
+                 */
+                AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot,
+                    AcpiGbl_RootNode, OwnerId);
+                AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot);
+            }
 
-                /* Next external file name */
+            /* Next external file */
 
-                ExternalFilename = strtok (NULL, ",");
-            }
+            ExternalFileList = ExternalFileList->Next;
+        }
 
-            /* Clear external list generated by Scope in external tables */
+        /* Clear external list generated by Scope in external tables */
 
+        if (AcpiGbl_ExternalFileList)
+        {
             AcpiDmClearExternalList ();
         }
     }
@@ -502,7 +506,7 @@ AdAmlDisassemble (
         if (AcpiDmGetExternalMethodCount ())
         {
             fprintf (stderr,
-                "\nFound %d external control methods, reparsing with new information\n",
+                "\nFound %u external control methods, reparsing with new information\n",
                 AcpiDmGetExternalMethodCount ());
 
             /*
@@ -515,10 +519,11 @@ AdAmlDisassemble (
             AcpiGbl_RootNodeStruct.Name.Integer = ACPI_ROOT_NAME;
             AcpiGbl_RootNodeStruct.DescriptorType = ACPI_DESC_TYPE_NAMED;
             AcpiGbl_RootNodeStruct.Type         = ACPI_TYPE_DEVICE;
+            AcpiGbl_RootNodeStruct.Parent       = NULL;
             AcpiGbl_RootNodeStruct.Child        = NULL;
             AcpiGbl_RootNodeStruct.Peer         = NULL;
             AcpiGbl_RootNodeStruct.Object       = NULL;
-            AcpiGbl_RootNodeStruct.Flags        = ANOBJ_END_OF_PEER_LIST;
+            AcpiGbl_RootNodeStruct.Flags        = 0;
 
             Status = AcpiNsRootInitialize ();
             AcpiDmAddExternalsToNamespace ();
@@ -607,10 +612,10 @@ AdDisassemblerHeader (
 
     /* Header and input table info */
 
-    AcpiOsPrintf ("/*\n * Intel ACPI Component Architecture\n");
-    AcpiOsPrintf (" * AML Disassembler version %8.8X\n", ACPI_CA_VERSION);
+    AcpiOsPrintf ("/*\n");
+    AcpiOsPrintf (ACPI_COMMON_HEADER ("AML Disassembler", " * "));
 
-    AcpiOsPrintf (" *\n * Disassembly of %s, %s", Filename, ctime (&Timer));
+    AcpiOsPrintf (" * Disassembly of %s, %s", Filename, ctime (&Timer));
     AcpiOsPrintf (" *\n");
 }
 
@@ -629,7 +634,7 @@ AdDisassemblerHeader (
  *
  *****************************************************************************/
 
-void
+static void
 AdCreateTableHeader (
     char                    *Filename,
     ACPI_TABLE_HEADER       *Table)
@@ -643,7 +648,7 @@ AdCreateTableHeader (
      */
     AdDisassemblerHeader (Filename);
 
-    AcpiOsPrintf (" *\n * Original Table Header:\n");
+    AcpiOsPrintf (" * Original Table Header:\n");
     AcpiOsPrintf (" *     Signature        \"%4.4s\"\n",    Table->Signature);
     AcpiOsPrintf (" *     Length           0x%8.8X (%u)\n", Table->Length, Table->Length);
 
@@ -688,7 +693,7 @@ AdCreateTableHeader (
     AcpiOsPrintf (" *     OEM Revision     0x%8.8X (%u)\n", Table->OemRevision, Table->OemRevision);
     AcpiOsPrintf (" *     Compiler ID      \"%.4s\"\n",     Table->AslCompilerId);
     AcpiOsPrintf (" *     Compiler Version 0x%8.8X (%u)\n", Table->AslCompilerRevision, Table->AslCompilerRevision);
-    AcpiOsPrintf (" */\n");
+    AcpiOsPrintf (" */\n\n");
 
     /* Create AML output filename based on input filename */
 
@@ -706,7 +711,7 @@ AdCreateTableHeader (
     /* Open the ASL definition block */
 
     AcpiOsPrintf (
-        "DefinitionBlock (\"%s\", \"%4.4s\", %hd, \"%.6s\", \"%.8s\", 0x%8.8X)\n",
+        "DefinitionBlock (\"%s\", \"%4.4s\", %hu, \"%.6s\", \"%.8s\", 0x%8.8X)\n",
         NewFilename, Table->Signature, Table->Revision,
         Table->OemId, Table->OemTableId, Table->OemRevision);
 
@@ -776,7 +781,7 @@ AdDisplayTables (
  *
  *****************************************************************************/
 
-ACPI_STATUS
+static ACPI_STATUS
 AdDeferredParse (
     ACPI_PARSE_OBJECT       *Op,
     UINT8                   *Aml,
@@ -899,7 +904,7 @@ AdDeferredParse (
  *
  *****************************************************************************/
 
-ACPI_STATUS
+static ACPI_STATUS
 AdParseDeferredOps (
     ACPI_PARSE_OBJECT       *Root)
 {
@@ -1018,7 +1023,7 @@ AdGetLocalTables (
          * is architecture-dependent.
          */
         NumTables = (NewTable->Length - sizeof (ACPI_TABLE_HEADER)) / PointerSize;
-        AcpiOsPrintf ("There are %d tables defined in the %4.4s\n\n",
+        AcpiOsPrintf ("There are %u tables defined in the %4.4s\n\n",
             NumTables, NewTable->Signature);
 
         /* Get the FADT */
@@ -1156,7 +1161,7 @@ AdParseTable (
 
     /* If LoadTable is FALSE, we are parsing the last loaded table */
 
-    TableIndex = AcpiGbl_RootTableList.Count - 1;
+    TableIndex = AcpiGbl_RootTableList.CurrentTableCount - 1;
 
     /* Pass 2 */
 

Modified: stable/8/sys/contrib/dev/acpica/common/adwalk.c
==============================================================================
--- stable/8/sys/contrib/dev/acpica/common/adwalk.c	Fri Nov 19 12:56:13 2010	(r215520)
+++ stable/8/sys/contrib/dev/acpica/common/adwalk.c	Fri Nov 19 14:26:45 2010	(r215521)
@@ -537,7 +537,7 @@ AcpiDmFindOrphanDescending (
             }
 
             ArgCount = AcpiDmInspectPossibleArgs (3, 1, NextOp);
-            AcpiOsPrintf ("/* A-CHILDREN: %d Actual %d */\n", ArgCount, AcpiDmCountChildren (Op));
+            AcpiOsPrintf ("/* A-CHILDREN: %u Actual %u */\n", ArgCount, AcpiDmCountChildren (Op));
 
             if (ArgCount < 1)
             {
@@ -792,6 +792,7 @@ AcpiDmXrefDescendingOp (
     ACPI_PARSE_OBJECT       *NextOp;
     ACPI_NAMESPACE_NODE     *Node;
     ACPI_OPERAND_OBJECT     *Object;
+    UINT32                  ParamCount = 0;
 
 
     WalkState = Info->WalkState;
@@ -880,18 +881,13 @@ AcpiDmXrefDescendingOp (
         if (Object)
         {
             ObjectType2 = Object->Common.Type;
+            if (ObjectType2 == ACPI_TYPE_METHOD)
+            {
+                ParamCount = Object->Method.ParamCount;
+            }
         }
 
-        if (ObjectType2 == ACPI_TYPE_METHOD)
-        {
-            AcpiDmAddToExternalList (Op, Path, ACPI_TYPE_METHOD,
-                Object->Method.ParamCount);
-        }
-        else
-        {
-            AcpiDmAddToExternalList (Op, Path, (UINT8) ObjectType2, 0);
-        }
-
+        AcpiDmAddToExternalList (Op, Path, (UINT8) ObjectType2, ParamCount);
         Op->Common.Node = Node;
     }
     else

Modified: stable/8/sys/contrib/dev/acpica/common/dmextern.c
==============================================================================
--- stable/8/sys/contrib/dev/acpica/common/dmextern.c	Fri Nov 19 12:56:13 2010	(r215520)
+++ stable/8/sys/contrib/dev/acpica/common/dmextern.c	Fri Nov 19 14:26:45 2010	(r215521)
@@ -252,7 +252,7 @@ AcpiDmNormalizeParentPrefix (
     Node = Op->Common.Node;
     while (Node && (*Path == (UINT8) AML_PARENT_PREFIX))
     {
-        Node = AcpiNsGetParentNode (Node);
+        Node = Node->Parent;
         Path++;
     }
 
@@ -312,6 +312,95 @@ Cleanup:
 
 /*******************************************************************************
  *
+ * FUNCTION:    AcpiDmAddToExternalFileList
+ *
+ * PARAMETERS:  PathList            - Single path or list separated by comma
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Add external files to global list
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDmAddToExternalFileList (
+    char                    *PathList)
+{
+    ACPI_EXTERNAL_FILE      *ExternalFile;
+    char                    *Path;
+    char                    *TmpPath;
+
+
+    if (!PathList)
+    {
+        return (AE_OK);
+    }
+
+    Path = strtok (PathList, ",");
+
+    while (Path)
+    {
+        TmpPath = ACPI_ALLOCATE_ZEROED (ACPI_STRLEN (Path) + 1);
+        if (!TmpPath)
+        {
+            return (AE_NO_MEMORY);
+        }
+
+        ACPI_STRCPY (TmpPath, Path);
+
+        ExternalFile = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_EXTERNAL_FILE));
+        if (!ExternalFile)
+        {
+            ACPI_FREE (TmpPath);
+            return (AE_NO_MEMORY);
+        }
+
+        ExternalFile->Path = TmpPath;
+
+        if (AcpiGbl_ExternalFileList)
+        {
+            ExternalFile->Next = AcpiGbl_ExternalFileList;
+        }
+
+        AcpiGbl_ExternalFileList = ExternalFile;
+        Path = strtok (NULL, ",");
+    }
+
+    return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDmClearExternalFileList
+ *
+ * PARAMETERS:  None
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Clear the external file list
+ *
+ ******************************************************************************/
+
+void
+AcpiDmClearExternalFileList (
+    void)
+{
+    ACPI_EXTERNAL_FILE      *NextExternal;
+
+
+    while (AcpiGbl_ExternalFileList)
+    {
+        NextExternal = AcpiGbl_ExternalFileList->Next;
+        ACPI_FREE (AcpiGbl_ExternalFileList->Path);
+        ACPI_FREE (AcpiGbl_ExternalFileList);
+        AcpiGbl_ExternalFileList = NextExternal;
+    }
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    AcpiDmAddToExternalList
  *
  * PARAMETERS:  Op                  - Current parser Op
@@ -629,7 +718,7 @@ AcpiDmEmitExternals (
 
         if (AcpiGbl_ExternalList->Type == ACPI_TYPE_METHOD)
         {
-            AcpiOsPrintf (")    // %d Arguments\n",
+            AcpiOsPrintf (")    // %u Arguments\n",
                 AcpiGbl_ExternalList->Value);
         }
         else

Modified: stable/8/sys/contrib/dev/acpica/common/dmrestag.c
==============================================================================
--- stable/8/sys/contrib/dev/acpica/common/dmrestag.c	Fri Nov 19 12:56:13 2010	(r215520)
+++ stable/8/sys/contrib/dev/acpica/common/dmrestag.c	Fri Nov 19 14:26:45 2010	(r215521)
@@ -549,13 +549,6 @@ AcpiDmGetResourceNode (
             return (Node);
         }
 
-        /* List is circular, this flag marks the end */
-
-        if (Node->Flags & ANOBJ_END_OF_PEER_LIST)
-        {
-            return (NULL);
-        }
-
         Node = Node->Peer;
     }
 

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


More information about the svn-src-stable-8 mailing list