aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README4
-rw-r--r--changes.txt92
-rwxr-xr-xgenerate/release/build.sh487
-rwxr-xr-xgenerate/release/release.sh146
-rw-r--r--generate/unix/acpiexec/Makefile2
-rw-r--r--source/common/adfile.c (renamed from common/adfile.c)0
-rw-r--r--source/common/adisasm.c (renamed from common/adisasm.c)0
-rw-r--r--source/common/adwalk.c (renamed from common/adwalk.c)0
-rw-r--r--source/common/dmextern.c (renamed from common/dmextern.c)0
-rw-r--r--source/common/dmrestag.c (renamed from common/dmrestag.c)0
-rw-r--r--source/common/dmtable.c (renamed from common/dmtable.c)0
-rw-r--r--source/common/dmtbdump.c (renamed from common/dmtbdump.c)0
-rw-r--r--source/common/dmtbinfo.c (renamed from common/dmtbinfo.c)0
-rw-r--r--source/common/getopt.c (renamed from common/getopt.c)0
-rw-r--r--source/compiler/Makefile (renamed from compiler/Makefile)15
-rw-r--r--source/compiler/aslanalyze.c (renamed from compiler/aslanalyze.c)0
-rw-r--r--source/compiler/aslbtypes.c (renamed from compiler/aslbtypes.c)0
-rw-r--r--source/compiler/aslcodegen.c (renamed from compiler/aslcodegen.c)0
-rw-r--r--source/compiler/aslcompile.c (renamed from compiler/aslcompile.c)0
-rw-r--r--source/compiler/aslcompiler.h (renamed from compiler/aslcompiler.h)0
-rw-r--r--source/compiler/aslcompiler.l (renamed from compiler/aslcompiler.l)0
-rw-r--r--source/compiler/aslcompiler.y (renamed from compiler/aslcompiler.y)0
-rw-r--r--source/compiler/asldefine.h (renamed from compiler/asldefine.h)0
-rw-r--r--source/compiler/aslerror.c (renamed from compiler/aslerror.c)0
-rw-r--r--source/compiler/aslfiles.c (renamed from compiler/aslfiles.c)0
-rw-r--r--source/compiler/aslfold.c (renamed from compiler/aslfold.c)0
-rw-r--r--source/compiler/aslglobal.h (renamed from compiler/aslglobal.h)0
-rw-r--r--source/compiler/asllength.c (renamed from compiler/asllength.c)0
-rw-r--r--source/compiler/asllisting.c (renamed from compiler/asllisting.c)0
-rw-r--r--source/compiler/aslload.c (renamed from compiler/aslload.c)0
-rw-r--r--source/compiler/asllookup.c (renamed from compiler/asllookup.c)0
-rw-r--r--source/compiler/aslmain.c (renamed from compiler/aslmain.c)0
-rw-r--r--source/compiler/aslmap.c (renamed from compiler/aslmap.c)0
-rw-r--r--source/compiler/aslmessages.h (renamed from compiler/aslmessages.h)0
-rw-r--r--source/compiler/aslopcodes.c (renamed from compiler/aslopcodes.c)0
-rw-r--r--source/compiler/asloperands.c (renamed from compiler/asloperands.c)0
-rw-r--r--source/compiler/aslopt.c (renamed from compiler/aslopt.c)0
-rw-r--r--source/compiler/aslpredef.c (renamed from compiler/aslpredef.c)0
-rw-r--r--source/compiler/aslresource.c (renamed from compiler/aslresource.c)0
-rw-r--r--source/compiler/aslrestype1.c (renamed from compiler/aslrestype1.c)0
-rw-r--r--source/compiler/aslrestype1i.c (renamed from compiler/aslrestype1i.c)0
-rw-r--r--source/compiler/aslrestype2.c (renamed from compiler/aslrestype2.c)0
-rw-r--r--source/compiler/aslrestype2d.c (renamed from compiler/aslrestype2d.c)0
-rw-r--r--source/compiler/aslrestype2e.c (renamed from compiler/aslrestype2e.c)0
-rw-r--r--source/compiler/aslrestype2q.c (renamed from compiler/aslrestype2q.c)0
-rw-r--r--source/compiler/aslrestype2s.c (renamed from compiler/aslrestype2s.c)24
-rw-r--r--source/compiler/aslrestype2w.c (renamed from compiler/aslrestype2w.c)0
-rw-r--r--source/compiler/aslstartup.c (renamed from compiler/aslstartup.c)0
-rw-r--r--source/compiler/aslstubs.c (renamed from compiler/aslstubs.c)16
-rw-r--r--source/compiler/asltransform.c (renamed from compiler/asltransform.c)0
-rw-r--r--source/compiler/asltree.c (renamed from compiler/asltree.c)0
-rw-r--r--source/compiler/asltypes.h (renamed from compiler/asltypes.h)0
-rw-r--r--source/compiler/aslutils.c (renamed from compiler/aslutils.c)0
-rw-r--r--source/compiler/asluuid.c (renamed from compiler/asluuid.c)0
-rw-r--r--source/compiler/aslwalks.c (renamed from compiler/aslwalks.c)0
-rw-r--r--source/compiler/dtcompile.c (renamed from compiler/dtcompile.c)0
-rw-r--r--source/compiler/dtcompiler.h (renamed from compiler/dtcompiler.h)0
-rw-r--r--source/compiler/dtexpress.c (renamed from compiler/dtexpress.c)0
-rw-r--r--source/compiler/dtfield.c (renamed from compiler/dtfield.c)0
-rw-r--r--source/compiler/dtio.c (renamed from compiler/dtio.c)0
-rw-r--r--source/compiler/dtparser.l (renamed from compiler/dtparser.l)0
-rw-r--r--source/compiler/dtparser.y (renamed from compiler/dtparser.y)0
-rw-r--r--source/compiler/dtsubtable.c (renamed from compiler/dtsubtable.c)0
-rw-r--r--source/compiler/dttable.c (renamed from compiler/dttable.c)0
-rw-r--r--source/compiler/dttemplate.c (renamed from compiler/dttemplate.c)0
-rw-r--r--source/compiler/dttemplate.h (renamed from compiler/dttemplate.h)0
-rw-r--r--source/compiler/dtutils.c (renamed from compiler/dtutils.c)0
-rw-r--r--source/compiler/readme.txt (renamed from compiler/readme.txt)0
-rw-r--r--source/components/debugger/dbcmds.c (renamed from debugger/dbcmds.c)29
-rw-r--r--source/components/debugger/dbdisply.c (renamed from debugger/dbdisply.c)6
-rw-r--r--source/components/debugger/dbexec.c (renamed from debugger/dbexec.c)0
-rw-r--r--source/components/debugger/dbfileio.c (renamed from debugger/dbfileio.c)0
-rw-r--r--source/components/debugger/dbhistry.c (renamed from debugger/dbhistry.c)0
-rw-r--r--source/components/debugger/dbinput.c (renamed from debugger/dbinput.c)3
-rw-r--r--source/components/debugger/dbmethod.c (renamed from debugger/dbmethod.c)0
-rw-r--r--source/components/debugger/dbnames.c (renamed from debugger/dbnames.c)0
-rw-r--r--source/components/debugger/dbstats.c (renamed from debugger/dbstats.c)0
-rw-r--r--source/components/debugger/dbutils.c (renamed from debugger/dbutils.c)0
-rw-r--r--source/components/debugger/dbxface.c (renamed from debugger/dbxface.c)0
-rw-r--r--source/components/disassembler/dmbuffer.c (renamed from disassembler/dmbuffer.c)0
-rw-r--r--source/components/disassembler/dmnames.c (renamed from disassembler/dmnames.c)0
-rw-r--r--source/components/disassembler/dmobject.c (renamed from disassembler/dmobject.c)0
-rw-r--r--source/components/disassembler/dmopcode.c (renamed from disassembler/dmopcode.c)0
-rw-r--r--source/components/disassembler/dmresrc.c (renamed from disassembler/dmresrc.c)0
-rw-r--r--source/components/disassembler/dmresrcl.c (renamed from disassembler/dmresrcl.c)0
-rw-r--r--source/components/disassembler/dmresrcl2.c (renamed from disassembler/dmresrcl2.c)6
-rw-r--r--source/components/disassembler/dmresrcs.c (renamed from disassembler/dmresrcs.c)0
-rw-r--r--source/components/disassembler/dmutils.c (renamed from disassembler/dmutils.c)0
-rw-r--r--source/components/disassembler/dmwalk.c (renamed from disassembler/dmwalk.c)0
-rw-r--r--source/components/dispatcher/dsargs.c (renamed from dispatcher/dsargs.c)0
-rw-r--r--source/components/dispatcher/dscontrol.c (renamed from dispatcher/dscontrol.c)0
-rw-r--r--source/components/dispatcher/dsfield.c (renamed from dispatcher/dsfield.c)0
-rw-r--r--source/components/dispatcher/dsinit.c (renamed from dispatcher/dsinit.c)0
-rw-r--r--source/components/dispatcher/dsmethod.c (renamed from dispatcher/dsmethod.c)0
-rw-r--r--source/components/dispatcher/dsmthdat.c (renamed from dispatcher/dsmthdat.c)0
-rw-r--r--source/components/dispatcher/dsobject.c (renamed from dispatcher/dsobject.c)0
-rw-r--r--source/components/dispatcher/dsopcode.c (renamed from dispatcher/dsopcode.c)0
-rw-r--r--source/components/dispatcher/dsutils.c (renamed from dispatcher/dsutils.c)0
-rw-r--r--source/components/dispatcher/dswexec.c (renamed from dispatcher/dswexec.c)0
-rw-r--r--source/components/dispatcher/dswload.c (renamed from dispatcher/dswload.c)0
-rw-r--r--source/components/dispatcher/dswload2.c (renamed from dispatcher/dswload2.c)0
-rw-r--r--source/components/dispatcher/dswscope.c (renamed from dispatcher/dswscope.c)0
-rw-r--r--source/components/dispatcher/dswstate.c (renamed from dispatcher/dswstate.c)0
-rw-r--r--source/components/events/evevent.c (renamed from events/evevent.c)4
-rw-r--r--source/components/events/evglock.c (renamed from events/evglock.c)3
-rw-r--r--source/components/events/evgpe.c (renamed from events/evgpe.c)3
-rw-r--r--source/components/events/evgpeblk.c (renamed from events/evgpeblk.c)3
-rw-r--r--source/components/events/evgpeinit.c (renamed from events/evgpeinit.c)3
-rw-r--r--source/components/events/evgpeutil.c (renamed from events/evgpeutil.c)3
-rw-r--r--source/components/events/evmisc.c (renamed from events/evmisc.c)25
-rw-r--r--source/components/events/evregion.c (renamed from events/evregion.c)0
-rw-r--r--source/components/events/evrgnini.c (renamed from events/evrgnini.c)0
-rw-r--r--source/components/events/evsci.c (renamed from events/evsci.c)4
-rw-r--r--source/components/events/evxface.c (renamed from events/evxface.c)504
-rw-r--r--source/components/events/evxfevnt.c (renamed from events/evxfevnt.c)3
-rw-r--r--source/components/events/evxfgpe.c (renamed from events/evxfgpe.c)3
-rw-r--r--source/components/events/evxfregn.c (renamed from events/evxfregn.c)0
-rw-r--r--source/components/executer/exconfig.c (renamed from executer/exconfig.c)0
-rw-r--r--source/components/executer/exconvrt.c (renamed from executer/exconvrt.c)0
-rw-r--r--source/components/executer/excreate.c (renamed from executer/excreate.c)0
-rw-r--r--source/components/executer/exdebug.c (renamed from executer/exdebug.c)0
-rw-r--r--source/components/executer/exdump.c (renamed from executer/exdump.c)0
-rw-r--r--source/components/executer/exfield.c (renamed from executer/exfield.c)0
-rw-r--r--source/components/executer/exfldio.c (renamed from executer/exfldio.c)2
-rw-r--r--source/components/executer/exmisc.c (renamed from executer/exmisc.c)0
-rw-r--r--source/components/executer/exmutex.c (renamed from executer/exmutex.c)0
-rw-r--r--source/components/executer/exnames.c (renamed from executer/exnames.c)0
-rw-r--r--source/components/executer/exoparg1.c (renamed from executer/exoparg1.c)0
-rw-r--r--source/components/executer/exoparg2.c (renamed from executer/exoparg2.c)0
-rw-r--r--source/components/executer/exoparg3.c (renamed from executer/exoparg3.c)0
-rw-r--r--source/components/executer/exoparg6.c (renamed from executer/exoparg6.c)0
-rw-r--r--source/components/executer/exprep.c (renamed from executer/exprep.c)0
-rw-r--r--source/components/executer/exregion.c (renamed from executer/exregion.c)0
-rw-r--r--source/components/executer/exresnte.c (renamed from executer/exresnte.c)0
-rw-r--r--source/components/executer/exresolv.c (renamed from executer/exresolv.c)0
-rw-r--r--source/components/executer/exresop.c (renamed from executer/exresop.c)0
-rw-r--r--source/components/executer/exstore.c (renamed from executer/exstore.c)0
-rw-r--r--source/components/executer/exstoren.c (renamed from executer/exstoren.c)0
-rw-r--r--source/components/executer/exstorob.c (renamed from executer/exstorob.c)0
-rw-r--r--source/components/executer/exsystem.c (renamed from executer/exsystem.c)0
-rw-r--r--source/components/executer/exutils.c (renamed from executer/exutils.c)0
-rw-r--r--source/components/hardware/hwacpi.c (renamed from hardware/hwacpi.c)3
-rw-r--r--source/components/hardware/hwesleep.c263
-rw-r--r--source/components/hardware/hwgpe.c (renamed from hardware/hwgpe.c)3
-rw-r--r--source/components/hardware/hwpci.c (renamed from hardware/hwpci.c)0
-rw-r--r--source/components/hardware/hwregs.c (renamed from hardware/hwregs.c)14
-rw-r--r--source/components/hardware/hwsleep.c (renamed from hardware/hwsleep.c)377
-rw-r--r--source/components/hardware/hwtimer.c (renamed from hardware/hwtimer.c)2
-rw-r--r--source/components/hardware/hwvalid.c (renamed from hardware/hwvalid.c)0
-rw-r--r--source/components/hardware/hwxface.c (renamed from hardware/hwxface.c)55
-rw-r--r--source/components/hardware/hwxfsleep.c474
-rw-r--r--source/components/namespace/nsaccess.c (renamed from namespace/nsaccess.c)0
-rw-r--r--source/components/namespace/nsalloc.c (renamed from namespace/nsalloc.c)0
-rw-r--r--source/components/namespace/nsdump.c (renamed from namespace/nsdump.c)0
-rw-r--r--source/components/namespace/nsdumpdv.c (renamed from namespace/nsdumpdv.c)0
-rw-r--r--source/components/namespace/nseval.c (renamed from namespace/nseval.c)0
-rw-r--r--source/components/namespace/nsinit.c (renamed from namespace/nsinit.c)0
-rw-r--r--source/components/namespace/nsload.c (renamed from namespace/nsload.c)0
-rw-r--r--source/components/namespace/nsnames.c (renamed from namespace/nsnames.c)0
-rw-r--r--source/components/namespace/nsobject.c (renamed from namespace/nsobject.c)0
-rw-r--r--source/components/namespace/nsparse.c (renamed from namespace/nsparse.c)0
-rw-r--r--source/components/namespace/nspredef.c (renamed from namespace/nspredef.c)0
-rw-r--r--source/components/namespace/nsrepair.c (renamed from namespace/nsrepair.c)0
-rw-r--r--source/components/namespace/nsrepair2.c (renamed from namespace/nsrepair2.c)0
-rw-r--r--source/components/namespace/nssearch.c (renamed from namespace/nssearch.c)0
-rw-r--r--source/components/namespace/nsutils.c (renamed from namespace/nsutils.c)0
-rw-r--r--source/components/namespace/nswalk.c (renamed from namespace/nswalk.c)0
-rw-r--r--source/components/namespace/nsxfeval.c (renamed from namespace/nsxfeval.c)0
-rw-r--r--source/components/namespace/nsxfname.c (renamed from namespace/nsxfname.c)0
-rw-r--r--source/components/namespace/nsxfobj.c (renamed from namespace/nsxfobj.c)0
-rw-r--r--source/components/parser/psargs.c (renamed from parser/psargs.c)0
-rw-r--r--source/components/parser/psloop.c (renamed from parser/psloop.c)0
-rw-r--r--source/components/parser/psopcode.c (renamed from parser/psopcode.c)0
-rw-r--r--source/components/parser/psparse.c (renamed from parser/psparse.c)0
-rw-r--r--source/components/parser/psscope.c (renamed from parser/psscope.c)0
-rw-r--r--source/components/parser/pstree.c (renamed from parser/pstree.c)0
-rw-r--r--source/components/parser/psutils.c (renamed from parser/psutils.c)0
-rw-r--r--source/components/parser/pswalk.c (renamed from parser/pswalk.c)0
-rw-r--r--source/components/parser/psxface.c (renamed from parser/psxface.c)0
-rw-r--r--source/components/resources/rsaddr.c (renamed from resources/rsaddr.c)0
-rw-r--r--source/components/resources/rscalc.c (renamed from resources/rscalc.c)0
-rw-r--r--source/components/resources/rscreate.c (renamed from resources/rscreate.c)0
-rw-r--r--source/components/resources/rsdump.c (renamed from resources/rsdump.c)0
-rw-r--r--source/components/resources/rsinfo.c (renamed from resources/rsinfo.c)0
-rw-r--r--source/components/resources/rsio.c (renamed from resources/rsio.c)0
-rw-r--r--source/components/resources/rsirq.c (renamed from resources/rsirq.c)0
-rw-r--r--source/components/resources/rslist.c (renamed from resources/rslist.c)0
-rw-r--r--source/components/resources/rsmemory.c (renamed from resources/rsmemory.c)0
-rw-r--r--source/components/resources/rsmisc.c (renamed from resources/rsmisc.c)0
-rw-r--r--source/components/resources/rsserial.c (renamed from resources/rsserial.c)0
-rw-r--r--source/components/resources/rsutils.c (renamed from resources/rsutils.c)0
-rw-r--r--source/components/resources/rsxface.c (renamed from resources/rsxface.c)0
-rw-r--r--source/components/tables/tbfadt.c (renamed from tables/tbfadt.c)0
-rw-r--r--source/components/tables/tbfind.c (renamed from tables/tbfind.c)0
-rw-r--r--source/components/tables/tbinstal.c (renamed from tables/tbinstal.c)115
-rw-r--r--source/components/tables/tbutils.c (renamed from tables/tbutils.c)80
-rw-r--r--source/components/tables/tbxface.c (renamed from tables/tbxface.c)0
-rw-r--r--source/components/tables/tbxfroot.c (renamed from tables/tbxfroot.c)0
-rw-r--r--source/components/utilities/utaddress.c (renamed from utilities/utaddress.c)0
-rw-r--r--source/components/utilities/utalloc.c (renamed from utilities/utalloc.c)0
-rw-r--r--source/components/utilities/utcache.c (renamed from utilities/utcache.c)0
-rw-r--r--source/components/utilities/utclib.c (renamed from utilities/utclib.c)0
-rw-r--r--source/components/utilities/utcopy.c (renamed from utilities/utcopy.c)0
-rw-r--r--source/components/utilities/utdebug.c (renamed from utilities/utdebug.c)0
-rw-r--r--source/components/utilities/utdecode.c (renamed from utilities/utdecode.c)35
-rw-r--r--source/components/utilities/utdelete.c (renamed from utilities/utdelete.c)0
-rw-r--r--source/components/utilities/uteval.c (renamed from utilities/uteval.c)0
-rw-r--r--source/components/utilities/utglobal.c (renamed from utilities/utglobal.c)9
-rw-r--r--source/components/utilities/utids.c (renamed from utilities/utids.c)0
-rw-r--r--source/components/utilities/utinit.c (renamed from utilities/utinit.c)43
-rw-r--r--source/components/utilities/utlock.c (renamed from utilities/utlock.c)0
-rw-r--r--source/components/utilities/utmath.c (renamed from utilities/utmath.c)0
-rw-r--r--source/components/utilities/utmisc.c (renamed from utilities/utmisc.c)0
-rw-r--r--source/components/utilities/utmutex.c (renamed from utilities/utmutex.c)0
-rw-r--r--source/components/utilities/utobject.c (renamed from utilities/utobject.c)0
-rw-r--r--source/components/utilities/utosi.c (renamed from utilities/utosi.c)0
-rw-r--r--source/components/utilities/utresrc.c (renamed from utilities/utresrc.c)0
-rw-r--r--source/components/utilities/utstate.c (renamed from utilities/utstate.c)0
-rw-r--r--source/components/utilities/uttrack.c (renamed from utilities/uttrack.c)0
-rw-r--r--source/components/utilities/utxface.c (renamed from utilities/utxface.c)9
-rw-r--r--source/components/utilities/utxferror.c (renamed from utilities/utxferror.c)0
-rw-r--r--source/components/utilities/utxfmutex.c (renamed from utilities/utxfmutex.c)0
-rw-r--r--source/include/acapps.h (renamed from include/acapps.h)0
-rw-r--r--source/include/accommon.h (renamed from include/accommon.h)0
-rw-r--r--source/include/acconfig.h (renamed from include/acconfig.h)19
-rw-r--r--source/include/acdebug.h (renamed from include/acdebug.h)6
-rw-r--r--source/include/acdisasm.h (renamed from include/acdisasm.h)0
-rw-r--r--source/include/acdispat.h (renamed from include/acdispat.h)0
-rw-r--r--source/include/acevents.h (renamed from include/acevents.h)16
-rw-r--r--source/include/acexcep.h (renamed from include/acexcep.h)6
-rw-r--r--source/include/acglobal.h (renamed from include/acglobal.h)10
-rw-r--r--source/include/achware.h (renamed from include/achware.h)55
-rw-r--r--source/include/acinterp.h (renamed from include/acinterp.h)0
-rw-r--r--source/include/aclocal.h (renamed from include/aclocal.h)0
-rw-r--r--source/include/acmacros.h (renamed from include/acmacros.h)9
-rw-r--r--source/include/acnames.h (renamed from include/acnames.h)0
-rw-r--r--source/include/acnamesp.h (renamed from include/acnamesp.h)0
-rw-r--r--source/include/acobject.h (renamed from include/acobject.h)0
-rw-r--r--source/include/acopcode.h (renamed from include/acopcode.h)0
-rw-r--r--source/include/acoutput.h (renamed from include/acoutput.h)0
-rw-r--r--source/include/acparser.h (renamed from include/acparser.h)0
-rw-r--r--source/include/acpi.h (renamed from include/acpi.h)0
-rw-r--r--source/include/acpiosxf.h (renamed from include/acpiosxf.h)10
-rw-r--r--source/include/acpixf.h (renamed from include/acpixf.h)160
-rw-r--r--source/include/acpredef.h (renamed from include/acpredef.h)0
-rw-r--r--source/include/acresrc.h (renamed from include/acresrc.h)0
-rw-r--r--source/include/acrestyp.h (renamed from include/acrestyp.h)0
-rw-r--r--source/include/acstruct.h (renamed from include/acstruct.h)0
-rw-r--r--source/include/actables.h (renamed from include/actables.h)5
-rw-r--r--source/include/actbl.h (renamed from include/actbl.h)7
-rw-r--r--source/include/actbl1.h (renamed from include/actbl1.h)0
-rw-r--r--source/include/actbl2.h (renamed from include/actbl2.h)0
-rw-r--r--source/include/actbl3.h (renamed from include/actbl3.h)0
-rw-r--r--source/include/actypes.h (renamed from include/actypes.h)19
-rw-r--r--source/include/acutils.h (renamed from include/acutils.h)0
-rw-r--r--source/include/amlcode.h (renamed from include/amlcode.h)0
-rw-r--r--source/include/amlresrc.h (renamed from include/amlresrc.h)0
-rw-r--r--source/include/platform/accygwin.h (renamed from include/platform/accygwin.h)0
-rw-r--r--source/include/platform/acefi.h (renamed from include/platform/acefi.h)0
-rw-r--r--source/include/platform/acenv.h (renamed from include/platform/acenv.h)0
-rw-r--r--source/include/platform/acfreebsd.h (renamed from include/platform/acfreebsd.h)0
-rw-r--r--source/include/platform/acgcc.h (renamed from include/platform/acgcc.h)0
-rw-r--r--source/include/platform/acintel.h (renamed from include/platform/acintel.h)0
-rw-r--r--source/include/platform/aclinux.h (renamed from include/platform/aclinux.h)0
-rw-r--r--source/include/platform/acmsvc.h (renamed from include/platform/acmsvc.h)0
-rw-r--r--source/include/platform/acnetbsd.h (renamed from include/platform/acnetbsd.h)0
-rw-r--r--source/include/platform/acos2.h (renamed from include/platform/acos2.h)0
-rw-r--r--source/include/platform/acwin.h (renamed from include/platform/acwin.h)0
-rw-r--r--source/include/platform/acwin64.h (renamed from include/platform/acwin64.h)0
-rw-r--r--source/os_specific/service_layers/osunixdir.c (renamed from os_specific/service_layers/osunixdir.c)0
-rw-r--r--source/os_specific/service_layers/osunixxf.c (renamed from os_specific/service_layers/osunixxf.c)39
-rw-r--r--source/os_specific/service_layers/oswindir.c (renamed from os_specific/service_layers/oswindir.c)0
-rw-r--r--source/os_specific/service_layers/oswintbl.c (renamed from os_specific/service_layers/oswintbl.c)0
-rw-r--r--source/os_specific/service_layers/oswinxf.c (renamed from os_specific/service_layers/oswinxf.c)38
-rw-r--r--source/tools/acpibin/Makefile (renamed from tools/acpibin/Makefile)22
-rw-r--r--source/tools/acpibin/abcompare.c (renamed from tools/acpibin/abcompare.c)0
-rw-r--r--source/tools/acpibin/abmain.c (renamed from tools/acpibin/abmain.c)0
-rw-r--r--source/tools/acpibin/acpibin.h (renamed from tools/acpibin/acpibin.h)0
-rw-r--r--source/tools/acpiexec/Makefile (renamed from tools/acpiexec/Makefile)14
-rw-r--r--source/tools/acpiexec/aecommon.h (renamed from tools/acpiexec/aecommon.h)0
-rw-r--r--source/tools/acpiexec/aeexec.c (renamed from tools/acpiexec/aeexec.c)35
-rw-r--r--source/tools/acpiexec/aehandlers.c (renamed from tools/acpiexec/aehandlers.c)27
-rw-r--r--source/tools/acpiexec/aemain.c (renamed from tools/acpiexec/aemain.c)0
-rw-r--r--source/tools/acpiexec/aetables.c (renamed from tools/acpiexec/aetables.c)2
-rw-r--r--source/tools/acpiexec/aetables.h (renamed from tools/acpiexec/aetables.h)6
-rw-r--r--source/tools/acpihelp/Makefile (renamed from tools/acpihelp/Makefile)22
-rw-r--r--source/tools/acpihelp/acpihelp.h (renamed from tools/acpihelp/acpihelp.h)12
-rw-r--r--source/tools/acpihelp/ahamlops.c (renamed from tools/acpihelp/ahamlops.c)0
-rw-r--r--source/tools/acpihelp/ahaslkey.c (renamed from tools/acpihelp/ahaslkey.c)0
-rw-r--r--source/tools/acpihelp/ahaslops.c (renamed from tools/acpihelp/ahaslops.c)0
-rw-r--r--source/tools/acpihelp/ahdecode.c (renamed from tools/acpihelp/ahdecode.c)61
-rw-r--r--source/tools/acpihelp/ahmain.c (renamed from tools/acpihelp/ahmain.c)12
-rw-r--r--source/tools/acpihelp/ahpredef.c (renamed from tools/acpihelp/ahpredef.c)0
-rw-r--r--source/tools/acpinames/Makefile (renamed from tools/acpinames/Makefile)11
-rw-r--r--source/tools/acpinames/acpinames.h (renamed from tools/acpinames/acpinames.h)0
-rw-r--r--source/tools/acpinames/anmain.c (renamed from tools/acpinames/anmain.c)0
-rw-r--r--source/tools/acpinames/anstubs.c (renamed from tools/acpinames/anstubs.c)12
-rw-r--r--source/tools/acpinames/antables.c (renamed from tools/acpinames/antables.c)0
-rw-r--r--source/tools/acpisrc/Makefile (renamed from tools/acpisrc/Makefile)18
-rw-r--r--source/tools/acpisrc/acpisrc.h (renamed from tools/acpisrc/acpisrc.h)0
-rw-r--r--source/tools/acpisrc/ascase.c (renamed from tools/acpisrc/ascase.c)0
-rw-r--r--source/tools/acpisrc/asconvrt.c (renamed from tools/acpisrc/asconvrt.c)0
-rw-r--r--source/tools/acpisrc/asfile.c (renamed from tools/acpisrc/asfile.c)0
-rw-r--r--source/tools/acpisrc/asmain.c (renamed from tools/acpisrc/asmain.c)0
-rw-r--r--source/tools/acpisrc/asremove.c (renamed from tools/acpisrc/asremove.c)0
-rw-r--r--source/tools/acpisrc/astable.c (renamed from tools/acpisrc/astable.c)2
-rw-r--r--source/tools/acpisrc/asutils.c (renamed from tools/acpisrc/asutils.c)0
-rw-r--r--source/tools/acpixtract/Makefile (renamed from tools/acpixtract/Makefile)24
-rw-r--r--source/tools/acpixtract/acpixtract.c (renamed from tools/acpixtract/acpixtract.c)0
-rw-r--r--source/tools/acpixtract/axmain.c (renamed from tools/acpixtract/axmain.c)0
-rw-r--r--source/tools/examples/examples.c (renamed from tools/examples/examples.c)0
311 files changed, 2665 insertions, 886 deletions
diff --git a/README b/README
index aaba77e9dec6..09557750848a 100644
--- a/README
+++ b/README
@@ -14,8 +14,8 @@ Documentation is available at acpica.org:
http://www.acpica.org/documentation/
The acpica/source/tools directory contains the following utilities.
-Note: These utilities are tested and supported as 32-bit versions
-only.
+Note: These utilities are tested and supported in both 32-bit
+and 64-bit versions.
acpibin
acpiexec
diff --git a/changes.txt b/changes.txt
index 3271b2b95020..f328ad1f847c 100644
--- a/changes.txt
+++ b/changes.txt
@@ -1,4 +1,96 @@
----------------------------------------
+15 February 2012. Summary of changes for version 20120215:
+
+This release is available at www.acpica.org/downloads.
+The ACPI 5.0 specification is available at www.acpi.info.
+
+1) ACPICA Core Subsystem:
+
+There have been some major changes to the sleep/wake support code, as
+described below (a - e).
+
+a) The AcpiLeaveSleepState has been split into two interfaces, similar to
+AcpiEnterSleepStatePrep and AcpiEnterSleepState. The new interface is
+AcpiLeaveSleepStatePrep. This allows the host to perform actions between the
+time the _BFS method is called and the _WAK method is called. NOTE: all hosts
+must update their wake/resume code or else sleep/wake will not work properly.
+Rafael Wysocki.
+
+b) In AcpiLeaveSleepState, now enable all runtime GPEs before calling the _WAK
+method. Some machines require that the GPEs are enabled before the _WAK method
+is executed. Thomas Renninger.
+
+c) In AcpiLeaveSleepState, now always clear the WAK_STS (wake status) bit.
+Some BIOS code assumes that WAK_STS will be cleared on resume and use it to
+determine whether the system is rebooting or resuming. Matthew Garrett.
+
+d) Move the invocations of _GTS (Going To Sleep) and _BFS (Back From Sleep) to
+match the ACPI specification requirement. Rafael Wysocki.
+
+e) Implemented full support for the ACPI 5.0 SleepStatus and SleepControl
+registers within the V5 FADT. This support adds two new files:
+hardware/hwesleep.c implements the support for the new registers. Moved all
+sleep/wake external interfaces to hardware/hwxfsleep.c.
+
+
+Added a new OSL interface for ACPI table overrides,
+AcpiOsPhysicalTableOverride. This interface allows the host to override a
+table via a physical address, instead of the logical address required by
+AcpiOsTableOverride. This simplifies the host implementation. Initial
+implementation by Thomas Renninger. The ACPICA implementation creates a single
+shared function for table overrides that attempts both a logical and a
+physical override.
+
+Expanded the OSL memory read/write interfaces to 64-bit data
+(AcpiOsReadMemory, AcpiOsWriteMemory.) This enables full 64-bit memory
+transfer support for GAS register structures passed to AcpiRead and AcpiWrite.
+
+Implemented the ACPI_REDUCED_HARDWARE option to allow the creation of a custom
+build of ACPICA that supports only the ACPI 5.0 reduced hardware (SoC) model.
+See the ACPICA reference for details. ACPICA BZ 942. This option removes about
+10% of the code and 5% of the static data, and the following hardware ACPI
+features become unavailable:
+ PM Event and Control registers
+ SCI interrupt (and handler)
+ Fixed Events
+ General Purpose Events (GPEs)
+ Global Lock
+ ACPI PM timer
+ FACS table (Waking vectors and Global Lock)
+
+Updated the unix tarball directory structure to match the ACPICA git source
+tree. This ensures that the generic unix makefiles work properly (in
+generate/unix). Also updated the Linux makefiles to match. ACPICA BZ 867.
+
+Updated the return value of the _REV predefined method to integer value 5 to
+reflect ACPI 5.0 support.
+
+Moved the external ACPI PM timer interface prototypes to the public acpixf.h
+file where they belong.
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug
+version of the code includes the debug output trace mechanism and has a much
+larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 92.8K Code, 24.9K Data, 117.7K Total
+ Debug Version: 171.7K Code, 72.9K Data, 244.5K Total
+ Current Release:
+ Non-Debug Version: 93.0K Code, 25.0K Data, 118.0K Total
+ Debug Version: 172.5K Code, 73.2K Data, 245.7K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+Disassembler: Fixed a problem with the new ACPI 5.0 serial resource
+descriptors (I2C, SPI, UART) where the resource produce/consumer bit was
+incorrectly displayed.
+
+AcpiHelp: Add display of ACPI/PNP device IDs that are defined in the ACPI
+specification.
+
+----------------------------------------
11 January 2012. Summary of changes for version 20120111:
This release is available at www.acpica.org/downloads.
diff --git a/generate/release/build.sh b/generate/release/build.sh
new file mode 100755
index 000000000000..9c46e66b4caf
--- /dev/null
+++ b/generate/release/build.sh
@@ -0,0 +1,487 @@
+#!/bin/bash
+
+#******************************************************************************
+#
+# ACPICA package generation script for Cygwin/Windows execution
+#
+# Requires cygwin be installed - http://www.cygwin.com
+# and its /bin be *first* in your path.
+#
+# Windows packages require pkzip25 (free, and is available from numerous
+# sources - search for "pkzip25" or "pkzip25.exe")
+#
+# Execute this script from the acpica/generate/release directory.
+#
+# Constructed packages are placed in the acpica/generate/release/current
+# directory.
+#
+# Line Terminators: Windows source packages leave the CR/LF terminator.
+# Unix packages convert the CR/LF terminators to LF only.
+#
+# Usage:
+#
+# build <package_type> <target_type>
+#
+# where:
+# <package_type> is one of:
+# source - Build an ACPICA source package (core and all tools)
+# test - Build an ACPICA test suite package
+# binary - Build an ACPICA binary tools package
+#
+# <target_type> is one of:
+# win - Generate Windows package (Intel license, CRLF line terminators)
+# unix - Generate Unix package (Intel license, LF line terminators)
+# unix2 - Generate Unix package (dual license, LF line terminators)
+#
+#******************************************************************************
+
+# Configuration
+
+ZIP_UTILITY="c:/windows/pkzip25.exe"
+ACPISRC="libraries/acpisrc.exe"
+DOS2UNIX="dos2unix"
+UNIX2DOS="unix2dos"
+
+# Filenames and paths
+
+TARGET_DIR="generate/release/current"
+TEMP_DIR=acpitemp
+TEST_PREFIX=acpitests
+SOURCE_PREFIX=acpica
+BINARY_PREFIX=iasl
+PACKAGE_SUFFIX=`date +%Y%m%d`
+
+NPARAM=$#
+
+
+#******************************************************************************
+#
+# Miscellaneous utility functions
+#
+#******************************************************************************
+
+usage()
+{
+ echo "$1"
+ echo
+ echo "Low-level build script for ACPICA release packages"
+ echo "Usage:"
+ echo " $0 source <win | unix | unix2>"
+ echo " $0 test <win | unix>"
+ echo " $0 binary <win>"
+}
+
+banner()
+{
+ echo
+ echo "$1"
+ echo
+}
+
+check_zip_utility_exists()
+{
+ #
+ # Need pkzip (or similar) to build the windows packages
+ #
+ if [ ! -e "$ZIP_UTILITY" ]; then
+ echo "ZIP_UTILITY ($ZIP_UTILITY) does not exist!"
+ exit 1
+ fi
+}
+
+convert_to_unix_line_terminators()
+{
+ #
+ # Convert all CR/LF pairs to Unix format (LF only)
+ #
+ cd $TEMP_DIR
+ echo Starting CR/LF to LF Conversion
+ find . -name "*" | xargs $DOS2UNIX
+ echo Completed CR/LF to LF Conversion
+ cd ..
+}
+
+convert_to_dos_line_terminators()
+{
+ #
+ # Convert all lone LF terminators to CR/LF
+ # Note: Checks shell scripts only (*.sh)
+ #
+ cd $TEMP_DIR
+ echo Starting LF to CR/LF Conversion
+ find . -name "*.sh" | xargs $UNIX2DOS
+ echo Completed LF to CR/LF Conversion
+ cd ..
+}
+
+insert_dual_license_headers()
+{
+ #
+ # Need acpisrc utility to insert the headers
+ #
+ if [ ! -e "$ACPISRC" ]; then
+ echo "acpisrc ($ACPISRC) does not exist!"
+ exit 1
+ fi
+
+ #
+ # Insert the dual license into *.c and *.h files
+ #
+ echo "Inserting dual-license into all source files"
+ $ACPISRC -h -y $TEMP_DIR
+}
+
+build_unix_package()
+{
+ convert_to_unix_line_terminators
+
+ #
+ # Build release package
+ #
+ rm -r -f $PACKAGE_FILENAME
+ mv $TEMP_DIR $PACKAGE_FILENAME
+ tar czf $PACKAGE_FILENAME.tar.gz $PACKAGE_FILENAME
+
+ #
+ # Move the completed package
+ #
+ mv $PACKAGE_FILENAME.tar.gz $TARGET_DIR
+ mv $PACKAGE_FILENAME $TEMP_DIR
+}
+
+build_windows_package()
+{
+ convert_to_dos_line_terminators
+
+ #
+ # Build release package
+ #
+ cd $TEMP_DIR
+ rm -r -f ../$TARGET_DIR/$PACKAGE_FILENAME
+ $ZIP_UTILITY -add -max -dir -sort=name ../$TARGET_DIR/$PACKAGE_FILENAME
+ cd ..
+}
+
+
+#******************************************************************************
+#
+# generate_source_package
+#
+# Generates the ACPICA source code packages (core and all tools)
+#
+# Arguments:
+# %1 - Target type (win or unix or unix2)
+#
+#******************************************************************************
+
+generate_source_package ()
+{
+ #
+ # Parameter evaluation
+ #
+ if [ $1 == win ]; then
+ PACKAGE_NAME=Windows
+ PACKAGE_TYPE=Win
+ LICENSE=Intel
+ check_zip_utility_exists
+
+ elif [ $1 == unix ]; then
+ PACKAGE_NAME="Unix (Intel License)"
+ PACKAGE_TYPE=Unix
+ LICENSE=Intel
+
+ elif [ $1 == unix2 ]; then
+ PACKAGE_NAME="Unix (Dual License)"
+ PACKAGE_TYPE=Unix
+ LICENSE=Dual
+
+ else
+ usage "Invalid argument ($1)"
+ exit 1
+ fi
+
+ PACKAGE_FILENAME=$SOURCE_PREFIX-$1-$PACKAGE_SUFFIX
+ banner "ACPICA - Generating $PACKAGE_NAME source code package ($PACKAGE_FILENAME)"
+
+ #
+ # Make directories common to all source packages
+ #
+ mkdir $TEMP_DIR
+ mkdir $TEMP_DIR/libraries
+ mkdir $TEMP_DIR/generate
+ mkdir $TEMP_DIR/generate/lint
+ mkdir $TEMP_DIR/generate/release
+ mkdir $TEMP_DIR/generate/unix
+ mkdir $TEMP_DIR/generate/unix/acpibin
+ mkdir $TEMP_DIR/generate/unix/acpiexec
+ mkdir $TEMP_DIR/generate/unix/acpihelp
+ mkdir $TEMP_DIR/generate/unix/acpinames
+ mkdir $TEMP_DIR/generate/unix/acpisrc
+ mkdir $TEMP_DIR/generate/unix/acpixtract
+ mkdir $TEMP_DIR/generate/unix/iasl
+ mkdir $TEMP_DIR/tests
+ mkdir $TEMP_DIR/tests/misc
+ mkdir $TEMP_DIR/tests/templates
+ mkdir -p $TEMP_DIR/source/os_specific/service_layers
+
+ #
+ # Copy ACPICA subsystem source code
+ #
+ cp -r documents/changes.txt $TEMP_DIR/changes.txt
+ cp -r source/common $TEMP_DIR/source/common
+ cp -r source/components $TEMP_DIR/source/
+ cp -r source/include $TEMP_DIR/source/include
+ cp -r generate/release/*.sh $TEMP_DIR/generate/release
+
+ #
+ # Copy iASL compiler and tools source
+ #
+ cp -r source/compiler $TEMP_DIR/source/compiler
+ cp -r source/tools $TEMP_DIR/source/tools
+
+ #
+ # Copy iASL/ACPICA miscellaneous tests (not full test suites)
+ #
+ cp -r tests/misc/*.asl $TEMP_DIR/tests/misc
+ cp -r tests/templates/Makefile $TEMP_DIR/tests/templates
+ cp -r tests/templates/templates.sh $TEMP_DIR/tests/templates
+
+ #
+ # Copy all OS-specific interfaces
+ #
+ cp source/os_specific/service_layers/*.c $TEMP_DIR/source/os_specific/service_layers
+
+ #
+ # Copy generic UNIX makefiles
+ #
+ cp generate/unix/readme.txt $TEMP_DIR/generate/unix/readme.txt
+ cp generate/unix/Makefile* $TEMP_DIR/generate/unix
+ cp generate/unix/acpibin/Makefile $TEMP_DIR/generate/unix/acpibin
+ cp generate/unix/acpiexec/Makefile $TEMP_DIR/generate/unix/acpiexec
+ cp generate/unix/acpihelp/Makefile $TEMP_DIR/generate/unix/acpihelp
+ cp generate/unix/acpinames/Makefile $TEMP_DIR/generate/unix/acpinames
+ cp generate/unix/acpisrc/Makefile $TEMP_DIR/generate/unix/acpisrc
+ cp generate/unix/acpixtract/Makefile $TEMP_DIR/generate/unix/acpixtract
+ cp generate/unix/iasl/Makefile $TEMP_DIR/generate/unix/iasl
+
+ #
+ # Copy Lint directory
+ #
+ cp -r generate/lint $TEMP_DIR/generate
+ rm -f $TEMP_DIR/generate/lint/co*
+ rm -f $TEMP_DIR/generate/lint/env*
+ rm -f $TEMP_DIR/generate/lint/lib*
+ rm -f $TEMP_DIR/generate/lint/LintOut.txt
+
+ if [ $PACKAGE_TYPE == Unix ]; then
+ #
+ # Unix/Linux-specific activities
+ #
+
+ # Copy Linux/UNIX utility generation makefiles
+
+ cp generate/linux/Makefile.acpibin $TEMP_DIR/source/tools/acpibin/Makefile
+ cp generate/linux/Makefile.acpiexec $TEMP_DIR/source/tools/acpiexec/Makefile
+ cp generate/linux/Makefile.acpihelp $TEMP_DIR/source/tools/acpihelp/Makefile
+ cp generate/linux/Makefile.acpinames $TEMP_DIR/source/tools/acpinames/Makefile
+ cp generate/linux/Makefile.acpisrc $TEMP_DIR/source/tools/acpisrc/Makefile
+ cp generate/linux/Makefile.acpixtract $TEMP_DIR/source/tools/acpixtract/Makefile
+ cp generate/linux/Makefile.iasl $TEMP_DIR/source/compiler/Makefile
+ cp generate/linux/README.acpica-unix $TEMP_DIR/README
+
+ #
+ # For Unix2 case, insert the dual license header into all source files
+ #
+ if [ $LICENSE == Dual ]; then
+ insert_dual_license_headers
+ fi
+
+ build_unix_package
+
+ else
+ #
+ # Windows-specific activities
+ #
+
+ # Copy project files for MS Visual Studio 2008 (VC++ 9.0)
+
+ mkdir $TEMP_DIR/generate/msvc9
+ cp -r generate/msvc9/*.sln $TEMP_DIR/generate/msvc9/
+ cp -r generate/msvc9/*.vcproj $TEMP_DIR/generate/msvc9/
+
+ build_windows_package
+ fi
+
+ banner "ACPICA - Completed $PACKAGE_NAME source code package ($PACKAGE_FILENAME)"
+}
+
+
+#******************************************************************************
+#
+# generate_test_package
+#
+# Generates the ACPICA test suite packages
+#
+# Arguments:
+# %1 - Target type (win or unix)
+#
+#******************************************************************************
+
+generate_test_package()
+{
+ #
+ # Parameter evaluation
+ #
+ if [ $1 == win ]; then
+ PACKAGE_NAME=Windows
+ PACKAGE_TYPE=Win
+ check_zip_utility_exists
+
+ elif [ $1 == unix ]; then
+ PACKAGE_NAME="Unix"
+ PACKAGE_TYPE=Unix
+
+ else
+ usage "Invalid argument ($1)"
+ exit 1
+ fi
+
+ PACKAGE_FILENAME=$TEST_PREFIX-$1-$PACKAGE_SUFFIX
+ banner "ACPICA - Generating $PACKAGE_NAME test suite package ($PACKAGE_FILENAME)"
+
+ #
+ # Copy the ASL Test source
+ #
+ mkdir $TEMP_DIR
+ cp -r tests $TEMP_DIR/tests
+
+ #
+ # Delete extraneous files
+ #
+ cd $TEMP_DIR
+ find . -name "tmp" | xargs rm -r -f
+ find . -name "aml" | xargs rm -r -f
+ find . -name "CVS" | xargs rm -r -f
+ cd ..
+
+ if [ $PACKAGE_TYPE == Unix ]; then
+ #
+ # Unix/Linux-specific activities
+ #
+ build_unix_package
+
+ else
+ #
+ # Windows-specific activities
+ #
+ build_windows_package
+ fi
+
+ banner "ACPICA - Completed $PACKAGE_NAME test suite package ($PACKAGE_FILENAME)"
+}
+
+
+#******************************************************************************
+#
+# generate_binary_package
+#
+# Generates the ACPICA binary package (Currently Windows only)
+#
+# Arguments:
+# %1 - Target type (win)
+#
+#******************************************************************************
+
+generate_binary_package()
+{
+ #
+ # Parameter evaluation
+ #
+ if [ $1 == win ]; then
+ PACKAGE_NAME=Windows
+ PACKAGE_TYPE=Win
+ check_zip_utility_exists
+
+ else
+ usage "Invalid argument ($1)"
+ exit 1
+ fi
+
+ PACKAGE_FILENAME=$BINARY_PREFIX-$1-$PACKAGE_SUFFIX
+ banner "ACPICA - Generating $PACKAGE_NAME binary tools package ($PACKAGE_FILENAME)"
+
+ #
+ # Copy executables and documentation
+ #
+ mkdir $TEMP_DIR
+ cp -r documents/changes.txt $TEMP_DIR/changes.txt
+ cp documents/aslcompiler.pdf $TEMP_DIR
+ cp libraries/acpibin.exe $TEMP_DIR
+ cp libraries/acpiexec.exe $TEMP_DIR
+ cp libraries/acpihelp.exe $TEMP_DIR
+ cp libraries/acpinames.exe $TEMP_DIR
+ cp libraries/acpisrc.exe $TEMP_DIR
+ cp libraries/acpixtract.exe $TEMP_DIR
+ cp libraries/iasl.exe $TEMP_DIR
+ cp tests/misc/badcode.asl $TEMP_DIR
+
+ build_windows_package
+ banner "ACPICA - Completed $PACKAGE_NAME binary tools package ($PACKAGE_FILENAME)"
+}
+
+
+#******************************************************************************
+#
+# main
+#
+# Arguments:
+# $1 (package_type) is one of:
+# source - Build an ACPICA source package (core and all tools)
+# test - Build an ACPICA test suite package
+# binary - Build an ACPICA binary tools package
+#
+# $2 (target_type) is one of:
+# win - Generate Windows package (Intel license, CRLF line terminators)
+# unix - Generate Unix package (Intel license, LF line terminators)
+# unix2 - Generate Unix package (dual license, LF line terminators)
+#
+#******************************************************************************
+
+set -e # Abort on any error
+
+if [ $NPARAM -ne 2 ]; then
+ usage "Wrong argument count ($NPARAM)"
+ exit 1
+fi
+
+#
+# cd from acpica/generate/release to acpica
+#
+cd ../..
+
+#
+# Ensure that the temporary directory is created fresh
+#
+rm -rf $TEMP_DIR
+
+#
+# Parameter evaluation
+#
+if [ $1 == source ]; then
+ generate_source_package $2
+
+elif [ $1 == test ]; then
+ generate_test_package $2
+
+elif [ $1 == binary ]; then
+ generate_binary_package $2
+
+else
+ usage "Invalid argument ($1)"
+ exit 1
+fi
+
+#
+# Remove temporary directory
+#
+rm -rf $TEMP_DIR
diff --git a/generate/release/release.sh b/generate/release/release.sh
new file mode 100755
index 000000000000..7bb9c3d4919a
--- /dev/null
+++ b/generate/release/release.sh
@@ -0,0 +1,146 @@
+#!/bin/bash
+
+#******************************************************************************
+#
+# ACPICA release generation script for Cygwin/Windows execution
+#
+# front end for build.sh
+#
+# Copies any existing packages to the archive directory.
+#
+# Generates 3 types of package:
+# 1) Standard ACPICA source, everything except test suites
+# 2) ACPICA test suites (very large)
+# 3) Windows binary tools (Windows does not include generation tools)
+#
+# Note: "unix" generation builds the source with the standard Intel license
+# in each file header. "unix2" builds the source with the dual license instead.
+# this has been requested by some OS vendors, notably FreeBSD.
+#
+#******************************************************************************
+
+# Configuration
+
+NPARAM=$#
+BUILD_TESTS=1
+
+# Filenames and paths
+
+ARCHIVE_DIR=archive
+RELEASE_DIR=current
+
+
+#******************************************************************************
+#
+# Miscellaneous utility functions
+#
+#******************************************************************************
+
+usage()
+{
+ echo "$1"
+ echo
+ echo "Master script to create ACPICA release packages"
+ echo "Usage:"
+ echo " $0 [notest]"
+}
+
+move_all_files_to_archive()
+{
+ cd $RELEASE_DIR
+
+ for file in *
+ do
+ if [ -d $file ]; then
+ rm -r -f ../$ARCHIVE_DIR/$file
+ mv -f $file ../$ARCHIVE_DIR
+ echo "Moved directory $file to $ARCHIVE_DIR directory"
+ else
+ cp $file ../$ARCHIVE_DIR
+ echo "Moved $file ($(ls -al $file | awk '{print $5}') bytes) to $ARCHIVE_DIR directory"
+ rm $file
+ fi
+ done
+
+ cd ..
+}
+
+
+#******************************************************************************
+#
+# main
+#
+# Arguments:
+# $1 (optional) notest - do not generate the ACPICA test suite packages
+#
+#******************************************************************************
+
+set -e # Abort on any error
+
+#
+# Parameter evaluation
+#
+if [ $NPARAM -gt 1 ]; then
+ usage "Wrong argument count ($NPARAM)"
+ exit 1
+
+elif [ $NPARAM -eq 1 ]; then
+ if [ $1 == notest ]; then
+ BUILD_TESTS=0
+ else
+ usage "Invalid argument ($1)"
+ exit 1
+ fi
+fi
+
+#
+# Move and preserve any previous versions of the various release packages
+#
+if [ -e $RELEASE_DIR ]; then
+
+ # Create archive directory if necessary
+
+ mkdir -p $ARCHIVE_DIR
+
+ #
+ # Save any older versions of the release packages
+ #
+ if [ "$(ls -A $RELEASE_DIR)" ]; then
+ echo "Moving previous packages to $ARCHIVE_DIR directory"
+
+ move_all_files_to_archive
+ echo "Completed move of previous packages to $ARCHIVE_DIR directory"
+ fi
+
+else
+ # Just create the release directory
+ mkdir -p $RELEASE_DIR
+fi
+
+# ACPICA source code (core subsystem and all tools/utilities)
+
+bash build.sh source win
+bash build.sh source unix
+bash build.sh source unix2
+
+# Optionally build the test suite packages (built by default)
+
+if [ $BUILD_TESTS -eq 1 ]; then
+
+ # ACPICA test suites (A unix2 build has not been requested by users)
+
+ bash build.sh test win
+ bash build.sh test unix
+
+else
+ echo "**** Test suites not built because the notest option was used"
+fi
+
+# ACPICA binary tools (Windows only)
+
+bash build.sh binary win
+
+echo
+echo "ACPICA - Summary of generated packages:"
+echo
+ls $RELEASE_DIR -g -G -t
diff --git a/generate/unix/acpiexec/Makefile b/generate/unix/acpiexec/Makefile
index f552f4bcad73..f8e844e3c661 100644
--- a/generate/unix/acpiexec/Makefile
+++ b/generate/unix/acpiexec/Makefile
@@ -117,12 +117,14 @@ OBJECTS = \
$(OBJDIR)/exutils.o \
$(OBJDIR)/getopt.o \
$(OBJDIR)/hwacpi.o \
+ $(OBJDIR)/hwesleep.o \
$(OBJDIR)/hwgpe.o \
$(OBJDIR)/hwpci.o \
$(OBJDIR)/hwregs.o \
$(OBJDIR)/hwsleep.o \
$(OBJDIR)/hwvalid.o \
$(OBJDIR)/hwxface.o \
+ $(OBJDIR)/hwxfsleep.o \
$(OBJDIR)/nsaccess.o \
$(OBJDIR)/nsalloc.o \
$(OBJDIR)/nsdump.o \
diff --git a/common/adfile.c b/source/common/adfile.c
index d971e6895bfd..d971e6895bfd 100644
--- a/common/adfile.c
+++ b/source/common/adfile.c
diff --git a/common/adisasm.c b/source/common/adisasm.c
index 2509ca67e948..2509ca67e948 100644
--- a/common/adisasm.c
+++ b/source/common/adisasm.c
diff --git a/common/adwalk.c b/source/common/adwalk.c
index efda35a8be23..efda35a8be23 100644
--- a/common/adwalk.c
+++ b/source/common/adwalk.c
diff --git a/common/dmextern.c b/source/common/dmextern.c
index 37c34fc5dab1..37c34fc5dab1 100644
--- a/common/dmextern.c
+++ b/source/common/dmextern.c
diff --git a/common/dmrestag.c b/source/common/dmrestag.c
index 13b3bbc3d46d..13b3bbc3d46d 100644
--- a/common/dmrestag.c
+++ b/source/common/dmrestag.c
diff --git a/common/dmtable.c b/source/common/dmtable.c
index eceef4f51bf0..eceef4f51bf0 100644
--- a/common/dmtable.c
+++ b/source/common/dmtable.c
diff --git a/common/dmtbdump.c b/source/common/dmtbdump.c
index 5ea0ea34e6ad..5ea0ea34e6ad 100644
--- a/common/dmtbdump.c
+++ b/source/common/dmtbdump.c
diff --git a/common/dmtbinfo.c b/source/common/dmtbinfo.c
index 4600a0aa53d3..4600a0aa53d3 100644
--- a/common/dmtbinfo.c
+++ b/source/common/dmtbinfo.c
diff --git a/common/getopt.c b/source/common/getopt.c
index b253e8a01d6a..b253e8a01d6a 100644
--- a/common/getopt.c
+++ b/source/common/getopt.c
diff --git a/compiler/Makefile b/source/compiler/Makefile
index 7b440ddb50ab..a63538bd0b5f 100644
--- a/compiler/Makefile
+++ b/source/compiler/Makefile
@@ -1,9 +1,8 @@
#
# iASL compiler/disassembler
#
-# NOTE: This makefile is intended to be used in the Linux environment,
-# with the Linux directory structure. It will not work directly
-# on the native ACPICA source tree.
+# NOTE: This makefile is intended to be used within the native
+# ACPICA source tree.
#
#
@@ -21,19 +20,21 @@ HOST = _LINUX
NOMAN = YES
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $<
-ACPICA_COMPONENTS =
-ACPICA_SRC = ..
-ACPICA_INCLUDE = $(ACPICA_SRC)/include
+ACPICA_SRC = ../../source
ACPICA_COMMON = $(ACPICA_SRC)/common
-ACPICA_CORE = $(ACPICA_SRC)$(ACPICA_COMPONENTS)
ACPICA_TOOLS = $(ACPICA_SRC)/tools
ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers
+ACPICA_CORE = $(ACPICA_SRC)/components
+ACPICA_INCLUDE = $(ACPICA_SRC)/include
ACPICA_DEBUGGER = $(ACPICA_CORE)/debugger
ACPICA_DISASSEMBLER = $(ACPICA_CORE)/disassembler
ACPICA_DISPATCHER = $(ACPICA_CORE)/dispatcher
+ACPICA_EVENTS = $(ACPICA_CORE)/events
ACPICA_EXECUTER = $(ACPICA_CORE)/executer
+ACPICA_HARDWARE = $(ACPICA_CORE)/hardware
ACPICA_NAMESPACE = $(ACPICA_CORE)/namespace
ACPICA_PARSER = $(ACPICA_CORE)/parser
+ACPICA_RESOURCES = $(ACPICA_CORE)/resources
ACPICA_TABLES = $(ACPICA_CORE)/tables
ACPICA_UTILITIES = $(ACPICA_CORE)/utilities
ASL_COMPILER = $(ACPICA_SRC)/compiler
diff --git a/compiler/aslanalyze.c b/source/compiler/aslanalyze.c
index 7605bf4a072a..7605bf4a072a 100644
--- a/compiler/aslanalyze.c
+++ b/source/compiler/aslanalyze.c
diff --git a/compiler/aslbtypes.c b/source/compiler/aslbtypes.c
index 85561722db54..85561722db54 100644
--- a/compiler/aslbtypes.c
+++ b/source/compiler/aslbtypes.c
diff --git a/compiler/aslcodegen.c b/source/compiler/aslcodegen.c
index 825dd194fc07..825dd194fc07 100644
--- a/compiler/aslcodegen.c
+++ b/source/compiler/aslcodegen.c
diff --git a/compiler/aslcompile.c b/source/compiler/aslcompile.c
index 8f16bf3547f2..8f16bf3547f2 100644
--- a/compiler/aslcompile.c
+++ b/source/compiler/aslcompile.c
diff --git a/compiler/aslcompiler.h b/source/compiler/aslcompiler.h
index aa69c702bba4..aa69c702bba4 100644
--- a/compiler/aslcompiler.h
+++ b/source/compiler/aslcompiler.h
diff --git a/compiler/aslcompiler.l b/source/compiler/aslcompiler.l
index 39f94bfafb3a..39f94bfafb3a 100644
--- a/compiler/aslcompiler.l
+++ b/source/compiler/aslcompiler.l
diff --git a/compiler/aslcompiler.y b/source/compiler/aslcompiler.y
index c2cb0a5dd1ac..c2cb0a5dd1ac 100644
--- a/compiler/aslcompiler.y
+++ b/source/compiler/aslcompiler.y
diff --git a/compiler/asldefine.h b/source/compiler/asldefine.h
index a83a021bfec9..a83a021bfec9 100644
--- a/compiler/asldefine.h
+++ b/source/compiler/asldefine.h
diff --git a/compiler/aslerror.c b/source/compiler/aslerror.c
index e02e234a151b..e02e234a151b 100644
--- a/compiler/aslerror.c
+++ b/source/compiler/aslerror.c
diff --git a/compiler/aslfiles.c b/source/compiler/aslfiles.c
index ada383d91c92..ada383d91c92 100644
--- a/compiler/aslfiles.c
+++ b/source/compiler/aslfiles.c
diff --git a/compiler/aslfold.c b/source/compiler/aslfold.c
index c1fd2717bbd9..c1fd2717bbd9 100644
--- a/compiler/aslfold.c
+++ b/source/compiler/aslfold.c
diff --git a/compiler/aslglobal.h b/source/compiler/aslglobal.h
index 08b4b6988f80..08b4b6988f80 100644
--- a/compiler/aslglobal.h
+++ b/source/compiler/aslglobal.h
diff --git a/compiler/asllength.c b/source/compiler/asllength.c
index ed88de9847fd..ed88de9847fd 100644
--- a/compiler/asllength.c
+++ b/source/compiler/asllength.c
diff --git a/compiler/asllisting.c b/source/compiler/asllisting.c
index c865df6d0f1d..c865df6d0f1d 100644
--- a/compiler/asllisting.c
+++ b/source/compiler/asllisting.c
diff --git a/compiler/aslload.c b/source/compiler/aslload.c
index c3a0d644f4b1..c3a0d644f4b1 100644
--- a/compiler/aslload.c
+++ b/source/compiler/aslload.c
diff --git a/compiler/asllookup.c b/source/compiler/asllookup.c
index 655f9833639a..655f9833639a 100644
--- a/compiler/asllookup.c
+++ b/source/compiler/asllookup.c
diff --git a/compiler/aslmain.c b/source/compiler/aslmain.c
index 69a0e8b8236f..69a0e8b8236f 100644
--- a/compiler/aslmain.c
+++ b/source/compiler/aslmain.c
diff --git a/compiler/aslmap.c b/source/compiler/aslmap.c
index aa8894a02291..aa8894a02291 100644
--- a/compiler/aslmap.c
+++ b/source/compiler/aslmap.c
diff --git a/compiler/aslmessages.h b/source/compiler/aslmessages.h
index f96e6f1ea554..f96e6f1ea554 100644
--- a/compiler/aslmessages.h
+++ b/source/compiler/aslmessages.h
diff --git a/compiler/aslopcodes.c b/source/compiler/aslopcodes.c
index 9f3e15d6be81..9f3e15d6be81 100644
--- a/compiler/aslopcodes.c
+++ b/source/compiler/aslopcodes.c
diff --git a/compiler/asloperands.c b/source/compiler/asloperands.c
index 37274e79d610..37274e79d610 100644
--- a/compiler/asloperands.c
+++ b/source/compiler/asloperands.c
diff --git a/compiler/aslopt.c b/source/compiler/aslopt.c
index 6942f7b5ebaf..6942f7b5ebaf 100644
--- a/compiler/aslopt.c
+++ b/source/compiler/aslopt.c
diff --git a/compiler/aslpredef.c b/source/compiler/aslpredef.c
index 8a25a9d5ca20..8a25a9d5ca20 100644
--- a/compiler/aslpredef.c
+++ b/source/compiler/aslpredef.c
diff --git a/compiler/aslresource.c b/source/compiler/aslresource.c
index 8dbbb2652f85..8dbbb2652f85 100644
--- a/compiler/aslresource.c
+++ b/source/compiler/aslresource.c
diff --git a/compiler/aslrestype1.c b/source/compiler/aslrestype1.c
index d137fe3061ff..d137fe3061ff 100644
--- a/compiler/aslrestype1.c
+++ b/source/compiler/aslrestype1.c
diff --git a/compiler/aslrestype1i.c b/source/compiler/aslrestype1i.c
index 1178fd003ddb..1178fd003ddb 100644
--- a/compiler/aslrestype1i.c
+++ b/source/compiler/aslrestype1i.c
diff --git a/compiler/aslrestype2.c b/source/compiler/aslrestype2.c
index 9c157937568b..9c157937568b 100644
--- a/compiler/aslrestype2.c
+++ b/source/compiler/aslrestype2.c
diff --git a/compiler/aslrestype2d.c b/source/compiler/aslrestype2d.c
index 8887e39028cf..8887e39028cf 100644
--- a/compiler/aslrestype2d.c
+++ b/source/compiler/aslrestype2d.c
diff --git a/compiler/aslrestype2e.c b/source/compiler/aslrestype2e.c
index 5da52914e0c2..5da52914e0c2 100644
--- a/compiler/aslrestype2e.c
+++ b/source/compiler/aslrestype2e.c
diff --git a/compiler/aslrestype2q.c b/source/compiler/aslrestype2q.c
index 473f259d216a..473f259d216a 100644
--- a/compiler/aslrestype2q.c
+++ b/source/compiler/aslrestype2q.c
diff --git a/compiler/aslrestype2s.c b/source/compiler/aslrestype2s.c
index 8b64f9b6489e..6109aa391709 100644
--- a/compiler/aslrestype2s.c
+++ b/source/compiler/aslrestype2s.c
@@ -192,7 +192,7 @@ RsGetVendorData (
UINT16 ActualLength = 0;
- /* VendorData field is always optional */
+ /* Vendor Data field is always optional */
if (InitializerOp->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG)
{
@@ -374,7 +374,7 @@ RsDoGpioIntDescriptor (
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.PinConfig));
break;
- case 4: /* DebounceTimeout [WORD] (_DBT) */
+ case 4: /* Debounce Timeout [WORD] (_DBT) */
Descriptor->Gpio.DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
RsCreateWordField (InitializerOp, ACPI_RESTAG_DEBOUNCETIME,
@@ -405,7 +405,7 @@ RsDoGpioIntDescriptor (
RsSetFlagBits16 (&Descriptor->Gpio.Flags, InitializerOp, 0, 1);
break;
- case 8: /* ResourceTag (Descriptor Name) */
+ case 8: /* Resource Tag (Descriptor Name) */
UtAttachNamepathToOwner (Op, InitializerOp);
break;
@@ -566,7 +566,7 @@ RsDoGpioIoDescriptor (
CurrentByteOffset + ASL_RESDESC_OFFSET (Gpio.PinConfig));
break;
- case 2: /* DebounceTimeout [WORD] (_DBT) */
+ case 2: /* Debounce Timeout [WORD] (_DBT) */
Descriptor->Gpio.DebounceTimeout = (UINT16) InitializerOp->Asl.Value.Integer;
RsCreateWordField (InitializerOp, ACPI_RESTAG_DEBOUNCETIME,
@@ -611,7 +611,7 @@ RsDoGpioIoDescriptor (
RsSetFlagBits16 (&Descriptor->Gpio.Flags, InitializerOp, 0, 1);
break;
- case 8: /* ResourceTag (Descriptor Name) */
+ case 8: /* Resource Tag (Descriptor Name) */
UtAttachNamepathToOwner (Op, InitializerOp);
break;
@@ -762,14 +762,14 @@ RsDoI2cSerialBusDescriptor (
CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.Flags), 0);
break;
- case 2: /* ConnectionSpeed [DWORD] (_SPE) */
+ case 2: /* Connection Speed [DWORD] (_SPE) */
Descriptor->I2cSerialBus.ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
CurrentByteOffset + ASL_RESDESC_OFFSET (I2cSerialBus.ConnectionSpeed));
break;
- case 3: /* Addresssing Mode [Flag] (_MOD) */
+ case 3: /* Addressing Mode [Flag] (_MOD) */
RsSetFlagBits16 (&Descriptor->I2cSerialBus.TypeSpecificFlags, InitializerOp, 0, 0);
RsCreateBitField (InitializerOp, ACPI_RESTAG_MODE,
@@ -800,7 +800,7 @@ RsDoI2cSerialBusDescriptor (
RsSetFlagBits (&Descriptor->I2cSerialBus.Flags, InitializerOp, 1, 1);
break;
- case 7: /* ResourceTag (Descriptor Name) */
+ case 7: /* Resource Tag (Descriptor Name) */
UtAttachNamepathToOwner (Op, InitializerOp);
break;
@@ -929,7 +929,7 @@ RsDoSpiSerialBusDescriptor (
CurrentByteOffset + ASL_RESDESC_OFFSET (SpiSerialBus.Flags), 0);
break;
- case 5: /* ConnectionSpeed [DWORD] (_SPE) */
+ case 5: /* Connection Speed [DWORD] (_SPE) */
Descriptor->SpiSerialBus.ConnectionSpeed = (UINT32) InitializerOp->Asl.Value.Integer;
RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
@@ -974,7 +974,7 @@ RsDoSpiSerialBusDescriptor (
RsSetFlagBits (&Descriptor->SpiSerialBus.Flags, InitializerOp, 1, 1);
break;
- case 11: /* ResourceTag (Descriptor Name) */
+ case 11: /* Resource Tag (Descriptor Name) */
UtAttachNamepathToOwner (Op, InitializerOp);
break;
@@ -1068,7 +1068,7 @@ RsDoUartSerialBusDescriptor (
{
switch (i)
{
- case 0: /* ConnectionSpeed (Baud Rate) [DWORD] (_SPE) */
+ case 0: /* Connection Speed (Baud Rate) [DWORD] (_SPE) */
Descriptor->UartSerialBus.DefaultBaudRate = (UINT32) InitializerOp->Asl.Value.Integer;
RsCreateDwordField (InitializerOp, ACPI_RESTAG_SPEED,
@@ -1165,7 +1165,7 @@ RsDoUartSerialBusDescriptor (
CurrentByteOffset + ASL_RESDESC_OFFSET (UartSerialBus.Flags), 0);
break;
- case 12: /* ResourceTag (Descriptor Name) */
+ case 12: /* Resource Tag (Descriptor Name) */
UtAttachNamepathToOwner (Op, InitializerOp);
break;
diff --git a/compiler/aslrestype2w.c b/source/compiler/aslrestype2w.c
index 154de2f07fb4..154de2f07fb4 100644
--- a/compiler/aslrestype2w.c
+++ b/source/compiler/aslrestype2w.c
diff --git a/compiler/aslstartup.c b/source/compiler/aslstartup.c
index cbaf06281379..cbaf06281379 100644
--- a/compiler/aslstartup.c
+++ b/source/compiler/aslstartup.c
diff --git a/compiler/aslstubs.c b/source/compiler/aslstubs.c
index 9001973709f6..cf6e410699b4 100644
--- a/compiler/aslstubs.c
+++ b/source/compiler/aslstubs.c
@@ -128,13 +128,6 @@ AcpiDsStoreObjectToLocal (
}
ACPI_STATUS
-AcpiEvDeleteGpeBlock (
- ACPI_GPE_BLOCK_INFO *GpeBlock)
-{
- return (AE_OK);
-}
-
-ACPI_STATUS
AcpiEvQueueNotifyRequest (
ACPI_NAMESPACE_NODE *Node,
UINT32 NotifyValue)
@@ -149,6 +142,14 @@ AcpiEvIsNotifyObject (
return (FALSE);
}
+#if (!ACPI_REDUCED_HARDWARE)
+ACPI_STATUS
+AcpiEvDeleteGpeBlock (
+ ACPI_GPE_BLOCK_INFO *GpeBlock)
+{
+ return (AE_OK);
+}
+
ACPI_STATUS
AcpiEvAcquireGlobalLock (
UINT16 Timeout)
@@ -162,6 +163,7 @@ AcpiEvReleaseGlobalLock (
{
return (AE_OK);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
ACPI_STATUS
AcpiEvInitializeRegion (
diff --git a/compiler/asltransform.c b/source/compiler/asltransform.c
index 4a5900f37cd0..4a5900f37cd0 100644
--- a/compiler/asltransform.c
+++ b/source/compiler/asltransform.c
diff --git a/compiler/asltree.c b/source/compiler/asltree.c
index dc6cb44b374a..dc6cb44b374a 100644
--- a/compiler/asltree.c
+++ b/source/compiler/asltree.c
diff --git a/compiler/asltypes.h b/source/compiler/asltypes.h
index 0205181d227c..0205181d227c 100644
--- a/compiler/asltypes.h
+++ b/source/compiler/asltypes.h
diff --git a/compiler/aslutils.c b/source/compiler/aslutils.c
index 4edc8c4bb8b8..4edc8c4bb8b8 100644
--- a/compiler/aslutils.c
+++ b/source/compiler/aslutils.c
diff --git a/compiler/asluuid.c b/source/compiler/asluuid.c
index bb29a79bf1b6..bb29a79bf1b6 100644
--- a/compiler/asluuid.c
+++ b/source/compiler/asluuid.c
diff --git a/compiler/aslwalks.c b/source/compiler/aslwalks.c
index d98806caa38a..d98806caa38a 100644
--- a/compiler/aslwalks.c
+++ b/source/compiler/aslwalks.c
diff --git a/compiler/dtcompile.c b/source/compiler/dtcompile.c
index 78a6d3dcb229..78a6d3dcb229 100644
--- a/compiler/dtcompile.c
+++ b/source/compiler/dtcompile.c
diff --git a/compiler/dtcompiler.h b/source/compiler/dtcompiler.h
index c47254f61e6a..c47254f61e6a 100644
--- a/compiler/dtcompiler.h
+++ b/source/compiler/dtcompiler.h
diff --git a/compiler/dtexpress.c b/source/compiler/dtexpress.c
index 9773d886c23a..9773d886c23a 100644
--- a/compiler/dtexpress.c
+++ b/source/compiler/dtexpress.c
diff --git a/compiler/dtfield.c b/source/compiler/dtfield.c
index 4f9ab612fbc5..4f9ab612fbc5 100644
--- a/compiler/dtfield.c
+++ b/source/compiler/dtfield.c
diff --git a/compiler/dtio.c b/source/compiler/dtio.c
index 0fe0f38b93d6..0fe0f38b93d6 100644
--- a/compiler/dtio.c
+++ b/source/compiler/dtio.c
diff --git a/compiler/dtparser.l b/source/compiler/dtparser.l
index 12f5efd879c9..12f5efd879c9 100644
--- a/compiler/dtparser.l
+++ b/source/compiler/dtparser.l
diff --git a/compiler/dtparser.y b/source/compiler/dtparser.y
index b931f0976d5f..b931f0976d5f 100644
--- a/compiler/dtparser.y
+++ b/source/compiler/dtparser.y
diff --git a/compiler/dtsubtable.c b/source/compiler/dtsubtable.c
index 27d09cae2ee3..27d09cae2ee3 100644
--- a/compiler/dtsubtable.c
+++ b/source/compiler/dtsubtable.c
diff --git a/compiler/dttable.c b/source/compiler/dttable.c
index d6baa5350192..d6baa5350192 100644
--- a/compiler/dttable.c
+++ b/source/compiler/dttable.c
diff --git a/compiler/dttemplate.c b/source/compiler/dttemplate.c
index 27b032fa7b48..27b032fa7b48 100644
--- a/compiler/dttemplate.c
+++ b/source/compiler/dttemplate.c
diff --git a/compiler/dttemplate.h b/source/compiler/dttemplate.h
index 4d4370452f59..4d4370452f59 100644
--- a/compiler/dttemplate.h
+++ b/source/compiler/dttemplate.h
diff --git a/compiler/dtutils.c b/source/compiler/dtutils.c
index 45bc4ff0c6cf..45bc4ff0c6cf 100644
--- a/compiler/dtutils.c
+++ b/source/compiler/dtutils.c
diff --git a/compiler/readme.txt b/source/compiler/readme.txt
index fceea472e57d..fceea472e57d 100644
--- a/compiler/readme.txt
+++ b/source/compiler/readme.txt
diff --git a/debugger/dbcmds.c b/source/components/debugger/dbcmds.c
index aae8eacd7028..cf214a161c07 100644
--- a/debugger/dbcmds.c
+++ b/source/components/debugger/dbcmds.c
@@ -161,28 +161,49 @@ AcpiDbSleep (
UINT8 SleepState;
+ ACPI_FUNCTION_TRACE (AcpiDbSleep);
+
+
SleepState = (UINT8) ACPI_STRTOUL (ObjectArg, NULL, 0);
AcpiOsPrintf ("**** Prepare to sleep ****\n");
Status = AcpiEnterSleepStatePrep (SleepState);
if (ACPI_FAILURE (Status))
{
- return (Status);
+ goto ErrorExit;
}
AcpiOsPrintf ("**** Going to sleep ****\n");
Status = AcpiEnterSleepState (SleepState);
if (ACPI_FAILURE (Status))
{
- return (Status);
+ goto ErrorExit;
+ }
+
+ AcpiOsPrintf ("**** Prepare to return from sleep ****\n");
+ Status = AcpiLeaveSleepStatePrep (SleepState);
+ if (ACPI_FAILURE (Status))
+ {
+ goto ErrorExit;
}
- AcpiOsPrintf ("**** returning from sleep ****\n");
+ AcpiOsPrintf ("**** Returning from sleep ****\n");
Status = AcpiLeaveSleepState (SleepState);
+ if (ACPI_FAILURE (Status))
+ {
+ goto ErrorExit;
+ }
+
+ return (Status);
+
+ErrorExit:
+
+ ACPI_EXCEPTION ((AE_INFO, Status, "During sleep test"));
return (Status);
}
+
/*******************************************************************************
*
* FUNCTION: AcpiDbDisplayLocks
@@ -1019,6 +1040,7 @@ AcpiDbDisplayResources (
}
+#if (!ACPI_REDUCED_HARDWARE)
/*******************************************************************************
*
* FUNCTION: AcpiDbGenerateGpe
@@ -1057,5 +1079,6 @@ AcpiDbGenerateGpe (
(void) AcpiEvGpeDispatch (NULL, GpeEventInfo, GpeNumber);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
#endif /* ACPI_DEBUGGER */
diff --git a/debugger/dbdisply.c b/source/components/debugger/dbdisply.c
index 96ec26f56b33..fa943e7fa996 100644
--- a/debugger/dbdisply.c
+++ b/source/components/debugger/dbdisply.c
@@ -770,6 +770,7 @@ AcpiDbDisplayArgumentObject (
}
+#if (!ACPI_REDUCED_HARDWARE)
/*******************************************************************************
*
* FUNCTION: AcpiDbDisplayGpes
@@ -932,6 +933,7 @@ AcpiDbDisplayGpes (
GpeXruptInfo = GpeXruptInfo->Next;
}
}
+#endif /* !ACPI_REDUCED_HARDWARE */
/*******************************************************************************
@@ -1011,6 +1013,8 @@ AcpiDbDisplayHandlers (
}
}
+#if (!ACPI_REDUCED_HARDWARE)
+
/* Fixed event handlers */
AcpiOsPrintf ("\nFixed Event Handlers:\n");
@@ -1029,6 +1033,8 @@ AcpiDbDisplayHandlers (
}
}
+#endif /* !ACPI_REDUCED_HARDWARE */
+
/* Miscellaneous global handlers */
AcpiOsPrintf ("\nMiscellaneous Global Handlers:\n");
diff --git a/debugger/dbexec.c b/source/components/debugger/dbexec.c
index 7818c9ddbef8..7818c9ddbef8 100644
--- a/debugger/dbexec.c
+++ b/source/components/debugger/dbexec.c
diff --git a/debugger/dbfileio.c b/source/components/debugger/dbfileio.c
index ef9b7fef5379..ef9b7fef5379 100644
--- a/debugger/dbfileio.c
+++ b/source/components/debugger/dbfileio.c
diff --git a/debugger/dbhistry.c b/source/components/debugger/dbhistry.c
index 536b69cdfaab..536b69cdfaab 100644
--- a/debugger/dbhistry.c
+++ b/source/components/debugger/dbhistry.c
diff --git a/debugger/dbinput.c b/source/components/debugger/dbinput.c
index 515db7340c18..0ae313934b40 100644
--- a/debugger/dbinput.c
+++ b/source/components/debugger/dbinput.c
@@ -662,12 +662,15 @@ AcpiDbCommandDispatch (
break;
case CMD_ENABLEACPI:
+#if (!ACPI_REDUCED_HARDWARE)
+
Status = AcpiEnable();
if (ACPI_FAILURE(Status))
{
AcpiOsPrintf("AcpiEnable failed (Status=%X)\n", Status);
return (Status);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
break;
case CMD_EVENT:
diff --git a/debugger/dbmethod.c b/source/components/debugger/dbmethod.c
index 0d45d68150b4..0d45d68150b4 100644
--- a/debugger/dbmethod.c
+++ b/source/components/debugger/dbmethod.c
diff --git a/debugger/dbnames.c b/source/components/debugger/dbnames.c
index be326c5390a7..be326c5390a7 100644
--- a/debugger/dbnames.c
+++ b/source/components/debugger/dbnames.c
diff --git a/debugger/dbstats.c b/source/components/debugger/dbstats.c
index 379493515a61..379493515a61 100644
--- a/debugger/dbstats.c
+++ b/source/components/debugger/dbstats.c
diff --git a/debugger/dbutils.c b/source/components/debugger/dbutils.c
index c44ff2efa906..c44ff2efa906 100644
--- a/debugger/dbutils.c
+++ b/source/components/debugger/dbutils.c
diff --git a/debugger/dbxface.c b/source/components/debugger/dbxface.c
index cd3027343459..cd3027343459 100644
--- a/debugger/dbxface.c
+++ b/source/components/debugger/dbxface.c
diff --git a/disassembler/dmbuffer.c b/source/components/disassembler/dmbuffer.c
index 9f49f92e4743..9f49f92e4743 100644
--- a/disassembler/dmbuffer.c
+++ b/source/components/disassembler/dmbuffer.c
diff --git a/disassembler/dmnames.c b/source/components/disassembler/dmnames.c
index 92e67c2e0a8c..92e67c2e0a8c 100644
--- a/disassembler/dmnames.c
+++ b/source/components/disassembler/dmnames.c
diff --git a/disassembler/dmobject.c b/source/components/disassembler/dmobject.c
index cb515e94279d..cb515e94279d 100644
--- a/disassembler/dmobject.c
+++ b/source/components/disassembler/dmobject.c
diff --git a/disassembler/dmopcode.c b/source/components/disassembler/dmopcode.c
index 6d2c3e1ecf55..6d2c3e1ecf55 100644
--- a/disassembler/dmopcode.c
+++ b/source/components/disassembler/dmopcode.c
diff --git a/disassembler/dmresrc.c b/source/components/disassembler/dmresrc.c
index 9c07bf7e9462..9c07bf7e9462 100644
--- a/disassembler/dmresrc.c
+++ b/source/components/disassembler/dmresrc.c
diff --git a/disassembler/dmresrcl.c b/source/components/disassembler/dmresrcl.c
index ed78b31c707b..ed78b31c707b 100644
--- a/disassembler/dmresrcl.c
+++ b/source/components/disassembler/dmresrcl.c
diff --git a/disassembler/dmresrcl2.c b/source/components/disassembler/dmresrcl2.c
index b251ced2ba7f..e79307ee72d0 100644
--- a/disassembler/dmresrcl2.c
+++ b/source/components/disassembler/dmresrcl2.c
@@ -503,7 +503,7 @@ AcpiDmI2cSerialBusDescriptor (
AcpiOsPrintf ("0x%2.2X, ", Resource->I2cSerialBus.ResSourceIndex);
AcpiOsPrintf ("%s, ",
- AcpiGbl_ConsumeDecode [(Resource->I2cSerialBus.Flags & 1)]);
+ AcpiGbl_ConsumeDecode [(Resource->I2cSerialBus.Flags >> 1) & 1]);
/* Insert a descriptor name */
@@ -578,7 +578,7 @@ AcpiDmSpiSerialBusDescriptor (
AcpiOsPrintf ("0x%2.2X, ", Resource->SpiSerialBus.ResSourceIndex);
AcpiOsPrintf ("%s, ",
- AcpiGbl_ConsumeDecode [(Resource->SpiSerialBus.Flags & 1)]);
+ AcpiGbl_ConsumeDecode [(Resource->SpiSerialBus.Flags >> 1) & 1]);
/* Insert a descriptor name */
@@ -656,7 +656,7 @@ AcpiDmUartSerialBusDescriptor (
AcpiOsPrintf ("0x%2.2X, ", Resource->UartSerialBus.ResSourceIndex);
AcpiOsPrintf ("%s, ",
- AcpiGbl_ConsumeDecode [(Resource->UartSerialBus.Flags & 1)]);
+ AcpiGbl_ConsumeDecode [(Resource->UartSerialBus.Flags >> 1) & 1]);
/* Insert a descriptor name */
diff --git a/disassembler/dmresrcs.c b/source/components/disassembler/dmresrcs.c
index 32759d991bb5..32759d991bb5 100644
--- a/disassembler/dmresrcs.c
+++ b/source/components/disassembler/dmresrcs.c
diff --git a/disassembler/dmutils.c b/source/components/disassembler/dmutils.c
index ce3443ec3fc1..ce3443ec3fc1 100644
--- a/disassembler/dmutils.c
+++ b/source/components/disassembler/dmutils.c
diff --git a/disassembler/dmwalk.c b/source/components/disassembler/dmwalk.c
index dd3ee002557b..dd3ee002557b 100644
--- a/disassembler/dmwalk.c
+++ b/source/components/disassembler/dmwalk.c
diff --git a/dispatcher/dsargs.c b/source/components/dispatcher/dsargs.c
index ea0d7bee88f7..ea0d7bee88f7 100644
--- a/dispatcher/dsargs.c
+++ b/source/components/dispatcher/dsargs.c
diff --git a/dispatcher/dscontrol.c b/source/components/dispatcher/dscontrol.c
index 5c5c51a573e6..5c5c51a573e6 100644
--- a/dispatcher/dscontrol.c
+++ b/source/components/dispatcher/dscontrol.c
diff --git a/dispatcher/dsfield.c b/source/components/dispatcher/dsfield.c
index 1c3c523720cf..1c3c523720cf 100644
--- a/dispatcher/dsfield.c
+++ b/source/components/dispatcher/dsfield.c
diff --git a/dispatcher/dsinit.c b/source/components/dispatcher/dsinit.c
index 1c7ad8849258..1c7ad8849258 100644
--- a/dispatcher/dsinit.c
+++ b/source/components/dispatcher/dsinit.c
diff --git a/dispatcher/dsmethod.c b/source/components/dispatcher/dsmethod.c
index 670382ac9bfb..670382ac9bfb 100644
--- a/dispatcher/dsmethod.c
+++ b/source/components/dispatcher/dsmethod.c
diff --git a/dispatcher/dsmthdat.c b/source/components/dispatcher/dsmthdat.c
index b4509e771021..b4509e771021 100644
--- a/dispatcher/dsmthdat.c
+++ b/source/components/dispatcher/dsmthdat.c
diff --git a/dispatcher/dsobject.c b/source/components/dispatcher/dsobject.c
index b3567766a2db..b3567766a2db 100644
--- a/dispatcher/dsobject.c
+++ b/source/components/dispatcher/dsobject.c
diff --git a/dispatcher/dsopcode.c b/source/components/dispatcher/dsopcode.c
index 7569236f2ebe..7569236f2ebe 100644
--- a/dispatcher/dsopcode.c
+++ b/source/components/dispatcher/dsopcode.c
diff --git a/dispatcher/dsutils.c b/source/components/dispatcher/dsutils.c
index 66431aad5316..66431aad5316 100644
--- a/dispatcher/dsutils.c
+++ b/source/components/dispatcher/dsutils.c
diff --git a/dispatcher/dswexec.c b/source/components/dispatcher/dswexec.c
index 5732855bbeee..5732855bbeee 100644
--- a/dispatcher/dswexec.c
+++ b/source/components/dispatcher/dswexec.c
diff --git a/dispatcher/dswload.c b/source/components/dispatcher/dswload.c
index d40f911f417c..d40f911f417c 100644
--- a/dispatcher/dswload.c
+++ b/source/components/dispatcher/dswload.c
diff --git a/dispatcher/dswload2.c b/source/components/dispatcher/dswload2.c
index 27e317620911..27e317620911 100644
--- a/dispatcher/dswload2.c
+++ b/source/components/dispatcher/dswload2.c
diff --git a/dispatcher/dswscope.c b/source/components/dispatcher/dswscope.c
index a59fdc9dca5c..a59fdc9dca5c 100644
--- a/dispatcher/dswscope.c
+++ b/source/components/dispatcher/dswscope.c
diff --git a/dispatcher/dswstate.c b/source/components/dispatcher/dswstate.c
index dd11a1813029..dd11a1813029 100644
--- a/dispatcher/dswstate.c
+++ b/source/components/dispatcher/dswstate.c
diff --git a/events/evevent.c b/source/components/events/evevent.c
index 0a2baef54c4b..b5a7acde7293 100644
--- a/events/evevent.c
+++ b/source/components/events/evevent.c
@@ -48,6 +48,8 @@
#define _COMPONENT ACPI_EVENTS
ACPI_MODULE_NAME ("evevent")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
+
/* Local prototypes */
static ACPI_STATUS
@@ -329,4 +331,6 @@ AcpiEvFixedEventDispatch (
AcpiGbl_FixedEventHandlers[Event].Context));
}
+#endif /* !ACPI_REDUCED_HARDWARE */
+
diff --git a/events/evglock.c b/source/components/events/evglock.c
index 9b3a8c78dd3f..f40d1295086c 100644
--- a/events/evglock.c
+++ b/source/components/events/evglock.c
@@ -49,6 +49,7 @@
#define _COMPONENT ACPI_EVENTS
ACPI_MODULE_NAME ("evglock")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
/* Local prototypes */
@@ -372,3 +373,5 @@ AcpiEvReleaseGlobalLock (
AcpiOsReleaseMutex (AcpiGbl_GlobalLockMutex->Mutex.OsMutex);
return_ACPI_STATUS (Status);
}
+
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/events/evgpe.c b/source/components/events/evgpe.c
index 9cdecbc6d27e..a3781a55c66b 100644
--- a/events/evgpe.c
+++ b/source/components/events/evgpe.c
@@ -49,6 +49,8 @@
#define _COMPONENT ACPI_EVENTS
ACPI_MODULE_NAME ("evgpe")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
+
/* Local prototypes */
static void ACPI_SYSTEM_XFACE
@@ -826,3 +828,4 @@ AcpiEvGpeDispatch (
return_UINT32 (ACPI_INTERRUPT_HANDLED);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/events/evgpeblk.c b/source/components/events/evgpeblk.c
index ef9458cfdb2a..c281855c2c8d 100644
--- a/events/evgpeblk.c
+++ b/source/components/events/evgpeblk.c
@@ -49,6 +49,8 @@
#define _COMPONENT ACPI_EVENTS
ACPI_MODULE_NAME ("evgpeblk")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
+
/* Local prototypes */
static ACPI_STATUS
@@ -545,3 +547,4 @@ AcpiEvInitializeGpeBlock (
return_ACPI_STATUS (AE_OK);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/events/evgpeinit.c b/source/components/events/evgpeinit.c
index 37942643bfaf..f8962e947f27 100644
--- a/events/evgpeinit.c
+++ b/source/components/events/evgpeinit.c
@@ -50,6 +50,7 @@
#define _COMPONENT ACPI_EVENTS
ACPI_MODULE_NAME ("evgpeinit")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
/*
* Note: History of _PRW support in ACPICA
@@ -457,3 +458,5 @@ AcpiEvMatchGpeMethod (
Name, GpeNumber));
return_ACPI_STATUS (AE_OK);
}
+
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/events/evgpeutil.c b/source/components/events/evgpeutil.c
index 73e3015c7999..70580cd853c9 100644
--- a/events/evgpeutil.c
+++ b/source/components/events/evgpeutil.c
@@ -41,7 +41,6 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-
#include "acpi.h"
#include "accommon.h"
#include "acevents.h"
@@ -50,6 +49,7 @@
ACPI_MODULE_NAME ("evgpeutil")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
/*******************************************************************************
*
* FUNCTION: AcpiEvWalkGpeList
@@ -422,3 +422,4 @@ AcpiEvDeleteGpeHandlers (
return_ACPI_STATUS (AE_OK);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/events/evmisc.c b/source/components/events/evmisc.c
index dbd7a16fad9c..69a90870add8 100644
--- a/events/evmisc.c
+++ b/source/components/events/evmisc.c
@@ -120,27 +120,29 @@ AcpiEvQueueNotifyRequest (
/*
- * For value 3 (Ejection Request), some device method may need to be run.
- * For value 2 (Device Wake) if _PRW exists, the _PS0 method may need
- * to be run.
+ * For value 0x03 (Ejection Request), may need to run a device method.
+ * For value 0x02 (Device Wake), if _PRW exists, may need to run
+ * the _PS0 method.
* For value 0x80 (Status Change) on the power button or sleep button,
- * initiate soft-off or sleep operation?
+ * initiate soft-off or sleep operation.
+ *
+ * For all cases, simply dispatch the notify to the handler.
*/
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "Dispatching Notify on [%4.4s] Node %p Value 0x%2.2X (%s)\n",
- AcpiUtGetNodeName (Node), Node, NotifyValue,
- AcpiUtGetNotifyName (NotifyValue)));
+ "Dispatching Notify on [%4.4s] (%s) Value 0x%2.2X (%s) Node %p\n",
+ AcpiUtGetNodeName (Node), AcpiUtGetTypeName (Node->Type),
+ NotifyValue, AcpiUtGetNotifyName (NotifyValue), Node));
/* Get the notify object attached to the NS Node */
ObjDesc = AcpiNsGetAttachedObject (Node);
if (ObjDesc)
{
- /* We have the notify object, Get the right handler */
+ /* We have the notify object, Get the correct handler */
switch (Node->Type)
{
- /* Notify allowed only on these types */
+ /* Notify is allowed only on these types */
case ACPI_TYPE_DEVICE:
case ACPI_TYPE_THERMAL:
@@ -165,7 +167,7 @@ AcpiEvQueueNotifyRequest (
}
/*
- * If there is any handler to run, schedule the dispatcher.
+ * If there is a handler to run, schedule the dispatcher.
* Check for:
* 1) Global system notify handler
* 2) Global device notify handler
@@ -291,6 +293,7 @@ AcpiEvNotifyDispatch (
}
+#if (!ACPI_REDUCED_HARDWARE)
/******************************************************************************
*
* FUNCTION: AcpiEvTerminate
@@ -370,3 +373,5 @@ AcpiEvTerminate (
}
return_VOID;
}
+
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/events/evregion.c b/source/components/events/evregion.c
index 8c1a8ebbae12..8c1a8ebbae12 100644
--- a/events/evregion.c
+++ b/source/components/events/evregion.c
diff --git a/events/evrgnini.c b/source/components/events/evrgnini.c
index 92946b5aaafa..92946b5aaafa 100644
--- a/events/evrgnini.c
+++ b/source/components/events/evrgnini.c
diff --git a/events/evsci.c b/source/components/events/evsci.c
index 35b4aec86a36..c47cccc8db15 100644
--- a/events/evsci.c
+++ b/source/components/events/evsci.c
@@ -50,6 +50,8 @@
#define _COMPONENT ACPI_EVENTS
ACPI_MODULE_NAME ("evsci")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
+
/* Local prototypes */
static UINT32 ACPI_SYSTEM_XFACE
@@ -204,4 +206,4 @@ AcpiEvRemoveSciHandler (
return_ACPI_STATUS (Status);
}
-
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/events/evxface.c b/source/components/events/evxface.c
index a018e85d03e8..cc558f7d449f 100644
--- a/events/evxface.c
+++ b/source/components/events/evxface.c
@@ -56,257 +56,6 @@
/*******************************************************************************
*
- * FUNCTION: AcpiInstallExceptionHandler
- *
- * PARAMETERS: Handler - Pointer to the handler function for the
- * event
- *
- * RETURN: Status
- *
- * DESCRIPTION: Saves the pointer to the handler function
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiInstallExceptionHandler (
- ACPI_EXCEPTION_HANDLER Handler)
-{
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_TRACE (AcpiInstallExceptionHandler);
-
-
- Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- /* Don't allow two handlers. */
-
- if (AcpiGbl_ExceptionHandler)
- {
- Status = AE_ALREADY_EXISTS;
- goto Cleanup;
- }
-
- /* Install the handler */
-
- AcpiGbl_ExceptionHandler = Handler;
-
-Cleanup:
- (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
- return_ACPI_STATUS (Status);
-}
-
-ACPI_EXPORT_SYMBOL (AcpiInstallExceptionHandler)
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiInstallGlobalEventHandler
- *
- * PARAMETERS: Handler - Pointer to the global event handler function
- * Context - Value passed to the handler on each event
- *
- * RETURN: Status
- *
- * DESCRIPTION: Saves the pointer to the handler function. The global handler
- * is invoked upon each incoming GPE and Fixed Event. It is
- * invoked at interrupt level at the time of the event dispatch.
- * Can be used to update event counters, etc.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiInstallGlobalEventHandler (
- ACPI_GBL_EVENT_HANDLER Handler,
- void *Context)
-{
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_TRACE (AcpiInstallGlobalEventHandler);
-
-
- /* Parameter validation */
-
- if (!Handler)
- {
- return_ACPI_STATUS (AE_BAD_PARAMETER);
- }
-
- Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- /* Don't allow two handlers. */
-
- if (AcpiGbl_GlobalEventHandler)
- {
- Status = AE_ALREADY_EXISTS;
- goto Cleanup;
- }
-
- AcpiGbl_GlobalEventHandler = Handler;
- AcpiGbl_GlobalEventHandlerContext = Context;
-
-
-Cleanup:
- (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
- return_ACPI_STATUS (Status);
-}
-
-ACPI_EXPORT_SYMBOL (AcpiInstallGlobalEventHandler)
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiInstallFixedEventHandler
- *
- * PARAMETERS: Event - Event type to enable.
- * Handler - Pointer to the handler function for the
- * event
- * Context - Value passed to the handler on each GPE
- *
- * RETURN: Status
- *
- * DESCRIPTION: Saves the pointer to the handler function and then enables the
- * event.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiInstallFixedEventHandler (
- UINT32 Event,
- ACPI_EVENT_HANDLER Handler,
- void *Context)
-{
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_TRACE (AcpiInstallFixedEventHandler);
-
-
- /* Parameter validation */
-
- if (Event > ACPI_EVENT_MAX)
- {
- return_ACPI_STATUS (AE_BAD_PARAMETER);
- }
-
- Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- /* Don't allow two handlers. */
-
- if (NULL != AcpiGbl_FixedEventHandlers[Event].Handler)
- {
- Status = AE_ALREADY_EXISTS;
- goto Cleanup;
- }
-
- /* Install the handler before enabling the event */
-
- AcpiGbl_FixedEventHandlers[Event].Handler = Handler;
- AcpiGbl_FixedEventHandlers[Event].Context = Context;
-
- Status = AcpiEnableEvent (Event, 0);
- if (ACPI_FAILURE (Status))
- {
- ACPI_WARNING ((AE_INFO, "Could not enable fixed event 0x%X", Event));
-
- /* Remove the handler */
-
- AcpiGbl_FixedEventHandlers[Event].Handler = NULL;
- AcpiGbl_FixedEventHandlers[Event].Context = NULL;
- }
- else
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "Enabled fixed event %X, Handler=%p\n", Event, Handler));
- }
-
-
-Cleanup:
- (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
- return_ACPI_STATUS (Status);
-}
-
-ACPI_EXPORT_SYMBOL (AcpiInstallFixedEventHandler)
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiRemoveFixedEventHandler
- *
- * PARAMETERS: Event - Event type to disable.
- * Handler - Address of the handler
- *
- * RETURN: Status
- *
- * DESCRIPTION: Disables the event and unregisters the event handler.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiRemoveFixedEventHandler (
- UINT32 Event,
- ACPI_EVENT_HANDLER Handler)
-{
- ACPI_STATUS Status = AE_OK;
-
-
- ACPI_FUNCTION_TRACE (AcpiRemoveFixedEventHandler);
-
-
- /* Parameter validation */
-
- if (Event > ACPI_EVENT_MAX)
- {
- return_ACPI_STATUS (AE_BAD_PARAMETER);
- }
-
- Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- /* Disable the event before removing the handler */
-
- Status = AcpiDisableEvent (Event, 0);
-
- /* Always Remove the handler */
-
- AcpiGbl_FixedEventHandlers[Event].Handler = NULL;
- AcpiGbl_FixedEventHandlers[Event].Context = NULL;
-
- if (ACPI_FAILURE (Status))
- {
- ACPI_WARNING ((AE_INFO,
- "Could not write to fixed event enable register 0x%X", Event));
- }
- else
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Disabled fixed event %X\n", Event));
- }
-
- (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
- return_ACPI_STATUS (Status);
-}
-
-ACPI_EXPORT_SYMBOL (AcpiRemoveFixedEventHandler)
-
-
-/*******************************************************************************
- *
* FUNCTION: AcpiInstallNotifyHandler
*
* PARAMETERS: Device - The device for which notifies will be handled
@@ -658,6 +407,258 @@ ACPI_EXPORT_SYMBOL (AcpiRemoveNotifyHandler)
/*******************************************************************************
*
+ * FUNCTION: AcpiInstallExceptionHandler
+ *
+ * PARAMETERS: Handler - Pointer to the handler function for the
+ * event
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Saves the pointer to the handler function
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiInstallExceptionHandler (
+ ACPI_EXCEPTION_HANDLER Handler)
+{
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (AcpiInstallExceptionHandler);
+
+
+ Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ /* Don't allow two handlers. */
+
+ if (AcpiGbl_ExceptionHandler)
+ {
+ Status = AE_ALREADY_EXISTS;
+ goto Cleanup;
+ }
+
+ /* Install the handler */
+
+ AcpiGbl_ExceptionHandler = Handler;
+
+Cleanup:
+ (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
+ return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiInstallExceptionHandler)
+
+
+#if (!ACPI_REDUCED_HARDWARE)
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiInstallGlobalEventHandler
+ *
+ * PARAMETERS: Handler - Pointer to the global event handler function
+ * Context - Value passed to the handler on each event
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Saves the pointer to the handler function. The global handler
+ * is invoked upon each incoming GPE and Fixed Event. It is
+ * invoked at interrupt level at the time of the event dispatch.
+ * Can be used to update event counters, etc.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiInstallGlobalEventHandler (
+ ACPI_GBL_EVENT_HANDLER Handler,
+ void *Context)
+{
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (AcpiInstallGlobalEventHandler);
+
+
+ /* Parameter validation */
+
+ if (!Handler)
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
+
+ Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ /* Don't allow two handlers. */
+
+ if (AcpiGbl_GlobalEventHandler)
+ {
+ Status = AE_ALREADY_EXISTS;
+ goto Cleanup;
+ }
+
+ AcpiGbl_GlobalEventHandler = Handler;
+ AcpiGbl_GlobalEventHandlerContext = Context;
+
+
+Cleanup:
+ (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
+ return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiInstallGlobalEventHandler)
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiInstallFixedEventHandler
+ *
+ * PARAMETERS: Event - Event type to enable.
+ * Handler - Pointer to the handler function for the
+ * event
+ * Context - Value passed to the handler on each GPE
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Saves the pointer to the handler function and then enables the
+ * event.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiInstallFixedEventHandler (
+ UINT32 Event,
+ ACPI_EVENT_HANDLER Handler,
+ void *Context)
+{
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (AcpiInstallFixedEventHandler);
+
+
+ /* Parameter validation */
+
+ if (Event > ACPI_EVENT_MAX)
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
+
+ Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ /* Don't allow two handlers. */
+
+ if (NULL != AcpiGbl_FixedEventHandlers[Event].Handler)
+ {
+ Status = AE_ALREADY_EXISTS;
+ goto Cleanup;
+ }
+
+ /* Install the handler before enabling the event */
+
+ AcpiGbl_FixedEventHandlers[Event].Handler = Handler;
+ AcpiGbl_FixedEventHandlers[Event].Context = Context;
+
+ Status = AcpiEnableEvent (Event, 0);
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_WARNING ((AE_INFO, "Could not enable fixed event 0x%X", Event));
+
+ /* Remove the handler */
+
+ AcpiGbl_FixedEventHandlers[Event].Handler = NULL;
+ AcpiGbl_FixedEventHandlers[Event].Context = NULL;
+ }
+ else
+ {
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+ "Enabled fixed event %X, Handler=%p\n", Event, Handler));
+ }
+
+
+Cleanup:
+ (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
+ return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiInstallFixedEventHandler)
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiRemoveFixedEventHandler
+ *
+ * PARAMETERS: Event - Event type to disable.
+ * Handler - Address of the handler
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Disables the event and unregisters the event handler.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiRemoveFixedEventHandler (
+ UINT32 Event,
+ ACPI_EVENT_HANDLER Handler)
+{
+ ACPI_STATUS Status = AE_OK;
+
+
+ ACPI_FUNCTION_TRACE (AcpiRemoveFixedEventHandler);
+
+
+ /* Parameter validation */
+
+ if (Event > ACPI_EVENT_MAX)
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
+
+ Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ /* Disable the event before removing the handler */
+
+ Status = AcpiDisableEvent (Event, 0);
+
+ /* Always Remove the handler */
+
+ AcpiGbl_FixedEventHandlers[Event].Handler = NULL;
+ AcpiGbl_FixedEventHandlers[Event].Context = NULL;
+
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_WARNING ((AE_INFO,
+ "Could not write to fixed event enable register 0x%X", Event));
+ }
+ else
+ {
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Disabled fixed event %X\n", Event));
+ }
+
+ (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
+ return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiRemoveFixedEventHandler)
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiInstallGpeHandler
*
* PARAMETERS: GpeDevice - Namespace node for the GPE (NULL for FADT
@@ -975,3 +976,4 @@ AcpiReleaseGlobalLock (
ACPI_EXPORT_SYMBOL (AcpiReleaseGlobalLock)
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/events/evxfevnt.c b/source/components/events/evxfevnt.c
index 119d4f1601d9..254214af1927 100644
--- a/events/evxfevnt.c
+++ b/source/components/events/evxfevnt.c
@@ -52,6 +52,7 @@
ACPI_MODULE_NAME ("evxfevnt")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
/*******************************************************************************
*
* FUNCTION: AcpiEnable
@@ -377,4 +378,4 @@ AcpiGetEventStatus (
ACPI_EXPORT_SYMBOL (AcpiGetEventStatus)
-
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/events/evxfgpe.c b/source/components/events/evxfgpe.c
index b1109cd9f131..c0dd88c77752 100644
--- a/events/evxfgpe.c
+++ b/source/components/events/evxfgpe.c
@@ -53,6 +53,7 @@
ACPI_MODULE_NAME ("evxfgpe")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
/*******************************************************************************
*
* FUNCTION: AcpiUpdateAllGpes
@@ -898,3 +899,5 @@ AcpiGetGpeDevice (
}
ACPI_EXPORT_SYMBOL (AcpiGetGpeDevice)
+
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/events/evxfregn.c b/source/components/events/evxfregn.c
index 493df9217de1..493df9217de1 100644
--- a/events/evxfregn.c
+++ b/source/components/events/evxfregn.c
diff --git a/executer/exconfig.c b/source/components/executer/exconfig.c
index 9e05497b9f56..9e05497b9f56 100644
--- a/executer/exconfig.c
+++ b/source/components/executer/exconfig.c
diff --git a/executer/exconvrt.c b/source/components/executer/exconvrt.c
index e79cbc96e975..e79cbc96e975 100644
--- a/executer/exconvrt.c
+++ b/source/components/executer/exconvrt.c
diff --git a/executer/excreate.c b/source/components/executer/excreate.c
index 888ff7d7c4ad..888ff7d7c4ad 100644
--- a/executer/excreate.c
+++ b/source/components/executer/excreate.c
diff --git a/executer/exdebug.c b/source/components/executer/exdebug.c
index 166b2af170ff..166b2af170ff 100644
--- a/executer/exdebug.c
+++ b/source/components/executer/exdebug.c
diff --git a/executer/exdump.c b/source/components/executer/exdump.c
index 4b49ceca09e7..4b49ceca09e7 100644
--- a/executer/exdump.c
+++ b/source/components/executer/exdump.c
diff --git a/executer/exfield.c b/source/components/executer/exfield.c
index a68240682607..a68240682607 100644
--- a/executer/exfield.c
+++ b/source/components/executer/exfield.c
diff --git a/executer/exfldio.c b/source/components/executer/exfldio.c
index 68131e10e774..e138e9a13ce4 100644
--- a/executer/exfldio.c
+++ b/source/components/executer/exfldio.c
@@ -350,8 +350,6 @@ AcpiExRegisterOverflow (
ACPI_OPERAND_OBJECT *ObjDesc,
UINT64 Value)
{
- ACPI_FUNCTION_NAME (ExRegisterOverflow);
-
if (ObjDesc->CommonField.BitLength >= ACPI_INTEGER_BIT_SIZE)
{
diff --git a/executer/exmisc.c b/source/components/executer/exmisc.c
index 63114f5584d6..63114f5584d6 100644
--- a/executer/exmisc.c
+++ b/source/components/executer/exmisc.c
diff --git a/executer/exmutex.c b/source/components/executer/exmutex.c
index 4c702b8baa6d..4c702b8baa6d 100644
--- a/executer/exmutex.c
+++ b/source/components/executer/exmutex.c
diff --git a/executer/exnames.c b/source/components/executer/exnames.c
index c3cb6b0b4cad..c3cb6b0b4cad 100644
--- a/executer/exnames.c
+++ b/source/components/executer/exnames.c
diff --git a/executer/exoparg1.c b/source/components/executer/exoparg1.c
index 9a6cd9fcab75..9a6cd9fcab75 100644
--- a/executer/exoparg1.c
+++ b/source/components/executer/exoparg1.c
diff --git a/executer/exoparg2.c b/source/components/executer/exoparg2.c
index b76da75c49d4..b76da75c49d4 100644
--- a/executer/exoparg2.c
+++ b/source/components/executer/exoparg2.c
diff --git a/executer/exoparg3.c b/source/components/executer/exoparg3.c
index 0edac68e60ab..0edac68e60ab 100644
--- a/executer/exoparg3.c
+++ b/source/components/executer/exoparg3.c
diff --git a/executer/exoparg6.c b/source/components/executer/exoparg6.c
index bfc6585301f6..bfc6585301f6 100644
--- a/executer/exoparg6.c
+++ b/source/components/executer/exoparg6.c
diff --git a/executer/exprep.c b/source/components/executer/exprep.c
index 9ec78275bd6f..9ec78275bd6f 100644
--- a/executer/exprep.c
+++ b/source/components/executer/exprep.c
diff --git a/executer/exregion.c b/source/components/executer/exregion.c
index 8a40250794e7..8a40250794e7 100644
--- a/executer/exregion.c
+++ b/source/components/executer/exregion.c
diff --git a/executer/exresnte.c b/source/components/executer/exresnte.c
index 03962edf9705..03962edf9705 100644
--- a/executer/exresnte.c
+++ b/source/components/executer/exresnte.c
diff --git a/executer/exresolv.c b/source/components/executer/exresolv.c
index e92fb2468e77..e92fb2468e77 100644
--- a/executer/exresolv.c
+++ b/source/components/executer/exresolv.c
diff --git a/executer/exresop.c b/source/components/executer/exresop.c
index 1bcba690333b..1bcba690333b 100644
--- a/executer/exresop.c
+++ b/source/components/executer/exresop.c
diff --git a/executer/exstore.c b/source/components/executer/exstore.c
index 656b64947862..656b64947862 100644
--- a/executer/exstore.c
+++ b/source/components/executer/exstore.c
diff --git a/executer/exstoren.c b/source/components/executer/exstoren.c
index 464d6b106504..464d6b106504 100644
--- a/executer/exstoren.c
+++ b/source/components/executer/exstoren.c
diff --git a/executer/exstorob.c b/source/components/executer/exstorob.c
index e74d5b3485fc..e74d5b3485fc 100644
--- a/executer/exstorob.c
+++ b/source/components/executer/exstorob.c
diff --git a/executer/exsystem.c b/source/components/executer/exsystem.c
index 37f5b234a373..37f5b234a373 100644
--- a/executer/exsystem.c
+++ b/source/components/executer/exsystem.c
diff --git a/executer/exutils.c b/source/components/executer/exutils.c
index b5eca064a20b..b5eca064a20b 100644
--- a/executer/exutils.c
+++ b/source/components/executer/exutils.c
diff --git a/hardware/hwacpi.c b/source/components/hardware/hwacpi.c
index 04ec1e972665..d9f16ef9d767 100644
--- a/hardware/hwacpi.c
+++ b/source/components/hardware/hwacpi.c
@@ -52,6 +52,7 @@
ACPI_MODULE_NAME ("hwacpi")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
/******************************************************************************
*
* FUNCTION: AcpiHwSetMode
@@ -204,3 +205,5 @@ AcpiHwGetMode (
return_UINT32 (ACPI_SYS_MODE_LEGACY);
}
}
+
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/source/components/hardware/hwesleep.c b/source/components/hardware/hwesleep.c
new file mode 100644
index 000000000000..e95647e5cd19
--- /dev/null
+++ b/source/components/hardware/hwesleep.c
@@ -0,0 +1,263 @@
+/******************************************************************************
+ *
+ * Name: hwesleep.c - ACPI Hardware Sleep/Wake Support functions for the
+ * extended FADT-V5 sleep registers.
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2012, Intel Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ * of any contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#include "acpi.h"
+#include "accommon.h"
+
+#define _COMPONENT ACPI_HARDWARE
+ ACPI_MODULE_NAME ("hwesleep")
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiHwExecuteSleepMethod
+ *
+ * PARAMETERS: MethodName - Pathname of method to execute
+ * IntegerArgument - Argument to pass to the method
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Execute a sleep/wake related method with one integer argument
+ * and no return value.
+ *
+ ******************************************************************************/
+
+void
+AcpiHwExecuteSleepMethod (
+ char *MethodName,
+ UINT32 IntegerArgument)
+{
+ ACPI_OBJECT_LIST ArgList;
+ ACPI_OBJECT Arg;
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (HwExecuteSleepMethod);
+
+
+ /* One argument, IntegerArgument; No return value expected */
+
+ ArgList.Count = 1;
+ ArgList.Pointer = &Arg;
+ Arg.Type = ACPI_TYPE_INTEGER;
+ Arg.Integer.Value = (UINT64) IntegerArgument;
+
+ Status = AcpiEvaluateObject (NULL, MethodName, &ArgList, NULL);
+ if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
+ {
+ ACPI_EXCEPTION ((AE_INFO, Status, "While executing method %s",
+ MethodName));
+ }
+
+ return_VOID;
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiHwExtendedSleep
+ *
+ * PARAMETERS: SleepState - Which sleep state to enter
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Enter a system sleep state via the extended FADT sleep
+ * registers (V5 FADT).
+ * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiHwExtendedSleep (
+ UINT8 SleepState)
+{
+ ACPI_STATUS Status;
+ UINT8 SleepTypeValue;
+ UINT64 SleepStatus;
+
+
+ ACPI_FUNCTION_TRACE (HwExtendedSleep);
+
+
+ /* Extended sleep registers must be valid */
+
+ if (!AcpiGbl_FADT.SleepControl.Address ||
+ !AcpiGbl_FADT.SleepStatus.Address)
+ {
+ return_ACPI_STATUS (AE_NOT_EXIST);
+ }
+
+ /* Clear wake status (WAK_STS) */
+
+ Status = AcpiWrite (ACPI_X_WAKE_STATUS, &AcpiGbl_FADT.SleepStatus);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ AcpiGbl_SystemAwakeAndRunning = FALSE;
+
+ /* Execute the _GTS method (Going To Sleep) */
+
+ AcpiHwExecuteSleepMethod (METHOD_NAME__GTS, SleepState);
+
+ /* Flush caches, as per ACPI specification */
+
+ ACPI_FLUSH_CPU_CACHE ();
+
+ /*
+ * Set the SLP_TYP and SLP_EN bits.
+ *
+ * Note: We only use the first value returned by the \_Sx method
+ * (AcpiGbl_SleepTypeA) - As per ACPI specification.
+ */
+ ACPI_DEBUG_PRINT ((ACPI_DB_INIT,
+ "Entering sleep state [S%u]\n", SleepState));
+
+ SleepTypeValue = ((AcpiGbl_SleepTypeA << ACPI_X_SLEEP_TYPE_POSITION) &
+ ACPI_X_SLEEP_TYPE_MASK);
+
+ Status = AcpiWrite ((SleepTypeValue | ACPI_X_SLEEP_ENABLE),
+ &AcpiGbl_FADT.SleepControl);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ /* Wait for transition back to Working State */
+
+ do
+ {
+ Status = AcpiRead (&SleepStatus, &AcpiGbl_FADT.SleepStatus);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ } while (!(((UINT8) SleepStatus) & ACPI_X_WAKE_STATUS));
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiHwExtendedWakePrep
+ *
+ * PARAMETERS: SleepState - Which sleep state we just exited
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Perform first part of OS-independent ACPI cleanup after
+ * a sleep. Called with interrupts ENABLED.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiHwExtendedWakePrep (
+ UINT8 SleepState)
+{
+ ACPI_STATUS Status;
+ UINT8 SleepTypeValue;
+
+
+ ACPI_FUNCTION_TRACE (HwExtendedWakePrep);
+
+
+ Status = AcpiGetSleepTypeData (ACPI_STATE_S0,
+ &AcpiGbl_SleepTypeA, &AcpiGbl_SleepTypeB);
+ if (ACPI_SUCCESS (Status))
+ {
+ SleepTypeValue = ((AcpiGbl_SleepTypeA << ACPI_X_SLEEP_TYPE_POSITION) &
+ ACPI_X_SLEEP_TYPE_MASK);
+
+ (void) AcpiWrite ((SleepTypeValue | ACPI_X_SLEEP_ENABLE),
+ &AcpiGbl_FADT.SleepControl);
+ }
+
+ AcpiHwExecuteSleepMethod (METHOD_NAME__BFS, SleepState);
+ return_ACPI_STATUS (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiHwExtendedWake
+ *
+ * PARAMETERS: SleepState - Which sleep state we just exited
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Perform OS-independent ACPI cleanup after a sleep
+ * Called with interrupts ENABLED.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiHwExtendedWake (
+ UINT8 SleepState)
+{
+ ACPI_FUNCTION_TRACE (HwExtendedWake);
+
+
+ /* Ensure EnterSleepStatePrep -> EnterSleepState ordering */
+
+ AcpiGbl_SleepTypeA = ACPI_SLEEP_TYPE_INVALID;
+
+ /* Execute the wake methods */
+
+ AcpiHwExecuteSleepMethod (METHOD_NAME__SST, ACPI_SST_WAKING);
+ AcpiHwExecuteSleepMethod (METHOD_NAME__WAK, SleepState);
+
+ /*
+ * Some BIOS code assumes that WAK_STS will be cleared on resume
+ * and use it to determine whether the system is rebooting or
+ * resuming. Clear WAK_STS for compatibility.
+ */
+ (void) AcpiWrite (ACPI_X_WAKE_STATUS, &AcpiGbl_FADT.SleepStatus);
+ AcpiGbl_SystemAwakeAndRunning = TRUE;
+
+ AcpiHwExecuteSleepMethod (METHOD_NAME__SST, ACPI_SST_WORKING);
+ return_ACPI_STATUS (AE_OK);
+}
diff --git a/hardware/hwgpe.c b/source/components/hardware/hwgpe.c
index 24201bc21e4d..c94f17be260e 100644
--- a/hardware/hwgpe.c
+++ b/source/components/hardware/hwgpe.c
@@ -49,6 +49,8 @@
#define _COMPONENT ACPI_HARDWARE
ACPI_MODULE_NAME ("hwgpe")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
+
/* Local prototypes */
static ACPI_STATUS
@@ -538,3 +540,4 @@ AcpiHwEnableAllWakeupGpes (
return_ACPI_STATUS (Status);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/hardware/hwpci.c b/source/components/hardware/hwpci.c
index 065e42d95eb6..065e42d95eb6 100644
--- a/hardware/hwpci.c
+++ b/source/components/hardware/hwpci.c
diff --git a/hardware/hwregs.c b/source/components/hardware/hwregs.c
index c3c5d0b68846..6d89883179f4 100644
--- a/hardware/hwregs.c
+++ b/source/components/hardware/hwregs.c
@@ -53,6 +53,8 @@
ACPI_MODULE_NAME ("hwregs")
+#if (!ACPI_REDUCED_HARDWARE)
+
/* Local Prototypes */
static ACPI_STATUS
@@ -67,6 +69,7 @@ AcpiHwWriteMultiple (
ACPI_GENERIC_ADDRESS *RegisterA,
ACPI_GENERIC_ADDRESS *RegisterB);
+#endif /* !ACPI_REDUCED_HARDWARE */
/******************************************************************************
*
@@ -170,6 +173,7 @@ AcpiHwRead (
ACPI_GENERIC_ADDRESS *Reg)
{
UINT64 Address;
+ UINT64 Value64;
ACPI_STATUS Status;
@@ -195,7 +199,9 @@ AcpiHwRead (
if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY)
{
Status = AcpiOsReadMemory ((ACPI_PHYSICAL_ADDRESS)
- Address, Value, Reg->BitWidth);
+ Address, &Value64, Reg->BitWidth);
+
+ *Value = (UINT32) Value64;
}
else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
{
@@ -254,7 +260,7 @@ AcpiHwWrite (
if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY)
{
Status = AcpiOsWriteMemory ((ACPI_PHYSICAL_ADDRESS)
- Address, Value, Reg->BitWidth);
+ Address, (UINT64) Value, Reg->BitWidth);
}
else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
{
@@ -271,6 +277,7 @@ AcpiHwWrite (
}
+#if (!ACPI_REDUCED_HARDWARE)
/*******************************************************************************
*
* FUNCTION: AcpiHwClearAcpiStatus
@@ -321,7 +328,7 @@ UnlockAndExit:
/*******************************************************************************
*
- * FUNCTION: AcpiHwGetRegisterBitMask
+ * FUNCTION: AcpiHwGetBitRegisterInfo
*
* PARAMETERS: RegisterId - Index of ACPI Register to access
*
@@ -731,3 +738,4 @@ AcpiHwWriteMultiple (
return (Status);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/hardware/hwsleep.c b/source/components/hardware/hwsleep.c
index b90bf104e76e..0d311435555a 100644
--- a/hardware/hwsleep.c
+++ b/source/components/hardware/hwsleep.c
@@ -1,7 +1,7 @@
-
/******************************************************************************
*
- * Name: hwsleep.c - ACPI Hardware Sleep/Wake Interface
+ * Name: hwsleep.c - ACPI Hardware Sleep/Wake Support functions for the
+ * original/legacy sleep/PM registers.
*
*****************************************************************************/
@@ -49,210 +49,36 @@
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;
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 */
@@ -304,16 +130,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 */
@@ -390,7 +207,7 @@ AcpiEnterSleepState (
}
}
- /* Wait until we enter sleep state */
+ /* Wait for transition back to Working State */
do
{
@@ -400,110 +217,30 @@ AcpiEnterSleepState (
return_ACPI_STATUS (Status);
}
- /* 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;
@@ -511,8 +248,7 @@ AcpiLeaveSleepState (
UINT32 Pm1bControl;
- ACPI_FUNCTION_TRACE (AcpiLeaveSleepState);
-
+ ACPI_FUNCTION_TRACE (HwLegacyWakePrep);
/*
* Set SLP_TYPE and SLP_EN to state S0.
@@ -553,40 +289,43 @@ AcpiLeaveSleepState (
}
}
- /* Ensure EnterSleepStatePrep -> EnterSleepState ordering */
+ AcpiHwExecuteSleepMethod (METHOD_NAME__BFS, SleepState);
+ return_ACPI_STATUS (Status);
+}
- AcpiGbl_SleepTypeA = ACPI_SLEEP_TYPE_INVALID;
- /* Setup parameter object */
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiHwLegacyWake
+ *
+ * PARAMETERS: SleepState - Which sleep state we just exited
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Perform OS-independent ACPI cleanup after a sleep
+ * Called with interrupts ENABLED.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiHwLegacyWake (
+ UINT8 SleepState)
+{
+ ACPI_STATUS Status;
- ArgList.Count = 1;
- ArgList.Pointer = &Arg;
- Arg.Type = ACPI_TYPE_INTEGER;
- /* Ignore any errors from these methods */
+ ACPI_FUNCTION_TRACE (HwLegacyWake);
- Arg.Integer.Value = ACPI_SST_WAKING;
- Status = AcpiEvaluateObject (NULL, METHOD_NAME__SST, &ArgList, NULL);
- if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
- {
- ACPI_EXCEPTION ((AE_INFO, Status, "During Method _SST"));
- }
- Arg.Integer.Value = SleepState;
- Status = AcpiEvaluateObject (NULL, METHOD_NAME__BFS, &ArgList, NULL);
- if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
- {
- ACPI_EXCEPTION ((AE_INFO, Status, "During Method _BFS"));
- }
+ /* Ensure EnterSleepStatePrep -> EnterSleepState ordering */
- Status = AcpiEvaluateObject (NULL, METHOD_NAME__WAK, &ArgList, NULL);
- if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
- {
- ACPI_EXCEPTION ((AE_INFO, Status, "During Method _WAK"));
- }
- /* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */
+ AcpiGbl_SleepTypeA = ACPI_SLEEP_TYPE_INVALID;
+ AcpiHwExecuteSleepMethod (METHOD_NAME__SST, ACPI_SST_WAKING);
/*
+ * GPEs must be enabled before _WAK is called as GPEs
+ * might get fired there
+ *
* Restore the GPEs:
* 1) Disable/Clear all GPEs
* 2) Enable all runtime GPEs
@@ -596,7 +335,6 @@ AcpiLeaveSleepState (
{
return_ACPI_STATUS (Status);
}
- AcpiGbl_SystemAwakeAndRunning = TRUE;
Status = AcpiHwEnableAllRuntimeGpes ();
if (ACPI_FAILURE (Status))
@@ -604,6 +342,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(
@@ -625,15 +377,8 @@ AcpiLeaveSleepState (
return_ACPI_STATUS (Status);
}
- Arg.Integer.Value = ACPI_SST_WORKING;
- Status = AcpiEvaluateObject (NULL, METHOD_NAME__SST, &ArgList, NULL);
- if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
- {
- ACPI_EXCEPTION ((AE_INFO, Status, "During Method _SST"));
- }
-
+ AcpiHwExecuteSleepMethod (METHOD_NAME__SST, ACPI_SST_WORKING);
return_ACPI_STATUS (Status);
}
-ACPI_EXPORT_SYMBOL (AcpiLeaveSleepState)
-
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/hardware/hwtimer.c b/source/components/hardware/hwtimer.c
index 3b2395a68fcc..15dc58f0bffe 100644
--- a/hardware/hwtimer.c
+++ b/source/components/hardware/hwtimer.c
@@ -49,6 +49,7 @@
ACPI_MODULE_NAME ("hwtimer")
+#if (!ACPI_REDUCED_HARDWARE) /* Entire module */
/******************************************************************************
*
* FUNCTION: AcpiGetTimerResolution
@@ -214,3 +215,4 @@ AcpiGetTimerDuration (
ACPI_EXPORT_SYMBOL (AcpiGetTimerDuration)
+#endif /* !ACPI_REDUCED_HARDWARE */
diff --git a/hardware/hwvalid.c b/source/components/hardware/hwvalid.c
index 4462434bbfe6..4462434bbfe6 100644
--- a/hardware/hwvalid.c
+++ b/source/components/hardware/hwvalid.c
diff --git a/hardware/hwxface.c b/source/components/hardware/hwxface.c
index 02828537dd3d..3fec9b566f05 100644
--- a/hardware/hwxface.c
+++ b/source/components/hardware/hwxface.c
@@ -154,12 +154,6 @@ AcpiRead (
return (Status);
}
- Width = Reg->BitWidth;
- if (Width == 64)
- {
- Width = 32; /* Break into two 32-bit transfers */
- }
-
/* Initialize entire 64-bit return value to zero */
*ReturnValue = 0;
@@ -172,28 +166,20 @@ AcpiRead (
if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY)
{
Status = AcpiOsReadMemory ((ACPI_PHYSICAL_ADDRESS)
- Address, &Value, Width);
+ Address, ReturnValue, Reg->BitWidth);
if (ACPI_FAILURE (Status))
{
return (Status);
}
- *ReturnValue = Value;
-
- if (Reg->BitWidth == 64)
- {
- /* Read the top 32 bits */
-
- Status = AcpiOsReadMemory ((ACPI_PHYSICAL_ADDRESS)
- (Address + 4), &Value, 32);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
- *ReturnValue |= ((UINT64) Value << 32);
- }
}
else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
{
+ Width = Reg->BitWidth;
+ if (Width == 64)
+ {
+ Width = 32; /* Break into two 32-bit transfers */
+ }
+
Status = AcpiHwReadPort ((ACPI_IO_ADDRESS)
Address, &Value, Width);
if (ACPI_FAILURE (Status))
@@ -262,12 +248,6 @@ AcpiWrite (
return (Status);
}
- Width = Reg->BitWidth;
- if (Width == 64)
- {
- Width = 32; /* Break into two 32-bit transfers */
- }
-
/*
* Two address spaces supported: Memory or IO. PCI_Config is
* not supported here because the GAS structure is insufficient
@@ -275,24 +255,20 @@ AcpiWrite (
if (Reg->SpaceId == ACPI_ADR_SPACE_SYSTEM_MEMORY)
{
Status = AcpiOsWriteMemory ((ACPI_PHYSICAL_ADDRESS)
- Address, ACPI_LODWORD (Value), Width);
+ Address, Value, Reg->BitWidth);
if (ACPI_FAILURE (Status))
{
return (Status);
}
-
- if (Reg->BitWidth == 64)
- {
- Status = AcpiOsWriteMemory ((ACPI_PHYSICAL_ADDRESS)
- (Address + 4), ACPI_HIDWORD (Value), 32);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
- }
}
else /* ACPI_ADR_SPACE_SYSTEM_IO, validated earlier */
{
+ Width = Reg->BitWidth;
+ if (Width == 64)
+ {
+ Width = 32; /* Break into two 32-bit transfers */
+ }
+
Status = AcpiHwWritePort ((ACPI_IO_ADDRESS)
Address, ACPI_LODWORD (Value), Width);
if (ACPI_FAILURE (Status))
@@ -323,6 +299,7 @@ AcpiWrite (
ACPI_EXPORT_SYMBOL (AcpiWrite)
+#if (!ACPI_REDUCED_HARDWARE)
/*******************************************************************************
*
* FUNCTION: AcpiReadBitRegister
@@ -505,6 +482,8 @@ UnlockAndExit:
ACPI_EXPORT_SYMBOL (AcpiWriteBitRegister)
+#endif /* !ACPI_REDUCED_HARDWARE */
+
/*******************************************************************************
*
diff --git a/source/components/hardware/hwxfsleep.c b/source/components/hardware/hwxfsleep.c
new file mode 100644
index 000000000000..39bf122a072e
--- /dev/null
+++ b/source/components/hardware/hwxfsleep.c
@@ -0,0 +1,474 @@
+/******************************************************************************
+ *
+ * Name: hwxfsleep.c - ACPI Hardware Sleep/Wake External Interfaces
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2012, Intel Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ * of any contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#include "acpi.h"
+#include "accommon.h"
+
+#define _COMPONENT ACPI_HARDWARE
+ ACPI_MODULE_NAME ("hwxfsleep")
+
+/* Local prototypes */
+
+static ACPI_STATUS
+AcpiHwSleepDispatch (
+ UINT8 SleepState,
+ UINT32 FunctionId);
+
+/*
+ * Dispatch table used to efficiently branch to the various sleep
+ * functions.
+ */
+#define ACPI_SLEEP_FUNCTION_ID 0
+#define ACPI_WAKE_PREP_FUNCTION_ID 1
+#define ACPI_WAKE_FUNCTION_ID 2
+
+/* Legacy functions are optional, based upon ACPI_REDUCED_HARDWARE */
+
+static ACPI_SLEEP_FUNCTIONS AcpiSleepDispatch[] =
+{
+ {ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacySleep), AcpiHwExtendedSleep},
+ {ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWakePrep), AcpiHwExtendedWakePrep},
+ {ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWake), AcpiHwExtendedWake}
+};
+
+
+/*
+ * These functions are removed for the ACPI_REDUCED_HARDWARE case:
+ * AcpiSetFirmwareWakingVector
+ * AcpiSetFirmwareWakingVector64
+ * AcpiEnterSleepStateS4bios
+ */
+
+#if (!ACPI_REDUCED_HARDWARE)
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiSetFirmwareWakingVector
+ *
+ * PARAMETERS: PhysicalAddress - 32-bit physical address of ACPI real mode
+ * entry point.
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Sets the 32-bit FirmwareWakingVector field of the FACS
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiSetFirmwareWakingVector (
+ UINT32 PhysicalAddress)
+{
+ ACPI_FUNCTION_TRACE (AcpiSetFirmwareWakingVector);
+
+
+ /* Set the 32-bit vector */
+
+ AcpiGbl_FACS->FirmwareWakingVector = PhysicalAddress;
+
+ /* Clear the 64-bit vector if it exists */
+
+ if ((AcpiGbl_FACS->Length > 32) && (AcpiGbl_FACS->Version >= 1))
+ {
+ AcpiGbl_FACS->XFirmwareWakingVector = 0;
+ }
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiSetFirmwareWakingVector)
+
+
+#if ACPI_MACHINE_WIDTH == 64
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiSetFirmwareWakingVector64
+ *
+ * PARAMETERS: PhysicalAddress - 64-bit physical address of ACPI protected
+ * mode entry point.
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Sets the 64-bit X_FirmwareWakingVector field of the FACS, if
+ * it exists in the table. This function is intended for use with
+ * 64-bit host operating systems.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiSetFirmwareWakingVector64 (
+ UINT64 PhysicalAddress)
+{
+ ACPI_FUNCTION_TRACE (AcpiSetFirmwareWakingVector64);
+
+
+ /* Determine if the 64-bit vector actually exists */
+
+ if ((AcpiGbl_FACS->Length <= 32) || (AcpiGbl_FACS->Version < 1))
+ {
+ return_ACPI_STATUS (AE_NOT_EXIST);
+ }
+
+ /* Clear 32-bit vector, set the 64-bit X_ vector */
+
+ AcpiGbl_FACS->FirmwareWakingVector = 0;
+ AcpiGbl_FACS->XFirmwareWakingVector = PhysicalAddress;
+ return_ACPI_STATUS (AE_OK);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiSetFirmwareWakingVector64)
+#endif
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiEnterSleepStateS4bios
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Perform a S4 bios request.
+ * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiEnterSleepStateS4bios (
+ void)
+{
+ UINT32 InValue;
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (AcpiEnterSleepStateS4bios);
+
+
+ /* Clear the wake status bit (PM1) */
+
+ Status = AcpiWriteBitRegister (ACPI_BITREG_WAKE_STATUS, ACPI_CLEAR_STATUS);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ Status = AcpiHwClearAcpiStatus ();
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ /*
+ * 1) Disable/Clear all GPEs
+ * 2) Enable all wakeup GPEs
+ */
+ Status = AcpiHwDisableAllGpes ();
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+ AcpiGbl_SystemAwakeAndRunning = FALSE;
+
+ Status = AcpiHwEnableAllWakeupGpes ();
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ ACPI_FLUSH_CPU_CACHE ();
+
+ Status = AcpiHwWritePort (AcpiGbl_FADT.SmiCommand,
+ (UINT32) AcpiGbl_FADT.S4BiosRequest, 8);
+
+ do {
+ AcpiOsStall(1000);
+ Status = AcpiReadBitRegister (ACPI_BITREG_WAKE_STATUS, &InValue);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+ } while (!InValue);
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiEnterSleepStateS4bios)
+
+#endif /* !ACPI_REDUCED_HARDWARE */
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiHwSleepDispatch
+ *
+ * PARAMETERS: SleepState - Which sleep state to enter/exit
+ * FunctionId - Sleep, WakePrep, or Wake
+ *
+ * RETURN: Status from the invoked sleep handling function.
+ *
+ * DESCRIPTION: Dispatch a sleep/wake request to the appropriate handling
+ * function.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiHwSleepDispatch (
+ UINT8 SleepState,
+ UINT32 FunctionId)
+{
+ ACPI_STATUS Status;
+ ACPI_SLEEP_FUNCTIONS *SleepFunctions = &AcpiSleepDispatch[FunctionId];
+
+
+#if (!ACPI_REDUCED_HARDWARE)
+
+ /*
+ * If the Hardware Reduced flag is set (from the FADT), we must
+ * use the extended sleep registers
+ */
+ if (AcpiGbl_ReducedHardware ||
+ AcpiGbl_FADT.SleepControl.Address)
+ {
+ Status = SleepFunctions->ExtendedFunction (SleepState);
+ }
+ else
+ {
+ /* Legacy sleep */
+
+ Status = SleepFunctions->LegacyFunction (SleepState);
+ }
+
+ return (Status);
+
+#else
+ /*
+ * For the case where reduced-hardware-only code is being generated,
+ * we know that only the extended sleep registers are available
+ */
+ Status = SleepFunctions->ExtendedFunction (SleepState);
+ return (Status);
+
+#endif /* !ACPI_REDUCED_HARDWARE */
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiEnterSleepStatePrep
+ *
+ * PARAMETERS: SleepState - Which sleep state to enter
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Prepare to enter a system sleep state.
+ * This function must execute with interrupts enabled.
+ * We break sleeping into 2 stages so that OSPM can handle
+ * various OS-specific tasks between the two steps.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiEnterSleepStatePrep (
+ UINT8 SleepState)
+{
+ ACPI_STATUS Status;
+ ACPI_OBJECT_LIST ArgList;
+ ACPI_OBJECT Arg;
+ UINT32 SstValue;
+
+
+ ACPI_FUNCTION_TRACE (AcpiEnterSleepStatePrep);
+
+
+ /* _PSW methods could be run here to enable wake-on keyboard, LAN, etc. */
+
+ Status = AcpiGetSleepTypeData (SleepState,
+ &AcpiGbl_SleepTypeA, &AcpiGbl_SleepTypeB);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ /* Execute the _PTS method (Prepare To Sleep) */
+
+ ArgList.Count = 1;
+ ArgList.Pointer = &Arg;
+ Arg.Type = ACPI_TYPE_INTEGER;
+ Arg.Integer.Value = SleepState;
+
+ Status = AcpiEvaluateObject (NULL, METHOD_NAME__PTS, &ArgList, NULL);
+ if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ /* Setup the argument to the _SST method (System STatus) */
+
+ switch (SleepState)
+ {
+ case ACPI_STATE_S0:
+ SstValue = ACPI_SST_WORKING;
+ break;
+
+ case ACPI_STATE_S1:
+ case ACPI_STATE_S2:
+ case ACPI_STATE_S3:
+ SstValue = ACPI_SST_SLEEPING;
+ break;
+
+ case ACPI_STATE_S4:
+ SstValue = ACPI_SST_SLEEP_CONTEXT;
+ break;
+
+ default:
+ SstValue = ACPI_SST_INDICATOR_OFF; /* Default is off */
+ break;
+ }
+
+ /*
+ * Set the system indicators to show the desired sleep state.
+ * _SST is an optional method (return no error if not found)
+ */
+ AcpiHwExecuteSleepMethod (METHOD_NAME__SST, SstValue);
+ return_ACPI_STATUS (AE_OK);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiEnterSleepStatePrep)
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiEnterSleepState
+ *
+ * PARAMETERS: SleepState - Which sleep state to enter
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Enter a system sleep state
+ * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiEnterSleepState (
+ UINT8 SleepState)
+{
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (AcpiEnterSleepState);
+
+
+ if ((AcpiGbl_SleepTypeA > ACPI_SLEEP_TYPE_MAX) ||
+ (AcpiGbl_SleepTypeB > ACPI_SLEEP_TYPE_MAX))
+ {
+ ACPI_ERROR ((AE_INFO, "Sleep values out of range: A=0x%X B=0x%X",
+ AcpiGbl_SleepTypeA, AcpiGbl_SleepTypeB));
+ return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
+ }
+
+ Status = AcpiHwSleepDispatch (SleepState, ACPI_SLEEP_FUNCTION_ID);
+ return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiEnterSleepState)
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiLeaveSleepStatePrep
+ *
+ * PARAMETERS: SleepState - Which sleep state we are exiting
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Perform the first state of OS-independent ACPI cleanup after a
+ * sleep. Called with interrupts DISABLED.
+ * We break wake/resume into 2 stages so that OSPM can handle
+ * various OS-specific tasks between the two steps.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiLeaveSleepStatePrep (
+ UINT8 SleepState)
+{
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (AcpiLeaveSleepStatePrep);
+
+
+ Status = AcpiHwSleepDispatch (SleepState, ACPI_WAKE_PREP_FUNCTION_ID);
+ return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiLeaveSleepStatePrep)
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiLeaveSleepState
+ *
+ * PARAMETERS: SleepState - Which sleep state we are exiting
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Perform OS-independent ACPI cleanup after a sleep
+ * Called with interrupts ENABLED.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiLeaveSleepState (
+ UINT8 SleepState)
+{
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (AcpiLeaveSleepState);
+
+
+ Status = AcpiHwSleepDispatch (SleepState, ACPI_WAKE_FUNCTION_ID);
+ return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiLeaveSleepState)
diff --git a/namespace/nsaccess.c b/source/components/namespace/nsaccess.c
index 9dfa76fb0850..9dfa76fb0850 100644
--- a/namespace/nsaccess.c
+++ b/source/components/namespace/nsaccess.c
diff --git a/namespace/nsalloc.c b/source/components/namespace/nsalloc.c
index c7e83e0eb49c..c7e83e0eb49c 100644
--- a/namespace/nsalloc.c
+++ b/source/components/namespace/nsalloc.c
diff --git a/namespace/nsdump.c b/source/components/namespace/nsdump.c
index edc16257d4dd..edc16257d4dd 100644
--- a/namespace/nsdump.c
+++ b/source/components/namespace/nsdump.c
diff --git a/namespace/nsdumpdv.c b/source/components/namespace/nsdumpdv.c
index dde0a8d09abc..dde0a8d09abc 100644
--- a/namespace/nsdumpdv.c
+++ b/source/components/namespace/nsdumpdv.c
diff --git a/namespace/nseval.c b/source/components/namespace/nseval.c
index 0183f7e77441..0183f7e77441 100644
--- a/namespace/nseval.c
+++ b/source/components/namespace/nseval.c
diff --git a/namespace/nsinit.c b/source/components/namespace/nsinit.c
index f3907aafb3a4..f3907aafb3a4 100644
--- a/namespace/nsinit.c
+++ b/source/components/namespace/nsinit.c
diff --git a/namespace/nsload.c b/source/components/namespace/nsload.c
index 3ef33f9ce9d9..3ef33f9ce9d9 100644
--- a/namespace/nsload.c
+++ b/source/components/namespace/nsload.c
diff --git a/namespace/nsnames.c b/source/components/namespace/nsnames.c
index f70900da1d1a..f70900da1d1a 100644
--- a/namespace/nsnames.c
+++ b/source/components/namespace/nsnames.c
diff --git a/namespace/nsobject.c b/source/components/namespace/nsobject.c
index 9b219a562447..9b219a562447 100644
--- a/namespace/nsobject.c
+++ b/source/components/namespace/nsobject.c
diff --git a/namespace/nsparse.c b/source/components/namespace/nsparse.c
index 2c768c0b699f..2c768c0b699f 100644
--- a/namespace/nsparse.c
+++ b/source/components/namespace/nsparse.c
diff --git a/namespace/nspredef.c b/source/components/namespace/nspredef.c
index 19662680125c..19662680125c 100644
--- a/namespace/nspredef.c
+++ b/source/components/namespace/nspredef.c
diff --git a/namespace/nsrepair.c b/source/components/namespace/nsrepair.c
index d820834e881e..d820834e881e 100644
--- a/namespace/nsrepair.c
+++ b/source/components/namespace/nsrepair.c
diff --git a/namespace/nsrepair2.c b/source/components/namespace/nsrepair2.c
index a6a4d6874dec..a6a4d6874dec 100644
--- a/namespace/nsrepair2.c
+++ b/source/components/namespace/nsrepair2.c
diff --git a/namespace/nssearch.c b/source/components/namespace/nssearch.c
index d6f59ccbd104..d6f59ccbd104 100644
--- a/namespace/nssearch.c
+++ b/source/components/namespace/nssearch.c
diff --git a/namespace/nsutils.c b/source/components/namespace/nsutils.c
index 3b07f83a9e33..3b07f83a9e33 100644
--- a/namespace/nsutils.c
+++ b/source/components/namespace/nsutils.c
diff --git a/namespace/nswalk.c b/source/components/namespace/nswalk.c
index 35c3e178966a..35c3e178966a 100644
--- a/namespace/nswalk.c
+++ b/source/components/namespace/nswalk.c
diff --git a/namespace/nsxfeval.c b/source/components/namespace/nsxfeval.c
index 5006588e85b6..5006588e85b6 100644
--- a/namespace/nsxfeval.c
+++ b/source/components/namespace/nsxfeval.c
diff --git a/namespace/nsxfname.c b/source/components/namespace/nsxfname.c
index 4690d09e90d5..4690d09e90d5 100644
--- a/namespace/nsxfname.c
+++ b/source/components/namespace/nsxfname.c
diff --git a/namespace/nsxfobj.c b/source/components/namespace/nsxfobj.c
index 02f7777a3965..02f7777a3965 100644
--- a/namespace/nsxfobj.c
+++ b/source/components/namespace/nsxfobj.c
diff --git a/parser/psargs.c b/source/components/parser/psargs.c
index 68e4d5d21042..68e4d5d21042 100644
--- a/parser/psargs.c
+++ b/source/components/parser/psargs.c
diff --git a/parser/psloop.c b/source/components/parser/psloop.c
index d578c7e36b38..d578c7e36b38 100644
--- a/parser/psloop.c
+++ b/source/components/parser/psloop.c
diff --git a/parser/psopcode.c b/source/components/parser/psopcode.c
index ef2257e86ff7..ef2257e86ff7 100644
--- a/parser/psopcode.c
+++ b/source/components/parser/psopcode.c
diff --git a/parser/psparse.c b/source/components/parser/psparse.c
index bcf46adfe566..bcf46adfe566 100644
--- a/parser/psparse.c
+++ b/source/components/parser/psparse.c
diff --git a/parser/psscope.c b/source/components/parser/psscope.c
index 1df5a33af352..1df5a33af352 100644
--- a/parser/psscope.c
+++ b/source/components/parser/psscope.c
diff --git a/parser/pstree.c b/source/components/parser/pstree.c
index 8271314e16ab..8271314e16ab 100644
--- a/parser/pstree.c
+++ b/source/components/parser/pstree.c
diff --git a/parser/psutils.c b/source/components/parser/psutils.c
index e28b75cc8f23..e28b75cc8f23 100644
--- a/parser/psutils.c
+++ b/source/components/parser/psutils.c
diff --git a/parser/pswalk.c b/source/components/parser/pswalk.c
index 9734c4d17711..9734c4d17711 100644
--- a/parser/pswalk.c
+++ b/source/components/parser/pswalk.c
diff --git a/parser/psxface.c b/source/components/parser/psxface.c
index 2a012c2915c9..2a012c2915c9 100644
--- a/parser/psxface.c
+++ b/source/components/parser/psxface.c
diff --git a/resources/rsaddr.c b/source/components/resources/rsaddr.c
index 90e7d43b6e01..90e7d43b6e01 100644
--- a/resources/rsaddr.c
+++ b/source/components/resources/rsaddr.c
diff --git a/resources/rscalc.c b/source/components/resources/rscalc.c
index 845ed69c7dee..845ed69c7dee 100644
--- a/resources/rscalc.c
+++ b/source/components/resources/rscalc.c
diff --git a/resources/rscreate.c b/source/components/resources/rscreate.c
index f06ea0cb4dc2..f06ea0cb4dc2 100644
--- a/resources/rscreate.c
+++ b/source/components/resources/rscreate.c
diff --git a/resources/rsdump.c b/source/components/resources/rsdump.c
index 68564739eb5e..68564739eb5e 100644
--- a/resources/rsdump.c
+++ b/source/components/resources/rsdump.c
diff --git a/resources/rsinfo.c b/source/components/resources/rsinfo.c
index e7287d54557c..e7287d54557c 100644
--- a/resources/rsinfo.c
+++ b/source/components/resources/rsinfo.c
diff --git a/resources/rsio.c b/source/components/resources/rsio.c
index 065108cfa1f7..065108cfa1f7 100644
--- a/resources/rsio.c
+++ b/source/components/resources/rsio.c
diff --git a/resources/rsirq.c b/source/components/resources/rsirq.c
index c2a88ee89a14..c2a88ee89a14 100644
--- a/resources/rsirq.c
+++ b/source/components/resources/rsirq.c
diff --git a/resources/rslist.c b/source/components/resources/rslist.c
index 187d56cd42b2..187d56cd42b2 100644
--- a/resources/rslist.c
+++ b/source/components/resources/rslist.c
diff --git a/resources/rsmemory.c b/source/components/resources/rsmemory.c
index 83d131956ff7..83d131956ff7 100644
--- a/resources/rsmemory.c
+++ b/source/components/resources/rsmemory.c
diff --git a/resources/rsmisc.c b/source/components/resources/rsmisc.c
index dfad696ca1d1..dfad696ca1d1 100644
--- a/resources/rsmisc.c
+++ b/source/components/resources/rsmisc.c
diff --git a/resources/rsserial.c b/source/components/resources/rsserial.c
index 3a7784e96c8c..3a7784e96c8c 100644
--- a/resources/rsserial.c
+++ b/source/components/resources/rsserial.c
diff --git a/resources/rsutils.c b/source/components/resources/rsutils.c
index 062678651ec1..062678651ec1 100644
--- a/resources/rsutils.c
+++ b/source/components/resources/rsutils.c
diff --git a/resources/rsxface.c b/source/components/resources/rsxface.c
index d8c3938b31bc..d8c3938b31bc 100644
--- a/resources/rsxface.c
+++ b/source/components/resources/rsxface.c
diff --git a/tables/tbfadt.c b/source/components/tables/tbfadt.c
index ae4052099fe5..ae4052099fe5 100644
--- a/tables/tbfadt.c
+++ b/source/components/tables/tbfadt.c
diff --git a/tables/tbfind.c b/source/components/tables/tbfind.c
index d7e2440b32ac..d7e2440b32ac 100644
--- a/tables/tbfind.c
+++ b/source/components/tables/tbfind.c
diff --git a/tables/tbinstal.c b/source/components/tables/tbinstal.c
index b683270a7dbf..5c6bd876f819 100644
--- a/tables/tbinstal.c
+++ b/source/components/tables/tbinstal.c
@@ -128,7 +128,6 @@ AcpiTbAddTable (
{
UINT32 i;
ACPI_STATUS Status = AE_OK;
- ACPI_TABLE_HEADER *OverrideTable = NULL;
ACPI_FUNCTION_TRACE (TbAddTable);
@@ -242,26 +241,10 @@ AcpiTbAddTable (
/*
* ACPI Table Override:
* Allow the host to override dynamically loaded tables.
+ * NOTE: the table is fully mapped at this point, and the mapping will
+ * be deleted by TbTableOverride if the table is actually overridden.
*/
- Status = AcpiOsTableOverride (TableDesc->Pointer, &OverrideTable);
- if (ACPI_SUCCESS (Status) && OverrideTable)
- {
- ACPI_INFO ((AE_INFO,
- "%4.4s @ 0x%p Table override, replaced with:",
- TableDesc->Pointer->Signature,
- ACPI_CAST_PTR (void, TableDesc->Address)));
-
- /* We can delete the table that was passed as a parameter */
-
- AcpiTbDeleteTable (TableDesc);
-
- /* Setup descriptor for the new table */
-
- TableDesc->Address = ACPI_PTR_TO_PHYSADDR (OverrideTable);
- TableDesc->Pointer = OverrideTable;
- TableDesc->Length = OverrideTable->Length;
- TableDesc->Flags = ACPI_TABLE_ORIGIN_OVERRIDE;
- }
+ (void) AcpiTbTableOverride (TableDesc->Pointer, TableDesc);
/* Add the table to the global root table list */
@@ -283,6 +266,98 @@ Release:
/*******************************************************************************
*
+ * FUNCTION: AcpiTbTableOverride
+ *
+ * PARAMETERS: TableHeader - Header for the original table
+ * TableDesc - Table descriptor initialized for the
+ * original table. May or may not be mapped.
+ *
+ * RETURN: Pointer to the entire new table. NULL if table not overridden.
+ * If overridden, installs the new table within the input table
+ * descriptor.
+ *
+ * DESCRIPTION: Attempt table override by calling the OSL override functions.
+ * Note: If the table is overridden, then the entire new table
+ * is mapped and returned by this function.
+ *
+ ******************************************************************************/
+
+ACPI_TABLE_HEADER *
+AcpiTbTableOverride (
+ ACPI_TABLE_HEADER *TableHeader,
+ ACPI_TABLE_DESC *TableDesc)
+{
+ ACPI_STATUS Status;
+ ACPI_TABLE_HEADER *NewTable = NULL;
+ ACPI_PHYSICAL_ADDRESS NewAddress = 0;
+ UINT32 NewTableLength = 0;
+ UINT8 NewFlags;
+ char *OverrideType;
+
+
+ /* (1) Attempt logical override (returns a logical address) */
+
+ Status = AcpiOsTableOverride (TableHeader, &NewTable);
+ if (ACPI_SUCCESS (Status) && NewTable)
+ {
+ NewAddress = ACPI_PTR_TO_PHYSADDR (NewTable);
+ NewTableLength = NewTable->Length;
+ NewFlags = ACPI_TABLE_ORIGIN_OVERRIDE;
+ OverrideType = "Logical";
+ goto FinishOverride;
+ }
+
+ /* (2) Attempt physical override (returns a physical address) */
+
+ Status = AcpiOsPhysicalTableOverride (TableHeader,
+ &NewAddress, &NewTableLength);
+ if (ACPI_SUCCESS (Status) && NewAddress && NewTableLength)
+ {
+ /* Map the entire new table */
+
+ NewTable = AcpiOsMapMemory (NewAddress, NewTableLength);
+ if (!NewTable)
+ {
+ ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY,
+ "%4.4s %p Attempted physical table override failed",
+ TableHeader->Signature,
+ ACPI_CAST_PTR (void, TableDesc->Address)));
+ return (NULL);
+ }
+
+ OverrideType = "Physical";
+ NewFlags = ACPI_TABLE_ORIGIN_MAPPED;
+ goto FinishOverride;
+ }
+
+ return (NULL); /* There was no override */
+
+
+FinishOverride:
+
+ ACPI_INFO ((AE_INFO,
+ "%4.4s %p %s table override, new table: %p",
+ TableHeader->Signature,
+ ACPI_CAST_PTR (void, TableDesc->Address),
+ OverrideType, NewTable));
+
+ /* We can now unmap/delete the original table (if fully mapped) */
+
+ AcpiTbDeleteTable (TableDesc);
+
+ /* Setup descriptor for the new table */
+
+ TableDesc->Address = NewAddress;
+ TableDesc->Pointer = NewTable;
+ TableDesc->Length = NewTableLength;
+ TableDesc->Flags = NewFlags;
+
+ return (NewTable);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiTbResizeRootTableList
*
* PARAMETERS: None
diff --git a/tables/tbutils.c b/source/components/tables/tbutils.c
index dcff713f90f8..bfdcf0c29832 100644
--- a/tables/tbutils.c
+++ b/source/components/tables/tbutils.c
@@ -50,6 +50,7 @@
#define _COMPONENT ACPI_TABLES
ACPI_MODULE_NAME ("tbutils")
+
/* Local prototypes */
static void
@@ -68,6 +69,7 @@ AcpiTbGetRootTableEntry (
UINT32 TableEntrySize);
+#if (!ACPI_REDUCED_HARDWARE)
/*******************************************************************************
*
* FUNCTION: AcpiTbInitializeFacs
@@ -100,6 +102,7 @@ AcpiTbInitializeFacs (
ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &AcpiGbl_FACS));
return (Status);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
/*******************************************************************************
@@ -423,7 +426,7 @@ AcpiTbCopyDsdt (
* RETURN: None
*
* DESCRIPTION: Install an ACPI table into the global data structure. The
- * table override mechanism is implemented here to allow the host
+ * table override mechanism is called to allow the host
* OS to replace any table before it is installed in the root
* table array.
*
@@ -435,11 +438,9 @@ AcpiTbInstallTable (
char *Signature,
UINT32 TableIndex)
{
- UINT8 Flags;
- ACPI_STATUS Status;
- ACPI_TABLE_HEADER *TableToInstall;
- ACPI_TABLE_HEADER *MappedTable;
- ACPI_TABLE_HEADER *OverrideTable = NULL;
+ ACPI_TABLE_HEADER *Table;
+ ACPI_TABLE_HEADER *FinalTable;
+ ACPI_TABLE_DESC *TableDesc;
if (!Address)
@@ -451,70 +452,69 @@ AcpiTbInstallTable (
/* Map just the table header */
- MappedTable = AcpiOsMapMemory (Address, sizeof (ACPI_TABLE_HEADER));
- if (!MappedTable)
+ Table = AcpiOsMapMemory (Address, sizeof (ACPI_TABLE_HEADER));
+ if (!Table)
{
+ ACPI_ERROR ((AE_INFO, "Could not map memory for table [%s] at %p",
+ Signature, ACPI_CAST_PTR (void, Address)));
return;
}
/* If a particular signature is expected (DSDT/FACS), it must match */
if (Signature &&
- !ACPI_COMPARE_NAME (MappedTable->Signature, Signature))
+ !ACPI_COMPARE_NAME (Table->Signature, Signature))
{
ACPI_ERROR ((AE_INFO,
"Invalid signature 0x%X for ACPI table, expected [%s]",
- *ACPI_CAST_PTR (UINT32, MappedTable->Signature), Signature));
+ *ACPI_CAST_PTR (UINT32, Table->Signature), Signature));
goto UnmapAndExit;
}
/*
+ * Initialize the table entry. Set the pointer to NULL, since the
+ * table is not fully mapped at this time.
+ */
+ TableDesc = &AcpiGbl_RootTableList.Tables[TableIndex];
+
+ TableDesc->Address = Address;
+ TableDesc->Pointer = NULL;
+ TableDesc->Length = Table->Length;
+ TableDesc->Flags = ACPI_TABLE_ORIGIN_MAPPED;
+ ACPI_MOVE_32_TO_32 (TableDesc->Signature.Ascii, Table->Signature);
+
+ /*
* ACPI Table Override:
*
* Before we install the table, let the host OS override it with a new
* one if desired. Any table within the RSDT/XSDT can be replaced,
* including the DSDT which is pointed to by the FADT.
+ *
+ * NOTE: If the table is overridden, then FinalTable will contain a
+ * mapped pointer to the full new table. If the table is not overridden,
+ * then the table will be fully mapped elsewhere (in verify table).
+ * In any case, we must unmap the header that was mapped above.
*/
- Status = AcpiOsTableOverride (MappedTable, &OverrideTable);
- if (ACPI_SUCCESS (Status) && OverrideTable)
+ FinalTable = AcpiTbTableOverride (Table, TableDesc);
+ if (!FinalTable)
{
- ACPI_INFO ((AE_INFO,
- "%4.4s @ 0x%p Table override, replaced with:",
- MappedTable->Signature, ACPI_CAST_PTR (void, Address)));
-
- AcpiGbl_RootTableList.Tables[TableIndex].Pointer = OverrideTable;
- Address = ACPI_PTR_TO_PHYSADDR (OverrideTable);
-
- TableToInstall = OverrideTable;
- Flags = ACPI_TABLE_ORIGIN_OVERRIDE;
- }
- else
- {
- TableToInstall = MappedTable;
- Flags = ACPI_TABLE_ORIGIN_MAPPED;
+ FinalTable = Table; /* There was no override */
}
- /* Initialize the table entry */
+ AcpiTbPrintTableHeader (TableDesc->Address, FinalTable);
- AcpiGbl_RootTableList.Tables[TableIndex].Address = Address;
- AcpiGbl_RootTableList.Tables[TableIndex].Length = TableToInstall->Length;
- AcpiGbl_RootTableList.Tables[TableIndex].Flags = Flags;
-
- ACPI_MOVE_32_TO_32 (
- &(AcpiGbl_RootTableList.Tables[TableIndex].Signature),
- TableToInstall->Signature);
-
- AcpiTbPrintTableHeader (Address, TableToInstall);
+ /* Set the global integer width (based upon revision of the DSDT) */
if (TableIndex == ACPI_TABLE_INDEX_DSDT)
{
- /* Global integer width is based upon revision of the DSDT */
-
- AcpiUtSetIntegerWidth (TableToInstall->Revision);
+ AcpiUtSetIntegerWidth (FinalTable->Revision);
}
UnmapAndExit:
- AcpiOsUnmapMemory (MappedTable, sizeof (ACPI_TABLE_HEADER));
+
+ /* Always unmap the table header that we mapped above */
+
+ AcpiOsUnmapMemory (Table, sizeof (ACPI_TABLE_HEADER));
}
diff --git a/tables/tbxface.c b/source/components/tables/tbxface.c
index 58dae6935d62..58dae6935d62 100644
--- a/tables/tbxface.c
+++ b/source/components/tables/tbxface.c
diff --git a/tables/tbxfroot.c b/source/components/tables/tbxfroot.c
index 17e52ef7f4ec..17e52ef7f4ec 100644
--- a/tables/tbxfroot.c
+++ b/source/components/tables/tbxfroot.c
diff --git a/utilities/utaddress.c b/source/components/utilities/utaddress.c
index 0b357b681b51..0b357b681b51 100644
--- a/utilities/utaddress.c
+++ b/source/components/utilities/utaddress.c
diff --git a/utilities/utalloc.c b/source/components/utilities/utalloc.c
index d2eb11edcb6f..d2eb11edcb6f 100644
--- a/utilities/utalloc.c
+++ b/source/components/utilities/utalloc.c
diff --git a/utilities/utcache.c b/source/components/utilities/utcache.c
index 7b3abe2894ca..7b3abe2894ca 100644
--- a/utilities/utcache.c
+++ b/source/components/utilities/utcache.c
diff --git a/utilities/utclib.c b/source/components/utilities/utclib.c
index d0153ec5d295..d0153ec5d295 100644
--- a/utilities/utclib.c
+++ b/source/components/utilities/utclib.c
diff --git a/utilities/utcopy.c b/source/components/utilities/utcopy.c
index ab04a7a7aac8..ab04a7a7aac8 100644
--- a/utilities/utcopy.c
+++ b/source/components/utilities/utcopy.c
diff --git a/utilities/utdebug.c b/source/components/utilities/utdebug.c
index 051d47b4430a..051d47b4430a 100644
--- a/utilities/utdebug.c
+++ b/source/components/utilities/utdebug.c
diff --git a/utilities/utdecode.c b/source/components/utilities/utdecode.c
index 1554b0e9de68..718d73db4e3b 100644
--- a/utilities/utdecode.c
+++ b/source/components/utilities/utdecode.c
@@ -567,20 +567,21 @@ AcpiUtGetMutexName (
/* Names for Notify() values, used for debug output */
-static const char *AcpiGbl_NotifyValueNames[] =
+static const char *AcpiGbl_NotifyValueNames[ACPI_NOTIFY_MAX + 1] =
{
- "Bus Check",
- "Device Check",
- "Device Wake",
- "Eject Request",
- "Device Check Light",
- "Frequency Mismatch",
- "Bus Mode Mismatch",
- "Power Fault",
- "Capabilities Check",
- "Device PLD Check",
- "Reserved",
- "System Locality Update"
+ /* 00 */ "Bus Check",
+ /* 01 */ "Device Check",
+ /* 02 */ "Device Wake",
+ /* 03 */ "Eject Request",
+ /* 04 */ "Device Check Light",
+ /* 05 */ "Frequency Mismatch",
+ /* 06 */ "Bus Mode Mismatch",
+ /* 07 */ "Power Fault",
+ /* 08 */ "Capabilities Check",
+ /* 09 */ "Device PLD Check",
+ /* 10 */ "Reserved",
+ /* 11 */ "System Locality Update",
+ /* 12 */ "Shutdown Request"
};
const char *
@@ -596,9 +597,13 @@ AcpiUtGetNotifyName (
{
return ("Reserved");
}
- else /* Greater or equal to 0x80 */
+ else if (NotifyValue <= ACPI_MAX_DEVICE_SPECIFIC_NOTIFY)
{
- return ("**Device Specific**");
+ return ("Device Specific");
+ }
+ else
+ {
+ return ("Hardware Specific");
}
}
#endif
diff --git a/utilities/utdelete.c b/source/components/utilities/utdelete.c
index 90baa15d225e..90baa15d225e 100644
--- a/utilities/utdelete.c
+++ b/source/components/utilities/utdelete.c
diff --git a/utilities/uteval.c b/source/components/utilities/uteval.c
index 0bcb894b5889..0bcb894b5889 100644
--- a/utilities/uteval.c
+++ b/source/components/utilities/uteval.c
diff --git a/utilities/utglobal.c b/source/components/utilities/utglobal.c
index eab2d186295c..faccfb201bb6 100644
--- a/utilities/utglobal.c
+++ b/source/components/utilities/utglobal.c
@@ -155,6 +155,7 @@ const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames[] =
};
+#if (!ACPI_REDUCED_HARDWARE)
/******************************************************************************
*
* Event and Hardware globals
@@ -199,6 +200,7 @@ ACPI_FIXED_EVENT_INFO AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS] =
/* ACPI_EVENT_SLEEP_BUTTON */ {ACPI_BITREG_SLEEP_BUTTON_STATUS, ACPI_BITREG_SLEEP_BUTTON_ENABLE, ACPI_BITMASK_SLEEP_BUTTON_STATUS, ACPI_BITMASK_SLEEP_BUTTON_ENABLE},
/* ACPI_EVENT_RTC */ {ACPI_BITREG_RT_CLOCK_STATUS, ACPI_BITREG_RT_CLOCK_ENABLE, ACPI_BITMASK_RT_CLOCK_STATUS, ACPI_BITMASK_RT_CLOCK_ENABLE},
};
+#endif /* !ACPI_REDUCED_HARDWARE */
/*******************************************************************************
@@ -269,6 +271,8 @@ AcpiUtInitGlobals (
AcpiFixedEventCount[i] = 0;
}
+#if (!ACPI_REDUCED_HARDWARE)
+
/* GPE support */
AcpiGbl_AllGpesInitialized = FALSE;
@@ -277,6 +281,10 @@ AcpiUtInitGlobals (
AcpiGbl_GpeFadtBlocks[1] = NULL;
AcpiCurrentGpeCount = 0;
+ AcpiGbl_GlobalEventHandler = NULL;
+
+#endif /* !ACPI_REDUCED_HARDWARE */
+
/* Global handlers */
AcpiGbl_SystemNotify.Handler = NULL;
@@ -285,7 +293,6 @@ AcpiUtInitGlobals (
AcpiGbl_InitHandler = NULL;
AcpiGbl_TableHandler = NULL;
AcpiGbl_InterfaceHandler = NULL;
- AcpiGbl_GlobalEventHandler = NULL;
/* Global Lock support */
diff --git a/utilities/utids.c b/source/components/utilities/utids.c
index 226d8c1631b6..226d8c1631b6 100644
--- a/utilities/utids.c
+++ b/source/components/utilities/utids.c
diff --git a/utilities/utinit.c b/source/components/utilities/utinit.c
index 98c369a5e21c..6831595e686b 100644
--- a/utilities/utinit.c
+++ b/source/components/utilities/utinit.c
@@ -58,21 +58,33 @@
static void AcpiUtTerminate (
void);
+#if (!ACPI_REDUCED_HARDWARE)
+static void
+AcpiUtFreeGpeLists (
+ void);
+
+#else
+
+#define AcpiUtFreeGpeLists()
+#endif /* !ACPI_REDUCED_HARDWARE */
+
+
+#if (!ACPI_REDUCED_HARDWARE)
/******************************************************************************
*
- * FUNCTION: AcpiUtTerminate
+ * FUNCTION: AcpiUtFreeGpeLists
*
* PARAMETERS: none
*
* RETURN: none
*
- * DESCRIPTION: Free global memory
+ * DESCRIPTION: Free global GPE lists
*
******************************************************************************/
static void
-AcpiUtTerminate (
+AcpiUtFreeGpeLists (
void)
{
ACPI_GPE_BLOCK_INFO *GpeBlock;
@@ -81,9 +93,6 @@ AcpiUtTerminate (
ACPI_GPE_XRUPT_INFO *NextGpeXruptInfo;
- ACPI_FUNCTION_TRACE (UtTerminate);
-
-
/* Free global GPE blocks and related info structures */
GpeXruptInfo = AcpiGbl_GpeXruptListHead;
@@ -103,7 +112,29 @@ AcpiUtTerminate (
ACPI_FREE (GpeXruptInfo);
GpeXruptInfo = NextGpeXruptInfo;
}
+}
+#endif /* !ACPI_REDUCED_HARDWARE */
+
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiUtTerminate
+ *
+ * PARAMETERS: none
+ *
+ * RETURN: none
+ *
+ * DESCRIPTION: Free global memory
+ *
+ ******************************************************************************/
+
+static void
+AcpiUtTerminate (
+ void)
+{
+ ACPI_FUNCTION_TRACE (UtTerminate);
+ AcpiUtFreeGpeLists ();
AcpiUtDeleteAddressLists ();
return_VOID;
}
diff --git a/utilities/utlock.c b/source/components/utilities/utlock.c
index 61585ad499cd..61585ad499cd 100644
--- a/utilities/utlock.c
+++ b/source/components/utilities/utlock.c
diff --git a/utilities/utmath.c b/source/components/utilities/utmath.c
index d0fad7cb6cab..d0fad7cb6cab 100644
--- a/utilities/utmath.c
+++ b/source/components/utilities/utmath.c
diff --git a/utilities/utmisc.c b/source/components/utilities/utmisc.c
index 062c768e72a0..062c768e72a0 100644
--- a/utilities/utmisc.c
+++ b/source/components/utilities/utmisc.c
diff --git a/utilities/utmutex.c b/source/components/utilities/utmutex.c
index f1cdb0180442..f1cdb0180442 100644
--- a/utilities/utmutex.c
+++ b/source/components/utilities/utmutex.c
diff --git a/utilities/utobject.c b/source/components/utilities/utobject.c
index fea140946c2c..fea140946c2c 100644
--- a/utilities/utobject.c
+++ b/source/components/utilities/utobject.c
diff --git a/utilities/utosi.c b/source/components/utilities/utosi.c
index dcce8a99e18a..dcce8a99e18a 100644
--- a/utilities/utosi.c
+++ b/source/components/utilities/utosi.c
diff --git a/utilities/utresrc.c b/source/components/utilities/utresrc.c
index c2c135b7d233..c2c135b7d233 100644
--- a/utilities/utresrc.c
+++ b/source/components/utilities/utresrc.c
diff --git a/utilities/utstate.c b/source/components/utilities/utstate.c
index 62a1aefec7d4..62a1aefec7d4 100644
--- a/utilities/utstate.c
+++ b/source/components/utilities/utstate.c
diff --git a/utilities/uttrack.c b/source/components/utilities/uttrack.c
index 106cc243ecde..106cc243ecde 100644
--- a/utilities/uttrack.c
+++ b/source/components/utilities/uttrack.c
diff --git a/utilities/utxface.c b/source/components/utilities/utxface.c
index 92f9534cb6c1..3e858c9b0ffe 100644
--- a/utilities/utxface.c
+++ b/source/components/utilities/utxface.c
@@ -50,14 +50,12 @@
#include "acnamesp.h"
#include "acdebug.h"
#include "actables.h"
-#include "acinterp.h"
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME ("utxface")
#ifndef ACPI_ASL_COMPILER
-
/*******************************************************************************
*
* FUNCTION: AcpiInitializeSubsystem
@@ -163,6 +161,8 @@ AcpiEnableSubsystem (
ACPI_FUNCTION_TRACE (AcpiEnableSubsystem);
+#if (!ACPI_REDUCED_HARDWARE)
+
/* Enable ACPI mode */
if (!(Flags & ACPI_NO_ACPI_ENABLE))
@@ -190,6 +190,8 @@ AcpiEnableSubsystem (
return_ACPI_STATUS (Status);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
+
/*
* Install the default OpRegion handlers. These are installed unless
* other handlers have already been installed via the
@@ -207,6 +209,7 @@ AcpiEnableSubsystem (
}
}
+#if (!ACPI_REDUCED_HARDWARE)
/*
* Initialize ACPI Event handling (Fixed and General Purpose)
*
@@ -249,6 +252,8 @@ AcpiEnableSubsystem (
}
}
+#endif /* !ACPI_REDUCED_HARDWARE */
+
return_ACPI_STATUS (Status);
}
diff --git a/utilities/utxferror.c b/source/components/utilities/utxferror.c
index 8ffb27489497..8ffb27489497 100644
--- a/utilities/utxferror.c
+++ b/source/components/utilities/utxferror.c
diff --git a/utilities/utxfmutex.c b/source/components/utilities/utxfmutex.c
index c4784310d3f8..c4784310d3f8 100644
--- a/utilities/utxfmutex.c
+++ b/source/components/utilities/utxfmutex.c
diff --git a/include/acapps.h b/source/include/acapps.h
index 0382ca85475c..0382ca85475c 100644
--- a/include/acapps.h
+++ b/source/include/acapps.h
diff --git a/include/accommon.h b/source/include/accommon.h
index 7e6d05aa8d06..7e6d05aa8d06 100644
--- a/include/accommon.h
+++ b/source/include/accommon.h
diff --git a/include/acconfig.h b/source/include/acconfig.h
index 18825912fd15..7880516e4755 100644
--- a/include/acconfig.h
+++ b/source/include/acconfig.h
@@ -86,6 +86,23 @@
*/
#define ACPI_CHECKSUM_ABORT FALSE
+/*
+ * Generate a version of ACPICA that only supports "reduced hardware"
+ * platforms (as defined in ACPI 5.0). Set to TRUE to generate a specialized
+ * version of ACPICA that ONLY supports the ACPI 5.0 "reduced hardware"
+ * model. In other words, no ACPI hardware is supported.
+ *
+ * If TRUE, this means no support for the following:
+ * PM Event and Control registers
+ * SCI interrupt (and handler)
+ * Fixed Events
+ * General Purpose Events (GPEs)
+ * Global Lock
+ * ACPI PM timer
+ * FACS table (Waking vectors and Global Lock)
+ */
+#define ACPI_REDUCED_HARDWARE FALSE
+
/******************************************************************************
*
@@ -95,7 +112,7 @@
/* Version of ACPI supported */
-#define ACPI_CA_SUPPORT_LEVEL 3
+#define ACPI_CA_SUPPORT_LEVEL 5
/* Maximum count for a semaphore object */
diff --git a/include/acdebug.h b/source/include/acdebug.h
index 33470fbb3605..bcc505c8d511 100644
--- a/include/acdebug.h
+++ b/source/include/acdebug.h
@@ -137,18 +137,20 @@ void
AcpiDbDisplayResources (
char *ObjectArg);
+ACPI_HW_DEPENDENT_RETURN_VOID (
void
AcpiDbDisplayGpes (
- void);
+ void))
void
AcpiDbDisplayHandlers (
void);
+ACPI_HW_DEPENDENT_RETURN_VOID (
void
AcpiDbGenerateGpe (
char *GpeArg,
- char *BlockArg);
+ char *BlockArg))
/*
diff --git a/include/acdisasm.h b/source/include/acdisasm.h
index 9ec12713b499..9ec12713b499 100644
--- a/include/acdisasm.h
+++ b/source/include/acdisasm.h
diff --git a/include/acdispat.h b/source/include/acdispat.h
index 0699ee77a1af..0699ee77a1af 100644
--- a/include/acdispat.h
+++ b/source/include/acdispat.h
diff --git a/include/acevents.h b/source/include/acevents.h
index 142c24730ba2..3b874f10759e 100644
--- a/include/acevents.h
+++ b/source/include/acevents.h
@@ -85,13 +85,15 @@ ACPI_STATUS
AcpiEvInitGlobalLockHandler (
void);
+ACPI_HW_DEPENDENT_RETURN_OK (
ACPI_STATUS
AcpiEvAcquireGlobalLock(
- UINT16 Timeout);
+ UINT16 Timeout))
+ACPI_HW_DEPENDENT_RETURN_OK (
ACPI_STATUS
AcpiEvReleaseGlobalLock(
- void);
+ void))
ACPI_STATUS
AcpiEvRemoveGlobalLockHandler (
@@ -154,9 +156,10 @@ AcpiEvInitializeGpeBlock (
ACPI_GPE_BLOCK_INFO *GpeBlock,
void *Context);
+ACPI_HW_DEPENDENT_RETURN_OK (
ACPI_STATUS
AcpiEvDeleteGpeBlock (
- ACPI_GPE_BLOCK_INFO *GpeBlock);
+ ACPI_GPE_BLOCK_INFO *GpeBlock))
UINT32
AcpiEvGpeDispatch (
@@ -171,9 +174,10 @@ ACPI_STATUS
AcpiEvGpeInitialize (
void);
+ACPI_HW_DEPENDENT_RETURN_VOID (
void
AcpiEvUpdateGpes (
- ACPI_OWNER_ID TableOwnerId);
+ ACPI_OWNER_ID TableOwnerId))
ACPI_STATUS
AcpiEvMatchGpeMethod (
@@ -335,9 +339,9 @@ UINT32
AcpiEvInitializeSCI (
UINT32 ProgramSCI);
+ACPI_HW_DEPENDENT_RETURN_VOID (
void
AcpiEvTerminate (
- void);
-
+ void))
#endif /* __ACEVENTS_H__ */
diff --git a/include/acexcep.h b/source/include/acexcep.h
index 9262d7bcb302..10f5a113da8e 100644
--- a/include/acexcep.h
+++ b/source/include/acexcep.h
@@ -92,8 +92,9 @@
#define AE_SAME_HANDLER (ACPI_STATUS) (0x0019 | AE_CODE_ENVIRONMENTAL)
#define AE_NO_HANDLER (ACPI_STATUS) (0x001A | AE_CODE_ENVIRONMENTAL)
#define AE_OWNER_ID_LIMIT (ACPI_STATUS) (0x001B | AE_CODE_ENVIRONMENTAL)
+#define AE_NOT_CONFIGURED (ACPI_STATUS) (0x001C | AE_CODE_ENVIRONMENTAL)
-#define AE_CODE_ENV_MAX 0x001B
+#define AE_CODE_ENV_MAX 0x001C
/*
@@ -222,7 +223,8 @@ char const *AcpiGbl_ExceptionNames_Env[] =
"AE_ABORT_METHOD",
"AE_SAME_HANDLER",
"AE_NO_HANDLER",
- "AE_OWNER_ID_LIMIT"
+ "AE_OWNER_ID_LIMIT",
+ "AE_NOT_CONFIGURED"
};
char const *AcpiGbl_ExceptionNames_Pgm[] =
diff --git a/include/acglobal.h b/source/include/acglobal.h
index 6b45877d8529..edf33d68ed7d 100644
--- a/include/acglobal.h
+++ b/source/include/acglobal.h
@@ -150,8 +150,7 @@ BOOLEAN AcpiGbl_SystemAwakeAndRunning;
*/
BOOLEAN AcpiGbl_ReducedHardware;
-
-#endif
+#endif /* DEFINE_ACPI_GLOBALS */
/* Do not disassemble buffers to resource descriptors */
@@ -168,8 +167,12 @@ ACPI_EXTERN UINT8 ACPI_INIT_GLOBAL (AcpiGbl_NoResourceDisassembly, FALSE);
* found in the RSDT/XSDT.
*/
ACPI_EXTERN ACPI_TABLE_LIST AcpiGbl_RootTableList;
+
+#if (!ACPI_REDUCED_HARDWARE)
ACPI_EXTERN ACPI_TABLE_FACS *AcpiGbl_FACS;
+#endif /* !ACPI_REDUCED_HARDWARE */
+
/* These addresses are calculated from the FADT Event Block addresses */
ACPI_EXTERN ACPI_GENERIC_ADDRESS AcpiGbl_XPm1aStatus;
@@ -381,6 +384,8 @@ ACPI_EXTERN UINT8 AcpiGbl_SleepTypeB;
*
****************************************************************************/
+#if (!ACPI_REDUCED_HARDWARE)
+
ACPI_EXTERN UINT8 AcpiGbl_AllGpesInitialized;
ACPI_EXTERN ACPI_GPE_XRUPT_INFO *AcpiGbl_GpeXruptListHead;
ACPI_EXTERN ACPI_GPE_BLOCK_INFO *AcpiGbl_GpeFadtBlocks[ACPI_MAX_GPE_BLOCKS];
@@ -389,6 +394,7 @@ ACPI_EXTERN void *AcpiGbl_GlobalEventHandlerContext;
ACPI_EXTERN ACPI_FIXED_EVENT_HANDLER AcpiGbl_FixedEventHandlers[ACPI_NUM_FIXED_EVENTS];
extern ACPI_FIXED_EVENT_INFO AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS];
+#endif /* !ACPI_REDUCED_HARDWARE */
/*****************************************************************************
*
diff --git a/include/achware.h b/source/include/achware.h
index e808be4cbc55..004795dbfa12 100644
--- a/include/achware.h
+++ b/source/include/achware.h
@@ -110,6 +110,43 @@ AcpiHwClearAcpiStatus (
/*
+ * hwsleep - sleep/wake support (Legacy sleep registers)
+ */
+ACPI_STATUS
+AcpiHwLegacySleep (
+ UINT8 SleepState);
+
+ACPI_STATUS
+AcpiHwLegacyWakePrep (
+ UINT8 SleepState);
+
+ACPI_STATUS
+AcpiHwLegacyWake (
+ UINT8 SleepState);
+
+
+/*
+ * hwesleep - sleep/wake support (Extended FADT-V5 sleep registers)
+ */
+void
+AcpiHwExecuteSleepMethod (
+ char *MethodName,
+ UINT32 IntegerArgument);
+
+ACPI_STATUS
+AcpiHwExtendedSleep (
+ UINT8 SleepState);
+
+ACPI_STATUS
+AcpiHwExtendedWakePrep (
+ UINT8 SleepState);
+
+ACPI_STATUS
+AcpiHwExtendedWake (
+ UINT8 SleepState);
+
+
+/*
* hwvalid - Port I/O with validation
*/
ACPI_STATUS
@@ -188,22 +225,4 @@ AcpiHwDerivePciId (
ACPI_HANDLE PciRegion);
-/*
- * hwtimer - ACPI Timer prototypes
- */
-ACPI_STATUS
-AcpiGetTimerResolution (
- UINT32 *Resolution);
-
-ACPI_STATUS
-AcpiGetTimer (
- UINT32 *Ticks);
-
-ACPI_STATUS
-AcpiGetTimerDuration (
- UINT32 StartTicks,
- UINT32 EndTicks,
- UINT32 *TimeElapsed);
-
-
#endif /* __ACHWARE_H__ */
diff --git a/include/acinterp.h b/source/include/acinterp.h
index 45e9814f7930..45e9814f7930 100644
--- a/include/acinterp.h
+++ b/source/include/acinterp.h
diff --git a/include/aclocal.h b/source/include/aclocal.h
index d29a72157639..d29a72157639 100644
--- a/include/aclocal.h
+++ b/source/include/aclocal.h
diff --git a/include/acmacros.h b/source/include/acmacros.h
index a0be136bf9be..cdb9cb109e06 100644
--- a/include/acmacros.h
+++ b/source/include/acmacros.h
@@ -428,7 +428,6 @@
#endif /* ACPI_SIMPLE_RETURN_MACROS */
-
/* Conditional execution */
#define ACPI_DEBUG_EXEC(a) a
@@ -477,6 +476,14 @@
#endif /* ACPI_DEBUG_OUTPUT */
+
+#if (!ACPI_REDUCED_HARDWARE)
+#define ACPI_HW_OPTIONAL_FUNCTION(addr) addr
+#else
+#define ACPI_HW_OPTIONAL_FUNCTION(addr) NULL
+#endif
+
+
/*
* Some code only gets executed when the debugger is built in.
* Note that this is entirely independent of whether the
diff --git a/include/acnames.h b/source/include/acnames.h
index f0bbde8541c1..f0bbde8541c1 100644
--- a/include/acnames.h
+++ b/source/include/acnames.h
diff --git a/include/acnamesp.h b/source/include/acnamesp.h
index 5e22cb538895..5e22cb538895 100644
--- a/include/acnamesp.h
+++ b/source/include/acnamesp.h
diff --git a/include/acobject.h b/source/include/acobject.h
index 41a8e086491f..41a8e086491f 100644
--- a/include/acobject.h
+++ b/source/include/acobject.h
diff --git a/include/acopcode.h b/source/include/acopcode.h
index e182a07e6197..e182a07e6197 100644
--- a/include/acopcode.h
+++ b/source/include/acopcode.h
diff --git a/include/acoutput.h b/source/include/acoutput.h
index 88c1cab71221..88c1cab71221 100644
--- a/include/acoutput.h
+++ b/source/include/acoutput.h
diff --git a/include/acparser.h b/source/include/acparser.h
index f46d3cbc2ca9..f46d3cbc2ca9 100644
--- a/include/acparser.h
+++ b/source/include/acparser.h
diff --git a/include/acpi.h b/source/include/acpi.h
index aa40219112b7..aa40219112b7 100644
--- a/include/acpi.h
+++ b/source/include/acpi.h
diff --git a/include/acpiosxf.h b/source/include/acpiosxf.h
index 43076c954424..b79d0e6ade4e 100644
--- a/include/acpiosxf.h
+++ b/source/include/acpiosxf.h
@@ -112,6 +112,12 @@ AcpiOsTableOverride (
ACPI_TABLE_HEADER *ExistingTable,
ACPI_TABLE_HEADER **NewTable);
+ACPI_STATUS
+AcpiOsPhysicalTableOverride (
+ ACPI_TABLE_HEADER *ExistingTable,
+ ACPI_PHYSICAL_ADDRESS *NewAddress,
+ UINT32 *NewTableLength);
+
/*
* Spinlock primitives
@@ -302,13 +308,13 @@ AcpiOsWritePort (
ACPI_STATUS
AcpiOsReadMemory (
ACPI_PHYSICAL_ADDRESS Address,
- UINT32 *Value,
+ UINT64 *Value,
UINT32 Width);
ACPI_STATUS
AcpiOsWriteMemory (
ACPI_PHYSICAL_ADDRESS Address,
- UINT32 Value,
+ UINT64 Value,
UINT32 Width);
diff --git a/include/acpixf.h b/source/include/acpixf.h
index b98fb65f9cbb..fafa51f8ebf4 100644
--- a/include/acpixf.h
+++ b/source/include/acpixf.h
@@ -48,8 +48,9 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
-#define ACPI_CA_VERSION 0x20120111
+#define ACPI_CA_VERSION 0x20120215
+#include "acconfig.h"
#include "actypes.h"
#include "actbl.h"
@@ -81,6 +82,34 @@ extern UINT8 AcpiGbl_DisableAutoRepair;
/*
+ * Hardware-reduced prototypes. All interfaces that use these macros will
+ * be configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
+ * is set to TRUE.
+ */
+#if (!ACPI_REDUCED_HARDWARE)
+#define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
+ Prototype;
+
+#define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
+ Prototype;
+
+#define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
+ Prototype;
+
+#else
+#define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
+ static ACPI_INLINE Prototype {return(AE_NOT_CONFIGURED);}
+
+#define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
+ static ACPI_INLINE Prototype {return(AE_OK);}
+
+#define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
+ static ACPI_INLINE Prototype {}
+
+#endif /* !ACPI_REDUCED_HARDWARE */
+
+
+/*
* Initialization
*/
ACPI_STATUS
@@ -109,13 +138,15 @@ AcpiTerminate (
/*
* Miscellaneous global interfaces
*/
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiEnable (
- void);
+ void))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiDisable (
- void);
+ void))
ACPI_STATUS
AcpiSubsystemStatus (
@@ -321,35 +352,40 @@ AcpiInstallInitializationHandler (
ACPI_INIT_HANDLER Handler,
UINT32 Function);
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiInstallGlobalEventHandler (
ACPI_GBL_EVENT_HANDLER Handler,
- void *Context);
+ void *Context))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiInstallFixedEventHandler (
UINT32 AcpiEvent,
ACPI_EVENT_HANDLER Handler,
- void *Context);
+ void *Context))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiRemoveFixedEventHandler (
UINT32 AcpiEvent,
- ACPI_EVENT_HANDLER Handler);
+ ACPI_EVENT_HANDLER Handler))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiInstallGpeHandler (
ACPI_HANDLE GpeDevice,
UINT32 GpeNumber,
UINT32 Type,
ACPI_GPE_HANDLER Address,
- void *Context);
+ void *Context))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiRemoveGpeHandler (
ACPI_HANDLE GpeDevice,
UINT32 GpeNumber,
- ACPI_GPE_HANDLER Address);
+ ACPI_GPE_HANDLER Address))
ACPI_STATUS
AcpiInstallNotifyHandler (
@@ -390,14 +426,16 @@ AcpiInstallInterfaceHandler (
/*
* Global Lock interfaces
*/
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiAcquireGlobalLock (
UINT16 Timeout,
- UINT32 *Handle);
+ UINT32 *Handle))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiReleaseGlobalLock (
- UINT32 Handle);
+ UINT32 Handle))
/*
@@ -418,100 +456,118 @@ AcpiReleaseMutex (
/*
* Fixed Event interfaces
*/
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiEnableEvent (
UINT32 Event,
- UINT32 Flags);
+ UINT32 Flags))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiDisableEvent (
UINT32 Event,
- UINT32 Flags);
+ UINT32 Flags))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiClearEvent (
- UINT32 Event);
+ UINT32 Event))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiGetEventStatus (
UINT32 Event,
- ACPI_EVENT_STATUS *EventStatus);
+ ACPI_EVENT_STATUS *EventStatus))
/*
* General Purpose Event (GPE) Interfaces
*/
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiUpdateAllGpes (
- void);
+ void))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiEnableGpe (
ACPI_HANDLE GpeDevice,
- UINT32 GpeNumber);
+ UINT32 GpeNumber))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiDisableGpe (
ACPI_HANDLE GpeDevice,
- UINT32 GpeNumber);
+ UINT32 GpeNumber))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiClearGpe (
ACPI_HANDLE GpeDevice,
- UINT32 GpeNumber);
+ UINT32 GpeNumber))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiSetGpe (
ACPI_HANDLE GpeDevice,
UINT32 GpeNumber,
- UINT8 Action);
+ UINT8 Action))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiFinishGpe (
ACPI_HANDLE GpeDevice,
- UINT32 GpeNumber);
+ UINT32 GpeNumber))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiSetupGpeForWake (
ACPI_HANDLE ParentDevice,
ACPI_HANDLE GpeDevice,
- UINT32 GpeNumber);
+ UINT32 GpeNumber))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiSetGpeWakeMask (
ACPI_HANDLE GpeDevice,
UINT32 GpeNumber,
- UINT8 Action);
+ UINT8 Action))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiGetGpeStatus (
ACPI_HANDLE GpeDevice,
UINT32 GpeNumber,
- ACPI_EVENT_STATUS *EventStatus);
+ ACPI_EVENT_STATUS *EventStatus))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiDisableAllGpes (
- void);
+ void))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiEnableAllRuntimeGpes (
- void);
+ void))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiGetGpeDevice (
UINT32 GpeIndex,
- ACPI_HANDLE *GpeDevice);
+ ACPI_HANDLE *GpeDevice))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiInstallGpeBlock (
ACPI_HANDLE GpeDevice,
ACPI_GENERIC_ADDRESS *GpeBlockAddress,
UINT32 RegisterCount,
- UINT32 InterruptNumber);
+ UINT32 InterruptNumber))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiRemoveGpeBlock (
- ACPI_HANDLE GpeDevice);
+ ACPI_HANDLE GpeDevice))
/*
@@ -590,16 +646,22 @@ AcpiWrite (
UINT64 Value,
ACPI_GENERIC_ADDRESS *Reg);
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiReadBitRegister (
UINT32 RegisterId,
- UINT32 *ReturnValue);
+ UINT32 *ReturnValue))
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiWriteBitRegister (
UINT32 RegisterId,
- UINT32 Value);
+ UINT32 Value))
+
+/*
+ * Sleep/Wake interfaces
+ */
ACPI_STATUS
AcpiGetSleepTypeData (
UINT8 SleepState,
@@ -614,26 +676,54 @@ ACPI_STATUS
AcpiEnterSleepState (
UINT8 SleepState);
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiEnterSleepStateS4bios (
- void);
+ void))
+
+ACPI_STATUS
+AcpiLeaveSleepStatePrep (
+ UINT8 SleepState);
ACPI_STATUS
AcpiLeaveSleepState (
- UINT8 SleepState)
- ;
+ UINT8 SleepState);
+
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiSetFirmwareWakingVector (
- UINT32 PhysicalAddress);
+ UINT32 PhysicalAddress))
#if ACPI_MACHINE_WIDTH == 64
+ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS
AcpiSetFirmwareWakingVector64 (
- UINT64 PhysicalAddress);
+ UINT64 PhysicalAddress))
#endif
/*
+ * ACPI Timer interfaces
+ */
+ACPI_HW_DEPENDENT_RETURN_STATUS (
+ACPI_STATUS
+AcpiGetTimerResolution (
+ UINT32 *Resolution))
+
+ACPI_HW_DEPENDENT_RETURN_STATUS (
+ACPI_STATUS
+AcpiGetTimer (
+ UINT32 *Ticks))
+
+ACPI_HW_DEPENDENT_RETURN_STATUS (
+ACPI_STATUS
+AcpiGetTimerDuration (
+ UINT32 StartTicks,
+ UINT32 EndTicks,
+ UINT32 *TimeElapsed))
+
+
+/*
* Error/Warning output
*/
void ACPI_INTERNAL_VAR_XFACE
diff --git a/include/acpredef.h b/source/include/acpredef.h
index c17a6d914542..c17a6d914542 100644
--- a/include/acpredef.h
+++ b/source/include/acpredef.h
diff --git a/include/acresrc.h b/source/include/acresrc.h
index c879fdc4a3f1..c879fdc4a3f1 100644
--- a/include/acresrc.h
+++ b/source/include/acresrc.h
diff --git a/include/acrestyp.h b/source/include/acrestyp.h
index b927c9c58eb4..b927c9c58eb4 100644
--- a/include/acrestyp.h
+++ b/source/include/acrestyp.h
diff --git a/include/acstruct.h b/source/include/acstruct.h
index b3927caa41fa..b3927caa41fa 100644
--- a/include/acstruct.h
+++ b/source/include/acstruct.h
diff --git a/include/actables.h b/source/include/actables.h
index 4277ff5e9ba1..26a7947dc97b 100644
--- a/include/actables.h
+++ b/source/include/actables.h
@@ -84,6 +84,11 @@ ACPI_STATUS
AcpiTbVerifyTable (
ACPI_TABLE_DESC *TableDesc);
+ACPI_TABLE_HEADER *
+AcpiTbTableOverride (
+ ACPI_TABLE_HEADER *TableHeader,
+ ACPI_TABLE_DESC *TableDesc);
+
ACPI_STATUS
AcpiTbAddTable (
ACPI_TABLE_DESC *TableDesc,
diff --git a/include/actbl.h b/source/include/actbl.h
index 37a306365b7f..7da7378d140c 100644
--- a/include/actbl.h
+++ b/source/include/actbl.h
@@ -354,6 +354,13 @@ enum AcpiPreferedPmProfiles
PM_TABLET = 8
};
+/* Values for SleepStatus and SleepControl registers (V5 FADT) */
+
+#define ACPI_X_WAKE_STATUS 0x80
+#define ACPI_X_SLEEP_TYPE_MASK 0x1C
+#define ACPI_X_SLEEP_TYPE_POSITION 0x02
+#define ACPI_X_SLEEP_ENABLE 0x20
+
/* Reset to default packing */
diff --git a/include/actbl1.h b/source/include/actbl1.h
index 824135d3dd2d..824135d3dd2d 100644
--- a/include/actbl1.h
+++ b/source/include/actbl1.h
diff --git a/include/actbl2.h b/source/include/actbl2.h
index 70c6a09a3c3f..70c6a09a3c3f 100644
--- a/include/actbl2.h
+++ b/source/include/actbl2.h
diff --git a/include/actbl3.h b/source/include/actbl3.h
index c5dd4184dd51..c5dd4184dd51 100644
--- a/include/actbl3.h
+++ b/source/include/actbl3.h
diff --git a/include/actypes.h b/source/include/actypes.h
index 2d78c0b962d3..30d9088b8eb4 100644
--- a/include/actypes.h
+++ b/source/include/actypes.h
@@ -534,8 +534,9 @@ typedef UINT64 ACPI_INTEGER;
#define ACPI_NOTIFY_DEVICE_PLD_CHECK (UINT8) 0x09
#define ACPI_NOTIFY_RESERVED (UINT8) 0x0A
#define ACPI_NOTIFY_LOCALITY_UPDATE (UINT8) 0x0B
+#define ACPI_NOTIFY_SHUTDOWN_REQUEST (UINT8) 0x0C
-#define ACPI_NOTIFY_MAX 0x0B
+#define ACPI_NOTIFY_MAX 0x0C
/*
* Types associated with ACPI names and objects. The first group of
@@ -701,7 +702,8 @@ typedef UINT32 ACPI_EVENT_STATUS;
#define ACPI_ALL_NOTIFY (ACPI_SYSTEM_NOTIFY | ACPI_DEVICE_NOTIFY)
#define ACPI_MAX_NOTIFY_HANDLER_TYPE 0x3
-#define ACPI_MAX_SYS_NOTIFY 0x7f
+#define ACPI_MAX_SYS_NOTIFY 0x7F
+#define ACPI_MAX_DEVICE_SPECIFIC_NOTIFY 0xBF
/* Address Space (Operation Region) Types */
@@ -792,6 +794,19 @@ typedef UINT8 ACPI_ADR_SPACE_TYPE;
#define ACPI_DISABLE_EVENT 0
+/* Sleep function dispatch */
+
+typedef ACPI_STATUS (*ACPI_SLEEP_FUNCTION) (
+ UINT8 SleepState);
+
+typedef struct acpi_sleep_functions
+{
+ ACPI_SLEEP_FUNCTION LegacyFunction;
+ ACPI_SLEEP_FUNCTION ExtendedFunction;
+
+} ACPI_SLEEP_FUNCTIONS;
+
+
/*
* External ACPI object definition
*/
diff --git a/include/acutils.h b/source/include/acutils.h
index e9c9b95dda1d..e9c9b95dda1d 100644
--- a/include/acutils.h
+++ b/source/include/acutils.h
diff --git a/include/amlcode.h b/source/include/amlcode.h
index f778bb07805b..f778bb07805b 100644
--- a/include/amlcode.h
+++ b/source/include/amlcode.h
diff --git a/include/amlresrc.h b/source/include/amlresrc.h
index 6d85b8a2d05b..6d85b8a2d05b 100644
--- a/include/amlresrc.h
+++ b/source/include/amlresrc.h
diff --git a/include/platform/accygwin.h b/source/include/platform/accygwin.h
index 831f31398792..831f31398792 100644
--- a/include/platform/accygwin.h
+++ b/source/include/platform/accygwin.h
diff --git a/include/platform/acefi.h b/source/include/platform/acefi.h
index bab6159381ac..bab6159381ac 100644
--- a/include/platform/acefi.h
+++ b/source/include/platform/acefi.h
diff --git a/include/platform/acenv.h b/source/include/platform/acenv.h
index 19ca03baacc6..19ca03baacc6 100644
--- a/include/platform/acenv.h
+++ b/source/include/platform/acenv.h
diff --git a/include/platform/acfreebsd.h b/source/include/platform/acfreebsd.h
index 98f972f373e1..98f972f373e1 100644
--- a/include/platform/acfreebsd.h
+++ b/source/include/platform/acfreebsd.h
diff --git a/include/platform/acgcc.h b/source/include/platform/acgcc.h
index d2eafff39584..d2eafff39584 100644
--- a/include/platform/acgcc.h
+++ b/source/include/platform/acgcc.h
diff --git a/include/platform/acintel.h b/source/include/platform/acintel.h
index 46d238bedb86..46d238bedb86 100644
--- a/include/platform/acintel.h
+++ b/source/include/platform/acintel.h
diff --git a/include/platform/aclinux.h b/source/include/platform/aclinux.h
index edfff150ed58..edfff150ed58 100644
--- a/include/platform/aclinux.h
+++ b/source/include/platform/aclinux.h
diff --git a/include/platform/acmsvc.h b/source/include/platform/acmsvc.h
index b73a62caf1d5..b73a62caf1d5 100644
--- a/include/platform/acmsvc.h
+++ b/source/include/platform/acmsvc.h
diff --git a/include/platform/acnetbsd.h b/source/include/platform/acnetbsd.h
index 23b0e8c4c3f1..23b0e8c4c3f1 100644
--- a/include/platform/acnetbsd.h
+++ b/source/include/platform/acnetbsd.h
diff --git a/include/platform/acos2.h b/source/include/platform/acos2.h
index 0704c50161f7..0704c50161f7 100644
--- a/include/platform/acos2.h
+++ b/source/include/platform/acos2.h
diff --git a/include/platform/acwin.h b/source/include/platform/acwin.h
index c7d4bcd3860e..c7d4bcd3860e 100644
--- a/include/platform/acwin.h
+++ b/source/include/platform/acwin.h
diff --git a/include/platform/acwin64.h b/source/include/platform/acwin64.h
index 022baf050e71..022baf050e71 100644
--- a/include/platform/acwin64.h
+++ b/source/include/platform/acwin64.h
diff --git a/os_specific/service_layers/osunixdir.c b/source/os_specific/service_layers/osunixdir.c
index 20b153c3d485..20b153c3d485 100644
--- a/os_specific/service_layers/osunixdir.c
+++ b/source/os_specific/service_layers/osunixdir.c
diff --git a/os_specific/service_layers/osunixxf.c b/source/os_specific/service_layers/osunixxf.c
index 8e0581b9f238..a0899d208d2a 100644
--- a/os_specific/service_layers/osunixxf.c
+++ b/source/os_specific/service_layers/osunixxf.c
@@ -214,6 +214,33 @@ AcpiOsTableOverride (
/******************************************************************************
*
+ * FUNCTION: AcpiOsPhysicalTableOverride
+ *
+ * PARAMETERS: ExistingTable - Header of current table (probably firmware)
+ * NewAddress - Where new table address is returned
+ * (Physical address)
+ * NewTableLength - Where new table length is returned
+ *
+ * RETURN: Status, address/length of new table. Null pointer returned
+ * if no table is available to override.
+ *
+ * DESCRIPTION: Returns AE_SUPPORT, function not used in user space.
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+AcpiOsPhysicalTableOverride (
+ ACPI_TABLE_HEADER *ExistingTable,
+ ACPI_PHYSICAL_ADDRESS *NewAddress,
+ UINT32 *NewTableLength)
+{
+
+ return (AE_SUPPORT);
+}
+
+
+/******************************************************************************
+ *
* FUNCTION: AcpiOsRedirectOutput
*
* PARAMETERS: Destination - An open file handle/pointer
@@ -1017,9 +1044,10 @@ AcpiOsWritePort (
*
* PARAMETERS: Address - Physical Memory Address to read
* Value - Where value is placed
- * Width - Number of bits
+ * Width - Number of bits (8,16,32, or 64)
*
- * RETURN: Value read from physical memory address
+ * RETURN: Value read from physical memory address. Always returned
+ * as a 64-bit integer, regardless of the read width.
*
* DESCRIPTION: Read data from a physical memory address
*
@@ -1028,7 +1056,7 @@ AcpiOsWritePort (
ACPI_STATUS
AcpiOsReadMemory (
ACPI_PHYSICAL_ADDRESS Address,
- UINT32 *Value,
+ UINT64 *Value,
UINT32 Width)
{
@@ -1037,6 +1065,7 @@ AcpiOsReadMemory (
case 8:
case 16:
case 32:
+ case 64:
*Value = 0;
break;
@@ -1053,7 +1082,7 @@ AcpiOsReadMemory (
*
* PARAMETERS: Address - Physical Memory Address to write
* Value - Value to write
- * Width - Number of bits
+ * Width - Number of bits (8,16,32, or 64)
*
* RETURN: None
*
@@ -1064,7 +1093,7 @@ AcpiOsReadMemory (
ACPI_STATUS
AcpiOsWriteMemory (
ACPI_PHYSICAL_ADDRESS Address,
- UINT32 Value,
+ UINT64 Value,
UINT32 Width)
{
diff --git a/os_specific/service_layers/oswindir.c b/source/os_specific/service_layers/oswindir.c
index 2cdcb945860b..2cdcb945860b 100644
--- a/os_specific/service_layers/oswindir.c
+++ b/source/os_specific/service_layers/oswindir.c
diff --git a/os_specific/service_layers/oswintbl.c b/source/os_specific/service_layers/oswintbl.c
index db34966a0d9e..db34966a0d9e 100644
--- a/os_specific/service_layers/oswintbl.c
+++ b/source/os_specific/service_layers/oswintbl.c
diff --git a/os_specific/service_layers/oswinxf.c b/source/os_specific/service_layers/oswinxf.c
index 097971df852a..008dcb30c536 100644
--- a/os_specific/service_layers/oswinxf.c
+++ b/source/os_specific/service_layers/oswinxf.c
@@ -289,6 +289,33 @@ AcpiOsTableOverride (
/******************************************************************************
*
+ * FUNCTION: AcpiOsPhysicalTableOverride
+ *
+ * PARAMETERS: ExistingTable - Header of current table (probably firmware)
+ * NewAddress - Where new table address is returned
+ * (Physical address)
+ * NewTableLength - Where new table length is returned
+ *
+ * RETURN: Status, address/length of new table. Null pointer returned
+ * if no table is available to override.
+ *
+ * DESCRIPTION: Returns AE_SUPPORT, function not used in user space.
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+AcpiOsPhysicalTableOverride (
+ ACPI_TABLE_HEADER *ExistingTable,
+ ACPI_PHYSICAL_ADDRESS *NewAddress,
+ UINT32 *NewTableLength)
+{
+
+ return (AE_SUPPORT);
+}
+
+
+/******************************************************************************
+ *
* FUNCTION: AcpiOsGetTimer
*
* PARAMETERS: None
@@ -1227,10 +1254,10 @@ AcpiOsWritePort (
*
* PARAMETERS: Address - Physical Memory Address to read
* Value - Where value is placed
- * Width - Number of bits
+ * Width - Number of bits (8,16,32, or 64)
*
* RETURN: Value read from physical memory address. Always returned
- * as a 32-bit integer, regardless of the read width.
+ * as a 64-bit integer, regardless of the read width.
*
* DESCRIPTION: Read data from a physical memory address
*
@@ -1239,7 +1266,7 @@ AcpiOsWritePort (
ACPI_STATUS
AcpiOsReadMemory (
ACPI_PHYSICAL_ADDRESS Address,
- UINT32 *Value,
+ UINT64 *Value,
UINT32 Width)
{
@@ -1248,6 +1275,7 @@ AcpiOsReadMemory (
case 8:
case 16:
case 32:
+ case 64:
*Value = 0;
break;
@@ -1266,7 +1294,7 @@ AcpiOsReadMemory (
*
* PARAMETERS: Address - Physical Memory Address to write
* Value - Value to write
- * Width - Number of bits
+ * Width - Number of bits (8,16,32, or 64)
*
* RETURN: None
*
@@ -1277,7 +1305,7 @@ AcpiOsReadMemory (
ACPI_STATUS
AcpiOsWriteMemory (
ACPI_PHYSICAL_ADDRESS Address,
- UINT32 Value,
+ UINT64 Value,
UINT32 Width)
{
diff --git a/tools/acpibin/Makefile b/source/tools/acpibin/Makefile
index f784a20e474f..f15141bb2d78 100644
--- a/tools/acpibin/Makefile
+++ b/source/tools/acpibin/Makefile
@@ -1,9 +1,8 @@
#
# acpibin - Binary ACPI table utility
#
-# NOTE: This makefile is intended to be used in the Linux environment,
-# with the Linux directory structure. It will not work directly
-# on the native ACPICA source tree.
+# NOTE: This makefile is intended to be used within the native
+# ACPICA source tree.
#
#
@@ -21,13 +20,22 @@ HOST = _LINUX
NOMAN = YES
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $<
-ACPICA_COMPONENTS =
-ACPICA_SRC = ../..
-ACPICA_INCLUDE = $(ACPICA_SRC)/include
+ACPICA_SRC = ../../../source
ACPICA_COMMON = $(ACPICA_SRC)/common
-ACPICA_CORE = $(ACPICA_SRC)$(ACPICA_COMPONENTS)
ACPICA_TOOLS = $(ACPICA_SRC)/tools
ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers
+ACPICA_CORE = $(ACPICA_SRC)/components
+ACPICA_INCLUDE = $(ACPICA_SRC)/include
+ACPICA_DEBUGGER = $(ACPICA_CORE)/debugger
+ACPICA_DISASSEMBLER = $(ACPICA_CORE)/disassembler
+ACPICA_DISPATCHER = $(ACPICA_CORE)/dispatcher
+ACPICA_EVENTS = $(ACPICA_CORE)/events
+ACPICA_EXECUTER = $(ACPICA_CORE)/executer
+ACPICA_HARDWARE = $(ACPICA_CORE)/hardware
+ACPICA_NAMESPACE = $(ACPICA_CORE)/namespace
+ACPICA_PARSER = $(ACPICA_CORE)/parser
+ACPICA_RESOURCES = $(ACPICA_CORE)/resources
+ACPICA_TABLES = $(ACPICA_CORE)/tables
ACPICA_UTILITIES = $(ACPICA_CORE)/utilities
ACPIBIN = $(ACPICA_TOOLS)/acpibin
INSTALLDIR = /usr/bin
diff --git a/tools/acpibin/abcompare.c b/source/tools/acpibin/abcompare.c
index 46122274d4a9..46122274d4a9 100644
--- a/tools/acpibin/abcompare.c
+++ b/source/tools/acpibin/abcompare.c
diff --git a/tools/acpibin/abmain.c b/source/tools/acpibin/abmain.c
index cb9c329521f0..cb9c329521f0 100644
--- a/tools/acpibin/abmain.c
+++ b/source/tools/acpibin/abmain.c
diff --git a/tools/acpibin/acpibin.h b/source/tools/acpibin/acpibin.h
index 63109cc738cf..63109cc738cf 100644
--- a/tools/acpibin/acpibin.h
+++ b/source/tools/acpibin/acpibin.h
diff --git a/tools/acpiexec/Makefile b/source/tools/acpiexec/Makefile
index fb3ee780f5eb..65a1d84411d6 100644
--- a/tools/acpiexec/Makefile
+++ b/source/tools/acpiexec/Makefile
@@ -3,9 +3,8 @@
# space. Loads ACPI tables, displays the namespace, and allows
# execution of control methods.
#
-# NOTE: This makefile is intended to be used in the Linux environment,
-# with the Linux directory structure. It will not work directly
-# on the native ACPICA source tree.
+# NOTE: This makefile is intended to be used within the native
+# ACPICA source tree.
#
#
@@ -24,13 +23,12 @@ NOMAN = YES
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $<
LDFLAGS += -lpthread -lrt
-ACPICA_COMPONENTS =
-ACPICA_SRC = ../..
-ACPICA_INCLUDE = $(ACPICA_SRC)/include
+ACPICA_SRC = ../../../source
ACPICA_COMMON = $(ACPICA_SRC)/common
-ACPICA_CORE = $(ACPICA_SRC)$(ACPICA_COMPONENTS)
ACPICA_TOOLS = $(ACPICA_SRC)/tools
ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers
+ACPICA_CORE = $(ACPICA_SRC)/components
+ACPICA_INCLUDE = $(ACPICA_SRC)/include
ACPICA_DEBUGGER = $(ACPICA_CORE)/debugger
ACPICA_DISASSEMBLER = $(ACPICA_CORE)/disassembler
ACPICA_DISPATCHER = $(ACPICA_CORE)/dispatcher
@@ -152,12 +150,14 @@ OBJECTS = \
exutils.o \
getopt.o \
hwacpi.o \
+ hwesleep.o \
hwgpe.o \
hwpci.o \
hwregs.o \
hwsleep.o \
hwvalid.o \
hwxface.o \
+ hwxfsleep.o \
nsaccess.o \
nsalloc.o \
nsdump.o \
diff --git a/tools/acpiexec/aecommon.h b/source/tools/acpiexec/aecommon.h
index 0f1b4c1e7569..0f1b4c1e7569 100644
--- a/tools/acpiexec/aecommon.h
+++ b/source/tools/acpiexec/aecommon.h
diff --git a/tools/acpiexec/aeexec.c b/source/tools/acpiexec/aeexec.c
index 464f258ae43d..407519f9648e 100644
--- a/tools/acpiexec/aeexec.c
+++ b/source/tools/acpiexec/aeexec.c
@@ -53,10 +53,6 @@ AeSetupConfiguration (
void *RegionAddr);
static void
-AfInstallGpeBlock (
- void);
-
-static void
AeTestBufferArgument (
void);
@@ -88,6 +84,12 @@ static void
AeGenericRegisters (
void);
+#if (!ACPI_REDUCED_HARDWARE)
+static void
+AfInstallGpeBlock (
+ void);
+#endif /* !ACPI_REDUCED_HARDWARE */
+
extern unsigned char Ssdt3Code[];
@@ -126,6 +128,7 @@ AeSetupConfiguration (
}
+#if (!ACPI_REDUCED_HARDWARE)
/******************************************************************************
*
* FUNCTION: AfInstallGpeBlock
@@ -197,6 +200,7 @@ AfInstallGpeBlock (
AE_CHECK_OK (AcpiInstallGpeBlock, Status);
}
}
+#endif /* !ACPI_REDUCED_HARDWARE */
/* Test using a Buffer object as a method argument */
@@ -465,6 +469,8 @@ static void
AeHardwareInterfaces (
void)
{
+#if (!ACPI_REDUCED_HARDWARE)
+
ACPI_STATUS Status;
UINT32 Value;
@@ -500,6 +506,8 @@ AeHardwareInterfaces (
Status = AcpiReadBitRegister (ACPI_BITREG_ARB_DISABLE, &Value);
AE_CHECK_OK (AcpiReadBitRegister, Status);
+
+#endif /* !ACPI_REDUCED_HARDWARE */
}
@@ -515,14 +523,17 @@ void
AeMiscellaneousTests (
void)
{
- ACPI_HANDLE Handle;
ACPI_BUFFER ReturnBuf;
char Buffer[32];
- ACPI_VENDOR_UUID Uuid = {0, {ACPI_INIT_UUID (0,0,0,0,0,0,0,0,0,0,0)}};
ACPI_STATUS Status;
+ ACPI_STATISTICS Stats;
+
+#if (!ACPI_REDUCED_HARDWARE)
+ ACPI_HANDLE Handle;
+ ACPI_VENDOR_UUID Uuid = {0, {ACPI_INIT_UUID (0,0,0,0,0,0,0,0,0,0,0)}};
UINT32 LockHandle1;
UINT32 LockHandle2;
- ACPI_STATISTICS Stats;
+#endif /* !ACPI_REDUCED_HARDWARE */
AeHardwareInterfaces ();
@@ -568,9 +579,6 @@ AeMiscellaneousTests (
Status = AcpiGetName (AcpiGbl_RootNode, ACPI_FULL_PATHNAME, &ReturnBuf);
AE_CHECK_OK (AcpiGetName, Status);
- Status = AcpiInstallGlobalEventHandler (AeGlobalEventHandler, NULL);
- AE_CHECK_OK (AcpiInstallGlobalEventHandler, Status);
-
/* Get Devices */
Status = AcpiGetDevices (NULL, AeGetDevices, NULL, NULL);
@@ -579,6 +587,12 @@ AeMiscellaneousTests (
Status = AcpiGetStatistics (&Stats);
AE_CHECK_OK (AcpiGetStatistics, Status);
+
+#if (!ACPI_REDUCED_HARDWARE)
+
+ Status = AcpiInstallGlobalEventHandler (AeGlobalEventHandler, NULL);
+ AE_CHECK_OK (AcpiInstallGlobalEventHandler, Status);
+
/* If Hardware Reduced flag is set, we are all done */
if (AcpiGbl_ReducedHardware)
@@ -701,5 +715,6 @@ AeMiscellaneousTests (
Status = AcpiReleaseGlobalLock (LockHandle2);
AE_CHECK_OK (AcpiReleaseGlobalLock, Status);
+#endif /* !ACPI_REDUCED_HARDWARE */
}
diff --git a/tools/acpiexec/aehandlers.c b/source/tools/acpiexec/aehandlers.c
index 89972aacd5e7..f41dd53d31ed 100644
--- a/tools/acpiexec/aehandlers.c
+++ b/source/tools/acpiexec/aehandlers.c
@@ -91,10 +91,19 @@ AeInterfaceHandler (
ACPI_STRING InterfaceName,
UINT32 Supported);
+#if (!ACPI_REDUCED_HARDWARE)
static UINT32
AeEventHandler (
void *Context);
+static char *TableEvents[] =
+{
+ "LOAD",
+ "UNLOAD",
+ "UNKNOWN"
+};
+#endif /* !ACPI_REDUCED_HARDWARE */
+
static UINT32 SigintCount = 0;
static AE_DEBUG_REGIONS AeRegions;
BOOLEAN AcpiGbl_DisplayRegionAccess = FALSE;
@@ -386,20 +395,15 @@ AeExceptionHandler (
*
*****************************************************************************/
-static char *TableEvents[] =
-{
- "LOAD",
- "UNLOAD",
- "UNKNOWN"
-};
-
static ACPI_STATUS
AeTableHandler (
UINT32 Event,
void *Table,
void *Context)
{
+#if (!ACPI_REDUCED_HARDWARE)
ACPI_STATUS Status;
+#endif /* !ACPI_REDUCED_HARDWARE */
if (Event > ACPI_NUM_TABLE_EVENTS)
@@ -407,6 +411,7 @@ AeTableHandler (
Event = ACPI_NUM_TABLE_EVENTS;
}
+#if (!ACPI_REDUCED_HARDWARE)
/* Enable any GPEs associated with newly-loaded GPE methods */
Status = AcpiUpdateAllGpes ();
@@ -414,6 +419,8 @@ AeTableHandler (
printf ("[AcpiExec] Table Event %s, [%4.4s] %p\n",
TableEvents[Event], ((ACPI_TABLE_HEADER *) Table)->Signature, Table);
+#endif /* !ACPI_REDUCED_HARDWARE */
+
return (AE_OK);
}
@@ -526,6 +533,7 @@ AeInterfaceHandler (
}
+#if (!ACPI_REDUCED_HARDWARE)
/******************************************************************************
*
* FUNCTION: AeEventHandler
@@ -540,6 +548,7 @@ AeEventHandler (
{
return (0);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
/******************************************************************************
@@ -590,6 +599,7 @@ AeInstallLateHandlers (
UINT32 i;
+#if (!ACPI_REDUCED_HARDWARE)
if (!AcpiGbl_ReducedHardware)
{
/* Install some fixed event handlers */
@@ -600,6 +610,7 @@ AeInstallLateHandlers (
Status = AcpiInstallFixedEventHandler (ACPI_EVENT_RTC, AeEventHandler, NULL);
AE_CHECK_OK (AcpiInstallFixedEventHandler, Status);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
AeMyContext.Connection = NULL;
AeMyContext.AccessLength = 0xA5;
@@ -848,7 +859,7 @@ AeRegionHandler (
(UINT32) Address));
/*
- * Region support can be disabled with the -r option.
+ * Region support can be disabled with the -do option.
* We use this to support dynamically loaded tables where we pass a valid
* address to the AML.
*/
diff --git a/tools/acpiexec/aemain.c b/source/tools/acpiexec/aemain.c
index a5d519c1e178..a5d519c1e178 100644
--- a/tools/acpiexec/aemain.c
+++ b/source/tools/acpiexec/aemain.c
diff --git a/tools/acpiexec/aetables.c b/source/tools/acpiexec/aetables.c
index de55a5f37772..afada0d71417 100644
--- a/tools/acpiexec/aetables.c
+++ b/source/tools/acpiexec/aetables.c
@@ -113,7 +113,7 @@ AeTableOverride (
/* This code tests override of dynamically loaded tables */
- else if (ACPI_COMPARE_NAME (ExistingTable->Signature, "TSDT"))
+ else if (ACPI_COMPARE_NAME (ExistingTable->Signature, "OEM9"))
{
*NewTable = ACPI_CAST_PTR (ACPI_TABLE_HEADER, Ssdt3Code);
}
diff --git a/tools/acpiexec/aetables.h b/source/tools/acpiexec/aetables.h
index 1e8ab21d425b..16b3e896d699 100644
--- a/tools/acpiexec/aetables.h
+++ b/source/tools/acpiexec/aetables.h
@@ -91,10 +91,10 @@ static unsigned char Ssdt2Code[] = /* Has method _T99 */
0x39,0x39,0x00,0x70,0x0A,0x04,0x60,0xA4, /* 00000028 "99.p..`." */
};
-unsigned char Ssdt3Code[] = /* Has method _T97 */
+unsigned char Ssdt3Code[] = /* OEM9: Has method _T97 */
{
- 0x54,0x53,0x44,0x54,0x30,0x00,0x00,0x00, /* 00000000 "TSDT0..." */
- 0x01,0xB8,0x49,0x6E,0x74,0x65,0x6C,0x00, /* 00000008 "..Intel." */
+ 0x4F,0x45,0x4D,0x39,0x30,0x00,0x00,0x00, /* 00000000 "OEM10..." */
+ 0x01,0xDD,0x49,0x6E,0x74,0x65,0x6C,0x00, /* 00000008 "..Intel." */
0x4D,0x61,0x6E,0x79,0x00,0x00,0x00,0x00, /* 00000010 "Many...." */
0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
0x24,0x04,0x03,0x20,0x14,0x0B,0x5F,0x54, /* 00000020 "$.. .._T" */
diff --git a/tools/acpihelp/Makefile b/source/tools/acpihelp/Makefile
index 5ae399f81f16..481f9c2fa35f 100644
--- a/tools/acpihelp/Makefile
+++ b/source/tools/acpihelp/Makefile
@@ -2,9 +2,8 @@
# acpihelp - ACPI Help utility. Displays ASL operator syntax and
# information about ACPI predefined names.
#
-# NOTE: This makefile is intended to be used in the Linux environment,
-# with the Linux directory structure. It will not work directly
-# on the native ACPICA source tree.
+# NOTE: This makefile is intended to be used within the native
+# ACPICA source tree.
#
#
@@ -22,13 +21,22 @@ HOST = _LINUX
NOMAN = YES
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $<
-ACPICA_COMPONENTS =
-ACPICA_SRC = ../..
-ACPICA_INCLUDE = $(ACPICA_SRC)/include
+ACPICA_SRC = ../../../source
ACPICA_COMMON = $(ACPICA_SRC)/common
-ACPICA_CORE = $(ACPICA_SRC)$(ACPICA_COMPONENTS)
ACPICA_TOOLS = $(ACPICA_SRC)/tools
ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers
+ACPICA_CORE = $(ACPICA_SRC)/components
+ACPICA_INCLUDE = $(ACPICA_SRC)/include
+ACPICA_DEBUGGER = $(ACPICA_CORE)/debugger
+ACPICA_DISASSEMBLER = $(ACPICA_CORE)/disassembler
+ACPICA_DISPATCHER = $(ACPICA_CORE)/dispatcher
+ACPICA_EVENTS = $(ACPICA_CORE)/events
+ACPICA_EXECUTER = $(ACPICA_CORE)/executer
+ACPICA_HARDWARE = $(ACPICA_CORE)/hardware
+ACPICA_NAMESPACE = $(ACPICA_CORE)/namespace
+ACPICA_PARSER = $(ACPICA_CORE)/parser
+ACPICA_RESOURCES = $(ACPICA_CORE)/resources
+ACPICA_TABLES = $(ACPICA_CORE)/tables
ACPICA_UTILITIES = $(ACPICA_CORE)/utilities
ACPIHELP = $(ACPICA_TOOLS)/acpihelp
INSTALLDIR = /usr/bin
diff --git a/tools/acpihelp/acpihelp.h b/source/tools/acpihelp/acpihelp.h
index e0bdd11dd2b7..427353a06b51 100644
--- a/tools/acpihelp/acpihelp.h
+++ b/source/tools/acpihelp/acpihelp.h
@@ -68,6 +68,7 @@
#define AH_DECODE_PREDEFINED_NAME 3
#define AH_DECODE_AML 4
#define AH_DECODE_AML_OPCODE 5
+#define AH_DISPLAY_DEVICE_IDS 6
#define AH_MAX_ASL_LINE_LENGTH 70
#define AH_MAX_AML_LINE_LENGTH 100
@@ -110,6 +111,13 @@ typedef struct ah_predefined_name
} AH_PREDEFINED_NAME;
+typedef struct ah_device_id
+{
+ char *Name;
+ char *Description;
+
+} AH_DEVICE_ID;
+
extern const AH_AML_OPCODE AmlOpcodeInfo[];
extern const AH_ASL_OPERATOR AslOperatorInfo[];
@@ -141,4 +149,8 @@ void
AhFindAslKeywords (
char *Name);
+void
+AhDisplayDeviceIds (
+ void);
+
#endif /* __ACPIHELP_H */
diff --git a/tools/acpihelp/ahamlops.c b/source/tools/acpihelp/ahamlops.c
index 222eb3454df1..222eb3454df1 100644
--- a/tools/acpihelp/ahamlops.c
+++ b/source/tools/acpihelp/ahamlops.c
diff --git a/tools/acpihelp/ahaslkey.c b/source/tools/acpihelp/ahaslkey.c
index 65adc5b44a77..65adc5b44a77 100644
--- a/tools/acpihelp/ahaslkey.c
+++ b/source/tools/acpihelp/ahaslkey.c
diff --git a/tools/acpihelp/ahaslops.c b/source/tools/acpihelp/ahaslops.c
index 80ea1d2dcd03..80ea1d2dcd03 100644
--- a/tools/acpihelp/ahaslops.c
+++ b/source/tools/acpihelp/ahaslops.c
diff --git a/tools/acpihelp/ahdecode.c b/source/tools/acpihelp/ahdecode.c
index 91e3e04b324d..a61eccfe0beb 100644
--- a/tools/acpihelp/ahdecode.c
+++ b/source/tools/acpihelp/ahdecode.c
@@ -792,3 +792,64 @@ AhPrintOneField (
printf ("%s", This);
}
}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AhDisplayDeviceIds
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Display all PNP* and ACPI* device IDs defined in the ACPI spec.
+ *
+ ******************************************************************************/
+
+static const AH_DEVICE_ID AhDeviceIds[] =
+{
+ {"PNP0A05", "Generic Container Device"},
+ {"PNP0A06", "Generic Container Device"},
+ {"PNP0C08", "ACPI core hardware"},
+ {"PNP0C09", "Embedded Controller Device"},
+ {"PNP0C0A", "Control Method Battery"},
+ {"PNP0C0B", "Fan"},
+ {"PNP0C0C", "Power Button Device"},
+ {"PNP0C0D", "Lid Device"},
+ {"PNP0C0E", "Sleep Button Device"},
+ {"PNP0C0F", "PCI Interrupt Link Device"},
+ {"PNP0C80", "Memory Device"},
+
+ {"ACPI0001", "SMBus 1.0 Host Controller"},
+ {"ACPI0002", "Smart Battery Subsystem"},
+ {"ACPI0003", "Power Source Device"},
+ {"ACPI0004", "Module Device"},
+ {"ACPI0005", "SMBus 2.0 Host Controller"},
+ {"ACPI0006", "GPE Block Device"},
+ {"ACPI0007", "Processor Device"},
+ {"ACPI0008", "Ambient Light Sensor Device"},
+ {"ACPI0009", "I/O xAPIC Device"},
+ {"ACPI000A", "I/O APIC Device"},
+ {"ACPI000B", "I/O SAPIC Device"},
+ {"ACPI000C", "Processor Aggregator Device"},
+ {"ACPI000D", "Power Meter Device"},
+ {"ACPI000E", "Time/Alarm Device"},
+ {"ACPI000F", "User Presence Detection Device"},
+
+ {NULL, NULL}
+};
+
+void
+AhDisplayDeviceIds (
+ void)
+{
+ const AH_DEVICE_ID *DeviceId = AhDeviceIds;
+
+
+ printf ("ACPI and PNP Device IDs defined in the ACPI specification:\n\n");
+ while (DeviceId->Name)
+ {
+ printf ("%8s %s\n", DeviceId->Name, DeviceId->Description);
+ DeviceId++;
+ }
+}
diff --git a/tools/acpihelp/ahmain.c b/source/tools/acpihelp/ahmain.c
index 7c5f85e0de18..e45a0b61a4e5 100644
--- a/tools/acpihelp/ahmain.c
+++ b/source/tools/acpihelp/ahmain.c
@@ -65,6 +65,8 @@ AhDisplayUsage (
{
ACPI_USAGE_HEADER ("acpihelp <options> [NamePrefix | HexValue]");
+ ACPI_OPTION ("-h", "Display help");
+ ACPI_OPTION ("-i", "Display known ACPI Device IDs (_HID)");
ACPI_OPTION ("-k [NamePrefix]", "Find/Display ASL non-operator keyword(s)");
ACPI_OPTION ("-m [NamePrefix]", "Find/Display AML opcode name(s)");
ACPI_OPTION ("-o [HexValue]", "Decode hex AML opcode");
@@ -106,8 +108,12 @@ main (
/* Command line options */
- while ((j = AcpiGetopt (argc, argv, "hkmops")) != EOF) switch (j)
+ while ((j = AcpiGetopt (argc, argv, "hikmops")) != EOF) switch (j)
{
+ case 'i':
+ DecodeType = AH_DISPLAY_DEVICE_IDS;
+ break;
+
case 'k':
DecodeType = AH_DECODE_ASL_KEYWORD;
break;
@@ -160,6 +166,10 @@ main (
AhFindAslKeywords (Name);
break;
+ case AH_DISPLAY_DEVICE_IDS:
+ AhDisplayDeviceIds ();
+ break;
+
default:
if (!Name)
{
diff --git a/tools/acpihelp/ahpredef.c b/source/tools/acpihelp/ahpredef.c
index 2baf711ab8f5..2baf711ab8f5 100644
--- a/tools/acpihelp/ahpredef.c
+++ b/source/tools/acpihelp/ahpredef.c
diff --git a/tools/acpinames/Makefile b/source/tools/acpinames/Makefile
index ff541fd47f3f..bdd2d260c494 100644
--- a/tools/acpinames/Makefile
+++ b/source/tools/acpinames/Makefile
@@ -23,18 +23,21 @@ HOST = _LINUX
NOMAN = YES
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $<
-ACPICA_COMPONENTS =
-ACPICA_SRC = ../..
-ACPICA_INCLUDE = $(ACPICA_SRC)/include
+ACPICA_SRC = ../../../source
ACPICA_COMMON = $(ACPICA_SRC)/common
-ACPICA_CORE = $(ACPICA_SRC)$(ACPICA_COMPONENTS)
ACPICA_TOOLS = $(ACPICA_SRC)/tools
ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers
+ACPICA_CORE = $(ACPICA_SRC)/components
+ACPICA_INCLUDE = $(ACPICA_SRC)/include
ACPICA_DEBUGGER = $(ACPICA_CORE)/debugger
+ACPICA_DISASSEMBLER = $(ACPICA_CORE)/disassembler
ACPICA_DISPATCHER = $(ACPICA_CORE)/dispatcher
+ACPICA_EVENTS = $(ACPICA_CORE)/events
ACPICA_EXECUTER = $(ACPICA_CORE)/executer
+ACPICA_HARDWARE = $(ACPICA_CORE)/hardware
ACPICA_NAMESPACE = $(ACPICA_CORE)/namespace
ACPICA_PARSER = $(ACPICA_CORE)/parser
+ACPICA_RESOURCES = $(ACPICA_CORE)/resources
ACPICA_TABLES = $(ACPICA_CORE)/tables
ACPICA_UTILITIES = $(ACPICA_CORE)/utilities
ACPINAMES = $(ACPICA_TOOLS)/acpinames
diff --git a/tools/acpinames/acpinames.h b/source/tools/acpinames/acpinames.h
index 260124af8ee6..260124af8ee6 100644
--- a/tools/acpinames/acpinames.h
+++ b/source/tools/acpinames/acpinames.h
diff --git a/tools/acpinames/anmain.c b/source/tools/acpinames/anmain.c
index 682cc5f61570..682cc5f61570 100644
--- a/tools/acpinames/anmain.c
+++ b/source/tools/acpinames/anmain.c
diff --git a/tools/acpinames/anstubs.c b/source/tools/acpinames/anstubs.c
index 13e17700e8d9..a69c425e3776 100644
--- a/tools/acpinames/anstubs.c
+++ b/source/tools/acpinames/anstubs.c
@@ -184,16 +184,17 @@ AcpiEvInitializeOpRegions (
}
ACPI_STATUS
-AcpiEvDeleteGpeBlock (
- ACPI_GPE_BLOCK_INFO *GpeBlock)
+AcpiEvInitializeRegion (
+ ACPI_OPERAND_OBJECT *RegionObj,
+ BOOLEAN AcpiNsLocked)
{
return (AE_OK);
}
+#if (!ACPI_REDUCED_HARDWARE)
ACPI_STATUS
-AcpiEvInitializeRegion (
- ACPI_OPERAND_OBJECT *RegionObj,
- BOOLEAN AcpiNsLocked)
+AcpiEvDeleteGpeBlock (
+ ACPI_GPE_BLOCK_INFO *GpeBlock)
{
return (AE_OK);
}
@@ -204,6 +205,7 @@ AcpiEnable (
{
return (AE_OK);
}
+#endif /* !ACPI_REDUCED_HARDWARE */
/* AML Interpreter */
diff --git a/tools/acpinames/antables.c b/source/tools/acpinames/antables.c
index 37fa24ae5f9f..37fa24ae5f9f 100644
--- a/tools/acpinames/antables.c
+++ b/source/tools/acpinames/antables.c
diff --git a/tools/acpisrc/Makefile b/source/tools/acpisrc/Makefile
index f7464861ae09..58a8654e350c 100644
--- a/tools/acpisrc/Makefile
+++ b/source/tools/acpisrc/Makefile
@@ -21,13 +21,23 @@ HOST = _LINUX
NOMAN = YES
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $<
-ACPICA_COMPONENTS =
-ACPICA_SRC = ../..
-ACPICA_INCLUDE = $(ACPICA_SRC)/include
+ACPICA_SRC = ../../../source
ACPICA_COMMON = $(ACPICA_SRC)/common
-ACPICA_CORE = $(ACPICA_SRC)$(ACPICA_COMPONENTS)
ACPICA_TOOLS = $(ACPICA_SRC)/tools
ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers
+ACPICA_CORE = $(ACPICA_SRC)/components
+ACPICA_INCLUDE = $(ACPICA_SRC)/include
+ACPICA_DEBUGGER = $(ACPICA_CORE)/debugger
+ACPICA_DISASSEMBLER = $(ACPICA_CORE)/disassembler
+ACPICA_DISPATCHER = $(ACPICA_CORE)/dispatcher
+ACPICA_EVENTS = $(ACPICA_CORE)/events
+ACPICA_EXECUTER = $(ACPICA_CORE)/executer
+ACPICA_HARDWARE = $(ACPICA_CORE)/hardware
+ACPICA_NAMESPACE = $(ACPICA_CORE)/namespace
+ACPICA_PARSER = $(ACPICA_CORE)/parser
+ACPICA_RESOURCES = $(ACPICA_CORE)/resources
+ACPICA_TABLES = $(ACPICA_CORE)/tables
+ACPICA_UTILITIES = $(ACPICA_CORE)/utilities
ACPISRC = $(ACPICA_TOOLS)/acpisrc
INSTALLDIR = /usr/bin
INSTALLPROG = cp --remove-destination $(PROG) $(INSTALLDIR)
diff --git a/tools/acpisrc/acpisrc.h b/source/tools/acpisrc/acpisrc.h
index 3c0e5dc01d05..3c0e5dc01d05 100644
--- a/tools/acpisrc/acpisrc.h
+++ b/source/tools/acpisrc/acpisrc.h
diff --git a/tools/acpisrc/ascase.c b/source/tools/acpisrc/ascase.c
index 232ebe8b18fc..232ebe8b18fc 100644
--- a/tools/acpisrc/ascase.c
+++ b/source/tools/acpisrc/ascase.c
diff --git a/tools/acpisrc/asconvrt.c b/source/tools/acpisrc/asconvrt.c
index 1669f9d20e79..1669f9d20e79 100644
--- a/tools/acpisrc/asconvrt.c
+++ b/source/tools/acpisrc/asconvrt.c
diff --git a/tools/acpisrc/asfile.c b/source/tools/acpisrc/asfile.c
index ce26adc3d8e4..ce26adc3d8e4 100644
--- a/tools/acpisrc/asfile.c
+++ b/source/tools/acpisrc/asfile.c
diff --git a/tools/acpisrc/asmain.c b/source/tools/acpisrc/asmain.c
index baf4e2fc34c7..baf4e2fc34c7 100644
--- a/tools/acpisrc/asmain.c
+++ b/source/tools/acpisrc/asmain.c
diff --git a/tools/acpisrc/asremove.c b/source/tools/acpisrc/asremove.c
index 8fe29e158a2a..8fe29e158a2a 100644
--- a/tools/acpisrc/asremove.c
+++ b/source/tools/acpisrc/asremove.c
diff --git a/tools/acpisrc/astable.c b/source/tools/acpisrc/astable.c
index 2329f56f9f21..a1d96d32a83a 100644
--- a/tools/acpisrc/astable.c
+++ b/source/tools/acpisrc/astable.c
@@ -376,6 +376,8 @@ ACPI_TYPED_IDENTIFIER_TABLE AcpiIdentifiers[] = {
{"ACPI_SEMAPHORE", SRC_TYPE_SIMPLE},
{"ACPI_SIGNAL_FATAL_INFO", SRC_TYPE_STRUCT},
{"ACPI_SIZE", SRC_TYPE_SIMPLE},
+ {"ACPI_SLEEP_FUNCTION", SRC_TYPE_SIMPLE},
+ {"ACPI_SLEEP_FUNCTIONS", SRC_TYPE_STRUCT},
{"ACPI_SPINLOCK", SRC_TYPE_SIMPLE},
{"ACPI_STATISTICS", SRC_TYPE_STRUCT},
{"ACPI_STATUS", SRC_TYPE_SIMPLE},
diff --git a/tools/acpisrc/asutils.c b/source/tools/acpisrc/asutils.c
index a596ea8cee06..a596ea8cee06 100644
--- a/tools/acpisrc/asutils.c
+++ b/source/tools/acpisrc/asutils.c
diff --git a/tools/acpixtract/Makefile b/source/tools/acpixtract/Makefile
index 4e04b636e935..d5db832a7394 100644
--- a/tools/acpixtract/Makefile
+++ b/source/tools/acpixtract/Makefile
@@ -1,9 +1,8 @@
#
# acpixtract - extract binary ACPI tables from acpidump text output
#
-# NOTE: This makefile is intended to be used in the Linux environment,
-# with the Linux directory structure. It will not work directly
-# on the native ACPICA source tree.
+# NOTE: This makefile is intended to be used within the native
+# ACPICA source tree.
#
#
@@ -21,12 +20,23 @@ HOST = _LINUX
NOMAN = YES
COMPILE = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $<
-ACPICA_COMPONENTS =
-ACPICA_SRC = ../..
-ACPICA_INCLUDE = $(ACPICA_SRC)/include
+ACPICA_SRC = ../../../source
ACPICA_COMMON = $(ACPICA_SRC)/common
-ACPICA_CORE = $(ACPICA_SRC)$(ACPICA_COMPONENTS)
ACPICA_TOOLS = $(ACPICA_SRC)/tools
+ACPICA_OSL = $(ACPICA_SRC)/os_specific/service_layers
+ACPICA_CORE = $(ACPICA_SRC)/components
+ACPICA_INCLUDE = $(ACPICA_SRC)/include
+ACPICA_DEBUGGER = $(ACPICA_CORE)/debugger
+ACPICA_DISASSEMBLER = $(ACPICA_CORE)/disassembler
+ACPICA_DISPATCHER = $(ACPICA_CORE)/dispatcher
+ACPICA_EVENTS = $(ACPICA_CORE)/events
+ACPICA_EXECUTER = $(ACPICA_CORE)/executer
+ACPICA_HARDWARE = $(ACPICA_CORE)/hardware
+ACPICA_NAMESPACE = $(ACPICA_CORE)/namespace
+ACPICA_PARSER = $(ACPICA_CORE)/parser
+ACPICA_RESOURCES = $(ACPICA_CORE)/resources
+ACPICA_TABLES = $(ACPICA_CORE)/tables
+ACPICA_UTILITIES = $(ACPICA_CORE)/utilities
ACPIXTRACT = $(ACPICA_TOOLS)/acpixtract
INSTALLDIR = /usr/bin
INSTALLPROG = cp --remove-destination $(PROG) $(INSTALLDIR)
diff --git a/tools/acpixtract/acpixtract.c b/source/tools/acpixtract/acpixtract.c
index 85ce346af152..85ce346af152 100644
--- a/tools/acpixtract/acpixtract.c
+++ b/source/tools/acpixtract/acpixtract.c
diff --git a/tools/acpixtract/axmain.c b/source/tools/acpixtract/axmain.c
index 5d275802916e..5d275802916e 100644
--- a/tools/acpixtract/axmain.c
+++ b/source/tools/acpixtract/axmain.c
diff --git a/tools/examples/examples.c b/source/tools/examples/examples.c
index 570683e29311..570683e29311 100644
--- a/tools/examples/examples.c
+++ b/source/tools/examples/examples.c