Merge ACPICA 20120215.
This commit is contained in:
commit
a159c266a9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=231844
300
sys/conf/files
300
sys/conf/files
@ -153,155 +153,157 @@ contrib/altq/altq/altq_rio.c optional altq \
|
||||
contrib/altq/altq/altq_rmclass.c optional altq
|
||||
contrib/altq/altq/altq_subr.c optional altq \
|
||||
compile-with "${NORMAL_C} -I$S/contrib/pf"
|
||||
contrib/dev/acpica/debugger/dbcmds.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/debugger/dbdisply.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/debugger/dbexec.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/debugger/dbfileio.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/debugger/dbhistry.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/debugger/dbinput.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/debugger/dbmethod.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/debugger/dbnames.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/debugger/dbstats.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/debugger/dbutils.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/debugger/dbxface.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/disassembler/dmbuffer.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/disassembler/dmnames.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/disassembler/dmopcode.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/disassembler/dmobject.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/disassembler/dmresrc.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/disassembler/dmresrcl.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/disassembler/dmresrcl2.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/disassembler/dmresrcs.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/disassembler/dmutils.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/disassembler/dmwalk.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/dispatcher/dsargs.c optional acpi
|
||||
contrib/dev/acpica/dispatcher/dscontrol.c optional acpi
|
||||
contrib/dev/acpica/dispatcher/dsfield.c optional acpi
|
||||
contrib/dev/acpica/dispatcher/dsinit.c optional acpi
|
||||
contrib/dev/acpica/dispatcher/dsmethod.c optional acpi
|
||||
contrib/dev/acpica/dispatcher/dsmthdat.c optional acpi
|
||||
contrib/dev/acpica/dispatcher/dsobject.c optional acpi
|
||||
contrib/dev/acpica/dispatcher/dsopcode.c optional acpi
|
||||
contrib/dev/acpica/dispatcher/dsutils.c optional acpi
|
||||
contrib/dev/acpica/dispatcher/dswexec.c optional acpi
|
||||
contrib/dev/acpica/dispatcher/dswload.c optional acpi
|
||||
contrib/dev/acpica/dispatcher/dswload2.c optional acpi
|
||||
contrib/dev/acpica/dispatcher/dswscope.c optional acpi
|
||||
contrib/dev/acpica/dispatcher/dswstate.c optional acpi
|
||||
contrib/dev/acpica/events/evevent.c optional acpi
|
||||
contrib/dev/acpica/events/evglock.c optional acpi
|
||||
contrib/dev/acpica/events/evgpe.c optional acpi
|
||||
contrib/dev/acpica/events/evgpeblk.c optional acpi
|
||||
contrib/dev/acpica/events/evgpeinit.c optional acpi
|
||||
contrib/dev/acpica/events/evgpeutil.c optional acpi
|
||||
contrib/dev/acpica/events/evmisc.c optional acpi
|
||||
contrib/dev/acpica/events/evregion.c optional acpi
|
||||
contrib/dev/acpica/events/evrgnini.c optional acpi
|
||||
contrib/dev/acpica/events/evsci.c optional acpi
|
||||
contrib/dev/acpica/events/evxface.c optional acpi
|
||||
contrib/dev/acpica/events/evxfevnt.c optional acpi
|
||||
contrib/dev/acpica/events/evxfgpe.c optional acpi
|
||||
contrib/dev/acpica/events/evxfregn.c optional acpi
|
||||
contrib/dev/acpica/executer/exconfig.c optional acpi
|
||||
contrib/dev/acpica/executer/exconvrt.c optional acpi
|
||||
contrib/dev/acpica/executer/excreate.c optional acpi
|
||||
contrib/dev/acpica/executer/exdebug.c optional acpi
|
||||
contrib/dev/acpica/executer/exdump.c optional acpi
|
||||
contrib/dev/acpica/executer/exfield.c optional acpi
|
||||
contrib/dev/acpica/executer/exfldio.c optional acpi
|
||||
contrib/dev/acpica/executer/exmisc.c optional acpi
|
||||
contrib/dev/acpica/executer/exmutex.c optional acpi
|
||||
contrib/dev/acpica/executer/exnames.c optional acpi
|
||||
contrib/dev/acpica/executer/exoparg1.c optional acpi
|
||||
contrib/dev/acpica/executer/exoparg2.c optional acpi
|
||||
contrib/dev/acpica/executer/exoparg3.c optional acpi
|
||||
contrib/dev/acpica/executer/exoparg6.c optional acpi
|
||||
contrib/dev/acpica/executer/exprep.c optional acpi
|
||||
contrib/dev/acpica/executer/exregion.c optional acpi
|
||||
contrib/dev/acpica/executer/exresnte.c optional acpi
|
||||
contrib/dev/acpica/executer/exresolv.c optional acpi
|
||||
contrib/dev/acpica/executer/exresop.c optional acpi
|
||||
contrib/dev/acpica/executer/exstore.c optional acpi
|
||||
contrib/dev/acpica/executer/exstoren.c optional acpi
|
||||
contrib/dev/acpica/executer/exstorob.c optional acpi
|
||||
contrib/dev/acpica/executer/exsystem.c optional acpi
|
||||
contrib/dev/acpica/executer/exutils.c optional acpi
|
||||
contrib/dev/acpica/hardware/hwacpi.c optional acpi
|
||||
contrib/dev/acpica/hardware/hwgpe.c optional acpi
|
||||
contrib/dev/acpica/hardware/hwpci.c optional acpi
|
||||
contrib/dev/acpica/hardware/hwregs.c optional acpi
|
||||
contrib/dev/acpica/hardware/hwsleep.c optional acpi
|
||||
contrib/dev/acpica/hardware/hwtimer.c optional acpi
|
||||
contrib/dev/acpica/hardware/hwvalid.c optional acpi
|
||||
contrib/dev/acpica/hardware/hwxface.c optional acpi
|
||||
contrib/dev/acpica/namespace/nsaccess.c optional acpi
|
||||
contrib/dev/acpica/namespace/nsalloc.c optional acpi
|
||||
contrib/dev/acpica/namespace/nsdump.c optional acpi
|
||||
contrib/dev/acpica/namespace/nseval.c optional acpi
|
||||
contrib/dev/acpica/namespace/nsinit.c optional acpi
|
||||
contrib/dev/acpica/namespace/nsload.c optional acpi
|
||||
contrib/dev/acpica/namespace/nsnames.c optional acpi
|
||||
contrib/dev/acpica/namespace/nsobject.c optional acpi
|
||||
contrib/dev/acpica/namespace/nsparse.c optional acpi
|
||||
contrib/dev/acpica/namespace/nspredef.c optional acpi
|
||||
contrib/dev/acpica/namespace/nsrepair.c optional acpi
|
||||
contrib/dev/acpica/namespace/nsrepair2.c optional acpi
|
||||
contrib/dev/acpica/namespace/nssearch.c optional acpi
|
||||
contrib/dev/acpica/namespace/nsutils.c optional acpi
|
||||
contrib/dev/acpica/namespace/nswalk.c optional acpi
|
||||
contrib/dev/acpica/namespace/nsxfeval.c optional acpi
|
||||
contrib/dev/acpica/namespace/nsxfname.c optional acpi
|
||||
contrib/dev/acpica/namespace/nsxfobj.c optional acpi
|
||||
contrib/dev/acpica/parser/psargs.c optional acpi
|
||||
contrib/dev/acpica/parser/psloop.c optional acpi
|
||||
contrib/dev/acpica/parser/psopcode.c optional acpi
|
||||
contrib/dev/acpica/parser/psparse.c optional acpi
|
||||
contrib/dev/acpica/parser/psscope.c optional acpi
|
||||
contrib/dev/acpica/parser/pstree.c optional acpi
|
||||
contrib/dev/acpica/parser/psutils.c optional acpi
|
||||
contrib/dev/acpica/parser/pswalk.c optional acpi
|
||||
contrib/dev/acpica/parser/psxface.c optional acpi
|
||||
contrib/dev/acpica/resources/rsaddr.c optional acpi
|
||||
contrib/dev/acpica/resources/rscalc.c optional acpi
|
||||
contrib/dev/acpica/resources/rscreate.c optional acpi
|
||||
contrib/dev/acpica/resources/rsdump.c optional acpi
|
||||
contrib/dev/acpica/resources/rsinfo.c optional acpi
|
||||
contrib/dev/acpica/resources/rsio.c optional acpi
|
||||
contrib/dev/acpica/resources/rsirq.c optional acpi
|
||||
contrib/dev/acpica/resources/rslist.c optional acpi
|
||||
contrib/dev/acpica/resources/rsmemory.c optional acpi
|
||||
contrib/dev/acpica/resources/rsmisc.c optional acpi
|
||||
contrib/dev/acpica/resources/rsserial.c optional acpi
|
||||
contrib/dev/acpica/resources/rsutils.c optional acpi
|
||||
contrib/dev/acpica/resources/rsxface.c optional acpi
|
||||
contrib/dev/acpica/tables/tbfadt.c optional acpi
|
||||
contrib/dev/acpica/tables/tbfind.c optional acpi
|
||||
contrib/dev/acpica/tables/tbinstal.c optional acpi
|
||||
contrib/dev/acpica/tables/tbutils.c optional acpi
|
||||
contrib/dev/acpica/tables/tbxface.c optional acpi
|
||||
contrib/dev/acpica/tables/tbxfroot.c optional acpi
|
||||
contrib/dev/acpica/utilities/utaddress.c optional acpi
|
||||
contrib/dev/acpica/utilities/utalloc.c optional acpi
|
||||
contrib/dev/acpica/utilities/utcache.c optional acpi
|
||||
contrib/dev/acpica/utilities/utcopy.c optional acpi
|
||||
contrib/dev/acpica/utilities/utdebug.c optional acpi
|
||||
contrib/dev/acpica/utilities/utdecode.c optional acpi
|
||||
contrib/dev/acpica/utilities/utdelete.c optional acpi
|
||||
contrib/dev/acpica/utilities/uteval.c optional acpi
|
||||
contrib/dev/acpica/utilities/utglobal.c optional acpi
|
||||
contrib/dev/acpica/utilities/utids.c optional acpi
|
||||
contrib/dev/acpica/utilities/utinit.c optional acpi
|
||||
contrib/dev/acpica/utilities/utlock.c optional acpi
|
||||
contrib/dev/acpica/utilities/utmath.c optional acpi
|
||||
contrib/dev/acpica/utilities/utmisc.c optional acpi
|
||||
contrib/dev/acpica/utilities/utmutex.c optional acpi
|
||||
contrib/dev/acpica/utilities/utobject.c optional acpi
|
||||
contrib/dev/acpica/utilities/utosi.c optional acpi
|
||||
contrib/dev/acpica/utilities/utresrc.c optional acpi
|
||||
contrib/dev/acpica/utilities/utstate.c optional acpi
|
||||
contrib/dev/acpica/utilities/utxface.c optional acpi
|
||||
contrib/dev/acpica/utilities/utxferror.c optional acpi
|
||||
#contrib/dev/acpica/utilities/utxfmutex.c optional acpi
|
||||
contrib/dev/acpica/components/debugger/dbcmds.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/components/debugger/dbdisply.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/components/debugger/dbexec.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/components/debugger/dbfileio.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/components/debugger/dbhistry.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/components/debugger/dbinput.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/components/debugger/dbmethod.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/components/debugger/dbnames.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/components/debugger/dbstats.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/components/debugger/dbutils.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/components/debugger/dbxface.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/components/disassembler/dmbuffer.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/components/disassembler/dmnames.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/components/disassembler/dmopcode.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/components/disassembler/dmobject.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/components/disassembler/dmresrc.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/components/disassembler/dmresrcl.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/components/disassembler/dmresrcl2.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/components/disassembler/dmresrcs.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/components/disassembler/dmutils.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/components/disassembler/dmwalk.c optional acpi acpi_debug
|
||||
contrib/dev/acpica/components/dispatcher/dsargs.c optional acpi
|
||||
contrib/dev/acpica/components/dispatcher/dscontrol.c optional acpi
|
||||
contrib/dev/acpica/components/dispatcher/dsfield.c optional acpi
|
||||
contrib/dev/acpica/components/dispatcher/dsinit.c optional acpi
|
||||
contrib/dev/acpica/components/dispatcher/dsmethod.c optional acpi
|
||||
contrib/dev/acpica/components/dispatcher/dsmthdat.c optional acpi
|
||||
contrib/dev/acpica/components/dispatcher/dsobject.c optional acpi
|
||||
contrib/dev/acpica/components/dispatcher/dsopcode.c optional acpi
|
||||
contrib/dev/acpica/components/dispatcher/dsutils.c optional acpi
|
||||
contrib/dev/acpica/components/dispatcher/dswexec.c optional acpi
|
||||
contrib/dev/acpica/components/dispatcher/dswload.c optional acpi
|
||||
contrib/dev/acpica/components/dispatcher/dswload2.c optional acpi
|
||||
contrib/dev/acpica/components/dispatcher/dswscope.c optional acpi
|
||||
contrib/dev/acpica/components/dispatcher/dswstate.c optional acpi
|
||||
contrib/dev/acpica/components/events/evevent.c optional acpi
|
||||
contrib/dev/acpica/components/events/evglock.c optional acpi
|
||||
contrib/dev/acpica/components/events/evgpe.c optional acpi
|
||||
contrib/dev/acpica/components/events/evgpeblk.c optional acpi
|
||||
contrib/dev/acpica/components/events/evgpeinit.c optional acpi
|
||||
contrib/dev/acpica/components/events/evgpeutil.c optional acpi
|
||||
contrib/dev/acpica/components/events/evmisc.c optional acpi
|
||||
contrib/dev/acpica/components/events/evregion.c optional acpi
|
||||
contrib/dev/acpica/components/events/evrgnini.c optional acpi
|
||||
contrib/dev/acpica/components/events/evsci.c optional acpi
|
||||
contrib/dev/acpica/components/events/evxface.c optional acpi
|
||||
contrib/dev/acpica/components/events/evxfevnt.c optional acpi
|
||||
contrib/dev/acpica/components/events/evxfgpe.c optional acpi
|
||||
contrib/dev/acpica/components/events/evxfregn.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exconfig.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exconvrt.c optional acpi
|
||||
contrib/dev/acpica/components/executer/excreate.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exdebug.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exdump.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exfield.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exfldio.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exmisc.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exmutex.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exnames.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exoparg1.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exoparg2.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exoparg3.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exoparg6.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exprep.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exregion.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exresnte.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exresolv.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exresop.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exstore.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exstoren.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exstorob.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exsystem.c optional acpi
|
||||
contrib/dev/acpica/components/executer/exutils.c optional acpi
|
||||
contrib/dev/acpica/components/hardware/hwacpi.c optional acpi
|
||||
contrib/dev/acpica/components/hardware/hwesleep.c optional acpi
|
||||
contrib/dev/acpica/components/hardware/hwgpe.c optional acpi
|
||||
contrib/dev/acpica/components/hardware/hwpci.c optional acpi
|
||||
contrib/dev/acpica/components/hardware/hwregs.c optional acpi
|
||||
contrib/dev/acpica/components/hardware/hwsleep.c optional acpi
|
||||
contrib/dev/acpica/components/hardware/hwtimer.c optional acpi
|
||||
contrib/dev/acpica/components/hardware/hwvalid.c optional acpi
|
||||
contrib/dev/acpica/components/hardware/hwxface.c optional acpi
|
||||
contrib/dev/acpica/components/hardware/hwxfsleep.c optional acpi
|
||||
contrib/dev/acpica/components/namespace/nsaccess.c optional acpi
|
||||
contrib/dev/acpica/components/namespace/nsalloc.c optional acpi
|
||||
contrib/dev/acpica/components/namespace/nsdump.c optional acpi
|
||||
contrib/dev/acpica/components/namespace/nseval.c optional acpi
|
||||
contrib/dev/acpica/components/namespace/nsinit.c optional acpi
|
||||
contrib/dev/acpica/components/namespace/nsload.c optional acpi
|
||||
contrib/dev/acpica/components/namespace/nsnames.c optional acpi
|
||||
contrib/dev/acpica/components/namespace/nsobject.c optional acpi
|
||||
contrib/dev/acpica/components/namespace/nsparse.c optional acpi
|
||||
contrib/dev/acpica/components/namespace/nspredef.c optional acpi
|
||||
contrib/dev/acpica/components/namespace/nsrepair.c optional acpi
|
||||
contrib/dev/acpica/components/namespace/nsrepair2.c optional acpi
|
||||
contrib/dev/acpica/components/namespace/nssearch.c optional acpi
|
||||
contrib/dev/acpica/components/namespace/nsutils.c optional acpi
|
||||
contrib/dev/acpica/components/namespace/nswalk.c optional acpi
|
||||
contrib/dev/acpica/components/namespace/nsxfeval.c optional acpi
|
||||
contrib/dev/acpica/components/namespace/nsxfname.c optional acpi
|
||||
contrib/dev/acpica/components/namespace/nsxfobj.c optional acpi
|
||||
contrib/dev/acpica/components/parser/psargs.c optional acpi
|
||||
contrib/dev/acpica/components/parser/psloop.c optional acpi
|
||||
contrib/dev/acpica/components/parser/psopcode.c optional acpi
|
||||
contrib/dev/acpica/components/parser/psparse.c optional acpi
|
||||
contrib/dev/acpica/components/parser/psscope.c optional acpi
|
||||
contrib/dev/acpica/components/parser/pstree.c optional acpi
|
||||
contrib/dev/acpica/components/parser/psutils.c optional acpi
|
||||
contrib/dev/acpica/components/parser/pswalk.c optional acpi
|
||||
contrib/dev/acpica/components/parser/psxface.c optional acpi
|
||||
contrib/dev/acpica/components/resources/rsaddr.c optional acpi
|
||||
contrib/dev/acpica/components/resources/rscalc.c optional acpi
|
||||
contrib/dev/acpica/components/resources/rscreate.c optional acpi
|
||||
contrib/dev/acpica/components/resources/rsdump.c optional acpi
|
||||
contrib/dev/acpica/components/resources/rsinfo.c optional acpi
|
||||
contrib/dev/acpica/components/resources/rsio.c optional acpi
|
||||
contrib/dev/acpica/components/resources/rsirq.c optional acpi
|
||||
contrib/dev/acpica/components/resources/rslist.c optional acpi
|
||||
contrib/dev/acpica/components/resources/rsmemory.c optional acpi
|
||||
contrib/dev/acpica/components/resources/rsmisc.c optional acpi
|
||||
contrib/dev/acpica/components/resources/rsserial.c optional acpi
|
||||
contrib/dev/acpica/components/resources/rsutils.c optional acpi
|
||||
contrib/dev/acpica/components/resources/rsxface.c optional acpi
|
||||
contrib/dev/acpica/components/tables/tbfadt.c optional acpi
|
||||
contrib/dev/acpica/components/tables/tbfind.c optional acpi
|
||||
contrib/dev/acpica/components/tables/tbinstal.c optional acpi
|
||||
contrib/dev/acpica/components/tables/tbutils.c optional acpi
|
||||
contrib/dev/acpica/components/tables/tbxface.c optional acpi
|
||||
contrib/dev/acpica/components/tables/tbxfroot.c optional acpi
|
||||
contrib/dev/acpica/components/utilities/utaddress.c optional acpi
|
||||
contrib/dev/acpica/components/utilities/utalloc.c optional acpi
|
||||
contrib/dev/acpica/components/utilities/utcache.c optional acpi
|
||||
contrib/dev/acpica/components/utilities/utcopy.c optional acpi
|
||||
contrib/dev/acpica/components/utilities/utdebug.c optional acpi
|
||||
contrib/dev/acpica/components/utilities/utdecode.c optional acpi
|
||||
contrib/dev/acpica/components/utilities/utdelete.c optional acpi
|
||||
contrib/dev/acpica/components/utilities/uteval.c optional acpi
|
||||
contrib/dev/acpica/components/utilities/utglobal.c optional acpi
|
||||
contrib/dev/acpica/components/utilities/utids.c optional acpi
|
||||
contrib/dev/acpica/components/utilities/utinit.c optional acpi
|
||||
contrib/dev/acpica/components/utilities/utlock.c optional acpi
|
||||
contrib/dev/acpica/components/utilities/utmath.c optional acpi
|
||||
contrib/dev/acpica/components/utilities/utmisc.c optional acpi
|
||||
contrib/dev/acpica/components/utilities/utmutex.c optional acpi
|
||||
contrib/dev/acpica/components/utilities/utobject.c optional acpi
|
||||
contrib/dev/acpica/components/utilities/utosi.c optional acpi
|
||||
contrib/dev/acpica/components/utilities/utresrc.c optional acpi
|
||||
contrib/dev/acpica/components/utilities/utstate.c optional acpi
|
||||
contrib/dev/acpica/components/utilities/utxface.c optional acpi
|
||||
contrib/dev/acpica/components/utilities/utxferror.c optional acpi
|
||||
#contrib/dev/acpica/components/utilities/utxfmutex.c optional acpi
|
||||
contrib/ipfilter/netinet/fil.c optional ipfilter inet \
|
||||
compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -I$S/contrib/ipfilter"
|
||||
contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet \
|
||||
|
@ -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"
|
||||
|
@ -1,3 +1,95 @@
|
||||
----------------------------------------
|
||||
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:
|
||||
|
||||
|
@ -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;
|
||||
|
@ -127,13 +127,6 @@ AcpiDsStoreObjectToLocal (
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiEvDeleteGpeBlock (
|
||||
ACPI_GPE_BLOCK_INFO *GpeBlock)
|
||||
{
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiEvQueueNotifyRequest (
|
||||
ACPI_NAMESPACE_NODE *Node,
|
||||
@ -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 (
|
||||
|
@ -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 ("**** returning from sleep ****\n");
|
||||
AcpiOsPrintf ("**** Prepare to return from sleep ****\n");
|
||||
Status = AcpiLeaveSleepStatePrep (SleepState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto ErrorExit;
|
||||
}
|
||||
|
||||
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 */
|
@ -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");
|
@ -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:
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
||||
|
@ -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 */
|
@ -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 */
|
@ -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 */
|
@ -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 */
|
@ -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 */
|
@ -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 */
|
@ -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 */
|
@ -54,257 +54,6 @@
|
||||
ACPI_MODULE_NAME ("evxface")
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* 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
|
||||
@ -656,6 +405,258 @@ AcpiRemoveNotifyHandler (
|
||||
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
|
||||
@ -975,3 +976,4 @@ AcpiReleaseGlobalLock (
|
||||
|
||||
ACPI_EXPORT_SYMBOL (AcpiReleaseGlobalLock)
|
||||
|
||||
#endif /* !ACPI_REDUCED_HARDWARE */
|
@ -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 */
|
@ -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 */
|
@ -350,8 +350,6 @@ AcpiExRegisterOverflow (
|
||||
ACPI_OPERAND_OBJECT *ObjDesc,
|
||||
UINT64 Value)
|
||||
{
|
||||
ACPI_FUNCTION_NAME (ExRegisterOverflow);
|
||||
|
||||
|
||||
if (ObjDesc->CommonField.BitLength >= ACPI_INTEGER_BIT_SIZE)
|
||||
{
|
@ -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 */
|
263
sys/contrib/dev/acpica/components/hardware/hwesleep.c
Normal file
263
sys/contrib/dev/acpica/components/hardware/hwesleep.c
Normal file
@ -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);
|
||||
}
|
@ -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 */
|
@ -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 @@ AcpiHwClearAcpiStatus (
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiHwGetRegisterBitMask
|
||||
* FUNCTION: AcpiHwGetBitRegisterInfo
|
||||
*
|
||||
* PARAMETERS: RegisterId - Index of ACPI Register to access
|
||||
*
|
||||
@ -731,3 +738,4 @@ AcpiHwWriteMultiple (
|
||||
return (Status);
|
||||
}
|
||||
|
||||
#endif /* !ACPI_REDUCED_HARDWARE */
|
@ -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 (
|
||||
}
|
||||
}
|
||||
|
||||
AcpiHwExecuteSleepMethod (METHOD_NAME__BFS, SleepState);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* 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;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE (HwLegacyWake);
|
||||
|
||||
|
||||
/* Ensure EnterSleepStatePrep -> EnterSleepState ordering */
|
||||
|
||||
AcpiGbl_SleepTypeA = ACPI_SLEEP_TYPE_INVALID;
|
||||
|
||||
/* Setup parameter object */
|
||||
|
||||
ArgList.Count = 1;
|
||||
ArgList.Pointer = &Arg;
|
||||
Arg.Type = ACPI_TYPE_INTEGER;
|
||||
|
||||
/* Ignore any errors from these methods */
|
||||
|
||||
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"));
|
||||
}
|
||||
|
||||
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? */
|
||||
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 */
|
@ -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 */
|
@ -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 @@ AcpiWriteBitRegister (
|
||||
|
||||
ACPI_EXPORT_SYMBOL (AcpiWriteBitRegister)
|
||||
|
||||
#endif /* !ACPI_REDUCED_HARDWARE */
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
474
sys/contrib/dev/acpica/components/hardware/hwxfsleep.c
Normal file
474
sys/contrib/dev/acpica/components/hardware/hwxfsleep.c
Normal file
@ -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)
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user