summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2001-01-31 09:17:50 +0000
committermsmith <msmith@FreeBSD.org>2001-01-31 09:17:50 +0000
commit7948a3a80426e7bdc0728814e72cf46852c46576 (patch)
tree5ed7785feb928c9fe57c2d7175f89660521314a4 /sys/contrib/dev/acpica
parent68d9171019852e7a4325965a2539a5a2eb7571da (diff)
downloadFreeBSD-src-7948a3a80426e7bdc0728814e72cf46852c46576.zip
FreeBSD-src-7948a3a80426e7bdc0728814e72cf46852c46576.tar.gz
Update to the 20010125 ACPI CA snapshot.
Diffstat (limited to 'sys/contrib/dev/acpica')
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Common/cmalloc.c38
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Common/cmclib.c9
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Common/cmcopy.c12
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Common/cmdebug.c6
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Common/cmdelete.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Common/cmeval.c24
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Common/cmglobal.c15
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Common/cminit.c49
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Common/cmobject.c6
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Common/cmutils.c16
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Common/cmxface.c26
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Debugger/dbcmds.c21
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Debugger/dbdisasm.c6
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Debugger/dbdisply.c31
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Debugger/dbexec.c12
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Debugger/dbfileio.c6
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Debugger/dbhistry.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Debugger/dbinput.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Debugger/dbstats.c6
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Debugger/dbutils.c8
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Debugger/dbxface.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dsfield.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmethod.c9
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmthdat.c50
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dsobject.c21
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dsopcode.c12
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dsutils.c6
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dswexec.c18
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dswload.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dswscope.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Dispatcher/dswstate.c63
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Events/evevent.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Events/evmisc.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Events/evregion.c24
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Events/evrgnini.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Events/evsci.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Events/evxface.c267
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Events/evxfevnt.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Events/evxfregn.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Hardware/hwacpi.c61
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Hardware/hwgpe.c5
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Hardware/hwregs.c64
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Hardware/hwsleep.c296
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Hardware/hwtimer.c302
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/accommon.h15
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acconfig.h10
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acdebug.h4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acdispat.h4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acefi.h4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acenv.h30
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acevents.h4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acexcep.h10
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acfreebsd.h4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acgcc.h4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acglobal.h8
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/achware.h99
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acinterp.h94
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/aclinux.h4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/aclocal.h161
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acmacros.h29
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acmsvc.h4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acnamesp.h5
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acobject.h14
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acoutput.h5
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acparser.h4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acpi.h4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acpiosxf.h6
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acpixf.h6
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acresrc.h4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/actables.h4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/actbl.h4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/actbl1.h4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/actbl2.h4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/actbl71.h4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/actypes.h46
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/acwin.h4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Include/amlcode.h49
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amconfig.c10
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amconvrt.c653
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amcreate.c6
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amdump.c27
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amdyadic.c386
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amfield.c9
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amfldio.c84
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/ammisc.c72
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/ammonad.c70
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amnames.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amprep.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amregion.c10
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amresnte.c26
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amresolv.c36
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amresop.c109
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amstore.c542
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amstoren.c586
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amstorob.c617
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amsystem.c8
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amutils.c21
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Interpreter/amxface.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nsaccess.c20
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nsalloc.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nsdump.c10
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nseval.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nsinit.c17
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nsload.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nsnames.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nsobject.c6
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nssearch.c40
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nsutils.c6
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nswalk.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nsxfname.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Namespace/nsxfobj.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Parser/psargs.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Parser/psfind.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Parser/psopcode.c171
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Parser/psparse.c19
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Parser/psscope.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Parser/pstree.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Parser/psutils.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Parser/pswalk.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Parser/psxface.c10
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Resources/rsaddr.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Resources/rscalc.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Resources/rscreate.c18
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Resources/rsdump.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Resources/rsio.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Resources/rsirq.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Resources/rslist.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Resources/rsmemory.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Resources/rsmisc.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Resources/rsutils.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Resources/rsxface.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Tables/tbconvrt.c28
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Tables/tbget.c16
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Tables/tbinstal.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Tables/tbutils.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Tables/tbxface.c4
-rw-r--r--sys/contrib/dev/acpica/Subsystem/Tables/tbxfroot.c4
-rw-r--r--sys/contrib/dev/acpica/acconfig.h10
-rw-r--r--sys/contrib/dev/acpica/acdebug.h4
-rw-r--r--sys/contrib/dev/acpica/acdispat.h4
-rw-r--r--sys/contrib/dev/acpica/acefi.h4
-rw-r--r--sys/contrib/dev/acpica/acenv.h30
-rw-r--r--sys/contrib/dev/acpica/acevents.h4
-rw-r--r--sys/contrib/dev/acpica/acexcep.h10
-rw-r--r--sys/contrib/dev/acpica/acfreebsd.h4
-rw-r--r--sys/contrib/dev/acpica/acgcc.h4
-rw-r--r--sys/contrib/dev/acpica/acglobal.h8
-rw-r--r--sys/contrib/dev/acpica/achware.h99
-rw-r--r--sys/contrib/dev/acpica/acinterp.h94
-rw-r--r--sys/contrib/dev/acpica/aclocal.h161
-rw-r--r--sys/contrib/dev/acpica/acmacros.h29
-rw-r--r--sys/contrib/dev/acpica/acnamesp.h5
-rw-r--r--sys/contrib/dev/acpica/acobject.h14
-rw-r--r--sys/contrib/dev/acpica/acoutput.h5
-rw-r--r--sys/contrib/dev/acpica/acparser.h4
-rw-r--r--sys/contrib/dev/acpica/acpi.h4
-rw-r--r--sys/contrib/dev/acpica/acpiosxf.h6
-rw-r--r--sys/contrib/dev/acpica/acpixf.h6
-rw-r--r--sys/contrib/dev/acpica/acresrc.h4
-rw-r--r--sys/contrib/dev/acpica/actables.h4
-rw-r--r--sys/contrib/dev/acpica/actbl.h4
-rw-r--r--sys/contrib/dev/acpica/actbl1.h4
-rw-r--r--sys/contrib/dev/acpica/actbl2.h4
-rw-r--r--sys/contrib/dev/acpica/actbl71.h4
-rw-r--r--sys/contrib/dev/acpica/actypes.h46
-rw-r--r--sys/contrib/dev/acpica/acutils.h15
-rw-r--r--sys/contrib/dev/acpica/amlcode.h49
-rw-r--r--sys/contrib/dev/acpica/dbcmds.c21
-rw-r--r--sys/contrib/dev/acpica/dbdisasm.c6
-rw-r--r--sys/contrib/dev/acpica/dbdisply.c31
-rw-r--r--sys/contrib/dev/acpica/dbexec.c12
-rw-r--r--sys/contrib/dev/acpica/dbfileio.c6
-rw-r--r--sys/contrib/dev/acpica/dbhistry.c4
-rw-r--r--sys/contrib/dev/acpica/dbinput.c4
-rw-r--r--sys/contrib/dev/acpica/dbstats.c6
-rw-r--r--sys/contrib/dev/acpica/dbutils.c8
-rw-r--r--sys/contrib/dev/acpica/dbxface.c4
-rw-r--r--sys/contrib/dev/acpica/dsfield.c4
-rw-r--r--sys/contrib/dev/acpica/dsmethod.c9
-rw-r--r--sys/contrib/dev/acpica/dsmthdat.c50
-rw-r--r--sys/contrib/dev/acpica/dsobject.c21
-rw-r--r--sys/contrib/dev/acpica/dsopcode.c12
-rw-r--r--sys/contrib/dev/acpica/dsutils.c6
-rw-r--r--sys/contrib/dev/acpica/dswexec.c18
-rw-r--r--sys/contrib/dev/acpica/dswload.c4
-rw-r--r--sys/contrib/dev/acpica/dswscope.c4
-rw-r--r--sys/contrib/dev/acpica/dswstate.c63
-rw-r--r--sys/contrib/dev/acpica/evevent.c4
-rw-r--r--sys/contrib/dev/acpica/evmisc.c4
-rw-r--r--sys/contrib/dev/acpica/evregion.c24
-rw-r--r--sys/contrib/dev/acpica/evrgnini.c4
-rw-r--r--sys/contrib/dev/acpica/evsci.c4
-rw-r--r--sys/contrib/dev/acpica/evxface.c267
-rw-r--r--sys/contrib/dev/acpica/evxfevnt.c4
-rw-r--r--sys/contrib/dev/acpica/evxfregn.c4
-rw-r--r--sys/contrib/dev/acpica/exconfig.c10
-rw-r--r--sys/contrib/dev/acpica/exconvrt.c653
-rw-r--r--sys/contrib/dev/acpica/excreate.c6
-rw-r--r--sys/contrib/dev/acpica/exdump.c27
-rw-r--r--sys/contrib/dev/acpica/exdyadic.c386
-rw-r--r--sys/contrib/dev/acpica/exfield.c9
-rw-r--r--sys/contrib/dev/acpica/exfldio.c84
-rw-r--r--sys/contrib/dev/acpica/exmisc.c72
-rw-r--r--sys/contrib/dev/acpica/exmonad.c70
-rw-r--r--sys/contrib/dev/acpica/exnames.c4
-rw-r--r--sys/contrib/dev/acpica/exprep.c4
-rw-r--r--sys/contrib/dev/acpica/exregion.c10
-rw-r--r--sys/contrib/dev/acpica/exresnte.c26
-rw-r--r--sys/contrib/dev/acpica/exresolv.c36
-rw-r--r--sys/contrib/dev/acpica/exresop.c109
-rw-r--r--sys/contrib/dev/acpica/exstore.c542
-rw-r--r--sys/contrib/dev/acpica/exstoren.c586
-rw-r--r--sys/contrib/dev/acpica/exstorob.c617
-rw-r--r--sys/contrib/dev/acpica/exsystem.c8
-rw-r--r--sys/contrib/dev/acpica/exutils.c21
-rw-r--r--sys/contrib/dev/acpica/exxface.c4
-rw-r--r--sys/contrib/dev/acpica/hwacpi.c61
-rw-r--r--sys/contrib/dev/acpica/hwgpe.c5
-rw-r--r--sys/contrib/dev/acpica/hwregs.c64
-rw-r--r--sys/contrib/dev/acpica/hwsleep.c296
-rw-r--r--sys/contrib/dev/acpica/hwtimer.c302
-rw-r--r--sys/contrib/dev/acpica/nsaccess.c20
-rw-r--r--sys/contrib/dev/acpica/nsalloc.c4
-rw-r--r--sys/contrib/dev/acpica/nsdump.c10
-rw-r--r--sys/contrib/dev/acpica/nseval.c4
-rw-r--r--sys/contrib/dev/acpica/nsinit.c17
-rw-r--r--sys/contrib/dev/acpica/nsload.c4
-rw-r--r--sys/contrib/dev/acpica/nsnames.c4
-rw-r--r--sys/contrib/dev/acpica/nsobject.c6
-rw-r--r--sys/contrib/dev/acpica/nssearch.c40
-rw-r--r--sys/contrib/dev/acpica/nsutils.c6
-rw-r--r--sys/contrib/dev/acpica/nswalk.c4
-rw-r--r--sys/contrib/dev/acpica/nsxfname.c4
-rw-r--r--sys/contrib/dev/acpica/nsxfobj.c4
-rw-r--r--sys/contrib/dev/acpica/psargs.c4
-rw-r--r--sys/contrib/dev/acpica/psfind.c4
-rw-r--r--sys/contrib/dev/acpica/psopcode.c171
-rw-r--r--sys/contrib/dev/acpica/psparse.c19
-rw-r--r--sys/contrib/dev/acpica/psscope.c4
-rw-r--r--sys/contrib/dev/acpica/pstree.c4
-rw-r--r--sys/contrib/dev/acpica/psutils.c4
-rw-r--r--sys/contrib/dev/acpica/pswalk.c4
-rw-r--r--sys/contrib/dev/acpica/psxface.c10
-rw-r--r--sys/contrib/dev/acpica/rsaddr.c4
-rw-r--r--sys/contrib/dev/acpica/rscalc.c4
-rw-r--r--sys/contrib/dev/acpica/rscreate.c18
-rw-r--r--sys/contrib/dev/acpica/rsdump.c4
-rw-r--r--sys/contrib/dev/acpica/rsio.c4
-rw-r--r--sys/contrib/dev/acpica/rsirq.c4
-rw-r--r--sys/contrib/dev/acpica/rslist.c4
-rw-r--r--sys/contrib/dev/acpica/rsmemory.c4
-rw-r--r--sys/contrib/dev/acpica/rsmisc.c4
-rw-r--r--sys/contrib/dev/acpica/rsutils.c4
-rw-r--r--sys/contrib/dev/acpica/rsxface.c4
-rw-r--r--sys/contrib/dev/acpica/tbconvrt.c28
-rw-r--r--sys/contrib/dev/acpica/tbget.c16
-rw-r--r--sys/contrib/dev/acpica/tbinstal.c4
-rw-r--r--sys/contrib/dev/acpica/tbutils.c4
-rw-r--r--sys/contrib/dev/acpica/tbxface.c4
-rw-r--r--sys/contrib/dev/acpica/tbxfroot.c4
-rw-r--r--sys/contrib/dev/acpica/utalloc.c38
-rw-r--r--sys/contrib/dev/acpica/utclib.c9
-rw-r--r--sys/contrib/dev/acpica/utcopy.c12
-rw-r--r--sys/contrib/dev/acpica/utdebug.c6
-rw-r--r--sys/contrib/dev/acpica/utdelete.c4
-rw-r--r--sys/contrib/dev/acpica/uteval.c24
-rw-r--r--sys/contrib/dev/acpica/utglobal.c15
-rw-r--r--sys/contrib/dev/acpica/utinit.c49
-rw-r--r--sys/contrib/dev/acpica/utmisc.c16
-rw-r--r--sys/contrib/dev/acpica/utobject.c6
-rw-r--r--sys/contrib/dev/acpica/utxface.c26
271 files changed, 7652 insertions, 4234 deletions
diff --git a/sys/contrib/dev/acpica/Subsystem/Common/cmalloc.c b/sys/contrib/dev/acpica/Subsystem/Common/cmalloc.c
index d970e93..243ee21 100644
--- a/sys/contrib/dev/acpica/Subsystem/Common/cmalloc.c
+++ b/sys/contrib/dev/acpica/Subsystem/Common/cmalloc.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmalloc - local memory allocation routines
- * $Revision: 80 $
+ * $Revision: 84 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -126,7 +126,8 @@
MODULE_NAME ("cmalloc")
-#ifdef ACPI_DEBUG
+#ifdef ACPI_DEBUG_TRACK_ALLOCATIONS
+
/*
* Most of this code is for tracking memory leaks in the subsystem, and it
* gets compiled out when the ACPI_DEBUG flag is not set.
@@ -269,7 +270,8 @@ AcpiCmAddElementToAllocList (
Element = AcpiCmSearchAllocList (Address);
if (Element)
{
- REPORT_ERROR (("CmAddElementToAllocList: Address already present in list!\n"));
+ REPORT_ERROR (("CmAddElementToAllocList: Address already present in list! (%p)\n",
+ Address));
DEBUG_PRINT (ACPI_ERROR, ("Element %p Address %p\n", Element, Address));
@@ -613,11 +615,11 @@ AcpiCmDumpCurrentAllocations (
DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES,
("Total number of unfreed allocations = %d(%X)\n", i,i));
- return_VOID;
-}
-#endif /* Debug routines for memory leak detection */
+ return_VOID;
+}
+#endif /* #ifdef ACPI_DEBUG_TRACK_ALLOCATIONS */
/*****************************************************************************
*
@@ -642,8 +644,6 @@ _CmAllocate (
UINT32 Line)
{
void *Address = NULL;
- DEBUG_ONLY_MEMBERS (\
- ACPI_STATUS Status)
FUNCTION_TRACE_U32 ("_CmAllocate", Size);
@@ -669,10 +669,10 @@ _CmAllocate (
return_VALUE (NULL);
}
-#ifdef ACPI_DEBUG
- Status = AcpiCmAddElementToAllocList (Address, Size, MEM_MALLOC, Component,
- Module, Line);
- if (ACPI_FAILURE (Status))
+#ifdef ACPI_DEBUG_TRACK_ALLOCATIONS
+
+ if (ACPI_FAILURE (AcpiCmAddElementToAllocList (Address, Size, MEM_MALLOC,
+ Component, Module, Line)))
{
AcpiOsFree (Address);
return_PTR (NULL);
@@ -709,8 +709,6 @@ _CmCallocate (
UINT32 Line)
{
void *Address = NULL;
- DEBUG_ONLY_MEMBERS (\
- ACPI_STATUS Status)
FUNCTION_TRACE_U32 ("_CmCallocate", Size);
@@ -737,10 +735,10 @@ _CmCallocate (
return_VALUE (NULL);
}
-#ifdef ACPI_DEBUG
- Status = AcpiCmAddElementToAllocList (Address, Size, MEM_CALLOC, Component,
- Module, Line);
- if (ACPI_FAILURE (Status))
+#ifdef ACPI_DEBUG_TRACK_ALLOCATIONS
+
+ if (ACPI_FAILURE (AcpiCmAddElementToAllocList (Address, Size, MEM_CALLOC,
+ Component,Module, Line)))
{
AcpiOsFree (Address);
return_PTR (NULL);
@@ -787,7 +785,7 @@ _CmFree (
return_VOID;
}
-#ifdef ACPI_DEBUG
+#ifdef ACPI_DEBUG_TRACK_ALLOCATIONS
AcpiCmDeleteElementFromAllocList (Address, Component, Module, Line);
#endif
diff --git a/sys/contrib/dev/acpica/Subsystem/Common/cmclib.c b/sys/contrib/dev/acpica/Subsystem/Common/cmclib.c
index 70efc61..2318d9e 100644
--- a/sys/contrib/dev/acpica/Subsystem/Common/cmclib.c
+++ b/sys/contrib/dev/acpica/Subsystem/Common/cmclib.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmclib - Local implementation of C library functions
- * $Revision: 29 $
+ * $Revision: 32 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -454,7 +454,7 @@ AcpiCmMemcpy (
void *
AcpiCmMemset (
void *Dest,
- UINT32 Value,
+ NATIVE_UINT Value,
NATIVE_UINT Count)
{
NATIVE_CHAR *New = (NATIVE_CHAR *) Dest;
@@ -630,6 +630,7 @@ static const UINT8 _acpi_ctype[257] = {
#define IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO))
#define IS_DIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI))
#define IS_SPACE(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP))
+#define IS_XDIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD))
/*******************************************************************************
@@ -770,7 +771,7 @@ UINT32
AcpiCmStrtoul (
const NATIVE_CHAR *String,
NATIVE_CHAR **Terminator,
- UINT32 Base)
+ NATIVE_UINT Base)
{
UINT32 converted = 0;
UINT32 index;
diff --git a/sys/contrib/dev/acpica/Subsystem/Common/cmcopy.c b/sys/contrib/dev/acpica/Subsystem/Common/cmcopy.c
index 534b50e..f27d724 100644
--- a/sys/contrib/dev/acpica/Subsystem/Common/cmcopy.c
+++ b/sys/contrib/dev/acpica/Subsystem/Common/cmcopy.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmcopy - Internal to external object translation utilities
- * $Revision: 61 $
+ * $Revision: 62 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -214,9 +214,9 @@ AcpiCmBuildExternalSimpleObject (
break;
- case ACPI_TYPE_NUMBER:
+ case ACPI_TYPE_INTEGER:
- ExternalObj->Number.Value= InternalObj->Number.Value;
+ ExternalObj->Integer.Value= InternalObj->Integer.Value;
break;
@@ -584,11 +584,11 @@ AcpiCmBuildInternalSimpleObject (
break;
- case ACPI_TYPE_NUMBER:
+ case ACPI_TYPE_INTEGER:
/*
* Number is included in the object itself
*/
- InternalObj->Number.Value = ExternalObj->Number.Value;
+ InternalObj->Integer.Value = ExternalObj->Integer.Value;
break;
diff --git a/sys/contrib/dev/acpica/Subsystem/Common/cmdebug.c b/sys/contrib/dev/acpica/Subsystem/Common/cmdebug.c
index 9cc5371..5792a13 100644
--- a/sys/contrib/dev/acpica/Subsystem/Common/cmdebug.c
+++ b/sys/contrib/dev/acpica/Subsystem/Common/cmdebug.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmdebug - Debug print routines
- * $Revision: 62 $
+ * $Revision: 64 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -373,7 +373,7 @@ FunctionValueExit (
UINT32 LineNumber,
UINT32 ComponentId,
NATIVE_CHAR *FunctionName,
- NATIVE_UINT Value)
+ ACPI_INTEGER Value)
{
DebugPrint (ModuleName, LineNumber, ComponentId, TRACE_FUNCTIONS,
diff --git a/sys/contrib/dev/acpica/Subsystem/Common/cmdelete.c b/sys/contrib/dev/acpica/Subsystem/Common/cmdelete.c
index 1854715..34a42ae 100644
--- a/sys/contrib/dev/acpica/Subsystem/Common/cmdelete.c
+++ b/sys/contrib/dev/acpica/Subsystem/Common/cmdelete.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: cmdelete - object deletion and reference count utilities
- * $Revision: 61 $
+ * $Revision: 62 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Common/cmeval.c b/sys/contrib/dev/acpica/Subsystem/Common/cmeval.c
index e5a2427..2987090 100644
--- a/sys/contrib/dev/acpica/Subsystem/Common/cmeval.c
+++ b/sys/contrib/dev/acpica/Subsystem/Common/cmeval.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmeval - Object evaluation
- * $Revision: 20 $
+ * $Revision: 21 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -189,7 +189,7 @@ AcpiCmEvaluateNumericObject (
/* Is the return object of the correct type? */
- if (ObjDesc->Common.Type != ACPI_TYPE_NUMBER)
+ if (ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
{
Status = AE_TYPE;
DEBUG_PRINT (ACPI_ERROR,
@@ -202,7 +202,7 @@ AcpiCmEvaluateNumericObject (
* Since the structure is a union, setting any field will set all
* of the variables in the union
*/
- *Address = ObjDesc->Number.Value;
+ *Address = ObjDesc->Integer.Value;
}
/* On exit, we must delete the return object */
@@ -278,7 +278,7 @@ AcpiCmExecute_HID (
* a string
*/
- if ((ObjDesc->Common.Type != ACPI_TYPE_NUMBER) &&
+ if ((ObjDesc->Common.Type != ACPI_TYPE_INTEGER) &&
(ObjDesc->Common.Type != ACPI_TYPE_STRING))
{
Status = AE_TYPE;
@@ -289,11 +289,11 @@ AcpiCmExecute_HID (
else
{
- if (ObjDesc->Common.Type == ACPI_TYPE_NUMBER)
+ if (ObjDesc->Common.Type == ACPI_TYPE_INTEGER)
{
/* Convert the Numeric HID to string */
- AcpiAmlEisaIdToString ((UINT32) ObjDesc->Number.Value, Hid->Buffer);
+ AcpiAmlEisaIdToString ((UINT32) ObjDesc->Integer.Value, Hid->Buffer);
}
else
@@ -375,7 +375,7 @@ AcpiCmExecute_UID (
* a string
*/
- if ((ObjDesc->Common.Type != ACPI_TYPE_NUMBER) &&
+ if ((ObjDesc->Common.Type != ACPI_TYPE_INTEGER) &&
(ObjDesc->Common.Type != ACPI_TYPE_STRING))
{
Status = AE_TYPE;
@@ -386,11 +386,11 @@ AcpiCmExecute_UID (
else
{
- if (ObjDesc->Common.Type == ACPI_TYPE_NUMBER)
+ if (ObjDesc->Common.Type == ACPI_TYPE_INTEGER)
{
/* Convert the Numeric UID to string */
- AcpiAmlUnsignedIntegerToString (ObjDesc->Number.Value, Uid->Buffer);
+ AcpiAmlUnsignedIntegerToString (ObjDesc->Integer.Value, Uid->Buffer);
}
else
@@ -470,7 +470,7 @@ AcpiCmExecute_STA (
/* Is the return object of the correct type? */
- if (ObjDesc->Common.Type != ACPI_TYPE_NUMBER)
+ if (ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
{
Status = AE_TYPE;
DEBUG_PRINT (ACPI_ERROR,
@@ -482,7 +482,7 @@ AcpiCmExecute_STA (
{
/* Extract the status flags */
- *Flags = (UINT32) ObjDesc->Number.Value;
+ *Flags = (UINT32) ObjDesc->Integer.Value;
}
/* On exit, we must delete the return object */
diff --git a/sys/contrib/dev/acpica/Subsystem/Common/cmglobal.c b/sys/contrib/dev/acpica/Subsystem/Common/cmglobal.c
index d89b56c..2cea5c6 100644
--- a/sys/contrib/dev/acpica/Subsystem/Common/cmglobal.c
+++ b/sys/contrib/dev/acpica/Subsystem/Common/cmglobal.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmglobal - Global variables for the ACPI subsystem
- * $Revision: 113 $
+ * $Revision: 116 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -191,7 +191,7 @@ PREDEFINED_NAMES AcpiGbl_PreDefinedNames[] =
{"_SB_", INTERNAL_TYPE_DEF_ANY},
{"_SI_", INTERNAL_TYPE_DEF_ANY},
{"_TZ_", INTERNAL_TYPE_DEF_ANY},
- {"_REV", ACPI_TYPE_NUMBER, "2"},
+ {"_REV", ACPI_TYPE_INTEGER, "2"},
{"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME},
{"_GL_", ACPI_TYPE_MUTEX, "0"},
@@ -248,6 +248,13 @@ UINT8 AcpiGbl_NsProperties[] =
};
+/* Hex to ASCII conversion table */
+
+NATIVE_CHAR AcpiGbl_HexToAscii[] =
+ {'0','1','2','3','4','5','6','7',
+ '8','9','A','B','C','D','E','F'};
+
+
/******************************************************************************
*
* Table globals
@@ -328,7 +335,7 @@ static NATIVE_CHAR AcpiGbl_BadType[] = "UNDEFINED";
static NATIVE_CHAR *AcpiGbl_NsTypeNames[] = /* printable names of ACPI types */
{
/* 00 */ "Untyped",
- /* 01 */ "Number",
+ /* 01 */ "Integer",
/* 02 */ "String",
/* 03 */ "Buffer",
/* 04 */ "Package",
diff --git a/sys/contrib/dev/acpica/Subsystem/Common/cminit.c b/sys/contrib/dev/acpica/Subsystem/Common/cminit.c
index b42ba3e..f2972a0 100644
--- a/sys/contrib/dev/acpica/Subsystem/Common/cminit.c
+++ b/sys/contrib/dev/acpica/Subsystem/Common/cminit.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cminit - Common ACPI subsystem initialization
- * $Revision: 91 $
+ * $Revision: 93 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -128,6 +128,9 @@
MODULE_NAME ("cminit")
+#define ACPI_OFFSET(d,o) ((UINT32) &(((d *)0)->o))
+#define ACPI_FADT_OFFSET(o) ACPI_OFFSET (FADT_DESCRIPTOR, o)
+
/*******************************************************************************
*
* FUNCTION: AcpiCmFadtRegisterError
@@ -146,12 +149,13 @@
static ACPI_STATUS
AcpiCmFadtRegisterError (
NATIVE_CHAR *RegisterName,
- UINT32 Value)
+ UINT32 Value,
+ UINT32 Offset)
{
REPORT_ERROR (
- ("Invalid FADT register value, %s=%X (FADT=%p)\n",
- RegisterName, Value, AcpiGbl_FADT));
+ ("Invalid FADT value %s=%lX at offset %lX FADT=%p\n",
+ RegisterName, Value, Offset, AcpiGbl_FADT));
return (AE_BAD_VALUE);
@@ -185,44 +189,47 @@ AcpiCmValidateFadt (
if (AcpiGbl_FADT->Pm1EvtLen < 4)
{
Status = AcpiCmFadtRegisterError ("PM1_EVT_LEN",
- (UINT32) AcpiGbl_FADT->Pm1EvtLen);
+ (UINT32) AcpiGbl_FADT->Pm1EvtLen,
+ ACPI_FADT_OFFSET (Pm1EvtLen));
}
if (!AcpiGbl_FADT->Pm1CntLen)
{
- Status = AcpiCmFadtRegisterError ("PM1_CNT_LEN",
- 0);
+ Status = AcpiCmFadtRegisterError ("PM1_CNT_LEN", 0,
+ ACPI_FADT_OFFSET (Pm1CntLen));
}
if (!ACPI_VALID_ADDRESS (AcpiGbl_FADT->XPm1aEvtBlk.Address))
{
- Status = AcpiCmFadtRegisterError ("PM1a_EVT_BLK",
- 0);
+ Status = AcpiCmFadtRegisterError ("X_PM1a_EVT_BLK", 0,
+ ACPI_FADT_OFFSET (XPm1aEvtBlk.Address));
}
if (!ACPI_VALID_ADDRESS (AcpiGbl_FADT->XPm1aCntBlk.Address))
{
- Status = AcpiCmFadtRegisterError ("PM1a_CNT_BLK",
- 0);
+ Status = AcpiCmFadtRegisterError ("X_PM1a_CNT_BLK", 0,
+ ACPI_FADT_OFFSET (XPm1aCntBlk.Address));
}
if (!ACPI_VALID_ADDRESS (AcpiGbl_FADT->XPmTmrBlk.Address))
{
- Status = AcpiCmFadtRegisterError ("PM_TMR_BLK",
- 0);
+ Status = AcpiCmFadtRegisterError ("X_PM_TMR_BLK", 0,
+ ACPI_FADT_OFFSET (XPmTmrBlk.Address));
}
if ((ACPI_VALID_ADDRESS (AcpiGbl_FADT->XPm2CntBlk.Address) &&
!AcpiGbl_FADT->Pm2CntLen))
{
Status = AcpiCmFadtRegisterError ("PM2_CNT_LEN",
- (UINT32) AcpiGbl_FADT->Pm2CntLen);
+ (UINT32) AcpiGbl_FADT->Pm2CntLen,
+ ACPI_FADT_OFFSET (Pm2CntLen));
}
if (AcpiGbl_FADT->PmTmLen < 4)
{
Status = AcpiCmFadtRegisterError ("PM_TM_LEN",
- (UINT32) AcpiGbl_FADT->PmTmLen);
+ (UINT32) AcpiGbl_FADT->PmTmLen,
+ ACPI_FADT_OFFSET (PmTmLen));
}
/* length of GPE blocks must be a multiple of 2 */
@@ -231,15 +238,17 @@ AcpiCmValidateFadt (
if (ACPI_VALID_ADDRESS (AcpiGbl_FADT->XGpe0Blk.Address) &&
(AcpiGbl_FADT->Gpe0BlkLen & 1))
{
- Status = AcpiCmFadtRegisterError ("GPE0_BLK_LEN",
- (UINT32) AcpiGbl_FADT->Gpe0BlkLen);
+ Status = AcpiCmFadtRegisterError ("(x)GPE0_BLK_LEN",
+ (UINT32) AcpiGbl_FADT->Gpe0BlkLen,
+ ACPI_FADT_OFFSET (Gpe0BlkLen));
}
if (ACPI_VALID_ADDRESS (AcpiGbl_FADT->XGpe1Blk.Address) &&
(AcpiGbl_FADT->Gpe1BlkLen & 1))
{
- Status = AcpiCmFadtRegisterError ("GPE1_BLK_LEN",
- (UINT32) AcpiGbl_FADT->Gpe1BlkLen);
+ Status = AcpiCmFadtRegisterError ("(x)GPE1_BLK_LEN",
+ (UINT32) AcpiGbl_FADT->Gpe1BlkLen,
+ ACPI_FADT_OFFSET (Gpe1BlkLen));
}
return (Status);
diff --git a/sys/contrib/dev/acpica/Subsystem/Common/cmobject.c b/sys/contrib/dev/acpica/Subsystem/Common/cmobject.c
index 5e0f6f4..dd8bf22 100644
--- a/sys/contrib/dev/acpica/Subsystem/Common/cmobject.c
+++ b/sys/contrib/dev/acpica/Subsystem/Common/cmobject.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmobject - ACPI object create/delete/size/cache routines
- * $Revision: 34 $
+ * $Revision: 35 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -586,7 +586,7 @@ AcpiCmGetSimpleObjectSize (
break;
- case ACPI_TYPE_NUMBER:
+ case ACPI_TYPE_INTEGER:
case ACPI_TYPE_PROCESSOR:
case ACPI_TYPE_POWER:
diff --git a/sys/contrib/dev/acpica/Subsystem/Common/cmutils.c b/sys/contrib/dev/acpica/Subsystem/Common/cmutils.c
index 662ec14..2c9c60d 100644
--- a/sys/contrib/dev/acpica/Subsystem/Common/cmutils.c
+++ b/sys/contrib/dev/acpica/Subsystem/Common/cmutils.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: cmutils - common utility procedures
- * $Revision: 22 $
+ * $Revision: 23 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -814,18 +814,18 @@ AcpiCmResolvePackageReferences (
{
if (SubObject->Reference.OpCode == AML_ZERO_OP)
{
- SubObject->Common.Type = ACPI_TYPE_NUMBER;
- SubObject->Number.Value = 0;
+ SubObject->Common.Type = ACPI_TYPE_INTEGER;
+ SubObject->Integer.Value = 0;
}
else if (SubObject->Reference.OpCode == AML_ONE_OP)
{
- SubObject->Common.Type = ACPI_TYPE_NUMBER;
- SubObject->Number.Value = 1;
+ SubObject->Common.Type = ACPI_TYPE_INTEGER;
+ SubObject->Integer.Value = 1;
}
else if (SubObject->Reference.OpCode == AML_ONES_OP)
{
- SubObject->Common.Type = ACPI_TYPE_NUMBER;
- SubObject->Number.Value = ACPI_INTEGER_MAX;
+ SubObject->Common.Type = ACPI_TYPE_INTEGER;
+ SubObject->Integer.Value = ACPI_INTEGER_MAX;
}
}
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Common/cmxface.c b/sys/contrib/dev/acpica/Subsystem/Common/cmxface.c
index 840d0d5..2376295 100644
--- a/sys/contrib/dev/acpica/Subsystem/Common/cmxface.c
+++ b/sys/contrib/dev/acpica/Subsystem/Common/cmxface.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmxface - External interfaces for "global" ACPI functions
- * $Revision: 57 $
+ * $Revision: 62 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -149,13 +149,8 @@ AcpiInitializeSubsystem (
{
ACPI_STATUS Status;
-
FUNCTION_TRACE ("AcpiInitializeSubsystem");
- DEBUG_PRINT_RAW (ACPI_OK,
- ("ACPI: Core Subsystem version [%s]\n", ACPI_CA_VERSION));
- DEBUG_PRINT (ACPI_INFO, ("Initializing ACPI Subsystem...\n"));
-
/* Initialize all globals used by the subsystem */
@@ -442,16 +437,25 @@ AcpiGetSystemInfo (
OutBuffer->Length = sizeof (ACPI_SYSTEM_INFO);
InfoPtr = (ACPI_SYSTEM_INFO *) OutBuffer->Pointer;
- /* TBD [Future]: need a version number, or use the version string */
- InfoPtr->AcpiCaVersion = 0x1234;
+ InfoPtr->AcpiCaVersion = ACPI_CA_VERSION;
/* System flags (ACPI capabilities) */
InfoPtr->Flags = AcpiGbl_SystemFlags;
/* Timer resolution - 24 or 32 bits */
-
- InfoPtr->TimerResolution = AcpiHwPmtResolution ();
+ if (!AcpiGbl_FADT)
+ {
+ InfoPtr->TimerResolution = 0;
+ }
+ else if (AcpiGbl_FADT->TmrValExt == 0)
+ {
+ InfoPtr->TimerResolution = 24;
+ }
+ else
+ {
+ InfoPtr->TimerResolution = 32;
+ }
/* Clear the reserved fields */
diff --git a/sys/contrib/dev/acpica/Subsystem/Debugger/dbcmds.c b/sys/contrib/dev/acpica/Subsystem/Debugger/dbcmds.c
index 5bf35aa..33f8481 100644
--- a/sys/contrib/dev/acpica/Subsystem/Debugger/dbcmds.c
+++ b/sys/contrib/dev/acpica/Subsystem/Debugger/dbcmds.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbcmds - debug commands and output routines
- * $Revision: 43 $
+ * $Revision: 45 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -660,14 +660,14 @@ AcpiDbSetMethodData (
/* Create and initialize the new object */
- ObjDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ ObjDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!ObjDesc)
{
AcpiOsPrintf ("Could not create an internal object\n");
return;
}
- ObjDesc->Number.Value = Value;
+ ObjDesc->Integer.Value = Value;
/* Store the new object into the target */
@@ -736,14 +736,15 @@ AcpiDbWalkForSpecificObjects (
ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_STATUS Status;
UINT32 BufSize;
- NATIVE_CHAR buffer[64];
+ NATIVE_CHAR Buffer[64];
ObjDesc = ((ACPI_NAMESPACE_NODE *)ObjHandle)->Object;
+ BufSize = sizeof (Buffer) / sizeof (*Buffer);
/* Get and display the full pathname to this object */
- Status = AcpiNsHandleToPathname (ObjHandle, &BufSize, buffer);
+ Status = AcpiNsHandleToPathname (ObjHandle, &BufSize, Buffer);
if (ACPI_FAILURE (Status))
{
@@ -751,7 +752,7 @@ AcpiDbWalkForSpecificObjects (
return (AE_OK);
}
- AcpiOsPrintf ("%32s", buffer);
+ AcpiOsPrintf ("%32s", Buffer);
/* Display short information about the object */
@@ -764,8 +765,8 @@ AcpiDbWalkForSpecificObjects (
AcpiOsPrintf (" #Args %d Concurrency %X", ObjDesc->Method.ParamCount, ObjDesc->Method.Concurrency);
break;
- case ACPI_TYPE_NUMBER:
- AcpiOsPrintf (" Value %X", ObjDesc->Number.Value);
+ case ACPI_TYPE_INTEGER:
+ AcpiOsPrintf (" Value %X", ObjDesc->Integer.Value);
break;
case ACPI_TYPE_STRING:
@@ -899,7 +900,7 @@ AcpiDbWalkAndMatchName (
/* Get the full pathname to this object */
- BufSize = sizeof (Buffer);
+ BufSize = sizeof (Buffer) / sizeof (*Buffer);
Status = AcpiNsHandleToPathname (ObjHandle, &BufSize, Buffer);
if (ACPI_FAILURE (Status))
diff --git a/sys/contrib/dev/acpica/Subsystem/Debugger/dbdisasm.c b/sys/contrib/dev/acpica/Subsystem/Debugger/dbdisasm.c
index e03e28a..8d3f7db 100644
--- a/sys/contrib/dev/acpica/Subsystem/Debugger/dbdisasm.c
+++ b/sys/contrib/dev/acpica/Subsystem/Debugger/dbdisasm.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbdisasm - parser op tree display routines
- * $Revision: 35 $
+ * $Revision: 37 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -773,7 +773,7 @@ AcpiDbDisplayOpcode (
/* Just get the opcode name and print it */
Opc = AcpiPsGetOpcodeInfo (Op->Opcode);
- DEBUG_ONLY_MEMBERS ((AcpiOsPrintf ("%s", Opc->Name)));
+ AcpiOsPrintf ("%s", Opc->Name);
#ifndef PARSER_ONLY
diff --git a/sys/contrib/dev/acpica/Subsystem/Debugger/dbdisply.c b/sys/contrib/dev/acpica/Subsystem/Debugger/dbdisply.c
index e16f763..3be6f93 100644
--- a/sys/contrib/dev/acpica/Subsystem/Debugger/dbdisply.c
+++ b/sys/contrib/dev/acpica/Subsystem/Debugger/dbdisply.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbdisply - debug display commands
- * $Revision: 39 $
+ * $Revision: 41 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -399,22 +399,33 @@ void
AcpiDbDecodeInternalObject (
ACPI_OPERAND_OBJECT *ObjDesc)
{
+ UINT32 i;
+
if (!ObjDesc)
{
return;
}
- AcpiOsPrintf (" %9.9s ", AcpiCmGetTypeName (ObjDesc->Common.Type));
+ AcpiOsPrintf (" %s", AcpiCmGetTypeName (ObjDesc->Common.Type));
switch (ObjDesc->Common.Type)
{
- case ACPI_TYPE_NUMBER:
- AcpiOsPrintf ("%.8X", ObjDesc->Number.Value);
+ case ACPI_TYPE_INTEGER:
+ AcpiOsPrintf (" %.8X", ObjDesc->Integer.Value);
break;
case ACPI_TYPE_STRING:
- AcpiOsPrintf ("\"%.16s\"...", ObjDesc->String.Pointer);
+ AcpiOsPrintf ("(%d) \"%.16s\"...",
+ ObjDesc->String.Length, ObjDesc->String.Pointer);
+ break;
+
+ case ACPI_TYPE_BUFFER:
+ AcpiOsPrintf ("(%d)", ObjDesc->Buffer.Length);
+ for (i = 0; (i < 8) && (i < ObjDesc->Buffer.Length); i++)
+ {
+ AcpiOsPrintf (" %2.2X", ObjDesc->Buffer.Pointer[i]);
+ }
break;
}
}
@@ -502,7 +513,7 @@ AcpiDbDisplayInternalObject (
break;
case AML_LOCAL_OP:
- AcpiOsPrintf ("[Local%d]", ObjDesc->Reference.Offset);
+ AcpiOsPrintf ("[Local%d] ", ObjDesc->Reference.Offset);
if (WalkState)
{
ObjDesc = WalkState->LocalVariables[ObjDesc->Reference.Offset].Object;
@@ -511,7 +522,7 @@ AcpiDbDisplayInternalObject (
break;
case AML_ARG_OP:
- AcpiOsPrintf ("[Arg%d] ", ObjDesc->Reference.Offset);
+ AcpiOsPrintf ("[Arg%d] ", ObjDesc->Reference.Offset);
if (WalkState)
{
ObjDesc = WalkState->Arguments[ObjDesc->Reference.Offset].Object;
@@ -524,7 +535,7 @@ AcpiDbDisplayInternalObject (
break;
case AML_INDEX_OP:
- AcpiOsPrintf ("[Index] ");
+ AcpiOsPrintf ("[Index] ");
AcpiDbDecodeInternalObject (ObjDesc->Reference.Object);
break;
@@ -535,7 +546,7 @@ AcpiDbDisplayInternalObject (
break;
default:
- AcpiOsPrintf (" ");
+ AcpiOsPrintf (" ");
AcpiDbDecodeInternalObject (ObjDesc);
break;
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Debugger/dbexec.c b/sys/contrib/dev/acpica/Subsystem/Debugger/dbexec.c
index 73611d2..8469092 100644
--- a/sys/contrib/dev/acpica/Subsystem/Debugger/dbexec.c
+++ b/sys/contrib/dev/acpica/Subsystem/Debugger/dbexec.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbexec - debugger control method execution
- * $Revision: 20 $
+ * $Revision: 21 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -182,8 +182,8 @@ AcpiDbExecuteMethod (
{
for (i = 0; Info->Args[i] && i < MTH_NUM_ARGS; i++)
{
- Params[i].Type = ACPI_TYPE_NUMBER;
- Params[i].Number.Value = STRTOUL (Info->Args[i], NULL, 16);
+ Params[i].Type = ACPI_TYPE_INTEGER;
+ Params[i].Integer.Value = STRTOUL (Info->Args[i], NULL, 16);
}
ParamObjects.Pointer = Params;
@@ -194,8 +194,8 @@ AcpiDbExecuteMethod (
{
/* Setup default parameters */
- Params[0].Type = ACPI_TYPE_NUMBER;
- Params[0].Number.Value = 0x01020304;
+ Params[0].Type = ACPI_TYPE_INTEGER;
+ Params[0].Integer.Value = 0x01020304;
Params[1].Type = ACPI_TYPE_STRING;
Params[1].String.Length = 12;
diff --git a/sys/contrib/dev/acpica/Subsystem/Debugger/dbfileio.c b/sys/contrib/dev/acpica/Subsystem/Debugger/dbfileio.c
index b94cbe1..367a838 100644
--- a/sys/contrib/dev/acpica/Subsystem/Debugger/dbfileio.c
+++ b/sys/contrib/dev/acpica/Subsystem/Debugger/dbfileio.c
@@ -2,7 +2,7 @@
*
* Module Name: dbfileio - Debugger file I/O commands. These can't usually
* be used when running the debugger in Ring 0 (Kernel mode)
- * $Revision: 35 $
+ * $Revision: 37 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -286,7 +286,7 @@ AcpiDbLoadTable(
Status = AcpiTbValidateTableHeader (&TableHeader);
if ((ACPI_FAILURE (Status)) ||
- (TableHeader.Length > (1024 * 1024)))
+ (TableHeader.Length > 524288)) /* 1/2 Mbyte should be enough */
{
AcpiOsPrintf ("Table header is invalid!\n");
return (AE_ERROR);
diff --git a/sys/contrib/dev/acpica/Subsystem/Debugger/dbhistry.c b/sys/contrib/dev/acpica/Subsystem/Debugger/dbhistry.c
index e2e441c..765c3e1 100644
--- a/sys/contrib/dev/acpica/Subsystem/Debugger/dbhistry.c
+++ b/sys/contrib/dev/acpica/Subsystem/Debugger/dbhistry.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dbhistry - debugger HISTORY command
- * $Revision: 16 $
+ * $Revision: 17 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Debugger/dbinput.c b/sys/contrib/dev/acpica/Subsystem/Debugger/dbinput.c
index 8fc695c..0d191c6 100644
--- a/sys/contrib/dev/acpica/Subsystem/Debugger/dbinput.c
+++ b/sys/contrib/dev/acpica/Subsystem/Debugger/dbinput.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbinput - user front-end to the AML debugger
- * $Revision: 53 $
+ * $Revision: 54 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Debugger/dbstats.c b/sys/contrib/dev/acpica/Subsystem/Debugger/dbstats.c
index 457f906..f4531ea 100644
--- a/sys/contrib/dev/acpica/Subsystem/Debugger/dbstats.c
+++ b/sys/contrib/dev/acpica/Subsystem/Debugger/dbstats.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbstats - Generation and display of ACPI table statistics
- * $Revision: 36 $
+ * $Revision: 37 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -508,7 +508,7 @@ AcpiDbDisplayStatistics (
AcpiOsPrintf ("\nInternal object sizes:\n\n");
AcpiOsPrintf ("Common %3d\n", sizeof (ACPI_OBJECT_COMMON));
- AcpiOsPrintf ("Number %3d\n", sizeof (ACPI_OBJECT_NUMBER));
+ AcpiOsPrintf ("Number %3d\n", sizeof (ACPI_OBJECT_INTEGER));
AcpiOsPrintf ("String %3d\n", sizeof (ACPI_OBJECT_STRING));
AcpiOsPrintf ("Buffer %3d\n", sizeof (ACPI_OBJECT_BUFFER));
AcpiOsPrintf ("Package %3d\n", sizeof (ACPI_OBJECT_PACKAGE));
diff --git a/sys/contrib/dev/acpica/Subsystem/Debugger/dbutils.c b/sys/contrib/dev/acpica/Subsystem/Debugger/dbutils.c
index 4b4d928..2c0bae7 100644
--- a/sys/contrib/dev/acpica/Subsystem/Debugger/dbutils.c
+++ b/sys/contrib/dev/acpica/Subsystem/Debugger/dbutils.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbutils - AML debugger utilities
- * $Revision: 34 $
+ * $Revision: 35 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -230,8 +230,8 @@ AcpiDbDumpObject (
break;
- case ACPI_TYPE_NUMBER:
- AcpiOsPrintf ("[Number] Value: %ld (%lX)\n", ObjDesc->Number.Value, ObjDesc->Number.Value);
+ case ACPI_TYPE_INTEGER:
+ AcpiOsPrintf ("[Number] Value: %ld (%lX)\n", ObjDesc->Integer.Value, ObjDesc->Integer.Value);
break;
diff --git a/sys/contrib/dev/acpica/Subsystem/Debugger/dbxface.c b/sys/contrib/dev/acpica/Subsystem/Debugger/dbxface.c
index 613edcd..4116655 100644
--- a/sys/contrib/dev/acpica/Subsystem/Debugger/dbxface.c
+++ b/sys/contrib/dev/acpica/Subsystem/Debugger/dbxface.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbxface - AML Debugger external interfaces
- * $Revision: 33 $
+ * $Revision: 34 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsfield.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsfield.c
index bb634d7..11f304d 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsfield.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsfield.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dsfield - Dispatcher field routines
- * $Revision: 30 $
+ * $Revision: 31 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmethod.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmethod.c
index 266fa6e..02e1322 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmethod.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmethod.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dsmethod - Parser/Interpreter interface - control method parsing
- * $Revision: 54 $
+ * $Revision: 56 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -544,8 +544,9 @@ AcpiDsRestartControlMethod (
}
DEBUG_PRINT (TRACE_DISPATCH,
- ("DsRestart: Method=%p Return=%p State=%p\n",
- WalkState->MethodCallOp, ReturnDesc, WalkState));
+ ("DsRestart: Method=%p Return=%p ReturnUsed?=%X ResStack=%p State=%p\n",
+ WalkState->MethodCallOp, ReturnDesc, WalkState->ReturnUsed,
+ WalkState->Results, WalkState));
return_ACPI_STATUS (AE_OK);
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmthdat.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmthdat.c
index 022c1bd..0734ce6 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmthdat.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsmthdat.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dsmthdat - control method arguments and local variables
- * $Revision: 37 $
+ * $Revision: 39 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -132,7 +132,7 @@
*
* FUNCTION: AcpiDsMethodDataInit
*
- * PARAMETERS: *ObjDesc
+ * PARAMETERS: WalkState - Current walk state object
*
* RETURN: Status
*
@@ -193,7 +193,7 @@ AcpiDsMethodDataInit (
*
* FUNCTION: AcpiDsMethodDataDeleteAll
*
- * PARAMETERS: None
+ * PARAMETERS: WalkState - Current walk state object
*
* RETURN: Status
*
@@ -268,7 +268,9 @@ AcpiDsMethodDataDeleteAll (
*
* FUNCTION: AcpiDsMethodDataInitArgs
*
- * PARAMETERS: None
+ * PARAMETERS: *Params - Pointer to a parameter list for the method
+ * MaxParamCount - The arg count for this method
+ * WalkState - Current walk state object
*
* RETURN: Status
*
@@ -340,6 +342,7 @@ AcpiDsMethodDataInitArgs (
* Index - Which localVar or argument to get
* Entry - Pointer to where a pointer to the stack
* entry is returned.
+ * WalkState - Current walk state object
*
* RETURN: Status
*
@@ -415,6 +418,7 @@ AcpiDsMethodDataGetEntry (
* PARAMETERS: Type - Either MTH_TYPE_LOCAL or MTH_TYPE_ARG
* Index - Which localVar or argument to get
* Object - Object to be inserted into the stack entry
+ * WalkState - Current walk state object
*
* RETURN: Status
*
@@ -462,6 +466,7 @@ AcpiDsMethodDataSetEntry (
* PARAMETERS: Type - Either MTH_TYPE_LOCAL or MTH_TYPE_ARG
* Index - Which localVar or argument whose type
* to get
+ * WalkState - Current walk state object
*
* RETURN: Data type of selected Arg or Local
* Used only in ExecMonadic2()/TypeOp.
@@ -513,6 +518,7 @@ AcpiDsMethodDataGetType (
* PARAMETERS: Type - Either MTH_TYPE_LOCAL or MTH_TYPE_ARG
* Index - Which localVar or argument whose type
* to get
+ * WalkState - Current walk state object
*
* RETURN: Get the Node associated with a local or arg.
*
@@ -579,7 +585,8 @@ AcpiDsMethodDataGetNte (
*
* PARAMETERS: Type - Either MTH_TYPE_LOCAL or MTH_TYPE_ARG
* Index - Which localVar or argument to get
- * *DestDesc - Descriptor into which selected Arg
+ * WalkState - Current walk state object
+ * *DestDesc - Ptr to Descriptor into which selected Arg
* or Local value should be copied
*
* RETURN: Status
@@ -643,16 +650,20 @@ AcpiDsMethodDataGetValue (
switch (Type)
{
case MTH_TYPE_ARG:
+
DEBUG_PRINT (ACPI_ERROR,
("DsMethodDataGetValue: Uninitialized Arg[%d] at entry %p\n",
Index, Entry));
+
return_ACPI_STATUS (AE_AML_UNINITIALIZED_ARG);
break;
case MTH_TYPE_LOCAL:
+
DEBUG_PRINT (ACPI_ERROR,
("DsMethodDataGetValue: Uninitialized Local[%d] at entry %p\n",
Index, Entry));
+
return_ACPI_STATUS (AE_AML_UNINITIALIZED_LOCAL);
break;
}
@@ -677,6 +688,7 @@ AcpiDsMethodDataGetValue (
*
* PARAMETERS: Type - Either MTH_TYPE_LOCAL or MTH_TYPE_ARG
* Index - Which localVar or argument to delete
+ * WalkState - Current walk state object
*
* RETURN: Status
*
@@ -727,7 +739,6 @@ AcpiDsMethodDataDeleteValue (
* Decrement the reference count by one to balance the
* increment when the object was stored in the slot.
*/
-
AcpiCmRemoveReference (Object);
}
@@ -742,18 +753,14 @@ AcpiDsMethodDataDeleteValue (
*
* PARAMETERS: Type - Either MTH_TYPE_LOCAL or MTH_TYPE_ARG
* Index - Which localVar or argument to set
- * *SrcDesc - Value to be stored
- * *DestDesc - Descriptor into which *SrcDesc
- * can be copied, or NULL if one must
- * be allocated for the purpose. If
- * provided, this descriptor will be
- * used for the new value.
+ * SrcDesc - Value to be stored
+ * WalkState - Current walk state
*
* RETURN: Status
*
* DESCRIPTION: Store a value in an Arg or Local. The SrcDesc is installed
* as the new value for the Arg or Local and the reference count
- * is incremented.
+ * for SrcDesc is incremented.
*
******************************************************************************/
@@ -840,7 +847,6 @@ AcpiDsMethodDataSetValue (
* Store this object into the Node
* (do the indirect store)
*/
-
Status = AcpiNsAttachObject ((ACPI_NAMESPACE_NODE *) *Entry, SrcDesc,
SrcDesc->Common.Type);
return_ACPI_STATUS (Status);
@@ -848,10 +854,19 @@ AcpiDsMethodDataSetValue (
/*
- * Otherwise, just delete the existing object
- * before storing the new one
+ * Perform "Implicit conversion" of the new object to the type of the
+ * existing object
*/
+ Status = AcpiAmlConvertToTargetType ((*Entry)->Common.Type, &SrcDesc, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ goto Cleanup;
+ }
+ /*
+ * Delete the existing object
+ * before storing the new one
+ */
AcpiDsMethodDataDeleteValue (Type, Index, WalkState);
}
@@ -862,7 +877,6 @@ AcpiDsMethodDataSetValue (
* Install the new object in the stack entry
* (increments the object reference count by one)
*/
-
Status = AcpiDsMethodDataSetEntry (Type, Index, SrcDesc, WalkState);
if (ACPI_FAILURE (Status))
{
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsobject.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsobject.c
index 6e58324..870fd32 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsobject.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsobject.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dsobject - Dispatcher object management routines
- * $Revision: 54 $
+ * $Revision: 56 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -364,7 +364,7 @@ AcpiDsInitObjectFromOp (
/* We are expecting a number */
- if (ArgDesc->Common.Type != ACPI_TYPE_NUMBER)
+ if (ArgDesc->Common.Type != ACPI_TYPE_INTEGER)
{
DEBUG_PRINT (ACPI_ERROR,
("InitObject: Expecting number, got obj: %p type %X\n",
@@ -375,7 +375,7 @@ AcpiDsInitObjectFromOp (
/* Get the value, delete the internal object */
- (*ObjDesc)->Buffer.Length = (UINT32) ArgDesc->Number.Value;
+ (*ObjDesc)->Buffer.Length = (UINT32) ArgDesc->Integer.Value;
AcpiCmRemoveReference (ArgDesc);
/* Allocate the buffer */
@@ -439,8 +439,8 @@ AcpiDsInitObjectFromOp (
Status = AcpiDsBuildInternalObject (WalkState, Op, ObjDesc);
break;
- case ACPI_TYPE_NUMBER:
- (*ObjDesc)->Number.Value = Op->Value.Integer;
+ case ACPI_TYPE_INTEGER:
+ (*ObjDesc)->Integer.Value = Op->Value.Integer;
break;
@@ -559,19 +559,22 @@ AcpiDsBuildInternalSimpleObj (
if (Name)
{
- REPORT_WARNING (("Reference %s AML %X not found\n",
+ REPORT_WARNING (("Reference %s at AML %X not found\n",
Name, Op->AmlOffset));
AcpiCmFree (Name);
}
else
{
- REPORT_WARNING (("Reference %s AML %X not found\n",
+ REPORT_WARNING (("Reference %s at AML %X not found\n",
Op->Value.String, Op->AmlOffset));
}
*ObjDescPtr = NULL;
}
- return_ACPI_STATUS (Status);
+ else
+ {
+ return_ACPI_STATUS (Status);
+ }
}
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsopcode.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsopcode.c
index 6e10594..1a736ff 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsopcode.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsopcode.c
@@ -2,7 +2,7 @@
*
* Module Name: dsopcode - Dispatcher Op Region support and handling of
* "control" opcodes
- * $Revision: 29 $
+ * $Revision: 30 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -485,7 +485,7 @@ AcpiDsEvalFieldUnitOperands (
}
- Offset = (UINT32) OffDesc->Number.Value;
+ Offset = (UINT32) OffDesc->Integer.Value;
/*
@@ -562,7 +562,7 @@ AcpiDsEvalFieldUnitOperands (
/* Offset is in bits, count is in bits */
BitOffset = Offset;
- BitCount = (UINT16) CntDesc->Number.Value;
+ BitCount = (UINT16) CntDesc->Integer.Value;
break;
@@ -753,7 +753,7 @@ AcpiDsEvalRegionOperands (
*/
OperandDesc = WalkState->Operands[WalkState->NumOperands - 1];
- ObjDesc->Region.Length = (UINT32) OperandDesc->Number.Value;
+ ObjDesc->Region.Length = (UINT32) OperandDesc->Integer.Value;
AcpiCmRemoveReference (OperandDesc);
/*
@@ -762,7 +762,7 @@ AcpiDsEvalRegionOperands (
*/
OperandDesc = WalkState->Operands[WalkState->NumOperands - 2];
- ObjDesc->Region.Address = (ACPI_PHYSICAL_ADDRESS) OperandDesc->Number.Value;
+ ObjDesc->Region.Address = (ACPI_PHYSICAL_ADDRESS) OperandDesc->Integer.Value;
AcpiCmRemoveReference (OperandDesc);
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsutils.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsutils.c
index c1278ce..9e4d0da 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsutils.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dsutils.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dsutils - Dispatcher utilities
- * $Revision: 51 $
+ * $Revision: 52 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -744,7 +744,7 @@ AcpiDsMapOpcodeToDataType (
case AML_WORD_OP:
case AML_DWORD_OP:
- DataType = ACPI_TYPE_NUMBER;
+ DataType = ACPI_TYPE_INTEGER;
break;
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswexec.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswexec.c
index 1e9c140..d3c04a6 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswexec.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswexec.c
@@ -2,7 +2,7 @@
*
* Module Name: dswexec - Dispatcher method execution callbacks;
* dispatch to interpreter.
- * $Revision: 51 $
+ * $Revision: 55 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -138,7 +138,7 @@
*
* RETURN: Status
*
- * DESCRIPTION:
+ * DESCRIPTION: Get the result of a predicate evaluation
*
****************************************************************************/
@@ -163,7 +163,7 @@ AcpiDsGetPredicateValue (
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
- ("DsGetPredicateValue: Missing or null operand, %s\n",
+ ("DsGetPredicateValue: Could not get result from predicate evaluation, %s\n",
AcpiCmFormatException (Status)));
return_ACPI_STATUS (Status);
@@ -202,7 +202,7 @@ AcpiDsGetPredicateValue (
* be a number
*/
- if (ObjDesc->Common.Type != ACPI_TYPE_NUMBER)
+ if (ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
{
DEBUG_PRINT (ACPI_ERROR,
("ExecEndOp: Bad predicate (not a number) ObjDesc=%X State=%X Type=%X\n",
@@ -213,16 +213,16 @@ AcpiDsGetPredicateValue (
}
- /* TBD: 64/32-bit */
+ /* Truncate the predicate to 32-bits if necessary */
- ObjDesc->Number.Value &= (UINT64) 0x00000000FFFFFFFF;
+ AcpiAmlTruncateFor32bitTable (ObjDesc, WalkState);
/*
* Save the result of the predicate evaluation on
* the control stack
*/
- if (ObjDesc->Number.Value)
+ if (ObjDesc->Integer.Value)
{
WalkState->ControlState->Common.Value = TRUE;
}
@@ -471,6 +471,8 @@ AcpiDsExecEndOp (
WalkState->NumOperands = 0;
WalkState->ReturnDesc = NULL;
+ WalkState->OpInfo = OpInfo;
+ WalkState->Opcode = Opcode;
/* Call debugger for single step support (DEBUG build only) */
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswload.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswload.c
index 4a805335..47d57a2 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswload.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswload.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswload - Dispatcher namespace load callbacks
- * $Revision: 25 $
+ * $Revision: 26 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswscope.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswscope.c
index 03a03d5..6e7d7ff 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswscope.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswscope.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswscope - Scope stack manipulation
- * $Revision: 41 $
+ * $Revision: 42 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswstate.c b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswstate.c
index f4494de..dc0b394 100644
--- a/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswstate.c
+++ b/sys/contrib/dev/acpica/Subsystem/Dispatcher/dswstate.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswstate - Dispatcher parse tree walk management routines
- * $Revision: 36 $
+ * $Revision: 38 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -128,30 +128,6 @@
MODULE_NAME ("dswstate")
-/*******************************************************************************
- *
- * FUNCTION: AcpiDsResultStackClear
- *
- * PARAMETERS: WalkState - Current Walk state
- *
- * RETURN: Status
- *
- * DESCRIPTION: Reset this walk's result stack pointers to zero, thus setting
- * the stack to zero.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-xxxAcpiDsResultStackClear (
- ACPI_WALK_STATE *WalkState)
-{
-/*
- WalkState->NumResults = 0;
- WalkState->CurrentResult = 0;
-*/
- return (AE_OK);
-}
-
/*******************************************************************************
*
@@ -259,7 +235,7 @@ AcpiDsResultRemove (
DEBUG_PRINT (ACPI_ERROR,
("DsResultStackRemove: Null operand! State=%p #Ops=%X, Index=%X\n",
WalkState, State->Results.NumResults, Index));
- return (AE_AML_NO_OPERAND);
+ return (AE_AML_NO_RETURN_VALUE);
}
/* Remove the object */
@@ -311,9 +287,9 @@ AcpiDsResultPop (
if (!State->Results.NumResults)
{
DEBUG_PRINT (ACPI_ERROR,
- ("DsResultPop: No result objects! State=%p\n",
+ ("DsResultPop: Result stack is empty! State=%p\n",
WalkState));
- return (AE_STACK_UNDERFLOW);
+ return (AE_AML_NO_RETURN_VALUE);
}
/* Remove top element */
@@ -342,12 +318,12 @@ AcpiDsResultPop (
DEBUG_PRINT (ACPI_ERROR,
("DsResultPop: No result objects! State=%p\n",
WalkState));
- return (AE_STACK_UNDERFLOW);
+ return (AE_AML_NO_RETURN_VALUE);
}
/*******************************************************************************
*
- * FUNCTION: AcpiDsResultPop
+ * FUNCTION: AcpiDsResultPopFromBottom
*
* PARAMETERS: Object - Where to return the popped object
* WalkState - Current Walk state
@@ -383,7 +359,7 @@ AcpiDsResultPopFromBottom (
DEBUG_PRINT (ACPI_ERROR,
("DsResultPopFromBottom: No result objects! State=%p\n",
WalkState));
- return (AE_STACK_UNDERFLOW);
+ return (AE_AML_NO_RETURN_VALUE);
}
/* Remove Bottom element */
@@ -407,7 +383,7 @@ AcpiDsResultPopFromBottom (
DEBUG_PRINT (ACPI_ERROR,
("DsResultPopFromBottom: Null operand! State=%p #Ops=%X, Index=%X\n",
WalkState, State->Results.NumResults, Index));
- return (AE_AML_NO_OPERAND);
+ return (AE_AML_NO_RETURN_VALUE);
}
DEBUG_PRINT (TRACE_EXEC,
@@ -422,15 +398,14 @@ AcpiDsResultPopFromBottom (
/*******************************************************************************
*
- * FUNCTION: AcpiDsResultPop
+ * FUNCTION: AcpiDsResultPush
*
* PARAMETERS: Object - Where to return the popped object
* WalkState - Current Walk state
*
* RETURN: Status
*
- * DESCRIPTION: Pop an object off the bottom of this walk's result stack. In
- * other words, this is a FIFO.
+ * DESCRIPTION: Push an object onto the current result stack
*
******************************************************************************/
@@ -445,7 +420,9 @@ AcpiDsResultPush (
State = WalkState->Results;
if (!State)
{
- return (AE_OK);
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultPush: No result stack frame\n"));
+ return (AE_AML_INTERNAL);
}
if (State->Results.NumResults == OBJ_NUM_OPERANDS)
@@ -964,6 +941,7 @@ AcpiDsCreateWalkState (
ACPI_WALK_LIST *WalkList)
{
ACPI_WALK_STATE *WalkState;
+ ACPI_STATUS Status;
FUNCTION_TRACE ("DsCreateWalkState");
@@ -987,7 +965,7 @@ AcpiDsCreateWalkState (
DEBUG_PRINT (TRACE_EXEC, ("DsCreateWalkState: State %p from cache\n", WalkState));
AcpiCmReleaseMutex (ACPI_MTX_CACHES);
- }
+ }
else
{
@@ -1015,6 +993,15 @@ AcpiDsCreateWalkState (
AcpiDsMethodDataInit (WalkState);
#endif
+ /* Create an initial result stack entry */
+
+ Status = AcpiDsResultStackPush (WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ return_VALUE (NULL);
+ }
+
+
/* Put the new state at the head of the walk list */
AcpiDsPushWalkState (WalkState, WalkList);
diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evevent.c b/sys/contrib/dev/acpica/Subsystem/Events/evevent.c
index ecd2c4c..30f06e0 100644
--- a/sys/contrib/dev/acpica/Subsystem/Events/evevent.c
+++ b/sys/contrib/dev/acpica/Subsystem/Events/evevent.c
@@ -2,7 +2,7 @@
*
* Module Name: evevent - Fixed and General Purpose AcpiEvent
* handling and dispatch
- * $Revision: 32 $
+ * $Revision: 33 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evmisc.c b/sys/contrib/dev/acpica/Subsystem/Events/evmisc.c
index 4c7c0ab..516774e 100644
--- a/sys/contrib/dev/acpica/Subsystem/Events/evmisc.c
+++ b/sys/contrib/dev/acpica/Subsystem/Events/evmisc.c
@@ -2,7 +2,7 @@
*
* Module Name: evmisc - ACPI device notification handler dispatch
* and ACPI Global Lock support
- * $Revision: 21 $
+ * $Revision: 22 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evregion.c b/sys/contrib/dev/acpica/Subsystem/Events/evregion.c
index 42732ef..49d5d3f 100644
--- a/sys/contrib/dev/acpica/Subsystem/Events/evregion.c
+++ b/sys/contrib/dev/acpica/Subsystem/Events/evregion.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evregion - ACPI AddressSpace (OpRegion) handler dispatch
- * $Revision: 93 $
+ * $Revision: 94 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -217,8 +217,8 @@ AcpiEvExecuteRegMethod (
UINT32 Function)
{
ACPI_OPERAND_OBJECT *Params[3];
- ACPI_OPERAND_OBJECT SpaceID_Obj;
- ACPI_OPERAND_OBJECT Function_Obj;
+ ACPI_OPERAND_OBJECT SpaceIdDesc;
+ ACPI_OPERAND_OBJECT FunctionDesc;
ACPI_STATUS Status;
@@ -240,24 +240,24 @@ AcpiEvExecuteRegMethod (
* Passed as a parameter
*/
- AcpiCmInitStaticObject (&SpaceID_Obj);
- AcpiCmInitStaticObject (&Function_Obj);
+ AcpiCmInitStaticObject (&SpaceIdDesc);
+ AcpiCmInitStaticObject (&FunctionDesc);
/*
* Method requires two parameters.
*/
- Params [0] = &SpaceID_Obj;
- Params [1] = &Function_Obj;
+ Params [0] = &SpaceIdDesc;
+ Params [1] = &FunctionDesc;
Params [2] = NULL;
/*
* Set up the parameter objects
*/
- SpaceID_Obj.Common.Type = ACPI_TYPE_NUMBER;
- SpaceID_Obj.Number.Value = RegionObj->Region.SpaceId;
+ SpaceIdDesc.Common.Type = ACPI_TYPE_INTEGER;
+ SpaceIdDesc.Integer.Value = RegionObj->Region.SpaceId;
- Function_Obj.Common.Type = ACPI_TYPE_NUMBER;
- Function_Obj.Number.Value = Function;
+ FunctionDesc.Common.Type = ACPI_TYPE_INTEGER;
+ FunctionDesc.Integer.Value = Function;
/*
* Execute the method, no return value
diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evrgnini.c b/sys/contrib/dev/acpica/Subsystem/Events/evrgnini.c
index 390cddb..f2ed119 100644
--- a/sys/contrib/dev/acpica/Subsystem/Events/evrgnini.c
+++ b/sys/contrib/dev/acpica/Subsystem/Events/evrgnini.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evrgnini- ACPI AddressSpace (OpRegion) init
- * $Revision: 32 $
+ * $Revision: 33 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evsci.c b/sys/contrib/dev/acpica/Subsystem/Events/evsci.c
index 2c877a3..130156c 100644
--- a/sys/contrib/dev/acpica/Subsystem/Events/evsci.c
+++ b/sys/contrib/dev/acpica/Subsystem/Events/evsci.c
@@ -2,7 +2,7 @@
*
* Module Name: evsci - System Control Interrupt configuration and
* legacy to ACPI mode state transition functions
- * $Revision: 68 $
+ * $Revision: 69 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evxface.c b/sys/contrib/dev/acpica/Subsystem/Events/evxface.c
index f795f18..89f9b8a 100644
--- a/sys/contrib/dev/acpica/Subsystem/Events/evxface.c
+++ b/sys/contrib/dev/acpica/Subsystem/Events/evxface.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evxface - External interfaces for ACPI events
- * $Revision: 98 $
+ * $Revision: 101 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -304,10 +304,10 @@ AcpiInstallNotifyHandler (
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
- /* Convert and validate the device handle */
-
AcpiCmAcquireMutex (ACPI_MTX_NAMESPACE);
+ /* Convert and validate the device handle */
+
DeviceNode = AcpiNsConvertHandleToEntry (Device);
if (!DeviceNode)
{
@@ -315,17 +315,16 @@ AcpiInstallNotifyHandler (
goto UnlockAndExit;
}
-
/*
- * Support for global notify handlers. These handlers are invoked for
- * every notifiy of the type specifiec
+ * Root Object:
+ * ------------
+ * Registering a notify handler on the root object indicates that the
+ * caller wishes to receive notifications for all objects. Note that
+ * only one <external> global handler can be regsitered (per notify type).
*/
-
if (Device == ACPI_ROOT_OBJECT)
{
- /*
- * Make sure the handler is not already installed.
- */
+ /* Make sure the handler is not already installed */
if (((HandlerType == ACPI_SYSTEM_NOTIFY) &&
AcpiGbl_SysNotify.Handler) ||
@@ -342,103 +341,98 @@ AcpiInstallNotifyHandler (
AcpiGbl_SysNotify.Handler = Handler;
AcpiGbl_SysNotify.Context = Context;
}
-
- else
+ else /* ACPI_DEVICE_NOTIFY */
{
AcpiGbl_DrvNotify.Node = DeviceNode;
AcpiGbl_DrvNotify.Handler = Handler;
AcpiGbl_DrvNotify.Context = Context;
}
-
/* Global notify handler installed */
-
- goto UnlockAndExit;
}
-
/*
- * These are the ONLY objects that can receive ACPI notifications
+ * Other Objects:
+ * --------------
+ * Caller will only receive notifications specific to the target object.
+ * Note that only certain object types can receive notifications.
*/
-
- if ((DeviceNode->Type != ACPI_TYPE_DEVICE) &&
- (DeviceNode->Type != ACPI_TYPE_PROCESSOR) &&
- (DeviceNode->Type != ACPI_TYPE_POWER) &&
- (DeviceNode->Type != ACPI_TYPE_THERMAL))
- {
- Status = AE_BAD_PARAMETER;
- goto UnlockAndExit;
- }
-
- /* Check for an existing internal object */
-
- ObjDesc = AcpiNsGetAttachedObject ((ACPI_HANDLE) DeviceNode);
- if (ObjDesc)
- {
+ else {
/*
- * The object exists.
- * Make sure the handler is not already installed.
+ * These are the ONLY objects that can receive ACPI notifications
*/
-
- if (((HandlerType == ACPI_SYSTEM_NOTIFY) &&
- ObjDesc->Device.SysHandler) ||
- ((HandlerType == ACPI_DEVICE_NOTIFY) &&
- ObjDesc->Device.DrvHandler))
+ if ((DeviceNode->Type != ACPI_TYPE_DEVICE) &&
+ (DeviceNode->Type != ACPI_TYPE_PROCESSOR) &&
+ (DeviceNode->Type != ACPI_TYPE_POWER) &&
+ (DeviceNode->Type != ACPI_TYPE_THERMAL))
{
- Status = AE_EXIST;
+ Status = AE_BAD_PARAMETER;
goto UnlockAndExit;
}
- }
- else
- {
- /* Create a new object */
+ /* Check for an existing internal object */
- ObjDesc = AcpiCmCreateInternalObject (DeviceNode->Type);
- if (!ObjDesc)
+ ObjDesc = AcpiNsGetAttachedObject ((ACPI_HANDLE) DeviceNode);
+ if (ObjDesc)
{
- Status = AE_NO_MEMORY;
- goto UnlockAndExit;
- }
- /* Attach new object to the Node */
+ /* Object exists - make sure there's no handler */
- Status = AcpiNsAttachObject (Device, ObjDesc, (UINT8) DeviceNode->Type);
+ if (((HandlerType == ACPI_SYSTEM_NOTIFY) &&
+ ObjDesc->Device.SysHandler) ||
+ ((HandlerType == ACPI_DEVICE_NOTIFY) &&
+ ObjDesc->Device.DrvHandler))
+ {
+ Status = AE_EXIST;
+ goto UnlockAndExit;
+ }
+ }
- if (ACPI_FAILURE (Status))
+ else
{
- goto UnlockAndExit;
- }
- }
+ /* Create a new object */
+ ObjDesc = AcpiCmCreateInternalObject (DeviceNode->Type);
+ if (!ObjDesc)
+ {
+ Status = AE_NO_MEMORY;
+ goto UnlockAndExit;
+ }
- /*
- * If we get here, we know that there is no handler installed
- * so let's party
- */
- NotifyObj = AcpiCmCreateInternalObject (INTERNAL_TYPE_NOTIFY);
- if (!NotifyObj)
- {
- Status = AE_NO_MEMORY;
- goto UnlockAndExit;
- }
+ /* Attach new object to the Node */
- NotifyObj->NotifyHandler.Node = DeviceNode;
- NotifyObj->NotifyHandler.Handler = Handler;
- NotifyObj->NotifyHandler.Context = Context;
+ Status = AcpiNsAttachObject (Device, ObjDesc, (UINT8) DeviceNode->Type);
+ if (ACPI_FAILURE (Status))
+ {
+ goto UnlockAndExit;
+ }
+ }
- if (HandlerType == ACPI_SYSTEM_NOTIFY)
- {
- ObjDesc->Device.SysHandler = NotifyObj;
- }
+ /* Install the handler */
- else
- {
- ObjDesc->Device.DrvHandler = NotifyObj;
- }
+ NotifyObj = AcpiCmCreateInternalObject (INTERNAL_TYPE_NOTIFY);
+ if (!NotifyObj)
+ {
+ Status = AE_NO_MEMORY;
+ goto UnlockAndExit;
+ }
+
+ NotifyObj->NotifyHandler.Node = DeviceNode;
+ NotifyObj->NotifyHandler.Handler = Handler;
+ NotifyObj->NotifyHandler.Context = Context;
+ if (HandlerType == ACPI_SYSTEM_NOTIFY)
+ {
+ ObjDesc->Device.SysHandler = NotifyObj;
+ }
+ else /* ACPI_DEVICE_NOTIFY */
+ {
+ ObjDesc->Device.DrvHandler = NotifyObj;
+ }
+ }
+
UnlockAndExit:
AcpiCmReleaseMutex (ACPI_MTX_NAMESPACE);
return_ACPI_STATUS (Status);
@@ -471,10 +465,8 @@ AcpiRemoveNotifyHandler (
ACPI_NAMESPACE_NODE *DeviceNode;
ACPI_STATUS Status = AE_OK;
-
FUNCTION_TRACE ("AcpiRemoveNotifyHandler");
-
/* Parameter validation */
if ((!Handler) ||
@@ -495,68 +487,99 @@ AcpiRemoveNotifyHandler (
}
/*
- * These are the ONLY objects that can receive ACPI notifications
+ * Root Object:
+ * ------------
*/
+ if (Device == ACPI_ROOT_OBJECT) {
- if ((DeviceNode->Type != ACPI_TYPE_DEVICE) &&
- (DeviceNode->Type != ACPI_TYPE_PROCESSOR) &&
- (DeviceNode->Type != ACPI_TYPE_POWER) &&
- (DeviceNode->Type != ACPI_TYPE_THERMAL))
- {
- Status = AE_BAD_PARAMETER;
- goto UnlockAndExit;
- }
+ DEBUG_PRINT(ACPI_INFO, ("Removing notify handler for ROOT object.\n"));
- /* Check for an existing internal object */
+ if (((HandlerType == ACPI_SYSTEM_NOTIFY) &&
+ !AcpiGbl_SysNotify.Handler) ||
+ ((HandlerType == ACPI_DEVICE_NOTIFY) &&
+ !AcpiGbl_DrvNotify.Handler))
+ {
+ Status = AE_NOT_EXIST;
+ goto UnlockAndExit;
+ }
- ObjDesc = AcpiNsGetAttachedObject ((ACPI_HANDLE) DeviceNode);
- if (!ObjDesc)
- {
- Status = AE_NOT_EXIST;
- goto UnlockAndExit;
+ if (HandlerType == ACPI_SYSTEM_NOTIFY) {
+ AcpiGbl_SysNotify.Node = NULL;
+ AcpiGbl_SysNotify.Handler = NULL;
+ AcpiGbl_SysNotify.Context = NULL;
+ }
+ else {
+ AcpiGbl_DrvNotify.Node = NULL;
+ AcpiGbl_DrvNotify.Handler = NULL;
+ AcpiGbl_DrvNotify.Context = NULL;
+ }
}
/*
- * The object exists.
- *
- * Make sure the handler is installed.
+ * Other Objects:
+ * --------------
*/
+ else {
+ /*
+ * These are the ONLY objects that can receive ACPI notifications
+ */
+ if ((DeviceNode->Type != ACPI_TYPE_DEVICE) &&
+ (DeviceNode->Type != ACPI_TYPE_PROCESSOR) &&
+ (DeviceNode->Type != ACPI_TYPE_POWER) &&
+ (DeviceNode->Type != ACPI_TYPE_THERMAL))
+ {
+ Status = AE_BAD_PARAMETER;
+ goto UnlockAndExit;
+ }
- if (HandlerType == ACPI_SYSTEM_NOTIFY)
- {
- NotifyObj = ObjDesc->Device.SysHandler;
- }
- else
- {
- NotifyObj = ObjDesc->Device.DrvHandler;
- }
+ /* Check for an existing internal object */
- if ((!NotifyObj) ||
- (NotifyObj->NotifyHandler.Handler != Handler))
- {
- Status = AE_BAD_PARAMETER;
- goto UnlockAndExit;
- }
+ ObjDesc = AcpiNsGetAttachedObject ((ACPI_HANDLE) DeviceNode);
+ if (!ObjDesc)
+ {
+ Status = AE_NOT_EXIST;
+ goto UnlockAndExit;
+ }
- /*
- * Now we can remove the handler
- */
- if (HandlerType == ACPI_SYSTEM_NOTIFY)
- {
- ObjDesc->Device.SysHandler = NULL;
- }
- else
- {
- ObjDesc->Device.DrvHandler = NULL;
+ /* Object exists - make sure there's an existing handler */
+
+ if (HandlerType == ACPI_SYSTEM_NOTIFY)
+ {
+ NotifyObj = ObjDesc->Device.SysHandler;
+ }
+ else
+ {
+ NotifyObj = ObjDesc->Device.DrvHandler;
+ }
+
+ if ((!NotifyObj) ||
+ (NotifyObj->NotifyHandler.Handler != Handler))
+ {
+ Status = AE_BAD_PARAMETER;
+ goto UnlockAndExit;
+ }
+
+ /* Remove the handler */
+
+ if (HandlerType == ACPI_SYSTEM_NOTIFY)
+ {
+ ObjDesc->Device.SysHandler = NULL;
+ }
+ else
+ {
+ ObjDesc->Device.DrvHandler = NULL;
+ }
+
+ AcpiCmRemoveReference (NotifyObj);
}
- AcpiCmRemoveReference (NotifyObj);
UnlockAndExit:
AcpiCmReleaseMutex (ACPI_MTX_NAMESPACE);
return_ACPI_STATUS (Status);
}
+
/******************************************************************************
*
* FUNCTION: AcpiInstallGpeHandler
diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evxfevnt.c b/sys/contrib/dev/acpica/Subsystem/Events/evxfevnt.c
index b5d60ba..463985d 100644
--- a/sys/contrib/dev/acpica/Subsystem/Events/evxfevnt.c
+++ b/sys/contrib/dev/acpica/Subsystem/Events/evxfevnt.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evxfevnt - External Interfaces, ACPI event disable/enable
- * $Revision: 27 $
+ * $Revision: 28 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Events/evxfregn.c b/sys/contrib/dev/acpica/Subsystem/Events/evxfregn.c
index 0d7b1f3..7c05f50 100644
--- a/sys/contrib/dev/acpica/Subsystem/Events/evxfregn.c
+++ b/sys/contrib/dev/acpica/Subsystem/Events/evxfregn.c
@@ -2,7 +2,7 @@
*
* Module Name: evxfregn - External Interfaces, ACPI Operation Regions and
* Address Spaces.
- * $Revision: 26 $
+ * $Revision: 27 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Hardware/hwacpi.c b/sys/contrib/dev/acpica/Subsystem/Hardware/hwacpi.c
index 754f169..d8b5f10 100644
--- a/sys/contrib/dev/acpica/Subsystem/Hardware/hwacpi.c
+++ b/sys/contrib/dev/acpica/Subsystem/Hardware/hwacpi.c
@@ -1,7 +1,8 @@
+
/******************************************************************************
*
- * Module Name: hwacpi - ACPI hardware functions - mode and timer
- * $Revision: 34 $
+ * Module Name: hwacpi - ACPI Hardware Initialization/Mode Interface
+ * $Revision: 36 $
*
*****************************************************************************/
@@ -9,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -239,7 +240,7 @@ AcpiHwInitialize (
* block is not fixed, so the buffer must be allocated with malloc
*/
- if (ACPI_VALID_ADDRESS (AcpiGbl_FADT->XGpe0Blk.Address) &&
+ if (ACPI_VALID_ADDRESS (AcpiGbl_FADT->XGpe0Blk.Address) &&
AcpiGbl_FADT->Gpe0BlkLen)
{
/* GPE0 specified in FADT */
@@ -265,7 +266,7 @@ AcpiHwInitialize (
AcpiGbl_Gpe0EnableRegisterSave = NULL;
}
- if (ACPI_VALID_ADDRESS (AcpiGbl_FADT->XGpe1Blk.Address) &&
+ if (ACPI_VALID_ADDRESS (AcpiGbl_FADT->XGpe1Blk.Address) &&
AcpiGbl_FADT->Gpe1BlkLen)
{
/* GPE1 defined */
@@ -443,53 +444,3 @@ AcpiHwGetModeCapabilities (void)
}
-/******************************************************************************
- *
- * FUNCTION: AcpiHwPmtTicks
- *
- * PARAMETERS: none
- *
- * RETURN: Current value of the ACPI PMT (timer)
- *
- * DESCRIPTION: Obtains current value of ACPI PMT
- *
- ******************************************************************************/
-
-UINT32
-AcpiHwPmtTicks (void)
-{
- UINT32 Ticks;
-
- FUNCTION_TRACE ("AcpiPmtTicks");
-
- Ticks = AcpiOsIn32 ((ACPI_IO_ADDRESS) ACPI_GET_ADDRESS (AcpiGbl_FADT->XPmTmrBlk.Address));
-
- return_VALUE (Ticks);
-}
-
-
-/******************************************************************************
- *
- * FUNCTION: AcpiHwPmtResolution
- *
- * PARAMETERS: none
- *
- * RETURN: Number of bits of resolution in the PMT (either 24 or 32)
- *
- * DESCRIPTION: Obtains resolution of the ACPI PMT (either 24bit or 32bit)
- *
- ******************************************************************************/
-
-UINT32
-AcpiHwPmtResolution (void)
-{
- FUNCTION_TRACE ("AcpiPmtResolution");
-
- if (0 == AcpiGbl_FADT->TmrValExt)
- {
- return_VALUE (24);
- }
-
- return_VALUE (32);
-}
-
diff --git a/sys/contrib/dev/acpica/Subsystem/Hardware/hwgpe.c b/sys/contrib/dev/acpica/Subsystem/Hardware/hwgpe.c
index 2ed2d34..52851fa 100644
--- a/sys/contrib/dev/acpica/Subsystem/Hardware/hwgpe.c
+++ b/sys/contrib/dev/acpica/Subsystem/Hardware/hwgpe.c
@@ -1,7 +1,8 @@
+
/******************************************************************************
*
* Module Name: hwgpe - Low level GPE enable/disable/clear functions
- * $Revision: 26 $
+ * $Revision: 28 $
*
*****************************************************************************/
@@ -9,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Hardware/hwregs.c b/sys/contrib/dev/acpica/Subsystem/Hardware/hwregs.c
index 3448369..1c47c67 100644
--- a/sys/contrib/dev/acpica/Subsystem/Hardware/hwregs.c
+++ b/sys/contrib/dev/acpica/Subsystem/Hardware/hwregs.c
@@ -3,7 +3,7 @@
*
* Module Name: hwregs - Read/write access functions for the various ACPI
* control and status registers.
- * $Revision: 86 $
+ * $Revision: 88 $
*
******************************************************************************/
@@ -11,7 +11,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -129,7 +129,7 @@
/* This matches the #defines in actypes.h. */
NATIVE_CHAR *SleepStateTable[] = {"\\_S0_","\\_S1_","\\_S2_","\\_S3_",
- "\\_S4_","\\_S4B","\\_S5_"};
+ "\\_S4_","\\_S5_","\\_S4B"};
/*******************************************************************************
@@ -145,7 +145,7 @@ NATIVE_CHAR *SleepStateTable[] = {"\\_S0_","\\_S1_","\\_S2_","\\
*
******************************************************************************/
-static UINT32
+UINT32
AcpiHwGetBitShift (
UINT32 Mask)
{
@@ -300,9 +300,9 @@ AcpiHwObtainSleepTypeRegisterData (
}
else if (((ObjDesc->Package.Elements[0])->Common.Type !=
- ACPI_TYPE_NUMBER) ||
+ ACPI_TYPE_INTEGER) ||
((ObjDesc->Package.Elements[1])->Common.Type !=
- ACPI_TYPE_NUMBER))
+ ACPI_TYPE_INTEGER))
{
/* Must have two */
@@ -315,9 +315,9 @@ AcpiHwObtainSleepTypeRegisterData (
/*
* Valid _Sx_ package size, type, and value
*/
- *Slp_TypA = (UINT8) (ObjDesc->Package.Elements[0])->Number.Value;
+ *Slp_TypA = (UINT8) (ObjDesc->Package.Elements[0])->Integer.Value;
- *Slp_TypB = (UINT8) (ObjDesc->Package.Elements[1])->Number.Value;
+ *Slp_TypB = (UINT8) (ObjDesc->Package.Elements[1])->Integer.Value;
}
@@ -733,15 +733,8 @@ AcpiHwRegisterRead (
case PM1_CONTROL: /* 16-bit access */
- if (RegisterId != SLP_TYPE_B)
- {
- Value |= AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1aCntBlk, 0);
- }
-
- if (RegisterId != SLP_TYPE_A)
- {
- Value |= AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1bCntBlk, 0);
- }
+ Value = AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1aCntBlk, 0);
+ Value |= AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1bCntBlk, 0);
break;
@@ -854,35 +847,20 @@ AcpiHwRegisterWrite (
case PM1_CONTROL: /* 16-bit access */
- /*
- * If SLP_TYP_A or SLP_TYP_B, only write to one reg block.
- * Otherwise, write to both.
- */
- if (RegisterId == SLP_TYPE_A)
- {
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aCntBlk, 0);
- }
- else if (RegisterId == SLP_TYPE_B)
- {
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bCntBlk, 0);
- }
- else
- {
- /* disable/re-enable interrupts if sleeping */
- if (RegisterId == SLP_EN)
- {
- disable();
- }
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aCntBlk, 0);
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bCntBlk, 0);
+ break;
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aCntBlk, 0);
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bCntBlk, 0);
- if (RegisterId == SLP_EN)
- {
- enable();
- }
- }
+ case PM1A_CONTROL: /* 16-bit access */
+
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aCntBlk, 0);
+ break;
+
+
+ case PM1B_CONTROL: /* 16-bit access */
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bCntBlk, 0);
break;
diff --git a/sys/contrib/dev/acpica/Subsystem/Hardware/hwsleep.c b/sys/contrib/dev/acpica/Subsystem/Hardware/hwsleep.c
new file mode 100644
index 0000000..81305a8
--- /dev/null
+++ b/sys/contrib/dev/acpica/Subsystem/Hardware/hwsleep.c
@@ -0,0 +1,296 @@
+
+/******************************************************************************
+ *
+ * Name: hwsleep.c - ACPI Hardware Sleep/Wake Interface
+ * $Revision: 5 $
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
+ * All rights reserved.
+ *
+ * 2. License
+ *
+ * 2.1. This is your license from Intel Corp. under its intellectual property
+ * rights. You may have additional license terms from the party that provided
+ * you this software, covering your right to use that party's intellectual
+ * property rights.
+ *
+ * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
+ * copy of the source code appearing in this file ("Covered Code") an
+ * irrevocable, perpetual, worldwide license under Intel's copyrights in the
+ * base code distributed originally by Intel ("Original Intel Code") to copy,
+ * make derivatives, distribute, use and display any portion of the Covered
+ * Code in any form, with the right to sublicense such rights; and
+ *
+ * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
+ * license (with the right to sublicense), under only those claims of Intel
+ * patents that are infringed by the Original Intel Code, to make, use, sell,
+ * offer to sell, and import the Covered Code and derivative works thereof
+ * solely to the minimum extent necessary to exercise the above copyright
+ * license, and in no event shall the patent license extend to any additions
+ * to or modifications of the Original Intel Code. No other license or right
+ * is granted directly or by implication, estoppel or otherwise;
+ *
+ * The above copyright and patent license is granted only if the following
+ * conditions are met:
+ *
+ * 3. Conditions
+ *
+ * 3.1. Redistribution of Source with Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification with rights to further distribute source must include
+ * the above Copyright Notice, the above License, this list of Conditions,
+ * and the following Disclaimer and Export Compliance provision. In addition,
+ * Licensee must cause all Covered Code to which Licensee contributes to
+ * contain a file documenting the changes Licensee made to create that Covered
+ * Code and the date of any change. Licensee must include in that file the
+ * documentation of any changes made by any predecessor Licensee. Licensee
+ * must include a prominent statement that the modification is derived,
+ * directly or indirectly, from Original Intel Code.
+ *
+ * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification without rights to further distribute source must
+ * include the following Disclaimer and Export Compliance provision in the
+ * documentation and/or other materials provided with distribution. In
+ * addition, Licensee may not authorize further sublicense of source of any
+ * portion of the Covered Code, and must include terms to the effect that the
+ * license from Licensee to its licensee is limited to the intellectual
+ * property embodied in the software Licensee provides to its licensee, and
+ * not to intellectual property embodied in modifications its licensee may
+ * make.
+ *
+ * 3.3. Redistribution of Executable. Redistribution in executable form of any
+ * substantial portion of the Covered Code or modification must reproduce the
+ * above Copyright Notice, and the following Disclaimer and Export Compliance
+ * provision in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3.4. Intel retains all right, title, and interest in and to the Original
+ * Intel Code.
+ *
+ * 3.5. Neither the name Intel nor any other trademark owned or controlled by
+ * Intel shall be used in advertising or otherwise to promote the sale, use or
+ * other dealings in products derived from or relating to the Covered Code
+ * without prior written authorization from Intel.
+ *
+ * 4. Disclaimer and Export Compliance
+ *
+ * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
+ * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
+ * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
+ * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
+ * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
+ * PARTICULAR PURPOSE.
+ *
+ * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
+ * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
+ * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
+ * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
+ * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
+ * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
+ * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
+ * LIMITED REMEDY.
+ *
+ * 4.3. Licensee shall not export, either directly or indirectly, any of this
+ * software or system incorporating such software without first obtaining any
+ * required license or other approval from the U. S. Department of Commerce or
+ * any other agency or department of the United States Government. In the
+ * event Licensee exports any such software from the United States or
+ * re-exports any such software from a foreign destination, Licensee shall
+ * ensure that the distribution and export/re-export of the software is in
+ * compliance with all laws, regulations, orders, or other restrictions of the
+ * U.S. Export Administration Regulations. Licensee agrees that neither it nor
+ * any of its subsidiaries will export/re-export any technical data, process,
+ * software, or service, directly or indirectly, to any country for which the
+ * United States government or any agency thereof requires an export license,
+ * other governmental approval, or letter of assurance, without first obtaining
+ * such license, approval or letter.
+ *
+ *****************************************************************************/
+
+#include "acpi.h"
+#include "acnamesp.h"
+#include "achware.h"
+
+#define _COMPONENT HARDWARE
+ MODULE_NAME ("hwsleep")
+
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiSetFirmwareWakingVector
+ *
+ * PARAMETERS: PhysicalAddress - Physical address of ACPI real mode
+ * entry point.
+ *
+ * RETURN: AE_OK or AE_ERROR
+ *
+ * DESCRIPTION: Access function for dFirmwareWakingVector field in FACS
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiSetFirmwareWakingVector (
+ ACPI_PHYSICAL_ADDRESS PhysicalAddress)
+{
+
+ FUNCTION_TRACE ("AcpiSetFirmwareWakingVector");
+
+
+ /* Make sure that we have an FACS */
+
+ if (!AcpiGbl_FACS)
+ {
+ return_ACPI_STATUS (AE_NO_ACPI_TABLES);
+ }
+
+ /* Set the vector */
+
+ if (AcpiGbl_FACS->VectorWidth == 32)
+ {
+ * (UINT32 *) AcpiGbl_FACS->FirmwareWakingVector = (UINT32) PhysicalAddress;
+ }
+ else
+ {
+ *AcpiGbl_FACS->FirmwareWakingVector = PhysicalAddress;
+ }
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiGetFirmwareWakingVector
+ *
+ * PARAMETERS: *PhysicalAddress - Output buffer where contents of
+ * the FirmwareWakingVector field of
+ * the FACS will be stored.
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Access function for dFirmwareWakingVector field in FACS
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiGetFirmwareWakingVector (
+ ACPI_PHYSICAL_ADDRESS *PhysicalAddress)
+{
+
+ FUNCTION_TRACE ("AcpiGetFirmwareWakingVector");
+
+
+ if (!PhysicalAddress)
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
+
+ /* Make sure that we have an FACS */
+
+ if (!AcpiGbl_FACS)
+ {
+ return_ACPI_STATUS (AE_NO_ACPI_TABLES);
+ }
+
+ /* Get the vector */
+
+ if (AcpiGbl_FACS->VectorWidth == 32)
+ {
+ *PhysicalAddress = * (UINT32 *) AcpiGbl_FACS->FirmwareWakingVector;
+ }
+ else
+ {
+ *PhysicalAddress = *AcpiGbl_FACS->FirmwareWakingVector;
+ }
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiEnterSleepState
+ *
+ * PARAMETERS: SleepState - Which sleep state to enter
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Enter a system sleep state (see ACPI 2.0 spec p 231)
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiEnterSleepState (
+ UINT8 SleepState)
+{
+ ACPI_STATUS Status;
+ ACPI_OBJECT_LIST ArgList;
+ ACPI_OBJECT Arg;
+ UINT8 TypeA;
+ UINT8 TypeB;
+ UINT16 PM1AControl;
+ UINT16 PM1BControl;
+
+ FUNCTION_TRACE ("AcpiEnterSleepState");
+
+ /*
+ * _PSW methods could be run here to enable wake-on keyboard, LAN, etc.
+ */
+
+ Status = AcpiHwObtainSleepTypeRegisterData(SleepState, &TypeA, &TypeB);
+
+ if (!ACPI_SUCCESS(Status))
+ {
+ return Status;
+ }
+
+ /* run the _PTS and _GTS methods */
+ MEMSET(&ArgList, 0, sizeof(ArgList));
+ ArgList.Count = 1;
+ ArgList.Pointer = &Arg;
+
+ MEMSET(&Arg, 0, sizeof(Arg));
+ Arg.Type = ACPI_TYPE_INTEGER;
+ Arg.Integer.Value = SleepState;
+
+ AcpiEvaluateObject(NULL, "\\_PTS", &ArgList, NULL);
+ AcpiEvaluateObject(NULL, "\\_GTS", &ArgList, NULL);
+
+ /* clear wake status */
+ AcpiHwRegisterBitAccess(ACPI_WRITE, ACPI_MTX_LOCK, WAK_STS, 1);
+
+ PM1AControl = (UINT16) AcpiHwRegisterRead(ACPI_MTX_LOCK, PM1_CONTROL);
+
+ /* mask off SLP_EN and SLP_TYP fields */
+ PM1AControl &= 0xC3FF;
+
+ /* mask in SLP_EN */
+ PM1AControl |= (1 << AcpiHwGetBitShift (SLP_EN_MASK));
+
+ PM1BControl = PM1AControl;
+
+ /* mask in SLP_TYP */
+ PM1AControl |= (TypeA << AcpiHwGetBitShift (SLP_TYPE_X_MASK));
+ PM1BControl |= (TypeB << AcpiHwGetBitShift (SLP_TYPE_X_MASK));
+
+ DEBUG_PRINT(ACPI_OK, ("Entering S%d\n", SleepState));
+
+ /* the old version was disabling interrupts. let's try it without
+ * and see how that works
+ */
+ /*disable();*/
+
+ AcpiHwRegisterWrite(ACPI_MTX_LOCK, PM1A_CONTROL, PM1AControl);
+ AcpiHwRegisterWrite(ACPI_MTX_LOCK, PM1B_CONTROL, PM1BControl);
+
+ /*enable();*/
+
+ return_ACPI_STATUS (AE_OK);
+}
diff --git a/sys/contrib/dev/acpica/Subsystem/Hardware/hwtimer.c b/sys/contrib/dev/acpica/Subsystem/Hardware/hwtimer.c
new file mode 100644
index 0000000..197c65c
--- /dev/null
+++ b/sys/contrib/dev/acpica/Subsystem/Hardware/hwtimer.c
@@ -0,0 +1,302 @@
+
+/******************************************************************************
+ *
+ * Name: hwtimer.c - ACPI Power Management Timer Interface
+ * $Revision: 4 $
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
+ * All rights reserved.
+ *
+ * 2. License
+ *
+ * 2.1. This is your license from Intel Corp. under its intellectual property
+ * rights. You may have additional license terms from the party that provided
+ * you this software, covering your right to use that party's intellectual
+ * property rights.
+ *
+ * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
+ * copy of the source code appearing in this file ("Covered Code") an
+ * irrevocable, perpetual, worldwide license under Intel's copyrights in the
+ * base code distributed originally by Intel ("Original Intel Code") to copy,
+ * make derivatives, distribute, use and display any portion of the Covered
+ * Code in any form, with the right to sublicense such rights; and
+ *
+ * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
+ * license (with the right to sublicense), under only those claims of Intel
+ * patents that are infringed by the Original Intel Code, to make, use, sell,
+ * offer to sell, and import the Covered Code and derivative works thereof
+ * solely to the minimum extent necessary to exercise the above copyright
+ * license, and in no event shall the patent license extend to any additions
+ * to or modifications of the Original Intel Code. No other license or right
+ * is granted directly or by implication, estoppel or otherwise;
+ *
+ * The above copyright and patent license is granted only if the following
+ * conditions are met:
+ *
+ * 3. Conditions
+ *
+ * 3.1. Redistribution of Source with Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification with rights to further distribute source must include
+ * the above Copyright Notice, the above License, this list of Conditions,
+ * and the following Disclaimer and Export Compliance provision. In addition,
+ * Licensee must cause all Covered Code to which Licensee contributes to
+ * contain a file documenting the changes Licensee made to create that Covered
+ * Code and the date of any change. Licensee must include in that file the
+ * documentation of any changes made by any predecessor Licensee. Licensee
+ * must include a prominent statement that the modification is derived,
+ * directly or indirectly, from Original Intel Code.
+ *
+ * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification without rights to further distribute source must
+ * include the following Disclaimer and Export Compliance provision in the
+ * documentation and/or other materials provided with distribution. In
+ * addition, Licensee may not authorize further sublicense of source of any
+ * portion of the Covered Code, and must include terms to the effect that the
+ * license from Licensee to its licensee is limited to the intellectual
+ * property embodied in the software Licensee provides to its licensee, and
+ * not to intellectual property embodied in modifications its licensee may
+ * make.
+ *
+ * 3.3. Redistribution of Executable. Redistribution in executable form of any
+ * substantial portion of the Covered Code or modification must reproduce the
+ * above Copyright Notice, and the following Disclaimer and Export Compliance
+ * provision in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3.4. Intel retains all right, title, and interest in and to the Original
+ * Intel Code.
+ *
+ * 3.5. Neither the name Intel nor any other trademark owned or controlled by
+ * Intel shall be used in advertising or otherwise to promote the sale, use or
+ * other dealings in products derived from or relating to the Covered Code
+ * without prior written authorization from Intel.
+ *
+ * 4. Disclaimer and Export Compliance
+ *
+ * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
+ * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
+ * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
+ * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
+ * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
+ * PARTICULAR PURPOSE.
+ *
+ * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
+ * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
+ * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
+ * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
+ * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
+ * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
+ * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
+ * LIMITED REMEDY.
+ *
+ * 4.3. Licensee shall not export, either directly or indirectly, any of this
+ * software or system incorporating such software without first obtaining any
+ * required license or other approval from the U. S. Department of Commerce or
+ * any other agency or department of the United States Government. In the
+ * event Licensee exports any such software from the United States or
+ * re-exports any such software from a foreign destination, Licensee shall
+ * ensure that the distribution and export/re-export of the software is in
+ * compliance with all laws, regulations, orders, or other restrictions of the
+ * U.S. Export Administration Regulations. Licensee agrees that neither it nor
+ * any of its subsidiaries will export/re-export any technical data, process,
+ * software, or service, directly or indirectly, to any country for which the
+ * United States government or any agency thereof requires an export license,
+ * other governmental approval, or letter of assurance, without first obtaining
+ * such license, approval or letter.
+ *
+ *****************************************************************************/
+
+#include "acpi.h"
+#include "achware.h"
+
+#define _COMPONENT HARDWARE
+ MODULE_NAME ("hwtimer")
+
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiGetTimerResolution
+ *
+ * PARAMETERS: none
+ *
+ * RETURN: Number of bits of resolution in the PM Timer (24 or 32).
+ *
+ * DESCRIPTION: Obtains resolution of the ACPI PM Timer.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiGetTimerResolution (
+ UINT32 *Resolution)
+{
+ FUNCTION_TRACE ("AcpiGetTimerResolution");
+
+ if (!Resolution)
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
+
+ if (0 == AcpiGbl_FADT->TmrValExt)
+ {
+ *Resolution = 24;
+ }
+ else
+ {
+ *Resolution = 32;
+ }
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiGetTimer
+ *
+ * PARAMETERS: none
+ *
+ * RETURN: Current value of the ACPI PM Timer (in ticks).
+ *
+ * DESCRIPTION: Obtains current value of ACPI PM Timer.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiGetTimer (
+ UINT32 *Ticks)
+{
+ FUNCTION_TRACE ("AcpiGetTimer");
+
+ if (!Ticks)
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
+
+ *Ticks = AcpiOsIn32 ((ACPI_IO_ADDRESS) ACPI_GET_ADDRESS (AcpiGbl_FADT->XPmTmrBlk.Address));
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiGetTimerDuration
+ *
+ * PARAMETERS: StartTicks
+ * EndTicks
+ * TimeElapsed
+ *
+ * RETURN: TimeElapsed
+ *
+ * DESCRIPTION: Computes the time elapsed (in microseconds) between two
+ * PM Timer time stamps, taking into account the possibility of
+ * rollovers, the timer resolution, and timer frequency.
+ *
+ * The PM Timer's clock ticks at roughly 3.6 times per
+ * _microsecond_, and its clock continues through Cx state
+ * transitions (unlike many CPU timestamp counters) -- making it
+ * a versatile and accurate timer.
+ *
+ * Note that this function accomodates only a single timer
+ * rollover. Thus for 24-bit timers, this function should only
+ * be used for calculating durations less than ~4.6 seconds
+ * (~20 hours for 32-bit timers).
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiGetTimerDuration (
+ UINT32 StartTicks,
+ UINT32 EndTicks,
+ UINT32 *TimeElapsed)
+{
+ UINT32 DeltaTicks = 0;
+ UINT32 Seconds = 0;
+ UINT32 Milliseconds = 0;
+ UINT32 Microseconds = 0;
+ UINT32 Remainder = 0;
+
+ FUNCTION_TRACE ("AcpiGetTimerDuration");
+
+ if (!TimeElapsed)
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
+
+ /*
+ * Compute Tick Delta:
+ * -------------------
+ * Handle timer rollovers on 24- versus 32-bit timers.
+ */
+ if (StartTicks < EndTicks)
+ {
+ DeltaTicks = EndTicks - StartTicks;
+ }
+ else if (StartTicks > EndTicks)
+ {
+ /* 24-bit Timer */
+ if (0 == AcpiGbl_FADT->TmrValExt)
+ {
+ DeltaTicks = (0x00FFFFFF - StartTicks) + EndTicks;
+ }
+ /* 32-bit Timer */
+ else
+ {
+ DeltaTicks = (0xFFFFFFFF - StartTicks) + EndTicks;
+ }
+ }
+
+ /*
+ * Compute Duration:
+ * -----------------
+ * Since certain compilers (gcc/Linux, argh!) don't support 64-bit
+ * divides in kernel-space we have to do some trickery to preserve
+ * accuracy while using 32-bit math.
+ *
+ * TODO: Change to use 64-bit math when supported.
+ *
+ * The process is as follows:
+ * 1. Compute the number of seconds by dividing Delta Ticks by
+ * the timer frequency.
+ * 2. Compute the number of milliseconds in the remainder from step #1
+ * by multiplying by 1000 and then dividing by the timer frequency.
+ * 3. Compute the number of microseconds in the remainder from step #2
+ * by multiplying by 1000 and then dividing by the timer frequency.
+ * 4. Add the results from steps 1, 2, and 3 to get the total duration.
+ *
+ * Example: The time elapsed for DeltaTicks = 0xFFFFFFFF should be
+ * 1199864031 microseconds. This is computed as follows:
+ * Step #1: Seconds = 1199; Remainder = 3092840
+ * Step #2: Milliseconds = 864; Remainder = 113120
+ * Step #3: Microseconds = 31; Remainder = <don't care!>
+ */
+
+ /* Step #1 */
+ Seconds = DeltaTicks / PM_TIMER_FREQUENCY;
+ Remainder = DeltaTicks % PM_TIMER_FREQUENCY;
+
+ /* Step #2 */
+ Milliseconds = (Remainder * 1000) / PM_TIMER_FREQUENCY;
+ Remainder = (Remainder * 1000) % PM_TIMER_FREQUENCY;
+
+ /* Step #3 */
+ Microseconds = (Remainder * 1000) / PM_TIMER_FREQUENCY;
+
+ /* Step #4 */
+ *TimeElapsed = Seconds * 1000000;
+ *TimeElapsed += Milliseconds * 1000;
+ *TimeElapsed += Microseconds;
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/accommon.h b/sys/contrib/dev/acpica/Subsystem/Include/accommon.h
index 618a8fb..7ae0299 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/accommon.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/accommon.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: accommon.h -- prototypes for the common (subsystem-wide) procedures
- * $Revision: 83 $
+ * $Revision: 87 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -191,6 +191,8 @@ AcpiCmAllocateOwnerId (
* CmClib - Local implementations of C library functions
*/
+#ifndef ACPI_USE_SYSTEM_CLIBRARY
+
NATIVE_UINT
AcpiCmStrlen (
const NATIVE_CHAR *String);
@@ -232,7 +234,7 @@ UINT32
AcpiCmStrtoul (
const NATIVE_CHAR *String,
NATIVE_CHAR **Terminator,
- UINT32 Base);
+ NATIVE_UINT Base);
NATIVE_CHAR *
AcpiCmStrstr (
@@ -252,7 +254,7 @@ AcpiCmMemcpy (
void *
AcpiCmMemset (
void *Dest,
- UINT32 Value,
+ NATIVE_UINT Value,
NATIVE_UINT Count);
UINT32
@@ -263,6 +265,7 @@ UINT32
AcpiCmToLower (
UINT32 c);
+#endif /* ACPI_USE_SYSTEM_CLIBRARY */
/*
* CmCopy - Object construction and conversion interfaces
@@ -388,7 +391,7 @@ FunctionValueExit (
UINT32 LineNumber,
UINT32 ComponentId,
NATIVE_CHAR *FunctionName,
- NATIVE_UINT Value);
+ ACPI_INTEGER Value);
void
FunctionPtrExit (
@@ -687,7 +690,7 @@ AcpiCmInitStaticObject (
#define AcpiCmCallocate(a) _CmCallocate(a, _COMPONENT,_THIS_MODULE,__LINE__)
#define AcpiCmFree(a) _CmFree(a,_COMPONENT,_THIS_MODULE,__LINE__)
-#ifndef ACPI_DEBUG
+#ifndef ACPI_DEBUG_TRACK_ALLOCATIONS
#define AcpiCmAddElementToAllocList(a,b,c,d,e,f)
#define AcpiCmDeleteElementFromAllocList(a,b,c,d)
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acconfig.h b/sys/contrib/dev/acpica/Subsystem/Include/acconfig.h
index 18292b4..77b4916 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acconfig.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acconfig.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acconfig.h - Global configuration constants
- * $Revision: 49 $
+ * $Revision: 53 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -144,7 +144,7 @@
/* Version string */
-#define ACPI_CA_VERSION __DATE__
+#define ACPI_CA_VERSION 0x20010125
/* Maximum objects in the various object caches */
@@ -213,6 +213,10 @@
#define MTH_NUM_ARGS 7
#define MTH_MAX_ARG 6
+/* Maximum length of resulting string when converting from a buffer */
+
+#define ACPI_MAX_STRING_CONVERSION 200
+
/*
* Operand Stack (in WALK_STATE), Must be large enough to contain MTH_MAX_ARG
*/
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acdebug.h b/sys/contrib/dev/acpica/Subsystem/Include/acdebug.h
index 59b402c..453710e 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acdebug.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acdebug.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acdebug.h - ACPI/AML debugger
- * $Revision: 38 $
+ * $Revision: 39 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acdispat.h b/sys/contrib/dev/acpica/Subsystem/Include/acdispat.h
index c268ced..0a7b4d5 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acdispat.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acdispat.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acdispat.h - dispatcher (parser to interpreter interface)
- * $Revision: 34 $
+ * $Revision: 35 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acefi.h b/sys/contrib/dev/acpica/Subsystem/Include/acefi.h
index 18a55d5..f0611f6 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acefi.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acefi.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acefi.h - OS specific defines, etc.
- * $Revision: 5 $
+ * $Revision: 6 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acenv.h b/sys/contrib/dev/acpica/Subsystem/Include/acenv.h
index 5290200..f49098a 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acenv.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acenv.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acenv.h - Generation environment specific items
- * $Revision: 66 $
+ * $Revision: 70 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -119,7 +119,7 @@
/*
- * Configuration for ACPI Utilities
+ * Configuration for ACPI tools and utilities
*/
#ifdef _ACPI_DUMP_APP
@@ -146,6 +146,16 @@
#define ACPI_USE_SYSTEM_CLIBRARY
#endif
+/*
+ * Memory allocation tracking. Used only if
+ * 1) This is the debug version
+ * 2) This is NOT a 16-bit version of the code (not enough real-mode memory)
+ */
+#ifdef ACPI_DEBUG
+#ifndef _IA16
+#define ACPI_DEBUG_TRACK_ALLOCATIONS
+#endif
+#endif
/*
* Environment configuration. The purpose of this file is to interface to the
@@ -245,17 +255,17 @@
#define STRUPR(s) strupr((s))
#define STRLEN(s) strlen((s))
#define STRCPY(d,s) strcpy((d), (s))
-#define STRNCPY(d,s,n) strncpy((d), (s), (n))
-#define STRNCMP(d,s,n) strncmp((d), (s), (n))
+#define STRNCPY(d,s,n) strncpy((d), (s), (NATIVE_INT)(n))
+#define STRNCMP(d,s,n) strncmp((d), (s), (NATIVE_INT)(n))
#define STRCMP(d,s) strcmp((d), (s))
#define STRCAT(d,s) strcat((d), (s))
-#define STRNCAT(d,s,n) strncat((d), (s), (n))
-#define STRTOUL(d,s,n) strtoul((d), (s), (n))
-#define MEMCPY(d,s,n) memcpy((d), (s), (n))
-#define MEMSET(d,s,n) memset((d), (s), (n))
+#define STRNCAT(d,s,n) strncat((d), (s), (NATIVE_INT)(n))
+#define STRTOUL(d,s,n) strtoul((d), (s), (NATIVE_INT)(n))
+#define MEMCPY(d,s,n) memcpy((d), (s), (NATIVE_INT)(n))
+#define MEMSET(d,s,n) memset((d), (s), (NATIVE_INT)(n))
#define TOUPPER toupper
#define TOLOWER tolower
-
+#define IS_XDIGIT isxdigit
/******************************************************************************
*
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acevents.h b/sys/contrib/dev/acpica/Subsystem/Include/acevents.h
index eff1361..846b399 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acevents.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acevents.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acevents.h - Event subcomponent prototypes and defines
- * $Revision: 62 $
+ * $Revision: 63 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acexcep.h b/sys/contrib/dev/acpica/Subsystem/Include/acexcep.h
index 0269136..13dbf75 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acexcep.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acexcep.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acexcep.h - Exception codes returned by the ACPI subsystem
- * $Revision: 38 $
+ * $Revision: 41 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -207,8 +207,10 @@
#define AE_AML_NAME_NOT_FOUND (ACPI_STATUS) (0x0010 | AE_CODE_AML)
#define AE_AML_INTERNAL (ACPI_STATUS) (0x0011 | AE_CODE_AML)
#define AE_AML_INVALID_SPACE_ID (ACPI_STATUS) (0x0012 | AE_CODE_AML)
+#define AE_AML_STRING_LIMIT (ACPI_STATUS) (0x0013 | AE_CODE_AML)
+#define AE_AML_NO_RETURN_VALUE (ACPI_STATUS) (0x0014 | AE_CODE_AML)
-#define AE_CODE_AML_MAX 0x0012
+#define AE_CODE_AML_MAX 0x0014
/*
* Internal exceptions used for control
@@ -293,6 +295,8 @@ static NATIVE_CHAR *AcpiGbl_ExceptionNames_Aml[] =
"AE_AML_NAME_NOT_FOUND",
"AE_AML_INTERNAL",
"AE_AML_INVALID_SPACE_ID",
+ "AE_AML_STRING_LIMIT",
+ "AE_AML_NO_RETURN_VALUE",
};
static NATIVE_CHAR *AcpiGbl_ExceptionNames_Ctrl[] =
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acfreebsd.h b/sys/contrib/dev/acpica/Subsystem/Include/acfreebsd.h
index fdd5557..ca6c799 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acfreebsd.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acfreebsd.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acfreebsd.h - OS specific defines, etc.
- * $Revision: 2 $
+ * $Revision: 4 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acgcc.h b/sys/contrib/dev/acpica/Subsystem/Include/acgcc.h
index aa7342a..55073fd 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acgcc.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acgcc.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acgcc.h - GCC specific defines, etc.
- * $Revision: 3 $
+ * $Revision: 4 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acglobal.h b/sys/contrib/dev/acpica/Subsystem/Include/acglobal.h
index 1143d02..ee2035f 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acglobal.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acglobal.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acglobal.h - Declarations for global variables
- * $Revision: 93 $
+ * $Revision: 96 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -245,7 +245,6 @@ ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockSet; /* TBD: [Restruct
ACPI_EXTERN BOOLEAN AcpiGbl_StepToNextCall;
ACPI_EXTERN BOOLEAN AcpiGbl_AcpiHardwarePresent;
-
ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER AcpiGbl_DrvNotify;
ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER AcpiGbl_SysNotify;
@@ -253,7 +252,8 @@ ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER AcpiGbl_SysNotify;
extern BOOLEAN AcpiGbl_Shutdown;
extern UINT32 AcpiGbl_SystemFlags;
extern UINT32 AcpiGbl_StartupFlags;
-extern UINT8 AcpiGbl_DecodeTo8bit[];
+extern UINT8 AcpiGbl_DecodeTo8bit[8];
+extern NATIVE_CHAR AcpiGbl_HexToAscii[];
/*****************************************************************************
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/achware.h b/sys/contrib/dev/acpica/Subsystem/Include/achware.h
index 35c88cd..bcefafa 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/achware.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/achware.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: achware.h -- hardware specific interfaces
- * $Revision: 49 $
+ * $Revision: 53 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -118,6 +118,10 @@
#define __ACHWARE_H__
+/* PM Timer ticks per second (HZ) */
+#define PM_TIMER_FREQUENCY 3579545
+
+
/* Prototypes */
@@ -183,6 +187,11 @@ void
AcpiHwClearAcpiStatus (
void);
+UINT32
+AcpiHwGetBitShift (
+ UINT32 Mask);
+
+
/* GPE support */
@@ -212,89 +221,21 @@ AcpiHwObtainSleepTypeRegisterData (
UINT8 *Slp_TypB);
-/* Cx State Prototypes */
-
-ACPI_STATUS
-AcpiHwEnterC1(
- ACPI_IO_ADDRESS PblkAddress,
- UINT32 *PmTimerTicks);
-
-ACPI_STATUS
-AcpiHwEnterC2(
- ACPI_IO_ADDRESS PblkAddress,
- UINT32 *PmTimerTicks);
-
-ACPI_STATUS
-AcpiHwEnterC3(
- ACPI_IO_ADDRESS PblkAddress,
- UINT32 *PmTimerTicks);
-
-ACPI_STATUS
-AcpiHwEnterCx (
- ACPI_IO_ADDRESS PblkAddress,
- UINT32 *PmTimerTicks);
-
-ACPI_STATUS
-AcpiHwSetCx (
- UINT32 CxState);
-
-ACPI_STATUS
-AcpiHwGetCxInfo (
- UINT32 CxStates[]);
+/* ACPI Timer prototypes */
ACPI_STATUS
-AcpiHwGetCxHandler (
- UINT32 CxState,
- ACPI_C_STATE_HANDLER *Handler);
+AcpiGetTimerResolution (
+ UINT32 *Resolution);
ACPI_STATUS
-AcpiHwSetCxHandler (
- UINT32 CxState,
- ACPI_C_STATE_HANDLER Handler);
-
-
-/* Throttling Prototypes */
-
-void
-AcpiHwEnableThrottling (
- ACPI_IO_ADDRESS PblkAddress);
-
-void
-AcpiHwDisableThrottling (
- ACPI_IO_ADDRESS PblkAddress);
-
-UINT32
-AcpiHwGetDutyCycle (
- UINT8 DutyOffset,
- ACPI_IO_ADDRESS PblkAddress,
- UINT32 NumThrottleStates);
-
-void
-AcpiHwProgramDutyCycle (
- UINT8 DutyOffset,
- UINT32 DutyCycle,
- ACPI_IO_ADDRESS PblkAddress,
- UINT32 NumThrottleStates);
-
-NATIVE_UINT
-AcpiHwLocalPow (
- NATIVE_UINT x,
- NATIVE_UINT y);
-
-
-/* ACPI Timer prototypes */
-
-UINT32
-AcpiHwPmtTicks (
- void);
-
-UINT32
-AcpiHwPmtResolution (
- void);
+AcpiGetTimer (
+ UINT32 *Ticks);
ACPI_STATUS
-AcpiGetTimer (
- UINT32 *OutTicks);
+AcpiGetTimerDuration (
+ UINT32 StartTicks,
+ UINT32 EndTicks,
+ UINT32 *TimeElapsed);
#endif /* __ACHWARE_H__ */
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acinterp.h b/sys/contrib/dev/acpica/Subsystem/Include/acinterp.h
index 941c9df..52cc897 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acinterp.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acinterp.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acinterp.h - Interpreter subcomponent prototypes and defines
- * $Revision: 87 $
+ * $Revision: 91 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -138,6 +138,7 @@
#define METHOD_DELETE_AT_COMPLETION 0x2
+
ACPI_STATUS
AcpiAmlResolveOperands (
UINT16 Opcode,
@@ -161,9 +162,34 @@ AcpiAmlExecuteMethod (
/*
- * amfield - ACPI AML (p-code) execution - field manipulation
+ * amconvrt - object conversion
*/
+ACPI_STATUS
+AcpiAmlConvertToInteger (
+ ACPI_OPERAND_OBJECT **ObjDesc,
+ ACPI_WALK_STATE *WalkState);
+
+ACPI_STATUS
+AcpiAmlConvertToBuffer (
+ ACPI_OPERAND_OBJECT **ObjDesc,
+ ACPI_WALK_STATE *WalkState);
+
+ACPI_STATUS
+AcpiAmlConvertToString (
+ ACPI_OPERAND_OBJECT **ObjDesc,
+ ACPI_WALK_STATE *WalkState);
+
+ACPI_STATUS
+AcpiAmlConvertToTargetType (
+ OBJECT_TYPE_INTERNAL DestinationType,
+ ACPI_OPERAND_OBJECT **ObjDesc,
+ ACPI_WALK_STATE *WalkState);
+
+
+/*
+ * amfield - ACPI AML (p-code) execution - field manipulation
+ */
ACPI_STATUS
AcpiAmlReadField (
@@ -510,17 +536,75 @@ AcpiAmlExecStore (
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
-AcpiAmlStoreObjectToObject (
+AcpiAmlStoreObjectToIndex (
ACPI_OPERAND_OBJECT *ValDesc,
ACPI_OPERAND_OBJECT *DestDesc,
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
AcpiAmlStoreObjectToNode (
- ACPI_OPERAND_OBJECT *ValDesc,
+ ACPI_OPERAND_OBJECT *SourceDesc,
ACPI_NAMESPACE_NODE *Node,
ACPI_WALK_STATE *WalkState);
+ACPI_STATUS
+AcpiAmlStoreObjectToObject (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *DestDesc,
+ ACPI_WALK_STATE *WalkState);
+
+
+/*
+ *
+ */
+
+ACPI_STATUS
+AcpiAmlResolveObject (
+ ACPI_OPERAND_OBJECT **SourceDescPtr,
+ OBJECT_TYPE_INTERNAL TargetType,
+ ACPI_WALK_STATE *WalkState);
+
+ACPI_STATUS
+AcpiAmlStoreObject (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ OBJECT_TYPE_INTERNAL TargetType,
+ ACPI_OPERAND_OBJECT **TargetDescPtr,
+ ACPI_WALK_STATE *WalkState);
+
+
+/*
+ * amcopy - object copy
+ */
+
+ACPI_STATUS
+AcpiAmlCopyBufferToBuffer (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *TargetDesc);
+
+ACPI_STATUS
+AcpiAmlCopyStringToString (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *TargetDesc);
+
+ACPI_STATUS
+AcpiAmlCopyIntegerToIndexField (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *TargetDesc);
+
+ACPI_STATUS
+AcpiAmlCopyIntegerToBankField (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *TargetDesc);
+
+ACPI_STATUS
+AcpiAmlCopyDataToNamedField (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_NAMESPACE_NODE *Node);
+
+ACPI_STATUS
+AcpiAmlCopyIntegerToFieldUnit (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *TargetDesc);
/*
* amutils - interpreter/scanner utilities
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/aclinux.h b/sys/contrib/dev/acpica/Subsystem/Include/aclinux.h
index 28c99ba..ecf809a 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/aclinux.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/aclinux.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: aclinux.h - OS specific defines, etc.
- * $Revision: 6 $
+ * $Revision: 7 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/aclocal.h b/sys/contrib/dev/acpica/Subsystem/Include/aclocal.h
index 946cf4b..869737b 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/aclocal.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/aclocal.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: aclocal.h - Internal data types used across the ACPI subsystem
- * $Revision: 94 $
+ * $Revision: 100 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -165,7 +165,7 @@ typedef UINT32 ACPI_MUTEX_HANDLE;
#define NUM_MTX MAX_MTX+1
-#ifdef ACPI_DEBUG
+#if defined(ACPI_DEBUG) || defined(ENABLE_DEBUGGER)
#ifdef DEFINE_ACPI_GLOBALS
/* Names for the mutexes used in the subsystem */
@@ -269,8 +269,11 @@ typedef struct acpi_node
#define ANOBJ_AML_ATTACHMENT 0x01
#define ANOBJ_END_OF_PEER_LIST 0x02
#define ANOBJ_DATA_WIDTH_32 0x04 /* Parent table is 64-bits */
-#define ANOBJ_METHOD_ARG 0x40
-#define ANOBJ_METHOD_LOCAL 0x80
+#define ANOBJ_METHOD_ARG 0x08
+#define ANOBJ_METHOD_LOCAL 0x10
+#define ANOBJ_METHOD_NO_RETVAL 0x20
+#define ANOBJ_METHOD_SOME_NO_RETVAL 0x40
+
/*
* ACPI Table Descriptor. One per ACPI table
@@ -564,7 +567,9 @@ typedef struct acpi_opcode_info
UINT32 ParseArgs; /* Grammar/Parse time arguments */
UINT32 RuntimeArgs; /* Interpret time arguments */
- DEBUG_ONLY_MEMBERS (NATIVE_CHAR *Name) /* op name (debug only) */
+#ifdef _OPCODE_NAMES
+ NATIVE_CHAR *Name; /* op name (debug only) */
+#endif
} ACPI_OPCODE_INFO;
@@ -679,6 +684,7 @@ typedef struct acpi_walk_state
ACPI_GENERIC_STATE *ScopeInfo; /* Stack of nested scopes */
ACPI_PARSE_STATE *ParserState; /* Current state of parser */
UINT8 *AmlLastWhile;
+ ACPI_OPCODE_INFO *OpInfo; /* Info on current opcode */
ACPI_PARSE_DOWNWARDS DescendingCallback;
ACPI_PARSE_UPWARDS AscendingCallback;
@@ -693,6 +699,7 @@ typedef struct acpi_walk_state
UINT32 ParseFlags;
UINT8 WalkType;
UINT8 ReturnUsed;
+ UINT16 Opcode; /* Current AML opcode */
UINT32 PrevArgTypes;
/* Debug support */
@@ -816,14 +823,16 @@ typedef struct acpi_get_devices_info
#define PM1_STS 0x0100
#define PM1_EN 0x0200
#define PM1_CONTROL 0x0300
-#define PM2_CONTROL 0x0400
-#define PM_TIMER 0x0500
-#define PROCESSOR_BLOCK 0x0600
-#define GPE0_STS_BLOCK 0x0700
-#define GPE0_EN_BLOCK 0x0800
-#define GPE1_STS_BLOCK 0x0900
-#define GPE1_EN_BLOCK 0x0A00
-#define SMI_CMD_BLOCK 0x0B00
+#define PM1A_CONTROL 0x0400
+#define PM1B_CONTROL 0x0500
+#define PM2_CONTROL 0x0600
+#define PM_TIMER 0x0700
+#define PROCESSOR_BLOCK 0x0800
+#define GPE0_STS_BLOCK 0x0900
+#define GPE0_EN_BLOCK 0x0A00
+#define GPE1_STS_BLOCK 0x0B00
+#define GPE1_EN_BLOCK 0x0C00
+#define SMI_CMD_BLOCK 0x0D00
/*
* Address space bitmasks for mmio or io spaces
@@ -839,66 +848,66 @@ typedef struct acpi_get_devices_info
/*
* Control bit definitions
*/
-#define TMR_STS (PM1_STS | 0x01)
-#define BM_STS (PM1_STS | 0x02)
-#define GBL_STS (PM1_STS | 0x03)
-#define PWRBTN_STS (PM1_STS | 0x04)
-#define SLPBTN_STS (PM1_STS | 0x05)
-#define RTC_STS (PM1_STS | 0x06)
-#define WAK_STS (PM1_STS | 0x07)
-
-#define TMR_EN (PM1_EN | 0x01)
- /* no BM_EN */
-#define GBL_EN (PM1_EN | 0x03)
-#define PWRBTN_EN (PM1_EN | 0x04)
-#define SLPBTN_EN (PM1_EN | 0x05)
-#define RTC_EN (PM1_EN | 0x06)
-#define WAK_EN (PM1_EN | 0x07)
-
-#define SCI_EN (PM1_CONTROL | 0x01)
-#define BM_RLD (PM1_CONTROL | 0x02)
-#define GBL_RLS (PM1_CONTROL | 0x03)
-#define SLP_TYPE_A (PM1_CONTROL | 0x04)
-#define SLP_TYPE_B (PM1_CONTROL | 0x05)
-#define SLP_EN (PM1_CONTROL | 0x06)
-
-#define ARB_DIS (PM2_CONTROL | 0x01)
-
-#define TMR_VAL (PM_TIMER | 0x01)
-
-#define GPE0_STS (GPE0_STS_BLOCK | 0x01)
-#define GPE0_EN (GPE0_EN_BLOCK | 0x01)
-
-#define GPE1_STS (GPE1_STS_BLOCK | 0x01)
-#define GPE1_EN (GPE1_EN_BLOCK | 0x01)
-
-
-#define TMR_STS_MASK 0x0001
-#define BM_STS_MASK 0x0010
-#define GBL_STS_MASK 0x0020
-#define PWRBTN_STS_MASK 0x0100
-#define SLPBTN_STS_MASK 0x0200
-#define RTC_STS_MASK 0x0400
-#define WAK_STS_MASK 0x8000
-
-#define ALL_FIXED_STS_BITS (TMR_STS_MASK | BM_STS_MASK | GBL_STS_MASK \
- | PWRBTN_STS_MASK | SLPBTN_STS_MASK \
- | RTC_STS_MASK | WAK_STS_MASK)
-
-#define TMR_EN_MASK 0x0001
-#define GBL_EN_MASK 0x0020
-#define PWRBTN_EN_MASK 0x0100
-#define SLPBTN_EN_MASK 0x0200
-#define RTC_EN_MASK 0x0400
-
-#define SCI_EN_MASK 0x0001
-#define BM_RLD_MASK 0x0002
-#define GBL_RLS_MASK 0x0004
-#define SLP_TYPE_X_MASK 0x1C00
-#define SLP_EN_MASK 0x2000
-
-#define ARB_DIS_MASK 0x0001
-#define TMR_VAL_MASK 0xFFFFFFFF
+#define TMR_STS (PM1_STS | 0x01)
+#define BM_STS (PM1_STS | 0x02)
+#define GBL_STS (PM1_STS | 0x03)
+#define PWRBTN_STS (PM1_STS | 0x04)
+#define SLPBTN_STS (PM1_STS | 0x05)
+#define RTC_STS (PM1_STS | 0x06)
+#define WAK_STS (PM1_STS | 0x07)
+
+#define TMR_EN (PM1_EN | 0x01)
+ /* no BM_EN */
+#define GBL_EN (PM1_EN | 0x03)
+#define PWRBTN_EN (PM1_EN | 0x04)
+#define SLPBTN_EN (PM1_EN | 0x05)
+#define RTC_EN (PM1_EN | 0x06)
+#define WAK_EN (PM1_EN | 0x07)
+
+#define SCI_EN (PM1_CONTROL | 0x01)
+#define BM_RLD (PM1_CONTROL | 0x02)
+#define GBL_RLS (PM1_CONTROL | 0x03)
+#define SLP_TYPE_A (PM1_CONTROL | 0x04)
+#define SLP_TYPE_B (PM1_CONTROL | 0x05)
+#define SLP_EN (PM1_CONTROL | 0x06)
+
+#define ARB_DIS (PM2_CONTROL | 0x01)
+
+#define TMR_VAL (PM_TIMER | 0x01)
+
+#define GPE0_STS (GPE0_STS_BLOCK | 0x01)
+#define GPE0_EN (GPE0_EN_BLOCK | 0x01)
+
+#define GPE1_STS (GPE1_STS_BLOCK | 0x01)
+#define GPE1_EN (GPE1_EN_BLOCK | 0x01)
+
+
+#define TMR_STS_MASK 0x0001
+#define BM_STS_MASK 0x0010
+#define GBL_STS_MASK 0x0020
+#define PWRBTN_STS_MASK 0x0100
+#define SLPBTN_STS_MASK 0x0200
+#define RTC_STS_MASK 0x0400
+#define WAK_STS_MASK 0x8000
+
+#define ALL_FIXED_STS_BITS (TMR_STS_MASK | BM_STS_MASK | GBL_STS_MASK \
+ | PWRBTN_STS_MASK | SLPBTN_STS_MASK \
+ | RTC_STS_MASK | WAK_STS_MASK)
+
+#define TMR_EN_MASK 0x0001
+#define GBL_EN_MASK 0x0020
+#define PWRBTN_EN_MASK 0x0100
+#define SLPBTN_EN_MASK 0x0200
+#define RTC_EN_MASK 0x0400
+
+#define SCI_EN_MASK 0x0001
+#define BM_RLD_MASK 0x0002
+#define GBL_RLS_MASK 0x0004
+#define SLP_TYPE_X_MASK 0x1C00
+#define SLP_EN_MASK 0x2000
+
+#define ARB_DIS_MASK 0x0001
+#define TMR_VAL_MASK 0xFFFFFFFF
#define GPE0_STS_MASK
#define GPE0_EN_MASK
@@ -907,8 +916,8 @@ typedef struct acpi_get_devices_info
#define GPE1_EN_MASK
-#define ACPI_READ 1
-#define ACPI_WRITE 2
+#define ACPI_READ 1
+#define ACPI_WRITE 2
/* Plug and play */
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acmacros.h b/sys/contrib/dev/acpica/Subsystem/Include/acmacros.h
index 5ecb027..f30933f 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acmacros.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acmacros.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acmacros.h - C macros for the entire subsystem.
- * $Revision: 59 $
+ * $Revision: 62 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -121,6 +121,14 @@
* Data manipulation macros
*/
+#ifndef LODWORD
+#define LODWORD(l) ((UINT32)(UINT64)(l))
+#endif
+
+#ifndef HIDWORD
+#define HIDWORD(l) ((UINT32)((((UINT64)(l)) >> 32) & 0xFFFFFFFF))
+#endif
+
#ifndef LOWORD
#define LOWORD(l) ((UINT16)(NATIVE_UINT)(l))
#endif
@@ -155,10 +163,18 @@
#ifdef _IA16
+/*
+ * For 16-bit addresses, we have to assume that the upper 32 bits
+ * are zero.
+ */
#define ACPI_GET_ADDRESS(a) ((a).Lo)
#define ACPI_STORE_ADDRESS(a,b) {(a).Hi=0;(a).Lo=(b);}
-#define ACPI_VALID_ADDRESS(a) ((a).Hi && (a).Lo)
+#define ACPI_VALID_ADDRESS(a) ((a).Hi | (a).Lo)
+
#else
+/*
+ * Full 64-bit address on 32-bit and 64-bit platforms
+ */
#define ACPI_GET_ADDRESS(a) (a)
#define ACPI_STORE_ADDRESS(a,b) ((a)=(b))
#define ACPI_VALID_ADDRESS(a) (a)
@@ -426,7 +442,7 @@
*/
#define return_VOID {FunctionExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName);return;}
#define return_ACPI_STATUS(s) {FunctionStatusExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName,s);return(s);}
-#define return_VALUE(s) {FunctionValueExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName,(NATIVE_UINT)s);return(s);}
+#define return_VALUE(s) {FunctionValueExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName,(ACPI_INTEGER)s);return(s);}
#define return_PTR(s) {FunctionPtrExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName,(UINT8 *)s);return(s);}
@@ -437,6 +453,8 @@
#define DEBUG_DEFINE(a) a;
#define DEBUG_ONLY_MEMBERS(a) a;
+#define _OPCODE_NAMES
+#define _VERBOSE_STRUCTURES
/* Stack and buffer dumping */
@@ -549,9 +567,8 @@
*/
#ifdef _IA16
#undef DEBUG_ONLY_MEMBERS
+#undef _VERBOSE_STRUCTURES
#define DEBUG_ONLY_MEMBERS(a)
-#undef OP_INFO_ENTRY
-#define OP_INFO_ENTRY(Flags,Name,PArgs,IArgs) {Flags,PArgs,IArgs}
#endif
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acmsvc.h b/sys/contrib/dev/acpica/Subsystem/Include/acmsvc.h
index 9164874..8727e4b 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acmsvc.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acmsvc.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acmsvc.h - VC specific defines, etc.
- * $Revision: 3 $
+ * $Revision: 4 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acnamesp.h b/sys/contrib/dev/acpica/Subsystem/Include/acnamesp.h
index 73d22a0..1f5695d 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acnamesp.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acnamesp.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acnamesp.h - Namespace subcomponent prototypes and defines
- * $Revision: 99 $
+ * $Revision: 101 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -147,6 +147,7 @@
#define NS_SEARCH_PARENT 0x01
#define NS_DONT_OPEN_SCOPE 0x02
#define NS_NO_PEER_SEARCH 0x04
+#define NS_ERROR_IF_FOUND 0x08
#define NS_WALK_UNLOCK TRUE
#define NS_WALK_NO_UNLOCK FALSE
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acobject.h b/sys/contrib/dev/acpica/Subsystem/Include/acobject.h
index 10d7b25..d873b11 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acobject.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acobject.h
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only)
- * $Revision: 76 $
+ * $Revision: 78 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -204,10 +204,10 @@ typedef struct /* NUMBER - has value */
ACPI_INTEGER Value;
-} ACPI_OBJECT_NUMBER;
+} ACPI_OBJECT_INTEGER;
-typedef struct /* STRING - has length and pointer */
+typedef struct /* STRING - has length and pointer - Null terminated, ASCII characters only */
{
ACPI_OBJECT_COMMON_HEADER
@@ -217,13 +217,11 @@ typedef struct /* STRING - has length and pointer */
} ACPI_OBJECT_STRING;
-typedef struct /* BUFFER - has length, sequence, and pointer */
+typedef struct /* BUFFER - has length and pointer - not null terminated */
{
ACPI_OBJECT_COMMON_HEADER
UINT32 Length;
- UINT32 Sequence; /* Sequential count of buffers created */
-
UINT8 *Pointer; /* points to the buffer in allocated space */
} ACPI_OBJECT_BUFFER;
@@ -489,7 +487,7 @@ typedef union acpi_operand_obj
{
ACPI_OBJECT_COMMON Common;
ACPI_OBJECT_CACHE_LIST Cache;
- ACPI_OBJECT_NUMBER Number;
+ ACPI_OBJECT_INTEGER Integer;
ACPI_OBJECT_STRING String;
ACPI_OBJECT_BUFFER Buffer;
ACPI_OBJECT_PACKAGE Package;
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acoutput.h b/sys/contrib/dev/acpica/Subsystem/Include/acoutput.h
index 704040a..c5b048c 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acoutput.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acoutput.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acoutput.h -- debug output
- * $Revision: 67 $
+ * $Revision: 69 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -149,6 +149,7 @@
#define BATTERY 0x00040000
#define DEBUGGER 0x00100000
+#define COMPILER 0x00200000
#define ALL_COMPONENTS 0x001FFFFF
#define COMPONENT_DEFAULT (ALL_COMPONENTS)
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acparser.h b/sys/contrib/dev/acpica/Subsystem/Include/acparser.h
index 8bb9c2a..3089054 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acparser.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acparser.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: acparser.h - AML Parser subcomponent prototypes and defines
- * $Revision: 48 $
+ * $Revision: 49 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acpi.h b/sys/contrib/dev/acpica/Subsystem/Include/acpi.h
index 54a10f8..4f32887 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acpi.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acpi.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acpi.h - Master include file, Publics and external data.
- * $Revision: 49 $
+ * $Revision: 50 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acpiosxf.h b/sys/contrib/dev/acpica/Subsystem/Include/acpiosxf.h
index abcdee5..8603fb9 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acpiosxf.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acpiosxf.h
@@ -12,7 +12,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -212,6 +212,10 @@ AcpiOsUnmapMemory (
void *LogicalAddress,
UINT32 Length);
+ACPI_STATUS
+AcpiOsGetPhysicalAddress (
+ void *LogicalAddress,
+ ACPI_PHYSICAL_ADDRESS *PhysicalAddress);
/*
* Interrupt handlers
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acpixf.h b/sys/contrib/dev/acpica/Subsystem/Include/acpixf.h
index c420640..c33ca3f 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acpixf.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acpixf.h
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -376,6 +376,10 @@ AcpiGetFirmwareWakingVector (
ACPI_PHYSICAL_ADDRESS *PhysicalAddress);
ACPI_STATUS
+AcpiEnterSleepState (
+ UINT8 SleepState);
+
+ACPI_STATUS
AcpiGetProcessorThrottlingInfo (
ACPI_HANDLE ProcessorHandle,
ACPI_BUFFER *UserBuffer);
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acresrc.h b/sys/contrib/dev/acpica/Subsystem/Include/acresrc.h
index 119abc1..dd942a9 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acresrc.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acresrc.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acresrc.h - Resource Manager function prototypes
- * $Revision: 21 $
+ * $Revision: 22 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/actables.h b/sys/contrib/dev/acpica/Subsystem/Include/actables.h
index 519ba30..a2d43da 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/actables.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/actables.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actables.h - ACPI table management
- * $Revision: 28 $
+ * $Revision: 29 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/actbl.h b/sys/contrib/dev/acpica/Subsystem/Include/actbl.h
index 6c874a5..bd1d718 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/actbl.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/actbl.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actbl.h - Table data structures defined in ACPI specification
- * $Revision: 44 $
+ * $Revision: 45 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/actbl1.h b/sys/contrib/dev/acpica/Subsystem/Include/actbl1.h
index c43f3f6..2468221 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/actbl1.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/actbl1.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actbl1.h - ACPI 1.0 tables
- * $Revision: 16 $
+ * $Revision: 17 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/actbl2.h b/sys/contrib/dev/acpica/Subsystem/Include/actbl2.h
index 9b71c5c..43d534c 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/actbl2.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/actbl2.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actbl2.h - ACPI Specification Revision 2.0 Tables
- * $Revision: 20 $
+ * $Revision: 21 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/actbl71.h b/sys/contrib/dev/acpica/Subsystem/Include/actbl71.h
index cf7b358..4f9767a 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/actbl71.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/actbl71.h
@@ -3,7 +3,7 @@
* Name: actbl71.h - IA-64 Extensions to the ACPI Spec Rev. 0.71
* This file includes tables specific to this
* specification revision.
- * $Revision: 8 $
+ * $Revision: 9 $
*
*****************************************************************************/
@@ -11,7 +11,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/actypes.h b/sys/contrib/dev/acpica/Subsystem/Include/actypes.h
index f52d9d8..d2ddb8b 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/actypes.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/actypes.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actypes.h - Common data types for the entire ACPI subsystem
- * $Revision: 159 $
+ * $Revision: 163 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -176,7 +176,7 @@ typedef long INT32;
typedef int INT16;
typedef unsigned long UINT32;
-typedef struct
+typedef struct
{
UINT32 Lo;
UINT32 Hi;
@@ -188,7 +188,7 @@ typedef INT16 NATIVE_INT;
typedef UINT32 ACPI_TBLPTR;
typedef UINT32 ACPI_IO_ADDRESS;
-typedef void *ACPI_PHYSICAL_ADDRESS;
+typedef char *ACPI_PHYSICAL_ADDRESS;
#define ALIGNED_ADDRESS_BOUNDARY 0x00000002
#define _HW_ALIGNMENT_SUPPORT
@@ -340,8 +340,9 @@ typedef UINT64 ACPI_INTEGER;
#define ACPI_STATE_S2 (UINT8) 2
#define ACPI_STATE_S3 (UINT8) 3
#define ACPI_STATE_S4 (UINT8) 4
-#define ACPI_STATE_S4BIOS (UINT8) 5
-#define ACPI_STATE_S5 (UINT8) 6
+#define ACPI_STATE_S5 (UINT8) 5
+/* let's pretend S4BIOS didn't exist for now. ASG */
+#define ACPI_STATE_S4BIOS (UINT8) 6
#define ACPI_S_STATES_MAX ACPI_STATE_S5
@@ -375,8 +376,37 @@ typedef UINT32 ACPI_TABLE_TYPE;
typedef UINT32 ACPI_OBJECT_TYPE;
typedef UINT8 OBJECT_TYPE_INTERNAL;
+#define ACPI_BTYPE_ANY 0x00000000
+#define ACPI_BTYPE_INTEGER 0x00000001
+#define ACPI_BTYPE_STRING 0x00000002
+#define ACPI_BTYPE_BUFFER 0x00000004
+#define ACPI_BTYPE_PACKAGE 0x00000008
+#define ACPI_BTYPE_FIELD_UNIT 0x00000010
+#define ACPI_BTYPE_DEVICE 0x00000020
+#define ACPI_BTYPE_EVENT 0x00000040
+#define ACPI_BTYPE_METHOD 0x00000080
+#define ACPI_BTYPE_MUTEX 0x00000100
+#define ACPI_BTYPE_REGION 0x00000200
+#define ACPI_BTYPE_POWER 0x00000400
+#define ACPI_BTYPE_PROCESSOR 0x00000800
+#define ACPI_BTYPE_THERMAL 0x00001000
+#define ACPI_BTYPE_BUFFER_FIELD 0x00002000
+#define ACPI_BTYPE_DDB_HANDLE 0x00004000
+#define ACPI_BTYPE_DEBUG_OBJECT 0x00008000
+#define ACPI_BTYPE_REFERENCE 0x00010000
+#define ACPI_BTYPE_RESOURCE 0x00020000
+
+#define ACPI_BTYPE_COMPUTE_DATA (ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER)
+
+#define ACPI_BTYPE_DATA (ACPI_BTYPE_COMPUTE_DATA | ACPI_BTYPE_PACKAGE)
+#define ACPI_BTYPE_DATA_REFERENCE (ACPI_BTYPE_DATA | ACPI_BTYPE_REFERENCE | ACPI_BTYPE_DDB_HANDLE)
+#define ACPI_BTYPE_DEVICE_OBJECTS (ACPI_BTYPE_DEVICE | ACPI_BTYPE_THERMAL | ACPI_BTYPE_PROCESSOR)
+#define ACPI_BTYPE_OBJECTS_AND_REFS 0x00017FFF /* ARG or LOCAL */
+#define ACPI_BTYPE_ALL_OBJECTS 0x00007FFF
+
+
#define ACPI_TYPE_ANY 0 /* 0x00 */
-#define ACPI_TYPE_NUMBER 1 /* 0x01 Byte/Word/Dword/Zero/One/Ones */
+#define ACPI_TYPE_INTEGER 1 /* 0x01 Byte/Word/Dword/Zero/One/Ones */
#define ACPI_TYPE_STRING 2 /* 0x02 */
#define ACPI_TYPE_BUFFER 3 /* 0x03 */
#define ACPI_TYPE_PACKAGE 4 /* 0x04 ByteConst, multiple DataTerm/Constant/SuperName */
@@ -523,7 +553,7 @@ typedef union AcpiObj
{
ACPI_OBJECT_TYPE Type;
ACPI_INTEGER Value; /* The actual number */
- } Number;
+ } Integer;
struct
{
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acwin.h b/sys/contrib/dev/acpica/Subsystem/Include/acwin.h
index f399a3b..9070d35 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/acwin.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/acwin.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acwin.h - OS specific defines, etc.
- * $Revision: 2 $
+ * $Revision: 3 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/amlcode.h b/sys/contrib/dev/acpica/Subsystem/Include/amlcode.h
index 8552385..afca031 100644
--- a/sys/contrib/dev/acpica/Subsystem/Include/amlcode.h
+++ b/sys/contrib/dev/acpica/Subsystem/Include/amlcode.h
@@ -3,7 +3,7 @@
* Name: amlcode.h - Definitions for AML, as included in "definition blocks"
* Declarations and definitions contained herein are derived
* directly from the ACPI specification.
- * $Revision: 43 $
+ * $Revision: 46 $
*
*****************************************************************************/
@@ -11,7 +11,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -302,27 +302,42 @@
#define ARGP_TERMARG 0x0E
#define ARGP_TERMLIST 0x0F
#define ARGP_WORDDATA 0x10
+#define ARGP_QWORDDATA 0x11
+#define ARGP_SIMPLENAME 0x12
/*
* Resolved argument types for the AML Interpreter
* Each field in the ArgTypes UINT32 is 5 bits, allowing for a maximum of 6 arguments.
- * There can be up to 31 unique argument types
+ * There can be up to 31 unique argument types (0 is end-of-arg-list indicator)
*/
-#define ARGI_ANYTYPE 0x01
-#define ARGI_TARGETREF 0x02
-#define ARGI_REFERENCE 0x03
-#define ARGI_IF 0x04
-#define ARGI_NUMBER 0x05
-#define ARGI_STRING 0x06
-#define ARGI_BUFFER 0x07
-#define ARGI_PACKAGE 0x08
-#define ARGI_DATAOBJECT 0x09 /* Buffer, string, package or reference to a Node - Used only by SizeOf operator*/
-#define ARGI_COMPLEXOBJ 0x0A /* Buffer or package */
-#define ARGI_MUTEX 0x0B
-#define ARGI_EVENT 0x0C
-#define ARGI_REGION 0x0D
-#define ARGI_DDBHANDLE 0x0E
+/* "Standard" ACPI types are 1-15 (0x0F) */
+
+#define ARGI_INTEGER ACPI_TYPE_INTEGER /* 1 */
+#define ARGI_STRING ACPI_TYPE_STRING /* 2 */
+#define ARGI_BUFFER ACPI_TYPE_BUFFER /* 3 */
+#define ARGI_PACKAGE ACPI_TYPE_PACKAGE /* 4 */
+#define ARGI_EVENT ACPI_TYPE_EVENT
+#define ARGI_MUTEX ACPI_TYPE_MUTEX
+#define ARGI_REGION ACPI_TYPE_REGION
+#define ARGI_DDBHANDLE ACPI_TYPE_DDB_HANDLE
+
+/* Custom types are 0x10 through 0x1F */
+
+#define ARGI_IF 0x10
+#define ARGI_ANYOBJECT 0x11
+#define ARGI_ANYTYPE 0x12
+#define ARGI_COMPUTEDATA 0x13 /* Buffer, String, or Integer */
+#define ARGI_DATAOBJECT 0x14 /* Buffer, string, package or reference to a Node - Used only by SizeOf operator*/
+#define ARGI_COMPLEXOBJ 0x15 /* Buffer or package */
+#define ARGI_INTEGER_REF 0x16
+#define ARGI_OBJECT_REF 0x17
+#define ARGI_DEVICE_REF 0x18
+#define ARGI_REFERENCE 0x19
+#define ARGI_TARGETREF 0x1A /* Target, subject to implicit conversion */
+#define ARGI_FIXED_TARGET 0x1B /* Target, no implicit conversion */
+#define ARGI_SIMPLE_TARGET 0x1C /* Name, Local, Arg -- no implicit conversion */
+#define ARGI_BUFFERSTRING 0x1D
#define ARGI_INVALID_OPCODE 0xFFFFFFFF
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amconfig.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amconfig.c
index 765cb62..b69170e 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amconfig.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amconfig.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amconfig - Namespace reconfiguration (Load/Unload opcodes)
- * $Revision: 27 $
+ * $Revision: 29 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -169,7 +169,8 @@ AcpiAmlExecLoadTable (
for (i = 0; i < sizeof (ACPI_TABLE_HEADER); i++)
{
Status = AcpiEvAddressSpaceDispatch (RgnDesc, ADDRESS_SPACE_READ,
- i, 8, (UINT32 *) ((UINT8 *) &TableHeader + i));
+ (ACPI_PHYSICAL_ADDRESS) i, 8,
+ (UINT32 *) ((UINT8 *) &TableHeader + i));
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -195,7 +196,8 @@ AcpiAmlExecLoadTable (
for (i = 0; i < TableHeader.Length; i++)
{
Status = AcpiEvAddressSpaceDispatch (RgnDesc, ADDRESS_SPACE_READ,
- i, 8, (UINT32 *) (TableDataPtr + i));
+ (ACPI_PHYSICAL_ADDRESS)i, 8,
+ (UINT32 *) (TableDataPtr + i));
if (ACPI_FAILURE (Status))
{
goto Cleanup;
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amconvrt.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amconvrt.c
new file mode 100644
index 0000000..9aa444e
--- /dev/null
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amconvrt.c
@@ -0,0 +1,653 @@
+/******************************************************************************
+ *
+ * Module Name: amconvrt - Object conversion routines
+ * $Revision: 3 $
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
+ * All rights reserved.
+ *
+ * 2. License
+ *
+ * 2.1. This is your license from Intel Corp. under its intellectual property
+ * rights. You may have additional license terms from the party that provided
+ * you this software, covering your right to use that party's intellectual
+ * property rights.
+ *
+ * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
+ * copy of the source code appearing in this file ("Covered Code") an
+ * irrevocable, perpetual, worldwide license under Intel's copyrights in the
+ * base code distributed originally by Intel ("Original Intel Code") to copy,
+ * make derivatives, distribute, use and display any portion of the Covered
+ * Code in any form, with the right to sublicense such rights; and
+ *
+ * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
+ * license (with the right to sublicense), under only those claims of Intel
+ * patents that are infringed by the Original Intel Code, to make, use, sell,
+ * offer to sell, and import the Covered Code and derivative works thereof
+ * solely to the minimum extent necessary to exercise the above copyright
+ * license, and in no event shall the patent license extend to any additions
+ * to or modifications of the Original Intel Code. No other license or right
+ * is granted directly or by implication, estoppel or otherwise;
+ *
+ * The above copyright and patent license is granted only if the following
+ * conditions are met:
+ *
+ * 3. Conditions
+ *
+ * 3.1. Redistribution of Source with Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification with rights to further distribute source must include
+ * the above Copyright Notice, the above License, this list of Conditions,
+ * and the following Disclaimer and Export Compliance provision. In addition,
+ * Licensee must cause all Covered Code to which Licensee contributes to
+ * contain a file documenting the changes Licensee made to create that Covered
+ * Code and the date of any change. Licensee must include in that file the
+ * documentation of any changes made by any predecessor Licensee. Licensee
+ * must include a prominent statement that the modification is derived,
+ * directly or indirectly, from Original Intel Code.
+ *
+ * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification without rights to further distribute source must
+ * include the following Disclaimer and Export Compliance provision in the
+ * documentation and/or other materials provided with distribution. In
+ * addition, Licensee may not authorize further sublicense of source of any
+ * portion of the Covered Code, and must include terms to the effect that the
+ * license from Licensee to its licensee is limited to the intellectual
+ * property embodied in the software Licensee provides to its licensee, and
+ * not to intellectual property embodied in modifications its licensee may
+ * make.
+ *
+ * 3.3. Redistribution of Executable. Redistribution in executable form of any
+ * substantial portion of the Covered Code or modification must reproduce the
+ * above Copyright Notice, and the following Disclaimer and Export Compliance
+ * provision in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3.4. Intel retains all right, title, and interest in and to the Original
+ * Intel Code.
+ *
+ * 3.5. Neither the name Intel nor any other trademark owned or controlled by
+ * Intel shall be used in advertising or otherwise to promote the sale, use or
+ * other dealings in products derived from or relating to the Covered Code
+ * without prior written authorization from Intel.
+ *
+ * 4. Disclaimer and Export Compliance
+ *
+ * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
+ * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
+ * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
+ * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
+ * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
+ * PARTICULAR PURPOSE.
+ *
+ * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
+ * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
+ * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
+ * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
+ * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
+ * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
+ * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
+ * LIMITED REMEDY.
+ *
+ * 4.3. Licensee shall not export, either directly or indirectly, any of this
+ * software or system incorporating such software without first obtaining any
+ * required license or other approval from the U. S. Department of Commerce or
+ * any other agency or department of the United States Government. In the
+ * event Licensee exports any such software from the United States or
+ * re-exports any such software from a foreign destination, Licensee shall
+ * ensure that the distribution and export/re-export of the software is in
+ * compliance with all laws, regulations, orders, or other restrictions of the
+ * U.S. Export Administration Regulations. Licensee agrees that neither it nor
+ * any of its subsidiaries will export/re-export any technical data, process,
+ * software, or service, directly or indirectly, to any country for which the
+ * United States government or any agency thereof requires an export license,
+ * other governmental approval, or letter of assurance, without first obtaining
+ * such license, approval or letter.
+ *
+ *****************************************************************************/
+
+
+#define __AMCONVRT_C__
+
+#include "acpi.h"
+#include "acparser.h"
+#include "acnamesp.h"
+#include "acinterp.h"
+#include "acevents.h"
+#include "amlcode.h"
+#include "acdispat.h"
+
+
+#define _COMPONENT INTERPRETER
+ MODULE_NAME ("amconvrt")
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlConvertToTargetType
+ *
+ * PARAMETERS: *ObjDesc - Object to be converted.
+ * WalkState - Current method state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION:
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlConvertToTargetType (
+ OBJECT_TYPE_INTERNAL DestinationType,
+ ACPI_OPERAND_OBJECT **ObjDesc,
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_STATUS Status = AE_OK;
+
+
+ FUNCTION_TRACE ("AmlConvertToTargetType");
+
+
+ /*
+ * If required by the target,
+ * perform implicit conversion on the source before we store it.
+ */
+
+ switch (GET_CURRENT_ARG_TYPE (WalkState->OpInfo->RuntimeArgs))
+ {
+ case ARGI_SIMPLE_TARGET:
+ case ARGI_FIXED_TARGET:
+ case ARGI_INTEGER_REF: /* Handles Increment, Decrement cases */
+
+ switch (DestinationType)
+ {
+ case INTERNAL_TYPE_DEF_FIELD:
+ /*
+ * Named field can always handle conversions
+ */
+ break;
+
+ default:
+ /* No conversion allowed for these types */
+
+ if (DestinationType != (*ObjDesc)->Common.Type)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("AmlConvertToTargetType: Target does not allow conversion of type %s to %s\n",
+ AcpiCmGetTypeName ((*ObjDesc)->Common.Type),
+ AcpiCmGetTypeName (DestinationType)));
+ Status = AE_TYPE;
+ }
+ }
+ break;
+
+
+ case ARGI_TARGETREF:
+
+ switch (DestinationType)
+ {
+ case ACPI_TYPE_INTEGER:
+ case ACPI_TYPE_FIELD_UNIT:
+ case INTERNAL_TYPE_BANK_FIELD:
+ case INTERNAL_TYPE_INDEX_FIELD:
+ /*
+ * These types require an Integer operand. We can convert
+ * a Buffer or a String to an Integer if necessary.
+ */
+ Status = AcpiAmlConvertToInteger (ObjDesc, WalkState);
+ break;
+
+
+ case ACPI_TYPE_STRING:
+
+ /*
+ * The operand must be a String. We can convert an
+ * Integer or Buffer if necessary
+ */
+ Status = AcpiAmlConvertToString (ObjDesc, WalkState);
+ break;
+
+
+ case ACPI_TYPE_BUFFER:
+
+ /*
+ * The operand must be a String. We can convert an
+ * Integer or Buffer if necessary
+ */
+ Status = AcpiAmlConvertToBuffer (ObjDesc, WalkState);
+ break;
+ }
+ break;
+
+
+ case ARGI_REFERENCE:
+ /*
+ * CreateXxxxField cases - we are storing the field object into the name
+ */
+ break;
+
+
+ default:
+ DEBUG_PRINT (ACPI_ERROR,
+ ("AmlConvertToTargetType: Unknown Target type ID 0x%X Op %s DestType %s\n",
+ GET_CURRENT_ARG_TYPE (WalkState->OpInfo->RuntimeArgs),
+ WalkState->OpInfo->Name,
+ AcpiCmGetTypeName (DestinationType)));
+
+ Status = AE_AML_INTERNAL;
+ }
+
+
+ /*
+ * Source-to-Target conversion semantics:
+ *
+ * If conversion to the target type cannot be performed, then simply
+ * overwrite the target with the new object and type.
+ */
+ if (Status == AE_TYPE)
+ {
+ Status = AE_OK;
+ }
+
+ return_ACPI_STATUS (Status);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlConvertToInteger
+ *
+ * PARAMETERS: *ObjDesc - Object to be converted. Must be an
+ * Integer, Buffer, or String
+ * WalkState - Current method state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Convert an ACPI Object to an integer.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlConvertToInteger (
+ ACPI_OPERAND_OBJECT **ObjDesc,
+ ACPI_WALK_STATE *WalkState)
+{
+ UINT32 i;
+ ACPI_OPERAND_OBJECT *RetDesc;
+ UINT32 Count;
+ char *Pointer;
+ ACPI_INTEGER Result;
+ UINT32 IntegerSize = sizeof (ACPI_INTEGER);
+
+
+ switch ((*ObjDesc)->Common.Type)
+ {
+ case ACPI_TYPE_INTEGER:
+ return (AE_OK);
+
+ case ACPI_TYPE_STRING:
+ Pointer = (*ObjDesc)->String.Pointer;
+ Count = (*ObjDesc)->String.Length;
+ break;
+
+ case ACPI_TYPE_BUFFER:
+ Pointer = (char *) (*ObjDesc)->Buffer.Pointer;
+ Count = (*ObjDesc)->Buffer.Length;
+ break;
+
+ default:
+ return (AE_TYPE);
+ }
+
+ /*
+ * Create a new integer
+ */
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
+ if (!RetDesc)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+
+ /* Handle both ACPI 1.0 and ACPI 2.0 Integer widths */
+
+ if (WalkState->MethodNode->Flags & ANOBJ_DATA_WIDTH_32)
+ {
+ /*
+ * We are running a method that exists in a 32-bit ACPI table.
+ * Truncate the value to 32 bits by zeroing out the upper 32-bit field
+ */
+ IntegerSize = sizeof (UINT32);
+ }
+
+
+ /*
+ * Convert the buffer/string to an integer. Note that both buffers and
+ * strings are treated as raw data - we don't convert ascii to hex for
+ * strings.
+ *
+ * There are two terminating conditions for the loop:
+ * 1) The size of an integer has been reached, or
+ * 2) The end of the buffer or string has been reached
+ */
+ Result = 0;
+
+ /* Transfer no more than an integer's worth of data */
+
+ if (Count > IntegerSize)
+ {
+ Count = IntegerSize;
+ }
+
+ /*
+ * String conversion is different than Buffer conversion
+ */
+ switch ((*ObjDesc)->Common.Type)
+ {
+ case ACPI_TYPE_STRING:
+
+ /* TBD: Need to use 64-bit STRTOUL */
+
+ /*
+ * Convert string to an integer
+ * String must be hexadecimal as per the ACPI specification
+ */
+
+ Result = STRTOUL (Pointer, NULL, 16);
+ break;
+
+
+ case ACPI_TYPE_BUFFER:
+
+ /*
+ * Buffer conversion - we simply grab enough raw data from the
+ * buffer to fill an integer
+ */
+ for (i = 0; i < Count; i++)
+ {
+ /*
+ * Get next byte and shift it into the Result.
+ * Little endian is used, meaning that the first byte of the buffer
+ * is the LSB of the integer
+ */
+ Result |= (((ACPI_INTEGER) Pointer[i]) << (i * 8));
+ }
+
+ break;
+ }
+
+ /* Save the Result, delete original descriptor, store new descriptor */
+
+ RetDesc->Integer.Value = Result;
+
+ if (WalkState->Opcode != AML_STORE_OP)
+ {
+ AcpiCmRemoveReference (*ObjDesc);
+ }
+
+ *ObjDesc = RetDesc;
+
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlConvertToBuffer
+ *
+ * PARAMETERS: *ObjDesc - Object to be converted. Must be an
+ * Integer, Buffer, or String
+ * WalkState - Current method state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Convert an ACPI Object to an Buffer
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlConvertToBuffer (
+ ACPI_OPERAND_OBJECT **ObjDesc,
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_OPERAND_OBJECT *RetDesc;
+ UINT32 i;
+ UINT32 IntegerSize = sizeof (ACPI_INTEGER);
+ UINT8 *NewBuf;
+
+
+ switch ((*ObjDesc)->Common.Type)
+ {
+ case ACPI_TYPE_INTEGER:
+
+ /*
+ * Create a new Buffer
+ */
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_BUFFER);
+ if (!RetDesc)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ /* Handle both ACPI 1.0 and ACPI 2.0 Integer widths */
+
+ if (WalkState->MethodNode->Flags & ANOBJ_DATA_WIDTH_32)
+ {
+ /*
+ * We are running a method that exists in a 32-bit ACPI table.
+ * Truncate the value to 32 bits by zeroing out the upper
+ * 32-bit field
+ */
+ IntegerSize = sizeof (UINT32);
+ }
+
+ /* Need enough space for one integers */
+
+ RetDesc->Buffer.Length = IntegerSize;
+ NewBuf = AcpiCmCallocate (IntegerSize);
+ if (!NewBuf)
+ {
+ REPORT_ERROR
+ (("AmlExecDyadic2R/ConcatOp: Buffer allocation failure\n"));
+ AcpiCmRemoveReference (RetDesc);
+ return (AE_NO_MEMORY);
+ }
+
+ /* Copy the integer to the buffer */
+
+ for (i = 0; i < IntegerSize; i++)
+ {
+ NewBuf[i] = (UINT8) ((*ObjDesc)->Integer.Value >> (i * 8));
+ }
+ RetDesc->Buffer.Pointer = NewBuf;
+
+ /* Return the new buffer descriptor */
+
+ if (WalkState->Opcode != AML_STORE_OP)
+ {
+ AcpiCmRemoveReference (*ObjDesc);
+ }
+ *ObjDesc = RetDesc;
+ break;
+
+
+ case ACPI_TYPE_STRING:
+ break;
+
+
+ case ACPI_TYPE_BUFFER:
+ break;
+
+
+ default:
+ return (AE_TYPE);
+ break;
+ }
+
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlConvertToString
+ *
+ * PARAMETERS: *ObjDesc - Object to be converted. Must be an
+ * Integer, Buffer, or String
+ * WalkState - Current method state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Convert an ACPI Object to a string
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlConvertToString (
+ ACPI_OPERAND_OBJECT **ObjDesc,
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_OPERAND_OBJECT *RetDesc;
+ UINT32 i;
+ UINT32 Index;
+ UINT32 IntegerSize = sizeof (ACPI_INTEGER);
+ UINT8 *NewBuf;
+ UINT8 *Pointer;
+
+
+ switch ((*ObjDesc)->Common.Type)
+ {
+ case ACPI_TYPE_INTEGER:
+
+ /*
+ * Create a new String
+ */
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_STRING);
+ if (!RetDesc)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ /* Handle both ACPI 1.0 and ACPI 2.0 Integer widths */
+
+ if (WalkState->MethodNode->Flags & ANOBJ_DATA_WIDTH_32)
+ {
+ /*
+ * We are running a method that exists in a 32-bit ACPI table.
+ * Truncate the value to 32 bits by zeroing out the upper
+ * 32-bit field
+ */
+ IntegerSize = sizeof (UINT32);
+ }
+
+ /* Need enough space for one ASCII integer plus null terminator */
+
+ RetDesc->String.Length = (IntegerSize * 2) + 1;
+ NewBuf = AcpiCmCallocate (RetDesc->String.Length);
+ if (!NewBuf)
+ {
+ REPORT_ERROR
+ (("AmlExecDyadic2R/ConcatOp: Buffer allocation failure\n"));
+ AcpiCmRemoveReference (RetDesc);
+ return (AE_NO_MEMORY);
+ }
+
+ /* Copy the integer to the buffer */
+
+ for (i = 0; i < (IntegerSize * 2); i++)
+ {
+ NewBuf[i] = AcpiGbl_HexToAscii [((*ObjDesc)->Integer.Value >> (i * 4)) & 0xF];
+ }
+
+ /* Null terminate */
+
+ NewBuf [i] = 0;
+ RetDesc->Buffer.Pointer = NewBuf;
+
+ /* Return the new buffer descriptor */
+
+ if (WalkState->Opcode != AML_STORE_OP)
+ {
+ AcpiCmRemoveReference (*ObjDesc);
+ }
+ *ObjDesc = RetDesc;
+
+ return (AE_OK);
+
+
+ case ACPI_TYPE_BUFFER:
+
+ if (((*ObjDesc)->Buffer.Length * 3) > ACPI_MAX_STRING_CONVERSION)
+ {
+ return (AE_AML_STRING_LIMIT);
+ }
+
+ /*
+ * Create a new String
+ */
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_STRING);
+ if (!RetDesc)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ /* Need enough space for one ASCII integer plus null terminator */
+
+ RetDesc->String.Length = (*ObjDesc)->Buffer.Length * 3;
+ NewBuf = AcpiCmCallocate (RetDesc->String.Length + 1);
+ if (!NewBuf)
+ {
+ REPORT_ERROR
+ (("AmlExecDyadic2R/ConcatOp: Buffer allocation failure\n"));
+ AcpiCmRemoveReference (RetDesc);
+ return (AE_NO_MEMORY);
+ }
+
+ /*
+ * Convert each byte of the buffer to two ASCII characters plus a space.
+ */
+ Pointer = (*ObjDesc)->Buffer.Pointer;
+ Index = 0;
+ for (i = 0; i < (*ObjDesc)->Buffer.Length; i++)
+ {
+ NewBuf[Index + 0] = AcpiGbl_HexToAscii [Pointer[i] & 0x0F];
+ NewBuf[Index + 1] = AcpiGbl_HexToAscii [(Pointer[i] >> 4) & 0x0F];
+ NewBuf[Index + 2] = ' ';
+ Index += 3;
+ }
+
+ /* Null terminate */
+
+ NewBuf [Index] = 0;
+ RetDesc->Buffer.Pointer = NewBuf;
+
+ /* Return the new buffer descriptor */
+
+ if (WalkState->Opcode != AML_STORE_OP)
+ {
+ AcpiCmRemoveReference (*ObjDesc);
+ }
+ *ObjDesc = RetDesc;
+ break;
+
+
+ case ACPI_TYPE_STRING:
+ break;
+
+
+ default:
+ return (AE_TYPE);
+ break;
+ }
+
+ return (AE_OK);
+}
+
+
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amcreate.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amcreate.c
index 4dbf3d8..e02df3c 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amcreate.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amcreate.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amcreate - Named object creation
- * $Revision: 52 $
+ * $Revision: 53 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -477,7 +477,7 @@ AcpiAmlExecCreateMutex (
goto Cleanup;
}
- ObjDesc->Mutex.SyncLevel = (UINT8) SyncDesc->Number.Value;
+ ObjDesc->Mutex.SyncLevel = (UINT8) SyncDesc->Integer.Value;
/* ObjDesc was on the stack top, and the name is below it */
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amdump.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amdump.c
index c766a06..37f67f8 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amdump.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amdump.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amdump - Interpreter debug output routines
- * $Revision: 97 $
+ * $Revision: 100 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -130,7 +130,7 @@
* The following routines are used for debug output only
*/
-#ifdef ACPI_DEBUG
+#if defined(ACPI_DEBUG) || defined(ENABLE_DEBUGGER)
/*****************************************************************************
*
@@ -334,12 +334,12 @@ AcpiAmlDumpOperand (
DEBUG_PRINT_RAW (ACPI_INFO, ("Reference: Arg%d",
EntryDesc->Reference.Offset));
- if (ACPI_TYPE_NUMBER == EntryDesc->Common.Type)
+ if (ACPI_TYPE_INTEGER == EntryDesc->Common.Type)
{
/* Value is a Number */
DEBUG_PRINT_RAW (ACPI_INFO, (" value is [%ld]",
- EntryDesc->Number.Value));
+ EntryDesc->Integer.Value));
}
DEBUG_PRINT_RAW (ACPI_INFO, ("\n"));
@@ -351,13 +351,13 @@ AcpiAmlDumpOperand (
DEBUG_PRINT_RAW (ACPI_INFO, ("Reference: Local%d",
EntryDesc->Reference.Offset));
- if (ACPI_TYPE_NUMBER == EntryDesc->Common.Type)
+ if (ACPI_TYPE_INTEGER == EntryDesc->Common.Type)
{
/* Value is a Number */
DEBUG_PRINT_RAW (ACPI_INFO, (" value is [%ld]",
- EntryDesc->Number.Value));
+ EntryDesc->Integer.Value));
}
DEBUG_PRINT_RAW (ACPI_INFO, ("\n"));
@@ -412,24 +412,24 @@ AcpiAmlDumpOperand (
break;
- case ACPI_TYPE_NUMBER:
+ case ACPI_TYPE_INTEGER:
DEBUG_PRINT_RAW (ACPI_INFO, ("Number %lX\n",
- EntryDesc->Number.Value));
+ EntryDesc->Integer.Value));
break;
case INTERNAL_TYPE_IF:
DEBUG_PRINT_RAW (ACPI_INFO, ("If [Number] %lX\n",
- EntryDesc->Number.Value));
+ EntryDesc->Integer.Value));
break;
case INTERNAL_TYPE_WHILE:
DEBUG_PRINT_RAW (ACPI_INFO, ("While [Number] %lX\n",
- EntryDesc->Number.Value));
+ EntryDesc->Integer.Value));
break;
@@ -763,10 +763,10 @@ AcpiAmlDumpObjectDescriptor (
switch (ObjDesc->Common.Type)
{
- case ACPI_TYPE_NUMBER:
+ case ACPI_TYPE_INTEGER:
AcpiOsPrintf ("%20s : %s\n", "Type", "Number");
- AcpiOsPrintf ("%20s : %X\n", "Value", ObjDesc->Number.Value);
+ AcpiOsPrintf ("%20s : %X\n", "Value", ObjDesc->Integer.Value);
break;
@@ -782,7 +782,6 @@ AcpiAmlDumpObjectDescriptor (
AcpiOsPrintf ("%20s : %s\n", "Type", "Buffer");
AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->Buffer.Length);
- AcpiOsPrintf ("%20s : %X\n", "Sequence", ObjDesc->Buffer.Sequence);
AcpiOsPrintf ("%20s : %p\n", "Pointer", ObjDesc->Buffer.Pointer);
break;
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amdyadic.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amdyadic.c
index f0b87ec..c80d929 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amdyadic.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amdyadic.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amdyadic - ACPI AML (p-code) execution for dyadic operators
- * $Revision: 69 $
+ * $Revision: 71 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -130,7 +130,183 @@
MODULE_NAME ("amdyadic")
-/*****************************************************************************
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlDoConcatenate
+ *
+ * PARAMETERS: *ObjDesc - Object to be converted. Must be an
+ * Integer, Buffer, or String
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Concatenate two objects OF THE SAME TYPE.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlDoConcatenate (
+ ACPI_OPERAND_OBJECT *ObjDesc,
+ ACPI_OPERAND_OBJECT *ObjDesc2,
+ ACPI_OPERAND_OBJECT **ActualRetDesc,
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_STATUS Status;
+ UINT32 i;
+ ACPI_INTEGER ThisInteger;
+ ACPI_OPERAND_OBJECT *RetDesc;
+ NATIVE_CHAR *NewBuf;
+ UINT32 IntegerSize = sizeof (ACPI_INTEGER);
+
+
+ /*
+ * There are three cases to handle:
+ * 1) Two Integers concatenated to produce a buffer
+ * 2) Two Strings concatenated to produce a string
+ * 3) Two Buffers concatenated to produce a buffer
+ */
+ switch (ObjDesc->Common.Type)
+ {
+ case ACPI_TYPE_INTEGER:
+
+ /* Handle both ACPI 1.0 and ACPI 2.0 Integer widths */
+
+ if (WalkState->MethodNode->Flags & ANOBJ_DATA_WIDTH_32)
+ {
+ /*
+ * We are running a method that exists in a 32-bit ACPI table.
+ * Truncate the value to 32 bits by zeroing out the upper
+ * 32-bit field
+ */
+ IntegerSize = sizeof (UINT32);
+ }
+
+ /* Result of two integers is a buffer */
+
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_BUFFER);
+ if (!RetDesc)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ /* Need enough space for two integers */
+
+ RetDesc->Buffer.Length = IntegerSize * 2;
+ NewBuf = AcpiCmCallocate (RetDesc->Buffer.Length);
+ if (!NewBuf)
+ {
+ REPORT_ERROR
+ (("AmlExecDyadic2R/ConcatOp: Buffer allocation failure\n"));
+ Status = AE_NO_MEMORY;
+ goto Cleanup;
+ }
+
+ RetDesc->Buffer.Pointer = (UINT8 *) NewBuf;
+
+ /* Convert the first integer */
+
+ ThisInteger = ObjDesc->Integer.Value;
+ for (i = 0; i < IntegerSize; i++)
+ {
+ NewBuf[i] = (UINT8) ThisInteger;
+ ThisInteger >>= 8;
+ }
+
+ /* Convert the second integer */
+
+ ThisInteger = ObjDesc2->Integer.Value;
+ for (; i < (IntegerSize * 2); i++)
+ {
+ NewBuf[i] = (UINT8) ThisInteger;
+ ThisInteger >>= 8;
+ }
+
+ break;
+
+
+ case ACPI_TYPE_STRING:
+
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_STRING);
+ if (!RetDesc)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ /* Operand1 is string */
+
+ NewBuf = AcpiCmAllocate (ObjDesc->String.Length +
+ ObjDesc2->String.Length + 1);
+ if (!NewBuf)
+ {
+ REPORT_ERROR
+ (("AmlExecDyadic2R/ConcatOp: String allocation failure\n"));
+ Status = AE_NO_MEMORY;
+ goto Cleanup;
+ }
+
+ STRCPY (NewBuf, ObjDesc->String.Pointer);
+ STRCPY (NewBuf + ObjDesc->String.Length,
+ ObjDesc2->String.Pointer);
+
+ /* Point the return object to the new string */
+
+ RetDesc->String.Pointer = NewBuf;
+ RetDesc->String.Length = ObjDesc->String.Length +=
+ ObjDesc2->String.Length;
+ break;
+
+
+ case ACPI_TYPE_BUFFER:
+
+ /* Operand1 is a buffer */
+
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_BUFFER);
+ if (!RetDesc)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ NewBuf = AcpiCmAllocate (ObjDesc->Buffer.Length +
+ ObjDesc2->Buffer.Length);
+ if (!NewBuf)
+ {
+ REPORT_ERROR
+ (("AmlExecDyadic2R/ConcatOp: Buffer allocation failure\n"));
+ Status = AE_NO_MEMORY;
+ goto Cleanup;
+ }
+
+ MEMCPY (NewBuf, ObjDesc->Buffer.Pointer,
+ ObjDesc->Buffer.Length);
+ MEMCPY (NewBuf + ObjDesc->Buffer.Length, ObjDesc2->Buffer.Pointer,
+ ObjDesc2->Buffer.Length);
+
+ /*
+ * Point the return object to the new buffer
+ */
+
+ RetDesc->Buffer.Pointer = (UINT8 *) NewBuf;
+ RetDesc->Buffer.Length = ObjDesc->Buffer.Length +
+ ObjDesc2->Buffer.Length;
+ break;
+
+ default:
+ Status = AE_AML_INTERNAL;
+ RetDesc = NULL;
+ }
+
+
+ *ActualRetDesc = RetDesc;
+ return (AE_OK);
+
+
+Cleanup:
+
+ AcpiCmRemoveReference (RetDesc);
+ return (Status);
+}
+
+
+/*******************************************************************************
*
* FUNCTION: AcpiAmlExecDyadic1
*
@@ -143,7 +319,7 @@
*
* ALLOCATION: Deletes both operands
*
- ****************************************************************************/
+ ******************************************************************************/
ACPI_STATUS
AcpiAmlExecDyadic1 (
@@ -211,7 +387,7 @@ AcpiAmlExecDyadic1 (
/* Dispatch the notify to the appropriate handler */
- AcpiEvNotifyDispatch (Node, (UINT32) ValDesc->Number.Value);
+ AcpiEvNotifyDispatch (Node, (UINT32) ValDesc->Integer.Value);
break;
default:
@@ -244,7 +420,7 @@ Cleanup:
}
-/*****************************************************************************
+/*******************************************************************************
*
* FUNCTION: AcpiAmlExecDyadic2R
*
@@ -257,7 +433,7 @@ Cleanup:
*
* ALLOCATION: Deletes one operand descriptor -- other remains on stack
*
- ****************************************************************************/
+ ******************************************************************************/
ACPI_STATUS
AcpiAmlExecDyadic2R (
@@ -273,7 +449,6 @@ AcpiAmlExecDyadic2R (
ACPI_OPERAND_OBJECT *RetDesc2 = NULL;
ACPI_STATUS Status = AE_OK;
UINT32 NumOperands = 3;
- NATIVE_CHAR *NewBuf;
FUNCTION_TRACE_U32 ("AmlExecDyadic2R", Opcode);
@@ -322,7 +497,7 @@ AcpiAmlExecDyadic2R (
case AML_SHIFT_RIGHT_OP:
case AML_SUBTRACT_OP:
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!RetDesc)
{
Status = AE_NO_MEMORY;
@@ -344,8 +519,8 @@ AcpiAmlExecDyadic2R (
case AML_ADD_OP:
- RetDesc->Number.Value = ObjDesc->Number.Value +
- ObjDesc2->Number.Value;
+ RetDesc->Integer.Value = ObjDesc->Integer.Value +
+ ObjDesc2->Integer.Value;
break;
@@ -353,8 +528,8 @@ AcpiAmlExecDyadic2R (
case AML_BIT_AND_OP:
- RetDesc->Number.Value = ObjDesc->Number.Value &
- ObjDesc2->Number.Value;
+ RetDesc->Integer.Value = ObjDesc->Integer.Value &
+ ObjDesc2->Integer.Value;
break;
@@ -362,8 +537,8 @@ AcpiAmlExecDyadic2R (
case AML_BIT_NAND_OP:
- RetDesc->Number.Value = ~(ObjDesc->Number.Value &
- ObjDesc2->Number.Value);
+ RetDesc->Integer.Value = ~(ObjDesc->Integer.Value &
+ ObjDesc2->Integer.Value);
break;
@@ -371,8 +546,8 @@ AcpiAmlExecDyadic2R (
case AML_BIT_OR_OP:
- RetDesc->Number.Value = ObjDesc->Number.Value |
- ObjDesc2->Number.Value;
+ RetDesc->Integer.Value = ObjDesc->Integer.Value |
+ ObjDesc2->Integer.Value;
break;
@@ -380,8 +555,8 @@ AcpiAmlExecDyadic2R (
case AML_BIT_NOR_OP:
- RetDesc->Number.Value = ~(ObjDesc->Number.Value |
- ObjDesc2->Number.Value);
+ RetDesc->Integer.Value = ~(ObjDesc->Integer.Value |
+ ObjDesc2->Integer.Value);
break;
@@ -389,16 +564,16 @@ AcpiAmlExecDyadic2R (
case AML_BIT_XOR_OP:
- RetDesc->Number.Value = ObjDesc->Number.Value ^
- ObjDesc2->Number.Value;
+ RetDesc->Integer.Value = ObjDesc->Integer.Value ^
+ ObjDesc2->Integer.Value;
break;
- /* DefDivide := DivideOp Dividend Divisor Remainder Quotient */
+ /* DefDivide := DivideOp Dividend Divisor Remainder Quotient */
case AML_DIVIDE_OP:
- if (!ObjDesc2->Number.Value)
+ if (!ObjDesc2->Integer.Value)
{
REPORT_ERROR
(("AmlExecDyadic2R/DivideOp: Divide by zero\n"));
@@ -407,7 +582,7 @@ AcpiAmlExecDyadic2R (
goto Cleanup;
}
- RetDesc2 = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ RetDesc2 = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!RetDesc2)
{
Status = AE_NO_MEMORY;
@@ -416,13 +591,13 @@ AcpiAmlExecDyadic2R (
/* Remainder (modulo) */
- RetDesc->Number.Value = ACPI_MODULO (ObjDesc->Number.Value,
- ObjDesc2->Number.Value);
+ RetDesc->Integer.Value = ACPI_MODULO (ObjDesc->Integer.Value,
+ ObjDesc2->Integer.Value);
/* Result (what we used to call the quotient) */
- RetDesc2->Number.Value = ACPI_DIVIDE (ObjDesc->Number.Value,
- ObjDesc2->Number.Value);
+ RetDesc2->Integer.Value = ACPI_DIVIDE (ObjDesc->Integer.Value,
+ ObjDesc2->Integer.Value);
break;
@@ -430,8 +605,8 @@ AcpiAmlExecDyadic2R (
case AML_MULTIPLY_OP:
- RetDesc->Number.Value = ObjDesc->Number.Value *
- ObjDesc2->Number.Value;
+ RetDesc->Integer.Value = ObjDesc->Integer.Value *
+ ObjDesc2->Integer.Value;
break;
@@ -439,8 +614,8 @@ AcpiAmlExecDyadic2R (
case AML_SHIFT_LEFT_OP:
- RetDesc->Number.Value = ObjDesc->Number.Value <<
- ObjDesc2->Number.Value;
+ RetDesc->Integer.Value = ObjDesc->Integer.Value <<
+ ObjDesc2->Integer.Value;
break;
@@ -448,8 +623,8 @@ AcpiAmlExecDyadic2R (
case AML_SHIFT_RIGHT_OP:
- RetDesc->Number.Value = ObjDesc->Number.Value >>
- ObjDesc2->Number.Value;
+ RetDesc->Integer.Value = ObjDesc->Integer.Value >>
+ ObjDesc2->Integer.Value;
break;
@@ -457,8 +632,8 @@ AcpiAmlExecDyadic2R (
case AML_SUBTRACT_OP:
- RetDesc->Number.Value = ObjDesc->Number.Value -
- ObjDesc2->Number.Value;
+ RetDesc->Integer.Value = ObjDesc->Integer.Value -
+ ObjDesc2->Integer.Value;
break;
@@ -466,89 +641,56 @@ AcpiAmlExecDyadic2R (
case AML_CONCAT_OP:
- if (ObjDesc2->Common.Type != ObjDesc->Common.Type)
- {
- DEBUG_PRINT (ACPI_ERROR,
- ("AmlExecDyadic2R/ConcatOp: operand type mismatch %X != %X\n",
- ObjDesc->Common.Type, ObjDesc2->Common.Type));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
- }
- /* Both operands are now known to be the same */
+ /*
+ * Convert the second operand if necessary. The first operand
+ * determines the type of the second operand, (See the Data Types
+ * section of the ACPI specification.) Both object types are
+ * guaranteed to be either Integer/String/Buffer by the operand
+ * resolution mechanism above.
+ */
- if (ACPI_TYPE_STRING == ObjDesc->Common.Type)
+ switch (ObjDesc->Common.Type)
{
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_STRING);
- if (!RetDesc)
- {
- Status = AE_NO_MEMORY;
- goto Cleanup;
- }
-
- /* Operand1 is string */
-
- NewBuf = AcpiCmAllocate (ObjDesc->String.Length +
- ObjDesc2->String.Length + 1);
- if (!NewBuf)
- {
- REPORT_ERROR
- (("AmlExecDyadic2R/ConcatOp: String allocation failure\n"));
- Status = AE_NO_MEMORY;
- goto Cleanup;
- }
+ case ACPI_TYPE_INTEGER:
+ Status = AcpiAmlConvertToInteger (&ObjDesc2, WalkState);
+ break;
- STRCPY (NewBuf, ObjDesc->String.Pointer);
- STRCPY (NewBuf + ObjDesc->String.Length,
- ObjDesc2->String.Pointer);
+ case ACPI_TYPE_STRING:
+ Status = AcpiAmlConvertToString (&ObjDesc2, WalkState);
+ break;
- /* Point the return object to the new string */
+ case ACPI_TYPE_BUFFER:
+ Status = AcpiAmlConvertToBuffer (&ObjDesc2, WalkState);
+ break;
- RetDesc->String.Pointer = NewBuf;
- RetDesc->String.Length = ObjDesc->String.Length +=
- ObjDesc2->String.Length;
+ default:
+ Status = AE_AML_INTERNAL;
}
- else
+ if (ACPI_FAILURE (Status))
{
- /* Operand1 is not a string ==> must be a buffer */
-
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_BUFFER);
- if (!RetDesc)
- {
- Status = AE_NO_MEMORY;
- goto Cleanup;
- }
-
- NewBuf = AcpiCmAllocate (ObjDesc->Buffer.Length +
- ObjDesc2->Buffer.Length);
- if (!NewBuf)
- {
- REPORT_ERROR
- (("AmlExecDyadic2R/ConcatOp: Buffer allocation failure\n"));
- Status = AE_NO_MEMORY;
- goto Cleanup;
- }
-
- MEMCPY (NewBuf, ObjDesc->Buffer.Pointer,
- ObjDesc->Buffer.Length);
- MEMCPY (NewBuf + ObjDesc->Buffer.Length, ObjDesc2->Buffer.Pointer,
- ObjDesc2->Buffer.Length);
+ goto Cleanup;
+ }
- /*
- * Point the return object to the new buffer
- */
- RetDesc->Buffer.Pointer = (UINT8 *) NewBuf;
- RetDesc->Buffer.Length = ObjDesc->Buffer.Length +
- ObjDesc2->Buffer.Length;
+ /*
+ * Both operands are now known to be the same object type
+ * (Both are Integer, String, or Buffer), and we can now perform the
+ * concatenation.
+ */
+ Status = AcpiAmlDoConcatenate (ObjDesc, ObjDesc2, &RetDesc, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ goto Cleanup;
}
break;
default:
- REPORT_ERROR (("AcpiAmlExecDyadic2R: Unknown dyadic opcode %X\n", Opcode));
+ REPORT_ERROR (("AcpiAmlExecDyadic2R: Unknown dyadic opcode %X\n",
+ Opcode));
Status = AE_AML_BAD_OPCODE;
goto Cleanup;
}
@@ -612,7 +754,7 @@ Cleanup:
}
-/*****************************************************************************
+/*******************************************************************************
*
* FUNCTION: AcpiAmlExecDyadic2S
*
@@ -624,7 +766,7 @@ Cleanup:
*
* ALLOCATION: Deletes one operand descriptor -- other remains on stack
*
- ****************************************************************************/
+ ******************************************************************************/
ACPI_STATUS
AcpiAmlExecDyadic2S (
@@ -665,7 +807,7 @@ AcpiAmlExecDyadic2S (
/* Create the internal return object */
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!RetDesc)
{
Status = AE_NO_MEMORY;
@@ -674,7 +816,7 @@ AcpiAmlExecDyadic2S (
/* Default return value is FALSE, operation did not time out */
- RetDesc->Number.Value = 0;
+ RetDesc->Integer.Value = 0;
/* Examine the opcode */
@@ -713,7 +855,7 @@ AcpiAmlExecDyadic2S (
if (Status == AE_TIME)
{
- RetDesc->Number.Value = ACPI_INTEGER_MAX; /* TRUE, op timed out */
+ RetDesc->Integer.Value = ACPI_INTEGER_MAX; /* TRUE, op timed out */
Status = AE_OK;
}
@@ -742,7 +884,7 @@ Cleanup:
}
-/*****************************************************************************
+/*******************************************************************************
*
* FUNCTION: AcpiAmlExecDyadic2
*
@@ -756,7 +898,7 @@ Cleanup:
* ALLOCATION: Deletes one operand descriptor -- other remains on stack
* containing result value
*
- ****************************************************************************/
+ ******************************************************************************/
ACPI_STATUS
AcpiAmlExecDyadic2 (
@@ -798,7 +940,7 @@ AcpiAmlExecDyadic2 (
/* Create the internal return object */
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!RetDesc)
{
Status = AE_NO_MEMORY;
@@ -817,8 +959,8 @@ AcpiAmlExecDyadic2 (
case AML_LAND_OP:
- Lboolean = (BOOLEAN) (ObjDesc->Number.Value &&
- ObjDesc2->Number.Value);
+ Lboolean = (BOOLEAN) (ObjDesc->Integer.Value &&
+ ObjDesc2->Integer.Value);
break;
@@ -826,8 +968,8 @@ AcpiAmlExecDyadic2 (
case AML_LEQUAL_OP:
- Lboolean = (BOOLEAN) (ObjDesc->Number.Value ==
- ObjDesc2->Number.Value);
+ Lboolean = (BOOLEAN) (ObjDesc->Integer.Value ==
+ ObjDesc2->Integer.Value);
break;
@@ -835,8 +977,8 @@ AcpiAmlExecDyadic2 (
case AML_LGREATER_OP:
- Lboolean = (BOOLEAN) (ObjDesc->Number.Value >
- ObjDesc2->Number.Value);
+ Lboolean = (BOOLEAN) (ObjDesc->Integer.Value >
+ ObjDesc2->Integer.Value);
break;
@@ -844,8 +986,8 @@ AcpiAmlExecDyadic2 (
case AML_LLESS_OP:
- Lboolean = (BOOLEAN) (ObjDesc->Number.Value <
- ObjDesc2->Number.Value);
+ Lboolean = (BOOLEAN) (ObjDesc->Integer.Value <
+ ObjDesc2->Integer.Value);
break;
@@ -853,8 +995,8 @@ AcpiAmlExecDyadic2 (
case AML_LOR_OP:
- Lboolean = (BOOLEAN) (ObjDesc->Number.Value ||
- ObjDesc2->Number.Value);
+ Lboolean = (BOOLEAN) (ObjDesc->Integer.Value ||
+ ObjDesc2->Integer.Value);
break;
@@ -871,11 +1013,11 @@ AcpiAmlExecDyadic2 (
if (Lboolean)
{
- RetDesc->Number.Value = ACPI_INTEGER_MAX;
+ RetDesc->Integer.Value = ACPI_INTEGER_MAX;
}
else
{
- RetDesc->Number.Value = 0;
+ RetDesc->Integer.Value = 0;
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amfield.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amfield.c
index b99df95..62c77a7 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amfield.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amfield.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amfield - ACPI AML (p-code) execution - field manipulation
- * $Revision: 75 $
+ * $Revision: 77 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -293,7 +293,8 @@ AcpiAmlAccessNamedField (
FUNCTION_TRACE_PTR ("AmlAccessNamedField", NamedField);
- /* Basic data checking */
+ /* Parameter validation */
+
if ((!NamedField) || (ACPI_READ == Mode && !Buffer))
{
DEBUG_PRINT (ACPI_ERROR,
@@ -375,7 +376,7 @@ AcpiAmlAccessNamedField (
/* TBD: should these round down to a power of 2? */
- if (DIV_8(BitGranularity) > ByteFieldLength)
+ if (DIV_8 (BitGranularity) > ByteFieldLength)
{
DEBUG_PRINT (ACPI_INFO,
("AmlAccessNamedField: Bit granularity %X truncated to %X\n",
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amfldio.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amfldio.c
index 66d6043..ad40aec 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amfldio.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amfldio.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amfldio - Aml Field I/O
- * $Revision: 33 $
+ * $Revision: 37 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -254,7 +254,7 @@ AcpiAmlReadField (
UINT32 ThisFieldByteOffset;
UINT32 ThisFieldDatumOffset;
UINT32 PreviousRawDatum;
- UINT32 ThisRawDatum;
+ UINT32 ThisRawDatum = 0;
UINT32 ValidFieldBits;
UINT32 Mask;
UINT32 MergedDatum = 0;
@@ -331,32 +331,46 @@ AcpiAmlReadField (
while (ThisFieldDatumOffset < DatumLength)
{
/*
- * Get the next raw datum, it contains bits of the current
- * field datum
+ * If the field is aligned on a byte boundary, we don't want
+ * to perform a final read, since this would potentially read
+ * past the end of the region.
+ *
+ * TBD: [Investigate] It may make more sense to just split the aligned
+ * and non-aligned cases since the aligned case is so very simple,
*/
-
- Status = AcpiAmlReadFieldData (ObjDesc,
- ThisFieldByteOffset + ByteGranularity,
- BitGranularity, &ThisRawDatum);
- if (ACPI_FAILURE (Status))
+ if ((ObjDesc->Field.BitOffset != 0) ||
+ ((ObjDesc->Field.BitOffset == 0) &&
+ (ThisFieldDatumOffset < (DatumLength -1))))
{
- goto Cleanup;
+ /*
+ * Get the next raw datum, it contains some or all bits
+ * of the current field datum
+ */
+
+ Status = AcpiAmlReadFieldData (ObjDesc,
+ ThisFieldByteOffset + ByteGranularity,
+ BitGranularity, &ThisRawDatum);
+ if (ACPI_FAILURE (Status))
+ {
+ goto Cleanup;
+ }
+
+ /* Before merging the data, make sure the unused bits are clear */
+
+ switch (ByteGranularity)
+ {
+ case 1:
+ ThisRawDatum &= 0x000000FF;
+ PreviousRawDatum &= 0x000000FF;
+ break;
+
+ case 2:
+ ThisRawDatum &= 0x0000FFFF;
+ PreviousRawDatum &= 0x0000FFFF;
+ break;
+ }
}
- /* Before merging the data, make sure the unused bits are clear */
-
- switch (ByteGranularity)
- {
- case 1:
- ThisRawDatum &= 0x000000FF;
- PreviousRawDatum &= 0x000000FF;
- break;
-
- case 2:
- ThisRawDatum &= 0x0000FFFF;
- PreviousRawDatum &= 0x0000FFFF;
- break;
- }
/*
* Put together bits of the two raw data to make a complete
@@ -547,7 +561,6 @@ AcpiAmlWriteFieldDataWithUpdateRule (
MergedValue = FieldValue;
- /* Check if update rule needs to be applied (not if mask is all ones) */
/* Decode the update rule */
@@ -557,13 +570,18 @@ AcpiAmlWriteFieldDataWithUpdateRule (
case UPDATE_PRESERVE:
- /*
- * Read the current contents of the byte/word/dword containing
- * the field, and merge with the new field value.
- */
- Status = AcpiAmlReadFieldData (ObjDesc, ThisFieldByteOffset,
- BitGranularity, &CurrentValue);
- MergedValue |= (CurrentValue & ~Mask);
+ /* Check if update rule needs to be applied (not if mask is all ones) */
+
+ if (((1 << BitGranularity) -1) & ~Mask)
+ {
+ /*
+ * Read the current contents of the byte/word/dword containing
+ * the field, and merge with the new field value.
+ */
+ Status = AcpiAmlReadFieldData (ObjDesc, ThisFieldByteOffset,
+ BitGranularity, &CurrentValue);
+ MergedValue |= (CurrentValue & ~Mask);
+ }
break;
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/ammisc.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/ammisc.c
index 1757bc7..505d9d4 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/ammisc.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/ammisc.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: ammisc - ACPI AML (p-code) execution - specific opcodes
- * $Revision: 72 $
+ * $Revision: 73 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -190,7 +190,7 @@ AcpiAmlExecFatal (
DEBUG_PRINT (ACPI_INFO,
("FatalOp: Type %x Code %x Arg %x <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n",
- TypeDesc->Number.Value, CodeDesc->Number.Value, ArgDesc->Number.Value));
+ TypeDesc->Integer.Value, CodeDesc->Integer.Value, ArgDesc->Integer.Value));
/*
@@ -296,7 +296,7 @@ AcpiAmlExecIndex (
{
/* Object to be indexed is a Package */
- if (IdxDesc->Number.Value >= ObjDesc->Package.Count)
+ if (IdxDesc->Integer.Value >= ObjDesc->Package.Count)
{
DEBUG_PRINT (ACPI_ERROR,
("AmlExecIndex: Index value out of range\n"));
@@ -323,7 +323,7 @@ AcpiAmlExecIndex (
* we are after.
*/
- TmpDesc = ObjDesc->Package.Elements[IdxDesc->Number.Value];
+ TmpDesc = ObjDesc->Package.Elements[IdxDesc->Integer.Value];
RetDesc->Reference.OpCode = AML_INDEX_OP;
RetDesc->Reference.TargetType = TmpDesc->Common.Type;
RetDesc->Reference.Object = TmpDesc;
@@ -338,14 +338,14 @@ AcpiAmlExecIndex (
*/
RetDesc->Reference.OpCode = AML_INDEX_OP;
RetDesc->Reference.TargetType = ACPI_TYPE_PACKAGE;
- RetDesc->Reference.Where = &ObjDesc->Package.Elements[IdxDesc->Number.Value];
+ RetDesc->Reference.Where = &ObjDesc->Package.Elements[IdxDesc->Integer.Value];
}
else
{
/* Object to be indexed is a Buffer */
- if (IdxDesc->Number.Value >= ObjDesc->Buffer.Length)
+ if (IdxDesc->Integer.Value >= ObjDesc->Buffer.Length)
{
DEBUG_PRINT (ACPI_ERROR,
("AmlExecIndex: Index value out of range\n"));
@@ -356,7 +356,7 @@ AcpiAmlExecIndex (
RetDesc->Reference.OpCode = AML_INDEX_OP;
RetDesc->Reference.TargetType = ACPI_TYPE_BUFFER_FIELD;
RetDesc->Reference.Object = ObjDesc;
- RetDesc->Reference.Offset = (UINT32) IdxDesc->Number.Value;
+ RetDesc->Reference.Offset = (UINT32) IdxDesc->Integer.Value;
Status = AcpiAmlExecStore (RetDesc, ResDesc, WalkState);
}
@@ -460,8 +460,8 @@ AcpiAmlExecMatch (
/* Validate match comparison sub-opcodes */
- if ((Op1Desc->Number.Value > MAX_MATCH_OPERATOR) ||
- (Op2Desc->Number.Value > MAX_MATCH_OPERATOR))
+ if ((Op1Desc->Integer.Value > MAX_MATCH_OPERATOR) ||
+ (Op2Desc->Integer.Value > MAX_MATCH_OPERATOR))
{
DEBUG_PRINT (ACPI_ERROR,
("AmlExecMatch: operation encoding out of range\n"));
@@ -469,7 +469,7 @@ AcpiAmlExecMatch (
goto Cleanup;
}
- Index = (UINT32) StartDesc->Number.Value;
+ Index = (UINT32) StartDesc->Integer.Value;
if (Index >= (UINT32) PkgDesc->Package.Count)
{
DEBUG_PRINT (ACPI_ERROR,
@@ -478,7 +478,7 @@ AcpiAmlExecMatch (
goto Cleanup;
}
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!RetDesc)
{
Status = AE_NO_MEMORY;
@@ -504,7 +504,7 @@ AcpiAmlExecMatch (
* should we examine its value?
*/
if (!PkgDesc->Package.Elements[Index] ||
- ACPI_TYPE_NUMBER != PkgDesc->Package.Elements[Index]->Common.Type)
+ ACPI_TYPE_INTEGER != PkgDesc->Package.Elements[Index]->Common.Type)
{
continue;
}
@@ -515,7 +515,7 @@ AcpiAmlExecMatch (
* "continue" (proceed to next iteration of enclosing
* "for" loop) signifies a non-match.
*/
- switch (Op1Desc->Number.Value)
+ switch (Op1Desc->Integer.Value)
{
case MATCH_MTR: /* always true */
@@ -525,8 +525,8 @@ AcpiAmlExecMatch (
case MATCH_MEQ: /* true if equal */
- if (PkgDesc->Package.Elements[Index]->Number.Value
- != V1Desc->Number.Value)
+ if (PkgDesc->Package.Elements[Index]->Integer.Value
+ != V1Desc->Integer.Value)
{
continue;
}
@@ -535,8 +535,8 @@ AcpiAmlExecMatch (
case MATCH_MLE: /* true if less than or equal */
- if (PkgDesc->Package.Elements[Index]->Number.Value
- > V1Desc->Number.Value)
+ if (PkgDesc->Package.Elements[Index]->Integer.Value
+ > V1Desc->Integer.Value)
{
continue;
}
@@ -545,8 +545,8 @@ AcpiAmlExecMatch (
case MATCH_MLT: /* true if less than */
- if (PkgDesc->Package.Elements[Index]->Number.Value
- >= V1Desc->Number.Value)
+ if (PkgDesc->Package.Elements[Index]->Integer.Value
+ >= V1Desc->Integer.Value)
{
continue;
}
@@ -555,8 +555,8 @@ AcpiAmlExecMatch (
case MATCH_MGE: /* true if greater than or equal */
- if (PkgDesc->Package.Elements[Index]->Number.Value
- < V1Desc->Number.Value)
+ if (PkgDesc->Package.Elements[Index]->Integer.Value
+ < V1Desc->Integer.Value)
{
continue;
}
@@ -565,8 +565,8 @@ AcpiAmlExecMatch (
case MATCH_MGT: /* true if greater than */
- if (PkgDesc->Package.Elements[Index]->Number.Value
- <= V1Desc->Number.Value)
+ if (PkgDesc->Package.Elements[Index]->Integer.Value
+ <= V1Desc->Integer.Value)
{
continue;
}
@@ -579,7 +579,7 @@ AcpiAmlExecMatch (
}
- switch(Op2Desc->Number.Value)
+ switch(Op2Desc->Integer.Value)
{
case MATCH_MTR:
@@ -589,8 +589,8 @@ AcpiAmlExecMatch (
case MATCH_MEQ:
- if (PkgDesc->Package.Elements[Index]->Number.Value
- != V2Desc->Number.Value)
+ if (PkgDesc->Package.Elements[Index]->Integer.Value
+ != V2Desc->Integer.Value)
{
continue;
}
@@ -599,8 +599,8 @@ AcpiAmlExecMatch (
case MATCH_MLE:
- if (PkgDesc->Package.Elements[Index]->Number.Value
- > V2Desc->Number.Value)
+ if (PkgDesc->Package.Elements[Index]->Integer.Value
+ > V2Desc->Integer.Value)
{
continue;
}
@@ -609,8 +609,8 @@ AcpiAmlExecMatch (
case MATCH_MLT:
- if (PkgDesc->Package.Elements[Index]->Number.Value
- >= V2Desc->Number.Value)
+ if (PkgDesc->Package.Elements[Index]->Integer.Value
+ >= V2Desc->Integer.Value)
{
continue;
}
@@ -619,8 +619,8 @@ AcpiAmlExecMatch (
case MATCH_MGE:
- if (PkgDesc->Package.Elements[Index]->Number.Value
- < V2Desc->Number.Value)
+ if (PkgDesc->Package.Elements[Index]->Integer.Value
+ < V2Desc->Integer.Value)
{
continue;
}
@@ -629,8 +629,8 @@ AcpiAmlExecMatch (
case MATCH_MGT:
- if (PkgDesc->Package.Elements[Index]->Number.Value
- <= V2Desc->Number.Value)
+ if (PkgDesc->Package.Elements[Index]->Integer.Value
+ <= V2Desc->Integer.Value)
{
continue;
}
@@ -650,7 +650,7 @@ AcpiAmlExecMatch (
/* MatchValue is the return value */
- RetDesc->Number.Value = MatchValue;
+ RetDesc->Integer.Value = MatchValue;
Cleanup:
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/ammonad.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/ammonad.c
index 4dcf021..394780f 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/ammonad.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/ammonad.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: ammonad - ACPI AML (p-code) execution for monadic operators
- * $Revision: 88 $
+ * $Revision: 89 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -296,7 +296,7 @@ AcpiAmlExecMonadic1 (
case AML_SLEEP_OP:
- AcpiAmlSystemDoSuspend ((UINT32) ObjDesc->Number.Value);
+ AcpiAmlSystemDoSuspend ((UINT32) ObjDesc->Integer.Value);
break;
@@ -304,7 +304,7 @@ AcpiAmlExecMonadic1 (
case AML_STALL_OP:
- AcpiAmlSystemDoStall ((UINT32) ObjDesc->Number.Value);
+ AcpiAmlSystemDoStall ((UINT32) ObjDesc->Integer.Value);
break;
@@ -395,7 +395,7 @@ AcpiAmlExecMonadic2R (
case AML_TO_BCD_OP:
case AML_COND_REF_OF_OP:
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!RetDesc)
{
Status = AE_NO_MEMORY;
@@ -412,7 +412,7 @@ AcpiAmlExecMonadic2R (
case AML_BIT_NOT_OP:
- RetDesc->Number.Value = ~ObjDesc->Number.Value;
+ RetDesc->Integer.Value = ~ObjDesc->Integer.Value;
break;
@@ -420,18 +420,18 @@ AcpiAmlExecMonadic2R (
case AML_FIND_SET_LEFT_BIT_OP:
- RetDesc->Number.Value = ObjDesc->Number.Value;
+ RetDesc->Integer.Value = ObjDesc->Integer.Value;
/*
* Acpi specification describes Integer type as a little
* endian unsigned value, so this boundry condition is valid.
*/
- for (ResVal = 0; RetDesc->Number.Value && ResVal < ACPI_INTEGER_BIT_SIZE; ++ResVal)
+ for (ResVal = 0; RetDesc->Integer.Value && ResVal < ACPI_INTEGER_BIT_SIZE; ++ResVal)
{
- RetDesc->Number.Value >>= 1;
+ RetDesc->Integer.Value >>= 1;
}
- RetDesc->Number.Value = ResVal;
+ RetDesc->Integer.Value = ResVal;
break;
@@ -439,20 +439,20 @@ AcpiAmlExecMonadic2R (
case AML_FIND_SET_RIGHT_BIT_OP:
- RetDesc->Number.Value = ObjDesc->Number.Value;
+ RetDesc->Integer.Value = ObjDesc->Integer.Value;
/*
* Acpi specification describes Integer type as a little
* endian unsigned value, so this boundry condition is valid.
*/
- for (ResVal = 0; RetDesc->Number.Value && ResVal < ACPI_INTEGER_BIT_SIZE; ++ResVal)
+ for (ResVal = 0; RetDesc->Integer.Value && ResVal < ACPI_INTEGER_BIT_SIZE; ++ResVal)
{
- RetDesc->Number.Value <<= 1;
+ RetDesc->Integer.Value <<= 1;
}
/* Since returns must be 1-based, subtract from 33 (65) */
- RetDesc->Number.Value = ResVal == 0 ? 0 : (ACPI_INTEGER_BIT_SIZE + 1) - ResVal;
+ RetDesc->Integer.Value = ResVal == 0 ? 0 : (ACPI_INTEGER_BIT_SIZE + 1) - ResVal;
break;
@@ -463,12 +463,12 @@ AcpiAmlExecMonadic2R (
/*
* The 64-bit ACPI integer can hold 16 4-bit BCD integers
*/
- RetDesc->Number.Value = 0;
+ RetDesc->Integer.Value = 0;
for (i = 0; i < ACPI_MAX_BCD_DIGITS; i++)
{
/* Get one BCD digit */
- Digit = (ACPI_INTEGER) ((ObjDesc->Number.Value >> (i * 4)) & 0xF);
+ Digit = (ACPI_INTEGER) ((ObjDesc->Integer.Value >> (i * 4)) & 0xF);
/* Check the range of the digit */
@@ -490,7 +490,7 @@ AcpiAmlExecMonadic2R (
Digit *= 10;
}
- RetDesc->Number.Value += Digit;
+ RetDesc->Integer.Value += Digit;
}
}
break;
@@ -501,20 +501,20 @@ AcpiAmlExecMonadic2R (
case AML_TO_BCD_OP:
- if (ObjDesc->Number.Value > ACPI_MAX_BCD_VALUE)
+ if (ObjDesc->Integer.Value > ACPI_MAX_BCD_VALUE)
{
DEBUG_PRINT (ACPI_ERROR, ("Monadic2R/ToBCDOp: BCD overflow: %d\n",
- ObjDesc->Number.Value));
+ ObjDesc->Integer.Value));
Status = AE_AML_NUMERIC_OVERFLOW;
goto Cleanup;
}
- RetDesc->Number.Value = 0;
+ RetDesc->Integer.Value = 0;
for (i = 0; i < ACPI_MAX_BCD_DIGITS; i++)
{
/* Divide by nth factor of 10 */
- Digit = ObjDesc->Number.Value;
+ Digit = ObjDesc->Integer.Value;
for (j = 0; j < i; j++)
{
Digit /= 10;
@@ -524,7 +524,7 @@ AcpiAmlExecMonadic2R (
if (Digit > 0)
{
- RetDesc->Number.Value += (ACPI_MODULO (Digit, 10) << (i * 4));
+ RetDesc->Integer.Value += (ACPI_MODULO (Digit, 10) << (i * 4));
}
}
break;
@@ -547,7 +547,7 @@ AcpiAmlExecMonadic2R (
* return FALSE
*/
- RetDesc->Number.Value = 0;
+ RetDesc->Integer.Value = 0;
/*
* Must delete the result descriptor since there is no reference
@@ -570,7 +570,7 @@ AcpiAmlExecMonadic2R (
/* The object exists in the namespace, return TRUE */
- RetDesc->Number.Value = ACPI_INTEGER_MAX;
+ RetDesc->Integer.Value = ACPI_INTEGER_MAX;
goto Cleanup;
break;
@@ -750,14 +750,14 @@ AcpiAmlExecMonadic2 (
case AML_LNOT_OP:
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!RetDesc)
{
Status = AE_NO_MEMORY;
goto Cleanup;
}
- RetDesc->Number.Value = !ObjDesc->Number.Value;
+ RetDesc->Integer.Value = !ObjDesc->Integer.Value;
break;
@@ -819,11 +819,11 @@ AcpiAmlExecMonadic2 (
if (AML_INCREMENT_OP == Opcode)
{
- RetDesc->Number.Value++;
+ RetDesc->Integer.Value++;
}
else
{
- RetDesc->Number.Value--;
+ RetDesc->Integer.Value--;
}
/* Store the result back in the original descriptor */
@@ -855,7 +855,7 @@ AcpiAmlExecMonadic2 (
/* Constants are of type Number */
- Type = ACPI_TYPE_NUMBER;
+ Type = ACPI_TYPE_INTEGER;
break;
@@ -918,14 +918,14 @@ AcpiAmlExecMonadic2 (
/* Allocate a descriptor to hold the type. */
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!RetDesc)
{
Status = AE_NO_MEMORY;
goto Cleanup;
}
- RetDesc->Number.Value = Type;
+ RetDesc->Integer.Value = Type;
break;
@@ -985,14 +985,14 @@ AcpiAmlExecMonadic2 (
* object to hold the value
*/
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!RetDesc)
{
Status = AE_NO_MEMORY;
goto Cleanup;
}
- RetDesc->Number.Value = Value;
+ RetDesc->Integer.Value = Value;
break;
@@ -1112,7 +1112,7 @@ AcpiAmlExecMonadic2 (
* sub-buffer of the main buffer, it is only a pointer to a
* single element (byte) of the buffer!
*/
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!RetDesc)
{
Status = AE_NO_MEMORY;
@@ -1120,7 +1120,7 @@ AcpiAmlExecMonadic2 (
}
TmpDesc = ObjDesc->Reference.Object;
- RetDesc->Number.Value =
+ RetDesc->Integer.Value =
TmpDesc->Buffer.Pointer[ObjDesc->Reference.Offset];
/* TBD: [Investigate] (see below) Don't add an additional
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amnames.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amnames.c
index 60ea50d..9054e2e 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amnames.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amnames.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amnames - interpreter/scanner name load/execute
- * $Revision: 72 $
+ * $Revision: 73 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amprep.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amprep.c
index b0aa979..13c7d04 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amprep.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amprep.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amprep - ACPI AML (p-code) execution - field prep utilities
- * $Revision: 72 $
+ * $Revision: 73 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amregion.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amregion.c
index d85b8e4..ca01974 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amregion.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amregion.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amregion - ACPI default OpRegion (address space) handlers
- * $Revision: 42 $
+ * $Revision: 44 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -198,8 +198,8 @@ AcpiAmlSystemMemorySpaceHandler (
*/
if ((Address < MemInfo->MappedPhysicalAddress) ||
- ((Address + Length) >
- (MemInfo->MappedPhysicalAddress + MemInfo->MappedLength)))
+ (((ACPI_INTEGER) Address + Length) >
+ ((ACPI_INTEGER) MemInfo->MappedPhysicalAddress + MemInfo->MappedLength)))
{
/*
* The request cannot be resolved by the current memory mapping;
@@ -240,7 +240,7 @@ AcpiAmlSystemMemorySpaceHandler (
/* TBD: should these pointers go to 64-bit in all cases ? */
LogicalAddrPtr = MemInfo->MappedLogicalAddress +
- (Address - MemInfo->MappedPhysicalAddress);
+ ((ACPI_INTEGER) Address - (ACPI_INTEGER) MemInfo->MappedPhysicalAddress);
/* Perform the memory read or write */
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amresnte.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amresnte.c
index 3ed35cb..659d6f6 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amresnte.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amresnte.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amresnte - AML Interpreter object resolution
- * $Revision: 26 $
+ * $Revision: 27 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -147,7 +147,7 @@
* can be either a pointer to an actual internal object or a pointer into the
* AML stream itself. These types are currently:
*
- * ACPI_TYPE_NUMBER
+ * ACPI_TYPE_INTEGER
* ACPI_TYPE_STRING
* ACPI_TYPE_BUFFER
* ACPI_TYPE_MUTEX
@@ -335,7 +335,7 @@ AcpiAmlResolveNodeToValue (
break;
- case ACPI_TYPE_NUMBER:
+ case ACPI_TYPE_INTEGER:
DEBUG_PRINT (TRACE_EXEC, ("AmlResolveEntryToValue: case Number \n"));
@@ -344,7 +344,7 @@ AcpiAmlResolveNodeToValue (
* number
*/
- if (ACPI_TYPE_NUMBER != ValDesc->Common.Type)
+ if (ACPI_TYPE_INTEGER != ValDesc->Common.Type)
{
DEBUG_PRINT (ACPI_ERROR,
("AmlResolveToValue: Object not a Number, type %X\n",
@@ -379,7 +379,7 @@ AcpiAmlResolveNodeToValue (
}
else
{
- ObjectType = ACPI_TYPE_NUMBER;
+ ObjectType = ACPI_TYPE_INTEGER;
}
/*
@@ -423,7 +423,7 @@ AcpiAmlResolveNodeToValue (
return_ACPI_STATUS (Status);
}
- ObjDesc->Number.Value = TempVal;
+ ObjDesc->Integer.Value = TempVal;
}
@@ -484,13 +484,13 @@ AcpiAmlResolveNodeToValue (
/* Create an object for the result */
- ObjDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ ObjDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!ObjDesc)
{
return_ACPI_STATUS (AE_NO_MEMORY);
}
- ObjDesc->Number.Value = TempVal;
+ ObjDesc->Integer.Value = TempVal;
break;
@@ -542,13 +542,13 @@ AcpiAmlResolveNodeToValue (
/* Create an object for the result */
- ObjDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ ObjDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!ObjDesc)
{
return_ACPI_STATUS (AE_NO_MEMORY);
}
- ObjDesc->Number.Value = TempVal;
+ ObjDesc->Integer.Value = TempVal;
break;
@@ -660,13 +660,13 @@ AcpiAmlResolveNodeToValue (
/* Create object for result */
- ObjDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ ObjDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!ObjDesc)
{
return_ACPI_STATUS (AE_NO_MEMORY);
}
- ObjDesc->Number.Value = TempVal;
+ ObjDesc->Integer.Value = TempVal;
/* Truncate value if we are executing from a 32-bit ACPI table */
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amresolv.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amresolv.c
index f43b15f..26ecd31 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amresolv.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amresolv.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amresolv - AML Interpreter object resolution
- * $Revision: 79 $
+ * $Revision: 81 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -230,19 +230,19 @@ AcpiAmlGetFieldUnitValue (
Mask = ACPI_UINT32_MAX;
}
- ResultDesc->Number.Type = (UINT8) ACPI_TYPE_NUMBER;
+ ResultDesc->Integer.Type = (UINT8) ACPI_TYPE_INTEGER;
/* Get the 32 bit value at the location */
- MOVE_UNALIGNED32_TO_32 (&ResultDesc->Number.Value, Location);
+ MOVE_UNALIGNED32_TO_32 (&ResultDesc->Integer.Value, Location);
/*
* Shift the 32-bit word containing the field, and mask off the
* resulting value
*/
- ResultDesc->Number.Value =
- (ResultDesc->Number.Value >> FieldDesc->FieldUnit.BitOffset) & Mask;
+ ResultDesc->Integer.Value =
+ (ResultDesc->Integer.Value >> FieldDesc->FieldUnit.BitOffset) & Mask;
DEBUG_PRINT (ACPI_INFO,
("** Read from buffer %p byte %ld bit %d width %d addr %p mask %08lx val %08lx\n",
@@ -250,7 +250,7 @@ AcpiAmlGetFieldUnitValue (
FieldDesc->FieldUnit.Offset,
FieldDesc->FieldUnit.BitOffset,
FieldDesc->FieldUnit.Length,
- Location, Mask, ResultDesc->Number.Value));
+ Location, Mask, ResultDesc->Integer.Value));
/* Release global lock if we acquired it earlier */
@@ -270,7 +270,7 @@ AcpiAmlGetFieldUnitValue (
*
* RETURN: Status
*
- * DESCRIPTION: Convert Reference entries on ObjStack to Rvalues
+ * DESCRIPTION: Convert Reference objects to values
*
******************************************************************************/
@@ -419,13 +419,13 @@ AcpiAmlResolveObjectToValue (
("AmlResolveObjectToValue: [Local%d] ValueObj is %p\n",
Index, ObjDesc));
- if (ACPI_TYPE_NUMBER == ObjDesc->Common.Type)
+ if (ACPI_TYPE_INTEGER == ObjDesc->Common.Type)
{
/* Value is a Number */
DEBUG_PRINT (ACPI_INFO,
("AmlResolveObjectToValue: [Local%d] value=%X \n",
- Index, ObjDesc->Number.Value));
+ Index, ObjDesc->Integer.Value));
}
break;
@@ -460,13 +460,13 @@ AcpiAmlResolveObjectToValue (
("AmlResolveObjectToValue: [Arg%d] ValueObj is %p\n",
Index, ObjDesc));
- if (ACPI_TYPE_NUMBER == ObjDesc->Common.Type)
+ if (ACPI_TYPE_INTEGER == ObjDesc->Common.Type)
{
/* Value is a Number */
DEBUG_PRINT (ACPI_INFO,
("AmlResolveObjectToValue: [Arg%d] value=%X\n",
- Index, ObjDesc->Number.Value));
+ Index, ObjDesc->Integer.Value));
}
break;
@@ -479,22 +479,22 @@ AcpiAmlResolveObjectToValue (
case AML_ZERO_OP:
- StackDesc->Common.Type = (UINT8) ACPI_TYPE_NUMBER;
- StackDesc->Number.Value = 0;
+ StackDesc->Common.Type = (UINT8) ACPI_TYPE_INTEGER;
+ StackDesc->Integer.Value = 0;
break;
case AML_ONE_OP:
- StackDesc->Common.Type = (UINT8) ACPI_TYPE_NUMBER;
- StackDesc->Number.Value = 1;
+ StackDesc->Common.Type = (UINT8) ACPI_TYPE_INTEGER;
+ StackDesc->Integer.Value = 1;
break;
case AML_ONES_OP:
- StackDesc->Common.Type = (UINT8) ACPI_TYPE_NUMBER;
- StackDesc->Number.Value = ACPI_INTEGER_MAX;
+ StackDesc->Common.Type = (UINT8) ACPI_TYPE_INTEGER;
+ StackDesc->Integer.Value = ACPI_INTEGER_MAX;
/* Truncate value if we are executing from a 32-bit ACPI table */
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amresop.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amresop.c
index 9c52434..d57d2fb 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amresop.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amresop.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amresop - AML Interpreter operand/object resolution
- * $Revision: 19 $
+ * $Revision: 22 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -350,8 +350,13 @@ AcpiAmlResolveOperands (
switch (ThisArgType)
{
- case ARGI_REFERENCE: /* Reference */
- case ARGI_TARGETREF:
+ case ARGI_REFERENCE: /* References */
+ case ARGI_INTEGER_REF:
+ case ARGI_OBJECT_REF:
+ case ARGI_DEVICE_REF:
+ case ARGI_TARGETREF: /* TBD: must implement implicit conversion rules before store */
+ case ARGI_FIXED_TARGET: /* No implicit conversion before store to target */
+ case ARGI_SIMPLE_TARGET: /* Name, Local, or Arg - no implicit conversion */
/* Need an operand of type INTERNAL_TYPE_REFERENCE */
@@ -423,20 +428,6 @@ AcpiAmlResolveOperands (
* For the simple cases, only one type of resolved object
* is allowed
*/
- case ARGI_NUMBER: /* Number */
-
- /* Need an operand of type ACPI_TYPE_NUMBER */
-
- TypeNeeded = ACPI_TYPE_NUMBER;
- break;
-
- case ARGI_BUFFER:
-
- /* Need an operand of type ACPI_TYPE_BUFFER */
-
- TypeNeeded = ACPI_TYPE_BUFFER;
- break;
-
case ARGI_MUTEX:
/* Need an operand of type ACPI_TYPE_MUTEX */
@@ -484,15 +475,91 @@ AcpiAmlResolveOperands (
* The more complex cases allow multiple resolved object types
*/
+ case ARGI_INTEGER: /* Number */
+
+ /*
+ * Need an operand of type ACPI_TYPE_INTEGER,
+ * But we can implicitly convert from a STRING or BUFFER
+ */
+ Status = AcpiAmlConvertToInteger (StackPtr, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ if (Status == AE_TYPE)
+ {
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlResolveOperands: Needed [Integer/String/Buffer], found [%s] %p\n",
+ AcpiCmGetTypeName ((*StackPtr)->Common.Type), *StackPtr));
+
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
+ }
+
+ return_ACPI_STATUS (Status);
+ }
+
+ goto NextOperand;
+ break;
+
+
+ case ARGI_BUFFER:
+
+ /*
+ * Need an operand of type ACPI_TYPE_BUFFER,
+ * But we can implicitly convert from a STRING or INTEGER
+ */
+ Status = AcpiAmlConvertToBuffer (StackPtr, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ if (Status == AE_TYPE)
+ {
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlResolveOperands: Needed [Integer/String/Buffer], found [%s] %p\n",
+ AcpiCmGetTypeName ((*StackPtr)->Common.Type), *StackPtr));
+
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
+ }
+
+ return_ACPI_STATUS (Status);
+ }
+
+ goto NextOperand;
+ break;
+
+
case ARGI_STRING:
- /* Need an operand of type ACPI_TYPE_STRING or ACPI_TYPE_BUFFER */
+ /*
+ * Need an operand of type ACPI_TYPE_STRING,
+ * But we can implicitly convert from a BUFFER or INTEGER
+ */
+ Status = AcpiAmlConvertToString (StackPtr, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ if (Status == AE_TYPE)
+ {
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlResolveOperands: Needed [Integer/String/Buffer], found [%s] %p\n",
+ AcpiCmGetTypeName ((*StackPtr)->Common.Type), *StackPtr));
+
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
+ }
+
+ return_ACPI_STATUS (Status);
+ }
+
+ goto NextOperand;
+ break;
+
+
+ case ARGI_COMPUTEDATA:
+
+ /* Need an operand of type INTEGER, STRING or BUFFER */
- if ((ACPI_TYPE_STRING != (*StackPtr)->Common.Type) &&
+ if ((ACPI_TYPE_INTEGER != (*StackPtr)->Common.Type) &&
+ (ACPI_TYPE_STRING != (*StackPtr)->Common.Type) &&
(ACPI_TYPE_BUFFER != (*StackPtr)->Common.Type))
{
DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed [String or Buffer], found [%s] %p\n",
+ ("AmlResolveOperands: Needed [Integer/String/Buffer], found [%s] %p\n",
AcpiCmGetTypeName ((*StackPtr)->Common.Type), *StackPtr));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amstore.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amstore.c
index 51f1bb6..71d1dfb 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amstore.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amstore.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amstore - AML Interpreter object store support
- * $Revision: 118 $
+ * $Revision: 121 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -130,6 +130,10 @@
MODULE_NAME ("amstore")
+
+
+
+
/*******************************************************************************
*
* FUNCTION: AcpiAmlExecStore
@@ -156,18 +160,10 @@ AcpiAmlExecStore (
ACPI_WALK_STATE *WalkState)
{
ACPI_STATUS Status = AE_OK;
- ACPI_OPERAND_OBJECT *DeleteDestDesc = NULL;
- ACPI_OPERAND_OBJECT *TmpDesc;
- ACPI_NAMESPACE_NODE *Node = NULL;
- UINT8 Value = 0;
- UINT32 Length;
- UINT32 i;
-
+ ACPI_OPERAND_OBJECT *RefDesc = DestDesc;
- FUNCTION_TRACE ("AmlExecStore");
- DEBUG_PRINT (ACPI_INFO, ("entered AcpiAmlExecStore: Val=%p, Dest=%p\n",
- ValDesc, DestDesc));
+ FUNCTION_TRACE_PTR ("AmlExecStore", DestDesc);
/* Validate parameters */
@@ -179,80 +175,185 @@ AcpiAmlExecStore (
return_ACPI_STATUS (AE_AML_NO_OPERAND);
}
- /* Examine the datatype of the DestDesc */
+ /* DestDesc can be either a namespace node or an ACPI object */
if (VALID_DESCRIPTOR_TYPE (DestDesc, ACPI_DESC_TYPE_NAMED))
{
- /* Dest is an ACPI_HANDLE, create a new object */
-
- Node = (ACPI_NAMESPACE_NODE *) DestDesc;
- DestDesc = AcpiCmCreateInternalObject (INTERNAL_TYPE_REFERENCE);
- if (!DestDesc)
- {
- /* Allocation failure */
-
- return_ACPI_STATUS (AE_NO_MEMORY);
- }
+ /*
+ * Dest is a namespace node,
+ * Storing an object into a Name "container"
+ */
+ Status = AcpiAmlStoreObjectToNode (ValDesc,
+ (ACPI_NAMESPACE_NODE *) DestDesc, WalkState);
- /* Build a new Reference wrapper around the handle */
+ /* All done, that's it */
- DestDesc->Reference.OpCode = AML_NAME_OP;
- DestDesc->Reference.Object = Node;
+ return_ACPI_STATUS (Status);
}
- else
- {
- DEBUG_PRINT (ACPI_INFO,
- ("AmlExecStore: Dest is object (not handle) - may be deleted!\n"));
- }
- /* Destination object must be of type Reference */
+ /* Destination object must be an object of type Reference */
if (DestDesc->Common.Type != INTERNAL_TYPE_REFERENCE)
{
/* Destination is not an Reference */
DEBUG_PRINT (ACPI_ERROR,
- ("AmlExecStore: Destination is not an Reference [%p]\n", DestDesc));
+ ("AmlExecStore: Destination is not a ReferenceObj [%p]\n", DestDesc));
DUMP_STACK_ENTRY (ValDesc);
DUMP_STACK_ENTRY (DestDesc);
DUMP_OPERANDS (&DestDesc, IMODE_EXECUTE, "AmlExecStore",
- 2, "target not Reference");
+ 2, "Target is not a ReferenceObj");
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
- /* Examine the Reference opcode */
- switch (DestDesc->Reference.OpCode)
+ /*
+ * Examine the Reference opcode. These cases are handled:
+ *
+ * 1) Store to Name (Change the object associated with a name)
+ * 2) Store to an indexed area of a Buffer or Package
+ * 3) Store to a Method Local or Arg
+ * 4) Store to the debug object
+ * 5) Store to a constant -- a noop
+ */
+
+ switch (RefDesc->Reference.OpCode)
{
case AML_NAME_OP:
- /*
- * Storing into a Name
- */
- DeleteDestDesc = DestDesc;
- Status = AcpiAmlStoreObjectToNode (ValDesc, DestDesc->Reference.Object,
- WalkState);
+ /* Storing an object into a Name "container" */
- break; /* Case NameOp */
+ Status = AcpiAmlStoreObjectToNode (ValDesc, RefDesc->Reference.Object,
+ WalkState);
+ break;
case AML_INDEX_OP:
- DeleteDestDesc = DestDesc;
+ /* Storing to an Index (pointer into a packager or buffer) */
+
+ Status = AcpiAmlStoreObjectToIndex (ValDesc, RefDesc, WalkState);
+ break;
+
+
+ case AML_LOCAL_OP:
+
+ Status = AcpiDsMethodDataSetValue (MTH_TYPE_LOCAL,
+ (RefDesc->Reference.Offset), ValDesc, WalkState);
+ break;
+
+
+ case AML_ARG_OP:
+
+ Status = AcpiDsMethodDataSetValue (MTH_TYPE_ARG,
+ (RefDesc->Reference.Offset), ValDesc, WalkState);
+ break;
+
+
+ case AML_DEBUG_OP:
/*
- * Valid source value and destination reference pointer.
+ * Storing to the Debug object causes the value stored to be
+ * displayed and otherwise has no effect -- see ACPI Specification
*
- * ACPI Specification 1.0B section 15.2.3.4.2.13:
- * Destination should point to either a buffer or a package
+ * TBD: print known object types "prettier".
*/
+ DEBUG_PRINT (ACPI_INFO, ("**** Write to Debug Object: ****: \n"));
+
+ if (ValDesc->Common.Type == ACPI_TYPE_STRING)
+ {
+ DEBUG_PRINT (ACPI_INFO, ("%s\n", ValDesc->String.Pointer));
+ }
+ else
+ {
+ DUMP_STACK_ENTRY (ValDesc);
+ }
+
+ break;
+
+
+ case AML_ZERO_OP:
+ case AML_ONE_OP:
+ case AML_ONES_OP:
/*
- * Actually, storing to a package is not so simple. The source must be
+ * Storing to a constant is a no-op -- see ACPI Specification
+ * Delete the reference descriptor, however
+ */
+ break;
+
+
+ default:
+
+ DEBUG_PRINT (ACPI_ERROR,
+ ("AmlExecStore: Internal error - Unknown Reference subtype %02x\n",
+ RefDesc->Reference.OpCode));
+
+ /* TBD: [Restructure] use object dump routine !! */
+
+ DUMP_BUFFER (RefDesc, sizeof (ACPI_OPERAND_OBJECT));
+
+ Status = AE_AML_INTERNAL;
+ break;
+
+ } /* switch (RefDesc->Reference.OpCode) */
+
+
+
+ /* Always delete the reference descriptor object */
+
+ if (RefDesc)
+ {
+ AcpiCmRemoveReference (RefDesc);
+ }
+
+ return_ACPI_STATUS (Status);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlStoreObjectToIndex
+ *
+ * PARAMETERS: *ValDesc - Value to be stored
+ * *Node - Named object to recieve the value
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Store the object to the named object.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlStoreObjectToIndex (
+ ACPI_OPERAND_OBJECT *ValDesc,
+ ACPI_OPERAND_OBJECT *DestDesc,
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_STATUS Status = AE_OK;
+ ACPI_OPERAND_OBJECT *ObjDesc;
+ UINT32 Length;
+ UINT32 i;
+ UINT8 Value = 0;
+
+
+ FUNCTION_TRACE ("AcpiAmlStoreObjectToIndex");
+
+
+ /*
+ * Destination must be a reference pointer, and
+ * must point to either a buffer or a package
+ */
+
+ switch (DestDesc->Reference.TargetType)
+ {
+ case ACPI_TYPE_PACKAGE:
+ /*
+ * Storing to a package element is not simple. The source must be
* evaluated and converted to the type of the destination and then the
* source is copied into the destination - we can't just point to the
* source object.
@@ -263,8 +364,8 @@ AcpiAmlExecStore (
* The object at *(DestDesc->Reference.Where) is the
* element within the package that is to be modified.
*/
- TmpDesc = *(DestDesc->Reference.Where);
- if (TmpDesc)
+ ObjDesc = *(DestDesc->Reference.Where);
+ if (ObjDesc)
{
/*
* If the Destination element is a package, we will delete
@@ -274,46 +375,44 @@ AcpiAmlExecStore (
* to be packages?
* && (ValDesc->Common.Type == ACPI_TYPE_PACKAGE)
*/
- if (TmpDesc->Common.Type == ACPI_TYPE_PACKAGE)
+ if (ObjDesc->Common.Type == ACPI_TYPE_PACKAGE)
{
/*
* Take away the reference for being part of a package and
* delete
*/
- AcpiCmRemoveReference (TmpDesc);
- AcpiCmRemoveReference (TmpDesc);
+ AcpiCmRemoveReference (ObjDesc);
+ AcpiCmRemoveReference (ObjDesc);
- TmpDesc = NULL;
+ ObjDesc = NULL;
}
}
- if (!TmpDesc)
+ if (!ObjDesc)
{
/*
- * If the TmpDesc is NULL, that means an uninitialized package
- * has been used as a destination, therefore, we must create
- * the destination element to match the type of the source
- * element NOTE: ValDesc can be of any type.
+ * If the ObjDesc is NULL, it means that an uninitialized package
+ * element has been used as a destination (this is OK), therefore,
+ * we must create the destination element to match the type of the
+ * source element NOTE: ValDesc can be of any type.
*/
- TmpDesc = AcpiCmCreateInternalObject (ValDesc->Common.Type);
- if (!TmpDesc)
+ ObjDesc = AcpiCmCreateInternalObject (ValDesc->Common.Type);
+ if (!ObjDesc)
{
- Status = AE_NO_MEMORY;
- goto Cleanup;
+ return_ACPI_STATUS (AE_NO_MEMORY);
}
/*
* If the source is a package, copy the source to the new dest
*/
- if (ACPI_TYPE_PACKAGE == TmpDesc->Common.Type)
+ if (ACPI_TYPE_PACKAGE == ObjDesc->Common.Type)
{
Status = AcpiAmlBuildCopyInternalPackageObject (
- ValDesc, TmpDesc, WalkState);
+ ValDesc, ObjDesc, WalkState);
if (ACPI_FAILURE (Status))
{
- AcpiCmRemoveReference (TmpDesc);
- TmpDesc = NULL;
- goto Cleanup;
+ AcpiCmRemoveReference (ObjDesc);
+ return_ACPI_STATUS (Status);
}
}
@@ -323,18 +422,18 @@ AcpiAmlExecStore (
* part of the parent package
*/
- *(DestDesc->Reference.Where) = TmpDesc;
- AcpiCmAddReference (TmpDesc);
+ *(DestDesc->Reference.Where) = ObjDesc;
+ AcpiCmAddReference (ObjDesc);
}
- if (ACPI_TYPE_PACKAGE != TmpDesc->Common.Type)
+ if (ACPI_TYPE_PACKAGE != ObjDesc->Common.Type)
{
/*
* The destination element is not a package, so we need to
* convert the contents of the source (ValDesc) and copy into
- * the destination (TmpDesc)
+ * the destination (ObjDesc)
*/
- Status = AcpiAmlStoreObjectToObject (ValDesc, TmpDesc,
+ Status = AcpiAmlStoreObjectToObject (ValDesc, ObjDesc,
WalkState);
if (ACPI_FAILURE (Status))
{
@@ -344,22 +443,14 @@ AcpiAmlExecStore (
*/
DEBUG_PRINT (ACPI_ERROR,
("AmlExecStore/Index: Unable to copy the internal object\n"));
- Status = AE_AML_OPERAND_TYPE;
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
}
-
- break;
}
+ break;
- /*
- * Check that the destination is a Buffer Field type
- */
- if (DestDesc->Reference.TargetType != ACPI_TYPE_BUFFER_FIELD)
- {
- Status = AE_AML_OPERAND_TYPE;
- break;
- }
+ case ACPI_TYPE_BUFFER_FIELD:
/*
* Storing into a buffer at a location defined by an Index.
*
@@ -368,14 +459,12 @@ AcpiAmlExecStore (
*/
/*
- * Set the TmpDesc to the destination object and type check.
+ * Set the ObjDesc to the destination object and type check.
*/
- TmpDesc = DestDesc->Reference.Object;
-
- if (TmpDesc->Common.Type != ACPI_TYPE_BUFFER)
+ ObjDesc = DestDesc->Reference.Object;
+ if (ObjDesc->Common.Type != ACPI_TYPE_BUFFER)
{
- Status = AE_AML_OPERAND_TYPE;
- break;
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
/*
@@ -386,16 +475,16 @@ AcpiAmlExecStore (
switch (ValDesc->Common.Type)
{
/*
- * If the type is Integer, the Length is 4.
+ * If the type is Integer, assign bytewise
* This loop to assign each of the elements is somewhat
- * backward because of the Big Endian-ness of IA-64
+ * backward because of the Big Endian-ness of IA-64
*/
- case ACPI_TYPE_NUMBER:
- Length = 4;
+ case ACPI_TYPE_INTEGER:
+ Length = sizeof (ACPI_INTEGER);
for (i = Length; i != 0; i--)
{
- Value = (UINT8)(ValDesc->Number.Value >> (MUL_8 (i - 1)));
- TmpDesc->Buffer.Pointer[DestDesc->Reference.Offset] = Value;
+ Value = (UINT8)(ValDesc->Integer.Value >> (MUL_8 (i - 1)));
+ ObjDesc->Buffer.Pointer[DestDesc->Reference.Offset] = Value;
}
break;
@@ -408,7 +497,7 @@ AcpiAmlExecStore (
for (i = 0; i < Length; i++)
{
Value = *(ValDesc->Buffer.Pointer + i);
- TmpDesc->Buffer.Pointer[DestDesc->Reference.Offset] = Value;
+ ObjDesc->Buffer.Pointer[DestDesc->Reference.Offset] = Value;
}
break;
@@ -421,7 +510,7 @@ AcpiAmlExecStore (
for (i = 0; i < Length; i++)
{
Value = *(ValDesc->String.Pointer + i);
- TmpDesc->Buffer.Pointer[DestDesc->Reference.Offset] = Value;
+ ObjDesc->Buffer.Pointer[DestDesc->Reference.Offset] = Value;
}
break;
@@ -435,97 +524,242 @@ AcpiAmlExecStore (
Status = AE_AML_OPERAND_TYPE;
break;
}
+ break;
- /*
- * If we had an error, break out of this case statement.
- */
- if (ACPI_FAILURE (Status))
- {
- break;
- }
-
- /*
- * Set the return pointer
- */
- DestDesc = TmpDesc;
+ default:
+ DEBUG_PRINT (ACPI_ERROR,
+ ("AmlExecStoreIndex: Target is not a Package or BufferField\n"));
+ Status = AE_AML_OPERAND_TYPE;
break;
+ }
- case AML_ZERO_OP:
- case AML_ONE_OP:
- case AML_ONES_OP:
- /*
- * Storing to a constant is a no-op -- see ACPI Specification
- * Delete the result descriptor.
- */
+ return_ACPI_STATUS (Status);
+}
- DeleteDestDesc = DestDesc;
- break;
- case AML_LOCAL_OP:
- Status = AcpiDsMethodDataSetValue (MTH_TYPE_LOCAL,
- (DestDesc->Reference.Offset), ValDesc, WalkState);
- DeleteDestDesc = DestDesc;
- break;
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlStoreObjectToNode
+ *
+ * PARAMETERS: *SourceDesc - Value to be stored
+ * *Node - Named object to recieve the value
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Store the object to the named object.
+ *
+ * The Assignment of an object to a named object is handled here
+ * The val passed in will replace the current value (if any)
+ * with the input value.
+ *
+ * When storing into an object the data is converted to the
+ * target object type then stored in the object. This means
+ * that the target object type (for an initialized target) will
+ * not be changed by a store operation.
+ *
+ * NOTE: the global lock is acquired early. This will result
+ * in the global lock being held a bit longer. Also, if the
+ * function fails during set up we may get the lock when we
+ * don't really need it. I don't think we care.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlStoreObjectToNode (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_NAMESPACE_NODE *Node,
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_STATUS Status = AE_OK;
+ ACPI_OPERAND_OBJECT *TargetDesc;
+ OBJECT_TYPE_INTERNAL TargetType = ACPI_TYPE_ANY;
- case AML_ARG_OP:
- Status = AcpiDsMethodDataSetValue (MTH_TYPE_ARG,
- (DestDesc->Reference.Offset), ValDesc, WalkState);
- DeleteDestDesc = DestDesc;
+ FUNCTION_TRACE ("AmlStoreObjectToNode");
+
+ /*
+ * Assuming the parameters were already validated
+ */
+ ACPI_ASSERT((Node) && (SourceDesc));
+
+
+ /*
+ * Get current type of the node, and object attached to Node
+ */
+ TargetType = AcpiNsGetType (Node);
+ TargetDesc = AcpiNsGetAttachedObject (Node);
+
+ DEBUG_PRINT (ACPI_INFO, ("AmlStoreObjectToNode: Storing %p(%s) into node %p(%s)\n",
+ Node, AcpiCmGetTypeName (SourceDesc->Common.Type),
+ SourceDesc, AcpiCmGetTypeName (TargetType)));
+
+
+ /*
+ * Resolve the source object to an actual value
+ * (If it is a reference object)
+ */
+ Status = AcpiAmlResolveObject (&SourceDesc, TargetType, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+
+ /*
+ * Do the actual store operation
+ */
+ switch (TargetType)
+ {
+ case INTERNAL_TYPE_DEF_FIELD:
+
+ /* Raw data copy for target types Integer/String/Buffer */
+
+ Status = AcpiAmlCopyDataToNamedField (SourceDesc, Node);
break;
- case AML_DEBUG_OP:
+ case ACPI_TYPE_INTEGER:
+ case ACPI_TYPE_STRING:
+ case ACPI_TYPE_BUFFER:
+ case INTERNAL_TYPE_BANK_FIELD:
+ case INTERNAL_TYPE_INDEX_FIELD:
+ case ACPI_TYPE_FIELD_UNIT:
- /*
- * Storing to the Debug object causes the value stored to be
- * displayed and otherwise has no effect -- see ACPI Specification
+ /*
+ * These target types are all of type Integer/String/Buffer, and
+ * therefore support implicit conversion before the store.
+ *
+ * Copy and/or convert the source object to a new target object
*/
- DEBUG_PRINT (ACPI_INFO, ("**** Write to Debug Object: ****: \n"));
- if (ValDesc->Common.Type == ACPI_TYPE_STRING)
- {
- DEBUG_PRINT (ACPI_INFO, ("%s\n", ValDesc->String.Pointer));
- }
- else
+ Status = AcpiAmlStoreObject (SourceDesc, TargetType, &TargetDesc, WalkState);
+ if (ACPI_FAILURE (Status))
{
- DUMP_STACK_ENTRY (ValDesc);
+ return_ACPI_STATUS (Status);
}
- DeleteDestDesc = DestDesc;
+ /*
+ * Store the new TargetDesc as the new value of the Name, and set
+ * the Name's type to that of the value being stored in it.
+ * SourceDesc reference count is incremented by AttachObject.
+ */
+ Status = AcpiNsAttachObject (Node, TargetDesc, TargetType);
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlStoreObjectToNode: Store %s into %s via Convert/Attach\n",
+ AcpiCmGetTypeName (TargetDesc->Common.Type),
+ AcpiCmGetTypeName (TargetType)));
break;
-
+
default:
- DEBUG_PRINT (ACPI_ERROR,
- ("AmlExecStore: Internal error - Unknown Reference subtype %02x\n",
- DestDesc->Reference.OpCode));
+ /* No conversions for all other types. Just attach the source object */
- /* TBD: [Restructure] use object dump routine !! */
+ Status = AcpiNsAttachObject (Node, SourceDesc, SourceDesc->Common.Type);
+
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlStoreObjectToNode: Store %s into %s via Attach only\n",
+ AcpiCmGetTypeName (SourceDesc->Common.Type),
+ AcpiCmGetTypeName (SourceDesc->Common.Type)));
+ break;
+ }
- DUMP_BUFFER (DestDesc, sizeof (ACPI_OPERAND_OBJECT));
- DeleteDestDesc = DestDesc;
- Status = AE_AML_INTERNAL;
+ return_ACPI_STATUS (Status);
+}
- } /* switch(DestDesc->Reference.OpCode) */
-Cleanup:
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlStoreObjectToObject
+ *
+ * PARAMETERS: *SourceDesc - Value to be stored
+ * *DestDesc - Object to receive the value
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Store an object to another object.
+ *
+ * The Assignment of an object to another (not named) object
+ * is handled here.
+ * The val passed in will replace the current value (if any)
+ * with the input value.
+ *
+ * When storing into an object the data is converted to the
+ * target object type then stored in the object. This means
+ * that the target object type (for an initialized target) will
+ * not be changed by a store operation.
+ *
+ * This module allows destination types of Number, String,
+ * and Buffer.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlStoreObjectToObject (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *DestDesc,
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_STATUS Status = AE_OK;
+ OBJECT_TYPE_INTERNAL DestinationType = DestDesc->Common.Type;
+
+
+ FUNCTION_TRACE ("AmlStoreObjectToObject");
+
+
+ /*
+ * Assuming the parameters are valid!
+ */
+ ACPI_ASSERT((DestDesc) && (SourceDesc));
- /* Cleanup and exit*/
+ DEBUG_PRINT (ACPI_INFO, ("AmlStoreObjectToObject: Storing %p(%s) to (%p)%s\n",
+ SourceDesc, AcpiCmGetTypeName (SourceDesc->Common.Type),
+ DestDesc, AcpiCmGetTypeName (DestDesc->Common.Type)));
- if (DeleteDestDesc)
+
+ /*
+ * From this interface, we only support Integers/Strings/Buffers
+ */
+ switch (DestinationType)
+ {
+ case ACPI_TYPE_INTEGER:
+ case ACPI_TYPE_STRING:
+ case ACPI_TYPE_BUFFER:
+ break;
+
+ default:
+ DEBUG_PRINT (ACPI_WARN,
+ ("AmlStoreObjectToObject: Store into %s not implemented\n",
+ AcpiCmGetTypeName (DestDesc->Common.Type)));
+
+ return_ACPI_STATUS (AE_NOT_IMPLEMENTED);
+ }
+
+
+
+ /*
+ * Resolve the source object to an actual value
+ * (If it is a reference object)
+ */
+ Status = AcpiAmlResolveObject (&SourceDesc, DestinationType, WalkState);
+ if (ACPI_FAILURE (Status))
{
- AcpiCmRemoveReference (DeleteDestDesc);
+ return_ACPI_STATUS (Status);
}
+
+ /*
+ * Copy and/or convert the source object to the destination object
+ */
+ Status = AcpiAmlStoreObject (SourceDesc, DestinationType, &DestDesc, WalkState);
+
+
return_ACPI_STATUS (Status);
}
-
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amstoren.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amstoren.c
index 57e02ff..b6bd010 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amstoren.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amstoren.c
@@ -2,8 +2,8 @@
/******************************************************************************
*
* Module Name: amstoren - AML Interpreter object store support,
- * Store to Node (namespace object)
- * $Revision: 25 $
+ * Store to Node (namespace object)
+ * $Revision: 28 $
*
*****************************************************************************/
@@ -11,7 +11,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -131,557 +131,226 @@
MODULE_NAME ("amstoren")
+
+
/*******************************************************************************
*
- * FUNCTION: AcpiAmlStoreObjectToNode
+ * FUNCTION: AcpiAmlResolveObject
*
- * PARAMETERS: *ValDesc - Value to be stored
- * *Node - Named object to recieve the value
- *
- * RETURN: Status
+ * PARAMETERS: SourceDescPtr - Pointer to the source object
+ * TargetType - Current type of the target
+ * WalkState - Current walk state
*
- * DESCRIPTION: Store the object to the named object.
+ * RETURN: Status, resolved object in SourceDescPtr.
*
- * The Assignment of an object to a named object is handled here
- * The val passed in will replace the current value (if any)
- * with the input value.
- *
- * When storing into an object the data is converted to the
- * target object type then stored in the object. This means
- * that the target object type (for an initialized target) will
- * not be changed by a store operation.
- *
- * NOTE: the global lock is acquired early. This will result
- * in the global lock being held a bit longer. Also, if the
- * function fails during set up we may get the lock when we
- * don't really need it. I don't think we care.
+ * DESCRIPTION: Resolve an object. If the object is a reference, dereference
+ * it and return the actual object in the SourceDescPtr.
*
******************************************************************************/
ACPI_STATUS
-AcpiAmlStoreObjectToNode (
- ACPI_OPERAND_OBJECT *ValDesc,
- ACPI_NAMESPACE_NODE *Node,
+AcpiAmlResolveObject (
+ ACPI_OPERAND_OBJECT **SourceDescPtr,
+ OBJECT_TYPE_INTERNAL TargetType,
ACPI_WALK_STATE *WalkState)
{
+ ACPI_OPERAND_OBJECT *SourceDesc = *SourceDescPtr;
ACPI_STATUS Status = AE_OK;
- UINT8 *Buffer = NULL;
- UINT32 Length = 0;
- UINT32 Mask;
- UINT32 NewValue;
- BOOLEAN Locked = FALSE;
- UINT8 *Location=NULL;
- ACPI_OPERAND_OBJECT *DestDesc;
- OBJECT_TYPE_INTERNAL DestinationType = ACPI_TYPE_ANY;
- FUNCTION_TRACE ("AmlStoreObjectToNte");
+ FUNCTION_TRACE ("AmlResolveObject");
- DEBUG_PRINT (ACPI_INFO,
- ("entered AcpiAmlStoreObjectToNode: NamedObj=%p, Obj=%p\n",
- Node, ValDesc));
/*
- * Assuming the parameters are valid!!!
+ * Ensure we have a Source that can be stored in the target
*/
- ACPI_ASSERT((Node) && (ValDesc));
-
- DestinationType = AcpiNsGetType (Node);
+ switch (TargetType)
+ {
- DEBUG_PRINT (ACPI_INFO, ("AmlStoreObjectToNte: Storing %s into %s\n",
- AcpiCmGetTypeName (ValDesc->Common.Type),
- AcpiCmGetTypeName (DestinationType)));
+ /* This case handles the "interchangeable" types Integer, String, and Buffer. */
/*
- * First ensure we have a value that can be stored in the target
+ * These cases all require only Integers or values that
+ * can be converted to Integers (Strings or Buffers)
*/
- switch (DestinationType)
- {
- /* Type of Name's existing value */
-
- case INTERNAL_TYPE_ALIAS:
-
- /*
- * Aliases are resolved by AcpiAmlPrepOperands
- */
-
- DEBUG_PRINT (ACPI_WARN,
- ("AmlStoreObjectToNte: Store into Alias - should never happen\n"));
- Status = AE_AML_INTERNAL;
- break;
-
-
+ case ACPI_TYPE_INTEGER:
+ case ACPI_TYPE_FIELD_UNIT:
case INTERNAL_TYPE_BANK_FIELD:
case INTERNAL_TYPE_INDEX_FIELD:
- case ACPI_TYPE_FIELD_UNIT:
- case ACPI_TYPE_NUMBER:
-
- /*
- * These cases all require only number values or values that
- * can be converted to numbers.
- *
- * If value is not a Number, try to resolve it to one.
- */
-
- if (ValDesc->Common.Type != ACPI_TYPE_NUMBER)
- {
- /*
- * Initially not a number, convert
- */
- Status = AcpiAmlResolveToValue (&ValDesc, WalkState);
- if (ACPI_SUCCESS (Status) &&
- (ValDesc->Common.Type != ACPI_TYPE_NUMBER))
- {
- /*
- * Conversion successful but still not a number
- */
- DEBUG_PRINT (ACPI_ERROR,
- ("AmlStoreObjectToNte: Value assigned to %s must be Number, not %s\n",
- AcpiCmGetTypeName (DestinationType),
- AcpiCmGetTypeName (ValDesc->Common.Type)));
- Status = AE_AML_OPERAND_TYPE;
- }
- }
-
- break;
+ /*
+ * Stores into a Field/Region or into a Buffer/String
+ * are all essentially the same.
+ */
case ACPI_TYPE_STRING:
case ACPI_TYPE_BUFFER:
case INTERNAL_TYPE_DEF_FIELD:
/*
- * Storing into a Field in a region or into a buffer or into
- * a string all is essentially the same.
- *
- * If value is not a valid type, try to resolve it to one.
+ * If SourceDesc is not a valid type, try to resolve it to one.
*/
-
- if ((ValDesc->Common.Type != ACPI_TYPE_NUMBER) &&
- (ValDesc->Common.Type != ACPI_TYPE_BUFFER) &&
- (ValDesc->Common.Type != ACPI_TYPE_STRING))
+ if ((SourceDesc->Common.Type != ACPI_TYPE_INTEGER) &&
+ (SourceDesc->Common.Type != ACPI_TYPE_BUFFER) &&
+ (SourceDesc->Common.Type != ACPI_TYPE_STRING))
{
/*
- * Initially not a valid type, convert
+ * Initially not a valid type, convert
*/
- Status = AcpiAmlResolveToValue (&ValDesc, WalkState);
+ Status = AcpiAmlResolveToValue (SourceDescPtr, WalkState);
if (ACPI_SUCCESS (Status) &&
- (ValDesc->Common.Type != ACPI_TYPE_NUMBER) &&
- (ValDesc->Common.Type != ACPI_TYPE_BUFFER) &&
- (ValDesc->Common.Type != ACPI_TYPE_STRING))
+ (SourceDesc->Common.Type != ACPI_TYPE_INTEGER) &&
+ (SourceDesc->Common.Type != ACPI_TYPE_BUFFER) &&
+ (SourceDesc->Common.Type != ACPI_TYPE_STRING))
{
/*
- * Conversion successful but still not a valid type
+ * Conversion successful but still not a valid type
*/
DEBUG_PRINT (ACPI_ERROR,
- ("AmlStoreObjectToNte: Assign wrong type %s to %s (must be type Num/Str/Buf)\n",
- AcpiCmGetTypeName (ValDesc->Common.Type),
- AcpiCmGetTypeName (DestinationType)));
+ ("AmlResolveObject: Cannot assign type %s to %s (must be type Int/Str/Buf)\n",
+ AcpiCmGetTypeName ((*SourceDescPtr)->Common.Type),
+ AcpiCmGetTypeName (TargetType)));
Status = AE_AML_OPERAND_TYPE;
}
}
break;
- case ACPI_TYPE_PACKAGE:
+ case INTERNAL_TYPE_ALIAS:
/*
- * TBD: [Unhandled] Not real sure what to do here
+ * Aliases are resolved by AcpiAmlPrepOperands
*/
- Status = AE_NOT_IMPLEMENTED;
+ DEBUG_PRINT (ACPI_WARN,
+ ("AmlResolveObject: Store into Alias - should never happen\n"));
+
+ Status = AE_AML_INTERNAL;
break;
+ case ACPI_TYPE_PACKAGE:
default:
/*
- * All other types than Alias and the various Fields come here.
- * Store ValDesc as the new value of the Name, and set
- * the Name's type to that of the value being stored in it.
- * ValDesc reference count is incremented by AttachObject.
+ * All other types than Alias and the various Fields come here,
+ * including the untyped case - ACPI_TYPE_ANY.
*/
+ break;
+ }
- Status = AcpiNsAttachObject (Node, ValDesc, ValDesc->Common.Type);
+ return_ACPI_STATUS (Status);
+}
- DEBUG_PRINT (ACPI_INFO,
- ("AmlStoreObjectToNte: Store %s into %s via Attach\n",
- AcpiCmGetTypeName (ValDesc->Common.Type),
- AcpiCmGetTypeName (DestinationType)));
- goto CleanUpAndBailOut;
- break;
- }
- /* Exit now if failure above */
- if (ACPI_FAILURE (Status))
- {
- goto CleanUpAndBailOut;
- }
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlStoreObject
+ *
+ * PARAMETERS: SourceDesc - Object to store
+ * TargetType - Current type of the target
+ * TargetDescPtr - Pointer to the target
+ * WalkState - Current walk state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: "Store" an object to another object. This may include
+ * converting the source type to the target type (implicit
+ * conversion), and a copy of the value of the source to
+ * the target.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlStoreObject (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ OBJECT_TYPE_INTERNAL TargetType,
+ ACPI_OPERAND_OBJECT **TargetDescPtr,
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_OPERAND_OBJECT *TargetDesc = *TargetDescPtr;
+ ACPI_STATUS Status;
+
+
+ FUNCTION_TRACE ("AmlStoreObject");
- /*
- * Get descriptor for object attached to Node
- */
- DestDesc = AcpiNsGetAttachedObject (Node);
- if (!DestDesc)
- {
- /*
- * There is no existing object attached to this Node
- */
- DEBUG_PRINT (ACPI_ERROR,
- ("AmlStoreObjectToNte: Internal error - no destination object for %4.4s type %X\n",
- &Node->Name, DestinationType));
- Status = AE_AML_INTERNAL;
- goto CleanUpAndBailOut;
- }
/*
- * Make sure the destination Object is the same as the Node
+ * Perform the "implicit conversion" of the source to the current type
+ * of the target - As per the ACPI specification.
+ *
+ * If no conversion performed, SourceDesc is left alone, otherwise it
+ * is updated with a new object.
*/
- if (DestDesc->Common.Type != (UINT8) DestinationType)
+ Status = AcpiAmlConvertToTargetType (TargetType, &SourceDesc, WalkState);
+ if (ACPI_FAILURE (Status))
{
- DEBUG_PRINT (ACPI_ERROR,
- ("AmlStoreObjectToNte: Internal error - Name %4.4s type %X does not match value-type %X at %p\n",
- &Node->Name, AcpiNsGetType (Node),
- DestDesc->Common.Type, DestDesc));
- Status = AE_AML_INTERNAL;
- goto CleanUpAndBailOut;
+ return_ACPI_STATUS (Status);
}
+
/*
- * AcpiEverything is ready to execute now, We have
- * a value we can handle, just perform the update
+ * We now have two objects of identical types, and we can perform a
+ * copy of the *value* of the source object.
*/
-
- switch (DestinationType)
+ switch (TargetType)
{
- /* Type of Name's existing value */
-
- case INTERNAL_TYPE_BANK_FIELD:
-
- /*
- * Get the global lock if needed
- */
- Locked = AcpiAmlAcquireGlobalLock (DestDesc->BankField.LockRule);
-
- /*
- * Set Bank value to select proper Bank
- * Perform the update (Set Bank Select)
+ case ACPI_TYPE_ANY:
+ case INTERNAL_TYPE_DEF_ANY:
+
+ /*
+ * The target namespace node is uninitialized (has no target object),
+ * and will take on the type of the source object
*/
- Status = AcpiAmlAccessNamedField (ACPI_WRITE,
- DestDesc->BankField.BankSelect,
- &DestDesc->BankField.Value,
- sizeof (DestDesc->BankField.Value));
- if (ACPI_SUCCESS (Status))
- {
- /* Set bank select successful, set data value */
-
- Status = AcpiAmlAccessNamedField (ACPI_WRITE,
- DestDesc->BankField.BankSelect,
- &ValDesc->BankField.Value,
- sizeof (ValDesc->BankField.Value));
- }
-
+ *TargetDescPtr = SourceDesc;
break;
- case INTERNAL_TYPE_DEF_FIELD:
-
- /*
- * Get the global lock if needed
- */
- Locked = AcpiAmlAcquireGlobalLock (ValDesc->Field.LockRule);
-
- /*
- * Perform the update
- */
-
- switch (ValDesc->Common.Type)
- {
- case ACPI_TYPE_NUMBER:
- Buffer = (UINT8 *) &ValDesc->Number.Value;
- Length = sizeof (ValDesc->Number.Value);
- break;
-
- case ACPI_TYPE_BUFFER:
- Buffer = (UINT8 *) ValDesc->Buffer.Pointer;
- Length = ValDesc->Buffer.Length;
- break;
-
- case ACPI_TYPE_STRING:
- Buffer = (UINT8 *) ValDesc->String.Pointer;
- Length = ValDesc->String.Length;
- break;
- }
-
- Status = AcpiAmlAccessNamedField (ACPI_WRITE,
- Node, Buffer, Length);
+ case ACPI_TYPE_INTEGER:
- break; /* Global Lock released below */
+ TargetDesc->Integer.Value = SourceDesc->Integer.Value;
+ /* Truncate value if we are executing from a 32-bit ACPI table */
- case ACPI_TYPE_STRING:
-
- /*
- * Perform the update
- */
-
- switch (ValDesc->Common.Type)
- {
- case ACPI_TYPE_NUMBER:
- Buffer = (UINT8 *) &ValDesc->Number.Value;
- Length = sizeof (ValDesc->Number.Value);
- break;
-
- case ACPI_TYPE_BUFFER:
- Buffer = (UINT8 *) ValDesc->Buffer.Pointer;
- Length = ValDesc->Buffer.Length;
- break;
-
- case ACPI_TYPE_STRING:
- Buffer = (UINT8 *) ValDesc->String.Pointer;
- Length = ValDesc->String.Length;
- break;
- }
-
- /*
- * Setting a string value replaces the old string
- */
-
- if (Length < DestDesc->String.Length)
- {
- /*
- * Zero fill, not willing to do pointer arithmetic for
- * archetecture independance. Just clear the whole thing
- */
- MEMSET(DestDesc->String.Pointer, 0, DestDesc->String.Length);
- MEMCPY(DestDesc->String.Pointer, Buffer, Length);
- }
- else
- {
- /*
- * Free the current buffer, then allocate a buffer
- * large enough to hold the value
- */
- if ( DestDesc->String.Pointer &&
- !AcpiTbSystemTablePointer (DestDesc->String.Pointer))
- {
- /*
- * Only free if not a pointer into the DSDT
- */
-
- AcpiCmFree(DestDesc->String.Pointer);
- }
+ AcpiAmlTruncateFor32bitTable (TargetDesc, WalkState);
+ break;
- DestDesc->String.Pointer = AcpiCmAllocate (Length + 1);
- DestDesc->String.Length = Length;
- if (!DestDesc->String.Pointer)
- {
- Status = AE_NO_MEMORY;
- goto CleanUpAndBailOut;
- }
+ case ACPI_TYPE_FIELD_UNIT:
- MEMCPY(DestDesc->String.Pointer, Buffer, Length);
- }
+ Status = AcpiAmlCopyIntegerToFieldUnit (SourceDesc, TargetDesc);
break;
- case ACPI_TYPE_BUFFER:
-
- /*
- * Perform the update to the buffer
- */
-
- switch (ValDesc->Common.Type)
- {
- case ACPI_TYPE_NUMBER:
- Buffer = (UINT8 *) &ValDesc->Number.Value;
- Length = sizeof (ValDesc->Number.Value);
- break;
-
- case ACPI_TYPE_BUFFER:
- Buffer = (UINT8 *) ValDesc->Buffer.Pointer;
- Length = ValDesc->Buffer.Length;
- break;
-
- case ACPI_TYPE_STRING:
- Buffer = (UINT8 *) ValDesc->String.Pointer;
- Length = ValDesc->String.Length;
- break;
- }
+ case INTERNAL_TYPE_BANK_FIELD:
- /*
- * Buffer is a static allocation,
- * only place what will fit in the buffer.
- */
- if (Length <= DestDesc->Buffer.Length)
- {
- /*
- * Zero fill first, not willing to do pointer arithmetic for
- * archetecture independence. Just clear the whole thing
- */
- MEMSET(DestDesc->Buffer.Pointer, 0, DestDesc->Buffer.Length);
- MEMCPY(DestDesc->Buffer.Pointer, Buffer, Length);
- }
- else
- {
- /*
- * truncate, copy only what will fit
- */
- MEMCPY(DestDesc->Buffer.Pointer, Buffer, DestDesc->Buffer.Length);
- DEBUG_PRINT (ACPI_INFO,
- ("AmlStoreObjectToNte: Truncating src buffer from %X to %X\n",
- Length, DestDesc->Buffer.Length));
- }
+ Status = AcpiAmlCopyIntegerToBankField (SourceDesc, TargetDesc);
break;
case INTERNAL_TYPE_INDEX_FIELD:
- /*
- * Get the global lock if needed
- */
- Locked = AcpiAmlAcquireGlobalLock (DestDesc->IndexField.LockRule);
-
- /*
- * Set Index value to select proper Data register
- * perform the update (Set index)
- */
-
- Status = AcpiAmlAccessNamedField (ACPI_WRITE,
- DestDesc->IndexField.Index,
- &DestDesc->IndexField.Value,
- sizeof (DestDesc->IndexField.Value));
-
- DEBUG_PRINT (ACPI_INFO,
- ("AmlStoreObjectToNte: IndexField: set index returned %s\n",
- AcpiCmFormatException (Status)));
-
- if (ACPI_SUCCESS (Status))
- {
- /* set index successful, next set Data value */
-
- Status = AcpiAmlAccessNamedField (ACPI_WRITE,
- DestDesc->IndexField.Data,
- &ValDesc->Number.Value,
- sizeof (ValDesc->Number.Value));
- DEBUG_PRINT (ACPI_INFO,
- ("AmlStoreObjectToNte: IndexField: set data returned %s\n",
- AcpiCmFormatException (Status)));
- }
+ Status = AcpiAmlCopyIntegerToIndexField (SourceDesc, TargetDesc);
break;
- case ACPI_TYPE_FIELD_UNIT:
-
-
- /*
- * If the Field Buffer and Index have not been previously evaluated,
- * evaluate them and save the results.
- */
- if (!(DestDesc->Common.Flags & AOPOBJ_DATA_VALID))
- {
- Status = AcpiDsGetFieldUnitArguments (DestDesc);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
- }
-
- if ((!DestDesc->FieldUnit.Container ||
- ACPI_TYPE_BUFFER != DestDesc->FieldUnit.Container->Common.Type))
- {
- DUMP_PATHNAME (Node,
- "AmlStoreObjectToNte: FieldUnit: Bad container in ",
- ACPI_ERROR, _COMPONENT);
- DUMP_ENTRY (Node, ACPI_ERROR);
- DEBUG_PRINT (ACPI_ERROR,
- ("Container: %p", DestDesc->FieldUnit.Container));
-
- if (DestDesc->FieldUnit.Container)
- {
- DEBUG_PRINT_RAW (ACPI_ERROR, (" Type %X",
- DestDesc->FieldUnit.Container->Common.Type));
- }
- DEBUG_PRINT_RAW (ACPI_ERROR, ("\n"));
-
- Status = AE_AML_INTERNAL;
- goto CleanUpAndBailOut;
- }
-
- /*
- * Get the global lock if needed
- */
- Locked = AcpiAmlAcquireGlobalLock (DestDesc->FieldUnit.LockRule);
-
- /*
- * TBD: [Unhandled] REMOVE this limitation
- * Make sure the operation is within the limits of our implementation
- * this is not a Spec limitation!!
- */
- if (DestDesc->FieldUnit.Length + DestDesc->FieldUnit.BitOffset > 32)
- {
- DEBUG_PRINT (ACPI_ERROR,
- ("AmlStoreObjectToNte: FieldUnit: Implementation limitation - Field exceeds UINT32\n"));
- Status = AE_NOT_IMPLEMENTED;
- goto CleanUpAndBailOut;
- }
-
- /* Field location is (base of buffer) + (byte offset) */
-
- Location = DestDesc->FieldUnit.Container->Buffer.Pointer
- + DestDesc->FieldUnit.Offset;
-
- /*
- * Construct Mask with 1 bits where the field is,
- * 0 bits elsewhere
- */
- Mask = ((UINT32) 1 << DestDesc->FieldUnit.Length) - ((UINT32)1
- << DestDesc->FieldUnit.BitOffset);
-
- DEBUG_PRINT (TRACE_EXEC,
- ("** Store %lx in buffer %p byte %ld bit %X width %d addr %p mask %08lx\n",
- ValDesc->Number.Value,
- DestDesc->FieldUnit.Container->Buffer.Pointer,
- DestDesc->FieldUnit.Offset, DestDesc->FieldUnit.BitOffset,
- DestDesc->FieldUnit.Length,Location, Mask));
-
- /* Zero out the field in the buffer */
-
- MOVE_UNALIGNED32_TO_32 (&NewValue, Location);
- NewValue &= ~Mask;
-
- /*
- * Shift and mask the new value into position,
- * and or it into the buffer.
- */
- NewValue |= (ValDesc->Number.Value << DestDesc->FieldUnit.BitOffset) &
- Mask;
-
- /* Store back the value */
-
- MOVE_UNALIGNED32_TO_32 (Location, &NewValue);
+ case ACPI_TYPE_STRING:
- DEBUG_PRINT (TRACE_EXEC, ("New Field value %08lx\n", NewValue));
+ Status = AcpiAmlCopyStringToString (SourceDesc, TargetDesc);
break;
- case ACPI_TYPE_NUMBER:
-
-
- DestDesc->Number.Value = ValDesc->Number.Value;
-
- /* Truncate value if we are executing from a 32-bit ACPI table */
+ case ACPI_TYPE_BUFFER:
- AcpiAmlTruncateFor32bitTable (DestDesc, WalkState);
+ Status = AcpiAmlCopyBufferToBuffer (SourceDesc, TargetDesc);
break;
case ACPI_TYPE_PACKAGE:
/*
- * TBD: [Unhandled] Not real sure what to do here
+ * TBD: [Unhandled] Not real sure what to do here
*/
Status = AE_NOT_IMPLEMENTED;
break;
@@ -690,28 +359,17 @@ AcpiAmlStoreObjectToNode (
default:
/*
- * All other types than Alias and the various Fields come here.
- * Store ValDesc as the new value of the Name, and set
- * the Name's type to that of the value being stored in it.
- * ValDesc reference count is incremented by AttachObject.
+ * All other types come here.
*/
-
DEBUG_PRINT (ACPI_WARN,
- ("AmlStoreObjectToNte: Store into %s not implemented\n",
- AcpiCmGetTypeName (AcpiNsGetType (Node))));
+ ("AmlStoreObject: Store into type %s not implemented\n",
+ AcpiCmGetTypeName (TargetType)));
Status = AE_NOT_IMPLEMENTED;
break;
}
-CleanUpAndBailOut:
-
- /*
- * Release global lock if we acquired it earlier
- */
- AcpiAmlReleaseGlobalLock (Locked);
-
return_ACPI_STATUS (Status);
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amstorob.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amstorob.c
index 675288b..0825891 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amstorob.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amstorob.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amstorob - AML Interpreter object store support, store to object
- * $Revision: 19 $
+ * $Revision: 22 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -130,317 +130,452 @@
MODULE_NAME ("amstorob")
+
/*******************************************************************************
*
- * FUNCTION: AcpiAmlStoreObjectToObject
+ * FUNCTION: AcpiAmlCopyBufferToBuffer
*
- * PARAMETERS: *ValDesc - Value to be stored
- * *DestDesc - Object to receive the value
+ * PARAMETERS: SourceDesc - Source object to copy
+ * TargetDesc - Destination object of the copy
*
* RETURN: Status
*
- * DESCRIPTION: Store an object to another object.
+ * DESCRIPTION: Copy a buffer object to another buffer object.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlCopyBufferToBuffer (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *TargetDesc)
+{
+ UINT32 Length;
+ UINT8 *Buffer;
+
+
+ /*
+ * We know that SourceDesc is a buffer by now
+ */
+ Buffer = (UINT8 *) SourceDesc->Buffer.Pointer;
+ Length = SourceDesc->Buffer.Length;
+
+ /*
+ * Buffer is a static allocation,
+ * only place what will fit in the buffer.
+ */
+ if (Length <= TargetDesc->Buffer.Length)
+ {
+ /* Clear existing buffer and copy in the new one */
+
+ MEMSET(TargetDesc->Buffer.Pointer, 0, TargetDesc->Buffer.Length);
+ MEMCPY(TargetDesc->Buffer.Pointer, Buffer, Length);
+ }
+
+ else
+ {
+ /*
+ * Truncate the source, copy only what will fit
+ */
+ MEMCPY(TargetDesc->Buffer.Pointer, Buffer, TargetDesc->Buffer.Length);
+
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlStoreObjectToNode: Truncating src buffer from %X to %X\n",
+ Length, TargetDesc->Buffer.Length));
+ }
+
+ return (AE_OK);
+}
+
+
+
+
+/*******************************************************************************
*
- * The Assignment of an object to another (not named) object
- * is handled here.
- * The val passed in will replace the current value (if any)
- * with the input value.
+ * FUNCTION: AcpiAmlCopyStringToString
*
- * When storing into an object the data is converted to the
- * target object type then stored in the object. This means
- * that the target object type (for an initialized target) will
- * not be changed by a store operation.
+ * PARAMETERS: SourceDesc - Source object to copy
+ * TargetDesc - Destination object of the copy
*
- * This module allows destination types of Number, String,
- * and Buffer.
+ * RETURN: Status
+ *
+ * DESCRIPTION: Copy a String object to another String object
*
******************************************************************************/
ACPI_STATUS
-AcpiAmlStoreObjectToObject (
- ACPI_OPERAND_OBJECT *ValDesc,
- ACPI_OPERAND_OBJECT *DestDesc,
- ACPI_WALK_STATE *WalkState)
+AcpiAmlCopyStringToString (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *TargetDesc)
{
- ACPI_STATUS Status = AE_OK;
- UINT8 *Buffer = NULL;
- UINT32 Length = 0;
- OBJECT_TYPE_INTERNAL DestinationType = DestDesc->Common.Type;
-
-
- FUNCTION_TRACE ("AmlStoreObjectToObject");
+ UINT32 Length;
+ UINT8 *Buffer;
- DEBUG_PRINT (ACPI_INFO,
- ("entered AcpiAmlStoreObjectToObject: Dest=%p, Val=%p\n",
- DestDesc, ValDesc));
/*
- * Assuming the parameters are valid!!!
+ * We know that SourceDesc is a string by now.
*/
- ACPI_ASSERT((DestDesc) && (ValDesc));
-
- DEBUG_PRINT (ACPI_INFO, ("AmlStoreObjectToObject: Storing %s into %s\n",
- AcpiCmGetTypeName (ValDesc->Common.Type),
- AcpiCmGetTypeName (DestDesc->Common.Type)));
+ Buffer = (UINT8 *) SourceDesc->String.Pointer;
+ Length = SourceDesc->String.Length;
/*
- * First ensure we have a value that can be stored in the target
+ * Setting a string value replaces the old string
*/
- switch (DestinationType)
+ if (Length < TargetDesc->String.Length)
{
- /* Type of Name's existing value */
+ /* Clear old string and copy in the new one */
- case ACPI_TYPE_NUMBER:
+ MEMSET(TargetDesc->String.Pointer, 0, TargetDesc->String.Length);
+ MEMCPY(TargetDesc->String.Pointer, Buffer, Length);
+ }
+ else
+ {
/*
- * These cases all require only number values or values that
- * can be converted to numbers.
- *
- * If value is not a Number, try to resolve it to one.
+ * Free the current buffer, then allocate a buffer
+ * large enough to hold the value
*/
-
- if (ValDesc->Common.Type != ACPI_TYPE_NUMBER)
+ if (TargetDesc->String.Pointer &&
+ !AcpiTbSystemTablePointer (TargetDesc->String.Pointer))
{
/*
- * Initially not a number, convert
+ * Only free if not a pointer into the DSDT
*/
- Status = AcpiAmlResolveToValue (&ValDesc, WalkState);
- if (ACPI_SUCCESS (Status) &&
- (ValDesc->Common.Type != ACPI_TYPE_NUMBER))
- {
- /*
- * Conversion successful but still not a number
- */
- DEBUG_PRINT (ACPI_ERROR,
- ("AmlStoreObjectToObject: Value assigned to %s must be Number, not %s\n",
- AcpiCmGetTypeName (DestinationType),
- AcpiCmGetTypeName (ValDesc->Common.Type)));
- Status = AE_AML_OPERAND_TYPE;
- }
+ AcpiCmFree(TargetDesc->String.Pointer);
}
- break;
+ TargetDesc->String.Pointer = AcpiCmAllocate (Length + 1);
+ TargetDesc->String.Length = Length;
- case ACPI_TYPE_STRING:
- case ACPI_TYPE_BUFFER:
-
- /*
- * Storing into a Field in a region or into a buffer or into
- * a string all is essentially the same.
- *
- * If value is not a valid type, try to resolve it to one.
- */
-
- if ((ValDesc->Common.Type != ACPI_TYPE_NUMBER) &&
- (ValDesc->Common.Type != ACPI_TYPE_BUFFER) &&
- (ValDesc->Common.Type != ACPI_TYPE_STRING))
+ if (!TargetDesc->String.Pointer)
{
- /*
- * Initially not a valid type, convert
- */
- Status = AcpiAmlResolveToValue (&ValDesc, WalkState);
- if (ACPI_SUCCESS (Status) &&
- (ValDesc->Common.Type != ACPI_TYPE_NUMBER) &&
- (ValDesc->Common.Type != ACPI_TYPE_BUFFER) &&
- (ValDesc->Common.Type != ACPI_TYPE_STRING))
- {
- /*
- * Conversion successful but still not a valid type
- */
- DEBUG_PRINT (ACPI_ERROR,
- ("AmlStoreObjectToObject: Assign wrong type %s to %s (must be type Num/Str/Buf)\n",
- AcpiCmGetTypeName (ValDesc->Common.Type),
- AcpiCmGetTypeName (DestinationType)));
- Status = AE_AML_OPERAND_TYPE;
- }
+ return (AE_NO_MEMORY);
}
- break;
+ MEMCPY(TargetDesc->String.Pointer, Buffer, Length);
+ }
- default:
+ return (AE_OK);
+}
- /*
- * TBD: [Unhandled] What other combinations must be implemented?
- */
- Status = AE_NOT_IMPLEMENTED;
- break;
+
+
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlCopyIntegerToIndexField
+ *
+ * PARAMETERS: SourceDesc - Source object to copy
+ * TargetDesc - Destination object of the copy
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Write an Integer to an Index Field
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlCopyIntegerToIndexField (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *TargetDesc)
+{
+ ACPI_STATUS Status;
+ BOOLEAN Locked;
+
+
+ /*
+ * Get the global lock if needed
+ */
+ Locked = AcpiAmlAcquireGlobalLock (TargetDesc->IndexField.LockRule);
+
+ /*
+ * Set Index value to select proper Data register
+ * perform the update (Set index)
+ */
+ Status = AcpiAmlAccessNamedField (ACPI_WRITE,
+ TargetDesc->IndexField.Index,
+ &TargetDesc->IndexField.Value,
+ sizeof (TargetDesc->IndexField.Value));
+ if (ACPI_SUCCESS (Status))
+ {
+ /* SetIndex was successful, next set Data value */
+
+ Status = AcpiAmlAccessNamedField (ACPI_WRITE,
+ TargetDesc->IndexField.Data,
+ &SourceDesc->Integer.Value,
+ sizeof (SourceDesc->Integer.Value));
+
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlStoreObjectToNode: IndexField: set data returned %s\n",
+ AcpiCmFormatException (Status)));
+ }
+
+ else
+ {
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlStoreObjectToNode: IndexField: set index returned %s\n",
+ AcpiCmFormatException (Status)));
}
- /* Exit now if failure above */
- if (ACPI_FAILURE (Status))
+ /*
+ * Release global lock if we acquired it earlier
+ */
+ AcpiAmlReleaseGlobalLock (Locked);
+
+ return (Status);
+}
+
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlCopyIntegerToBankField
+ *
+ * PARAMETERS: SourceDesc - Source object to copy
+ * TargetDesc - Destination object of the copy
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Write an Integer to a Bank Field
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlCopyIntegerToBankField (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *TargetDesc)
+{
+ ACPI_STATUS Status;
+ BOOLEAN Locked;
+
+
+ /*
+ * Get the global lock if needed
+ */
+ Locked = AcpiAmlAcquireGlobalLock (TargetDesc->IndexField.LockRule);
+
+
+
+ /*
+ * Set Bank value to select proper Bank
+ * Perform the update (Set Bank Select)
+ */
+
+ Status = AcpiAmlAccessNamedField (ACPI_WRITE,
+ TargetDesc->BankField.BankSelect,
+ &TargetDesc->BankField.Value,
+ sizeof (TargetDesc->BankField.Value));
+ if (ACPI_SUCCESS (Status))
+ {
+ /* Set bank select successful, set data value */
+
+ Status = AcpiAmlAccessNamedField (ACPI_WRITE,
+ TargetDesc->BankField.BankSelect,
+ &SourceDesc->BankField.Value,
+ sizeof (SourceDesc->BankField.Value));
+ }
+
+ else
{
- goto CleanUpAndBailOut;
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlStoreObjectToNode: BankField: set bakn returned %s\n",
+ AcpiCmFormatException (Status)));
}
+
/*
- * AcpiEverything is ready to execute now, We have
- * a value we can handle, just perform the update
+ * Release global lock if we acquired it earlier
*/
+ AcpiAmlReleaseGlobalLock (Locked);
+
+ return (Status);
+}
+
+
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlCopyDataToNamedField
+ *
+ * PARAMETERS: SourceDesc - Source object to copy
+ * Node - Destination Namespace node
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Copy raw data to a Named Field. No implicit conversion
+ * is performed on the source object
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlCopyDataToNamedField (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_NAMESPACE_NODE *Node)
+{
+ ACPI_STATUS Status;
+ BOOLEAN Locked;
+ UINT32 Length;
+ UINT8 *Buffer;
+
- switch (DestinationType)
+ /*
+ * Named fields (CreateXxxField) - We don't perform any conversions on the
+ * source operand, just use the raw data
+ */
+ switch (SourceDesc->Common.Type)
{
+ case ACPI_TYPE_INTEGER:
+ Buffer = (UINT8 *) &SourceDesc->Integer.Value;
+ Length = sizeof (SourceDesc->Integer.Value);
+ break;
+
+ case ACPI_TYPE_BUFFER:
+ Buffer = (UINT8 *) SourceDesc->Buffer.Pointer;
+ Length = SourceDesc->Buffer.Length;
+ break;
case ACPI_TYPE_STRING:
+ Buffer = (UINT8 *) SourceDesc->String.Pointer;
+ Length = SourceDesc->String.Length;
+ break;
- /*
- * Perform the update
- */
+ default:
+ return (AE_TYPE);
+ }
- switch (ValDesc->Common.Type)
- {
- case ACPI_TYPE_NUMBER:
- Buffer = (UINT8 *) &ValDesc->Number.Value;
- Length = sizeof (ValDesc->Number.Value);
- break;
-
- case ACPI_TYPE_BUFFER:
- Buffer = (UINT8 *) ValDesc->Buffer.Pointer;
- Length = ValDesc->Buffer.Length;
- break;
-
- case ACPI_TYPE_STRING:
- Buffer = (UINT8 *) ValDesc->String.Pointer;
- Length = ValDesc->String.Length;
- break;
- }
+ /*
+ * Get the global lock if needed before the update
+ * TBD: not needed!
+ */
+ Locked = AcpiAmlAcquireGlobalLock (SourceDesc->Field.LockRule);
- /*
- * Setting a string value replaces the old string
- */
+ Status = AcpiAmlAccessNamedField (ACPI_WRITE,
+ Node, Buffer, Length);
- if (Length < DestDesc->String.Length)
- {
- /*
- * Zero fill, not willing to do pointer arithmetic for
- * architecture independence. Just clear the whole thing
- */
- MEMSET(DestDesc->String.Pointer, 0, DestDesc->String.Length);
- MEMCPY(DestDesc->String.Pointer, Buffer, Length);
- }
- else
- {
- /*
- * Free the current buffer, then allocate a buffer
- * large enough to hold the value
- */
- if ( DestDesc->String.Pointer &&
- !AcpiTbSystemTablePointer (DestDesc->String.Pointer))
- {
- /*
- * Only free if not a pointer into the DSDT
- */
-
- AcpiCmFree(DestDesc->String.Pointer);
- }
-
- DestDesc->String.Pointer = AcpiCmAllocate (Length + 1);
- DestDesc->String.Length = Length;
-
- if (!DestDesc->String.Pointer)
- {
- Status = AE_NO_MEMORY;
- goto CleanUpAndBailOut;
- }
-
- MEMCPY(DestDesc->String.Pointer, Buffer, Length);
- }
- break;
+ AcpiAmlReleaseGlobalLock (Locked);
+ return (Status);
+}
- case ACPI_TYPE_BUFFER:
- /*
- * Perform the update to the buffer
- */
- switch (ValDesc->Common.Type)
- {
- case ACPI_TYPE_NUMBER:
- Buffer = (UINT8 *) &ValDesc->Number.Value;
- Length = sizeof (ValDesc->Number.Value);
- break;
-
- case ACPI_TYPE_BUFFER:
- Buffer = (UINT8 *) ValDesc->Buffer.Pointer;
- Length = ValDesc->Buffer.Length;
- break;
-
- case ACPI_TYPE_STRING:
- Buffer = (UINT8 *) ValDesc->String.Pointer;
- Length = ValDesc->String.Length;
- break;
- }
- /*
- * If the buffer is uninitialized,
- * memory needs to be allocated for the copy.
- */
- if(0 == DestDesc->Buffer.Length)
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlCopyIntegerToFieldUnit
+ *
+ * PARAMETERS: SourceDesc - Source object to copy
+ * TargetDesc - Destination object of the copy
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Write an Integer to a Field Unit.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlCopyIntegerToFieldUnit (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *TargetDesc)
+{
+ ACPI_STATUS Status = AE_OK;
+ UINT8 *Location = NULL;
+ UINT32 Mask;
+ UINT32 NewValue;
+ BOOLEAN Locked = FALSE;
+
+
+
+ FUNCTION_TRACE ("AmlCopyIntegerToFieldUnit");
+
+ /*
+ * If the Field Buffer and Index have not been previously evaluated,
+ * evaluate them and save the results.
+ */
+ if (!(TargetDesc->Common.Flags & AOPOBJ_DATA_VALID))
+ {
+ Status = AcpiDsGetFieldUnitArguments (TargetDesc);
+ if (ACPI_FAILURE (Status))
{
- DestDesc->Buffer.Pointer = AcpiCmCallocate(Length);
- DestDesc->Buffer.Length = Length;
-
- if (!DestDesc->Buffer.Pointer)
- {
- Status = AE_NO_MEMORY;
- goto CleanUpAndBailOut;
- }
+ return_ACPI_STATUS (Status);
}
+ }
- /*
- * Buffer is a static allocation,
- * only place what will fit in the buffer.
- */
- if (Length <= DestDesc->Buffer.Length)
+ if ((!TargetDesc->FieldUnit.Container ||
+ ACPI_TYPE_BUFFER != TargetDesc->FieldUnit.Container->Common.Type))
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("Null Container or wrong type: %p", TargetDesc->FieldUnit.Container));
+
+ if (TargetDesc->FieldUnit.Container)
{
- /*
- * Zero fill first, not willing to do pointer arithmetic for
- * architecture independence. Just clear the whole thing
- */
- MEMSET(DestDesc->Buffer.Pointer, 0, DestDesc->Buffer.Length);
- MEMCPY(DestDesc->Buffer.Pointer, Buffer, Length);
+ DEBUG_PRINT_RAW (ACPI_ERROR, (" Type %X",
+ TargetDesc->FieldUnit.Container->Common.Type));
}
- else
- {
- /*
- * truncate, copy only what will fit
- */
- MEMCPY(DestDesc->Buffer.Pointer, Buffer, DestDesc->Buffer.Length);
- DEBUG_PRINT (ACPI_INFO,
- ("AmlStoreObjectToObject: Truncating src buffer from %X to %X\n",
- Length, DestDesc->Buffer.Length));
- }
- break;
+ DEBUG_PRINT_RAW (ACPI_ERROR, ("\n"));
- case ACPI_TYPE_NUMBER:
+ return_ACPI_STATUS (AE_AML_INTERNAL);
+ }
- DestDesc->Number.Value = ValDesc->Number.Value;
+ /*
+ * Get the global lock if needed
+ */
+ Locked = AcpiAmlAcquireGlobalLock (TargetDesc->FieldUnit.LockRule);
- /* Truncate value if we are executing from a 32-bit ACPI table */
+ /*
+ * TBD: [Unhandled] REMOVE this limitation
+ * Make sure the operation is within the limits of our implementation
+ * this is not a Spec limitation!!
+ */
+ if (TargetDesc->FieldUnit.Length + TargetDesc->FieldUnit.BitOffset > 32)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("AmlCopyIntegerToFieldUnit: FieldUnit: Implementation limitation - Field exceeds UINT32\n"));
+ return_ACPI_STATUS (AE_NOT_IMPLEMENTED);
+ }
- AcpiAmlTruncateFor32bitTable (DestDesc, WalkState);
- break;
+ /* Field location is (base of buffer) + (byte offset) */
- default:
+ Location = TargetDesc->FieldUnit.Container->Buffer.Pointer
+ + TargetDesc->FieldUnit.Offset;
- /*
- * All other types than Alias and the various Fields come here.
- * Store ValDesc as the new value of the Name, and set
- * the Name's type to that of the value being stored in it.
- * ValDesc reference count is incremented by AttachObject.
- */
+ /*
+ * Construct Mask with 1 bits where the field is,
+ * 0 bits elsewhere
+ */
+ Mask = ((UINT32) 1 << TargetDesc->FieldUnit.Length) - ((UINT32)1
+ << TargetDesc->FieldUnit.BitOffset);
- DEBUG_PRINT (ACPI_WARN,
- ("AmlStoreObjectToObject: Store into %s not implemented\n",
- AcpiCmGetTypeName (DestDesc->Common.Type)));
+ DEBUG_PRINT (TRACE_EXEC,
+ ("** Store %lx in buffer %p byte %ld bit %X width %d addr %p mask %08lx\n",
+ SourceDesc->Integer.Value,
+ TargetDesc->FieldUnit.Container->Buffer.Pointer,
+ TargetDesc->FieldUnit.Offset, TargetDesc->FieldUnit.BitOffset,
+ TargetDesc->FieldUnit.Length,Location, Mask));
- Status = AE_NOT_IMPLEMENTED;
- break;
- }
+ /* Zero out the field in the buffer */
-CleanUpAndBailOut:
+ MOVE_UNALIGNED32_TO_32 (&NewValue, Location);
+ NewValue &= ~Mask;
+
+ /*
+ * Shift and mask the new value into position,
+ * and or it into the buffer.
+ */
+ NewValue |= (SourceDesc->Integer.Value << TargetDesc->FieldUnit.BitOffset) &
+ Mask;
- return_ACPI_STATUS (Status);
+ /* Store back the value */
+
+ MOVE_UNALIGNED32_TO_32 (Location, &NewValue);
+
+ DEBUG_PRINT (TRACE_EXEC, ("New Field value %08lx\n", NewValue));
+ return_ACPI_STATUS (AE_OK);
}
+
+
+
+
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amsystem.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amsystem.c
index d7b5fd8..e1f64ea 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amsystem.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amsystem.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amsystem - Interface to OS services
- * $Revision: 53 $
+ * $Revision: 54 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -307,7 +307,7 @@ AcpiAmlSystemAcquireMutex (
}
Status = AcpiAmlSystemWaitSemaphore (ObjDesc->Mutex.Semaphore,
- (UINT32) TimeDesc->Number.Value);
+ (UINT32) TimeDesc->Integer.Value);
return_ACPI_STATUS (Status);
}
@@ -417,7 +417,7 @@ AcpiAmlSystemWaitEvent (
if (ObjDesc)
{
Status = AcpiAmlSystemWaitSemaphore (ObjDesc->Event.Semaphore,
- (UINT32) TimeDesc->Number.Value);
+ (UINT32) TimeDesc->Integer.Value);
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amutils.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amutils.c
index f009e02..e106bfb 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amutils.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amutils.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amutils - interpreter/scanner utilities
- * $Revision: 66 $
+ * $Revision: 68 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -138,14 +138,11 @@ typedef struct Internal_Search_st
/* Used to traverse nested packages when copying*/
+/* TBD: This must be removed! */
INTERNAL_PKG_SEARCH_INFO CopyLevel[MAX_PACKAGE_DEPTH];
-static NATIVE_CHAR hex[] =
- {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
-
-
/*******************************************************************************
*
* FUNCTION: AcpiAmlEnterInterpreter
@@ -252,7 +249,7 @@ AcpiAmlTruncateFor32bitTable (
*/
if ((!ObjDesc) ||
- (ObjDesc->Common.Type != ACPI_TYPE_NUMBER) ||
+ (ObjDesc->Common.Type != ACPI_TYPE_INTEGER) ||
(!WalkState->MethodNode))
{
return;
@@ -264,7 +261,7 @@ AcpiAmlTruncateFor32bitTable (
* We are running a method that exists in a 32-bit ACPI table.
* Truncate the value to 32 bits by zeroing out the upper 32-bit field
*/
- ObjDesc->Number.Value &= (ACPI_INTEGER) ACPI_UINT32_MAX;
+ ObjDesc->Integer.Value &= (ACPI_INTEGER) ACPI_UINT32_MAX;
}
}
@@ -463,10 +460,10 @@ AcpiAmlEisaIdToString (
OutString[0] = (char) ('@' + ((id >> 26) & 0x1f));
OutString[1] = (char) ('@' + ((id >> 21) & 0x1f));
OutString[2] = (char) ('@' + ((id >> 16) & 0x1f));
- OutString[3] = hex[(id >> 12) & 0xf];
- OutString[4] = hex[(id >> 8) & 0xf];
- OutString[5] = hex[(id >> 4) & 0xf];
- OutString[6] = hex[id & 0xf];
+ OutString[3] = AcpiGbl_HexToAscii[(id >> 12) & 0xf];
+ OutString[4] = AcpiGbl_HexToAscii[(id >> 8) & 0xf];
+ OutString[5] = AcpiGbl_HexToAscii[(id >> 4) & 0xf];
+ OutString[6] = AcpiGbl_HexToAscii[id & 0xf];
OutString[7] = 0;
return (AE_OK);
diff --git a/sys/contrib/dev/acpica/Subsystem/Interpreter/amxface.c b/sys/contrib/dev/acpica/Subsystem/Interpreter/amxface.c
index 5149403..960677e 100644
--- a/sys/contrib/dev/acpica/Subsystem/Interpreter/amxface.c
+++ b/sys/contrib/dev/acpica/Subsystem/Interpreter/amxface.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amxface - External interpreter interfaces
- * $Revision: 23 $
+ * $Revision: 24 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nsaccess.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nsaccess.c
index f5aa99a..47e7785 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nsaccess.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nsaccess.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nsaccess - Top-level functions for accessing ACPI namespace
- * $Revision: 116 $
+ * $Revision: 119 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -225,9 +225,9 @@ AcpiNsRootInitialize (void)
switch (InitVal->Type)
{
- case ACPI_TYPE_NUMBER:
+ case ACPI_TYPE_INTEGER:
- ObjDesc->Number.Value =
+ ObjDesc->Integer.Value =
(ACPI_INTEGER) STRTOUL (InitVal->Val, NULL, 10);
break;
@@ -322,14 +322,14 @@ UnlockAndExit:
*
* FUNCTION: AcpiNsLookup
*
- * PARAMETERS: PrefixNode - Search scope if name is not fully qualified
+ * PARAMETERS: PrefixNode - Search scope if name is not fully qualified
* Pathname - Search pathname, in internal format
* (as represented in the AML stream)
* Type - Type associated with name
* InterpreterMode - IMODE_LOAD_PASS2 => add name if not found
* Flags - Flags describing the search restrictions
* WalkState - Current state of the walk
- * ReturnNode - Where the Node is placed (if found
+ * ReturnNode - Where the Node is placed (if found
* or created successfully)
*
* RETURN: Status
@@ -352,7 +352,7 @@ AcpiNsLookup (
ACPI_NAMESPACE_NODE **ReturnNode)
{
ACPI_STATUS Status;
- ACPI_NAMESPACE_NODE *PrefixNode;
+ ACPI_NAMESPACE_NODE *PrefixNode;
ACPI_NAMESPACE_NODE *CurrentNode = NULL;
ACPI_NAMESPACE_NODE *ScopeToPush = NULL;
ACPI_NAMESPACE_NODE *ThisNode = NULL;
@@ -361,8 +361,9 @@ AcpiNsLookup (
BOOLEAN NullNamePath = FALSE;
OBJECT_TYPE_INTERNAL TypeToCheckFor;
OBJECT_TYPE_INTERNAL ThisSearchType;
+ UINT32 LocalFlags = Flags & ~NS_ERROR_IF_FOUND;
- DEBUG_ONLY_MEMBERS (UINT32 i)
+ DEBUG_EXEC (UINT32 i;)
FUNCTION_TRACE ("NsLookup");
@@ -605,6 +606,7 @@ AcpiNsLookup (
if (!NumSegments)
{
ThisSearchType = Type;
+ LocalFlags = Flags;
}
/* Pluck one ACPI name from the front of the pathname */
@@ -615,7 +617,7 @@ AcpiNsLookup (
Status = AcpiNsSearchAndEnter (SimpleName, WalkState,
CurrentNode, InterpreterMode,
- ThisSearchType, Flags,
+ ThisSearchType, LocalFlags,
&ThisNode);
if (ACPI_FAILURE (Status))
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nsalloc.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nsalloc.c
index 06095a4..3f90752 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nsalloc.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nsalloc.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nsalloc - Namespace allocation and deletion utilities
- * $Revision: 44 $
+ * $Revision: 45 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nsdump.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nsdump.c
index 83fd3ab..eb907a3 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nsdump.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nsdump.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsdump - table dumping routines for debug
- * $Revision: 83 $
+ * $Revision: 85 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -127,7 +127,7 @@
MODULE_NAME ("nsdump")
-#ifdef ACPI_DEBUG
+#if defined(ACPI_DEBUG) || defined(ENABLE_DEBUGGER)
/****************************************************************************
*
@@ -338,10 +338,10 @@ AcpiNsDumpOneObject (
break;
- case ACPI_TYPE_NUMBER:
+ case ACPI_TYPE_INTEGER:
DEBUG_PRINT_RAW (TRACE_TABLES, (" N:%X\n",
- ((ACPI_OPERAND_OBJECT *) ThisNode->Object)->Number.Value));
+ ((ACPI_OPERAND_OBJECT *) ThisNode->Object)->Integer.Value));
break;
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nseval.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nseval.c
index 17b8376..10b1eb4 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nseval.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nseval.c
@@ -2,7 +2,7 @@
*
* Module Name: nseval - Object evaluation interfaces -- includes control
* method lookup and execution.
- * $Revision: 80 $
+ * $Revision: 81 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nsinit.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nsinit.c
index c9e248a..c8b463c 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nsinit.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nsinit.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsinit - namespace initialization
- * $Revision: 10 $
+ * $Revision: 12 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -391,7 +391,9 @@ AcpiNsInitOneDevice (
Status = AcpiCmExecute_STA (Node, &Flags);
if (ACPI_FAILURE (Status))
{
- return_ACPI_STATUS (Status);
+ /* Ignore error and move on to next device */
+
+ return_ACPI_STATUS (AE_OK);
}
Info->Num_STA++;
@@ -415,21 +417,24 @@ AcpiNsInitOneDevice (
else if (ACPI_FAILURE (Status))
{
+ /* Ignore error and move on to next device */
+
#ifdef ACPI_DEBUG
NATIVE_CHAR *ScopeName = AcpiNsGetTablePathname (ObjHandle);
- DEBUG_PRINT (ACPI_ERROR, ("%s._INI failed: %s\n",
+ DEBUG_PRINT (ACPI_WARN, ("%s._INI failed: %s\n",
ScopeName, AcpiCmFormatException (Status)));
AcpiCmFree (ScopeName);
#endif
- return_ACPI_STATUS (Status);
}
else
{
+ /* Count of successfull INIs */
+
Info->Num_INI++;
}
- return_ACPI_STATUS (Status);
+ return_ACPI_STATUS (AE_OK);
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nsload.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nsload.c
index ad1dd89..2b49884 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nsload.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nsload.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsload - namespace loading/expanding/contracting procedures
- * $Revision: 34 $
+ * $Revision: 35 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nsnames.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nsnames.c
index babcf56..04662f5 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nsnames.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nsnames.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nsnames - Name manipulation and search
- * $Revision: 52 $
+ * $Revision: 53 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nsobject.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nsobject.c
index c986a83..f0192fb 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nsobject.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nsobject.c
@@ -2,7 +2,7 @@
*
* Module Name: nsobject - Utilities for objects attached to namespace
* table entries
- * $Revision: 48 $
+ * $Revision: 49 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -316,7 +316,7 @@ AcpiNsAttachObject (
case AML_ZERO_OP: case AML_ONES_OP: case AML_ONE_OP:
case AML_BYTE_OP: case AML_WORD_OP: case AML_DWORD_OP:
- ObjType = ACPI_TYPE_NUMBER;
+ ObjType = ACPI_TYPE_INTEGER;
break;
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nssearch.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nssearch.c
index 8c19954..3ecdf4e 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nssearch.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nssearch.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nssearch - Namespace search
- * $Revision: 61 $
+ * $Revision: 64 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -164,16 +164,26 @@ AcpiNsSearchNode (
FUNCTION_TRACE ("NsSearchNode");
+
+#ifdef ACPI_DEBUG
+ if (TRACE_NAMES & AcpiDbgLevel)
{
- DEBUG_EXEC (NATIVE_CHAR *ScopeName = AcpiNsGetTablePathname (Node));
- DEBUG_PRINT (TRACE_NAMES,
- ("NsSearchNode: Searching %s [%p]\n",
- ScopeName, Node));
- DEBUG_PRINT (TRACE_NAMES,
- ("NsSearchNode: For %4.4s (type %X)\n",
- &TargetName, Type));
- DEBUG_EXEC (AcpiCmFree (ScopeName));
+ NATIVE_CHAR *ScopeName;
+
+ ScopeName = AcpiNsGetTablePathname (Node);
+ if (ScopeName)
+ {
+ DEBUG_PRINT (TRACE_NAMES,
+ ("NsSearchNode: Searching %s [%p]\n",
+ ScopeName, Node));
+ DEBUG_PRINT (TRACE_NAMES,
+ ("NsSearchNode: For %4.4s (type %X)\n",
+ &TargetName, Type));
+
+ AcpiCmFree (ScopeName);
+ }
}
+#endif
/*
@@ -440,6 +450,16 @@ AcpiNsSearchAndEnter (
if (Status != AE_NOT_FOUND)
{
/*
+ * If we found it AND the request specifies that a
+ * find is an error, return the error
+ */
+ if ((Status == AE_OK) &&
+ (Flags & NS_ERROR_IF_FOUND))
+ {
+ Status = AE_EXIST;
+ }
+
+ /*
* Either found it or there was an error
* -- finished either way
*/
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nsutils.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nsutils.c
index 45842a9..936843c 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nsutils.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nsutils.c
@@ -2,7 +2,7 @@
*
* Module Name: nsutils - Utilities for accessing ACPI namespace, accessing
* parents and siblings and Scope manipulation
- * $Revision: 75 $
+ * $Revision: 77 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -932,7 +932,7 @@ AcpiNsFindParentName (
}
-#ifdef ACPI_DEBUG
+#if defined(ACPI_DEBUG) || defined(ENABLE_DEBUGGER)
/****************************************************************************
*
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nswalk.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nswalk.c
index c9b1d9d..2244489 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nswalk.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nswalk.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nswalk - Functions for walking the APCI namespace
- * $Revision: 18 $
+ * $Revision: 19 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nsxfname.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nsxfname.c
index 3cdd8f8..257aafd 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nsxfname.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nsxfname.c
@@ -2,7 +2,7 @@
*
* Module Name: nsxfname - Public interfaces to the ACPI subsystem
* ACPI Namespace oriented interfaces
- * $Revision: 74 $
+ * $Revision: 75 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Namespace/nsxfobj.c b/sys/contrib/dev/acpica/Subsystem/Namespace/nsxfobj.c
index 1509ce0..dd266bf 100644
--- a/sys/contrib/dev/acpica/Subsystem/Namespace/nsxfobj.c
+++ b/sys/contrib/dev/acpica/Subsystem/Namespace/nsxfobj.c
@@ -2,7 +2,7 @@
*
* Module Name: nsxfobj - Public interfaces to the ACPI subsystem
* ACPI Object oriented interfaces
- * $Revision: 76 $
+ * $Revision: 78 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Parser/psargs.c b/sys/contrib/dev/acpica/Subsystem/Parser/psargs.c
index b802cee..1ea0986 100644
--- a/sys/contrib/dev/acpica/Subsystem/Parser/psargs.c
+++ b/sys/contrib/dev/acpica/Subsystem/Parser/psargs.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psargs - Parse AML opcode arguments
- * $Revision: 42 $
+ * $Revision: 43 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Parser/psfind.c b/sys/contrib/dev/acpica/Subsystem/Parser/psfind.c
index 357c92b..6686d7f 100644
--- a/sys/contrib/dev/acpica/Subsystem/Parser/psfind.c
+++ b/sys/contrib/dev/acpica/Subsystem/Parser/psfind.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: psfind - Parse tree search routine
- * $Revision: 20 $
+ * $Revision: 21 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Parser/psopcode.c b/sys/contrib/dev/acpica/Subsystem/Parser/psopcode.c
index fcc2b77..88e18f6 100644
--- a/sys/contrib/dev/acpica/Subsystem/Parser/psopcode.c
+++ b/sys/contrib/dev/acpica/Subsystem/Parser/psopcode.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psopcode - Parser opcode information table
- * $Revision: 25 $
+ * $Revision: 27 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -135,7 +135,7 @@
#define _PFX 0x6D
#define _UNKNOWN_OPCODE 0x02 /* An example unknown opcode */
-#define MAX_EXTENDED_OPCODE 0x87
+#define MAX_EXTENDED_OPCODE 0x88
#define NUM_EXTENDED_OPCODE MAX_EXTENDED_OPCODE + 1
#define MAX_INTERNAL_OPCODE
#define NUM_INTERNAL_OPCODE MAX_INTERNAL_OPCODE + 1
@@ -174,9 +174,11 @@
#define ARGP_WORD_OP ARGP_LIST1 (ARGP_WORDDATA)
#define ARGP_DWORD_OP ARGP_LIST1 (ARGP_DWORDDATA)
#define ARGP_STRING_OP ARGP_LIST1 (ARGP_CHARLIST)
+#define ARGP_QWORD_OP ARGP_LIST1 (ARGP_QWORDDATA)
#define ARGP_SCOPE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_TERMLIST)
#define ARGP_BUFFER_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_BYTELIST)
#define ARGP_PACKAGE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_BYTEDATA, ARGP_DATAOBJLIST)
+#define ARGP_VAR_PACKAGE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_BYTEDATA, ARGP_DATAOBJLIST)
#define ARGP_METHOD_OP ARGP_LIST4 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_TERMLIST)
#define ARGP_LOCAL0 ARG_NONE
#define ARGP_LOCAL1 ARG_NONE
@@ -213,6 +215,8 @@
#define ARGP_FIND_SET_LEFT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
#define ARGP_FIND_SET_RIGHT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
#define ARGP_DEREF_OF_OP ARGP_LIST1 (ARGP_TERMARG)
+#define ARGP_CONCAT_RES_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
+#define ARGP_MOD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
#define ARGP_NOTIFY_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_TERMARG)
#define ARGP_SIZE_OF_OP ARGP_LIST1 (ARGP_SUPERNAME)
#define ARGP_INDEX_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
@@ -222,12 +226,21 @@
#define ARGP_BYTE_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
#define ARGP_BIT_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
#define ARGP_TYPE_OP ARGP_LIST1 (ARGP_SUPERNAME)
+#define ARGP_QWORD_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
#define ARGP_LAND_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
#define ARGP_LOR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
#define ARGP_LNOT_OP ARGP_LIST1 (ARGP_TERMARG)
#define ARGP_LEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
#define ARGP_LGREATER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
#define ARGP_LLESS_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
+#define ARGP_TO_BUFFER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
+#define ARGP_TO_DEC_STR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
+#define ARGP_TO_HEX_STR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
+#define ARGP_TO_INTEGER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
+#define ARGP_TO_STRING_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
+#define ARGP_COPY_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SIMPLENAME)
+#define ARGP_MID_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
+#define ARGP_CONTINUE_OP ARG_NONE
#define ARGP_IF_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_TERMLIST)
#define ARGP_ELSE_OP ARGP_LIST2 (ARGP_PKGLENGTH, ARGP_TERMLIST)
#define ARGP_WHILE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_TERMLIST)
@@ -240,6 +253,7 @@
#define ARGP_EVENT_OP ARGP_LIST1 (ARGP_NAME)
#define ARGP_COND_REF_OF_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SUPERNAME)
#define ARGP_CREATE_FIELD_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
+#define ARGP_LOAD_TABLE_OP ARGP_LIST6 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG)
#define ARGP_LOAD_OP ARGP_LIST2 (ARGP_NAMESTRING, ARGP_SUPERNAME)
#define ARGP_STALL_OP ARGP_LIST1 (ARGP_TERMARG)
#define ARGP_SLEEP_OP ARGP_LIST1 (ARGP_TERMARG)
@@ -262,6 +276,7 @@
#define ARGP_THERMAL_ZONE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_OBJLIST)
#define ARGP_INDEX_FIELD_OP ARGP_LIST5 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_NAMESTRING,ARGP_BYTEDATA, ARGP_FIELDLIST)
#define ARGP_BANK_FIELD_OP ARGP_LIST6 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_NAMESTRING,ARGP_TERMARG, ARGP_BYTEDATA, ARGP_FIELDLIST)
+#define ARGP_DATA_REGION_OP ARGP_LIST4 (ARGP_NAMESTRING, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG)
#define ARGP_LNOTEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
#define ARGP_LLESSEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
#define ARGP_LGREATEREQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
@@ -278,7 +293,7 @@
* All AML opcodes and the runtime arguments for each. Used by the AML interpreter Each list is compressed
* into a 32-bit number and stored in the master opcode table at the end of this file.
*
- * (Used by AcpiAmlPrepOperands procedure)
+ * (Used by AcpiAmlPrepOperands procedure and the ASL Compiler)
*/
#define ARGI_ZERO_OP ARG_NONE
@@ -289,9 +304,11 @@
#define ARGI_WORD_OP ARGI_INVALID_OPCODE
#define ARGI_DWORD_OP ARGI_INVALID_OPCODE
#define ARGI_STRING_OP ARGI_INVALID_OPCODE
+#define ARGI_QWORD_OP ARGI_INVALID_OPCODE
#define ARGI_SCOPE_OP ARGI_INVALID_OPCODE
#define ARGI_BUFFER_OP ARGI_INVALID_OPCODE
#define ARGI_PACKAGE_OP ARGI_INVALID_OPCODE
+#define ARGI_VAR_PACKAGE_OP ARGI_INVALID_OPCODE
#define ARGI_METHOD_OP ARGI_INVALID_OPCODE
#define ARGI_LOCAL0 ARG_NONE
#define ARGI_LOCAL1 ARG_NONE
@@ -309,40 +326,51 @@
#define ARGI_ARG5 ARG_NONE
#define ARGI_ARG6 ARG_NONE
#define ARGI_STORE_OP ARGI_LIST2 (ARGI_ANYTYPE, ARGI_TARGETREF)
-#define ARGI_REF_OF_OP ARGI_LIST1 (ARGI_REFERENCE)
-#define ARGI_ADD_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_CONCAT_OP ARGI_LIST3 (ARGI_STRING, ARGI_STRING, ARGI_TARGETREF)
-#define ARGI_SUBTRACT_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_INCREMENT_OP ARGI_LIST1 (ARGI_REFERENCE)
-#define ARGI_DECREMENT_OP ARGI_LIST1 (ARGI_REFERENCE)
-#define ARGI_MULTIPLY_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_DIVIDE_OP ARGI_LIST4 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF, ARGI_TARGETREF)
-#define ARGI_SHIFT_LEFT_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_SHIFT_RIGHT_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_BIT_AND_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_BIT_NAND_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_BIT_OR_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_BIT_NOR_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_BIT_XOR_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_BIT_NOT_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_FIND_SET_LEFT_BIT_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_FIND_SET_RIGHT_BIT_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_TARGETREF)
+#define ARGI_REF_OF_OP ARGI_LIST1 (ARGI_OBJECT_REF)
+#define ARGI_ADD_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_CONCAT_OP ARGI_LIST3 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA, ARGI_TARGETREF)
+#define ARGI_SUBTRACT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_INCREMENT_OP ARGI_LIST1 (ARGI_INTEGER_REF)
+#define ARGI_DECREMENT_OP ARGI_LIST1 (ARGI_INTEGER_REF)
+#define ARGI_MULTIPLY_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_DIVIDE_OP ARGI_LIST4 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF, ARGI_TARGETREF)
+#define ARGI_SHIFT_LEFT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_SHIFT_RIGHT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_BIT_AND_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_BIT_NAND_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_BIT_OR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_BIT_NOR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_BIT_XOR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_BIT_NOT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_FIND_SET_LEFT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_FIND_SET_RIGHT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
#define ARGI_DEREF_OF_OP ARGI_LIST1 (ARGI_REFERENCE)
-#define ARGI_NOTIFY_OP ARGI_LIST2 (ARGI_REFERENCE, ARGI_NUMBER)
+#define ARGI_CONCAT_RES_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_BUFFER, ARGI_TARGETREF)
+#define ARGI_MOD_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_NOTIFY_OP ARGI_LIST2 (ARGI_DEVICE_REF, ARGI_INTEGER)
#define ARGI_SIZE_OF_OP ARGI_LIST1 (ARGI_DATAOBJECT)
-#define ARGI_INDEX_OP ARGI_LIST3 (ARGI_COMPLEXOBJ, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_MATCH_OP ARGI_LIST6 (ARGI_PACKAGE, ARGI_NUMBER, ARGI_NUMBER, ARGI_NUMBER, ARGI_NUMBER, ARGI_NUMBER)
-#define ARGI_DWORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_NUMBER, ARGI_REFERENCE)
-#define ARGI_WORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_NUMBER, ARGI_REFERENCE)
-#define ARGI_BYTE_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_NUMBER, ARGI_REFERENCE)
-#define ARGI_BIT_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_NUMBER, ARGI_REFERENCE)
+#define ARGI_INDEX_OP ARGI_LIST3 (ARGI_COMPLEXOBJ, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_MATCH_OP ARGI_LIST6 (ARGI_PACKAGE, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER)
+#define ARGI_DWORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
+#define ARGI_WORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
+#define ARGI_BYTE_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
+#define ARGI_BIT_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
#define ARGI_TYPE_OP ARGI_LIST1 (ARGI_ANYTYPE)
-#define ARGI_LAND_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_NUMBER)
-#define ARGI_LOR_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_NUMBER)
-#define ARGI_LNOT_OP ARGI_LIST1 (ARGI_NUMBER)
-#define ARGI_LEQUAL_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_NUMBER)
-#define ARGI_LGREATER_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_NUMBER)
-#define ARGI_LLESS_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_NUMBER)
+#define ARGI_QWORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
+#define ARGI_LAND_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
+#define ARGI_LOR_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
+#define ARGI_LNOT_OP ARGI_LIST1 (ARGI_INTEGER)
+#define ARGI_LEQUAL_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
+#define ARGI_LGREATER_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
+#define ARGI_LLESS_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
+#define ARGI_TO_BUFFER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
+#define ARGI_TO_DEC_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
+#define ARGI_TO_HEX_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
+#define ARGI_TO_INTEGER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
+#define ARGI_TO_STRING_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_FIXED_TARGET)
+#define ARGI_COPY_OP ARGI_LIST2 (ARGI_ANYTYPE, ARGI_SIMPLE_TARGET)
+#define ARGI_MID_OP ARGI_LIST4 (ARGI_BUFFERSTRING,ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_CONTINUE_OP ARGI_INVALID_OPCODE
#define ARGI_IF_OP ARGI_INVALID_OPCODE
#define ARGI_ELSE_OP ARGI_INVALID_OPCODE
#define ARGI_WHILE_OP ARGI_INVALID_OPCODE
@@ -353,23 +381,24 @@
#define ARGI_ONES_OP ARG_NONE
#define ARGI_MUTEX_OP ARGI_INVALID_OPCODE
#define ARGI_EVENT_OP ARGI_INVALID_OPCODE
-#define ARGI_COND_REF_OF_OP ARGI_LIST2 (ARGI_REFERENCE, ARGI_TARGETREF)
-#define ARGI_CREATE_FIELD_OP ARGI_LIST4 (ARGI_BUFFER, ARGI_NUMBER, ARGI_NUMBER, ARGI_REFERENCE)
+#define ARGI_COND_REF_OF_OP ARGI_LIST2 (ARGI_OBJECT_REF, ARGI_TARGETREF)
+#define ARGI_CREATE_FIELD_OP ARGI_LIST4 (ARGI_BUFFER, ARGI_INTEGER, ARGI_INTEGER, ARGI_REFERENCE)
+#define ARGI_LOAD_TABLE_OP ARGI_LIST6 (ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_TARGETREF)
#define ARGI_LOAD_OP ARGI_LIST2 (ARGI_REGION, ARGI_TARGETREF)
-#define ARGI_STALL_OP ARGI_LIST1 (ARGI_NUMBER)
-#define ARGI_SLEEP_OP ARGI_LIST1 (ARGI_NUMBER)
-#define ARGI_ACQUIRE_OP ARGI_LIST2 (ARGI_MUTEX, ARGI_NUMBER)
+#define ARGI_STALL_OP ARGI_LIST1 (ARGI_INTEGER)
+#define ARGI_SLEEP_OP ARGI_LIST1 (ARGI_INTEGER)
+#define ARGI_ACQUIRE_OP ARGI_LIST2 (ARGI_MUTEX, ARGI_INTEGER)
#define ARGI_SIGNAL_OP ARGI_LIST1 (ARGI_EVENT)
-#define ARGI_WAIT_OP ARGI_LIST2 (ARGI_EVENT, ARGI_NUMBER)
+#define ARGI_WAIT_OP ARGI_LIST2 (ARGI_EVENT, ARGI_INTEGER)
#define ARGI_RESET_OP ARGI_LIST1 (ARGI_EVENT)
#define ARGI_RELEASE_OP ARGI_LIST1 (ARGI_MUTEX)
-#define ARGI_FROM_BCD_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_TO_BCD_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_TARGETREF)
+#define ARGI_FROM_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_TO_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_FIXED_TARGET)
#define ARGI_UNLOAD_OP ARGI_LIST1 (ARGI_DDBHANDLE)
#define ARGI_REVISION_OP ARG_NONE
#define ARGI_DEBUG_OP ARG_NONE
-#define ARGI_FATAL_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_NUMBER)
-#define ARGI_REGION_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_NUMBER)
+#define ARGI_FATAL_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER)
+#define ARGI_REGION_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
#define ARGI_DEF_FIELD_OP ARGI_INVALID_OPCODE
#define ARGI_DEVICE_OP ARGI_INVALID_OPCODE
#define ARGI_PROCESSOR_OP ARGI_INVALID_OPCODE
@@ -377,6 +406,7 @@
#define ARGI_THERMAL_ZONE_OP ARGI_INVALID_OPCODE
#define ARGI_INDEX_FIELD_OP ARGI_INVALID_OPCODE
#define ARGI_BANK_FIELD_OP ARGI_INVALID_OPCODE
+#define ARGI_DATA_REGION_OP ARGI_LIST3 (ARGI_STRING, ARGI_STRING, ARGI_STRING)
#define ARGI_LNOTEQUAL_OP ARGI_INVALID_OPCODE
#define ARGI_LLESSEQUAL_OP ARGI_INVALID_OPCODE
#define ARGI_LGREATEREQUAL_OP ARGI_INVALID_OPCODE
@@ -398,8 +428,8 @@ static ACPI_OPCODE_INFO AmlOpInfo[] =
{
/* Index Opcode Type Class Has Arguments? Name Parser Args Interpreter Args */
-/* 00 */ /* AML_ZERO_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "ZeroOp", ARGP_ZERO_OP, ARGI_ZERO_OP),
-/* 01 */ /* AML_ONE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "OneOp", ARGP_ONE_OP, ARGI_ONE_OP),
+/* 00 */ /* AML_ZERO_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "Zero", ARGP_ZERO_OP, ARGI_ZERO_OP),
+/* 01 */ /* AML_ONE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "One", ARGP_ONE_OP, ARGI_ONE_OP),
/* 02 */ /* AML_ALIAS_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Alias", ARGP_ALIAS_OP, ARGI_ALIAS_OP),
/* 03 */ /* AML_NAME_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Name", ARGP_NAME_OP, ARGI_NAME_OP),
/* 04 */ /* AML_BYTE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "ByteConst", ARGP_BYTE_OP, ARGI_BYTE_OP),
@@ -428,7 +458,7 @@ static ACPI_OPCODE_INFO AmlOpInfo[] =
/* 1B */ /* AML_STORE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "Store", ARGP_STORE_OP, ARGI_STORE_OP),
/* 1C */ /* AML_REF_OF_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "RefOf", ARGP_REF_OF_OP, ARGI_REF_OF_OP),
/* 1D */ /* AML_ADD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Add", ARGP_ADD_OP, ARGI_ADD_OP),
-/* 1E */ /* AML_CONCAT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Concat", ARGP_CONCAT_OP, ARGI_CONCAT_OP),
+/* 1E */ /* AML_CONCAT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Concatenate", ARGP_CONCAT_OP, ARGI_CONCAT_OP),
/* 1F */ /* AML_SUBTRACT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Subtract", ARGP_SUBTRACT_OP, ARGI_SUBTRACT_OP),
/* 20 */ /* AML_INCREMENT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "Increment", ARGP_INCREMENT_OP, ARGI_INCREMENT_OP),
/* 21 */ /* AML_DECREMENT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "Decrement", ARGP_DECREMENT_OP, ARGI_DECREMENT_OP),
@@ -467,7 +497,7 @@ static ACPI_OPCODE_INFO AmlOpInfo[] =
/* 42 */ /* AML_RETURN_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_HAS_ARGS, "Return", ARGP_RETURN_OP, ARGI_RETURN_OP),
/* 43 */ /* AML_BREAK_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_NO_ARGS, "Break", ARGP_BREAK_OP, ARGI_BREAK_OP),
/* 44 */ /* AML_BREAK_POINT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_NO_ARGS, "BreakPoint", ARGP_BREAK_POINT_OP, ARGI_BREAK_POINT_OP),
-/* 45 */ /* AML_ONES_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "OnesOp", ARGP_ONES_OP, ARGI_ONES_OP),
+/* 45 */ /* AML_ONES_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "Ones", ARGP_ONES_OP, ARGI_ONES_OP),
/* Prefixed opcodes (Two-byte opcodes with a prefix op) */
@@ -493,7 +523,7 @@ static ACPI_OPCODE_INFO AmlOpInfo[] =
/* 59 */ /* AML_DEF_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Field", ARGP_DEF_FIELD_OP, ARGI_DEF_FIELD_OP),
/* 5A */ /* AML_DEVICE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Device", ARGP_DEVICE_OP, ARGI_DEVICE_OP),
/* 5B */ /* AML_PROCESSOR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Processor", ARGP_PROCESSOR_OP, ARGI_PROCESSOR_OP),
-/* 5C */ /* AML_POWER_RES_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "PowerRes", ARGP_POWER_RES_OP, ARGI_POWER_RES_OP),
+/* 5C */ /* AML_POWER_RES_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "PowerResource", ARGP_POWER_RES_OP, ARGI_POWER_RES_OP),
/* 5D */ /* AML_THERMAL_ZONE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "ThermalZone", ARGP_THERMAL_ZONE_OP, ARGI_THERMAL_ZONE_OP),
/* 5E */ /* AML_INDEX_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "IndexField", ARGP_INDEX_FIELD_OP, ARGI_INDEX_FIELD_OP),
/* 5F */ /* AML_BANK_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "BankField", ARGP_BANK_FIELD_OP, ARGI_BANK_FIELD_OP),
@@ -514,6 +544,26 @@ static ACPI_OPCODE_INFO AmlOpInfo[] =
/* 6B */ /* UNKNOWN OPCODES */ OP_INFO_ENTRY (ACPI_OP_TYPE_UNKNOWN | OPTYPE_BOGUS| AML_HAS_ARGS, "UNKNOWN_OP!", ARG_NONE, ARG_NONE),
/* 6C */ /* ASCII CHARACTERS */ OP_INFO_ENTRY (ACPI_OP_TYPE_ASCII | OPTYPE_BOGUS| AML_HAS_ARGS, "ASCII_ONLY!", ARG_NONE, ARG_NONE),
/* 6D */ /* PREFIX CHARACTERS */ OP_INFO_ENTRY (ACPI_OP_TYPE_PREFIX | OPTYPE_BOGUS| AML_HAS_ARGS, "PREFIX_ONLY!", ARG_NONE, ARG_NONE),
+
+
+/* ACPI 2.0 (new) opcodes */
+
+/* 6E */ /* AML_QWORD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "QwordConst", ARGP_QWORD_OP, ARGI_QWORD_OP),
+/* 6F */ /* AML_VAR_PACKAGE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DATA_TERM| AML_HAS_ARGS, "VarPackage", ARGP_VAR_PACKAGE_OP, ARGI_VAR_PACKAGE_OP),
+/* 70 */ /* AML_CONCAT_RES_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "ConcatRes", ARGP_CONCAT_RES_OP, ARGI_CONCAT_RES_OP),
+/* 71 */ /* AML_MOD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Mod", ARGP_MOD_OP, ARGI_MOD_OP),
+/* 72 */ /* AML_QWORD_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS, "CreateQWordField", ARGP_QWORD_FIELD_OP, ARGI_QWORD_FIELD_OP),
+/* 73 */ /* AML_TO_BUFFER_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "ToBuffer", ARGP_TO_BUFFER_OP, ARGI_TO_BUFFER_OP),
+/* 74 */ /* AML_TO_DEC_STR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "ToDecString", ARGP_TO_DEC_STR_OP, ARGI_TO_DEC_STR_OP),
+/* 75 */ /* AML_TO_HEX_STR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "ToHexString", ARGP_TO_HEX_STR_OP, ARGI_TO_HEX_STR_OP),
+/* 76 */ /* AML_TO_INTEGER_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "ToInteger", ARGP_TO_INTEGER_OP, ARGI_TO_INTEGER_OP),
+/* 77 */ /* AML_TO_STRING_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "ToString", ARGP_TO_STRING_OP, ARGI_TO_STRING_OP),
+/* 78 */ /* AML_COPY_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "Copy", ARGP_COPY_OP, ARGI_COPY_OP),
+/* 79 */ /* AML_MID_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "Mid", ARGP_MID_OP, ARGI_MID_OP),
+/* 7A */ /* AML_CONTINUE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_NO_ARGS, "Continue", ARGP_CONTINUE_OP, ARGI_CONTINUE_OP),
+/* 7B */ /* AML_LOAD_TABLE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "LoadTable", ARGP_LOAD_TABLE_OP, ARGI_LOAD_TABLE_OP),
+/* 7C */ /* AML_DATA_REGION_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "DataOpRegion", ARGP_DATA_REGION_OP, ARGI_DATA_REGION_OP),
+
};
/*
@@ -524,9 +574,10 @@ static ACPI_OPCODE_INFO AmlOpInfo[] =
static UINT8 AmlShortOpInfoIndex[256] =
{
/* 0 1 2 3 4 5 6 7 */
+/* 8 9 A B C D E F */
/* 0x00 */ 0x00, 0x01, _UNK, _UNK, _UNK, _UNK, 0x02, _UNK,
-/* 0x08 */ 0x03, _UNK, 0x04, 0x05, 0x06, 0x07, _UNK, _UNK,
-/* 0x10 */ 0x08, 0x09, 0x0a, _UNK, 0x0b, _UNK, _UNK, _UNK,
+/* 0x08 */ 0x03, _UNK, 0x04, 0x05, 0x06, 0x07, 0x6E, _UNK,
+/* 0x10 */ 0x08, 0x09, 0x0a, 0x6F, 0x0b, _UNK, _UNK, _UNK,
/* 0x18 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
/* 0x20 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
/* 0x28 */ _UNK, _UNK, _UNK, _UNK, _UNK, 0x63, _PFX, _PFX,
@@ -540,10 +591,10 @@ static UINT8 AmlShortOpInfoIndex[256] =
/* 0x68 */ 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, _UNK,
/* 0x70 */ 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22,
/* 0x78 */ 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a,
-/* 0x80 */ 0x2b, 0x2c, 0x2d, 0x2e, _UNK, _UNK, 0x2f, 0x30,
-/* 0x88 */ 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, _UNK,
-/* 0x90 */ 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, _UNK, _UNK,
-/* 0x98 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
+/* 0x80 */ 0x2b, 0x2c, 0x2d, 0x2e, 0x70, 0x71, 0x2f, 0x30,
+/* 0x88 */ 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x72,
+/* 0x90 */ 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x73, 0x74,
+/* 0x98 */ 0x75, 0x76, _UNK, _UNK, 0x77, 0x78, 0x79, 0x7A,
/* 0xA0 */ 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x60, 0x61,
/* 0xA8 */ 0x62, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
/* 0xB0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
@@ -562,10 +613,11 @@ static UINT8 AmlShortOpInfoIndex[256] =
static UINT8 AmlLongOpInfoIndex[NUM_EXTENDED_OPCODE] =
{
/* 0 1 2 3 4 5 6 7 */
+/* 8 9 A B C D E F */
/* 0x00 */ _UNK, 0x46, 0x47, _UNK, _UNK, _UNK, _UNK, _UNK,
/* 0x08 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
/* 0x10 */ _UNK, _UNK, 0x48, 0x49, _UNK, _UNK, _UNK, _UNK,
-/* 0x18 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
+/* 0x18 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 0x7B,
/* 0x20 */ 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51,
/* 0x28 */ 0x52, 0x53, 0x54, _UNK, _UNK, _UNK, _UNK, _UNK,
/* 0x30 */ 0x55, 0x56, 0x57, _UNK, _UNK, _UNK, _UNK, _UNK,
@@ -579,13 +631,10 @@ static UINT8 AmlLongOpInfoIndex[NUM_EXTENDED_OPCODE] =
/* 0x70 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
/* 0x78 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
/* 0x80 */ 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
+/* 0x88 */ 0x7C,
};
-/* 0 1 2 3 4 5 6 7 */
-/* 0x00 */
-
-
/*******************************************************************************
*
* FUNCTION: AcpiPsGetOpcodeInfo
diff --git a/sys/contrib/dev/acpica/Subsystem/Parser/psparse.c b/sys/contrib/dev/acpica/Subsystem/Parser/psparse.c
index e33df3f..78443bc 100644
--- a/sys/contrib/dev/acpica/Subsystem/Parser/psparse.c
+++ b/sys/contrib/dev/acpica/Subsystem/Parser/psparse.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psparse - Parser top level AML parse routines
- * $Revision: 71 $
+ * $Revision: 74 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -658,13 +658,22 @@ AcpiPsParseLoop (
*/
Status = AcpiDsGetPredicateValue (WalkState, NULL, TRUE);
- if (Status == AE_AML_NO_OPERAND)
+ if (ACPI_FAILURE (Status) &&
+ ((Status & AE_CODE_MASK) != AE_CODE_CONTROL))
{
+ if (Status == AE_AML_NO_RETURN_VALUE)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("PsParseLoop: Invoked method did not return a value, %s\n",
+ AcpiCmFormatException (Status)));
+
+ }
DEBUG_PRINT (ACPI_ERROR,
- ("PsParseLoop: Invoked method did not return a value, %s\n",
+ ("PsParseLoop: GetPredicate Failed, %s\n",
AcpiCmFormatException (Status)));
-
+ return_ACPI_STATUS (Status);
}
+
Status = AcpiPsNextParseState (WalkState, Op, Status);
}
diff --git a/sys/contrib/dev/acpica/Subsystem/Parser/psscope.c b/sys/contrib/dev/acpica/Subsystem/Parser/psscope.c
index 0c10913..5e91b74 100644
--- a/sys/contrib/dev/acpica/Subsystem/Parser/psscope.c
+++ b/sys/contrib/dev/acpica/Subsystem/Parser/psscope.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psscope - Parser scope stack management routines
- * $Revision: 23 $
+ * $Revision: 24 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Parser/pstree.c b/sys/contrib/dev/acpica/Subsystem/Parser/pstree.c
index 26cbc82..2f7cf49 100644
--- a/sys/contrib/dev/acpica/Subsystem/Parser/pstree.c
+++ b/sys/contrib/dev/acpica/Subsystem/Parser/pstree.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: pstree - Parser op tree manipulation/traversal/search
- * $Revision: 26 $
+ * $Revision: 27 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Parser/psutils.c b/sys/contrib/dev/acpica/Subsystem/Parser/psutils.c
index ef1e27d..e49b9a1 100644
--- a/sys/contrib/dev/acpica/Subsystem/Parser/psutils.c
+++ b/sys/contrib/dev/acpica/Subsystem/Parser/psutils.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psutils - Parser miscellaneous utilities (Parser only)
- * $Revision: 31 $
+ * $Revision: 32 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Parser/pswalk.c b/sys/contrib/dev/acpica/Subsystem/Parser/pswalk.c
index f549c57..e3a0f70 100644
--- a/sys/contrib/dev/acpica/Subsystem/Parser/pswalk.c
+++ b/sys/contrib/dev/acpica/Subsystem/Parser/pswalk.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: pswalk - Parser routines to walk parsed op tree(s)
- * $Revision: 51 $
+ * $Revision: 52 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Parser/psxface.c b/sys/contrib/dev/acpica/Subsystem/Parser/psxface.c
index d3e5e22..00248b1 100644
--- a/sys/contrib/dev/acpica/Subsystem/Parser/psxface.c
+++ b/sys/contrib/dev/acpica/Subsystem/Parser/psxface.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psxface - Parser external interfaces
- * $Revision: 38 $
+ * $Revision: 40 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -227,6 +227,12 @@ AcpiPsxExecute (
return_ACPI_STATUS (AE_NO_MEMORY);
}
+
+ /* Init new op with the method name and pointer back to the NS node */
+
+ AcpiPsSetName (Op, MethodNode->Name);
+ Op->Node = MethodNode;
+
/*
* The walk of the parse tree is where we actually execute the method
*/
diff --git a/sys/contrib/dev/acpica/Subsystem/Resources/rsaddr.c b/sys/contrib/dev/acpica/Subsystem/Resources/rsaddr.c
index d2c2dbe..546ff9b 100644
--- a/sys/contrib/dev/acpica/Subsystem/Resources/rsaddr.c
+++ b/sys/contrib/dev/acpica/Subsystem/Resources/rsaddr.c
@@ -4,7 +4,7 @@
* AcpiRsAddress16Stream
* AcpiRsAddress32Resource
* AcpiRsAddress32Stream
- * $Revision: 13 $
+ * $Revision: 14 $
*
******************************************************************************/
@@ -12,7 +12,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Resources/rscalc.c b/sys/contrib/dev/acpica/Subsystem/Resources/rscalc.c
index 1f11325..9053fa3 100644
--- a/sys/contrib/dev/acpica/Subsystem/Resources/rscalc.c
+++ b/sys/contrib/dev/acpica/Subsystem/Resources/rscalc.c
@@ -2,7 +2,7 @@
*
* Module Name: rscalc - AcpiRsCalculateByteStreamLength
* AcpiRsCalculateListLength
- * $Revision: 17 $
+ * $Revision: 18 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Resources/rscreate.c b/sys/contrib/dev/acpica/Subsystem/Resources/rscreate.c
index ed3e871..093b7a4 100644
--- a/sys/contrib/dev/acpica/Subsystem/Resources/rscreate.c
+++ b/sys/contrib/dev/acpica/Subsystem/Resources/rscreate.c
@@ -3,7 +3,7 @@
* Module Name: rscreate - AcpiRsCreateResourceList
* AcpiRsCreatePciRoutingTable
* AcpiRsCreateByteStream
- * $Revision: 23 $
+ * $Revision: 24 $
*
******************************************************************************/
@@ -11,7 +11,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -341,10 +341,10 @@ AcpiRsCreatePciRoutingTable (
/*
* Dereference the Address
*/
- if (ACPI_TYPE_NUMBER == (*SubObjectList)->Common.Type)
+ if (ACPI_TYPE_INTEGER == (*SubObjectList)->Common.Type)
{
UserPrt->Data.Address =
- (*SubObjectList)->Number.Value;
+ (*SubObjectList)->Integer.Value;
}
else
@@ -357,10 +357,10 @@ AcpiRsCreatePciRoutingTable (
*/
SubObjectList++;
- if (ACPI_TYPE_NUMBER == (*SubObjectList)->Common.Type)
+ if (ACPI_TYPE_INTEGER == (*SubObjectList)->Common.Type)
{
UserPrt->Data.Pin =
- (UINT32) (*SubObjectList)->Number.Value;
+ (UINT32) (*SubObjectList)->Integer.Value;
}
else
@@ -391,7 +391,7 @@ AcpiRsCreatePciRoutingTable (
* is NULL, since the entire buffer was zeroed
* out, we can leave this alone.
*/
- if (ACPI_TYPE_NUMBER == (*SubObjectList)->Common.Type)
+ if (ACPI_TYPE_INTEGER == (*SubObjectList)->Common.Type)
{
/*
* Add to the Length field the length of
@@ -415,10 +415,10 @@ AcpiRsCreatePciRoutingTable (
*/
SubObjectList++;
- if (ACPI_TYPE_NUMBER == (*SubObjectList)->Common.Type)
+ if (ACPI_TYPE_INTEGER == (*SubObjectList)->Common.Type)
{
UserPrt->Data.SourceIndex =
- (UINT32) (*SubObjectList)->Number.Value;
+ (UINT32) (*SubObjectList)->Integer.Value;
}
else
diff --git a/sys/contrib/dev/acpica/Subsystem/Resources/rsdump.c b/sys/contrib/dev/acpica/Subsystem/Resources/rsdump.c
index 03480d8..94d28b9 100644
--- a/sys/contrib/dev/acpica/Subsystem/Resources/rsdump.c
+++ b/sys/contrib/dev/acpica/Subsystem/Resources/rsdump.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsdump - Functions do dump out the resource structures.
- * $Revision: 14 $
+ * $Revision: 15 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Resources/rsio.c b/sys/contrib/dev/acpica/Subsystem/Resources/rsio.c
index bdba47f..9244f58 100644
--- a/sys/contrib/dev/acpica/Subsystem/Resources/rsio.c
+++ b/sys/contrib/dev/acpica/Subsystem/Resources/rsio.c
@@ -6,7 +6,7 @@
* AcpiRsFixedIoStream
* AcpiRsDmaResource
* AcpiRsDmaStream
- * $Revision: 11 $
+ * $Revision: 12 $
*
******************************************************************************/
@@ -14,7 +14,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Resources/rsirq.c b/sys/contrib/dev/acpica/Subsystem/Resources/rsirq.c
index 4ab2a96..586195e 100644
--- a/sys/contrib/dev/acpica/Subsystem/Resources/rsirq.c
+++ b/sys/contrib/dev/acpica/Subsystem/Resources/rsirq.c
@@ -4,7 +4,7 @@
* AcpiRsIrqStream
* AcpiRsExtendedIrqResource
* AcpiRsExtendedIrqStream
- * $Revision: 12 $
+ * $Revision: 13 $
*
******************************************************************************/
@@ -12,7 +12,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Resources/rslist.c b/sys/contrib/dev/acpica/Subsystem/Resources/rslist.c
index 890457a..0647d63 100644
--- a/sys/contrib/dev/acpica/Subsystem/Resources/rslist.c
+++ b/sys/contrib/dev/acpica/Subsystem/Resources/rslist.c
@@ -2,7 +2,7 @@
*
* Module Name: rslist - AcpiRsByteStreamToList
* AcpiListToByteStream
- * $Revision: 9 $
+ * $Revision: 10 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Resources/rsmemory.c b/sys/contrib/dev/acpica/Subsystem/Resources/rsmemory.c
index 3228d3d..21af073 100644
--- a/sys/contrib/dev/acpica/Subsystem/Resources/rsmemory.c
+++ b/sys/contrib/dev/acpica/Subsystem/Resources/rsmemory.c
@@ -6,7 +6,7 @@
* AcpiRsFixedMemory32Resource
* AcpiRsMemory32RangeStream
* AcpiRsFixedMemory32Stream
- * $Revision: 11 $
+ * $Revision: 12 $
*
******************************************************************************/
@@ -14,7 +14,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Resources/rsmisc.c b/sys/contrib/dev/acpica/Subsystem/Resources/rsmisc.c
index 144c26b..2336ab9 100644
--- a/sys/contrib/dev/acpica/Subsystem/Resources/rsmisc.c
+++ b/sys/contrib/dev/acpica/Subsystem/Resources/rsmisc.c
@@ -8,7 +8,7 @@
* AcpiRsEndDependentFunctionsResource
* AcpiRsStartDependentFunctionsStream
* AcpiRsEndDependentFunctionsStream
- * $Revision: 11 $
+ * $Revision: 12 $
*
******************************************************************************/
@@ -16,7 +16,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Resources/rsutils.c b/sys/contrib/dev/acpica/Subsystem/Resources/rsutils.c
index 7346311..fb14be3 100644
--- a/sys/contrib/dev/acpica/Subsystem/Resources/rsutils.c
+++ b/sys/contrib/dev/acpica/Subsystem/Resources/rsutils.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsutils - Utilities for the resource manager
- * $Revision: 13 $
+ * $Revision: 14 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Resources/rsxface.c b/sys/contrib/dev/acpica/Subsystem/Resources/rsxface.c
index e99c261..fa7c7cf 100644
--- a/sys/contrib/dev/acpica/Subsystem/Resources/rsxface.c
+++ b/sys/contrib/dev/acpica/Subsystem/Resources/rsxface.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsxface - Public interfaces to the ACPI subsystem
- * $Revision: 9 $
+ * $Revision: 10 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Tables/tbconvrt.c b/sys/contrib/dev/acpica/Subsystem/Tables/tbconvrt.c
index 2b439f0..c298c35 100644
--- a/sys/contrib/dev/acpica/Subsystem/Tables/tbconvrt.c
+++ b/sys/contrib/dev/acpica/Subsystem/Tables/tbconvrt.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbconvrt - ACPI Table conversion utilities
- * $Revision: 16 $
+ * $Revision: 19 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -139,7 +139,7 @@
a.RegisterBitWidth = (UINT8) MUL_8 (b);\
a.RegisterBitOffset = 0;\
a.Reserved = 0;\
- a.Address = (UINT64) c;}
+ ACPI_STORE_ADDRESS (a.Address,c);}
/* ACPI V1.0 entries -- address space is always I/O */
@@ -222,8 +222,8 @@ AcpiTbConvertToXsdt (
NewTable->TableOffsetEntry[i] =
((RSDT_DESCRIPTOR_REV071 *) TableInfo->Pointer)->TableOffsetEntry[i];
#else
- NewTable->TableOffsetEntry[i] =
- ((RSDT_DESCRIPTOR_REV1 *) TableInfo->Pointer)->TableOffsetEntry[i];
+ ACPI_STORE_ADDRESS (NewTable->TableOffsetEntry[i],
+ ((RSDT_DESCRIPTOR_REV1 *) TableInfo->Pointer)->TableOffsetEntry[i]);
#endif
}
else
@@ -415,11 +415,11 @@ AcpiTbConvertTableFadt (void)
/* No 0.71 equivalence. Leave pre-zeroed. */
/* FADT2->FlushStride = 0; */
- /* Processor’s duty cycle index in processor's P_CNT reg*/
+ /* Processor's duty cycle index in processor's P_CNT reg*/
/* No 0.71 equivalence. Leave pre-zeroed. */
/* FADT2->DutyOffset = 0; */
- /* Processor’s duty cycle value bit width in P_CNT register.*/
+ /* Processor's duty cycle value bit width in P_CNT register.*/
/* No 0.71 equivalence. Leave pre-zeroed. */
/* FADT2->DutyWidth = 0; */
@@ -487,8 +487,8 @@ AcpiTbConvertTableFadt (void)
/* Convert table pointers to 64-bit fields */
- FADT2->XFirmwareCtrl = (UINT64) FADT1->FirmwareCtrl;
- FADT2->XDsdt = (UINT64) FADT1->Dsdt;
+ ACPI_STORE_ADDRESS (FADT2->XFirmwareCtrl, FADT1->FirmwareCtrl);
+ ACPI_STORE_ADDRESS (FADT2->XDsdt, FADT1->Dsdt);
/* System Interrupt Model isn't used in ACPI 2.0*/
/* FADT2->Reserved1 = 0; */
@@ -551,6 +551,7 @@ AcpiTbConvertTableFadt (void)
* Global FADT pointer will point to the common V2.0 FADT
*/
AcpiGbl_FADT = FADT2;
+ AcpiGbl_FADT->header.Length = sizeof (FADT_DESCRIPTOR);
/* Free the original table */
@@ -567,17 +568,12 @@ AcpiTbConvertTableFadt (void)
TableDesc->Length = sizeof (FADT_DESCRIPTOR_REV2);
- /* Dump the FADT Header */
-
- DEBUG_PRINT (TRACE_TABLES, ("Hex dump of FADT Header:\n"));
- DUMP_BUFFER ((UINT8 *) AcpiGbl_FADT, sizeof (ACPI_TABLE_HEADER));
-
/* Dump the entire FADT */
DEBUG_PRINT (TRACE_TABLES,
- ("Hex dump of FADT (After header), size %d (%X)\n",
+ ("Hex dump of common internal FADT, size %ld (%lX)\n",
AcpiGbl_FADT->header.Length, AcpiGbl_FADT->header.Length));
- DUMP_BUFFER ((UINT8 *) (&AcpiGbl_FADT->V1_FirmwareCtrl), AcpiGbl_FADT->header.Length);
+ DUMP_BUFFER ((UINT8 *) (AcpiGbl_FADT), AcpiGbl_FADT->header.Length);
return_ACPI_STATUS (AE_OK);
diff --git a/sys/contrib/dev/acpica/Subsystem/Tables/tbget.c b/sys/contrib/dev/acpica/Subsystem/Tables/tbget.c
index 0325244..965470c 100644
--- a/sys/contrib/dev/acpica/Subsystem/Tables/tbget.c
+++ b/sys/contrib/dev/acpica/Subsystem/Tables/tbget.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbget - ACPI Table get* routines
- * $Revision: 41 $
+ * $Revision: 43 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -357,7 +357,7 @@ AcpiTbGetAllTables (
/* Get the table via the XSDT */
Status = AcpiTbGetTable ((ACPI_PHYSICAL_ADDRESS)
- AcpiGbl_XSDT->TableOffsetEntry[Index],
+ ACPI_GET_ADDRESS (AcpiGbl_XSDT->TableOffsetEntry[Index]),
TablePtr, &TableInfo);
/* Ignore a table that failed verification */
@@ -447,7 +447,8 @@ AcpiTbGetAllTables (
* Get the DSDT (We know that the FADT is valid now)
*/
- Status = AcpiTbGetTable (AcpiGbl_FADT->XDsdt, TablePtr, &TableInfo);
+ Status = AcpiTbGetTable ((ACPI_PHYSICAL_ADDRESS) ACPI_GET_ADDRESS (AcpiGbl_FADT->XDsdt),
+ TablePtr, &TableInfo);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -618,14 +619,15 @@ AcpiTbGetTableRsdt (
/* 0.71 RSDP has 64bit Rsdt address field */
PhysicalAddress = ((RSDP_DESCRIPTOR_REV071 *)AcpiGbl_RSDP)->RsdtPhysicalAddress;
#else
- PhysicalAddress = AcpiGbl_RSDP->RsdtPhysicalAddress;
+ PhysicalAddress = (ACPI_PHYSICAL_ADDRESS) AcpiGbl_RSDP->RsdtPhysicalAddress;
#endif
TableSignature = RSDT_SIG;
SignatureLength = sizeof (RSDT_SIG) -1;
}
else
{
- PhysicalAddress = (ACPI_PHYSICAL_ADDRESS) AcpiGbl_RSDP->XsdtPhysicalAddress;
+ PhysicalAddress = (ACPI_PHYSICAL_ADDRESS)
+ ACPI_GET_ADDRESS (AcpiGbl_RSDP->XsdtPhysicalAddress);
TableSignature = XSDT_SIG;
SignatureLength = sizeof (XSDT_SIG) -1;
}
@@ -753,7 +755,7 @@ AcpiTbGetTableFacs (
{
/* Just map the physical memory to our address space */
- Status = AcpiTbMapAcpiTable (AcpiGbl_FADT->XFirmwareCtrl,
+ Status = AcpiTbMapAcpiTable ((ACPI_PHYSICAL_ADDRESS) ACPI_GET_ADDRESS (AcpiGbl_FADT->XFirmwareCtrl),
&Size, &TablePtr);
if (ACPI_FAILURE(Status))
{
diff --git a/sys/contrib/dev/acpica/Subsystem/Tables/tbinstal.c b/sys/contrib/dev/acpica/Subsystem/Tables/tbinstal.c
index 440b050..2df0fca 100644
--- a/sys/contrib/dev/acpica/Subsystem/Tables/tbinstal.c
+++ b/sys/contrib/dev/acpica/Subsystem/Tables/tbinstal.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbinstal - ACPI table installation and removal
- * $Revision: 35 $
+ * $Revision: 36 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Tables/tbutils.c b/sys/contrib/dev/acpica/Subsystem/Tables/tbutils.c
index 62a2d46..9bf9c75 100644
--- a/sys/contrib/dev/acpica/Subsystem/Tables/tbutils.c
+++ b/sys/contrib/dev/acpica/Subsystem/Tables/tbutils.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbutils - Table manipulation utilities
- * $Revision: 32 $
+ * $Revision: 33 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Tables/tbxface.c b/sys/contrib/dev/acpica/Subsystem/Tables/tbxface.c
index 333b5ee..d2bc9cb 100644
--- a/sys/contrib/dev/acpica/Subsystem/Tables/tbxface.c
+++ b/sys/contrib/dev/acpica/Subsystem/Tables/tbxface.c
@@ -2,7 +2,7 @@
*
* Module Name: tbxface - Public interfaces to the ACPI subsystem
* ACPI table oriented interfaces
- * $Revision: 33 $
+ * $Revision: 34 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/Subsystem/Tables/tbxfroot.c b/sys/contrib/dev/acpica/Subsystem/Tables/tbxfroot.c
index 4e0804c..4bcf9c9 100644
--- a/sys/contrib/dev/acpica/Subsystem/Tables/tbxfroot.c
+++ b/sys/contrib/dev/acpica/Subsystem/Tables/tbxfroot.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbxfroot - Find the root ACPI table (RSDT)
- * $Revision: 34 $
+ * $Revision: 35 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/acconfig.h b/sys/contrib/dev/acpica/acconfig.h
index 18292b4..77b4916 100644
--- a/sys/contrib/dev/acpica/acconfig.h
+++ b/sys/contrib/dev/acpica/acconfig.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acconfig.h - Global configuration constants
- * $Revision: 49 $
+ * $Revision: 53 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -144,7 +144,7 @@
/* Version string */
-#define ACPI_CA_VERSION __DATE__
+#define ACPI_CA_VERSION 0x20010125
/* Maximum objects in the various object caches */
@@ -213,6 +213,10 @@
#define MTH_NUM_ARGS 7
#define MTH_MAX_ARG 6
+/* Maximum length of resulting string when converting from a buffer */
+
+#define ACPI_MAX_STRING_CONVERSION 200
+
/*
* Operand Stack (in WALK_STATE), Must be large enough to contain MTH_MAX_ARG
*/
diff --git a/sys/contrib/dev/acpica/acdebug.h b/sys/contrib/dev/acpica/acdebug.h
index 59b402c..453710e 100644
--- a/sys/contrib/dev/acpica/acdebug.h
+++ b/sys/contrib/dev/acpica/acdebug.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acdebug.h - ACPI/AML debugger
- * $Revision: 38 $
+ * $Revision: 39 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/acdispat.h b/sys/contrib/dev/acpica/acdispat.h
index c268ced..0a7b4d5 100644
--- a/sys/contrib/dev/acpica/acdispat.h
+++ b/sys/contrib/dev/acpica/acdispat.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acdispat.h - dispatcher (parser to interpreter interface)
- * $Revision: 34 $
+ * $Revision: 35 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/acefi.h b/sys/contrib/dev/acpica/acefi.h
index 18a55d5..f0611f6 100644
--- a/sys/contrib/dev/acpica/acefi.h
+++ b/sys/contrib/dev/acpica/acefi.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acefi.h - OS specific defines, etc.
- * $Revision: 5 $
+ * $Revision: 6 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/acenv.h b/sys/contrib/dev/acpica/acenv.h
index 5290200..f49098a 100644
--- a/sys/contrib/dev/acpica/acenv.h
+++ b/sys/contrib/dev/acpica/acenv.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acenv.h - Generation environment specific items
- * $Revision: 66 $
+ * $Revision: 70 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -119,7 +119,7 @@
/*
- * Configuration for ACPI Utilities
+ * Configuration for ACPI tools and utilities
*/
#ifdef _ACPI_DUMP_APP
@@ -146,6 +146,16 @@
#define ACPI_USE_SYSTEM_CLIBRARY
#endif
+/*
+ * Memory allocation tracking. Used only if
+ * 1) This is the debug version
+ * 2) This is NOT a 16-bit version of the code (not enough real-mode memory)
+ */
+#ifdef ACPI_DEBUG
+#ifndef _IA16
+#define ACPI_DEBUG_TRACK_ALLOCATIONS
+#endif
+#endif
/*
* Environment configuration. The purpose of this file is to interface to the
@@ -245,17 +255,17 @@
#define STRUPR(s) strupr((s))
#define STRLEN(s) strlen((s))
#define STRCPY(d,s) strcpy((d), (s))
-#define STRNCPY(d,s,n) strncpy((d), (s), (n))
-#define STRNCMP(d,s,n) strncmp((d), (s), (n))
+#define STRNCPY(d,s,n) strncpy((d), (s), (NATIVE_INT)(n))
+#define STRNCMP(d,s,n) strncmp((d), (s), (NATIVE_INT)(n))
#define STRCMP(d,s) strcmp((d), (s))
#define STRCAT(d,s) strcat((d), (s))
-#define STRNCAT(d,s,n) strncat((d), (s), (n))
-#define STRTOUL(d,s,n) strtoul((d), (s), (n))
-#define MEMCPY(d,s,n) memcpy((d), (s), (n))
-#define MEMSET(d,s,n) memset((d), (s), (n))
+#define STRNCAT(d,s,n) strncat((d), (s), (NATIVE_INT)(n))
+#define STRTOUL(d,s,n) strtoul((d), (s), (NATIVE_INT)(n))
+#define MEMCPY(d,s,n) memcpy((d), (s), (NATIVE_INT)(n))
+#define MEMSET(d,s,n) memset((d), (s), (NATIVE_INT)(n))
#define TOUPPER toupper
#define TOLOWER tolower
-
+#define IS_XDIGIT isxdigit
/******************************************************************************
*
diff --git a/sys/contrib/dev/acpica/acevents.h b/sys/contrib/dev/acpica/acevents.h
index eff1361..846b399 100644
--- a/sys/contrib/dev/acpica/acevents.h
+++ b/sys/contrib/dev/acpica/acevents.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acevents.h - Event subcomponent prototypes and defines
- * $Revision: 62 $
+ * $Revision: 63 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/acexcep.h b/sys/contrib/dev/acpica/acexcep.h
index 0269136..13dbf75 100644
--- a/sys/contrib/dev/acpica/acexcep.h
+++ b/sys/contrib/dev/acpica/acexcep.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acexcep.h - Exception codes returned by the ACPI subsystem
- * $Revision: 38 $
+ * $Revision: 41 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -207,8 +207,10 @@
#define AE_AML_NAME_NOT_FOUND (ACPI_STATUS) (0x0010 | AE_CODE_AML)
#define AE_AML_INTERNAL (ACPI_STATUS) (0x0011 | AE_CODE_AML)
#define AE_AML_INVALID_SPACE_ID (ACPI_STATUS) (0x0012 | AE_CODE_AML)
+#define AE_AML_STRING_LIMIT (ACPI_STATUS) (0x0013 | AE_CODE_AML)
+#define AE_AML_NO_RETURN_VALUE (ACPI_STATUS) (0x0014 | AE_CODE_AML)
-#define AE_CODE_AML_MAX 0x0012
+#define AE_CODE_AML_MAX 0x0014
/*
* Internal exceptions used for control
@@ -293,6 +295,8 @@ static NATIVE_CHAR *AcpiGbl_ExceptionNames_Aml[] =
"AE_AML_NAME_NOT_FOUND",
"AE_AML_INTERNAL",
"AE_AML_INVALID_SPACE_ID",
+ "AE_AML_STRING_LIMIT",
+ "AE_AML_NO_RETURN_VALUE",
};
static NATIVE_CHAR *AcpiGbl_ExceptionNames_Ctrl[] =
diff --git a/sys/contrib/dev/acpica/acfreebsd.h b/sys/contrib/dev/acpica/acfreebsd.h
index fdd5557..ca6c799 100644
--- a/sys/contrib/dev/acpica/acfreebsd.h
+++ b/sys/contrib/dev/acpica/acfreebsd.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acfreebsd.h - OS specific defines, etc.
- * $Revision: 2 $
+ * $Revision: 4 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/acgcc.h b/sys/contrib/dev/acpica/acgcc.h
index aa7342a..55073fd 100644
--- a/sys/contrib/dev/acpica/acgcc.h
+++ b/sys/contrib/dev/acpica/acgcc.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acgcc.h - GCC specific defines, etc.
- * $Revision: 3 $
+ * $Revision: 4 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/acglobal.h b/sys/contrib/dev/acpica/acglobal.h
index 1143d02..ee2035f 100644
--- a/sys/contrib/dev/acpica/acglobal.h
+++ b/sys/contrib/dev/acpica/acglobal.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acglobal.h - Declarations for global variables
- * $Revision: 93 $
+ * $Revision: 96 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -245,7 +245,6 @@ ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockSet; /* TBD: [Restruct
ACPI_EXTERN BOOLEAN AcpiGbl_StepToNextCall;
ACPI_EXTERN BOOLEAN AcpiGbl_AcpiHardwarePresent;
-
ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER AcpiGbl_DrvNotify;
ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER AcpiGbl_SysNotify;
@@ -253,7 +252,8 @@ ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER AcpiGbl_SysNotify;
extern BOOLEAN AcpiGbl_Shutdown;
extern UINT32 AcpiGbl_SystemFlags;
extern UINT32 AcpiGbl_StartupFlags;
-extern UINT8 AcpiGbl_DecodeTo8bit[];
+extern UINT8 AcpiGbl_DecodeTo8bit[8];
+extern NATIVE_CHAR AcpiGbl_HexToAscii[];
/*****************************************************************************
diff --git a/sys/contrib/dev/acpica/achware.h b/sys/contrib/dev/acpica/achware.h
index 35c88cd..bcefafa 100644
--- a/sys/contrib/dev/acpica/achware.h
+++ b/sys/contrib/dev/acpica/achware.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: achware.h -- hardware specific interfaces
- * $Revision: 49 $
+ * $Revision: 53 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -118,6 +118,10 @@
#define __ACHWARE_H__
+/* PM Timer ticks per second (HZ) */
+#define PM_TIMER_FREQUENCY 3579545
+
+
/* Prototypes */
@@ -183,6 +187,11 @@ void
AcpiHwClearAcpiStatus (
void);
+UINT32
+AcpiHwGetBitShift (
+ UINT32 Mask);
+
+
/* GPE support */
@@ -212,89 +221,21 @@ AcpiHwObtainSleepTypeRegisterData (
UINT8 *Slp_TypB);
-/* Cx State Prototypes */
-
-ACPI_STATUS
-AcpiHwEnterC1(
- ACPI_IO_ADDRESS PblkAddress,
- UINT32 *PmTimerTicks);
-
-ACPI_STATUS
-AcpiHwEnterC2(
- ACPI_IO_ADDRESS PblkAddress,
- UINT32 *PmTimerTicks);
-
-ACPI_STATUS
-AcpiHwEnterC3(
- ACPI_IO_ADDRESS PblkAddress,
- UINT32 *PmTimerTicks);
-
-ACPI_STATUS
-AcpiHwEnterCx (
- ACPI_IO_ADDRESS PblkAddress,
- UINT32 *PmTimerTicks);
-
-ACPI_STATUS
-AcpiHwSetCx (
- UINT32 CxState);
-
-ACPI_STATUS
-AcpiHwGetCxInfo (
- UINT32 CxStates[]);
+/* ACPI Timer prototypes */
ACPI_STATUS
-AcpiHwGetCxHandler (
- UINT32 CxState,
- ACPI_C_STATE_HANDLER *Handler);
+AcpiGetTimerResolution (
+ UINT32 *Resolution);
ACPI_STATUS
-AcpiHwSetCxHandler (
- UINT32 CxState,
- ACPI_C_STATE_HANDLER Handler);
-
-
-/* Throttling Prototypes */
-
-void
-AcpiHwEnableThrottling (
- ACPI_IO_ADDRESS PblkAddress);
-
-void
-AcpiHwDisableThrottling (
- ACPI_IO_ADDRESS PblkAddress);
-
-UINT32
-AcpiHwGetDutyCycle (
- UINT8 DutyOffset,
- ACPI_IO_ADDRESS PblkAddress,
- UINT32 NumThrottleStates);
-
-void
-AcpiHwProgramDutyCycle (
- UINT8 DutyOffset,
- UINT32 DutyCycle,
- ACPI_IO_ADDRESS PblkAddress,
- UINT32 NumThrottleStates);
-
-NATIVE_UINT
-AcpiHwLocalPow (
- NATIVE_UINT x,
- NATIVE_UINT y);
-
-
-/* ACPI Timer prototypes */
-
-UINT32
-AcpiHwPmtTicks (
- void);
-
-UINT32
-AcpiHwPmtResolution (
- void);
+AcpiGetTimer (
+ UINT32 *Ticks);
ACPI_STATUS
-AcpiGetTimer (
- UINT32 *OutTicks);
+AcpiGetTimerDuration (
+ UINT32 StartTicks,
+ UINT32 EndTicks,
+ UINT32 *TimeElapsed);
#endif /* __ACHWARE_H__ */
diff --git a/sys/contrib/dev/acpica/acinterp.h b/sys/contrib/dev/acpica/acinterp.h
index 941c9df..52cc897 100644
--- a/sys/contrib/dev/acpica/acinterp.h
+++ b/sys/contrib/dev/acpica/acinterp.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acinterp.h - Interpreter subcomponent prototypes and defines
- * $Revision: 87 $
+ * $Revision: 91 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -138,6 +138,7 @@
#define METHOD_DELETE_AT_COMPLETION 0x2
+
ACPI_STATUS
AcpiAmlResolveOperands (
UINT16 Opcode,
@@ -161,9 +162,34 @@ AcpiAmlExecuteMethod (
/*
- * amfield - ACPI AML (p-code) execution - field manipulation
+ * amconvrt - object conversion
*/
+ACPI_STATUS
+AcpiAmlConvertToInteger (
+ ACPI_OPERAND_OBJECT **ObjDesc,
+ ACPI_WALK_STATE *WalkState);
+
+ACPI_STATUS
+AcpiAmlConvertToBuffer (
+ ACPI_OPERAND_OBJECT **ObjDesc,
+ ACPI_WALK_STATE *WalkState);
+
+ACPI_STATUS
+AcpiAmlConvertToString (
+ ACPI_OPERAND_OBJECT **ObjDesc,
+ ACPI_WALK_STATE *WalkState);
+
+ACPI_STATUS
+AcpiAmlConvertToTargetType (
+ OBJECT_TYPE_INTERNAL DestinationType,
+ ACPI_OPERAND_OBJECT **ObjDesc,
+ ACPI_WALK_STATE *WalkState);
+
+
+/*
+ * amfield - ACPI AML (p-code) execution - field manipulation
+ */
ACPI_STATUS
AcpiAmlReadField (
@@ -510,17 +536,75 @@ AcpiAmlExecStore (
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
-AcpiAmlStoreObjectToObject (
+AcpiAmlStoreObjectToIndex (
ACPI_OPERAND_OBJECT *ValDesc,
ACPI_OPERAND_OBJECT *DestDesc,
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
AcpiAmlStoreObjectToNode (
- ACPI_OPERAND_OBJECT *ValDesc,
+ ACPI_OPERAND_OBJECT *SourceDesc,
ACPI_NAMESPACE_NODE *Node,
ACPI_WALK_STATE *WalkState);
+ACPI_STATUS
+AcpiAmlStoreObjectToObject (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *DestDesc,
+ ACPI_WALK_STATE *WalkState);
+
+
+/*
+ *
+ */
+
+ACPI_STATUS
+AcpiAmlResolveObject (
+ ACPI_OPERAND_OBJECT **SourceDescPtr,
+ OBJECT_TYPE_INTERNAL TargetType,
+ ACPI_WALK_STATE *WalkState);
+
+ACPI_STATUS
+AcpiAmlStoreObject (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ OBJECT_TYPE_INTERNAL TargetType,
+ ACPI_OPERAND_OBJECT **TargetDescPtr,
+ ACPI_WALK_STATE *WalkState);
+
+
+/*
+ * amcopy - object copy
+ */
+
+ACPI_STATUS
+AcpiAmlCopyBufferToBuffer (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *TargetDesc);
+
+ACPI_STATUS
+AcpiAmlCopyStringToString (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *TargetDesc);
+
+ACPI_STATUS
+AcpiAmlCopyIntegerToIndexField (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *TargetDesc);
+
+ACPI_STATUS
+AcpiAmlCopyIntegerToBankField (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *TargetDesc);
+
+ACPI_STATUS
+AcpiAmlCopyDataToNamedField (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_NAMESPACE_NODE *Node);
+
+ACPI_STATUS
+AcpiAmlCopyIntegerToFieldUnit (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *TargetDesc);
/*
* amutils - interpreter/scanner utilities
diff --git a/sys/contrib/dev/acpica/aclocal.h b/sys/contrib/dev/acpica/aclocal.h
index 946cf4b..869737b 100644
--- a/sys/contrib/dev/acpica/aclocal.h
+++ b/sys/contrib/dev/acpica/aclocal.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: aclocal.h - Internal data types used across the ACPI subsystem
- * $Revision: 94 $
+ * $Revision: 100 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -165,7 +165,7 @@ typedef UINT32 ACPI_MUTEX_HANDLE;
#define NUM_MTX MAX_MTX+1
-#ifdef ACPI_DEBUG
+#if defined(ACPI_DEBUG) || defined(ENABLE_DEBUGGER)
#ifdef DEFINE_ACPI_GLOBALS
/* Names for the mutexes used in the subsystem */
@@ -269,8 +269,11 @@ typedef struct acpi_node
#define ANOBJ_AML_ATTACHMENT 0x01
#define ANOBJ_END_OF_PEER_LIST 0x02
#define ANOBJ_DATA_WIDTH_32 0x04 /* Parent table is 64-bits */
-#define ANOBJ_METHOD_ARG 0x40
-#define ANOBJ_METHOD_LOCAL 0x80
+#define ANOBJ_METHOD_ARG 0x08
+#define ANOBJ_METHOD_LOCAL 0x10
+#define ANOBJ_METHOD_NO_RETVAL 0x20
+#define ANOBJ_METHOD_SOME_NO_RETVAL 0x40
+
/*
* ACPI Table Descriptor. One per ACPI table
@@ -564,7 +567,9 @@ typedef struct acpi_opcode_info
UINT32 ParseArgs; /* Grammar/Parse time arguments */
UINT32 RuntimeArgs; /* Interpret time arguments */
- DEBUG_ONLY_MEMBERS (NATIVE_CHAR *Name) /* op name (debug only) */
+#ifdef _OPCODE_NAMES
+ NATIVE_CHAR *Name; /* op name (debug only) */
+#endif
} ACPI_OPCODE_INFO;
@@ -679,6 +684,7 @@ typedef struct acpi_walk_state
ACPI_GENERIC_STATE *ScopeInfo; /* Stack of nested scopes */
ACPI_PARSE_STATE *ParserState; /* Current state of parser */
UINT8 *AmlLastWhile;
+ ACPI_OPCODE_INFO *OpInfo; /* Info on current opcode */
ACPI_PARSE_DOWNWARDS DescendingCallback;
ACPI_PARSE_UPWARDS AscendingCallback;
@@ -693,6 +699,7 @@ typedef struct acpi_walk_state
UINT32 ParseFlags;
UINT8 WalkType;
UINT8 ReturnUsed;
+ UINT16 Opcode; /* Current AML opcode */
UINT32 PrevArgTypes;
/* Debug support */
@@ -816,14 +823,16 @@ typedef struct acpi_get_devices_info
#define PM1_STS 0x0100
#define PM1_EN 0x0200
#define PM1_CONTROL 0x0300
-#define PM2_CONTROL 0x0400
-#define PM_TIMER 0x0500
-#define PROCESSOR_BLOCK 0x0600
-#define GPE0_STS_BLOCK 0x0700
-#define GPE0_EN_BLOCK 0x0800
-#define GPE1_STS_BLOCK 0x0900
-#define GPE1_EN_BLOCK 0x0A00
-#define SMI_CMD_BLOCK 0x0B00
+#define PM1A_CONTROL 0x0400
+#define PM1B_CONTROL 0x0500
+#define PM2_CONTROL 0x0600
+#define PM_TIMER 0x0700
+#define PROCESSOR_BLOCK 0x0800
+#define GPE0_STS_BLOCK 0x0900
+#define GPE0_EN_BLOCK 0x0A00
+#define GPE1_STS_BLOCK 0x0B00
+#define GPE1_EN_BLOCK 0x0C00
+#define SMI_CMD_BLOCK 0x0D00
/*
* Address space bitmasks for mmio or io spaces
@@ -839,66 +848,66 @@ typedef struct acpi_get_devices_info
/*
* Control bit definitions
*/
-#define TMR_STS (PM1_STS | 0x01)
-#define BM_STS (PM1_STS | 0x02)
-#define GBL_STS (PM1_STS | 0x03)
-#define PWRBTN_STS (PM1_STS | 0x04)
-#define SLPBTN_STS (PM1_STS | 0x05)
-#define RTC_STS (PM1_STS | 0x06)
-#define WAK_STS (PM1_STS | 0x07)
-
-#define TMR_EN (PM1_EN | 0x01)
- /* no BM_EN */
-#define GBL_EN (PM1_EN | 0x03)
-#define PWRBTN_EN (PM1_EN | 0x04)
-#define SLPBTN_EN (PM1_EN | 0x05)
-#define RTC_EN (PM1_EN | 0x06)
-#define WAK_EN (PM1_EN | 0x07)
-
-#define SCI_EN (PM1_CONTROL | 0x01)
-#define BM_RLD (PM1_CONTROL | 0x02)
-#define GBL_RLS (PM1_CONTROL | 0x03)
-#define SLP_TYPE_A (PM1_CONTROL | 0x04)
-#define SLP_TYPE_B (PM1_CONTROL | 0x05)
-#define SLP_EN (PM1_CONTROL | 0x06)
-
-#define ARB_DIS (PM2_CONTROL | 0x01)
-
-#define TMR_VAL (PM_TIMER | 0x01)
-
-#define GPE0_STS (GPE0_STS_BLOCK | 0x01)
-#define GPE0_EN (GPE0_EN_BLOCK | 0x01)
-
-#define GPE1_STS (GPE1_STS_BLOCK | 0x01)
-#define GPE1_EN (GPE1_EN_BLOCK | 0x01)
-
-
-#define TMR_STS_MASK 0x0001
-#define BM_STS_MASK 0x0010
-#define GBL_STS_MASK 0x0020
-#define PWRBTN_STS_MASK 0x0100
-#define SLPBTN_STS_MASK 0x0200
-#define RTC_STS_MASK 0x0400
-#define WAK_STS_MASK 0x8000
-
-#define ALL_FIXED_STS_BITS (TMR_STS_MASK | BM_STS_MASK | GBL_STS_MASK \
- | PWRBTN_STS_MASK | SLPBTN_STS_MASK \
- | RTC_STS_MASK | WAK_STS_MASK)
-
-#define TMR_EN_MASK 0x0001
-#define GBL_EN_MASK 0x0020
-#define PWRBTN_EN_MASK 0x0100
-#define SLPBTN_EN_MASK 0x0200
-#define RTC_EN_MASK 0x0400
-
-#define SCI_EN_MASK 0x0001
-#define BM_RLD_MASK 0x0002
-#define GBL_RLS_MASK 0x0004
-#define SLP_TYPE_X_MASK 0x1C00
-#define SLP_EN_MASK 0x2000
-
-#define ARB_DIS_MASK 0x0001
-#define TMR_VAL_MASK 0xFFFFFFFF
+#define TMR_STS (PM1_STS | 0x01)
+#define BM_STS (PM1_STS | 0x02)
+#define GBL_STS (PM1_STS | 0x03)
+#define PWRBTN_STS (PM1_STS | 0x04)
+#define SLPBTN_STS (PM1_STS | 0x05)
+#define RTC_STS (PM1_STS | 0x06)
+#define WAK_STS (PM1_STS | 0x07)
+
+#define TMR_EN (PM1_EN | 0x01)
+ /* no BM_EN */
+#define GBL_EN (PM1_EN | 0x03)
+#define PWRBTN_EN (PM1_EN | 0x04)
+#define SLPBTN_EN (PM1_EN | 0x05)
+#define RTC_EN (PM1_EN | 0x06)
+#define WAK_EN (PM1_EN | 0x07)
+
+#define SCI_EN (PM1_CONTROL | 0x01)
+#define BM_RLD (PM1_CONTROL | 0x02)
+#define GBL_RLS (PM1_CONTROL | 0x03)
+#define SLP_TYPE_A (PM1_CONTROL | 0x04)
+#define SLP_TYPE_B (PM1_CONTROL | 0x05)
+#define SLP_EN (PM1_CONTROL | 0x06)
+
+#define ARB_DIS (PM2_CONTROL | 0x01)
+
+#define TMR_VAL (PM_TIMER | 0x01)
+
+#define GPE0_STS (GPE0_STS_BLOCK | 0x01)
+#define GPE0_EN (GPE0_EN_BLOCK | 0x01)
+
+#define GPE1_STS (GPE1_STS_BLOCK | 0x01)
+#define GPE1_EN (GPE1_EN_BLOCK | 0x01)
+
+
+#define TMR_STS_MASK 0x0001
+#define BM_STS_MASK 0x0010
+#define GBL_STS_MASK 0x0020
+#define PWRBTN_STS_MASK 0x0100
+#define SLPBTN_STS_MASK 0x0200
+#define RTC_STS_MASK 0x0400
+#define WAK_STS_MASK 0x8000
+
+#define ALL_FIXED_STS_BITS (TMR_STS_MASK | BM_STS_MASK | GBL_STS_MASK \
+ | PWRBTN_STS_MASK | SLPBTN_STS_MASK \
+ | RTC_STS_MASK | WAK_STS_MASK)
+
+#define TMR_EN_MASK 0x0001
+#define GBL_EN_MASK 0x0020
+#define PWRBTN_EN_MASK 0x0100
+#define SLPBTN_EN_MASK 0x0200
+#define RTC_EN_MASK 0x0400
+
+#define SCI_EN_MASK 0x0001
+#define BM_RLD_MASK 0x0002
+#define GBL_RLS_MASK 0x0004
+#define SLP_TYPE_X_MASK 0x1C00
+#define SLP_EN_MASK 0x2000
+
+#define ARB_DIS_MASK 0x0001
+#define TMR_VAL_MASK 0xFFFFFFFF
#define GPE0_STS_MASK
#define GPE0_EN_MASK
@@ -907,8 +916,8 @@ typedef struct acpi_get_devices_info
#define GPE1_EN_MASK
-#define ACPI_READ 1
-#define ACPI_WRITE 2
+#define ACPI_READ 1
+#define ACPI_WRITE 2
/* Plug and play */
diff --git a/sys/contrib/dev/acpica/acmacros.h b/sys/contrib/dev/acpica/acmacros.h
index 5ecb027..f30933f 100644
--- a/sys/contrib/dev/acpica/acmacros.h
+++ b/sys/contrib/dev/acpica/acmacros.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acmacros.h - C macros for the entire subsystem.
- * $Revision: 59 $
+ * $Revision: 62 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -121,6 +121,14 @@
* Data manipulation macros
*/
+#ifndef LODWORD
+#define LODWORD(l) ((UINT32)(UINT64)(l))
+#endif
+
+#ifndef HIDWORD
+#define HIDWORD(l) ((UINT32)((((UINT64)(l)) >> 32) & 0xFFFFFFFF))
+#endif
+
#ifndef LOWORD
#define LOWORD(l) ((UINT16)(NATIVE_UINT)(l))
#endif
@@ -155,10 +163,18 @@
#ifdef _IA16
+/*
+ * For 16-bit addresses, we have to assume that the upper 32 bits
+ * are zero.
+ */
#define ACPI_GET_ADDRESS(a) ((a).Lo)
#define ACPI_STORE_ADDRESS(a,b) {(a).Hi=0;(a).Lo=(b);}
-#define ACPI_VALID_ADDRESS(a) ((a).Hi && (a).Lo)
+#define ACPI_VALID_ADDRESS(a) ((a).Hi | (a).Lo)
+
#else
+/*
+ * Full 64-bit address on 32-bit and 64-bit platforms
+ */
#define ACPI_GET_ADDRESS(a) (a)
#define ACPI_STORE_ADDRESS(a,b) ((a)=(b))
#define ACPI_VALID_ADDRESS(a) (a)
@@ -426,7 +442,7 @@
*/
#define return_VOID {FunctionExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName);return;}
#define return_ACPI_STATUS(s) {FunctionStatusExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName,s);return(s);}
-#define return_VALUE(s) {FunctionValueExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName,(NATIVE_UINT)s);return(s);}
+#define return_VALUE(s) {FunctionValueExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName,(ACPI_INTEGER)s);return(s);}
#define return_PTR(s) {FunctionPtrExit(_THIS_MODULE,__LINE__,_COMPONENT,_ProcName,(UINT8 *)s);return(s);}
@@ -437,6 +453,8 @@
#define DEBUG_DEFINE(a) a;
#define DEBUG_ONLY_MEMBERS(a) a;
+#define _OPCODE_NAMES
+#define _VERBOSE_STRUCTURES
/* Stack and buffer dumping */
@@ -549,9 +567,8 @@
*/
#ifdef _IA16
#undef DEBUG_ONLY_MEMBERS
+#undef _VERBOSE_STRUCTURES
#define DEBUG_ONLY_MEMBERS(a)
-#undef OP_INFO_ENTRY
-#define OP_INFO_ENTRY(Flags,Name,PArgs,IArgs) {Flags,PArgs,IArgs}
#endif
diff --git a/sys/contrib/dev/acpica/acnamesp.h b/sys/contrib/dev/acpica/acnamesp.h
index 73d22a0..1f5695d 100644
--- a/sys/contrib/dev/acpica/acnamesp.h
+++ b/sys/contrib/dev/acpica/acnamesp.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acnamesp.h - Namespace subcomponent prototypes and defines
- * $Revision: 99 $
+ * $Revision: 101 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -147,6 +147,7 @@
#define NS_SEARCH_PARENT 0x01
#define NS_DONT_OPEN_SCOPE 0x02
#define NS_NO_PEER_SEARCH 0x04
+#define NS_ERROR_IF_FOUND 0x08
#define NS_WALK_UNLOCK TRUE
#define NS_WALK_NO_UNLOCK FALSE
diff --git a/sys/contrib/dev/acpica/acobject.h b/sys/contrib/dev/acpica/acobject.h
index 10d7b25..d873b11 100644
--- a/sys/contrib/dev/acpica/acobject.h
+++ b/sys/contrib/dev/acpica/acobject.h
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only)
- * $Revision: 76 $
+ * $Revision: 78 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -204,10 +204,10 @@ typedef struct /* NUMBER - has value */
ACPI_INTEGER Value;
-} ACPI_OBJECT_NUMBER;
+} ACPI_OBJECT_INTEGER;
-typedef struct /* STRING - has length and pointer */
+typedef struct /* STRING - has length and pointer - Null terminated, ASCII characters only */
{
ACPI_OBJECT_COMMON_HEADER
@@ -217,13 +217,11 @@ typedef struct /* STRING - has length and pointer */
} ACPI_OBJECT_STRING;
-typedef struct /* BUFFER - has length, sequence, and pointer */
+typedef struct /* BUFFER - has length and pointer - not null terminated */
{
ACPI_OBJECT_COMMON_HEADER
UINT32 Length;
- UINT32 Sequence; /* Sequential count of buffers created */
-
UINT8 *Pointer; /* points to the buffer in allocated space */
} ACPI_OBJECT_BUFFER;
@@ -489,7 +487,7 @@ typedef union acpi_operand_obj
{
ACPI_OBJECT_COMMON Common;
ACPI_OBJECT_CACHE_LIST Cache;
- ACPI_OBJECT_NUMBER Number;
+ ACPI_OBJECT_INTEGER Integer;
ACPI_OBJECT_STRING String;
ACPI_OBJECT_BUFFER Buffer;
ACPI_OBJECT_PACKAGE Package;
diff --git a/sys/contrib/dev/acpica/acoutput.h b/sys/contrib/dev/acpica/acoutput.h
index 704040a..c5b048c 100644
--- a/sys/contrib/dev/acpica/acoutput.h
+++ b/sys/contrib/dev/acpica/acoutput.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acoutput.h -- debug output
- * $Revision: 67 $
+ * $Revision: 69 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -149,6 +149,7 @@
#define BATTERY 0x00040000
#define DEBUGGER 0x00100000
+#define COMPILER 0x00200000
#define ALL_COMPONENTS 0x001FFFFF
#define COMPONENT_DEFAULT (ALL_COMPONENTS)
diff --git a/sys/contrib/dev/acpica/acparser.h b/sys/contrib/dev/acpica/acparser.h
index 8bb9c2a..3089054 100644
--- a/sys/contrib/dev/acpica/acparser.h
+++ b/sys/contrib/dev/acpica/acparser.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: acparser.h - AML Parser subcomponent prototypes and defines
- * $Revision: 48 $
+ * $Revision: 49 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/acpi.h b/sys/contrib/dev/acpica/acpi.h
index 54a10f8..4f32887 100644
--- a/sys/contrib/dev/acpica/acpi.h
+++ b/sys/contrib/dev/acpica/acpi.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acpi.h - Master include file, Publics and external data.
- * $Revision: 49 $
+ * $Revision: 50 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/acpiosxf.h b/sys/contrib/dev/acpica/acpiosxf.h
index abcdee5..8603fb9 100644
--- a/sys/contrib/dev/acpica/acpiosxf.h
+++ b/sys/contrib/dev/acpica/acpiosxf.h
@@ -12,7 +12,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -212,6 +212,10 @@ AcpiOsUnmapMemory (
void *LogicalAddress,
UINT32 Length);
+ACPI_STATUS
+AcpiOsGetPhysicalAddress (
+ void *LogicalAddress,
+ ACPI_PHYSICAL_ADDRESS *PhysicalAddress);
/*
* Interrupt handlers
diff --git a/sys/contrib/dev/acpica/acpixf.h b/sys/contrib/dev/acpica/acpixf.h
index c420640..c33ca3f 100644
--- a/sys/contrib/dev/acpica/acpixf.h
+++ b/sys/contrib/dev/acpica/acpixf.h
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -376,6 +376,10 @@ AcpiGetFirmwareWakingVector (
ACPI_PHYSICAL_ADDRESS *PhysicalAddress);
ACPI_STATUS
+AcpiEnterSleepState (
+ UINT8 SleepState);
+
+ACPI_STATUS
AcpiGetProcessorThrottlingInfo (
ACPI_HANDLE ProcessorHandle,
ACPI_BUFFER *UserBuffer);
diff --git a/sys/contrib/dev/acpica/acresrc.h b/sys/contrib/dev/acpica/acresrc.h
index 119abc1..dd942a9 100644
--- a/sys/contrib/dev/acpica/acresrc.h
+++ b/sys/contrib/dev/acpica/acresrc.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acresrc.h - Resource Manager function prototypes
- * $Revision: 21 $
+ * $Revision: 22 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/actables.h b/sys/contrib/dev/acpica/actables.h
index 519ba30..a2d43da 100644
--- a/sys/contrib/dev/acpica/actables.h
+++ b/sys/contrib/dev/acpica/actables.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actables.h - ACPI table management
- * $Revision: 28 $
+ * $Revision: 29 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/actbl.h b/sys/contrib/dev/acpica/actbl.h
index 6c874a5..bd1d718 100644
--- a/sys/contrib/dev/acpica/actbl.h
+++ b/sys/contrib/dev/acpica/actbl.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actbl.h - Table data structures defined in ACPI specification
- * $Revision: 44 $
+ * $Revision: 45 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/actbl1.h b/sys/contrib/dev/acpica/actbl1.h
index c43f3f6..2468221 100644
--- a/sys/contrib/dev/acpica/actbl1.h
+++ b/sys/contrib/dev/acpica/actbl1.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actbl1.h - ACPI 1.0 tables
- * $Revision: 16 $
+ * $Revision: 17 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/actbl2.h b/sys/contrib/dev/acpica/actbl2.h
index 9b71c5c..43d534c 100644
--- a/sys/contrib/dev/acpica/actbl2.h
+++ b/sys/contrib/dev/acpica/actbl2.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actbl2.h - ACPI Specification Revision 2.0 Tables
- * $Revision: 20 $
+ * $Revision: 21 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/actbl71.h b/sys/contrib/dev/acpica/actbl71.h
index cf7b358..4f9767a 100644
--- a/sys/contrib/dev/acpica/actbl71.h
+++ b/sys/contrib/dev/acpica/actbl71.h
@@ -3,7 +3,7 @@
* Name: actbl71.h - IA-64 Extensions to the ACPI Spec Rev. 0.71
* This file includes tables specific to this
* specification revision.
- * $Revision: 8 $
+ * $Revision: 9 $
*
*****************************************************************************/
@@ -11,7 +11,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/actypes.h b/sys/contrib/dev/acpica/actypes.h
index f52d9d8..d2ddb8b 100644
--- a/sys/contrib/dev/acpica/actypes.h
+++ b/sys/contrib/dev/acpica/actypes.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actypes.h - Common data types for the entire ACPI subsystem
- * $Revision: 159 $
+ * $Revision: 163 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -176,7 +176,7 @@ typedef long INT32;
typedef int INT16;
typedef unsigned long UINT32;
-typedef struct
+typedef struct
{
UINT32 Lo;
UINT32 Hi;
@@ -188,7 +188,7 @@ typedef INT16 NATIVE_INT;
typedef UINT32 ACPI_TBLPTR;
typedef UINT32 ACPI_IO_ADDRESS;
-typedef void *ACPI_PHYSICAL_ADDRESS;
+typedef char *ACPI_PHYSICAL_ADDRESS;
#define ALIGNED_ADDRESS_BOUNDARY 0x00000002
#define _HW_ALIGNMENT_SUPPORT
@@ -340,8 +340,9 @@ typedef UINT64 ACPI_INTEGER;
#define ACPI_STATE_S2 (UINT8) 2
#define ACPI_STATE_S3 (UINT8) 3
#define ACPI_STATE_S4 (UINT8) 4
-#define ACPI_STATE_S4BIOS (UINT8) 5
-#define ACPI_STATE_S5 (UINT8) 6
+#define ACPI_STATE_S5 (UINT8) 5
+/* let's pretend S4BIOS didn't exist for now. ASG */
+#define ACPI_STATE_S4BIOS (UINT8) 6
#define ACPI_S_STATES_MAX ACPI_STATE_S5
@@ -375,8 +376,37 @@ typedef UINT32 ACPI_TABLE_TYPE;
typedef UINT32 ACPI_OBJECT_TYPE;
typedef UINT8 OBJECT_TYPE_INTERNAL;
+#define ACPI_BTYPE_ANY 0x00000000
+#define ACPI_BTYPE_INTEGER 0x00000001
+#define ACPI_BTYPE_STRING 0x00000002
+#define ACPI_BTYPE_BUFFER 0x00000004
+#define ACPI_BTYPE_PACKAGE 0x00000008
+#define ACPI_BTYPE_FIELD_UNIT 0x00000010
+#define ACPI_BTYPE_DEVICE 0x00000020
+#define ACPI_BTYPE_EVENT 0x00000040
+#define ACPI_BTYPE_METHOD 0x00000080
+#define ACPI_BTYPE_MUTEX 0x00000100
+#define ACPI_BTYPE_REGION 0x00000200
+#define ACPI_BTYPE_POWER 0x00000400
+#define ACPI_BTYPE_PROCESSOR 0x00000800
+#define ACPI_BTYPE_THERMAL 0x00001000
+#define ACPI_BTYPE_BUFFER_FIELD 0x00002000
+#define ACPI_BTYPE_DDB_HANDLE 0x00004000
+#define ACPI_BTYPE_DEBUG_OBJECT 0x00008000
+#define ACPI_BTYPE_REFERENCE 0x00010000
+#define ACPI_BTYPE_RESOURCE 0x00020000
+
+#define ACPI_BTYPE_COMPUTE_DATA (ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER)
+
+#define ACPI_BTYPE_DATA (ACPI_BTYPE_COMPUTE_DATA | ACPI_BTYPE_PACKAGE)
+#define ACPI_BTYPE_DATA_REFERENCE (ACPI_BTYPE_DATA | ACPI_BTYPE_REFERENCE | ACPI_BTYPE_DDB_HANDLE)
+#define ACPI_BTYPE_DEVICE_OBJECTS (ACPI_BTYPE_DEVICE | ACPI_BTYPE_THERMAL | ACPI_BTYPE_PROCESSOR)
+#define ACPI_BTYPE_OBJECTS_AND_REFS 0x00017FFF /* ARG or LOCAL */
+#define ACPI_BTYPE_ALL_OBJECTS 0x00007FFF
+
+
#define ACPI_TYPE_ANY 0 /* 0x00 */
-#define ACPI_TYPE_NUMBER 1 /* 0x01 Byte/Word/Dword/Zero/One/Ones */
+#define ACPI_TYPE_INTEGER 1 /* 0x01 Byte/Word/Dword/Zero/One/Ones */
#define ACPI_TYPE_STRING 2 /* 0x02 */
#define ACPI_TYPE_BUFFER 3 /* 0x03 */
#define ACPI_TYPE_PACKAGE 4 /* 0x04 ByteConst, multiple DataTerm/Constant/SuperName */
@@ -523,7 +553,7 @@ typedef union AcpiObj
{
ACPI_OBJECT_TYPE Type;
ACPI_INTEGER Value; /* The actual number */
- } Number;
+ } Integer;
struct
{
diff --git a/sys/contrib/dev/acpica/acutils.h b/sys/contrib/dev/acpica/acutils.h
index 618a8fb..7ae0299 100644
--- a/sys/contrib/dev/acpica/acutils.h
+++ b/sys/contrib/dev/acpica/acutils.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: accommon.h -- prototypes for the common (subsystem-wide) procedures
- * $Revision: 83 $
+ * $Revision: 87 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -191,6 +191,8 @@ AcpiCmAllocateOwnerId (
* CmClib - Local implementations of C library functions
*/
+#ifndef ACPI_USE_SYSTEM_CLIBRARY
+
NATIVE_UINT
AcpiCmStrlen (
const NATIVE_CHAR *String);
@@ -232,7 +234,7 @@ UINT32
AcpiCmStrtoul (
const NATIVE_CHAR *String,
NATIVE_CHAR **Terminator,
- UINT32 Base);
+ NATIVE_UINT Base);
NATIVE_CHAR *
AcpiCmStrstr (
@@ -252,7 +254,7 @@ AcpiCmMemcpy (
void *
AcpiCmMemset (
void *Dest,
- UINT32 Value,
+ NATIVE_UINT Value,
NATIVE_UINT Count);
UINT32
@@ -263,6 +265,7 @@ UINT32
AcpiCmToLower (
UINT32 c);
+#endif /* ACPI_USE_SYSTEM_CLIBRARY */
/*
* CmCopy - Object construction and conversion interfaces
@@ -388,7 +391,7 @@ FunctionValueExit (
UINT32 LineNumber,
UINT32 ComponentId,
NATIVE_CHAR *FunctionName,
- NATIVE_UINT Value);
+ ACPI_INTEGER Value);
void
FunctionPtrExit (
@@ -687,7 +690,7 @@ AcpiCmInitStaticObject (
#define AcpiCmCallocate(a) _CmCallocate(a, _COMPONENT,_THIS_MODULE,__LINE__)
#define AcpiCmFree(a) _CmFree(a,_COMPONENT,_THIS_MODULE,__LINE__)
-#ifndef ACPI_DEBUG
+#ifndef ACPI_DEBUG_TRACK_ALLOCATIONS
#define AcpiCmAddElementToAllocList(a,b,c,d,e,f)
#define AcpiCmDeleteElementFromAllocList(a,b,c,d)
diff --git a/sys/contrib/dev/acpica/amlcode.h b/sys/contrib/dev/acpica/amlcode.h
index 8552385..afca031 100644
--- a/sys/contrib/dev/acpica/amlcode.h
+++ b/sys/contrib/dev/acpica/amlcode.h
@@ -3,7 +3,7 @@
* Name: amlcode.h - Definitions for AML, as included in "definition blocks"
* Declarations and definitions contained herein are derived
* directly from the ACPI specification.
- * $Revision: 43 $
+ * $Revision: 46 $
*
*****************************************************************************/
@@ -11,7 +11,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -302,27 +302,42 @@
#define ARGP_TERMARG 0x0E
#define ARGP_TERMLIST 0x0F
#define ARGP_WORDDATA 0x10
+#define ARGP_QWORDDATA 0x11
+#define ARGP_SIMPLENAME 0x12
/*
* Resolved argument types for the AML Interpreter
* Each field in the ArgTypes UINT32 is 5 bits, allowing for a maximum of 6 arguments.
- * There can be up to 31 unique argument types
+ * There can be up to 31 unique argument types (0 is end-of-arg-list indicator)
*/
-#define ARGI_ANYTYPE 0x01
-#define ARGI_TARGETREF 0x02
-#define ARGI_REFERENCE 0x03
-#define ARGI_IF 0x04
-#define ARGI_NUMBER 0x05
-#define ARGI_STRING 0x06
-#define ARGI_BUFFER 0x07
-#define ARGI_PACKAGE 0x08
-#define ARGI_DATAOBJECT 0x09 /* Buffer, string, package or reference to a Node - Used only by SizeOf operator*/
-#define ARGI_COMPLEXOBJ 0x0A /* Buffer or package */
-#define ARGI_MUTEX 0x0B
-#define ARGI_EVENT 0x0C
-#define ARGI_REGION 0x0D
-#define ARGI_DDBHANDLE 0x0E
+/* "Standard" ACPI types are 1-15 (0x0F) */
+
+#define ARGI_INTEGER ACPI_TYPE_INTEGER /* 1 */
+#define ARGI_STRING ACPI_TYPE_STRING /* 2 */
+#define ARGI_BUFFER ACPI_TYPE_BUFFER /* 3 */
+#define ARGI_PACKAGE ACPI_TYPE_PACKAGE /* 4 */
+#define ARGI_EVENT ACPI_TYPE_EVENT
+#define ARGI_MUTEX ACPI_TYPE_MUTEX
+#define ARGI_REGION ACPI_TYPE_REGION
+#define ARGI_DDBHANDLE ACPI_TYPE_DDB_HANDLE
+
+/* Custom types are 0x10 through 0x1F */
+
+#define ARGI_IF 0x10
+#define ARGI_ANYOBJECT 0x11
+#define ARGI_ANYTYPE 0x12
+#define ARGI_COMPUTEDATA 0x13 /* Buffer, String, or Integer */
+#define ARGI_DATAOBJECT 0x14 /* Buffer, string, package or reference to a Node - Used only by SizeOf operator*/
+#define ARGI_COMPLEXOBJ 0x15 /* Buffer or package */
+#define ARGI_INTEGER_REF 0x16
+#define ARGI_OBJECT_REF 0x17
+#define ARGI_DEVICE_REF 0x18
+#define ARGI_REFERENCE 0x19
+#define ARGI_TARGETREF 0x1A /* Target, subject to implicit conversion */
+#define ARGI_FIXED_TARGET 0x1B /* Target, no implicit conversion */
+#define ARGI_SIMPLE_TARGET 0x1C /* Name, Local, Arg -- no implicit conversion */
+#define ARGI_BUFFERSTRING 0x1D
#define ARGI_INVALID_OPCODE 0xFFFFFFFF
diff --git a/sys/contrib/dev/acpica/dbcmds.c b/sys/contrib/dev/acpica/dbcmds.c
index 5bf35aa..33f8481 100644
--- a/sys/contrib/dev/acpica/dbcmds.c
+++ b/sys/contrib/dev/acpica/dbcmds.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbcmds - debug commands and output routines
- * $Revision: 43 $
+ * $Revision: 45 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -660,14 +660,14 @@ AcpiDbSetMethodData (
/* Create and initialize the new object */
- ObjDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ ObjDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!ObjDesc)
{
AcpiOsPrintf ("Could not create an internal object\n");
return;
}
- ObjDesc->Number.Value = Value;
+ ObjDesc->Integer.Value = Value;
/* Store the new object into the target */
@@ -736,14 +736,15 @@ AcpiDbWalkForSpecificObjects (
ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_STATUS Status;
UINT32 BufSize;
- NATIVE_CHAR buffer[64];
+ NATIVE_CHAR Buffer[64];
ObjDesc = ((ACPI_NAMESPACE_NODE *)ObjHandle)->Object;
+ BufSize = sizeof (Buffer) / sizeof (*Buffer);
/* Get and display the full pathname to this object */
- Status = AcpiNsHandleToPathname (ObjHandle, &BufSize, buffer);
+ Status = AcpiNsHandleToPathname (ObjHandle, &BufSize, Buffer);
if (ACPI_FAILURE (Status))
{
@@ -751,7 +752,7 @@ AcpiDbWalkForSpecificObjects (
return (AE_OK);
}
- AcpiOsPrintf ("%32s", buffer);
+ AcpiOsPrintf ("%32s", Buffer);
/* Display short information about the object */
@@ -764,8 +765,8 @@ AcpiDbWalkForSpecificObjects (
AcpiOsPrintf (" #Args %d Concurrency %X", ObjDesc->Method.ParamCount, ObjDesc->Method.Concurrency);
break;
- case ACPI_TYPE_NUMBER:
- AcpiOsPrintf (" Value %X", ObjDesc->Number.Value);
+ case ACPI_TYPE_INTEGER:
+ AcpiOsPrintf (" Value %X", ObjDesc->Integer.Value);
break;
case ACPI_TYPE_STRING:
@@ -899,7 +900,7 @@ AcpiDbWalkAndMatchName (
/* Get the full pathname to this object */
- BufSize = sizeof (Buffer);
+ BufSize = sizeof (Buffer) / sizeof (*Buffer);
Status = AcpiNsHandleToPathname (ObjHandle, &BufSize, Buffer);
if (ACPI_FAILURE (Status))
diff --git a/sys/contrib/dev/acpica/dbdisasm.c b/sys/contrib/dev/acpica/dbdisasm.c
index e03e28a..8d3f7db 100644
--- a/sys/contrib/dev/acpica/dbdisasm.c
+++ b/sys/contrib/dev/acpica/dbdisasm.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbdisasm - parser op tree display routines
- * $Revision: 35 $
+ * $Revision: 37 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -773,7 +773,7 @@ AcpiDbDisplayOpcode (
/* Just get the opcode name and print it */
Opc = AcpiPsGetOpcodeInfo (Op->Opcode);
- DEBUG_ONLY_MEMBERS ((AcpiOsPrintf ("%s", Opc->Name)));
+ AcpiOsPrintf ("%s", Opc->Name);
#ifndef PARSER_ONLY
diff --git a/sys/contrib/dev/acpica/dbdisply.c b/sys/contrib/dev/acpica/dbdisply.c
index e16f763..3be6f93 100644
--- a/sys/contrib/dev/acpica/dbdisply.c
+++ b/sys/contrib/dev/acpica/dbdisply.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbdisply - debug display commands
- * $Revision: 39 $
+ * $Revision: 41 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -399,22 +399,33 @@ void
AcpiDbDecodeInternalObject (
ACPI_OPERAND_OBJECT *ObjDesc)
{
+ UINT32 i;
+
if (!ObjDesc)
{
return;
}
- AcpiOsPrintf (" %9.9s ", AcpiCmGetTypeName (ObjDesc->Common.Type));
+ AcpiOsPrintf (" %s", AcpiCmGetTypeName (ObjDesc->Common.Type));
switch (ObjDesc->Common.Type)
{
- case ACPI_TYPE_NUMBER:
- AcpiOsPrintf ("%.8X", ObjDesc->Number.Value);
+ case ACPI_TYPE_INTEGER:
+ AcpiOsPrintf (" %.8X", ObjDesc->Integer.Value);
break;
case ACPI_TYPE_STRING:
- AcpiOsPrintf ("\"%.16s\"...", ObjDesc->String.Pointer);
+ AcpiOsPrintf ("(%d) \"%.16s\"...",
+ ObjDesc->String.Length, ObjDesc->String.Pointer);
+ break;
+
+ case ACPI_TYPE_BUFFER:
+ AcpiOsPrintf ("(%d)", ObjDesc->Buffer.Length);
+ for (i = 0; (i < 8) && (i < ObjDesc->Buffer.Length); i++)
+ {
+ AcpiOsPrintf (" %2.2X", ObjDesc->Buffer.Pointer[i]);
+ }
break;
}
}
@@ -502,7 +513,7 @@ AcpiDbDisplayInternalObject (
break;
case AML_LOCAL_OP:
- AcpiOsPrintf ("[Local%d]", ObjDesc->Reference.Offset);
+ AcpiOsPrintf ("[Local%d] ", ObjDesc->Reference.Offset);
if (WalkState)
{
ObjDesc = WalkState->LocalVariables[ObjDesc->Reference.Offset].Object;
@@ -511,7 +522,7 @@ AcpiDbDisplayInternalObject (
break;
case AML_ARG_OP:
- AcpiOsPrintf ("[Arg%d] ", ObjDesc->Reference.Offset);
+ AcpiOsPrintf ("[Arg%d] ", ObjDesc->Reference.Offset);
if (WalkState)
{
ObjDesc = WalkState->Arguments[ObjDesc->Reference.Offset].Object;
@@ -524,7 +535,7 @@ AcpiDbDisplayInternalObject (
break;
case AML_INDEX_OP:
- AcpiOsPrintf ("[Index] ");
+ AcpiOsPrintf ("[Index] ");
AcpiDbDecodeInternalObject (ObjDesc->Reference.Object);
break;
@@ -535,7 +546,7 @@ AcpiDbDisplayInternalObject (
break;
default:
- AcpiOsPrintf (" ");
+ AcpiOsPrintf (" ");
AcpiDbDecodeInternalObject (ObjDesc);
break;
}
diff --git a/sys/contrib/dev/acpica/dbexec.c b/sys/contrib/dev/acpica/dbexec.c
index 73611d2..8469092 100644
--- a/sys/contrib/dev/acpica/dbexec.c
+++ b/sys/contrib/dev/acpica/dbexec.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbexec - debugger control method execution
- * $Revision: 20 $
+ * $Revision: 21 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -182,8 +182,8 @@ AcpiDbExecuteMethod (
{
for (i = 0; Info->Args[i] && i < MTH_NUM_ARGS; i++)
{
- Params[i].Type = ACPI_TYPE_NUMBER;
- Params[i].Number.Value = STRTOUL (Info->Args[i], NULL, 16);
+ Params[i].Type = ACPI_TYPE_INTEGER;
+ Params[i].Integer.Value = STRTOUL (Info->Args[i], NULL, 16);
}
ParamObjects.Pointer = Params;
@@ -194,8 +194,8 @@ AcpiDbExecuteMethod (
{
/* Setup default parameters */
- Params[0].Type = ACPI_TYPE_NUMBER;
- Params[0].Number.Value = 0x01020304;
+ Params[0].Type = ACPI_TYPE_INTEGER;
+ Params[0].Integer.Value = 0x01020304;
Params[1].Type = ACPI_TYPE_STRING;
Params[1].String.Length = 12;
diff --git a/sys/contrib/dev/acpica/dbfileio.c b/sys/contrib/dev/acpica/dbfileio.c
index b94cbe1..367a838 100644
--- a/sys/contrib/dev/acpica/dbfileio.c
+++ b/sys/contrib/dev/acpica/dbfileio.c
@@ -2,7 +2,7 @@
*
* Module Name: dbfileio - Debugger file I/O commands. These can't usually
* be used when running the debugger in Ring 0 (Kernel mode)
- * $Revision: 35 $
+ * $Revision: 37 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -286,7 +286,7 @@ AcpiDbLoadTable(
Status = AcpiTbValidateTableHeader (&TableHeader);
if ((ACPI_FAILURE (Status)) ||
- (TableHeader.Length > (1024 * 1024)))
+ (TableHeader.Length > 524288)) /* 1/2 Mbyte should be enough */
{
AcpiOsPrintf ("Table header is invalid!\n");
return (AE_ERROR);
diff --git a/sys/contrib/dev/acpica/dbhistry.c b/sys/contrib/dev/acpica/dbhistry.c
index e2e441c..765c3e1 100644
--- a/sys/contrib/dev/acpica/dbhistry.c
+++ b/sys/contrib/dev/acpica/dbhistry.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dbhistry - debugger HISTORY command
- * $Revision: 16 $
+ * $Revision: 17 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/dbinput.c b/sys/contrib/dev/acpica/dbinput.c
index 8fc695c..0d191c6 100644
--- a/sys/contrib/dev/acpica/dbinput.c
+++ b/sys/contrib/dev/acpica/dbinput.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbinput - user front-end to the AML debugger
- * $Revision: 53 $
+ * $Revision: 54 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/dbstats.c b/sys/contrib/dev/acpica/dbstats.c
index 457f906..f4531ea 100644
--- a/sys/contrib/dev/acpica/dbstats.c
+++ b/sys/contrib/dev/acpica/dbstats.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbstats - Generation and display of ACPI table statistics
- * $Revision: 36 $
+ * $Revision: 37 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -508,7 +508,7 @@ AcpiDbDisplayStatistics (
AcpiOsPrintf ("\nInternal object sizes:\n\n");
AcpiOsPrintf ("Common %3d\n", sizeof (ACPI_OBJECT_COMMON));
- AcpiOsPrintf ("Number %3d\n", sizeof (ACPI_OBJECT_NUMBER));
+ AcpiOsPrintf ("Number %3d\n", sizeof (ACPI_OBJECT_INTEGER));
AcpiOsPrintf ("String %3d\n", sizeof (ACPI_OBJECT_STRING));
AcpiOsPrintf ("Buffer %3d\n", sizeof (ACPI_OBJECT_BUFFER));
AcpiOsPrintf ("Package %3d\n", sizeof (ACPI_OBJECT_PACKAGE));
diff --git a/sys/contrib/dev/acpica/dbutils.c b/sys/contrib/dev/acpica/dbutils.c
index 4b4d928..2c0bae7 100644
--- a/sys/contrib/dev/acpica/dbutils.c
+++ b/sys/contrib/dev/acpica/dbutils.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbutils - AML debugger utilities
- * $Revision: 34 $
+ * $Revision: 35 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -230,8 +230,8 @@ AcpiDbDumpObject (
break;
- case ACPI_TYPE_NUMBER:
- AcpiOsPrintf ("[Number] Value: %ld (%lX)\n", ObjDesc->Number.Value, ObjDesc->Number.Value);
+ case ACPI_TYPE_INTEGER:
+ AcpiOsPrintf ("[Number] Value: %ld (%lX)\n", ObjDesc->Integer.Value, ObjDesc->Integer.Value);
break;
diff --git a/sys/contrib/dev/acpica/dbxface.c b/sys/contrib/dev/acpica/dbxface.c
index 613edcd..4116655 100644
--- a/sys/contrib/dev/acpica/dbxface.c
+++ b/sys/contrib/dev/acpica/dbxface.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbxface - AML Debugger external interfaces
- * $Revision: 33 $
+ * $Revision: 34 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/dsfield.c b/sys/contrib/dev/acpica/dsfield.c
index bb634d7..11f304d 100644
--- a/sys/contrib/dev/acpica/dsfield.c
+++ b/sys/contrib/dev/acpica/dsfield.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dsfield - Dispatcher field routines
- * $Revision: 30 $
+ * $Revision: 31 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/dsmethod.c b/sys/contrib/dev/acpica/dsmethod.c
index 266fa6e..02e1322 100644
--- a/sys/contrib/dev/acpica/dsmethod.c
+++ b/sys/contrib/dev/acpica/dsmethod.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dsmethod - Parser/Interpreter interface - control method parsing
- * $Revision: 54 $
+ * $Revision: 56 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -544,8 +544,9 @@ AcpiDsRestartControlMethod (
}
DEBUG_PRINT (TRACE_DISPATCH,
- ("DsRestart: Method=%p Return=%p State=%p\n",
- WalkState->MethodCallOp, ReturnDesc, WalkState));
+ ("DsRestart: Method=%p Return=%p ReturnUsed?=%X ResStack=%p State=%p\n",
+ WalkState->MethodCallOp, ReturnDesc, WalkState->ReturnUsed,
+ WalkState->Results, WalkState));
return_ACPI_STATUS (AE_OK);
diff --git a/sys/contrib/dev/acpica/dsmthdat.c b/sys/contrib/dev/acpica/dsmthdat.c
index 022c1bd..0734ce6 100644
--- a/sys/contrib/dev/acpica/dsmthdat.c
+++ b/sys/contrib/dev/acpica/dsmthdat.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dsmthdat - control method arguments and local variables
- * $Revision: 37 $
+ * $Revision: 39 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -132,7 +132,7 @@
*
* FUNCTION: AcpiDsMethodDataInit
*
- * PARAMETERS: *ObjDesc
+ * PARAMETERS: WalkState - Current walk state object
*
* RETURN: Status
*
@@ -193,7 +193,7 @@ AcpiDsMethodDataInit (
*
* FUNCTION: AcpiDsMethodDataDeleteAll
*
- * PARAMETERS: None
+ * PARAMETERS: WalkState - Current walk state object
*
* RETURN: Status
*
@@ -268,7 +268,9 @@ AcpiDsMethodDataDeleteAll (
*
* FUNCTION: AcpiDsMethodDataInitArgs
*
- * PARAMETERS: None
+ * PARAMETERS: *Params - Pointer to a parameter list for the method
+ * MaxParamCount - The arg count for this method
+ * WalkState - Current walk state object
*
* RETURN: Status
*
@@ -340,6 +342,7 @@ AcpiDsMethodDataInitArgs (
* Index - Which localVar or argument to get
* Entry - Pointer to where a pointer to the stack
* entry is returned.
+ * WalkState - Current walk state object
*
* RETURN: Status
*
@@ -415,6 +418,7 @@ AcpiDsMethodDataGetEntry (
* PARAMETERS: Type - Either MTH_TYPE_LOCAL or MTH_TYPE_ARG
* Index - Which localVar or argument to get
* Object - Object to be inserted into the stack entry
+ * WalkState - Current walk state object
*
* RETURN: Status
*
@@ -462,6 +466,7 @@ AcpiDsMethodDataSetEntry (
* PARAMETERS: Type - Either MTH_TYPE_LOCAL or MTH_TYPE_ARG
* Index - Which localVar or argument whose type
* to get
+ * WalkState - Current walk state object
*
* RETURN: Data type of selected Arg or Local
* Used only in ExecMonadic2()/TypeOp.
@@ -513,6 +518,7 @@ AcpiDsMethodDataGetType (
* PARAMETERS: Type - Either MTH_TYPE_LOCAL or MTH_TYPE_ARG
* Index - Which localVar or argument whose type
* to get
+ * WalkState - Current walk state object
*
* RETURN: Get the Node associated with a local or arg.
*
@@ -579,7 +585,8 @@ AcpiDsMethodDataGetNte (
*
* PARAMETERS: Type - Either MTH_TYPE_LOCAL or MTH_TYPE_ARG
* Index - Which localVar or argument to get
- * *DestDesc - Descriptor into which selected Arg
+ * WalkState - Current walk state object
+ * *DestDesc - Ptr to Descriptor into which selected Arg
* or Local value should be copied
*
* RETURN: Status
@@ -643,16 +650,20 @@ AcpiDsMethodDataGetValue (
switch (Type)
{
case MTH_TYPE_ARG:
+
DEBUG_PRINT (ACPI_ERROR,
("DsMethodDataGetValue: Uninitialized Arg[%d] at entry %p\n",
Index, Entry));
+
return_ACPI_STATUS (AE_AML_UNINITIALIZED_ARG);
break;
case MTH_TYPE_LOCAL:
+
DEBUG_PRINT (ACPI_ERROR,
("DsMethodDataGetValue: Uninitialized Local[%d] at entry %p\n",
Index, Entry));
+
return_ACPI_STATUS (AE_AML_UNINITIALIZED_LOCAL);
break;
}
@@ -677,6 +688,7 @@ AcpiDsMethodDataGetValue (
*
* PARAMETERS: Type - Either MTH_TYPE_LOCAL or MTH_TYPE_ARG
* Index - Which localVar or argument to delete
+ * WalkState - Current walk state object
*
* RETURN: Status
*
@@ -727,7 +739,6 @@ AcpiDsMethodDataDeleteValue (
* Decrement the reference count by one to balance the
* increment when the object was stored in the slot.
*/
-
AcpiCmRemoveReference (Object);
}
@@ -742,18 +753,14 @@ AcpiDsMethodDataDeleteValue (
*
* PARAMETERS: Type - Either MTH_TYPE_LOCAL or MTH_TYPE_ARG
* Index - Which localVar or argument to set
- * *SrcDesc - Value to be stored
- * *DestDesc - Descriptor into which *SrcDesc
- * can be copied, or NULL if one must
- * be allocated for the purpose. If
- * provided, this descriptor will be
- * used for the new value.
+ * SrcDesc - Value to be stored
+ * WalkState - Current walk state
*
* RETURN: Status
*
* DESCRIPTION: Store a value in an Arg or Local. The SrcDesc is installed
* as the new value for the Arg or Local and the reference count
- * is incremented.
+ * for SrcDesc is incremented.
*
******************************************************************************/
@@ -840,7 +847,6 @@ AcpiDsMethodDataSetValue (
* Store this object into the Node
* (do the indirect store)
*/
-
Status = AcpiNsAttachObject ((ACPI_NAMESPACE_NODE *) *Entry, SrcDesc,
SrcDesc->Common.Type);
return_ACPI_STATUS (Status);
@@ -848,10 +854,19 @@ AcpiDsMethodDataSetValue (
/*
- * Otherwise, just delete the existing object
- * before storing the new one
+ * Perform "Implicit conversion" of the new object to the type of the
+ * existing object
*/
+ Status = AcpiAmlConvertToTargetType ((*Entry)->Common.Type, &SrcDesc, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ goto Cleanup;
+ }
+ /*
+ * Delete the existing object
+ * before storing the new one
+ */
AcpiDsMethodDataDeleteValue (Type, Index, WalkState);
}
@@ -862,7 +877,6 @@ AcpiDsMethodDataSetValue (
* Install the new object in the stack entry
* (increments the object reference count by one)
*/
-
Status = AcpiDsMethodDataSetEntry (Type, Index, SrcDesc, WalkState);
if (ACPI_FAILURE (Status))
{
diff --git a/sys/contrib/dev/acpica/dsobject.c b/sys/contrib/dev/acpica/dsobject.c
index 6e58324..870fd32 100644
--- a/sys/contrib/dev/acpica/dsobject.c
+++ b/sys/contrib/dev/acpica/dsobject.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dsobject - Dispatcher object management routines
- * $Revision: 54 $
+ * $Revision: 56 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -364,7 +364,7 @@ AcpiDsInitObjectFromOp (
/* We are expecting a number */
- if (ArgDesc->Common.Type != ACPI_TYPE_NUMBER)
+ if (ArgDesc->Common.Type != ACPI_TYPE_INTEGER)
{
DEBUG_PRINT (ACPI_ERROR,
("InitObject: Expecting number, got obj: %p type %X\n",
@@ -375,7 +375,7 @@ AcpiDsInitObjectFromOp (
/* Get the value, delete the internal object */
- (*ObjDesc)->Buffer.Length = (UINT32) ArgDesc->Number.Value;
+ (*ObjDesc)->Buffer.Length = (UINT32) ArgDesc->Integer.Value;
AcpiCmRemoveReference (ArgDesc);
/* Allocate the buffer */
@@ -439,8 +439,8 @@ AcpiDsInitObjectFromOp (
Status = AcpiDsBuildInternalObject (WalkState, Op, ObjDesc);
break;
- case ACPI_TYPE_NUMBER:
- (*ObjDesc)->Number.Value = Op->Value.Integer;
+ case ACPI_TYPE_INTEGER:
+ (*ObjDesc)->Integer.Value = Op->Value.Integer;
break;
@@ -559,19 +559,22 @@ AcpiDsBuildInternalSimpleObj (
if (Name)
{
- REPORT_WARNING (("Reference %s AML %X not found\n",
+ REPORT_WARNING (("Reference %s at AML %X not found\n",
Name, Op->AmlOffset));
AcpiCmFree (Name);
}
else
{
- REPORT_WARNING (("Reference %s AML %X not found\n",
+ REPORT_WARNING (("Reference %s at AML %X not found\n",
Op->Value.String, Op->AmlOffset));
}
*ObjDescPtr = NULL;
}
- return_ACPI_STATUS (Status);
+ else
+ {
+ return_ACPI_STATUS (Status);
+ }
}
}
diff --git a/sys/contrib/dev/acpica/dsopcode.c b/sys/contrib/dev/acpica/dsopcode.c
index 6e10594..1a736ff 100644
--- a/sys/contrib/dev/acpica/dsopcode.c
+++ b/sys/contrib/dev/acpica/dsopcode.c
@@ -2,7 +2,7 @@
*
* Module Name: dsopcode - Dispatcher Op Region support and handling of
* "control" opcodes
- * $Revision: 29 $
+ * $Revision: 30 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -485,7 +485,7 @@ AcpiDsEvalFieldUnitOperands (
}
- Offset = (UINT32) OffDesc->Number.Value;
+ Offset = (UINT32) OffDesc->Integer.Value;
/*
@@ -562,7 +562,7 @@ AcpiDsEvalFieldUnitOperands (
/* Offset is in bits, count is in bits */
BitOffset = Offset;
- BitCount = (UINT16) CntDesc->Number.Value;
+ BitCount = (UINT16) CntDesc->Integer.Value;
break;
@@ -753,7 +753,7 @@ AcpiDsEvalRegionOperands (
*/
OperandDesc = WalkState->Operands[WalkState->NumOperands - 1];
- ObjDesc->Region.Length = (UINT32) OperandDesc->Number.Value;
+ ObjDesc->Region.Length = (UINT32) OperandDesc->Integer.Value;
AcpiCmRemoveReference (OperandDesc);
/*
@@ -762,7 +762,7 @@ AcpiDsEvalRegionOperands (
*/
OperandDesc = WalkState->Operands[WalkState->NumOperands - 2];
- ObjDesc->Region.Address = (ACPI_PHYSICAL_ADDRESS) OperandDesc->Number.Value;
+ ObjDesc->Region.Address = (ACPI_PHYSICAL_ADDRESS) OperandDesc->Integer.Value;
AcpiCmRemoveReference (OperandDesc);
diff --git a/sys/contrib/dev/acpica/dsutils.c b/sys/contrib/dev/acpica/dsutils.c
index c1278ce..9e4d0da 100644
--- a/sys/contrib/dev/acpica/dsutils.c
+++ b/sys/contrib/dev/acpica/dsutils.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dsutils - Dispatcher utilities
- * $Revision: 51 $
+ * $Revision: 52 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -744,7 +744,7 @@ AcpiDsMapOpcodeToDataType (
case AML_WORD_OP:
case AML_DWORD_OP:
- DataType = ACPI_TYPE_NUMBER;
+ DataType = ACPI_TYPE_INTEGER;
break;
diff --git a/sys/contrib/dev/acpica/dswexec.c b/sys/contrib/dev/acpica/dswexec.c
index 1e9c140..d3c04a6 100644
--- a/sys/contrib/dev/acpica/dswexec.c
+++ b/sys/contrib/dev/acpica/dswexec.c
@@ -2,7 +2,7 @@
*
* Module Name: dswexec - Dispatcher method execution callbacks;
* dispatch to interpreter.
- * $Revision: 51 $
+ * $Revision: 55 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -138,7 +138,7 @@
*
* RETURN: Status
*
- * DESCRIPTION:
+ * DESCRIPTION: Get the result of a predicate evaluation
*
****************************************************************************/
@@ -163,7 +163,7 @@ AcpiDsGetPredicateValue (
if (ACPI_FAILURE (Status))
{
DEBUG_PRINT (ACPI_ERROR,
- ("DsGetPredicateValue: Missing or null operand, %s\n",
+ ("DsGetPredicateValue: Could not get result from predicate evaluation, %s\n",
AcpiCmFormatException (Status)));
return_ACPI_STATUS (Status);
@@ -202,7 +202,7 @@ AcpiDsGetPredicateValue (
* be a number
*/
- if (ObjDesc->Common.Type != ACPI_TYPE_NUMBER)
+ if (ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
{
DEBUG_PRINT (ACPI_ERROR,
("ExecEndOp: Bad predicate (not a number) ObjDesc=%X State=%X Type=%X\n",
@@ -213,16 +213,16 @@ AcpiDsGetPredicateValue (
}
- /* TBD: 64/32-bit */
+ /* Truncate the predicate to 32-bits if necessary */
- ObjDesc->Number.Value &= (UINT64) 0x00000000FFFFFFFF;
+ AcpiAmlTruncateFor32bitTable (ObjDesc, WalkState);
/*
* Save the result of the predicate evaluation on
* the control stack
*/
- if (ObjDesc->Number.Value)
+ if (ObjDesc->Integer.Value)
{
WalkState->ControlState->Common.Value = TRUE;
}
@@ -471,6 +471,8 @@ AcpiDsExecEndOp (
WalkState->NumOperands = 0;
WalkState->ReturnDesc = NULL;
+ WalkState->OpInfo = OpInfo;
+ WalkState->Opcode = Opcode;
/* Call debugger for single step support (DEBUG build only) */
diff --git a/sys/contrib/dev/acpica/dswload.c b/sys/contrib/dev/acpica/dswload.c
index 4a805335..47d57a2 100644
--- a/sys/contrib/dev/acpica/dswload.c
+++ b/sys/contrib/dev/acpica/dswload.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswload - Dispatcher namespace load callbacks
- * $Revision: 25 $
+ * $Revision: 26 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/dswscope.c b/sys/contrib/dev/acpica/dswscope.c
index 03a03d5..6e7d7ff 100644
--- a/sys/contrib/dev/acpica/dswscope.c
+++ b/sys/contrib/dev/acpica/dswscope.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswscope - Scope stack manipulation
- * $Revision: 41 $
+ * $Revision: 42 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/dswstate.c b/sys/contrib/dev/acpica/dswstate.c
index f4494de..dc0b394 100644
--- a/sys/contrib/dev/acpica/dswstate.c
+++ b/sys/contrib/dev/acpica/dswstate.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswstate - Dispatcher parse tree walk management routines
- * $Revision: 36 $
+ * $Revision: 38 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -128,30 +128,6 @@
MODULE_NAME ("dswstate")
-/*******************************************************************************
- *
- * FUNCTION: AcpiDsResultStackClear
- *
- * PARAMETERS: WalkState - Current Walk state
- *
- * RETURN: Status
- *
- * DESCRIPTION: Reset this walk's result stack pointers to zero, thus setting
- * the stack to zero.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-xxxAcpiDsResultStackClear (
- ACPI_WALK_STATE *WalkState)
-{
-/*
- WalkState->NumResults = 0;
- WalkState->CurrentResult = 0;
-*/
- return (AE_OK);
-}
-
/*******************************************************************************
*
@@ -259,7 +235,7 @@ AcpiDsResultRemove (
DEBUG_PRINT (ACPI_ERROR,
("DsResultStackRemove: Null operand! State=%p #Ops=%X, Index=%X\n",
WalkState, State->Results.NumResults, Index));
- return (AE_AML_NO_OPERAND);
+ return (AE_AML_NO_RETURN_VALUE);
}
/* Remove the object */
@@ -311,9 +287,9 @@ AcpiDsResultPop (
if (!State->Results.NumResults)
{
DEBUG_PRINT (ACPI_ERROR,
- ("DsResultPop: No result objects! State=%p\n",
+ ("DsResultPop: Result stack is empty! State=%p\n",
WalkState));
- return (AE_STACK_UNDERFLOW);
+ return (AE_AML_NO_RETURN_VALUE);
}
/* Remove top element */
@@ -342,12 +318,12 @@ AcpiDsResultPop (
DEBUG_PRINT (ACPI_ERROR,
("DsResultPop: No result objects! State=%p\n",
WalkState));
- return (AE_STACK_UNDERFLOW);
+ return (AE_AML_NO_RETURN_VALUE);
}
/*******************************************************************************
*
- * FUNCTION: AcpiDsResultPop
+ * FUNCTION: AcpiDsResultPopFromBottom
*
* PARAMETERS: Object - Where to return the popped object
* WalkState - Current Walk state
@@ -383,7 +359,7 @@ AcpiDsResultPopFromBottom (
DEBUG_PRINT (ACPI_ERROR,
("DsResultPopFromBottom: No result objects! State=%p\n",
WalkState));
- return (AE_STACK_UNDERFLOW);
+ return (AE_AML_NO_RETURN_VALUE);
}
/* Remove Bottom element */
@@ -407,7 +383,7 @@ AcpiDsResultPopFromBottom (
DEBUG_PRINT (ACPI_ERROR,
("DsResultPopFromBottom: Null operand! State=%p #Ops=%X, Index=%X\n",
WalkState, State->Results.NumResults, Index));
- return (AE_AML_NO_OPERAND);
+ return (AE_AML_NO_RETURN_VALUE);
}
DEBUG_PRINT (TRACE_EXEC,
@@ -422,15 +398,14 @@ AcpiDsResultPopFromBottom (
/*******************************************************************************
*
- * FUNCTION: AcpiDsResultPop
+ * FUNCTION: AcpiDsResultPush
*
* PARAMETERS: Object - Where to return the popped object
* WalkState - Current Walk state
*
* RETURN: Status
*
- * DESCRIPTION: Pop an object off the bottom of this walk's result stack. In
- * other words, this is a FIFO.
+ * DESCRIPTION: Push an object onto the current result stack
*
******************************************************************************/
@@ -445,7 +420,9 @@ AcpiDsResultPush (
State = WalkState->Results;
if (!State)
{
- return (AE_OK);
+ DEBUG_PRINT (ACPI_ERROR,
+ ("DsResultPush: No result stack frame\n"));
+ return (AE_AML_INTERNAL);
}
if (State->Results.NumResults == OBJ_NUM_OPERANDS)
@@ -964,6 +941,7 @@ AcpiDsCreateWalkState (
ACPI_WALK_LIST *WalkList)
{
ACPI_WALK_STATE *WalkState;
+ ACPI_STATUS Status;
FUNCTION_TRACE ("DsCreateWalkState");
@@ -987,7 +965,7 @@ AcpiDsCreateWalkState (
DEBUG_PRINT (TRACE_EXEC, ("DsCreateWalkState: State %p from cache\n", WalkState));
AcpiCmReleaseMutex (ACPI_MTX_CACHES);
- }
+ }
else
{
@@ -1015,6 +993,15 @@ AcpiDsCreateWalkState (
AcpiDsMethodDataInit (WalkState);
#endif
+ /* Create an initial result stack entry */
+
+ Status = AcpiDsResultStackPush (WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ return_VALUE (NULL);
+ }
+
+
/* Put the new state at the head of the walk list */
AcpiDsPushWalkState (WalkState, WalkList);
diff --git a/sys/contrib/dev/acpica/evevent.c b/sys/contrib/dev/acpica/evevent.c
index ecd2c4c..30f06e0 100644
--- a/sys/contrib/dev/acpica/evevent.c
+++ b/sys/contrib/dev/acpica/evevent.c
@@ -2,7 +2,7 @@
*
* Module Name: evevent - Fixed and General Purpose AcpiEvent
* handling and dispatch
- * $Revision: 32 $
+ * $Revision: 33 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/evmisc.c b/sys/contrib/dev/acpica/evmisc.c
index 4c7c0ab..516774e 100644
--- a/sys/contrib/dev/acpica/evmisc.c
+++ b/sys/contrib/dev/acpica/evmisc.c
@@ -2,7 +2,7 @@
*
* Module Name: evmisc - ACPI device notification handler dispatch
* and ACPI Global Lock support
- * $Revision: 21 $
+ * $Revision: 22 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/evregion.c b/sys/contrib/dev/acpica/evregion.c
index 42732ef..49d5d3f 100644
--- a/sys/contrib/dev/acpica/evregion.c
+++ b/sys/contrib/dev/acpica/evregion.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evregion - ACPI AddressSpace (OpRegion) handler dispatch
- * $Revision: 93 $
+ * $Revision: 94 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -217,8 +217,8 @@ AcpiEvExecuteRegMethod (
UINT32 Function)
{
ACPI_OPERAND_OBJECT *Params[3];
- ACPI_OPERAND_OBJECT SpaceID_Obj;
- ACPI_OPERAND_OBJECT Function_Obj;
+ ACPI_OPERAND_OBJECT SpaceIdDesc;
+ ACPI_OPERAND_OBJECT FunctionDesc;
ACPI_STATUS Status;
@@ -240,24 +240,24 @@ AcpiEvExecuteRegMethod (
* Passed as a parameter
*/
- AcpiCmInitStaticObject (&SpaceID_Obj);
- AcpiCmInitStaticObject (&Function_Obj);
+ AcpiCmInitStaticObject (&SpaceIdDesc);
+ AcpiCmInitStaticObject (&FunctionDesc);
/*
* Method requires two parameters.
*/
- Params [0] = &SpaceID_Obj;
- Params [1] = &Function_Obj;
+ Params [0] = &SpaceIdDesc;
+ Params [1] = &FunctionDesc;
Params [2] = NULL;
/*
* Set up the parameter objects
*/
- SpaceID_Obj.Common.Type = ACPI_TYPE_NUMBER;
- SpaceID_Obj.Number.Value = RegionObj->Region.SpaceId;
+ SpaceIdDesc.Common.Type = ACPI_TYPE_INTEGER;
+ SpaceIdDesc.Integer.Value = RegionObj->Region.SpaceId;
- Function_Obj.Common.Type = ACPI_TYPE_NUMBER;
- Function_Obj.Number.Value = Function;
+ FunctionDesc.Common.Type = ACPI_TYPE_INTEGER;
+ FunctionDesc.Integer.Value = Function;
/*
* Execute the method, no return value
diff --git a/sys/contrib/dev/acpica/evrgnini.c b/sys/contrib/dev/acpica/evrgnini.c
index 390cddb..f2ed119 100644
--- a/sys/contrib/dev/acpica/evrgnini.c
+++ b/sys/contrib/dev/acpica/evrgnini.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evrgnini- ACPI AddressSpace (OpRegion) init
- * $Revision: 32 $
+ * $Revision: 33 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/evsci.c b/sys/contrib/dev/acpica/evsci.c
index 2c877a3..130156c 100644
--- a/sys/contrib/dev/acpica/evsci.c
+++ b/sys/contrib/dev/acpica/evsci.c
@@ -2,7 +2,7 @@
*
* Module Name: evsci - System Control Interrupt configuration and
* legacy to ACPI mode state transition functions
- * $Revision: 68 $
+ * $Revision: 69 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/evxface.c b/sys/contrib/dev/acpica/evxface.c
index f795f18..89f9b8a 100644
--- a/sys/contrib/dev/acpica/evxface.c
+++ b/sys/contrib/dev/acpica/evxface.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evxface - External interfaces for ACPI events
- * $Revision: 98 $
+ * $Revision: 101 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -304,10 +304,10 @@ AcpiInstallNotifyHandler (
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
- /* Convert and validate the device handle */
-
AcpiCmAcquireMutex (ACPI_MTX_NAMESPACE);
+ /* Convert and validate the device handle */
+
DeviceNode = AcpiNsConvertHandleToEntry (Device);
if (!DeviceNode)
{
@@ -315,17 +315,16 @@ AcpiInstallNotifyHandler (
goto UnlockAndExit;
}
-
/*
- * Support for global notify handlers. These handlers are invoked for
- * every notifiy of the type specifiec
+ * Root Object:
+ * ------------
+ * Registering a notify handler on the root object indicates that the
+ * caller wishes to receive notifications for all objects. Note that
+ * only one <external> global handler can be regsitered (per notify type).
*/
-
if (Device == ACPI_ROOT_OBJECT)
{
- /*
- * Make sure the handler is not already installed.
- */
+ /* Make sure the handler is not already installed */
if (((HandlerType == ACPI_SYSTEM_NOTIFY) &&
AcpiGbl_SysNotify.Handler) ||
@@ -342,103 +341,98 @@ AcpiInstallNotifyHandler (
AcpiGbl_SysNotify.Handler = Handler;
AcpiGbl_SysNotify.Context = Context;
}
-
- else
+ else /* ACPI_DEVICE_NOTIFY */
{
AcpiGbl_DrvNotify.Node = DeviceNode;
AcpiGbl_DrvNotify.Handler = Handler;
AcpiGbl_DrvNotify.Context = Context;
}
-
/* Global notify handler installed */
-
- goto UnlockAndExit;
}
-
/*
- * These are the ONLY objects that can receive ACPI notifications
+ * Other Objects:
+ * --------------
+ * Caller will only receive notifications specific to the target object.
+ * Note that only certain object types can receive notifications.
*/
-
- if ((DeviceNode->Type != ACPI_TYPE_DEVICE) &&
- (DeviceNode->Type != ACPI_TYPE_PROCESSOR) &&
- (DeviceNode->Type != ACPI_TYPE_POWER) &&
- (DeviceNode->Type != ACPI_TYPE_THERMAL))
- {
- Status = AE_BAD_PARAMETER;
- goto UnlockAndExit;
- }
-
- /* Check for an existing internal object */
-
- ObjDesc = AcpiNsGetAttachedObject ((ACPI_HANDLE) DeviceNode);
- if (ObjDesc)
- {
+ else {
/*
- * The object exists.
- * Make sure the handler is not already installed.
+ * These are the ONLY objects that can receive ACPI notifications
*/
-
- if (((HandlerType == ACPI_SYSTEM_NOTIFY) &&
- ObjDesc->Device.SysHandler) ||
- ((HandlerType == ACPI_DEVICE_NOTIFY) &&
- ObjDesc->Device.DrvHandler))
+ if ((DeviceNode->Type != ACPI_TYPE_DEVICE) &&
+ (DeviceNode->Type != ACPI_TYPE_PROCESSOR) &&
+ (DeviceNode->Type != ACPI_TYPE_POWER) &&
+ (DeviceNode->Type != ACPI_TYPE_THERMAL))
{
- Status = AE_EXIST;
+ Status = AE_BAD_PARAMETER;
goto UnlockAndExit;
}
- }
- else
- {
- /* Create a new object */
+ /* Check for an existing internal object */
- ObjDesc = AcpiCmCreateInternalObject (DeviceNode->Type);
- if (!ObjDesc)
+ ObjDesc = AcpiNsGetAttachedObject ((ACPI_HANDLE) DeviceNode);
+ if (ObjDesc)
{
- Status = AE_NO_MEMORY;
- goto UnlockAndExit;
- }
- /* Attach new object to the Node */
+ /* Object exists - make sure there's no handler */
- Status = AcpiNsAttachObject (Device, ObjDesc, (UINT8) DeviceNode->Type);
+ if (((HandlerType == ACPI_SYSTEM_NOTIFY) &&
+ ObjDesc->Device.SysHandler) ||
+ ((HandlerType == ACPI_DEVICE_NOTIFY) &&
+ ObjDesc->Device.DrvHandler))
+ {
+ Status = AE_EXIST;
+ goto UnlockAndExit;
+ }
+ }
- if (ACPI_FAILURE (Status))
+ else
{
- goto UnlockAndExit;
- }
- }
+ /* Create a new object */
+ ObjDesc = AcpiCmCreateInternalObject (DeviceNode->Type);
+ if (!ObjDesc)
+ {
+ Status = AE_NO_MEMORY;
+ goto UnlockAndExit;
+ }
- /*
- * If we get here, we know that there is no handler installed
- * so let's party
- */
- NotifyObj = AcpiCmCreateInternalObject (INTERNAL_TYPE_NOTIFY);
- if (!NotifyObj)
- {
- Status = AE_NO_MEMORY;
- goto UnlockAndExit;
- }
+ /* Attach new object to the Node */
- NotifyObj->NotifyHandler.Node = DeviceNode;
- NotifyObj->NotifyHandler.Handler = Handler;
- NotifyObj->NotifyHandler.Context = Context;
+ Status = AcpiNsAttachObject (Device, ObjDesc, (UINT8) DeviceNode->Type);
+ if (ACPI_FAILURE (Status))
+ {
+ goto UnlockAndExit;
+ }
+ }
- if (HandlerType == ACPI_SYSTEM_NOTIFY)
- {
- ObjDesc->Device.SysHandler = NotifyObj;
- }
+ /* Install the handler */
- else
- {
- ObjDesc->Device.DrvHandler = NotifyObj;
- }
+ NotifyObj = AcpiCmCreateInternalObject (INTERNAL_TYPE_NOTIFY);
+ if (!NotifyObj)
+ {
+ Status = AE_NO_MEMORY;
+ goto UnlockAndExit;
+ }
+
+ NotifyObj->NotifyHandler.Node = DeviceNode;
+ NotifyObj->NotifyHandler.Handler = Handler;
+ NotifyObj->NotifyHandler.Context = Context;
+ if (HandlerType == ACPI_SYSTEM_NOTIFY)
+ {
+ ObjDesc->Device.SysHandler = NotifyObj;
+ }
+ else /* ACPI_DEVICE_NOTIFY */
+ {
+ ObjDesc->Device.DrvHandler = NotifyObj;
+ }
+ }
+
UnlockAndExit:
AcpiCmReleaseMutex (ACPI_MTX_NAMESPACE);
return_ACPI_STATUS (Status);
@@ -471,10 +465,8 @@ AcpiRemoveNotifyHandler (
ACPI_NAMESPACE_NODE *DeviceNode;
ACPI_STATUS Status = AE_OK;
-
FUNCTION_TRACE ("AcpiRemoveNotifyHandler");
-
/* Parameter validation */
if ((!Handler) ||
@@ -495,68 +487,99 @@ AcpiRemoveNotifyHandler (
}
/*
- * These are the ONLY objects that can receive ACPI notifications
+ * Root Object:
+ * ------------
*/
+ if (Device == ACPI_ROOT_OBJECT) {
- if ((DeviceNode->Type != ACPI_TYPE_DEVICE) &&
- (DeviceNode->Type != ACPI_TYPE_PROCESSOR) &&
- (DeviceNode->Type != ACPI_TYPE_POWER) &&
- (DeviceNode->Type != ACPI_TYPE_THERMAL))
- {
- Status = AE_BAD_PARAMETER;
- goto UnlockAndExit;
- }
+ DEBUG_PRINT(ACPI_INFO, ("Removing notify handler for ROOT object.\n"));
- /* Check for an existing internal object */
+ if (((HandlerType == ACPI_SYSTEM_NOTIFY) &&
+ !AcpiGbl_SysNotify.Handler) ||
+ ((HandlerType == ACPI_DEVICE_NOTIFY) &&
+ !AcpiGbl_DrvNotify.Handler))
+ {
+ Status = AE_NOT_EXIST;
+ goto UnlockAndExit;
+ }
- ObjDesc = AcpiNsGetAttachedObject ((ACPI_HANDLE) DeviceNode);
- if (!ObjDesc)
- {
- Status = AE_NOT_EXIST;
- goto UnlockAndExit;
+ if (HandlerType == ACPI_SYSTEM_NOTIFY) {
+ AcpiGbl_SysNotify.Node = NULL;
+ AcpiGbl_SysNotify.Handler = NULL;
+ AcpiGbl_SysNotify.Context = NULL;
+ }
+ else {
+ AcpiGbl_DrvNotify.Node = NULL;
+ AcpiGbl_DrvNotify.Handler = NULL;
+ AcpiGbl_DrvNotify.Context = NULL;
+ }
}
/*
- * The object exists.
- *
- * Make sure the handler is installed.
+ * Other Objects:
+ * --------------
*/
+ else {
+ /*
+ * These are the ONLY objects that can receive ACPI notifications
+ */
+ if ((DeviceNode->Type != ACPI_TYPE_DEVICE) &&
+ (DeviceNode->Type != ACPI_TYPE_PROCESSOR) &&
+ (DeviceNode->Type != ACPI_TYPE_POWER) &&
+ (DeviceNode->Type != ACPI_TYPE_THERMAL))
+ {
+ Status = AE_BAD_PARAMETER;
+ goto UnlockAndExit;
+ }
- if (HandlerType == ACPI_SYSTEM_NOTIFY)
- {
- NotifyObj = ObjDesc->Device.SysHandler;
- }
- else
- {
- NotifyObj = ObjDesc->Device.DrvHandler;
- }
+ /* Check for an existing internal object */
- if ((!NotifyObj) ||
- (NotifyObj->NotifyHandler.Handler != Handler))
- {
- Status = AE_BAD_PARAMETER;
- goto UnlockAndExit;
- }
+ ObjDesc = AcpiNsGetAttachedObject ((ACPI_HANDLE) DeviceNode);
+ if (!ObjDesc)
+ {
+ Status = AE_NOT_EXIST;
+ goto UnlockAndExit;
+ }
- /*
- * Now we can remove the handler
- */
- if (HandlerType == ACPI_SYSTEM_NOTIFY)
- {
- ObjDesc->Device.SysHandler = NULL;
- }
- else
- {
- ObjDesc->Device.DrvHandler = NULL;
+ /* Object exists - make sure there's an existing handler */
+
+ if (HandlerType == ACPI_SYSTEM_NOTIFY)
+ {
+ NotifyObj = ObjDesc->Device.SysHandler;
+ }
+ else
+ {
+ NotifyObj = ObjDesc->Device.DrvHandler;
+ }
+
+ if ((!NotifyObj) ||
+ (NotifyObj->NotifyHandler.Handler != Handler))
+ {
+ Status = AE_BAD_PARAMETER;
+ goto UnlockAndExit;
+ }
+
+ /* Remove the handler */
+
+ if (HandlerType == ACPI_SYSTEM_NOTIFY)
+ {
+ ObjDesc->Device.SysHandler = NULL;
+ }
+ else
+ {
+ ObjDesc->Device.DrvHandler = NULL;
+ }
+
+ AcpiCmRemoveReference (NotifyObj);
}
- AcpiCmRemoveReference (NotifyObj);
UnlockAndExit:
AcpiCmReleaseMutex (ACPI_MTX_NAMESPACE);
return_ACPI_STATUS (Status);
}
+
/******************************************************************************
*
* FUNCTION: AcpiInstallGpeHandler
diff --git a/sys/contrib/dev/acpica/evxfevnt.c b/sys/contrib/dev/acpica/evxfevnt.c
index b5d60ba..463985d 100644
--- a/sys/contrib/dev/acpica/evxfevnt.c
+++ b/sys/contrib/dev/acpica/evxfevnt.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evxfevnt - External Interfaces, ACPI event disable/enable
- * $Revision: 27 $
+ * $Revision: 28 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/evxfregn.c b/sys/contrib/dev/acpica/evxfregn.c
index 0d7b1f3..7c05f50 100644
--- a/sys/contrib/dev/acpica/evxfregn.c
+++ b/sys/contrib/dev/acpica/evxfregn.c
@@ -2,7 +2,7 @@
*
* Module Name: evxfregn - External Interfaces, ACPI Operation Regions and
* Address Spaces.
- * $Revision: 26 $
+ * $Revision: 27 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/exconfig.c b/sys/contrib/dev/acpica/exconfig.c
index 765cb62..b69170e 100644
--- a/sys/contrib/dev/acpica/exconfig.c
+++ b/sys/contrib/dev/acpica/exconfig.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amconfig - Namespace reconfiguration (Load/Unload opcodes)
- * $Revision: 27 $
+ * $Revision: 29 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -169,7 +169,8 @@ AcpiAmlExecLoadTable (
for (i = 0; i < sizeof (ACPI_TABLE_HEADER); i++)
{
Status = AcpiEvAddressSpaceDispatch (RgnDesc, ADDRESS_SPACE_READ,
- i, 8, (UINT32 *) ((UINT8 *) &TableHeader + i));
+ (ACPI_PHYSICAL_ADDRESS) i, 8,
+ (UINT32 *) ((UINT8 *) &TableHeader + i));
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -195,7 +196,8 @@ AcpiAmlExecLoadTable (
for (i = 0; i < TableHeader.Length; i++)
{
Status = AcpiEvAddressSpaceDispatch (RgnDesc, ADDRESS_SPACE_READ,
- i, 8, (UINT32 *) (TableDataPtr + i));
+ (ACPI_PHYSICAL_ADDRESS)i, 8,
+ (UINT32 *) (TableDataPtr + i));
if (ACPI_FAILURE (Status))
{
goto Cleanup;
diff --git a/sys/contrib/dev/acpica/exconvrt.c b/sys/contrib/dev/acpica/exconvrt.c
new file mode 100644
index 0000000..9aa444e
--- /dev/null
+++ b/sys/contrib/dev/acpica/exconvrt.c
@@ -0,0 +1,653 @@
+/******************************************************************************
+ *
+ * Module Name: amconvrt - Object conversion routines
+ * $Revision: 3 $
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
+ * All rights reserved.
+ *
+ * 2. License
+ *
+ * 2.1. This is your license from Intel Corp. under its intellectual property
+ * rights. You may have additional license terms from the party that provided
+ * you this software, covering your right to use that party's intellectual
+ * property rights.
+ *
+ * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
+ * copy of the source code appearing in this file ("Covered Code") an
+ * irrevocable, perpetual, worldwide license under Intel's copyrights in the
+ * base code distributed originally by Intel ("Original Intel Code") to copy,
+ * make derivatives, distribute, use and display any portion of the Covered
+ * Code in any form, with the right to sublicense such rights; and
+ *
+ * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
+ * license (with the right to sublicense), under only those claims of Intel
+ * patents that are infringed by the Original Intel Code, to make, use, sell,
+ * offer to sell, and import the Covered Code and derivative works thereof
+ * solely to the minimum extent necessary to exercise the above copyright
+ * license, and in no event shall the patent license extend to any additions
+ * to or modifications of the Original Intel Code. No other license or right
+ * is granted directly or by implication, estoppel or otherwise;
+ *
+ * The above copyright and patent license is granted only if the following
+ * conditions are met:
+ *
+ * 3. Conditions
+ *
+ * 3.1. Redistribution of Source with Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification with rights to further distribute source must include
+ * the above Copyright Notice, the above License, this list of Conditions,
+ * and the following Disclaimer and Export Compliance provision. In addition,
+ * Licensee must cause all Covered Code to which Licensee contributes to
+ * contain a file documenting the changes Licensee made to create that Covered
+ * Code and the date of any change. Licensee must include in that file the
+ * documentation of any changes made by any predecessor Licensee. Licensee
+ * must include a prominent statement that the modification is derived,
+ * directly or indirectly, from Original Intel Code.
+ *
+ * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification without rights to further distribute source must
+ * include the following Disclaimer and Export Compliance provision in the
+ * documentation and/or other materials provided with distribution. In
+ * addition, Licensee may not authorize further sublicense of source of any
+ * portion of the Covered Code, and must include terms to the effect that the
+ * license from Licensee to its licensee is limited to the intellectual
+ * property embodied in the software Licensee provides to its licensee, and
+ * not to intellectual property embodied in modifications its licensee may
+ * make.
+ *
+ * 3.3. Redistribution of Executable. Redistribution in executable form of any
+ * substantial portion of the Covered Code or modification must reproduce the
+ * above Copyright Notice, and the following Disclaimer and Export Compliance
+ * provision in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3.4. Intel retains all right, title, and interest in and to the Original
+ * Intel Code.
+ *
+ * 3.5. Neither the name Intel nor any other trademark owned or controlled by
+ * Intel shall be used in advertising or otherwise to promote the sale, use or
+ * other dealings in products derived from or relating to the Covered Code
+ * without prior written authorization from Intel.
+ *
+ * 4. Disclaimer and Export Compliance
+ *
+ * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
+ * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
+ * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
+ * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
+ * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
+ * PARTICULAR PURPOSE.
+ *
+ * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
+ * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
+ * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
+ * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
+ * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
+ * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
+ * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
+ * LIMITED REMEDY.
+ *
+ * 4.3. Licensee shall not export, either directly or indirectly, any of this
+ * software or system incorporating such software without first obtaining any
+ * required license or other approval from the U. S. Department of Commerce or
+ * any other agency or department of the United States Government. In the
+ * event Licensee exports any such software from the United States or
+ * re-exports any such software from a foreign destination, Licensee shall
+ * ensure that the distribution and export/re-export of the software is in
+ * compliance with all laws, regulations, orders, or other restrictions of the
+ * U.S. Export Administration Regulations. Licensee agrees that neither it nor
+ * any of its subsidiaries will export/re-export any technical data, process,
+ * software, or service, directly or indirectly, to any country for which the
+ * United States government or any agency thereof requires an export license,
+ * other governmental approval, or letter of assurance, without first obtaining
+ * such license, approval or letter.
+ *
+ *****************************************************************************/
+
+
+#define __AMCONVRT_C__
+
+#include "acpi.h"
+#include "acparser.h"
+#include "acnamesp.h"
+#include "acinterp.h"
+#include "acevents.h"
+#include "amlcode.h"
+#include "acdispat.h"
+
+
+#define _COMPONENT INTERPRETER
+ MODULE_NAME ("amconvrt")
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlConvertToTargetType
+ *
+ * PARAMETERS: *ObjDesc - Object to be converted.
+ * WalkState - Current method state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION:
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlConvertToTargetType (
+ OBJECT_TYPE_INTERNAL DestinationType,
+ ACPI_OPERAND_OBJECT **ObjDesc,
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_STATUS Status = AE_OK;
+
+
+ FUNCTION_TRACE ("AmlConvertToTargetType");
+
+
+ /*
+ * If required by the target,
+ * perform implicit conversion on the source before we store it.
+ */
+
+ switch (GET_CURRENT_ARG_TYPE (WalkState->OpInfo->RuntimeArgs))
+ {
+ case ARGI_SIMPLE_TARGET:
+ case ARGI_FIXED_TARGET:
+ case ARGI_INTEGER_REF: /* Handles Increment, Decrement cases */
+
+ switch (DestinationType)
+ {
+ case INTERNAL_TYPE_DEF_FIELD:
+ /*
+ * Named field can always handle conversions
+ */
+ break;
+
+ default:
+ /* No conversion allowed for these types */
+
+ if (DestinationType != (*ObjDesc)->Common.Type)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("AmlConvertToTargetType: Target does not allow conversion of type %s to %s\n",
+ AcpiCmGetTypeName ((*ObjDesc)->Common.Type),
+ AcpiCmGetTypeName (DestinationType)));
+ Status = AE_TYPE;
+ }
+ }
+ break;
+
+
+ case ARGI_TARGETREF:
+
+ switch (DestinationType)
+ {
+ case ACPI_TYPE_INTEGER:
+ case ACPI_TYPE_FIELD_UNIT:
+ case INTERNAL_TYPE_BANK_FIELD:
+ case INTERNAL_TYPE_INDEX_FIELD:
+ /*
+ * These types require an Integer operand. We can convert
+ * a Buffer or a String to an Integer if necessary.
+ */
+ Status = AcpiAmlConvertToInteger (ObjDesc, WalkState);
+ break;
+
+
+ case ACPI_TYPE_STRING:
+
+ /*
+ * The operand must be a String. We can convert an
+ * Integer or Buffer if necessary
+ */
+ Status = AcpiAmlConvertToString (ObjDesc, WalkState);
+ break;
+
+
+ case ACPI_TYPE_BUFFER:
+
+ /*
+ * The operand must be a String. We can convert an
+ * Integer or Buffer if necessary
+ */
+ Status = AcpiAmlConvertToBuffer (ObjDesc, WalkState);
+ break;
+ }
+ break;
+
+
+ case ARGI_REFERENCE:
+ /*
+ * CreateXxxxField cases - we are storing the field object into the name
+ */
+ break;
+
+
+ default:
+ DEBUG_PRINT (ACPI_ERROR,
+ ("AmlConvertToTargetType: Unknown Target type ID 0x%X Op %s DestType %s\n",
+ GET_CURRENT_ARG_TYPE (WalkState->OpInfo->RuntimeArgs),
+ WalkState->OpInfo->Name,
+ AcpiCmGetTypeName (DestinationType)));
+
+ Status = AE_AML_INTERNAL;
+ }
+
+
+ /*
+ * Source-to-Target conversion semantics:
+ *
+ * If conversion to the target type cannot be performed, then simply
+ * overwrite the target with the new object and type.
+ */
+ if (Status == AE_TYPE)
+ {
+ Status = AE_OK;
+ }
+
+ return_ACPI_STATUS (Status);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlConvertToInteger
+ *
+ * PARAMETERS: *ObjDesc - Object to be converted. Must be an
+ * Integer, Buffer, or String
+ * WalkState - Current method state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Convert an ACPI Object to an integer.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlConvertToInteger (
+ ACPI_OPERAND_OBJECT **ObjDesc,
+ ACPI_WALK_STATE *WalkState)
+{
+ UINT32 i;
+ ACPI_OPERAND_OBJECT *RetDesc;
+ UINT32 Count;
+ char *Pointer;
+ ACPI_INTEGER Result;
+ UINT32 IntegerSize = sizeof (ACPI_INTEGER);
+
+
+ switch ((*ObjDesc)->Common.Type)
+ {
+ case ACPI_TYPE_INTEGER:
+ return (AE_OK);
+
+ case ACPI_TYPE_STRING:
+ Pointer = (*ObjDesc)->String.Pointer;
+ Count = (*ObjDesc)->String.Length;
+ break;
+
+ case ACPI_TYPE_BUFFER:
+ Pointer = (char *) (*ObjDesc)->Buffer.Pointer;
+ Count = (*ObjDesc)->Buffer.Length;
+ break;
+
+ default:
+ return (AE_TYPE);
+ }
+
+ /*
+ * Create a new integer
+ */
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
+ if (!RetDesc)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+
+ /* Handle both ACPI 1.0 and ACPI 2.0 Integer widths */
+
+ if (WalkState->MethodNode->Flags & ANOBJ_DATA_WIDTH_32)
+ {
+ /*
+ * We are running a method that exists in a 32-bit ACPI table.
+ * Truncate the value to 32 bits by zeroing out the upper 32-bit field
+ */
+ IntegerSize = sizeof (UINT32);
+ }
+
+
+ /*
+ * Convert the buffer/string to an integer. Note that both buffers and
+ * strings are treated as raw data - we don't convert ascii to hex for
+ * strings.
+ *
+ * There are two terminating conditions for the loop:
+ * 1) The size of an integer has been reached, or
+ * 2) The end of the buffer or string has been reached
+ */
+ Result = 0;
+
+ /* Transfer no more than an integer's worth of data */
+
+ if (Count > IntegerSize)
+ {
+ Count = IntegerSize;
+ }
+
+ /*
+ * String conversion is different than Buffer conversion
+ */
+ switch ((*ObjDesc)->Common.Type)
+ {
+ case ACPI_TYPE_STRING:
+
+ /* TBD: Need to use 64-bit STRTOUL */
+
+ /*
+ * Convert string to an integer
+ * String must be hexadecimal as per the ACPI specification
+ */
+
+ Result = STRTOUL (Pointer, NULL, 16);
+ break;
+
+
+ case ACPI_TYPE_BUFFER:
+
+ /*
+ * Buffer conversion - we simply grab enough raw data from the
+ * buffer to fill an integer
+ */
+ for (i = 0; i < Count; i++)
+ {
+ /*
+ * Get next byte and shift it into the Result.
+ * Little endian is used, meaning that the first byte of the buffer
+ * is the LSB of the integer
+ */
+ Result |= (((ACPI_INTEGER) Pointer[i]) << (i * 8));
+ }
+
+ break;
+ }
+
+ /* Save the Result, delete original descriptor, store new descriptor */
+
+ RetDesc->Integer.Value = Result;
+
+ if (WalkState->Opcode != AML_STORE_OP)
+ {
+ AcpiCmRemoveReference (*ObjDesc);
+ }
+
+ *ObjDesc = RetDesc;
+
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlConvertToBuffer
+ *
+ * PARAMETERS: *ObjDesc - Object to be converted. Must be an
+ * Integer, Buffer, or String
+ * WalkState - Current method state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Convert an ACPI Object to an Buffer
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlConvertToBuffer (
+ ACPI_OPERAND_OBJECT **ObjDesc,
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_OPERAND_OBJECT *RetDesc;
+ UINT32 i;
+ UINT32 IntegerSize = sizeof (ACPI_INTEGER);
+ UINT8 *NewBuf;
+
+
+ switch ((*ObjDesc)->Common.Type)
+ {
+ case ACPI_TYPE_INTEGER:
+
+ /*
+ * Create a new Buffer
+ */
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_BUFFER);
+ if (!RetDesc)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ /* Handle both ACPI 1.0 and ACPI 2.0 Integer widths */
+
+ if (WalkState->MethodNode->Flags & ANOBJ_DATA_WIDTH_32)
+ {
+ /*
+ * We are running a method that exists in a 32-bit ACPI table.
+ * Truncate the value to 32 bits by zeroing out the upper
+ * 32-bit field
+ */
+ IntegerSize = sizeof (UINT32);
+ }
+
+ /* Need enough space for one integers */
+
+ RetDesc->Buffer.Length = IntegerSize;
+ NewBuf = AcpiCmCallocate (IntegerSize);
+ if (!NewBuf)
+ {
+ REPORT_ERROR
+ (("AmlExecDyadic2R/ConcatOp: Buffer allocation failure\n"));
+ AcpiCmRemoveReference (RetDesc);
+ return (AE_NO_MEMORY);
+ }
+
+ /* Copy the integer to the buffer */
+
+ for (i = 0; i < IntegerSize; i++)
+ {
+ NewBuf[i] = (UINT8) ((*ObjDesc)->Integer.Value >> (i * 8));
+ }
+ RetDesc->Buffer.Pointer = NewBuf;
+
+ /* Return the new buffer descriptor */
+
+ if (WalkState->Opcode != AML_STORE_OP)
+ {
+ AcpiCmRemoveReference (*ObjDesc);
+ }
+ *ObjDesc = RetDesc;
+ break;
+
+
+ case ACPI_TYPE_STRING:
+ break;
+
+
+ case ACPI_TYPE_BUFFER:
+ break;
+
+
+ default:
+ return (AE_TYPE);
+ break;
+ }
+
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlConvertToString
+ *
+ * PARAMETERS: *ObjDesc - Object to be converted. Must be an
+ * Integer, Buffer, or String
+ * WalkState - Current method state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Convert an ACPI Object to a string
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlConvertToString (
+ ACPI_OPERAND_OBJECT **ObjDesc,
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_OPERAND_OBJECT *RetDesc;
+ UINT32 i;
+ UINT32 Index;
+ UINT32 IntegerSize = sizeof (ACPI_INTEGER);
+ UINT8 *NewBuf;
+ UINT8 *Pointer;
+
+
+ switch ((*ObjDesc)->Common.Type)
+ {
+ case ACPI_TYPE_INTEGER:
+
+ /*
+ * Create a new String
+ */
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_STRING);
+ if (!RetDesc)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ /* Handle both ACPI 1.0 and ACPI 2.0 Integer widths */
+
+ if (WalkState->MethodNode->Flags & ANOBJ_DATA_WIDTH_32)
+ {
+ /*
+ * We are running a method that exists in a 32-bit ACPI table.
+ * Truncate the value to 32 bits by zeroing out the upper
+ * 32-bit field
+ */
+ IntegerSize = sizeof (UINT32);
+ }
+
+ /* Need enough space for one ASCII integer plus null terminator */
+
+ RetDesc->String.Length = (IntegerSize * 2) + 1;
+ NewBuf = AcpiCmCallocate (RetDesc->String.Length);
+ if (!NewBuf)
+ {
+ REPORT_ERROR
+ (("AmlExecDyadic2R/ConcatOp: Buffer allocation failure\n"));
+ AcpiCmRemoveReference (RetDesc);
+ return (AE_NO_MEMORY);
+ }
+
+ /* Copy the integer to the buffer */
+
+ for (i = 0; i < (IntegerSize * 2); i++)
+ {
+ NewBuf[i] = AcpiGbl_HexToAscii [((*ObjDesc)->Integer.Value >> (i * 4)) & 0xF];
+ }
+
+ /* Null terminate */
+
+ NewBuf [i] = 0;
+ RetDesc->Buffer.Pointer = NewBuf;
+
+ /* Return the new buffer descriptor */
+
+ if (WalkState->Opcode != AML_STORE_OP)
+ {
+ AcpiCmRemoveReference (*ObjDesc);
+ }
+ *ObjDesc = RetDesc;
+
+ return (AE_OK);
+
+
+ case ACPI_TYPE_BUFFER:
+
+ if (((*ObjDesc)->Buffer.Length * 3) > ACPI_MAX_STRING_CONVERSION)
+ {
+ return (AE_AML_STRING_LIMIT);
+ }
+
+ /*
+ * Create a new String
+ */
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_STRING);
+ if (!RetDesc)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ /* Need enough space for one ASCII integer plus null terminator */
+
+ RetDesc->String.Length = (*ObjDesc)->Buffer.Length * 3;
+ NewBuf = AcpiCmCallocate (RetDesc->String.Length + 1);
+ if (!NewBuf)
+ {
+ REPORT_ERROR
+ (("AmlExecDyadic2R/ConcatOp: Buffer allocation failure\n"));
+ AcpiCmRemoveReference (RetDesc);
+ return (AE_NO_MEMORY);
+ }
+
+ /*
+ * Convert each byte of the buffer to two ASCII characters plus a space.
+ */
+ Pointer = (*ObjDesc)->Buffer.Pointer;
+ Index = 0;
+ for (i = 0; i < (*ObjDesc)->Buffer.Length; i++)
+ {
+ NewBuf[Index + 0] = AcpiGbl_HexToAscii [Pointer[i] & 0x0F];
+ NewBuf[Index + 1] = AcpiGbl_HexToAscii [(Pointer[i] >> 4) & 0x0F];
+ NewBuf[Index + 2] = ' ';
+ Index += 3;
+ }
+
+ /* Null terminate */
+
+ NewBuf [Index] = 0;
+ RetDesc->Buffer.Pointer = NewBuf;
+
+ /* Return the new buffer descriptor */
+
+ if (WalkState->Opcode != AML_STORE_OP)
+ {
+ AcpiCmRemoveReference (*ObjDesc);
+ }
+ *ObjDesc = RetDesc;
+ break;
+
+
+ case ACPI_TYPE_STRING:
+ break;
+
+
+ default:
+ return (AE_TYPE);
+ break;
+ }
+
+ return (AE_OK);
+}
+
+
diff --git a/sys/contrib/dev/acpica/excreate.c b/sys/contrib/dev/acpica/excreate.c
index 4dbf3d8..e02df3c 100644
--- a/sys/contrib/dev/acpica/excreate.c
+++ b/sys/contrib/dev/acpica/excreate.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amcreate - Named object creation
- * $Revision: 52 $
+ * $Revision: 53 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -477,7 +477,7 @@ AcpiAmlExecCreateMutex (
goto Cleanup;
}
- ObjDesc->Mutex.SyncLevel = (UINT8) SyncDesc->Number.Value;
+ ObjDesc->Mutex.SyncLevel = (UINT8) SyncDesc->Integer.Value;
/* ObjDesc was on the stack top, and the name is below it */
diff --git a/sys/contrib/dev/acpica/exdump.c b/sys/contrib/dev/acpica/exdump.c
index c766a06..37f67f8 100644
--- a/sys/contrib/dev/acpica/exdump.c
+++ b/sys/contrib/dev/acpica/exdump.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amdump - Interpreter debug output routines
- * $Revision: 97 $
+ * $Revision: 100 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -130,7 +130,7 @@
* The following routines are used for debug output only
*/
-#ifdef ACPI_DEBUG
+#if defined(ACPI_DEBUG) || defined(ENABLE_DEBUGGER)
/*****************************************************************************
*
@@ -334,12 +334,12 @@ AcpiAmlDumpOperand (
DEBUG_PRINT_RAW (ACPI_INFO, ("Reference: Arg%d",
EntryDesc->Reference.Offset));
- if (ACPI_TYPE_NUMBER == EntryDesc->Common.Type)
+ if (ACPI_TYPE_INTEGER == EntryDesc->Common.Type)
{
/* Value is a Number */
DEBUG_PRINT_RAW (ACPI_INFO, (" value is [%ld]",
- EntryDesc->Number.Value));
+ EntryDesc->Integer.Value));
}
DEBUG_PRINT_RAW (ACPI_INFO, ("\n"));
@@ -351,13 +351,13 @@ AcpiAmlDumpOperand (
DEBUG_PRINT_RAW (ACPI_INFO, ("Reference: Local%d",
EntryDesc->Reference.Offset));
- if (ACPI_TYPE_NUMBER == EntryDesc->Common.Type)
+ if (ACPI_TYPE_INTEGER == EntryDesc->Common.Type)
{
/* Value is a Number */
DEBUG_PRINT_RAW (ACPI_INFO, (" value is [%ld]",
- EntryDesc->Number.Value));
+ EntryDesc->Integer.Value));
}
DEBUG_PRINT_RAW (ACPI_INFO, ("\n"));
@@ -412,24 +412,24 @@ AcpiAmlDumpOperand (
break;
- case ACPI_TYPE_NUMBER:
+ case ACPI_TYPE_INTEGER:
DEBUG_PRINT_RAW (ACPI_INFO, ("Number %lX\n",
- EntryDesc->Number.Value));
+ EntryDesc->Integer.Value));
break;
case INTERNAL_TYPE_IF:
DEBUG_PRINT_RAW (ACPI_INFO, ("If [Number] %lX\n",
- EntryDesc->Number.Value));
+ EntryDesc->Integer.Value));
break;
case INTERNAL_TYPE_WHILE:
DEBUG_PRINT_RAW (ACPI_INFO, ("While [Number] %lX\n",
- EntryDesc->Number.Value));
+ EntryDesc->Integer.Value));
break;
@@ -763,10 +763,10 @@ AcpiAmlDumpObjectDescriptor (
switch (ObjDesc->Common.Type)
{
- case ACPI_TYPE_NUMBER:
+ case ACPI_TYPE_INTEGER:
AcpiOsPrintf ("%20s : %s\n", "Type", "Number");
- AcpiOsPrintf ("%20s : %X\n", "Value", ObjDesc->Number.Value);
+ AcpiOsPrintf ("%20s : %X\n", "Value", ObjDesc->Integer.Value);
break;
@@ -782,7 +782,6 @@ AcpiAmlDumpObjectDescriptor (
AcpiOsPrintf ("%20s : %s\n", "Type", "Buffer");
AcpiOsPrintf ("%20s : %X\n", "Length", ObjDesc->Buffer.Length);
- AcpiOsPrintf ("%20s : %X\n", "Sequence", ObjDesc->Buffer.Sequence);
AcpiOsPrintf ("%20s : %p\n", "Pointer", ObjDesc->Buffer.Pointer);
break;
diff --git a/sys/contrib/dev/acpica/exdyadic.c b/sys/contrib/dev/acpica/exdyadic.c
index f0b87ec..c80d929 100644
--- a/sys/contrib/dev/acpica/exdyadic.c
+++ b/sys/contrib/dev/acpica/exdyadic.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amdyadic - ACPI AML (p-code) execution for dyadic operators
- * $Revision: 69 $
+ * $Revision: 71 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -130,7 +130,183 @@
MODULE_NAME ("amdyadic")
-/*****************************************************************************
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlDoConcatenate
+ *
+ * PARAMETERS: *ObjDesc - Object to be converted. Must be an
+ * Integer, Buffer, or String
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Concatenate two objects OF THE SAME TYPE.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlDoConcatenate (
+ ACPI_OPERAND_OBJECT *ObjDesc,
+ ACPI_OPERAND_OBJECT *ObjDesc2,
+ ACPI_OPERAND_OBJECT **ActualRetDesc,
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_STATUS Status;
+ UINT32 i;
+ ACPI_INTEGER ThisInteger;
+ ACPI_OPERAND_OBJECT *RetDesc;
+ NATIVE_CHAR *NewBuf;
+ UINT32 IntegerSize = sizeof (ACPI_INTEGER);
+
+
+ /*
+ * There are three cases to handle:
+ * 1) Two Integers concatenated to produce a buffer
+ * 2) Two Strings concatenated to produce a string
+ * 3) Two Buffers concatenated to produce a buffer
+ */
+ switch (ObjDesc->Common.Type)
+ {
+ case ACPI_TYPE_INTEGER:
+
+ /* Handle both ACPI 1.0 and ACPI 2.0 Integer widths */
+
+ if (WalkState->MethodNode->Flags & ANOBJ_DATA_WIDTH_32)
+ {
+ /*
+ * We are running a method that exists in a 32-bit ACPI table.
+ * Truncate the value to 32 bits by zeroing out the upper
+ * 32-bit field
+ */
+ IntegerSize = sizeof (UINT32);
+ }
+
+ /* Result of two integers is a buffer */
+
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_BUFFER);
+ if (!RetDesc)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ /* Need enough space for two integers */
+
+ RetDesc->Buffer.Length = IntegerSize * 2;
+ NewBuf = AcpiCmCallocate (RetDesc->Buffer.Length);
+ if (!NewBuf)
+ {
+ REPORT_ERROR
+ (("AmlExecDyadic2R/ConcatOp: Buffer allocation failure\n"));
+ Status = AE_NO_MEMORY;
+ goto Cleanup;
+ }
+
+ RetDesc->Buffer.Pointer = (UINT8 *) NewBuf;
+
+ /* Convert the first integer */
+
+ ThisInteger = ObjDesc->Integer.Value;
+ for (i = 0; i < IntegerSize; i++)
+ {
+ NewBuf[i] = (UINT8) ThisInteger;
+ ThisInteger >>= 8;
+ }
+
+ /* Convert the second integer */
+
+ ThisInteger = ObjDesc2->Integer.Value;
+ for (; i < (IntegerSize * 2); i++)
+ {
+ NewBuf[i] = (UINT8) ThisInteger;
+ ThisInteger >>= 8;
+ }
+
+ break;
+
+
+ case ACPI_TYPE_STRING:
+
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_STRING);
+ if (!RetDesc)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ /* Operand1 is string */
+
+ NewBuf = AcpiCmAllocate (ObjDesc->String.Length +
+ ObjDesc2->String.Length + 1);
+ if (!NewBuf)
+ {
+ REPORT_ERROR
+ (("AmlExecDyadic2R/ConcatOp: String allocation failure\n"));
+ Status = AE_NO_MEMORY;
+ goto Cleanup;
+ }
+
+ STRCPY (NewBuf, ObjDesc->String.Pointer);
+ STRCPY (NewBuf + ObjDesc->String.Length,
+ ObjDesc2->String.Pointer);
+
+ /* Point the return object to the new string */
+
+ RetDesc->String.Pointer = NewBuf;
+ RetDesc->String.Length = ObjDesc->String.Length +=
+ ObjDesc2->String.Length;
+ break;
+
+
+ case ACPI_TYPE_BUFFER:
+
+ /* Operand1 is a buffer */
+
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_BUFFER);
+ if (!RetDesc)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ NewBuf = AcpiCmAllocate (ObjDesc->Buffer.Length +
+ ObjDesc2->Buffer.Length);
+ if (!NewBuf)
+ {
+ REPORT_ERROR
+ (("AmlExecDyadic2R/ConcatOp: Buffer allocation failure\n"));
+ Status = AE_NO_MEMORY;
+ goto Cleanup;
+ }
+
+ MEMCPY (NewBuf, ObjDesc->Buffer.Pointer,
+ ObjDesc->Buffer.Length);
+ MEMCPY (NewBuf + ObjDesc->Buffer.Length, ObjDesc2->Buffer.Pointer,
+ ObjDesc2->Buffer.Length);
+
+ /*
+ * Point the return object to the new buffer
+ */
+
+ RetDesc->Buffer.Pointer = (UINT8 *) NewBuf;
+ RetDesc->Buffer.Length = ObjDesc->Buffer.Length +
+ ObjDesc2->Buffer.Length;
+ break;
+
+ default:
+ Status = AE_AML_INTERNAL;
+ RetDesc = NULL;
+ }
+
+
+ *ActualRetDesc = RetDesc;
+ return (AE_OK);
+
+
+Cleanup:
+
+ AcpiCmRemoveReference (RetDesc);
+ return (Status);
+}
+
+
+/*******************************************************************************
*
* FUNCTION: AcpiAmlExecDyadic1
*
@@ -143,7 +319,7 @@
*
* ALLOCATION: Deletes both operands
*
- ****************************************************************************/
+ ******************************************************************************/
ACPI_STATUS
AcpiAmlExecDyadic1 (
@@ -211,7 +387,7 @@ AcpiAmlExecDyadic1 (
/* Dispatch the notify to the appropriate handler */
- AcpiEvNotifyDispatch (Node, (UINT32) ValDesc->Number.Value);
+ AcpiEvNotifyDispatch (Node, (UINT32) ValDesc->Integer.Value);
break;
default:
@@ -244,7 +420,7 @@ Cleanup:
}
-/*****************************************************************************
+/*******************************************************************************
*
* FUNCTION: AcpiAmlExecDyadic2R
*
@@ -257,7 +433,7 @@ Cleanup:
*
* ALLOCATION: Deletes one operand descriptor -- other remains on stack
*
- ****************************************************************************/
+ ******************************************************************************/
ACPI_STATUS
AcpiAmlExecDyadic2R (
@@ -273,7 +449,6 @@ AcpiAmlExecDyadic2R (
ACPI_OPERAND_OBJECT *RetDesc2 = NULL;
ACPI_STATUS Status = AE_OK;
UINT32 NumOperands = 3;
- NATIVE_CHAR *NewBuf;
FUNCTION_TRACE_U32 ("AmlExecDyadic2R", Opcode);
@@ -322,7 +497,7 @@ AcpiAmlExecDyadic2R (
case AML_SHIFT_RIGHT_OP:
case AML_SUBTRACT_OP:
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!RetDesc)
{
Status = AE_NO_MEMORY;
@@ -344,8 +519,8 @@ AcpiAmlExecDyadic2R (
case AML_ADD_OP:
- RetDesc->Number.Value = ObjDesc->Number.Value +
- ObjDesc2->Number.Value;
+ RetDesc->Integer.Value = ObjDesc->Integer.Value +
+ ObjDesc2->Integer.Value;
break;
@@ -353,8 +528,8 @@ AcpiAmlExecDyadic2R (
case AML_BIT_AND_OP:
- RetDesc->Number.Value = ObjDesc->Number.Value &
- ObjDesc2->Number.Value;
+ RetDesc->Integer.Value = ObjDesc->Integer.Value &
+ ObjDesc2->Integer.Value;
break;
@@ -362,8 +537,8 @@ AcpiAmlExecDyadic2R (
case AML_BIT_NAND_OP:
- RetDesc->Number.Value = ~(ObjDesc->Number.Value &
- ObjDesc2->Number.Value);
+ RetDesc->Integer.Value = ~(ObjDesc->Integer.Value &
+ ObjDesc2->Integer.Value);
break;
@@ -371,8 +546,8 @@ AcpiAmlExecDyadic2R (
case AML_BIT_OR_OP:
- RetDesc->Number.Value = ObjDesc->Number.Value |
- ObjDesc2->Number.Value;
+ RetDesc->Integer.Value = ObjDesc->Integer.Value |
+ ObjDesc2->Integer.Value;
break;
@@ -380,8 +555,8 @@ AcpiAmlExecDyadic2R (
case AML_BIT_NOR_OP:
- RetDesc->Number.Value = ~(ObjDesc->Number.Value |
- ObjDesc2->Number.Value);
+ RetDesc->Integer.Value = ~(ObjDesc->Integer.Value |
+ ObjDesc2->Integer.Value);
break;
@@ -389,16 +564,16 @@ AcpiAmlExecDyadic2R (
case AML_BIT_XOR_OP:
- RetDesc->Number.Value = ObjDesc->Number.Value ^
- ObjDesc2->Number.Value;
+ RetDesc->Integer.Value = ObjDesc->Integer.Value ^
+ ObjDesc2->Integer.Value;
break;
- /* DefDivide := DivideOp Dividend Divisor Remainder Quotient */
+ /* DefDivide := DivideOp Dividend Divisor Remainder Quotient */
case AML_DIVIDE_OP:
- if (!ObjDesc2->Number.Value)
+ if (!ObjDesc2->Integer.Value)
{
REPORT_ERROR
(("AmlExecDyadic2R/DivideOp: Divide by zero\n"));
@@ -407,7 +582,7 @@ AcpiAmlExecDyadic2R (
goto Cleanup;
}
- RetDesc2 = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ RetDesc2 = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!RetDesc2)
{
Status = AE_NO_MEMORY;
@@ -416,13 +591,13 @@ AcpiAmlExecDyadic2R (
/* Remainder (modulo) */
- RetDesc->Number.Value = ACPI_MODULO (ObjDesc->Number.Value,
- ObjDesc2->Number.Value);
+ RetDesc->Integer.Value = ACPI_MODULO (ObjDesc->Integer.Value,
+ ObjDesc2->Integer.Value);
/* Result (what we used to call the quotient) */
- RetDesc2->Number.Value = ACPI_DIVIDE (ObjDesc->Number.Value,
- ObjDesc2->Number.Value);
+ RetDesc2->Integer.Value = ACPI_DIVIDE (ObjDesc->Integer.Value,
+ ObjDesc2->Integer.Value);
break;
@@ -430,8 +605,8 @@ AcpiAmlExecDyadic2R (
case AML_MULTIPLY_OP:
- RetDesc->Number.Value = ObjDesc->Number.Value *
- ObjDesc2->Number.Value;
+ RetDesc->Integer.Value = ObjDesc->Integer.Value *
+ ObjDesc2->Integer.Value;
break;
@@ -439,8 +614,8 @@ AcpiAmlExecDyadic2R (
case AML_SHIFT_LEFT_OP:
- RetDesc->Number.Value = ObjDesc->Number.Value <<
- ObjDesc2->Number.Value;
+ RetDesc->Integer.Value = ObjDesc->Integer.Value <<
+ ObjDesc2->Integer.Value;
break;
@@ -448,8 +623,8 @@ AcpiAmlExecDyadic2R (
case AML_SHIFT_RIGHT_OP:
- RetDesc->Number.Value = ObjDesc->Number.Value >>
- ObjDesc2->Number.Value;
+ RetDesc->Integer.Value = ObjDesc->Integer.Value >>
+ ObjDesc2->Integer.Value;
break;
@@ -457,8 +632,8 @@ AcpiAmlExecDyadic2R (
case AML_SUBTRACT_OP:
- RetDesc->Number.Value = ObjDesc->Number.Value -
- ObjDesc2->Number.Value;
+ RetDesc->Integer.Value = ObjDesc->Integer.Value -
+ ObjDesc2->Integer.Value;
break;
@@ -466,89 +641,56 @@ AcpiAmlExecDyadic2R (
case AML_CONCAT_OP:
- if (ObjDesc2->Common.Type != ObjDesc->Common.Type)
- {
- DEBUG_PRINT (ACPI_ERROR,
- ("AmlExecDyadic2R/ConcatOp: operand type mismatch %X != %X\n",
- ObjDesc->Common.Type, ObjDesc2->Common.Type));
- Status = AE_AML_OPERAND_TYPE;
- goto Cleanup;
- }
- /* Both operands are now known to be the same */
+ /*
+ * Convert the second operand if necessary. The first operand
+ * determines the type of the second operand, (See the Data Types
+ * section of the ACPI specification.) Both object types are
+ * guaranteed to be either Integer/String/Buffer by the operand
+ * resolution mechanism above.
+ */
- if (ACPI_TYPE_STRING == ObjDesc->Common.Type)
+ switch (ObjDesc->Common.Type)
{
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_STRING);
- if (!RetDesc)
- {
- Status = AE_NO_MEMORY;
- goto Cleanup;
- }
-
- /* Operand1 is string */
-
- NewBuf = AcpiCmAllocate (ObjDesc->String.Length +
- ObjDesc2->String.Length + 1);
- if (!NewBuf)
- {
- REPORT_ERROR
- (("AmlExecDyadic2R/ConcatOp: String allocation failure\n"));
- Status = AE_NO_MEMORY;
- goto Cleanup;
- }
+ case ACPI_TYPE_INTEGER:
+ Status = AcpiAmlConvertToInteger (&ObjDesc2, WalkState);
+ break;
- STRCPY (NewBuf, ObjDesc->String.Pointer);
- STRCPY (NewBuf + ObjDesc->String.Length,
- ObjDesc2->String.Pointer);
+ case ACPI_TYPE_STRING:
+ Status = AcpiAmlConvertToString (&ObjDesc2, WalkState);
+ break;
- /* Point the return object to the new string */
+ case ACPI_TYPE_BUFFER:
+ Status = AcpiAmlConvertToBuffer (&ObjDesc2, WalkState);
+ break;
- RetDesc->String.Pointer = NewBuf;
- RetDesc->String.Length = ObjDesc->String.Length +=
- ObjDesc2->String.Length;
+ default:
+ Status = AE_AML_INTERNAL;
}
- else
+ if (ACPI_FAILURE (Status))
{
- /* Operand1 is not a string ==> must be a buffer */
-
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_BUFFER);
- if (!RetDesc)
- {
- Status = AE_NO_MEMORY;
- goto Cleanup;
- }
-
- NewBuf = AcpiCmAllocate (ObjDesc->Buffer.Length +
- ObjDesc2->Buffer.Length);
- if (!NewBuf)
- {
- REPORT_ERROR
- (("AmlExecDyadic2R/ConcatOp: Buffer allocation failure\n"));
- Status = AE_NO_MEMORY;
- goto Cleanup;
- }
-
- MEMCPY (NewBuf, ObjDesc->Buffer.Pointer,
- ObjDesc->Buffer.Length);
- MEMCPY (NewBuf + ObjDesc->Buffer.Length, ObjDesc2->Buffer.Pointer,
- ObjDesc2->Buffer.Length);
+ goto Cleanup;
+ }
- /*
- * Point the return object to the new buffer
- */
- RetDesc->Buffer.Pointer = (UINT8 *) NewBuf;
- RetDesc->Buffer.Length = ObjDesc->Buffer.Length +
- ObjDesc2->Buffer.Length;
+ /*
+ * Both operands are now known to be the same object type
+ * (Both are Integer, String, or Buffer), and we can now perform the
+ * concatenation.
+ */
+ Status = AcpiAmlDoConcatenate (ObjDesc, ObjDesc2, &RetDesc, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ goto Cleanup;
}
break;
default:
- REPORT_ERROR (("AcpiAmlExecDyadic2R: Unknown dyadic opcode %X\n", Opcode));
+ REPORT_ERROR (("AcpiAmlExecDyadic2R: Unknown dyadic opcode %X\n",
+ Opcode));
Status = AE_AML_BAD_OPCODE;
goto Cleanup;
}
@@ -612,7 +754,7 @@ Cleanup:
}
-/*****************************************************************************
+/*******************************************************************************
*
* FUNCTION: AcpiAmlExecDyadic2S
*
@@ -624,7 +766,7 @@ Cleanup:
*
* ALLOCATION: Deletes one operand descriptor -- other remains on stack
*
- ****************************************************************************/
+ ******************************************************************************/
ACPI_STATUS
AcpiAmlExecDyadic2S (
@@ -665,7 +807,7 @@ AcpiAmlExecDyadic2S (
/* Create the internal return object */
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!RetDesc)
{
Status = AE_NO_MEMORY;
@@ -674,7 +816,7 @@ AcpiAmlExecDyadic2S (
/* Default return value is FALSE, operation did not time out */
- RetDesc->Number.Value = 0;
+ RetDesc->Integer.Value = 0;
/* Examine the opcode */
@@ -713,7 +855,7 @@ AcpiAmlExecDyadic2S (
if (Status == AE_TIME)
{
- RetDesc->Number.Value = ACPI_INTEGER_MAX; /* TRUE, op timed out */
+ RetDesc->Integer.Value = ACPI_INTEGER_MAX; /* TRUE, op timed out */
Status = AE_OK;
}
@@ -742,7 +884,7 @@ Cleanup:
}
-/*****************************************************************************
+/*******************************************************************************
*
* FUNCTION: AcpiAmlExecDyadic2
*
@@ -756,7 +898,7 @@ Cleanup:
* ALLOCATION: Deletes one operand descriptor -- other remains on stack
* containing result value
*
- ****************************************************************************/
+ ******************************************************************************/
ACPI_STATUS
AcpiAmlExecDyadic2 (
@@ -798,7 +940,7 @@ AcpiAmlExecDyadic2 (
/* Create the internal return object */
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!RetDesc)
{
Status = AE_NO_MEMORY;
@@ -817,8 +959,8 @@ AcpiAmlExecDyadic2 (
case AML_LAND_OP:
- Lboolean = (BOOLEAN) (ObjDesc->Number.Value &&
- ObjDesc2->Number.Value);
+ Lboolean = (BOOLEAN) (ObjDesc->Integer.Value &&
+ ObjDesc2->Integer.Value);
break;
@@ -826,8 +968,8 @@ AcpiAmlExecDyadic2 (
case AML_LEQUAL_OP:
- Lboolean = (BOOLEAN) (ObjDesc->Number.Value ==
- ObjDesc2->Number.Value);
+ Lboolean = (BOOLEAN) (ObjDesc->Integer.Value ==
+ ObjDesc2->Integer.Value);
break;
@@ -835,8 +977,8 @@ AcpiAmlExecDyadic2 (
case AML_LGREATER_OP:
- Lboolean = (BOOLEAN) (ObjDesc->Number.Value >
- ObjDesc2->Number.Value);
+ Lboolean = (BOOLEAN) (ObjDesc->Integer.Value >
+ ObjDesc2->Integer.Value);
break;
@@ -844,8 +986,8 @@ AcpiAmlExecDyadic2 (
case AML_LLESS_OP:
- Lboolean = (BOOLEAN) (ObjDesc->Number.Value <
- ObjDesc2->Number.Value);
+ Lboolean = (BOOLEAN) (ObjDesc->Integer.Value <
+ ObjDesc2->Integer.Value);
break;
@@ -853,8 +995,8 @@ AcpiAmlExecDyadic2 (
case AML_LOR_OP:
- Lboolean = (BOOLEAN) (ObjDesc->Number.Value ||
- ObjDesc2->Number.Value);
+ Lboolean = (BOOLEAN) (ObjDesc->Integer.Value ||
+ ObjDesc2->Integer.Value);
break;
@@ -871,11 +1013,11 @@ AcpiAmlExecDyadic2 (
if (Lboolean)
{
- RetDesc->Number.Value = ACPI_INTEGER_MAX;
+ RetDesc->Integer.Value = ACPI_INTEGER_MAX;
}
else
{
- RetDesc->Number.Value = 0;
+ RetDesc->Integer.Value = 0;
}
diff --git a/sys/contrib/dev/acpica/exfield.c b/sys/contrib/dev/acpica/exfield.c
index b99df95..62c77a7 100644
--- a/sys/contrib/dev/acpica/exfield.c
+++ b/sys/contrib/dev/acpica/exfield.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amfield - ACPI AML (p-code) execution - field manipulation
- * $Revision: 75 $
+ * $Revision: 77 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -293,7 +293,8 @@ AcpiAmlAccessNamedField (
FUNCTION_TRACE_PTR ("AmlAccessNamedField", NamedField);
- /* Basic data checking */
+ /* Parameter validation */
+
if ((!NamedField) || (ACPI_READ == Mode && !Buffer))
{
DEBUG_PRINT (ACPI_ERROR,
@@ -375,7 +376,7 @@ AcpiAmlAccessNamedField (
/* TBD: should these round down to a power of 2? */
- if (DIV_8(BitGranularity) > ByteFieldLength)
+ if (DIV_8 (BitGranularity) > ByteFieldLength)
{
DEBUG_PRINT (ACPI_INFO,
("AmlAccessNamedField: Bit granularity %X truncated to %X\n",
diff --git a/sys/contrib/dev/acpica/exfldio.c b/sys/contrib/dev/acpica/exfldio.c
index 66d6043..ad40aec 100644
--- a/sys/contrib/dev/acpica/exfldio.c
+++ b/sys/contrib/dev/acpica/exfldio.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: amfldio - Aml Field I/O
- * $Revision: 33 $
+ * $Revision: 37 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -254,7 +254,7 @@ AcpiAmlReadField (
UINT32 ThisFieldByteOffset;
UINT32 ThisFieldDatumOffset;
UINT32 PreviousRawDatum;
- UINT32 ThisRawDatum;
+ UINT32 ThisRawDatum = 0;
UINT32 ValidFieldBits;
UINT32 Mask;
UINT32 MergedDatum = 0;
@@ -331,32 +331,46 @@ AcpiAmlReadField (
while (ThisFieldDatumOffset < DatumLength)
{
/*
- * Get the next raw datum, it contains bits of the current
- * field datum
+ * If the field is aligned on a byte boundary, we don't want
+ * to perform a final read, since this would potentially read
+ * past the end of the region.
+ *
+ * TBD: [Investigate] It may make more sense to just split the aligned
+ * and non-aligned cases since the aligned case is so very simple,
*/
-
- Status = AcpiAmlReadFieldData (ObjDesc,
- ThisFieldByteOffset + ByteGranularity,
- BitGranularity, &ThisRawDatum);
- if (ACPI_FAILURE (Status))
+ if ((ObjDesc->Field.BitOffset != 0) ||
+ ((ObjDesc->Field.BitOffset == 0) &&
+ (ThisFieldDatumOffset < (DatumLength -1))))
{
- goto Cleanup;
+ /*
+ * Get the next raw datum, it contains some or all bits
+ * of the current field datum
+ */
+
+ Status = AcpiAmlReadFieldData (ObjDesc,
+ ThisFieldByteOffset + ByteGranularity,
+ BitGranularity, &ThisRawDatum);
+ if (ACPI_FAILURE (Status))
+ {
+ goto Cleanup;
+ }
+
+ /* Before merging the data, make sure the unused bits are clear */
+
+ switch (ByteGranularity)
+ {
+ case 1:
+ ThisRawDatum &= 0x000000FF;
+ PreviousRawDatum &= 0x000000FF;
+ break;
+
+ case 2:
+ ThisRawDatum &= 0x0000FFFF;
+ PreviousRawDatum &= 0x0000FFFF;
+ break;
+ }
}
- /* Before merging the data, make sure the unused bits are clear */
-
- switch (ByteGranularity)
- {
- case 1:
- ThisRawDatum &= 0x000000FF;
- PreviousRawDatum &= 0x000000FF;
- break;
-
- case 2:
- ThisRawDatum &= 0x0000FFFF;
- PreviousRawDatum &= 0x0000FFFF;
- break;
- }
/*
* Put together bits of the two raw data to make a complete
@@ -547,7 +561,6 @@ AcpiAmlWriteFieldDataWithUpdateRule (
MergedValue = FieldValue;
- /* Check if update rule needs to be applied (not if mask is all ones) */
/* Decode the update rule */
@@ -557,13 +570,18 @@ AcpiAmlWriteFieldDataWithUpdateRule (
case UPDATE_PRESERVE:
- /*
- * Read the current contents of the byte/word/dword containing
- * the field, and merge with the new field value.
- */
- Status = AcpiAmlReadFieldData (ObjDesc, ThisFieldByteOffset,
- BitGranularity, &CurrentValue);
- MergedValue |= (CurrentValue & ~Mask);
+ /* Check if update rule needs to be applied (not if mask is all ones) */
+
+ if (((1 << BitGranularity) -1) & ~Mask)
+ {
+ /*
+ * Read the current contents of the byte/word/dword containing
+ * the field, and merge with the new field value.
+ */
+ Status = AcpiAmlReadFieldData (ObjDesc, ThisFieldByteOffset,
+ BitGranularity, &CurrentValue);
+ MergedValue |= (CurrentValue & ~Mask);
+ }
break;
diff --git a/sys/contrib/dev/acpica/exmisc.c b/sys/contrib/dev/acpica/exmisc.c
index 1757bc7..505d9d4 100644
--- a/sys/contrib/dev/acpica/exmisc.c
+++ b/sys/contrib/dev/acpica/exmisc.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: ammisc - ACPI AML (p-code) execution - specific opcodes
- * $Revision: 72 $
+ * $Revision: 73 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -190,7 +190,7 @@ AcpiAmlExecFatal (
DEBUG_PRINT (ACPI_INFO,
("FatalOp: Type %x Code %x Arg %x <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n",
- TypeDesc->Number.Value, CodeDesc->Number.Value, ArgDesc->Number.Value));
+ TypeDesc->Integer.Value, CodeDesc->Integer.Value, ArgDesc->Integer.Value));
/*
@@ -296,7 +296,7 @@ AcpiAmlExecIndex (
{
/* Object to be indexed is a Package */
- if (IdxDesc->Number.Value >= ObjDesc->Package.Count)
+ if (IdxDesc->Integer.Value >= ObjDesc->Package.Count)
{
DEBUG_PRINT (ACPI_ERROR,
("AmlExecIndex: Index value out of range\n"));
@@ -323,7 +323,7 @@ AcpiAmlExecIndex (
* we are after.
*/
- TmpDesc = ObjDesc->Package.Elements[IdxDesc->Number.Value];
+ TmpDesc = ObjDesc->Package.Elements[IdxDesc->Integer.Value];
RetDesc->Reference.OpCode = AML_INDEX_OP;
RetDesc->Reference.TargetType = TmpDesc->Common.Type;
RetDesc->Reference.Object = TmpDesc;
@@ -338,14 +338,14 @@ AcpiAmlExecIndex (
*/
RetDesc->Reference.OpCode = AML_INDEX_OP;
RetDesc->Reference.TargetType = ACPI_TYPE_PACKAGE;
- RetDesc->Reference.Where = &ObjDesc->Package.Elements[IdxDesc->Number.Value];
+ RetDesc->Reference.Where = &ObjDesc->Package.Elements[IdxDesc->Integer.Value];
}
else
{
/* Object to be indexed is a Buffer */
- if (IdxDesc->Number.Value >= ObjDesc->Buffer.Length)
+ if (IdxDesc->Integer.Value >= ObjDesc->Buffer.Length)
{
DEBUG_PRINT (ACPI_ERROR,
("AmlExecIndex: Index value out of range\n"));
@@ -356,7 +356,7 @@ AcpiAmlExecIndex (
RetDesc->Reference.OpCode = AML_INDEX_OP;
RetDesc->Reference.TargetType = ACPI_TYPE_BUFFER_FIELD;
RetDesc->Reference.Object = ObjDesc;
- RetDesc->Reference.Offset = (UINT32) IdxDesc->Number.Value;
+ RetDesc->Reference.Offset = (UINT32) IdxDesc->Integer.Value;
Status = AcpiAmlExecStore (RetDesc, ResDesc, WalkState);
}
@@ -460,8 +460,8 @@ AcpiAmlExecMatch (
/* Validate match comparison sub-opcodes */
- if ((Op1Desc->Number.Value > MAX_MATCH_OPERATOR) ||
- (Op2Desc->Number.Value > MAX_MATCH_OPERATOR))
+ if ((Op1Desc->Integer.Value > MAX_MATCH_OPERATOR) ||
+ (Op2Desc->Integer.Value > MAX_MATCH_OPERATOR))
{
DEBUG_PRINT (ACPI_ERROR,
("AmlExecMatch: operation encoding out of range\n"));
@@ -469,7 +469,7 @@ AcpiAmlExecMatch (
goto Cleanup;
}
- Index = (UINT32) StartDesc->Number.Value;
+ Index = (UINT32) StartDesc->Integer.Value;
if (Index >= (UINT32) PkgDesc->Package.Count)
{
DEBUG_PRINT (ACPI_ERROR,
@@ -478,7 +478,7 @@ AcpiAmlExecMatch (
goto Cleanup;
}
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!RetDesc)
{
Status = AE_NO_MEMORY;
@@ -504,7 +504,7 @@ AcpiAmlExecMatch (
* should we examine its value?
*/
if (!PkgDesc->Package.Elements[Index] ||
- ACPI_TYPE_NUMBER != PkgDesc->Package.Elements[Index]->Common.Type)
+ ACPI_TYPE_INTEGER != PkgDesc->Package.Elements[Index]->Common.Type)
{
continue;
}
@@ -515,7 +515,7 @@ AcpiAmlExecMatch (
* "continue" (proceed to next iteration of enclosing
* "for" loop) signifies a non-match.
*/
- switch (Op1Desc->Number.Value)
+ switch (Op1Desc->Integer.Value)
{
case MATCH_MTR: /* always true */
@@ -525,8 +525,8 @@ AcpiAmlExecMatch (
case MATCH_MEQ: /* true if equal */
- if (PkgDesc->Package.Elements[Index]->Number.Value
- != V1Desc->Number.Value)
+ if (PkgDesc->Package.Elements[Index]->Integer.Value
+ != V1Desc->Integer.Value)
{
continue;
}
@@ -535,8 +535,8 @@ AcpiAmlExecMatch (
case MATCH_MLE: /* true if less than or equal */
- if (PkgDesc->Package.Elements[Index]->Number.Value
- > V1Desc->Number.Value)
+ if (PkgDesc->Package.Elements[Index]->Integer.Value
+ > V1Desc->Integer.Value)
{
continue;
}
@@ -545,8 +545,8 @@ AcpiAmlExecMatch (
case MATCH_MLT: /* true if less than */
- if (PkgDesc->Package.Elements[Index]->Number.Value
- >= V1Desc->Number.Value)
+ if (PkgDesc->Package.Elements[Index]->Integer.Value
+ >= V1Desc->Integer.Value)
{
continue;
}
@@ -555,8 +555,8 @@ AcpiAmlExecMatch (
case MATCH_MGE: /* true if greater than or equal */
- if (PkgDesc->Package.Elements[Index]->Number.Value
- < V1Desc->Number.Value)
+ if (PkgDesc->Package.Elements[Index]->Integer.Value
+ < V1Desc->Integer.Value)
{
continue;
}
@@ -565,8 +565,8 @@ AcpiAmlExecMatch (
case MATCH_MGT: /* true if greater than */
- if (PkgDesc->Package.Elements[Index]->Number.Value
- <= V1Desc->Number.Value)
+ if (PkgDesc->Package.Elements[Index]->Integer.Value
+ <= V1Desc->Integer.Value)
{
continue;
}
@@ -579,7 +579,7 @@ AcpiAmlExecMatch (
}
- switch(Op2Desc->Number.Value)
+ switch(Op2Desc->Integer.Value)
{
case MATCH_MTR:
@@ -589,8 +589,8 @@ AcpiAmlExecMatch (
case MATCH_MEQ:
- if (PkgDesc->Package.Elements[Index]->Number.Value
- != V2Desc->Number.Value)
+ if (PkgDesc->Package.Elements[Index]->Integer.Value
+ != V2Desc->Integer.Value)
{
continue;
}
@@ -599,8 +599,8 @@ AcpiAmlExecMatch (
case MATCH_MLE:
- if (PkgDesc->Package.Elements[Index]->Number.Value
- > V2Desc->Number.Value)
+ if (PkgDesc->Package.Elements[Index]->Integer.Value
+ > V2Desc->Integer.Value)
{
continue;
}
@@ -609,8 +609,8 @@ AcpiAmlExecMatch (
case MATCH_MLT:
- if (PkgDesc->Package.Elements[Index]->Number.Value
- >= V2Desc->Number.Value)
+ if (PkgDesc->Package.Elements[Index]->Integer.Value
+ >= V2Desc->Integer.Value)
{
continue;
}
@@ -619,8 +619,8 @@ AcpiAmlExecMatch (
case MATCH_MGE:
- if (PkgDesc->Package.Elements[Index]->Number.Value
- < V2Desc->Number.Value)
+ if (PkgDesc->Package.Elements[Index]->Integer.Value
+ < V2Desc->Integer.Value)
{
continue;
}
@@ -629,8 +629,8 @@ AcpiAmlExecMatch (
case MATCH_MGT:
- if (PkgDesc->Package.Elements[Index]->Number.Value
- <= V2Desc->Number.Value)
+ if (PkgDesc->Package.Elements[Index]->Integer.Value
+ <= V2Desc->Integer.Value)
{
continue;
}
@@ -650,7 +650,7 @@ AcpiAmlExecMatch (
/* MatchValue is the return value */
- RetDesc->Number.Value = MatchValue;
+ RetDesc->Integer.Value = MatchValue;
Cleanup:
diff --git a/sys/contrib/dev/acpica/exmonad.c b/sys/contrib/dev/acpica/exmonad.c
index 4dcf021..394780f 100644
--- a/sys/contrib/dev/acpica/exmonad.c
+++ b/sys/contrib/dev/acpica/exmonad.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: ammonad - ACPI AML (p-code) execution for monadic operators
- * $Revision: 88 $
+ * $Revision: 89 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -296,7 +296,7 @@ AcpiAmlExecMonadic1 (
case AML_SLEEP_OP:
- AcpiAmlSystemDoSuspend ((UINT32) ObjDesc->Number.Value);
+ AcpiAmlSystemDoSuspend ((UINT32) ObjDesc->Integer.Value);
break;
@@ -304,7 +304,7 @@ AcpiAmlExecMonadic1 (
case AML_STALL_OP:
- AcpiAmlSystemDoStall ((UINT32) ObjDesc->Number.Value);
+ AcpiAmlSystemDoStall ((UINT32) ObjDesc->Integer.Value);
break;
@@ -395,7 +395,7 @@ AcpiAmlExecMonadic2R (
case AML_TO_BCD_OP:
case AML_COND_REF_OF_OP:
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!RetDesc)
{
Status = AE_NO_MEMORY;
@@ -412,7 +412,7 @@ AcpiAmlExecMonadic2R (
case AML_BIT_NOT_OP:
- RetDesc->Number.Value = ~ObjDesc->Number.Value;
+ RetDesc->Integer.Value = ~ObjDesc->Integer.Value;
break;
@@ -420,18 +420,18 @@ AcpiAmlExecMonadic2R (
case AML_FIND_SET_LEFT_BIT_OP:
- RetDesc->Number.Value = ObjDesc->Number.Value;
+ RetDesc->Integer.Value = ObjDesc->Integer.Value;
/*
* Acpi specification describes Integer type as a little
* endian unsigned value, so this boundry condition is valid.
*/
- for (ResVal = 0; RetDesc->Number.Value && ResVal < ACPI_INTEGER_BIT_SIZE; ++ResVal)
+ for (ResVal = 0; RetDesc->Integer.Value && ResVal < ACPI_INTEGER_BIT_SIZE; ++ResVal)
{
- RetDesc->Number.Value >>= 1;
+ RetDesc->Integer.Value >>= 1;
}
- RetDesc->Number.Value = ResVal;
+ RetDesc->Integer.Value = ResVal;
break;
@@ -439,20 +439,20 @@ AcpiAmlExecMonadic2R (
case AML_FIND_SET_RIGHT_BIT_OP:
- RetDesc->Number.Value = ObjDesc->Number.Value;
+ RetDesc->Integer.Value = ObjDesc->Integer.Value;
/*
* Acpi specification describes Integer type as a little
* endian unsigned value, so this boundry condition is valid.
*/
- for (ResVal = 0; RetDesc->Number.Value && ResVal < ACPI_INTEGER_BIT_SIZE; ++ResVal)
+ for (ResVal = 0; RetDesc->Integer.Value && ResVal < ACPI_INTEGER_BIT_SIZE; ++ResVal)
{
- RetDesc->Number.Value <<= 1;
+ RetDesc->Integer.Value <<= 1;
}
/* Since returns must be 1-based, subtract from 33 (65) */
- RetDesc->Number.Value = ResVal == 0 ? 0 : (ACPI_INTEGER_BIT_SIZE + 1) - ResVal;
+ RetDesc->Integer.Value = ResVal == 0 ? 0 : (ACPI_INTEGER_BIT_SIZE + 1) - ResVal;
break;
@@ -463,12 +463,12 @@ AcpiAmlExecMonadic2R (
/*
* The 64-bit ACPI integer can hold 16 4-bit BCD integers
*/
- RetDesc->Number.Value = 0;
+ RetDesc->Integer.Value = 0;
for (i = 0; i < ACPI_MAX_BCD_DIGITS; i++)
{
/* Get one BCD digit */
- Digit = (ACPI_INTEGER) ((ObjDesc->Number.Value >> (i * 4)) & 0xF);
+ Digit = (ACPI_INTEGER) ((ObjDesc->Integer.Value >> (i * 4)) & 0xF);
/* Check the range of the digit */
@@ -490,7 +490,7 @@ AcpiAmlExecMonadic2R (
Digit *= 10;
}
- RetDesc->Number.Value += Digit;
+ RetDesc->Integer.Value += Digit;
}
}
break;
@@ -501,20 +501,20 @@ AcpiAmlExecMonadic2R (
case AML_TO_BCD_OP:
- if (ObjDesc->Number.Value > ACPI_MAX_BCD_VALUE)
+ if (ObjDesc->Integer.Value > ACPI_MAX_BCD_VALUE)
{
DEBUG_PRINT (ACPI_ERROR, ("Monadic2R/ToBCDOp: BCD overflow: %d\n",
- ObjDesc->Number.Value));
+ ObjDesc->Integer.Value));
Status = AE_AML_NUMERIC_OVERFLOW;
goto Cleanup;
}
- RetDesc->Number.Value = 0;
+ RetDesc->Integer.Value = 0;
for (i = 0; i < ACPI_MAX_BCD_DIGITS; i++)
{
/* Divide by nth factor of 10 */
- Digit = ObjDesc->Number.Value;
+ Digit = ObjDesc->Integer.Value;
for (j = 0; j < i; j++)
{
Digit /= 10;
@@ -524,7 +524,7 @@ AcpiAmlExecMonadic2R (
if (Digit > 0)
{
- RetDesc->Number.Value += (ACPI_MODULO (Digit, 10) << (i * 4));
+ RetDesc->Integer.Value += (ACPI_MODULO (Digit, 10) << (i * 4));
}
}
break;
@@ -547,7 +547,7 @@ AcpiAmlExecMonadic2R (
* return FALSE
*/
- RetDesc->Number.Value = 0;
+ RetDesc->Integer.Value = 0;
/*
* Must delete the result descriptor since there is no reference
@@ -570,7 +570,7 @@ AcpiAmlExecMonadic2R (
/* The object exists in the namespace, return TRUE */
- RetDesc->Number.Value = ACPI_INTEGER_MAX;
+ RetDesc->Integer.Value = ACPI_INTEGER_MAX;
goto Cleanup;
break;
@@ -750,14 +750,14 @@ AcpiAmlExecMonadic2 (
case AML_LNOT_OP:
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!RetDesc)
{
Status = AE_NO_MEMORY;
goto Cleanup;
}
- RetDesc->Number.Value = !ObjDesc->Number.Value;
+ RetDesc->Integer.Value = !ObjDesc->Integer.Value;
break;
@@ -819,11 +819,11 @@ AcpiAmlExecMonadic2 (
if (AML_INCREMENT_OP == Opcode)
{
- RetDesc->Number.Value++;
+ RetDesc->Integer.Value++;
}
else
{
- RetDesc->Number.Value--;
+ RetDesc->Integer.Value--;
}
/* Store the result back in the original descriptor */
@@ -855,7 +855,7 @@ AcpiAmlExecMonadic2 (
/* Constants are of type Number */
- Type = ACPI_TYPE_NUMBER;
+ Type = ACPI_TYPE_INTEGER;
break;
@@ -918,14 +918,14 @@ AcpiAmlExecMonadic2 (
/* Allocate a descriptor to hold the type. */
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!RetDesc)
{
Status = AE_NO_MEMORY;
goto Cleanup;
}
- RetDesc->Number.Value = Type;
+ RetDesc->Integer.Value = Type;
break;
@@ -985,14 +985,14 @@ AcpiAmlExecMonadic2 (
* object to hold the value
*/
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!RetDesc)
{
Status = AE_NO_MEMORY;
goto Cleanup;
}
- RetDesc->Number.Value = Value;
+ RetDesc->Integer.Value = Value;
break;
@@ -1112,7 +1112,7 @@ AcpiAmlExecMonadic2 (
* sub-buffer of the main buffer, it is only a pointer to a
* single element (byte) of the buffer!
*/
- RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ RetDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!RetDesc)
{
Status = AE_NO_MEMORY;
@@ -1120,7 +1120,7 @@ AcpiAmlExecMonadic2 (
}
TmpDesc = ObjDesc->Reference.Object;
- RetDesc->Number.Value =
+ RetDesc->Integer.Value =
TmpDesc->Buffer.Pointer[ObjDesc->Reference.Offset];
/* TBD: [Investigate] (see below) Don't add an additional
diff --git a/sys/contrib/dev/acpica/exnames.c b/sys/contrib/dev/acpica/exnames.c
index 60ea50d..9054e2e 100644
--- a/sys/contrib/dev/acpica/exnames.c
+++ b/sys/contrib/dev/acpica/exnames.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amnames - interpreter/scanner name load/execute
- * $Revision: 72 $
+ * $Revision: 73 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/exprep.c b/sys/contrib/dev/acpica/exprep.c
index b0aa979..13c7d04 100644
--- a/sys/contrib/dev/acpica/exprep.c
+++ b/sys/contrib/dev/acpica/exprep.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amprep - ACPI AML (p-code) execution - field prep utilities
- * $Revision: 72 $
+ * $Revision: 73 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/exregion.c b/sys/contrib/dev/acpica/exregion.c
index d85b8e4..ca01974 100644
--- a/sys/contrib/dev/acpica/exregion.c
+++ b/sys/contrib/dev/acpica/exregion.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amregion - ACPI default OpRegion (address space) handlers
- * $Revision: 42 $
+ * $Revision: 44 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -198,8 +198,8 @@ AcpiAmlSystemMemorySpaceHandler (
*/
if ((Address < MemInfo->MappedPhysicalAddress) ||
- ((Address + Length) >
- (MemInfo->MappedPhysicalAddress + MemInfo->MappedLength)))
+ (((ACPI_INTEGER) Address + Length) >
+ ((ACPI_INTEGER) MemInfo->MappedPhysicalAddress + MemInfo->MappedLength)))
{
/*
* The request cannot be resolved by the current memory mapping;
@@ -240,7 +240,7 @@ AcpiAmlSystemMemorySpaceHandler (
/* TBD: should these pointers go to 64-bit in all cases ? */
LogicalAddrPtr = MemInfo->MappedLogicalAddress +
- (Address - MemInfo->MappedPhysicalAddress);
+ ((ACPI_INTEGER) Address - (ACPI_INTEGER) MemInfo->MappedPhysicalAddress);
/* Perform the memory read or write */
diff --git a/sys/contrib/dev/acpica/exresnte.c b/sys/contrib/dev/acpica/exresnte.c
index 3ed35cb..659d6f6 100644
--- a/sys/contrib/dev/acpica/exresnte.c
+++ b/sys/contrib/dev/acpica/exresnte.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amresnte - AML Interpreter object resolution
- * $Revision: 26 $
+ * $Revision: 27 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -147,7 +147,7 @@
* can be either a pointer to an actual internal object or a pointer into the
* AML stream itself. These types are currently:
*
- * ACPI_TYPE_NUMBER
+ * ACPI_TYPE_INTEGER
* ACPI_TYPE_STRING
* ACPI_TYPE_BUFFER
* ACPI_TYPE_MUTEX
@@ -335,7 +335,7 @@ AcpiAmlResolveNodeToValue (
break;
- case ACPI_TYPE_NUMBER:
+ case ACPI_TYPE_INTEGER:
DEBUG_PRINT (TRACE_EXEC, ("AmlResolveEntryToValue: case Number \n"));
@@ -344,7 +344,7 @@ AcpiAmlResolveNodeToValue (
* number
*/
- if (ACPI_TYPE_NUMBER != ValDesc->Common.Type)
+ if (ACPI_TYPE_INTEGER != ValDesc->Common.Type)
{
DEBUG_PRINT (ACPI_ERROR,
("AmlResolveToValue: Object not a Number, type %X\n",
@@ -379,7 +379,7 @@ AcpiAmlResolveNodeToValue (
}
else
{
- ObjectType = ACPI_TYPE_NUMBER;
+ ObjectType = ACPI_TYPE_INTEGER;
}
/*
@@ -423,7 +423,7 @@ AcpiAmlResolveNodeToValue (
return_ACPI_STATUS (Status);
}
- ObjDesc->Number.Value = TempVal;
+ ObjDesc->Integer.Value = TempVal;
}
@@ -484,13 +484,13 @@ AcpiAmlResolveNodeToValue (
/* Create an object for the result */
- ObjDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ ObjDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!ObjDesc)
{
return_ACPI_STATUS (AE_NO_MEMORY);
}
- ObjDesc->Number.Value = TempVal;
+ ObjDesc->Integer.Value = TempVal;
break;
@@ -542,13 +542,13 @@ AcpiAmlResolveNodeToValue (
/* Create an object for the result */
- ObjDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ ObjDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!ObjDesc)
{
return_ACPI_STATUS (AE_NO_MEMORY);
}
- ObjDesc->Number.Value = TempVal;
+ ObjDesc->Integer.Value = TempVal;
break;
@@ -660,13 +660,13 @@ AcpiAmlResolveNodeToValue (
/* Create object for result */
- ObjDesc = AcpiCmCreateInternalObject (ACPI_TYPE_NUMBER);
+ ObjDesc = AcpiCmCreateInternalObject (ACPI_TYPE_INTEGER);
if (!ObjDesc)
{
return_ACPI_STATUS (AE_NO_MEMORY);
}
- ObjDesc->Number.Value = TempVal;
+ ObjDesc->Integer.Value = TempVal;
/* Truncate value if we are executing from a 32-bit ACPI table */
diff --git a/sys/contrib/dev/acpica/exresolv.c b/sys/contrib/dev/acpica/exresolv.c
index f43b15f..26ecd31 100644
--- a/sys/contrib/dev/acpica/exresolv.c
+++ b/sys/contrib/dev/acpica/exresolv.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amresolv - AML Interpreter object resolution
- * $Revision: 79 $
+ * $Revision: 81 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -230,19 +230,19 @@ AcpiAmlGetFieldUnitValue (
Mask = ACPI_UINT32_MAX;
}
- ResultDesc->Number.Type = (UINT8) ACPI_TYPE_NUMBER;
+ ResultDesc->Integer.Type = (UINT8) ACPI_TYPE_INTEGER;
/* Get the 32 bit value at the location */
- MOVE_UNALIGNED32_TO_32 (&ResultDesc->Number.Value, Location);
+ MOVE_UNALIGNED32_TO_32 (&ResultDesc->Integer.Value, Location);
/*
* Shift the 32-bit word containing the field, and mask off the
* resulting value
*/
- ResultDesc->Number.Value =
- (ResultDesc->Number.Value >> FieldDesc->FieldUnit.BitOffset) & Mask;
+ ResultDesc->Integer.Value =
+ (ResultDesc->Integer.Value >> FieldDesc->FieldUnit.BitOffset) & Mask;
DEBUG_PRINT (ACPI_INFO,
("** Read from buffer %p byte %ld bit %d width %d addr %p mask %08lx val %08lx\n",
@@ -250,7 +250,7 @@ AcpiAmlGetFieldUnitValue (
FieldDesc->FieldUnit.Offset,
FieldDesc->FieldUnit.BitOffset,
FieldDesc->FieldUnit.Length,
- Location, Mask, ResultDesc->Number.Value));
+ Location, Mask, ResultDesc->Integer.Value));
/* Release global lock if we acquired it earlier */
@@ -270,7 +270,7 @@ AcpiAmlGetFieldUnitValue (
*
* RETURN: Status
*
- * DESCRIPTION: Convert Reference entries on ObjStack to Rvalues
+ * DESCRIPTION: Convert Reference objects to values
*
******************************************************************************/
@@ -419,13 +419,13 @@ AcpiAmlResolveObjectToValue (
("AmlResolveObjectToValue: [Local%d] ValueObj is %p\n",
Index, ObjDesc));
- if (ACPI_TYPE_NUMBER == ObjDesc->Common.Type)
+ if (ACPI_TYPE_INTEGER == ObjDesc->Common.Type)
{
/* Value is a Number */
DEBUG_PRINT (ACPI_INFO,
("AmlResolveObjectToValue: [Local%d] value=%X \n",
- Index, ObjDesc->Number.Value));
+ Index, ObjDesc->Integer.Value));
}
break;
@@ -460,13 +460,13 @@ AcpiAmlResolveObjectToValue (
("AmlResolveObjectToValue: [Arg%d] ValueObj is %p\n",
Index, ObjDesc));
- if (ACPI_TYPE_NUMBER == ObjDesc->Common.Type)
+ if (ACPI_TYPE_INTEGER == ObjDesc->Common.Type)
{
/* Value is a Number */
DEBUG_PRINT (ACPI_INFO,
("AmlResolveObjectToValue: [Arg%d] value=%X\n",
- Index, ObjDesc->Number.Value));
+ Index, ObjDesc->Integer.Value));
}
break;
@@ -479,22 +479,22 @@ AcpiAmlResolveObjectToValue (
case AML_ZERO_OP:
- StackDesc->Common.Type = (UINT8) ACPI_TYPE_NUMBER;
- StackDesc->Number.Value = 0;
+ StackDesc->Common.Type = (UINT8) ACPI_TYPE_INTEGER;
+ StackDesc->Integer.Value = 0;
break;
case AML_ONE_OP:
- StackDesc->Common.Type = (UINT8) ACPI_TYPE_NUMBER;
- StackDesc->Number.Value = 1;
+ StackDesc->Common.Type = (UINT8) ACPI_TYPE_INTEGER;
+ StackDesc->Integer.Value = 1;
break;
case AML_ONES_OP:
- StackDesc->Common.Type = (UINT8) ACPI_TYPE_NUMBER;
- StackDesc->Number.Value = ACPI_INTEGER_MAX;
+ StackDesc->Common.Type = (UINT8) ACPI_TYPE_INTEGER;
+ StackDesc->Integer.Value = ACPI_INTEGER_MAX;
/* Truncate value if we are executing from a 32-bit ACPI table */
diff --git a/sys/contrib/dev/acpica/exresop.c b/sys/contrib/dev/acpica/exresop.c
index 9c52434..d57d2fb 100644
--- a/sys/contrib/dev/acpica/exresop.c
+++ b/sys/contrib/dev/acpica/exresop.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amresop - AML Interpreter operand/object resolution
- * $Revision: 19 $
+ * $Revision: 22 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -350,8 +350,13 @@ AcpiAmlResolveOperands (
switch (ThisArgType)
{
- case ARGI_REFERENCE: /* Reference */
- case ARGI_TARGETREF:
+ case ARGI_REFERENCE: /* References */
+ case ARGI_INTEGER_REF:
+ case ARGI_OBJECT_REF:
+ case ARGI_DEVICE_REF:
+ case ARGI_TARGETREF: /* TBD: must implement implicit conversion rules before store */
+ case ARGI_FIXED_TARGET: /* No implicit conversion before store to target */
+ case ARGI_SIMPLE_TARGET: /* Name, Local, or Arg - no implicit conversion */
/* Need an operand of type INTERNAL_TYPE_REFERENCE */
@@ -423,20 +428,6 @@ AcpiAmlResolveOperands (
* For the simple cases, only one type of resolved object
* is allowed
*/
- case ARGI_NUMBER: /* Number */
-
- /* Need an operand of type ACPI_TYPE_NUMBER */
-
- TypeNeeded = ACPI_TYPE_NUMBER;
- break;
-
- case ARGI_BUFFER:
-
- /* Need an operand of type ACPI_TYPE_BUFFER */
-
- TypeNeeded = ACPI_TYPE_BUFFER;
- break;
-
case ARGI_MUTEX:
/* Need an operand of type ACPI_TYPE_MUTEX */
@@ -484,15 +475,91 @@ AcpiAmlResolveOperands (
* The more complex cases allow multiple resolved object types
*/
+ case ARGI_INTEGER: /* Number */
+
+ /*
+ * Need an operand of type ACPI_TYPE_INTEGER,
+ * But we can implicitly convert from a STRING or BUFFER
+ */
+ Status = AcpiAmlConvertToInteger (StackPtr, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ if (Status == AE_TYPE)
+ {
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlResolveOperands: Needed [Integer/String/Buffer], found [%s] %p\n",
+ AcpiCmGetTypeName ((*StackPtr)->Common.Type), *StackPtr));
+
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
+ }
+
+ return_ACPI_STATUS (Status);
+ }
+
+ goto NextOperand;
+ break;
+
+
+ case ARGI_BUFFER:
+
+ /*
+ * Need an operand of type ACPI_TYPE_BUFFER,
+ * But we can implicitly convert from a STRING or INTEGER
+ */
+ Status = AcpiAmlConvertToBuffer (StackPtr, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ if (Status == AE_TYPE)
+ {
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlResolveOperands: Needed [Integer/String/Buffer], found [%s] %p\n",
+ AcpiCmGetTypeName ((*StackPtr)->Common.Type), *StackPtr));
+
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
+ }
+
+ return_ACPI_STATUS (Status);
+ }
+
+ goto NextOperand;
+ break;
+
+
case ARGI_STRING:
- /* Need an operand of type ACPI_TYPE_STRING or ACPI_TYPE_BUFFER */
+ /*
+ * Need an operand of type ACPI_TYPE_STRING,
+ * But we can implicitly convert from a BUFFER or INTEGER
+ */
+ Status = AcpiAmlConvertToString (StackPtr, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ if (Status == AE_TYPE)
+ {
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlResolveOperands: Needed [Integer/String/Buffer], found [%s] %p\n",
+ AcpiCmGetTypeName ((*StackPtr)->Common.Type), *StackPtr));
+
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
+ }
+
+ return_ACPI_STATUS (Status);
+ }
+
+ goto NextOperand;
+ break;
+
+
+ case ARGI_COMPUTEDATA:
+
+ /* Need an operand of type INTEGER, STRING or BUFFER */
- if ((ACPI_TYPE_STRING != (*StackPtr)->Common.Type) &&
+ if ((ACPI_TYPE_INTEGER != (*StackPtr)->Common.Type) &&
+ (ACPI_TYPE_STRING != (*StackPtr)->Common.Type) &&
(ACPI_TYPE_BUFFER != (*StackPtr)->Common.Type))
{
DEBUG_PRINT (ACPI_INFO,
- ("AmlResolveOperands: Needed [String or Buffer], found [%s] %p\n",
+ ("AmlResolveOperands: Needed [Integer/String/Buffer], found [%s] %p\n",
AcpiCmGetTypeName ((*StackPtr)->Common.Type), *StackPtr));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
diff --git a/sys/contrib/dev/acpica/exstore.c b/sys/contrib/dev/acpica/exstore.c
index 51f1bb6..71d1dfb 100644
--- a/sys/contrib/dev/acpica/exstore.c
+++ b/sys/contrib/dev/acpica/exstore.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amstore - AML Interpreter object store support
- * $Revision: 118 $
+ * $Revision: 121 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -130,6 +130,10 @@
MODULE_NAME ("amstore")
+
+
+
+
/*******************************************************************************
*
* FUNCTION: AcpiAmlExecStore
@@ -156,18 +160,10 @@ AcpiAmlExecStore (
ACPI_WALK_STATE *WalkState)
{
ACPI_STATUS Status = AE_OK;
- ACPI_OPERAND_OBJECT *DeleteDestDesc = NULL;
- ACPI_OPERAND_OBJECT *TmpDesc;
- ACPI_NAMESPACE_NODE *Node = NULL;
- UINT8 Value = 0;
- UINT32 Length;
- UINT32 i;
-
+ ACPI_OPERAND_OBJECT *RefDesc = DestDesc;
- FUNCTION_TRACE ("AmlExecStore");
- DEBUG_PRINT (ACPI_INFO, ("entered AcpiAmlExecStore: Val=%p, Dest=%p\n",
- ValDesc, DestDesc));
+ FUNCTION_TRACE_PTR ("AmlExecStore", DestDesc);
/* Validate parameters */
@@ -179,80 +175,185 @@ AcpiAmlExecStore (
return_ACPI_STATUS (AE_AML_NO_OPERAND);
}
- /* Examine the datatype of the DestDesc */
+ /* DestDesc can be either a namespace node or an ACPI object */
if (VALID_DESCRIPTOR_TYPE (DestDesc, ACPI_DESC_TYPE_NAMED))
{
- /* Dest is an ACPI_HANDLE, create a new object */
-
- Node = (ACPI_NAMESPACE_NODE *) DestDesc;
- DestDesc = AcpiCmCreateInternalObject (INTERNAL_TYPE_REFERENCE);
- if (!DestDesc)
- {
- /* Allocation failure */
-
- return_ACPI_STATUS (AE_NO_MEMORY);
- }
+ /*
+ * Dest is a namespace node,
+ * Storing an object into a Name "container"
+ */
+ Status = AcpiAmlStoreObjectToNode (ValDesc,
+ (ACPI_NAMESPACE_NODE *) DestDesc, WalkState);
- /* Build a new Reference wrapper around the handle */
+ /* All done, that's it */
- DestDesc->Reference.OpCode = AML_NAME_OP;
- DestDesc->Reference.Object = Node;
+ return_ACPI_STATUS (Status);
}
- else
- {
- DEBUG_PRINT (ACPI_INFO,
- ("AmlExecStore: Dest is object (not handle) - may be deleted!\n"));
- }
- /* Destination object must be of type Reference */
+ /* Destination object must be an object of type Reference */
if (DestDesc->Common.Type != INTERNAL_TYPE_REFERENCE)
{
/* Destination is not an Reference */
DEBUG_PRINT (ACPI_ERROR,
- ("AmlExecStore: Destination is not an Reference [%p]\n", DestDesc));
+ ("AmlExecStore: Destination is not a ReferenceObj [%p]\n", DestDesc));
DUMP_STACK_ENTRY (ValDesc);
DUMP_STACK_ENTRY (DestDesc);
DUMP_OPERANDS (&DestDesc, IMODE_EXECUTE, "AmlExecStore",
- 2, "target not Reference");
+ 2, "Target is not a ReferenceObj");
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
- /* Examine the Reference opcode */
- switch (DestDesc->Reference.OpCode)
+ /*
+ * Examine the Reference opcode. These cases are handled:
+ *
+ * 1) Store to Name (Change the object associated with a name)
+ * 2) Store to an indexed area of a Buffer or Package
+ * 3) Store to a Method Local or Arg
+ * 4) Store to the debug object
+ * 5) Store to a constant -- a noop
+ */
+
+ switch (RefDesc->Reference.OpCode)
{
case AML_NAME_OP:
- /*
- * Storing into a Name
- */
- DeleteDestDesc = DestDesc;
- Status = AcpiAmlStoreObjectToNode (ValDesc, DestDesc->Reference.Object,
- WalkState);
+ /* Storing an object into a Name "container" */
- break; /* Case NameOp */
+ Status = AcpiAmlStoreObjectToNode (ValDesc, RefDesc->Reference.Object,
+ WalkState);
+ break;
case AML_INDEX_OP:
- DeleteDestDesc = DestDesc;
+ /* Storing to an Index (pointer into a packager or buffer) */
+
+ Status = AcpiAmlStoreObjectToIndex (ValDesc, RefDesc, WalkState);
+ break;
+
+
+ case AML_LOCAL_OP:
+
+ Status = AcpiDsMethodDataSetValue (MTH_TYPE_LOCAL,
+ (RefDesc->Reference.Offset), ValDesc, WalkState);
+ break;
+
+
+ case AML_ARG_OP:
+
+ Status = AcpiDsMethodDataSetValue (MTH_TYPE_ARG,
+ (RefDesc->Reference.Offset), ValDesc, WalkState);
+ break;
+
+
+ case AML_DEBUG_OP:
/*
- * Valid source value and destination reference pointer.
+ * Storing to the Debug object causes the value stored to be
+ * displayed and otherwise has no effect -- see ACPI Specification
*
- * ACPI Specification 1.0B section 15.2.3.4.2.13:
- * Destination should point to either a buffer or a package
+ * TBD: print known object types "prettier".
*/
+ DEBUG_PRINT (ACPI_INFO, ("**** Write to Debug Object: ****: \n"));
+
+ if (ValDesc->Common.Type == ACPI_TYPE_STRING)
+ {
+ DEBUG_PRINT (ACPI_INFO, ("%s\n", ValDesc->String.Pointer));
+ }
+ else
+ {
+ DUMP_STACK_ENTRY (ValDesc);
+ }
+
+ break;
+
+
+ case AML_ZERO_OP:
+ case AML_ONE_OP:
+ case AML_ONES_OP:
/*
- * Actually, storing to a package is not so simple. The source must be
+ * Storing to a constant is a no-op -- see ACPI Specification
+ * Delete the reference descriptor, however
+ */
+ break;
+
+
+ default:
+
+ DEBUG_PRINT (ACPI_ERROR,
+ ("AmlExecStore: Internal error - Unknown Reference subtype %02x\n",
+ RefDesc->Reference.OpCode));
+
+ /* TBD: [Restructure] use object dump routine !! */
+
+ DUMP_BUFFER (RefDesc, sizeof (ACPI_OPERAND_OBJECT));
+
+ Status = AE_AML_INTERNAL;
+ break;
+
+ } /* switch (RefDesc->Reference.OpCode) */
+
+
+
+ /* Always delete the reference descriptor object */
+
+ if (RefDesc)
+ {
+ AcpiCmRemoveReference (RefDesc);
+ }
+
+ return_ACPI_STATUS (Status);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlStoreObjectToIndex
+ *
+ * PARAMETERS: *ValDesc - Value to be stored
+ * *Node - Named object to recieve the value
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Store the object to the named object.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlStoreObjectToIndex (
+ ACPI_OPERAND_OBJECT *ValDesc,
+ ACPI_OPERAND_OBJECT *DestDesc,
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_STATUS Status = AE_OK;
+ ACPI_OPERAND_OBJECT *ObjDesc;
+ UINT32 Length;
+ UINT32 i;
+ UINT8 Value = 0;
+
+
+ FUNCTION_TRACE ("AcpiAmlStoreObjectToIndex");
+
+
+ /*
+ * Destination must be a reference pointer, and
+ * must point to either a buffer or a package
+ */
+
+ switch (DestDesc->Reference.TargetType)
+ {
+ case ACPI_TYPE_PACKAGE:
+ /*
+ * Storing to a package element is not simple. The source must be
* evaluated and converted to the type of the destination and then the
* source is copied into the destination - we can't just point to the
* source object.
@@ -263,8 +364,8 @@ AcpiAmlExecStore (
* The object at *(DestDesc->Reference.Where) is the
* element within the package that is to be modified.
*/
- TmpDesc = *(DestDesc->Reference.Where);
- if (TmpDesc)
+ ObjDesc = *(DestDesc->Reference.Where);
+ if (ObjDesc)
{
/*
* If the Destination element is a package, we will delete
@@ -274,46 +375,44 @@ AcpiAmlExecStore (
* to be packages?
* && (ValDesc->Common.Type == ACPI_TYPE_PACKAGE)
*/
- if (TmpDesc->Common.Type == ACPI_TYPE_PACKAGE)
+ if (ObjDesc->Common.Type == ACPI_TYPE_PACKAGE)
{
/*
* Take away the reference for being part of a package and
* delete
*/
- AcpiCmRemoveReference (TmpDesc);
- AcpiCmRemoveReference (TmpDesc);
+ AcpiCmRemoveReference (ObjDesc);
+ AcpiCmRemoveReference (ObjDesc);
- TmpDesc = NULL;
+ ObjDesc = NULL;
}
}
- if (!TmpDesc)
+ if (!ObjDesc)
{
/*
- * If the TmpDesc is NULL, that means an uninitialized package
- * has been used as a destination, therefore, we must create
- * the destination element to match the type of the source
- * element NOTE: ValDesc can be of any type.
+ * If the ObjDesc is NULL, it means that an uninitialized package
+ * element has been used as a destination (this is OK), therefore,
+ * we must create the destination element to match the type of the
+ * source element NOTE: ValDesc can be of any type.
*/
- TmpDesc = AcpiCmCreateInternalObject (ValDesc->Common.Type);
- if (!TmpDesc)
+ ObjDesc = AcpiCmCreateInternalObject (ValDesc->Common.Type);
+ if (!ObjDesc)
{
- Status = AE_NO_MEMORY;
- goto Cleanup;
+ return_ACPI_STATUS (AE_NO_MEMORY);
}
/*
* If the source is a package, copy the source to the new dest
*/
- if (ACPI_TYPE_PACKAGE == TmpDesc->Common.Type)
+ if (ACPI_TYPE_PACKAGE == ObjDesc->Common.Type)
{
Status = AcpiAmlBuildCopyInternalPackageObject (
- ValDesc, TmpDesc, WalkState);
+ ValDesc, ObjDesc, WalkState);
if (ACPI_FAILURE (Status))
{
- AcpiCmRemoveReference (TmpDesc);
- TmpDesc = NULL;
- goto Cleanup;
+ AcpiCmRemoveReference (ObjDesc);
+ return_ACPI_STATUS (Status);
}
}
@@ -323,18 +422,18 @@ AcpiAmlExecStore (
* part of the parent package
*/
- *(DestDesc->Reference.Where) = TmpDesc;
- AcpiCmAddReference (TmpDesc);
+ *(DestDesc->Reference.Where) = ObjDesc;
+ AcpiCmAddReference (ObjDesc);
}
- if (ACPI_TYPE_PACKAGE != TmpDesc->Common.Type)
+ if (ACPI_TYPE_PACKAGE != ObjDesc->Common.Type)
{
/*
* The destination element is not a package, so we need to
* convert the contents of the source (ValDesc) and copy into
- * the destination (TmpDesc)
+ * the destination (ObjDesc)
*/
- Status = AcpiAmlStoreObjectToObject (ValDesc, TmpDesc,
+ Status = AcpiAmlStoreObjectToObject (ValDesc, ObjDesc,
WalkState);
if (ACPI_FAILURE (Status))
{
@@ -344,22 +443,14 @@ AcpiAmlExecStore (
*/
DEBUG_PRINT (ACPI_ERROR,
("AmlExecStore/Index: Unable to copy the internal object\n"));
- Status = AE_AML_OPERAND_TYPE;
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
}
-
- break;
}
+ break;
- /*
- * Check that the destination is a Buffer Field type
- */
- if (DestDesc->Reference.TargetType != ACPI_TYPE_BUFFER_FIELD)
- {
- Status = AE_AML_OPERAND_TYPE;
- break;
- }
+ case ACPI_TYPE_BUFFER_FIELD:
/*
* Storing into a buffer at a location defined by an Index.
*
@@ -368,14 +459,12 @@ AcpiAmlExecStore (
*/
/*
- * Set the TmpDesc to the destination object and type check.
+ * Set the ObjDesc to the destination object and type check.
*/
- TmpDesc = DestDesc->Reference.Object;
-
- if (TmpDesc->Common.Type != ACPI_TYPE_BUFFER)
+ ObjDesc = DestDesc->Reference.Object;
+ if (ObjDesc->Common.Type != ACPI_TYPE_BUFFER)
{
- Status = AE_AML_OPERAND_TYPE;
- break;
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
/*
@@ -386,16 +475,16 @@ AcpiAmlExecStore (
switch (ValDesc->Common.Type)
{
/*
- * If the type is Integer, the Length is 4.
+ * If the type is Integer, assign bytewise
* This loop to assign each of the elements is somewhat
- * backward because of the Big Endian-ness of IA-64
+ * backward because of the Big Endian-ness of IA-64
*/
- case ACPI_TYPE_NUMBER:
- Length = 4;
+ case ACPI_TYPE_INTEGER:
+ Length = sizeof (ACPI_INTEGER);
for (i = Length; i != 0; i--)
{
- Value = (UINT8)(ValDesc->Number.Value >> (MUL_8 (i - 1)));
- TmpDesc->Buffer.Pointer[DestDesc->Reference.Offset] = Value;
+ Value = (UINT8)(ValDesc->Integer.Value >> (MUL_8 (i - 1)));
+ ObjDesc->Buffer.Pointer[DestDesc->Reference.Offset] = Value;
}
break;
@@ -408,7 +497,7 @@ AcpiAmlExecStore (
for (i = 0; i < Length; i++)
{
Value = *(ValDesc->Buffer.Pointer + i);
- TmpDesc->Buffer.Pointer[DestDesc->Reference.Offset] = Value;
+ ObjDesc->Buffer.Pointer[DestDesc->Reference.Offset] = Value;
}
break;
@@ -421,7 +510,7 @@ AcpiAmlExecStore (
for (i = 0; i < Length; i++)
{
Value = *(ValDesc->String.Pointer + i);
- TmpDesc->Buffer.Pointer[DestDesc->Reference.Offset] = Value;
+ ObjDesc->Buffer.Pointer[DestDesc->Reference.Offset] = Value;
}
break;
@@ -435,97 +524,242 @@ AcpiAmlExecStore (
Status = AE_AML_OPERAND_TYPE;
break;
}
+ break;
- /*
- * If we had an error, break out of this case statement.
- */
- if (ACPI_FAILURE (Status))
- {
- break;
- }
-
- /*
- * Set the return pointer
- */
- DestDesc = TmpDesc;
+ default:
+ DEBUG_PRINT (ACPI_ERROR,
+ ("AmlExecStoreIndex: Target is not a Package or BufferField\n"));
+ Status = AE_AML_OPERAND_TYPE;
break;
+ }
- case AML_ZERO_OP:
- case AML_ONE_OP:
- case AML_ONES_OP:
- /*
- * Storing to a constant is a no-op -- see ACPI Specification
- * Delete the result descriptor.
- */
+ return_ACPI_STATUS (Status);
+}
- DeleteDestDesc = DestDesc;
- break;
- case AML_LOCAL_OP:
- Status = AcpiDsMethodDataSetValue (MTH_TYPE_LOCAL,
- (DestDesc->Reference.Offset), ValDesc, WalkState);
- DeleteDestDesc = DestDesc;
- break;
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlStoreObjectToNode
+ *
+ * PARAMETERS: *SourceDesc - Value to be stored
+ * *Node - Named object to recieve the value
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Store the object to the named object.
+ *
+ * The Assignment of an object to a named object is handled here
+ * The val passed in will replace the current value (if any)
+ * with the input value.
+ *
+ * When storing into an object the data is converted to the
+ * target object type then stored in the object. This means
+ * that the target object type (for an initialized target) will
+ * not be changed by a store operation.
+ *
+ * NOTE: the global lock is acquired early. This will result
+ * in the global lock being held a bit longer. Also, if the
+ * function fails during set up we may get the lock when we
+ * don't really need it. I don't think we care.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlStoreObjectToNode (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_NAMESPACE_NODE *Node,
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_STATUS Status = AE_OK;
+ ACPI_OPERAND_OBJECT *TargetDesc;
+ OBJECT_TYPE_INTERNAL TargetType = ACPI_TYPE_ANY;
- case AML_ARG_OP:
- Status = AcpiDsMethodDataSetValue (MTH_TYPE_ARG,
- (DestDesc->Reference.Offset), ValDesc, WalkState);
- DeleteDestDesc = DestDesc;
+ FUNCTION_TRACE ("AmlStoreObjectToNode");
+
+ /*
+ * Assuming the parameters were already validated
+ */
+ ACPI_ASSERT((Node) && (SourceDesc));
+
+
+ /*
+ * Get current type of the node, and object attached to Node
+ */
+ TargetType = AcpiNsGetType (Node);
+ TargetDesc = AcpiNsGetAttachedObject (Node);
+
+ DEBUG_PRINT (ACPI_INFO, ("AmlStoreObjectToNode: Storing %p(%s) into node %p(%s)\n",
+ Node, AcpiCmGetTypeName (SourceDesc->Common.Type),
+ SourceDesc, AcpiCmGetTypeName (TargetType)));
+
+
+ /*
+ * Resolve the source object to an actual value
+ * (If it is a reference object)
+ */
+ Status = AcpiAmlResolveObject (&SourceDesc, TargetType, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+
+ /*
+ * Do the actual store operation
+ */
+ switch (TargetType)
+ {
+ case INTERNAL_TYPE_DEF_FIELD:
+
+ /* Raw data copy for target types Integer/String/Buffer */
+
+ Status = AcpiAmlCopyDataToNamedField (SourceDesc, Node);
break;
- case AML_DEBUG_OP:
+ case ACPI_TYPE_INTEGER:
+ case ACPI_TYPE_STRING:
+ case ACPI_TYPE_BUFFER:
+ case INTERNAL_TYPE_BANK_FIELD:
+ case INTERNAL_TYPE_INDEX_FIELD:
+ case ACPI_TYPE_FIELD_UNIT:
- /*
- * Storing to the Debug object causes the value stored to be
- * displayed and otherwise has no effect -- see ACPI Specification
+ /*
+ * These target types are all of type Integer/String/Buffer, and
+ * therefore support implicit conversion before the store.
+ *
+ * Copy and/or convert the source object to a new target object
*/
- DEBUG_PRINT (ACPI_INFO, ("**** Write to Debug Object: ****: \n"));
- if (ValDesc->Common.Type == ACPI_TYPE_STRING)
- {
- DEBUG_PRINT (ACPI_INFO, ("%s\n", ValDesc->String.Pointer));
- }
- else
+ Status = AcpiAmlStoreObject (SourceDesc, TargetType, &TargetDesc, WalkState);
+ if (ACPI_FAILURE (Status))
{
- DUMP_STACK_ENTRY (ValDesc);
+ return_ACPI_STATUS (Status);
}
- DeleteDestDesc = DestDesc;
+ /*
+ * Store the new TargetDesc as the new value of the Name, and set
+ * the Name's type to that of the value being stored in it.
+ * SourceDesc reference count is incremented by AttachObject.
+ */
+ Status = AcpiNsAttachObject (Node, TargetDesc, TargetType);
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlStoreObjectToNode: Store %s into %s via Convert/Attach\n",
+ AcpiCmGetTypeName (TargetDesc->Common.Type),
+ AcpiCmGetTypeName (TargetType)));
break;
-
+
default:
- DEBUG_PRINT (ACPI_ERROR,
- ("AmlExecStore: Internal error - Unknown Reference subtype %02x\n",
- DestDesc->Reference.OpCode));
+ /* No conversions for all other types. Just attach the source object */
- /* TBD: [Restructure] use object dump routine !! */
+ Status = AcpiNsAttachObject (Node, SourceDesc, SourceDesc->Common.Type);
+
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlStoreObjectToNode: Store %s into %s via Attach only\n",
+ AcpiCmGetTypeName (SourceDesc->Common.Type),
+ AcpiCmGetTypeName (SourceDesc->Common.Type)));
+ break;
+ }
- DUMP_BUFFER (DestDesc, sizeof (ACPI_OPERAND_OBJECT));
- DeleteDestDesc = DestDesc;
- Status = AE_AML_INTERNAL;
+ return_ACPI_STATUS (Status);
+}
- } /* switch(DestDesc->Reference.OpCode) */
-Cleanup:
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlStoreObjectToObject
+ *
+ * PARAMETERS: *SourceDesc - Value to be stored
+ * *DestDesc - Object to receive the value
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Store an object to another object.
+ *
+ * The Assignment of an object to another (not named) object
+ * is handled here.
+ * The val passed in will replace the current value (if any)
+ * with the input value.
+ *
+ * When storing into an object the data is converted to the
+ * target object type then stored in the object. This means
+ * that the target object type (for an initialized target) will
+ * not be changed by a store operation.
+ *
+ * This module allows destination types of Number, String,
+ * and Buffer.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlStoreObjectToObject (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *DestDesc,
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_STATUS Status = AE_OK;
+ OBJECT_TYPE_INTERNAL DestinationType = DestDesc->Common.Type;
+
+
+ FUNCTION_TRACE ("AmlStoreObjectToObject");
+
+
+ /*
+ * Assuming the parameters are valid!
+ */
+ ACPI_ASSERT((DestDesc) && (SourceDesc));
- /* Cleanup and exit*/
+ DEBUG_PRINT (ACPI_INFO, ("AmlStoreObjectToObject: Storing %p(%s) to (%p)%s\n",
+ SourceDesc, AcpiCmGetTypeName (SourceDesc->Common.Type),
+ DestDesc, AcpiCmGetTypeName (DestDesc->Common.Type)));
- if (DeleteDestDesc)
+
+ /*
+ * From this interface, we only support Integers/Strings/Buffers
+ */
+ switch (DestinationType)
+ {
+ case ACPI_TYPE_INTEGER:
+ case ACPI_TYPE_STRING:
+ case ACPI_TYPE_BUFFER:
+ break;
+
+ default:
+ DEBUG_PRINT (ACPI_WARN,
+ ("AmlStoreObjectToObject: Store into %s not implemented\n",
+ AcpiCmGetTypeName (DestDesc->Common.Type)));
+
+ return_ACPI_STATUS (AE_NOT_IMPLEMENTED);
+ }
+
+
+
+ /*
+ * Resolve the source object to an actual value
+ * (If it is a reference object)
+ */
+ Status = AcpiAmlResolveObject (&SourceDesc, DestinationType, WalkState);
+ if (ACPI_FAILURE (Status))
{
- AcpiCmRemoveReference (DeleteDestDesc);
+ return_ACPI_STATUS (Status);
}
+
+ /*
+ * Copy and/or convert the source object to the destination object
+ */
+ Status = AcpiAmlStoreObject (SourceDesc, DestinationType, &DestDesc, WalkState);
+
+
return_ACPI_STATUS (Status);
}
-
diff --git a/sys/contrib/dev/acpica/exstoren.c b/sys/contrib/dev/acpica/exstoren.c
index 57e02ff..b6bd010 100644
--- a/sys/contrib/dev/acpica/exstoren.c
+++ b/sys/contrib/dev/acpica/exstoren.c
@@ -2,8 +2,8 @@
/******************************************************************************
*
* Module Name: amstoren - AML Interpreter object store support,
- * Store to Node (namespace object)
- * $Revision: 25 $
+ * Store to Node (namespace object)
+ * $Revision: 28 $
*
*****************************************************************************/
@@ -11,7 +11,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -131,557 +131,226 @@
MODULE_NAME ("amstoren")
+
+
/*******************************************************************************
*
- * FUNCTION: AcpiAmlStoreObjectToNode
+ * FUNCTION: AcpiAmlResolveObject
*
- * PARAMETERS: *ValDesc - Value to be stored
- * *Node - Named object to recieve the value
- *
- * RETURN: Status
+ * PARAMETERS: SourceDescPtr - Pointer to the source object
+ * TargetType - Current type of the target
+ * WalkState - Current walk state
*
- * DESCRIPTION: Store the object to the named object.
+ * RETURN: Status, resolved object in SourceDescPtr.
*
- * The Assignment of an object to a named object is handled here
- * The val passed in will replace the current value (if any)
- * with the input value.
- *
- * When storing into an object the data is converted to the
- * target object type then stored in the object. This means
- * that the target object type (for an initialized target) will
- * not be changed by a store operation.
- *
- * NOTE: the global lock is acquired early. This will result
- * in the global lock being held a bit longer. Also, if the
- * function fails during set up we may get the lock when we
- * don't really need it. I don't think we care.
+ * DESCRIPTION: Resolve an object. If the object is a reference, dereference
+ * it and return the actual object in the SourceDescPtr.
*
******************************************************************************/
ACPI_STATUS
-AcpiAmlStoreObjectToNode (
- ACPI_OPERAND_OBJECT *ValDesc,
- ACPI_NAMESPACE_NODE *Node,
+AcpiAmlResolveObject (
+ ACPI_OPERAND_OBJECT **SourceDescPtr,
+ OBJECT_TYPE_INTERNAL TargetType,
ACPI_WALK_STATE *WalkState)
{
+ ACPI_OPERAND_OBJECT *SourceDesc = *SourceDescPtr;
ACPI_STATUS Status = AE_OK;
- UINT8 *Buffer = NULL;
- UINT32 Length = 0;
- UINT32 Mask;
- UINT32 NewValue;
- BOOLEAN Locked = FALSE;
- UINT8 *Location=NULL;
- ACPI_OPERAND_OBJECT *DestDesc;
- OBJECT_TYPE_INTERNAL DestinationType = ACPI_TYPE_ANY;
- FUNCTION_TRACE ("AmlStoreObjectToNte");
+ FUNCTION_TRACE ("AmlResolveObject");
- DEBUG_PRINT (ACPI_INFO,
- ("entered AcpiAmlStoreObjectToNode: NamedObj=%p, Obj=%p\n",
- Node, ValDesc));
/*
- * Assuming the parameters are valid!!!
+ * Ensure we have a Source that can be stored in the target
*/
- ACPI_ASSERT((Node) && (ValDesc));
-
- DestinationType = AcpiNsGetType (Node);
+ switch (TargetType)
+ {
- DEBUG_PRINT (ACPI_INFO, ("AmlStoreObjectToNte: Storing %s into %s\n",
- AcpiCmGetTypeName (ValDesc->Common.Type),
- AcpiCmGetTypeName (DestinationType)));
+ /* This case handles the "interchangeable" types Integer, String, and Buffer. */
/*
- * First ensure we have a value that can be stored in the target
+ * These cases all require only Integers or values that
+ * can be converted to Integers (Strings or Buffers)
*/
- switch (DestinationType)
- {
- /* Type of Name's existing value */
-
- case INTERNAL_TYPE_ALIAS:
-
- /*
- * Aliases are resolved by AcpiAmlPrepOperands
- */
-
- DEBUG_PRINT (ACPI_WARN,
- ("AmlStoreObjectToNte: Store into Alias - should never happen\n"));
- Status = AE_AML_INTERNAL;
- break;
-
-
+ case ACPI_TYPE_INTEGER:
+ case ACPI_TYPE_FIELD_UNIT:
case INTERNAL_TYPE_BANK_FIELD:
case INTERNAL_TYPE_INDEX_FIELD:
- case ACPI_TYPE_FIELD_UNIT:
- case ACPI_TYPE_NUMBER:
-
- /*
- * These cases all require only number values or values that
- * can be converted to numbers.
- *
- * If value is not a Number, try to resolve it to one.
- */
-
- if (ValDesc->Common.Type != ACPI_TYPE_NUMBER)
- {
- /*
- * Initially not a number, convert
- */
- Status = AcpiAmlResolveToValue (&ValDesc, WalkState);
- if (ACPI_SUCCESS (Status) &&
- (ValDesc->Common.Type != ACPI_TYPE_NUMBER))
- {
- /*
- * Conversion successful but still not a number
- */
- DEBUG_PRINT (ACPI_ERROR,
- ("AmlStoreObjectToNte: Value assigned to %s must be Number, not %s\n",
- AcpiCmGetTypeName (DestinationType),
- AcpiCmGetTypeName (ValDesc->Common.Type)));
- Status = AE_AML_OPERAND_TYPE;
- }
- }
-
- break;
+ /*
+ * Stores into a Field/Region or into a Buffer/String
+ * are all essentially the same.
+ */
case ACPI_TYPE_STRING:
case ACPI_TYPE_BUFFER:
case INTERNAL_TYPE_DEF_FIELD:
/*
- * Storing into a Field in a region or into a buffer or into
- * a string all is essentially the same.
- *
- * If value is not a valid type, try to resolve it to one.
+ * If SourceDesc is not a valid type, try to resolve it to one.
*/
-
- if ((ValDesc->Common.Type != ACPI_TYPE_NUMBER) &&
- (ValDesc->Common.Type != ACPI_TYPE_BUFFER) &&
- (ValDesc->Common.Type != ACPI_TYPE_STRING))
+ if ((SourceDesc->Common.Type != ACPI_TYPE_INTEGER) &&
+ (SourceDesc->Common.Type != ACPI_TYPE_BUFFER) &&
+ (SourceDesc->Common.Type != ACPI_TYPE_STRING))
{
/*
- * Initially not a valid type, convert
+ * Initially not a valid type, convert
*/
- Status = AcpiAmlResolveToValue (&ValDesc, WalkState);
+ Status = AcpiAmlResolveToValue (SourceDescPtr, WalkState);
if (ACPI_SUCCESS (Status) &&
- (ValDesc->Common.Type != ACPI_TYPE_NUMBER) &&
- (ValDesc->Common.Type != ACPI_TYPE_BUFFER) &&
- (ValDesc->Common.Type != ACPI_TYPE_STRING))
+ (SourceDesc->Common.Type != ACPI_TYPE_INTEGER) &&
+ (SourceDesc->Common.Type != ACPI_TYPE_BUFFER) &&
+ (SourceDesc->Common.Type != ACPI_TYPE_STRING))
{
/*
- * Conversion successful but still not a valid type
+ * Conversion successful but still not a valid type
*/
DEBUG_PRINT (ACPI_ERROR,
- ("AmlStoreObjectToNte: Assign wrong type %s to %s (must be type Num/Str/Buf)\n",
- AcpiCmGetTypeName (ValDesc->Common.Type),
- AcpiCmGetTypeName (DestinationType)));
+ ("AmlResolveObject: Cannot assign type %s to %s (must be type Int/Str/Buf)\n",
+ AcpiCmGetTypeName ((*SourceDescPtr)->Common.Type),
+ AcpiCmGetTypeName (TargetType)));
Status = AE_AML_OPERAND_TYPE;
}
}
break;
- case ACPI_TYPE_PACKAGE:
+ case INTERNAL_TYPE_ALIAS:
/*
- * TBD: [Unhandled] Not real sure what to do here
+ * Aliases are resolved by AcpiAmlPrepOperands
*/
- Status = AE_NOT_IMPLEMENTED;
+ DEBUG_PRINT (ACPI_WARN,
+ ("AmlResolveObject: Store into Alias - should never happen\n"));
+
+ Status = AE_AML_INTERNAL;
break;
+ case ACPI_TYPE_PACKAGE:
default:
/*
- * All other types than Alias and the various Fields come here.
- * Store ValDesc as the new value of the Name, and set
- * the Name's type to that of the value being stored in it.
- * ValDesc reference count is incremented by AttachObject.
+ * All other types than Alias and the various Fields come here,
+ * including the untyped case - ACPI_TYPE_ANY.
*/
+ break;
+ }
- Status = AcpiNsAttachObject (Node, ValDesc, ValDesc->Common.Type);
+ return_ACPI_STATUS (Status);
+}
- DEBUG_PRINT (ACPI_INFO,
- ("AmlStoreObjectToNte: Store %s into %s via Attach\n",
- AcpiCmGetTypeName (ValDesc->Common.Type),
- AcpiCmGetTypeName (DestinationType)));
- goto CleanUpAndBailOut;
- break;
- }
- /* Exit now if failure above */
- if (ACPI_FAILURE (Status))
- {
- goto CleanUpAndBailOut;
- }
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlStoreObject
+ *
+ * PARAMETERS: SourceDesc - Object to store
+ * TargetType - Current type of the target
+ * TargetDescPtr - Pointer to the target
+ * WalkState - Current walk state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: "Store" an object to another object. This may include
+ * converting the source type to the target type (implicit
+ * conversion), and a copy of the value of the source to
+ * the target.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlStoreObject (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ OBJECT_TYPE_INTERNAL TargetType,
+ ACPI_OPERAND_OBJECT **TargetDescPtr,
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_OPERAND_OBJECT *TargetDesc = *TargetDescPtr;
+ ACPI_STATUS Status;
+
+
+ FUNCTION_TRACE ("AmlStoreObject");
- /*
- * Get descriptor for object attached to Node
- */
- DestDesc = AcpiNsGetAttachedObject (Node);
- if (!DestDesc)
- {
- /*
- * There is no existing object attached to this Node
- */
- DEBUG_PRINT (ACPI_ERROR,
- ("AmlStoreObjectToNte: Internal error - no destination object for %4.4s type %X\n",
- &Node->Name, DestinationType));
- Status = AE_AML_INTERNAL;
- goto CleanUpAndBailOut;
- }
/*
- * Make sure the destination Object is the same as the Node
+ * Perform the "implicit conversion" of the source to the current type
+ * of the target - As per the ACPI specification.
+ *
+ * If no conversion performed, SourceDesc is left alone, otherwise it
+ * is updated with a new object.
*/
- if (DestDesc->Common.Type != (UINT8) DestinationType)
+ Status = AcpiAmlConvertToTargetType (TargetType, &SourceDesc, WalkState);
+ if (ACPI_FAILURE (Status))
{
- DEBUG_PRINT (ACPI_ERROR,
- ("AmlStoreObjectToNte: Internal error - Name %4.4s type %X does not match value-type %X at %p\n",
- &Node->Name, AcpiNsGetType (Node),
- DestDesc->Common.Type, DestDesc));
- Status = AE_AML_INTERNAL;
- goto CleanUpAndBailOut;
+ return_ACPI_STATUS (Status);
}
+
/*
- * AcpiEverything is ready to execute now, We have
- * a value we can handle, just perform the update
+ * We now have two objects of identical types, and we can perform a
+ * copy of the *value* of the source object.
*/
-
- switch (DestinationType)
+ switch (TargetType)
{
- /* Type of Name's existing value */
-
- case INTERNAL_TYPE_BANK_FIELD:
-
- /*
- * Get the global lock if needed
- */
- Locked = AcpiAmlAcquireGlobalLock (DestDesc->BankField.LockRule);
-
- /*
- * Set Bank value to select proper Bank
- * Perform the update (Set Bank Select)
+ case ACPI_TYPE_ANY:
+ case INTERNAL_TYPE_DEF_ANY:
+
+ /*
+ * The target namespace node is uninitialized (has no target object),
+ * and will take on the type of the source object
*/
- Status = AcpiAmlAccessNamedField (ACPI_WRITE,
- DestDesc->BankField.BankSelect,
- &DestDesc->BankField.Value,
- sizeof (DestDesc->BankField.Value));
- if (ACPI_SUCCESS (Status))
- {
- /* Set bank select successful, set data value */
-
- Status = AcpiAmlAccessNamedField (ACPI_WRITE,
- DestDesc->BankField.BankSelect,
- &ValDesc->BankField.Value,
- sizeof (ValDesc->BankField.Value));
- }
-
+ *TargetDescPtr = SourceDesc;
break;
- case INTERNAL_TYPE_DEF_FIELD:
-
- /*
- * Get the global lock if needed
- */
- Locked = AcpiAmlAcquireGlobalLock (ValDesc->Field.LockRule);
-
- /*
- * Perform the update
- */
-
- switch (ValDesc->Common.Type)
- {
- case ACPI_TYPE_NUMBER:
- Buffer = (UINT8 *) &ValDesc->Number.Value;
- Length = sizeof (ValDesc->Number.Value);
- break;
-
- case ACPI_TYPE_BUFFER:
- Buffer = (UINT8 *) ValDesc->Buffer.Pointer;
- Length = ValDesc->Buffer.Length;
- break;
-
- case ACPI_TYPE_STRING:
- Buffer = (UINT8 *) ValDesc->String.Pointer;
- Length = ValDesc->String.Length;
- break;
- }
-
- Status = AcpiAmlAccessNamedField (ACPI_WRITE,
- Node, Buffer, Length);
+ case ACPI_TYPE_INTEGER:
- break; /* Global Lock released below */
+ TargetDesc->Integer.Value = SourceDesc->Integer.Value;
+ /* Truncate value if we are executing from a 32-bit ACPI table */
- case ACPI_TYPE_STRING:
-
- /*
- * Perform the update
- */
-
- switch (ValDesc->Common.Type)
- {
- case ACPI_TYPE_NUMBER:
- Buffer = (UINT8 *) &ValDesc->Number.Value;
- Length = sizeof (ValDesc->Number.Value);
- break;
-
- case ACPI_TYPE_BUFFER:
- Buffer = (UINT8 *) ValDesc->Buffer.Pointer;
- Length = ValDesc->Buffer.Length;
- break;
-
- case ACPI_TYPE_STRING:
- Buffer = (UINT8 *) ValDesc->String.Pointer;
- Length = ValDesc->String.Length;
- break;
- }
-
- /*
- * Setting a string value replaces the old string
- */
-
- if (Length < DestDesc->String.Length)
- {
- /*
- * Zero fill, not willing to do pointer arithmetic for
- * archetecture independance. Just clear the whole thing
- */
- MEMSET(DestDesc->String.Pointer, 0, DestDesc->String.Length);
- MEMCPY(DestDesc->String.Pointer, Buffer, Length);
- }
- else
- {
- /*
- * Free the current buffer, then allocate a buffer
- * large enough to hold the value
- */
- if ( DestDesc->String.Pointer &&
- !AcpiTbSystemTablePointer (DestDesc->String.Pointer))
- {
- /*
- * Only free if not a pointer into the DSDT
- */
-
- AcpiCmFree(DestDesc->String.Pointer);
- }
+ AcpiAmlTruncateFor32bitTable (TargetDesc, WalkState);
+ break;
- DestDesc->String.Pointer = AcpiCmAllocate (Length + 1);
- DestDesc->String.Length = Length;
- if (!DestDesc->String.Pointer)
- {
- Status = AE_NO_MEMORY;
- goto CleanUpAndBailOut;
- }
+ case ACPI_TYPE_FIELD_UNIT:
- MEMCPY(DestDesc->String.Pointer, Buffer, Length);
- }
+ Status = AcpiAmlCopyIntegerToFieldUnit (SourceDesc, TargetDesc);
break;
- case ACPI_TYPE_BUFFER:
-
- /*
- * Perform the update to the buffer
- */
-
- switch (ValDesc->Common.Type)
- {
- case ACPI_TYPE_NUMBER:
- Buffer = (UINT8 *) &ValDesc->Number.Value;
- Length = sizeof (ValDesc->Number.Value);
- break;
-
- case ACPI_TYPE_BUFFER:
- Buffer = (UINT8 *) ValDesc->Buffer.Pointer;
- Length = ValDesc->Buffer.Length;
- break;
-
- case ACPI_TYPE_STRING:
- Buffer = (UINT8 *) ValDesc->String.Pointer;
- Length = ValDesc->String.Length;
- break;
- }
+ case INTERNAL_TYPE_BANK_FIELD:
- /*
- * Buffer is a static allocation,
- * only place what will fit in the buffer.
- */
- if (Length <= DestDesc->Buffer.Length)
- {
- /*
- * Zero fill first, not willing to do pointer arithmetic for
- * archetecture independence. Just clear the whole thing
- */
- MEMSET(DestDesc->Buffer.Pointer, 0, DestDesc->Buffer.Length);
- MEMCPY(DestDesc->Buffer.Pointer, Buffer, Length);
- }
- else
- {
- /*
- * truncate, copy only what will fit
- */
- MEMCPY(DestDesc->Buffer.Pointer, Buffer, DestDesc->Buffer.Length);
- DEBUG_PRINT (ACPI_INFO,
- ("AmlStoreObjectToNte: Truncating src buffer from %X to %X\n",
- Length, DestDesc->Buffer.Length));
- }
+ Status = AcpiAmlCopyIntegerToBankField (SourceDesc, TargetDesc);
break;
case INTERNAL_TYPE_INDEX_FIELD:
- /*
- * Get the global lock if needed
- */
- Locked = AcpiAmlAcquireGlobalLock (DestDesc->IndexField.LockRule);
-
- /*
- * Set Index value to select proper Data register
- * perform the update (Set index)
- */
-
- Status = AcpiAmlAccessNamedField (ACPI_WRITE,
- DestDesc->IndexField.Index,
- &DestDesc->IndexField.Value,
- sizeof (DestDesc->IndexField.Value));
-
- DEBUG_PRINT (ACPI_INFO,
- ("AmlStoreObjectToNte: IndexField: set index returned %s\n",
- AcpiCmFormatException (Status)));
-
- if (ACPI_SUCCESS (Status))
- {
- /* set index successful, next set Data value */
-
- Status = AcpiAmlAccessNamedField (ACPI_WRITE,
- DestDesc->IndexField.Data,
- &ValDesc->Number.Value,
- sizeof (ValDesc->Number.Value));
- DEBUG_PRINT (ACPI_INFO,
- ("AmlStoreObjectToNte: IndexField: set data returned %s\n",
- AcpiCmFormatException (Status)));
- }
+ Status = AcpiAmlCopyIntegerToIndexField (SourceDesc, TargetDesc);
break;
- case ACPI_TYPE_FIELD_UNIT:
-
-
- /*
- * If the Field Buffer and Index have not been previously evaluated,
- * evaluate them and save the results.
- */
- if (!(DestDesc->Common.Flags & AOPOBJ_DATA_VALID))
- {
- Status = AcpiDsGetFieldUnitArguments (DestDesc);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
- }
-
- if ((!DestDesc->FieldUnit.Container ||
- ACPI_TYPE_BUFFER != DestDesc->FieldUnit.Container->Common.Type))
- {
- DUMP_PATHNAME (Node,
- "AmlStoreObjectToNte: FieldUnit: Bad container in ",
- ACPI_ERROR, _COMPONENT);
- DUMP_ENTRY (Node, ACPI_ERROR);
- DEBUG_PRINT (ACPI_ERROR,
- ("Container: %p", DestDesc->FieldUnit.Container));
-
- if (DestDesc->FieldUnit.Container)
- {
- DEBUG_PRINT_RAW (ACPI_ERROR, (" Type %X",
- DestDesc->FieldUnit.Container->Common.Type));
- }
- DEBUG_PRINT_RAW (ACPI_ERROR, ("\n"));
-
- Status = AE_AML_INTERNAL;
- goto CleanUpAndBailOut;
- }
-
- /*
- * Get the global lock if needed
- */
- Locked = AcpiAmlAcquireGlobalLock (DestDesc->FieldUnit.LockRule);
-
- /*
- * TBD: [Unhandled] REMOVE this limitation
- * Make sure the operation is within the limits of our implementation
- * this is not a Spec limitation!!
- */
- if (DestDesc->FieldUnit.Length + DestDesc->FieldUnit.BitOffset > 32)
- {
- DEBUG_PRINT (ACPI_ERROR,
- ("AmlStoreObjectToNte: FieldUnit: Implementation limitation - Field exceeds UINT32\n"));
- Status = AE_NOT_IMPLEMENTED;
- goto CleanUpAndBailOut;
- }
-
- /* Field location is (base of buffer) + (byte offset) */
-
- Location = DestDesc->FieldUnit.Container->Buffer.Pointer
- + DestDesc->FieldUnit.Offset;
-
- /*
- * Construct Mask with 1 bits where the field is,
- * 0 bits elsewhere
- */
- Mask = ((UINT32) 1 << DestDesc->FieldUnit.Length) - ((UINT32)1
- << DestDesc->FieldUnit.BitOffset);
-
- DEBUG_PRINT (TRACE_EXEC,
- ("** Store %lx in buffer %p byte %ld bit %X width %d addr %p mask %08lx\n",
- ValDesc->Number.Value,
- DestDesc->FieldUnit.Container->Buffer.Pointer,
- DestDesc->FieldUnit.Offset, DestDesc->FieldUnit.BitOffset,
- DestDesc->FieldUnit.Length,Location, Mask));
-
- /* Zero out the field in the buffer */
-
- MOVE_UNALIGNED32_TO_32 (&NewValue, Location);
- NewValue &= ~Mask;
-
- /*
- * Shift and mask the new value into position,
- * and or it into the buffer.
- */
- NewValue |= (ValDesc->Number.Value << DestDesc->FieldUnit.BitOffset) &
- Mask;
-
- /* Store back the value */
-
- MOVE_UNALIGNED32_TO_32 (Location, &NewValue);
+ case ACPI_TYPE_STRING:
- DEBUG_PRINT (TRACE_EXEC, ("New Field value %08lx\n", NewValue));
+ Status = AcpiAmlCopyStringToString (SourceDesc, TargetDesc);
break;
- case ACPI_TYPE_NUMBER:
-
-
- DestDesc->Number.Value = ValDesc->Number.Value;
-
- /* Truncate value if we are executing from a 32-bit ACPI table */
+ case ACPI_TYPE_BUFFER:
- AcpiAmlTruncateFor32bitTable (DestDesc, WalkState);
+ Status = AcpiAmlCopyBufferToBuffer (SourceDesc, TargetDesc);
break;
case ACPI_TYPE_PACKAGE:
/*
- * TBD: [Unhandled] Not real sure what to do here
+ * TBD: [Unhandled] Not real sure what to do here
*/
Status = AE_NOT_IMPLEMENTED;
break;
@@ -690,28 +359,17 @@ AcpiAmlStoreObjectToNode (
default:
/*
- * All other types than Alias and the various Fields come here.
- * Store ValDesc as the new value of the Name, and set
- * the Name's type to that of the value being stored in it.
- * ValDesc reference count is incremented by AttachObject.
+ * All other types come here.
*/
-
DEBUG_PRINT (ACPI_WARN,
- ("AmlStoreObjectToNte: Store into %s not implemented\n",
- AcpiCmGetTypeName (AcpiNsGetType (Node))));
+ ("AmlStoreObject: Store into type %s not implemented\n",
+ AcpiCmGetTypeName (TargetType)));
Status = AE_NOT_IMPLEMENTED;
break;
}
-CleanUpAndBailOut:
-
- /*
- * Release global lock if we acquired it earlier
- */
- AcpiAmlReleaseGlobalLock (Locked);
-
return_ACPI_STATUS (Status);
}
diff --git a/sys/contrib/dev/acpica/exstorob.c b/sys/contrib/dev/acpica/exstorob.c
index 675288b..0825891 100644
--- a/sys/contrib/dev/acpica/exstorob.c
+++ b/sys/contrib/dev/acpica/exstorob.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amstorob - AML Interpreter object store support, store to object
- * $Revision: 19 $
+ * $Revision: 22 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -130,317 +130,452 @@
MODULE_NAME ("amstorob")
+
/*******************************************************************************
*
- * FUNCTION: AcpiAmlStoreObjectToObject
+ * FUNCTION: AcpiAmlCopyBufferToBuffer
*
- * PARAMETERS: *ValDesc - Value to be stored
- * *DestDesc - Object to receive the value
+ * PARAMETERS: SourceDesc - Source object to copy
+ * TargetDesc - Destination object of the copy
*
* RETURN: Status
*
- * DESCRIPTION: Store an object to another object.
+ * DESCRIPTION: Copy a buffer object to another buffer object.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlCopyBufferToBuffer (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *TargetDesc)
+{
+ UINT32 Length;
+ UINT8 *Buffer;
+
+
+ /*
+ * We know that SourceDesc is a buffer by now
+ */
+ Buffer = (UINT8 *) SourceDesc->Buffer.Pointer;
+ Length = SourceDesc->Buffer.Length;
+
+ /*
+ * Buffer is a static allocation,
+ * only place what will fit in the buffer.
+ */
+ if (Length <= TargetDesc->Buffer.Length)
+ {
+ /* Clear existing buffer and copy in the new one */
+
+ MEMSET(TargetDesc->Buffer.Pointer, 0, TargetDesc->Buffer.Length);
+ MEMCPY(TargetDesc->Buffer.Pointer, Buffer, Length);
+ }
+
+ else
+ {
+ /*
+ * Truncate the source, copy only what will fit
+ */
+ MEMCPY(TargetDesc->Buffer.Pointer, Buffer, TargetDesc->Buffer.Length);
+
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlStoreObjectToNode: Truncating src buffer from %X to %X\n",
+ Length, TargetDesc->Buffer.Length));
+ }
+
+ return (AE_OK);
+}
+
+
+
+
+/*******************************************************************************
*
- * The Assignment of an object to another (not named) object
- * is handled here.
- * The val passed in will replace the current value (if any)
- * with the input value.
+ * FUNCTION: AcpiAmlCopyStringToString
*
- * When storing into an object the data is converted to the
- * target object type then stored in the object. This means
- * that the target object type (for an initialized target) will
- * not be changed by a store operation.
+ * PARAMETERS: SourceDesc - Source object to copy
+ * TargetDesc - Destination object of the copy
*
- * This module allows destination types of Number, String,
- * and Buffer.
+ * RETURN: Status
+ *
+ * DESCRIPTION: Copy a String object to another String object
*
******************************************************************************/
ACPI_STATUS
-AcpiAmlStoreObjectToObject (
- ACPI_OPERAND_OBJECT *ValDesc,
- ACPI_OPERAND_OBJECT *DestDesc,
- ACPI_WALK_STATE *WalkState)
+AcpiAmlCopyStringToString (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *TargetDesc)
{
- ACPI_STATUS Status = AE_OK;
- UINT8 *Buffer = NULL;
- UINT32 Length = 0;
- OBJECT_TYPE_INTERNAL DestinationType = DestDesc->Common.Type;
-
-
- FUNCTION_TRACE ("AmlStoreObjectToObject");
+ UINT32 Length;
+ UINT8 *Buffer;
- DEBUG_PRINT (ACPI_INFO,
- ("entered AcpiAmlStoreObjectToObject: Dest=%p, Val=%p\n",
- DestDesc, ValDesc));
/*
- * Assuming the parameters are valid!!!
+ * We know that SourceDesc is a string by now.
*/
- ACPI_ASSERT((DestDesc) && (ValDesc));
-
- DEBUG_PRINT (ACPI_INFO, ("AmlStoreObjectToObject: Storing %s into %s\n",
- AcpiCmGetTypeName (ValDesc->Common.Type),
- AcpiCmGetTypeName (DestDesc->Common.Type)));
+ Buffer = (UINT8 *) SourceDesc->String.Pointer;
+ Length = SourceDesc->String.Length;
/*
- * First ensure we have a value that can be stored in the target
+ * Setting a string value replaces the old string
*/
- switch (DestinationType)
+ if (Length < TargetDesc->String.Length)
{
- /* Type of Name's existing value */
+ /* Clear old string and copy in the new one */
- case ACPI_TYPE_NUMBER:
+ MEMSET(TargetDesc->String.Pointer, 0, TargetDesc->String.Length);
+ MEMCPY(TargetDesc->String.Pointer, Buffer, Length);
+ }
+ else
+ {
/*
- * These cases all require only number values or values that
- * can be converted to numbers.
- *
- * If value is not a Number, try to resolve it to one.
+ * Free the current buffer, then allocate a buffer
+ * large enough to hold the value
*/
-
- if (ValDesc->Common.Type != ACPI_TYPE_NUMBER)
+ if (TargetDesc->String.Pointer &&
+ !AcpiTbSystemTablePointer (TargetDesc->String.Pointer))
{
/*
- * Initially not a number, convert
+ * Only free if not a pointer into the DSDT
*/
- Status = AcpiAmlResolveToValue (&ValDesc, WalkState);
- if (ACPI_SUCCESS (Status) &&
- (ValDesc->Common.Type != ACPI_TYPE_NUMBER))
- {
- /*
- * Conversion successful but still not a number
- */
- DEBUG_PRINT (ACPI_ERROR,
- ("AmlStoreObjectToObject: Value assigned to %s must be Number, not %s\n",
- AcpiCmGetTypeName (DestinationType),
- AcpiCmGetTypeName (ValDesc->Common.Type)));
- Status = AE_AML_OPERAND_TYPE;
- }
+ AcpiCmFree(TargetDesc->String.Pointer);
}
- break;
+ TargetDesc->String.Pointer = AcpiCmAllocate (Length + 1);
+ TargetDesc->String.Length = Length;
- case ACPI_TYPE_STRING:
- case ACPI_TYPE_BUFFER:
-
- /*
- * Storing into a Field in a region or into a buffer or into
- * a string all is essentially the same.
- *
- * If value is not a valid type, try to resolve it to one.
- */
-
- if ((ValDesc->Common.Type != ACPI_TYPE_NUMBER) &&
- (ValDesc->Common.Type != ACPI_TYPE_BUFFER) &&
- (ValDesc->Common.Type != ACPI_TYPE_STRING))
+ if (!TargetDesc->String.Pointer)
{
- /*
- * Initially not a valid type, convert
- */
- Status = AcpiAmlResolveToValue (&ValDesc, WalkState);
- if (ACPI_SUCCESS (Status) &&
- (ValDesc->Common.Type != ACPI_TYPE_NUMBER) &&
- (ValDesc->Common.Type != ACPI_TYPE_BUFFER) &&
- (ValDesc->Common.Type != ACPI_TYPE_STRING))
- {
- /*
- * Conversion successful but still not a valid type
- */
- DEBUG_PRINT (ACPI_ERROR,
- ("AmlStoreObjectToObject: Assign wrong type %s to %s (must be type Num/Str/Buf)\n",
- AcpiCmGetTypeName (ValDesc->Common.Type),
- AcpiCmGetTypeName (DestinationType)));
- Status = AE_AML_OPERAND_TYPE;
- }
+ return (AE_NO_MEMORY);
}
- break;
+ MEMCPY(TargetDesc->String.Pointer, Buffer, Length);
+ }
- default:
+ return (AE_OK);
+}
- /*
- * TBD: [Unhandled] What other combinations must be implemented?
- */
- Status = AE_NOT_IMPLEMENTED;
- break;
+
+
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlCopyIntegerToIndexField
+ *
+ * PARAMETERS: SourceDesc - Source object to copy
+ * TargetDesc - Destination object of the copy
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Write an Integer to an Index Field
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlCopyIntegerToIndexField (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *TargetDesc)
+{
+ ACPI_STATUS Status;
+ BOOLEAN Locked;
+
+
+ /*
+ * Get the global lock if needed
+ */
+ Locked = AcpiAmlAcquireGlobalLock (TargetDesc->IndexField.LockRule);
+
+ /*
+ * Set Index value to select proper Data register
+ * perform the update (Set index)
+ */
+ Status = AcpiAmlAccessNamedField (ACPI_WRITE,
+ TargetDesc->IndexField.Index,
+ &TargetDesc->IndexField.Value,
+ sizeof (TargetDesc->IndexField.Value));
+ if (ACPI_SUCCESS (Status))
+ {
+ /* SetIndex was successful, next set Data value */
+
+ Status = AcpiAmlAccessNamedField (ACPI_WRITE,
+ TargetDesc->IndexField.Data,
+ &SourceDesc->Integer.Value,
+ sizeof (SourceDesc->Integer.Value));
+
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlStoreObjectToNode: IndexField: set data returned %s\n",
+ AcpiCmFormatException (Status)));
+ }
+
+ else
+ {
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlStoreObjectToNode: IndexField: set index returned %s\n",
+ AcpiCmFormatException (Status)));
}
- /* Exit now if failure above */
- if (ACPI_FAILURE (Status))
+ /*
+ * Release global lock if we acquired it earlier
+ */
+ AcpiAmlReleaseGlobalLock (Locked);
+
+ return (Status);
+}
+
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlCopyIntegerToBankField
+ *
+ * PARAMETERS: SourceDesc - Source object to copy
+ * TargetDesc - Destination object of the copy
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Write an Integer to a Bank Field
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlCopyIntegerToBankField (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *TargetDesc)
+{
+ ACPI_STATUS Status;
+ BOOLEAN Locked;
+
+
+ /*
+ * Get the global lock if needed
+ */
+ Locked = AcpiAmlAcquireGlobalLock (TargetDesc->IndexField.LockRule);
+
+
+
+ /*
+ * Set Bank value to select proper Bank
+ * Perform the update (Set Bank Select)
+ */
+
+ Status = AcpiAmlAccessNamedField (ACPI_WRITE,
+ TargetDesc->BankField.BankSelect,
+ &TargetDesc->BankField.Value,
+ sizeof (TargetDesc->BankField.Value));
+ if (ACPI_SUCCESS (Status))
+ {
+ /* Set bank select successful, set data value */
+
+ Status = AcpiAmlAccessNamedField (ACPI_WRITE,
+ TargetDesc->BankField.BankSelect,
+ &SourceDesc->BankField.Value,
+ sizeof (SourceDesc->BankField.Value));
+ }
+
+ else
{
- goto CleanUpAndBailOut;
+ DEBUG_PRINT (ACPI_INFO,
+ ("AmlStoreObjectToNode: BankField: set bakn returned %s\n",
+ AcpiCmFormatException (Status)));
}
+
/*
- * AcpiEverything is ready to execute now, We have
- * a value we can handle, just perform the update
+ * Release global lock if we acquired it earlier
*/
+ AcpiAmlReleaseGlobalLock (Locked);
+
+ return (Status);
+}
+
+
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlCopyDataToNamedField
+ *
+ * PARAMETERS: SourceDesc - Source object to copy
+ * Node - Destination Namespace node
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Copy raw data to a Named Field. No implicit conversion
+ * is performed on the source object
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlCopyDataToNamedField (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_NAMESPACE_NODE *Node)
+{
+ ACPI_STATUS Status;
+ BOOLEAN Locked;
+ UINT32 Length;
+ UINT8 *Buffer;
+
- switch (DestinationType)
+ /*
+ * Named fields (CreateXxxField) - We don't perform any conversions on the
+ * source operand, just use the raw data
+ */
+ switch (SourceDesc->Common.Type)
{
+ case ACPI_TYPE_INTEGER:
+ Buffer = (UINT8 *) &SourceDesc->Integer.Value;
+ Length = sizeof (SourceDesc->Integer.Value);
+ break;
+
+ case ACPI_TYPE_BUFFER:
+ Buffer = (UINT8 *) SourceDesc->Buffer.Pointer;
+ Length = SourceDesc->Buffer.Length;
+ break;
case ACPI_TYPE_STRING:
+ Buffer = (UINT8 *) SourceDesc->String.Pointer;
+ Length = SourceDesc->String.Length;
+ break;
- /*
- * Perform the update
- */
+ default:
+ return (AE_TYPE);
+ }
- switch (ValDesc->Common.Type)
- {
- case ACPI_TYPE_NUMBER:
- Buffer = (UINT8 *) &ValDesc->Number.Value;
- Length = sizeof (ValDesc->Number.Value);
- break;
-
- case ACPI_TYPE_BUFFER:
- Buffer = (UINT8 *) ValDesc->Buffer.Pointer;
- Length = ValDesc->Buffer.Length;
- break;
-
- case ACPI_TYPE_STRING:
- Buffer = (UINT8 *) ValDesc->String.Pointer;
- Length = ValDesc->String.Length;
- break;
- }
+ /*
+ * Get the global lock if needed before the update
+ * TBD: not needed!
+ */
+ Locked = AcpiAmlAcquireGlobalLock (SourceDesc->Field.LockRule);
- /*
- * Setting a string value replaces the old string
- */
+ Status = AcpiAmlAccessNamedField (ACPI_WRITE,
+ Node, Buffer, Length);
- if (Length < DestDesc->String.Length)
- {
- /*
- * Zero fill, not willing to do pointer arithmetic for
- * architecture independence. Just clear the whole thing
- */
- MEMSET(DestDesc->String.Pointer, 0, DestDesc->String.Length);
- MEMCPY(DestDesc->String.Pointer, Buffer, Length);
- }
- else
- {
- /*
- * Free the current buffer, then allocate a buffer
- * large enough to hold the value
- */
- if ( DestDesc->String.Pointer &&
- !AcpiTbSystemTablePointer (DestDesc->String.Pointer))
- {
- /*
- * Only free if not a pointer into the DSDT
- */
-
- AcpiCmFree(DestDesc->String.Pointer);
- }
-
- DestDesc->String.Pointer = AcpiCmAllocate (Length + 1);
- DestDesc->String.Length = Length;
-
- if (!DestDesc->String.Pointer)
- {
- Status = AE_NO_MEMORY;
- goto CleanUpAndBailOut;
- }
-
- MEMCPY(DestDesc->String.Pointer, Buffer, Length);
- }
- break;
+ AcpiAmlReleaseGlobalLock (Locked);
+ return (Status);
+}
- case ACPI_TYPE_BUFFER:
- /*
- * Perform the update to the buffer
- */
- switch (ValDesc->Common.Type)
- {
- case ACPI_TYPE_NUMBER:
- Buffer = (UINT8 *) &ValDesc->Number.Value;
- Length = sizeof (ValDesc->Number.Value);
- break;
-
- case ACPI_TYPE_BUFFER:
- Buffer = (UINT8 *) ValDesc->Buffer.Pointer;
- Length = ValDesc->Buffer.Length;
- break;
-
- case ACPI_TYPE_STRING:
- Buffer = (UINT8 *) ValDesc->String.Pointer;
- Length = ValDesc->String.Length;
- break;
- }
- /*
- * If the buffer is uninitialized,
- * memory needs to be allocated for the copy.
- */
- if(0 == DestDesc->Buffer.Length)
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiAmlCopyIntegerToFieldUnit
+ *
+ * PARAMETERS: SourceDesc - Source object to copy
+ * TargetDesc - Destination object of the copy
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Write an Integer to a Field Unit.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiAmlCopyIntegerToFieldUnit (
+ ACPI_OPERAND_OBJECT *SourceDesc,
+ ACPI_OPERAND_OBJECT *TargetDesc)
+{
+ ACPI_STATUS Status = AE_OK;
+ UINT8 *Location = NULL;
+ UINT32 Mask;
+ UINT32 NewValue;
+ BOOLEAN Locked = FALSE;
+
+
+
+ FUNCTION_TRACE ("AmlCopyIntegerToFieldUnit");
+
+ /*
+ * If the Field Buffer and Index have not been previously evaluated,
+ * evaluate them and save the results.
+ */
+ if (!(TargetDesc->Common.Flags & AOPOBJ_DATA_VALID))
+ {
+ Status = AcpiDsGetFieldUnitArguments (TargetDesc);
+ if (ACPI_FAILURE (Status))
{
- DestDesc->Buffer.Pointer = AcpiCmCallocate(Length);
- DestDesc->Buffer.Length = Length;
-
- if (!DestDesc->Buffer.Pointer)
- {
- Status = AE_NO_MEMORY;
- goto CleanUpAndBailOut;
- }
+ return_ACPI_STATUS (Status);
}
+ }
- /*
- * Buffer is a static allocation,
- * only place what will fit in the buffer.
- */
- if (Length <= DestDesc->Buffer.Length)
+ if ((!TargetDesc->FieldUnit.Container ||
+ ACPI_TYPE_BUFFER != TargetDesc->FieldUnit.Container->Common.Type))
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("Null Container or wrong type: %p", TargetDesc->FieldUnit.Container));
+
+ if (TargetDesc->FieldUnit.Container)
{
- /*
- * Zero fill first, not willing to do pointer arithmetic for
- * architecture independence. Just clear the whole thing
- */
- MEMSET(DestDesc->Buffer.Pointer, 0, DestDesc->Buffer.Length);
- MEMCPY(DestDesc->Buffer.Pointer, Buffer, Length);
+ DEBUG_PRINT_RAW (ACPI_ERROR, (" Type %X",
+ TargetDesc->FieldUnit.Container->Common.Type));
}
- else
- {
- /*
- * truncate, copy only what will fit
- */
- MEMCPY(DestDesc->Buffer.Pointer, Buffer, DestDesc->Buffer.Length);
- DEBUG_PRINT (ACPI_INFO,
- ("AmlStoreObjectToObject: Truncating src buffer from %X to %X\n",
- Length, DestDesc->Buffer.Length));
- }
- break;
+ DEBUG_PRINT_RAW (ACPI_ERROR, ("\n"));
- case ACPI_TYPE_NUMBER:
+ return_ACPI_STATUS (AE_AML_INTERNAL);
+ }
- DestDesc->Number.Value = ValDesc->Number.Value;
+ /*
+ * Get the global lock if needed
+ */
+ Locked = AcpiAmlAcquireGlobalLock (TargetDesc->FieldUnit.LockRule);
- /* Truncate value if we are executing from a 32-bit ACPI table */
+ /*
+ * TBD: [Unhandled] REMOVE this limitation
+ * Make sure the operation is within the limits of our implementation
+ * this is not a Spec limitation!!
+ */
+ if (TargetDesc->FieldUnit.Length + TargetDesc->FieldUnit.BitOffset > 32)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("AmlCopyIntegerToFieldUnit: FieldUnit: Implementation limitation - Field exceeds UINT32\n"));
+ return_ACPI_STATUS (AE_NOT_IMPLEMENTED);
+ }
- AcpiAmlTruncateFor32bitTable (DestDesc, WalkState);
- break;
+ /* Field location is (base of buffer) + (byte offset) */
- default:
+ Location = TargetDesc->FieldUnit.Container->Buffer.Pointer
+ + TargetDesc->FieldUnit.Offset;
- /*
- * All other types than Alias and the various Fields come here.
- * Store ValDesc as the new value of the Name, and set
- * the Name's type to that of the value being stored in it.
- * ValDesc reference count is incremented by AttachObject.
- */
+ /*
+ * Construct Mask with 1 bits where the field is,
+ * 0 bits elsewhere
+ */
+ Mask = ((UINT32) 1 << TargetDesc->FieldUnit.Length) - ((UINT32)1
+ << TargetDesc->FieldUnit.BitOffset);
- DEBUG_PRINT (ACPI_WARN,
- ("AmlStoreObjectToObject: Store into %s not implemented\n",
- AcpiCmGetTypeName (DestDesc->Common.Type)));
+ DEBUG_PRINT (TRACE_EXEC,
+ ("** Store %lx in buffer %p byte %ld bit %X width %d addr %p mask %08lx\n",
+ SourceDesc->Integer.Value,
+ TargetDesc->FieldUnit.Container->Buffer.Pointer,
+ TargetDesc->FieldUnit.Offset, TargetDesc->FieldUnit.BitOffset,
+ TargetDesc->FieldUnit.Length,Location, Mask));
- Status = AE_NOT_IMPLEMENTED;
- break;
- }
+ /* Zero out the field in the buffer */
-CleanUpAndBailOut:
+ MOVE_UNALIGNED32_TO_32 (&NewValue, Location);
+ NewValue &= ~Mask;
+
+ /*
+ * Shift and mask the new value into position,
+ * and or it into the buffer.
+ */
+ NewValue |= (SourceDesc->Integer.Value << TargetDesc->FieldUnit.BitOffset) &
+ Mask;
- return_ACPI_STATUS (Status);
+ /* Store back the value */
+
+ MOVE_UNALIGNED32_TO_32 (Location, &NewValue);
+
+ DEBUG_PRINT (TRACE_EXEC, ("New Field value %08lx\n", NewValue));
+ return_ACPI_STATUS (AE_OK);
}
+
+
+
+
diff --git a/sys/contrib/dev/acpica/exsystem.c b/sys/contrib/dev/acpica/exsystem.c
index d7b5fd8..e1f64ea 100644
--- a/sys/contrib/dev/acpica/exsystem.c
+++ b/sys/contrib/dev/acpica/exsystem.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amsystem - Interface to OS services
- * $Revision: 53 $
+ * $Revision: 54 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -307,7 +307,7 @@ AcpiAmlSystemAcquireMutex (
}
Status = AcpiAmlSystemWaitSemaphore (ObjDesc->Mutex.Semaphore,
- (UINT32) TimeDesc->Number.Value);
+ (UINT32) TimeDesc->Integer.Value);
return_ACPI_STATUS (Status);
}
@@ -417,7 +417,7 @@ AcpiAmlSystemWaitEvent (
if (ObjDesc)
{
Status = AcpiAmlSystemWaitSemaphore (ObjDesc->Event.Semaphore,
- (UINT32) TimeDesc->Number.Value);
+ (UINT32) TimeDesc->Integer.Value);
}
diff --git a/sys/contrib/dev/acpica/exutils.c b/sys/contrib/dev/acpica/exutils.c
index f009e02..e106bfb 100644
--- a/sys/contrib/dev/acpica/exutils.c
+++ b/sys/contrib/dev/acpica/exutils.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amutils - interpreter/scanner utilities
- * $Revision: 66 $
+ * $Revision: 68 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -138,14 +138,11 @@ typedef struct Internal_Search_st
/* Used to traverse nested packages when copying*/
+/* TBD: This must be removed! */
INTERNAL_PKG_SEARCH_INFO CopyLevel[MAX_PACKAGE_DEPTH];
-static NATIVE_CHAR hex[] =
- {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
-
-
/*******************************************************************************
*
* FUNCTION: AcpiAmlEnterInterpreter
@@ -252,7 +249,7 @@ AcpiAmlTruncateFor32bitTable (
*/
if ((!ObjDesc) ||
- (ObjDesc->Common.Type != ACPI_TYPE_NUMBER) ||
+ (ObjDesc->Common.Type != ACPI_TYPE_INTEGER) ||
(!WalkState->MethodNode))
{
return;
@@ -264,7 +261,7 @@ AcpiAmlTruncateFor32bitTable (
* We are running a method that exists in a 32-bit ACPI table.
* Truncate the value to 32 bits by zeroing out the upper 32-bit field
*/
- ObjDesc->Number.Value &= (ACPI_INTEGER) ACPI_UINT32_MAX;
+ ObjDesc->Integer.Value &= (ACPI_INTEGER) ACPI_UINT32_MAX;
}
}
@@ -463,10 +460,10 @@ AcpiAmlEisaIdToString (
OutString[0] = (char) ('@' + ((id >> 26) & 0x1f));
OutString[1] = (char) ('@' + ((id >> 21) & 0x1f));
OutString[2] = (char) ('@' + ((id >> 16) & 0x1f));
- OutString[3] = hex[(id >> 12) & 0xf];
- OutString[4] = hex[(id >> 8) & 0xf];
- OutString[5] = hex[(id >> 4) & 0xf];
- OutString[6] = hex[id & 0xf];
+ OutString[3] = AcpiGbl_HexToAscii[(id >> 12) & 0xf];
+ OutString[4] = AcpiGbl_HexToAscii[(id >> 8) & 0xf];
+ OutString[5] = AcpiGbl_HexToAscii[(id >> 4) & 0xf];
+ OutString[6] = AcpiGbl_HexToAscii[id & 0xf];
OutString[7] = 0;
return (AE_OK);
diff --git a/sys/contrib/dev/acpica/exxface.c b/sys/contrib/dev/acpica/exxface.c
index 5149403..960677e 100644
--- a/sys/contrib/dev/acpica/exxface.c
+++ b/sys/contrib/dev/acpica/exxface.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amxface - External interpreter interfaces
- * $Revision: 23 $
+ * $Revision: 24 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/hwacpi.c b/sys/contrib/dev/acpica/hwacpi.c
index 754f169..d8b5f10 100644
--- a/sys/contrib/dev/acpica/hwacpi.c
+++ b/sys/contrib/dev/acpica/hwacpi.c
@@ -1,7 +1,8 @@
+
/******************************************************************************
*
- * Module Name: hwacpi - ACPI hardware functions - mode and timer
- * $Revision: 34 $
+ * Module Name: hwacpi - ACPI Hardware Initialization/Mode Interface
+ * $Revision: 36 $
*
*****************************************************************************/
@@ -9,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -239,7 +240,7 @@ AcpiHwInitialize (
* block is not fixed, so the buffer must be allocated with malloc
*/
- if (ACPI_VALID_ADDRESS (AcpiGbl_FADT->XGpe0Blk.Address) &&
+ if (ACPI_VALID_ADDRESS (AcpiGbl_FADT->XGpe0Blk.Address) &&
AcpiGbl_FADT->Gpe0BlkLen)
{
/* GPE0 specified in FADT */
@@ -265,7 +266,7 @@ AcpiHwInitialize (
AcpiGbl_Gpe0EnableRegisterSave = NULL;
}
- if (ACPI_VALID_ADDRESS (AcpiGbl_FADT->XGpe1Blk.Address) &&
+ if (ACPI_VALID_ADDRESS (AcpiGbl_FADT->XGpe1Blk.Address) &&
AcpiGbl_FADT->Gpe1BlkLen)
{
/* GPE1 defined */
@@ -443,53 +444,3 @@ AcpiHwGetModeCapabilities (void)
}
-/******************************************************************************
- *
- * FUNCTION: AcpiHwPmtTicks
- *
- * PARAMETERS: none
- *
- * RETURN: Current value of the ACPI PMT (timer)
- *
- * DESCRIPTION: Obtains current value of ACPI PMT
- *
- ******************************************************************************/
-
-UINT32
-AcpiHwPmtTicks (void)
-{
- UINT32 Ticks;
-
- FUNCTION_TRACE ("AcpiPmtTicks");
-
- Ticks = AcpiOsIn32 ((ACPI_IO_ADDRESS) ACPI_GET_ADDRESS (AcpiGbl_FADT->XPmTmrBlk.Address));
-
- return_VALUE (Ticks);
-}
-
-
-/******************************************************************************
- *
- * FUNCTION: AcpiHwPmtResolution
- *
- * PARAMETERS: none
- *
- * RETURN: Number of bits of resolution in the PMT (either 24 or 32)
- *
- * DESCRIPTION: Obtains resolution of the ACPI PMT (either 24bit or 32bit)
- *
- ******************************************************************************/
-
-UINT32
-AcpiHwPmtResolution (void)
-{
- FUNCTION_TRACE ("AcpiPmtResolution");
-
- if (0 == AcpiGbl_FADT->TmrValExt)
- {
- return_VALUE (24);
- }
-
- return_VALUE (32);
-}
-
diff --git a/sys/contrib/dev/acpica/hwgpe.c b/sys/contrib/dev/acpica/hwgpe.c
index 2ed2d34..52851fa 100644
--- a/sys/contrib/dev/acpica/hwgpe.c
+++ b/sys/contrib/dev/acpica/hwgpe.c
@@ -1,7 +1,8 @@
+
/******************************************************************************
*
* Module Name: hwgpe - Low level GPE enable/disable/clear functions
- * $Revision: 26 $
+ * $Revision: 28 $
*
*****************************************************************************/
@@ -9,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/hwregs.c b/sys/contrib/dev/acpica/hwregs.c
index 3448369..1c47c67 100644
--- a/sys/contrib/dev/acpica/hwregs.c
+++ b/sys/contrib/dev/acpica/hwregs.c
@@ -3,7 +3,7 @@
*
* Module Name: hwregs - Read/write access functions for the various ACPI
* control and status registers.
- * $Revision: 86 $
+ * $Revision: 88 $
*
******************************************************************************/
@@ -11,7 +11,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -129,7 +129,7 @@
/* This matches the #defines in actypes.h. */
NATIVE_CHAR *SleepStateTable[] = {"\\_S0_","\\_S1_","\\_S2_","\\_S3_",
- "\\_S4_","\\_S4B","\\_S5_"};
+ "\\_S4_","\\_S5_","\\_S4B"};
/*******************************************************************************
@@ -145,7 +145,7 @@ NATIVE_CHAR *SleepStateTable[] = {"\\_S0_","\\_S1_","\\_S2_","\\
*
******************************************************************************/
-static UINT32
+UINT32
AcpiHwGetBitShift (
UINT32 Mask)
{
@@ -300,9 +300,9 @@ AcpiHwObtainSleepTypeRegisterData (
}
else if (((ObjDesc->Package.Elements[0])->Common.Type !=
- ACPI_TYPE_NUMBER) ||
+ ACPI_TYPE_INTEGER) ||
((ObjDesc->Package.Elements[1])->Common.Type !=
- ACPI_TYPE_NUMBER))
+ ACPI_TYPE_INTEGER))
{
/* Must have two */
@@ -315,9 +315,9 @@ AcpiHwObtainSleepTypeRegisterData (
/*
* Valid _Sx_ package size, type, and value
*/
- *Slp_TypA = (UINT8) (ObjDesc->Package.Elements[0])->Number.Value;
+ *Slp_TypA = (UINT8) (ObjDesc->Package.Elements[0])->Integer.Value;
- *Slp_TypB = (UINT8) (ObjDesc->Package.Elements[1])->Number.Value;
+ *Slp_TypB = (UINT8) (ObjDesc->Package.Elements[1])->Integer.Value;
}
@@ -733,15 +733,8 @@ AcpiHwRegisterRead (
case PM1_CONTROL: /* 16-bit access */
- if (RegisterId != SLP_TYPE_B)
- {
- Value |= AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1aCntBlk, 0);
- }
-
- if (RegisterId != SLP_TYPE_A)
- {
- Value |= AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1bCntBlk, 0);
- }
+ Value = AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1aCntBlk, 0);
+ Value |= AcpiHwLowLevelRead (16, &AcpiGbl_FADT->XPm1bCntBlk, 0);
break;
@@ -854,35 +847,20 @@ AcpiHwRegisterWrite (
case PM1_CONTROL: /* 16-bit access */
- /*
- * If SLP_TYP_A or SLP_TYP_B, only write to one reg block.
- * Otherwise, write to both.
- */
- if (RegisterId == SLP_TYPE_A)
- {
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aCntBlk, 0);
- }
- else if (RegisterId == SLP_TYPE_B)
- {
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bCntBlk, 0);
- }
- else
- {
- /* disable/re-enable interrupts if sleeping */
- if (RegisterId == SLP_EN)
- {
- disable();
- }
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aCntBlk, 0);
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bCntBlk, 0);
+ break;
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aCntBlk, 0);
- AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bCntBlk, 0);
- if (RegisterId == SLP_EN)
- {
- enable();
- }
- }
+ case PM1A_CONTROL: /* 16-bit access */
+
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aCntBlk, 0);
+ break;
+
+
+ case PM1B_CONTROL: /* 16-bit access */
+ AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bCntBlk, 0);
break;
diff --git a/sys/contrib/dev/acpica/hwsleep.c b/sys/contrib/dev/acpica/hwsleep.c
new file mode 100644
index 0000000..81305a8
--- /dev/null
+++ b/sys/contrib/dev/acpica/hwsleep.c
@@ -0,0 +1,296 @@
+
+/******************************************************************************
+ *
+ * Name: hwsleep.c - ACPI Hardware Sleep/Wake Interface
+ * $Revision: 5 $
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
+ * All rights reserved.
+ *
+ * 2. License
+ *
+ * 2.1. This is your license from Intel Corp. under its intellectual property
+ * rights. You may have additional license terms from the party that provided
+ * you this software, covering your right to use that party's intellectual
+ * property rights.
+ *
+ * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
+ * copy of the source code appearing in this file ("Covered Code") an
+ * irrevocable, perpetual, worldwide license under Intel's copyrights in the
+ * base code distributed originally by Intel ("Original Intel Code") to copy,
+ * make derivatives, distribute, use and display any portion of the Covered
+ * Code in any form, with the right to sublicense such rights; and
+ *
+ * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
+ * license (with the right to sublicense), under only those claims of Intel
+ * patents that are infringed by the Original Intel Code, to make, use, sell,
+ * offer to sell, and import the Covered Code and derivative works thereof
+ * solely to the minimum extent necessary to exercise the above copyright
+ * license, and in no event shall the patent license extend to any additions
+ * to or modifications of the Original Intel Code. No other license or right
+ * is granted directly or by implication, estoppel or otherwise;
+ *
+ * The above copyright and patent license is granted only if the following
+ * conditions are met:
+ *
+ * 3. Conditions
+ *
+ * 3.1. Redistribution of Source with Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification with rights to further distribute source must include
+ * the above Copyright Notice, the above License, this list of Conditions,
+ * and the following Disclaimer and Export Compliance provision. In addition,
+ * Licensee must cause all Covered Code to which Licensee contributes to
+ * contain a file documenting the changes Licensee made to create that Covered
+ * Code and the date of any change. Licensee must include in that file the
+ * documentation of any changes made by any predecessor Licensee. Licensee
+ * must include a prominent statement that the modification is derived,
+ * directly or indirectly, from Original Intel Code.
+ *
+ * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification without rights to further distribute source must
+ * include the following Disclaimer and Export Compliance provision in the
+ * documentation and/or other materials provided with distribution. In
+ * addition, Licensee may not authorize further sublicense of source of any
+ * portion of the Covered Code, and must include terms to the effect that the
+ * license from Licensee to its licensee is limited to the intellectual
+ * property embodied in the software Licensee provides to its licensee, and
+ * not to intellectual property embodied in modifications its licensee may
+ * make.
+ *
+ * 3.3. Redistribution of Executable. Redistribution in executable form of any
+ * substantial portion of the Covered Code or modification must reproduce the
+ * above Copyright Notice, and the following Disclaimer and Export Compliance
+ * provision in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3.4. Intel retains all right, title, and interest in and to the Original
+ * Intel Code.
+ *
+ * 3.5. Neither the name Intel nor any other trademark owned or controlled by
+ * Intel shall be used in advertising or otherwise to promote the sale, use or
+ * other dealings in products derived from or relating to the Covered Code
+ * without prior written authorization from Intel.
+ *
+ * 4. Disclaimer and Export Compliance
+ *
+ * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
+ * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
+ * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
+ * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
+ * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
+ * PARTICULAR PURPOSE.
+ *
+ * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
+ * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
+ * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
+ * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
+ * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
+ * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
+ * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
+ * LIMITED REMEDY.
+ *
+ * 4.3. Licensee shall not export, either directly or indirectly, any of this
+ * software or system incorporating such software without first obtaining any
+ * required license or other approval from the U. S. Department of Commerce or
+ * any other agency or department of the United States Government. In the
+ * event Licensee exports any such software from the United States or
+ * re-exports any such software from a foreign destination, Licensee shall
+ * ensure that the distribution and export/re-export of the software is in
+ * compliance with all laws, regulations, orders, or other restrictions of the
+ * U.S. Export Administration Regulations. Licensee agrees that neither it nor
+ * any of its subsidiaries will export/re-export any technical data, process,
+ * software, or service, directly or indirectly, to any country for which the
+ * United States government or any agency thereof requires an export license,
+ * other governmental approval, or letter of assurance, without first obtaining
+ * such license, approval or letter.
+ *
+ *****************************************************************************/
+
+#include "acpi.h"
+#include "acnamesp.h"
+#include "achware.h"
+
+#define _COMPONENT HARDWARE
+ MODULE_NAME ("hwsleep")
+
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiSetFirmwareWakingVector
+ *
+ * PARAMETERS: PhysicalAddress - Physical address of ACPI real mode
+ * entry point.
+ *
+ * RETURN: AE_OK or AE_ERROR
+ *
+ * DESCRIPTION: Access function for dFirmwareWakingVector field in FACS
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiSetFirmwareWakingVector (
+ ACPI_PHYSICAL_ADDRESS PhysicalAddress)
+{
+
+ FUNCTION_TRACE ("AcpiSetFirmwareWakingVector");
+
+
+ /* Make sure that we have an FACS */
+
+ if (!AcpiGbl_FACS)
+ {
+ return_ACPI_STATUS (AE_NO_ACPI_TABLES);
+ }
+
+ /* Set the vector */
+
+ if (AcpiGbl_FACS->VectorWidth == 32)
+ {
+ * (UINT32 *) AcpiGbl_FACS->FirmwareWakingVector = (UINT32) PhysicalAddress;
+ }
+ else
+ {
+ *AcpiGbl_FACS->FirmwareWakingVector = PhysicalAddress;
+ }
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiGetFirmwareWakingVector
+ *
+ * PARAMETERS: *PhysicalAddress - Output buffer where contents of
+ * the FirmwareWakingVector field of
+ * the FACS will be stored.
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Access function for dFirmwareWakingVector field in FACS
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiGetFirmwareWakingVector (
+ ACPI_PHYSICAL_ADDRESS *PhysicalAddress)
+{
+
+ FUNCTION_TRACE ("AcpiGetFirmwareWakingVector");
+
+
+ if (!PhysicalAddress)
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
+
+ /* Make sure that we have an FACS */
+
+ if (!AcpiGbl_FACS)
+ {
+ return_ACPI_STATUS (AE_NO_ACPI_TABLES);
+ }
+
+ /* Get the vector */
+
+ if (AcpiGbl_FACS->VectorWidth == 32)
+ {
+ *PhysicalAddress = * (UINT32 *) AcpiGbl_FACS->FirmwareWakingVector;
+ }
+ else
+ {
+ *PhysicalAddress = *AcpiGbl_FACS->FirmwareWakingVector;
+ }
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiEnterSleepState
+ *
+ * PARAMETERS: SleepState - Which sleep state to enter
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Enter a system sleep state (see ACPI 2.0 spec p 231)
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiEnterSleepState (
+ UINT8 SleepState)
+{
+ ACPI_STATUS Status;
+ ACPI_OBJECT_LIST ArgList;
+ ACPI_OBJECT Arg;
+ UINT8 TypeA;
+ UINT8 TypeB;
+ UINT16 PM1AControl;
+ UINT16 PM1BControl;
+
+ FUNCTION_TRACE ("AcpiEnterSleepState");
+
+ /*
+ * _PSW methods could be run here to enable wake-on keyboard, LAN, etc.
+ */
+
+ Status = AcpiHwObtainSleepTypeRegisterData(SleepState, &TypeA, &TypeB);
+
+ if (!ACPI_SUCCESS(Status))
+ {
+ return Status;
+ }
+
+ /* run the _PTS and _GTS methods */
+ MEMSET(&ArgList, 0, sizeof(ArgList));
+ ArgList.Count = 1;
+ ArgList.Pointer = &Arg;
+
+ MEMSET(&Arg, 0, sizeof(Arg));
+ Arg.Type = ACPI_TYPE_INTEGER;
+ Arg.Integer.Value = SleepState;
+
+ AcpiEvaluateObject(NULL, "\\_PTS", &ArgList, NULL);
+ AcpiEvaluateObject(NULL, "\\_GTS", &ArgList, NULL);
+
+ /* clear wake status */
+ AcpiHwRegisterBitAccess(ACPI_WRITE, ACPI_MTX_LOCK, WAK_STS, 1);
+
+ PM1AControl = (UINT16) AcpiHwRegisterRead(ACPI_MTX_LOCK, PM1_CONTROL);
+
+ /* mask off SLP_EN and SLP_TYP fields */
+ PM1AControl &= 0xC3FF;
+
+ /* mask in SLP_EN */
+ PM1AControl |= (1 << AcpiHwGetBitShift (SLP_EN_MASK));
+
+ PM1BControl = PM1AControl;
+
+ /* mask in SLP_TYP */
+ PM1AControl |= (TypeA << AcpiHwGetBitShift (SLP_TYPE_X_MASK));
+ PM1BControl |= (TypeB << AcpiHwGetBitShift (SLP_TYPE_X_MASK));
+
+ DEBUG_PRINT(ACPI_OK, ("Entering S%d\n", SleepState));
+
+ /* the old version was disabling interrupts. let's try it without
+ * and see how that works
+ */
+ /*disable();*/
+
+ AcpiHwRegisterWrite(ACPI_MTX_LOCK, PM1A_CONTROL, PM1AControl);
+ AcpiHwRegisterWrite(ACPI_MTX_LOCK, PM1B_CONTROL, PM1BControl);
+
+ /*enable();*/
+
+ return_ACPI_STATUS (AE_OK);
+}
diff --git a/sys/contrib/dev/acpica/hwtimer.c b/sys/contrib/dev/acpica/hwtimer.c
new file mode 100644
index 0000000..197c65c
--- /dev/null
+++ b/sys/contrib/dev/acpica/hwtimer.c
@@ -0,0 +1,302 @@
+
+/******************************************************************************
+ *
+ * Name: hwtimer.c - ACPI Power Management Timer Interface
+ * $Revision: 4 $
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
+ * All rights reserved.
+ *
+ * 2. License
+ *
+ * 2.1. This is your license from Intel Corp. under its intellectual property
+ * rights. You may have additional license terms from the party that provided
+ * you this software, covering your right to use that party's intellectual
+ * property rights.
+ *
+ * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
+ * copy of the source code appearing in this file ("Covered Code") an
+ * irrevocable, perpetual, worldwide license under Intel's copyrights in the
+ * base code distributed originally by Intel ("Original Intel Code") to copy,
+ * make derivatives, distribute, use and display any portion of the Covered
+ * Code in any form, with the right to sublicense such rights; and
+ *
+ * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
+ * license (with the right to sublicense), under only those claims of Intel
+ * patents that are infringed by the Original Intel Code, to make, use, sell,
+ * offer to sell, and import the Covered Code and derivative works thereof
+ * solely to the minimum extent necessary to exercise the above copyright
+ * license, and in no event shall the patent license extend to any additions
+ * to or modifications of the Original Intel Code. No other license or right
+ * is granted directly or by implication, estoppel or otherwise;
+ *
+ * The above copyright and patent license is granted only if the following
+ * conditions are met:
+ *
+ * 3. Conditions
+ *
+ * 3.1. Redistribution of Source with Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification with rights to further distribute source must include
+ * the above Copyright Notice, the above License, this list of Conditions,
+ * and the following Disclaimer and Export Compliance provision. In addition,
+ * Licensee must cause all Covered Code to which Licensee contributes to
+ * contain a file documenting the changes Licensee made to create that Covered
+ * Code and the date of any change. Licensee must include in that file the
+ * documentation of any changes made by any predecessor Licensee. Licensee
+ * must include a prominent statement that the modification is derived,
+ * directly or indirectly, from Original Intel Code.
+ *
+ * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification without rights to further distribute source must
+ * include the following Disclaimer and Export Compliance provision in the
+ * documentation and/or other materials provided with distribution. In
+ * addition, Licensee may not authorize further sublicense of source of any
+ * portion of the Covered Code, and must include terms to the effect that the
+ * license from Licensee to its licensee is limited to the intellectual
+ * property embodied in the software Licensee provides to its licensee, and
+ * not to intellectual property embodied in modifications its licensee may
+ * make.
+ *
+ * 3.3. Redistribution of Executable. Redistribution in executable form of any
+ * substantial portion of the Covered Code or modification must reproduce the
+ * above Copyright Notice, and the following Disclaimer and Export Compliance
+ * provision in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3.4. Intel retains all right, title, and interest in and to the Original
+ * Intel Code.
+ *
+ * 3.5. Neither the name Intel nor any other trademark owned or controlled by
+ * Intel shall be used in advertising or otherwise to promote the sale, use or
+ * other dealings in products derived from or relating to the Covered Code
+ * without prior written authorization from Intel.
+ *
+ * 4. Disclaimer and Export Compliance
+ *
+ * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
+ * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
+ * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
+ * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
+ * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
+ * PARTICULAR PURPOSE.
+ *
+ * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
+ * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
+ * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
+ * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
+ * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
+ * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
+ * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
+ * LIMITED REMEDY.
+ *
+ * 4.3. Licensee shall not export, either directly or indirectly, any of this
+ * software or system incorporating such software without first obtaining any
+ * required license or other approval from the U. S. Department of Commerce or
+ * any other agency or department of the United States Government. In the
+ * event Licensee exports any such software from the United States or
+ * re-exports any such software from a foreign destination, Licensee shall
+ * ensure that the distribution and export/re-export of the software is in
+ * compliance with all laws, regulations, orders, or other restrictions of the
+ * U.S. Export Administration Regulations. Licensee agrees that neither it nor
+ * any of its subsidiaries will export/re-export any technical data, process,
+ * software, or service, directly or indirectly, to any country for which the
+ * United States government or any agency thereof requires an export license,
+ * other governmental approval, or letter of assurance, without first obtaining
+ * such license, approval or letter.
+ *
+ *****************************************************************************/
+
+#include "acpi.h"
+#include "achware.h"
+
+#define _COMPONENT HARDWARE
+ MODULE_NAME ("hwtimer")
+
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiGetTimerResolution
+ *
+ * PARAMETERS: none
+ *
+ * RETURN: Number of bits of resolution in the PM Timer (24 or 32).
+ *
+ * DESCRIPTION: Obtains resolution of the ACPI PM Timer.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiGetTimerResolution (
+ UINT32 *Resolution)
+{
+ FUNCTION_TRACE ("AcpiGetTimerResolution");
+
+ if (!Resolution)
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
+
+ if (0 == AcpiGbl_FADT->TmrValExt)
+ {
+ *Resolution = 24;
+ }
+ else
+ {
+ *Resolution = 32;
+ }
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiGetTimer
+ *
+ * PARAMETERS: none
+ *
+ * RETURN: Current value of the ACPI PM Timer (in ticks).
+ *
+ * DESCRIPTION: Obtains current value of ACPI PM Timer.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiGetTimer (
+ UINT32 *Ticks)
+{
+ FUNCTION_TRACE ("AcpiGetTimer");
+
+ if (!Ticks)
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
+
+ *Ticks = AcpiOsIn32 ((ACPI_IO_ADDRESS) ACPI_GET_ADDRESS (AcpiGbl_FADT->XPmTmrBlk.Address));
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiGetTimerDuration
+ *
+ * PARAMETERS: StartTicks
+ * EndTicks
+ * TimeElapsed
+ *
+ * RETURN: TimeElapsed
+ *
+ * DESCRIPTION: Computes the time elapsed (in microseconds) between two
+ * PM Timer time stamps, taking into account the possibility of
+ * rollovers, the timer resolution, and timer frequency.
+ *
+ * The PM Timer's clock ticks at roughly 3.6 times per
+ * _microsecond_, and its clock continues through Cx state
+ * transitions (unlike many CPU timestamp counters) -- making it
+ * a versatile and accurate timer.
+ *
+ * Note that this function accomodates only a single timer
+ * rollover. Thus for 24-bit timers, this function should only
+ * be used for calculating durations less than ~4.6 seconds
+ * (~20 hours for 32-bit timers).
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiGetTimerDuration (
+ UINT32 StartTicks,
+ UINT32 EndTicks,
+ UINT32 *TimeElapsed)
+{
+ UINT32 DeltaTicks = 0;
+ UINT32 Seconds = 0;
+ UINT32 Milliseconds = 0;
+ UINT32 Microseconds = 0;
+ UINT32 Remainder = 0;
+
+ FUNCTION_TRACE ("AcpiGetTimerDuration");
+
+ if (!TimeElapsed)
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
+
+ /*
+ * Compute Tick Delta:
+ * -------------------
+ * Handle timer rollovers on 24- versus 32-bit timers.
+ */
+ if (StartTicks < EndTicks)
+ {
+ DeltaTicks = EndTicks - StartTicks;
+ }
+ else if (StartTicks > EndTicks)
+ {
+ /* 24-bit Timer */
+ if (0 == AcpiGbl_FADT->TmrValExt)
+ {
+ DeltaTicks = (0x00FFFFFF - StartTicks) + EndTicks;
+ }
+ /* 32-bit Timer */
+ else
+ {
+ DeltaTicks = (0xFFFFFFFF - StartTicks) + EndTicks;
+ }
+ }
+
+ /*
+ * Compute Duration:
+ * -----------------
+ * Since certain compilers (gcc/Linux, argh!) don't support 64-bit
+ * divides in kernel-space we have to do some trickery to preserve
+ * accuracy while using 32-bit math.
+ *
+ * TODO: Change to use 64-bit math when supported.
+ *
+ * The process is as follows:
+ * 1. Compute the number of seconds by dividing Delta Ticks by
+ * the timer frequency.
+ * 2. Compute the number of milliseconds in the remainder from step #1
+ * by multiplying by 1000 and then dividing by the timer frequency.
+ * 3. Compute the number of microseconds in the remainder from step #2
+ * by multiplying by 1000 and then dividing by the timer frequency.
+ * 4. Add the results from steps 1, 2, and 3 to get the total duration.
+ *
+ * Example: The time elapsed for DeltaTicks = 0xFFFFFFFF should be
+ * 1199864031 microseconds. This is computed as follows:
+ * Step #1: Seconds = 1199; Remainder = 3092840
+ * Step #2: Milliseconds = 864; Remainder = 113120
+ * Step #3: Microseconds = 31; Remainder = <don't care!>
+ */
+
+ /* Step #1 */
+ Seconds = DeltaTicks / PM_TIMER_FREQUENCY;
+ Remainder = DeltaTicks % PM_TIMER_FREQUENCY;
+
+ /* Step #2 */
+ Milliseconds = (Remainder * 1000) / PM_TIMER_FREQUENCY;
+ Remainder = (Remainder * 1000) % PM_TIMER_FREQUENCY;
+
+ /* Step #3 */
+ Microseconds = (Remainder * 1000) / PM_TIMER_FREQUENCY;
+
+ /* Step #4 */
+ *TimeElapsed = Seconds * 1000000;
+ *TimeElapsed += Milliseconds * 1000;
+ *TimeElapsed += Microseconds;
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+
diff --git a/sys/contrib/dev/acpica/nsaccess.c b/sys/contrib/dev/acpica/nsaccess.c
index f5aa99a..47e7785 100644
--- a/sys/contrib/dev/acpica/nsaccess.c
+++ b/sys/contrib/dev/acpica/nsaccess.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nsaccess - Top-level functions for accessing ACPI namespace
- * $Revision: 116 $
+ * $Revision: 119 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -225,9 +225,9 @@ AcpiNsRootInitialize (void)
switch (InitVal->Type)
{
- case ACPI_TYPE_NUMBER:
+ case ACPI_TYPE_INTEGER:
- ObjDesc->Number.Value =
+ ObjDesc->Integer.Value =
(ACPI_INTEGER) STRTOUL (InitVal->Val, NULL, 10);
break;
@@ -322,14 +322,14 @@ UnlockAndExit:
*
* FUNCTION: AcpiNsLookup
*
- * PARAMETERS: PrefixNode - Search scope if name is not fully qualified
+ * PARAMETERS: PrefixNode - Search scope if name is not fully qualified
* Pathname - Search pathname, in internal format
* (as represented in the AML stream)
* Type - Type associated with name
* InterpreterMode - IMODE_LOAD_PASS2 => add name if not found
* Flags - Flags describing the search restrictions
* WalkState - Current state of the walk
- * ReturnNode - Where the Node is placed (if found
+ * ReturnNode - Where the Node is placed (if found
* or created successfully)
*
* RETURN: Status
@@ -352,7 +352,7 @@ AcpiNsLookup (
ACPI_NAMESPACE_NODE **ReturnNode)
{
ACPI_STATUS Status;
- ACPI_NAMESPACE_NODE *PrefixNode;
+ ACPI_NAMESPACE_NODE *PrefixNode;
ACPI_NAMESPACE_NODE *CurrentNode = NULL;
ACPI_NAMESPACE_NODE *ScopeToPush = NULL;
ACPI_NAMESPACE_NODE *ThisNode = NULL;
@@ -361,8 +361,9 @@ AcpiNsLookup (
BOOLEAN NullNamePath = FALSE;
OBJECT_TYPE_INTERNAL TypeToCheckFor;
OBJECT_TYPE_INTERNAL ThisSearchType;
+ UINT32 LocalFlags = Flags & ~NS_ERROR_IF_FOUND;
- DEBUG_ONLY_MEMBERS (UINT32 i)
+ DEBUG_EXEC (UINT32 i;)
FUNCTION_TRACE ("NsLookup");
@@ -605,6 +606,7 @@ AcpiNsLookup (
if (!NumSegments)
{
ThisSearchType = Type;
+ LocalFlags = Flags;
}
/* Pluck one ACPI name from the front of the pathname */
@@ -615,7 +617,7 @@ AcpiNsLookup (
Status = AcpiNsSearchAndEnter (SimpleName, WalkState,
CurrentNode, InterpreterMode,
- ThisSearchType, Flags,
+ ThisSearchType, LocalFlags,
&ThisNode);
if (ACPI_FAILURE (Status))
diff --git a/sys/contrib/dev/acpica/nsalloc.c b/sys/contrib/dev/acpica/nsalloc.c
index 06095a4..3f90752 100644
--- a/sys/contrib/dev/acpica/nsalloc.c
+++ b/sys/contrib/dev/acpica/nsalloc.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nsalloc - Namespace allocation and deletion utilities
- * $Revision: 44 $
+ * $Revision: 45 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/nsdump.c b/sys/contrib/dev/acpica/nsdump.c
index 83fd3ab..eb907a3 100644
--- a/sys/contrib/dev/acpica/nsdump.c
+++ b/sys/contrib/dev/acpica/nsdump.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsdump - table dumping routines for debug
- * $Revision: 83 $
+ * $Revision: 85 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -127,7 +127,7 @@
MODULE_NAME ("nsdump")
-#ifdef ACPI_DEBUG
+#if defined(ACPI_DEBUG) || defined(ENABLE_DEBUGGER)
/****************************************************************************
*
@@ -338,10 +338,10 @@ AcpiNsDumpOneObject (
break;
- case ACPI_TYPE_NUMBER:
+ case ACPI_TYPE_INTEGER:
DEBUG_PRINT_RAW (TRACE_TABLES, (" N:%X\n",
- ((ACPI_OPERAND_OBJECT *) ThisNode->Object)->Number.Value));
+ ((ACPI_OPERAND_OBJECT *) ThisNode->Object)->Integer.Value));
break;
diff --git a/sys/contrib/dev/acpica/nseval.c b/sys/contrib/dev/acpica/nseval.c
index 17b8376..10b1eb4 100644
--- a/sys/contrib/dev/acpica/nseval.c
+++ b/sys/contrib/dev/acpica/nseval.c
@@ -2,7 +2,7 @@
*
* Module Name: nseval - Object evaluation interfaces -- includes control
* method lookup and execution.
- * $Revision: 80 $
+ * $Revision: 81 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/nsinit.c b/sys/contrib/dev/acpica/nsinit.c
index c9e248a..c8b463c 100644
--- a/sys/contrib/dev/acpica/nsinit.c
+++ b/sys/contrib/dev/acpica/nsinit.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsinit - namespace initialization
- * $Revision: 10 $
+ * $Revision: 12 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -391,7 +391,9 @@ AcpiNsInitOneDevice (
Status = AcpiCmExecute_STA (Node, &Flags);
if (ACPI_FAILURE (Status))
{
- return_ACPI_STATUS (Status);
+ /* Ignore error and move on to next device */
+
+ return_ACPI_STATUS (AE_OK);
}
Info->Num_STA++;
@@ -415,21 +417,24 @@ AcpiNsInitOneDevice (
else if (ACPI_FAILURE (Status))
{
+ /* Ignore error and move on to next device */
+
#ifdef ACPI_DEBUG
NATIVE_CHAR *ScopeName = AcpiNsGetTablePathname (ObjHandle);
- DEBUG_PRINT (ACPI_ERROR, ("%s._INI failed: %s\n",
+ DEBUG_PRINT (ACPI_WARN, ("%s._INI failed: %s\n",
ScopeName, AcpiCmFormatException (Status)));
AcpiCmFree (ScopeName);
#endif
- return_ACPI_STATUS (Status);
}
else
{
+ /* Count of successfull INIs */
+
Info->Num_INI++;
}
- return_ACPI_STATUS (Status);
+ return_ACPI_STATUS (AE_OK);
}
diff --git a/sys/contrib/dev/acpica/nsload.c b/sys/contrib/dev/acpica/nsload.c
index ad1dd89..2b49884 100644
--- a/sys/contrib/dev/acpica/nsload.c
+++ b/sys/contrib/dev/acpica/nsload.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsload - namespace loading/expanding/contracting procedures
- * $Revision: 34 $
+ * $Revision: 35 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/nsnames.c b/sys/contrib/dev/acpica/nsnames.c
index babcf56..04662f5 100644
--- a/sys/contrib/dev/acpica/nsnames.c
+++ b/sys/contrib/dev/acpica/nsnames.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nsnames - Name manipulation and search
- * $Revision: 52 $
+ * $Revision: 53 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/nsobject.c b/sys/contrib/dev/acpica/nsobject.c
index c986a83..f0192fb 100644
--- a/sys/contrib/dev/acpica/nsobject.c
+++ b/sys/contrib/dev/acpica/nsobject.c
@@ -2,7 +2,7 @@
*
* Module Name: nsobject - Utilities for objects attached to namespace
* table entries
- * $Revision: 48 $
+ * $Revision: 49 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -316,7 +316,7 @@ AcpiNsAttachObject (
case AML_ZERO_OP: case AML_ONES_OP: case AML_ONE_OP:
case AML_BYTE_OP: case AML_WORD_OP: case AML_DWORD_OP:
- ObjType = ACPI_TYPE_NUMBER;
+ ObjType = ACPI_TYPE_INTEGER;
break;
diff --git a/sys/contrib/dev/acpica/nssearch.c b/sys/contrib/dev/acpica/nssearch.c
index 8c19954..3ecdf4e 100644
--- a/sys/contrib/dev/acpica/nssearch.c
+++ b/sys/contrib/dev/acpica/nssearch.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nssearch - Namespace search
- * $Revision: 61 $
+ * $Revision: 64 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -164,16 +164,26 @@ AcpiNsSearchNode (
FUNCTION_TRACE ("NsSearchNode");
+
+#ifdef ACPI_DEBUG
+ if (TRACE_NAMES & AcpiDbgLevel)
{
- DEBUG_EXEC (NATIVE_CHAR *ScopeName = AcpiNsGetTablePathname (Node));
- DEBUG_PRINT (TRACE_NAMES,
- ("NsSearchNode: Searching %s [%p]\n",
- ScopeName, Node));
- DEBUG_PRINT (TRACE_NAMES,
- ("NsSearchNode: For %4.4s (type %X)\n",
- &TargetName, Type));
- DEBUG_EXEC (AcpiCmFree (ScopeName));
+ NATIVE_CHAR *ScopeName;
+
+ ScopeName = AcpiNsGetTablePathname (Node);
+ if (ScopeName)
+ {
+ DEBUG_PRINT (TRACE_NAMES,
+ ("NsSearchNode: Searching %s [%p]\n",
+ ScopeName, Node));
+ DEBUG_PRINT (TRACE_NAMES,
+ ("NsSearchNode: For %4.4s (type %X)\n",
+ &TargetName, Type));
+
+ AcpiCmFree (ScopeName);
+ }
}
+#endif
/*
@@ -440,6 +450,16 @@ AcpiNsSearchAndEnter (
if (Status != AE_NOT_FOUND)
{
/*
+ * If we found it AND the request specifies that a
+ * find is an error, return the error
+ */
+ if ((Status == AE_OK) &&
+ (Flags & NS_ERROR_IF_FOUND))
+ {
+ Status = AE_EXIST;
+ }
+
+ /*
* Either found it or there was an error
* -- finished either way
*/
diff --git a/sys/contrib/dev/acpica/nsutils.c b/sys/contrib/dev/acpica/nsutils.c
index 45842a9..936843c 100644
--- a/sys/contrib/dev/acpica/nsutils.c
+++ b/sys/contrib/dev/acpica/nsutils.c
@@ -2,7 +2,7 @@
*
* Module Name: nsutils - Utilities for accessing ACPI namespace, accessing
* parents and siblings and Scope manipulation
- * $Revision: 75 $
+ * $Revision: 77 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -932,7 +932,7 @@ AcpiNsFindParentName (
}
-#ifdef ACPI_DEBUG
+#if defined(ACPI_DEBUG) || defined(ENABLE_DEBUGGER)
/****************************************************************************
*
diff --git a/sys/contrib/dev/acpica/nswalk.c b/sys/contrib/dev/acpica/nswalk.c
index c9b1d9d..2244489 100644
--- a/sys/contrib/dev/acpica/nswalk.c
+++ b/sys/contrib/dev/acpica/nswalk.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nswalk - Functions for walking the APCI namespace
- * $Revision: 18 $
+ * $Revision: 19 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/nsxfname.c b/sys/contrib/dev/acpica/nsxfname.c
index 3cdd8f8..257aafd 100644
--- a/sys/contrib/dev/acpica/nsxfname.c
+++ b/sys/contrib/dev/acpica/nsxfname.c
@@ -2,7 +2,7 @@
*
* Module Name: nsxfname - Public interfaces to the ACPI subsystem
* ACPI Namespace oriented interfaces
- * $Revision: 74 $
+ * $Revision: 75 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/nsxfobj.c b/sys/contrib/dev/acpica/nsxfobj.c
index 1509ce0..dd266bf 100644
--- a/sys/contrib/dev/acpica/nsxfobj.c
+++ b/sys/contrib/dev/acpica/nsxfobj.c
@@ -2,7 +2,7 @@
*
* Module Name: nsxfobj - Public interfaces to the ACPI subsystem
* ACPI Object oriented interfaces
- * $Revision: 76 $
+ * $Revision: 78 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/psargs.c b/sys/contrib/dev/acpica/psargs.c
index b802cee..1ea0986 100644
--- a/sys/contrib/dev/acpica/psargs.c
+++ b/sys/contrib/dev/acpica/psargs.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psargs - Parse AML opcode arguments
- * $Revision: 42 $
+ * $Revision: 43 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/psfind.c b/sys/contrib/dev/acpica/psfind.c
index 357c92b..6686d7f 100644
--- a/sys/contrib/dev/acpica/psfind.c
+++ b/sys/contrib/dev/acpica/psfind.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: psfind - Parse tree search routine
- * $Revision: 20 $
+ * $Revision: 21 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/psopcode.c b/sys/contrib/dev/acpica/psopcode.c
index fcc2b77..88e18f6 100644
--- a/sys/contrib/dev/acpica/psopcode.c
+++ b/sys/contrib/dev/acpica/psopcode.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psopcode - Parser opcode information table
- * $Revision: 25 $
+ * $Revision: 27 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -135,7 +135,7 @@
#define _PFX 0x6D
#define _UNKNOWN_OPCODE 0x02 /* An example unknown opcode */
-#define MAX_EXTENDED_OPCODE 0x87
+#define MAX_EXTENDED_OPCODE 0x88
#define NUM_EXTENDED_OPCODE MAX_EXTENDED_OPCODE + 1
#define MAX_INTERNAL_OPCODE
#define NUM_INTERNAL_OPCODE MAX_INTERNAL_OPCODE + 1
@@ -174,9 +174,11 @@
#define ARGP_WORD_OP ARGP_LIST1 (ARGP_WORDDATA)
#define ARGP_DWORD_OP ARGP_LIST1 (ARGP_DWORDDATA)
#define ARGP_STRING_OP ARGP_LIST1 (ARGP_CHARLIST)
+#define ARGP_QWORD_OP ARGP_LIST1 (ARGP_QWORDDATA)
#define ARGP_SCOPE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_TERMLIST)
#define ARGP_BUFFER_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_BYTELIST)
#define ARGP_PACKAGE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_BYTEDATA, ARGP_DATAOBJLIST)
+#define ARGP_VAR_PACKAGE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_BYTEDATA, ARGP_DATAOBJLIST)
#define ARGP_METHOD_OP ARGP_LIST4 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_TERMLIST)
#define ARGP_LOCAL0 ARG_NONE
#define ARGP_LOCAL1 ARG_NONE
@@ -213,6 +215,8 @@
#define ARGP_FIND_SET_LEFT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
#define ARGP_FIND_SET_RIGHT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
#define ARGP_DEREF_OF_OP ARGP_LIST1 (ARGP_TERMARG)
+#define ARGP_CONCAT_RES_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
+#define ARGP_MOD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
#define ARGP_NOTIFY_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_TERMARG)
#define ARGP_SIZE_OF_OP ARGP_LIST1 (ARGP_SUPERNAME)
#define ARGP_INDEX_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
@@ -222,12 +226,21 @@
#define ARGP_BYTE_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
#define ARGP_BIT_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
#define ARGP_TYPE_OP ARGP_LIST1 (ARGP_SUPERNAME)
+#define ARGP_QWORD_FIELD_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
#define ARGP_LAND_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
#define ARGP_LOR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
#define ARGP_LNOT_OP ARGP_LIST1 (ARGP_TERMARG)
#define ARGP_LEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
#define ARGP_LGREATER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
#define ARGP_LLESS_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
+#define ARGP_TO_BUFFER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
+#define ARGP_TO_DEC_STR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
+#define ARGP_TO_HEX_STR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
+#define ARGP_TO_INTEGER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
+#define ARGP_TO_STRING_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
+#define ARGP_COPY_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SIMPLENAME)
+#define ARGP_MID_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
+#define ARGP_CONTINUE_OP ARG_NONE
#define ARGP_IF_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_TERMLIST)
#define ARGP_ELSE_OP ARGP_LIST2 (ARGP_PKGLENGTH, ARGP_TERMLIST)
#define ARGP_WHILE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_TERMLIST)
@@ -240,6 +253,7 @@
#define ARGP_EVENT_OP ARGP_LIST1 (ARGP_NAME)
#define ARGP_COND_REF_OF_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SUPERNAME)
#define ARGP_CREATE_FIELD_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_NAME)
+#define ARGP_LOAD_TABLE_OP ARGP_LIST6 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG)
#define ARGP_LOAD_OP ARGP_LIST2 (ARGP_NAMESTRING, ARGP_SUPERNAME)
#define ARGP_STALL_OP ARGP_LIST1 (ARGP_TERMARG)
#define ARGP_SLEEP_OP ARGP_LIST1 (ARGP_TERMARG)
@@ -262,6 +276,7 @@
#define ARGP_THERMAL_ZONE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_OBJLIST)
#define ARGP_INDEX_FIELD_OP ARGP_LIST5 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_NAMESTRING,ARGP_BYTEDATA, ARGP_FIELDLIST)
#define ARGP_BANK_FIELD_OP ARGP_LIST6 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_NAMESTRING,ARGP_TERMARG, ARGP_BYTEDATA, ARGP_FIELDLIST)
+#define ARGP_DATA_REGION_OP ARGP_LIST4 (ARGP_NAMESTRING, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG)
#define ARGP_LNOTEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
#define ARGP_LLESSEQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
#define ARGP_LGREATEREQUAL_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TERMARG)
@@ -278,7 +293,7 @@
* All AML opcodes and the runtime arguments for each. Used by the AML interpreter Each list is compressed
* into a 32-bit number and stored in the master opcode table at the end of this file.
*
- * (Used by AcpiAmlPrepOperands procedure)
+ * (Used by AcpiAmlPrepOperands procedure and the ASL Compiler)
*/
#define ARGI_ZERO_OP ARG_NONE
@@ -289,9 +304,11 @@
#define ARGI_WORD_OP ARGI_INVALID_OPCODE
#define ARGI_DWORD_OP ARGI_INVALID_OPCODE
#define ARGI_STRING_OP ARGI_INVALID_OPCODE
+#define ARGI_QWORD_OP ARGI_INVALID_OPCODE
#define ARGI_SCOPE_OP ARGI_INVALID_OPCODE
#define ARGI_BUFFER_OP ARGI_INVALID_OPCODE
#define ARGI_PACKAGE_OP ARGI_INVALID_OPCODE
+#define ARGI_VAR_PACKAGE_OP ARGI_INVALID_OPCODE
#define ARGI_METHOD_OP ARGI_INVALID_OPCODE
#define ARGI_LOCAL0 ARG_NONE
#define ARGI_LOCAL1 ARG_NONE
@@ -309,40 +326,51 @@
#define ARGI_ARG5 ARG_NONE
#define ARGI_ARG6 ARG_NONE
#define ARGI_STORE_OP ARGI_LIST2 (ARGI_ANYTYPE, ARGI_TARGETREF)
-#define ARGI_REF_OF_OP ARGI_LIST1 (ARGI_REFERENCE)
-#define ARGI_ADD_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_CONCAT_OP ARGI_LIST3 (ARGI_STRING, ARGI_STRING, ARGI_TARGETREF)
-#define ARGI_SUBTRACT_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_INCREMENT_OP ARGI_LIST1 (ARGI_REFERENCE)
-#define ARGI_DECREMENT_OP ARGI_LIST1 (ARGI_REFERENCE)
-#define ARGI_MULTIPLY_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_DIVIDE_OP ARGI_LIST4 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF, ARGI_TARGETREF)
-#define ARGI_SHIFT_LEFT_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_SHIFT_RIGHT_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_BIT_AND_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_BIT_NAND_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_BIT_OR_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_BIT_NOR_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_BIT_XOR_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_BIT_NOT_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_FIND_SET_LEFT_BIT_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_FIND_SET_RIGHT_BIT_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_TARGETREF)
+#define ARGI_REF_OF_OP ARGI_LIST1 (ARGI_OBJECT_REF)
+#define ARGI_ADD_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_CONCAT_OP ARGI_LIST3 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA, ARGI_TARGETREF)
+#define ARGI_SUBTRACT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_INCREMENT_OP ARGI_LIST1 (ARGI_INTEGER_REF)
+#define ARGI_DECREMENT_OP ARGI_LIST1 (ARGI_INTEGER_REF)
+#define ARGI_MULTIPLY_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_DIVIDE_OP ARGI_LIST4 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF, ARGI_TARGETREF)
+#define ARGI_SHIFT_LEFT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_SHIFT_RIGHT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_BIT_AND_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_BIT_NAND_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_BIT_OR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_BIT_NOR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_BIT_XOR_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_BIT_NOT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_FIND_SET_LEFT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_FIND_SET_RIGHT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
#define ARGI_DEREF_OF_OP ARGI_LIST1 (ARGI_REFERENCE)
-#define ARGI_NOTIFY_OP ARGI_LIST2 (ARGI_REFERENCE, ARGI_NUMBER)
+#define ARGI_CONCAT_RES_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_BUFFER, ARGI_TARGETREF)
+#define ARGI_MOD_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_NOTIFY_OP ARGI_LIST2 (ARGI_DEVICE_REF, ARGI_INTEGER)
#define ARGI_SIZE_OF_OP ARGI_LIST1 (ARGI_DATAOBJECT)
-#define ARGI_INDEX_OP ARGI_LIST3 (ARGI_COMPLEXOBJ, ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_MATCH_OP ARGI_LIST6 (ARGI_PACKAGE, ARGI_NUMBER, ARGI_NUMBER, ARGI_NUMBER, ARGI_NUMBER, ARGI_NUMBER)
-#define ARGI_DWORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_NUMBER, ARGI_REFERENCE)
-#define ARGI_WORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_NUMBER, ARGI_REFERENCE)
-#define ARGI_BYTE_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_NUMBER, ARGI_REFERENCE)
-#define ARGI_BIT_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_NUMBER, ARGI_REFERENCE)
+#define ARGI_INDEX_OP ARGI_LIST3 (ARGI_COMPLEXOBJ, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_MATCH_OP ARGI_LIST6 (ARGI_PACKAGE, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER)
+#define ARGI_DWORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
+#define ARGI_WORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
+#define ARGI_BYTE_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
+#define ARGI_BIT_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
#define ARGI_TYPE_OP ARGI_LIST1 (ARGI_ANYTYPE)
-#define ARGI_LAND_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_NUMBER)
-#define ARGI_LOR_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_NUMBER)
-#define ARGI_LNOT_OP ARGI_LIST1 (ARGI_NUMBER)
-#define ARGI_LEQUAL_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_NUMBER)
-#define ARGI_LGREATER_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_NUMBER)
-#define ARGI_LLESS_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_NUMBER)
+#define ARGI_QWORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
+#define ARGI_LAND_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
+#define ARGI_LOR_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
+#define ARGI_LNOT_OP ARGI_LIST1 (ARGI_INTEGER)
+#define ARGI_LEQUAL_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
+#define ARGI_LGREATER_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
+#define ARGI_LLESS_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
+#define ARGI_TO_BUFFER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
+#define ARGI_TO_DEC_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
+#define ARGI_TO_HEX_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
+#define ARGI_TO_INTEGER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
+#define ARGI_TO_STRING_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_FIXED_TARGET)
+#define ARGI_COPY_OP ARGI_LIST2 (ARGI_ANYTYPE, ARGI_SIMPLE_TARGET)
+#define ARGI_MID_OP ARGI_LIST4 (ARGI_BUFFERSTRING,ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_CONTINUE_OP ARGI_INVALID_OPCODE
#define ARGI_IF_OP ARGI_INVALID_OPCODE
#define ARGI_ELSE_OP ARGI_INVALID_OPCODE
#define ARGI_WHILE_OP ARGI_INVALID_OPCODE
@@ -353,23 +381,24 @@
#define ARGI_ONES_OP ARG_NONE
#define ARGI_MUTEX_OP ARGI_INVALID_OPCODE
#define ARGI_EVENT_OP ARGI_INVALID_OPCODE
-#define ARGI_COND_REF_OF_OP ARGI_LIST2 (ARGI_REFERENCE, ARGI_TARGETREF)
-#define ARGI_CREATE_FIELD_OP ARGI_LIST4 (ARGI_BUFFER, ARGI_NUMBER, ARGI_NUMBER, ARGI_REFERENCE)
+#define ARGI_COND_REF_OF_OP ARGI_LIST2 (ARGI_OBJECT_REF, ARGI_TARGETREF)
+#define ARGI_CREATE_FIELD_OP ARGI_LIST4 (ARGI_BUFFER, ARGI_INTEGER, ARGI_INTEGER, ARGI_REFERENCE)
+#define ARGI_LOAD_TABLE_OP ARGI_LIST6 (ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_TARGETREF)
#define ARGI_LOAD_OP ARGI_LIST2 (ARGI_REGION, ARGI_TARGETREF)
-#define ARGI_STALL_OP ARGI_LIST1 (ARGI_NUMBER)
-#define ARGI_SLEEP_OP ARGI_LIST1 (ARGI_NUMBER)
-#define ARGI_ACQUIRE_OP ARGI_LIST2 (ARGI_MUTEX, ARGI_NUMBER)
+#define ARGI_STALL_OP ARGI_LIST1 (ARGI_INTEGER)
+#define ARGI_SLEEP_OP ARGI_LIST1 (ARGI_INTEGER)
+#define ARGI_ACQUIRE_OP ARGI_LIST2 (ARGI_MUTEX, ARGI_INTEGER)
#define ARGI_SIGNAL_OP ARGI_LIST1 (ARGI_EVENT)
-#define ARGI_WAIT_OP ARGI_LIST2 (ARGI_EVENT, ARGI_NUMBER)
+#define ARGI_WAIT_OP ARGI_LIST2 (ARGI_EVENT, ARGI_INTEGER)
#define ARGI_RESET_OP ARGI_LIST1 (ARGI_EVENT)
#define ARGI_RELEASE_OP ARGI_LIST1 (ARGI_MUTEX)
-#define ARGI_FROM_BCD_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_TARGETREF)
-#define ARGI_TO_BCD_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_TARGETREF)
+#define ARGI_FROM_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
+#define ARGI_TO_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_FIXED_TARGET)
#define ARGI_UNLOAD_OP ARGI_LIST1 (ARGI_DDBHANDLE)
#define ARGI_REVISION_OP ARG_NONE
#define ARGI_DEBUG_OP ARG_NONE
-#define ARGI_FATAL_OP ARGI_LIST3 (ARGI_NUMBER, ARGI_NUMBER, ARGI_NUMBER)
-#define ARGI_REGION_OP ARGI_LIST2 (ARGI_NUMBER, ARGI_NUMBER)
+#define ARGI_FATAL_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER)
+#define ARGI_REGION_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
#define ARGI_DEF_FIELD_OP ARGI_INVALID_OPCODE
#define ARGI_DEVICE_OP ARGI_INVALID_OPCODE
#define ARGI_PROCESSOR_OP ARGI_INVALID_OPCODE
@@ -377,6 +406,7 @@
#define ARGI_THERMAL_ZONE_OP ARGI_INVALID_OPCODE
#define ARGI_INDEX_FIELD_OP ARGI_INVALID_OPCODE
#define ARGI_BANK_FIELD_OP ARGI_INVALID_OPCODE
+#define ARGI_DATA_REGION_OP ARGI_LIST3 (ARGI_STRING, ARGI_STRING, ARGI_STRING)
#define ARGI_LNOTEQUAL_OP ARGI_INVALID_OPCODE
#define ARGI_LLESSEQUAL_OP ARGI_INVALID_OPCODE
#define ARGI_LGREATEREQUAL_OP ARGI_INVALID_OPCODE
@@ -398,8 +428,8 @@ static ACPI_OPCODE_INFO AmlOpInfo[] =
{
/* Index Opcode Type Class Has Arguments? Name Parser Args Interpreter Args */
-/* 00 */ /* AML_ZERO_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "ZeroOp", ARGP_ZERO_OP, ARGI_ZERO_OP),
-/* 01 */ /* AML_ONE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "OneOp", ARGP_ONE_OP, ARGI_ONE_OP),
+/* 00 */ /* AML_ZERO_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "Zero", ARGP_ZERO_OP, ARGI_ZERO_OP),
+/* 01 */ /* AML_ONE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "One", ARGP_ONE_OP, ARGI_ONE_OP),
/* 02 */ /* AML_ALIAS_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Alias", ARGP_ALIAS_OP, ARGI_ALIAS_OP),
/* 03 */ /* AML_NAME_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Name", ARGP_NAME_OP, ARGI_NAME_OP),
/* 04 */ /* AML_BYTE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "ByteConst", ARGP_BYTE_OP, ARGI_BYTE_OP),
@@ -428,7 +458,7 @@ static ACPI_OPCODE_INFO AmlOpInfo[] =
/* 1B */ /* AML_STORE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "Store", ARGP_STORE_OP, ARGI_STORE_OP),
/* 1C */ /* AML_REF_OF_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "RefOf", ARGP_REF_OF_OP, ARGI_REF_OF_OP),
/* 1D */ /* AML_ADD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Add", ARGP_ADD_OP, ARGI_ADD_OP),
-/* 1E */ /* AML_CONCAT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Concat", ARGP_CONCAT_OP, ARGI_CONCAT_OP),
+/* 1E */ /* AML_CONCAT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Concatenate", ARGP_CONCAT_OP, ARGI_CONCAT_OP),
/* 1F */ /* AML_SUBTRACT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Subtract", ARGP_SUBTRACT_OP, ARGI_SUBTRACT_OP),
/* 20 */ /* AML_INCREMENT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "Increment", ARGP_INCREMENT_OP, ARGI_INCREMENT_OP),
/* 21 */ /* AML_DECREMENT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2| AML_HAS_ARGS, "Decrement", ARGP_DECREMENT_OP, ARGI_DECREMENT_OP),
@@ -467,7 +497,7 @@ static ACPI_OPCODE_INFO AmlOpInfo[] =
/* 42 */ /* AML_RETURN_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_HAS_ARGS, "Return", ARGP_RETURN_OP, ARGI_RETURN_OP),
/* 43 */ /* AML_BREAK_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_NO_ARGS, "Break", ARGP_BREAK_OP, ARGI_BREAK_OP),
/* 44 */ /* AML_BREAK_POINT_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_NO_ARGS, "BreakPoint", ARGP_BREAK_POINT_OP, ARGI_BREAK_POINT_OP),
-/* 45 */ /* AML_ONES_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "OnesOp", ARGP_ONES_OP, ARGI_ONES_OP),
+/* 45 */ /* AML_ONES_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONSTANT| AML_NO_ARGS, "Ones", ARGP_ONES_OP, ARGI_ONES_OP),
/* Prefixed opcodes (Two-byte opcodes with a prefix op) */
@@ -493,7 +523,7 @@ static ACPI_OPCODE_INFO AmlOpInfo[] =
/* 59 */ /* AML_DEF_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Field", ARGP_DEF_FIELD_OP, ARGI_DEF_FIELD_OP),
/* 5A */ /* AML_DEVICE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Device", ARGP_DEVICE_OP, ARGI_DEVICE_OP),
/* 5B */ /* AML_PROCESSOR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "Processor", ARGP_PROCESSOR_OP, ARGI_PROCESSOR_OP),
-/* 5C */ /* AML_POWER_RES_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "PowerRes", ARGP_POWER_RES_OP, ARGI_POWER_RES_OP),
+/* 5C */ /* AML_POWER_RES_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "PowerResource", ARGP_POWER_RES_OP, ARGI_POWER_RES_OP),
/* 5D */ /* AML_THERMAL_ZONE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "ThermalZone", ARGP_THERMAL_ZONE_OP, ARGI_THERMAL_ZONE_OP),
/* 5E */ /* AML_INDEX_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "IndexField", ARGP_INDEX_FIELD_OP, ARGI_INDEX_FIELD_OP),
/* 5F */ /* AML_BANK_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_NAMED_OBJECT| AML_HAS_ARGS, "BankField", ARGP_BANK_FIELD_OP, ARGI_BANK_FIELD_OP),
@@ -514,6 +544,26 @@ static ACPI_OPCODE_INFO AmlOpInfo[] =
/* 6B */ /* UNKNOWN OPCODES */ OP_INFO_ENTRY (ACPI_OP_TYPE_UNKNOWN | OPTYPE_BOGUS| AML_HAS_ARGS, "UNKNOWN_OP!", ARG_NONE, ARG_NONE),
/* 6C */ /* ASCII CHARACTERS */ OP_INFO_ENTRY (ACPI_OP_TYPE_ASCII | OPTYPE_BOGUS| AML_HAS_ARGS, "ASCII_ONLY!", ARG_NONE, ARG_NONE),
/* 6D */ /* PREFIX CHARACTERS */ OP_INFO_ENTRY (ACPI_OP_TYPE_PREFIX | OPTYPE_BOGUS| AML_HAS_ARGS, "PREFIX_ONLY!", ARG_NONE, ARG_NONE),
+
+
+/* ACPI 2.0 (new) opcodes */
+
+/* 6E */ /* AML_QWORD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_LITERAL| AML_NO_ARGS, "QwordConst", ARGP_QWORD_OP, ARGI_QWORD_OP),
+/* 6F */ /* AML_VAR_PACKAGE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DATA_TERM| AML_HAS_ARGS, "VarPackage", ARGP_VAR_PACKAGE_OP, ARGI_VAR_PACKAGE_OP),
+/* 70 */ /* AML_CONCAT_RES_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "ConcatRes", ARGP_CONCAT_RES_OP, ARGI_CONCAT_RES_OP),
+/* 71 */ /* AML_MOD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_DYADIC2R| AML_HAS_ARGS, "Mod", ARGP_MOD_OP, ARGI_MOD_OP),
+/* 72 */ /* AML_QWORD_FIELD_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CREATE_FIELD| AML_HAS_ARGS, "CreateQWordField", ARGP_QWORD_FIELD_OP, ARGI_QWORD_FIELD_OP),
+/* 73 */ /* AML_TO_BUFFER_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "ToBuffer", ARGP_TO_BUFFER_OP, ARGI_TO_BUFFER_OP),
+/* 74 */ /* AML_TO_DEC_STR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "ToDecString", ARGP_TO_DEC_STR_OP, ARGI_TO_DEC_STR_OP),
+/* 75 */ /* AML_TO_HEX_STR_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "ToHexString", ARGP_TO_HEX_STR_OP, ARGI_TO_HEX_STR_OP),
+/* 76 */ /* AML_TO_INTEGER_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "ToInteger", ARGP_TO_INTEGER_OP, ARGI_TO_INTEGER_OP),
+/* 77 */ /* AML_TO_STRING_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "ToString", ARGP_TO_STRING_OP, ARGI_TO_STRING_OP),
+/* 78 */ /* AML_COPY_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "Copy", ARGP_COPY_OP, ARGI_COPY_OP),
+/* 79 */ /* AML_MID_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "Mid", ARGP_MID_OP, ARGI_MID_OP),
+/* 7A */ /* AML_CONTINUE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_CONTROL| AML_NO_ARGS, "Continue", ARGP_CONTINUE_OP, ARGI_CONTINUE_OP),
+/* 7B */ /* AML_LOAD_TABLE_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "LoadTable", ARGP_LOAD_TABLE_OP, ARGI_LOAD_TABLE_OP),
+/* 7C */ /* AML_DATA_REGION_OP */ OP_INFO_ENTRY (ACPI_OP_TYPE_OPCODE | OPTYPE_MONADIC2R| AML_HAS_ARGS, "DataOpRegion", ARGP_DATA_REGION_OP, ARGI_DATA_REGION_OP),
+
};
/*
@@ -524,9 +574,10 @@ static ACPI_OPCODE_INFO AmlOpInfo[] =
static UINT8 AmlShortOpInfoIndex[256] =
{
/* 0 1 2 3 4 5 6 7 */
+/* 8 9 A B C D E F */
/* 0x00 */ 0x00, 0x01, _UNK, _UNK, _UNK, _UNK, 0x02, _UNK,
-/* 0x08 */ 0x03, _UNK, 0x04, 0x05, 0x06, 0x07, _UNK, _UNK,
-/* 0x10 */ 0x08, 0x09, 0x0a, _UNK, 0x0b, _UNK, _UNK, _UNK,
+/* 0x08 */ 0x03, _UNK, 0x04, 0x05, 0x06, 0x07, 0x6E, _UNK,
+/* 0x10 */ 0x08, 0x09, 0x0a, 0x6F, 0x0b, _UNK, _UNK, _UNK,
/* 0x18 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
/* 0x20 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
/* 0x28 */ _UNK, _UNK, _UNK, _UNK, _UNK, 0x63, _PFX, _PFX,
@@ -540,10 +591,10 @@ static UINT8 AmlShortOpInfoIndex[256] =
/* 0x68 */ 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, _UNK,
/* 0x70 */ 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22,
/* 0x78 */ 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a,
-/* 0x80 */ 0x2b, 0x2c, 0x2d, 0x2e, _UNK, _UNK, 0x2f, 0x30,
-/* 0x88 */ 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, _UNK,
-/* 0x90 */ 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, _UNK, _UNK,
-/* 0x98 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
+/* 0x80 */ 0x2b, 0x2c, 0x2d, 0x2e, 0x70, 0x71, 0x2f, 0x30,
+/* 0x88 */ 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x72,
+/* 0x90 */ 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x73, 0x74,
+/* 0x98 */ 0x75, 0x76, _UNK, _UNK, 0x77, 0x78, 0x79, 0x7A,
/* 0xA0 */ 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x43, 0x60, 0x61,
/* 0xA8 */ 0x62, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
/* 0xB0 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
@@ -562,10 +613,11 @@ static UINT8 AmlShortOpInfoIndex[256] =
static UINT8 AmlLongOpInfoIndex[NUM_EXTENDED_OPCODE] =
{
/* 0 1 2 3 4 5 6 7 */
+/* 8 9 A B C D E F */
/* 0x00 */ _UNK, 0x46, 0x47, _UNK, _UNK, _UNK, _UNK, _UNK,
/* 0x08 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
/* 0x10 */ _UNK, _UNK, 0x48, 0x49, _UNK, _UNK, _UNK, _UNK,
-/* 0x18 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
+/* 0x18 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 0x7B,
/* 0x20 */ 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51,
/* 0x28 */ 0x52, 0x53, 0x54, _UNK, _UNK, _UNK, _UNK, _UNK,
/* 0x30 */ 0x55, 0x56, 0x57, _UNK, _UNK, _UNK, _UNK, _UNK,
@@ -579,13 +631,10 @@ static UINT8 AmlLongOpInfoIndex[NUM_EXTENDED_OPCODE] =
/* 0x70 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
/* 0x78 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
/* 0x80 */ 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
+/* 0x88 */ 0x7C,
};
-/* 0 1 2 3 4 5 6 7 */
-/* 0x00 */
-
-
/*******************************************************************************
*
* FUNCTION: AcpiPsGetOpcodeInfo
diff --git a/sys/contrib/dev/acpica/psparse.c b/sys/contrib/dev/acpica/psparse.c
index e33df3f..78443bc 100644
--- a/sys/contrib/dev/acpica/psparse.c
+++ b/sys/contrib/dev/acpica/psparse.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psparse - Parser top level AML parse routines
- * $Revision: 71 $
+ * $Revision: 74 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -658,13 +658,22 @@ AcpiPsParseLoop (
*/
Status = AcpiDsGetPredicateValue (WalkState, NULL, TRUE);
- if (Status == AE_AML_NO_OPERAND)
+ if (ACPI_FAILURE (Status) &&
+ ((Status & AE_CODE_MASK) != AE_CODE_CONTROL))
{
+ if (Status == AE_AML_NO_RETURN_VALUE)
+ {
+ DEBUG_PRINT (ACPI_ERROR,
+ ("PsParseLoop: Invoked method did not return a value, %s\n",
+ AcpiCmFormatException (Status)));
+
+ }
DEBUG_PRINT (ACPI_ERROR,
- ("PsParseLoop: Invoked method did not return a value, %s\n",
+ ("PsParseLoop: GetPredicate Failed, %s\n",
AcpiCmFormatException (Status)));
-
+ return_ACPI_STATUS (Status);
}
+
Status = AcpiPsNextParseState (WalkState, Op, Status);
}
diff --git a/sys/contrib/dev/acpica/psscope.c b/sys/contrib/dev/acpica/psscope.c
index 0c10913..5e91b74 100644
--- a/sys/contrib/dev/acpica/psscope.c
+++ b/sys/contrib/dev/acpica/psscope.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psscope - Parser scope stack management routines
- * $Revision: 23 $
+ * $Revision: 24 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/pstree.c b/sys/contrib/dev/acpica/pstree.c
index 26cbc82..2f7cf49 100644
--- a/sys/contrib/dev/acpica/pstree.c
+++ b/sys/contrib/dev/acpica/pstree.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: pstree - Parser op tree manipulation/traversal/search
- * $Revision: 26 $
+ * $Revision: 27 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/psutils.c b/sys/contrib/dev/acpica/psutils.c
index ef1e27d..e49b9a1 100644
--- a/sys/contrib/dev/acpica/psutils.c
+++ b/sys/contrib/dev/acpica/psutils.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psutils - Parser miscellaneous utilities (Parser only)
- * $Revision: 31 $
+ * $Revision: 32 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/pswalk.c b/sys/contrib/dev/acpica/pswalk.c
index f549c57..e3a0f70 100644
--- a/sys/contrib/dev/acpica/pswalk.c
+++ b/sys/contrib/dev/acpica/pswalk.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: pswalk - Parser routines to walk parsed op tree(s)
- * $Revision: 51 $
+ * $Revision: 52 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/psxface.c b/sys/contrib/dev/acpica/psxface.c
index d3e5e22..00248b1 100644
--- a/sys/contrib/dev/acpica/psxface.c
+++ b/sys/contrib/dev/acpica/psxface.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psxface - Parser external interfaces
- * $Revision: 38 $
+ * $Revision: 40 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -227,6 +227,12 @@ AcpiPsxExecute (
return_ACPI_STATUS (AE_NO_MEMORY);
}
+
+ /* Init new op with the method name and pointer back to the NS node */
+
+ AcpiPsSetName (Op, MethodNode->Name);
+ Op->Node = MethodNode;
+
/*
* The walk of the parse tree is where we actually execute the method
*/
diff --git a/sys/contrib/dev/acpica/rsaddr.c b/sys/contrib/dev/acpica/rsaddr.c
index d2c2dbe..546ff9b 100644
--- a/sys/contrib/dev/acpica/rsaddr.c
+++ b/sys/contrib/dev/acpica/rsaddr.c
@@ -4,7 +4,7 @@
* AcpiRsAddress16Stream
* AcpiRsAddress32Resource
* AcpiRsAddress32Stream
- * $Revision: 13 $
+ * $Revision: 14 $
*
******************************************************************************/
@@ -12,7 +12,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/rscalc.c b/sys/contrib/dev/acpica/rscalc.c
index 1f11325..9053fa3 100644
--- a/sys/contrib/dev/acpica/rscalc.c
+++ b/sys/contrib/dev/acpica/rscalc.c
@@ -2,7 +2,7 @@
*
* Module Name: rscalc - AcpiRsCalculateByteStreamLength
* AcpiRsCalculateListLength
- * $Revision: 17 $
+ * $Revision: 18 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/rscreate.c b/sys/contrib/dev/acpica/rscreate.c
index ed3e871..093b7a4 100644
--- a/sys/contrib/dev/acpica/rscreate.c
+++ b/sys/contrib/dev/acpica/rscreate.c
@@ -3,7 +3,7 @@
* Module Name: rscreate - AcpiRsCreateResourceList
* AcpiRsCreatePciRoutingTable
* AcpiRsCreateByteStream
- * $Revision: 23 $
+ * $Revision: 24 $
*
******************************************************************************/
@@ -11,7 +11,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -341,10 +341,10 @@ AcpiRsCreatePciRoutingTable (
/*
* Dereference the Address
*/
- if (ACPI_TYPE_NUMBER == (*SubObjectList)->Common.Type)
+ if (ACPI_TYPE_INTEGER == (*SubObjectList)->Common.Type)
{
UserPrt->Data.Address =
- (*SubObjectList)->Number.Value;
+ (*SubObjectList)->Integer.Value;
}
else
@@ -357,10 +357,10 @@ AcpiRsCreatePciRoutingTable (
*/
SubObjectList++;
- if (ACPI_TYPE_NUMBER == (*SubObjectList)->Common.Type)
+ if (ACPI_TYPE_INTEGER == (*SubObjectList)->Common.Type)
{
UserPrt->Data.Pin =
- (UINT32) (*SubObjectList)->Number.Value;
+ (UINT32) (*SubObjectList)->Integer.Value;
}
else
@@ -391,7 +391,7 @@ AcpiRsCreatePciRoutingTable (
* is NULL, since the entire buffer was zeroed
* out, we can leave this alone.
*/
- if (ACPI_TYPE_NUMBER == (*SubObjectList)->Common.Type)
+ if (ACPI_TYPE_INTEGER == (*SubObjectList)->Common.Type)
{
/*
* Add to the Length field the length of
@@ -415,10 +415,10 @@ AcpiRsCreatePciRoutingTable (
*/
SubObjectList++;
- if (ACPI_TYPE_NUMBER == (*SubObjectList)->Common.Type)
+ if (ACPI_TYPE_INTEGER == (*SubObjectList)->Common.Type)
{
UserPrt->Data.SourceIndex =
- (UINT32) (*SubObjectList)->Number.Value;
+ (UINT32) (*SubObjectList)->Integer.Value;
}
else
diff --git a/sys/contrib/dev/acpica/rsdump.c b/sys/contrib/dev/acpica/rsdump.c
index 03480d8..94d28b9 100644
--- a/sys/contrib/dev/acpica/rsdump.c
+++ b/sys/contrib/dev/acpica/rsdump.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsdump - Functions do dump out the resource structures.
- * $Revision: 14 $
+ * $Revision: 15 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/rsio.c b/sys/contrib/dev/acpica/rsio.c
index bdba47f..9244f58 100644
--- a/sys/contrib/dev/acpica/rsio.c
+++ b/sys/contrib/dev/acpica/rsio.c
@@ -6,7 +6,7 @@
* AcpiRsFixedIoStream
* AcpiRsDmaResource
* AcpiRsDmaStream
- * $Revision: 11 $
+ * $Revision: 12 $
*
******************************************************************************/
@@ -14,7 +14,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/rsirq.c b/sys/contrib/dev/acpica/rsirq.c
index 4ab2a96..586195e 100644
--- a/sys/contrib/dev/acpica/rsirq.c
+++ b/sys/contrib/dev/acpica/rsirq.c
@@ -4,7 +4,7 @@
* AcpiRsIrqStream
* AcpiRsExtendedIrqResource
* AcpiRsExtendedIrqStream
- * $Revision: 12 $
+ * $Revision: 13 $
*
******************************************************************************/
@@ -12,7 +12,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/rslist.c b/sys/contrib/dev/acpica/rslist.c
index 890457a..0647d63 100644
--- a/sys/contrib/dev/acpica/rslist.c
+++ b/sys/contrib/dev/acpica/rslist.c
@@ -2,7 +2,7 @@
*
* Module Name: rslist - AcpiRsByteStreamToList
* AcpiListToByteStream
- * $Revision: 9 $
+ * $Revision: 10 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/rsmemory.c b/sys/contrib/dev/acpica/rsmemory.c
index 3228d3d..21af073 100644
--- a/sys/contrib/dev/acpica/rsmemory.c
+++ b/sys/contrib/dev/acpica/rsmemory.c
@@ -6,7 +6,7 @@
* AcpiRsFixedMemory32Resource
* AcpiRsMemory32RangeStream
* AcpiRsFixedMemory32Stream
- * $Revision: 11 $
+ * $Revision: 12 $
*
******************************************************************************/
@@ -14,7 +14,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/rsmisc.c b/sys/contrib/dev/acpica/rsmisc.c
index 144c26b..2336ab9 100644
--- a/sys/contrib/dev/acpica/rsmisc.c
+++ b/sys/contrib/dev/acpica/rsmisc.c
@@ -8,7 +8,7 @@
* AcpiRsEndDependentFunctionsResource
* AcpiRsStartDependentFunctionsStream
* AcpiRsEndDependentFunctionsStream
- * $Revision: 11 $
+ * $Revision: 12 $
*
******************************************************************************/
@@ -16,7 +16,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/rsutils.c b/sys/contrib/dev/acpica/rsutils.c
index 7346311..fb14be3 100644
--- a/sys/contrib/dev/acpica/rsutils.c
+++ b/sys/contrib/dev/acpica/rsutils.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsutils - Utilities for the resource manager
- * $Revision: 13 $
+ * $Revision: 14 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/rsxface.c b/sys/contrib/dev/acpica/rsxface.c
index e99c261..fa7c7cf 100644
--- a/sys/contrib/dev/acpica/rsxface.c
+++ b/sys/contrib/dev/acpica/rsxface.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsxface - Public interfaces to the ACPI subsystem
- * $Revision: 9 $
+ * $Revision: 10 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/tbconvrt.c b/sys/contrib/dev/acpica/tbconvrt.c
index 2b439f0..c298c35 100644
--- a/sys/contrib/dev/acpica/tbconvrt.c
+++ b/sys/contrib/dev/acpica/tbconvrt.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbconvrt - ACPI Table conversion utilities
- * $Revision: 16 $
+ * $Revision: 19 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -139,7 +139,7 @@
a.RegisterBitWidth = (UINT8) MUL_8 (b);\
a.RegisterBitOffset = 0;\
a.Reserved = 0;\
- a.Address = (UINT64) c;}
+ ACPI_STORE_ADDRESS (a.Address,c);}
/* ACPI V1.0 entries -- address space is always I/O */
@@ -222,8 +222,8 @@ AcpiTbConvertToXsdt (
NewTable->TableOffsetEntry[i] =
((RSDT_DESCRIPTOR_REV071 *) TableInfo->Pointer)->TableOffsetEntry[i];
#else
- NewTable->TableOffsetEntry[i] =
- ((RSDT_DESCRIPTOR_REV1 *) TableInfo->Pointer)->TableOffsetEntry[i];
+ ACPI_STORE_ADDRESS (NewTable->TableOffsetEntry[i],
+ ((RSDT_DESCRIPTOR_REV1 *) TableInfo->Pointer)->TableOffsetEntry[i]);
#endif
}
else
@@ -415,11 +415,11 @@ AcpiTbConvertTableFadt (void)
/* No 0.71 equivalence. Leave pre-zeroed. */
/* FADT2->FlushStride = 0; */
- /* Processor’s duty cycle index in processor's P_CNT reg*/
+ /* Processor's duty cycle index in processor's P_CNT reg*/
/* No 0.71 equivalence. Leave pre-zeroed. */
/* FADT2->DutyOffset = 0; */
- /* Processor’s duty cycle value bit width in P_CNT register.*/
+ /* Processor's duty cycle value bit width in P_CNT register.*/
/* No 0.71 equivalence. Leave pre-zeroed. */
/* FADT2->DutyWidth = 0; */
@@ -487,8 +487,8 @@ AcpiTbConvertTableFadt (void)
/* Convert table pointers to 64-bit fields */
- FADT2->XFirmwareCtrl = (UINT64) FADT1->FirmwareCtrl;
- FADT2->XDsdt = (UINT64) FADT1->Dsdt;
+ ACPI_STORE_ADDRESS (FADT2->XFirmwareCtrl, FADT1->FirmwareCtrl);
+ ACPI_STORE_ADDRESS (FADT2->XDsdt, FADT1->Dsdt);
/* System Interrupt Model isn't used in ACPI 2.0*/
/* FADT2->Reserved1 = 0; */
@@ -551,6 +551,7 @@ AcpiTbConvertTableFadt (void)
* Global FADT pointer will point to the common V2.0 FADT
*/
AcpiGbl_FADT = FADT2;
+ AcpiGbl_FADT->header.Length = sizeof (FADT_DESCRIPTOR);
/* Free the original table */
@@ -567,17 +568,12 @@ AcpiTbConvertTableFadt (void)
TableDesc->Length = sizeof (FADT_DESCRIPTOR_REV2);
- /* Dump the FADT Header */
-
- DEBUG_PRINT (TRACE_TABLES, ("Hex dump of FADT Header:\n"));
- DUMP_BUFFER ((UINT8 *) AcpiGbl_FADT, sizeof (ACPI_TABLE_HEADER));
-
/* Dump the entire FADT */
DEBUG_PRINT (TRACE_TABLES,
- ("Hex dump of FADT (After header), size %d (%X)\n",
+ ("Hex dump of common internal FADT, size %ld (%lX)\n",
AcpiGbl_FADT->header.Length, AcpiGbl_FADT->header.Length));
- DUMP_BUFFER ((UINT8 *) (&AcpiGbl_FADT->V1_FirmwareCtrl), AcpiGbl_FADT->header.Length);
+ DUMP_BUFFER ((UINT8 *) (AcpiGbl_FADT), AcpiGbl_FADT->header.Length);
return_ACPI_STATUS (AE_OK);
diff --git a/sys/contrib/dev/acpica/tbget.c b/sys/contrib/dev/acpica/tbget.c
index 0325244..965470c 100644
--- a/sys/contrib/dev/acpica/tbget.c
+++ b/sys/contrib/dev/acpica/tbget.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbget - ACPI Table get* routines
- * $Revision: 41 $
+ * $Revision: 43 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -357,7 +357,7 @@ AcpiTbGetAllTables (
/* Get the table via the XSDT */
Status = AcpiTbGetTable ((ACPI_PHYSICAL_ADDRESS)
- AcpiGbl_XSDT->TableOffsetEntry[Index],
+ ACPI_GET_ADDRESS (AcpiGbl_XSDT->TableOffsetEntry[Index]),
TablePtr, &TableInfo);
/* Ignore a table that failed verification */
@@ -447,7 +447,8 @@ AcpiTbGetAllTables (
* Get the DSDT (We know that the FADT is valid now)
*/
- Status = AcpiTbGetTable (AcpiGbl_FADT->XDsdt, TablePtr, &TableInfo);
+ Status = AcpiTbGetTable ((ACPI_PHYSICAL_ADDRESS) ACPI_GET_ADDRESS (AcpiGbl_FADT->XDsdt),
+ TablePtr, &TableInfo);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -618,14 +619,15 @@ AcpiTbGetTableRsdt (
/* 0.71 RSDP has 64bit Rsdt address field */
PhysicalAddress = ((RSDP_DESCRIPTOR_REV071 *)AcpiGbl_RSDP)->RsdtPhysicalAddress;
#else
- PhysicalAddress = AcpiGbl_RSDP->RsdtPhysicalAddress;
+ PhysicalAddress = (ACPI_PHYSICAL_ADDRESS) AcpiGbl_RSDP->RsdtPhysicalAddress;
#endif
TableSignature = RSDT_SIG;
SignatureLength = sizeof (RSDT_SIG) -1;
}
else
{
- PhysicalAddress = (ACPI_PHYSICAL_ADDRESS) AcpiGbl_RSDP->XsdtPhysicalAddress;
+ PhysicalAddress = (ACPI_PHYSICAL_ADDRESS)
+ ACPI_GET_ADDRESS (AcpiGbl_RSDP->XsdtPhysicalAddress);
TableSignature = XSDT_SIG;
SignatureLength = sizeof (XSDT_SIG) -1;
}
@@ -753,7 +755,7 @@ AcpiTbGetTableFacs (
{
/* Just map the physical memory to our address space */
- Status = AcpiTbMapAcpiTable (AcpiGbl_FADT->XFirmwareCtrl,
+ Status = AcpiTbMapAcpiTable ((ACPI_PHYSICAL_ADDRESS) ACPI_GET_ADDRESS (AcpiGbl_FADT->XFirmwareCtrl),
&Size, &TablePtr);
if (ACPI_FAILURE(Status))
{
diff --git a/sys/contrib/dev/acpica/tbinstal.c b/sys/contrib/dev/acpica/tbinstal.c
index 440b050..2df0fca 100644
--- a/sys/contrib/dev/acpica/tbinstal.c
+++ b/sys/contrib/dev/acpica/tbinstal.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbinstal - ACPI table installation and removal
- * $Revision: 35 $
+ * $Revision: 36 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/tbutils.c b/sys/contrib/dev/acpica/tbutils.c
index 62a2d46..9bf9c75 100644
--- a/sys/contrib/dev/acpica/tbutils.c
+++ b/sys/contrib/dev/acpica/tbutils.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbutils - Table manipulation utilities
- * $Revision: 32 $
+ * $Revision: 33 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/tbxface.c b/sys/contrib/dev/acpica/tbxface.c
index 333b5ee..d2bc9cb 100644
--- a/sys/contrib/dev/acpica/tbxface.c
+++ b/sys/contrib/dev/acpica/tbxface.c
@@ -2,7 +2,7 @@
*
* Module Name: tbxface - Public interfaces to the ACPI subsystem
* ACPI table oriented interfaces
- * $Revision: 33 $
+ * $Revision: 34 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/tbxfroot.c b/sys/contrib/dev/acpica/tbxfroot.c
index 4e0804c..4bcf9c9 100644
--- a/sys/contrib/dev/acpica/tbxfroot.c
+++ b/sys/contrib/dev/acpica/tbxfroot.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbxfroot - Find the root ACPI table (RSDT)
- * $Revision: 34 $
+ * $Revision: 35 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/utalloc.c b/sys/contrib/dev/acpica/utalloc.c
index d970e93..243ee21 100644
--- a/sys/contrib/dev/acpica/utalloc.c
+++ b/sys/contrib/dev/acpica/utalloc.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmalloc - local memory allocation routines
- * $Revision: 80 $
+ * $Revision: 84 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -126,7 +126,8 @@
MODULE_NAME ("cmalloc")
-#ifdef ACPI_DEBUG
+#ifdef ACPI_DEBUG_TRACK_ALLOCATIONS
+
/*
* Most of this code is for tracking memory leaks in the subsystem, and it
* gets compiled out when the ACPI_DEBUG flag is not set.
@@ -269,7 +270,8 @@ AcpiCmAddElementToAllocList (
Element = AcpiCmSearchAllocList (Address);
if (Element)
{
- REPORT_ERROR (("CmAddElementToAllocList: Address already present in list!\n"));
+ REPORT_ERROR (("CmAddElementToAllocList: Address already present in list! (%p)\n",
+ Address));
DEBUG_PRINT (ACPI_ERROR, ("Element %p Address %p\n", Element, Address));
@@ -613,11 +615,11 @@ AcpiCmDumpCurrentAllocations (
DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES,
("Total number of unfreed allocations = %d(%X)\n", i,i));
- return_VOID;
-}
-#endif /* Debug routines for memory leak detection */
+ return_VOID;
+}
+#endif /* #ifdef ACPI_DEBUG_TRACK_ALLOCATIONS */
/*****************************************************************************
*
@@ -642,8 +644,6 @@ _CmAllocate (
UINT32 Line)
{
void *Address = NULL;
- DEBUG_ONLY_MEMBERS (\
- ACPI_STATUS Status)
FUNCTION_TRACE_U32 ("_CmAllocate", Size);
@@ -669,10 +669,10 @@ _CmAllocate (
return_VALUE (NULL);
}
-#ifdef ACPI_DEBUG
- Status = AcpiCmAddElementToAllocList (Address, Size, MEM_MALLOC, Component,
- Module, Line);
- if (ACPI_FAILURE (Status))
+#ifdef ACPI_DEBUG_TRACK_ALLOCATIONS
+
+ if (ACPI_FAILURE (AcpiCmAddElementToAllocList (Address, Size, MEM_MALLOC,
+ Component, Module, Line)))
{
AcpiOsFree (Address);
return_PTR (NULL);
@@ -709,8 +709,6 @@ _CmCallocate (
UINT32 Line)
{
void *Address = NULL;
- DEBUG_ONLY_MEMBERS (\
- ACPI_STATUS Status)
FUNCTION_TRACE_U32 ("_CmCallocate", Size);
@@ -737,10 +735,10 @@ _CmCallocate (
return_VALUE (NULL);
}
-#ifdef ACPI_DEBUG
- Status = AcpiCmAddElementToAllocList (Address, Size, MEM_CALLOC, Component,
- Module, Line);
- if (ACPI_FAILURE (Status))
+#ifdef ACPI_DEBUG_TRACK_ALLOCATIONS
+
+ if (ACPI_FAILURE (AcpiCmAddElementToAllocList (Address, Size, MEM_CALLOC,
+ Component,Module, Line)))
{
AcpiOsFree (Address);
return_PTR (NULL);
@@ -787,7 +785,7 @@ _CmFree (
return_VOID;
}
-#ifdef ACPI_DEBUG
+#ifdef ACPI_DEBUG_TRACK_ALLOCATIONS
AcpiCmDeleteElementFromAllocList (Address, Component, Module, Line);
#endif
diff --git a/sys/contrib/dev/acpica/utclib.c b/sys/contrib/dev/acpica/utclib.c
index 70efc61..2318d9e 100644
--- a/sys/contrib/dev/acpica/utclib.c
+++ b/sys/contrib/dev/acpica/utclib.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmclib - Local implementation of C library functions
- * $Revision: 29 $
+ * $Revision: 32 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -454,7 +454,7 @@ AcpiCmMemcpy (
void *
AcpiCmMemset (
void *Dest,
- UINT32 Value,
+ NATIVE_UINT Value,
NATIVE_UINT Count)
{
NATIVE_CHAR *New = (NATIVE_CHAR *) Dest;
@@ -630,6 +630,7 @@ static const UINT8 _acpi_ctype[257] = {
#define IS_LOWER(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_LO))
#define IS_DIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_DI))
#define IS_SPACE(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_SP))
+#define IS_XDIGIT(c) (_acpi_ctype[(unsigned char)(c)] & (_ACPI_XD))
/*******************************************************************************
@@ -770,7 +771,7 @@ UINT32
AcpiCmStrtoul (
const NATIVE_CHAR *String,
NATIVE_CHAR **Terminator,
- UINT32 Base)
+ NATIVE_UINT Base)
{
UINT32 converted = 0;
UINT32 index;
diff --git a/sys/contrib/dev/acpica/utcopy.c b/sys/contrib/dev/acpica/utcopy.c
index 534b50e..f27d724 100644
--- a/sys/contrib/dev/acpica/utcopy.c
+++ b/sys/contrib/dev/acpica/utcopy.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmcopy - Internal to external object translation utilities
- * $Revision: 61 $
+ * $Revision: 62 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -214,9 +214,9 @@ AcpiCmBuildExternalSimpleObject (
break;
- case ACPI_TYPE_NUMBER:
+ case ACPI_TYPE_INTEGER:
- ExternalObj->Number.Value= InternalObj->Number.Value;
+ ExternalObj->Integer.Value= InternalObj->Integer.Value;
break;
@@ -584,11 +584,11 @@ AcpiCmBuildInternalSimpleObject (
break;
- case ACPI_TYPE_NUMBER:
+ case ACPI_TYPE_INTEGER:
/*
* Number is included in the object itself
*/
- InternalObj->Number.Value = ExternalObj->Number.Value;
+ InternalObj->Integer.Value = ExternalObj->Integer.Value;
break;
diff --git a/sys/contrib/dev/acpica/utdebug.c b/sys/contrib/dev/acpica/utdebug.c
index 9cc5371..5792a13 100644
--- a/sys/contrib/dev/acpica/utdebug.c
+++ b/sys/contrib/dev/acpica/utdebug.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmdebug - Debug print routines
- * $Revision: 62 $
+ * $Revision: 64 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -373,7 +373,7 @@ FunctionValueExit (
UINT32 LineNumber,
UINT32 ComponentId,
NATIVE_CHAR *FunctionName,
- NATIVE_UINT Value)
+ ACPI_INTEGER Value)
{
DebugPrint (ModuleName, LineNumber, ComponentId, TRACE_FUNCTIONS,
diff --git a/sys/contrib/dev/acpica/utdelete.c b/sys/contrib/dev/acpica/utdelete.c
index 1854715..34a42ae 100644
--- a/sys/contrib/dev/acpica/utdelete.c
+++ b/sys/contrib/dev/acpica/utdelete.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: cmdelete - object deletion and reference count utilities
- * $Revision: 61 $
+ * $Revision: 62 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/sys/contrib/dev/acpica/uteval.c b/sys/contrib/dev/acpica/uteval.c
index e5a2427..2987090 100644
--- a/sys/contrib/dev/acpica/uteval.c
+++ b/sys/contrib/dev/acpica/uteval.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmeval - Object evaluation
- * $Revision: 20 $
+ * $Revision: 21 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -189,7 +189,7 @@ AcpiCmEvaluateNumericObject (
/* Is the return object of the correct type? */
- if (ObjDesc->Common.Type != ACPI_TYPE_NUMBER)
+ if (ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
{
Status = AE_TYPE;
DEBUG_PRINT (ACPI_ERROR,
@@ -202,7 +202,7 @@ AcpiCmEvaluateNumericObject (
* Since the structure is a union, setting any field will set all
* of the variables in the union
*/
- *Address = ObjDesc->Number.Value;
+ *Address = ObjDesc->Integer.Value;
}
/* On exit, we must delete the return object */
@@ -278,7 +278,7 @@ AcpiCmExecute_HID (
* a string
*/
- if ((ObjDesc->Common.Type != ACPI_TYPE_NUMBER) &&
+ if ((ObjDesc->Common.Type != ACPI_TYPE_INTEGER) &&
(ObjDesc->Common.Type != ACPI_TYPE_STRING))
{
Status = AE_TYPE;
@@ -289,11 +289,11 @@ AcpiCmExecute_HID (
else
{
- if (ObjDesc->Common.Type == ACPI_TYPE_NUMBER)
+ if (ObjDesc->Common.Type == ACPI_TYPE_INTEGER)
{
/* Convert the Numeric HID to string */
- AcpiAmlEisaIdToString ((UINT32) ObjDesc->Number.Value, Hid->Buffer);
+ AcpiAmlEisaIdToString ((UINT32) ObjDesc->Integer.Value, Hid->Buffer);
}
else
@@ -375,7 +375,7 @@ AcpiCmExecute_UID (
* a string
*/
- if ((ObjDesc->Common.Type != ACPI_TYPE_NUMBER) &&
+ if ((ObjDesc->Common.Type != ACPI_TYPE_INTEGER) &&
(ObjDesc->Common.Type != ACPI_TYPE_STRING))
{
Status = AE_TYPE;
@@ -386,11 +386,11 @@ AcpiCmExecute_UID (
else
{
- if (ObjDesc->Common.Type == ACPI_TYPE_NUMBER)
+ if (ObjDesc->Common.Type == ACPI_TYPE_INTEGER)
{
/* Convert the Numeric UID to string */
- AcpiAmlUnsignedIntegerToString (ObjDesc->Number.Value, Uid->Buffer);
+ AcpiAmlUnsignedIntegerToString (ObjDesc->Integer.Value, Uid->Buffer);
}
else
@@ -470,7 +470,7 @@ AcpiCmExecute_STA (
/* Is the return object of the correct type? */
- if (ObjDesc->Common.Type != ACPI_TYPE_NUMBER)
+ if (ObjDesc->Common.Type != ACPI_TYPE_INTEGER)
{
Status = AE_TYPE;
DEBUG_PRINT (ACPI_ERROR,
@@ -482,7 +482,7 @@ AcpiCmExecute_STA (
{
/* Extract the status flags */
- *Flags = (UINT32) ObjDesc->Number.Value;
+ *Flags = (UINT32) ObjDesc->Integer.Value;
}
/* On exit, we must delete the return object */
diff --git a/sys/contrib/dev/acpica/utglobal.c b/sys/contrib/dev/acpica/utglobal.c
index d89b56c..2cea5c6 100644
--- a/sys/contrib/dev/acpica/utglobal.c
+++ b/sys/contrib/dev/acpica/utglobal.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmglobal - Global variables for the ACPI subsystem
- * $Revision: 113 $
+ * $Revision: 116 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -191,7 +191,7 @@ PREDEFINED_NAMES AcpiGbl_PreDefinedNames[] =
{"_SB_", INTERNAL_TYPE_DEF_ANY},
{"_SI_", INTERNAL_TYPE_DEF_ANY},
{"_TZ_", INTERNAL_TYPE_DEF_ANY},
- {"_REV", ACPI_TYPE_NUMBER, "2"},
+ {"_REV", ACPI_TYPE_INTEGER, "2"},
{"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME},
{"_GL_", ACPI_TYPE_MUTEX, "0"},
@@ -248,6 +248,13 @@ UINT8 AcpiGbl_NsProperties[] =
};
+/* Hex to ASCII conversion table */
+
+NATIVE_CHAR AcpiGbl_HexToAscii[] =
+ {'0','1','2','3','4','5','6','7',
+ '8','9','A','B','C','D','E','F'};
+
+
/******************************************************************************
*
* Table globals
@@ -328,7 +335,7 @@ static NATIVE_CHAR AcpiGbl_BadType[] = "UNDEFINED";
static NATIVE_CHAR *AcpiGbl_NsTypeNames[] = /* printable names of ACPI types */
{
/* 00 */ "Untyped",
- /* 01 */ "Number",
+ /* 01 */ "Integer",
/* 02 */ "String",
/* 03 */ "Buffer",
/* 04 */ "Package",
diff --git a/sys/contrib/dev/acpica/utinit.c b/sys/contrib/dev/acpica/utinit.c
index b42ba3e..f2972a0 100644
--- a/sys/contrib/dev/acpica/utinit.c
+++ b/sys/contrib/dev/acpica/utinit.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cminit - Common ACPI subsystem initialization
- * $Revision: 91 $
+ * $Revision: 93 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -128,6 +128,9 @@
MODULE_NAME ("cminit")
+#define ACPI_OFFSET(d,o) ((UINT32) &(((d *)0)->o))
+#define ACPI_FADT_OFFSET(o) ACPI_OFFSET (FADT_DESCRIPTOR, o)
+
/*******************************************************************************
*
* FUNCTION: AcpiCmFadtRegisterError
@@ -146,12 +149,13 @@
static ACPI_STATUS
AcpiCmFadtRegisterError (
NATIVE_CHAR *RegisterName,
- UINT32 Value)
+ UINT32 Value,
+ UINT32 Offset)
{
REPORT_ERROR (
- ("Invalid FADT register value, %s=%X (FADT=%p)\n",
- RegisterName, Value, AcpiGbl_FADT));
+ ("Invalid FADT value %s=%lX at offset %lX FADT=%p\n",
+ RegisterName, Value, Offset, AcpiGbl_FADT));
return (AE_BAD_VALUE);
@@ -185,44 +189,47 @@ AcpiCmValidateFadt (
if (AcpiGbl_FADT->Pm1EvtLen < 4)
{
Status = AcpiCmFadtRegisterError ("PM1_EVT_LEN",
- (UINT32) AcpiGbl_FADT->Pm1EvtLen);
+ (UINT32) AcpiGbl_FADT->Pm1EvtLen,
+ ACPI_FADT_OFFSET (Pm1EvtLen));
}
if (!AcpiGbl_FADT->Pm1CntLen)
{
- Status = AcpiCmFadtRegisterError ("PM1_CNT_LEN",
- 0);
+ Status = AcpiCmFadtRegisterError ("PM1_CNT_LEN", 0,
+ ACPI_FADT_OFFSET (Pm1CntLen));
}
if (!ACPI_VALID_ADDRESS (AcpiGbl_FADT->XPm1aEvtBlk.Address))
{
- Status = AcpiCmFadtRegisterError ("PM1a_EVT_BLK",
- 0);
+ Status = AcpiCmFadtRegisterError ("X_PM1a_EVT_BLK", 0,
+ ACPI_FADT_OFFSET (XPm1aEvtBlk.Address));
}
if (!ACPI_VALID_ADDRESS (AcpiGbl_FADT->XPm1aCntBlk.Address))
{
- Status = AcpiCmFadtRegisterError ("PM1a_CNT_BLK",
- 0);
+ Status = AcpiCmFadtRegisterError ("X_PM1a_CNT_BLK", 0,
+ ACPI_FADT_OFFSET (XPm1aCntBlk.Address));
}
if (!ACPI_VALID_ADDRESS (AcpiGbl_FADT->XPmTmrBlk.Address))
{
- Status = AcpiCmFadtRegisterError ("PM_TMR_BLK",
- 0);
+ Status = AcpiCmFadtRegisterError ("X_PM_TMR_BLK", 0,
+ ACPI_FADT_OFFSET (XPmTmrBlk.Address));
}
if ((ACPI_VALID_ADDRESS (AcpiGbl_FADT->XPm2CntBlk.Address) &&
!AcpiGbl_FADT->Pm2CntLen))
{
Status = AcpiCmFadtRegisterError ("PM2_CNT_LEN",
- (UINT32) AcpiGbl_FADT->Pm2CntLen);
+ (UINT32) AcpiGbl_FADT->Pm2CntLen,
+ ACPI_FADT_OFFSET (Pm2CntLen));
}
if (AcpiGbl_FADT->PmTmLen < 4)
{
Status = AcpiCmFadtRegisterError ("PM_TM_LEN",
- (UINT32) AcpiGbl_FADT->PmTmLen);
+ (UINT32) AcpiGbl_FADT->PmTmLen,
+ ACPI_FADT_OFFSET (PmTmLen));
}
/* length of GPE blocks must be a multiple of 2 */
@@ -231,15 +238,17 @@ AcpiCmValidateFadt (
if (ACPI_VALID_ADDRESS (AcpiGbl_FADT->XGpe0Blk.Address) &&
(AcpiGbl_FADT->Gpe0BlkLen & 1))
{
- Status = AcpiCmFadtRegisterError ("GPE0_BLK_LEN",
- (UINT32) AcpiGbl_FADT->Gpe0BlkLen);
+ Status = AcpiCmFadtRegisterError ("(x)GPE0_BLK_LEN",
+ (UINT32) AcpiGbl_FADT->Gpe0BlkLen,
+ ACPI_FADT_OFFSET (Gpe0BlkLen));
}
if (ACPI_VALID_ADDRESS (AcpiGbl_FADT->XGpe1Blk.Address) &&
(AcpiGbl_FADT->Gpe1BlkLen & 1))
{
- Status = AcpiCmFadtRegisterError ("GPE1_BLK_LEN",
- (UINT32) AcpiGbl_FADT->Gpe1BlkLen);
+ Status = AcpiCmFadtRegisterError ("(x)GPE1_BLK_LEN",
+ (UINT32) AcpiGbl_FADT->Gpe1BlkLen,
+ ACPI_FADT_OFFSET (Gpe1BlkLen));
}
return (Status);
diff --git a/sys/contrib/dev/acpica/utmisc.c b/sys/contrib/dev/acpica/utmisc.c
index 662ec14..2c9c60d 100644
--- a/sys/contrib/dev/acpica/utmisc.c
+++ b/sys/contrib/dev/acpica/utmisc.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: cmutils - common utility procedures
- * $Revision: 22 $
+ * $Revision: 23 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -814,18 +814,18 @@ AcpiCmResolvePackageReferences (
{
if (SubObject->Reference.OpCode == AML_ZERO_OP)
{
- SubObject->Common.Type = ACPI_TYPE_NUMBER;
- SubObject->Number.Value = 0;
+ SubObject->Common.Type = ACPI_TYPE_INTEGER;
+ SubObject->Integer.Value = 0;
}
else if (SubObject->Reference.OpCode == AML_ONE_OP)
{
- SubObject->Common.Type = ACPI_TYPE_NUMBER;
- SubObject->Number.Value = 1;
+ SubObject->Common.Type = ACPI_TYPE_INTEGER;
+ SubObject->Integer.Value = 1;
}
else if (SubObject->Reference.OpCode == AML_ONES_OP)
{
- SubObject->Common.Type = ACPI_TYPE_NUMBER;
- SubObject->Number.Value = ACPI_INTEGER_MAX;
+ SubObject->Common.Type = ACPI_TYPE_INTEGER;
+ SubObject->Integer.Value = ACPI_INTEGER_MAX;
}
}
}
diff --git a/sys/contrib/dev/acpica/utobject.c b/sys/contrib/dev/acpica/utobject.c
index 5e0f6f4..dd8bf22 100644
--- a/sys/contrib/dev/acpica/utobject.c
+++ b/sys/contrib/dev/acpica/utobject.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmobject - ACPI object create/delete/size/cache routines
- * $Revision: 34 $
+ * $Revision: 35 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -586,7 +586,7 @@ AcpiCmGetSimpleObjectSize (
break;
- case ACPI_TYPE_NUMBER:
+ case ACPI_TYPE_INTEGER:
case ACPI_TYPE_PROCESSOR:
case ACPI_TYPE_POWER:
diff --git a/sys/contrib/dev/acpica/utxface.c b/sys/contrib/dev/acpica/utxface.c
index 840d0d5..2376295 100644
--- a/sys/contrib/dev/acpica/utxface.c
+++ b/sys/contrib/dev/acpica/utxface.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmxface - External interfaces for "global" ACPI functions
- * $Revision: 57 $
+ * $Revision: 62 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999, 2000, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -149,13 +149,8 @@ AcpiInitializeSubsystem (
{
ACPI_STATUS Status;
-
FUNCTION_TRACE ("AcpiInitializeSubsystem");
- DEBUG_PRINT_RAW (ACPI_OK,
- ("ACPI: Core Subsystem version [%s]\n", ACPI_CA_VERSION));
- DEBUG_PRINT (ACPI_INFO, ("Initializing ACPI Subsystem...\n"));
-
/* Initialize all globals used by the subsystem */
@@ -442,16 +437,25 @@ AcpiGetSystemInfo (
OutBuffer->Length = sizeof (ACPI_SYSTEM_INFO);
InfoPtr = (ACPI_SYSTEM_INFO *) OutBuffer->Pointer;
- /* TBD [Future]: need a version number, or use the version string */
- InfoPtr->AcpiCaVersion = 0x1234;
+ InfoPtr->AcpiCaVersion = ACPI_CA_VERSION;
/* System flags (ACPI capabilities) */
InfoPtr->Flags = AcpiGbl_SystemFlags;
/* Timer resolution - 24 or 32 bits */
-
- InfoPtr->TimerResolution = AcpiHwPmtResolution ();
+ if (!AcpiGbl_FADT)
+ {
+ InfoPtr->TimerResolution = 0;
+ }
+ else if (AcpiGbl_FADT->TmrValExt == 0)
+ {
+ InfoPtr->TimerResolution = 24;
+ }
+ else
+ {
+ InfoPtr->TimerResolution = 32;
+ }
/* Clear the reserved fields */
OpenPOWER on IntegriCloud