summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2012-02-16 22:59:29 +0000
committerjkim <jkim@FreeBSD.org>2012-02-16 22:59:29 +0000
commita561c762bacb78b14d2bf5fb20afc1566203f990 (patch)
treed4ae2db1980d2ec7b164b1a5658fd2ae62569456 /sys/contrib/dev/acpica
parent2b86faa18cb89921d202e133fa6a1c39b63cfe16 (diff)
parenta6dfe3119152f97e640cc135d963b9f7c95c84ef (diff)
downloadFreeBSD-src-a561c762bacb78b14d2bf5fb20afc1566203f990.zip
FreeBSD-src-a561c762bacb78b14d2bf5fb20afc1566203f990.tar.gz
Merge ACPICA 20120215.
Diffstat (limited to 'sys/contrib/dev/acpica')
-rwxr-xr-xsys/contrib/dev/acpica/acpica_prep.sh6
-rw-r--r--sys/contrib/dev/acpica/changes.txt92
-rw-r--r--sys/contrib/dev/acpica/compiler/aslrestype2s.c24
-rw-r--r--sys/contrib/dev/acpica/compiler/aslstubs.c16
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbcmds.c (renamed from sys/contrib/dev/acpica/debugger/dbcmds.c)29
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbdisply.c (renamed from sys/contrib/dev/acpica/debugger/dbdisply.c)6
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbexec.c (renamed from sys/contrib/dev/acpica/debugger/dbexec.c)0
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbfileio.c (renamed from sys/contrib/dev/acpica/debugger/dbfileio.c)0
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbhistry.c (renamed from sys/contrib/dev/acpica/debugger/dbhistry.c)0
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbinput.c (renamed from sys/contrib/dev/acpica/debugger/dbinput.c)3
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbmethod.c (renamed from sys/contrib/dev/acpica/debugger/dbmethod.c)0
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbnames.c (renamed from sys/contrib/dev/acpica/debugger/dbnames.c)0
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbstats.c (renamed from sys/contrib/dev/acpica/debugger/dbstats.c)0
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbutils.c (renamed from sys/contrib/dev/acpica/debugger/dbutils.c)0
-rw-r--r--sys/contrib/dev/acpica/components/debugger/dbxface.c (renamed from sys/contrib/dev/acpica/debugger/dbxface.c)0
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmbuffer.c (renamed from sys/contrib/dev/acpica/disassembler/dmbuffer.c)0
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmnames.c (renamed from sys/contrib/dev/acpica/disassembler/dmnames.c)0
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmobject.c (renamed from sys/contrib/dev/acpica/disassembler/dmobject.c)0
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmopcode.c (renamed from sys/contrib/dev/acpica/disassembler/dmopcode.c)0
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmresrc.c (renamed from sys/contrib/dev/acpica/disassembler/dmresrc.c)0
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmresrcl.c (renamed from sys/contrib/dev/acpica/disassembler/dmresrcl.c)0
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c (renamed from sys/contrib/dev/acpica/disassembler/dmresrcl2.c)6
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmresrcs.c (renamed from sys/contrib/dev/acpica/disassembler/dmresrcs.c)0
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmutils.c (renamed from sys/contrib/dev/acpica/disassembler/dmutils.c)0
-rw-r--r--sys/contrib/dev/acpica/components/disassembler/dmwalk.c (renamed from sys/contrib/dev/acpica/disassembler/dmwalk.c)0
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dsargs.c (renamed from sys/contrib/dev/acpica/dispatcher/dsargs.c)0
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dscontrol.c (renamed from sys/contrib/dev/acpica/dispatcher/dscontrol.c)0
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dsfield.c (renamed from sys/contrib/dev/acpica/dispatcher/dsfield.c)0
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dsinit.c (renamed from sys/contrib/dev/acpica/dispatcher/dsinit.c)0
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dsmethod.c (renamed from sys/contrib/dev/acpica/dispatcher/dsmethod.c)0
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c (renamed from sys/contrib/dev/acpica/dispatcher/dsmthdat.c)0
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dsobject.c (renamed from sys/contrib/dev/acpica/dispatcher/dsobject.c)0
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dsopcode.c (renamed from sys/contrib/dev/acpica/dispatcher/dsopcode.c)0
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dsutils.c (renamed from sys/contrib/dev/acpica/dispatcher/dsutils.c)0
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dswexec.c (renamed from sys/contrib/dev/acpica/dispatcher/dswexec.c)0
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dswload.c (renamed from sys/contrib/dev/acpica/dispatcher/dswload.c)0
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dswload2.c (renamed from sys/contrib/dev/acpica/dispatcher/dswload2.c)0
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dswscope.c (renamed from sys/contrib/dev/acpica/dispatcher/dswscope.c)0
-rw-r--r--sys/contrib/dev/acpica/components/dispatcher/dswstate.c (renamed from sys/contrib/dev/acpica/dispatcher/dswstate.c)0
-rw-r--r--sys/contrib/dev/acpica/components/events/evevent.c (renamed from sys/contrib/dev/acpica/events/evevent.c)4
-rw-r--r--sys/contrib/dev/acpica/components/events/evglock.c (renamed from sys/contrib/dev/acpica/events/evglock.c)3
-rw-r--r--sys/contrib/dev/acpica/components/events/evgpe.c (renamed from sys/contrib/dev/acpica/events/evgpe.c)3
-rw-r--r--sys/contrib/dev/acpica/components/events/evgpeblk.c (renamed from sys/contrib/dev/acpica/events/evgpeblk.c)3
-rw-r--r--sys/contrib/dev/acpica/components/events/evgpeinit.c (renamed from sys/contrib/dev/acpica/events/evgpeinit.c)3
-rw-r--r--sys/contrib/dev/acpica/components/events/evgpeutil.c (renamed from sys/contrib/dev/acpica/events/evgpeutil.c)3
-rw-r--r--sys/contrib/dev/acpica/components/events/evmisc.c (renamed from sys/contrib/dev/acpica/events/evmisc.c)25
-rw-r--r--sys/contrib/dev/acpica/components/events/evregion.c (renamed from sys/contrib/dev/acpica/events/evregion.c)0
-rw-r--r--sys/contrib/dev/acpica/components/events/evrgnini.c (renamed from sys/contrib/dev/acpica/events/evrgnini.c)0
-rw-r--r--sys/contrib/dev/acpica/components/events/evsci.c (renamed from sys/contrib/dev/acpica/events/evsci.c)4
-rw-r--r--sys/contrib/dev/acpica/components/events/evxface.c (renamed from sys/contrib/dev/acpica/events/evxface.c)504
-rw-r--r--sys/contrib/dev/acpica/components/events/evxfevnt.c (renamed from sys/contrib/dev/acpica/events/evxfevnt.c)3
-rw-r--r--sys/contrib/dev/acpica/components/events/evxfgpe.c (renamed from sys/contrib/dev/acpica/events/evxfgpe.c)3
-rw-r--r--sys/contrib/dev/acpica/components/events/evxfregn.c (renamed from sys/contrib/dev/acpica/events/evxfregn.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exconfig.c (renamed from sys/contrib/dev/acpica/executer/exconfig.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exconvrt.c (renamed from sys/contrib/dev/acpica/executer/exconvrt.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/excreate.c (renamed from sys/contrib/dev/acpica/executer/excreate.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exdebug.c (renamed from sys/contrib/dev/acpica/executer/exdebug.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exdump.c (renamed from sys/contrib/dev/acpica/executer/exdump.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exfield.c (renamed from sys/contrib/dev/acpica/executer/exfield.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exfldio.c (renamed from sys/contrib/dev/acpica/executer/exfldio.c)2
-rw-r--r--sys/contrib/dev/acpica/components/executer/exmisc.c (renamed from sys/contrib/dev/acpica/executer/exmisc.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exmutex.c (renamed from sys/contrib/dev/acpica/executer/exmutex.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exnames.c (renamed from sys/contrib/dev/acpica/executer/exnames.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exoparg1.c (renamed from sys/contrib/dev/acpica/executer/exoparg1.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exoparg2.c (renamed from sys/contrib/dev/acpica/executer/exoparg2.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exoparg3.c (renamed from sys/contrib/dev/acpica/executer/exoparg3.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exoparg6.c (renamed from sys/contrib/dev/acpica/executer/exoparg6.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exprep.c (renamed from sys/contrib/dev/acpica/executer/exprep.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exregion.c (renamed from sys/contrib/dev/acpica/executer/exregion.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exresnte.c (renamed from sys/contrib/dev/acpica/executer/exresnte.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exresolv.c (renamed from sys/contrib/dev/acpica/executer/exresolv.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exresop.c (renamed from sys/contrib/dev/acpica/executer/exresop.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exstore.c (renamed from sys/contrib/dev/acpica/executer/exstore.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exstoren.c (renamed from sys/contrib/dev/acpica/executer/exstoren.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exstorob.c (renamed from sys/contrib/dev/acpica/executer/exstorob.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exsystem.c (renamed from sys/contrib/dev/acpica/executer/exsystem.c)0
-rw-r--r--sys/contrib/dev/acpica/components/executer/exutils.c (renamed from sys/contrib/dev/acpica/executer/exutils.c)0
-rw-r--r--sys/contrib/dev/acpica/components/hardware/hwacpi.c (renamed from sys/contrib/dev/acpica/hardware/hwacpi.c)3
-rw-r--r--sys/contrib/dev/acpica/components/hardware/hwesleep.c263
-rw-r--r--sys/contrib/dev/acpica/components/hardware/hwgpe.c (renamed from sys/contrib/dev/acpica/hardware/hwgpe.c)3
-rw-r--r--sys/contrib/dev/acpica/components/hardware/hwpci.c (renamed from sys/contrib/dev/acpica/hardware/hwpci.c)0
-rw-r--r--sys/contrib/dev/acpica/components/hardware/hwregs.c (renamed from sys/contrib/dev/acpica/hardware/hwregs.c)14
-rw-r--r--sys/contrib/dev/acpica/components/hardware/hwsleep.c (renamed from sys/contrib/dev/acpica/hardware/hwsleep.c)377
-rw-r--r--sys/contrib/dev/acpica/components/hardware/hwtimer.c (renamed from sys/contrib/dev/acpica/hardware/hwtimer.c)2
-rw-r--r--sys/contrib/dev/acpica/components/hardware/hwvalid.c (renamed from sys/contrib/dev/acpica/hardware/hwvalid.c)0
-rw-r--r--sys/contrib/dev/acpica/components/hardware/hwxface.c (renamed from sys/contrib/dev/acpica/hardware/hwxface.c)55
-rw-r--r--sys/contrib/dev/acpica/components/hardware/hwxfsleep.c474
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nsaccess.c (renamed from sys/contrib/dev/acpica/namespace/nsaccess.c)0
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nsalloc.c (renamed from sys/contrib/dev/acpica/namespace/nsalloc.c)0
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nsdump.c (renamed from sys/contrib/dev/acpica/namespace/nsdump.c)0
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nsdumpdv.c (renamed from sys/contrib/dev/acpica/namespace/nsdumpdv.c)0
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nseval.c (renamed from sys/contrib/dev/acpica/namespace/nseval.c)0
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nsinit.c (renamed from sys/contrib/dev/acpica/namespace/nsinit.c)0
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nsload.c (renamed from sys/contrib/dev/acpica/namespace/nsload.c)0
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nsnames.c (renamed from sys/contrib/dev/acpica/namespace/nsnames.c)0
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nsobject.c (renamed from sys/contrib/dev/acpica/namespace/nsobject.c)0
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nsparse.c (renamed from sys/contrib/dev/acpica/namespace/nsparse.c)0
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nspredef.c (renamed from sys/contrib/dev/acpica/namespace/nspredef.c)0
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nsrepair.c (renamed from sys/contrib/dev/acpica/namespace/nsrepair.c)0
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nsrepair2.c (renamed from sys/contrib/dev/acpica/namespace/nsrepair2.c)0
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nssearch.c (renamed from sys/contrib/dev/acpica/namespace/nssearch.c)0
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nsutils.c (renamed from sys/contrib/dev/acpica/namespace/nsutils.c)0
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nswalk.c (renamed from sys/contrib/dev/acpica/namespace/nswalk.c)0
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nsxfeval.c (renamed from sys/contrib/dev/acpica/namespace/nsxfeval.c)0
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nsxfname.c (renamed from sys/contrib/dev/acpica/namespace/nsxfname.c)0
-rw-r--r--sys/contrib/dev/acpica/components/namespace/nsxfobj.c (renamed from sys/contrib/dev/acpica/namespace/nsxfobj.c)0
-rw-r--r--sys/contrib/dev/acpica/components/parser/psargs.c (renamed from sys/contrib/dev/acpica/parser/psargs.c)0
-rw-r--r--sys/contrib/dev/acpica/components/parser/psloop.c (renamed from sys/contrib/dev/acpica/parser/psloop.c)0
-rw-r--r--sys/contrib/dev/acpica/components/parser/psopcode.c (renamed from sys/contrib/dev/acpica/parser/psopcode.c)0
-rw-r--r--sys/contrib/dev/acpica/components/parser/psparse.c (renamed from sys/contrib/dev/acpica/parser/psparse.c)0
-rw-r--r--sys/contrib/dev/acpica/components/parser/psscope.c (renamed from sys/contrib/dev/acpica/parser/psscope.c)0
-rw-r--r--sys/contrib/dev/acpica/components/parser/pstree.c (renamed from sys/contrib/dev/acpica/parser/pstree.c)0
-rw-r--r--sys/contrib/dev/acpica/components/parser/psutils.c (renamed from sys/contrib/dev/acpica/parser/psutils.c)0
-rw-r--r--sys/contrib/dev/acpica/components/parser/pswalk.c (renamed from sys/contrib/dev/acpica/parser/pswalk.c)0
-rw-r--r--sys/contrib/dev/acpica/components/parser/psxface.c (renamed from sys/contrib/dev/acpica/parser/psxface.c)0
-rw-r--r--sys/contrib/dev/acpica/components/resources/rsaddr.c (renamed from sys/contrib/dev/acpica/resources/rsaddr.c)0
-rw-r--r--sys/contrib/dev/acpica/components/resources/rscalc.c (renamed from sys/contrib/dev/acpica/resources/rscalc.c)0
-rw-r--r--sys/contrib/dev/acpica/components/resources/rscreate.c (renamed from sys/contrib/dev/acpica/resources/rscreate.c)0
-rw-r--r--sys/contrib/dev/acpica/components/resources/rsdump.c (renamed from sys/contrib/dev/acpica/resources/rsdump.c)0
-rw-r--r--sys/contrib/dev/acpica/components/resources/rsinfo.c (renamed from sys/contrib/dev/acpica/resources/rsinfo.c)0
-rw-r--r--sys/contrib/dev/acpica/components/resources/rsio.c (renamed from sys/contrib/dev/acpica/resources/rsio.c)0
-rw-r--r--sys/contrib/dev/acpica/components/resources/rsirq.c (renamed from sys/contrib/dev/acpica/resources/rsirq.c)0
-rw-r--r--sys/contrib/dev/acpica/components/resources/rslist.c (renamed from sys/contrib/dev/acpica/resources/rslist.c)0
-rw-r--r--sys/contrib/dev/acpica/components/resources/rsmemory.c (renamed from sys/contrib/dev/acpica/resources/rsmemory.c)0
-rw-r--r--sys/contrib/dev/acpica/components/resources/rsmisc.c (renamed from sys/contrib/dev/acpica/resources/rsmisc.c)0
-rw-r--r--sys/contrib/dev/acpica/components/resources/rsserial.c (renamed from sys/contrib/dev/acpica/resources/rsserial.c)0
-rw-r--r--sys/contrib/dev/acpica/components/resources/rsutils.c (renamed from sys/contrib/dev/acpica/resources/rsutils.c)0
-rw-r--r--sys/contrib/dev/acpica/components/resources/rsxface.c (renamed from sys/contrib/dev/acpica/resources/rsxface.c)0
-rw-r--r--sys/contrib/dev/acpica/components/tables/tbfadt.c (renamed from sys/contrib/dev/acpica/tables/tbfadt.c)0
-rw-r--r--sys/contrib/dev/acpica/components/tables/tbfind.c (renamed from sys/contrib/dev/acpica/tables/tbfind.c)0
-rw-r--r--sys/contrib/dev/acpica/components/tables/tbinstal.c (renamed from sys/contrib/dev/acpica/tables/tbinstal.c)115
-rw-r--r--sys/contrib/dev/acpica/components/tables/tbutils.c (renamed from sys/contrib/dev/acpica/tables/tbutils.c)82
-rw-r--r--sys/contrib/dev/acpica/components/tables/tbxface.c (renamed from sys/contrib/dev/acpica/tables/tbxface.c)0
-rw-r--r--sys/contrib/dev/acpica/components/tables/tbxfroot.c (renamed from sys/contrib/dev/acpica/tables/tbxfroot.c)0
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utaddress.c (renamed from sys/contrib/dev/acpica/utilities/utaddress.c)0
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utalloc.c (renamed from sys/contrib/dev/acpica/utilities/utalloc.c)0
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utcache.c (renamed from sys/contrib/dev/acpica/utilities/utcache.c)0
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utcopy.c (renamed from sys/contrib/dev/acpica/utilities/utcopy.c)0
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utdebug.c (renamed from sys/contrib/dev/acpica/utilities/utdebug.c)0
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utdecode.c (renamed from sys/contrib/dev/acpica/utilities/utdecode.c)35
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utdelete.c (renamed from sys/contrib/dev/acpica/utilities/utdelete.c)0
-rw-r--r--sys/contrib/dev/acpica/components/utilities/uteval.c (renamed from sys/contrib/dev/acpica/utilities/uteval.c)0
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utglobal.c (renamed from sys/contrib/dev/acpica/utilities/utglobal.c)9
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utids.c (renamed from sys/contrib/dev/acpica/utilities/utids.c)0
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utinit.c (renamed from sys/contrib/dev/acpica/utilities/utinit.c)43
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utlock.c (renamed from sys/contrib/dev/acpica/utilities/utlock.c)0
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utmath.c (renamed from sys/contrib/dev/acpica/utilities/utmath.c)0
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utmisc.c (renamed from sys/contrib/dev/acpica/utilities/utmisc.c)0
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utmutex.c (renamed from sys/contrib/dev/acpica/utilities/utmutex.c)0
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utobject.c (renamed from sys/contrib/dev/acpica/utilities/utobject.c)0
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utosi.c (renamed from sys/contrib/dev/acpica/utilities/utosi.c)0
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utresrc.c (renamed from sys/contrib/dev/acpica/utilities/utresrc.c)0
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utstate.c (renamed from sys/contrib/dev/acpica/utilities/utstate.c)0
-rw-r--r--sys/contrib/dev/acpica/components/utilities/uttrack.c (renamed from sys/contrib/dev/acpica/utilities/uttrack.c)0
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utxface.c (renamed from sys/contrib/dev/acpica/utilities/utxface.c)9
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utxferror.c (renamed from sys/contrib/dev/acpica/utilities/utxferror.c)0
-rw-r--r--sys/contrib/dev/acpica/components/utilities/utxfmutex.c (renamed from sys/contrib/dev/acpica/utilities/utxfmutex.c)0
-rw-r--r--sys/contrib/dev/acpica/include/acconfig.h19
-rw-r--r--sys/contrib/dev/acpica/include/acdebug.h6
-rw-r--r--sys/contrib/dev/acpica/include/acevents.h16
-rw-r--r--sys/contrib/dev/acpica/include/acexcep.h6
-rw-r--r--sys/contrib/dev/acpica/include/acglobal.h10
-rw-r--r--sys/contrib/dev/acpica/include/achware.h55
-rw-r--r--sys/contrib/dev/acpica/include/acmacros.h9
-rw-r--r--sys/contrib/dev/acpica/include/acpiosxf.h10
-rw-r--r--sys/contrib/dev/acpica/include/acpixf.h160
-rw-r--r--sys/contrib/dev/acpica/include/actables.h5
-rw-r--r--sys/contrib/dev/acpica/include/actbl.h7
-rw-r--r--sys/contrib/dev/acpica/include/actypes.h19
-rw-r--r--sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c39
170 files changed, 1774 insertions, 813 deletions
diff --git a/sys/contrib/dev/acpica/acpica_prep.sh b/sys/contrib/dev/acpica/acpica_prep.sh
index dccf796..74aaaa5 100755
--- a/sys/contrib/dev/acpica/acpica_prep.sh
+++ b/sys/contrib/dev/acpica/acpica_prep.sh
@@ -14,12 +14,10 @@ wrk=`realpath ./_acpi_ca_unpack`
dst=`realpath ./acpi_ca_destination`
# files that should keep their full directory path
-fulldirs="common compiler debugger disassembler dispatcher events \
- executer hardware include namespace os_specific parser \
- resources tables utilities"
+fulldirs="common compiler components include os_specific"
# files to remove
-stripdirs="generate tests tools"
+stripdirs="generate libraries tests tools"
stripfiles="Makefile README acintel.h aclinux.h acmsvc.h acnetbsd.h \
acos2.h accygwin.h acefi.h acwin.h acwin64.h osunixdir.c \
oswindir.c oswintbl.c oswinxf.c readme.txt utclib.c"
diff --git a/sys/contrib/dev/acpica/changes.txt b/sys/contrib/dev/acpica/changes.txt
index 3271b2b..f328ad1 100644
--- a/sys/contrib/dev/acpica/changes.txt
+++ b/sys/contrib/dev/acpica/changes.txt
@@ -1,4 +1,96 @@
----------------------------------------
+15 February 2012. Summary of changes for version 20120215:
+
+This release is available at www.acpica.org/downloads.
+The ACPI 5.0 specification is available at www.acpi.info.
+
+1) ACPICA Core Subsystem:
+
+There have been some major changes to the sleep/wake support code, as
+described below (a - e).
+
+a) The AcpiLeaveSleepState has been split into two interfaces, similar to
+AcpiEnterSleepStatePrep and AcpiEnterSleepState. The new interface is
+AcpiLeaveSleepStatePrep. This allows the host to perform actions between the
+time the _BFS method is called and the _WAK method is called. NOTE: all hosts
+must update their wake/resume code or else sleep/wake will not work properly.
+Rafael Wysocki.
+
+b) In AcpiLeaveSleepState, now enable all runtime GPEs before calling the _WAK
+method. Some machines require that the GPEs are enabled before the _WAK method
+is executed. Thomas Renninger.
+
+c) In AcpiLeaveSleepState, now always clear the WAK_STS (wake status) bit.
+Some BIOS code assumes that WAK_STS will be cleared on resume and use it to
+determine whether the system is rebooting or resuming. Matthew Garrett.
+
+d) Move the invocations of _GTS (Going To Sleep) and _BFS (Back From Sleep) to
+match the ACPI specification requirement. Rafael Wysocki.
+
+e) Implemented full support for the ACPI 5.0 SleepStatus and SleepControl
+registers within the V5 FADT. This support adds two new files:
+hardware/hwesleep.c implements the support for the new registers. Moved all
+sleep/wake external interfaces to hardware/hwxfsleep.c.
+
+
+Added a new OSL interface for ACPI table overrides,
+AcpiOsPhysicalTableOverride. This interface allows the host to override a
+table via a physical address, instead of the logical address required by
+AcpiOsTableOverride. This simplifies the host implementation. Initial
+implementation by Thomas Renninger. The ACPICA implementation creates a single
+shared function for table overrides that attempts both a logical and a
+physical override.
+
+Expanded the OSL memory read/write interfaces to 64-bit data
+(AcpiOsReadMemory, AcpiOsWriteMemory.) This enables full 64-bit memory
+transfer support for GAS register structures passed to AcpiRead and AcpiWrite.
+
+Implemented the ACPI_REDUCED_HARDWARE option to allow the creation of a custom
+build of ACPICA that supports only the ACPI 5.0 reduced hardware (SoC) model.
+See the ACPICA reference for details. ACPICA BZ 942. This option removes about
+10% of the code and 5% of the static data, and the following hardware ACPI
+features become unavailable:
+ PM Event and Control registers
+ SCI interrupt (and handler)
+ Fixed Events
+ General Purpose Events (GPEs)
+ Global Lock
+ ACPI PM timer
+ FACS table (Waking vectors and Global Lock)
+
+Updated the unix tarball directory structure to match the ACPICA git source
+tree. This ensures that the generic unix makefiles work properly (in
+generate/unix). Also updated the Linux makefiles to match. ACPICA BZ 867.
+
+Updated the return value of the _REV predefined method to integer value 5 to
+reflect ACPI 5.0 support.
+
+Moved the external ACPI PM timer interface prototypes to the public acpixf.h
+file where they belong.
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug
+version of the code includes the debug output trace mechanism and has a much
+larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 92.8K Code, 24.9K Data, 117.7K Total
+ Debug Version: 171.7K Code, 72.9K Data, 244.5K Total
+ Current Release:
+ Non-Debug Version: 93.0K Code, 25.0K Data, 118.0K Total
+ Debug Version: 172.5K Code, 73.2K Data, 245.7K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+Disassembler: Fixed a problem with the new ACPI 5.0 serial resource
+descriptors (I2C, SPI, UART) where the resource produce/consumer bit was
+incorrectly displayed.
+
+AcpiHelp: Add display of ACPI/PNP device IDs that are defined in the ACPI
+specification.
+
+----------------------------------------
11 January 2012. Summary of changes for version 20120111:
This release is available at www.acpica.org/downloads.
diff --git a/sys/contrib/dev/acpica/compiler/aslrestype2s.c b/sys/contrib/dev/acpica/compiler/aslrestype2s.c
index 4c54d24..fa30b58 100644
--- a/sys/contrib/dev/acpica/compiler/aslrestype2s.c
+++ b/sys/contrib/dev/acpica/compiler/aslrestype2s.c
@@ -192,7 +192,7 @@ RsGetVendorData (
UINT16 ActualLength = 0;
- /* VendorData field is always optional */
+ /* Vendor Data field is always optional */
if (InitializerOp->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG)
{
@@ -374,7 +374,7 @@ RsDoGpioIntDescriptor (
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.PinConfig));
break;
- case 4: /* DebounceTimeout [WORD] (_DBT) */
+ case 4: /* Debounce Timeout [WORD] (_DBT) */
Descriptor->Gpio.DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
RsCreateWordField (InitializerOp, ACPI_RESTAG_DEBOUNCETIME,
@@ -405,7 +405,7 @@ RsDoGpioIntDescriptor (
RsSetFlagBits16 (&Descriptor->Gpio.Flags, InitializerOp, 0, 1);
break;
- case 8: /* ResourceTag (Descriptor Name) */
+ case 8: /* Resource Tag (Descriptor Name) */
UtAttachNamepathToOwner (Op, InitializerOp);
break;
@@ -566,7 +566,7 @@ RsDoGpioIoDescriptor (
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.PinConfig));
break;
- case 2: /* DebounceTimeout [WORD] (_DBT) */
+ case 2: /* Debounce Timeout [WORD] (_DBT) */
Descriptor->Gpio.DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
RsCreateWordField (InitializerOp, ACPI_RESTAG_DEBOUNCETIME,
@@ -611,7 +611,7 @@ RsDoGpioIoDescriptor (
RsSetFlagBits16 (&Descriptor->Gpio.Flags, InitializerOp, 0, 1);
break;
- case 8: /* ResourceTag (Descriptor Name) */
+ case 8: /* Resource Tag (Descriptor Name) */
UtAttachNamepathToOwner (Op, InitializerOp);
break;
@@ -762,14 +762,14 @@ RsDoI2cSerialBusDescriptor (
CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.Flags), 0);
break;
- case 2: /* ConnectionSpeed [DWORD] (_SPE) */
+ case 2: /* Connection Speed [DWORD] (_SPE) */
Descriptor->I2cSerialBus.ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.ConnectionSpeed));
break;
- case 3: /* Addresssing Mode [Flag] (_MOD) */
+ case 3: /* Addressing Mode [Flag] (_MOD) */
RsSetFlagBits16 (&Descriptor->I2cSerialBus.TypeSpecificFlags, InitializerOp, 0, 0);
RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE,
@@ -800,7 +800,7 @@ RsDoI2cSerialBusDescriptor (
RsSetFlagBits (&Descriptor->I2cSerialBus.Flags, InitializerOp, 1, 1);
break;
- case 7: /* ResourceTag (Descriptor Name) */
+ case 7: /* Resource Tag (Descriptor Name) */
UtAttachNamepathToOwner (Op, InitializerOp);
break;
@@ -929,7 +929,7 @@ RsDoSpiSerialBusDescriptor (
CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.Flags), 0);
break;
- case 5: /* ConnectionSpeed [DWORD] (_SPE) */
+ case 5: /* Connection Speed [DWORD] (_SPE) */
Descriptor->SpiSerialBus.ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
@@ -974,7 +974,7 @@ RsDoSpiSerialBusDescriptor (
RsSetFlagBits (&Descriptor->SpiSerialBus.Flags, InitializerOp, 1, 1);
break;
- case 11: /* ResourceTag (Descriptor Name) */
+ case 11: /* Resource Tag (Descriptor Name) */
UtAttachNamepathToOwner (Op, InitializerOp);
break;
@@ -1068,7 +1068,7 @@ RsDoUartSerialBusDescriptor (
{
switch (i)
{
- case 0: /* ConnectionSpeed (Baud Rate) [DWORD] (_SPE) */
+ case 0: /* Connection Speed (Baud Rate) [DWORD] (_SPE) */
Descriptor->UartSerialBus.DefaultBaudRate = (UINT32) InitializerOp->Asl.Value.Integer;
RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
@@ -1165,7 +1165,7 @@ RsDoUartSerialBusDescriptor (
CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.Flags), 0);
break;
- case 12: /* ResourceTag (Descriptor Name) */
+ case 12: /* Resource Tag (Descriptor Name) */
UtAttachNamepathToOwner (Op, InitializerOp);
break;
diff --git a/sys/contrib/dev/acpica/compiler/aslstubs.c b/sys/contrib/dev/acpica/compiler/aslstubs.c
index 5a83a0b..f953b30 100644
--- a/sys/contrib/dev/acpica/compiler/aslstubs.c
+++ b/sys/contrib/dev/acpica/compiler/aslstubs.c
@@ -128,13 +128,6 @@ AcpiDsStoreObjectToLocal (
}
ACPI_STATUS
-AcpiEvDeleteGpeBlock (
- ACPI_GPE_BLOCK_INFO *GpeBlock)
-{
- return (AE_OK);
-}
-
-ACPI_STATUS
AcpiEvQueueNotifyRequest (
ACPI_NAMESPACE_NODE *Node,
UINT32 NotifyValue)
@@ -149,6 +142,14 @@ AcpiEvIsNotifyObject (
return (FALSE);
}
+#if (!ACPI_REDUCED_HARDWARE)
+ACPI_STATUS
+AcpiEvDeleteGpeBlock (
+ ACPI_GPE_BLOCK_INFO *GpeBlock)
+{
+ return (AE_OK);
+}
+
ACPI_STATUS
AcpiEvAcquireGlobalLock (
UINT16 Timeout)
@@ -162,6 +163,7 @@ AcpiEvReleaseGlobalLock (
{
return (AE_OK);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
ACPI_STATUS
AcpiEvInitializeRegion (
diff --git a/sys/contrib/dev/acpica/debugger/dbcmds.c b/sys/contrib/dev/acpica/components/debugger/dbcmds.c
index 13bc3b8..7b99571 100644
--- a/sys/contrib/dev/acpica/debugger/dbcmds.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbcmds.c
@@ -161,28 +161,49 @@ AcpiDbSleep (
UINT8 SleepState;
+ ACPI_FUNCTION_TRACE (AcpiDbSleep);
+
+
SleepState = (UINT8) ACPI_STRTOUL (ObjectArg, NULL, 0);
AcpiOsPrintf ("**** Prepare to sleep ****\n");
Status = AcpiEnterSleepStatePrep (SleepState);
if (ACPI_FAILURE (Status))
{
- return (Status);
+ goto ErrorExit;
}
AcpiOsPrintf ("**** Going to sleep ****\n");
Status = AcpiEnterSleepState (SleepState);
if (ACPI_FAILURE (Status))
{
- return (Status);
+ goto ErrorExit;
+ }
+
+ AcpiOsPrintf ("**** Prepare to return from sleep ****\n");
+ Status = AcpiLeaveSleepStatePrep (SleepState);
+ if (ACPI_FAILURE (Status))
+ {
+ goto ErrorExit;
}
- AcpiOsPrintf ("**** returning from sleep ****\n");
+ AcpiOsPrintf ("**** Returning from sleep ****\n");
Status = AcpiLeaveSleepState (SleepState);
+ if (ACPI_FAILURE (Status))
+ {
+ goto ErrorExit;
+ }
+
+ return (Status);
+
+ErrorExit:
+
+ ACPI_EXCEPTION ((AE_INFO, Status, "During sleep test"));
return (Status);
}
+
/*******************************************************************************
*
* FUNCTION: AcpiDbDisplayLocks
@@ -1019,6 +1040,7 @@ AcpiDbDisplayResources (
}
+#if (!ACPI_REDUCED_HARDWARE)
/*******************************************************************************
*
* FUNCTION: AcpiDbGenerateGpe
@@ -1057,5 +1079,6 @@ AcpiDbGenerateGpe (
(void) AcpiEvGpeDispatch (NULL, GpeEventInfo, GpeNumber);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
#endif /* ACPI_DEBUGGER */
diff --git a/sys/contrib/dev/acpica/debugger/dbdisply.c b/sys/contrib/dev/acpica/components/debugger/dbdisply.c
index 5b17da5..dcedc30 100644
--- a/sys/contrib/dev/acpica/debugger/dbdisply.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbdisply.c
@@ -770,6 +770,7 @@ AcpiDbDisplayArgumentObject (
}
+#if (!ACPI_REDUCED_HARDWARE)
/*******************************************************************************
*
* FUNCTION: AcpiDbDisplayGpes
@@ -932,6 +933,7 @@ AcpiDbDisplayGpes (
GpeXruptInfo = GpeXruptInfo->Next;
}
}
+#endif /* !ACPI_REDUCED_HARDWARE */
/*******************************************************************************
@@ -1011,6 +1013,8 @@ AcpiDbDisplayHandlers (
}
}
+#if (!ACPI_REDUCED_HARDWARE)
+
/* Fixed event handlers */
AcpiOsPrintf ("\nFixed Event Handlers:\n");
@@ -1029,6 +1033,8 @@ AcpiDbDisplayHandlers (
}
}
+#endif /* !ACPI_REDUCED_HARDWARE */
+
/* Miscellaneous global handlers */
AcpiOsPrintf ("\nMiscellaneous Global Handlers:\n");
diff --git a/sys/contrib/dev/acpica/debugger/dbexec.c b/sys/contrib/dev/acpica/components/debugger/dbexec.c
index 525d84a..525d84a 100644
--- a/sys/contrib/dev/acpica/debugger/dbexec.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbexec.c
diff --git a/sys/contrib/dev/acpica/debugger/dbfileio.c b/sys/contrib/dev/acpica/components/debugger/dbfileio.c
index a558e42..a558e42 100644
--- a/sys/contrib/dev/acpica/debugger/dbfileio.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbfileio.c
diff --git a/sys/contrib/dev/acpica/debugger/dbhistry.c b/sys/contrib/dev/acpica/components/debugger/dbhistry.c
index 6982627..6982627 100644
--- a/sys/contrib/dev/acpica/debugger/dbhistry.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbhistry.c
diff --git a/sys/contrib/dev/acpica/debugger/dbinput.c b/sys/contrib/dev/acpica/components/debugger/dbinput.c
index 5f60997..e56fad9 100644
--- a/sys/contrib/dev/acpica/debugger/dbinput.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbinput.c
@@ -662,12 +662,15 @@ AcpiDbCommandDispatch (
break;
case CMD_ENABLEACPI:
+#if (!ACPI_REDUCED_HARDWARE)
+
Status = AcpiEnable();
if (ACPI_FAILURE(Status))
{
AcpiOsPrintf("AcpiEnable failed (Status=%X)\n", Status);
return (Status);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
break;
case CMD_EVENT:
diff --git a/sys/contrib/dev/acpica/debugger/dbmethod.c b/sys/contrib/dev/acpica/components/debugger/dbmethod.c
index ee6677d..ee6677d 100644
--- a/sys/contrib/dev/acpica/debugger/dbmethod.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbmethod.c
diff --git a/sys/contrib/dev/acpica/debugger/dbnames.c b/sys/contrib/dev/acpica/components/debugger/dbnames.c
index c55ff72..c55ff72 100644
--- a/sys/contrib/dev/acpica/debugger/dbnames.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbnames.c
diff --git a/sys/contrib/dev/acpica/debugger/dbstats.c b/sys/contrib/dev/acpica/components/debugger/dbstats.c
index c51d612..c51d612 100644
--- a/sys/contrib/dev/acpica/debugger/dbstats.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbstats.c
diff --git a/sys/contrib/dev/acpica/debugger/dbutils.c b/sys/contrib/dev/acpica/components/debugger/dbutils.c
index a46af94..a46af94 100644
--- a/sys/contrib/dev/acpica/debugger/dbutils.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbutils.c
diff --git a/sys/contrib/dev/acpica/debugger/dbxface.c b/sys/contrib/dev/acpica/components/debugger/dbxface.c
index 68f927e..68f927e 100644
--- a/sys/contrib/dev/acpica/debugger/dbxface.c
+++ b/sys/contrib/dev/acpica/components/debugger/dbxface.c
diff --git a/sys/contrib/dev/acpica/disassembler/dmbuffer.c b/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c
index ee27856..ee27856 100644
--- a/sys/contrib/dev/acpica/disassembler/dmbuffer.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c
diff --git a/sys/contrib/dev/acpica/disassembler/dmnames.c b/sys/contrib/dev/acpica/components/disassembler/dmnames.c
index 6129cc1..6129cc1 100644
--- a/sys/contrib/dev/acpica/disassembler/dmnames.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmnames.c
diff --git a/sys/contrib/dev/acpica/disassembler/dmobject.c b/sys/contrib/dev/acpica/components/disassembler/dmobject.c
index 8ec3527..8ec3527 100644
--- a/sys/contrib/dev/acpica/disassembler/dmobject.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmobject.c
diff --git a/sys/contrib/dev/acpica/disassembler/dmopcode.c b/sys/contrib/dev/acpica/components/disassembler/dmopcode.c
index d096010..d096010 100644
--- a/sys/contrib/dev/acpica/disassembler/dmopcode.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmopcode.c
diff --git a/sys/contrib/dev/acpica/disassembler/dmresrc.c b/sys/contrib/dev/acpica/components/disassembler/dmresrc.c
index 57ad33b..57ad33b 100644
--- a/sys/contrib/dev/acpica/disassembler/dmresrc.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmresrc.c
diff --git a/sys/contrib/dev/acpica/disassembler/dmresrcl.c b/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c
index 72a6e0f..72a6e0f 100644
--- a/sys/contrib/dev/acpica/disassembler/dmresrcl.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c
diff --git a/sys/contrib/dev/acpica/disassembler/dmresrcl2.c b/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c
index 9cd9f27..fbc80a1 100644
--- a/sys/contrib/dev/acpica/disassembler/dmresrcl2.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c
@@ -503,7 +503,7 @@ AcpiDmI2cSerialBusDescriptor (
AcpiOsPrintf ("0x%2.2X, ", Resource->I2cSerialBus.ResSourceIndex);
AcpiOsPrintf ("%s, ",
- AcpiGbl_ConsumeDecode [(Resource->I2cSerialBus.Flags & 1)]);
+ AcpiGbl_ConsumeDecode [(Resource->I2cSerialBus.Flags >> 1) & 1]);
/* Insert a descriptor name */
@@ -578,7 +578,7 @@ AcpiDmSpiSerialBusDescriptor (
AcpiOsPrintf ("0x%2.2X, ", Resource->SpiSerialBus.ResSourceIndex);
AcpiOsPrintf ("%s, ",
- AcpiGbl_ConsumeDecode [(Resource->SpiSerialBus.Flags & 1)]);
+ AcpiGbl_ConsumeDecode [(Resource->SpiSerialBus.Flags >> 1) & 1]);
/* Insert a descriptor name */
@@ -656,7 +656,7 @@ AcpiDmUartSerialBusDescriptor (
AcpiOsPrintf ("0x%2.2X, ", Resource->UartSerialBus.ResSourceIndex);
AcpiOsPrintf ("%s, ",
- AcpiGbl_ConsumeDecode [(Resource->UartSerialBus.Flags & 1)]);
+ AcpiGbl_ConsumeDecode [(Resource->UartSerialBus.Flags >> 1) & 1]);
/* Insert a descriptor name */
diff --git a/sys/contrib/dev/acpica/disassembler/dmresrcs.c b/sys/contrib/dev/acpica/components/disassembler/dmresrcs.c
index f57d8e2..f57d8e2 100644
--- a/sys/contrib/dev/acpica/disassembler/dmresrcs.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmresrcs.c
diff --git a/sys/contrib/dev/acpica/disassembler/dmutils.c b/sys/contrib/dev/acpica/components/disassembler/dmutils.c
index 05616ef..05616ef 100644
--- a/sys/contrib/dev/acpica/disassembler/dmutils.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmutils.c
diff --git a/sys/contrib/dev/acpica/disassembler/dmwalk.c b/sys/contrib/dev/acpica/components/disassembler/dmwalk.c
index 39bc5ce..39bc5ce 100644
--- a/sys/contrib/dev/acpica/disassembler/dmwalk.c
+++ b/sys/contrib/dev/acpica/components/disassembler/dmwalk.c
diff --git a/sys/contrib/dev/acpica/dispatcher/dsargs.c b/sys/contrib/dev/acpica/components/dispatcher/dsargs.c
index 0602905..0602905 100644
--- a/sys/contrib/dev/acpica/dispatcher/dsargs.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dsargs.c
diff --git a/sys/contrib/dev/acpica/dispatcher/dscontrol.c b/sys/contrib/dev/acpica/components/dispatcher/dscontrol.c
index 340dd03..340dd03 100644
--- a/sys/contrib/dev/acpica/dispatcher/dscontrol.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dscontrol.c
diff --git a/sys/contrib/dev/acpica/dispatcher/dsfield.c b/sys/contrib/dev/acpica/components/dispatcher/dsfield.c
index ec3d5dd..ec3d5dd 100644
--- a/sys/contrib/dev/acpica/dispatcher/dsfield.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dsfield.c
diff --git a/sys/contrib/dev/acpica/dispatcher/dsinit.c b/sys/contrib/dev/acpica/components/dispatcher/dsinit.c
index 566c22a..566c22a 100644
--- a/sys/contrib/dev/acpica/dispatcher/dsinit.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dsinit.c
diff --git a/sys/contrib/dev/acpica/dispatcher/dsmethod.c b/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c
index 50516d1..50516d1 100644
--- a/sys/contrib/dev/acpica/dispatcher/dsmethod.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c
diff --git a/sys/contrib/dev/acpica/dispatcher/dsmthdat.c b/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c
index c5ae511..c5ae511 100644
--- a/sys/contrib/dev/acpica/dispatcher/dsmthdat.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dsmthdat.c
diff --git a/sys/contrib/dev/acpica/dispatcher/dsobject.c b/sys/contrib/dev/acpica/components/dispatcher/dsobject.c
index 16585ae..16585ae 100644
--- a/sys/contrib/dev/acpica/dispatcher/dsobject.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dsobject.c
diff --git a/sys/contrib/dev/acpica/dispatcher/dsopcode.c b/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c
index 2821a8d..2821a8d 100644
--- a/sys/contrib/dev/acpica/dispatcher/dsopcode.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c
diff --git a/sys/contrib/dev/acpica/dispatcher/dsutils.c b/sys/contrib/dev/acpica/components/dispatcher/dsutils.c
index 0bee1aa..0bee1aa 100644
--- a/sys/contrib/dev/acpica/dispatcher/dsutils.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dsutils.c
diff --git a/sys/contrib/dev/acpica/dispatcher/dswexec.c b/sys/contrib/dev/acpica/components/dispatcher/dswexec.c
index f24ea0d..f24ea0d 100644
--- a/sys/contrib/dev/acpica/dispatcher/dswexec.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dswexec.c
diff --git a/sys/contrib/dev/acpica/dispatcher/dswload.c b/sys/contrib/dev/acpica/components/dispatcher/dswload.c
index ac948c4..ac948c4 100644
--- a/sys/contrib/dev/acpica/dispatcher/dswload.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dswload.c
diff --git a/sys/contrib/dev/acpica/dispatcher/dswload2.c b/sys/contrib/dev/acpica/components/dispatcher/dswload2.c
index 9bc8b31..9bc8b31 100644
--- a/sys/contrib/dev/acpica/dispatcher/dswload2.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dswload2.c
diff --git a/sys/contrib/dev/acpica/dispatcher/dswscope.c b/sys/contrib/dev/acpica/components/dispatcher/dswscope.c
index 143d8b3..143d8b3 100644
--- a/sys/contrib/dev/acpica/dispatcher/dswscope.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dswscope.c
diff --git a/sys/contrib/dev/acpica/dispatcher/dswstate.c b/sys/contrib/dev/acpica/components/dispatcher/dswstate.c
index 004c553..004c553 100644
--- a/sys/contrib/dev/acpica/dispatcher/dswstate.c
+++ b/sys/contrib/dev/acpica/components/dispatcher/dswstate.c
diff --git a/sys/contrib/dev/acpica/events/evevent.c b/sys/contrib/dev/acpica/components/events/evevent.c
index ad8f334..18eef05 100644
--- a/sys/contrib/dev/acpica/events/evevent.c
+++ b/sys/contrib/dev/acpica/components/events/evevent.c
@@ -48,6 +48,8 @@
#define _COMPONENT ACPI_EVENTS
ACPI_MODULE_NAME ("evevent")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
+
/* Local prototypes */
static ACPI_STATUS
@@ -329,4 +331,6 @@ AcpiEvFixedEventDispatch (
AcpiGbl_FixedEventHandlers[Event].Context));
}
+#endif /* !ACPI_REDUCED_HARDWARE */
+
diff --git a/sys/contrib/dev/acpica/events/evglock.c b/sys/contrib/dev/acpica/components/events/evglock.c
index 092e6e83..894e132 100644
--- a/sys/contrib/dev/acpica/events/evglock.c
+++ b/sys/contrib/dev/acpica/components/events/evglock.c
@@ -49,6 +49,7 @@
#define _COMPONENT ACPI_EVENTS
ACPI_MODULE_NAME ("evglock")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
/* Local prototypes */
@@ -372,3 +373,5 @@ AcpiEvReleaseGlobalLock (
AcpiOsReleaseMutex (AcpiGbl_GlobalLockMutex->Mutex.OsMutex);
return_ACPI_STATUS (Status);
}
+
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/sys/contrib/dev/acpica/events/evgpe.c b/sys/contrib/dev/acpica/components/events/evgpe.c
index 076456a..61b3e6c 100644
--- a/sys/contrib/dev/acpica/events/evgpe.c
+++ b/sys/contrib/dev/acpica/components/events/evgpe.c
@@ -49,6 +49,8 @@
#define _COMPONENT ACPI_EVENTS
ACPI_MODULE_NAME ("evgpe")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
+
/* Local prototypes */
static void ACPI_SYSTEM_XFACE
@@ -826,3 +828,4 @@ AcpiEvGpeDispatch (
return_UINT32 (ACPI_INTERRUPT_HANDLED);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/sys/contrib/dev/acpica/events/evgpeblk.c b/sys/contrib/dev/acpica/components/events/evgpeblk.c
index 074e449..6a1c04a 100644
--- a/sys/contrib/dev/acpica/events/evgpeblk.c
+++ b/sys/contrib/dev/acpica/components/events/evgpeblk.c
@@ -49,6 +49,8 @@
#define _COMPONENT ACPI_EVENTS
ACPI_MODULE_NAME ("evgpeblk")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
+
/* Local prototypes */
static ACPI_STATUS
@@ -545,3 +547,4 @@ AcpiEvInitializeGpeBlock (
return_ACPI_STATUS (AE_OK);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/sys/contrib/dev/acpica/events/evgpeinit.c b/sys/contrib/dev/acpica/components/events/evgpeinit.c
index b48cb79..9266d60 100644
--- a/sys/contrib/dev/acpica/events/evgpeinit.c
+++ b/sys/contrib/dev/acpica/components/events/evgpeinit.c
@@ -50,6 +50,7 @@
#define _COMPONENT ACPI_EVENTS
ACPI_MODULE_NAME ("evgpeinit")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
/*
* Note: History of _PRW support in ACPICA
@@ -457,3 +458,5 @@ AcpiEvMatchGpeMethod (
Name, GpeNumber));
return_ACPI_STATUS (AE_OK);
}
+
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/sys/contrib/dev/acpica/events/evgpeutil.c b/sys/contrib/dev/acpica/components/events/evgpeutil.c
index 276e25a..7b27b414 100644
--- a/sys/contrib/dev/acpica/events/evgpeutil.c
+++ b/sys/contrib/dev/acpica/components/events/evgpeutil.c
@@ -41,7 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-
#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/acevents.h>
@@ -50,6 +49,7 @@
ACPI_MODULE_NAME ("evgpeutil")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
/*******************************************************************************
*
* FUNCTION: AcpiEvWalkGpeList
@@ -422,3 +422,4 @@ AcpiEvDeleteGpeHandlers (
return_ACPI_STATUS (AE_OK);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/sys/contrib/dev/acpica/events/evmisc.c b/sys/contrib/dev/acpica/components/events/evmisc.c
index f059137..52978be 100644
--- a/sys/contrib/dev/acpica/events/evmisc.c
+++ b/sys/contrib/dev/acpica/components/events/evmisc.c
@@ -120,27 +120,29 @@ AcpiEvQueueNotifyRequest (
/*
- * For value 3 (Ejection Request), some device method may need to be run.
- * For value 2 (Device Wake) if _PRW exists, the _PS0 method may need
- * to be run.
+ * For value 0x03 (Ejection Request), may need to run a device method.
+ * For value 0x02 (Device Wake), if _PRW exists, may need to run
+ * the _PS0 method.
* For value 0x80 (Status Change) on the power button or sleep button,
- * initiate soft-off or sleep operation?
+ * initiate soft-off or sleep operation.
+ *
+ * For all cases, simply dispatch the notify to the handler.
*/
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "Dispatching Notify on [%4.4s] Node %p Value 0x%2.2X (%s)\n",
- AcpiUtGetNodeName (Node), Node, NotifyValue,
- AcpiUtGetNotifyName (NotifyValue)));
+ "Dispatching Notify on [%4.4s] (%s) Value 0x%2.2X (%s) Node %p\n",
+ AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Node->Type),
+ NotifyValue, AcpiUtGetNotifyName (NotifyValue), Node));
/* Get the notify object attached to the NS Node */
ObjDesc = AcpiNsGetAttachedObject (Node);
if (ObjDesc)
{
- /* We have the notify object, Get the right handler */
+ /* We have the notify object, Get the correct handler */
switch (Node->Type)
{
- /* Notify allowed only on these types */
+ /* Notify is allowed only on these types */
case ACPI_TYPE_DEVICE:
case ACPI_TYPE_THERMAL:
@@ -165,7 +167,7 @@ AcpiEvQueueNotifyRequest (
}
/*
- * If there is any handler to run, schedule the dispatcher.
+ * If there is a handler to run, schedule the dispatcher.
* Check for:
* 1) Global system notify handler
* 2) Global device notify handler
@@ -291,6 +293,7 @@ AcpiEvNotifyDispatch (
}
+#if (!ACPI_REDUCED_HARDWARE)
/******************************************************************************
*
* FUNCTION: AcpiEvTerminate
@@ -370,3 +373,5 @@ AcpiEvTerminate (
}
return_VOID;
}
+
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/sys/contrib/dev/acpica/events/evregion.c b/sys/contrib/dev/acpica/components/events/evregion.c
index d149181..d149181 100644
--- a/sys/contrib/dev/acpica/events/evregion.c
+++ b/sys/contrib/dev/acpica/components/events/evregion.c
diff --git a/sys/contrib/dev/acpica/events/evrgnini.c b/sys/contrib/dev/acpica/components/events/evrgnini.c
index 9fb7769..9fb7769 100644
--- a/sys/contrib/dev/acpica/events/evrgnini.c
+++ b/sys/contrib/dev/acpica/components/events/evrgnini.c
diff --git a/sys/contrib/dev/acpica/events/evsci.c b/sys/contrib/dev/acpica/components/events/evsci.c
index 1435247..0e7a65a 100644
--- a/sys/contrib/dev/acpica/events/evsci.c
+++ b/sys/contrib/dev/acpica/components/events/evsci.c
@@ -50,6 +50,8 @@
#define _COMPONENT ACPI_EVENTS
ACPI_MODULE_NAME ("evsci")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
+
/* Local prototypes */
static UINT32 ACPI_SYSTEM_XFACE
@@ -204,4 +206,4 @@ AcpiEvRemoveSciHandler (
return_ACPI_STATUS (Status);
}
-
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/sys/contrib/dev/acpica/events/evxface.c b/sys/contrib/dev/acpica/components/events/evxface.c
index 6ea997c..8d50c90 100644
--- a/sys/contrib/dev/acpica/events/evxface.c
+++ b/sys/contrib/dev/acpica/components/events/evxface.c
@@ -56,257 +56,6 @@
/*******************************************************************************
*
- * FUNCTION: AcpiInstallExceptionHandler
- *
- * PARAMETERS: Handler - Pointer to the handler function for the
- * event
- *
- * RETURN: Status
- *
- * DESCRIPTION: Saves the pointer to the handler function
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiInstallExceptionHandler (
- ACPI_EXCEPTION_HANDLER Handler)
-{
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_TRACE (AcpiInstallExceptionHandler);
-
-
- Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- /* Don't allow two handlers. */
-
- if (AcpiGbl_ExceptionHandler)
- {
- Status = AE_ALREADY_EXISTS;
- goto Cleanup;
- }
-
- /* Install the handler */
-
- AcpiGbl_ExceptionHandler = Handler;
-
-Cleanup:
- (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
- return_ACPI_STATUS (Status);
-}
-
-ACPI_EXPORT_SYMBOL (AcpiInstallExceptionHandler)
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiInstallGlobalEventHandler
- *
- * PARAMETERS: Handler - Pointer to the global event handler function
- * Context - Value passed to the handler on each event
- *
- * RETURN: Status
- *
- * DESCRIPTION: Saves the pointer to the handler function. The global handler
- * is invoked upon each incoming GPE and Fixed Event. It is
- * invoked at interrupt level at the time of the event dispatch.
- * Can be used to update event counters, etc.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiInstallGlobalEventHandler (
- ACPI_GBL_EVENT_HANDLER Handler,
- void *Context)
-{
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_TRACE (AcpiInstallGlobalEventHandler);
-
-
- /* Parameter validation */
-
- if (!Handler)
- {
- return_ACPI_STATUS (AE_BAD_PARAMETER);
- }
-
- Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- /* Don't allow two handlers. */
-
- if (AcpiGbl_GlobalEventHandler)
- {
- Status = AE_ALREADY_EXISTS;
- goto Cleanup;
- }
-
- AcpiGbl_GlobalEventHandler = Handler;
- AcpiGbl_GlobalEventHandlerContext = Context;
-
-
-Cleanup:
- (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
- return_ACPI_STATUS (Status);
-}
-
-ACPI_EXPORT_SYMBOL (AcpiInstallGlobalEventHandler)
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiInstallFixedEventHandler
- *
- * PARAMETERS: Event - Event type to enable.
- * Handler - Pointer to the handler function for the
- * event
- * Context - Value passed to the handler on each GPE
- *
- * RETURN: Status
- *
- * DESCRIPTION: Saves the pointer to the handler function and then enables the
- * event.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiInstallFixedEventHandler (
- UINT32 Event,
- ACPI_EVENT_HANDLER Handler,
- void *Context)
-{
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_TRACE (AcpiInstallFixedEventHandler);
-
-
- /* Parameter validation */
-
- if (Event > ACPI_EVENT_MAX)
- {
- return_ACPI_STATUS (AE_BAD_PARAMETER);
- }
-
- Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- /* Don't allow two handlers. */
-
- if (NULL != AcpiGbl_FixedEventHandlers[Event].Handler)
- {
- Status = AE_ALREADY_EXISTS;
- goto Cleanup;
- }
-
- /* Install the handler before enabling the event */
-
- AcpiGbl_FixedEventHandlers[Event].Handler = Handler;
- AcpiGbl_FixedEventHandlers[Event].Context = Context;
-
- Status = AcpiEnableEvent (Event, 0);
- if (ACPI_FAILURE (Status))
- {
- ACPI_WARNING ((AE_INFO, "Could not enable fixed event 0x%X", Event));
-
- /* Remove the handler */
-
- AcpiGbl_FixedEventHandlers[Event].Handler = NULL;
- AcpiGbl_FixedEventHandlers[Event].Context = NULL;
- }
- else
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "Enabled fixed event %X, Handler=%p\n", Event, Handler));
- }
-
-
-Cleanup:
- (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
- return_ACPI_STATUS (Status);
-}
-
-ACPI_EXPORT_SYMBOL (AcpiInstallFixedEventHandler)
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiRemoveFixedEventHandler
- *
- * PARAMETERS: Event - Event type to disable.
- * Handler - Address of the handler
- *
- * RETURN: Status
- *
- * DESCRIPTION: Disables the event and unregisters the event handler.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiRemoveFixedEventHandler (
- UINT32 Event,
- ACPI_EVENT_HANDLER Handler)
-{
- ACPI_STATUS Status = AE_OK;
-
-
- ACPI_FUNCTION_TRACE (AcpiRemoveFixedEventHandler);
-
-
- /* Parameter validation */
-
- if (Event > ACPI_EVENT_MAX)
- {
- return_ACPI_STATUS (AE_BAD_PARAMETER);
- }
-
- Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- /* Disable the event before removing the handler */
-
- Status = AcpiDisableEvent (Event, 0);
-
- /* Always Remove the handler */
-
- AcpiGbl_FixedEventHandlers[Event].Handler = NULL;
- AcpiGbl_FixedEventHandlers[Event].Context = NULL;
-
- if (ACPI_FAILURE (Status))
- {
- ACPI_WARNING ((AE_INFO,
- "Could not write to fixed event enable register 0x%X", Event));
- }
- else
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Disabled fixed event %X\n", Event));
- }
-
- (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
- return_ACPI_STATUS (Status);
-}
-
-ACPI_EXPORT_SYMBOL (AcpiRemoveFixedEventHandler)
-
-
-/*******************************************************************************
- *
* FUNCTION: AcpiInstallNotifyHandler
*
* PARAMETERS: Device - The device for which notifies will be handled
@@ -658,6 +407,258 @@ ACPI_EXPORT_SYMBOL (AcpiRemoveNotifyHandler)
/*******************************************************************************
*
+ * FUNCTION: AcpiInstallExceptionHandler
+ *
+ * PARAMETERS: Handler - Pointer to the handler function for the
+ * event
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Saves the pointer to the handler function
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiInstallExceptionHandler (
+ ACPI_EXCEPTION_HANDLER Handler)
+{
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (AcpiInstallExceptionHandler);
+
+
+ Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ /* Don't allow two handlers. */
+
+ if (AcpiGbl_ExceptionHandler)
+ {
+ Status = AE_ALREADY_EXISTS;
+ goto Cleanup;
+ }
+
+ /* Install the handler */
+
+ AcpiGbl_ExceptionHandler = Handler;
+
+Cleanup:
+ (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
+ return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiInstallExceptionHandler)
+
+
+#if (!ACPI_REDUCED_HARDWARE)
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiInstallGlobalEventHandler
+ *
+ * PARAMETERS: Handler - Pointer to the global event handler function
+ * Context - Value passed to the handler on each event
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Saves the pointer to the handler function. The global handler
+ * is invoked upon each incoming GPE and Fixed Event. It is
+ * invoked at interrupt level at the time of the event dispatch.
+ * Can be used to update event counters, etc.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiInstallGlobalEventHandler (
+ ACPI_GBL_EVENT_HANDLER Handler,
+ void *Context)
+{
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (AcpiInstallGlobalEventHandler);
+
+
+ /* Parameter validation */
+
+ if (!Handler)
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
+
+ Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ /* Don't allow two handlers. */
+
+ if (AcpiGbl_GlobalEventHandler)
+ {
+ Status = AE_ALREADY_EXISTS;
+ goto Cleanup;
+ }
+
+ AcpiGbl_GlobalEventHandler = Handler;
+ AcpiGbl_GlobalEventHandlerContext = Context;
+
+
+Cleanup:
+ (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
+ return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiInstallGlobalEventHandler)
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiInstallFixedEventHandler
+ *
+ * PARAMETERS: Event - Event type to enable.
+ * Handler - Pointer to the handler function for the
+ * event
+ * Context - Value passed to the handler on each GPE
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Saves the pointer to the handler function and then enables the
+ * event.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiInstallFixedEventHandler (
+ UINT32 Event,
+ ACPI_EVENT_HANDLER Handler,
+ void *Context)
+{
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (AcpiInstallFixedEventHandler);
+
+
+ /* Parameter validation */
+
+ if (Event > ACPI_EVENT_MAX)
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
+
+ Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ /* Don't allow two handlers. */
+
+ if (NULL != AcpiGbl_FixedEventHandlers[Event].Handler)
+ {
+ Status = AE_ALREADY_EXISTS;
+ goto Cleanup;
+ }
+
+ /* Install the handler before enabling the event */
+
+ AcpiGbl_FixedEventHandlers[Event].Handler = Handler;
+ AcpiGbl_FixedEventHandlers[Event].Context = Context;
+
+ Status = AcpiEnableEvent (Event, 0);
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_WARNING ((AE_INFO, "Could not enable fixed event 0x%X", Event));
+
+ /* Remove the handler */
+
+ AcpiGbl_FixedEventHandlers[Event].Handler = NULL;
+ AcpiGbl_FixedEventHandlers[Event].Context = NULL;
+ }
+ else
+ {
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+ "Enabled fixed event %X, Handler=%p\n", Event, Handler));
+ }
+
+
+Cleanup:
+ (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
+ return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiInstallFixedEventHandler)
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiRemoveFixedEventHandler
+ *
+ * PARAMETERS: Event - Event type to disable.
+ * Handler - Address of the handler
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Disables the event and unregisters the event handler.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiRemoveFixedEventHandler (
+ UINT32 Event,
+ ACPI_EVENT_HANDLER Handler)
+{
+ ACPI_STATUS Status = AE_OK;
+
+
+ ACPI_FUNCTION_TRACE (AcpiRemoveFixedEventHandler);
+
+
+ /* Parameter validation */
+
+ if (Event > ACPI_EVENT_MAX)
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
+
+ Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ /* Disable the event before removing the handler */
+
+ Status = AcpiDisableEvent (Event, 0);
+
+ /* Always Remove the handler */
+
+ AcpiGbl_FixedEventHandlers[Event].Handler = NULL;
+ AcpiGbl_FixedEventHandlers[Event].Context = NULL;
+
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_WARNING ((AE_INFO,
+ "Could not write to fixed event enable register 0x%X", Event));
+ }
+ else
+ {
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Disabled fixed event %X\n", Event));
+ }
+
+ (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
+ return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiRemoveFixedEventHandler)
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiInstallGpeHandler
*
* PARAMETERS: GpeDevice - Namespace node for the GPE (NULL for FADT
@@ -975,3 +976,4 @@ AcpiReleaseGlobalLock (
ACPI_EXPORT_SYMBOL (AcpiReleaseGlobalLock)
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/sys/contrib/dev/acpica/events/evxfevnt.c b/sys/contrib/dev/acpica/components/events/evxfevnt.c
index 38b6d2b..4e87cde 100644
--- a/sys/contrib/dev/acpica/events/evxfevnt.c
+++ b/sys/contrib/dev/acpica/components/events/evxfevnt.c
@@ -52,6 +52,7 @@
ACPI_MODULE_NAME ("evxfevnt")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
/*******************************************************************************
*
* FUNCTION: AcpiEnable
@@ -377,4 +378,4 @@ AcpiGetEventStatus (
ACPI_EXPORT_SYMBOL (AcpiGetEventStatus)
-
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/sys/contrib/dev/acpica/events/evxfgpe.c b/sys/contrib/dev/acpica/components/events/evxfgpe.c
index c0ea07f..c75b4c5 100644
--- a/sys/contrib/dev/acpica/events/evxfgpe.c
+++ b/sys/contrib/dev/acpica/components/events/evxfgpe.c
@@ -53,6 +53,7 @@
ACPI_MODULE_NAME ("evxfgpe")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
/*******************************************************************************
*
* FUNCTION: AcpiUpdateAllGpes
@@ -898,3 +899,5 @@ AcpiGetGpeDevice (
}
ACPI_EXPORT_SYMBOL (AcpiGetGpeDevice)
+
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/sys/contrib/dev/acpica/events/evxfregn.c b/sys/contrib/dev/acpica/components/events/evxfregn.c
index 9bd2854..9bd2854 100644
--- a/sys/contrib/dev/acpica/events/evxfregn.c
+++ b/sys/contrib/dev/acpica/components/events/evxfregn.c
diff --git a/sys/contrib/dev/acpica/executer/exconfig.c b/sys/contrib/dev/acpica/components/executer/exconfig.c
index 3bfe1ba..3bfe1ba 100644
--- a/sys/contrib/dev/acpica/executer/exconfig.c
+++ b/sys/contrib/dev/acpica/components/executer/exconfig.c
diff --git a/sys/contrib/dev/acpica/executer/exconvrt.c b/sys/contrib/dev/acpica/components/executer/exconvrt.c
index fa564ef..fa564ef 100644
--- a/sys/contrib/dev/acpica/executer/exconvrt.c
+++ b/sys/contrib/dev/acpica/components/executer/exconvrt.c
diff --git a/sys/contrib/dev/acpica/executer/excreate.c b/sys/contrib/dev/acpica/components/executer/excreate.c
index 73fec1d..73fec1d 100644
--- a/sys/contrib/dev/acpica/executer/excreate.c
+++ b/sys/contrib/dev/acpica/components/executer/excreate.c
diff --git a/sys/contrib/dev/acpica/executer/exdebug.c b/sys/contrib/dev/acpica/components/executer/exdebug.c
index 0188bab..0188bab 100644
--- a/sys/contrib/dev/acpica/executer/exdebug.c
+++ b/sys/contrib/dev/acpica/components/executer/exdebug.c
diff --git a/sys/contrib/dev/acpica/executer/exdump.c b/sys/contrib/dev/acpica/components/executer/exdump.c
index 544b731..544b731 100644
--- a/sys/contrib/dev/acpica/executer/exdump.c
+++ b/sys/contrib/dev/acpica/components/executer/exdump.c
diff --git a/sys/contrib/dev/acpica/executer/exfield.c b/sys/contrib/dev/acpica/components/executer/exfield.c
index fdad560..fdad560 100644
--- a/sys/contrib/dev/acpica/executer/exfield.c
+++ b/sys/contrib/dev/acpica/components/executer/exfield.c
diff --git a/sys/contrib/dev/acpica/executer/exfldio.c b/sys/contrib/dev/acpica/components/executer/exfldio.c
index 7a7cf20..539ea97 100644
--- a/sys/contrib/dev/acpica/executer/exfldio.c
+++ b/sys/contrib/dev/acpica/components/executer/exfldio.c
@@ -350,8 +350,6 @@ AcpiExRegisterOverflow (
ACPI_OPERAND_OBJECT *ObjDesc,
UINT64 Value)
{
- ACPI_FUNCTION_NAME (ExRegisterOverflow);
-
if (ObjDesc->CommonField.BitLength >= ACPI_INTEGER_BIT_SIZE)
{
diff --git a/sys/contrib/dev/acpica/executer/exmisc.c b/sys/contrib/dev/acpica/components/executer/exmisc.c
index 7be2e8b..7be2e8b 100644
--- a/sys/contrib/dev/acpica/executer/exmisc.c
+++ b/sys/contrib/dev/acpica/components/executer/exmisc.c
diff --git a/sys/contrib/dev/acpica/executer/exmutex.c b/sys/contrib/dev/acpica/components/executer/exmutex.c
index 1d0140f..1d0140f 100644
--- a/sys/contrib/dev/acpica/executer/exmutex.c
+++ b/sys/contrib/dev/acpica/components/executer/exmutex.c
diff --git a/sys/contrib/dev/acpica/executer/exnames.c b/sys/contrib/dev/acpica/components/executer/exnames.c
index 7706420..7706420 100644
--- a/sys/contrib/dev/acpica/executer/exnames.c
+++ b/sys/contrib/dev/acpica/components/executer/exnames.c
diff --git a/sys/contrib/dev/acpica/executer/exoparg1.c b/sys/contrib/dev/acpica/components/executer/exoparg1.c
index 69eaefb..69eaefb 100644
--- a/sys/contrib/dev/acpica/executer/exoparg1.c
+++ b/sys/contrib/dev/acpica/components/executer/exoparg1.c
diff --git a/sys/contrib/dev/acpica/executer/exoparg2.c b/sys/contrib/dev/acpica/components/executer/exoparg2.c
index 8c25cac..8c25cac 100644
--- a/sys/contrib/dev/acpica/executer/exoparg2.c
+++ b/sys/contrib/dev/acpica/components/executer/exoparg2.c
diff --git a/sys/contrib/dev/acpica/executer/exoparg3.c b/sys/contrib/dev/acpica/components/executer/exoparg3.c
index 97136f9..97136f9 100644
--- a/sys/contrib/dev/acpica/executer/exoparg3.c
+++ b/sys/contrib/dev/acpica/components/executer/exoparg3.c
diff --git a/sys/contrib/dev/acpica/executer/exoparg6.c b/sys/contrib/dev/acpica/components/executer/exoparg6.c
index f1afbea..f1afbea 100644
--- a/sys/contrib/dev/acpica/executer/exoparg6.c
+++ b/sys/contrib/dev/acpica/components/executer/exoparg6.c
diff --git a/sys/contrib/dev/acpica/executer/exprep.c b/sys/contrib/dev/acpica/components/executer/exprep.c
index 993f75b..993f75b 100644
--- a/sys/contrib/dev/acpica/executer/exprep.c
+++ b/sys/contrib/dev/acpica/components/executer/exprep.c
diff --git a/sys/contrib/dev/acpica/executer/exregion.c b/sys/contrib/dev/acpica/components/executer/exregion.c
index 036a5cb..036a5cb 100644
--- a/sys/contrib/dev/acpica/executer/exregion.c
+++ b/sys/contrib/dev/acpica/components/executer/exregion.c
diff --git a/sys/contrib/dev/acpica/executer/exresnte.c b/sys/contrib/dev/acpica/components/executer/exresnte.c
index 3c14eb5..3c14eb5 100644
--- a/sys/contrib/dev/acpica/executer/exresnte.c
+++ b/sys/contrib/dev/acpica/components/executer/exresnte.c
diff --git a/sys/contrib/dev/acpica/executer/exresolv.c b/sys/contrib/dev/acpica/components/executer/exresolv.c
index bc29bde..bc29bde 100644
--- a/sys/contrib/dev/acpica/executer/exresolv.c
+++ b/sys/contrib/dev/acpica/components/executer/exresolv.c
diff --git a/sys/contrib/dev/acpica/executer/exresop.c b/sys/contrib/dev/acpica/components/executer/exresop.c
index a9243b1..a9243b1 100644
--- a/sys/contrib/dev/acpica/executer/exresop.c
+++ b/sys/contrib/dev/acpica/components/executer/exresop.c
diff --git a/sys/contrib/dev/acpica/executer/exstore.c b/sys/contrib/dev/acpica/components/executer/exstore.c
index a66aa16..a66aa16 100644
--- a/sys/contrib/dev/acpica/executer/exstore.c
+++ b/sys/contrib/dev/acpica/components/executer/exstore.c
diff --git a/sys/contrib/dev/acpica/executer/exstoren.c b/sys/contrib/dev/acpica/components/executer/exstoren.c
index f9b3bc2..f9b3bc2 100644
--- a/sys/contrib/dev/acpica/executer/exstoren.c
+++ b/sys/contrib/dev/acpica/components/executer/exstoren.c
diff --git a/sys/contrib/dev/acpica/executer/exstorob.c b/sys/contrib/dev/acpica/components/executer/exstorob.c
index 1ee3309..1ee3309 100644
--- a/sys/contrib/dev/acpica/executer/exstorob.c
+++ b/sys/contrib/dev/acpica/components/executer/exstorob.c
diff --git a/sys/contrib/dev/acpica/executer/exsystem.c b/sys/contrib/dev/acpica/components/executer/exsystem.c
index a2ee42a..a2ee42a 100644
--- a/sys/contrib/dev/acpica/executer/exsystem.c
+++ b/sys/contrib/dev/acpica/components/executer/exsystem.c
diff --git a/sys/contrib/dev/acpica/executer/exutils.c b/sys/contrib/dev/acpica/components/executer/exutils.c
index 45414ce..45414ce 100644
--- a/sys/contrib/dev/acpica/executer/exutils.c
+++ b/sys/contrib/dev/acpica/components/executer/exutils.c
diff --git a/sys/contrib/dev/acpica/hardware/hwacpi.c b/sys/contrib/dev/acpica/components/hardware/hwacpi.c
index 23fc4bf..a7bc6b8 100644
--- a/sys/contrib/dev/acpica/hardware/hwacpi.c
+++ b/sys/contrib/dev/acpica/components/hardware/hwacpi.c
@@ -52,6 +52,7 @@
ACPI_MODULE_NAME ("hwacpi")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
/******************************************************************************
*
* FUNCTION: AcpiHwSetMode
@@ -204,3 +205,5 @@ AcpiHwGetMode (
return_UINT32 (ACPI_SYS_MODE_LEGACY);
}
}
+
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/sys/contrib/dev/acpica/components/hardware/hwesleep.c b/sys/contrib/dev/acpica/components/hardware/hwesleep.c
new file mode 100644
index 0000000..8133e85
--- /dev/null
+++ b/sys/contrib/dev/acpica/components/hardware/hwesleep.c
@@ -0,0 +1,263 @@
+/******************************************************************************
+ *
+ * Name: hwesleep.c - ACPI Hardware Sleep/Wake Support functions for the
+ * extended FADT-V5 sleep registers.
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2012, Intel Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ * of any contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
+#define _COMPONENT ACPI_HARDWARE
+ ACPI_MODULE_NAME ("hwesleep")
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiHwExecuteSleepMethod
+ *
+ * PARAMETERS: MethodName - Pathname of method to execute
+ * IntegerArgument - Argument to pass to the method
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Execute a sleep/wake related method with one integer argument
+ * and no return value.
+ *
+ ******************************************************************************/
+
+void
+AcpiHwExecuteSleepMethod (
+ char *MethodName,
+ UINT32 IntegerArgument)
+{
+ ACPI_OBJECT_LIST ArgList;
+ ACPI_OBJECT Arg;
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (HwExecuteSleepMethod);
+
+
+ /* One argument, IntegerArgument; No return value expected */
+
+ ArgList.Count = 1;
+ ArgList.Pointer = &Arg;
+ Arg.Type = ACPI_TYPE_INTEGER;
+ Arg.Integer.Value = (UINT64) IntegerArgument;
+
+ Status = AcpiEvaluateObject (NULL, MethodName, &ArgList, NULL);
+ if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
+ {
+ ACPI_EXCEPTION ((AE_INFO, Status, "While executing method %s",
+ MethodName));
+ }
+
+ return_VOID;
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiHwExtendedSleep
+ *
+ * PARAMETERS: SleepState - Which sleep state to enter
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Enter a system sleep state via the extended FADT sleep
+ * registers (V5 FADT).
+ * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiHwExtendedSleep (
+ UINT8 SleepState)
+{
+ ACPI_STATUS Status;
+ UINT8 SleepTypeValue;
+ UINT64 SleepStatus;
+
+
+ ACPI_FUNCTION_TRACE (HwExtendedSleep);
+
+
+ /* Extended sleep registers must be valid */
+
+ if (!AcpiGbl_FADT.SleepControl.Address ||
+ !AcpiGbl_FADT.SleepStatus.Address)
+ {
+ return_ACPI_STATUS (AE_NOT_EXIST);
+ }
+
+ /* Clear wake status (WAK_STS) */
+
+ Status = AcpiWrite (ACPI_X_WAKE_STATUS, &AcpiGbl_FADT.SleepStatus);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ AcpiGbl_SystemAwakeAndRunning = FALSE;
+
+ /* Execute the _GTS method (Going To Sleep) */
+
+ AcpiHwExecuteSleepMethod (METHOD_NAME__GTS, SleepState);
+
+ /* Flush caches, as per ACPI specification */
+
+ ACPI_FLUSH_CPU_CACHE ();
+
+ /*
+ * Set the SLP_TYP and SLP_EN bits.
+ *
+ * Note: We only use the first value returned by the \_Sx method
+ * (AcpiGbl_SleepTypeA) - As per ACPI specification.
+ */
+ ACPI_DEBUG_PRINT ((ACPI_DB_INIT,
+ "Entering sleep state [S%u]\n", SleepState));
+
+ SleepTypeValue = ((AcpiGbl_SleepTypeA << ACPI_X_SLEEP_TYPE_POSITION) &
+ ACPI_X_SLEEP_TYPE_MASK);
+
+ Status = AcpiWrite ((SleepTypeValue | ACPI_X_SLEEP_ENABLE),
+ &AcpiGbl_FADT.SleepControl);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ /* Wait for transition back to Working State */
+
+ do
+ {
+ Status = AcpiRead (&SleepStatus, &AcpiGbl_FADT.SleepStatus);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ } while (!(((UINT8) SleepStatus) & ACPI_X_WAKE_STATUS));
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiHwExtendedWakePrep
+ *
+ * PARAMETERS: SleepState - Which sleep state we just exited
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Perform first part of OS-independent ACPI cleanup after
+ * a sleep. Called with interrupts ENABLED.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiHwExtendedWakePrep (
+ UINT8 SleepState)
+{
+ ACPI_STATUS Status;
+ UINT8 SleepTypeValue;
+
+
+ ACPI_FUNCTION_TRACE (HwExtendedWakePrep);
+
+
+ Status = AcpiGetSleepTypeData (ACPI_STATE_S0,
+ &AcpiGbl_SleepTypeA, &AcpiGbl_SleepTypeB);
+ if (ACPI_SUCCESS (Status))
+ {
+ SleepTypeValue = ((AcpiGbl_SleepTypeA << ACPI_X_SLEEP_TYPE_POSITION) &
+ ACPI_X_SLEEP_TYPE_MASK);
+
+ (void) AcpiWrite ((SleepTypeValue | ACPI_X_SLEEP_ENABLE),
+ &AcpiGbl_FADT.SleepControl);
+ }
+
+ AcpiHwExecuteSleepMethod (METHOD_NAME__BFS, SleepState);
+ return_ACPI_STATUS (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiHwExtendedWake
+ *
+ * PARAMETERS: SleepState - Which sleep state we just exited
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Perform OS-independent ACPI cleanup after a sleep
+ * Called with interrupts ENABLED.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiHwExtendedWake (
+ UINT8 SleepState)
+{
+ ACPI_FUNCTION_TRACE (HwExtendedWake);
+
+
+ /* Ensure EnterSleepStatePrep -> EnterSleepState ordering */
+
+ AcpiGbl_SleepTypeA = ACPI_SLEEP_TYPE_INVALID;
+
+ /* Execute the wake methods */
+
+ AcpiHwExecuteSleepMethod (METHOD_NAME__SST, ACPI_SST_WAKING);
+ AcpiHwExecuteSleepMethod (METHOD_NAME__WAK, SleepState);
+
+ /*
+ * Some BIOS code assumes that WAK_STS will be cleared on resume
+ * and use it to determine whether the system is rebooting or
+ * resuming. Clear WAK_STS for compatibility.
+ */
+ (void) AcpiWrite (ACPI_X_WAKE_STATUS, &AcpiGbl_FADT.SleepStatus);
+ AcpiGbl_SystemAwakeAndRunning = TRUE;
+
+ AcpiHwExecuteSleepMethod (METHOD_NAME__SST, ACPI_SST_WORKING);
+ return_ACPI_STATUS (AE_OK);
+}
diff --git a/sys/contrib/dev/acpica/hardware/hwgpe.c b/sys/contrib/dev/acpica/components/hardware/hwgpe.c
index 7a94acb..a4aa864 100644
--- a/sys/contrib/dev/acpica/hardware/hwgpe.c
+++ b/sys/contrib/dev/acpica/components/hardware/hwgpe.c
@@ -49,6 +49,8 @@
#define _COMPONENT ACPI_HARDWARE
ACPI_MODULE_NAME ("hwgpe")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
+
/* Local prototypes */
static ACPI_STATUS
@@ -538,3 +540,4 @@ AcpiHwEnableAllWakeupGpes (
return_ACPI_STATUS (Status);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/sys/contrib/dev/acpica/hardware/hwpci.c b/sys/contrib/dev/acpica/components/hardware/hwpci.c
index dc71e2d..dc71e2d 100644
--- a/sys/contrib/dev/acpica/hardware/hwpci.c
+++ b/sys/contrib/dev/acpica/components/hardware/hwpci.c
diff --git a/sys/contrib/dev/acpica/hardware/hwregs.c b/sys/contrib/dev/acpica/components/hardware/hwregs.c
index 14de562..a43539f 100644
--- a/sys/contrib/dev/acpica/hardware/hwregs.c
+++ b/sys/contrib/dev/acpica/components/hardware/hwregs.c
@@ -53,6 +53,8 @@
ACPI_MODULE_NAME ("hwregs")
+#if (!ACPI_REDUCED_HARDWARE)
+
/* Local Prototypes */
static ACPI_STATUS
@@ -67,6 +69,7 @@ AcpiHwWriteMultiple (
ACPI_GENERIC_ADDRESS *RegisterA,
ACPI_GENERIC_ADDRESS *RegisterB);
+#endif /* !ACPI_REDUCED_HARDWARE */
/******************************************************************************
*
@@ -170,6 +173,7 @@ AcpiHwRead (
ACPI_GENERIC_ADDRESS *Reg)
{
UINT64 Address;
+ UINT64 Value64;
ACPI_STATUS Status;
@@ -195,7 +199,9 @@ AcpiHwRead (
if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY)
{
Status = AcpiOsReadMemory ((ACPI_PHYSICAL_ADDRESS)
- Address, Value, Reg->BitWidth);
+ Address, &Value64, Reg->BitWidth);
+
+ *Value = (UINT32) Value64;
}
else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
{
@@ -254,7 +260,7 @@ AcpiHwWrite (
if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY)
{
Status = AcpiOsWriteMemory ((ACPI_PHYSICAL_ADDRESS)
- Address, Value, Reg->BitWidth);
+ Address, (UINT64) Value, Reg->BitWidth);
}
else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
{
@@ -271,6 +277,7 @@ AcpiHwWrite (
}
+#if (!ACPI_REDUCED_HARDWARE)
/*******************************************************************************
*
* FUNCTION: AcpiHwClearAcpiStatus
@@ -321,7 +328,7 @@ UnlockAndExit:
/*******************************************************************************
*
- * FUNCTION: AcpiHwGetRegisterBitMask
+ * FUNCTION: AcpiHwGetBitRegisterInfo
*
* PARAMETERS: RegisterId - Index of ACPI Register to access
*
@@ -731,3 +738,4 @@ AcpiHwWriteMultiple (
return (Status);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/sys/contrib/dev/acpica/hardware/hwsleep.c b/sys/contrib/dev/acpica/components/hardware/hwsleep.c
index 9cc8246..cb8eb66 100644
--- a/sys/contrib/dev/acpica/hardware/hwsleep.c
+++ b/sys/contrib/dev/acpica/components/hardware/hwsleep.c
@@ -1,7 +1,7 @@
-
/******************************************************************************
*
- * Name: hwsleep.c - ACPI Hardware Sleep/Wake Interface
+ * Name: hwsleep.c - ACPI Hardware Sleep/Wake Support functions for the
+ * original/legacy sleep/PM registers.
*
*****************************************************************************/
@@ -49,211 +49,37 @@
ACPI_MODULE_NAME ("hwsleep")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
/*******************************************************************************
*
- * FUNCTION: AcpiSetFirmwareWakingVector
- *
- * PARAMETERS: PhysicalAddress - 32-bit physical address of ACPI real mode
- * entry point.
- *
- * RETURN: Status
- *
- * DESCRIPTION: Sets the 32-bit FirmwareWakingVector field of the FACS
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiSetFirmwareWakingVector (
- UINT32 PhysicalAddress)
-{
- ACPI_FUNCTION_TRACE (AcpiSetFirmwareWakingVector);
-
-
- /* Set the 32-bit vector */
-
- AcpiGbl_FACS->FirmwareWakingVector = PhysicalAddress;
-
- /* Clear the 64-bit vector if it exists */
-
- if ((AcpiGbl_FACS->Length > 32) && (AcpiGbl_FACS->Version >= 1))
- {
- AcpiGbl_FACS->XFirmwareWakingVector = 0;
- }
-
- return_ACPI_STATUS (AE_OK);
-}
-
-ACPI_EXPORT_SYMBOL (AcpiSetFirmwareWakingVector)
-
-
-#if ACPI_MACHINE_WIDTH == 64
-/*******************************************************************************
- *
- * FUNCTION: AcpiSetFirmwareWakingVector64
- *
- * PARAMETERS: PhysicalAddress - 64-bit physical address of ACPI protected
- * mode entry point.
- *
- * RETURN: Status
- *
- * DESCRIPTION: Sets the 64-bit X_FirmwareWakingVector field of the FACS, if
- * it exists in the table. This function is intended for use with
- * 64-bit host operating systems.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiSetFirmwareWakingVector64 (
- UINT64 PhysicalAddress)
-{
- ACPI_FUNCTION_TRACE (AcpiSetFirmwareWakingVector64);
-
-
- /* Determine if the 64-bit vector actually exists */
-
- if ((AcpiGbl_FACS->Length <= 32) || (AcpiGbl_FACS->Version < 1))
- {
- return_ACPI_STATUS (AE_NOT_EXIST);
- }
-
- /* Clear 32-bit vector, set the 64-bit X_ vector */
-
- AcpiGbl_FACS->FirmwareWakingVector = 0;
- AcpiGbl_FACS->XFirmwareWakingVector = PhysicalAddress;
- return_ACPI_STATUS (AE_OK);
-}
-
-ACPI_EXPORT_SYMBOL (AcpiSetFirmwareWakingVector64)
-#endif
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiEnterSleepStatePrep
+ * FUNCTION: AcpiHwLegacySleep
*
* PARAMETERS: SleepState - Which sleep state to enter
*
* RETURN: Status
*
- * DESCRIPTION: Prepare to enter a system sleep state (see ACPI 2.0 spec p 231)
- * This function must execute with interrupts enabled.
- * We break sleeping into 2 stages so that OSPM can handle
- * various OS-specific tasks between the two steps.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiEnterSleepStatePrep (
- UINT8 SleepState)
-{
- ACPI_STATUS Status;
- ACPI_OBJECT_LIST ArgList;
- ACPI_OBJECT Arg;
-
-
- ACPI_FUNCTION_TRACE (AcpiEnterSleepStatePrep);
-
-
- /* _PSW methods could be run here to enable wake-on keyboard, LAN, etc. */
-
- Status = AcpiGetSleepTypeData (SleepState,
- &AcpiGbl_SleepTypeA, &AcpiGbl_SleepTypeB);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- /* Execute the _PTS method (Prepare To Sleep) */
-
- ArgList.Count = 1;
- ArgList.Pointer = &Arg;
- Arg.Type = ACPI_TYPE_INTEGER;
- Arg.Integer.Value = SleepState;
-
- Status = AcpiEvaluateObject (NULL, METHOD_NAME__PTS, &ArgList, NULL);
- if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
- {
- return_ACPI_STATUS (Status);
- }
-
- /* Setup the argument to the _SST method (System STatus) */
-
- switch (SleepState)
- {
- case ACPI_STATE_S0:
- Arg.Integer.Value = ACPI_SST_WORKING;
- break;
-
- case ACPI_STATE_S1:
- case ACPI_STATE_S2:
- case ACPI_STATE_S3:
- Arg.Integer.Value = ACPI_SST_SLEEPING;
- break;
-
- case ACPI_STATE_S4:
- Arg.Integer.Value = ACPI_SST_SLEEP_CONTEXT;
- break;
-
- default:
- Arg.Integer.Value = ACPI_SST_INDICATOR_OFF; /* Default is off */
- break;
- }
-
- /*
- * Set the system indicators to show the desired sleep state.
- * _SST is an optional method (return no error if not found)
- */
- Status = AcpiEvaluateObject (NULL, METHOD_NAME__SST, &ArgList, NULL);
- if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
- {
- ACPI_EXCEPTION ((AE_INFO, Status, "While executing method _SST"));
- }
-
- return_ACPI_STATUS (AE_OK);
-}
-
-ACPI_EXPORT_SYMBOL (AcpiEnterSleepStatePrep)
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiEnterSleepState
- *
- * PARAMETERS: SleepState - Which sleep state to enter
- *
- * RETURN: Status
- *
- * DESCRIPTION: Enter a system sleep state
+ * DESCRIPTION: Enter a system sleep state via the legacy FADT PM registers
* THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
*
******************************************************************************/
ACPI_STATUS
-AcpiEnterSleepState (
+AcpiHwLegacySleep (
UINT8 SleepState)
{
- UINT32 Pm1aControl;
- UINT32 Pm1bControl;
ACPI_BIT_REGISTER_INFO *SleepTypeRegInfo;
ACPI_BIT_REGISTER_INFO *SleepEnableRegInfo;
+ UINT32 Pm1aControl;
+ UINT32 Pm1bControl;
UINT32 InValue;
- ACPI_OBJECT_LIST ArgList;
- ACPI_OBJECT Arg;
UINT32 Retry;
ACPI_STATUS Status;
- ACPI_FUNCTION_TRACE (AcpiEnterSleepState);
+ ACPI_FUNCTION_TRACE (HwLegacySleep);
- if ((AcpiGbl_SleepTypeA > ACPI_SLEEP_TYPE_MAX) ||
- (AcpiGbl_SleepTypeB > ACPI_SLEEP_TYPE_MAX))
- {
- ACPI_ERROR ((AE_INFO, "Sleep values out of range: A=0x%X B=0x%X",
- AcpiGbl_SleepTypeA, AcpiGbl_SleepTypeB));
- return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
- }
-
- SleepTypeRegInfo = AcpiHwGetBitRegisterInfo (ACPI_BITREG_SLEEP_TYPE);
+ SleepTypeRegInfo = AcpiHwGetBitRegisterInfo (ACPI_BITREG_SLEEP_TYPE);
SleepEnableRegInfo = AcpiHwGetBitRegisterInfo (ACPI_BITREG_SLEEP_ENABLE);
/* Clear wake status */
@@ -305,16 +131,7 @@ AcpiEnterSleepState (
/* Execute the _GTS method (Going To Sleep) */
- ArgList.Count = 1;
- ArgList.Pointer = &Arg;
- Arg.Type = ACPI_TYPE_INTEGER;
- Arg.Integer.Value = SleepState;
-
- Status = AcpiEvaluateObject (NULL, METHOD_NAME__GTS, &ArgList, NULL);
- if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
- {
- return_ACPI_STATUS (Status);
- }
+ AcpiHwExecuteSleepMethod (METHOD_NAME__GTS, SleepState);
/* Get current value of PM1A control */
@@ -391,7 +208,7 @@ AcpiEnterSleepState (
}
}
- /* Wait until we enter sleep state */
+ /* Wait for transition back to Working State */
Retry = 1000;
do
@@ -414,110 +231,30 @@ AcpiEnterSleepState (
}
}
- /* Spin until we wake */
-
- } while (!InValue);
-
- return_ACPI_STATUS (AE_OK);
-}
-
-ACPI_EXPORT_SYMBOL (AcpiEnterSleepState)
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiEnterSleepStateS4bios
- *
- * PARAMETERS: None
- *
- * RETURN: Status
- *
- * DESCRIPTION: Perform a S4 bios request.
- * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiEnterSleepStateS4bios (
- void)
-{
- UINT32 InValue;
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_TRACE (AcpiEnterSleepStateS4bios);
-
-
- /* Clear the wake status bit (PM1) */
-
- Status = AcpiWriteBitRegister (ACPI_BITREG_WAKE_STATUS, ACPI_CLEAR_STATUS);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- Status = AcpiHwClearAcpiStatus ();
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- /*
- * 1) Disable/Clear all GPEs
- * 2) Enable all wakeup GPEs
- */
- Status = AcpiHwDisableAllGpes ();
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
- AcpiGbl_SystemAwakeAndRunning = FALSE;
-
- Status = AcpiHwEnableAllWakeupGpes ();
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- ACPI_FLUSH_CPU_CACHE ();
-
- Status = AcpiHwWritePort (AcpiGbl_FADT.SmiCommand,
- (UINT32) AcpiGbl_FADT.S4BiosRequest, 8);
-
- do {
- AcpiOsStall(1000);
- Status = AcpiReadBitRegister (ACPI_BITREG_WAKE_STATUS, &InValue);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
} while (!InValue);
return_ACPI_STATUS (AE_OK);
}
-ACPI_EXPORT_SYMBOL (AcpiEnterSleepStateS4bios)
-
/*******************************************************************************
*
- * FUNCTION: AcpiLeaveSleepState
+ * FUNCTION: AcpiHwLegacyWakePrep
*
* PARAMETERS: SleepState - Which sleep state we just exited
*
* RETURN: Status
*
- * DESCRIPTION: Perform OS-independent ACPI cleanup after a sleep
+ * DESCRIPTION: Perform the first state of OS-independent ACPI cleanup after a
+ * sleep.
* Called with interrupts ENABLED.
*
******************************************************************************/
ACPI_STATUS
-AcpiLeaveSleepState (
+AcpiHwLegacyWakePrep (
UINT8 SleepState)
{
- ACPI_OBJECT_LIST ArgList;
- ACPI_OBJECT Arg;
ACPI_STATUS Status;
ACPI_BIT_REGISTER_INFO *SleepTypeRegInfo;
ACPI_BIT_REGISTER_INFO *SleepEnableRegInfo;
@@ -525,8 +262,7 @@ AcpiLeaveSleepState (
UINT32 Pm1bControl;
- ACPI_FUNCTION_TRACE (AcpiLeaveSleepState);
-
+ ACPI_FUNCTION_TRACE (HwLegacyWakePrep);
/*
* Set SLP_TYPE and SLP_EN to state S0.
@@ -567,40 +303,43 @@ AcpiLeaveSleepState (
}
}
- /* Ensure EnterSleepStatePrep -> EnterSleepState ordering */
+ AcpiHwExecuteSleepMethod (METHOD_NAME__BFS, SleepState);
+ return_ACPI_STATUS (Status);
+}
- AcpiGbl_SleepTypeA = ACPI_SLEEP_TYPE_INVALID;
- /* Setup parameter object */
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiHwLegacyWake
+ *
+ * PARAMETERS: SleepState - Which sleep state we just exited
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Perform OS-independent ACPI cleanup after a sleep
+ * Called with interrupts ENABLED.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiHwLegacyWake (
+ UINT8 SleepState)
+{
+ ACPI_STATUS Status;
- ArgList.Count = 1;
- ArgList.Pointer = &Arg;
- Arg.Type = ACPI_TYPE_INTEGER;
- /* Ignore any errors from these methods */
+ ACPI_FUNCTION_TRACE (HwLegacyWake);
- Arg.Integer.Value = ACPI_SST_WAKING;
- Status = AcpiEvaluateObject (NULL, METHOD_NAME__SST, &ArgList, NULL);
- if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
- {
- ACPI_EXCEPTION ((AE_INFO, Status, "During Method _SST"));
- }
- Arg.Integer.Value = SleepState;
- Status = AcpiEvaluateObject (NULL, METHOD_NAME__BFS, &ArgList, NULL);
- if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
- {
- ACPI_EXCEPTION ((AE_INFO, Status, "During Method _BFS"));
- }
+ /* Ensure EnterSleepStatePrep -> EnterSleepState ordering */
- Status = AcpiEvaluateObject (NULL, METHOD_NAME__WAK, &ArgList, NULL);
- if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
- {
- ACPI_EXCEPTION ((AE_INFO, Status, "During Method _WAK"));
- }
- /* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */
+ AcpiGbl_SleepTypeA = ACPI_SLEEP_TYPE_INVALID;
+ AcpiHwExecuteSleepMethod (METHOD_NAME__SST, ACPI_SST_WAKING);
/*
+ * GPEs must be enabled before _WAK is called as GPEs
+ * might get fired there
+ *
* Restore the GPEs:
* 1) Disable/Clear all GPEs
* 2) Enable all runtime GPEs
@@ -610,7 +349,6 @@ AcpiLeaveSleepState (
{
return_ACPI_STATUS (Status);
}
- AcpiGbl_SystemAwakeAndRunning = TRUE;
Status = AcpiHwEnableAllRuntimeGpes ();
if (ACPI_FAILURE (Status))
@@ -618,6 +356,20 @@ AcpiLeaveSleepState (
return_ACPI_STATUS (Status);
}
+ /*
+ * Now we can execute _WAK, etc. Some machines require that the GPEs
+ * are enabled before the wake methods are executed.
+ */
+ AcpiHwExecuteSleepMethod (METHOD_NAME__WAK, SleepState);
+
+ /*
+ * Some BIOS code assumes that WAK_STS will be cleared on resume
+ * and use it to determine whether the system is rebooting or
+ * resuming. Clear WAK_STS for compatibility.
+ */
+ (void) AcpiWriteBitRegister (ACPI_BITREG_WAKE_STATUS, ACPI_CLEAR_STATUS);
+ AcpiGbl_SystemAwakeAndRunning = TRUE;
+
/* Enable power button */
(void) AcpiWriteBitRegister(
@@ -639,15 +391,8 @@ AcpiLeaveSleepState (
return_ACPI_STATUS (Status);
}
- Arg.Integer.Value = ACPI_SST_WORKING;
- Status = AcpiEvaluateObject (NULL, METHOD_NAME__SST, &ArgList, NULL);
- if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
- {
- ACPI_EXCEPTION ((AE_INFO, Status, "During Method _SST"));
- }
-
+ AcpiHwExecuteSleepMethod (METHOD_NAME__SST, ACPI_SST_WORKING);
return_ACPI_STATUS (Status);
}
-ACPI_EXPORT_SYMBOL (AcpiLeaveSleepState)
-
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/sys/contrib/dev/acpica/hardware/hwtimer.c b/sys/contrib/dev/acpica/components/hardware/hwtimer.c
index 933b98b..fd1cc35 100644
--- a/sys/contrib/dev/acpica/hardware/hwtimer.c
+++ b/sys/contrib/dev/acpica/components/hardware/hwtimer.c
@@ -49,6 +49,7 @@
ACPI_MODULE_NAME ("hwtimer")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
/******************************************************************************
*
* FUNCTION: AcpiGetTimerResolution
@@ -214,3 +215,4 @@ AcpiGetTimerDuration (
ACPI_EXPORT_SYMBOL (AcpiGetTimerDuration)
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/sys/contrib/dev/acpica/hardware/hwvalid.c b/sys/contrib/dev/acpica/components/hardware/hwvalid.c
index 6f49c78..6f49c78 100644
--- a/sys/contrib/dev/acpica/hardware/hwvalid.c
+++ b/sys/contrib/dev/acpica/components/hardware/hwvalid.c
diff --git a/sys/contrib/dev/acpica/hardware/hwxface.c b/sys/contrib/dev/acpica/components/hardware/hwxface.c
index eeb293b..cac0f23 100644
--- a/sys/contrib/dev/acpica/hardware/hwxface.c
+++ b/sys/contrib/dev/acpica/components/hardware/hwxface.c
@@ -154,12 +154,6 @@ AcpiRead (
return (Status);
}
- Width = Reg->BitWidth;
- if (Width == 64)
- {
- Width = 32; /* Break into two 32-bit transfers */
- }
-
/* Initialize entire 64-bit return value to zero */
*ReturnValue = 0;
@@ -172,28 +166,20 @@ AcpiRead (
if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY)
{
Status = AcpiOsReadMemory ((ACPI_PHYSICAL_ADDRESS)
- Address, &Value, Width);
+ Address, ReturnValue, Reg->BitWidth);
if (ACPI_FAILURE (Status))
{
return (Status);
}
- *ReturnValue = Value;
-
- if (Reg->BitWidth == 64)
- {
- /* Read the top 32 bits */
-
- Status = AcpiOsReadMemory ((ACPI_PHYSICAL_ADDRESS)
- (Address + 4), &Value, 32);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
- *ReturnValue |= ((UINT64) Value << 32);
- }
}
else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
{
+ Width = Reg->BitWidth;
+ if (Width == 64)
+ {
+ Width = 32; /* Break into two 32-bit transfers */
+ }
+
Status = AcpiHwReadPort ((ACPI_IO_ADDRESS)
Address, &Value, Width);
if (ACPI_FAILURE (Status))
@@ -262,12 +248,6 @@ AcpiWrite (
return (Status);
}
- Width = Reg->BitWidth;
- if (Width == 64)
- {
- Width = 32; /* Break into two 32-bit transfers */
- }
-
/*
* Two address spaces supported: Memory or IO. PCI_Config is
* not supported here because the GAS structure is insufficient
@@ -275,24 +255,20 @@ AcpiWrite (
if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY)
{
Status = AcpiOsWriteMemory ((ACPI_PHYSICAL_ADDRESS)
- Address, ACPI_LODWORD (Value), Width);
+ Address, Value, Reg->BitWidth);
if (ACPI_FAILURE (Status))
{
return (Status);
}
-
- if (Reg->BitWidth == 64)
- {
- Status = AcpiOsWriteMemory ((ACPI_PHYSICAL_ADDRESS)
- (Address + 4), ACPI_HIDWORD (Value), 32);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
- }
}
else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
{
+ Width = Reg->BitWidth;
+ if (Width == 64)
+ {
+ Width = 32; /* Break into two 32-bit transfers */
+ }
+
Status = AcpiHwWritePort ((ACPI_IO_ADDRESS)
Address, ACPI_LODWORD (Value), Width);
if (ACPI_FAILURE (Status))
@@ -323,6 +299,7 @@ AcpiWrite (
ACPI_EXPORT_SYMBOL (AcpiWrite)
+#if (!ACPI_REDUCED_HARDWARE)
/*******************************************************************************
*
* FUNCTION: AcpiReadBitRegister
@@ -505,6 +482,8 @@ UnlockAndExit:
ACPI_EXPORT_SYMBOL (AcpiWriteBitRegister)
+#endif /* !ACPI_REDUCED_HARDWARE */
+
/*******************************************************************************
*
diff --git a/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c b/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c
new file mode 100644
index 0000000..7adee69
--- /dev/null
+++ b/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c
@@ -0,0 +1,474 @@
+/******************************************************************************
+ *
+ * Name: hwxfsleep.c - ACPI Hardware Sleep/Wake External Interfaces
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2012, Intel Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ * of any contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+
+#define _COMPONENT ACPI_HARDWARE
+ ACPI_MODULE_NAME ("hwxfsleep")
+
+/* Local prototypes */
+
+static ACPI_STATUS
+AcpiHwSleepDispatch (
+ UINT8 SleepState,
+ UINT32 FunctionId);
+
+/*
+ * Dispatch table used to efficiently branch to the various sleep
+ * functions.
+ */
+#define ACPI_SLEEP_FUNCTION_ID 0
+#define ACPI_WAKE_PREP_FUNCTION_ID 1
+#define ACPI_WAKE_FUNCTION_ID 2
+
+/* Legacy functions are optional, based upon ACPI_REDUCED_HARDWARE */
+
+static ACPI_SLEEP_FUNCTIONS AcpiSleepDispatch[] =
+{
+ {ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacySleep), AcpiHwExtendedSleep},
+ {ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWakePrep), AcpiHwExtendedWakePrep},
+ {ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWake), AcpiHwExtendedWake}
+};
+
+
+/*
+ * These functions are removed for the ACPI_REDUCED_HARDWARE case:
+ * AcpiSetFirmwareWakingVector
+ * AcpiSetFirmwareWakingVector64
+ * AcpiEnterSleepStateS4bios
+ */
+
+#if (!ACPI_REDUCED_HARDWARE)
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiSetFirmwareWakingVector
+ *
+ * PARAMETERS: PhysicalAddress - 32-bit physical address of ACPI real mode
+ * entry point.
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Sets the 32-bit FirmwareWakingVector field of the FACS
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiSetFirmwareWakingVector (
+ UINT32 PhysicalAddress)
+{
+ ACPI_FUNCTION_TRACE (AcpiSetFirmwareWakingVector);
+
+
+ /* Set the 32-bit vector */
+
+ AcpiGbl_FACS->FirmwareWakingVector = PhysicalAddress;
+
+ /* Clear the 64-bit vector if it exists */
+
+ if ((AcpiGbl_FACS->Length > 32) && (AcpiGbl_FACS->Version >= 1))
+ {
+ AcpiGbl_FACS->XFirmwareWakingVector = 0;
+ }
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiSetFirmwareWakingVector)
+
+
+#if ACPI_MACHINE_WIDTH == 64
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiSetFirmwareWakingVector64
+ *
+ * PARAMETERS: PhysicalAddress - 64-bit physical address of ACPI protected
+ * mode entry point.
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Sets the 64-bit X_FirmwareWakingVector field of the FACS, if
+ * it exists in the table. This function is intended for use with
+ * 64-bit host operating systems.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiSetFirmwareWakingVector64 (
+ UINT64 PhysicalAddress)
+{
+ ACPI_FUNCTION_TRACE (AcpiSetFirmwareWakingVector64);
+
+
+ /* Determine if the 64-bit vector actually exists */
+
+ if ((AcpiGbl_FACS->Length <= 32) || (AcpiGbl_FACS->Version < 1))
+ {
+ return_ACPI_STATUS (AE_NOT_EXIST);
+ }
+
+ /* Clear 32-bit vector, set the 64-bit X_ vector */
+
+ AcpiGbl_FACS->FirmwareWakingVector = 0;
+ AcpiGbl_FACS->XFirmwareWakingVector = PhysicalAddress;
+ return_ACPI_STATUS (AE_OK);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiSetFirmwareWakingVector64)
+#endif
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiEnterSleepStateS4bios
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Perform a S4 bios request.
+ * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiEnterSleepStateS4bios (
+ void)
+{
+ UINT32 InValue;
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (AcpiEnterSleepStateS4bios);
+
+
+ /* Clear the wake status bit (PM1) */
+
+ Status = AcpiWriteBitRegister (ACPI_BITREG_WAKE_STATUS, ACPI_CLEAR_STATUS);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ Status = AcpiHwClearAcpiStatus ();
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ /*
+ * 1) Disable/Clear all GPEs
+ * 2) Enable all wakeup GPEs
+ */
+ Status = AcpiHwDisableAllGpes ();
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+ AcpiGbl_SystemAwakeAndRunning = FALSE;
+
+ Status = AcpiHwEnableAllWakeupGpes ();
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ ACPI_FLUSH_CPU_CACHE ();
+
+ Status = AcpiHwWritePort (AcpiGbl_FADT.SmiCommand,
+ (UINT32) AcpiGbl_FADT.S4BiosRequest, 8);
+
+ do {
+ AcpiOsStall(1000);
+ Status = AcpiReadBitRegister (ACPI_BITREG_WAKE_STATUS, &InValue);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+ } while (!InValue);
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiEnterSleepStateS4bios)
+
+#endif /* !ACPI_REDUCED_HARDWARE */
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiHwSleepDispatch
+ *
+ * PARAMETERS: SleepState - Which sleep state to enter/exit
+ * FunctionId - Sleep, WakePrep, or Wake
+ *
+ * RETURN: Status from the invoked sleep handling function.
+ *
+ * DESCRIPTION: Dispatch a sleep/wake request to the appropriate handling
+ * function.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiHwSleepDispatch (
+ UINT8 SleepState,
+ UINT32 FunctionId)
+{
+ ACPI_STATUS Status;
+ ACPI_SLEEP_FUNCTIONS *SleepFunctions = &AcpiSleepDispatch[FunctionId];
+
+
+#if (!ACPI_REDUCED_HARDWARE)
+
+ /*
+ * If the Hardware Reduced flag is set (from the FADT), we must
+ * use the extended sleep registers
+ */
+ if (AcpiGbl_ReducedHardware ||
+ AcpiGbl_FADT.SleepControl.Address)
+ {
+ Status = SleepFunctions->ExtendedFunction (SleepState);
+ }
+ else
+ {
+ /* Legacy sleep */
+
+ Status = SleepFunctions->LegacyFunction (SleepState);
+ }
+
+ return (Status);
+
+#else
+ /*
+ * For the case where reduced-hardware-only code is being generated,
+ * we know that only the extended sleep registers are available
+ */
+ Status = SleepFunctions->ExtendedFunction (SleepState);
+ return (Status);
+
+#endif /* !ACPI_REDUCED_HARDWARE */
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiEnterSleepStatePrep
+ *
+ * PARAMETERS: SleepState - Which sleep state to enter
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Prepare to enter a system sleep state.
+ * This function must execute with interrupts enabled.
+ * We break sleeping into 2 stages so that OSPM can handle
+ * various OS-specific tasks between the two steps.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiEnterSleepStatePrep (
+ UINT8 SleepState)
+{
+ ACPI_STATUS Status;
+ ACPI_OBJECT_LIST ArgList;
+ ACPI_OBJECT Arg;
+ UINT32 SstValue;
+
+
+ ACPI_FUNCTION_TRACE (AcpiEnterSleepStatePrep);
+
+
+ /* _PSW methods could be run here to enable wake-on keyboard, LAN, etc. */
+
+ Status = AcpiGetSleepTypeData (SleepState,
+ &AcpiGbl_SleepTypeA, &AcpiGbl_SleepTypeB);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ /* Execute the _PTS method (Prepare To Sleep) */
+
+ ArgList.Count = 1;
+ ArgList.Pointer = &Arg;
+ Arg.Type = ACPI_TYPE_INTEGER;
+ Arg.Integer.Value = SleepState;
+
+ Status = AcpiEvaluateObject (NULL, METHOD_NAME__PTS, &ArgList, NULL);
+ if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ /* Setup the argument to the _SST method (System STatus) */
+
+ switch (SleepState)
+ {
+ case ACPI_STATE_S0:
+ SstValue = ACPI_SST_WORKING;
+ break;
+
+ case ACPI_STATE_S1:
+ case ACPI_STATE_S2:
+ case ACPI_STATE_S3:
+ SstValue = ACPI_SST_SLEEPING;
+ break;
+
+ case ACPI_STATE_S4:
+ SstValue = ACPI_SST_SLEEP_CONTEXT;
+ break;
+
+ default:
+ SstValue = ACPI_SST_INDICATOR_OFF; /* Default is off */
+ break;
+ }
+
+ /*
+ * Set the system indicators to show the desired sleep state.
+ * _SST is an optional method (return no error if not found)
+ */
+ AcpiHwExecuteSleepMethod (METHOD_NAME__SST, SstValue);
+ return_ACPI_STATUS (AE_OK);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiEnterSleepStatePrep)
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiEnterSleepState
+ *
+ * PARAMETERS: SleepState - Which sleep state to enter
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Enter a system sleep state
+ * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiEnterSleepState (
+ UINT8 SleepState)
+{
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (AcpiEnterSleepState);
+
+
+ if ((AcpiGbl_SleepTypeA > ACPI_SLEEP_TYPE_MAX) ||
+ (AcpiGbl_SleepTypeB > ACPI_SLEEP_TYPE_MAX))
+ {
+ ACPI_ERROR ((AE_INFO, "Sleep values out of range: A=0x%X B=0x%X",
+ AcpiGbl_SleepTypeA, AcpiGbl_SleepTypeB));
+ return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
+ }
+
+ Status = AcpiHwSleepDispatch (SleepState, ACPI_SLEEP_FUNCTION_ID);
+ return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiEnterSleepState)
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiLeaveSleepStatePrep
+ *
+ * PARAMETERS: SleepState - Which sleep state we are exiting
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Perform the first state of OS-independent ACPI cleanup after a
+ * sleep. Called with interrupts DISABLED.
+ * We break wake/resume into 2 stages so that OSPM can handle
+ * various OS-specific tasks between the two steps.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiLeaveSleepStatePrep (
+ UINT8 SleepState)
+{
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (AcpiLeaveSleepStatePrep);
+
+
+ Status = AcpiHwSleepDispatch (SleepState, ACPI_WAKE_PREP_FUNCTION_ID);
+ return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiLeaveSleepStatePrep)
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiLeaveSleepState
+ *
+ * PARAMETERS: SleepState - Which sleep state we are exiting
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Perform OS-independent ACPI cleanup after a sleep
+ * Called with interrupts ENABLED.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiLeaveSleepState (
+ UINT8 SleepState)
+{
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (AcpiLeaveSleepState);
+
+
+ Status = AcpiHwSleepDispatch (SleepState, ACPI_WAKE_FUNCTION_ID);
+ return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiLeaveSleepState)
diff --git a/sys/contrib/dev/acpica/namespace/nsaccess.c b/sys/contrib/dev/acpica/components/namespace/nsaccess.c
index 2e28acf..2e28acf 100644
--- a/sys/contrib/dev/acpica/namespace/nsaccess.c
+++ b/sys/contrib/dev/acpica/components/namespace/nsaccess.c
diff --git a/sys/contrib/dev/acpica/namespace/nsalloc.c b/sys/contrib/dev/acpica/components/namespace/nsalloc.c
index 607aed2..607aed2 100644
--- a/sys/contrib/dev/acpica/namespace/nsalloc.c
+++ b/sys/contrib/dev/acpica/components/namespace/nsalloc.c
diff --git a/sys/contrib/dev/acpica/namespace/nsdump.c b/sys/contrib/dev/acpica/components/namespace/nsdump.c
index fe44ddb..fe44ddb 100644
--- a/sys/contrib/dev/acpica/namespace/nsdump.c
+++ b/sys/contrib/dev/acpica/components/namespace/nsdump.c
diff --git a/sys/contrib/dev/acpica/namespace/nsdumpdv.c b/sys/contrib/dev/acpica/components/namespace/nsdumpdv.c
index 54d5ab1..54d5ab1 100644
--- a/sys/contrib/dev/acpica/namespace/nsdumpdv.c
+++ b/sys/contrib/dev/acpica/components/namespace/nsdumpdv.c
diff --git a/sys/contrib/dev/acpica/namespace/nseval.c b/sys/contrib/dev/acpica/components/namespace/nseval.c
index 9a97c6f..9a97c6f 100644
--- a/sys/contrib/dev/acpica/namespace/nseval.c
+++ b/sys/contrib/dev/acpica/components/namespace/nseval.c
diff --git a/sys/contrib/dev/acpica/namespace/nsinit.c b/sys/contrib/dev/acpica/components/namespace/nsinit.c
index 6ef516c..6ef516c 100644
--- a/sys/contrib/dev/acpica/namespace/nsinit.c
+++ b/sys/contrib/dev/acpica/components/namespace/nsinit.c
diff --git a/sys/contrib/dev/acpica/namespace/nsload.c b/sys/contrib/dev/acpica/components/namespace/nsload.c
index 2d4c788..2d4c788 100644
--- a/sys/contrib/dev/acpica/namespace/nsload.c
+++ b/sys/contrib/dev/acpica/components/namespace/nsload.c
diff --git a/sys/contrib/dev/acpica/namespace/nsnames.c b/sys/contrib/dev/acpica/components/namespace/nsnames.c
index 9628029..9628029 100644
--- a/sys/contrib/dev/acpica/namespace/nsnames.c
+++ b/sys/contrib/dev/acpica/components/namespace/nsnames.c
diff --git a/sys/contrib/dev/acpica/namespace/nsobject.c b/sys/contrib/dev/acpica/components/namespace/nsobject.c
index 6d0d4b2..6d0d4b2 100644
--- a/sys/contrib/dev/acpica/namespace/nsobject.c
+++ b/sys/contrib/dev/acpica/components/namespace/nsobject.c
diff --git a/sys/contrib/dev/acpica/namespace/nsparse.c b/sys/contrib/dev/acpica/components/namespace/nsparse.c
index 44c5b89..44c5b89 100644
--- a/sys/contrib/dev/acpica/namespace/nsparse.c
+++ b/sys/contrib/dev/acpica/components/namespace/nsparse.c
diff --git a/sys/contrib/dev/acpica/namespace/nspredef.c b/sys/contrib/dev/acpica/components/namespace/nspredef.c
index 2006c2c..2006c2c 100644
--- a/sys/contrib/dev/acpica/namespace/nspredef.c
+++ b/sys/contrib/dev/acpica/components/namespace/nspredef.c
diff --git a/sys/contrib/dev/acpica/namespace/nsrepair.c b/sys/contrib/dev/acpica/components/namespace/nsrepair.c
index e5c8ac0..e5c8ac0 100644
--- a/sys/contrib/dev/acpica/namespace/nsrepair.c
+++ b/sys/contrib/dev/acpica/components/namespace/nsrepair.c
diff --git a/sys/contrib/dev/acpica/namespace/nsrepair2.c b/sys/contrib/dev/acpica/components/namespace/nsrepair2.c
index 06286f1..06286f1 100644
--- a/sys/contrib/dev/acpica/namespace/nsrepair2.c
+++ b/sys/contrib/dev/acpica/components/namespace/nsrepair2.c
diff --git a/sys/contrib/dev/acpica/namespace/nssearch.c b/sys/contrib/dev/acpica/components/namespace/nssearch.c
index d6106eb..d6106eb 100644
--- a/sys/contrib/dev/acpica/namespace/nssearch.c
+++ b/sys/contrib/dev/acpica/components/namespace/nssearch.c
diff --git a/sys/contrib/dev/acpica/namespace/nsutils.c b/sys/contrib/dev/acpica/components/namespace/nsutils.c
index f7dc768..f7dc768 100644
--- a/sys/contrib/dev/acpica/namespace/nsutils.c
+++ b/sys/contrib/dev/acpica/components/namespace/nsutils.c
diff --git a/sys/contrib/dev/acpica/namespace/nswalk.c b/sys/contrib/dev/acpica/components/namespace/nswalk.c
index 640fd7d..640fd7d 100644
--- a/sys/contrib/dev/acpica/namespace/nswalk.c
+++ b/sys/contrib/dev/acpica/components/namespace/nswalk.c
diff --git a/sys/contrib/dev/acpica/namespace/nsxfeval.c b/sys/contrib/dev/acpica/components/namespace/nsxfeval.c
index 0c8cb54..0c8cb54 100644
--- a/sys/contrib/dev/acpica/namespace/nsxfeval.c
+++ b/sys/contrib/dev/acpica/components/namespace/nsxfeval.c
diff --git a/sys/contrib/dev/acpica/namespace/nsxfname.c b/sys/contrib/dev/acpica/components/namespace/nsxfname.c
index c1be8cd..c1be8cd 100644
--- a/sys/contrib/dev/acpica/namespace/nsxfname.c
+++ b/sys/contrib/dev/acpica/components/namespace/nsxfname.c
diff --git a/sys/contrib/dev/acpica/namespace/nsxfobj.c b/sys/contrib/dev/acpica/components/namespace/nsxfobj.c
index 687f3c0..687f3c0 100644
--- a/sys/contrib/dev/acpica/namespace/nsxfobj.c
+++ b/sys/contrib/dev/acpica/components/namespace/nsxfobj.c
diff --git a/sys/contrib/dev/acpica/parser/psargs.c b/sys/contrib/dev/acpica/components/parser/psargs.c
index f3f7015..f3f7015 100644
--- a/sys/contrib/dev/acpica/parser/psargs.c
+++ b/sys/contrib/dev/acpica/components/parser/psargs.c
diff --git a/sys/contrib/dev/acpica/parser/psloop.c b/sys/contrib/dev/acpica/components/parser/psloop.c
index c875d26..c875d26 100644
--- a/sys/contrib/dev/acpica/parser/psloop.c
+++ b/sys/contrib/dev/acpica/components/parser/psloop.c
diff --git a/sys/contrib/dev/acpica/parser/psopcode.c b/sys/contrib/dev/acpica/components/parser/psopcode.c
index 994f188..994f188 100644
--- a/sys/contrib/dev/acpica/parser/psopcode.c
+++ b/sys/contrib/dev/acpica/components/parser/psopcode.c
diff --git a/sys/contrib/dev/acpica/parser/psparse.c b/sys/contrib/dev/acpica/components/parser/psparse.c
index 099e6dd..099e6dd 100644
--- a/sys/contrib/dev/acpica/parser/psparse.c
+++ b/sys/contrib/dev/acpica/components/parser/psparse.c
diff --git a/sys/contrib/dev/acpica/parser/psscope.c b/sys/contrib/dev/acpica/components/parser/psscope.c
index 7e4acf0..7e4acf0 100644
--- a/sys/contrib/dev/acpica/parser/psscope.c
+++ b/sys/contrib/dev/acpica/components/parser/psscope.c
diff --git a/sys/contrib/dev/acpica/parser/pstree.c b/sys/contrib/dev/acpica/components/parser/pstree.c
index e06f711..e06f711 100644
--- a/sys/contrib/dev/acpica/parser/pstree.c
+++ b/sys/contrib/dev/acpica/components/parser/pstree.c
diff --git a/sys/contrib/dev/acpica/parser/psutils.c b/sys/contrib/dev/acpica/components/parser/psutils.c
index 35149b5..35149b5 100644
--- a/sys/contrib/dev/acpica/parser/psutils.c
+++ b/sys/contrib/dev/acpica/components/parser/psutils.c
diff --git a/sys/contrib/dev/acpica/parser/pswalk.c b/sys/contrib/dev/acpica/components/parser/pswalk.c
index 6dd2b0d..6dd2b0d 100644
--- a/sys/contrib/dev/acpica/parser/pswalk.c
+++ b/sys/contrib/dev/acpica/components/parser/pswalk.c
diff --git a/sys/contrib/dev/acpica/parser/psxface.c b/sys/contrib/dev/acpica/components/parser/psxface.c
index 2cfd066..2cfd066 100644
--- a/sys/contrib/dev/acpica/parser/psxface.c
+++ b/sys/contrib/dev/acpica/components/parser/psxface.c
diff --git a/sys/contrib/dev/acpica/resources/rsaddr.c b/sys/contrib/dev/acpica/components/resources/rsaddr.c
index 950cafa..950cafa 100644
--- a/sys/contrib/dev/acpica/resources/rsaddr.c
+++ b/sys/contrib/dev/acpica/components/resources/rsaddr.c
diff --git a/sys/contrib/dev/acpica/resources/rscalc.c b/sys/contrib/dev/acpica/components/resources/rscalc.c
index c6af15c..c6af15c 100644
--- a/sys/contrib/dev/acpica/resources/rscalc.c
+++ b/sys/contrib/dev/acpica/components/resources/rscalc.c
diff --git a/sys/contrib/dev/acpica/resources/rscreate.c b/sys/contrib/dev/acpica/components/resources/rscreate.c
index dd1f6ae..dd1f6ae 100644
--- a/sys/contrib/dev/acpica/resources/rscreate.c
+++ b/sys/contrib/dev/acpica/components/resources/rscreate.c
diff --git a/sys/contrib/dev/acpica/resources/rsdump.c b/sys/contrib/dev/acpica/components/resources/rsdump.c
index abde5cd..abde5cd 100644
--- a/sys/contrib/dev/acpica/resources/rsdump.c
+++ b/sys/contrib/dev/acpica/components/resources/rsdump.c
diff --git a/sys/contrib/dev/acpica/resources/rsinfo.c b/sys/contrib/dev/acpica/components/resources/rsinfo.c
index ab2254e..ab2254e 100644
--- a/sys/contrib/dev/acpica/resources/rsinfo.c
+++ b/sys/contrib/dev/acpica/components/resources/rsinfo.c
diff --git a/sys/contrib/dev/acpica/resources/rsio.c b/sys/contrib/dev/acpica/components/resources/rsio.c
index 71d03c0..71d03c0 100644
--- a/sys/contrib/dev/acpica/resources/rsio.c
+++ b/sys/contrib/dev/acpica/components/resources/rsio.c
diff --git a/sys/contrib/dev/acpica/resources/rsirq.c b/sys/contrib/dev/acpica/components/resources/rsirq.c
index 0179749..0179749 100644
--- a/sys/contrib/dev/acpica/resources/rsirq.c
+++ b/sys/contrib/dev/acpica/components/resources/rsirq.c
diff --git a/sys/contrib/dev/acpica/resources/rslist.c b/sys/contrib/dev/acpica/components/resources/rslist.c
index 493d435..493d435 100644
--- a/sys/contrib/dev/acpica/resources/rslist.c
+++ b/sys/contrib/dev/acpica/components/resources/rslist.c
diff --git a/sys/contrib/dev/acpica/resources/rsmemory.c b/sys/contrib/dev/acpica/components/resources/rsmemory.c
index 5cb69dd..5cb69dd 100644
--- a/sys/contrib/dev/acpica/resources/rsmemory.c
+++ b/sys/contrib/dev/acpica/components/resources/rsmemory.c
diff --git a/sys/contrib/dev/acpica/resources/rsmisc.c b/sys/contrib/dev/acpica/components/resources/rsmisc.c
index 2489016..2489016 100644
--- a/sys/contrib/dev/acpica/resources/rsmisc.c
+++ b/sys/contrib/dev/acpica/components/resources/rsmisc.c
diff --git a/sys/contrib/dev/acpica/resources/rsserial.c b/sys/contrib/dev/acpica/components/resources/rsserial.c
index 09cc7de..09cc7de 100644
--- a/sys/contrib/dev/acpica/resources/rsserial.c
+++ b/sys/contrib/dev/acpica/components/resources/rsserial.c
diff --git a/sys/contrib/dev/acpica/resources/rsutils.c b/sys/contrib/dev/acpica/components/resources/rsutils.c
index 083e350..083e350 100644
--- a/sys/contrib/dev/acpica/resources/rsutils.c
+++ b/sys/contrib/dev/acpica/components/resources/rsutils.c
diff --git a/sys/contrib/dev/acpica/resources/rsxface.c b/sys/contrib/dev/acpica/components/resources/rsxface.c
index 152f79d..152f79d 100644
--- a/sys/contrib/dev/acpica/resources/rsxface.c
+++ b/sys/contrib/dev/acpica/components/resources/rsxface.c
diff --git a/sys/contrib/dev/acpica/tables/tbfadt.c b/sys/contrib/dev/acpica/components/tables/tbfadt.c
index b137446..b137446 100644
--- a/sys/contrib/dev/acpica/tables/tbfadt.c
+++ b/sys/contrib/dev/acpica/components/tables/tbfadt.c
diff --git a/sys/contrib/dev/acpica/tables/tbfind.c b/sys/contrib/dev/acpica/components/tables/tbfind.c
index f3acb42..f3acb42 100644
--- a/sys/contrib/dev/acpica/tables/tbfind.c
+++ b/sys/contrib/dev/acpica/components/tables/tbfind.c
diff --git a/sys/contrib/dev/acpica/tables/tbinstal.c b/sys/contrib/dev/acpica/components/tables/tbinstal.c
index 7cfbf4d..e178d94 100644
--- a/sys/contrib/dev/acpica/tables/tbinstal.c
+++ b/sys/contrib/dev/acpica/components/tables/tbinstal.c
@@ -128,7 +128,6 @@ AcpiTbAddTable (
{
UINT32 i;
ACPI_STATUS Status = AE_OK;
- ACPI_TABLE_HEADER *OverrideTable = NULL;
ACPI_FUNCTION_TRACE (TbAddTable);
@@ -242,26 +241,10 @@ AcpiTbAddTable (
/*
* ACPI Table Override:
* Allow the host to override dynamically loaded tables.
+ * NOTE: the table is fully mapped at this point, and the mapping will
+ * be deleted by TbTableOverride if the table is actually overridden.
*/
- Status = AcpiOsTableOverride (TableDesc->Pointer, &OverrideTable);
- if (ACPI_SUCCESS (Status) && OverrideTable)
- {
- ACPI_INFO ((AE_INFO,
- "%4.4s @ 0x%p Table override, replaced with:",
- TableDesc->Pointer->Signature,
- ACPI_CAST_PTR (void, TableDesc->Address)));
-
- /* We can delete the table that was passed as a parameter */
-
- AcpiTbDeleteTable (TableDesc);
-
- /* Setup descriptor for the new table */
-
- TableDesc->Address = ACPI_PTR_TO_PHYSADDR (OverrideTable);
- TableDesc->Pointer = OverrideTable;
- TableDesc->Length = OverrideTable->Length;
- TableDesc->Flags = ACPI_TABLE_ORIGIN_OVERRIDE;
- }
+ (void) AcpiTbTableOverride (TableDesc->Pointer, TableDesc);
/* Add the table to the global root table list */
@@ -283,6 +266,98 @@ Release:
/*******************************************************************************
*
+ * FUNCTION: AcpiTbTableOverride
+ *
+ * PARAMETERS: TableHeader - Header for the original table
+ * TableDesc - Table descriptor initialized for the
+ * original table. May or may not be mapped.
+ *
+ * RETURN: Pointer to the entire new table. NULL if table not overridden.
+ * If overridden, installs the new table within the input table
+ * descriptor.
+ *
+ * DESCRIPTION: Attempt table override by calling the OSL override functions.
+ * Note: If the table is overridden, then the entire new table
+ * is mapped and returned by this function.
+ *
+ ******************************************************************************/
+
+ACPI_TABLE_HEADER *
+AcpiTbTableOverride (
+ ACPI_TABLE_HEADER *TableHeader,
+ ACPI_TABLE_DESC *TableDesc)
+{
+ ACPI_STATUS Status;
+ ACPI_TABLE_HEADER *NewTable = NULL;
+ ACPI_PHYSICAL_ADDRESS NewAddress = 0;
+ UINT32 NewTableLength = 0;
+ UINT8 NewFlags;
+ char *OverrideType;
+
+
+ /* (1) Attempt logical override (returns a logical address) */
+
+ Status = AcpiOsTableOverride (TableHeader, &NewTable);
+ if (ACPI_SUCCESS (Status) && NewTable)
+ {
+ NewAddress = ACPI_PTR_TO_PHYSADDR (NewTable);
+ NewTableLength = NewTable->Length;
+ NewFlags = ACPI_TABLE_ORIGIN_OVERRIDE;
+ OverrideType = "Logical";
+ goto FinishOverride;
+ }
+
+ /* (2) Attempt physical override (returns a physical address) */
+
+ Status = AcpiOsPhysicalTableOverride (TableHeader,
+ &NewAddress, &NewTableLength);
+ if (ACPI_SUCCESS (Status) && NewAddress && NewTableLength)
+ {
+ /* Map the entire new table */
+
+ NewTable = AcpiOsMapMemory (NewAddress, NewTableLength);
+ if (!NewTable)
+ {
+ ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY,
+ "%4.4s %p Attempted physical table override failed",
+ TableHeader->Signature,
+ ACPI_CAST_PTR (void, TableDesc->Address)));
+ return (NULL);
+ }
+
+ OverrideType = "Physical";
+ NewFlags = ACPI_TABLE_ORIGIN_MAPPED;
+ goto FinishOverride;
+ }
+
+ return (NULL); /* There was no override */
+
+
+FinishOverride:
+
+ ACPI_INFO ((AE_INFO,
+ "%4.4s %p %s table override, new table: %p",
+ TableHeader->Signature,
+ ACPI_CAST_PTR (void, TableDesc->Address),
+ OverrideType, NewTable));
+
+ /* We can now unmap/delete the original table (if fully mapped) */
+
+ AcpiTbDeleteTable (TableDesc);
+
+ /* Setup descriptor for the new table */
+
+ TableDesc->Address = NewAddress;
+ TableDesc->Pointer = NewTable;
+ TableDesc->Length = NewTableLength;
+ TableDesc->Flags = NewFlags;
+
+ return (NewTable);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiTbResizeRootTableList
*
* PARAMETERS: None
diff --git a/sys/contrib/dev/acpica/tables/tbutils.c b/sys/contrib/dev/acpica/components/tables/tbutils.c
index 6a1068b..02ee3e6 100644
--- a/sys/contrib/dev/acpica/tables/tbutils.c
+++ b/sys/contrib/dev/acpica/components/tables/tbutils.c
@@ -50,6 +50,7 @@
#define _COMPONENT ACPI_TABLES
ACPI_MODULE_NAME ("tbutils")
+
/* Local prototypes */
static void
@@ -68,6 +69,7 @@ AcpiTbGetRootTableEntry (
UINT32 TableEntrySize);
+#if (!ACPI_REDUCED_HARDWARE)
/*******************************************************************************
*
* FUNCTION: AcpiTbInitializeFacs
@@ -100,6 +102,7 @@ AcpiTbInitializeFacs (
ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &AcpiGbl_FACS));
return (Status);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
/*******************************************************************************
@@ -423,7 +426,7 @@ AcpiTbCopyDsdt (
* RETURN: None
*
* DESCRIPTION: Install an ACPI table into the global data structure. The
- * table override mechanism is implemented here to allow the host
+ * table override mechanism is called to allow the host
* OS to replace any table before it is installed in the root
* table array.
*
@@ -435,11 +438,9 @@ AcpiTbInstallTable (
char *Signature,
UINT32 TableIndex)
{
- UINT8 Flags;
- ACPI_STATUS Status;
- ACPI_TABLE_HEADER *TableToInstall;
- ACPI_TABLE_HEADER *MappedTable;
- ACPI_TABLE_HEADER *OverrideTable = NULL;
+ ACPI_TABLE_HEADER *Table;
+ ACPI_TABLE_HEADER *FinalTable;
+ ACPI_TABLE_DESC *TableDesc;
if (!Address)
@@ -451,15 +452,17 @@ AcpiTbInstallTable (
/* Map just the table header */
- MappedTable = AcpiOsMapMemory (Address, sizeof (ACPI_TABLE_HEADER));
- if (!MappedTable)
+ Table = AcpiOsMapMemory (Address, sizeof (ACPI_TABLE_HEADER));
+ if (!Table)
{
+ ACPI_ERROR ((AE_INFO, "Could not map memory for table [%s] at %p",
+ Signature, ACPI_CAST_PTR (void, Address)));
return;
}
/* Skip SSDT when DSDT is overriden */
- if (ACPI_COMPARE_NAME (MappedTable->Signature, ACPI_SIG_SSDT) &&
+ if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_SSDT) &&
(AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Flags &
ACPI_TABLE_ORIGIN_OVERRIDE))
{
@@ -475,61 +478,58 @@ AcpiTbInstallTable (
/* If a particular signature is expected (DSDT/FACS), it must match */
if (Signature &&
- !ACPI_COMPARE_NAME (MappedTable->Signature, Signature))
+ !ACPI_COMPARE_NAME (Table->Signature, Signature))
{
ACPI_ERROR ((AE_INFO,
"Invalid signature 0x%X for ACPI table, expected [%s]",
- *ACPI_CAST_PTR (UINT32, MappedTable->Signature), Signature));
+ *ACPI_CAST_PTR (UINT32, Table->Signature), Signature));
goto UnmapAndExit;
}
/*
+ * Initialize the table entry. Set the pointer to NULL, since the
+ * table is not fully mapped at this time.
+ */
+ TableDesc = &AcpiGbl_RootTableList.Tables[TableIndex];
+
+ TableDesc->Address = Address;
+ TableDesc->Pointer = NULL;
+ TableDesc->Length = Table->Length;
+ TableDesc->Flags = ACPI_TABLE_ORIGIN_MAPPED;
+ ACPI_MOVE_32_TO_32 (TableDesc->Signature.Ascii, Table->Signature);
+
+ /*
* ACPI Table Override:
*
* Before we install the table, let the host OS override it with a new
* one if desired. Any table within the RSDT/XSDT can be replaced,
* including the DSDT which is pointed to by the FADT.
+ *
+ * NOTE: If the table is overridden, then FinalTable will contain a
+ * mapped pointer to the full new table. If the table is not overridden,
+ * then the table will be fully mapped elsewhere (in verify table).
+ * In any case, we must unmap the header that was mapped above.
*/
- Status = AcpiOsTableOverride (MappedTable, &OverrideTable);
- if (ACPI_SUCCESS (Status) && OverrideTable)
+ FinalTable = AcpiTbTableOverride (Table, TableDesc);
+ if (!FinalTable)
{
- ACPI_INFO ((AE_INFO,
- "%4.4s @ 0x%p Table override, replaced with:",
- MappedTable->Signature, ACPI_CAST_PTR (void, Address)));
-
- AcpiGbl_RootTableList.Tables[TableIndex].Pointer = OverrideTable;
- Address = ACPI_PTR_TO_PHYSADDR (OverrideTable);
-
- TableToInstall = OverrideTable;
- Flags = ACPI_TABLE_ORIGIN_OVERRIDE;
- }
- else
- {
- TableToInstall = MappedTable;
- Flags = ACPI_TABLE_ORIGIN_MAPPED;
+ FinalTable = Table; /* There was no override */
}
- /* Initialize the table entry */
+ AcpiTbPrintTableHeader (TableDesc->Address, FinalTable);
- AcpiGbl_RootTableList.Tables[TableIndex].Address = Address;
- AcpiGbl_RootTableList.Tables[TableIndex].Length = TableToInstall->Length;
- AcpiGbl_RootTableList.Tables[TableIndex].Flags = Flags;
-
- ACPI_MOVE_32_TO_32 (
- &(AcpiGbl_RootTableList.Tables[TableIndex].Signature),
- TableToInstall->Signature);
-
- AcpiTbPrintTableHeader (Address, TableToInstall);
+ /* Set the global integer width (based upon revision of the DSDT) */
if (TableIndex == ACPI_TABLE_INDEX_DSDT)
{
- /* Global integer width is based upon revision of the DSDT */
-
- AcpiUtSetIntegerWidth (TableToInstall->Revision);
+ AcpiUtSetIntegerWidth (FinalTable->Revision);
}
UnmapAndExit:
- AcpiOsUnmapMemory (MappedTable, sizeof (ACPI_TABLE_HEADER));
+
+ /* Always unmap the table header that we mapped above */
+
+ AcpiOsUnmapMemory (Table, sizeof (ACPI_TABLE_HEADER));
}
diff --git a/sys/contrib/dev/acpica/tables/tbxface.c b/sys/contrib/dev/acpica/components/tables/tbxface.c
index dc03a2c..dc03a2c 100644
--- a/sys/contrib/dev/acpica/tables/tbxface.c
+++ b/sys/contrib/dev/acpica/components/tables/tbxface.c
diff --git a/sys/contrib/dev/acpica/tables/tbxfroot.c b/sys/contrib/dev/acpica/components/tables/tbxfroot.c
index c6ade4e..c6ade4e 100644
--- a/sys/contrib/dev/acpica/tables/tbxfroot.c
+++ b/sys/contrib/dev/acpica/components/tables/tbxfroot.c
diff --git a/sys/contrib/dev/acpica/utilities/utaddress.c b/sys/contrib/dev/acpica/components/utilities/utaddress.c
index ca73b69..ca73b69 100644
--- a/sys/contrib/dev/acpica/utilities/utaddress.c
+++ b/sys/contrib/dev/acpica/components/utilities/utaddress.c
diff --git a/sys/contrib/dev/acpica/utilities/utalloc.c b/sys/contrib/dev/acpica/components/utilities/utalloc.c
index 5e41bbd..5e41bbd 100644
--- a/sys/contrib/dev/acpica/utilities/utalloc.c
+++ b/sys/contrib/dev/acpica/components/utilities/utalloc.c
diff --git a/sys/contrib/dev/acpica/utilities/utcache.c b/sys/contrib/dev/acpica/components/utilities/utcache.c
index b8efa68..b8efa68 100644
--- a/sys/contrib/dev/acpica/utilities/utcache.c
+++ b/sys/contrib/dev/acpica/components/utilities/utcache.c
diff --git a/sys/contrib/dev/acpica/utilities/utcopy.c b/sys/contrib/dev/acpica/components/utilities/utcopy.c
index f145c57..f145c57 100644
--- a/sys/contrib/dev/acpica/utilities/utcopy.c
+++ b/sys/contrib/dev/acpica/components/utilities/utcopy.c
diff --git a/sys/contrib/dev/acpica/utilities/utdebug.c b/sys/contrib/dev/acpica/components/utilities/utdebug.c
index ade7dfe..ade7dfe 100644
--- a/sys/contrib/dev/acpica/utilities/utdebug.c
+++ b/sys/contrib/dev/acpica/components/utilities/utdebug.c
diff --git a/sys/contrib/dev/acpica/utilities/utdecode.c b/sys/contrib/dev/acpica/components/utilities/utdecode.c
index da59fbc..689d495 100644
--- a/sys/contrib/dev/acpica/utilities/utdecode.c
+++ b/sys/contrib/dev/acpica/components/utilities/utdecode.c
@@ -567,20 +567,21 @@ AcpiUtGetMutexName (
/* Names for Notify() values, used for debug output */
-static const char *AcpiGbl_NotifyValueNames[] =
+static const char *AcpiGbl_NotifyValueNames[ACPI_NOTIFY_MAX + 1] =
{
- "Bus Check",
- "Device Check",
- "Device Wake",
- "Eject Request",
- "Device Check Light",
- "Frequency Mismatch",
- "Bus Mode Mismatch",
- "Power Fault",
- "Capabilities Check",
- "Device PLD Check",
- "Reserved",
- "System Locality Update"
+ /* 00 */ "Bus Check",
+ /* 01 */ "Device Check",
+ /* 02 */ "Device Wake",
+ /* 03 */ "Eject Request",
+ /* 04 */ "Device Check Light",
+ /* 05 */ "Frequency Mismatch",
+ /* 06 */ "Bus Mode Mismatch",
+ /* 07 */ "Power Fault",
+ /* 08 */ "Capabilities Check",
+ /* 09 */ "Device PLD Check",
+ /* 10 */ "Reserved",
+ /* 11 */ "System Locality Update",
+ /* 12 */ "Shutdown Request"
};
const char *
@@ -596,9 +597,13 @@ AcpiUtGetNotifyName (
{
return ("Reserved");
}
- else /* Greater or equal to 0x80 */
+ else if (NotifyValue <= ACPI_MAX_DEVICE_SPECIFIC_NOTIFY)
{
- return ("**Device Specific**");
+ return ("Device Specific");
+ }
+ else
+ {
+ return ("Hardware Specific");
}
}
#endif
diff --git a/sys/contrib/dev/acpica/utilities/utdelete.c b/sys/contrib/dev/acpica/components/utilities/utdelete.c
index 5f7404a..5f7404a 100644
--- a/sys/contrib/dev/acpica/utilities/utdelete.c
+++ b/sys/contrib/dev/acpica/components/utilities/utdelete.c
diff --git a/sys/contrib/dev/acpica/utilities/uteval.c b/sys/contrib/dev/acpica/components/utilities/uteval.c
index 57dbec0..57dbec0 100644
--- a/sys/contrib/dev/acpica/utilities/uteval.c
+++ b/sys/contrib/dev/acpica/components/utilities/uteval.c
diff --git a/sys/contrib/dev/acpica/utilities/utglobal.c b/sys/contrib/dev/acpica/components/utilities/utglobal.c
index 0d79dae..ab15231 100644
--- a/sys/contrib/dev/acpica/utilities/utglobal.c
+++ b/sys/contrib/dev/acpica/components/utilities/utglobal.c
@@ -155,6 +155,7 @@ const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames[] =
};
+#if (!ACPI_REDUCED_HARDWARE)
/******************************************************************************
*
* Event and Hardware globals
@@ -199,6 +200,7 @@ ACPI_FIXED_EVENT_INFO AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS] =
/* ACPI_EVENT_SLEEP_BUTTON */ {ACPI_BITREG_SLEEP_BUTTON_STATUS, ACPI_BITREG_SLEEP_BUTTON_ENABLE, ACPI_BITMASK_SLEEP_BUTTON_STATUS, ACPI_BITMASK_SLEEP_BUTTON_ENABLE},
/* ACPI_EVENT_RTC */ {ACPI_BITREG_RT_CLOCK_STATUS, ACPI_BITREG_RT_CLOCK_ENABLE, ACPI_BITMASK_RT_CLOCK_STATUS, ACPI_BITMASK_RT_CLOCK_ENABLE},
};
+#endif /* !ACPI_REDUCED_HARDWARE */
/*******************************************************************************
@@ -269,6 +271,8 @@ AcpiUtInitGlobals (
AcpiFixedEventCount[i] = 0;
}
+#if (!ACPI_REDUCED_HARDWARE)
+
/* GPE support */
AcpiGbl_AllGpesInitialized = FALSE;
@@ -277,6 +281,10 @@ AcpiUtInitGlobals (
AcpiGbl_GpeFadtBlocks[1] = NULL;
AcpiCurrentGpeCount = 0;
+ AcpiGbl_GlobalEventHandler = NULL;
+
+#endif /* !ACPI_REDUCED_HARDWARE */
+
/* Global handlers */
AcpiGbl_SystemNotify.Handler = NULL;
@@ -285,7 +293,6 @@ AcpiUtInitGlobals (
AcpiGbl_InitHandler = NULL;
AcpiGbl_TableHandler = NULL;
AcpiGbl_InterfaceHandler = NULL;
- AcpiGbl_GlobalEventHandler = NULL;
/* Global Lock support */
diff --git a/sys/contrib/dev/acpica/utilities/utids.c b/sys/contrib/dev/acpica/components/utilities/utids.c
index 5d5c8d3..5d5c8d3 100644
--- a/sys/contrib/dev/acpica/utilities/utids.c
+++ b/sys/contrib/dev/acpica/components/utilities/utids.c
diff --git a/sys/contrib/dev/acpica/utilities/utinit.c b/sys/contrib/dev/acpica/components/utilities/utinit.c
index 5b2f713..6694ec7 100644
--- a/sys/contrib/dev/acpica/utilities/utinit.c
+++ b/sys/contrib/dev/acpica/components/utilities/utinit.c
@@ -58,21 +58,33 @@
static void AcpiUtTerminate (
void);
+#if (!ACPI_REDUCED_HARDWARE)
+static void
+AcpiUtFreeGpeLists (
+ void);
+
+#else
+
+#define AcpiUtFreeGpeLists()
+#endif /* !ACPI_REDUCED_HARDWARE */
+
+
+#if (!ACPI_REDUCED_HARDWARE)
/******************************************************************************
*
- * FUNCTION: AcpiUtTerminate
+ * FUNCTION: AcpiUtFreeGpeLists
*
* PARAMETERS: none
*
* RETURN: none
*
- * DESCRIPTION: Free global memory
+ * DESCRIPTION: Free global GPE lists
*
******************************************************************************/
static void
-AcpiUtTerminate (
+AcpiUtFreeGpeLists (
void)
{
ACPI_GPE_BLOCK_INFO *GpeBlock;
@@ -81,9 +93,6 @@ AcpiUtTerminate (
ACPI_GPE_XRUPT_INFO *NextGpeXruptInfo;
- ACPI_FUNCTION_TRACE (UtTerminate);
-
-
/* Free global GPE blocks and related info structures */
GpeXruptInfo = AcpiGbl_GpeXruptListHead;
@@ -103,7 +112,29 @@ AcpiUtTerminate (
ACPI_FREE (GpeXruptInfo);
GpeXruptInfo = NextGpeXruptInfo;
}
+}
+#endif /* !ACPI_REDUCED_HARDWARE */
+
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiUtTerminate
+ *
+ * PARAMETERS: none
+ *
+ * RETURN: none
+ *
+ * DESCRIPTION: Free global memory
+ *
+ ******************************************************************************/
+
+static void
+AcpiUtTerminate (
+ void)
+{
+ ACPI_FUNCTION_TRACE (UtTerminate);
+ AcpiUtFreeGpeLists ();
AcpiUtDeleteAddressLists ();
return_VOID;
}
diff --git a/sys/contrib/dev/acpica/utilities/utlock.c b/sys/contrib/dev/acpica/components/utilities/utlock.c
index 4ab3346..4ab3346 100644
--- a/sys/contrib/dev/acpica/utilities/utlock.c
+++ b/sys/contrib/dev/acpica/components/utilities/utlock.c
diff --git a/sys/contrib/dev/acpica/utilities/utmath.c b/sys/contrib/dev/acpica/components/utilities/utmath.c
index b373923..b373923 100644
--- a/sys/contrib/dev/acpica/utilities/utmath.c
+++ b/sys/contrib/dev/acpica/components/utilities/utmath.c
diff --git a/sys/contrib/dev/acpica/utilities/utmisc.c b/sys/contrib/dev/acpica/components/utilities/utmisc.c
index 281bb0f..281bb0f 100644
--- a/sys/contrib/dev/acpica/utilities/utmisc.c
+++ b/sys/contrib/dev/acpica/components/utilities/utmisc.c
diff --git a/sys/contrib/dev/acpica/utilities/utmutex.c b/sys/contrib/dev/acpica/components/utilities/utmutex.c
index 2991c2e..2991c2e 100644
--- a/sys/contrib/dev/acpica/utilities/utmutex.c
+++ b/sys/contrib/dev/acpica/components/utilities/utmutex.c
diff --git a/sys/contrib/dev/acpica/utilities/utobject.c b/sys/contrib/dev/acpica/components/utilities/utobject.c
index 9d90a39..9d90a39 100644
--- a/sys/contrib/dev/acpica/utilities/utobject.c
+++ b/sys/contrib/dev/acpica/components/utilities/utobject.c
diff --git a/sys/contrib/dev/acpica/utilities/utosi.c b/sys/contrib/dev/acpica/components/utilities/utosi.c
index dda5455..dda5455 100644
--- a/sys/contrib/dev/acpica/utilities/utosi.c
+++ b/sys/contrib/dev/acpica/components/utilities/utosi.c
diff --git a/sys/contrib/dev/acpica/utilities/utresrc.c b/sys/contrib/dev/acpica/components/utilities/utresrc.c
index 494d3fe..494d3fe 100644
--- a/sys/contrib/dev/acpica/utilities/utresrc.c
+++ b/sys/contrib/dev/acpica/components/utilities/utresrc.c
diff --git a/sys/contrib/dev/acpica/utilities/utstate.c b/sys/contrib/dev/acpica/components/utilities/utstate.c
index 2a99fe8..2a99fe8 100644
--- a/sys/contrib/dev/acpica/utilities/utstate.c
+++ b/sys/contrib/dev/acpica/components/utilities/utstate.c
diff --git a/sys/contrib/dev/acpica/utilities/uttrack.c b/sys/contrib/dev/acpica/components/utilities/uttrack.c
index 498db0c..498db0c 100644
--- a/sys/contrib/dev/acpica/utilities/uttrack.c
+++ b/sys/contrib/dev/acpica/components/utilities/uttrack.c
diff --git a/sys/contrib/dev/acpica/utilities/utxface.c b/sys/contrib/dev/acpica/components/utilities/utxface.c
index 1cb23e0..3c4cbdf 100644
--- a/sys/contrib/dev/acpica/utilities/utxface.c
+++ b/sys/contrib/dev/acpica/components/utilities/utxface.c
@@ -50,14 +50,12 @@
#include <contrib/dev/acpica/include/acnamesp.h>
#include <contrib/dev/acpica/include/acdebug.h>
#include <contrib/dev/acpica/include/actables.h>
-#include <contrib/dev/acpica/include/acinterp.h>
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME ("utxface")
#ifndef ACPI_ASL_COMPILER
-
/*******************************************************************************
*
* FUNCTION: AcpiInitializeSubsystem
@@ -163,6 +161,8 @@ AcpiEnableSubsystem (
ACPI_FUNCTION_TRACE (AcpiEnableSubsystem);
+#if (!ACPI_REDUCED_HARDWARE)
+
/* Enable ACPI mode */
if (!(Flags & ACPI_NO_ACPI_ENABLE))
@@ -190,6 +190,8 @@ AcpiEnableSubsystem (
return_ACPI_STATUS (Status);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
+
/*
* Install the default OpRegion handlers. These are installed unless
* other handlers have already been installed via the
@@ -207,6 +209,7 @@ AcpiEnableSubsystem (
}
}
+#if (!ACPI_REDUCED_HARDWARE)
/*
* Initialize ACPI Event handling (Fixed and General Purpose)
*
@@ -249,6 +252,8 @@ AcpiEnableSubsystem (
}
}
+#endif /* !ACPI_REDUCED_HARDWARE */
+
return_ACPI_STATUS (Status);
}
diff --git a/sys/contrib/dev/acpica/utilities/utxferror.c b/sys/contrib/dev/acpica/components/utilities/utxferror.c
index 09df461..09df461 100644
--- a/sys/contrib/dev/acpica/utilities/utxferror.c
+++ b/sys/contrib/dev/acpica/components/utilities/utxferror.c
diff --git a/sys/contrib/dev/acpica/utilities/utxfmutex.c b/sys/contrib/dev/acpica/components/utilities/utxfmutex.c
index ca07871..ca07871 100644
--- a/sys/contrib/dev/acpica/utilities/utxfmutex.c
+++ b/sys/contrib/dev/acpica/components/utilities/utxfmutex.c
diff --git a/sys/contrib/dev/acpica/include/acconfig.h b/sys/contrib/dev/acpica/include/acconfig.h
index 1882591..7880516 100644
--- a/sys/contrib/dev/acpica/include/acconfig.h
+++ b/sys/contrib/dev/acpica/include/acconfig.h
@@ -86,6 +86,23 @@
*/
#define ACPI_CHECKSUM_ABORT FALSE
+/*
+ * Generate a version of ACPICA that only supports "reduced hardware"
+ * platforms (as defined in ACPI 5.0). Set to TRUE to generate a specialized
+ * version of ACPICA that ONLY supports the ACPI 5.0 "reduced hardware"
+ * model. In other words, no ACPI hardware is supported.
+ *
+ * If TRUE, this means no support for the following:
+ * PM Event and Control registers
+ * SCI interrupt (and handler)
+ * Fixed Events
+ * General Purpose Events (GPEs)
+ * Global Lock
+ * ACPI PM timer
+ * FACS table (Waking vectors and Global Lock)
+ */
+#define ACPI_REDUCED_HARDWARE FALSE
+
/******************************************************************************
*
@@ -95,7 +112,7 @@
/* Version of ACPI supported */
-#define ACPI_CA_SUPPORT_LEVEL 3
+#define ACPI_CA_SUPPORT_LEVEL 5
/* Maximum count for a semaphore object */
diff --git a/sys/contrib/dev/acpica/include/acdebug.h b/sys/contrib/dev/acpica/include/acdebug.h
index 33470fb..bcc505c 100644
--- a/sys/contrib/dev/acpica/include/acdebug.h
+++ b/sys/contrib/dev/acpica/include/acdebug.h
@@ -137,18 +137,20 @@ void
AcpiDbDisplayResources (
char *ObjectArg);
+ACPI_HW_DEPENDENT_RETURN_VOID (
void
AcpiDbDisplayGpes (
- void);
+ void))
void
AcpiDbDisplayHandlers (
void);
+ACPI_HW_DEPENDENT_RETURN_VOID (
void
AcpiDbGenerateGpe (
char *GpeArg,
- char *BlockArg);
+ char *BlockArg))
/*
diff --git a/sys/contrib/dev/acpica/include/acevents.h b/sys/contrib/dev/acpica/include/acevents.h
index 142c247..3b874f1 100644
--- a/sys/contrib/dev/acpica/include/acevents.h
+++ b/sys/contrib/dev/acpica/include/acevents.h
@@ -85,13 +85,15 @@ ACPI_STATUS
AcpiEvInitGlobalLockHandler (
void);
+ACPI_HW_DEPENDENT_RETURN_OK (
ACPI_STATUS
AcpiEvAcquireGlobalLock(
- UINT16 Timeout);
+ UINT16 Timeout))
+ACPI_HW_DEPENDENT_RETURN_OK (
ACPI_STATUS
AcpiEvReleaseGlobalLock(
- void);
+ void))
ACPI_STATUS
AcpiEvRemoveGlobalLockHandler (
@@ -154,9 +156,10 @@ AcpiEvInitializeGpeBlock (
ACPI_GPE_BLOCK_INFO *GpeBlock,
void *Context);
+ACPI_HW_DEPENDENT_RETURN_OK (
ACPI_STATUS
AcpiEvDeleteGpeBlock (
- ACPI_GPE_BLOCK_INFO *GpeBlock);
+ ACPI_GPE_BLOCK_INFO *GpeBlock))
UINT32
AcpiEvGpeDispatch (
@@ -171,9 +174,10 @@ ACPI_STATUS
AcpiEvGpeInitialize (
void);
+ACPI_HW_DEPENDENT_RETURN_VOID (
void
AcpiEvUpdateGpes (
- ACPI_OWNER_ID TableOwnerId);
+ ACPI_OWNER_ID TableOwnerId))
ACPI_STATUS
AcpiEvMatchGpeMethod (
@@ -335,9 +339,9 @@ UINT32
AcpiEvInitializeSCI (
UINT32 ProgramSCI);
+ACPI_HW_DEPENDENT_RETURN_VOID (
void
AcpiEvTerminate (
- void);
-
+ void))
#endif /* __ACEVENTS_H__ */
diff --git a/sys/contrib/dev/acpica/include/acexcep.h b/sys/contrib/dev/acpica/include/acexcep.h
index 9262d7b..10f5a11 100644
--- a/sys/contrib/dev/acpica/include/acexcep.h
+++ b/sys/contrib/dev/acpica/include/acexcep.h
@@ -92,8 +92,9 @@
#define AE_SAME_HANDLER (ACPI_STATUS) (0x0019 | AE_CODE_ENVIRONMENTAL)
#define AE_NO_HANDLER (ACPI_STATUS) (0x001A | AE_CODE_ENVIRONMENTAL)
#define AE_OWNER_ID_LIMIT (ACPI_STATUS) (0x001B | AE_CODE_ENVIRONMENTAL)
+#define AE_NOT_CONFIGURED (ACPI_STATUS) (0x001C | AE_CODE_ENVIRONMENTAL)
-#define AE_CODE_ENV_MAX 0x001B
+#define AE_CODE_ENV_MAX 0x001C
/*
@@ -222,7 +223,8 @@ char const *AcpiGbl_ExceptionNames_Env[] =
"AE_ABORT_METHOD",
"AE_SAME_HANDLER",
"AE_NO_HANDLER",
- "AE_OWNER_ID_LIMIT"
+ "AE_OWNER_ID_LIMIT",
+ "AE_NOT_CONFIGURED"
};
char const *AcpiGbl_ExceptionNames_Pgm[] =
diff --git a/sys/contrib/dev/acpica/include/acglobal.h b/sys/contrib/dev/acpica/include/acglobal.h
index 6b45877..edf33d68 100644
--- a/sys/contrib/dev/acpica/include/acglobal.h
+++ b/sys/contrib/dev/acpica/include/acglobal.h
@@ -150,8 +150,7 @@ BOOLEAN AcpiGbl_SystemAwakeAndRunning;
*/
BOOLEAN AcpiGbl_ReducedHardware;
-
-#endif
+#endif /* DEFINE_ACPI_GLOBALS */
/* Do not disassemble buffers to resource descriptors */
@@ -168,8 +167,12 @@ ACPI_EXTERN UINT8 ACPI_INIT_GLOBAL (AcpiGbl_NoResourceDisassembly, FALSE);
* found in the RSDT/XSDT.
*/
ACPI_EXTERN ACPI_TABLE_LIST AcpiGbl_RootTableList;
+
+#if (!ACPI_REDUCED_HARDWARE)
ACPI_EXTERN ACPI_TABLE_FACS *AcpiGbl_FACS;
+#endif /* !ACPI_REDUCED_HARDWARE */
+
/* These addresses are calculated from the FADT Event Block addresses */
ACPI_EXTERN ACPI_GENERIC_ADDRESS AcpiGbl_XPm1aStatus;
@@ -381,6 +384,8 @@ ACPI_EXTERN UINT8 AcpiGbl_SleepTypeB;
*
****************************************************************************/
+#if (!ACPI_REDUCED_HARDWARE)
+
ACPI_EXTERN UINT8 AcpiGbl_AllGpesInitialized;
ACPI_EXTERN ACPI_GPE_XRUPT_INFO *AcpiGbl_GpeXruptListHead;
ACPI_EXTERN ACPI_GPE_BLOCK_INFO *AcpiGbl_GpeFadtBlocks[ACPI_MAX_GPE_BLOCKS];
@@ -389,6 +394,7 @@ ACPI_EXTERN void *AcpiGbl_GlobalEventHandlerContext;
ACPI_EXTERN ACPI_FIXED_EVENT_HANDLER AcpiGbl_FixedEventHandlers[ACPI_NUM_FIXED_EVENTS];
extern ACPI_FIXED_EVENT_INFO AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS];
+#endif /* !ACPI_REDUCED_HARDWARE */
/*****************************************************************************
*
diff --git a/sys/contrib/dev/acpica/include/achware.h b/sys/contrib/dev/acpica/include/achware.h
index e808be4..004795d 100644
--- a/sys/contrib/dev/acpica/include/achware.h
+++ b/sys/contrib/dev/acpica/include/achware.h
@@ -110,6 +110,43 @@ AcpiHwClearAcpiStatus (
/*
+ * hwsleep - sleep/wake support (Legacy sleep registers)
+ */
+ACPI_STATUS
+AcpiHwLegacySleep (
+ UINT8 SleepState);
+
+ACPI_STATUS
+AcpiHwLegacyWakePrep (
+ UINT8 SleepState);
+
+ACPI_STATUS
+AcpiHwLegacyWake (
+ UINT8 SleepState);
+
+
+/*
+ * hwesleep - sleep/wake support (Extended FADT-V5 sleep registers)
+ */
+void
+AcpiHwExecuteSleepMethod (
+ char *MethodName,
+ UINT32 IntegerArgument);
+
+ACPI_STATUS
+AcpiHwExtendedSleep (
+ UINT8 SleepState);
+
+ACPI_STATUS
+AcpiHwExtendedWakePrep (
+ UINT8 SleepState);
+
+ACPI_STATUS
+AcpiHwExtendedWake (
+ UINT8 SleepState);
+
+
+/*
* hwvalid - Port I/O with validation
*/
ACPI_STATUS
@@ -188,22 +225,4 @@ AcpiHwDerivePciId (
ACPI_HANDLE PciRegion);
-/*
- * hwtimer - ACPI Timer prototypes
- */
-ACPI_STATUS
-AcpiGetTimerResolution (
- UINT32 *Resolution);
-
-ACPI_STATUS
-AcpiGetTimer (
- UINT32 *Ticks);
-
-ACPI_STATUS
-AcpiGetTimerDuration (
- UINT32 StartTicks,
- UINT32 EndTicks,
- UINT32 *TimeElapsed);
-
-
#endif /* __ACHWARE_H__ */
diff --git a/sys/contrib/dev/acpica/include/acmacros.h b/sys/contrib/dev/acpica/include/acmacros.h
index a0be136..cdb9cb1 100644
--- a/sys/contrib/dev/acpica/include/acmacros.h
+++ b/sys/contrib/dev/acpica/include/acmacros.h
@@ -428,7 +428,6 @@
#endif /* ACPI_SIMPLE_RETURN_MACROS */
-
/* Conditional execution */
#define ACPI_DEBUG_EXEC(a) a
@@ -477,6 +476,14 @@
#endif /* ACPI_DEBUG_OUTPUT */
+
+#if (!ACPI_REDUCED_HARDWARE)
+#define ACPI_HW_OPTIONAL_FUNCTION(addr) addr
+#else
+#define ACPI_HW_OPTIONAL_FUNCTION(addr) NULL
+#endif
+
+
/*
* Some code only gets executed when the debugger is built in.
* Note that this is entirely independent of whether the
diff --git a/sys/contrib/dev/acpica/include/acpiosxf.h b/sys/contrib/dev/acpica/include/acpiosxf.h
index 9a439aa..8106d8a 100644
--- a/sys/contrib/dev/acpica/include/acpiosxf.h
+++ b/sys/contrib/dev/acpica/include/acpiosxf.h
@@ -112,6 +112,12 @@ AcpiOsTableOverride (
ACPI_TABLE_HEADER *ExistingTable,
ACPI_TABLE_HEADER **NewTable);
+ACPI_STATUS
+AcpiOsPhysicalTableOverride (
+ ACPI_TABLE_HEADER *ExistingTable,
+ ACPI_PHYSICAL_ADDRESS *NewAddress,
+ UINT32 *NewTableLength);
+
/*
* Spinlock primitives
@@ -302,13 +308,13 @@ AcpiOsWritePort (
ACPI_STATUS
AcpiOsReadMemory (
ACPI_PHYSICAL_ADDRESS Address,
- UINT32 *Value,
+ UINT64 *Value,
UINT32 Width);
ACPI_STATUS
AcpiOsWriteMemory (
ACPI_PHYSICAL_ADDRESS Address,
- UINT32 Value,
+ UINT64 Value,
UINT32 Width);
diff --git a/sys/contrib/dev/acpica/include/acpixf.h b/sys/contrib/dev/acpica/include/acpixf.h
index 8618c79..0eeb320 100644
--- a/sys/contrib/dev/acpica/include/acpixf.h
+++ b/sys/contrib/dev/acpica/include/acpixf.h
@@ -48,8 +48,9 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
-#define ACPI_CA_VERSION 0x20120111
+#define ACPI_CA_VERSION 0x20120215
+#include <contrib/dev/acpica/include/acconfig.h>
#include <contrib/dev/acpica/include/actypes.h>
#include <contrib/dev/acpica/include/actbl.h>
@@ -81,6 +82,34 @@ extern UINT8 AcpiGbl_DisableAutoRepair;
/*
+ * Hardware-reduced prototypes. All interfaces that use these macros will
+ * be configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
+ * is set to TRUE.
+ */
+#if (!ACPI_REDUCED_HARDWARE)
+#define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
+ Prototype;
+
+#define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
+ Prototype;
+
+#define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
+ Prototype;
+
+#else
+#define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
+ static ACPI_INLINE Prototype {return(AE_NOT_CONFIGURED);}
+
+#define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
+ static ACPI_INLINE Prototype {return(AE_OK);}
+
+#define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
+ static ACPI_INLINE Prototype {}
+
+#endif /* !ACPI_REDUCED_HARDWARE */
+
+
+/*
* Initialization
*/
ACPI_STATUS
@@ -109,13 +138,15 @@ AcpiTerminate (
/*
* Miscellaneous global interfaces
*/
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiEnable (
- void);
+ void))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiDisable (
- void);
+ void))
ACPI_STATUS
AcpiSubsystemStatus (
@@ -321,35 +352,40 @@ AcpiInstallInitializationHandler (
ACPI_INIT_HANDLER Handler,
UINT32 Function);
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiInstallGlobalEventHandler (
ACPI_GBL_EVENT_HANDLER Handler,
- void *Context);
+ void *Context))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiInstallFixedEventHandler (
UINT32 AcpiEvent,
ACPI_EVENT_HANDLER Handler,
- void *Context);
+ void *Context))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiRemoveFixedEventHandler (
UINT32 AcpiEvent,
- ACPI_EVENT_HANDLER Handler);
+ ACPI_EVENT_HANDLER Handler))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiInstallGpeHandler (
ACPI_HANDLE GpeDevice,
UINT32 GpeNumber,
UINT32 Type,
ACPI_GPE_HANDLER Address,
- void *Context);
+ void *Context))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiRemoveGpeHandler (
ACPI_HANDLE GpeDevice,
UINT32 GpeNumber,
- ACPI_GPE_HANDLER Address);
+ ACPI_GPE_HANDLER Address))
ACPI_STATUS
AcpiInstallNotifyHandler (
@@ -390,14 +426,16 @@ AcpiInstallInterfaceHandler (
/*
* Global Lock interfaces
*/
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiAcquireGlobalLock (
UINT16 Timeout,
- UINT32 *Handle);
+ UINT32 *Handle))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiReleaseGlobalLock (
- UINT32 Handle);
+ UINT32 Handle))
/*
@@ -418,100 +456,118 @@ AcpiReleaseMutex (
/*
* Fixed Event interfaces
*/
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiEnableEvent (
UINT32 Event,
- UINT32 Flags);
+ UINT32 Flags))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiDisableEvent (
UINT32 Event,
- UINT32 Flags);
+ UINT32 Flags))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiClearEvent (
- UINT32 Event);
+ UINT32 Event))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiGetEventStatus (
UINT32 Event,
- ACPI_EVENT_STATUS *EventStatus);
+ ACPI_EVENT_STATUS *EventStatus))
/*
* General Purpose Event (GPE) Interfaces
*/
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiUpdateAllGpes (
- void);
+ void))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiEnableGpe (
ACPI_HANDLE GpeDevice,
- UINT32 GpeNumber);
+ UINT32 GpeNumber))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiDisableGpe (
ACPI_HANDLE GpeDevice,
- UINT32 GpeNumber);
+ UINT32 GpeNumber))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiClearGpe (
ACPI_HANDLE GpeDevice,
- UINT32 GpeNumber);
+ UINT32 GpeNumber))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiSetGpe (
ACPI_HANDLE GpeDevice,
UINT32 GpeNumber,
- UINT8 Action);
+ UINT8 Action))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiFinishGpe (
ACPI_HANDLE GpeDevice,
- UINT32 GpeNumber);
+ UINT32 GpeNumber))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiSetupGpeForWake (
ACPI_HANDLE ParentDevice,
ACPI_HANDLE GpeDevice,
- UINT32 GpeNumber);
+ UINT32 GpeNumber))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiSetGpeWakeMask (
ACPI_HANDLE GpeDevice,
UINT32 GpeNumber,
- UINT8 Action);
+ UINT8 Action))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiGetGpeStatus (
ACPI_HANDLE GpeDevice,
UINT32 GpeNumber,
- ACPI_EVENT_STATUS *EventStatus);
+ ACPI_EVENT_STATUS *EventStatus))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiDisableAllGpes (
- void);
+ void))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiEnableAllRuntimeGpes (
- void);
+ void))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiGetGpeDevice (
UINT32 GpeIndex,
- ACPI_HANDLE *GpeDevice);
+ ACPI_HANDLE *GpeDevice))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiInstallGpeBlock (
ACPI_HANDLE GpeDevice,
ACPI_GENERIC_ADDRESS *GpeBlockAddress,
UINT32 RegisterCount,
- UINT32 InterruptNumber);
+ UINT32 InterruptNumber))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiRemoveGpeBlock (
- ACPI_HANDLE GpeDevice);
+ ACPI_HANDLE GpeDevice))
/*
@@ -590,16 +646,22 @@ AcpiWrite (
UINT64 Value,
ACPI_GENERIC_ADDRESS *Reg);
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiReadBitRegister (
UINT32 RegisterId,
- UINT32 *ReturnValue);
+ UINT32 *ReturnValue))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiWriteBitRegister (
UINT32 RegisterId,
- UINT32 Value);
+ UINT32 Value))
+
+/*
+ * Sleep/Wake interfaces
+ */
ACPI_STATUS
AcpiGetSleepTypeData (
UINT8 SleepState,
@@ -614,26 +676,54 @@ ACPI_STATUS
AcpiEnterSleepState (
UINT8 SleepState);
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiEnterSleepStateS4bios (
- void);
+ void))
+
+ACPI_STATUS
+AcpiLeaveSleepStatePrep (
+ UINT8 SleepState);
ACPI_STATUS
AcpiLeaveSleepState (
- UINT8 SleepState)
- ;
+ UINT8 SleepState);
+
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiSetFirmwareWakingVector (
- UINT32 PhysicalAddress);
+ UINT32 PhysicalAddress))
#if ACPI_MACHINE_WIDTH == 64
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiSetFirmwareWakingVector64 (
- UINT64 PhysicalAddress);
+ UINT64 PhysicalAddress))
#endif
/*
+ * ACPI Timer interfaces
+ */
+ACPI_HW_DEPENDENT_RETURN_STATUS (
+ACPI_STATUS
+AcpiGetTimerResolution (
+ UINT32 *Resolution))
+
+ACPI_HW_DEPENDENT_RETURN_STATUS (
+ACPI_STATUS
+AcpiGetTimer (
+ UINT32 *Ticks))
+
+ACPI_HW_DEPENDENT_RETURN_STATUS (
+ACPI_STATUS
+AcpiGetTimerDuration (
+ UINT32 StartTicks,
+ UINT32 EndTicks,
+ UINT32 *TimeElapsed))
+
+
+/*
* Error/Warning output
*/
void ACPI_INTERNAL_VAR_XFACE
diff --git a/sys/contrib/dev/acpica/include/actables.h b/sys/contrib/dev/acpica/include/actables.h
index 4277ff5..26a7947d 100644
--- a/sys/contrib/dev/acpica/include/actables.h
+++ b/sys/contrib/dev/acpica/include/actables.h
@@ -84,6 +84,11 @@ ACPI_STATUS
AcpiTbVerifyTable (
ACPI_TABLE_DESC *TableDesc);
+ACPI_TABLE_HEADER *
+AcpiTbTableOverride (
+ ACPI_TABLE_HEADER *TableHeader,
+ ACPI_TABLE_DESC *TableDesc);
+
ACPI_STATUS
AcpiTbAddTable (
ACPI_TABLE_DESC *TableDesc,
diff --git a/sys/contrib/dev/acpica/include/actbl.h b/sys/contrib/dev/acpica/include/actbl.h
index 35e2ffb..23897a7 100644
--- a/sys/contrib/dev/acpica/include/actbl.h
+++ b/sys/contrib/dev/acpica/include/actbl.h
@@ -354,6 +354,13 @@ enum AcpiPreferedPmProfiles
PM_TABLET = 8
};
+/* Values for SleepStatus and SleepControl registers (V5 FADT) */
+
+#define ACPI_X_WAKE_STATUS 0x80
+#define ACPI_X_SLEEP_TYPE_MASK 0x1C
+#define ACPI_X_SLEEP_TYPE_POSITION 0x02
+#define ACPI_X_SLEEP_ENABLE 0x20
+
/* Reset to default packing */
diff --git a/sys/contrib/dev/acpica/include/actypes.h b/sys/contrib/dev/acpica/include/actypes.h
index 2d78c0b..30d9088 100644
--- a/sys/contrib/dev/acpica/include/actypes.h
+++ b/sys/contrib/dev/acpica/include/actypes.h
@@ -534,8 +534,9 @@ typedef UINT64 ACPI_INTEGER;
#define ACPI_NOTIFY_DEVICE_PLD_CHECK (UINT8) 0x09
#define ACPI_NOTIFY_RESERVED (UINT8) 0x0A
#define ACPI_NOTIFY_LOCALITY_UPDATE (UINT8) 0x0B
+#define ACPI_NOTIFY_SHUTDOWN_REQUEST (UINT8) 0x0C
-#define ACPI_NOTIFY_MAX 0x0B
+#define ACPI_NOTIFY_MAX 0x0C
/*
* Types associated with ACPI names and objects. The first group of
@@ -701,7 +702,8 @@ typedef UINT32 ACPI_EVENT_STATUS;
#define ACPI_ALL_NOTIFY (ACPI_SYSTEM_NOTIFY | ACPI_DEVICE_NOTIFY)
#define ACPI_MAX_NOTIFY_HANDLER_TYPE 0x3
-#define ACPI_MAX_SYS_NOTIFY 0x7f
+#define ACPI_MAX_SYS_NOTIFY 0x7F
+#define ACPI_MAX_DEVICE_SPECIFIC_NOTIFY 0xBF
/* Address Space (Operation Region) Types */
@@ -792,6 +794,19 @@ typedef UINT8 ACPI_ADR_SPACE_TYPE;
#define ACPI_DISABLE_EVENT 0
+/* Sleep function dispatch */
+
+typedef ACPI_STATUS (*ACPI_SLEEP_FUNCTION) (
+ UINT8 SleepState);
+
+typedef struct acpi_sleep_functions
+{
+ ACPI_SLEEP_FUNCTION LegacyFunction;
+ ACPI_SLEEP_FUNCTION ExtendedFunction;
+
+} ACPI_SLEEP_FUNCTIONS;
+
+
/*
* External ACPI object definition
*/
diff --git a/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c b/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c
index 07d8473..189bfcd 100644
--- a/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c
+++ b/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c
@@ -214,6 +214,33 @@ AcpiOsTableOverride (
/******************************************************************************
*
+ * FUNCTION: AcpiOsPhysicalTableOverride
+ *
+ * PARAMETERS: ExistingTable - Header of current table (probably firmware)
+ * NewAddress - Where new table address is returned
+ * (Physical address)
+ * NewTableLength - Where new table length is returned
+ *
+ * RETURN: Status, address/length of new table. Null pointer returned
+ * if no table is available to override.
+ *
+ * DESCRIPTION: Returns AE_SUPPORT, function not used in user space.
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+AcpiOsPhysicalTableOverride (
+ ACPI_TABLE_HEADER *ExistingTable,
+ ACPI_PHYSICAL_ADDRESS *NewAddress,
+ UINT32 *NewTableLength)
+{
+
+ return (AE_SUPPORT);
+}
+
+
+/******************************************************************************
+ *
* FUNCTION: AcpiOsRedirectOutput
*
* PARAMETERS: Destination - An open file handle/pointer
@@ -1017,9 +1044,10 @@ AcpiOsWritePort (
*
* PARAMETERS: Address - Physical Memory Address to read
* Value - Where value is placed
- * Width - Number of bits
+ * Width - Number of bits (8,16,32, or 64)
*
- * RETURN: Value read from physical memory address
+ * RETURN: Value read from physical memory address. Always returned
+ * as a 64-bit integer, regardless of the read width.
*
* DESCRIPTION: Read data from a physical memory address
*
@@ -1028,7 +1056,7 @@ AcpiOsWritePort (
ACPI_STATUS
AcpiOsReadMemory (
ACPI_PHYSICAL_ADDRESS Address,
- UINT32 *Value,
+ UINT64 *Value,
UINT32 Width)
{
@@ -1037,6 +1065,7 @@ AcpiOsReadMemory (
case 8:
case 16:
case 32:
+ case 64:
*Value = 0;
break;
@@ -1053,7 +1082,7 @@ AcpiOsReadMemory (
*
* PARAMETERS: Address - Physical Memory Address to write
* Value - Value to write
- * Width - Number of bits
+ * Width - Number of bits (8,16,32, or 64)
*
* RETURN: None
*
@@ -1064,7 +1093,7 @@ AcpiOsReadMemory (
ACPI_STATUS
AcpiOsWriteMemory (
ACPI_PHYSICAL_ADDRESS Address,
- UINT32 Value,
+ UINT64 Value,
UINT32 Width)
{
OpenPOWER on IntegriCloud