summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Myers <Dana.Myers@Sun.COM>2008-10-15 19:26:19 -0400
committerDana Myers <Dana.Myers@Sun.COM>2008-10-15 19:26:19 -0400
commitdb2bae3047e71d795bde12e3baa621f4b6cc8930 (patch)
tree6f7ced35318bced4805171292ec76a5229f3e78a
parent25351652d920ae27c5a56c199da581033ce763f6 (diff)
downloadillumos-joyent-db2bae3047e71d795bde12e3baa621f4b6cc8930.tar.gz
6464695 acpica: update to Intel ACPI CA 20080829
6747548 acpica: must check size of buffers returned from AcpiEvaluateObject() --HG-- rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsfield.c => usr/src/uts/intel/io/acpica/dispatcher/dsfield.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsinit.c => usr/src/uts/intel/io/acpica/dispatcher/dsinit.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsmethod.c => usr/src/uts/intel/io/acpica/dispatcher/dsmethod.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsmthdat.c => usr/src/uts/intel/io/acpica/dispatcher/dsmthdat.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsobject.c => usr/src/uts/intel/io/acpica/dispatcher/dsobject.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsopcode.c => usr/src/uts/intel/io/acpica/dispatcher/dsopcode.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsutils.c => usr/src/uts/intel/io/acpica/dispatcher/dsutils.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswexec.c => usr/src/uts/intel/io/acpica/dispatcher/dswexec.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswload.c => usr/src/uts/intel/io/acpica/dispatcher/dswload.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswscope.c => usr/src/uts/intel/io/acpica/dispatcher/dswscope.c rename : usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswstate.c => usr/src/uts/intel/io/acpica/dispatcher/dswstate.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exconfig.c => usr/src/uts/intel/io/acpica/executer/exconfig.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exconvrt.c => usr/src/uts/intel/io/acpica/executer/exconvrt.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/excreate.c => usr/src/uts/intel/io/acpica/executer/excreate.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exdump.c => usr/src/uts/intel/io/acpica/executer/exdump.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exfield.c => usr/src/uts/intel/io/acpica/executer/exfield.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exfldio.c => usr/src/uts/intel/io/acpica/executer/exfldio.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exmisc.c => usr/src/uts/intel/io/acpica/executer/exmisc.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exmutex.c => usr/src/uts/intel/io/acpica/executer/exmutex.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exnames.c => usr/src/uts/intel/io/acpica/executer/exnames.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exoparg1.c => usr/src/uts/intel/io/acpica/executer/exoparg1.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exoparg2.c => usr/src/uts/intel/io/acpica/executer/exoparg2.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exoparg3.c => usr/src/uts/intel/io/acpica/executer/exoparg3.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exoparg6.c => usr/src/uts/intel/io/acpica/executer/exoparg6.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exprep.c => usr/src/uts/intel/io/acpica/executer/exprep.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exregion.c => usr/src/uts/intel/io/acpica/executer/exregion.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exresnte.c => usr/src/uts/intel/io/acpica/executer/exresnte.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exresolv.c => usr/src/uts/intel/io/acpica/executer/exresolv.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exresop.c => usr/src/uts/intel/io/acpica/executer/exresop.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exstore.c => usr/src/uts/intel/io/acpica/executer/exstore.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exstoren.c => usr/src/uts/intel/io/acpica/executer/exstoren.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exstorob.c => usr/src/uts/intel/io/acpica/executer/exstorob.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exsystem.c => usr/src/uts/intel/io/acpica/executer/exsystem.c rename : usr/src/uts/intel/io/acpica/interpreter/executer/exutils.c => usr/src/uts/intel/io/acpica/executer/exutils.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/psargs.c => usr/src/uts/intel/io/acpica/parser/psargs.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/psloop.c => usr/src/uts/intel/io/acpica/parser/psloop.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/psopcode.c => usr/src/uts/intel/io/acpica/parser/psopcode.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/psparse.c => usr/src/uts/intel/io/acpica/parser/psparse.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/psscope.c => usr/src/uts/intel/io/acpica/parser/psscope.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/pstree.c => usr/src/uts/intel/io/acpica/parser/pstree.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/psutils.c => usr/src/uts/intel/io/acpica/parser/psutils.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/pswalk.c => usr/src/uts/intel/io/acpica/parser/pswalk.c rename : usr/src/uts/intel/io/acpica/interpreter/parser/psxface.c => usr/src/uts/intel/io/acpica/parser/psxface.c
-rw-r--r--usr/src/tools/findunref/exception_list.open9
-rw-r--r--usr/src/uts/common/io/power.c9
-rw-r--r--usr/src/uts/i86pc/cpu/amd_opteron/ao_mca.c10
-rw-r--r--usr/src/uts/i86pc/io/cpudrv/cpu_acpi.c3
-rw-r--r--usr/src/uts/i86pc/io/mp_platform_common.c154
-rw-r--r--usr/src/uts/i86pc/io/pciex/npe_misc.c8
-rw-r--r--usr/src/uts/i86pc/io/ppm/acpippm.c7
-rw-r--r--usr/src/uts/i86pc/io/ppm/acpisleep.c4
-rw-r--r--usr/src/uts/i86pc/io/psm/psm_common.c9
-rw-r--r--usr/src/uts/i86pc/io/todpc_subr.c14
-rw-r--r--usr/src/uts/intel/Makefile.files6
-rw-r--r--usr/src/uts/intel/Makefile.rules12
-rw-r--r--usr/src/uts/intel/io/acpica/acpi_enum.c3
-rw-r--r--usr/src/uts/intel/io/acpica/acpica.c79
-rw-r--r--usr/src/uts/intel/io/acpica/acpica_ec.c39
-rw-r--r--usr/src/uts/intel/io/acpica/changes.txt6576
-rw-r--r--[-rwxr-xr-x]usr/src/uts/intel/io/acpica/cmp_ca.sh55
-rw-r--r--usr/src/uts/intel/io/acpica/debugger/dbcmds.c92
-rw-r--r--usr/src/uts/intel/io/acpica/debugger/dbdisply.c60
-rw-r--r--usr/src/uts/intel/io/acpica/debugger/dbexec.c211
-rw-r--r--usr/src/uts/intel/io/acpica/debugger/dbfileio.c32
-rw-r--r--usr/src/uts/intel/io/acpica/debugger/dbhistry.c8
-rw-r--r--usr/src/uts/intel/io/acpica/debugger/dbinput.c6
-rw-r--r--usr/src/uts/intel/io/acpica/debugger/dbstats.c67
-rw-r--r--usr/src/uts/intel/io/acpica/debugger/dbutils.c52
-rw-r--r--usr/src/uts/intel/io/acpica/debugger/dbxface.c4
-rw-r--r--usr/src/uts/intel/io/acpica/disassembler/dmbuffer.c144
-rw-r--r--usr/src/uts/intel/io/acpica/disassembler/dmnames.c14
-rw-r--r--usr/src/uts/intel/io/acpica/disassembler/dmobject.c103
-rw-r--r--usr/src/uts/intel/io/acpica/disassembler/dmopcode.c29
-rw-r--r--usr/src/uts/intel/io/acpica/disassembler/dmresrc.c30
-rw-r--r--usr/src/uts/intel/io/acpica/disassembler/dmresrcl.c8
-rw-r--r--usr/src/uts/intel/io/acpica/disassembler/dmresrcs.c4
-rw-r--r--usr/src/uts/intel/io/acpica/disassembler/dmutils.c4
-rw-r--r--usr/src/uts/intel/io/acpica/disassembler/dmwalk.c6
-rw-r--r--usr/src/uts/intel/io/acpica/dispatcher/dsfield.c (renamed from usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsfield.c)184
-rw-r--r--usr/src/uts/intel/io/acpica/dispatcher/dsinit.c (renamed from usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsinit.c)28
-rw-r--r--usr/src/uts/intel/io/acpica/dispatcher/dsmethod.c (renamed from usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsmethod.c)114
-rw-r--r--usr/src/uts/intel/io/acpica/dispatcher/dsmthdat.c (renamed from usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsmthdat.c)90
-rw-r--r--usr/src/uts/intel/io/acpica/dispatcher/dsobject.c (renamed from usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsobject.c)208
-rw-r--r--usr/src/uts/intel/io/acpica/dispatcher/dsopcode.c (renamed from usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsopcode.c)289
-rw-r--r--usr/src/uts/intel/io/acpica/dispatcher/dsutils.c (renamed from usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsutils.c)173
-rw-r--r--usr/src/uts/intel/io/acpica/dispatcher/dswexec.c (renamed from usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswexec.c)114
-rw-r--r--usr/src/uts/intel/io/acpica/dispatcher/dswload.c (renamed from usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswload.c)56
-rw-r--r--usr/src/uts/intel/io/acpica/dispatcher/dswscope.c (renamed from usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswscope.c)4
-rw-r--r--usr/src/uts/intel/io/acpica/dispatcher/dswstate.c (renamed from usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswstate.c)571
-rw-r--r--usr/src/uts/intel/io/acpica/events/evevent.c35
-rw-r--r--usr/src/uts/intel/io/acpica/events/evgpe.c203
-rw-r--r--usr/src/uts/intel/io/acpica/events/evgpeblk.c85
-rw-r--r--usr/src/uts/intel/io/acpica/events/evmisc.c143
-rw-r--r--usr/src/uts/intel/io/acpica/events/evregion.c24
-rw-r--r--usr/src/uts/intel/io/acpica/events/evrgnini.c187
-rw-r--r--usr/src/uts/intel/io/acpica/events/evsci.c13
-rw-r--r--usr/src/uts/intel/io/acpica/events/evxface.c30
-rw-r--r--usr/src/uts/intel/io/acpica/events/evxfevnt.c33
-rw-r--r--usr/src/uts/intel/io/acpica/events/evxfregn.c4
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exconfig.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exconfig.c)329
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exconvrt.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exconvrt.c)37
-rw-r--r--usr/src/uts/intel/io/acpica/executer/excreate.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/excreate.c)138
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exdump.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exdump.c)199
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exfield.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exfield.c)61
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exfldio.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exfldio.c)58
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exmisc.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exmisc.c)26
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exmutex.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exmutex.c)260
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exnames.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exnames.c)4
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exoparg1.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exoparg1.c)56
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exoparg2.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exoparg2.c)31
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exoparg3.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exoparg3.c)5
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exoparg6.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exoparg6.c)13
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exprep.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exprep.c)15
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exregion.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exregion.c)23
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exresnte.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exresnte.c)23
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exresolv.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exresolv.c)124
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exresop.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exresop.c)73
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exstore.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exstore.c)165
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exstoren.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exstoren.c)7
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exstorob.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exstorob.c)4
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exsystem.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exsystem.c)36
-rw-r--r--usr/src/uts/intel/io/acpica/executer/exutils.c (renamed from usr/src/uts/intel/io/acpica/interpreter/executer/exutils.c)210
-rw-r--r--usr/src/uts/intel/io/acpica/hardware/hwacpi.c63
-rw-r--r--usr/src/uts/intel/io/acpica/hardware/hwgpe.c67
-rw-r--r--usr/src/uts/intel/io/acpica/hardware/hwregs.c231
-rw-r--r--usr/src/uts/intel/io/acpica/hardware/hwsleep.c170
-rw-r--r--usr/src/uts/intel/io/acpica/hardware/hwtimer.c10
-rw-r--r--usr/src/uts/intel/io/acpica/interpreter/parser/psloop.c944
-rw-r--r--usr/src/uts/intel/io/acpica/namespace/nsaccess.c99
-rw-r--r--usr/src/uts/intel/io/acpica/namespace/nsalloc.c15
-rw-r--r--usr/src/uts/intel/io/acpica/namespace/nsdump.c37
-rw-r--r--usr/src/uts/intel/io/acpica/namespace/nsdumpdv.c4
-rw-r--r--usr/src/uts/intel/io/acpica/namespace/nseval.c71
-rw-r--r--usr/src/uts/intel/io/acpica/namespace/nsinit.c23
-rw-r--r--usr/src/uts/intel/io/acpica/namespace/nsload.c182
-rw-r--r--usr/src/uts/intel/io/acpica/namespace/nsnames.c47
-rw-r--r--usr/src/uts/intel/io/acpica/namespace/nsobject.c4
-rw-r--r--usr/src/uts/intel/io/acpica/namespace/nsparse.c69
-rw-r--r--usr/src/uts/intel/io/acpica/namespace/nssearch.c29
-rw-r--r--usr/src/uts/intel/io/acpica/namespace/nsutils.c58
-rw-r--r--usr/src/uts/intel/io/acpica/namespace/nswalk.c71
-rw-r--r--usr/src/uts/intel/io/acpica/namespace/nsxfeval.c141
-rw-r--r--usr/src/uts/intel/io/acpica/namespace/nsxfname.c55
-rw-r--r--usr/src/uts/intel/io/acpica/namespace/nsxfobj.c4
-rw-r--r--usr/src/uts/intel/io/acpica/osl.c140
-rw-r--r--usr/src/uts/intel/io/acpica/osl_ml.s59
-rw-r--r--usr/src/uts/intel/io/acpica/parser/psargs.c (renamed from usr/src/uts/intel/io/acpica/interpreter/parser/psargs.c)62
-rw-r--r--usr/src/uts/intel/io/acpica/parser/psloop.c1208
-rw-r--r--usr/src/uts/intel/io/acpica/parser/psopcode.c (renamed from usr/src/uts/intel/io/acpica/interpreter/parser/psopcode.c)36
-rw-r--r--usr/src/uts/intel/io/acpica/parser/psparse.c (renamed from usr/src/uts/intel/io/acpica/interpreter/parser/psparse.c)46
-rw-r--r--usr/src/uts/intel/io/acpica/parser/psscope.c (renamed from usr/src/uts/intel/io/acpica/interpreter/parser/psscope.c)4
-rw-r--r--usr/src/uts/intel/io/acpica/parser/pstree.c (renamed from usr/src/uts/intel/io/acpica/interpreter/parser/pstree.c)6
-rw-r--r--usr/src/uts/intel/io/acpica/parser/psutils.c (renamed from usr/src/uts/intel/io/acpica/interpreter/parser/psutils.c)4
-rw-r--r--usr/src/uts/intel/io/acpica/parser/pswalk.c (renamed from usr/src/uts/intel/io/acpica/interpreter/parser/pswalk.c)4
-rw-r--r--usr/src/uts/intel/io/acpica/parser/psxface.c (renamed from usr/src/uts/intel/io/acpica/interpreter/parser/psxface.c)130
-rw-r--r--usr/src/uts/intel/io/acpica/resources/rsaddr.c4
-rw-r--r--usr/src/uts/intel/io/acpica/resources/rscalc.c38
-rw-r--r--usr/src/uts/intel/io/acpica/resources/rscreate.c65
-rw-r--r--usr/src/uts/intel/io/acpica/resources/rsdump.c10
-rw-r--r--usr/src/uts/intel/io/acpica/resources/rsinfo.c4
-rw-r--r--usr/src/uts/intel/io/acpica/resources/rsio.c43
-rw-r--r--usr/src/uts/intel/io/acpica/resources/rsirq.c47
-rw-r--r--usr/src/uts/intel/io/acpica/resources/rslist.c4
-rw-r--r--usr/src/uts/intel/io/acpica/resources/rsmemory.c4
-rw-r--r--usr/src/uts/intel/io/acpica/resources/rsmisc.c18
-rw-r--r--usr/src/uts/intel/io/acpica/resources/rsutils.c15
-rw-r--r--usr/src/uts/intel/io/acpica/resources/rsxface.c4
-rw-r--r--usr/src/uts/intel/io/acpica/tables/tbfadt.c541
-rw-r--r--usr/src/uts/intel/io/acpica/tables/tbfind.c215
-rw-r--r--usr/src/uts/intel/io/acpica/tables/tbinstal.c723
-rw-r--r--usr/src/uts/intel/io/acpica/tables/tbutils.c532
-rw-r--r--usr/src/uts/intel/io/acpica/tables/tbxface.c677
-rw-r--r--usr/src/uts/intel/io/acpica/tables/tbxfroot.c591
-rw-r--r--usr/src/uts/intel/io/acpica/utilities/utalloc.c25
-rw-r--r--usr/src/uts/intel/io/acpica/utilities/utcache.c11
-rw-r--r--usr/src/uts/intel/io/acpica/utilities/utclib.c6
-rw-r--r--usr/src/uts/intel/io/acpica/utilities/utcopy.c203
-rw-r--r--usr/src/uts/intel/io/acpica/utilities/utdebug.c74
-rw-r--r--usr/src/uts/intel/io/acpica/utilities/utdelete.c44
-rw-r--r--usr/src/uts/intel/io/acpica/utilities/uteval.c26
-rw-r--r--usr/src/uts/intel/io/acpica/utilities/utglobal.c331
-rw-r--r--usr/src/uts/intel/io/acpica/utilities/utinit.c135
-rw-r--r--usr/src/uts/intel/io/acpica/utilities/utmath.c6
-rw-r--r--usr/src/uts/intel/io/acpica/utilities/utmisc.c182
-rw-r--r--usr/src/uts/intel/io/acpica/utilities/utmutex.c8
-rw-r--r--usr/src/uts/intel/io/acpica/utilities/utobject.c114
-rw-r--r--usr/src/uts/intel/io/acpica/utilities/utresrc.c4
-rw-r--r--usr/src/uts/intel/io/acpica/utilities/utstate.c4
-rw-r--r--usr/src/uts/intel/io/acpica/utilities/uttrack.c30
-rw-r--r--usr/src/uts/intel/io/acpica/utilities/utxface.c134
-rw-r--r--usr/src/uts/intel/io/amd_iommu/amd_iommu_acpi.c5
-rw-r--r--usr/src/uts/intel/io/hotplug/pciehpc/pciehpc_acpi.c117
-rw-r--r--usr/src/uts/intel/io/pci/pci_boot.c35
-rw-r--r--usr/src/uts/intel/sys/acpi/acapps.h5
-rw-r--r--usr/src/uts/intel/sys/acpi/acconfig.h26
-rw-r--r--usr/src/uts/intel/sys/acpi/acdebug.h22
-rw-r--r--usr/src/uts/intel/sys/acpi/acdisasm.h67
-rw-r--r--usr/src/uts/intel/sys/acpi/acdispat.h51
-rw-r--r--usr/src/uts/intel/sys/acpi/acevents.h4
-rw-r--r--usr/src/uts/intel/sys/acpi/acexcep.h150
-rw-r--r--usr/src/uts/intel/sys/acpi/acglobal.h178
-rw-r--r--usr/src/uts/intel/sys/acpi/achware.h16
-rw-r--r--usr/src/uts/intel/sys/acpi/acinterp.h44
-rw-r--r--usr/src/uts/intel/sys/acpi/aclocal.h96
-rw-r--r--usr/src/uts/intel/sys/acpi/acmacros.h445
-rw-r--r--usr/src/uts/intel/sys/acpi/acnames.h4
-rw-r--r--usr/src/uts/intel/sys/acpi/acnamesp.h45
-rw-r--r--usr/src/uts/intel/sys/acpi/acobject.h61
-rw-r--r--usr/src/uts/intel/sys/acpi/acopcode.h10
-rw-r--r--usr/src/uts/intel/sys/acpi/acoutput.h37
-rw-r--r--usr/src/uts/intel/sys/acpi/acparser.h8
-rw-r--r--usr/src/uts/intel/sys/acpi/acpi.h4
-rw-r--r--usr/src/uts/intel/sys/acpi/acpiosxf.h14
-rw-r--r--usr/src/uts/intel/sys/acpi/acpixf.h61
-rw-r--r--usr/src/uts/intel/sys/acpi/acresrc.h5
-rw-r--r--usr/src/uts/intel/sys/acpi/acstruct.h18
-rw-r--r--usr/src/uts/intel/sys/acpi/actables.h189
-rw-r--r--usr/src/uts/intel/sys/acpi/actbl.h377
-rw-r--r--usr/src/uts/intel/sys/acpi/actbl1.h1349
-rw-r--r--usr/src/uts/intel/sys/acpi/actbl2.h4
-rw-r--r--usr/src/uts/intel/sys/acpi/actypes.h257
-rw-r--r--usr/src/uts/intel/sys/acpi/acutils.h90
-rw-r--r--usr/src/uts/intel/sys/acpi/amlcode.h6
-rw-r--r--usr/src/uts/intel/sys/acpi/amlresrc.h4
-rw-r--r--usr/src/uts/intel/sys/acpi/platform/acefi.h4
-rw-r--r--usr/src/uts/intel/sys/acpi/platform/acenv.h9
-rw-r--r--usr/src/uts/intel/sys/acpi/platform/acfreebsd.h25
-rw-r--r--usr/src/uts/intel/sys/acpi/platform/acgcc.h4
-rw-r--r--usr/src/uts/intel/sys/acpi/platform/acintel.h6
-rw-r--r--usr/src/uts/intel/sys/acpi/platform/aclinux.h7
-rw-r--r--usr/src/uts/intel/sys/acpi/platform/acmsvc.h7
-rw-r--r--usr/src/uts/intel/sys/acpi/platform/acnetbsd.h4
-rw-r--r--usr/src/uts/intel/sys/acpi/platform/acos2.h178
-rw-r--r--usr/src/uts/intel/sys/acpi/platform/acsolaris.h16
-rw-r--r--usr/src/uts/intel/sys/acpi/platform/acwin.h42
-rw-r--r--usr/src/uts/intel/sys/acpi/platform/acwin64.h4
193 files changed, 14647 insertions, 10784 deletions
diff --git a/usr/src/tools/findunref/exception_list.open b/usr/src/tools/findunref/exception_list.open
index cf07dbd7ed..3252cb9829 100644
--- a/usr/src/tools/findunref/exception_list.open
+++ b/usr/src/tools/findunref/exception_list.open
@@ -23,8 +23,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
#
# open-tree exception list
@@ -243,6 +241,13 @@
./src/uts/sparc/audioixp/Makefile
#
+# Ignore uttrack.c. It is provided as part of the standard
+# ACPI CA source code but provides optional resource tracking
+# functionality which is not used.
+#
+./src/uts/intel/io/acpica/utilities/uttrack.c
+
+#
# Ignore any files that get used during a gcc build only.
#
./src/cmd/sgs/rtld/common/mapfile-order-gcc
diff --git a/usr/src/uts/common/io/power.c b/usr/src/uts/common/io/power.c
index 1d99d78bfd..70a122b478 100644
--- a/usr/src/uts/common/io/power.c
+++ b/usr/src/uts/common/io/power.c
@@ -23,7 +23,6 @@
* Use is subject to license terms.
*/
-
/*
* Power Button Driver
*
@@ -1074,13 +1073,13 @@ power_probe_method_button(struct power_soft_state *softsp)
static int
power_probe_fixed_button(struct power_soft_state *softsp)
{
- FADT_DESCRIPTOR *fadt;
+ ACPI_TABLE_FADT *fadt;
- if (AcpiGetFirmwareTable(FADT_SIG, 1, ACPI_LOGICAL_ADDRESSING,
- (ACPI_TABLE_HEADER **) &fadt) != AE_OK)
+ if (AcpiGetTable(ACPI_SIG_FADT, 1, (ACPI_TABLE_HEADER **) &fadt) !=
+ AE_OK)
return (0);
- if (!fadt->PwrButton) {
+ if ((fadt->Flags & ACPI_FADT_POWER_BUTTON) == 0) {
if (AcpiInstallFixedEventHandler(ACPI_EVENT_POWER_BUTTON,
power_acpi_fixed_event, (void *)softsp) == AE_OK)
return (1);
diff --git a/usr/src/uts/i86pc/cpu/amd_opteron/ao_mca.c b/usr/src/uts/i86pc/cpu/amd_opteron/ao_mca.c
index 06d8225033..ae5e5bcff4 100644
--- a/usr/src/uts/i86pc/cpu/amd_opteron/ao_mca.c
+++ b/usr/src/uts/i86pc/cpu/amd_opteron/ao_mca.c
@@ -871,19 +871,19 @@ ao_ms_mca_init(cmi_hdl_t hdl, int nbanks)
static int
ao_acpi_find_smicmd(int *asd_port)
{
- FADT_DESCRIPTOR *fadt = NULL;
+ ACPI_TABLE_FADT *fadt = NULL;
/*
- * AcpiGetFirmwareTable works even if ACPI is disabled, so a failure
+ * AcpiGetTable works even if ACPI is disabled, so a failure
* here means we weren't able to retreive a pointer to the FADT.
*/
- if (AcpiGetFirmwareTable(FADT_SIG, 1, ACPI_LOGICAL_ADDRESSING,
- (ACPI_TABLE_HEADER **)&fadt) != AE_OK)
+ if (AcpiGetTable(ACPI_SIG_FADT, 1, (ACPI_TABLE_HEADER **)&fadt) !=
+ AE_OK)
return (-1);
ASSERT(fadt != NULL);
- *asd_port = fadt->SmiCmd;
+ *asd_port = fadt->SmiCommand;
return (0);
}
diff --git a/usr/src/uts/i86pc/io/cpudrv/cpu_acpi.c b/usr/src/uts/i86pc/io/cpudrv/cpu_acpi.c
index e19363e12a..569ca2fc92 100644
--- a/usr/src/uts/i86pc/io/cpudrv/cpu_acpi.c
+++ b/usr/src/uts/i86pc/io/cpudrv/cpu_acpi.c
@@ -517,7 +517,8 @@ cpu_acpi_cache_present_capabilities(cpu_acpi_handle_t handle,
abuf.Length = ACPI_ALLOCATE_BUFFER;
abuf.Pointer = NULL;
if (ACPI_FAILURE(AcpiEvaluateObject(handle->cs_handle,
- cpu_acpi_obj_attrs[objtype].name, NULL, &abuf))) {
+ cpu_acpi_obj_attrs[objtype].name, NULL, &abuf)) ||
+ abuf.Length == 0) {
*pc = 0;
return (1);
}
diff --git a/usr/src/uts/i86pc/io/mp_platform_common.c b/usr/src/uts/i86pc/io/mp_platform_common.c
index 5c06a5ae95..a796804176 100644
--- a/usr/src/uts/i86pc/io/mp_platform_common.c
+++ b/usr/src/uts/i86pc/io/mp_platform_common.c
@@ -313,16 +313,16 @@ typedef struct prs_irq_list_ent {
int apic_enable_acpi = 0;
/* ACPI Multiple APIC Description Table ptr */
-static MULTIPLE_APIC_TABLE *acpi_mapic_dtp = NULL;
+static ACPI_TABLE_MADT *acpi_mapic_dtp = NULL;
/* ACPI Interrupt Source Override Structure ptr */
-static MADT_INTERRUPT_OVERRIDE *acpi_isop = NULL;
+static ACPI_MADT_INTERRUPT_OVERRIDE *acpi_isop = NULL;
static int acpi_iso_cnt = 0;
/* ACPI Non-maskable Interrupt Sources ptr */
-static MADT_NMI_SOURCE *acpi_nmi_sp = NULL;
+static ACPI_MADT_NMI_SOURCE *acpi_nmi_sp = NULL;
static int acpi_nmi_scnt = 0;
-static MADT_LOCAL_APIC_NMI *acpi_nmi_cp = NULL;
+static ACPI_MADT_LOCAL_APIC_NMI *acpi_nmi_cp = NULL;
static int acpi_nmi_ccnt = 0;
/*
@@ -595,17 +595,17 @@ acpi_probe(char *modname)
uint32_t id, ver;
int acpi_verboseflags = 0;
int madt_seen, madt_size;
- APIC_HEADER *ap;
- MADT_PROCESSOR_APIC *mpa;
- MADT_PROCESSOR_X2APIC *mpx2a;
- MADT_IO_APIC *mia;
- MADT_IO_SAPIC *misa;
- MADT_INTERRUPT_OVERRIDE *mio;
- MADT_NMI_SOURCE *mns;
- MADT_INTERRUPT_SOURCE *mis;
- MADT_LOCAL_APIC_NMI *mlan;
- MADT_LOCAL_X2APIC_NMI *mx2alan;
- MADT_ADDRESS_OVERRIDE *mao;
+ ACPI_SUBTABLE_HEADER *ap;
+ ACPI_MADT_LOCAL_APIC *mpa;
+ ACPI_MADT_LOCAL_X2APIC *mpx2a;
+ ACPI_MADT_IO_APIC *mia;
+ ACPI_MADT_IO_SAPIC *misa;
+ ACPI_MADT_INTERRUPT_OVERRIDE *mio;
+ ACPI_MADT_NMI_SOURCE *mns;
+ ACPI_MADT_INTERRUPT_SOURCE *mis;
+ ACPI_MADT_LOCAL_APIC_NMI *mlan;
+ ACPI_MADT_LOCAL_X2APIC_NMI *mx2alan;
+ ACPI_MADT_LOCAL_APIC_OVERRIDE *mao;
int sci;
iflag_t sci_flags;
volatile uint32_t *ioapic;
@@ -617,11 +617,11 @@ acpi_probe(char *modname)
if (!apic_use_acpi)
return (PSM_FAILURE);
- if (AcpiGetFirmwareTable(APIC_SIG, 1, ACPI_LOGICAL_ADDRESSING,
+ if (AcpiGetTable(ACPI_SIG_MADT, 1,
(ACPI_TABLE_HEADER **) &acpi_mapic_dtp) != AE_OK)
return (PSM_FAILURE);
- apicadr = mapin_apic((uint32_t)acpi_mapic_dtp->LocalApicAddress,
+ apicadr = mapin_apic((uint32_t)acpi_mapic_dtp->Address,
APIC_LOCAL_MEMLEN, PROT_READ | PROT_WRITE);
if (!apicadr)
return (PSM_FAILURE);
@@ -641,21 +641,21 @@ acpi_probe(char *modname)
CPUSET_ONLY(apic_cpumask, 0);
apic_io_max = 0;
- ap = (APIC_HEADER *) (acpi_mapic_dtp + 1);
- madt_size = acpi_mapic_dtp->Length;
+ ap = (ACPI_SUBTABLE_HEADER *) (acpi_mapic_dtp + 1);
+ madt_size = acpi_mapic_dtp->Header.Length;
madt_seen = sizeof (*acpi_mapic_dtp);
while (madt_seen < madt_size) {
switch (ap->Type) {
- case APIC_PROCESSOR:
- mpa = (MADT_PROCESSOR_APIC *) ap;
- if (mpa->ProcessorEnabled) {
- if (mpa->LocalApicId == local_ids[0]) {
+ case ACPI_MADT_TYPE_LOCAL_APIC:
+ mpa = (ACPI_MADT_LOCAL_APIC *) ap;
+ if (mpa->LapicFlags & ACPI_MADT_ENABLED) {
+ if (mpa->Id == local_ids[0]) {
proc_ids[0] = mpa->ProcessorId;
acpica_map_cpu(0, mpa->ProcessorId);
} else if (apic_nproc < NCPU && use_mp &&
apic_nproc < boot_ncpus) {
- local_ids[index] = mpa->LocalApicId;
+ local_ids[index] = mpa->Id;
proc_ids[index] = mpa->ProcessorId;
CPUSET_ADD(apic_cpumask, index);
acpica_map_cpu(index, mpa->ProcessorId);
@@ -668,13 +668,13 @@ acpi_probe(char *modname)
}
break;
- case APIC_IO:
- mia = (MADT_IO_APIC *) ap;
+ case ACPI_MADT_TYPE_IO_APIC:
+ mia = (ACPI_MADT_IO_APIC *) ap;
if (apic_io_max < MAX_IO_APIC) {
ioapic_ix = apic_io_max;
- apic_io_id[apic_io_max] = mia->IoApicId;
+ apic_io_id[apic_io_max] = mia->Id;
apic_io_vectbase[apic_io_max] =
- mia->Interrupt;
+ mia->GlobalIrqBase;
apic_physaddr[apic_io_max] =
(uint32_t)mia->Address;
ioapic = apicioadr[apic_io_max] =
@@ -688,67 +688,65 @@ acpi_probe(char *modname)
}
break;
- case APIC_XRUPT_OVERRIDE:
- mio = (MADT_INTERRUPT_OVERRIDE *) ap;
+ case ACPI_MADT_TYPE_INTERRUPT_OVERRIDE:
+ mio = (ACPI_MADT_INTERRUPT_OVERRIDE *) ap;
if (acpi_isop == NULL)
acpi_isop = mio;
acpi_iso_cnt++;
break;
- case APIC_NMI:
+ case ACPI_MADT_TYPE_NMI_SOURCE:
/* UNIMPLEMENTED */
- mns = (MADT_NMI_SOURCE *) ap;
+ mns = (ACPI_MADT_NMI_SOURCE *) ap;
if (acpi_nmi_sp == NULL)
acpi_nmi_sp = mns;
acpi_nmi_scnt++;
- cmn_err(CE_NOTE, "!apic: nmi source: %d %d %d\n",
- mns->Interrupt, mns->Polarity,
- mns->TriggerMode);
+ cmn_err(CE_NOTE, "!apic: nmi source: %d 0x%x\n",
+ mns->GlobalIrq, mns->IntiFlags);
break;
- case APIC_LOCAL_NMI:
+ case ACPI_MADT_TYPE_LOCAL_APIC_NMI:
/* UNIMPLEMENTED */
- mlan = (MADT_LOCAL_APIC_NMI *) ap;
+ mlan = (ACPI_MADT_LOCAL_APIC_NMI *) ap;
if (acpi_nmi_cp == NULL)
acpi_nmi_cp = mlan;
acpi_nmi_ccnt++;
- cmn_err(CE_NOTE, "!apic: local nmi: %d %d %d %d\n",
- mlan->ProcessorId, mlan->Polarity,
- mlan->TriggerMode, mlan->Lint);
+ cmn_err(CE_NOTE, "!apic: local nmi: %d 0x%x %d\n",
+ mlan->ProcessorId, mlan->IntiFlags,
+ mlan->Lint);
break;
- case APIC_ADDRESS_OVERRIDE:
+ case ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE:
/* UNIMPLEMENTED */
- mao = (MADT_ADDRESS_OVERRIDE *) ap;
+ mao = (ACPI_MADT_LOCAL_APIC_OVERRIDE *) ap;
cmn_err(CE_NOTE, "!apic: address override: %lx\n",
(long)mao->Address);
break;
- case APIC_IO_SAPIC:
+ case ACPI_MADT_TYPE_IO_SAPIC:
/* UNIMPLEMENTED */
- misa = (MADT_IO_SAPIC *) ap;
+ misa = (ACPI_MADT_IO_SAPIC *) ap;
cmn_err(CE_NOTE, "!apic: io sapic: %d %d %lx\n",
- misa->IoSapicId, misa->InterruptBase,
+ misa->Id, misa->GlobalIrqBase,
(long)misa->Address);
break;
- case APIC_XRUPT_SOURCE:
+ case ACPI_MADT_TYPE_INTERRUPT_SOURCE:
/* UNIMPLEMENTED */
- mis = (MADT_INTERRUPT_SOURCE *) ap;
+ mis = (ACPI_MADT_INTERRUPT_SOURCE *) ap;
cmn_err(CE_NOTE,
- "!apic: irq source: %d %d %d %d %d %d %d\n",
- mis->ProcessorId, mis->ProcessorEid,
- mis->Interrupt, mis->Polarity,
- mis->TriggerMode, mis->InterruptType,
+ "!apic: irq source: %d %d %d 0x%x %d %d\n",
+ mis->Id, mis->Eid, mis->GlobalIrq,
+ mis->IntiFlags, mis->Type,
mis->IoSapicVector);
break;
- case X2APIC_PROCESSOR:
- mpx2a = (MADT_PROCESSOR_X2APIC *) ap;
+ case ACPI_MADT_TYPE_LOCAL_X2APIC:
+ mpx2a = (ACPI_MADT_LOCAL_X2APIC *) ap;
/*
* All logical processors with APIC ID values
@@ -758,15 +756,13 @@ acpi_probe(char *modname)
* 255 will have their APIC reported through
* Processor Local APIC.
*/
- if ((mpx2a->ProcessorEnabled) &&
- (mpx2a->X2LocalApicId >> 8)) {
+ if ((mpx2a->LapicFlags & ACPI_MADT_ENABLED) &&
+ (mpx2a->LocalApicId >> 8)) {
if (apic_nproc < NCPU && use_mp &&
apic_nproc < boot_ncpus) {
- local_ids[index] =
- mpx2a->X2LocalApicId;
+ local_ids[index] = mpx2a->LocalApicId;
CPUSET_ADD(apic_cpumask, index);
- acpica_map_cpu(index,
- mpx2a->ProcessorUID);
+ acpica_map_cpu(index, mpx2a->Uid);
index++;
apic_nproc++;
} else if (apic_nproc == NCPU) {
@@ -778,27 +774,28 @@ acpi_probe(char *modname)
break;
- case X2APIC_LOCAL_NMI:
+ case ACPI_MADT_TYPE_LOCAL_X2APIC_NMI:
/* UNIMPLEMENTED */
- mx2alan = (MADT_LOCAL_X2APIC_NMI *) ap;
- if (mx2alan->ProcessorUID >> 8)
+ mx2alan = (ACPI_MADT_LOCAL_X2APIC_NMI *) ap;
+ if (mx2alan->Uid >> 8)
acpi_nmi_ccnt++;
#ifdef DEBUG
- cmn_err(CE_NOTE, "!apic: local x2apic nmi: %d %d %d %d"
- "\n", mx2alan->ProcessorUID, mx2alan->Polarity,
- mx2alan->TriggerMode, mx2alan->Lint);
+ cmn_err(CE_NOTE,
+ "!apic: local x2apic nmi: %d 0x%x %d\n",
+ mx2alan->Uid, mx2alan->IntiFlags, mx2alan->Lint);
#endif
break;
+ case ACPI_MADT_TYPE_RESERVED:
default:
break;
}
/* advance to next entry */
madt_seen += ap->Length;
- ap = (APIC_HEADER *)(((char *)ap) + ap->Length);
+ ap = (ACPI_SUBTABLE_HEADER *)(((char *)ap) + ap->Length);
}
apic_cpus_size = apic_nproc * sizeof (*apic_cpus);
@@ -1758,8 +1755,8 @@ apic_introp_xlate(dev_info_t *dip, struct intrspec *ispec, int type)
uchar_t ipin;
struct apic_io_intr *intrp;
iflag_t intr_flag;
- APIC_HEADER *hp;
- MADT_INTERRUPT_OVERRIDE *isop;
+ ACPI_SUBTABLE_HEADER *hp;
+ ACPI_MADT_INTERRUPT_OVERRIDE *isop;
apic_irq_t *airqp;
int parent_is_pci_or_pciex = 0;
int child_is_pciex = 0;
@@ -1862,18 +1859,23 @@ nonpci:
if (apic_enable_acpi && !apic_use_acpi_madt_only) {
/* search iso entries first */
if (acpi_iso_cnt != 0) {
- hp = (APIC_HEADER *)acpi_isop;
+ hp = (ACPI_SUBTABLE_HEADER *)acpi_isop;
i = 0;
while (i < acpi_iso_cnt) {
- if (hp->Type == APIC_XRUPT_OVERRIDE) {
- isop = (MADT_INTERRUPT_OVERRIDE *)hp;
+ if (hp->Type ==
+ ACPI_MADT_TYPE_INTERRUPT_OVERRIDE) {
+ isop =
+ (ACPI_MADT_INTERRUPT_OVERRIDE *) hp;
if (isop->Bus == 0 &&
- isop->Source == irqno) {
- newirq = isop->Interrupt;
+ isop->SourceIrq == irqno) {
+ newirq = isop->GlobalIrq;
intr_flag.intr_po =
- isop->Polarity;
+ isop->IntiFlags &
+ ACPI_MADT_POLARITY_MASK;
intr_flag.intr_el =
- isop->TriggerMode;
+ (isop->IntiFlags &
+ ACPI_MADT_TRIGGER_MASK)
+ >> 2;
intr_flag.bustype = BUS_ISA;
return (apic_setup_irq_table(
@@ -1883,7 +1885,7 @@ nonpci:
}
i++;
}
- hp = (APIC_HEADER *)(((char *)hp) +
+ hp = (ACPI_SUBTABLE_HEADER *)(((char *)hp) +
hp->Length);
}
}
diff --git a/usr/src/uts/i86pc/io/pciex/npe_misc.c b/usr/src/uts/i86pc/io/pciex/npe_misc.c
index 775eb97e0b..e017bb42d9 100644
--- a/usr/src/uts/i86pc/io/pciex/npe_misc.c
+++ b/usr/src/uts/i86pc/io/pciex/npe_misc.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Library file that has miscellaneous support for npe(7d)
*/
@@ -73,14 +71,14 @@ npe_query_acpi_mcfg(dev_info_t *dip)
uint64_t ecfga_base;
/* Query the MCFG table using ACPI */
- if (AcpiGetFirmwareTable(MCFG_SIG, 1, ACPI_LOGICAL_ADDRESSING,
- (ACPI_TABLE_HEADER **)&mcfgp) == AE_OK) {
+ if (AcpiGetTable(ACPI_SIG_MCFG, 1, (ACPI_TABLE_HEADER **)&mcfgp) ==
+ AE_OK) {
cfg_baap = (CFG_BASE_ADDR_ALLOC *)mcfgp->CfgBaseAddrAllocList;
cfg_baa_endp = ((char *)mcfgp) + mcfgp->Length;
while ((char *)cfg_baap < cfg_baa_endp) {
- ecfga_base = ACPI_GET_ADDRESS(cfg_baap->base_addr);
+ ecfga_base = cfg_baap->base_addr;
if (ecfga_base != (uint64_t)0) {
/*
* Setup the 'ecfga-base-address' property to
diff --git a/usr/src/uts/i86pc/io/ppm/acpippm.c b/usr/src/uts/i86pc/io/ppm/acpippm.c
index 788f5f247b..4a2343bfc1 100644
--- a/usr/src/uts/i86pc/io/ppm/acpippm.c
+++ b/usr/src/uts/i86pc/io/ppm/acpippm.c
@@ -24,7 +24,6 @@
* Use is subject to license terms.
*/
-
#include <sys/types.h>
#include <sys/conf.h>
#include <sys/open.h>
@@ -50,7 +49,7 @@
* acpippm driver is loaded because it is listed as a platform driver
* It is initially configured as a pseudo driver.
*/
-extern void pc_tod_set_rtc_offsets(FADT_DESCRIPTOR *);
+extern void pc_tod_set_rtc_offsets(ACPI_TABLE_FADT *);
/*
* Configuration Function prototypes and data structures
@@ -197,7 +196,7 @@ appm_attach(dev_info_t *dip, ddi_attach_cmd_t cmd)
char *str = "appm_attach";
int instance;
appm_unit *unitp;
- FADT_DESCRIPTOR *fadt = NULL;
+ ACPI_TABLE_FADT *fadt = NULL;
int rv = DDI_SUCCESS;
switch (cmd) {
@@ -255,7 +254,7 @@ appm_attach(dev_info_t *dip, ddi_attach_cmd_t cmd)
goto doerrs;
/* Get the FADT */
- if (AcpiGetFirmwareTable(FADT_SIG, 1, ACPI_LOGICAL_ADDRESSING,
+ if (AcpiGetTable(ACPI_SIG_FADT, 1,
(ACPI_TABLE_HEADER **)&fadt) != AE_OK)
return (rv);
diff --git a/usr/src/uts/i86pc/io/ppm/acpisleep.c b/usr/src/uts/i86pc/io/ppm/acpisleep.c
index 0842d33b5e..025dc5e152 100644
--- a/usr/src/uts/i86pc/io/ppm/acpisleep.c
+++ b/usr/src/uts/i86pc/io/ppm/acpisleep.c
@@ -102,8 +102,8 @@ acpi_enter_sleepstate(s3a_t *s3ap)
PMD(PMD_SX, ("Can't EnableEvent(POWER_BUTTON)\n"))
}
if (acpi_rtc_wake > 0) {
- (void) AcpiSetRegister(ACPI_BITREG_RT_CLOCK_STATUS, 1,
- ACPI_MTX_DO_NOT_LOCK); /* clear the RTC bit first */
+ /* clear the RTC bit first */
+ (void) AcpiSetRegister(ACPI_BITREG_RT_CLOCK_STATUS, 1);
PT(PT_RTCW);
if (AcpiEnableEvent(ACPI_EVENT_RTC, 0) != AE_OK) {
PT(PT_RTCW_FAIL);
diff --git a/usr/src/uts/i86pc/io/psm/psm_common.c b/usr/src/uts/i86pc/io/psm/psm_common.c
index a409a99c7a..0fc7c56474 100644
--- a/usr/src/uts/i86pc/io/psm/psm_common.c
+++ b/usr/src/uts/i86pc/io/psm/psm_common.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/types.h>
#include <sys/param.h>
#include <sys/cmn_err.h>
@@ -134,8 +132,8 @@ acpi_get_gsiv(dev_info_t *dip, ACPI_HANDLE pciobj, int devno, int ipin,
/* NULL Source name means index is GSIV */
if (*prtp->Source == 0) {
- intr_flagp->intr_el = TRIGGER_LEVEL;
- intr_flagp->intr_po = POLARITY_ACTIVE_LOW;
+ intr_flagp->intr_el = INTR_EL_LEVEL;
+ intr_flagp->intr_po = INTR_PO_ACTIVE_LOW;
ASSERT(pci_irqp != NULL);
*pci_irqp = prtp->SourceIndex;
status = ACPI_PSM_SUCCESS;
@@ -407,9 +405,8 @@ acpi_translate_pci_irq(dev_info_t *dip, int ipin, int *pci_irqp,
parentdip = ddi_get_parent(curdip);
ASSERT(parentdip != NULL);
- if (get_bdf(curdip, &curbus, &curdev, NULL) != 0) {
+ if (get_bdf(curdip, &curbus, &curdev, NULL) != 0)
break;
- }
status = acpica_get_handle(parentdip, &pciobj);
if ((status == AE_OK) && psm_node_has_prt(pciobj)) {
diff --git a/usr/src/uts/i86pc/io/todpc_subr.c b/usr/src/uts/i86pc/io/todpc_subr.c
index 5b92cb9077..aca0fb0c29 100644
--- a/usr/src/uts/i86pc/io/todpc_subr.c
+++ b/usr/src/uts/i86pc/io/todpc_subr.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -31,8 +31,6 @@
/* Copyright (c) 1987, 1988 Microsoft Corporation */
/* All Rights Reserved */
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/param.h>
#include <sys/time.h>
#include <sys/systm.h>
@@ -88,7 +86,7 @@ static struct rtc_offset pc_rtc_offset = {0, 0, 0, 0};
* are useful to TOD.
*/
void
-pc_tod_set_rtc_offsets(FADT_DESCRIPTOR *fadt) {
+pc_tod_set_rtc_offsets(ACPI_TABLE_FADT *fadt) {
int ok = 0;
/*
@@ -101,13 +99,13 @@ pc_tod_set_rtc_offsets(FADT_DESCRIPTOR *fadt) {
return;
}
- if (fadt->DayAlrm) {
- pc_rtc_offset.day_alrm = fadt->DayAlrm;
+ if (fadt->DayAlarm) {
+ pc_rtc_offset.day_alrm = fadt->DayAlarm;
ok = 1;
}
- if (fadt->MonAlrm) {
- pc_rtc_offset.mon_alrm = fadt->MonAlrm;
+ if (fadt->MonthAlarm) {
+ pc_rtc_offset.mon_alrm = fadt->MonthAlarm;
ok = 1;
}
diff --git a/usr/src/uts/intel/Makefile.files b/usr/src/uts/intel/Makefile.files
index 2dafd11af0..8d063307dc 100644
--- a/usr/src/uts/intel/Makefile.files
+++ b/usr/src/uts/intel/Makefile.files
@@ -202,15 +202,15 @@ ACPICA_OBJS += dbcmds.o dbdisply.o \
nsutils.o nswalk.o nsxfeval.o nsxfname.o nsxfobj.o \
rsaddr.o rscalc.o rscreate.o rsdump.o \
rsinfo.o rsio.o rsirq.o rslist.o rsmemory.o rsmisc.o \
- rsutils.o rsxface.o tbconvrt.o tbget.o tbgetall.o \
- tbinstal.o tbrsdt.o tbutils.o tbxface.o tbxfroot.o \
+ rsutils.o rsxface.o tbfadt.o tbfind.o tbinstal.o \
+ tbutils.o tbxface.o tbxfroot.o \
utalloc.o utclib.o utcopy.o utdebug.o utdelete.o \
uteval.o utglobal.o utinit.o utmath.o utmisc.o \
utobject.o utresrc.o utxface.o acpica.o acpi_enum.o \
master_ops.o osl.o osl_ml.o acpica_ec.o utcache.o \
utmutex.o utstate.o dmbuffer.o dmnames.o dmobject.o \
dmopcode.o dmresrc.o dmresrcl.o dmresrcs.o dmutils.o \
- dmwalk.o psloop.o uttrack.o
+ dmwalk.o psloop.o
ACPI_INTP_OBJS += acpi_inf.o acpi_mod.o acpi_ml.o \
acpi_decl.o acpi_exe.o acpi_gram.o acpi_io.o acpi_lex.o \
diff --git a/usr/src/uts/intel/Makefile.rules b/usr/src/uts/intel/Makefile.rules
index 989328fbbf..7ae7bdf8d0 100644
--- a/usr/src/uts/intel/Makefile.rules
+++ b/usr/src/uts/intel/Makefile.rules
@@ -109,15 +109,15 @@ $(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/hardware/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/interpreter/dispatcher/%.c
+$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/dispatcher/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/interpreter/executer/%.c
+$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/executer/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
-$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/interpreter/parser/%.c
+$(OBJS_DIR)/%.o: $(UTSBASE)/intel/io/acpica/parser/%.c
$(COMPILE.c) -o $@ $<
$(CTFCONVERT_O)
@@ -349,13 +349,13 @@ $(LINTS_DIR)/%.ln: $(UTSBASE)/intel/io/acpica/events/%.c
$(LINTS_DIR)/%.ln: $(UTSBASE)/intel/io/acpica/hardware/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/intel/io/acpica/interpreter/dispatcher/%.c
+$(LINTS_DIR)/%.ln: $(UTSBASE)/intel/io/acpica/dispatcher/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/intel/io/acpica/interpreter/executer/%.c
+$(LINTS_DIR)/%.ln: $(UTSBASE)/intel/io/acpica/executer/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
-$(LINTS_DIR)/%.ln: $(UTSBASE)/intel/io/acpica/interpreter/parser/%.c
+$(LINTS_DIR)/%.ln: $(UTSBASE)/intel/io/acpica/parser/%.c
@($(LHEAD) $(LINT.c) $< $(LTAIL))
$(LINTS_DIR)/%.ln: $(UTSBASE)/intel/io/acpica/namespace/%.c
diff --git a/usr/src/uts/intel/io/acpica/acpi_enum.c b/usr/src/uts/intel/io/acpica/acpi_enum.c
index 6842c3c335..3eea87cd2e 100644
--- a/usr/src/uts/intel/io/acpica/acpi_enum.c
+++ b/usr/src/uts/intel/io/acpica/acpi_enum.c
@@ -779,7 +779,8 @@ isa_acpi_callback(ACPI_HANDLE ObjHandle, uint32_t NestingLevel, void *a,
*/
rb.Length = ACPI_ALLOCATE_BUFFER;
rb.Pointer = NULL;
- if (AcpiEvaluateObject(ObjHandle, "_CID", NULL, &rb) == AE_OK) {
+ if (AcpiEvaluateObject(ObjHandle, "_CID", NULL, &rb) == AE_OK &&
+ rb.Length != 0) {
ACPI_OBJECT *rv = rb.Pointer;
switch (rv->Type) {
diff --git a/usr/src/uts/intel/io/acpica/acpica.c b/usr/src/uts/intel/io/acpica/acpica.c
index 98044e8e3d..25b6f1dab7 100644
--- a/usr/src/uts/intel/io/acpica/acpica.c
+++ b/usr/src/uts/intel/io/acpica/acpica.c
@@ -19,16 +19,13 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Solaris x86 ACPI CA services
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-
#include <sys/file.h>
#include <sys/errno.h>
#include <sys/conf.h>
@@ -218,7 +215,7 @@ acpica_check_bios_date(int yy, int mm, int dd)
* as valid.
*/
- if ((int)AcpiOsMapMemory(0xffff5, 8, (void **) &datep) != AE_OK)
+ if ((datep = (char *)AcpiOsMapMemory(0xffff5, 8)) == NULL)
return (FALSE);
/* year */
@@ -269,8 +266,8 @@ acpica_metro_old_bios()
ACPI_TABLE_HEADER *fadt;
/* get the FADT */
- if (AcpiGetFirmwareTable(FADT_SIG, 1, ACPI_LOGICAL_ADDRESSING,
- (ACPI_TABLE_HEADER **)&fadt) != AE_OK)
+ if (AcpiGetTable(ACPI_SIG_FADT, 1, (ACPI_TABLE_HEADER **)&fadt) !=
+ AE_OK)
return (FALSE);
/* compare OEM Table ID to "SUNmetro" - no match, return false */
@@ -387,18 +384,22 @@ acpica_init()
mutex_enter(&acpica_module_lock);
if (acpica_init_state == ACPICA_NOT_INITIALIZED) {
- if ((status = AcpiLoadTables()) != AE_OK) {
+ if (ACPI_FAILURE(status = AcpiInitializeTables(NULL, 0, 0)))
goto error;
- }
- if ((status = acpica_install_handlers()) != AE_OK) {
+
+ if (ACPI_FAILURE(status = AcpiLoadTables()))
goto error;
- }
- if ((status = AcpiEnableSubsystem(acpi_init_level)) != AE_OK) {
+
+ if (ACPI_FAILURE(status = acpica_install_handlers()))
goto error;
- }
- if ((status = AcpiInitializeObjects(0)) != AE_OK) {
+
+ if (ACPI_FAILURE(status = AcpiEnableSubsystem(
+ acpi_init_level)))
goto error;
- }
+
+ if (ACPI_FAILURE(status = AcpiInitializeObjects(0)))
+ goto error;
+
/*
* Initialize EC
*/
@@ -434,10 +435,10 @@ error:
ACPI_STATUS
acpica_get_sci(int *sci_irq, iflag_t *sci_flags)
{
- APIC_HEADER *ap;
- MULTIPLE_APIC_TABLE *mat;
- MADT_INTERRUPT_OVERRIDE *mio;
- FADT_DESCRIPTOR *fadt;
+ ACPI_SUBTABLE_HEADER *ap;
+ ACPI_TABLE_MADT *mat;
+ ACPI_MADT_INTERRUPT_OVERRIDE *mio;
+ ACPI_TABLE_FADT *fadt;
int madt_seen, madt_size;
@@ -461,38 +462,39 @@ acpica_get_sci(int *sci_irq, iflag_t *sci_flags)
sci_flags->bustype = BUS_PCI; /* we *do* conform to PCI */
/* get the SCI from the FADT */
- if (AcpiGetFirmwareTable(FADT_SIG, 1, ACPI_LOGICAL_ADDRESSING,
- (ACPI_TABLE_HEADER **)&fadt) != AE_OK)
+ if (AcpiGetTable(ACPI_SIG_FADT, 1, (ACPI_TABLE_HEADER **)&fadt) !=
+ AE_OK)
return (AE_ERROR);
- *sci_irq = fadt->SciInt;
+ *sci_irq = fadt->SciInterrupt;
/* search for ISOs that modify it */
/* if we don't find a MADT, that's OK; no ISOs then */
- if (AcpiGetFirmwareTable(APIC_SIG, 1, ACPI_LOGICAL_ADDRESSING,
- (ACPI_TABLE_HEADER **) &mat) != AE_OK) {
+ if (AcpiGetTable(ACPI_SIG_MADT, 1, (ACPI_TABLE_HEADER **) &mat) !=
+ AE_OK)
return (AE_OK);
- }
- ap = (APIC_HEADER *) (mat + 1);
- madt_size = mat->Length;
+ ap = (ACPI_SUBTABLE_HEADER *) (mat + 1);
+ madt_size = mat->Header.Length;
madt_seen = sizeof (*mat);
while (madt_seen < madt_size) {
switch (ap->Type) {
- case APIC_XRUPT_OVERRIDE:
- mio = (MADT_INTERRUPT_OVERRIDE *) ap;
- if (mio->Source == *sci_irq) {
- *sci_irq = mio->Interrupt;
- sci_flags->intr_el = mio->TriggerMode;
- sci_flags->intr_po = mio->Polarity;
+ case ACPI_MADT_TYPE_INTERRUPT_OVERRIDE:
+ mio = (ACPI_MADT_INTERRUPT_OVERRIDE *) ap;
+ if (mio->SourceIrq == *sci_irq) {
+ *sci_irq = mio->GlobalIrq;
+ sci_flags->intr_el = (mio->IntiFlags &
+ ACPI_MADT_TRIGGER_MASK) >> 2;
+ sci_flags->intr_po = mio->IntiFlags &
+ ACPI_MADT_POLARITY_MASK;
}
break;
}
/* advance to next entry */
madt_seen += ap->Length;
- ap = (APIC_HEADER *)(((char *)ap) + ap->Length);
+ ap = (ACPI_SUBTABLE_HEADER *)(((char *)ap) + ap->Length);
}
/*
@@ -552,7 +554,7 @@ acpica_ddi_setwake(dev_info_t *dip, int level)
*/
status = AcpiEvaluateObject(devobj, "_PRW", NULL, &prw_buf);
prw = prw_buf.Pointer;
- if (ACPI_FAILURE(status) || prw == NULL ||
+ if (ACPI_FAILURE(status) || prw_buf.Length == 0 || prw == NULL ||
prw->Type != ACPI_TYPE_PACKAGE || prw->Package.Count < 2 ||
prw->Package.Elements[1].Type != ACPI_TYPE_INTEGER) {
cmn_err(CE_NOTE, "acpica_ddi_setwake: could not "
@@ -610,7 +612,7 @@ acpica_init_kstats()
{
ACPI_HANDLE s3handle;
ACPI_STATUS status;
- FADT_DESCRIPTOR *fadt;
+ ACPI_TABLE_FADT *fadt;
kstat_named_t *knp;
/*
@@ -634,9 +636,8 @@ acpica_init_kstats()
* initialize kstat 'preferred_pm_profile' to the value
* contained in the (always present) FADT
*/
- status = AcpiGetFirmwareTable(FADT_SIG, 1, ACPI_LOGICAL_ADDRESSING,
- (ACPI_TABLE_HEADER **)&fadt);
- knp->value.l = (status == AE_OK) ? fadt->Prefer_PM_Profile : -1;
+ status = AcpiGetTable(ACPI_SIG_FADT, 1, (ACPI_TABLE_HEADER **)&fadt);
+ knp->value.l = (status == AE_OK) ? fadt->PreferredProfile : -1;
kstat_named_init(knp, "preferred_pm_profile", KSTAT_DATA_LONG);
/*
diff --git a/usr/src/uts/intel/io/acpica/acpica_ec.c b/usr/src/uts/intel/io/acpica/acpica_ec.c
index eee4b90803..54f9226dfe 100644
--- a/usr/src/uts/intel/io/acpica/acpica_ec.c
+++ b/usr/src/uts/intel/io/acpica/acpica_ec.c
@@ -19,15 +19,13 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Solaris x86 ACPI CA Embedded Controller operation region handler
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/file.h>
#include <sys/errno.h>
#include <sys/conf.h>
@@ -339,9 +337,7 @@ acpica_install_ec(ACPI_HANDLE obj, UINT32 nest, void *context, void **rv)
_NOTE(ARGUNUSED(nest, context, rv))
int status, i;
- ACPI_STATUS res;
ACPI_BUFFER buf, crs;
- ACPI_OBJECT *gpe_obj, *crs_obj;
ACPI_INTEGER gpe;
int io_port_cnt;
@@ -354,24 +350,19 @@ acpica_install_ec(ACPI_HANDLE obj, UINT32 nest, void *context, void **rv)
* Find ec_base and ec_sc addresses
*/
crs.Length = ACPI_ALLOCATE_BUFFER;
- res = AcpiEvaluateObject(obj, "_CRS", NULL, &crs);
- if (ACPI_FAILURE(res)) {
+ if (ACPI_FAILURE(AcpiEvaluateObjectTyped(obj, "_CRS", NULL, &crs,
+ ACPI_TYPE_BUFFER))) {
cmn_err(CE_WARN, "!acpica_install_ec: _CRS object evaluate"
"failed");
return (AE_OK);
}
- crs_obj = crs.Pointer;
- if (crs_obj->Type != ACPI_TYPE_BUFFER) {
- cmn_err(CE_WARN, "!acpica_install_ec: not a buffer");
- AcpiOsFree(crs.Pointer);
- return (AE_OK);
- }
- for (i = 0, io_port_cnt = 0; i < crs_obj->Buffer.Length; i++) {
+ for (i = 0, io_port_cnt = 0;
+ i < ((ACPI_OBJECT *)crs.Pointer)->Buffer.Length; i++) {
io_port_des_t *io_port;
uint8_t *tmp;
- tmp = crs_obj->Buffer.Pointer + i;
+ tmp = ((ACPI_OBJECT *)crs.Pointer)->Buffer.Pointer + i;
if (*tmp != IO_PORT_DES)
continue;
io_port = (io_port_des_t *)tmp;
@@ -412,18 +403,13 @@ acpica_install_ec(ACPI_HANDLE obj, UINT32 nest, void *context, void **rv)
/*
* grab contents of GPE object
*/
- if (ACPI_FAILURE(AcpiEvaluateObject(obj, "_GPE", NULL, &buf))) {
+ if (ACPI_FAILURE(AcpiEvaluateObjectTyped(obj, "_GPE", NULL, &buf,
+ ACPI_TYPE_INTEGER))) {
cmn_err(CE_WARN, "!acpica_install_ec: _GPE object evaluate"
"failed");
return (AE_OK);
}
- gpe_obj = buf.Pointer;
- if (gpe_obj->Type != ACPI_TYPE_INTEGER) {
- cmn_err(CE_WARN, "!acpica_install_ec: not an int");
- AcpiOsFree(buf.Pointer);
- return (AE_OK);
- }
- gpe = gpe_obj->Integer.Value;
+ gpe = ((ACPI_OBJECT *)buf.Pointer)->Integer.Value;
AcpiOsFree(buf.Pointer);
/*
@@ -451,8 +437,8 @@ acpica_install_ec(ACPI_HANDLE obj, UINT32 nest, void *context, void **rv)
*/
}
- status = AcpiSetGpeType(NULL, gpe, ACPI_GPE_TYPE_RUNTIME);
- status = AcpiEnableGpe(NULL, gpe, ACPI_NOT_ISR);
+ (void) AcpiSetGpeType(NULL, gpe, ACPI_GPE_TYPE_RUNTIME);
+ (void) AcpiEnableGpe(NULL, gpe, ACPI_NOT_ISR);
return (AE_OK);
}
@@ -492,8 +478,7 @@ acpica_probe_ecdt()
EC_BOOT_RESOURCES *ecdt;
- if (AcpiGetFirmwareTable("ECDT", 1, ACPI_LOGICAL_ADDRESSING,
- (ACPI_TABLE_HEADER **) &ecdt) != AE_OK) {
+ if (AcpiGetTable("ECDT", 1, (ACPI_TABLE_HEADER **) &ecdt) != AE_OK) {
cmn_err(CE_NOTE, "!acpica: ECDT not found\n");
return;
}
diff --git a/usr/src/uts/intel/io/acpica/changes.txt b/usr/src/uts/intel/io/acpica/changes.txt
index a7b0278cf5..2a9e7aa356 100644
--- a/usr/src/uts/intel/io/acpica/changes.txt
+++ b/usr/src/uts/intel/io/acpica/changes.txt
@@ -1,53 +1,1393 @@
----------------------------------------
+29 August 2008. Summary of changes for version 20080829:
+
+1) ACPI CA Core Subsystem:
+
+Completed a major cleanup of the internal ACPI_OPERAND_OBJECT of type
+Reference. Changes include the elimination of cheating on the Object field
+for the DdbHandle subtype, addition of a reference class field to
+differentiate the various reference types (instead of an AML opcode), and the
+cleanup of debug output for this object. Lin Ming, Bob Moore. BZ 723
+
+Reduce an error to a warning for an incorrect method argument count.
+Previously aborted with an error if too few arguments were passed to a
+control method via the external ACPICA interface. Now issue a warning instead
+and continue. Handles the case where the method inadvertently declares too
+many arguments, but does not actually use the extra ones. Applies mainly to
+the predefined methods. Lin Ming. Linux BZ 11032.
+
+Disallow the evaluation of named object types with no intrinsic value. Return
+AE_TYPE for objects that have no value and therefore evaluation is undefined:
+Device, Event, Mutex, Region, Thermal, and Scope. Previously, evaluation of
+these types were allowed, but an exception would be generated at some point
+during the evaluation. Now, the error is generated up front.
+
+Fixed a possible memory leak in the AcpiNsGetExternalPathname function
+(nsnames.c). Fixes a leak in the error exit path.
+
+Removed the obsolete debug levels ACPI_DB_WARN and ACPI_DB_ERROR. These debug
+levels were made obsolete by the ACPI_WARNING, ACPI_ERROR, and ACPI_EXCEPTION
+interfaces. Also added ACPI_DB_EVENTS to correspond with the existing
+ACPI_LV_EVENTS.
+
+Removed obsolete and/or unused exception codes from the acexcep.h header.
+There is the possibility that certain device drivers may be affected if they
+use any of these exceptions.
+
+The ACPICA documentation has been added to the public git source tree, under
+acpica/documents. Included are the ACPICA programmer reference, the iASL
+compiler reference, and the changes.txt release logfile.
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has a
+much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 79.7K Code, 16.4K Data, 96.1K Total
+ Debug Version: 153.9K Code, 48.4K Data, 202.3K Total
+ Current Release:
+ Non-Debug Version: 79.7K Code, 16.4K Data, 96.1K Total
+ Debug Version: 153.7K Code, 48.2K Data, 201.9K Total
+
+2) iASL Compiler/Disassembler and Tools:
+
+Allow multiple argument counts for the predefined _SCP method. ACPI 3.0
+defines _SCP with 3 arguments. Previous versions defined it with only 1
+argument. iASL now allows both definitions.
+
+iASL/disassembler: avoid infinite loop on bad ACPI tables. Check for zero-
+length subtables when disassembling ACPI tables. Also fixed a couple of
+errors where a full 16-bit table type field was not extracted from the input
+properly.
+
+acpisrc: Improve comment counting mechanism for generating source code
+statistics. Count first and last lines of multi-line comments as whitespace,
+not comment lines. Handle Linux legal header in addition to standard acpica
+header.
+
+----------------------------------------
+
+29 July 2008. Summary of changes for version 20080729:
+
+This release is available at http://acpica.org/downloads
+Direct git access via http://www.acpica.org/repos/acpica.git
+
+1) ACPI CA Core Subsystem:
+
+Fix a possible deadlock in the GPE dispatch. Remove call to
+AcpiHwDisableAllGpes during wake in AcpiEvGpeDispatch. This call will attempt
+to acquire the GPE lock but can deadlock since the GPE lock is already held
+at dispatch time. This code was introduced in version 20060831 as a response
+to Linux BZ 6881 and has since been removed from Linux.
+
+Add a function to dereference returned reference objects. Examines the return
+object from a call to AcpiEvaluateObject. Any Index or RefOf references are
+automatically dereferenced in an attempt to return something useful (these
+reference types cannot be converted into an external ACPI_OBJECT.) Provides
+MS compatibility. Lin Ming, Bob Moore. Linux BZ 11105
+
+x2APIC support: changes for MADT and SRAT ACPI tables. There are 2 new
+subtables for the MADT and one new subtable for the SRAT. Includes
+disassembler and AcpiSrc support. Data from the Intel 64 Architecture x2APIC
+Specification, June 2008.
+
+Additional error checking for pathname utilities. Add error check after all
+calls to AcpiNsGetPathnameLength. Add status return from
+AcpiNsBuildExternalPath and check after all calls. Add parameter validation
+to AcpiUtInitializeBuffer. Reported by and initial patch by Ingo Molnar.
+
+Return status from the global init function AcpiUtGlobalInitialize. This is
+used by both the kernel subsystem and the utilities such as iASL compiler.
+The function could possibly fail when the caches are initialized. Yang Yi.
+
+Add a function to decode reference object types to strings. Created for
+improved error messages.
+
+Improve object conversion error messages. Better error messages during object
+conversion from internal to the external ACPI_OBJECT. Used for external calls
+to AcpiEvaluateObject.
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has a
+much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 79.6K Code, 16.2K Data, 95.8K Total
+ Debug Version: 153.5K Code, 48.2K Data, 201.7K Total
+ Current Release:
+ Non-Debug Version: 79.7K Code, 16.4K Data, 96.1K Total
+ Debug Version: 153.9K Code, 48.4K Data, 202.3K Total
+
+2) iASL Compiler/Disassembler and Tools:
+
+Debugger: fix a possible hang when evaluating non-methods. Fixes a problem
+introduced in version 20080701. If the object being evaluated (via execute
+command) is not a method, the debugger can hang while trying to obtain non-
+existent parameters.
+
+iASL: relax error for using reserved "_T_x" identifiers. These names can
+appear in a disassembled ASL file if they were emitted by the original
+compiler. Instead of issuing an error or warning and forcing the user to
+manually change these names, issue a remark instead.
+
+iASL: error if named object created in while loop. Emit an error if any named
+object is created within a While loop. If allowed, this code will generate a
+run-time error on the second iteration of the loop when an attempt is made to
+create the same named object twice. ACPICA bugzilla 730.
+
+iASL: Support absolute pathnames for include files. Add support for absolute
+pathnames within the Include operator. previously, only relative pathnames
+were supported.
+
+iASL: Enforce minimum 1 interrupt in interrupt macro and Resource Descriptor.
+The ACPI spec requires one interrupt minimum. BZ 423
+
+iASL: Handle a missing ResourceSource arg, with a present SourceIndex.
+Handles the case for the Interrupt Resource Descriptor where
+the ResourceSource argument is omitted but ResourceSourceIndex
+is present. Now leave room for the Index. BZ 426
+
+iASL: Prevent error message if CondRefOf target does not exist. Fixes cases
+where an error message is emitted if the target does not exist. BZ 516
+
+iASL: Fix broken -g option (get Windows ACPI tables). Fixes the -g option
+(get ACPI tables on Windows). This was apparently broken in version 20070919.
+
+AcpiXtract: Handle EOF while extracting data. Correctly handle the case where
+the EOF happens immediately after the last table in the input file. Print
+completion message. Previously, no message was displayed in this case.
+
+----------------------------------------
+01 July 2008. Summary of changes for version 20080701:
+
+This release is available at http://acpica.org/downloads
+Direct git access via http://www.acpica.org/repos/acpica.git
+
+0) Git source tree / acpica.org
+
+Fixed a problem where a git-clone from http would not transfer the entire
+source
+tree.
+
+1) ACPI CA Core Subsystem:
+
+Implemented a "careful" GPE disable in AcpiEvDisableGpe, only modify one
+enable
+bit. Now performs a read-change-write of the enable register instead of
+simply
+writing out the cached enable mask. This will prevent inadvertent enabling of
+GPEs if a rogue GPE is received during initialization (before GPE handlers
+are
+installed.)
+
+Implemented a copy for dynamically loaded tables. Previously, dynamically
+loaded
+tables were simply mapped - but on some machines this memory is corrupted
+after
+suspend. Now copy the table to a local buffer. For the OpRegion case, added
+checksum verify. Use the table length from the table header, not the region
+length. For the Buffer case, use the table length also. Dennis Noordsij, Bob
+Moore. BZ 10734
+
+Fixed a problem where the same ACPI table could not be dynamically loaded and
+unloaded more than once. Without this change, a table cannot be loaded again
+once it has been loaded/unloaded one time. The current mechanism does not
+unregister a table upon an unload. During a load, if the same table is found,
+this no longer returns an exception. BZ 722
+
+Fixed a problem where the wrong descriptor length was calculated for the
+EndTag
+descriptor in 64-bit mode. The "minimal" descriptors such as EndTag are
+calculated as 12 bytes long, but the actual length in the internal descriptor
+is
+16 because of the round-up to 8 on the 64-bit build. Reported by Linn
+Crosetto.
+BZ 728
+
+Fixed a possible memory leak in the Unload operator. The DdbHandle returned
+by
+Load() did not have its reference count decremented during unload, leading to
+a
+memory leak. Lin Ming. BZ 727
+
+Fixed a possible memory leak when deleting thermal/processor objects. Any
+associated notify handlers (and objects) were not being deleted. Fiodor
+Suietov.
+BZ 506
+
+Fixed the ordering of the ASCII names in the global mutex table to match the
+actual mutex IDs. Used by AcpiUtGetMutexName, a function used for debug only.
+Vegard Nossum. BZ 726
+
+Enhanced the AcpiGetObjectInfo interface to return the number of required
+arguments if the object is a control method. Added this call to the debugger
+so
+the proper number of default arguments are passed to a method. This prevents
+a
+warning when executing methods from AcpiExec.
+
+Added a check for an invalid handle in AcpiGetObjectInfo. Return
+AE_BAD_PARAMETER if input handle is invalid. BZ 474
+
+Fixed an extraneous warning from exconfig.c on the 64-bit build.
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug
+version of the code includes the debug output trace mechanism and has a much
+larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 79.3K Code, 16.2K Data, 95.5K Total
+ Debug Version: 153.0K Code, 48.2K Data, 201.2K Total
+ Current Release:
+ Non-Debug Version: 79.6K Code, 16.2K Data, 95.8K Total
+ Debug Version: 153.5K Code, 48.2K Data, 201.7K Total
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL: Added two missing ACPI reserved names. Added _MTP and _ASZ, both
+resource
+descriptor names.
+
+iASL: Detect invalid ASCII characters in input (windows version). Removed the
+"-
+CF" flag from the flex compile, enables correct detection of non-ASCII
+characters in the input. BZ 441
+
+iASL: Eliminate warning when result of LoadTable is not used. Eliminate the
+"result of operation not used" warning when the DDB handle returned from
+LoadTable is not used. The warning is not needed. BZ 590
+
+AcpiExec: Add support for dynamic table load/unload. Now calls _CFG method to
+pass address of table to the AML. Added option to disable OpRegion simulation
+to
+allow creation of an OpRegion with a real address that was passed to _CFG.
+All
+of this allows testing of the Load and Unload operators from AcpiExec.
+
+Debugger: update tables command for unloaded tables. Handle unloaded tables
+and
+use the standard table header output routine.
+
+----------------------------------------
+09 June 2008. Summary of changes for version 20080609:
+
+1) ACPI CA Core Subsystem:
+
+Implemented a workaround for reversed _PRT entries. A significant number of
+BIOSs erroneously reverse the _PRT SourceName and the SourceIndex. This
+change dynamically detects and repairs this problem. Provides compatibility
+with MS ACPI. BZ 6859
+
+Simplified the internal ACPI hardware interfaces to eliminate the locking
+flag parameter from Register Read/Write. Added a new external interface,
+AcpiGetRegisterUnlocked.
+
+Fixed a problem where the invocation of a GPE control method could hang. This
+was a regression introduced in 20080514. The new method argument count
+validation mechanism can enter an infinite loop when a GPE method is
+dispatched. Problem fixed by removing the obsolete code that passed GPE block
+information to the notify handler via the control method parameter pointer.
+
+Fixed a problem where the _SST execution status was incorrectly returned to
+the caller of AcpiEnterSleepStatePrep. This was a regression introduced in
+20080514. _SST is optional and a NOT_FOUND exception should never be
+returned. BZ 716
+
+Fixed a problem where a deleted object could be accessed from within the AML
+parser. This was a regression introduced in version 20080123 as a fix for the
+Unload operator. Lin Ming. BZ 10669
+
+Cleaned up the debug operand dump mechanism. Eliminated unnecessary operands
+and eliminated the use of a negative index in a loop. Operands are now
+displayed in the correct order, not backwards. This also fixes a regression
+introduced in 20080514 on 64-bit systems where the elimination of
+ACPI_NATIVE_UINT caused the negative index to go large and positive. BZ 715
+
+Fixed a possible memory leak in EvPciConfigRegionSetup where the error exit
+path did not delete a locally allocated structure.
+
+Updated definitions for the DMAR and SRAT tables to synchronize with the
+current specifications. Includes disassembler support.
+
+Fixed a problem in the mutex debug code (in utmutex.c) where an incorrect
+loop termination value was used. Loop terminated on iteration early, missing
+one mutex. Linn Crosetto
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has a
+much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 79.5K Code, 16.2K Data, 95.7K Total
+ Debug Version: 153.3K Code, 48.3K Data, 201.6K Total
+ Current Release:
+ Non-Debug Version: 79.3K Code, 16.2K Data, 95.5K Total
+ Debug Version: 153.0K Code, 48.2K Data, 201.2K Total
+
+2) iASL Compiler/Disassembler and Tools:
+
+Disassembler: Implemented support for EisaId() within _CID objects. Now
+disassemble integer _CID objects back to EisaId invocations, including
+multiple integers within _CID packages. Includes single-step support for
+debugger also.
+
+Disassembler: Added support for DMAR and SRAT table definition changes.
+
+----------------------------------------
+14 May 2008. Summary of changes for version 20080514:
+
+1) ACPI CA Core Subsystem:
+
+Fixed a problem where GPEs were enabled too early during the ACPICA
+initialization. This could lead to "handler not installed" errors on some
+machines. Moved GPE enable until after _REG/_STA/_INI methods are run. This
+ensures that all operation regions and devices throughout the namespace have
+been initialized before GPEs are enabled. Alexey Starikovskiy, BZ 9916.
+
+Implemented a change to the enter sleep code. Moved execution of the _GTS
+method to just before setting sleep enable bit. The execution was moved from
+AcpiEnterSleepStatePrep to AcpiEnterSleepState. _GTS is now executed
+immediately before the SLP_EN bit is set, as per the ACPI specification.
+Luming Yu, BZ 1653.
+
+Implemented a fix to disable unknown GPEs (2nd version). Now always disable
+the GPE, even if ACPICA thinks that that it is already disabled. It is
+possible that the AML or some other code has enabled the GPE unbeknownst to
+the ACPICA code.
+
+Fixed a problem with the Field operator where zero-length fields would return
+an AE_AML_NO_OPERAND exception during table load. Fix enables zero-length ASL
+field declarations in Field(), BankField(), and IndexField(). BZ 10606.
+
+Implemented a fix for the Load operator, now load the table at the namespace
+root. This reverts a change introduced in version 20071019. The table is now
+loaded at the namespace root even though this goes against the ACPI
+specification. This provides compatibility with other ACPI implementations.
+The ACPI specification will be updated to reflect this in ACPI 4.0. Lin Ming.
+
+Fixed a problem where ACPICA would not Load() tables with unusual signatures.
+Now ignore ACPI table signature for Load() operator. Only "SSDT" is
+acceptable to the ACPI spec, but tables are seen with OEMx and null sigs.
+Therefore, signature validation is worthless. Apparently MS ACPI accepts such
+signatures, ACPICA must be compatible. BZ 10454.
+
+Fixed a possible negative array index in AcpiUtValidateException. Added NULL
+fields to the exception string arrays to eliminate a -1 subtraction on the
+SubStatus field.
+
+Updated the debug tracking macros to reduce overall code and data size.
+Changed ACPI_MODULE_NAME and ACPI_FUNCTION_NAME to use arrays of strings
+instead of pointers to static strings. Jan Beulich and Bob Moore.
+
+Implemented argument count checking in control method invocation via
+AcpiEvaluateObject. Now emit an error if too few arguments, warning if too
+many. This applies only to extern programmatic control method execution, not
+method-to-method calls within the AML. Lin Ming.
+
+Eliminated the ACPI_NATIVE_UINT type across all ACPICA code. This type is no
+longer needed, especially with the removal of 16-bit support. It was replaced
+mostly with UINT32, but also ACPI_SIZE where a type that changes 32/64 bit on
+32/64-bit platforms is required.
+
+Added the C const qualifier for appropriate string constants -- mostly
+MODULE_NAME and printf format strings. Jan Beulich.
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has a
+much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 80.0K Code, 17.4K Data, 97.4K Total
+ Debug Version: 159.4K Code, 64.4K Data, 223.8K Total
+ Current Release:
+ Non-Debug Version: 79.5K Code, 16.2K Data, 95.7K Total
+ Debug Version: 153.3K Code, 48.3K Data, 201.6K Total
+
+2) iASL Compiler/Disassembler and Tools:
+
+Implemented ACPI table revision ID validation in the disassembler. Zero is
+always invalid. For DSDTs, the ID controls the interpreter integer width. 1
+means 32-bit and this is unusual. 2 or greater is 64-bit.
+
+----------------------------------------
+21 March 2008. Summary of changes for version 20080321:
+
+1) ACPI CA Core Subsystem:
+
+Implemented an additional change to the GPE support in order to suppress
+spurious or stray GPEs. The AcpiEvDisableGpe function will now permanently
+disable incoming GPEs that are neither enabled nor disabled -- meaning that
+the GPE is unknown to the system. This should prevent future interrupt floods
+from that GPE. BZ 6217 (Zhang Rui)
+
+Fixed a problem where NULL package elements were not returned to the
+AcpiEvaluateObject interface correctly. The element was simply ignored
+instead of returning a NULL ACPI_OBJECT package element, potentially causing
+a buffer overflow and/or confusing the caller who expected a fixed number of
+elements. BZ 10132 (Lin Ming, Bob Moore)
+
+Fixed a problem with the CreateField, CreateXXXField (Bit, Byte, Word, Dword,
+Qword), Field, BankField, and IndexField operators when invoked from inside
+an executing control method. In this case, these operators created namespace
+nodes that were incorrectly left marked as permanent nodes instead of
+temporary nodes. This could cause a problem if there is race condition
+between an exiting control method and a running namespace walk. (Reported by
+Linn Crosetto)
+
+Fixed a problem where the CreateField and CreateXXXField operators would
+incorrectly allow duplicate names (the name of the field) with no exception
+generated.
+
+Implemented several changes for Notify handling. Added support for new Notify
+values (ACPI 2.0+) and improved the Notify debug output. Notify on
+PowerResource objects is no longer allowed, as per the ACPI specification.
+(Bob Moore, Zhang Rui)
+
+All Reference Objects returned via the AcpiEvaluateObject interface are now
+marked as type "REFERENCE" instead of "ANY". The type ANY is now reserved for
+NULL objects - either NULL package elements or unresolved named references.
+
+Fixed a problem where an extraneous debug message was produced for package
+objects (when debugging enabled). The message "Package List length larger
+than NumElements count" is now produced in the correct case, and is now an
+error message rather than a debug message. Added a debug message for the
+opposite case, where NumElements is larger than the Package List (the package
+will be padded out with NULL elements as per the ACPI spec.)
+
+Implemented several improvements for the output of the ASL "Debug" object to
+clarify and keep all data for a given object on one output line.
+
+Fixed two size calculation issues with the variable-length Start Dependent
+resource descriptor.
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 79.7K Code, 17.3K Data, 97.0K Total
+ Debug Version: 158.9K Code, 64.0K Data, 222.9K Total
+ Current Release:
+ Non-Debug Version: 80.0K Code, 17.4K Data, 97.4K Total
+ Debug Version: 159.4K Code, 64.4K Data, 223.8K Total
+
+2) iASL Compiler/Disassembler and Tools:
+
+Fixed a problem with the use of the Switch operator where execution of the
+containing method by multiple concurrent threads could cause an
+AE_ALREADY_EXISTS exception. This is caused by the fact that there is no
+actual Switch opcode, it must be simulated with local named temporary
+variables and if/else pairs. The solution chosen was to mark any method that
+uses Switch as Serialized, thus preventing multiple thread entries. BZ 469.
+
+----------------------------------------
+13 February 2008. Summary of changes for version 20080213:
+
+1) ACPI CA Core Subsystem:
+
+Implemented another MS compatibility design change for GPE/Notify handling.
+GPEs are now cleared/enabled asynchronously to allow all pending notifies to
+complete first. It is expected that the OSL will queue the enable request
+behind all pending notify requests (may require changes to the local host OSL
+in AcpiOsExecute). Alexey Starikovskiy.
+
+Fixed a problem where buffer and package objects passed as arguments to a
+control method via the external AcpiEvaluateObject interface could cause an
+AE_AML_INTERNAL exception depending on the order and type of operators
+executed by the target control method.
+
+Fixed a problem where resource descriptor size optimization could cause a
+problem when a _CRS resource template is passed to a _SRS method. The _SRS
+resource template must use the same descriptors (with the same size) as
+returned from _CRS. This change affects the following resource descriptors:
+IRQ / IRQNoFlags and StartDependendentFn / StartDependentFnNoPri. (BZ 9487)
+
+Fixed a problem where a CopyObject to RegionField, BankField, and IndexField
+objects did not perform an implicit conversion as it should. These types must
+retain their initial type permanently as per the ACPI specification. However,
+a CopyObject to all other object types should not perform an implicit
+conversion, as per the ACPI specification. (Lin Ming, Bob Moore) BZ 388
+
+Fixed a problem with the AcpiGetDevices interface where the mechanism to
+match device CIDs did not examine the entire list of available CIDs, but
+instead aborted on the first non-matching CID. Andrew Patterson.
+
+Fixed a regression introduced in version 20071114. The ACPI_HIDWORD macro was
+inadvertently changed to return a 16-bit value instead of a 32-bit value,
+truncating the upper dword of a 64-bit value. This macro is only used to
+display debug output, so no incorrect calculations were made. Also,
+reimplemented the macro so that a 64-bit shift is not performed by
+inefficient compilers.
+
+Added missing va_end statements that should correspond with each va_start
+statement.
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 79.5K Code, 17.2K Data, 96.7K Total
+ Debug Version: 159.0K Code, 63.8K Data, 222.8K Total
+ Current Release:
+ Non-Debug Version: 79.7K Code, 17.3K Data, 97.0K Total
+ Debug Version: 158.9K Code, 64.0K Data, 222.9K Total
+
+2) iASL Compiler/Disassembler and Tools:
+
+Implemented full disassembler support for the following new ACPI tables:
+BERT, EINJ, and ERST. Implemented partial disassembler support for the
+complicated HEST table. These tables support the Windows Hardware Error
+Architecture (WHEA).
+
+----------------------------------------
+23 January 2008. Summary of changes for version 20080123:
+
+1) ACPI CA Core Subsystem:
+
+Added the 2008 copyright to all module headers and signons. This affects
+virtually every file in the ACPICA core subsystem, the iASL compiler, and
+the tools/utilities.
+
+Fixed a problem with the SizeOf operator when used with Package and Buffer
+objects. These objects have deferred execution for some arguments, and the
+execution is now completed before the SizeOf is executed. This problem caused
+unexpected AE_PACKAGE_LIMIT errors on some systems (Lin Ming, Bob Moore) BZ
+9558
+
+Implemented an enhancement to the interpreter "slack mode". In the absence of
+an explicit return or an implicitly returned object from the last executed
+opcode, a control method will now implicitly return an integer of value 0 for
+Microsoft compatibility. (Lin Ming) BZ 392
+
+Fixed a problem with the Load operator where an exception was not returned in
+the case where the table is already loaded. (Lin Ming) BZ 463
+
+Implemented support for the use of DDBHandles as an Indexed Reference, as per
+the ACPI spec. (Lin Ming) BZ 486
+
+Implemented support for UserTerm (Method invocation) for the Unload operator
+as per the ACPI spec. (Lin Ming) BZ 580
+
+Fixed a problem with the LoadTable operator where the OemId and OemTableId
+input strings could cause unexpected failures if they were shorter than the
+maximum lengths allowed. (Lin Ming, Bob Moore) BZ 576
+
+Implemented support for UserTerm (Method invocation) for the Unload operator
+as per the ACPI spec. (Lin Ming) BZ 580
+
+Implemented header file support for new ACPI tables - BERT, ERST, EINJ, HEST,
+IBFT, UEFI, WDAT. Disassembler support is forthcoming.
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 79.3K Code, 17.2K Data, 96.5K Total
+ Debug Version: 158.6K Code, 63.8K Data, 222.4K Total
+ Current Release:
+ Non-Debug Version: 79.5K Code, 17.2K Data, 96.7K Total
+ Debug Version: 159.0K Code, 63.8K Data, 222.8K Total
+
+2) iASL Compiler/Disassembler and Tools:
+
+Implemented support in the disassembler for checksum validation on incoming
+binary DSDTs and SSDTs. If incorrect, a message is displayed within the table
+header dump at the start of the disassembly.
+
+Implemented additional debugging information in the namespace listing file
+created during compilation. In addition to the namespace hierarchy, the full
+pathname to each namespace object is displayed.
+
+Fixed a problem with the disassembler where invalid ACPI tables could cause
+faults or infinite loops.
+
+Fixed an unexpected parse error when using the optional "parameter types"
+list in a control method declaration. (Lin Ming) BZ 397
+
+Fixed a problem where two External declarations with the same name did not
+cause an error (Lin Ming) BZ 509
+
+Implemented support for full TermArgs (adding Argx, Localx and method
+invocation) for the ParameterData parameter to the LoadTable operator. (Lin
+Ming) BZ 583,587
+
+----------------------------------------
+19 December 2007. Summary of changes for version 20071219:
+
+1) ACPI CA Core Subsystem:
+
+Implemented full support for deferred execution for the TermArg string
+arguments for DataTableRegion. This enables forward references and full
+operand resolution for the three string arguments. Similar to OperationRegion
+deferred argument execution.) Lin Ming. BZ 430
+
+Implemented full argument resolution support for the BankValue argument to
+BankField. Previously, only constants were supported, now any TermArg may be
+used. Lin Ming BZ 387, 393
+
+Fixed a problem with AcpiGetDevices where the search of a branch of the
+device tree could be terminated prematurely. In accordance with the ACPI
+specification, the search down the current branch is terminated if a device
+is both not present and not functional (instead of just not present.) Yakui
+Zhao.
+
+Fixed a problem where "unknown" GPEs could be allowed to fire repeatedly if
+the underlying AML code changed the GPE enable registers. Now, any unknown
+incoming GPE (no _Lxx/_Exx method and not the EC GPE) is immediately disabled
+instead of simply ignored. Rui Zhang.
+
+Fixed a problem with Index Fields where the Index register was incorrectly
+limited to a maximum of 32 bits. Now any size may be used.
+
+Fixed a couple memory leaks associated with "implicit return" objects when
+the AML Interpreter slack mode is enabled. Lin Ming BZ 349
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 79.0K Code, 17.2K Data, 96.2K Total
+ Debug Version: 157.9K Code, 63.6K Data, 221.5K Total
+ Current Release:
+ Non-Debug Version: 79.3K Code, 17.2K Data, 96.5K Total
+ Debug Version: 158.6K Code, 63.8K Data, 222.4K Total
+
+----------------------------------------
+14 November 2007. Summary of changes for version 20071114:
+
+1) ACPI CA Core Subsystem:
+
+Implemented event counters for each of the Fixed Events, the ACPI SCI
+(interrupt) itself, and control methods executed. Named
+AcpiFixedEventCount[], AcpiSciCount, and AcpiMethodCount respectively. These
+should be useful for debugging and statistics.
+
+Implemented a new external interface, AcpiGetStatistics, to retrieve the
+contents of the various event counters. Returns the current values for
+AcpiSciCount, AcpiGpeCount, the AcpiFixedEventCount array, and
+AcpiMethodCount. The interface can be expanded in the future if new counters
+are added. Device drivers should use this interface rather than access the
+counters directly.
+
+Fixed a problem with the FromBCD and ToBCD operators. With some compilers,
+the ShortDivide function worked incorrectly, causing problems with the BCD
+functions with large input values. A truncation from 64-bit to 32-bit
+inadvertently occurred. Internal BZ 435. Lin Ming
+
+Fixed a problem with Index references passed as method arguments. References
+passed as arguments to control methods were dereferenced immediately (before
+control was passed to the called method). The references are now correctly
+passed directly to the called method. BZ 5389. Lin Ming
+
+Fixed a problem with CopyObject used in conjunction with the Index operator.
+The reference was incorrectly dereferenced before the copy. The reference is
+now correctly copied. BZ 5391. Lin Ming
+
+Fixed a problem with Control Method references within Package objects. These
+references are now correctly generated. This completes the package
+construction overhaul that began in version 20071019.
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 78.8K Code, 17.2K Data, 96.0K Total
+ Debug Version: 157.2K Code, 63.4K Data, 220.6K Total
+ Current Release:
+ Non-Debug Version: 79.0K Code, 17.2K Data, 96.2K Total
+ Debug Version: 157.9K Code, 63.6K Data, 221.5K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+The AcpiExec utility now installs handlers for all of the predefined
+Operation Region types. New types supported are: PCI_Config, CMOS, and
+PCIBARTarget.
+
+Fixed a problem with the 64-bit version of AcpiExec where the extended (64-
+bit) address fields for the DSDT and FACS within the FADT were not being
+used, causing truncation of the upper 32-bits of these addresses. Lin Ming
+and Bob Moore
+
+----------------------------------------
+19 October 2007. Summary of changes for version 20071019:
+
+1) ACPI CA Core Subsystem:
+
+Fixed a problem with the Alias operator when the target of the alias is a
+named ASL operator that opens a new scope -- Scope, Device, PowerResource,
+Processor, and ThermalZone. In these cases, any children of the original
+operator could not be accessed via the alias, potentially causing unexpected
+AE_NOT_FOUND exceptions. (BZ 9067)
+
+Fixed a problem with the Package operator where all named references were
+created as object references and left otherwise unresolved. According to the
+ACPI specification, a Package can only contain Data Objects or references to
+control methods. The implication is that named references to Data Objects
+(Integer, Buffer, String, Package, BufferField, Field) should be resolved
+immediately upon package creation. This is the approach taken with this
+change. References to all other named objects (Methods, Devices, Scopes,
+etc.) are all now properly created as reference objects. (BZ 5328)
+
+Reverted a change to Notify handling that was introduced in version
+20070508. This version changed the Notify handling from asynchronous to
+fully synchronous (Device driver Notify handling with respect to the Notify
+ASL operator). It was found that this change caused more problems than it
+solved and was removed by most users.
+
+Fixed a problem with the Increment and Decrement operators where the type of
+the target object could be unexpectedly and incorrectly changed. (BZ 353)
+Lin Ming.
+
+Fixed a problem with the Load and LoadTable operators where the table
+location within the namespace was ignored. Instead, the table was always
+loaded into the root or current scope. Lin Ming.
+
+Fixed a problem with the Load operator when loading a table from a buffer
+object. The input buffer was prematurely zeroed and/or deleted. (BZ 577)
+
+Fixed a problem with the Debug object where a store of a DdbHandle reference
+object to the Debug object could cause a fault.
+
+Added a table checksum verification for the Load operator, in the case where
+the load is from a buffer. (BZ 578).
+
+Implemented additional parameter validation for the LoadTable operator. The
+length of the input strings SignatureString, OemIdString, and OemTableId are
+now checked for maximum lengths. (BZ 582) Lin Ming.
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 78.5K Code, 17.1K Data, 95.6K Total
+ Debug Version: 156.7K Code, 63.2K Data, 219.9K Total
+ Current Release:
+ Non-Debug Version: 78.8K Code, 17.2K Data, 96.0K Total
+ Debug Version: 157.2K Code, 63.4K Data, 220.6K Total
+
+
+2) iASL Compiler/Disassembler:
+
+Fixed a problem where if a single file was specified and the file did not
+exist, no error message was emitted. (Introduced with wildcard support in
+version 20070917.)
+
+----------------------------------------
+19 September 2007. Summary of changes for version 20070919:
+
+1) ACPI CA Core Subsystem:
+
+Designed and implemented new external interfaces to install and remove
+handlers for ACPI table-related events. Current events that are defined are
+LOAD and UNLOAD. These interfaces allow the host to track ACPI tables as
+they are dynamically loaded and unloaded. See AcpiInstallTableHandler and
+AcpiRemoveTableHandler. (Lin Ming and Bob Moore)
+
+Fixed a problem where the use of the AcpiGbl_AllMethodsSerialized flag
+(acpi_serialized option on Linux) could cause some systems to hang during
+initialization. (Bob Moore) BZ 8171
+
+Fixed a problem where objects of certain types (Device, ThermalZone,
+Processor, PowerResource) can be not found if they are declared and
+referenced from within the same control method (Lin Ming) BZ 341
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 78.3K Code, 17.0K Data, 95.3K Total
+ Debug Version: 156.3K Code, 63.1K Data, 219.4K Total
+ Current Release:
+ Non-Debug Version: 78.5K Code, 17.1K Data, 95.6K Total
+ Debug Version: 156.7K Code, 63.2K Data, 219.9K Total
+
+
+2) iASL Compiler/Disassembler:
+
+Implemented support to allow multiple files to be compiled/disassembled in a
+single invocation. This includes command line wildcard support for both the
+Windows and Unix versions of the compiler. This feature simplifies the
+disassembly and compilation of multiple ACPI tables in a single directory.
+
+----------------------------------------
+08 May 2007. Summary of changes for version 20070508:
+
+1) ACPI CA Core Subsystem:
+
+Implemented a Microsoft compatibility design change for the handling of the
+Notify AML operator. Previously, notify handlers were dispatched and
+executed completely asynchronously in a deferred thread. The new design
+still executes the notify handlers in a different thread, but the original
+thread that executed the Notify() now waits at a synchronization point for
+the notify handler to complete. Some machines depend on a synchronous Notify
+operator in order to operate correctly.
+
+Implemented support to allow Package objects to be passed as method
+arguments to the external AcpiEvaluateObject interface. Previously, this
+would return the AE_NOT_IMPLEMENTED exception. This feature had not been
+implemented since there were no reserved control methods that required it
+until recently.
+
+Fixed a problem with the internal FADT conversion where ACPI 1.0 FADTs that
+contained invalid non-zero values in reserved fields could cause later
+failures because these fields have meaning in later revisions of the FADT.
+For incoming ACPI 1.0 FADTs, these fields are now always zeroed. (The fields
+are: Preferred_PM_Profile, PSTATE_CNT, CST_CNT, and IAPC_BOOT_FLAGS.)
+
+Fixed a problem where the Global Lock handle was not properly updated if a
+thread that acquired the Global Lock via executing AML code then attempted
+to acquire the lock via the AcpiAcquireGlobalLock interface. Reported by Joe
+Liu.
+
+Fixed a problem in AcpiEvDeleteGpeXrupt where the global interrupt list
+could be corrupted if the interrupt being removed was at the head of the
+list. Reported by Linn Crosetto.
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 78.0K Code, 17.1K Data, 95.1K Total
+ Debug Version: 155.9K Code, 63.1K Data, 219.0K Total
+ Current Release:
+ Non-Debug Version: 78.3K Code, 17.0K Data, 95.3K Total
+ Debug Version: 156.3K Code, 63.1K Data, 219.4K Total
+
+----------------------------------------
+20 March 2007. Summary of changes for version 20070320:
+
+1) ACPI CA Core Subsystem:
+
+Implemented a change to the order of interpretation and evaluation of AML
+operand objects within the AML interpreter. The interpreter now evaluates
+operands in the order that they appear in the AML stream (and the
+corresponding ASL code), instead of in the reverse order (after the entire
+operand list has been parsed). The previous behavior caused several subtle
+incompatibilities with the Microsoft AML interpreter as well as being
+somewhat non-intuitive. BZ 7871, local BZ 263. Valery Podrezov.
+
+Implemented a change to the ACPI Global Lock support. All interfaces to the
+global lock now allow the same thread to acquire the lock multiple times.
+This affects the AcpiAcquireGlobalLock external interface to the global lock
+as well as the internal use of the global lock to support AML fields -- a
+control method that is holding the global lock can now simultaneously access
+AML fields that require global lock protection. Previously, in both cases,
+this would have resulted in an AE_ALREADY_ACQUIRED exception. The change to
+AcpiAcquireGlobalLock is of special interest to drivers for the Embedded
+Controller. There is no change to the behavior of the AML Acquire operator,
+as this can already be used to acquire a mutex multiple times by the same
+thread. BZ 8066. With assistance from Alexey Starikovskiy.
+
+Fixed a problem where invalid objects could be referenced in the AML
+Interpreter after error conditions. During operand evaluation, ensure that
+the internal "Return Object" field is cleared on error and only valid
+pointers are stored there. Caused occasional access to deleted objects that
+resulted in "large reference count" warning messages. Valery Podrezov.
+
+Fixed a problem where an AE_STACK_OVERFLOW internal exception could occur on
+deeply nested control method invocations. BZ 7873, local BZ 487. Valery
+Podrezov.
+
+Fixed an internal problem with the handling of result objects on the
+interpreter result stack. BZ 7872. Valery Podrezov.
+
+Removed obsolete code that handled the case where AML_NAME_OP is the target
+of a reference (Reference.Opcode). This code was no longer necessary. BZ
+7874. Valery Podrezov.
+
+Removed obsolete ACPI_NO_INTEGER64_SUPPORT from two header files. This was a
+remnant from the previously discontinued 16-bit support.
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 78.0K Code, 17.1K Data, 95.1K Total
+ Debug Version: 155.8K Code, 63.3K Data, 219.1K Total
+ Current Release:
+ Non-Debug Version: 78.0K Code, 17.1K Data, 95.1K Total
+ Debug Version: 155.9K Code, 63.1K Data, 219.0K Total
+
+----------------------------------------
+26 January 2007. Summary of changes for version 20070126:
+
+1) ACPI CA Core Subsystem:
+
+Added the 2007 copyright to all module headers and signons. This affects
+virtually every file in the ACPICA core subsystem, the iASL compiler, and
+the utilities.
+
+Implemented a fix for an incorrect parameter passed to AcpiTbDeleteTable
+during a table load. A bad pointer was passed in the case where the DSDT is
+overridden, causing a fault in this case.
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 78.0K Code, 17.1K Data, 95.1K Total
+ Debug Version: 155.8K Code, 63.3K Data, 219.1K Total
+ Current Release:
+ Non-Debug Version: 78.0K Code, 17.1K Data, 95.1K Total
+ Debug Version: 155.8K Code, 63.3K Data, 219.1K Total
+
+----------------------------------------
+15 December 2006. Summary of changes for version 20061215:
+
+1) ACPI CA Core Subsystem:
+
+Support for 16-bit ACPICA has been completely removed since it is no longer
+necessary and it clutters the code. All 16-bit macros, types, and
+conditional compiles have been removed, cleaning up and simplifying the code
+across the entire subsystem. DOS support is no longer needed since the
+bootable Linux firmware kit is now available.
+
+The handler for the Global Lock is now removed during AcpiTerminate to
+enable a clean subsystem restart, via the implementation of the
+AcpiEvRemoveGlobalLockHandler function. (With assistance from Joel Bretz,
+HP)
+
+Implemented enhancements to the multithreading support within the debugger
+to enable improved multithreading debugging and evaluation of the subsystem.
+(Valery Podrezov)
+
+Debugger: Enhanced the Statistics/Memory command to emit the total (maximum)
+memory used during the execution, as well as the maximum memory consumed by
+each of the various object types. (Valery Podrezov)
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 77.9K Code, 17.0K Data, 94.9K Total
+ Debug Version: 155.2K Code, 63.1K Data, 218.3K Total
+ Current Release:
+ Non-Debug Version: 78.0K Code, 17.1K Data, 95.1K Total
+ Debug Version: 155.8K Code, 63.3K Data, 219.1K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+AcpiExec: Implemented a new option (-m) to display full memory use
+statistics upon subsystem/program termination. (Valery Podrezov)
+
+----------------------------------------
+09 November 2006. Summary of changes for version 20061109:
+
+1) ACPI CA Core Subsystem:
+
+Optimized the Load ASL operator in the case where the source operand is an
+operation region. Simply map the operation region memory, instead of
+performing a bytewise read. (Region must be of type SystemMemory, see
+below.)
+
+Fixed the Load ASL operator for the case where the source operand is a
+region field. A buffer object is also allowed as the source operand. BZ 480
+
+Fixed a problem where the Load ASL operator allowed the source operand to be
+an operation region of any type. It is now restricted to regions of type
+SystemMemory, as per the ACPI specification. BZ 481
+
+Additional cleanup and optimizations for the new Table Manager code.
+
+AcpiEnable will now fail if all of the required ACPI tables are not loaded
+(FADT, FACS, DSDT). BZ 477
+
+Added #pragma pack(8/4) to acobject.h to ensure that the structures in this
+header are always compiled as aligned. The ACPI_OPERAND_OBJECT has been
+manually optimized to be aligned and will not work if it is byte-packed.
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 78.1K Code, 17.1K Data, 95.2K Total
+ Debug Version: 155.4K Code, 63.1K Data, 218.5K Total
+ Current Release:
+ Non-Debug Version: 77.9K Code, 17.0K Data, 94.9K Total
+ Debug Version: 155.2K Code, 63.1K Data, 218.3K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+Fixed a problem where the presence of the _OSI predefined control method
+within complex expressions could cause an internal compiler error.
+
+AcpiExec: Implemented full region support for multiple address spaces.
+SpaceId is now part of the REGION object. BZ 429
+
+----------------------------------------
+11 October 2006. Summary of changes for version 20061011:
+
+1) ACPI CA Core Subsystem:
+
+Completed an AML interpreter performance enhancement for control method
+execution. Previously a 2-pass parse/execution, control methods are now
+completely parsed and executed in a single pass. This improves overall
+interpreter performance by ~25%, reduces code size, and reduces CPU stack
+use. (Valery Podrezov + interpreter changes in version 20051202 that
+eliminated namespace loading during the pass one parse.)
+
+Implemented _CID support for PCI Root Bridge detection. If the _HID does not
+match the predefined PCI Root Bridge IDs, the _CID list (if present) is now
+obtained and also checked for an ID match.
+
+Implemented additional support for the PCI _ADR execution: upsearch until a
+device scope is found before executing _ADR. This allows PCI_Config
+operation regions to be declared locally within control methods underneath
+PCI device objects.
+
+Fixed a problem with a possible race condition between threads executing
+AcpiWalkNamespace and the AML interpreter. This condition was removed by
+modifying AcpiWalkNamespace to (by default) ignore all temporary namespace
+entries created during any concurrent control method execution. An
+additional namespace race condition is known to exist between
+AcpiWalkNamespace and the Load/Unload ASL operators and is still under
+investigation.
+
+Restructured the AML ParseLoop function, breaking it into several
+subfunctions in order to reduce CPU stack use and improve maintainability.
+(Mikhail Kouzmich)
+
+AcpiGetHandle: Fix for parameter validation to detect invalid combinations
+of prefix handle and pathname. BZ 478
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 77.9K Code, 17.1K Data, 95.0K Total
+ Debug Version: 154.6K Code, 63.0K Data, 217.6K Total
+ Current Release:
+ Non-Debug Version: 78.1K Code, 17.1K Data, 95.2K Total
+ Debug Version: 155.4K Code, 63.1K Data, 218.5K Total
+
+2) iASL Compiler/Disassembler and Tools:
+
+Ported the -g option (get local ACPI tables) to the new ACPICA Table Manager
+to restore original behavior.
+
+----------------------------------------
+27 September 2006. Summary of changes for version 20060927:
+
+1) ACPI CA Core Subsystem:
+
+Removed the "Flags" parameter from AcpiGetRegister and AcpiSetRegister.
+These functions now use a spinlock for mutual exclusion and the interrupt
+level indication flag is not needed.
+
+Fixed a problem with the Global Lock where the lock could appear to be
+obtained before it is actually obtained. The global lock semaphore was
+inadvertently created with one unit instead of zero units. (BZ 464) Fiodor
+Suietov.
+
+Fixed a possible memory leak and fault in AcpiExResolveObjectToValue during
+a read from a buffer or region field. (BZ 458) Fiodor Suietov.
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 77.9K Code, 17.1K Data, 95.0K Total
+ Debug Version: 154.7K Code, 63.0K Data, 217.7K Total
+ Current Release:
+ Non-Debug Version: 77.9K Code, 17.1K Data, 95.0K Total
+ Debug Version: 154.6K Code, 63.0K Data, 217.6K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+Fixed a compilation problem with the pre-defined Resource Descriptor field
+names where an "object does not exist" error could be incorrectly generated
+if the parent ResourceTemplate pathname places the template within a
+different namespace scope than the current scope. (BZ 7212)
+
+Fixed a problem where the compiler could hang after syntax errors detected
+in an ElseIf construct. (BZ 453)
+
+Fixed a problem with the AmlFilename parameter to the DefinitionBlock()
+operator. An incorrect output filename was produced when this parameter was
+a null string (""). Now, the original input filename is used as the AML
+output filename, with an ".aml" extension.
+
+Implemented a generic batch command mode for the AcpiExec utility (execute
+any AML debugger command) (Valery Podrezov).
+
+----------------------------------------
+12 September 2006. Summary of changes for version 20060912:
+
+1) ACPI CA Core Subsystem:
+
+Enhanced the implementation of the "serialized mode" of the interpreter
+(enabled via the AcpiGbl_AllMethodsSerialized flag.) When this mode is
+specified, instead of creating a serialization semaphore per control method,
+the interpreter lock is simply no longer released before a blocking
+operation during control method execution. This effectively makes the AML
+Interpreter single-threaded. The overhead of a semaphore per-method is
+eliminated.
+
+Fixed a regression where an error was no longer emitted if a control method
+attempts to create 2 objects of the same name. This once again returns
+AE_ALREADY_EXISTS. When this exception occurs, it invokes the mechanism that
+will dynamically serialize the control method to possible prevent future
+errors. (BZ 440)
+
+Integrated a fix for a problem with PCI Express HID detection in the PCI
+Config Space setup procedure. (BZ 7145)
+
+Moved all FADT-related functions to a new file, tbfadt.c. Eliminated the
+AcpiHwInitialize function - the FADT registers are now validated when the
+table is loaded.
+
+Added two new warnings during FADT verification - 1) if the FADT is larger
+than the largest known FADT version, and 2) if there is a mismatch between a
+32-bit block address and the 64-bit X counterpart (when both are non-zero.)
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 77.9K Code, 16.7K Data, 94.6K Total
+ Debug Version: 154.9K Code, 62.6K Data, 217.5K Total
+ Current Release:
+ Non-Debug Version: 77.9K Code, 17.1K Data, 95.0K Total
+ Debug Version: 154.7K Code, 63.0K Data, 217.7K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+Fixed a problem with the implementation of the Switch() operator where the
+temporary variable was declared too close to the actual Switch, instead of
+at method level. This could cause a problem if the Switch() operator is
+within a while loop, causing an error on the second iteration. (BZ 460)
+
+Disassembler - fix for error emitted for unknown type for target of scope
+operator. Now, ignore it and continue.
+
+Disassembly of an FADT now verifies the input FADT and reports any errors
+found. Fix for proper disassembly of full-sized (ACPI 2.0) FADTs.
+
+Disassembly of raw data buffers with byte initialization data now prefixes
+each output line with the current buffer offset.
+
+Disassembly of ASF! table now includes all variable-length data fields at
+the end of some of the subtables.
+
+The disassembler now emits a comment if a buffer appears to be a
+ResourceTemplate, but cannot be disassembled as such because the EndTag does
+not appear at the very end of the buffer.
+
+AcpiExec - Added the "-t" command line option to enable the serialized mode
+of the AML interpreter.
+
+----------------------------------------
+31 August 2006. Summary of changes for version 20060831:
+
+1) ACPI CA Core Subsystem:
+
+Miscellaneous fixes for the Table Manager:
+- Correctly initialize internal common FADT for all 64-bit "X" fields
+- Fixed a couple table mapping issues during table load
+- Fixed a couple alignment issues for IA64
+- Initialize input array to zero in AcpiInitializeTables
+- Additional parameter validation for AcpiGetTable, AcpiGetTableHeader,
+AcpiGetTableByIndex
+
+Change for GPE support: when a "wake" GPE is received, all wake GPEs are now
+immediately disabled to prevent the waking GPE from firing again and to
+prevent other wake GPEs from interrupting the wake process.
+
+Added the AcpiGpeCount global that tracks the number of processed GPEs, to
+be used for debugging systems with a large number of ACPI interrupts.
+
+Implemented support for the "DMAR" ACPI table (DMA Redirection Table) in
+both the ACPICA headers and the disassembler.
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 77.8K Code, 16.5K Data, 94.3K Total
+ Debug Version: 154.6K Code, 62.3K Data, 216.9K Total
+ Current Release:
+ Non-Debug Version: 77.9K Code, 16.7K Data, 94.6K Total
+ Debug Version: 154.9K Code, 62.6K Data, 217.5K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+Disassembler support for the DMAR ACPI table.
+
+----------------------------------------
+23 August 2006. Summary of changes for version 20060823:
+
+1) ACPI CA Core Subsystem:
+
+The Table Manager component has been completely redesigned and
+reimplemented. The new design is much simpler, and reduces the overall code
+and data size of the kernel-resident ACPICA by approximately 5%. Also, it is
+now possible to obtain the ACPI tables very early during kernel
+initialization, even before dynamic memory management is initialized.
+(Alexey Starikovskiy, Fiodor Suietov, Bob Moore)
+
+Obsolete ACPICA interfaces:
+
+- AcpiGetFirmwareTable: Use AcpiGetTable instead (works at early kernel init
+time).
+- AcpiLoadTable: Not needed.
+- AcpiUnloadTable: Not needed.
+
+New ACPICA interfaces:
+
+- AcpiInitializeTables: Must be called before the table manager can be used.
+- AcpiReallocateRootTable: Used to transfer the root table to dynamically
+allocated memory after it becomes available.
+- AcpiGetTableByIndex: Allows the host to easily enumerate all ACPI tables
+in the RSDT/XSDT.
+
+Other ACPICA changes:
+
+- AcpiGetTableHeader returns the actual mapped table header, not a copy. Use
+AcpiOsUnmapMemory to free this mapping.
+- AcpiGetTable returns the actual mapped table. The mapping is managed
+internally and must not be deleted by the caller. Use of this interface
+causes no additional dynamic memory allocation.
+- AcpiFindRootPointer: Support for physical addressing has been eliminated,
+it appeared to be unused.
+- The interface to AcpiOsMapMemory has changed to be consistent with the
+other allocation interfaces.
+- The interface to AcpiOsGetRootPointer has changed to eliminate unnecessary
+parameters.
+- ACPI_PHYSICAL_ADDRESS is now 32 bits on 32-bit platforms, 64 bits on 64-
+bit platforms. Was previously 64 bits on all platforms.
+- The interface to the ACPI Global Lock acquire/release macros have changed
+slightly since ACPICA no longer keeps a local copy of the FACS with a
+constructed pointer to the actual global lock.
+
+Porting to the new table manager:
+
+- AcpiInitializeTables: Must be called once, and can be called anytime
+during the OS initialization process. It allows the host to specify an area
+of memory to be used to store the internal version of the RSDT/XSDT (root
+table). This allows the host to access ACPI tables before memory management
+is initialized and running.
+- AcpiReallocateRootTable: Can be called after memory management is running
+to copy the root table to a dynamically allocated array, freeing up the
+scratch memory specified in the call to AcpiInitializeTables.
+- AcpiSubsystemInitialize: This existing interface is independent of the
+Table Manager, and does not have to be called before the Table Manager can
+be used, it only must be called before the rest of ACPICA can be used.
+- ACPI Tables: Some changes have been made to the names and structure of the
+actbl.h and actbl1.h header files and may require changes to existing code.
+For example, bitfields have been completely removed because of their lack of
+portability across C compilers.
+- Update interfaces to the Global Lock acquire/release macros if local
+versions are used. (see acwin.h)
+
+Obsolete files: tbconvrt.c, tbget.c, tbgetall.c, tbrsdt.c
+
+New files: tbfind.c
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
+
+ Previous Release:
+ Non-Debug Version: 80.7K Code, 17.9K Data, 98.6K Total
+ Debug Version: 161.0K Code, 65.1K Data, 226.1K Total
+ Current Release:
+ Non-Debug Version: 77.8K Code, 16.5K Data, 94.3K Total
+ Debug Version: 154.6K Code, 62.3K Data, 216.9K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+No changes for this release.
+
+----------------------------------------
21 July 2006. Summary of changes for version 20060721:
1) ACPI CA Core Subsystem:
-The full source code for the ASL test suite used to validate the
-iASL compiler and the ACPICA core subsystem is being released
-with the ACPICA source for the first time. The source is
-contained in a separate package and consists of over 1100 files
-that exercise all ASL/AML operators. The package should appear on
-the Intel/ACPI web site shortly. (Valery Podrezov, Fiodor
+The full source code for the ASL test suite used to validate the iASL
+compiler and the ACPICA core subsystem is being released with the ACPICA
+source for the first time. The source is contained in a separate package and
+consists of over 1100 files that exercise all ASL/AML operators. The package
+should appear on the Intel/ACPI web site shortly. (Valery Podrezov, Fiodor
Suietov)
-Completed a new design and implementation for support of the ACPI
-Global Lock. On the OS side, the global lock is now treated as a
-standard AML mutex. Previously, multiple OS threads could
-"acquire" the global lock simultaneously. However, this could
-cause the BIOS to be starved out of the lock - especially in
-cases such as the Embedded Controller driver where there is a
-tight coupling between the OS and the BIOS.
-
-Implemented an optimization for the ACPI Global Lock interrupt
-mechanism. The Global Lock interrupt handler no longer queues the
-execution of a separate thread to signal the global lock
-semaphore. Instead, the semaphore is signaled directly from the
-interrupt handler.
-
-Implemented support within the AML interpreter for package
-objects that contain a larger AML length (package list length)
-than the package element count. In this case, the length of the
-package is truncated to match the package element count. Some
-BIOS code apparently modifies the package length on the fly, and
-this change supports this behavior. Provides compatibility with
-the MS AML interpreter. (With assistance from Fiodor Suietov)
-
-Implemented a temporary fix for the BankValue parameter of a Bank
-Field to support all constant values, now including the Zero and
-One opcodes. Evaluation of this parameter must eventually be
-converted to a full TermArg evaluation. A not-implemented error
-is now returned (temporarily) for non-constant values for this
-parameter.
+Completed a new design and implementation for support of the ACPI Global
+Lock. On the OS side, the global lock is now treated as a standard AML
+mutex. Previously, multiple OS threads could "acquire" the global lock
+simultaneously. However, this could cause the BIOS to be starved out of the
+lock - especially in cases such as the Embedded Controller driver where
+there is a tight coupling between the OS and the BIOS.
+
+Implemented an optimization for the ACPI Global Lock interrupt mechanism.
+The Global Lock interrupt handler no longer queues the execution of a
+separate thread to signal the global lock semaphore. Instead, the semaphore
+is signaled directly from the interrupt handler.
+
+Implemented support within the AML interpreter for package objects that
+contain a larger AML length (package list length) than the package element
+count. In this case, the length of the package is truncated to match the
+package element count. Some BIOS code apparently modifies the package length
+on the fly, and this change supports this behavior. Provides compatibility
+with the MS AML interpreter. (With assistance from Fiodor Suietov)
+
+Implemented a temporary fix for the BankValue parameter of a Bank Field to
+support all constant values, now including the Zero and One opcodes.
+Evaluation of this parameter must eventually be converted to a full TermArg
+evaluation. A not-implemented error is now returned (temporarily) for non-
+constant values for this parameter.
Fixed problem reports (Fiodor Suietov) integrated:
-- Fix for premature object deletion after CopyObject on Operation
-Region (BZ 350)
+- Fix for premature object deletion after CopyObject on Operation Region (BZ
+350)
-Example Code and Data Size: These are the sizes for the OS-
-independent acpica.lib produced by the Microsoft Visual C++ 6.0
-32-bit compiler. The debug version of the code includes the debug
-output trace mechanism and has a much larger code and data size.
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
Previous Release:
Non-Debug Version: 80.7K Code, 18.0K Data, 98.7K Total
@@ -66,63 +1406,56 @@ No changes for this release.
1) ACPI CA Core Subsystem:
-Added the ACPI_PACKED_POINTERS_NOT_SUPPORTED macro to support C
-compilers that do not allow the initialization of address
-pointers within packed structures - even though the hardware
-itself may support misaligned transfers. Some of the debug data
-structures are packed by default to minimize size.
-
-Added an error message for the case where AcpiOsGetThreadId()
-returns zero. A non-zero value is required by the core ACPICA
-code to ensure the proper operation of AML mutexes and recursive
-control methods.
-
-The DSDT is now the only ACPI table that determines whether the
-AML interpreter is in 32-bit or 64-bit mode. Not really a
-functional change, but the hooks for per-table 32/64 switching
-have been removed from the code. A clarification to the ACPI
-specification is forthcoming in ACPI 3.0B.
-
-Fixed a possible leak of an OwnerID in the error path of
-AcpiTbInitTableDescriptor (tbinstal.c), and migrated all table
-OwnerID deletion to a single place in AcpiTbUninstallTable to
-correct possible leaks when using the AcpiTbDeleteTablesByType
-interface (with assistance from Lance Ortiz.)
-
-Fixed a problem with Serialized control methods where the
-semaphore associated with the method could be over-signaled after
-multiple method invocations.
-
-Fixed two issues with the locking of the internal namespace data
-structure. Both the Unload() operator and AcpiUnloadTable
-interface now lock the namespace during the namespace deletion
-associated with the table unload (with assistance from Linn
-Crosetto.)
+Added the ACPI_PACKED_POINTERS_NOT_SUPPORTED macro to support C compilers
+that do not allow the initialization of address pointers within packed
+structures - even though the hardware itself may support misaligned
+transfers. Some of the debug data structures are packed by default to
+minimize size.
+
+Added an error message for the case where AcpiOsGetThreadId() returns zero.
+A non-zero value is required by the core ACPICA code to ensure the proper
+operation of AML mutexes and recursive control methods.
+
+The DSDT is now the only ACPI table that determines whether the AML
+interpreter is in 32-bit or 64-bit mode. Not really a functional change, but
+the hooks for per-table 32/64 switching have been removed from the code. A
+clarification to the ACPI specification is forthcoming in ACPI 3.0B.
+
+Fixed a possible leak of an OwnerID in the error path of
+AcpiTbInitTableDescriptor (tbinstal.c), and migrated all table OwnerID
+deletion to a single place in AcpiTbUninstallTable to correct possible leaks
+when using the AcpiTbDeleteTablesByType interface (with assistance from
+Lance Ortiz.)
+
+Fixed a problem with Serialized control methods where the semaphore
+associated with the method could be over-signaled after multiple method
+invocations.
+
+Fixed two issues with the locking of the internal namespace data structure.
+Both the Unload() operator and AcpiUnloadTable interface now lock the
+namespace during the namespace deletion associated with the table unload
+(with assistance from Linn Crosetto.)
Fixed problem reports (Valery Podrezov) integrated:
-- Eliminate unnecessary memory allocation for CreateXxxxField (BZ
-5426)
+- Eliminate unnecessary memory allocation for CreateXxxxField (BZ 5426)
Fixed problem reports (Fiodor Suietov) integrated:
- Incomplete cleanup branches in AcpiTbGetTableRsdt (BZ 369)
-- On Address Space handler deletion, needless deactivation call
-(BZ 374)
-- AcpiRemoveAddressSpaceHandler: validate Device handle parameter
-(BZ 375)
-- Possible memory leak, Notify sub-objects of Processor, Power,
-ThermalZone (BZ 376)
-- AcpiRemoveAddressSpaceHandler: validate Handler parameter (BZ
-378)
+- On Address Space handler deletion, needless deactivation call (BZ 374)
+- AcpiRemoveAddressSpaceHandler: validate Device handle parameter (BZ 375)
+- Possible memory leak, Notify sub-objects of Processor, Power, ThermalZone
+(BZ 376)
+- AcpiRemoveAddressSpaceHandler: validate Handler parameter (BZ 378)
- Minimum Length of RSDT should be validated (BZ 379)
-- AcpiRemoveNotifyHandler: return AE_NOT_EXIST if Processor Obj
-has no Handler (BZ (380)
-- AcpiUnloadTable: return AE_NOT_EXIST if no table of specified
-type loaded (BZ 381)
+- AcpiRemoveNotifyHandler: return AE_NOT_EXIST if Processor Obj has no
+Handler (BZ (380)
+- AcpiUnloadTable: return AE_NOT_EXIST if no table of specified type loaded
+(BZ 381)
-Example Code and Data Size: These are the sizes for the OS-
-independent acpica.lib produced by the Microsoft Visual C++ 6.0
-32-bit compiler. The debug version of the code includes the debug
-output trace mechanism and has a much larger code and data size.
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
Previous Release:
Non-Debug Version: 80.5K Code, 17.8K Data, 98.3K Total
@@ -135,57 +1468,52 @@ output trace mechanism and has a much larger code and data size.
2) iASL Compiler/Disassembler and Tools:
Fixed problem reports:
-Compiler segfault when ASL contains a long (>1024) String
-declaration (BZ 436)
+Compiler segfault when ASL contains a long (>1024) String declaration (BZ
+436)
----------------------------------------
23 June 2006. Summary of changes for version 20060623:
1) ACPI CA Core Subsystem:
-Implemented a new ACPI_SPINLOCK type for the OSL lock interfaces.
-This allows the type to be customized to the host OS for improved
-efficiency (since a spinlock is usually a very small object.)
-
-Implemented support for "ignored" bits in the ACPI registers.
-According to the ACPI specification, these bits should be
-preserved when writing the registers via a read/modify/write
-cycle. There are 3 bits preserved in this manner: PM1_CONTROL[0]
-(SCI_EN), PM1_CONTROL[9], and PM1_STATUS[11].
-
-Implemented the initial deployment of new OSL mutex interfaces.
-Since some host operating systems have separate mutex and
-semaphore objects, this feature was requested. The base code now
-uses mutexes (and the new mutex interfaces) wherever a binary
-semaphore was used previously. However, for the current release,
-the mutex interfaces are defined as macros to map them to the
-existing semaphore interfaces. Therefore, no OSL changes are
-required at this time. (See acpiosxf.h)
-
-Fixed several problems with the support for the control method
-SyncLevel parameter. The SyncLevel now works according to the
-ACPI specification and in concert with the Mutex SyncLevel
-parameter, since the current SyncLevel is a property of the
-executing thread. Mutual exclusion for control methods is now
-implemented with a mutex instead of a semaphore.
-
-Fixed three instances of the use of the C shift operator in the
-bitfield support code (exfldio.c) to avoid the use of a shift
-value larger than the target data width. The behavior of C
-compilers is undefined in this case and can cause unpredictable
-results, and therefore the case must be detected and avoided.
-(Fiodor Suietov)
-
-Added an info message whenever an SSDT or OEM table is loaded
-dynamically via the Load() or LoadTable() ASL operators. This
-should improve debugging capability since it will show exactly
-what tables have been loaded (beyond the tables present in the
-RSDT/XSDT.)
-
-Example Code and Data Size: These are the sizes for the OS-
-independent acpica.lib produced by the Microsoft Visual C++ 6.0
-32-bit compiler. The debug version of the code includes the debug
-output trace mechanism and has a much larger code and data size.
+Implemented a new ACPI_SPINLOCK type for the OSL lock interfaces. This
+allows the type to be customized to the host OS for improved efficiency
+(since a spinlock is usually a very small object.)
+
+Implemented support for "ignored" bits in the ACPI registers. According to
+the ACPI specification, these bits should be preserved when writing the
+registers via a read/modify/write cycle. There are 3 bits preserved in this
+manner: PM1_CONTROL[0] (SCI_EN), PM1_CONTROL[9], and PM1_STATUS[11].
+
+Implemented the initial deployment of new OSL mutex interfaces. Since some
+host operating systems have separate mutex and semaphore objects, this
+feature was requested. The base code now uses mutexes (and the new mutex
+interfaces) wherever a binary semaphore was used previously. However, for
+the current release, the mutex interfaces are defined as macros to map them
+to the existing semaphore interfaces. Therefore, no OSL changes are required
+at this time. (See acpiosxf.h)
+
+Fixed several problems with the support for the control method SyncLevel
+parameter. The SyncLevel now works according to the ACPI specification and
+in concert with the Mutex SyncLevel parameter, since the current SyncLevel
+is a property of the executing thread. Mutual exclusion for control methods
+is now implemented with a mutex instead of a semaphore.
+
+Fixed three instances of the use of the C shift operator in the bitfield
+support code (exfldio.c) to avoid the use of a shift value larger than the
+target data width. The behavior of C compilers is undefined in this case and
+can cause unpredictable results, and therefore the case must be detected and
+avoided. (Fiodor Suietov)
+
+Added an info message whenever an SSDT or OEM table is loaded dynamically
+via the Load() or LoadTable() ASL operators. This should improve debugging
+capability since it will show exactly what tables have been loaded (beyond
+the tables present in the RSDT/XSDT.)
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
Previous Release:
Non-Debug Version: 80.0K Code, 17.6K Data, 97.6K Total
@@ -204,37 +1532,34 @@ No changes for this release.
1) ACPI CA Core Subsystem:
-Converted the locking mutex used for the ACPI hardware to a
-spinlock. This change should eliminate all problems caused by
-attempting to acquire a semaphore at interrupt level, and it
-means that all ACPICA external interfaces that directly access
-the ACPI hardware can be safely called from interrupt level. OSL
-code that implements the semaphore interfaces should be able to
-eliminate any workarounds for being called at interrupt level.
+Converted the locking mutex used for the ACPI hardware to a spinlock. This
+change should eliminate all problems caused by attempting to acquire a
+semaphore at interrupt level, and it means that all ACPICA external
+interfaces that directly access the ACPI hardware can be safely called from
+interrupt level. OSL code that implements the semaphore interfaces should be
+able to eliminate any workarounds for being called at interrupt level.
-Fixed a regression introduced in 20060526 where the ACPI device
-initialization could be prematurely aborted with an AE_NOT_FOUND
-if a device did not have an optional _INI method.
+Fixed a regression introduced in 20060526 where the ACPI device
+initialization could be prematurely aborted with an AE_NOT_FOUND if a device
+did not have an optional _INI method.
-Fixed an IndexField issue where a write to the Data Register
-should be limited in size to the AccessSize (width) of the
-IndexField itself. (BZ 433, Fiodor Suietov)
+Fixed an IndexField issue where a write to the Data Register should be
+limited in size to the AccessSize (width) of the IndexField itself. (BZ 433,
+Fiodor Suietov)
Fixed problem reports (Valery Podrezov) integrated:
-- Allow store of ThermalZone objects to Debug object (BZ
-5369/5370)
+- Allow store of ThermalZone objects to Debug object (BZ 5369/5370)
Fixed problem reports (Fiodor Suietov) integrated:
-- AcpiGetTableHeader doesn't handle multiple instances correctly
-(BZ 364)
+- AcpiGetTableHeader doesn't handle multiple instances correctly (BZ 364)
-Removed four global mutexes that were obsolete and were no longer
-being used.
+Removed four global mutexes that were obsolete and were no longer being
+used.
-Example Code and Data Size: These are the sizes for the OS-
-independent acpica.lib produced by the Microsoft Visual C++ 6.0
-32-bit compiler. The debug version of the code includes the debug
-output trace mechanism and has a much larger code and data size.
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
Previous Release:
Non-Debug Version: 80.0K Code, 17.7K Data, 97.7K Total
@@ -246,14 +1571,13 @@ output trace mechanism and has a much larger code and data size.
2) iASL Compiler/Disassembler and Tools:
-Fixed a fault when using -g option (get tables from registry) on
-Windows machines.
+Fixed a fault when using -g option (get tables from registry) on Windows
+machines.
Fixed problem reports integrated:
-- Generate error if CreateField NumBits parameter is zero. (BZ
-405)
-- Fault if Offset/Length in Field unit is very large (BZ 432,
-Fiodor Suietov)
+- Generate error if CreateField NumBits parameter is zero. (BZ 405)
+- Fault if Offset/Length in Field unit is very large (BZ 432, Fiodor
+Suietov)
- Global table revision override (-r) is ignored (BZ 413)
----------------------------------------
@@ -261,54 +1585,41 @@ Fiodor Suietov)
1) ACPI CA Core Subsystem:
-Restructured, flattened, and simplified the internal interfaces
-for namespace object evaluation - resulting in smaller code, less
-CPU stack use, and fewer interfaces. (With assistance from
-Mikhail Kouzmich)
+Restructured, flattened, and simplified the internal interfaces for
+namespace object evaluation - resulting in smaller code, less CPU stack use,
+and fewer interfaces. (With assistance from Mikhail Kouzmich)
-Fixed a problem with the CopyObject operator where the first
-parameter was not typed correctly for the parser, interpreter,
-compiler, and disassembler. Caused various errors and unexpected
-behavior.
+Fixed a problem with the CopyObject operator where the first parameter was
+not typed correctly for the parser, interpreter, compiler, and disassembler.
+Caused various errors and unexpected behavior.
-Fixed a problem where a ShiftLeft or ShiftRight of more than 64
-bits produced incorrect results with some C compilers. Since the
-behavior of C compilers when the shift value is larger than the
-datatype width is apparently not well defined, the interpreter
-now detects this condition and simply returns zero as expected in
-all such cases. (BZ 395)
+Fixed a problem where a ShiftLeft or ShiftRight of more than 64 bits
+produced incorrect results with some C compilers. Since the behavior of C
+compilers when the shift value is larger than the datatype width is
+apparently not well defined, the interpreter now detects this condition and
+simply returns zero as expected in all such cases. (BZ 395)
Fixed problem reports (Valery Podrezov) integrated:
-- Update String-to-Integer conversion to match ACPI 3.0A spec (BZ
-5329)
-- Allow interpreter to handle nested method declarations (BZ
-5361)
+- Update String-to-Integer conversion to match ACPI 3.0A spec (BZ 5329)
+- Allow interpreter to handle nested method declarations (BZ 5361)
Fixed problem reports (Fiodor Suietov) integrated:
-- AcpiTerminate doesn't free debug memory allocation list objects
-(BZ 355)
-- After Core Subsystem shutdown, AcpiSubsystemStatus returns
-AE_OK (BZ 356)
-- AcpiOsUnmapMemory for RSDP can be invoked inconsistently (BZ
-357)
-- Resource Manager should return AE_TYPE for non-device objects
-(BZ 358)
+- AcpiTerminate doesn't free debug memory allocation list objects (BZ 355)
+- After Core Subsystem shutdown, AcpiSubsystemStatus returns AE_OK (BZ 356)
+- AcpiOsUnmapMemory for RSDP can be invoked inconsistently (BZ 357)
+- Resource Manager should return AE_TYPE for non-device objects (BZ 358)
- Incomplete cleanup branch in AcpiNsEvaluateRelative (BZ 359)
-- Use AcpiOsFree instead of ACPI_FREE in AcpiRsSetSrsMethodData
-(BZ 360)
+- Use AcpiOsFree instead of ACPI_FREE in AcpiRsSetSrsMethodData (BZ 360)
- Incomplete cleanup branch in AcpiPsParseAml (BZ 361)
- Incomplete cleanup branch in AcpiDsDeleteWalkState (BZ 362)
-- AcpiGetTableHeader returns AE_NO_ACPI_TABLES until DSDT is
-loaded (BZ 365)
-- Status of the Global Initialization Handler call not used (BZ
-366)
-- Incorrect object parameter to Global Initialization Handler (BZ
-367)
-
-Example Code and Data Size: These are the sizes for the OS-
-independent acpica.lib produced by the Microsoft Visual C++ 6.0
-32-bit compiler. The debug version of the code includes the debug
-output trace mechanism and has a much larger code and data size.
+- AcpiGetTableHeader returns AE_NO_ACPI_TABLES until DSDT is loaded (BZ 365)
+- Status of the Global Initialization Handler call not used (BZ 366)
+- Incorrect object parameter to Global Initialization Handler (BZ 367)
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
Previous Release:
Non-Debug Version: 79.8K Code, 17.7K Data, 97.5K Total
@@ -320,48 +1631,44 @@ output trace mechanism and has a much larger code and data size.
2) iASL Compiler/Disassembler and Tools:
-Modified the parser to allow the names IO, DMA, and IRQ to be
-used as namespace identifiers with no collision with existing
-resource descriptor macro names. This provides compatibility with
-other ASL compilers and is most useful for
-disassembly/recompilation of existing tables without parse
+Modified the parser to allow the names IO, DMA, and IRQ to be used as
+namespace identifiers with no collision with existing resource descriptor
+macro names. This provides compatibility with other ASL compilers and is
+most useful for disassembly/recompilation of existing tables without parse
errors. (With assistance from Thomas Renninger)
-Disassembler: fixed an incorrect disassembly problem with the
-DataTableRegion and CopyObject operators. Fixed a possible fault
-during disassembly of some Alias operators.
+Disassembler: fixed an incorrect disassembly problem with the
+DataTableRegion and CopyObject operators. Fixed a possible fault during
+disassembly of some Alias operators.
----------------------------------------
12 May 2006. Summary of changes for version 20060512:
1) ACPI CA Core Subsystem:
-Replaced the AcpiOsQueueForExecution interface with a new
-interface named AcpiOsExecute. The major difference is that the
-new interface does not have a Priority parameter, this appeared
-to be useless and has been replaced by a Type parameter. The Type
-tells the host what type of execution is being requested, such as
-global lock handler, notify handler, GPE handler, etc. This
-allows the host to queue and execute the request as appropriate
-for the request type, possibly using different work queues and
-different priorities for the various request types. This enables
-fixes for multithreading deadlock problems such as BZ #5534, and
-will require changes to all existing OS interface layers. (Alexey
-Starikovskiy and Bob Moore)
-
-Fixed a possible memory leak associated with the support for the
-so-called "implicit return" ACPI extension. Reported by FreeBSD,
-BZ #6514. (Fiodor Suietov)
-
-Fixed a problem with the Load() operator where a table load from
-an operation region could overwrite an internal table buffer by
-up to 7 bytes and cause alignment faults on IPF systems. (With
-assistance from Luming Yu)
-
-Example Code and Data Size: These are the sizes for the OS-
-independent acpica.lib produced by the Microsoft Visual C++ 6.0
-32-bit compiler. The debug version of the code includes the debug
-output trace mechanism and has a much larger code and data size.
+Replaced the AcpiOsQueueForExecution interface with a new interface named
+AcpiOsExecute. The major difference is that the new interface does not have
+a Priority parameter, this appeared to be useless and has been replaced by a
+Type parameter. The Type tells the host what type of execution is being
+requested, such as global lock handler, notify handler, GPE handler, etc.
+This allows the host to queue and execute the request as appropriate for the
+request type, possibly using different work queues and different priorities
+for the various request types. This enables fixes for multithreading
+deadlock problems such as BZ #5534, and will require changes to all existing
+OS interface layers. (Alexey Starikovskiy and Bob Moore)
+
+Fixed a possible memory leak associated with the support for the so-called
+"implicit return" ACPI extension. Reported by FreeBSD, BZ #6514. (Fiodor
+Suietov)
+
+Fixed a problem with the Load() operator where a table load from an
+operation region could overwrite an internal table buffer by up to 7 bytes
+and cause alignment faults on IPF systems. (With assistance from Luming Yu)
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
Previous Release:
Non-Debug Version: 79.7K Code, 17.7K Data, 97.4K Total
@@ -374,92 +1681,83 @@ output trace mechanism and has a much larger code and data size.
2) iASL Compiler/Disassembler and Tools:
-Disassembler: Implemented support to cross reference the internal
-namespace and automatically generate ASL External() statements
-for symbols not defined within the current table being
-disassembled. This will simplify the disassembly and
-recompilation of interdependent tables such as SSDTs since these
-statements will no longer have to be added manually.
-
-Disassembler: Implemented experimental support to automatically
-detect invocations of external control methods and generate
-appropriate External() statements. This is problematic because
-the AML cannot be correctly parsed until the number of arguments
-for each control method is known. Currently, standalone method
-invocations and invocations as the source operand of a Store()
-statement are supported.
-
-Disassembler: Implemented support for the ASL pseudo-operators
-LNotEqual, LLessEqual, and LGreaterEqual. Previously disassembled
-as LNot(LEqual()), LNot(LGreater()), and LNot(LLess()), this
-makes the disassembled ASL code more readable and likely closer
-to the original ASL source.
+Disassembler: Implemented support to cross reference the internal namespace
+and automatically generate ASL External() statements for symbols not defined
+within the current table being disassembled. This will simplify the
+disassembly and recompilation of interdependent tables such as SSDTs since
+these statements will no longer have to be added manually.
+
+Disassembler: Implemented experimental support to automatically detect
+invocations of external control methods and generate appropriate External()
+statements. This is problematic because the AML cannot be correctly parsed
+until the number of arguments for each control method is known. Currently,
+standalone method invocations and invocations as the source operand of a
+Store() statement are supported.
+
+Disassembler: Implemented support for the ASL pseudo-operators LNotEqual,
+LLessEqual, and LGreaterEqual. Previously disassembled as LNot(LEqual()),
+LNot(LGreater()), and LNot(LLess()), this makes the disassembled ASL code
+more readable and likely closer to the original ASL source.
----------------------------------------
21 April 2006. Summary of changes for version 20060421:
1) ACPI CA Core Subsystem:
-Removed a device initialization optimization introduced in
-20051216 where the _STA method was not run unless an _INI was
-also present for the same device. This optimization could cause
-problems because it could allow _INI methods to be run within a
-not-present device subtree. (If a not-present device had no _INI,
-_STA would not be run, the not-present status would not be
-discovered, and the children of the device would be incorrectly
+Removed a device initialization optimization introduced in 20051216 where
+the _STA method was not run unless an _INI was also present for the same
+device. This optimization could cause problems because it could allow _INI
+methods to be run within a not-present device subtree. (If a not-present
+device had no _INI, _STA would not be run, the not-present status would not
+be discovered, and the children of the device would be incorrectly
traversed.)
-Implemented a new _STA optimization where namespace subtrees that
-do not contain _INI are identified and ignored during device
-initialization. Selectively running _STA can significantly
-improve boot time on large machines (with assistance from Len
-Brown.)
+Implemented a new _STA optimization where namespace subtrees that do not
+contain _INI are identified and ignored during device initialization.
+Selectively running _STA can significantly improve boot time on large
+machines (with assistance from Len Brown.)
-Implemented support for the device initialization case where the
-returned _STA flags indicate a device not-present but
-functioning. In this case, _INI is not run, but the device
-children are examined for presence, as per the ACPI
-specification.
-
-Implemented an additional change to the IndexField support in
-order to conform to MS behavior. The value written to the Index
-Register is not simply a byte offset, it is a byte offset in
-units of the access width of the parent Index Field. (Fiodor
-Suietov)
+Implemented support for the device initialization case where the returned
+_STA flags indicate a device not-present but functioning. In this case, _INI
+is not run, but the device children are examined for presence, as per the
+ACPI specification.
-Defined and deployed a new OSL interface, AcpiOsValidateAddress.
-This interface is called during the creation of all AML operation
-regions, and allows the host OS to exert control over what
-addresses it will allow the AML code to access. Operation Regions
-whose addresses are disallowed will cause a runtime exception
-when they are actually accessed (will not affect or abort table
-loading.) See oswinxf or osunixxf for an example implementation.
-
-Defined and deployed a new OSL interface,
-AcpiOsValidateInterface. This interface allows the host OS to
-match the various "optional" interface/behavior strings for the
-_OSI predefined control method as appropriate (with assistance
-from Bjorn Helgaas.) See oswinxf or osunixxf for an example
+Implemented an additional change to the IndexField support in order to
+conform to MS behavior. The value written to the Index Register is not
+simply a byte offset, it is a byte offset in units of the access width of
+the parent Index Field. (Fiodor Suietov)
+
+Defined and deployed a new OSL interface, AcpiOsValidateAddress. This
+interface is called during the creation of all AML operation regions, and
+allows the host OS to exert control over what addresses it will allow the
+AML code to access. Operation Regions whose addresses are disallowed will
+cause a runtime exception when they are actually accessed (will not affect
+or abort table loading.) See oswinxf or osunixxf for an example
implementation.
-Restructured and corrected various problems in the exception
-handling code paths within DsCallControlMethod and
-DsTerminateControlMethod in dsmethod (with assistance from
-Takayoshi Kochi.)
+Defined and deployed a new OSL interface, AcpiOsValidateInterface. This
+interface allows the host OS to match the various "optional"
+interface/behavior strings for the _OSI predefined control method as
+appropriate (with assistance from Bjorn Helgaas.) See oswinxf or osunixxf
+for an example implementation.
+
+Restructured and corrected various problems in the exception handling code
+paths within DsCallControlMethod and DsTerminateControlMethod in dsmethod
+(with assistance from Takayoshi Kochi.)
-Modified the Linux source converter to ignore quoted string
-literals while converting identifiers from mixed to lower case.
-This will correct problems with the disassembler and other areas
-where such strings must not be modified.
+Modified the Linux source converter to ignore quoted string literals while
+converting identifiers from mixed to lower case. This will correct problems
+with the disassembler and other areas where such strings must not be
+modified.
-The ACPI_FUNCTION_* macros no longer require quotes around the
-function name. This allows the Linux source converter to convert
-the names, now that the converter ignores quoted strings.
+The ACPI_FUNCTION_* macros no longer require quotes around the function
+name. This allows the Linux source converter to convert the names, now that
+the converter ignores quoted strings.
-Example Code and Data Size: These are the sizes for the OS-
-independent acpica.lib produced by the Microsoft Visual C++ 6.0
-32-bit compiler. The debug version of the code includes the debug
-output trace mechanism and has a much larger code and data size.
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
Previous Release:
@@ -472,75 +1770,67 @@ output trace mechanism and has a much larger code and data size.
2) iASL Compiler/Disassembler and Tools:
-Implemented 3 new warnings for iASL, and implemented multiple
-warning levels (w2 flag).
+Implemented 3 new warnings for iASL, and implemented multiple warning levels
+(w2 flag).
-1) Ignored timeouts: If the TimeoutValue parameter to Wait or
-Acquire is not WAIT_FOREVER (0xFFFF) and the code does not
-examine the return value to check for the possible timeout, a
-warning is issued.
+1) Ignored timeouts: If the TimeoutValue parameter to Wait or Acquire is not
+WAIT_FOREVER (0xFFFF) and the code does not examine the return value to
+check for the possible timeout, a warning is issued.
-2) Useless operators: If an ASL operator does not specify an
-optional target operand and it also does not use the function
-return value from the operator, a warning is issued since the
-operator effectively does nothing.
+2) Useless operators: If an ASL operator does not specify an optional target
+operand and it also does not use the function return value from the
+operator, a warning is issued since the operator effectively does nothing.
-3) Unreferenced objects: If a namespace object is created, but
-never referenced, a warning is issued. This is a warning level 2
-since there are cases where this is ok, such as when a secondary
-table is loaded that uses the unreferenced objects. Even so, care
-is taken to only flag objects that don't look like they will ever
-be used. For example, the reserved methods (starting with an
-underscore) are usually not referenced because it is expected
-that the OS will invoke them.
+3) Unreferenced objects: If a namespace object is created, but never
+referenced, a warning is issued. This is a warning level 2 since there are
+cases where this is ok, such as when a secondary table is loaded that uses
+the unreferenced objects. Even so, care is taken to only flag objects that
+don't look like they will ever be used. For example, the reserved methods
+(starting with an underscore) are usually not referenced because it is
+expected that the OS will invoke them.
----------------------------------------
31 March 2006. Summary of changes for version 20060331:
1) ACPI CA Core Subsystem:
-Implemented header file support for the following additional ACPI
-tables: ASF!, BOOT, CPEP, DBGP, MCFG, SPCR, SPMI, TCPA, and WDRT.
-With this support, all current and known ACPI tables are now
-defined in the ACPICA headers and are available for use by device
-drivers and other software.
-
-Implemented support to allow tables that contain ACPI names with
-invalid characters to be loaded. Previously, this would cause the
-table load to fail, but since there are several known cases of
-such tables on existing machines, this change was made to enable
-ACPI support for them. Also, this matches the behavior of the
-Microsoft ACPI implementation.
-
-Fixed a couple regressions introduced during the memory
-optimization in the 20060317 release. The namespace node
-definition required additional reorganization and an internal
-datatype that had been changed to 8-bit was restored to 32-bit.
-(Valery Podrezov)
-
-Fixed a problem where a null pointer passed to
-AcpiUtDeleteGenericState could be passed through to
-AcpiOsReleaseObject which is unexpected. Such null pointers are
-now trapped and ignored, matching the behavior of the previous
-implementation before the deployment of AcpiOsReleaseObject.
+Implemented header file support for the following additional ACPI tables:
+ASF!, BOOT, CPEP, DBGP, MCFG, SPCR, SPMI, TCPA, and WDRT. With this support,
+all current and known ACPI tables are now defined in the ACPICA headers and
+are available for use by device drivers and other software.
+
+Implemented support to allow tables that contain ACPI names with invalid
+characters to be loaded. Previously, this would cause the table load to
+fail, but since there are several known cases of such tables on existing
+machines, this change was made to enable ACPI support for them. Also, this
+matches the behavior of the Microsoft ACPI implementation.
+
+Fixed a couple regressions introduced during the memory optimization in the
+20060317 release. The namespace node definition required additional
+reorganization and an internal datatype that had been changed to 8-bit was
+restored to 32-bit. (Valery Podrezov)
+
+Fixed a problem where a null pointer passed to AcpiUtDeleteGenericState
+could be passed through to AcpiOsReleaseObject which is unexpected. Such
+null pointers are now trapped and ignored, matching the behavior of the
+previous implementation before the deployment of AcpiOsReleaseObject.
(Valery Podrezov, Fiodor Suietov)
-Fixed a memory mapping leak during the deletion of a SystemMemory
-operation region where a cached memory mapping was not deleted.
-This became a noticeable problem for operation regions that are
-defined within frequently used control methods. (Dana Meyers)
+Fixed a memory mapping leak during the deletion of a SystemMemory operation
+region where a cached memory mapping was not deleted. This became a
+noticeable problem for operation regions that are defined within frequently
+used control methods. (Dana Meyers)
-Reorganized the ACPI table header files into two main files: one
-for the ACPI tables consumed by the ACPICA core, and another for
-the miscellaneous ACPI tables that are consumed by the drivers
-and other software. The various FADT definitions were merged into
-one common section and three different tables (ACPI 1.0, 1.0+,
-and 2.0)
+Reorganized the ACPI table header files into two main files: one for the
+ACPI tables consumed by the ACPICA core, and another for the miscellaneous
+ACPI tables that are consumed by the drivers and other software. The various
+FADT definitions were merged into one common section and three different
+tables (ACPI 1.0, 1.0+, and 2.0)
-Example Code and Data Size: These are the sizes for the OS-
-independent acpica.lib produced by the Microsoft Visual C++ 6.0
-32-bit compiler. The debug version of the code includes the debug
-output trace mechanism and has a much larger code and data size.
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and has
+a much larger code and data size.
Previous Release:
Non-Debug Version: 80.9K Code, 17.7K Data, 98.6K Total
@@ -552,65 +1842,61 @@ output trace mechanism and has a much larger code and data size.
2) iASL Compiler/Disassembler and Tools:
-Disassembler: Implemented support to decode and format all non-
-AML ACPI tables (tables other than DSDTs and SSDTs.) This
-includes the new tables added to the ACPICA headers, therefore
-all current and known ACPI tables are supported.
+Disassembler: Implemented support to decode and format all non-AML ACPI
+tables (tables other than DSDTs and SSDTs.) This includes the new tables
+added to the ACPICA headers, therefore all current and known ACPI tables are
+supported.
-Disassembler: The change to allow ACPI names with invalid
-characters also enables the disassembly of such tables. Invalid
-characters within names are changed to '*' to make the name
-printable; the iASL compiler will still generate an error for
-such names, however, since this is an invalid ACPI character.
+Disassembler: The change to allow ACPI names with invalid characters also
+enables the disassembly of such tables. Invalid characters within names are
+changed to '*' to make the name printable; the iASL compiler will still
+generate an error for such names, however, since this is an invalid ACPI
+character.
-Implemented an option for AcpiXtract (-a) to extract all tables
-found in the input file. The default invocation extracts only the
-DSDTs and SSDTs.
+Implemented an option for AcpiXtract (-a) to extract all tables found in the
+input file. The default invocation extracts only the DSDTs and SSDTs.
-Fixed a couple of gcc generation issues for iASL and AcpiExec and
-added a makefile for the AcpiXtract utility.
+Fixed a couple of gcc generation issues for iASL and AcpiExec and added a
+makefile for the AcpiXtract utility.
----------------------------------------
17 March 2006. Summary of changes for version 20060317:
1) ACPI CA Core Subsystem:
-Implemented the use of a cache object for all internal namespace
-nodes. Since there are about 1000 static nodes in a typical
-system, this will decrease memory use for cache implementations
-that minimize per-allocation overhead (such as a slab allocator.)
-
-Removed the reference count mechanism for internal namespace
-nodes, since it was deemed unnecessary. This reduces the size of
-each namespace node by about 5%-10% on all platforms. Nodes are
-now 20 bytes for the 32-bit case, and 32 bytes for the 64-bit
-case.
-
-Optimized several internal data structures to reduce object size
-on 64-bit platforms by packing data within the 64-bit alignment.
-This includes the frequently used ACPI_OPERAND_OBJECT, of which
-there can be ~1000 static instances corresponding to the
-namespace objects.
-
-Added two new strings for the predefined _OSI method: "Windows
-2001.1 SP1" and "Windows 2006".
-
-Split the allocation tracking mechanism out to a separate file,
-from utalloc.c to uttrack.c. This mechanism appears to be only
-useful for application-level code. Kernels may wish to not
-include uttrack.c in distributions.
-
-Removed all remnants of the obsolete ACPI_REPORT_* macros and the
-associated code. (These macros have been replaced by the
-ACPI_ERROR and ACPI_WARNING macros.)
-
-Code and Data Size: These are the sizes for the acpica.lib
-produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
-values do not include any ACPI driver or OSPM code. The debug
-version of the code includes the debug output trace mechanism and
-has a much larger code and data size. Note that these values will
-vary depending on the efficiency of the compiler and the compiler
-options used during generation.
+Implemented the use of a cache object for all internal namespace nodes.
+Since there are about 1000 static nodes in a typical system, this will
+decrease memory use for cache implementations that minimize per-allocation
+overhead (such as a slab allocator.)
+
+Removed the reference count mechanism for internal namespace nodes, since it
+was deemed unnecessary. This reduces the size of each namespace node by
+about 5%-10% on all platforms. Nodes are now 20 bytes for the 32-bit case,
+and 32 bytes for the 64-bit case.
+
+Optimized several internal data structures to reduce object size on 64-bit
+platforms by packing data within the 64-bit alignment. This includes the
+frequently used ACPI_OPERAND_OBJECT, of which there can be ~1000 static
+instances corresponding to the namespace objects.
+
+Added two new strings for the predefined _OSI method: "Windows 2001.1 SP1"
+and "Windows 2006".
+
+Split the allocation tracking mechanism out to a separate file, from
+utalloc.c to uttrack.c. This mechanism appears to be only useful for
+application-level code. Kernels may wish to not include uttrack.c in
+distributions.
+
+Removed all remnants of the obsolete ACPI_REPORT_* macros and the associated
+code. (These macros have been replaced by the ACPI_ERROR and ACPI_WARNING
+macros.)
+
+Code and Data Size: These are the sizes for the acpica.lib produced by the
+Microsoft Visual C++ 6.0 32-bit compiler. The values do not include any ACPI
+driver or OSPM code. The debug version of the code includes the debug output
+trace mechanism and has a much larger code and data size. Note that these
+values will vary depending on the efficiency of the compiler and the
+compiler options used during generation.
Previous Release:
Non-Debug Version: 81.1K Code, 17.8K Data, 98.9K Total
@@ -622,12 +1908,11 @@ options used during generation.
2) iASL Compiler/Disassembler and Tools:
-Implemented an ANSI C version of the acpixtract utility. This
-version will automatically extract the DSDT and all SSDTs from
-the input acpidump text file and dump the binary output to
-separate files. It can also display a summary of the input file
-including the headers for each table found and will extract any
-single ACPI table, with any signature. (See
+Implemented an ANSI C version of the acpixtract utility. This version will
+automatically extract the DSDT and all SSDTs from the input acpidump text
+file and dump the binary output to separate files. It can also display a
+summary of the input file including the headers for each table found and
+will extract any single ACPI table, with any signature. (See
source/tools/acpixtract)
----------------------------------------
@@ -635,38 +1920,36 @@ source/tools/acpixtract)
1) ACPI CA Core Subsystem:
-Tagged all external interfaces to the subsystem with the new
-ACPI_EXPORT_SYMBOL macro. This macro can be defined as necessary
-to assist kernel integration. For Linux, the macro resolves to
-the EXPORT_SYMBOL macro. The default definition is NULL.
-
-Added the ACPI_THREAD_ID type for the return value from
-AcpiOsGetThreadId. This allows the host to define this as
-necessary to simplify kernel integration. The default definition
-is ACPI_NATIVE_UINT.
-
-Fixed two interpreter problems related to error processing, the
-deletion of objects, and placing invalid pointers onto the
-internal operator result stack. BZ 6028, 6151 (Valery Podrezov)
-
-Increased the reference count threshold where a warning is
-emitted for large reference counts in order to eliminate
-unnecessary warnings on systems with large namespaces (especially
-64-bit.) Increased the value from 0x400 to 0x800.
-
-Due to universal disagreement as to the meaning of the 'c' in the
-calloc() function, the ACPI_MEM_CALLOCATE macro has been renamed
-to ACPI_ALLOCATE_ZEROED so that the purpose of the interface is
-'clear'. ACPI_MEM_ALLOCATE and ACPI_MEM_FREE are renamed to
-ACPI_ALLOCATE and ACPI_FREE.
-
-Code and Data Size: These are the sizes for the acpica.lib
-produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
-values do not include any ACPI driver or OSPM code. The debug
-version of the code includes the debug output trace mechanism and
-has a much larger code and data size. Note that these values will
-vary depending on the efficiency of the compiler and the compiler
-options used during generation.
+Tagged all external interfaces to the subsystem with the new
+ACPI_EXPORT_SYMBOL macro. This macro can be defined as necessary to assist
+kernel integration. For Linux, the macro resolves to the EXPORT_SYMBOL
+macro. The default definition is NULL.
+
+Added the ACPI_THREAD_ID type for the return value from AcpiOsGetThreadId.
+This allows the host to define this as necessary to simplify kernel
+integration. The default definition is ACPI_NATIVE_UINT.
+
+Fixed two interpreter problems related to error processing, the deletion of
+objects, and placing invalid pointers onto the internal operator result
+stack. BZ 6028, 6151 (Valery Podrezov)
+
+Increased the reference count threshold where a warning is emitted for large
+reference counts in order to eliminate unnecessary warnings on systems with
+large namespaces (especially 64-bit.) Increased the value from 0x400 to
+0x800.
+
+Due to universal disagreement as to the meaning of the 'c' in the calloc()
+function, the ACPI_MEM_CALLOCATE macro has been renamed to
+ACPI_ALLOCATE_ZEROED so that the purpose of the interface is 'clear'.
+ACPI_MEM_ALLOCATE and ACPI_MEM_FREE are renamed to ACPI_ALLOCATE and
+ACPI_FREE.
+
+Code and Data Size: These are the sizes for the acpica.lib produced by the
+Microsoft Visual C++ 6.0 32-bit compiler. The values do not include any ACPI
+driver or OSPM code. The debug version of the code includes the debug output
+trace mechanism and has a much larger code and data size. Note that these
+values will vary depending on the efficiency of the compiler and the
+compiler options used during generation.
Previous Release:
Non-Debug Version: 81.0K Code, 17.8K Data, 98.8K Total
@@ -678,59 +1961,52 @@ options used during generation.
2) iASL Compiler/Disassembler:
-Disassembler: implemented support for symbolic resource
-descriptor references. If a CreateXxxxField operator references a
-fixed offset within a resource descriptor, a name is assigned to
-the descriptor and the offset is translated to the appropriate
-resource tag and pathname. The addition of this support brings
-the disassembled code very close to the original ASL source code
-and helps eliminate run-time errors when the disassembled code is
-modified (and recompiled) in such a way as to invalidate the
-original fixed offsets.
-
-Implemented support for a Descriptor Name as the last parameter
-to the ASL Register() macro. This parameter was inadvertently
-left out of the ACPI specification, and will be added for ACPI
-3.0b.
-
-Fixed a problem where the use of the "_OSI" string (versus the
-full path "\_OSI") caused an internal compiler error. ("No back
-ptr to op")
-
-Fixed a problem with the error message that occurs when an
-invalid string is used for a _HID object (such as one with an
-embedded asterisk: "*PNP010A".) The correct message is now
-displayed.
+Disassembler: implemented support for symbolic resource descriptor
+references. If a CreateXxxxField operator references a fixed offset within a
+resource descriptor, a name is assigned to the descriptor and the offset is
+translated to the appropriate resource tag and pathname. The addition of
+this support brings the disassembled code very close to the original ASL
+source code and helps eliminate run-time errors when the disassembled code
+is modified (and recompiled) in such a way as to invalidate the original
+fixed offsets.
+
+Implemented support for a Descriptor Name as the last parameter to the ASL
+Register() macro. This parameter was inadvertently left out of the ACPI
+specification, and will be added for ACPI 3.0b.
+
+Fixed a problem where the use of the "_OSI" string (versus the full path
+"\_OSI") caused an internal compiler error. ("No back ptr to op")
+
+Fixed a problem with the error message that occurs when an invalid string is
+used for a _HID object (such as one with an embedded asterisk: "*PNP010A".)
+The correct message is now displayed.
----------------------------------------
17 February 2006. Summary of changes for version 20060217:
1) ACPI CA Core Subsystem:
-Implemented a change to the IndexField support to match the
-behavior of the Microsoft AML interpreter. The value written to
-the Index register is now a byte offset, no longer an index based
-upon the width of the Data register. This should fix IndexField
-problems seen on some machines where the Data register is not
-exactly one byte wide. The ACPI specification will be clarified
-on this point.
-
-Fixed a problem where several resource descriptor types could
-overrun the internal descriptor buffer due to size
-miscalculation: VendorShort, VendorLong, and Interrupt. This was
-noticed on IA64 machines, but could affect all platforms.
-
-Fixed a problem where individual resource descriptors were
-misaligned within the internal buffer, causing alignment faults
-on IA64 platforms.
-
-Code and Data Size: These are the sizes for the acpica.lib
-produced by the Microsoft Visual C++ 6.0 32-bit compiler. The
-values do not include any ACPI driver or OSPM code. The debug
-version of the code includes the debug output trace mechanism and
-has a much larger code and data size. Note that these values will
-vary depending on the efficiency of the compiler and the compiler
-options used during generation.
+Implemented a change to the IndexField support to match the behavior of the
+Microsoft AML interpreter. The value written to the Index register is now a
+byte offset, no longer an index based upon the width of the Data register.
+This should fix IndexField problems seen on some machines where the Data
+register is not exactly one byte wide. The ACPI specification will be
+clarified on this point.
+
+Fixed a problem where several resource descriptor types could overrun the
+internal descriptor buffer due to size miscalculation: VendorShort,
+VendorLong, and Interrupt. This was noticed on IA64 machines, but could
+affect all platforms.
+
+Fixed a problem where individual resource descriptors were misaligned within
+the internal buffer, causing alignment faults on IA64 platforms.
+
+Code and Data Size: These are the sizes for the acpica.lib produced by the
+Microsoft Visual C++ 6.0 32-bit compiler. The values do not include any ACPI
+driver or OSPM code. The debug version of the code includes the debug output
+trace mechanism and has a much larger code and data size. Note that these
+values will vary depending on the efficiency of the compiler and the
+compiler options used during generation.
Previous Release:
Non-Debug Version: 81.1K Code, 17.8K Data, 98.9K Total
@@ -742,57 +2018,53 @@ options used during generation.
2) iASL Compiler/Disassembler:
-Implemented support for new reserved names: _WDG and _WED are
-Microsoft extensions for Windows Instrumentation Management, _TDL
-is a new ACPI-defined method (Throttling Depth Limit.)
+Implemented support for new reserved names: _WDG and _WED are Microsoft
+extensions for Windows Instrumentation Management, _TDL is a new ACPI-
+defined method (Throttling Depth Limit.)
-Fixed a problem where a zero-length VendorShort or VendorLong
-resource descriptor was incorrectly emitted as a descriptor of
-length one.
+Fixed a problem where a zero-length VendorShort or VendorLong resource
+descriptor was incorrectly emitted as a descriptor of length one.
----------------------------------------
10 February 2006. Summary of changes for version 20060210:
1) ACPI CA Core Subsystem:
-Removed a couple of extraneous ACPI_ERROR messages that appeared
-during normal execution. These became apparent after the
-conversion from ACPI_DEBUG_PRINT.
+Removed a couple of extraneous ACPI_ERROR messages that appeared during
+normal execution. These became apparent after the conversion from
+ACPI_DEBUG_PRINT.
-Fixed a problem where the CreateField operator could hang if the
-BitIndex or NumBits parameter referred to a named object. (Valery
-Podrezov, BZ 5359)
+Fixed a problem where the CreateField operator could hang if the BitIndex or
+NumBits parameter referred to a named object. (Valery Podrezov, BZ 5359)
-Fixed a problem where a DeRefOf operation on a buffer object
-incorrectly failed with an exception. This also fixes a couple of
-related RefOf and DeRefOf issues. (Valery Podrezov, BZ
-5360/5392/5387)
+Fixed a problem where a DeRefOf operation on a buffer object incorrectly
+failed with an exception. This also fixes a couple of related RefOf and
+DeRefOf issues. (Valery Podrezov, BZ 5360/5392/5387)
-Fixed a problem where the AE_BUFFER_LIMIT exception was returned
-instead of AE_STRING_LIMIT on an out-of-bounds Index() operation.
-(Valery Podrezov, BZ 5480)
+Fixed a problem where the AE_BUFFER_LIMIT exception was returned instead of
+AE_STRING_LIMIT on an out-of-bounds Index() operation. (Valery Podrezov, BZ
+5480)
-Implemented a memory cleanup at the end of the execution of each
-iteration of an AML While() loop, preventing the accumulation of
-outstanding objects. (Valery Podrezov, BZ 5427)
+Implemented a memory cleanup at the end of the execution of each iteration
+of an AML While() loop, preventing the accumulation of outstanding objects.
+(Valery Podrezov, BZ 5427)
-Eliminated a chunk of duplicate code in the object resolution
-code. (Valery Podrezov, BZ 5336)
+Eliminated a chunk of duplicate code in the object resolution code. (Valery
+Podrezov, BZ 5336)
Fixed several warnings during the 64-bit code generation.
-The AcpiSrc source code conversion tool now inserts one line of
-whitespace after an if() statement that is followed immediately
-by a comment, improving readability of the Linux code.
+The AcpiSrc source code conversion tool now inserts one line of whitespace
+after an if() statement that is followed immediately by a comment, improving
+readability of the Linux code.
-Code and Data Size: The current and previous library sizes for
-the core subsystem are shown below. These are the code and data
-sizes for the acpica.lib produced by the Microsoft Visual C++ 6.0
-32-bit compiler. These values do not include any ACPI driver or
-OSPM code. The debug version of the code includes the debug
-output trace mechanism and has a much larger code and data size.
-Note that these values will vary depending on the efficiency of
-the compiler and the compiler options used during generation.
+Code and Data Size: The current and previous library sizes for the core
+subsystem are shown below. These are the code and data sizes for the
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. These
+values do not include any ACPI driver or OSPM code. The debug version of the
+code includes the debug output trace mechanism and has a much larger code
+and data size. Note that these values will vary depending on the efficiency
+of the compiler and the compiler options used during generation.
Previous Release:
Non-Debug Version: 81.0K Code, 17.9K Data, 98.9K Total
@@ -804,54 +2076,50 @@ the compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Fixed a problem with the disassembly of a BankField operator with
-a complex expression for the BankValue parameter.
+Fixed a problem with the disassembly of a BankField operator with a complex
+expression for the BankValue parameter.
----------------------------------------
27 January 2006. Summary of changes for version 20060127:
1) ACPI CA Core Subsystem:
-Implemented support in the Resource Manager to allow unresolved
-namestring references within resource package objects for the
-_PRT method. This support is in addition to the previously
-implemented unresolved reference support within the AML parser.
-If the interpreter slack mode is enabled, these unresolved
-references will be passed through to the caller as a NULL package
+Implemented support in the Resource Manager to allow unresolved namestring
+references within resource package objects for the _PRT method. This support
+is in addition to the previously implemented unresolved reference support
+within the AML parser. If the interpreter slack mode is enabled, these
+unresolved references will be passed through to the caller as a NULL package
entry.
-Implemented and deployed new macros and functions for error and
-warning messages across the subsystem. These macros are simpler
-and generate less code than their predecessors. The new macros
-ACPI_ERROR, ACPI_EXCEPTION, ACPI_WARNING, and ACPI_INFO replace
-the ACPI_REPORT_* macros. The older macros remain defined to
-allow ACPI drivers time to migrate to the new macros.
+Implemented and deployed new macros and functions for error and warning
+messages across the subsystem. These macros are simpler and generate less
+code than their predecessors. The new macros ACPI_ERROR, ACPI_EXCEPTION,
+ACPI_WARNING, and ACPI_INFO replace the ACPI_REPORT_* macros. The older
+macros remain defined to allow ACPI drivers time to migrate to the new
+macros.
-Implemented the ACPI_CPU_FLAGS type to simplify host OS
-integration of the Acquire/Release Lock OSL interfaces.
+Implemented the ACPI_CPU_FLAGS type to simplify host OS integration of the
+Acquire/Release Lock OSL interfaces.
-Fixed a problem where Alias ASL operators are sometimes not
-correctly resolved, in both the interpreter and the iASL
-compiler.
+Fixed a problem where Alias ASL operators are sometimes not correctly
+resolved, in both the interpreter and the iASL compiler.
-Fixed several problems with the implementation of the
-ConcatenateResTemplate ASL operator. As per the ACPI
-specification, zero length buffers are now treated as a single
-EndTag. One-length buffers always cause a fatal exception. Non-
-zero length buffers that do not end with a full 2-byte EndTag
+Fixed several problems with the implementation of the ConcatenateResTemplate
+ASL operator. As per the ACPI specification, zero length buffers are now
+treated as a single EndTag. One-length buffers always cause a fatal
+exception. Non-zero length buffers that do not end with a full 2-byte EndTag
cause a fatal exception.
-Fixed a possible structure overwrite in the AcpiGetObjectInfo
-external interface. (With assistance from Thomas Renninger)
+Fixed a possible structure overwrite in the AcpiGetObjectInfo external
+interface. (With assistance from Thomas Renninger)
-Code and Data Size: The current and previous library sizes for
-the core subsystem are shown below. These are the code and data
-sizes for the acpica.lib produced by the Microsoft Visual C++ 6.0
-32-bit compiler. These values do not include any ACPI driver or
-OSPM code. The debug version of the code includes the debug
-output trace mechanism and has a much larger code and data size.
-Note that these values will vary depending on the efficiency of
-the compiler and the compiler options used during generation.
+Code and Data Size: The current and previous library sizes for the core
+subsystem are shown below. These are the code and data sizes for the
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. These
+values do not include any ACPI driver or OSPM code. The debug version of the
+code includes the debug output trace mechanism and has a much larger code
+and data size. Note that these values will vary depending on the efficiency
+of the compiler and the compiler options used during generation.
Previous Release:
Non-Debug Version: 83.1K Code, 18.4K Data, 101.5K Total
@@ -863,46 +2131,42 @@ the compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Fixed an internal error that was generated for any forward
-references to ASL Alias objects.
+Fixed an internal error that was generated for any forward references to ASL
+Alias objects.
----------------------------------------
13 January 2006. Summary of changes for version 20060113:
1) ACPI CA Core Subsystem:
-Added 2006 copyright to all module headers and signons. This
-affects virtually every file in the ACPICA core subsystem, iASL
-compiler, and the utilities.
-
-Enhanced the ACPICA error reporting in order to simplify user
-migration to the non-debug version of ACPICA. Replaced all
-instances of the ACPI_DEBUG_PRINT macro invoked at the
-ACPI_DB_ERROR and ACPI_DB_WARN debug levels with the
-ACPI_REPORT_ERROR and ACPI_REPORT_WARNING macros, respectively.
-This preserves all error and warning messages in the non-debug
-version of the ACPICA code (this has been referred to as the
-"debug lite" option.) Over 200 cases were converted to create a
-total of over 380 error/warning messages across the ACPICA code.
-This increases the code and data size of the default non-debug
-version of the code somewhat (about 13K), but all error/warning
-reporting may be disabled if desired (and code eliminated) by
-specifying the ACPI_NO_ERROR_MESSAGES compile-time configuration
-option. The size of the debug version of ACPICA remains about the
-same.
-
-Fixed a memory leak within the AML Debugger "Set" command. One
-object was not properly deleted for every successful invocation
-of the command.
-
-Code and Data Size: The current and previous library sizes for
-the core subsystem are shown below. These are the code and data
-sizes for the acpica.lib produced by the Microsoft Visual C++ 6.0
-32-bit compiler. These values do not include any ACPI driver or
-OSPM code. The debug version of the code includes the debug
-output trace mechanism and has a much larger code and data size.
-Note that these values will vary depending on the efficiency of
-the compiler and the compiler options used during generation.
+Added 2006 copyright to all module headers and signons. This affects
+virtually every file in the ACPICA core subsystem, iASL compiler, and the
+utilities.
+
+Enhanced the ACPICA error reporting in order to simplify user migration to
+the non-debug version of ACPICA. Replaced all instances of the
+ACPI_DEBUG_PRINT macro invoked at the ACPI_DB_ERROR and ACPI_DB_WARN debug
+levels with the ACPI_REPORT_ERROR and ACPI_REPORT_WARNING macros,
+respectively. This preserves all error and warning messages in the non-debug
+version of the ACPICA code (this has been referred to as the "debug lite"
+option.) Over 200 cases were converted to create a total of over 380
+error/warning messages across the ACPICA code. This increases the code and
+data size of the default non-debug version of the code somewhat (about 13K),
+but all error/warning reporting may be disabled if desired (and code
+eliminated) by specifying the ACPI_NO_ERROR_MESSAGES compile-time
+configuration option. The size of the debug version of ACPICA remains about
+the same.
+
+Fixed a memory leak within the AML Debugger "Set" command. One object was
+not properly deleted for every successful invocation of the command.
+
+Code and Data Size: The current and previous library sizes for the core
+subsystem are shown below. These are the code and data sizes for the
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. These
+values do not include any ACPI driver or OSPM code. The debug version of the
+code includes the debug output trace mechanism and has a much larger code
+and data size. Note that these values will vary depending on the efficiency
+of the compiler and the compiler options used during generation.
Previous Release:
Non-Debug Version: 76.6K Code, 12.3K Data, 88.9K Total
@@ -914,60 +2178,55 @@ the compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-The compiler now officially supports the ACPI 3.0a specification
-that was released on December 30, 2005. (Specification is
-available at www.acpi.info)
+The compiler now officially supports the ACPI 3.0a specification that was
+released on December 30, 2005. (Specification is available at www.acpi.info)
----------------------------------------
16 December 2005. Summary of changes for version 20051216:
1) ACPI CA Core Subsystem:
-Implemented optional support to allow unresolved names within ASL
-Package objects. A null object is inserted in the package when a
-named reference cannot be located in the current namespace.
-Enabled via the interpreter slack flag, this should eliminate
-AE_NOT_FOUND exceptions seen on machines that contain such code.
-
-Implemented an optimization to the initialization sequence that
-can improve boot time. During ACPI device initialization, the
-_STA method is now run if and only if the _INI method exists. The
-_STA method is used to determine if the device is present; An
-_INI can only be run if _STA returns present, but it is a waste
-of time to run the _STA method if the _INI does not exist.
+Implemented optional support to allow unresolved names within ASL Package
+objects. A null object is inserted in the package when a named reference
+cannot be located in the current namespace. Enabled via the interpreter
+slack flag, this should eliminate AE_NOT_FOUND exceptions seen on machines
+that contain such code.
+
+Implemented an optimization to the initialization sequence that can improve
+boot time. During ACPI device initialization, the _STA method is now run if
+and only if the _INI method exists. The _STA method is used to determine if
+the device is present; An _INI can only be run if _STA returns present, but
+it is a waste of time to run the _STA method if the _INI does not exist.
(Prototype and assistance from Dong Wei)
-Implemented use of the C99 uintptr_t for the pointer casting
-macros if it is available in the current compiler. Otherwise, the
-default (void *) cast is used as before.
+Implemented use of the C99 uintptr_t for the pointer casting macros if it is
+available in the current compiler. Otherwise, the default (void *) cast is
+used as before.
-Fixed some possible memory leaks found within the execution path
-of the Break, Continue, If, and CreateField operators. (Valery
-Podrezov)
+Fixed some possible memory leaks found within the execution path of the
+Break, Continue, If, and CreateField operators. (Valery Podrezov)
-Fixed a problem introduced in the 20051202 release where an
-exception is generated during method execution if a control
-method attempts to declare another method.
+Fixed a problem introduced in the 20051202 release where an exception is
+generated during method execution if a control method attempts to declare
+another method.
-Moved resource descriptor string constants that are used by both
-the AML disassembler and AML debugger to the common utilities
-directory so that these components are independent.
+Moved resource descriptor string constants that are used by both the AML
+disassembler and AML debugger to the common utilities directory so that
+these components are independent.
-Implemented support in the AcpiExec utility (-e switch) to
-globally ignore exceptions during control method execution
-(method is not aborted.)
+Implemented support in the AcpiExec utility (-e switch) to globally ignore
+exceptions during control method execution (method is not aborted.)
-Added the rsinfo.c source file to the AcpiExec makefile for
-Linux/Unix generation.
+Added the rsinfo.c source file to the AcpiExec makefile for Linux/Unix
+generation.
-Code and Data Size: The current and previous library sizes for
-the core subsystem are shown below. These are the code and data
-sizes for the acpica.lib produced by the Microsoft Visual C++ 6.0
-32-bit compiler. These values do not include any ACPI driver or
-OSPM code. The debug version of the code includes the debug
-output trace mechanism and has a much larger code and data size.
-Note that these values will vary depending on the efficiency of
-the compiler and the compiler options used during generation.
+Code and Data Size: The current and previous library sizes for the core
+subsystem are shown below. These are the code and data sizes for the
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. These
+values do not include any ACPI driver or OSPM code. The debug version of the
+code includes the debug output trace mechanism and has a much larger code
+and data size. Note that these values will vary depending on the efficiency
+of the compiler and the compiler options used during generation.
Previous Release:
Non-Debug Version: 76.3K Code, 12.3K Data, 88.6K Total
@@ -979,43 +2238,40 @@ the compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Fixed a problem where a CPU stack overflow fault could occur if a
-recursive method call was made from within a Return statement.
+Fixed a problem where a CPU stack overflow fault could occur if a recursive
+method call was made from within a Return statement.
----------------------------------------
02 December 2005. Summary of changes for version 20051202:
1) ACPI CA Core Subsystem:
-Modified the parsing of control methods to no longer create
-namespace objects during the first pass of the parse. Objects are
-now created only during the execute phase, at the moment the
-namespace creation operator is encountered in the AML (Name,
-OperationRegion, CreateByteField, etc.) This should eliminate
-ALREADY_EXISTS exceptions seen on some machines where reentrant
-control methods are protected by an AML mutex. The mutex will now
-correctly block multiple threads from attempting to create the
-same object more than once.
-
-Increased the number of available Owner Ids for namespace object
-tracking from 32 to 255. This should eliminate the OWNER_ID_LIMIT
-exceptions seen on some machines with a large number of ACPI
-tables (either static or dynamic).
-
-Fixed a problem with the AcpiExec utility where a fault could
-occur when the -b switch (batch mode) is used.
-
-Enhanced the namespace dump routine to output the owner ID for
-each namespace object.
-
-Code and Data Size: The current and previous library sizes for
-the core subsystem are shown below. These are the code and data
-sizes for the acpica.lib produced by the Microsoft Visual C++ 6.0
-32-bit compiler. These values do not include any ACPI driver or
-OSPM code. The debug version of the code includes the debug
-output trace mechanism and has a much larger code and data size.
-Note that these values will vary depending on the efficiency of
-the compiler and the compiler options used during generation.
+Modified the parsing of control methods to no longer create namespace
+objects during the first pass of the parse. Objects are now created only
+during the execute phase, at the moment the namespace creation operator is
+encountered in the AML (Name, OperationRegion, CreateByteField, etc.) This
+should eliminate ALREADY_EXISTS exceptions seen on some machines where
+reentrant control methods are protected by an AML mutex. The mutex will now
+correctly block multiple threads from attempting to create the same object
+more than once.
+
+Increased the number of available Owner Ids for namespace object tracking
+from 32 to 255. This should eliminate the OWNER_ID_LIMIT exceptions seen on
+some machines with a large number of ACPI tables (either static or dynamic).
+
+Fixed a problem with the AcpiExec utility where a fault could occur when the
+-b switch (batch mode) is used.
+
+Enhanced the namespace dump routine to output the owner ID for each
+namespace object.
+
+Code and Data Size: The current and previous library sizes for the core
+subsystem are shown below. These are the code and data sizes for the
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. These
+values do not include any ACPI driver or OSPM code. The debug version of the
+code includes the debug output trace mechanism and has a much larger code
+and data size. Note that these values will vary depending on the efficiency
+of the compiler and the compiler options used during generation.
Previous Release:
Non-Debug Version: 76.3K Code, 12.3K Data, 88.6K Total
@@ -1027,67 +2283,60 @@ the compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Fixed a parse error during compilation of certain Switch/Case
-constructs. To simplify the parse, the grammar now allows for
-multiple Default statements and this error is now detected and
-flagged during the analysis phase.
+Fixed a parse error during compilation of certain Switch/Case constructs. To
+simplify the parse, the grammar now allows for multiple Default statements
+and this error is now detected and flagged during the analysis phase.
-Disassembler: The disassembly now includes the contents of the
-original table header within a comment at the start of the file.
-This includes the name and version of the original ASL compiler.
+Disassembler: The disassembly now includes the contents of the original
+table header within a comment at the start of the file. This includes the
+name and version of the original ASL compiler.
----------------------------------------
17 November 2005. Summary of changes for version 20051117:
1) ACPI CA Core Subsystem:
-Fixed a problem in the AML parser where the method thread count
-could be decremented below zero if any errors occurred during the
-method parse phase. This should eliminate AE_AML_METHOD_LIMIT
-exceptions seen on some machines. This also fixed a related
-regression with the mechanism that detects and corrects methods
-that cannot properly handle reentrancy (related to the deployment
-of the new OwnerId mechanism.)
-
-Eliminated the pre-parsing of control methods (to detect errors)
-during table load. Related to the problem above, this was causing
-unwind issues if any errors occurred during the parse, and it
-seemed to be overkill. A table load should not be aborted if
-there are problems with any single control method, thus rendering
-this feature rather pointless.
-
-Fixed a problem with the new table-driven resource manager where
-an internal buffer overflow could occur for small resource
-templates.
-
-Implemented a new external interface, AcpiGetVendorResource. This
-interface will find and return a vendor-defined resource
-descriptor within a _CRS or _PRS method via an ACPI 3.0 UUID
-match. With assistance from Bjorn Helgaas.
-
-Removed the length limit (200) on string objects as per the
-upcoming ACPI 3.0A specification. This affects the following
-areas of the interpreter: 1) any implicit conversion of a Buffer
-to a String, 2) a String object result of the ASL Concatentate
-operator, 3) the String object result of the ASL ToString
-operator.
-
-Fixed a problem in the Windows OS interface layer (OSL) where a
-WAIT_FOREVER on a semaphore object would incorrectly timeout.
-This allows the multithreading features of the AcpiExec utility
-to work properly under Windows.
+Fixed a problem in the AML parser where the method thread count could be
+decremented below zero if any errors occurred during the method parse phase.
+This should eliminate AE_AML_METHOD_LIMIT exceptions seen on some machines.
+This also fixed a related regression with the mechanism that detects and
+corrects methods that cannot properly handle reentrancy (related to the
+deployment of the new OwnerId mechanism.)
+
+Eliminated the pre-parsing of control methods (to detect errors) during
+table load. Related to the problem above, this was causing unwind issues if
+any errors occurred during the parse, and it seemed to be overkill. A table
+load should not be aborted if there are problems with any single control
+method, thus rendering this feature rather pointless.
+
+Fixed a problem with the new table-driven resource manager where an internal
+buffer overflow could occur for small resource templates.
+
+Implemented a new external interface, AcpiGetVendorResource. This interface
+will find and return a vendor-defined resource descriptor within a _CRS or
+_PRS method via an ACPI 3.0 UUID match. With assistance from Bjorn Helgaas.
+
+Removed the length limit (200) on string objects as per the upcoming ACPI
+3.0A specification. This affects the following areas of the interpreter: 1)
+any implicit conversion of a Buffer to a String, 2) a String object result
+of the ASL Concatentate operator, 3) the String object result of the ASL
+ToString operator.
+
+Fixed a problem in the Windows OS interface layer (OSL) where a WAIT_FOREVER
+on a semaphore object would incorrectly timeout. This allows the
+multithreading features of the AcpiExec utility to work properly under
+Windows.
-Updated the Linux makefiles for the iASL compiler and AcpiExec to
-include the recently added file named "utresrc.c".
+Updated the Linux makefiles for the iASL compiler and AcpiExec to include
+the recently added file named "utresrc.c".
-Code and Data Size: The current and previous library sizes for
-the core subsystem are shown below. These are the code and data
-sizes for the acpica.lib produced by the Microsoft Visual C++ 6.0
-32-bit compiler. These values do not include any ACPI driver or
-OSPM code. The debug version of the code includes the debug
-output trace mechanism and has a much larger code and data size.
-Note that these values will vary depending on the efficiency of
-the compiler and the compiler options used during generation.
+Code and Data Size: The current and previous library sizes for the core
+subsystem are shown below. These are the code and data sizes for the
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. These
+values do not include any ACPI driver or OSPM code. The debug version of the
+code includes the debug output trace mechanism and has a much larger code
+and data size. Note that these values will vary depending on the efficiency
+of the compiler and the compiler options used during generation.
Previous Release:
Non-Debug Version: 76.2K Code, 12.3K Data, 88.5K Total
@@ -1099,56 +2348,52 @@ the compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Removed the limit (200) on string objects as per the upcoming
-ACPI 3.0A specification. For the iASL compiler, this means that
-string literals within the source ASL can be of any length.
+Removed the limit (200) on string objects as per the upcoming ACPI 3.0A
+specification. For the iASL compiler, this means that string literals within
+the source ASL can be of any length.
-Enhanced the listing output to dump the AML code for resource
-descriptors immediately after the ASL code for each descriptor,
-instead of in a block at the end of the entire resource template.
+Enhanced the listing output to dump the AML code for resource descriptors
+immediately after the ASL code for each descriptor, instead of in a block at
+the end of the entire resource template.
-Enhanced the compiler debug output to dump the entire original
-parse tree constructed during the parse phase, before any
-transforms are applied to the tree. The transformed tree is
-dumped also.
+Enhanced the compiler debug output to dump the entire original parse tree
+constructed during the parse phase, before any transforms are applied to the
+tree. The transformed tree is dumped also.
----------------------------------------
02 November 2005. Summary of changes for version 20051102:
1) ACPI CA Core Subsystem:
-Modified the subsystem initialization sequence to improve GPE
-support. The GPE initialization has been split into two parts in
-order to defer execution of the _PRW methods (Power Resources for
-Wake) until after the hardware is fully initialized and the SCI
-handler is installed. This allows the _PRW methods to access
-fields protected by the Global Lock. This will fix systems where
-a NO_GLOBAL_LOCK exception has been seen during initialization.
-
-Converted the ACPI internal object disassemble and display code
-within the AML debugger to fully table-driven operation, reducing
-code size and increasing maintainability.
-
-Fixed a regression with the ConcatenateResTemplate() ASL operator
-introduced in the 20051021 release.
-
-Implemented support for "local" internal ACPI object types within
-the debugger "Object" command and the AcpiWalkNamespace external
-interfaces. These local types include RegionFields, BankFields,
-IndexFields, Alias, and reference objects.
-
-Moved common AML resource handling code into a new file,
-"utresrc.c". This code is shared by both the Resource Manager and
-the AML Debugger.
-
-Code and Data Size: The current and previous library sizes for
-the core subsystem are shown below. These are the code and data
-sizes for the acpica.lib produced by the Microsoft Visual C++ 6.0
-32-bit compiler. These values do not include any ACPI driver or
-OSPM code. The debug version of the code includes the debug
-output trace mechanism and has a much larger code and data size.
-Note that these values will vary depending on the efficiency of
-the compiler and the compiler options used during generation.
+Modified the subsystem initialization sequence to improve GPE support. The
+GPE initialization has been split into two parts in order to defer execution
+of the _PRW methods (Power Resources for Wake) until after the hardware is
+fully initialized and the SCI handler is installed. This allows the _PRW
+methods to access fields protected by the Global Lock. This will fix systems
+where a NO_GLOBAL_LOCK exception has been seen during initialization.
+
+Converted the ACPI internal object disassemble and display code within the
+AML debugger to fully table-driven operation, reducing code size and
+increasing maintainability.
+
+Fixed a regression with the ConcatenateResTemplate() ASL operator introduced
+in the 20051021 release.
+
+Implemented support for "local" internal ACPI object types within the
+debugger "Object" command and the AcpiWalkNamespace external interfaces.
+These local types include RegionFields, BankFields, IndexFields, Alias, and
+reference objects.
+
+Moved common AML resource handling code into a new file, "utresrc.c". This
+code is shared by both the Resource Manager and the AML Debugger.
+
+Code and Data Size: The current and previous library sizes for the core
+subsystem are shown below. These are the code and data sizes for the
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. These
+values do not include any ACPI driver or OSPM code. The debug version of the
+code includes the debug output trace mechanism and has a much larger code
+and data size. Note that these values will vary depending on the efficiency
+of the compiler and the compiler options used during generation.
Previous Release:
Non-Debug Version: 76.1K Code, 12.2K Data, 88.3K Total
@@ -1160,67 +2405,61 @@ the compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Fixed a problem with very large initializer lists (more than 4000
-elements) for both Buffer and Package objects where the parse
-stack could overflow.
+Fixed a problem with very large initializer lists (more than 4000 elements)
+for both Buffer and Package objects where the parse stack could overflow.
-Enhanced the pre-compile source code scan for non-ASCII
-characters to ignore characters within comment fields. The scan
-is now always performed and is no longer optional, detecting
-invalid characters within a source file immediately rather than
-during the parse phase or later.
+Enhanced the pre-compile source code scan for non-ASCII characters to ignore
+characters within comment fields. The scan is now always performed and is no
+longer optional, detecting invalid characters within a source file
+immediately rather than during the parse phase or later.
-Enhanced the ASL grammar definition to force early reductions on
-all list-style grammar elements so that the overall parse stack
-usage is greatly reduced. This should improve performance and
-reduce the possibility of parse stack overflow.
+Enhanced the ASL grammar definition to force early reductions on all list-
+style grammar elements so that the overall parse stack usage is greatly
+reduced. This should improve performance and reduce the possibility of parse
+stack overflow.
-Eliminated all reduce/reduce conflicts in the iASL parser
-generation. Also, with the addition of a %expected statement, the
-compiler generates from source with no warnings.
+Eliminated all reduce/reduce conflicts in the iASL parser generation. Also,
+with the addition of a %expected statement, the compiler generates from
+source with no warnings.
-Fixed a possible segment fault in the disassembler if the input
-filename does not contain a "dot" extension (Thomas Renninger).
+Fixed a possible segment fault in the disassembler if the input filename
+does not contain a "dot" extension (Thomas Renninger).
----------------------------------------
21 October 2005. Summary of changes for version 20051021:
1) ACPI CA Core Subsystem:
-Implemented support for the EM64T and other x86-64 processors.
-This essentially entails recognizing that these processors
-support non-aligned memory transfers. Previously, all 64-bit
-processors were assumed to lack hardware support for non-aligned
-transfers.
-
-Completed conversion of the Resource Manager to nearly full table-
-driven operation. Specifically, the resource conversion code
-(convert AML to internal format and the reverse) and the debug
-code to dump internal resource descriptors are fully table-
-driven, reducing code and data size and improving
-maintainability.
-
-The OSL interfaces for Acquire and Release Lock now use a 64-bit
-flag word on 64-bit processors instead of a fixed 32-bit word.
-(With assistance from Alexey Starikovskiy)
-
-Implemented support within the resource conversion code for the
-Type-Specific byte within the various ACPI 3.0 *WordSpace macros.
-
-Fixed some issues within the resource conversion code for the
-type-specific flags for both Memory and I/O address resource
-descriptors. For Memory, implemented support for the MTP and TTP
-flags. For I/O, split the TRS and TTP flags into two separate
-fields.
-
-Code and Data Size: The current and previous library sizes for
-the core subsystem are shown below. These are the code and data
-sizes for the acpica.lib produced by the Microsoft Visual C++ 6.0
-32-bit compiler. These values do not include any ACPI driver or
-OSPM code. The debug version of the code includes the debug
-output trace mechanism and has a much larger code and data size.
-Note that these values will vary depending on the efficiency of
-the compiler and the compiler options used during generation.
+Implemented support for the EM64T and other x86-64 processors. This
+essentially entails recognizing that these processors support non-aligned
+memory transfers. Previously, all 64-bit processors were assumed to lack
+hardware support for non-aligned transfers.
+
+Completed conversion of the Resource Manager to nearly full table-driven
+operation. Specifically, the resource conversion code (convert AML to
+internal format and the reverse) and the debug code to dump internal
+resource descriptors are fully table-driven, reducing code and data size and
+improving maintainability.
+
+The OSL interfaces for Acquire and Release Lock now use a 64-bit flag word
+on 64-bit processors instead of a fixed 32-bit word. (With assistance from
+Alexey Starikovskiy)
+
+Implemented support within the resource conversion code for the Type-
+Specific byte within the various ACPI 3.0 *WordSpace macros.
+
+Fixed some issues within the resource conversion code for the type-specific
+flags for both Memory and I/O address resource descriptors. For Memory,
+implemented support for the MTP and TTP flags. For I/O, split the TRS and
+TTP flags into two separate fields.
+
+Code and Data Size: The current and previous library sizes for the core
+subsystem are shown below. These are the code and data sizes for the
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. These
+values do not include any ACPI driver or OSPM code. The debug version of the
+code includes the debug output trace mechanism and has a much larger code
+and data size. Note that these values will vary depending on the efficiency
+of the compiler and the compiler options used during generation.
Previous Release:
Non-Debug Version: 77.1K Code, 12.1K Data, 89.2K Total
@@ -1233,77 +2472,70 @@ the compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Relaxed a compiler restriction that disallowed a ResourceIndex
-byte if the corresponding ResourceSource string was not also
-present in a resource descriptor declaration. This restriction
-caused problems with existing AML/ASL code that includes the
-Index byte without the string. When such AML was disassembled, it
-could not be compiled without modification. Further, the modified
-code created a resource template with a different size than the
-original, breaking code that used fixed offsets into the resource
-template buffer.
+Relaxed a compiler restriction that disallowed a ResourceIndex byte if the
+corresponding ResourceSource string was not also present in a resource
+descriptor declaration. This restriction caused problems with existing
+AML/ASL code that includes the Index byte without the string. When such AML
+was disassembled, it could not be compiled without modification. Further,
+the modified code created a resource template with a different size than the
+original, breaking code that used fixed offsets into the resource template
+buffer.
-Removed a recent feature of the disassembler to ignore a lone
-ResourceIndex byte. This byte is now emitted if present so that
-the exact AML can be reproduced when the disassembled code is
-recompiled.
+Removed a recent feature of the disassembler to ignore a lone ResourceIndex
+byte. This byte is now emitted if present so that the exact AML can be
+reproduced when the disassembled code is recompiled.
-Improved comments and text alignment for the resource descriptor
-code emitted by the disassembler.
+Improved comments and text alignment for the resource descriptor code
+emitted by the disassembler.
-Implemented disassembler support for the ACPI 3.0 AccessSize
-field within a Register() resource descriptor.
+Implemented disassembler support for the ACPI 3.0 AccessSize field within a
+Register() resource descriptor.
----------------------------------------
30 September 2005. Summary of changes for version 20050930:
1) ACPI CA Core Subsystem:
-Completed a major overhaul of the Resource Manager code -
-specifically, optimizations in the area of the AML/internal
-resource conversion code. The code has been optimized to simplify
-and eliminate duplicated code, CPU stack use has been decreased
-by optimizing function parameters and local variables, and naming
-conventions across the manager have been standardized for clarity
-and ease of maintenance (this includes function, parameter,
-variable, and struct/typedef names.) The update may force changes
-in some driver code, depending on how resources are handled by
-the host OS.
-
-All Resource Manager dispatch and information tables have been
-moved to a single location for clarity and ease of maintenance.
-One new file was created, named "rsinfo.c".
-
-The ACPI return macros (return_ACPI_STATUS, etc.) have been
-modified to guarantee that the argument is not evaluated twice,
-making them less prone to macro side-effects. However, since
-there exists the possibility of additional stack use if a
-particular compiler cannot optimize them (such as in the debug
-generation case), the original macros are optionally available.
-Note that some invocations of the return_VALUE macro may now
-cause size mismatch warnings; the return_UINT8 and return_UINT32
-macros are provided to eliminate these. (From Randy Dunlap)
-
-Implemented a new mechanism to enable debug tracing for
-individual control methods. A new external interface,
-AcpiDebugTrace, is provided to enable this mechanism. The intent
-is to allow the host OS to easily enable and disable tracing for
-problematic control methods. This interface can be easily exposed
-to a user or debugger interface if desired. See the file
+Completed a major overhaul of the Resource Manager code - specifically,
+optimizations in the area of the AML/internal resource conversion code. The
+code has been optimized to simplify and eliminate duplicated code, CPU stack
+use has been decreased by optimizing function parameters and local
+variables, and naming conventions across the manager have been standardized
+for clarity and ease of maintenance (this includes function, parameter,
+variable, and struct/typedef names.) The update may force changes in some
+driver code, depending on how resources are handled by the host OS.
+
+All Resource Manager dispatch and information tables have been moved to a
+single location for clarity and ease of maintenance. One new file was
+created, named "rsinfo.c".
+
+The ACPI return macros (return_ACPI_STATUS, etc.) have been modified to
+guarantee that the argument is not evaluated twice, making them less prone
+to macro side-effects. However, since there exists the possibility of
+additional stack use if a particular compiler cannot optimize them (such as
+in the debug generation case), the original macros are optionally available.
+Note that some invocations of the return_VALUE macro may now cause size
+mismatch warnings; the return_UINT8 and return_UINT32 macros are provided to
+eliminate these. (From Randy Dunlap)
+
+Implemented a new mechanism to enable debug tracing for individual control
+methods. A new external interface, AcpiDebugTrace, is provided to enable
+this mechanism. The intent is to allow the host OS to easily enable and
+disable tracing for problematic control methods. This interface can be
+easily exposed to a user or debugger interface if desired. See the file
psxface.c for details.
-AcpiUtCallocate will now return a valid pointer if a length of
-zero is specified - a length of one is used and a warning is
-issued. This matches the behavior of AcpiUtAllocate.
+AcpiUtCallocate will now return a valid pointer if a length of zero is
+specified - a length of one is used and a warning is issued. This matches
+the behavior of AcpiUtAllocate.
-Code and Data Size: The current and previous library sizes for
-the core subsystem are shown below. These are the code and data
-sizes for the acpica.lib produced by the Microsoft Visual C++ 6.0
-32-bit compiler. These values do not include any ACPI driver or
-OSPM code. The debug version of the code includes the debug
-output trace mechanism and has a much larger code and data size.
-Note that these values will vary depending on the efficiency of
-the compiler and the compiler options used during generation.
+Code and Data Size: The current and previous library sizes for the core
+subsystem are shown below. These are the code and data sizes for the
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. These
+values do not include any ACPI driver or OSPM code. The debug version of the
+code includes the debug output trace mechanism and has a much larger code
+and data size. Note that these values will vary depending on the efficiency
+of the compiler and the compiler options used during generation.
Previous Release:
Non-Debug Version: 77.5K Code, 12.0K Data, 89.5K Total
@@ -1315,41 +2547,36 @@ the compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-A remark is issued if the effective compile-time length of a
-package or buffer is zero. Previously, this was a warning.
+A remark is issued if the effective compile-time length of a package or
+buffer is zero. Previously, this was a warning.
----------------------------------------
16 September 2005. Summary of changes for version 20050916:
1) ACPI CA Core Subsystem:
-Fixed a problem within the Resource Manager where support for the
-Generic Register descriptor was not fully implemented. This
-descriptor is now fully recognized, parsed, disassembled, and
-displayed.
-
-Completely restructured the Resource Manager code to utilize
-table-driven dispatch and lookup, eliminating many of the large
-switch() statements. This reduces overall subsystem code size and
-code complexity. Affects the resource parsing and construction,
-disassembly, and debug dump output.
-
-Cleaned up and restructured the debug dump output for all
-resource descriptors. Improved readability of the output and
-reduced code size.
-
-Fixed a problem where changes to internal data structures caused
-the optional ACPI_MUTEX_DEBUG code to fail compilation if
-specified.
-
-Code and Data Size: The current and previous library sizes for
-the core subsystem are shown below. These are the code and data
-sizes for the acpica.lib produced by the Microsoft Visual C++ 6.0
-32-bit compiler. These values do not include any ACPI driver or
-OSPM code. The debug version of the code includes the debug
-output trace mechanism and has a much larger code and data size.
-Note that these values will vary depending on the efficiency of
-the compiler and the compiler options used during generation.
+Fixed a problem within the Resource Manager where support for the Generic
+Register descriptor was not fully implemented. This descriptor is now fully
+recognized, parsed, disassembled, and displayed.
+
+Completely restructured the Resource Manager code to utilize table-driven
+dispatch and lookup, eliminating many of the large switch() statements. This
+reduces overall subsystem code size and code complexity. Affects the
+resource parsing and construction, disassembly, and debug dump output.
+
+Cleaned up and restructured the debug dump output for all resource
+descriptors. Improved readability of the output and reduced code size.
+
+Fixed a problem where changes to internal data structures caused the
+optional ACPI_MUTEX_DEBUG code to fail compilation if specified.
+
+Code and Data Size: The current and previous library sizes for the core
+subsystem are shown below. These are the code and data sizes for the
+acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. These
+values do not include any ACPI driver or OSPM code. The debug version of the
+code includes the debug output trace mechanism and has a much larger code
+and data size. Note that these values will vary depending on the efficiency
+of the compiler and the compiler options used during generation.
Previous Release:
Non-Debug Version: 78.4K Code, 11.8K Data, 90.2K Total
@@ -1361,57 +2588,52 @@ the compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Updated the disassembler to automatically insert an
-EndDependentFn() macro into the ASL stream if this macro is
-missing in the original AML code, simplifying compilation of the
-resulting ASL module.
+Updated the disassembler to automatically insert an EndDependentFn() macro
+into the ASL stream if this macro is missing in the original AML code,
+simplifying compilation of the resulting ASL module.
-Fixed a problem in the disassembler where a disassembled
-ResourceSource string (within a large resource descriptor) was
-not surrounded by quotes and not followed by a comma, causing
-errors when the resulting ASL module was compiled. Also, escape
-sequences within a ResourceSource string are now handled
-correctly (especially "\\")
+Fixed a problem in the disassembler where a disassembled ResourceSource
+string (within a large resource descriptor) was not surrounded by quotes and
+not followed by a comma, causing errors when the resulting ASL module was
+compiled. Also, escape sequences within a ResourceSource string are now
+handled correctly (especially "\\")
----------------------------------------
02 September 2005. Summary of changes for version 20050902:
1) ACPI CA Core Subsystem:
-Fixed a problem with the internal Owner ID allocation and
-deallocation mechanisms for control method execution and
-recursive method invocation. This should eliminate the
-OWNER_ID_LIMIT exceptions and "Invalid OwnerId" messages seen on
-some systems. Recursive method invocation depth is currently
-limited to 255. (Alexey Starikovskiy)
-
-Completely eliminated all vestiges of support for the "module-
-level executable code" until this support is fully implemented
-and debugged. This should eliminate the NO_RETURN_VALUE
-exceptions seen during table load on some systems that invoke
-this support.
-
-Fixed a problem within the resource manager code where the
-transaction flags for a 64-bit address descriptor were handled
-incorrectly in the type-specific flag byte.
-
-Consolidated duplicate code within the address descriptor
-resource manager code, reducing overall subsystem code size.
-
-Fixed a fault when using the AML debugger "disassemble" command
-to disassemble individual control methods.
-
-Removed references to the "release_current" directory within the
-Unix release package.
-
-Code and Data Size: The current and previous core subsystem
-library sizes are shown below. These are the code and data sizes
-for the acpica.lib produced by the Microsoft Visual C++ 6.0
-compiler. These values do not include any ACPI driver or OSPM
-code. The debug version of the code includes the debug output
-trace mechanism and has a much larger code and data size. Note
-that these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Fixed a problem with the internal Owner ID allocation and deallocation
+mechanisms for control method execution and recursive method invocation.
+This should eliminate the OWNER_ID_LIMIT exceptions and "Invalid OwnerId"
+messages seen on some systems. Recursive method invocation depth is
+currently limited to 255. (Alexey Starikovskiy)
+
+Completely eliminated all vestiges of support for the "module-level
+executable code" until this support is fully implemented and debugged. This
+should eliminate the NO_RETURN_VALUE exceptions seen during table load on
+some systems that invoke this support.
+
+Fixed a problem within the resource manager code where the transaction flags
+for a 64-bit address descriptor were handled incorrectly in the type-
+specific flag byte.
+
+Consolidated duplicate code within the address descriptor resource manager
+code, reducing overall subsystem code size.
+
+Fixed a fault when using the AML debugger "disassemble" command to
+disassemble individual control methods.
+
+Removed references to the "release_current" directory within the Unix
+release package.
+
+Code and Data Size: The current and previous core subsystem library sizes
+are shown below. These are the code and data sizes for the acpica.lib
+produced by the Microsoft Visual C++ 6.0 compiler. These values do not
+include any ACPI driver or OSPM code. The debug version of the code includes
+the debug output trace mechanism and has a much larger code and data size.
+Note that these values will vary depending on the efficiency of the compiler
+and the compiler options used during generation.
Previous Release:
Non-Debug Version: 78.6K Code, 11.7K Data, 90.3K Total
@@ -1423,106 +2645,98 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Implemented an error check for illegal duplicate values in the
-interrupt and dma lists for the following ASL macros: Dma(),
-Irq(), IrqNoFlags(), and Interrupt().
+Implemented an error check for illegal duplicate values in the interrupt and
+dma lists for the following ASL macros: Dma(), Irq(), IrqNoFlags(), and
+Interrupt().
-Implemented error checking for the Irq() and IrqNoFlags() macros
-to detect too many values in the interrupt list (16 max) and
-invalid values in the list (range 0 - 15)
+Implemented error checking for the Irq() and IrqNoFlags() macros to detect
+too many values in the interrupt list (16 max) and invalid values in the
+list (range 0 - 15)
-The maximum length string literal within an ASL file is now
-restricted to 200 characters as per the ACPI specification.
+The maximum length string literal within an ASL file is now restricted to
+200 characters as per the ACPI specification.
-Fixed a fault when using the -ln option (generate namespace
-listing).
+Fixed a fault when using the -ln option (generate namespace listing).
-Implemented an error check to determine if a DescriptorName
-within a resource descriptor has already been used within the
-current scope.
+Implemented an error check to determine if a DescriptorName within a
+resource descriptor has already been used within the current scope.
----------------------------------------
15 August 2005. Summary of changes for version 20050815:
-
+
1) ACPI CA Core Subsystem:
-
-Implemented a full bytewise compare to determine if a table load
-request is attempting to load a duplicate table. The compare is
-performed if the table signatures and table lengths match. This
-will allow different tables with the same OEM Table ID and
-revision to be loaded - probably against the ACPI specification,
-but discovered in the field nonetheless.
-
-Added the changes.txt logfile to each of the zipped release
-packages.
-
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
-
+
+Implemented a full bytewise compare to determine if a table load request is
+attempting to load a duplicate table. The compare is performed if the table
+signatures and table lengths match. This will allow different tables with
+the same OEM Table ID and revision to be loaded - probably against the ACPI
+specification, but discovered in the field nonetheless.
+
+Added the changes.txt logfile to each of the zipped release packages.
+
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
+
Previous Release:
Non-Debug Version: 78.6K Code, 11.7K Data, 90.3K Total
Debug Version: 167.0K Code, 69.9K Data, 236.9K Total
Current Release:
Non-Debug Version: 78.6K Code, 11.7K Data, 90.3K Total
Debug Version: 170.0K Code, 69.9K Data, 239.9K Total
-
-
+
+
2) iASL Compiler/Disassembler:
-
-Fixed a problem where incorrect AML code could be generated for
-Package objects if optimization is disabled (via the -oa switch).
-
-Fixed a problem with where incorrect AML code is generated for
-variable-length packages when the package length is not specified
-and the number of initializer values is greater than 255.
-
+
+Fixed a problem where incorrect AML code could be generated for Package
+objects if optimization is disabled (via the -oa switch).
+
+Fixed a problem with where incorrect AML code is generated for variable-
+length packages when the package length is not specified and the number of
+initializer values is greater than 255.
+
----------------------------------------
29 July 2005. Summary of changes for version 20050729:
1) ACPI CA Core Subsystem:
-Implemented support to ignore an attempt to install/load a
-particular ACPI table more than once. Apparently there exists
-BIOS code that repeatedly attempts to load the same SSDT upon
-certain events. With assistance from Venkatesh Pallipadi.
-
-Restructured the main interface to the AML parser in order to
-correctly handle all exceptional conditions. This will prevent
-leakage of the OwnerId resource and should eliminate the
-AE_OWNER_ID_LIMIT exceptions seen on some machines. With
-assistance from Alexey Starikovskiy.
-
-Support for "module level code" has been disabled in this version
-due to a number of issues that have appeared on various machines.
-The support can be enabled by defining
-ACPI_ENABLE_MODULE_LEVEL_CODE during subsystem compilation. When
-the issues are fully resolved, the code will be enabled by
+Implemented support to ignore an attempt to install/load a particular ACPI
+table more than once. Apparently there exists BIOS code that repeatedly
+attempts to load the same SSDT upon certain events. With assistance from
+Venkatesh Pallipadi.
+
+Restructured the main interface to the AML parser in order to correctly
+handle all exceptional conditions. This will prevent leakage of the OwnerId
+resource and should eliminate the AE_OWNER_ID_LIMIT exceptions seen on some
+machines. With assistance from Alexey Starikovskiy.
+
+Support for "module level code" has been disabled in this version due to a
+number of issues that have appeared on various machines. The support can be
+enabled by defining ACPI_ENABLE_MODULE_LEVEL_CODE during subsystem
+compilation. When the issues are fully resolved, the code will be enabled by
default again.
-Modified the internal functions for debug print support to define
-the FunctionName parameter as a (const char *) for compatibility
-with compiler built-in macros such as __FUNCTION__, etc.
+Modified the internal functions for debug print support to define the
+FunctionName parameter as a (const char *) for compatibility with compiler
+built-in macros such as __FUNCTION__, etc.
Linted the entire ACPICA source tree for both 32-bit and 64-bit.
-Implemented support to display an object count summary for the
-AML Debugger commands Object and Methods.
+Implemented support to display an object count summary for the AML Debugger
+commands Object and Methods.
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 78.6K Code, 11.6K Data, 90.2K Total
@@ -1534,66 +2748,59 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Fixed a regression that appeared in the 20050708 version of the
-compiler where an error message was inadvertently emitted for
-invocations of the _OSI reserved control method.
+Fixed a regression that appeared in the 20050708 version of the compiler
+where an error message was inadvertently emitted for invocations of the _OSI
+reserved control method.
----------------------------------------
08 July 2005. Summary of changes for version 20050708:
1) ACPI CA Core Subsystem:
-The use of the CPU stack in the debug version of the subsystem
-has been considerably reduced. Previously, a debug structure was
-declared in every function that used the debug macros. This
-structure has been removed in favor of declaring the individual
-elements as parameters to the debug functions. This reduces the
-cumulative stack use during nested execution of ACPI function
-calls at the cost of a small increase in the code size of the
-debug version of the subsystem. With assistance from Alexey
-Starikovskiy and Len Brown.
-
-Added the ACPI_GET_FUNCTION_NAME macro to enable the compiler-
-dependent headers to define a macro that will return the current
-function name at runtime (such as __FUNCTION__ or _func_, etc.)
-The function name is used by the debug trace output. If
-ACPI_GET_FUNCTION_NAME is not defined in the compiler-dependent
-header, the function name is saved on the CPU stack (one pointer
-per function.) This mechanism is used because apparently there
-exists no standard ANSI-C defined macro that that returns the
-function name.
-
-Redesigned and reimplemented the "Owner ID" mechanism used to
-track namespace objects created/deleted by ACPI tables and
-control method execution. A bitmap is now used to allocate and
-free the IDs, thus solving the wraparound problem present in the
-previous implementation. The size of the namespace node
-descriptor was reduced by 2 bytes as a result (Alexey
+The use of the CPU stack in the debug version of the subsystem has been
+considerably reduced. Previously, a debug structure was declared in every
+function that used the debug macros. This structure has been removed in
+favor of declaring the individual elements as parameters to the debug
+functions. This reduces the cumulative stack use during nested execution of
+ACPI function calls at the cost of a small increase in the code size of the
+debug version of the subsystem. With assistance from Alexey Starikovskiy and
+Len Brown.
+
+Added the ACPI_GET_FUNCTION_NAME macro to enable the compiler-dependent
+headers to define a macro that will return the current function name at
+runtime (such as __FUNCTION__ or _func_, etc.) The function name is used by
+the debug trace output. If ACPI_GET_FUNCTION_NAME is not defined in the
+compiler-dependent header, the function name is saved on the CPU stack (one
+pointer per function.) This mechanism is used because apparently there
+exists no standard ANSI-C defined macro that that returns the function name.
+
+Redesigned and reimplemented the "Owner ID" mechanism used to track
+namespace objects created/deleted by ACPI tables and control method
+execution. A bitmap is now used to allocate and free the IDs, thus solving
+the wraparound problem present in the previous implementation. The size of
+the namespace node descriptor was reduced by 2 bytes as a result (Alexey
Starikovskiy).
-Removed the UINT32_BIT and UINT16_BIT types that were used for
-the bitfield flag definitions within the headers for the
-predefined ACPI tables. These have been replaced by UINT8_BIT in
-order to increase the code portability of the subsystem. If the
-use of UINT8 remains a problem, we may be forced to eliminate
-bitfields entirely because of a lack of portability.
-
-Enhanced the performance of the AcpiUtUpdateObjectReference
-procedure. This is a frequently used function and this
-improvement increases the performance of the entire subsystem
-(Alexey Starikovskiy).
-
-Fixed several possible memory leaks and the inverse - premature
-object deletion (Alexey Starikovskiy).
-
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Removed the UINT32_BIT and UINT16_BIT types that were used for the bitfield
+flag definitions within the headers for the predefined ACPI tables. These
+have been replaced by UINT8_BIT in order to increase the code portability of
+the subsystem. If the use of UINT8 remains a problem, we may be forced to
+eliminate bitfields entirely because of a lack of portability.
+
+Enhanced the performance of the AcpiUtUpdateObjectReference procedure. This
+is a frequently used function and this improvement increases the performance
+of the entire subsystem (Alexey Starikovskiy).
+
+Fixed several possible memory leaks and the inverse - premature object
+deletion (Alexey Starikovskiy).
+
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 78.6K Code, 11.5K Data, 90.1K Total
@@ -1607,51 +2814,47 @@ compiler and the compiler options used during generation.
1) ACPI CA Core Subsystem:
-Modified the new OSL cache interfaces to use ACPI_CACHE_T as the
-type for the host-defined cache object. This allows the OSL
-implementation to define and type this object in any manner
-desired, simplifying the OSL implementation. For example,
-ACPI_CACHE_T is defined as kmem_cache_t for Linux, and should be
-defined in the OS-specific header file for other operating
-systems as required.
-
-Changed the interface to AcpiOsAcquireObject to directly return
-the requested object as the function return (instead of
-ACPI_STATUS.) This change was made for performance reasons, since
-this is the purpose of the interface in the first place.
-AcpiOsAcquireObject is now similar to the AcpiOsAllocate
-interface.
-
-Implemented a new AML debugger command named Businfo. This
-command displays information about all devices that have an
-associate _PRT object. The _ADR, _HID, _UID, and _CID are
-displayed for these devices.
-
-Modified the initialization sequence in AcpiInitializeSubsystem
-to call the OSL interface AcpiOslInitialize first, before any
-local initialization. This change was required because the global
-initialization now calls OSL interfaces.
+Modified the new OSL cache interfaces to use ACPI_CACHE_T as the type for
+the host-defined cache object. This allows the OSL implementation to define
+and type this object in any manner desired, simplifying the OSL
+implementation. For example, ACPI_CACHE_T is defined as kmem_cache_t for
+Linux, and should be defined in the OS-specific header file for other
+operating systems as required.
+
+Changed the interface to AcpiOsAcquireObject to directly return the
+requested object as the function return (instead of ACPI_STATUS.) This
+change was made for performance reasons, since this is the purpose of the
+interface in the first place. AcpiOsAcquireObject is now similar to the
+AcpiOsAllocate interface.
+
+Implemented a new AML debugger command named Businfo. This command displays
+information about all devices that have an associate _PRT object. The _ADR,
+_HID, _UID, and _CID are displayed for these devices.
+
+Modified the initialization sequence in AcpiInitializeSubsystem to call the
+OSL interface AcpiOslInitialize first, before any local initialization. This
+change was required because the global initialization now calls OSL
+interfaces.
-Enhanced the Dump command to display the entire contents of
-Package objects (including all sub-objects and their values.)
+Enhanced the Dump command to display the entire contents of Package objects
+(including all sub-objects and their values.)
-Restructured the code base to split some files because of size
-and/or because the code logically belonged in a separate file.
-New files are listed below. All makefiles and project files
-included in the ACPI CA release have been updated.
+Restructured the code base to split some files because of size and/or
+because the code logically belonged in a separate file. New files are listed
+below. All makefiles and project files included in the ACPI CA release have
+been updated.
utilities/utcache.c /* Local cache interfaces */
utilities/utmutex.c /* Local mutex support */
utilities/utstate.c /* State object support */
interpreter/parser/psloop.c /* Main AML parse loop */
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 78.3K Code, 11.6K Data, 89.9K Total
@@ -1663,72 +2866,67 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Fixed a regression introduced in version 20050513 where the use
-of a Package object within a Case() statement caused a compile
-time exception. The original behavior has been restored (a
-Match() operator is emitted.)
+Fixed a regression introduced in version 20050513 where the use of a Package
+object within a Case() statement caused a compile time exception. The
+original behavior has been restored (a Match() operator is emitted.)
----------------------------------------
17 June 2005. Summary of changes for version 20050617:
1) ACPI CA Core Subsystem:
-Moved the object cache operations into the OS interface layer
-(OSL) to allow the host OS to handle these operations if desired
-(for example, the Linux OSL will invoke the slab allocator). This
-support is optional; the compile time define ACPI_USE_LOCAL_CACHE
-may be used to utilize the original cache code in the ACPI CA
-core. The new OSL interfaces are shown below. See utalloc.c for
-an example implementation, and acpiosxf.h for the exact interface
-definitions. With assistance from Alexey Starikovskiy.
+Moved the object cache operations into the OS interface layer (OSL) to allow
+the host OS to handle these operations if desired (for example, the Linux
+OSL will invoke the slab allocator). This support is optional; the compile
+time define ACPI_USE_LOCAL_CACHE may be used to utilize the original cache
+code in the ACPI CA core. The new OSL interfaces are shown below. See
+utalloc.c for an example implementation, and acpiosxf.h for the exact
+interface definitions. With assistance from Alexey Starikovskiy.
AcpiOsCreateCache
AcpiOsDeleteCache
AcpiOsPurgeCache
AcpiOsAcquireObject
AcpiOsReleaseObject
-Modified the interfaces to AcpiOsAcquireLock and
-AcpiOsReleaseLock to return and restore a flags parameter. This
-fits better with many OS lock models. Note: the current execution
-state (interrupt handler or not) is no longer passed to these
-interfaces. If necessary, the OSL must determine this state by
-itself, a simple and fast operation. With assistance from Alexey
+Modified the interfaces to AcpiOsAcquireLock and AcpiOsReleaseLock to return
+and restore a flags parameter. This fits better with many OS lock models.
+Note: the current execution state (interrupt handler or not) is no longer
+passed to these interfaces. If necessary, the OSL must determine this state
+by itself, a simple and fast operation. With assistance from Alexey
Starikovskiy.
-Fixed a problem in the ACPI table handling where a valid XSDT was
-assumed present if the revision of the RSDP was 2 or greater.
-According to the ACPI specification, the XSDT is optional in all
-cases, and the table manager therefore now checks for both an
-RSDP >=2 and a valid XSDT pointer. Otherwise, the RSDT pointer is
-used. Some ACPI 2.0 compliant BIOSs contain only the RSDT.
-
-Fixed an interpreter problem with the Mid() operator in the case
-of an input string where the resulting output string is of zero
-length. It now correctly returns a valid, null terminated string
-object instead of a string object with a null pointer.
-
-Fixed a problem with the control method argument handling to
-allow a store to an Arg object that already contains an object of
-type Device. The Device object is now correctly overwritten.
-Previously, an error was returned.
-
-
-Enhanced the debugger Find command to emit object values in
-addition to the found object pathnames. The output format is the
-same as the dump namespace command.
-
-Enhanced the debugger Set command. It now has the ability to set
-the value of any Named integer object in the namespace
-(Previously, only method locals and args could be set.)
-
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Fixed a problem in the ACPI table handling where a valid XSDT was assumed
+present if the revision of the RSDP was 2 or greater. According to the ACPI
+specification, the XSDT is optional in all cases, and the table manager
+therefore now checks for both an RSDP >=2 and a valid XSDT pointer.
+Otherwise, the RSDT pointer is used. Some ACPI 2.0 compliant BIOSs contain
+only the RSDT.
+
+Fixed an interpreter problem with the Mid() operator in the case of an input
+string where the resulting output string is of zero length. It now correctly
+returns a valid, null terminated string object instead of a string object
+with a null pointer.
+
+Fixed a problem with the control method argument handling to allow a store
+to an Arg object that already contains an object of type Device. The Device
+object is now correctly overwritten. Previously, an error was returned.
+
+
+Enhanced the debugger Find command to emit object values in addition to the
+found object pathnames. The output format is the same as the dump namespace
+command.
+
+Enhanced the debugger Set command. It now has the ability to set the value
+of any Named integer object in the namespace (Previously, only method locals
+and args could be set.)
+
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 78.1K Code, 11.6K Data, 89.7K Total
@@ -1740,63 +2938,59 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Fixed a regression in the disassembler where if/else/while
-constructs were output incorrectly. This problem was introduced
-in the previous release (20050526). This problem also affected
-the single-step disassembly in the debugger.
+Fixed a regression in the disassembler where if/else/while constructs were
+output incorrectly. This problem was introduced in the previous release
+(20050526). This problem also affected the single-step disassembly in the
+debugger.
-Fixed a problem where compiling the reserved _OSI method would
-randomly (but rarely) produce compile errors.
+Fixed a problem where compiling the reserved _OSI method would randomly (but
+rarely) produce compile errors.
-Enhanced the disassembler to emit compilable code in the face of
-incorrect AML resource descriptors. If the optional
-ResourceSourceIndex is present, but the ResourceSource is not, do
-not emit the ResourceSourceIndex in the disassembly. Otherwise,
-the resulting code cannot be compiled without errors.
+Enhanced the disassembler to emit compilable code in the face of incorrect
+AML resource descriptors. If the optional ResourceSourceIndex is present,
+but the ResourceSource is not, do not emit the ResourceSourceIndex in the
+disassembly. Otherwise, the resulting code cannot be compiled without
+errors.
----------------------------------------
26 May 2005. Summary of changes for version 20050526:
1) ACPI CA Core Subsystem:
-Implemented support to execute Type 1 and Type 2 AML opcodes
-appearing at the module level (not within a control method.)
-These opcodes are executed exactly once at the time the table is
-loaded. This type of code was legal up until the release of ACPI
-2.0B (2002) and is now supported within ACPI CA in order to
-provide backwards compatibility with earlier BIOS
-implementations. This eliminates the "Encountered executable code
-at module level" warning that was previously generated upon
-detection of such code.
-
-Fixed a problem in the interpreter where an AE_NOT_FOUND
-exception could inadvertently be generated during the lookup of
-namespace objects in the second pass parse of ACPI tables and
-control methods. It appears that this problem could occur during
-the resolution of forward references to namespace objects.
-
-Added the ACPI_MUTEX_DEBUG #ifdef to the AcpiUtReleaseMutex
-function, corresponding to the same #ifdef in the
-AcpiUtAcquireMutex function. This allows the deadlock detection
-debug code to be compiled out in the normal case, improving mutex
-performance (and overall subsystem performance) considerably.
-
-Implemented a handful of miscellaneous fixes for possible memory
-leaks on error conditions and error handling control paths. These
-fixes were suggested by FreeBSD and the Coverity Prevent source
-code analysis tool.
-
-Added a check for a null RSDT pointer in AcpiGetFirmwareTable
-(tbxfroot.c) to prevent a fault in this error case.
+Implemented support to execute Type 1 and Type 2 AML opcodes appearing at
+the module level (not within a control method.) These opcodes are executed
+exactly once at the time the table is loaded. This type of code was legal up
+until the release of ACPI 2.0B (2002) and is now supported within ACPI CA in
+order to provide backwards compatibility with earlier BIOS implementations.
+This eliminates the "Encountered executable code at module level" warning
+that was previously generated upon detection of such code.
+
+Fixed a problem in the interpreter where an AE_NOT_FOUND exception could
+inadvertently be generated during the lookup of namespace objects in the
+second pass parse of ACPI tables and control methods. It appears that this
+problem could occur during the resolution of forward references to namespace
+objects.
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Added the ACPI_MUTEX_DEBUG #ifdef to the AcpiUtReleaseMutex function,
+corresponding to the same #ifdef in the AcpiUtAcquireMutex function. This
+allows the deadlock detection debug code to be compiled out in the normal
+case, improving mutex performance (and overall subsystem performance)
+considerably.
+
+Implemented a handful of miscellaneous fixes for possible memory leaks on
+error conditions and error handling control paths. These fixes were
+suggested by FreeBSD and the Coverity Prevent source code analysis tool.
+
+Added a check for a null RSDT pointer in AcpiGetFirmwareTable (tbxfroot.c)
+to prevent a fault in this error case.
+
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 78.2K Code, 11.6K Data, 89.8K Total
@@ -1808,72 +3002,65 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Implemented support to allow Type 1 and Type 2 ASL operators to
-appear at the module level (not within a control method.) These
-operators will be executed once at the time the table is loaded.
-This type of code was legal up until the release of ACPI 2.0B
-(2002) and is now supported by the iASL compiler in order to
-provide backwards compatibility with earlier BIOS ASL code.
-
-The ACPI integer width (specified via the table revision ID or
-the -r override, 32 or 64 bits) is now used internally during
-compile-time constant folding to ensure that constants are
-truncated to 32 bits if necessary. Previously, the revision ID
-value was only emitted in the AML table header.
-
-An error message is now generated for the Mutex and Method
-operators if the SyncLevel parameter is outside the legal range
-of 0 through 15.
-
-Fixed a problem with the Method operator ParameterTypes list
-handling (ACPI 3.0). Previously, more than 2 types or 2 arguments
-generated a syntax error. The actual underlying implementation
-of method argument typechecking is still under development,
-however.
+Implemented support to allow Type 1 and Type 2 ASL operators to appear at
+the module level (not within a control method.) These operators will be
+executed once at the time the table is loaded. This type of code was legal
+up until the release of ACPI 2.0B (2002) and is now supported by the iASL
+compiler in order to provide backwards compatibility with earlier BIOS ASL
+code.
+
+The ACPI integer width (specified via the table revision ID or the -r
+override, 32 or 64 bits) is now used internally during compile-time constant
+folding to ensure that constants are truncated to 32 bits if necessary.
+Previously, the revision ID value was only emitted in the AML table header.
+
+An error message is now generated for the Mutex and Method operators if the
+SyncLevel parameter is outside the legal range of 0 through 15.
+
+Fixed a problem with the Method operator ParameterTypes list handling (ACPI
+3.0). Previously, more than 2 types or 2 arguments generated a syntax error.
+The actual underlying implementation of method argument typechecking is
+still under development, however.
----------------------------------------
13 May 2005. Summary of changes for version 20050513:
1) ACPI CA Core Subsystem:
-Implemented support for PCI Express root bridges -- added support
-for device PNP0A08 in the root bridge search within
-AcpiEvPciConfigRegionSetup.
+Implemented support for PCI Express root bridges -- added support for device
+PNP0A08 in the root bridge search within AcpiEvPciConfigRegionSetup.
-The interpreter now automatically truncates incoming 64-bit
-constants to 32 bits if currently executing out of a 32-bit ACPI
-table (Revision < 2). This also affects the iASL compiler
-constant folding. (Note: as per below, the iASL compiler no
-longer allows 64-bit constants within 32-bit tables.)
+The interpreter now automatically truncates incoming 64-bit constants to 32
+bits if currently executing out of a 32-bit ACPI table (Revision < 2). This
+also affects the iASL compiler constant folding. (Note: as per below, the
+iASL compiler no longer allows 64-bit constants within 32-bit tables.)
-Fixed a problem where string and buffer objects with "static"
-pointers (pointers to initialization data within an ACPI table)
-were not handled consistently. The internal object copy operation
-now always copies the data to a newly allocated buffer,
-regardless of whether the source object is static or not.
+Fixed a problem where string and buffer objects with "static" pointers
+(pointers to initialization data within an ACPI table) were not handled
+consistently. The internal object copy operation now always copies the data
+to a newly allocated buffer, regardless of whether the source object is
+static or not.
-Fixed a problem with the FromBCD operator where an implicit
-result conversion was improperly performed while storing the
-result to the target operand. Since this is an "explicit
-conversion" operator, the implicit conversion should never be
-performed on the output.
+Fixed a problem with the FromBCD operator where an implicit result
+conversion was improperly performed while storing the result to the target
+operand. Since this is an "explicit conversion" operator, the implicit
+conversion should never be performed on the output.
-Fixed a problem with the CopyObject operator where a copy to an
-existing named object did not always completely overwrite the
-existing object stored at name. Specifically, a buffer-to-buffer
-copy did not delete the existing buffer.
+Fixed a problem with the CopyObject operator where a copy to an existing
+named object did not always completely overwrite the existing object stored
+at name. Specifically, a buffer-to-buffer copy did not delete the existing
+buffer.
-Replaced "InterruptLevel" with "InterruptNumber" in all GPE
-interfaces and structs for consistency.
+Replaced "InterruptLevel" with "InterruptNumber" in all GPE interfaces and
+structs for consistency.
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 78.2K Code, 11.6K Data, 89.8K Total
@@ -1885,59 +3072,54 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-The compiler now emits a warning if an attempt is made to
-generate a 64-bit integer constant from within a 32-bit ACPI
-table (Revision < 2). The integer is truncated to 32 bits.
+The compiler now emits a warning if an attempt is made to generate a 64-bit
+integer constant from within a 32-bit ACPI table (Revision < 2). The integer
+is truncated to 32 bits.
-Fixed a problem with large package objects: if the static length
-of the package is greater than 255, the "variable length package"
-opcode is emitted. Previously, this caused an error. This
-requires an update to the ACPI spec, since it currently
-(incorrectly) states that packages larger than 255 elements are
-not allowed.
+Fixed a problem with large package objects: if the static length of the
+package is greater than 255, the "variable length package" opcode is
+emitted. Previously, this caused an error. This requires an update to the
+ACPI spec, since it currently (incorrectly) states that packages larger than
+255 elements are not allowed.
-The disassembler now correctly handles variable length packages
-and packages larger than 255 elements.
+The disassembler now correctly handles variable length packages and packages
+larger than 255 elements.
----------------------------------------
08 April 2005. Summary of changes for version 20050408:
1) ACPI CA Core Subsystem:
-Fixed three cases in the interpreter where an "index" argument to
-an ASL function was still (internally) 32 bits instead of the
-required 64 bits. This was the Index argument to the Index, Mid,
-and Match operators.
-
-The "strupr" function is now permanently local (AcpiUtStrupr),
-since this is not a POSIX-defined function and not present in
-most kernel-level C libraries. All references to the C library
-strupr function have been removed from the headers.
-
-Completed the deployment of static functions/prototypes. All
-prototypes with the static attribute have been moved from the
-headers to the owning C file.
-
-Implemented an extract option (-e) for the AcpiBin utility (AML
-binary utility). This option allows the utility to extract
-individual ACPI tables from the output of AcpiDmp. It provides
-the same functionality of the acpixtract.pl perl script without
-the worry of setting the correct perl options. AcpiBin runs on
-Windows and has not yet been generated/validated in the
-Linux/Unix environment (but should be soon).
-
-Updated and fixed the table dump option for AcpiBin (-d). This
-option converts a single ACPI table to a hex/ascii file, similar
-to the output of AcpiDmp.
-
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Fixed three cases in the interpreter where an "index" argument to an ASL
+function was still (internally) 32 bits instead of the required 64 bits.
+This was the Index argument to the Index, Mid, and Match operators.
+
+The "strupr" function is now permanently local (AcpiUtStrupr), since this is
+not a POSIX-defined function and not present in most kernel-level C
+libraries. All references to the C library strupr function have been removed
+from the headers.
+
+Completed the deployment of static functions/prototypes. All prototypes with
+the static attribute have been moved from the headers to the owning C file.
+
+Implemented an extract option (-e) for the AcpiBin utility (AML binary
+utility). This option allows the utility to extract individual ACPI tables
+from the output of AcpiDmp. It provides the same functionality of the
+acpixtract.pl perl script without the worry of setting the correct perl
+options. AcpiBin runs on Windows and has not yet been generated/validated in
+the Linux/Unix environment (but should be soon).
+
+Updated and fixed the table dump option for AcpiBin (-d). This option
+converts a single ACPI table to a hex/ascii file, similar to the output of
+AcpiDmp.
+
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 78.0K Code, 11.6K Data, 89.6K Total
@@ -1949,57 +3131,52 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Disassembler fix: Added a check to ensure that the table length
-found in the ACPI table header within the input file is not
-longer than the actual input file size. This indicates some kind
-of file or table corruption.
+Disassembler fix: Added a check to ensure that the table length found in the
+ACPI table header within the input file is not longer than the actual input
+file size. This indicates some kind of file or table corruption.
----------------------------------------
29 March 2005. Summary of changes for version 20050329:
1) ACPI CA Core Subsystem:
-An error is now generated if an attempt is made to create a
-Buffer Field of length zero (A CreateField with a length operand
-of zero.)
+An error is now generated if an attempt is made to create a Buffer Field of
+length zero (A CreateField with a length operand of zero.)
-The interpreter now issues a warning whenever executable code at
-the module level is detected during ACPI table load. This will
-give some idea of the prevalence of this type of code.
+The interpreter now issues a warning whenever executable code at the module
+level is detected during ACPI table load. This will give some idea of the
+prevalence of this type of code.
-Implemented support for references to named objects (other than
-control methods) within package objects.
+Implemented support for references to named objects (other than control
+methods) within package objects.
-Enhanced package object output for the debug object. Package
-objects are now completely dumped, showing all elements.
+Enhanced package object output for the debug object. Package objects are now
+completely dumped, showing all elements.
-Enhanced miscellaneous object output for the debug object. Any
-object can now be written to the debug object (for example, a
-device object can be written, and the type of the object will be
-displayed.)
+Enhanced miscellaneous object output for the debug object. Any object can
+now be written to the debug object (for example, a device object can be
+written, and the type of the object will be displayed.)
-The "static" qualifier has been added to all local functions
-across both the core subsystem and the iASL compiler.
+The "static" qualifier has been added to all local functions across both the
+core subsystem and the iASL compiler.
-The number of "long" lines (> 80 chars) within the source has
-been significantly reduced, by about 1/3.
+The number of "long" lines (> 80 chars) within the source has been
+significantly reduced, by about 1/3.
-Cleaned up all header files to ensure that all CA/iASL functions
-are prototyped (even static functions) and the formatting is
-consistent.
+Cleaned up all header files to ensure that all CA/iASL functions are
+prototyped (even static functions) and the formatting is consistent.
Two new header files have been added, acopcode.h and acnames.h.
Removed several obsolete functions that were no longer used.
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 78.3K Code, 11.5K Data, 89.8K Total
@@ -2012,13 +3189,12 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Fixed a problem with the resource descriptor generation/support.
-For the ResourceSourceIndex and the ResourceSource fields, both
-must be present, or both must be not present - can't have one
-without the other.
+Fixed a problem with the resource descriptor generation/support. For the
+ResourceSourceIndex and the ResourceSource fields, both must be present, or
+both must be not present - can't have one without the other.
-The compiler now returns non-zero from the main procedure if any
-errors have occurred during the compilation.
+The compiler now returns non-zero from the main procedure if any errors have
+occurred during the compilation.
----------------------------------------
@@ -2026,63 +3202,57 @@ errors have occurred during the compilation.
1) ACPI CA Core Subsystem:
-The string-to-buffer implicit conversion code has been modified
-again after a change to the ACPI specification. In order to
-match the behavior of the other major ACPI implementation, the
-target buffer is no longer truncated if the source string is
-smaller than an existing target buffer. This change requires an
-update to the ACPI spec, and should eliminate the recent
+The string-to-buffer implicit conversion code has been modified again after
+a change to the ACPI specification. In order to match the behavior of the
+other major ACPI implementation, the target buffer is no longer truncated if
+the source string is smaller than an existing target buffer. This change
+requires an update to the ACPI spec, and should eliminate the recent
AE_AML_BUFFER_LIMIT issues.
-The "implicit return" support was rewritten to a new algorithm
-that solves the general case. Rather than attempt to determine
-when a method is about to exit, the result of every ASL operator
-is saved momentarily until the very next ASL operator is
-executed. Therefore, no matter how the method exits, there will
-always be a saved implicit return value. This feature is only
-enabled with the AcpiGbl_EnableInterpreterSlack flag, and should
-eliminate AE_AML_NO_RETURN_VALUE errors when enabled.
-
-Implemented implicit conversion support for the predicate
-(operand) of the If, Else, and While operators. String and Buffer
-arguments are automatically converted to Integers.
-
-Changed the string-to-integer conversion behavior to match the
-new ACPI errata: "If no integer object exists, a new integer is
-created. The ASCII string is interpreted as a hexadecimal
-constant. Each string character is interpreted as a hexadecimal
-value (`0'-`9', `A'-`F', `a', `f'), starting with the first
-character as the most significant digit, and ending with the
-first non-hexadecimal character or end-of-string." This means
-that the first non-hex character terminates the conversion and
-this is the code that was changed.
-
-Fixed a problem where the ObjectType operator would fail (fault)
-when used on an Index of a Package which pointed to a null
-package element. The operator now properly returns zero
-(Uninitialized) in this case.
-
-Fixed a problem where the While operator used excessive memory by
-not properly popping the result stack during execution. There was
-no memory leak after execution, however. (Code provided by Valery
-Podrezov.)
-
-Fixed a problem where references to control methods within
-Package objects caused the method to be invoked, instead of
-producing a reference object pointing to the method.
-
-Restructured and simplified the pswalk.c module
-(AcpiPsDeleteParseTree) to improve performance and reduce code
-size. (Code provided by Alexey Starikovskiy.)
-
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+The "implicit return" support was rewritten to a new algorithm that solves
+the general case. Rather than attempt to determine when a method is about to
+exit, the result of every ASL operator is saved momentarily until the very
+next ASL operator is executed. Therefore, no matter how the method exits,
+there will always be a saved implicit return value. This feature is only
+enabled with the AcpiGbl_EnableInterpreterSlack flag, and should eliminate
+AE_AML_NO_RETURN_VALUE errors when enabled.
+
+Implemented implicit conversion support for the predicate (operand) of the
+If, Else, and While operators. String and Buffer arguments are automatically
+converted to Integers.
+
+Changed the string-to-integer conversion behavior to match the new ACPI
+errata: "If no integer object exists, a new integer is created. The ASCII
+string is interpreted as a hexadecimal constant. Each string character is
+interpreted as a hexadecimal value ('0'-'9', 'A'-'F', 'a', 'f'), starting
+with the first character as the most significant digit, and ending with the
+first non-hexadecimal character or end-of-string." This means that the first
+non-hex character terminates the conversion and this is the code that was
+changed.
+
+Fixed a problem where the ObjectType operator would fail (fault) when used
+on an Index of a Package which pointed to a null package element. The
+operator now properly returns zero (Uninitialized) in this case.
+
+Fixed a problem where the While operator used excessive memory by not
+properly popping the result stack during execution. There was no memory leak
+after execution, however. (Code provided by Valery Podrezov.)
+
+Fixed a problem where references to control methods within Package objects
+caused the method to be invoked, instead of producing a reference object
+pointing to the method.
+
+Restructured and simplified the pswalk.c module (AcpiPsDeleteParseTree) to
+improve performance and reduce code size. (Code provided by Alexey
+Starikovskiy.)
+
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 78.3K Code, 11.5K Data, 89.8K Total
@@ -2094,56 +3264,49 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Fixed a problem with the Return operator with no arguments. Since
-the AML grammar for the byte encoding requires an operand for the
-Return opcode, the compiler now emits a Return(Zero) for this
-case. An ACPI specification update has been written for this
-case.
-
-For tables other than the DSDT, namepath optimization is
-automatically disabled. This is because SSDTs can be loaded
-anywhere in the namespace, the compiler has no knowledge of
-where, and thus cannot optimize namepaths.
-
-Added "ProcessorObj" to the ObjectTypeKeyword list. This object
-type was inadvertently omitted from the ACPI specification, and
-will require an update to the spec.
-
-The source file scan for ASCII characters is now optional (-a).
-This change was made because some vendors place non-ascii
-characters within comments. However, the scan is simply a brute-
-force byte compare to ensure all characters in the file are in
-the range 0x00 to 0x7F.
-
-Fixed a problem with the CondRefOf operator where the compiler
-was inappropriately checking for the existence of the target.
-Since the point of the operator is to check for the existence of
-the target at run-time, the compiler no longer checks for the
-target existence.
-
-Fixed a problem where errors generated from the internal AML
-interpreter during constant folding were not handled properly,
-causing a fault.
-
-Fixed a problem with overly aggressive range checking for the
-Stall operator. The valid range (max 255) is now only checked if
-the operand is of type Integer. All other operand types cannot be
-statically checked.
-
-Fixed a problem where control method references within the RefOf,
-DeRefOf, and ObjectType operators were not treated properly. They
-are now treated as actual references, not method invocations.
-
-Fixed and enhanced the "list namespace" option (-ln). This option
-was broken a number of releases ago.
-
-Improved error handling for the Field, IndexField, and BankField
-operators. The compiler now cleanly reports and recovers from
-errors in the field component (FieldUnit) list.
-
-Fixed a disassembler problem where the optional
-ResourceDescriptor fields TRS and TTP were not always handled
-correctly.
+Fixed a problem with the Return operator with no arguments. Since the AML
+grammar for the byte encoding requires an operand for the Return opcode, the
+compiler now emits a Return(Zero) for this case. An ACPI specification
+update has been written for this case.
+
+For tables other than the DSDT, namepath optimization is automatically
+disabled. This is because SSDTs can be loaded anywhere in the namespace, the
+compiler has no knowledge of where, and thus cannot optimize namepaths.
+
+Added "ProcessorObj" to the ObjectTypeKeyword list. This object type was
+inadvertently omitted from the ACPI specification, and will require an
+update to the spec.
+
+The source file scan for ASCII characters is now optional (-a). This change
+was made because some vendors place non-ascii characters within comments.
+However, the scan is simply a brute-force byte compare to ensure all
+characters in the file are in the range 0x00 to 0x7F.
+
+Fixed a problem with the CondRefOf operator where the compiler was
+inappropriately checking for the existence of the target. Since the point of
+the operator is to check for the existence of the target at run-time, the
+compiler no longer checks for the target existence.
+
+Fixed a problem where errors generated from the internal AML interpreter
+during constant folding were not handled properly, causing a fault.
+
+Fixed a problem with overly aggressive range checking for the Stall
+operator. The valid range (max 255) is now only checked if the operand is of
+type Integer. All other operand types cannot be statically checked.
+
+Fixed a problem where control method references within the RefOf, DeRefOf,
+and ObjectType operators were not treated properly. They are now treated as
+actual references, not method invocations.
+
+Fixed and enhanced the "list namespace" option (-ln). This option was broken
+a number of releases ago.
+
+Improved error handling for the Field, IndexField, and BankField operators.
+The compiler now cleanly reports and recovers from errors in the field
+component (FieldUnit) list.
+
+Fixed a disassembler problem where the optional ResourceDescriptor fields
+TRS and TTP were not always handled correctly.
Disassembler - Comments in output now use "//" instead of "/*"
@@ -2152,40 +3315,38 @@ Disassembler - Comments in output now use "//" instead of "/*"
1) ACPI CA Core Subsystem:
-Fixed a problem where the result of an Index() operator (an
-object reference) must increment the reference count on the
-target object for the life of the object reference.
+Fixed a problem where the result of an Index() operator (an object
+reference) must increment the reference count on the target object for the
+life of the object reference.
-Implemented AML Interpreter and Debugger support for the new ACPI
-3.0 Extended Address (IO, Memory, Space), QwordSpace, DwordSpace,
-and WordSpace resource descriptors.
+Implemented AML Interpreter and Debugger support for the new ACPI 3.0
+Extended Address (IO, Memory, Space), QwordSpace, DwordSpace, and WordSpace
+resource descriptors.
-Implemented support in the _OSI method for the ACPI 3.0 "Extended
-Address Space Descriptor" string, indicating interpreter support
-for the descriptors above.
+Implemented support in the _OSI method for the ACPI 3.0 "Extended Address
+Space Descriptor" string, indicating interpreter support for the descriptors
+above.
Implemented header support for the new ACPI 3.0 FADT flag bits.
-Implemented header support for the new ACPI 3.0 PCI Express bits
-for the PM1 status/enable registers.
+Implemented header support for the new ACPI 3.0 PCI Express bits for the PM1
+status/enable registers.
-Updated header support for the MADT processor local Apic struct
-and MADT platform interrupt source struct for new ACPI 3.0
-fields.
+Updated header support for the MADT processor local Apic struct and MADT
+platform interrupt source struct for new ACPI 3.0 fields.
Implemented header support for the SRAT and SLIT ACPI tables.
-Implemented the -s switch in AcpiExec to enable the
-"InterpreterSlack" flag at runtime.
+Implemented the -s switch in AcpiExec to enable the "InterpreterSlack" flag
+at runtime.
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 78.2K Code, 11.5K Data, 89.7K Total
@@ -2197,18 +3358,16 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Fixed a problem with the internal 64-bit String-to-integer
-conversion with strings less than two characters long.
+Fixed a problem with the internal 64-bit String-to-integer conversion with
+strings less than two characters long.
-Fixed a problem with constant folding where the result of the
-Index() operator can not be considered a constant. This means
-that Index() cannot be a type3 opcode and this will require an
-update to the ACPI specification.
+Fixed a problem with constant folding where the result of the Index()
+operator can not be considered a constant. This means that Index() cannot be
+a type3 opcode and this will require an update to the ACPI specification.
-Disassembler: Implemented support for the TTP, MTP, and TRS
-resource descriptor fields. These fields were inadvertently
-ignored and not output in the disassembly of the resource
-descriptor.
+Disassembler: Implemented support for the TTP, MTP, and TRS resource
+descriptor fields. These fields were inadvertently ignored and not output in
+the disassembly of the resource descriptor.
----------------------------------------
@@ -2216,55 +3375,46 @@ descriptor.
1) ACPI CA Core Subsystem:
-Implemented ACPI 3.0 support for implicit conversion within the
-Match() operator. MatchObjects can now be of type integer,
-buffer, or string instead of just type integer. Package elements
-are implicitly converted to the type of the MatchObject. This
-change aligns the behavior of Match() with the behavior of the
-other logical operators (LLess(), etc.) It also requires an
-errata change to the ACPI specification as this support was
-intended for ACPI 3.0, but was inadvertently omitted.
-
-Fixed a problem with the internal implicit "to buffer"
-conversion. Strings that are converted to buffers will cause
-buffer truncation if the string is smaller than the target
-buffer. Integers that are converted to buffers will not cause
-buffer truncation, only zero extension (both as per the ACPI
-spec.) The problem was introduced when code was added to truncate
-the buffer, but this should not be performed in all cases, only
-the string case.
-
-Fixed a problem with the Buffer and Package operators where the
-interpreter would get confused if two such operators were used as
-operands to an ASL operator (such as
-LLess(Buffer(1){0},Buffer(1){1}). The internal result stack was
-not being popped after the execution of these operators,
-resulting in an AE_NO_RETURN_VALUE exception.
-
-Fixed a problem with constructs of the form
-Store(Index(...),...). The reference object returned from Index
-was inadvertently resolved to an actual value. This problem was
-introduced in version 20050114 when the behavior of Store() was
-modified to restrict the object types that can be used as the
+Implemented ACPI 3.0 support for implicit conversion within the Match()
+operator. MatchObjects can now be of type integer, buffer, or string instead
+of just type integer. Package elements are implicitly converted to the type
+of the MatchObject. This change aligns the behavior of Match() with the
+behavior of the other logical operators (LLess(), etc.) It also requires an
+errata change to the ACPI specification as this support was intended for
+ACPI 3.0, but was inadvertently omitted.
+
+Fixed a problem with the internal implicit "to buffer" conversion. Strings
+that are converted to buffers will cause buffer truncation if the string is
+smaller than the target buffer. Integers that are converted to buffers will
+not cause buffer truncation, only zero extension (both as per the ACPI
+spec.) The problem was introduced when code was added to truncate the
+buffer, but this should not be performed in all cases, only the string case.
+
+Fixed a problem with the Buffer and Package operators where the interpreter
+would get confused if two such operators were used as operands to an ASL
+operator (such as LLess(Buffer(1){0},Buffer(1){1}). The internal result
+stack was not being popped after the execution of these operators, resulting
+in an AE_NO_RETURN_VALUE exception.
+
+Fixed a problem with constructs of the form Store(Index(...),...). The
+reference object returned from Index was inadvertently resolved to an actual
+value. This problem was introduced in version 20050114 when the behavior of
+Store() was modified to restrict the object types that can be used as the
source operand (to match the ACPI specification.)
-Reduced excessive stack use within the AcpiGetObjectInfo
-procedure.
+Reduced excessive stack use within the AcpiGetObjectInfo procedure.
-Added a fix to aclinux.h to allow generation of AcpiExec on
-Linux.
+Added a fix to aclinux.h to allow generation of AcpiExec on Linux.
-Updated the AcpiSrc utility to add the FADT_DESCRIPTOR_REV2_MINUS
-struct.
+Updated the AcpiSrc utility to add the FADT_DESCRIPTOR_REV2_MINUS struct.
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 78.1K Code, 11.5K Data, 89.6K Total
@@ -2276,61 +3426,55 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Fixed a code generation problem in the constant folding
-optimization code where incorrect code was generated if a
-constant was reduced to a buffer object (i.e., a reduced type 5
-opcode.)
+Fixed a code generation problem in the constant folding optimization code
+where incorrect code was generated if a constant was reduced to a buffer
+object (i.e., a reduced type 5 opcode.)
-Fixed a typechecking problem for the ToBuffer operator. Caused by
-an incorrect return type in the internal opcode information
-table.
+Fixed a typechecking problem for the ToBuffer operator. Caused by an
+incorrect return type in the internal opcode information table.
----------------------------------------
25 January 2005. Summary of changes for version 20050125:
1) ACPI CA Core Subsystem:
-Fixed a recently introduced problem with the Global Lock where
-the underlying semaphore was not created. This problem was
-introduced in version 20050114, and caused an AE_AML_NO_OPERAND
-exception during an Acquire() operation on _GL.
-
-The local object cache is now optional, and is disabled by
-default. Both AcpiExec and the iASL compiler enable the cache
-because they run in user mode and this enhances their
-performance. #define ACPI_ENABLE_OBJECT_CACHE to enable the local
-cache.
-
-Fixed an issue in the internal function AcpiUtEvaluateObject
-concerning the optional "implicit return" support where an error
-was returned if no return object was expected, but one was
-implicitly returned. AE_OK is now returned in this case and the
-implicitly returned object is deleted. AcpiUtEvaluateObject is
-only occasionally used, and only to execute reserved methods such
-as _STA and _INI where the return type is known up front.
-
-Fixed a few issues with the internal convert-to-integer code. It
-now returns an error if an attempt is made to convert a null
-string, a string of only blanks/tabs, or a zero-length buffer.
-This affects both implicit conversion and explicit conversion via
-the ToInteger() operator.
-
-The internal debug code in AcpiUtAcquireMutex has been commented
-out. It is not needed for normal operation and should increase
-the performance of the entire subsystem. The code remains in case
-it is needed for debug purposes again.
-
-The AcpiExec source and makefile are included in the Unix/Linux
-package for the first time.
-
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Fixed a recently introduced problem with the Global Lock where the
+underlying semaphore was not created. This problem was introduced in
+version 20050114, and caused an AE_AML_NO_OPERAND exception during an
+Acquire() operation on _GL.
+
+The local object cache is now optional, and is disabled by default. Both
+AcpiExec and the iASL compiler enable the cache because they run in user
+mode and this enhances their performance. #define ACPI_ENABLE_OBJECT_CACHE
+to enable the local cache.
+
+Fixed an issue in the internal function AcpiUtEvaluateObject concerning the
+optional "implicit return" support where an error was returned if no return
+object was expected, but one was implicitly returned. AE_OK is now returned
+in this case and the implicitly returned object is deleted.
+AcpiUtEvaluateObject is only occasionally used, and only to execute reserved
+methods such as _STA and _INI where the return type is known up front.
+
+Fixed a few issues with the internal convert-to-integer code. It now returns
+an error if an attempt is made to convert a null string, a string of only
+blanks/tabs, or a zero-length buffer. This affects both implicit conversion
+and explicit conversion via the ToInteger() operator.
+
+The internal debug code in AcpiUtAcquireMutex has been commented out. It is
+not needed for normal operation and should increase the performance of the
+entire subsystem. The code remains in case it is needed for debug purposes
+again.
+
+The AcpiExec source and makefile are included in the Unix/Linux package for
+the first time.
+
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 78.4K Code, 11.5K Data, 89.9K Total
@@ -2341,88 +3485,81 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Switch/Case support: A warning is now issued if the type of the
-Switch value cannot be determined at compile time. For example,
-Switch(Arg0) will generate the warning, and the type is assumed
-to be an integer. As per the ACPI spec, use a construct such as
-Switch(ToInteger(Arg0)) to eliminate the warning.
+Switch/Case support: A warning is now issued if the type of the Switch value
+cannot be determined at compile time. For example, Switch(Arg0) will
+generate the warning, and the type is assumed to be an integer. As per the
+ACPI spec, use a construct such as Switch(ToInteger(Arg0)) to eliminate the
+warning.
-Switch/Case support: Implemented support for buffer and string
-objects as the switch value. This is an ACPI 3.0 feature, now
-that LEqual supports buffers and strings.
+Switch/Case support: Implemented support for buffer and string objects as
+the switch value. This is an ACPI 3.0 feature, now that LEqual supports
+buffers and strings.
-Switch/Case support: The emitted code for the LEqual()
-comparisons now uses the switch value as the first operand, not
-the second. The case value is now the second operand, and this
-allows the case value to be implicitly converted to the type of
-the switch value, not the other way around.
+Switch/Case support: The emitted code for the LEqual() comparisons now uses
+the switch value as the first operand, not the second. The case value is now
+the second operand, and this allows the case value to be implicitly
+converted to the type of the switch value, not the other way around.
-Switch/Case support: Temporary variables are now emitted
-immediately within the control method, not at the global level.
-This means that there are now 36 temps available per-method, not
-36 temps per-module as was the case with the earlier
-implementation (_T_0 through _T_9 and _T_A through _T_Z.)
+Switch/Case support: Temporary variables are now emitted immediately within
+the control method, not at the global level. This means that there are now
+36 temps available per-method, not 36 temps per-module as was the case with
+the earlier implementation (_T_0 through _T_9 and _T_A through _T_Z.)
----------------------------------------
14 January 2005. Summary of changes for version 20050114:
-Added 2005 copyright to all module headers. This affects every
-module in the core subsystem, iASL compiler, and the utilities.
+Added 2005 copyright to all module headers. This affects every module in
+the core subsystem, iASL compiler, and the utilities.
1) ACPI CA Core Subsystem:
-Fixed an issue with the String-to-Buffer conversion code where
-the string null terminator was not included in the buffer after
-conversion, but there is existing ASL that assumes the string
-null terminator is included. This is the root of the
-ACPI_AML_BUFFER_LIMIT regression. This problem was introduced in
-the previous version when the code was updated to correctly set
-the converted buffer size as per the ACPI specification. The ACPI
-spec is ambiguous and will be updated to specify that the null
-terminator must be included in the converted buffer. This also
-affects the ToBuffer() ASL operator.
-
-Fixed a problem with the Mid() ASL/AML operator where it did not
-work correctly on Buffer objects. Newly created sub-buffers were
-not being marked as initialized.
-
-
-Fixed a problem in AcpiTbFindTable where incorrect string
-compares were performed on the OemId and OemTableId table header
-fields. These fields are not null terminated, so strncmp is now
-used instead of strcmp.
-
-Implemented a restriction on the Store() ASL/AML operator to
-align the behavior with the ACPI specification. Previously, any
-object could be used as the source operand. Now, the only
-objects that may be used are Integers, Buffers, Strings,
-Packages, Object References, and DDB Handles. If necessary, the
-original behavior can be restored by enabling the
+Fixed an issue with the String-to-Buffer conversion code where the string
+null terminator was not included in the buffer after conversion, but there
+is existing ASL that assumes the string null terminator is included. This is
+the root of the ACPI_AML_BUFFER_LIMIT regression. This problem was
+introduced in the previous version when the code was updated to correctly
+set the converted buffer size as per the ACPI specification. The ACPI spec
+is ambiguous and will be updated to specify that the null terminator must be
+included in the converted buffer. This also affects the ToBuffer() ASL
+operator.
+
+Fixed a problem with the Mid() ASL/AML operator where it did not work
+correctly on Buffer objects. Newly created sub-buffers were not being marked
+as initialized.
+
+
+Fixed a problem in AcpiTbFindTable where incorrect string compares were
+performed on the OemId and OemTableId table header fields. These fields are
+not null terminated, so strncmp is now used instead of strcmp.
+
+Implemented a restriction on the Store() ASL/AML operator to align the
+behavior with the ACPI specification. Previously, any object could be used
+as the source operand. Now, the only objects that may be used are Integers,
+Buffers, Strings, Packages, Object References, and DDB Handles. If
+necessary, the original behavior can be restored by enabling the
EnableInterpreterSlack flag.
-Enhanced the optional "implicit return" support to allow an
-implicit return value from methods that are invoked externally
-via the AcpiEvaluateObject interface. This enables implicit
-returns from the _STA and _INI methods, for example.
+Enhanced the optional "implicit return" support to allow an implicit return
+value from methods that are invoked externally via the AcpiEvaluateObject
+interface. This enables implicit returns from the _STA and _INI methods,
+for example.
-Changed the Revision() ASL/AML operator to return the current
-version of the AML interpreter, in the YYYYMMDD format.
-Previously, it incorrectly returned the supported ACPI version
-(This is the function of the _REV method).
+Changed the Revision() ASL/AML operator to return the current version of the
+AML interpreter, in the YYYYMMDD format. Previously, it incorrectly returned
+the supported ACPI version (This is the function of the _REV method).
-Updated the _REV predefined method to return the currently
-supported version of ACPI, now 3.
+Updated the _REV predefined method to return the currently supported version
+of ACPI, now 3.
Implemented batch mode option for the AcpiExec utility (-b).
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 78.3K Code, 11.5K Data, 89.8K Total
@@ -2434,32 +3571,29 @@ compiler and the compiler options used during generation.
----------------------------------------
10 December 2004. Summary of changes for version 20041210:
-ACPI 3.0 support is nearing completion in both the iASL compiler
-and the ACPI CA core subsystem.
+ACPI 3.0 support is nearing completion in both the iASL compiler and the
+ACPI CA core subsystem.
1) ACPI CA Core Subsystem:
-Fixed a problem in the ToDecimalString operator where the
-resulting string length was incorrectly calculated. The length is
-now calculated exactly, eliminating incorrect AE_STRING_LIMIT
-exceptions.
+Fixed a problem in the ToDecimalString operator where the resulting string
+length was incorrectly calculated. The length is now calculated exactly,
+eliminating incorrect AE_STRING_LIMIT exceptions.
-Fixed a problem in the ToHexString operator to allow a maximum
-200 character string to be produced.
+Fixed a problem in the ToHexString operator to allow a maximum 200 character
+string to be produced.
-Fixed a problem in the internal string-to-buffer and buffer-to-
-buffer copy routine where the length of the resulting buffer was
-not truncated to the new size (if the target buffer already
-existed).
+Fixed a problem in the internal string-to-buffer and buffer-to-buffer copy
+routine where the length of the resulting buffer was not truncated to the
+new size (if the target buffer already existed).
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 78.3K Code, 11.5K Data, 89.8K Total
@@ -2471,67 +3605,62 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Implemented the new ACPI 3.0 resource template macros -
-DWordSpace, ExtendedIO, ExtendedMemory, ExtendedSpace,
-QWordSpace, and WordSpace. Includes support in the disassembler.
+Implemented the new ACPI 3.0 resource template macros - DWordSpace,
+ExtendedIO, ExtendedMemory, ExtendedSpace, QWordSpace, and WordSpace.
+Includes support in the disassembler.
-Implemented support for the new (ACPI 3.0) parameter to the
-Register macro, AccessSize.
+Implemented support for the new (ACPI 3.0) parameter to the Register macro,
+AccessSize.
-Fixed a problem where the _HE resource name for the Interrupt
-macro was referencing bit 0 instead of bit 1.
+Fixed a problem where the _HE resource name for the Interrupt macro was
+referencing bit 0 instead of bit 1.
-Implemented check for maximum 255 interrupts in the Interrupt
-macro.
+Implemented check for maximum 255 interrupts in the Interrupt macro.
-Fixed a problem with the predefined resource descriptor names
-where incorrect AML code was generated if the offset within the
-resource buffer was 0 or 1. The optimizer shortened the AML code
-to a single byte opcode but did not update the surrounding
-package lengths.
+Fixed a problem with the predefined resource descriptor names where
+incorrect AML code was generated if the offset within the resource buffer
+was 0 or 1. The optimizer shortened the AML code to a single byte opcode
+but did not update the surrounding package lengths.
-Changes to the Dma macro: All channels within the channel list
-must be in the range 0-7. Maximum 8 channels can be specified.
-BusMaster operand is optional (default is BusMaster).
+Changes to the Dma macro: All channels within the channel list must be in
+the range 0-7. Maximum 8 channels can be specified. BusMaster operand is
+optional (default is BusMaster).
-Implemented check for maximum 7 data bytes for the VendorShort
-macro.
+Implemented check for maximum 7 data bytes for the VendorShort macro.
-The ReadWrite parameter is now optional for the Memory32 and
-similar macros.
+The ReadWrite parameter is now optional for the Memory32 and similar macros.
----------------------------------------
03 December 2004. Summary of changes for version 20041203:
1) ACPI CA Core Subsystem:
-The low-level field insertion/extraction code (exfldio) has been
-completely rewritten to eliminate unnecessary complexity, bugs,
-and boundary conditions.
+The low-level field insertion/extraction code (exfldio) has been completely
+rewritten to eliminate unnecessary complexity, bugs, and boundary
+conditions.
-Fixed a problem in the ToInteger, ToBuffer, ToHexString, and
-ToDecimalString operators where the input operand could be
-inadvertently deleted if no conversion was necessary (e.g., if
-the input to ToInteger was an Integer object.)
+Fixed a problem in the ToInteger, ToBuffer, ToHexString, and ToDecimalString
+operators where the input operand could be inadvertently deleted if no
+conversion was necessary (e.g., if the input to ToInteger was an Integer
+object.)
-Fixed a problem with the ToDecimalString and ToHexString where an
-incorrect exception code was returned if the resulting string
-would be > 200 chars. AE_STRING_LIMIT is now returned.
+Fixed a problem with the ToDecimalString and ToHexString where an incorrect
+exception code was returned if the resulting string would be > 200 chars.
+AE_STRING_LIMIT is now returned.
-Fixed a problem with the Concatenate operator where AE_OK was
-always returned, even if the operation failed.
+Fixed a problem with the Concatenate operator where AE_OK was always
+returned, even if the operation failed.
-Fixed a problem in oswinxf (used by AcpiExec and iASL) to allow >
-128 semaphores to be allocated.
+Fixed a problem in oswinxf (used by AcpiExec and iASL) to allow > 128
+semaphores to be allocated.
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 78.5K Code, 11.5K Data, 90.0K Total
@@ -2543,47 +3672,43 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Fixed typechecking for the ObjectType and SizeOf operators.
-Problem was recently introduced in 20041119.
+Fixed typechecking for the ObjectType and SizeOf operators. Problem was
+recently introduced in 20041119.
-Fixed a problem with the ToUUID macro where the upper nybble of
-each buffer byte was inadvertently set to zero.
+Fixed a problem with the ToUUID macro where the upper nybble of each buffer
+byte was inadvertently set to zero.
----------------------------------------
19 November 2004. Summary of changes for version 20041119:
1) ACPI CA Core Subsystem:
-Fixed a problem in the internal ConvertToInteger routine where
-new integers were not truncated to 32 bits for 32-bit ACPI
-tables. This routine converts buffers and strings to integers.
-
-Implemented support to store a value to an Index() on a String
-object. This is an ACPI 2.0 feature that had not yet been
-implemented.
-
-Implemented new behavior for storing objects to individual
-package elements (via the Index() operator). The previous
-behavior was to invoke the implicit conversion rules if an object
-was already present at the index. The new behavior is to simply
-delete any existing object and directly store the new object.
-Although the ACPI specification seems unclear on this subject,
-other ACPI implementations behave in this manner. (This is the
-root of the AE_BAD_HEX_CONSTANT issue.)
-
-Modified the RSDP memory scan mechanism to support the extended
-checksum for ACPI 2.0 (and above) RSDPs. Note that the search
-continues until a valid RSDP signature is found with a valid
-checksum.
-
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Fixed a problem in the internal ConvertToInteger routine where new integers
+were not truncated to 32 bits for 32-bit ACPI tables. This routine converts
+buffers and strings to integers.
+
+Implemented support to store a value to an Index() on a String object. This
+is an ACPI 2.0 feature that had not yet been implemented.
+
+Implemented new behavior for storing objects to individual package elements
+(via the Index() operator). The previous behavior was to invoke the implicit
+conversion rules if an object was already present at the index. The new
+behavior is to simply delete any existing object and directly store the new
+object. Although the ACPI specification seems unclear on this subject, other
+ACPI implementations behave in this manner. (This is the root of the
+AE_BAD_HEX_CONSTANT issue.)
+
+Modified the RSDP memory scan mechanism to support the extended checksum for
+ACPI 2.0 (and above) RSDPs. Note that the search continues until a valid
+RSDP signature is found with a valid checksum.
+
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 78.5K Code, 11.5K Data, 90.0K Total
@@ -2602,34 +3727,31 @@ Fixed a missing semicolon in the aslcompiler.y file.
1) ACPI CA Core Subsystem:
-Implemented support for FADT revision 2. This was an interim
-table (between ACPI 1.0 and ACPI 2.0) that adds support for the
-FADT reset register.
+Implemented support for FADT revision 2. This was an interim table (between
+ACPI 1.0 and ACPI 2.0) that adds support for the FADT reset register.
-Implemented optional support to allow uninitialized LocalX and
-ArgX variables in a control method. The variables are
-initialized to an Integer object with a value of zero. This
-support is enabled by setting the AcpiGbl_EnableInterpreterSlack
-flag to TRUE.
+Implemented optional support to allow uninitialized LocalX and ArgX
+variables in a control method. The variables are initialized to an Integer
+object with a value of zero. This support is enabled by setting the
+AcpiGbl_EnableInterpreterSlack flag to TRUE.
-Implemented support for Integer objects for the SizeOf operator.
-Either 4 or 8 is returned, depending on the current integer size
-(32-bit or 64-bit, depending on the parent table revision).
+Implemented support for Integer objects for the SizeOf operator. Either 4
+or 8 is returned, depending on the current integer size (32-bit or 64-bit,
+depending on the parent table revision).
-Fixed a problem in the implementation of the SizeOf and
-ObjectType operators where the operand was resolved to a value
-too early, causing incorrect return values for some objects.
+Fixed a problem in the implementation of the SizeOf and ObjectType operators
+where the operand was resolved to a value too early, causing incorrect
+return values for some objects.
Fixed some possible memory leaks during exceptional conditions.
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 78.0K Code, 11.5K Data, 89.5K Total
@@ -2643,23 +3765,21 @@ compiler and the compiler options used during generation.
Implemented support for all ACPI 3.0 reserved names and methods.
-Implemented all ACPI 3.0 grammar elements in the front-end,
-including support for semicolons.
+Implemented all ACPI 3.0 grammar elements in the front-end, including
+support for semicolons.
Implemented the ACPI 3.0 Function() and ToUUID() macros
-Fixed a problem in the disassembler where a Scope() operator
-would not be emitted properly if the target of the scope was in
-another table.
+Fixed a problem in the disassembler where a Scope() operator would not be
+emitted properly if the target of the scope was in another table.
----------------------------------------
15 October 2004. Summary of changes for version 20041015:
-Note: ACPI CA is currently undergoing an in-depth and complete
-formal evaluation to test/verify the following areas. Other
-suggestions are welcome. This will result in an increase in the
-frequency of releases and the number of bug fixes in the next few
-months.
+Note: ACPI CA is currently undergoing an in-depth and complete formal
+evaluation to test/verify the following areas. Other suggestions are
+welcome. This will result in an increase in the frequency of releases and
+the number of bug fixes in the next few months.
- Functional tests for all ASL/AML operators
- All implicit/explicit type conversions
- Bit fields and operation regions
@@ -2672,40 +3792,36 @@ months.
1) ACPI CA Core Subsystem:
-Fixed two alignment issues on 64-bit platforms - within debug
-statements in AcpiEvGpeDetect and AcpiEvCreateGpeBlock. Removed
-references to the Address field within the non-aligned ACPI
-generic address structure.
+Fixed two alignment issues on 64-bit platforms - within debug statements in
+AcpiEvGpeDetect and AcpiEvCreateGpeBlock. Removed references to the Address
+field within the non-aligned ACPI generic address structure.
-Fixed a problem in the Increment and Decrement operators where
-incorrect operand resolution could result in the inadvertent
-modification of the original integer when the integer is passed
-into another method as an argument and the arg is then
-incremented/decremented.
+Fixed a problem in the Increment and Decrement operators where incorrect
+operand resolution could result in the inadvertent modification of the
+original integer when the integer is passed into another method as an
+argument and the arg is then incremented/decremented.
-Fixed a problem in the FromBCD operator where the upper 32-bits
-of a 64-bit BCD number were truncated during conversion.
+Fixed a problem in the FromBCD operator where the upper 32-bits of a 64-bit
+BCD number were truncated during conversion.
-Fixed a problem in the ToDecimal operator where the length of the
-resulting string could be set incorrectly too long if the input
-operand was a Buffer object.
+Fixed a problem in the ToDecimal operator where the length of the resulting
+string could be set incorrectly too long if the input operand was a Buffer
+object.
-Fixed a problem in the Logical operators (LLess, etc.) where a
-NULL byte (0) within a buffer would prematurely terminate a
-compare between buffer objects.
+Fixed a problem in the Logical operators (LLess, etc.) where a NULL byte (0)
+within a buffer would prematurely terminate a compare between buffer
+objects.
-Added a check for string overflow (>200 characters as per the
-ACPI specification) during the Concatenate operator with two
-string operands.
+Added a check for string overflow (>200 characters as per the ACPI
+specification) during the Concatenate operator with two string operands.
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 77.8K Code, 11.5K Data, 89.3K Total
@@ -2718,17 +3834,15 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Allow the use of the ObjectType operator on uninitialized Locals
-and Args (returns 0 as per the ACPI specification).
+Allow the use of the ObjectType operator on uninitialized Locals and Args
+(returns 0 as per the ACPI specification).
-Fixed a problem where the compiler would fault if there was a
-syntax error in the FieldName of all of the various
-CreateXXXField operators.
+Fixed a problem where the compiler would fault if there was a syntax error
+in the FieldName of all of the various CreateXXXField operators.
-Disallow the use of lower case letters within the EISAID macro,
-as per the ACPI specification. All EISAID strings must be of the
-form "UUUNNNN" Where U is an uppercase letter and N is a hex
-digit.
+Disallow the use of lower case letters within the EISAID macro, as per the
+ACPI specification. All EISAID strings must be of the form "UUUNNNN" Where
+U is an uppercase letter and N is a hex digit.
----------------------------------------
@@ -2736,51 +3850,46 @@ digit.
1) ACPI CA Core Subsystem:
-Implemented support for the ACPI 3.0 Timer operator. This ASL
-function implements a 64-bit timer with 100 nanosecond
-granularity.
-
-Defined a new OSL interface, AcpiOsGetTimer. This interface is
-used to implement the ACPI 3.0 Timer operator. This allows the
-host OS to implement the timer with the best clock available.
-Also, it keeps the core subsystem out of the clock handling
-business, since the host OS (usually) performs this function.
-
-Fixed an alignment issue on 64-bit platforms. The
-HwLowLevelRead(Write) functions use a 64-bit address which is
-part of the packed ACPI Generic Address Structure. Since the
-structure is non-aligned, the alignment macros are now used to
-extract the address to a local variable before use.
-
-Fixed a problem where the ToInteger operator assumed all input
-strings were hexadecimal. The operator now handles both decimal
-strings and hex strings (prefixed with "0x").
-
-Fixed a problem where the string length in the string object
-created as a result of the internal ConvertToString procedure
-could be incorrect. This potentially affected all implicit
-conversions and also the ToDecimalString and ToHexString
-operators.
-
-Fixed two problems in the ToString operator. If the length
-parameter was zero, an incorrect string object was created and
-the value of the input length parameter was inadvertently changed
-from zero to Ones.
-
-Fixed a problem where the optional ResourceSource string in the
-ExtendedIRQ resource macro was ignored.
-
-Simplified the interfaces to the internal division functions,
-reducing code size and complexity.
-
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Implemented support for the ACPI 3.0 Timer operator. This ASL function
+implements a 64-bit timer with 100 nanosecond granularity.
+
+Defined a new OSL interface, AcpiOsGetTimer. This interface is used to
+implement the ACPI 3.0 Timer operator. This allows the host OS to implement
+the timer with the best clock available. Also, it keeps the core subsystem
+out of the clock handling business, since the host OS (usually) performs
+this function.
+
+Fixed an alignment issue on 64-bit platforms. The HwLowLevelRead(Write)
+functions use a 64-bit address which is part of the packed ACPI Generic
+Address Structure. Since the structure is non-aligned, the alignment macros
+are now used to extract the address to a local variable before use.
+
+Fixed a problem where the ToInteger operator assumed all input strings were
+hexadecimal. The operator now handles both decimal strings and hex strings
+(prefixed with "0x").
+
+Fixed a problem where the string length in the string object created as a
+result of the internal ConvertToString procedure could be incorrect. This
+potentially affected all implicit conversions and also the ToDecimalString
+and ToHexString operators.
+
+Fixed two problems in the ToString operator. If the length parameter was
+zero, an incorrect string object was created and the value of the input
+length parameter was inadvertently changed from zero to Ones.
+
+Fixed a problem where the optional ResourceSource string in the ExtendedIRQ
+resource macro was ignored.
+
+Simplified the interfaces to the internal division functions, reducing code
+size and complexity.
+
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 77.9K Code, 11.4K Data, 89.3K Total
@@ -2794,52 +3903,50 @@ compiler and the compiler options used during generation.
Implemented support for the ACPI 3.0 Timer operator.
-Fixed a problem where the Default() operator was inadvertently
-ignored in a Switch/Case block. This was a problem in the
-translation of the Switch statement to If...Else pairs.
+Fixed a problem where the Default() operator was inadvertently ignored in a
+Switch/Case block. This was a problem in the translation of the Switch
+statement to If...Else pairs.
-Added support to allow a standalone Return operator, with no
-parentheses (or operands).
+Added support to allow a standalone Return operator, with no parentheses (or
+operands).
-Fixed a problem with code generation for the ElseIf operator
-where the translated Else...If parse tree was improperly
-constructed leading to the loss of some code.
+Fixed a problem with code generation for the ElseIf operator where the
+translated Else...If parse tree was improperly constructed leading to the
+loss of some code.
----------------------------------------
22 September 2004. Summary of changes for version 20040922:
1) ACPI CA Core Subsystem:
-Fixed a problem with the implementation of the LNot() operator
-where "Ones" was not returned for the TRUE case. Changed the code
-to return Ones instead of (!Arg) which was usually 1. This change
-affects iASL constant folding for this operator also.
+Fixed a problem with the implementation of the LNot() operator where "Ones"
+was not returned for the TRUE case. Changed the code to return Ones instead
+of (!Arg) which was usually 1. This change affects iASL constant folding for
+this operator also.
-Fixed a problem in AcpiUtInitializeBuffer where an existing
-buffer was not initialized properly -- Now zero the entire buffer
-in this case where the buffer already exists.
+Fixed a problem in AcpiUtInitializeBuffer where an existing buffer was not
+initialized properly -- Now zero the entire buffer in this case where the
+buffer already exists.
-Changed the interface to AcpiOsSleep from (UINT32 Seconds, UINT32
-Milliseconds) to simply (ACPI_INTEGER Milliseconds). This
-simplifies all related code considerably. This will require
-changes/updates to all OS interface layers (OSLs.)
+Changed the interface to AcpiOsSleep from (UINT32 Seconds, UINT32
+Milliseconds) to simply (ACPI_INTEGER Milliseconds). This simplifies all
+related code considerably. This will require changes/updates to all OS
+interface layers (OSLs.)
-Implemented a new external interface,
-AcpiInstallExceptionHandler, to allow a system exception handler
-to be installed. This handler is invoked upon any run-time
-exception that occurs during control method execution.
+Implemented a new external interface, AcpiInstallExceptionHandler, to allow
+a system exception handler to be installed. This handler is invoked upon any
+run-time exception that occurs during control method execution.
-Added support for the DSDT in AcpiTbFindTable. This allows the
+Added support for the DSDT in AcpiTbFindTable. This allows the
DataTableRegion() operator to access the local copy of the DSDT.
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 77.8K Code, 11.4K Data, 89.2K Total
@@ -2851,19 +3958,18 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Fixed a problem with constant folding and the LNot operator. LNot
-was returning 1 in the TRUE case, not Ones as per the ACPI
-specification. This could result in the generation of an
-incorrect folded/reduced constant.
+Fixed a problem with constant folding and the LNot operator. LNot was
+returning 1 in the TRUE case, not Ones as per the ACPI specification. This
+could result in the generation of an incorrect folded/reduced constant.
-End-Of-File is now allowed within a "//"-style comment. A parse
-error no longer occurs if such a comment is at the very end of
-the input ASL source file.
+End-Of-File is now allowed within a "//"-style comment. A parse error no
+longer occurs if such a comment is at the very end of the input ASL source
+file.
-Implemented the "-r" option to override the Revision in the table
-header. The initial use of this option will be to simplify the
-evaluation of the AML interpreter by allowing a single ASL source
-module to be compiled for either 32-bit or 64-bit integers.
+Implemented the "-r" option to override the Revision in the table header.
+The initial use of this option will be to simplify the evaluation of the AML
+interpreter by allowing a single ASL source module to be compiled for either
+32-bit or 64-bit integers.
----------------------------------------
@@ -2871,47 +3977,43 @@ module to be compiled for either 32-bit or 64-bit integers.
1) ACPI CA Core Subsystem:
-- Implemented support for implicit object conversion in the non-
-numeric logical operators (LEqual, LGreater, LGreaterEqual,
-LLess, LLessEqual, and LNotEqual.) Any combination of
-Integers/Strings/Buffers may now be used; the second operand is
-implicitly converted on the fly to match the type of the first
-operand. For example:
+- Implemented support for implicit object conversion in the non-numeric
+logical operators (LEqual, LGreater, LGreaterEqual, LLess, LLessEqual, and
+LNotEqual.) Any combination of Integers/Strings/Buffers may now be used;
+the second operand is implicitly converted on the fly to match the type of
+the first operand. For example:
LEqual (Source1, Source2)
-Source1 and Source2 must each evaluate to an integer, a string,
-or a buffer. The data type of Source1 dictates the required type
-of Source2. Source2 is implicitly converted if necessary to match
-the type of Source1.
+Source1 and Source2 must each evaluate to an integer, a string, or a buffer.
+The data type of Source1 dictates the required type of Source2. Source2 is
+implicitly converted if necessary to match the type of Source1.
-- Updated and corrected the behavior of the string conversion
-support. The rules concerning conversion of buffers to strings
-(according to the ACPI specification) are as follows:
+- Updated and corrected the behavior of the string conversion support. The
+rules concerning conversion of buffers to strings (according to the ACPI
+specification) are as follows:
-ToDecimalString - explicit byte-wise conversion of buffer to
-string of decimal values (0-255) separated by commas. ToHexString
-- explicit byte-wise conversion of buffer to string of hex values
-(0-FF) separated by commas. ToString - explicit byte-wise
-conversion of buffer to string. Byte-by-byte copy with no
-transform except NULL terminated. Any other implicit buffer-to-
-string conversion - byte-wise conversion of buffer to string of
-hex values (0-FF) separated by spaces.
+ToDecimalString - explicit byte-wise conversion of buffer to string of
+decimal values (0-255) separated by commas. ToHexString - explicit byte-wise
+conversion of buffer to string of hex values (0-FF) separated by commas.
+ToString - explicit byte-wise conversion of buffer to string. Byte-by-byte
+copy with no transform except NULL terminated. Any other implicit buffer-to-
+string conversion - byte-wise conversion of buffer to string of hex values
+(0-FF) separated by spaces.
- Fixed typo in definition of AcpiGbl_EnableInterpreterSlack.
-- Fixed a problem in AcpiNsGetPathnameLength where the returned
-length was one byte too short in the case of a node in the root
-scope. This could cause a fault during debug output.
+- Fixed a problem in AcpiNsGetPathnameLength where the returned length was
+one byte too short in the case of a node in the root scope. This could
+cause a fault during debug output.
-- Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+- Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 77.9K Code, 11.5K Data, 89.4K Total
@@ -2931,30 +4033,27 @@ compiler and the compiler options used during generation.
1) ACPI CA Core Subsystem:
-Designed and implemented support within the AML interpreter for
-the so-called "implicit return". This support returns the result
-of the last ASL operation within a control method, in the absence
-of an explicit Return() operator. A few machines depend on this
-behavior, even though it is not explicitly supported by the ASL
-language. It is optional support that can be enabled at runtime
-via the AcpiGbl_EnableInterpreterSlack flag.
-
-Removed support for the PCI_Config address space from the
-internal low level hardware interfaces (AcpiHwLowLevelRead and
-AcpiHwLowLevelWrite). This support was not used internally, and
-would not work correctly anyway because the PCI bus number and
-segment number were not supported. There are separate interfaces
-for PCI configuration space access because of the unique
+Designed and implemented support within the AML interpreter for the so-
+called "implicit return". This support returns the result of the last ASL
+operation within a control method, in the absence of an explicit Return()
+operator. A few machines depend on this behavior, even though it is not
+explicitly supported by the ASL language. It is optional support that can
+be enabled at runtime via the AcpiGbl_EnableInterpreterSlack flag.
+
+Removed support for the PCI_Config address space from the internal low level
+hardware interfaces (AcpiHwLowLevelRead and AcpiHwLowLevelWrite). This
+support was not used internally, and would not work correctly anyway because
+the PCI bus number and segment number were not supported. There are
+separate interfaces for PCI configuration space access because of the unique
interface.
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 78.0K Code, 11.5K Data, 89.5K Total
@@ -2966,10 +4065,9 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Fixed a problem where constants in ASL expressions at the root
-level (not within a control method) could be inadvertently
-truncated during code generation. This problem was introduced in
-the 20040715 release.
+Fixed a problem where constants in ASL expressions at the root level (not
+within a control method) could be inadvertently truncated during code
+generation. This problem was introduced in the 20040715 release.
----------------------------------------
@@ -2977,48 +4075,43 @@ the 20040715 release.
1) ACPI CA Core Subsystem:
-Restructured the internal HW GPE interfaces to pass/track the
-current state of interrupts (enabled/disabled) in order to avoid
-possible deadlock and increase flexibility of the interfaces.
-
-Implemented a "lexicographical compare" for String and Buffer
-objects within the logical operators -- LGreater, LLess,
-LGreaterEqual, and LLessEqual -- as per further clarification to
-the ACPI specification. Behavior is similar to C library
-"strcmp".
-
-Completed a major reduction in CPU stack use for the
-AcpiGetFirmwareTable external function. In the 32-bit non-debug
-case, the stack use has been reduced from 168 bytes to 32 bytes.
-
-Deployed a new run-time configuration flag,
-AcpiGbl_EnableInterpreterSlack, whose purpose is to allow the AML
-interpreter to forgive certain bad AML constructs. Default
-setting is FALSE.
-
-Implemented the first use of AcpiGbl_EnableInterpreterSlack in
-the Field IO support code. If enabled, it allows field access to
-go beyond the end of a region definition if the field is within
-the region length rounded up to the next access width boundary (a
-common coding error.)
-
-Renamed OSD_HANDLER to ACPI_OSD_HANDLER, and
-OSD_EXECUTION_CALLBACK to ACPI_OSD_EXEC_CALLBACK for consistency
-with other ACPI symbols. Also, these symbols are lowercased by
-the latest version of the AcpiSrc tool.
-
-The prototypes for the PCI interfaces in acpiosxf.h have been
-updated to rename "Register" to simply "Reg" to prevent certain
-compilers from complaining.
-
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Restructured the internal HW GPE interfaces to pass/track the current state
+of interrupts (enabled/disabled) in order to avoid possible deadlock and
+increase flexibility of the interfaces.
+
+Implemented a "lexicographical compare" for String and Buffer objects within
+the logical operators -- LGreater, LLess, LGreaterEqual, and LLessEqual --
+as per further clarification to the ACPI specification. Behavior is similar
+to C library "strcmp".
+
+Completed a major reduction in CPU stack use for the AcpiGetFirmwareTable
+external function. In the 32-bit non-debug case, the stack use has been
+reduced from 168 bytes to 32 bytes.
+
+Deployed a new run-time configuration flag, AcpiGbl_EnableInterpreterSlack,
+whose purpose is to allow the AML interpreter to forgive certain bad AML
+constructs. Default setting is FALSE.
+
+Implemented the first use of AcpiGbl_EnableInterpreterSlack in the Field IO
+support code. If enabled, it allows field access to go beyond the end of a
+region definition if the field is within the region length rounded up to the
+next access width boundary (a common coding error.)
+
+Renamed OSD_HANDLER to ACPI_OSD_HANDLER, and OSD_EXECUTION_CALLBACK to
+ACPI_OSD_EXEC_CALLBACK for consistency with other ACPI symbols. Also, these
+symbols are lowercased by the latest version of the AcpiSrc tool.
+
+The prototypes for the PCI interfaces in acpiosxf.h have been updated to
+rename "Register" to simply "Reg" to prevent certain compilers from
+complaining.
+
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 77.8K Code, 11.5K Data, 89.3K Total
@@ -3030,20 +4123,20 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Implemented full support for Package objects within the Case()
-operator. Note: The Break() operator is currently not supported
-within Case blocks (TermLists) as there is some question about
-backward compatibility with ACPI 1.0 interpreters.
+Implemented full support for Package objects within the Case() operator.
+Note: The Break() operator is currently not supported within Case blocks
+(TermLists) as there is some question about backward compatibility with ACPI
+1.0 interpreters.
-Fixed a problem where complex terms were not supported properly
-within the Switch() operator.
+Fixed a problem where complex terms were not supported properly within the
+Switch() operator.
-Eliminated extraneous warning for compiler-emitted reserved names
-of the form "_T_x". (Used in Switch/Case operators.)
+Eliminated extraneous warning for compiler-emitted reserved names of the
+form "_T_x". (Used in Switch/Case operators.)
-Eliminated optimization messages for "_T_x" objects and small
-constants within the DefinitionBlock operator.
+Eliminated optimization messages for "_T_x" objects and small constants
+within the DefinitionBlock operator.
----------------------------------------
@@ -3051,24 +4144,23 @@ constants within the DefinitionBlock operator.
1) ACPI CA Core Subsystem:
-Implemented support for Buffer and String objects (as per ACPI
-2.0) for the following ASL operators: LEqual, LGreater, LLess,
-LGreaterEqual, and LLessEqual.
+Implemented support for Buffer and String objects (as per ACPI 2.0) for the
+following ASL operators: LEqual, LGreater, LLess, LGreaterEqual, and
+LLessEqual.
-All directory names in the entire source package are lower case,
-as they were in earlier releases.
+All directory names in the entire source package are lower case, as they
+were in earlier releases.
-Implemented "Disassemble" command in the AML debugger that will
-disassemble a single control method.
+Implemented "Disassemble" command in the AML debugger that will disassemble
+a single control method.
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 77.7K Code, 11.5K Data, 89.2K Total
@@ -3081,60 +4173,56 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Implemented support for Buffer and String objects (as per ACPI
-2.0) for the following ASL operators: LEqual, LGreater, LLess,
-LGreaterEqual, and LLessEqual.
+Implemented support for Buffer and String objects (as per ACPI 2.0) for the
+following ASL operators: LEqual, LGreater, LLess, LGreaterEqual, and
+LLessEqual.
-All directory names in the entire source package are lower case,
-as they were in earlier releases.
+All directory names in the entire source package are lower case, as they
+were in earlier releases.
-Fixed a fault when using the -g or -d<nofilename> options if the
-FADT was not found.
+Fixed a fault when using the -g or -d<nofilename> options if the FADT was
+not found.
-Fixed an issue with the Windows version of the compiler where
-later versions of Windows place the FADT in the registry under
-the name "FADT" and not "FACP" as earlier versions did. This
-applies when using the -g or -d<nofilename> options. The
-compiler now looks for both strings as necessary.
+Fixed an issue with the Windows version of the compiler where later versions
+of Windows place the FADT in the registry under the name "FADT" and not
+"FACP" as earlier versions did. This applies when using the -g or -
+d<nofilename> options. The compiler now looks for both strings as
+necessary.
-Fixed a problem with compiler namepath optimization where a
-namepath within the Scope() operator could not be optimized if
-the namepath was a subpath of the current scope path.
+Fixed a problem with compiler namepath optimization where a namepath within
+the Scope() operator could not be optimized if the namepath was a subpath of
+the current scope path.
----------------------------------------
27 May 2004. Summary of changes for version 20040527:
1) ACPI CA Core Subsystem:
-Completed a new design and implementation for EBDA (Extended BIOS
-Data Area) support in the RSDP scan code. The original code
-improperly scanned for the EBDA by simply scanning from memory
-location 0 to 0x400. The correct method is to first obtain the
-EBDA pointer from within the BIOS data area, then scan 1K of
-memory starting at the EBDA pointer. There appear to be few if
+Completed a new design and implementation for EBDA (Extended BIOS Data Area)
+support in the RSDP scan code. The original code improperly scanned for the
+EBDA by simply scanning from memory location 0 to 0x400. The correct method
+is to first obtain the EBDA pointer from within the BIOS data area, then
+scan 1K of memory starting at the EBDA pointer. There appear to be few if
any machines that place the RSDP in the EBDA, however.
-Integrated a fix for a possible fault during evaluation of
-BufferField arguments. Obsolete code that was causing the
-problem was removed.
+Integrated a fix for a possible fault during evaluation of BufferField
+arguments. Obsolete code that was causing the problem was removed.
-Found and fixed a problem in the Field Support Code where data
-could be corrupted on a bit field read that starts on an aligned
-boundary but does not end on an aligned boundary. Merged the
-read/write "datum length" calculation code into a common
-procedure.
+Found and fixed a problem in the Field Support Code where data could be
+corrupted on a bit field read that starts on an aligned boundary but does
+not end on an aligned boundary. Merged the read/write "datum length"
+calculation code into a common procedure.
Rolled in a couple of changes to the FreeBSD-specific header.
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 77.6K Code, 11.5K Data, 89.1K Total
@@ -3146,52 +4234,45 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Fixed a generation warning produced by some overly-verbose
-compilers for a 64-bit constant.
+Fixed a generation warning produced by some overly-verbose compilers for a
+64-bit constant.
----------------------------------------
14 May 2004. Summary of changes for version 20040514:
1) ACPI CA Core Subsystem:
-Fixed a problem where hardware GPE enable bits sometimes not set
-properly during and after GPE method execution. Result of 04/27
-changes.
+Fixed a problem where hardware GPE enable bits sometimes not set properly
+during and after GPE method execution. Result of 04/27 changes.
Removed extra "clear all GPEs" when sleeping/waking.
-Removed AcpiHwEnableGpe and AcpiHwDisableGpe, replaced by the
-single AcpiHwWriteGpeEnableReg. Changed a couple of calls to the
-functions above to the new AcpiEv* calls as appropriate.
+Removed AcpiHwEnableGpe and AcpiHwDisableGpe, replaced by the single
+AcpiHwWriteGpeEnableReg. Changed a couple of calls to the functions above to
+the new AcpiEv* calls as appropriate.
-ACPI_OS_NAME was removed from the OS-specific headers. The
-default name is now "Microsoft Windows NT" for maximum
-compatibility. However this can be changed by modifying the
-acconfig.h file.
+ACPI_OS_NAME was removed from the OS-specific headers. The default name is
+now "Microsoft Windows NT" for maximum compatibility. However this can be
+changed by modifying the acconfig.h file.
-Allow a single invocation of AcpiInstallNotifyHandler for a
-handler that traps both types of notifies (System, Device). Use
-ACPI_ALL_NOTIFY flag.
+Allow a single invocation of AcpiInstallNotifyHandler for a handler that
+traps both types of notifies (System, Device). Use ACPI_ALL_NOTIFY flag.
-Run _INI methods on ThermalZone objects. This is against the
-ACPI specification, but there is apparently ASL code in the field
-that has these _INI methods, and apparently "other" AML
-interpreters execute them.
+Run _INI methods on ThermalZone objects. This is against the ACPI
+specification, but there is apparently ASL code in the field that has these
+_INI methods, and apparently "other" AML interpreters execute them.
-Performed a full 16/32/64 bit lint that resulted in some small
-changes.
+Performed a full 16/32/64 bit lint that resulted in some small changes.
-Added a sleep simulation command to the AML debugger to test
-sleep code.
+Added a sleep simulation command to the AML debugger to test sleep code.
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 77.6K Code, 11.5K Data, 89.1K Total
@@ -3205,85 +4286,78 @@ compiler and the compiler options used during generation.
1) ACPI CA Core Subsystem:
-Completed a major overhaul of the GPE handling within ACPI CA.
-There are now three types of GPEs: wake-only, runtime-only, and
-combination wake/run. The only GPEs allowed to be combination
-wake/run are for button-style devices such as a control-method
-power button, control-method sleep button, or a notebook lid
-switch. GPEs that have an _Lxx or _Exx method and are not
-referenced by any _PRW methods are marked for "runtime" and
-hardware enabled. Any GPE that is referenced by a _PRW method is
-marked for "wake" (and disabled at runtime). However, at sleep
-time, only those GPEs that have been specifically enabled for
-wake via the AcpiEnableGpe interface will actually be hardware
-enabled.
-
-A new external interface has been added, AcpiSetGpeType(), that
-is meant to be used by device drivers to force a GPE to a
-particular type. It will be especially useful for the drivers
-for the button devices mentioned above.
-
-Completed restructuring of the ACPI CA initialization sequence so
-that default operation region handlers are installed before GPEs
-are initialized and the _PRW methods are executed. This will
-prevent errors when the _PRW methods attempt to access system
-memory or I/O space.
-
-GPE enable/disable no longer reads the GPE enable register. We
-now keep the enable info for runtime and wake separate and in the
-GPE_EVENT_INFO. We thus no longer depend on the hardware to
-maintain these bits.
-
-Always clear the wake status and fixed/GPE status bits before
-sleep, even for state S5.
-
-Improved the AML debugger output for displaying the GPE blocks
-and their current status.
-
-Added new strings for the _OSI method, of the form "Windows 2001
-SPx" where x = 0,1,2,3,4.
-
-Fixed a problem where the physical address was incorrectly
-calculated when the Load() operator was used to directly load
-from an Operation Region (vs. loading from a Field object.) Also
-added check for minimum table length for this case.
-
-Fix for multiple mutex acquisition. Restore original thread
-SyncLevel on mutex release.
-
-Added ACPI_VALID_SXDS flag to the AcpiGetObjectInfo interface for
+Completed a major overhaul of the GPE handling within ACPI CA. There are
+now three types of GPEs: wake-only, runtime-only, and combination wake/run.
+The only GPEs allowed to be combination wake/run are for button-style
+devices such as a control-method power button, control-method sleep button,
+or a notebook lid switch. GPEs that have an _Lxx or _Exx method and are not
+referenced by any _PRW methods are marked for "runtime" and hardware
+enabled. Any GPE that is referenced by a _PRW method is marked for "wake"
+(and disabled at runtime). However, at sleep time, only those GPEs that
+have been specifically enabled for wake via the AcpiEnableGpe interface will
+actually be hardware enabled.
+
+A new external interface has been added, AcpiSetGpeType(), that is meant to
+be used by device drivers to force a GPE to a particular type. It will be
+especially useful for the drivers for the button devices mentioned above.
+
+Completed restructuring of the ACPI CA initialization sequence so that
+default operation region handlers are installed before GPEs are initialized
+and the _PRW methods are executed. This will prevent errors when the _PRW
+methods attempt to access system memory or I/O space.
+
+GPE enable/disable no longer reads the GPE enable register. We now keep the
+enable info for runtime and wake separate and in the GPE_EVENT_INFO. We
+thus no longer depend on the hardware to maintain these bits.
+
+Always clear the wake status and fixed/GPE status bits before sleep, even
+for state S5.
+
+Improved the AML debugger output for displaying the GPE blocks and their
+current status.
+
+Added new strings for the _OSI method, of the form "Windows 2001 SPx" where
+x = 0,1,2,3,4.
+
+Fixed a problem where the physical address was incorrectly calculated when
+the Load() operator was used to directly load from an Operation Region (vs.
+loading from a Field object.) Also added check for minimum table length for
+this case.
+
+Fix for multiple mutex acquisition. Restore original thread SyncLevel on
+mutex release.
+
+Added ACPI_VALID_SXDS flag to the AcpiGetObjectInfo interface for
consistency with the other fields returned.
-Shrunk the ACPI_GPE_EVENT_INFO structure by 40%. There is one
-such structure for each GPE in the system, so the size of this
-structure is important.
+Shrunk the ACPI_GPE_EVENT_INFO structure by 40%. There is one such
+structure for each GPE in the system, so the size of this structure is
+important.
-CPU stack requirement reduction: Cleaned up the method execution
-and object evaluation paths so that now a parameter structure is
-passed, instead of copying the various method parameters over and
-over again.
+CPU stack requirement reduction: Cleaned up the method execution and object
+evaluation paths so that now a parameter structure is passed, instead of
+copying the various method parameters over and over again.
-In evregion.c: Correctly exit and reenter the interpreter region
-if and only if dispatching an operation region request to a user-
-installed handler. Do not exit/reenter when dispatching to a
-default handler (e.g., default system memory or I/O handlers)
+In evregion.c: Correctly exit and reenter the interpreter region if and
+only if dispatching an operation region request to a user-installed handler.
+Do not exit/reenter when dispatching to a default handler (e.g., default
+system memory or I/O handlers)
-Notes for updating drivers for the new GPE support. The
-following changes must be made to ACPI-related device drivers
-that are attached to one or more GPEs: (This information will be
-added to the ACPI CA Programmer Reference.)
+Notes for updating drivers for the new GPE support. The following changes
+must be made to ACPI-related device drivers that are attached to one or more
+GPEs: (This information will be added to the ACPI CA Programmer Reference.)
-1) AcpiInstallGpeHandler no longer automatically enables the GPE,
-you must explicitly call AcpiEnableGpe.
-2) There is a new interface called AcpiSetGpeType. This should be
-called before enabling the GPE. Also, this interface will
-automatically disable the GPE if it is currently enabled.
+1) AcpiInstallGpeHandler no longer automatically enables the GPE, you must
+explicitly call AcpiEnableGpe.
+2) There is a new interface called AcpiSetGpeType. This should be called
+before enabling the GPE. Also, this interface will automatically disable
+the GPE if it is currently enabled.
3) AcpiEnableGpe no longer supports a GPE type flag.
Specific drivers that must be changed:
1) EC driver:
- AcpiInstallGpeHandler (NULL, GpeNum, ACPI_GPE_EDGE_TRIGGERED,
+ AcpiInstallGpeHandler (NULL, GpeNum, ACPI_GPE_EDGE_TRIGGERED,
AeGpeHandler, NULL);
AcpiSetGpeType (NULL, GpeNum, ACPI_GPE_TYPE_RUNTIME);
AcpiEnableGpe (NULL, GpeNum, ACPI_NOT_ISR);
@@ -3295,21 +4369,19 @@ If _PRW exists: /* This is a control-method button */
AcpiSetGpeType (GpeDevice, GpeNum, ACPI_GPE_TYPE_WAKE_RUN);
AcpiEnableGpe (GpeDevice, GpeNum, ACPI_NOT_ISR);
-For all other devices that have _PRWs, we automatically set the
-GPE type to ACPI_GPE_TYPE_WAKE, but the GPE is NOT automatically
-(wake) enabled. This must be done on a selective basis, usually
-requiring some kind of user app to allow the user to pick the
-wake devices.
+For all other devices that have _PRWs, we automatically set the GPE type to
+ACPI_GPE_TYPE_WAKE, but the GPE is NOT automatically (wake) enabled. This
+must be done on a selective basis, usually requiring some kind of user app
+to allow the user to pick the wake devices.
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 77.0K Code, 11.4K Data, 88.4K Total
@@ -3326,30 +4398,28 @@ compiler and the compiler options used during generation.
1) ACPI CA Core Subsystem:
-Fixed an interpreter problem where an indirect store through an
-ArgX parameter was incorrectly applying the "implicit conversion
-rules" during the store. From the ACPI specification: "If the
-target is a method local or argument (LocalX or ArgX), no
-conversion is performed and the result is stored directly to the
-target". The new behavior is to disable implicit conversion
-during ALL stores to an ArgX.
-
-Changed the behavior of the _PRW method scan to ignore any and
-all errors returned by a given _PRW. This prevents the scan from
-aborting from the failure of any single _PRW.
-
-Moved the runtime configuration parameters from the global init
-procedure to static variables in acglobal.h. This will allow the
-host to override the default values easily.
-
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Fixed an interpreter problem where an indirect store through an ArgX
+parameter was incorrectly applying the "implicit conversion rules" during
+the store. From the ACPI specification: "If the target is a method local or
+argument (LocalX or ArgX), no conversion is performed and the result is
+stored directly to the target". The new behavior is to disable implicit
+conversion during ALL stores to an ArgX.
+
+Changed the behavior of the _PRW method scan to ignore any and all errors
+returned by a given _PRW. This prevents the scan from aborting from the
+failure of any single _PRW.
+
+Moved the runtime configuration parameters from the global init procedure to
+static variables in acglobal.h. This will allow the host to override the
+default values easily.
+
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 76.9K Code, 11.4K Data, 88.3K Total
@@ -3361,65 +4431,60 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-iASL now fully disassembles SSDTs. However, External()
-statements are not generated automatically for unresolved symbols
-at this time. This is a planned feature for future
-implementation.
+iASL now fully disassembles SSDTs. However, External() statements are not
+generated automatically for unresolved symbols at this time. This is a
+planned feature for future implementation.
-Fixed a scoping problem in the disassembler that occurs when the
-type of the target of a Scope() operator is overridden. This
-problem caused an incorrectly nested internal namespace to be
-constructed.
+Fixed a scoping problem in the disassembler that occurs when the type of the
+target of a Scope() operator is overridden. This problem caused an
+incorrectly nested internal namespace to be constructed.
-Any warnings or errors that are emitted during disassembly are
-now commented out automatically so that the resulting file can be
-recompiled without any hand editing.
+Any warnings or errors that are emitted during disassembly are now commented
+out automatically so that the resulting file can be recompiled without any
+hand editing.
----------------------------------------
26 March 2004. Summary of changes for version 20040326:
1) ACPI CA Core Subsystem:
-Implemented support for "wake" GPEs via interaction between GPEs
-and the _PRW methods. Every GPE that is pointed to by one or
-more _PRWs is identified as a WAKE GPE and by default will no
-longer be enabled at runtime. Previously, we were blindly
-enabling all GPEs with a corresponding _Lxx or _Exx method - but
-most of these turn out to be WAKE GPEs anyway. We believe this
-has been the cause of thousands of "spurious" GPEs on some
+Implemented support for "wake" GPEs via interaction between GPEs and the
+_PRW methods. Every GPE that is pointed to by one or more _PRWs is
+identified as a WAKE GPE and by default will no longer be enabled at
+runtime. Previously, we were blindly enabling all GPEs with a corresponding
+_Lxx or _Exx method - but most of these turn out to be WAKE GPEs anyway. We
+believe this has been the cause of thousands of "spurious" GPEs on some
systems.
-This new GPE behavior is can be reverted to the original behavior
-(enable ALL GPEs at runtime) via a runtime flag.
+This new GPE behavior is can be reverted to the original behavior (enable
+ALL GPEs at runtime) via a runtime flag.
-Fixed a problem where aliased control methods could not access
-objects properly. The proper scope within the namespace was not
-initialized (transferred to the target of the aliased method)
-before executing the target method.
+Fixed a problem where aliased control methods could not access objects
+properly. The proper scope within the namespace was not initialized
+(transferred to the target of the aliased method) before executing the
+target method.
-Fixed a potential race condition on internal object deletion on
-the return object in AcpiEvaluateObject.
+Fixed a potential race condition on internal object deletion on the return
+object in AcpiEvaluateObject.
-Integrated a fix for resource descriptors where both _MEM and
-_MTP were being extracted instead of just _MEM. (i.e. bitmask
-was incorrectly too wide, 0x0F instead of 0x03.)
+Integrated a fix for resource descriptors where both _MEM and _MTP were
+being extracted instead of just _MEM. (i.e. bitmask was incorrectly too
+wide, 0x0F instead of 0x03.)
-Added a special case for ACPI_ROOT_OBJECT in AcpiUtGetNodeName,
-preventing a fault in some cases.
+Added a special case for ACPI_ROOT_OBJECT in AcpiUtGetNodeName, preventing a
+fault in some cases.
Updated Notify() values for debug statements in evmisc.c
-Return proper status from AcpiUtMutexInitialize, not just simply
-AE_OK.
+Return proper status from AcpiUtMutexInitialize, not just simply AE_OK.
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
@@ -3434,50 +4499,45 @@ compiler and the compiler options used during generation.
1) ACPI CA Core Subsystem:
-Fixed a problem where errors occurring during the parse phase of
-control method execution did not abort cleanly. For example,
-objects created and installed in the namespace were not deleted.
-This caused all subsequent invocations of the method to return
-the AE_ALREADY_EXISTS exception.
+Fixed a problem where errors occurring during the parse phase of control
+method execution did not abort cleanly. For example, objects created and
+installed in the namespace were not deleted. This caused all subsequent
+invocations of the method to return the AE_ALREADY_EXISTS exception.
-Implemented a mechanism to force a control method to "Serialized"
-execution if the method attempts to create namespace objects.
-(The root of the AE_ALREADY_EXISTS problem.)
+Implemented a mechanism to force a control method to "Serialized" execution
+if the method attempts to create namespace objects. (The root of the
+AE_ALREADY_EXISTS problem.)
-Implemented support for the predefined _OSI "internal" control
-method. Initial supported strings are "Linux", "Windows 2000",
-"Windows 2001", and "Windows 2001.1", and can be easily upgraded
-for new strings as necessary. This feature will allow "other"
-operating systems to execute the fully tested, "Windows" code
-path through the ASL code
+Implemented support for the predefined _OSI "internal" control method.
+Initial supported strings are "Linux", "Windows 2000", "Windows 2001", and
+"Windows 2001.1", and can be easily upgraded for new strings as necessary.
+This feature will allow "other" operating systems to execute the fully
+tested, "Windows" code path through the ASL code
-Global Lock Support: Now allows multiple acquires and releases
-with any internal thread. Removed concept of "owning thread" for
-this special mutex.
+Global Lock Support: Now allows multiple acquires and releases with any
+internal thread. Removed concept of "owning thread" for this special mutex.
-Fixed two functions that were inappropriately declaring large
-objects on the CPU stack: PsParseLoop, NsEvaluateRelative.
-Reduces the stack usage during method execution considerably.
+Fixed two functions that were inappropriately declaring large objects on the
+CPU stack: PsParseLoop, NsEvaluateRelative. Reduces the stack usage during
+method execution considerably.
-Fixed a problem in the ACPI 2.0 FACS descriptor (actbl2.h) where
-the S4Bios_f field was incorrectly defined as UINT32 instead of
-UINT32_BIT.
+Fixed a problem in the ACPI 2.0 FACS descriptor (actbl2.h) where the
+S4Bios_f field was incorrectly defined as UINT32 instead of UINT32_BIT.
-Fixed a problem where AcpiEvGpeDetect would fault if there were
-no GPEs defined on the machine.
+Fixed a problem where AcpiEvGpeDetect would fault if there were no GPEs
+defined on the machine.
-Implemented two runtime options: One to force all control method
-execution to "Serialized" to mimic Windows behavior, another to
-disable _OSI support if it causes problems on a given machine.
+Implemented two runtime options: One to force all control method execution
+to "Serialized" to mimic Windows behavior, another to disable _OSI support
+if it causes problems on a given machine.
-Code and Data Size: Current and previous core subsystem library
-sizes are shown below. These are the code and data sizes for the
-acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
-these values do not include any ACPI driver or OSPM code. The
-debug version of the code includes the debug output trace
-mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler and the compiler options used during generation.
+Code and Data Size: Current and previous core subsystem library sizes are
+shown below. These are the code and data sizes for the acpica.lib produced
+by the Microsoft Visual C++ 6.0 compiler, and these values do not include
+any ACPI driver or OSPM code. The debug version of the code includes the
+debug output trace mechanism and has a much larger code and data size. Note
+that these values will vary depending on the efficiency of the compiler and
+the compiler options used during generation.
Previous Release:
Non-Debug Version: 74.8K Code, 10.1K Data, 84.9K Total
@@ -3488,8 +4548,8 @@ compiler and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Fixed an array size problem for FreeBSD that would cause the
-compiler to fault.
+Fixed an array size problem for FreeBSD that would cause the compiler to
+fault.
----------------------------------------
20 February 2004. Summary of changes for version 20040220:
@@ -3497,23 +4557,22 @@ compiler to fault.
1) ACPI CA Core Subsystem:
-Implemented execution of _SxD methods for Device objects in the
+Implemented execution of _SxD methods for Device objects in the
GetObjectInfo interface.
Fixed calls to _SST method to pass the correct arguments.
Added a call to _SST on wake to restore to "working" state.
-Check for End-Of-Buffer failure case in the WalkResources
-interface.
+Check for End-Of-Buffer failure case in the WalkResources interface.
-Integrated fix for 64-bit alignment issue in acglobal.h by moving
-two structures to the beginning of the file.
+Integrated fix for 64-bit alignment issue in acglobal.h by moving two
+structures to the beginning of the file.
After wake, clear GPE status register(s) before enabling GPEs.
-After wake, clear/enable power button. (Perhaps we should
-clear/enable all fixed events upon wake.)
+After wake, clear/enable power button. (Perhaps we should clear/enable all
+fixed events upon wake.)
Fixed a couple of possible memory leaks in the Namespace manager.
@@ -3525,26 +4584,25 @@ Integrated latest acnetbsd.h file.
1) ACPI CA Core Subsystem:
-Completed investigation and implementation of the call-by-
-reference mechanism for control method arguments.
+Completed investigation and implementation of the call-by-reference
+mechanism for control method arguments.
-Fixed a problem where a store of an object into an indexed
-package could fail if the store occurs within a different method
-than the method that created the package.
+Fixed a problem where a store of an object into an indexed package could
+fail if the store occurs within a different method than the method that
+created the package.
-Fixed a problem where the ToDecimal operator could return
-incorrect results.
+Fixed a problem where the ToDecimal operator could return incorrect results.
-Fixed a problem where the CopyObject operator could fail on some
-of the more obscure objects (e.g., Reference objects.)
+Fixed a problem where the CopyObject operator could fail on some of the more
+obscure objects (e.g., Reference objects.)
-Improved the output of the Debug object to display buffer,
-package, and index objects.
+Improved the output of the Debug object to display buffer, package, and
+index objects.
-Fixed a problem where constructs of the form "RefOf (ArgX)" did
-not return the expected result.
+Fixed a problem where constructs of the form "RefOf (ArgX)" did not return
+the expected result.
-Added permanent ACPI_REPORT_ERROR macros for all instances of the
+Added permanent ACPI_REPORT_ERROR macros for all instances of the
ACPI_AML_INTERNAL exception.
Integrated latest version of acfreebsd.h
@@ -3552,14 +4610,14 @@ Integrated latest version of acfreebsd.h
----------------------------------------
16 January 2004. Summary of changes for version 20040116:
-The purpose of this release is primarily to update the copyright
-years in each module, thus causing a huge number of diffs. There
-are a few small functional changes, however.
+The purpose of this release is primarily to update the copyright years in
+each module, thus causing a huge number of diffs. There are a few small
+functional changes, however.
1) ACPI CA Core Subsystem:
-Improved error messages when there is a problem finding one or
-more of the required base ACPI tables
+Improved error messages when there is a problem finding one or more of the
+required base ACPI tables
Reintroduced the definition of APIC_HEADER in actbl.h
@@ -3569,8 +4627,8 @@ Removed extraneous reference to NewObj in dsmthdat.c
2) iASL compiler
-Fixed a problem introduced in December that disabled the correct
-disassembly of Resource Templates
+Fixed a problem introduced in December that disabled the correct disassembly
+of Resource Templates
----------------------------------------
@@ -3594,8 +4652,7 @@ transitions.
Implemented support to clear the SLP_TYP and SLP_EN bits when
waking up, this is apparently required by some machines.
-When sleeping, clear the wake status only if SleepState is not
-S5.
+When sleeping, clear the wake status only if SleepState is not S5.
Fixed a problem in AcpiRsExtendedIrqResource() where an incorrect
pointer arithmetic advanced a string pointer too far.
@@ -3603,8 +4660,7 @@ pointer arithmetic advanced a string pointer too far.
Fixed a problem in AcpiTbGetTablePtr() where a garbage pointer
could be returned if the requested table has not been loaded.
-Within the support for IRQ resources, restructured the handling
-of
+Within the support for IRQ resources, restructured the handling of
the active and edge/level bits.
Fixed a few problems in AcpiPsxExecute() where memory could be
@@ -3619,8 +4675,7 @@ acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
these values do not include any ACPI driver or OSPM code. The
debug version of the code includes the debug output trace
mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler
+these values will vary depending on the efficiency of the compiler
and the compiler options used during generation.
Previous Release (20031029):
@@ -3651,14 +4706,12 @@ extends to the very end of the parent region (resulted in an
AE_AML_REGION_LIMIT exception.)
Fixed a problem with ACPI Fixed Events where an RT Clock handler
-would not get invoked on an RTC event. The RTC event bitmasks
-for
+would not get invoked on an RTC event. The RTC event bitmasks for
the PM1 registers were not being initialized properly.
Implemented support for executing _STA and _INI methods for
Processor objects. Although this is currently not part of the
-ACPI specification, there is existing ASL code that depends on
-the
+ACPI specification, there is existing ASL code that depends on the
init-time execution of these methods.
Implemented and deployed a GetDescriptorName function to decode
@@ -3666,10 +4719,8 @@ the various types of internal descriptors. Guards against null
descriptors during debug output also.
Implemented and deployed a GetNodeName function to extract the 4-
-character namespace node name. This function simplifies the
-debug
-and error output, as well as guarding against null pointers
-during
+character namespace node name. This function simplifies the debug
+and error output, as well as guarding against null pointers during
output.
Implemented and deployed the ACPI_FORMAT_UINT64 helper macro to
@@ -3690,8 +4741,7 @@ Cleaned up a handful of warnings during 64-bit generation.
Fixed a reported error where and incorrect GPE number was passed
to the GPE dispatch handler. This value is only used for error
-output, however. Used this opportunity to clean up and
-streamline
+output, however. Used this opportunity to clean up and streamline
the GPE dispatch code.
Code and Data Size: Current and previous core subsystem library
@@ -3701,8 +4751,7 @@ these values do not include any ACPI driver or OSPM code. The
debug version of the code includes the debug output trace
mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler
+these values will vary depending on the efficiency of the compiler
and the compiler options used during generation.
Previous Release (20031002):
@@ -3715,8 +4764,7 @@ and the compiler options used during generation.
2) iASL Compiler/Disassembler:
-Updated the iASL compiler to return an error if the operand to
-the
+Updated the iASL compiler to return an error if the operand to the
Stall() operator is larger than 255.
@@ -3733,8 +4781,7 @@ register.)
Fixed a problem with all Field objects where a write could go
beyond the end-of-field if the field was larger than the access
-granularity and therefore required multiple writes to complete
-the
+granularity and therefore required multiple writes to complete the
request. An extra write beyond the end of the field could happen
inadvertently.
@@ -3762,8 +4809,7 @@ acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
these values do not include any ACPI driver or OSPM code. The
debug version of the code includes the debug output trace
mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler
+these values will vary depending on the efficiency of the compiler
and the compiler options used during generation.
Previous Release (20030918):
@@ -3781,8 +4827,7 @@ source ASL file. This catches attempts to compile binary (AML)
files early in the compile, with an informative error message.
Fixed a problem where the disassembler would fault if the output
-filename could not be generated or if the output file could not
-be
+filename could not be generated or if the output file could not be
opened.
----------------------------------------
@@ -3802,8 +4847,7 @@ does not attempt to lookup/create the name a second time in an
incorrect scope. This fixes the "region size computed
incorrectly" problem.
-Fixed a call to AcpiHwRegisterWrite in hwregs.c that was causing
-a
+Fixed a call to AcpiHwRegisterWrite in hwregs.c that was causing a
Global Lock AE_BAD_PARAMETER error.
Fixed several 64-bit issues with prototypes, casting and data
@@ -3819,8 +4863,7 @@ acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
these values do not include any ACPI driver or OSPM code. The
debug version of the code includes the debug output trace
mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler
+these values will vary depending on the efficiency of the compiler
and the compiler options used during generation.
Previous Release:
@@ -3866,8 +4909,7 @@ Make it so acpismp=force works (reported by Andrew Morton)
1) ACPI CA Core Subsystem:
-Fix To/FromBCD, eliminating the need for an arch-specific
-#define.
+Fix To/FromBCD, eliminating the need for an arch-specific #define.
Do not acquire a semaphore in the S5 shutdown path.
@@ -3888,8 +4930,7 @@ Mention acpismp=force in config help
Re-add acpitable.c and acpismp=force. This improves backwards
-compatibility and also cleans up the code to a significant
-degree.
+compatibility and also cleans up the code to a significant degree.
Add ASUS Value-add driver (Karol Kozimor and Julien Lerouge)
@@ -3901,25 +4942,21 @@ Add ASUS Value-add driver (Karol Kozimor and Julien Lerouge)
Found and fixed a reported problem where an AE_NOT_FOUND error
occurred occasionally during _BST evaluation. This turned out to
be an Owner ID allocation issue where a called method did not get
-a new ID assigned to it. Eventually, (after 64k calls), the
-Owner
-ID UINT16 would wraparound so that the ID would be the same as
-the
+a new ID assigned to it. Eventually, (after 64k calls), the Owner
+ID UINT16 would wraparound so that the ID would be the same as the
caller's and the called method would delete the caller's
namespace.
Implemented extended error reporting for control methods that are
aborted due to a run-time exception. Output includes the exact
-AML instruction that caused the method abort, a dump of the
-method
+AML instruction that caused the method abort, a dump of the method
locals and arguments at the time of the abort, and a trace of all
nested control method calls.
Modified the interpreter to allow the creation of buffers of zero
length from the AML code. Implemented new code to ensure that no
attempt is made to actually allocate a memory buffer (of length
-zero) - instead, a simple buffer object with a NULL buffer
-pointer
+zero) - instead, a simple buffer object with a NULL buffer pointer
and length zero is created. A warning is no longer issued when
the AML attempts to create a zero-length buffer.
@@ -3929,10 +4966,8 @@ asterisk is automatically removed if present in any HID, UID, or
CID strings. The iASL compiler will still flag this asterisk as
an error, however.
-Implemented full support for _CID methods that return a package
-of
-multiple CIDs (Compatible IDs). The AcpiGetObjectInfo()
-interface
+Implemented full support for _CID methods that return a package of
+multiple CIDs (Compatible IDs). The AcpiGetObjectInfo() interface
now additionally returns a device _CID list if present. This
required a change to the external interface in order to pass an
ACPI_BUFFER object as a parameter since the _CID list is of
@@ -3947,8 +4982,7 @@ acpica.lib produced by the Microsoft Visual C++ 6.0 compiler, and
these values do not include any ACPI driver or OSPM code. The
debug version of the code includes the debug output trace
mechanism and has a much larger code and data size. Note that
-these values will vary depending on the efficiency of the
-compiler
+these values will vary depending on the efficiency of the compiler
and the compiler options used during generation.
Previous Release (20030509):
@@ -3962,8 +4996,7 @@ and the compiler options used during generation.
2) Linux:
Fixed a bug in which we would reinitialize the ACPI interrupt
-after it was already working, thus disabling all ACPI and the
-IRQs
+after it was already working, thus disabling all ACPI and the IRQs
for any other device sharing the interrupt. (Thanks to Stian
Jordet)
@@ -3983,8 +5016,7 @@ in both the ASL parser and the code generator.
4) Documentation:
-Added changes to existing interfaces, new exception codes, and
-new
+Added changes to existing interfaces, new exception codes, and new
text concerning reference count object management versus garbage
collection.
@@ -3995,17 +5027,13 @@ collection.
1) ACPI CA Core Subsystem:
Changed the subsystem initialization sequence to hold off
-installation of address space handlers until the hardware has
-been
-initialized and the system has entered ACPI mode. This is
-because
+installation of address space handlers until the hardware has been
+initialized and the system has entered ACPI mode. This is because
the installation of space handlers can cause _REG methods to be
-run. Previously, the _REG methods could potentially be run
-before
+run. Previously, the _REG methods could potentially be run before
ACPI mode was enabled.
-Fixed some memory leak issues related to address space handler
-and
+Fixed some memory leak issues related to address space handler and
notify handler installation. There were some problems with the
reference count mechanism caused by the fact that the handler
objects are shared across several namespace objects.
@@ -4019,8 +5047,7 @@ issue during subsystem termination. Restructured the table data
structures to simplify the linked lists and the related code.
Fixed a problem where the table ID associated with secondary
-tables (SSDTs) was not being propagated into the namespace
-objects
+tables (SSDTs) was not being propagated into the namespace objects
created by those tables. This would only present a problem for
tables that are unloaded at run-time, however.
@@ -4038,14 +5065,12 @@ was incorrectly handling the case where a namespace node was the
first in the parent's child list, and had additional peers (not
the only child, but first in the list of children.)
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
version of the code includes the debug output trace mechanism and
-has a much larger code and data size. Note that these values
-will
+has a much larger code and data size. Note that these values will
vary depending on the efficiency of the compiler and the compiler
options used during generation.
@@ -4068,8 +5093,7 @@ Kobject fix (Greg KH)
Fixed a problem in the generation of the C source code files (AML
is emitted in C source statements for BIOS inclusion) where the
-Ascii dump that appears within a C comment at the end of each
-line
+Ascii dump that appears within a C comment at the end of each line
could cause a compile time error if the AML sequence happens to
have an open comment or close comment sequence embedded.
@@ -4081,15 +5105,13 @@ have an open comment or close comment sequence embedded.
1) ACPI CA Core Subsystem:
Support for big-endian systems has been implemented. Most of the
-support has been invisibly added behind big-endian versions of
-the
+support has been invisibly added behind big-endian versions of the
ACPI_MOVE_* macros.
Fixed a problem in AcpiHwDisableGpeBlock() and
AcpiHwClearGpeBlock() where an incorrect offset was passed to the
low level hardware write routine. The offset parameter was
-actually eliminated from the low level read/write routines
-because
+actually eliminated from the low level read/write routines because
they had become obsolete.
Fixed a problem where a handler object was deleted twice during
@@ -4103,8 +5125,7 @@ A fix for SMP systems with link devices was contributed by
Compaq's Dan Zink.
(2.5) Return whether we handled the interrupt in our IRQ handler.
-(Linux ISRs no longer return void, so we can propagate the
-handler
+(Linux ISRs no longer return void, so we can propagate the handler
return value from the ACPI CA core back to the OS.)
@@ -4129,14 +5150,12 @@ Fixed a problem where the error message "Failed to acquire
semaphore" would appear during operations on the embedded
controller (EC).
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
version of the code includes the debug output trace mechanism and
-has a much larger code and data size. Note that these values
-will
+has a much larger code and data size. Note that these values will
vary depending on the efficiency of the compiler and the compiler
options used during generation.
@@ -4163,11 +5182,9 @@ added, evgpeblk.c
The FADT fields GPE0_BLK_LEN and GPE1_BLK_LEN are now the only
fields that are used to determine the GPE block lengths. The
REGISTER_BIT_WIDTH field of the X_GPEx_BLK extended address
-structures are ignored. This is per the ACPI specification but
-it
+structures are ignored. This is per the ACPI specification but it
isn't very clear. The full 256 Block 0/1 GPEs are now supported
-(the use of REGISTER_BIT_WIDTH limited the number of GPEs to
-128).
+(the use of REGISTER_BIT_WIDTH limited the number of GPEs to 128).
In the SCI interrupt handler, removed the read of the PM1_CONTROL
register to look at the SCI_EN bit. On some machines, this read
@@ -4175,8 +5192,7 @@ causes an SMI event and greatly slows down SCI events. (This may
in fact be the cause of slow battery status response on some
systems.)
-Fixed a problem where a store of a NULL string to a package
-object
+Fixed a problem where a store of a NULL string to a package object
could cause the premature deletion of the object. This was seen
during execution of the battery _BIF method on some systems,
resulting in no battery data being returned.
@@ -4184,14 +5200,12 @@ resulting in no battery data being returned.
Added AcpiWalkResources interface to simplify parsing of resource
lists.
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
version of the code includes the debug output trace mechanism and
-has a much larger code and data size. Note that these values
-will
+has a much larger code and data size. Note that these values will
vary depending on the efficiency of the compiler and the compiler
options used during generation.
@@ -4214,8 +5228,7 @@ Add S4BIOS support (Pavel Machek)
Map in entire table before performing checksum (John Stultz)
-Expand the mem= cmdline to allow the specification of reserved
-and
+Expand the mem= cmdline to allow the specification of reserved and
ACPI DATA blocks (Pavel Machek)
Never use ACPI on VISWS
@@ -4246,8 +5259,7 @@ Added support for the _PDC reserved name.
Added a check for constructs of the form: Store (Local0, Local0)
where Local0 is not initialized. Apparently, some BIOS
-programmers believe that this is a NOOP. Since this store
-doesn't
+programmers believe that this is a NOOP. Since this store doesn't
do anything anyway, the new prototype behavior will ignore this
error. This is a case where we can relax the strict checking in
the interpreter in the name of compatibility.
@@ -4257,8 +5269,7 @@ the interpreter in the name of compatibility.
The AcpiSrc Source Conversion Utility has been released with the
Linux package for the first time. This is the utility that is
-used to convert the ACPI CA base source code to the Linux
-version.
+used to convert the ACPI CA base source code to the Linux version.
(Both) Handle P_BLK lengths shorter than 6 more gracefully
@@ -4273,12 +5284,10 @@ header.
(Both) acpiphp.h includes both linux/acpi.h and acpi_bus.h. Since
the
-former now also includes the latter, acpiphp.h only needs the
-one,
+former now also includes the latter, acpiphp.h only needs the one,
now.
-(2.5) Make it possible to select method of bios restoring after
-S3
+(2.5) Make it possible to select method of bios restoring after S3
resume. [=> no more ugly ifdefs] (Pavel Machek)
(2.5) Make proc write interfaces work (Pavel Machek)
@@ -4308,17 +5317,13 @@ available.
1) ACPI CA Core Subsystem:
Changed the behavior of the internal Buffer-to-String conversion
-function. The current ACPI specification states that the
-contents
+function. The current ACPI specification states that the contents
of the buffer are "converted to a string of two-character
hexadecimal numbers, each separated by a space". Unfortunately,
-this definition is not backwards compatible with existing ACPI
-1.0
-implementations (although the behavior was not defined in the
-ACPI
+this definition is not backwards compatible with existing ACPI 1.0
+implementations (although the behavior was not defined in the ACPI
1.0 specification). The new behavior simply copies data from the
-buffer to the string until a null character is found or the end
-of
+buffer to the string until a null character is found or the end of
the buffer is reached. The new String object is always null
terminated. This problem was seen during the generation of _BIF
battery data where incorrect strings were returned for battery
@@ -4331,14 +5336,12 @@ ACPI_NATIVE_UINT and ACPI_NATIVE_INT, respectively.
Copyright in all module headers (both Linux and non-Linux) has be
updated to 2003.
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
version of the code includes the debug output trace mechanism and
-has a much larger code and data size. Note that these values
-will
+has a much larger code and data size. Note that these values will
vary depending on the efficiency of the compiler and the compiler
options used during generation.
@@ -4400,8 +5403,7 @@ readability and maintainability.
Fixed a problem where the creation of a zero-length AML Buffer
would cause a fault.
-Fixed a problem where a Buffer object that pointed to a static
-AML
+Fixed a problem where a Buffer object that pointed to a static AML
buffer (in an ACPI table) could inadvertently be deleted, causing
memory corruption.
@@ -4416,14 +5418,12 @@ of the input Buffer object.
Removed the NATIVE_CHAR data type across the entire source due to
lack of need and lack of consistent use.
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
version of the code includes the debug output trace mechanism and
-has a much larger code and data size. Note that these values
-will
+has a much larger code and data size. Note that these values will
vary depending on the efficiency of the compiler and the compiler
options used during generation.
@@ -4447,8 +5447,7 @@ being stored was equal to or smaller than the original (existing)
target object. This was seen to cause corruption of battery _BIF
buffers if the _BIF method modified the buffer on the fly.
-Fixed a problem where an internal error was generated if a
-control
+Fixed a problem where an internal error was generated if a control
method invocation was used in an OperationRegion, Buffer, or
Package declaration. This was caused by the deferred parsing of
the control method and thus the deferred creation of the internal
@@ -4460,14 +5459,12 @@ parse the method invocation. This problem presented itself as an
AE_AML_INTERNAL during the pass 1 parse phase during table load.
Fixed a problem where the internal String object copy routine did
-not always allocate sufficient memory for the target String
-object
+not always allocate sufficient memory for the target String object
and caused memory corruption. This problem was seen to cause
"Allocation already present in list!" errors as memory allocation
became corrupted.
-Implemented a new function for the evaluation of namespace
-objects
+Implemented a new function for the evaluation of namespace objects
that allows the specification of the allowable return object
types. This simplifies a lot of code that checks for a return
object of one or more specific objects returned from the
@@ -4482,19 +5479,16 @@ linking for iASL compiler and AcpiExec. Several files were split
creating new files. New files: nsparse.c dsinit.c evgpe.c
Implemented an abort mechanism to terminate an executing control
-method via the AML debugger. This feature is useful for
-debugging
+method via the AML debugger. This feature is useful for debugging
control methods that depend (wait) for specific hardware
responses.
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
version of the code includes the debug output trace mechanism and
-has a much larger code and data size. Note that these values
-will
+has a much larger code and data size. Note that these values will
vary depending on the efficiency of the compiler and the compiler
options used during generation.
@@ -4514,8 +5508,7 @@ Source Index" and "Resource Source" fields were not inserted into
the correct location within the AML resource descriptor, creating
an invalid descriptor.
-Fixed a disassembler problem for "Interrupt" resource
-descriptors.
+Fixed a disassembler problem for "Interrupt" resource descriptors.
The optional "Resource Source Index" and "Resource Source" fields
were ignored.
@@ -4538,8 +5531,7 @@ was not completed properly if the Local/Arg contained a reference
namespace-node code is now used so that this case is handled
automatically.
-Fixed a problem where the internal object copy routine would
-cause
+Fixed a problem where the internal object copy routine would cause
a protection fault if the object being copied was a Package and
contained either 1) a NULL package element or 2) a nested sub-
package.
@@ -4547,23 +5539,19 @@ package.
Fixed a problem with the GPE initialization that resulted from an
ambiguity in the ACPI specification. One section of the
specification states that both the address and length of the GPE
-block must be zero if the block is not supported. Another
-section
+block must be zero if the block is not supported. Another section
implies that only the address need be zero if the block is not
-supported. The code has been changed so that both the address
-and
+supported. The code has been changed so that both the address and
the length must be non-zero to indicate a valid GPE block (i.e.,
if either the address or the length is zero, the GPE block is
invalid.)
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
version of the code includes the debug output trace mechanism and
-has a much larger code and data size. Note that these values
-will
+has a much larger code and data size. Note that these values will
vary depending on the efficiency of the compiler and the compiler
options used during generation.
@@ -4616,33 +5604,28 @@ twice during execution of the CondRefOf() operator if the target
did not exist.
Implemented the first of perhaps several internal create object
-functions that create and initialize a specific object type.
-This
+functions that create and initialize a specific object type. This
consolidates duplicated code wherever the object is created, thus
shrinking the size of the subsystem.
Implemented improved debug/error messages for errors that occur
during nested method invocations. All executing method pathnames
-are displayed (with the error) as the call stack is unwound -
-thus
+are displayed (with the error) as the call stack is unwound - thus
simplifying debug.
Fixed a problem introduced in the 10/02 release that caused
premature deletion of a buffer object if a buffer was used as an
ASL operand where an integer operand is required (Thus causing an
-implicit object conversion from Buffer to Integer.) The change
-in
+implicit object conversion from Buffer to Integer.) The change in
the 10/02 release was attempting to fix a memory leak (albeit
incorrectly.)
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
version of the code includes the debug output trace mechanism and
-has a much larger code and data size. Note that these values
-will
+has a much larger code and data size. Note that these values will
vary depending on the efficiency of the compiler and the compiler
options used during generation.
@@ -4662,8 +5645,7 @@ execution of ACPI control methods not be interrupted by signals.
Methods must run to completion, or the system may be left in an
unknown/unstable state.
-Fixed a compilation error when CONFIG_SOFTWARE_SUSPEND is not
-set.
+Fixed a compilation error when CONFIG_SOFTWARE_SUSPEND is not set.
(Shawn Starr)
@@ -4700,18 +5682,15 @@ defined as 32 bits, but must be 16 bits according to the ACPI
specification. This had the side effect of causing ASL
Mutex/Event timeouts even though the ASL code requested a wait
forever. Changed all internal references to the ACPI timeout
-parameter to 16 bits to prevent future problems. Changed the
-name
+parameter to 16 bits to prevent future problems. Changed the name
of WAIT_FOREVER to ACPI_WAIT_FOREVER.
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
version of the code includes the debug output trace mechanism and
-has a much larger code and data size. Note that these values
-will
+has a much larger code and data size. Note that these values will
vary depending on the efficiency of the compiler and the compiler
options used during generation.
@@ -4741,8 +5720,7 @@ keywords (SMBQuick, SMBWord, etc.)
1) ACPI CA Core Subsystem:
-Fixed a problem where platforms that have a GPE1 block but no
-GPE0
+Fixed a problem where platforms that have a GPE1 block but no GPE0
block were not handled correctly. This resulted in a "GPE
overlap" error message. GPE0 is no longer required.
@@ -4758,22 +5736,19 @@ found during control method execution. The full ACPI namepath
(name reference) of the object that was not found is displayed in
this case.
-Note: as a result of the overhaul of the namespace object types
-in
+Note: as a result of the overhaul of the namespace object types in
the previous release, the namespace nodes for the predefined
scopes (_TZ, _PR, etc.) are now of the type ACPI_TYPE_LOCAL_SCOPE
instead of ACPI_TYPE_ANY. This simplifies the namespace
management code but may affect code that walks the namespace tree
looking for specific object types.
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
version of the code includes the debug output trace mechanism and
-has a much larger code and data size. Note that these values
-will
+has a much larger code and data size. Note that these values will
vary depending on the efficiency of the compiler and the compiler
options used during generation.
@@ -4788,18 +5763,15 @@ options used during generation.
2) Linux
Fixed a problem introduced in the previous release where the
-Processor and Thermal objects were not recognized and installed
-in
-/proc. This was related to the scope type change described
-above.
+Processor and Thermal objects were not recognized and installed in
+/proc. This was related to the scope type change described above.
3) iASL Compiler/Disassembler
Implemented the -g option to get all of the required ACPI tables
from the registry and save them to files (Windows version of the
-compiler only.) The required tables are the FADT, FACS, and
-DSDT.
+compiler only.) The required tables are the FADT, FACS, and DSDT.
Added ACPI table checksum validation during table disassembly in
order to catch corrupted tables.
@@ -4815,8 +5787,7 @@ must already exist in the namespace at the time the operator is
encountered (during table load or method execution). In other
words, forward references are not allowed and Scope() cannot
create a new object. This changes the previous behavior where the
-interpreter would create the name if not found. This new
-behavior
+interpreter would create the name if not found. This new behavior
correctly enables the search-to-root algorithm during namespace
lookup of the target name. Because of this upsearch, this fixes
the known Compaq _SB_.OKEC problem and makes both the AML
@@ -4839,8 +5810,7 @@ problems.
Cleaned up the namespace dump code, removed obsolete code.
All string output (for all namespace/object dumps) now uses the
-common ACPI string output procedure which handles escapes
-properly
+common ACPI string output procedure which handles escapes properly
and does not emit non-printable characters.
Fixed some issues with constants in the 64-bit version of the
@@ -4855,28 +5825,22 @@ interrupt level.
3) iASL Compiler/Disassembler
-Implemented ACPI 2.0B grammar change that disallows all Type 1
-and
+Implemented ACPI 2.0B grammar change that disallows all Type 1 and
2 opcodes outside of a control method. This means that the
"executable" operators (versus the "namespace" operators) cannot
-be used at the table level; they can only be used within a
-control
+be used at the table level; they can only be used within a control
method.
Implemented the restriction on the Scope() operator where the
target must already exist in the namespace at the time the
operator is encountered (during ASL compilation). In other words,
-forward references are not allowed and Scope() cannot create a
-new
+forward references are not allowed and Scope() cannot create a new
object. This makes the iASL compiler compatible with other ACPI
-implementations and makes the Scope() implementation adhere to
-the
+implementations and makes the Scope() implementation adhere to the
ACPI specification.
-Fixed a problem where namepath optimization for the Alias
-operator
-was optimizing the wrong path (of the two namepaths.) This
-caused
+Fixed a problem where namepath optimization for the Alias operator
+was optimizing the wrong path (of the two namepaths.) This caused
a "Missing alias link" error message.
Fixed a problem where an "unknown reserved name" warning could be
@@ -4896,52 +5860,40 @@ the NamePath was examined instead of the last NameSeg.
1) ACPI CA Core Subsystem version 20021002:
Fixed a problem where a store/copy of a string to an existing
-string did not always set the string length properly in the
-String
+string did not always set the string length properly in the String
object.
Fixed a reported problem with the ToString operator where the
-behavior was identical to the ToHexString operator instead of
-just
+behavior was identical to the ToHexString operator instead of just
simply converting a raw buffer to a string data type.
Fixed a problem where CopyObject and the other "explicit"
-conversion operators were not updating the internal namespace
-node
+conversion operators were not updating the internal namespace node
type as part of the store operation.
Fixed a memory leak during implicit source operand conversion
-where the original object was not deleted if it was converted to
-a
+where the original object was not deleted if it was converted to a
new object of a different type.
-Enhanced error messages for all problems associated with
-namespace
-lookups. Common procedure generates and prints the lookup name
-as
+Enhanced error messages for all problems associated with namespace
+lookups. Common procedure generates and prints the lookup name as
well as the formatted status.
Completed implementation of a new design for the Alias support
-within the namespace. The existing design did not handle the
-case
-where a new object was assigned to one of the two names due to
-the
-use of an explicit conversion operator, resulting in the two
-names
+within the namespace. The existing design did not handle the case
+where a new object was assigned to one of the two names due to the
+use of an explicit conversion operator, resulting in the two names
pointing to two different objects. The new design simply points
the Alias name to the original name node - not to the object.
-This results in a level of indirection that must be handled in
-the
+This results in a level of indirection that must be handled in the
name resolution mechanism.
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
version of the code includes the debug output trace mechanism and
-has a larger code and data size. Note that these values will
-vary
+has a larger code and data size. Note that these values will vary
depending on the efficiency of the compiler and the compiler
options used during generation.
@@ -4984,8 +5936,7 @@ Clarified some warning/error messages.
1) ACPI CA Core Subsystem version 20020918:
Fixed a reported problem with reference chaining (via the Index()
-and RefOf() operators) in the ObjectType() and SizeOf()
-operators.
+and RefOf() operators) in the ObjectType() and SizeOf() operators.
The definition of these operators includes the dereferencing of
all chained references to return information on the base object.
@@ -5000,8 +5951,7 @@ target name to refer to an object of type Integer, String, or
Buffer, in addition to the scoping object types (Device,
predefined Scopes, Processor, PowerResource, and ThermalZone.)
This allows existing AML code that has workarounds for a bug in
-Windows to function properly. A warning is issued, however.
-This
+Windows to function properly. A warning is issued, however. This
affects both the AML interpreter and the iASL compiler. Below is
an example of this type of ASL code:
@@ -5048,8 +5998,7 @@ being dereferenced during typechecking.
If the target of a Scope() operator already exists, it must be an
object type that actually opens a scope -- such as a Device,
-Method, Scope, etc. This is a fatal runtime error. Similar
-error
+Method, Scope, etc. This is a fatal runtime error. Similar error
check has been added to the iASL compiler also.
Tightened up the namespace load to disallow multiple names in the
@@ -5068,8 +6017,7 @@ local_irq_disable is extraneous. (Matthew Wilcox)
Make "acpi=off" actually do what it says, and not use the ACPI
interpreter *or* the tables.
-Added arch-neutral support for parsing SLIT and SRAT tables
-(Kochi
+Added arch-neutral support for parsing SLIT and SRAT tables (Kochi
Takayoshi)
@@ -5093,8 +6041,7 @@ block below a Return() statement.
Fixed a problem where the listing file was not generated if the
compiler aborted if the maximum error count was exceeded (200).
-Fixed a problem where the typechecking of method return values
-was
+Fixed a problem where the typechecking of method return values was
broken. This includes the check for a return value when the
method is invoked as a TermArg (a return value is expected.)
@@ -5108,20 +6055,17 @@ string or comment caused a fault.
1) ACPI CA Core Subsystem Version 20020815:
Fixed a reported problem where a Store to a method argument that
-contains a reference did not perform the indirect store
-correctly.
+contains a reference did not perform the indirect store correctly.
This problem was created during the conversion to the new
reference object model - the indirect store to a method argument
code was not updated to reflect the new model.
Reworked the ACPI mode change code to better conform to ACPI 2.0,
-handle corner cases, and improve code legibility (Kochi
-Takayoshi)
+handle corner cases, and improve code legibility (Kochi Takayoshi)
Fixed a problem with the pathname parsing for the carat (^)
prefix. The heavy use of the carat operator by the new namepath
-optimization in the iASL compiler uncovered a problem with the
-AML
+optimization in the iASL compiler uncovered a problem with the AML
interpreter handling of this prefix. In the case where one or
more carats precede a single nameseg, the nameseg was treated as
standalone and the search rule (to root) was inadvertently
@@ -5130,22 +6074,18 @@ interpreter to find the wrong object or to miss the error that
should occur if the object does not exist at that exact pathname.
Found and fixed the problem where the HP Pavilion DSDT would not
-load. This was a relatively minor tweak to the table loading
-code
+load. This was a relatively minor tweak to the table loading code
(a problem caused by the unexpected encounter with a method
-invocation not within a control method), but it does not solve
-the
+invocation not within a control method), but it does not solve the
overall issue of the execution of AML code at the table level.
This investigation is still ongoing.
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
version of the code includes the debug output trace mechanism and
-has a larger code and data size. Note that these values will
-vary
+has a larger code and data size. Note that these values will vary
depending on the efficiency of the compiler and the compiler
options used during generation.
@@ -5185,8 +6125,7 @@ current options list by invoking the compiler with no parameters.
Completed the design and implementation of the ASL namepath
optimization option for the compiler. This option optimizes all
references to named objects to the shortest possible path. The
-first attempt tries to utilize a single nameseg (4 characters)
-and
+first attempt tries to utilize a single nameseg (4 characters) and
the "search-to-root" algorithm used by the interpreter. If that
cannot be used (because either the name is not in the search path
or there is a conflict with another object with the same name),
@@ -5203,16 +6142,14 @@ independent.
Implemented a new option to disassemble and compile in one step.
When used without an input filename, this option will grab the
-DSDT from the local machine, disassemble it, and compile it in
-one
+DSDT from the local machine, disassemble it, and compile it in one
step.
Added a warning message for invalid escapes (a backslash followed
by any character other than the allowable escapes). This catches
the quoted string error "\_SB_" (which should be "\\_SB_" ).
-Also, there are numerous instances in the ACPI specification
-where
+Also, there are numerous instances in the ACPI specification where
this error occurs.
Added a compiler option to disable all optimizations. This is
@@ -5232,8 +6169,7 @@ the disassembler must know the number of arguments.)
Added an "optimization" message type that is optional (off by
default). This message is used for all optimizations - including
-constant folding, integer optimization, and namepath
-optimization.
+constant folding, integer optimization, and namepath optimization.
----------------------------------------
25 July 2002. Summary of changes for this release.
@@ -5242,8 +6178,7 @@ optimization.
1) ACPI CA Core Subsystem Version 20020725:
The AML Disassembler has been enhanced to produce compilable ASL
-code and has been integrated into the iASL compiler (see below)
-as
+code and has been integrated into the iASL compiler (see below) as
well as the single-step disassembly for the AML debugger and the
disassembler for the AcpiDump utility. All ACPI 2.0A opcodes,
resource templates and macros are fully supported. The
@@ -5259,14 +6194,12 @@ Added the AcpiOsRedirectOutput interface to the OSL to simplify
output redirection for the AcpiOsPrintf and AcpiOsVprintf
interfaces.
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
version of the code includes the debug output trace mechanism and
-has a larger code and data size. Note that these values will
-vary
+has a larger code and data size. Note that these values will vary
depending on the efficiency of the compiler and the compiler
options used during generation.
@@ -5303,8 +6236,7 @@ inadvertently defined twice, allowing invalid syntax to pass and
causing reduction conflicts.
Fixed a problem where the Ones opcode could get converted to a
-value of zero if "Ones" was used where a byte, word or dword
-value
+value of zero if "Ones" was used where a byte, word or dword value
was expected. The 64-bit value is now truncated to the correct
size with the correct value.
@@ -5319,16 +6251,14 @@ size with the correct value.
The Table Manager code has been restructured to add several new
features. Tables that are not required by the core subsystem
(other than the FADT, DSDT, FACS, PSDTs, etc.) are no longer
-validated in any way and are returned from AcpiGetFirmwareTable
-if
+validated in any way and are returned from AcpiGetFirmwareTable if
requested. The AcpiOsTableOverride interface is now called for
each table that is loaded by the subsystem in order to allow the
host to override any table it chooses. Previously, only the DSDT
could be overridden. Added one new files, tbrsdt.c and
tbgetall.c.
-Fixed a problem with the conversion of internal package objects
-to
+Fixed a problem with the conversion of internal package objects to
external objects (when a package is returned from a control
method.) The return buffer length was set to zero instead of the
proper length of the package object.
@@ -5338,13 +6268,11 @@ operators when passing reference arguments to control methods. A
new type of Reference object is used internally for references
produced by the RefOf operator.
-Added additional error messages in the Resource Manager to
-explain
+Added additional error messages in the Resource Manager to explain
AE_BAD_DATA errors when they occur during resource parsing.
Split the AcpiEnableSubsystem into two primitives to enable a
-finer granularity initialization sequence. These two calls
-should
+finer granularity initialization sequence. These two calls should
be called in this order: AcpiEnableSubsystem (flags),
AcpiInitializeObjects (flags). The flags parameter remains the
same.
@@ -5353,8 +6281,7 @@ same.
2) Linux
Updated the ACPI utilities module to understand the new style of
-fully resolved package objects that are now returned from the
-core
+fully resolved package objects that are now returned from the core
subsystem. This eliminates errors of the form:
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PPB_._PRT]
@@ -5379,8 +6306,7 @@ Eliminated the acpi_evaluate() helper function in utils.c. It is
no longer needed since acpi_evaluate_object can optionally
allocate memory for the return object.
-Implemented fix for keyboard hang when getting battery readings
-on
+Implemented fix for keyboard hang when getting battery readings on
some systems (Stephen White)
PCI IRQ routing update (Dominik Brodowski)
@@ -5398,14 +6324,12 @@ Fixed a reported problem where constants such as Zero and One
appearing within _PRT packages were not handled correctly within
the resource manager code. Originally reported against the ASL
compiler because the code generator now optimizes integers to
-their minimal AML representation (i.e. AML constants if
-possible.)
+their minimal AML representation (i.e. AML constants if possible.)
The _PRT code now handles all AML constant opcodes correctly
(Zero, One, Ones, Revision).
Fixed a problem with the Concatenate operator in the AML
-interpreter where a buffer result object was incorrectly marked
-as
+interpreter where a buffer result object was incorrectly marked as
not fully evaluated, causing a run-time error of AE_AML_INTERNAL.
All package sub-objects are now fully resolved before they are
@@ -5418,21 +6342,17 @@ Implemented immediate resolution of the AML Constant opcodes
within the AML stream. This has simplified and reduced the
generated code size of the subsystem by eliminating about 10
switch statements for these constants (which previously were
-contained in Reference objects.) The complicating issues are
-that
+contained in Reference objects.) The complicating issues are that
the Zero opcode is used as a "placeholder" for unspecified
-optional target operands and stores to constants are defined to
-be
+optional target operands and stores to constants are defined to be
no-ops.
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
version of the code includes the debug output trace mechanism and
-has a larger code and data size. Note that these values will
-vary
+has a larger code and data size. Note that these values will vary
depending on the efficiency of the compiler and the compiler
options used during generation.
@@ -5453,8 +6373,7 @@ bridges (Bjorn Helgaas).
3) iASL Compiler Version X2046:
-Fixed a problem where the "_DDN" reserved name was defined to be
-a
+Fixed a problem where the "_DDN" reserved name was defined to be a
control method with one argument. There are no arguments, and
_DDN does not have to be a control method.
@@ -5469,8 +6388,7 @@ names within error messages were wrong. This was caused by a
slight difference in the output of the Flex tool on Linux versus
Windows.
-Fixed a problem with the Linux compiler where the hex output
-files
+Fixed a problem with the Linux compiler where the hex output files
contained some garbage data caused by an internal buffer overrun.
@@ -5482,8 +6400,7 @@ contained some garbage data caused by an internal buffer overrun.
Implemented a workaround to an BIOS bug discovered on the HP
OmniBook where the FADT revision number and the table size are
-inconsistent (ACPI 2.0 revision vs. ACPI 1.0 table size). The
-new
+inconsistent (ACPI 2.0 revision vs. ACPI 1.0 table size). The new
behavior is to fallback to using only the ACPI 1.0 fields of the
FADT if the table is too small to be a ACPI 2.0 table as claimed
by the revision number. Although this is a BIOS bug, this is a
@@ -5491,8 +6408,7 @@ case where the workaround is simple enough and with no side
effects, so it seemed prudent to add it. A warning message is
issued, however.
-Implemented minimum size checks for the fixed-length ACPI tables
--
+Implemented minimum size checks for the fixed-length ACPI tables -
- the FADT and FACS, as well as consistency checks between the
revision number and the table size.
@@ -5503,19 +6419,16 @@ instead of a logical address.
Eliminated the use of the AE_AML_ERROR exception and replaced it
with more descriptive codes.
-Fixed a problem where an exception would occur if an ASL Field
-was
+Fixed a problem where an exception would occur if an ASL Field was
defined with no named Field Units underneath it (used by some
index fields).
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
version of the code includes the debug output trace mechanism and
-has a larger code and data size. Note that these values will
-vary
+has a larger code and data size. Note that these values will vary
depending on the efficiency of the compiler and the compiler
options used during generation.
@@ -5547,10 +6460,8 @@ Moved arch-specific code out of include/platform/aclinux.h
3) iASL Compiler Version X2044:
-Implemented error checking for the string used in the EISAID
-macro
-(Usually used in the definition of the _HID object.) The code
-now
+Implemented error checking for the string used in the EISAID macro
+(Usually used in the definition of the _HID object.) The code now
strictly enforces the PnP format - exactly 7 characters, 3
uppercase letters and 4 hex digits.
@@ -5569,11 +6480,9 @@ error if a reserved name that must be implemented in ASL as a
control method is used. We know that a reserved name must be a
method if it is defined with input arguments.
-The warning emitted when a namespace object reference is not
-found
+The warning emitted when a namespace object reference is not found
during the cross reference phase has been changed into an error.
-The "External" directive should be used for names defined in
-other
+The "External" directive should be used for names defined in other
modules.
@@ -5582,8 +6491,7 @@ modules.
The 16-bit tools (adump16 and aexec16) have been regenerated and
tested.
-Fixed a problem with the output of both acpidump and adump16
-where
+Fixed a problem with the output of both acpidump and adump16 where
the indentation of closing parentheses and brackets was not
aligned properly with the parent block.
@@ -5598,8 +6506,7 @@ aligned properly with the parent block.
Added support a new OSL interface that allows the host operating
system software to override the DSDT found in the firmware -
-AcpiOsTableOverride. With this interface, the OSL can examine
-the
+AcpiOsTableOverride. With this interface, the OSL can examine the
version of the firmware DSDT and replace it with a different one
if desired.
@@ -5615,14 +6522,12 @@ ASL/AML CreateField operator always returned an error,
Extended the maximum time (before failure) to successfully enable
ACPI mode to 3 seconds.
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
version of the code includes the debug output trace mechanism and
-has a larger code and data size. Note that these values will
-vary
+has a larger code and data size. Note that these values will vary
depending on the efficiency of the compiler and the compiler
options used during generation.
@@ -5637,8 +6542,7 @@ options used during generation.
2) Linux
Enhanced ACPI init code for SMP. We are now fully MPS and $PIR-
-free. While 3 out of 4 of our in-house systems work fine, the
-last
+free. While 3 out of 4 of our in-house systems work fine, the last
one still hangs when testing the LAPIC timer.
Renamed many files in 2.5 kernel release to omit "acpi_" from the
@@ -5680,8 +6584,7 @@ Ones opcodes where possible to further reduce the size of integer
constants and thus reduce the overall size of the generated AML
code.
-Implemented error checking for new reserved terms for ACPI
-version
+Implemented error checking for new reserved terms for ACPI version
2.0A.
Implemented the -qr option to display the current list of ACPI
@@ -5689,14 +6592,12 @@ reserved names known to the compiler.
Implemented the -qc option to display the current list of ASL
operators that are allowed within constant expressions and can
-therefore be folded at compile time if the operands are
-constants.
+therefore be folded at compile time if the operands are constants.
4) Documentation
-Updated the Programmer's Reference for new interfaces, data
-types,
+Updated the Programmer's Reference for new interfaces, data types,
and memory allocation model options.
Updated the iASL Compiler User Reference to apply new format and
@@ -5730,20 +6631,16 @@ Fixed a problem where NULL extended fields (X fields) in an ACPI
2.0 ACPI FADT caused the table load to fail. Although the
existing ACPI specification is a bit fuzzy on this topic, the new
behavior is to fall back on a ACPI 1.0 field if the corresponding
-ACPI 2.0 X field is zero (even though the table revision
-indicates
-a full ACPI 2.0 table.) The ACPI specification will be updated
-to
+ACPI 2.0 X field is zero (even though the table revision indicates
+a full ACPI 2.0 table.) The ACPI specification will be updated to
clarify this issue.
Fixed a problem with the SystemMemory operation region handler
where memory was always accessed byte-wise even if the AML-
specified access width was larger than a byte. This caused
problems on systems with memory-mapped I/O. Memory is now
-accessed with the width specified. On systems that do not
-support
-non-aligned transfers, a check is made to guarantee proper
-address
+accessed with the width specified. On systems that do not support
+non-aligned transfers, a check is made to guarantee proper address
alignment before proceeding in order to avoid an AML-caused
alignment fault within the kernel.
@@ -5754,14 +6651,12 @@ of the 4-byte Irq field was extracted.
Fixed the AcpiExDigitsNeeded() procedure to support _UID. This
function was out of date and required a rewrite.
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
version of the code includes the debug output trace mechanism and
-has a larger code and data size. Note that these values will
-vary
+has a larger code and data size. Note that these values will vary
depending on the efficiency of the compiler and the compiler
options used during generation.
@@ -5796,16 +6691,13 @@ Summary of changes for this release: 03_29_02
1) ACPI CA Core Subsystem Version 20020329:
Implemented support for late evaluation of TermArg operands to
-Buffer and Package objects. This allows complex expressions to
-be
+Buffer and Package objects. This allows complex expressions to be
used in the declarations of these object types.
-Fixed an ACPI 1.0 compatibility issue when reading Fields. In
-ACPI
+Fixed an ACPI 1.0 compatibility issue when reading Fields. In ACPI
1.0, if the field was larger than 32 bits, it was returned as a
buffer - otherwise it was returned as an integer. In ACPI 2.0,
-the field is returned as a buffer only if the field is larger
-than
+the field is returned as a buffer only if the field is larger than
64 bits. The TableRevision is now considered when making this
conversion to avoid incompatibility with existing ASL code.
@@ -5817,10 +6709,8 @@ support to allow a common data type for both physical and logical
pointers internally. This required a change to the
AcpiOsGetRootPointer interface.
-Implemented the use of ACPI 2.0 Generic Address Structures for
-all
-GPE, Fixed Event, and PM Timer I/O. This allows the use of
-memory
+Implemented the use of ACPI 2.0 Generic Address Structures for all
+GPE, Fixed Event, and PM Timer I/O. This allows the use of memory
mapped I/O for these ACPI features.
Initialization now ignores not only non-required tables (All
@@ -5834,17 +6724,14 @@ objects are now supported -- Devices, Processor, Power, and
Thermal.
Removed most verbosity from the ACPI_DB_INFO debug level. Only
-critical information is returned when this debug level is
-enabled.
+critical information is returned when this debug level is enabled.
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
version of the code includes the debug output trace mechanism and
-has a larger code and data size. Note that these values will
-vary
+has a larger code and data size. Note that these values will vary
depending on the efficiency of the compiler and the compiler
options used during generation.
@@ -5899,12 +6786,10 @@ Can now shut down the system using "magic sysrq" key.
Fixed a problem where conversion errors for hex/octal/decimal
constants were not reported.
-Implemented a fix for the General Register template Address
-field.
+Implemented a fix for the General Register template Address field.
This field was 8 bits when it should be 64.
-Fixed a problem where errors/warnings were no longer being
-emitted
+Fixed a problem where errors/warnings were no longer being emitted
within the listing output file.
Implemented the ACPI 2.0A restriction on ACPI Table Signatures to
@@ -5920,12 +6805,10 @@ Summary of changes for this release: 03_08_02
1) ACPI CA Core Subsystem Version 20020308:
Fixed a problem with AML Fields where the use of the "AccessAny"
-keyword could cause an interpreter error due to attempting to
-read
+keyword could cause an interpreter error due to attempting to read
or write beyond the end of the parent Operation Region.
-Fixed a problem in the SystemMemory Operation Region handler
-where
+Fixed a problem in the SystemMemory Operation Region handler where
an attempt was made to map memory beyond the end of the region.
This was the root cause of the "AE_ERROR" and "AE_NO_MEMORY"
errors on some Linux systems.
@@ -5938,11 +6821,9 @@ external object types as well as most internal types.
2) Linux:
-We now use safe_halt() macro versus individual calls to sti |
-hlt.
+We now use safe_halt() macro versus individual calls to sti | hlt.
-Writing to the processor limit interface should now work. "echo
-1"
+Writing to the processor limit interface should now work. "echo 1"
will increase the limit, 2 will decrease, and 0 will reset to the
default.
@@ -5962,8 +6843,7 @@ Summary of changes for this release: 02_25_02
Fixed a problem where the GPE bit masks were not initialized
properly, causing erratic GPE behavior.
-Implemented limited support for multiple calling conventions.
-The
+Implemented limited support for multiple calling conventions. The
code can be generated with either the VPL (variable parameter
list, or "C") convention, or the FPL (fixed parameter list, or
"Pascal") convention. The core subsystem is about 3.4% smaller
@@ -5975,12 +6855,10 @@ when generated with FPL.
Re-add some /proc/acpi/event functionality that was lost during
the rewrite
-Resolved issue with /proc events for fixed-feature buttons
-showing
+Resolved issue with /proc events for fixed-feature buttons showing
up as the system device.
-Fixed checks on C2/C3 latencies to be inclusive of maximum
-values.
+Fixed checks on C2/C3 latencies to be inclusive of maximum values.
Replaced AE_ERRORs in acpi_osl.c with more specific error codes.
@@ -6002,17 +6880,14 @@ Implemented support in AcpiLoadTable to allow loading of FACS and
FADT tables.
Suport for the now-obsolete interim 0.71 64-bit ACPI tables has
-been removed. All 64-bit platforms should be migrated to the
-ACPI
-2.0 tables. The actbl71.h header has been removed from the
-source
+been removed. All 64-bit platforms should be migrated to the ACPI
+2.0 tables. The actbl71.h header has been removed from the source
tree.
All C macros defined within the subsystem have been prefixed with
"ACPI_" to avoid collision with other system include files.
-Removed the return value for the two AcpiOsPrint interfaces,
-since
+Removed the return value for the two AcpiOsPrint interfaces, since
it is never used and causes lint warnings for ignoring the return
value.
@@ -6022,14 +6897,11 @@ probably a fatal system error, these checks will cause the
immediate abort of the currently executing method or interface.
Fixed a problem where the AcpiSetCurrentResources interface could
-fault. This was a side effect of the deployment of the new
-memory
+fault. This was a side effect of the deployment of the new memory
allocation model.
-Fixed a couple of problems with the Global Lock support
-introduced
-in the last major build. The "common" (1.0/2.0) internal FACS
-was
+Fixed a couple of problems with the Global Lock support introduced
+in the last major build. The "common" (1.0/2.0) internal FACS was
being overwritten with the FACS signature and clobbering the
Global Lock pointer. Also, the actual firmware FACS was being
unmapped after construction of the "common" FACS, preventing
@@ -6037,14 +6909,12 @@ access to the actual Global Lock field within it. The "common"
internal FACS is no longer installed as an actual ACPI table; it
is used simply as a global.
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
version of the code includes the debug output trace mechanism and
-has a larger code and data size. Note that these values will
-vary
+has a larger code and data size. Note that these values will vary
depending on the efficiency of the compiler and the compiler
options used during generation.
@@ -6066,8 +6936,7 @@ proper poll functionality.
Fixed and restructured power management (acpi_bus).
-Only create /proc "view by type" when devices of that class
-exist.
+Only create /proc "view by type" when devices of that class exist.
Fixed "charging/discharging" bug (and others) in acpi_battery.
@@ -6078,13 +6947,11 @@ Improved thermal zone code.
Implemented the new compiler restriction on ASL String hex/octal
-escapes to non-null, ASCII values. An error results if an
-invalid
+escapes to non-null, ASCII values. An error results if an invalid
value is used. (This will require an ACPI 2.0 specification
change.)
-AML object labels that are output to the optional C and ASM
-source
+AML object labels that are output to the optional C and ASM source
are now prefixed with both the ACPI table signature and table ID
to help guarantee uniqueness within a large BIOS project.
@@ -6097,8 +6964,7 @@ Summary of changes for this label: 02_01_02
ACPI 2.0 support is complete in the entire Core Subsystem and the
ASL compiler. All new ACPI 2.0 operators are implemented and all
other changes for ACPI 2.0 support are complete. With
-simultaneous code and data optimizations throughout the
-subsystem,
+simultaneous code and data optimizations throughout the subsystem,
ACPI 2.0 support has been implemented with almost no additional
cost in terms of code and data size.
@@ -6106,10 +6972,8 @@ Implemented a new mechanism for allocation of return buffers. If
the buffer length is set to ACPI_ALLOCATE_BUFFER, the buffer will
be allocated on behalf of the caller. Consolidated all return
buffer validation and allocation to a common procedure. Return
-buffers will be allocated via the primary OSL allocation
-interface
-since it appears that a separate pool is not needed by most
-users.
+buffers will be allocated via the primary OSL allocation interface
+since it appears that a separate pool is not needed by most users.
If a separate pool is required for these buffers, the caller can
still use the original mechanism and pre-allocate the buffer(s).
@@ -6126,8 +6990,7 @@ considerably.
Obsoleted the AcpiOsCallocate OSL interface. This interface was
used only a handful of times and didn't have enough critical mass
-for a separate interface. Replaced with a common calloc
-procedure
+for a separate interface. Replaced with a common calloc procedure
in the core.
Fixed a reported problem with the GPE number mapping mechanism
@@ -6156,33 +7019,27 @@ debugger.
Removed obsolete and unnecessary GPE save/restore code.
-Implemented Field support in the ASL Load operator. This allows
-a
+Implemented Field support in the ASL Load operator. This allows a
table to be loaded from a named field, in addition to loading a
table directly from an Operation Region.
-Implemented timeout and handle support in the external Global
-Lock
+Implemented timeout and handle support in the external Global Lock
interfaces.
Fixed a problem in the AcpiDump utility where pathnames were no
-longer being generated correctly during the dump of named
-objects.
+longer being generated correctly during the dump of named objects.
Modified the AML debugger to give a full display of if/while
predicates instead of just one AML opcode at a time. (The
-predicate can have several nested ASL statements.) The old
-method
+predicate can have several nested ASL statements.) The old method
was confusing during single stepping.
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
version of the code includes the debug output trace mechanism and
-has a larger code and data size. Note that these values will
-vary
+has a larger code and data size. Note that these values will vary
depending on the efficiency of the compiler and the compiler
options used during generation.
@@ -6214,13 +7071,10 @@ Menuconfig options redesigned
3) ASL Compiler, version X2037:
-Implemented several new output features to simplify integration
-of
+Implemented several new output features to simplify integration of
AML code into firmware: 1) Output the AML in C source code with
-labels for each named ASL object. The original ASL source
-code
-is interleaved as C comments. 2) Output the AML in ASM source
-code
+labels for each named ASL object. The original ASL source code
+is interleaved as C comments. 2) Output the AML in ASM source code
with labels and interleaved ASL source. 3) Output the AML in
raw hex table form, in either C or ASM.
@@ -6259,25 +7113,20 @@ Cleaned up busmgr /proc error handling (Andreas Dilger)
2) ACPI CA Core Subsystem:
-Implemented ACPI 2.0 semantics for the "Break" operator (Exit
-from
+Implemented ACPI 2.0 semantics for the "Break" operator (Exit from
while loop)
Completed implementation of the ACPI 2.0 "Continue",
"ConcatenateResTemplate", "DataTableRegion", and "LoadTable"
-operators. All new ACPI 2.0 operators are now implemented in
-both
-the ASL compiler and the AML interpreter. The only remaining
-ACPI
+operators. All new ACPI 2.0 operators are now implemented in both
+the ASL compiler and the AML interpreter. The only remaining ACPI
2.0 task is support for the String data type in the DerefOf
-operator. Fixed a problem with AcquireMutex where the status
-code
+operator. Fixed a problem with AcquireMutex where the status code
was lost if the caller had to actually wait for the mutex.
Increased the maximum ASL Field size from 64K bits to 4G bits.
-Completed implementation of the external Global Lock interfaces -
--
+Completed implementation of the external Global Lock interfaces --
AcpiAcquireGlobalLock and AcpiReleaseGlobalLock. The Timeout and
Handler parameters were added.
@@ -6289,15 +7138,13 @@ add and subtract (diff) macros have changed considerably.
Created and deployed a new ACPI_SIZE type that is 64-bits wide on
64-bit platforms, 32-bits on all others. This type is used
-wherever memory allocation and/or the C sizeof() operator is
-used,
+wherever memory allocation and/or the C sizeof() operator is used,
and affects the OSL memory allocation interfaces AcpiOsAllocate
and AcpiOsCallocate.
Implemented sticky user breakpoints in the AML debugger.
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
@@ -6329,8 +7176,7 @@ Summary of changes for this label: 12_05_01
The ACPI 2.0 CopyObject operator is fully implemented. This
operator creates a new copy of an object (and is also used to
-bypass the "implicit conversion" mechanism of the Store
-operator.)
+bypass the "implicit conversion" mechanism of the Store operator.)
The ACPI 2.0 semantics for the SizeOf operator are fully
implemented. The change is that performing a SizeOf on a
@@ -6349,10 +7195,8 @@ object (via the AcpiEvaluateObject interface.)
Fixed a problem with the namespace object deletion mechanism for
objects created by control methods. There were two parts to this
-problem: 1) Objects created during the initialization phase
-method
-parse were not being deleted, and 2) The object owner ID
-mechanism
+problem: 1) Objects created during the initialization phase method
+parse were not being deleted, and 2) The object owner ID mechanism
to track objects was broken.
Fixed a problem where the use of the ASL Scope operator within a
@@ -6362,14 +7206,12 @@ Fixed a problem introduced in the previous label where the buffer
length required for the _PRT structure was not being returned
correctly.
-Code and Data Size: Current core subsystem library sizes are
-shown
+Code and Data Size: Current core subsystem library sizes are shown
below. These are the code and data sizes for the acpica.lib
produced by the Microsoft Visual C++ 6.0 compiler, and these
values do not include any ACPI driver or OSPM code. The debug
version of the code includes the debug output trace mechanism and
-has a larger code and data size. Note that these values will
-vary
+has a larger code and data size. Note that these values will vary
depending on the efficiency of the compiler and the compiler
options used during generation.
@@ -6396,8 +7238,7 @@ Changed the initialization sequence to start the ACPI interpreter
(acpi_init) prior to initialization of the PCI driver (pci_init)
in init/main.c. This ordering is required to support PRT and
facilitate other (future) enhancement. A side effect is that the
-ACPI bus driver and certain device drivers can no longer be
-loaded
+ACPI bus driver and certain device drivers can no longer be loaded
as modules.
Modified the 'make menuconfig' options to allow PCI Interrupt
@@ -6417,8 +7258,7 @@ Summary of changes for this label: 11_20_01
1) ACPI CA Core Subsystem:
Updated Index support to match ACPI 2.0 semantics. Storing a
-Integer, String, or Buffer to an Index of a Buffer will store
-only
+Integer, String, or Buffer to an Index of a Buffer will store only
the least-significant byte of the source to the Indexed buffer
byte. Multiple writes are not performed.
@@ -6431,19 +7271,16 @@ signalled state. Events are now created in an unsignalled state.
The internal object cache is now purged after table loading and
initialization to reduce the use of dynamic kernel memory -- on
the assumption that object use is greatest during the parse phase
-of the entire table (versus the run-time use of individual
-control
+of the entire table (versus the run-time use of individual control
methods.)
ACPI 2.0 variable-length packages are now fully operational.
-Code and Data Size: Code and Data optimizations have permitted
-new
+Code and Data Size: Code and Data optimizations have permitted new
feature development with an actual reduction in the library size.
Current core subsystem library sizes are shown below. These are
the code and data sizes for the acpica.lib produced by the
-Microsoft Visual C++ 6.0 compiler, and these values do not
-include
+Microsoft Visual C++ 6.0 compiler, and these values do not include
any ACPI driver or OSPM code. The debug version of the code
includes the debug output trace mechanism and has a larger code
and data size. Note that these values will vary depending on the
@@ -6467,16 +7304,14 @@ near future. This functionality replaces
arch/i386/kernel/acpitables.c, which was introduced in an earlier
2.4.15-preX release. To enable this feature you must add
"acpi_boot=on" to the kernel command line -- see the help entry
-for CONFIG_ACPI_BOOT for more information. An IA-64 release is
-in
+for CONFIG_ACPI_BOOT for more information. An IA-64 release is in
the works...
Restructured the configuration options to allow boot-time table
parsing support without inclusion of the ACPI Interpreter (and
other) code.
-NOTE: This release does not include fixes for the reported
-events,
+NOTE: This release does not include fixes for the reported events,
power-down, and thermal passive cooling issues (coming soon).
3) ASL Compiler:
@@ -6499,8 +7334,7 @@ Summary of changes for this label: 11_09_01
1) ACPI CA Core Subsystem:
Implemented ACPI 2.0-defined support for writes to fields with a
-Buffer, String, or Integer source operand that is smaller than
-the
+Buffer, String, or Integer source operand that is smaller than the
target field. In these cases, the source operand is zero-extended
to fill the target field.
@@ -6520,8 +7354,7 @@ Implemented boot-time ACPI table parsing support
(CONFIG_ACPI_BOOT) for IA32 and IA64 UP/SMP systems. This code
facilitates the use of ACPI tables (e.g. MADT, SRAT) rather than
legacy BIOS interfaces (e.g. MPS) for the configuration of system
-processors, memory, and interrupts during setup_arch(). Note
-that
+processors, memory, and interrupts during setup_arch(). Note that
this patch does not include the required architecture-specific
changes required to apply this information -- subsequent patches
will be posted for both IA32 and IA64 to achieve this.
@@ -6533,8 +7366,7 @@ driver model and power-manageable drivers will prevent its
(successful) use on most systems.
Revamped the ACPI 'menuconfig' layout: created new "ACPI Support"
-submenu, unified IA32 and IA64 options, added new "Boot using
-ACPI
+submenu, unified IA32 and IA64 options, added new "Boot using ACPI
tables" option, etc.
Increased the default timeout for the EC driver from 1ms to 10ms
@@ -6552,13 +7384,10 @@ implemented.
OSL Interfaces: Several of the OSL (AcpiOs*) interfaces required
changes to support ACPI 2.0 Qword field access. Read/Write
-PciConfiguration(), Read/Write Memory(), and Read/Write Port()
-now
+PciConfiguration(), Read/Write Memory(), and Read/Write Port() now
accept an ACPI_INTEGER (64 bits) as the value parameter. Also,
-the value parameter for the address space handler interface is
-now
-an ACPI_INTEGER. OSL implementations of these interfaces must
-now
+the value parameter for the address space handler interface is now
+an ACPI_INTEGER. OSL implementations of these interfaces must now
handle the case where the Width parameter is 64.
Index Fields: Fixed a problem where unaligned bit assembly and
@@ -6584,8 +7413,7 @@ current access type was wider than a byte (WordAcc, DwordAcc, or
QwordAcc).
Fields: Fixed a problem where forward references to individual
-FieldUnits (individual Field names within a Field definition)
-were
+FieldUnits (individual Field names within a Field definition) were
not resolved during the AML table load.
Fields: Fixed a problem where forward references from a Field
@@ -6595,17 +7423,14 @@ resolved during the AML table load.
Fields: Duplicate FieldUnit names within a scope are now detected
during AML table load.
-Acpi Interfaces: Fixed a problem where the AcpiGetName()
-interface
+Acpi Interfaces: Fixed a problem where the AcpiGetName() interface
returned an incorrect name for the root node.
-Code and Data Size: Code and Data optimizations have permitted
-new
+Code and Data Size: Code and Data optimizations have permitted new
feature development with an actual reduction in the library size.
Current core subsystem library sizes are shown below. These are
the code and data sizes for the acpica.lib produced by the
-Microsoft Visual C++ 6.0 compiler, and these values do not
-include
+Microsoft Visual C++ 6.0 compiler, and these values do not include
any ACPI driver or OSPM code. The debug version of the code
includes the debug output trace mechanism and has a larger code
and data size. Note that these values will vary depending on the
@@ -6640,20 +7465,17 @@ Summary of changes for this label: 10_18_01
ACPI CA Core Subsystem:
-Fixed a problem with the internal object reference count
-mechanism
+Fixed a problem with the internal object reference count mechanism
that occasionally caused premature object deletion. This resolves
all of the outstanding problem reports where an object is deleted
-in the middle of an interpreter evaluation. Although this
-problem
+in the middle of an interpreter evaluation. Although this problem
only showed up in rather obscure cases, the solution to the
problem involved an adjustment of all reference counts involving
objects attached to namespace nodes.
Fixed a problem with Field support in the interpreter where
writing to an aligned field whose length is an exact multiple (2
-or greater) of the field access granularity would cause an
-attempt
+or greater) of the field access granularity would cause an attempt
to write beyond the end of the field.
The top level AML opcode execution functions within the
@@ -6681,8 +7503,7 @@ format specifiers within invocations of ACPI_DEBUG_PRINT
throughout the core subsystem code.
The ASL "Revision" operator now returns the ACPI support level
-implemented in the core - the value "2" since the ACPI 2.0
-support
+implemented in the core - the value "2" since the ACPI 2.0 support
is more than 50% implemented.
Enhanced the output of the AML debugger "dump namespace" command
@@ -6691,8 +7512,7 @@ to output in a more human-readable form.
Current core subsystem library code sizes are shown below. These
are the code and data sizes for the acpica.lib produced by the
-Microsoft Visual C++ 6.0 compiler, and these values do not
-include
+Microsoft Visual C++ 6.0 compiler, and these values do not include
any ACPI driver or OSPM code. The debug version of the code
includes the full debug trace mechanism -- leading to a much
@@ -6714,14 +7534,11 @@ Linux:
Implemented a "Bad BIOS Blacklist" to track machines that have
known ASL/AML problems.
-Enhanced the /proc interface for the thermal zone driver and
-added
+Enhanced the /proc interface for the thermal zone driver and added
support for _HOT (the critical suspend trip point). The 'info'
-file now includes threshold/policy information, and allows
-setting
+file now includes threshold/policy information, and allows setting
of _SCP (cooling preference) and _TZP (polling frequency) values
-to the 'info' file. Examples: "echo tzp=5 > info" sets the
-polling
+to the 'info' file. Examples: "echo tzp=5 > info" sets the polling
frequency to 5 seconds, and "echo scp=1 > info" sets the cooling
preference to the passive/quiet mode (if supported by the ASL).
@@ -6752,11 +7569,9 @@ stack. Originally over 2K, the maximum stack usage is now below
2K at 1860 bytes (1.82k)
Fixed a problem with the AcpiGetFirmwareTable interface where the
-root table pointer was not mapped into a logical address
-properly.
+root table pointer was not mapped into a logical address properly.
-Fixed a problem where a NULL pointer was being dereferenced in
-the
+Fixed a problem where a NULL pointer was being dereferenced in the
interpreter code for the ASL Notify operator.
Fixed a problem where the use of the ASL Revision operator
@@ -6780,14 +7595,12 @@ from the state object instead of extracting the operands to local
variables. This reduces stack use and code size, and improves
performance.
-The module exxface.c was eliminated as it was an unnecessary
-extra
+The module exxface.c was eliminated as it was an unnecessary extra
layer of code.
Current core subsystem library code sizes are shown below. These
are the code and data sizes for the acpica.lib produced by the
-Microsoft Visual C++ 6.0 compiler, and these values do not
-include
+Microsoft Visual C++ 6.0 compiler, and these values do not include
any ACPI driver or OSPM code. The debug version of the code
includes the full debug trace mechanism -- leading to a much
larger code and data size. Note that these values will vary
@@ -6822,14 +7635,12 @@ the quotient. This was a longstanding bug and it fixes several
known outstanding issues on various platforms.
The ACPI_DEBUG_PRINT and function trace entry/exit macros have
-been further optimized for size. There are 700 invocations of
-the
+been further optimized for size. There are 700 invocations of the
DEBUG_PRINT macro alone, so each optimization reduces the size of
the debug version of the subsystem significantly.
A stack trace mechanism has been implemented. The maximum stack
-usage is about 2K on 32-bit platforms. The debugger command
-"stat
+usage is about 2K on 32-bit platforms. The debugger command "stat
stack" will display the current maximum stack usage.
All public symbols and global variables within the subsystem are
@@ -6845,8 +7656,7 @@ reduce the code size and improve performance.
Current core subsystem library code sizes are shown below. These
are the code and data sizes for the acpica.lib produced by the
-Microsoft Visual C++ 6.0 compiler, and these values do not
-include
+Microsoft Visual C++ 6.0 compiler, and these values do not include
any ACPI driver or OSPM code. The debug version of the code
includes the full debug trace mechanism which contains over 700
invocations of the DEBUG_PRINT macro, 500 function entry macro
@@ -6878,8 +7688,7 @@ ACPI CA Core Subsystem:
The following ACPI 2.0 ASL operators have been implemented in the
AML interpreter (These are already supported by the Intel ASL
-compiler): ToDecimalString, ToHexString, ToString, ToInteger,
-and
+compiler): ToDecimalString, ToHexString, ToString, ToInteger, and
ToBuffer. Support for 64-bit AML constants is implemented in the
AML parser, debugger, and disassembler.
@@ -6894,13 +7703,11 @@ memory list data structure and a single group of functions that
implement generic cache management. This has reduced the code
size in both the debug and release versions of the subsystem.
-The DEBUG_PRINT macro(s) have been optimized for size and
-replaced
+The DEBUG_PRINT macro(s) have been optimized for size and replaced
by ACPI_DEBUG_PRINT. The syntax for this macro is slightly
different, because it generates a single call to an internal
function. This results in a savings of about 90 bytes per
-invocation, resulting in an overall code and data savings of
-about
+invocation, resulting in an overall code and data savings of about
16% in the debug version of the subsystem.
Linux:
@@ -6930,11 +7737,9 @@ Summary of changes for this label: 07_17_01
ACPI CA Core Subsystem:
Added a new interface named AcpiGetFirmwareTable to obtain any
-ACPI table via the ACPI signature. The interface can be called
-at
+ACPI table via the ACPI signature. The interface can be called at
any time during kernel initialization, even before the kernel
-virtual memory manager is initialized and paging is enabled.
-This
+virtual memory manager is initialized and paging is enabled. This
allows kernel subsystems to obtain ACPI tables very early, even
before the ACPI CA subsystem is initialized.
@@ -6953,8 +7758,7 @@ ongoing throughout the rest of this year. In this label, The Mod
operator is implemented.
Added a new data type to contain full PCI addresses named
-ACPI_PCI_ID. This structure contains the PCI Segment, Bus,
-Device,
+ACPI_PCI_ID. This structure contains the PCI Segment, Bus, Device,
and Function values.
Linux:
@@ -6967,10 +7771,8 @@ aligns the CA code closer to the Linux coding standard.
OSL Interfaces:
-The interfaces to the PCI configuration space have been changed
-to
-add the PCI Segment number and to split the single 32-bit
-combined
+The interfaces to the PCI configuration space have been changed to
+add the PCI Segment number and to split the single 32-bit combined
DeviceFunction field into two 16-bit fields. This was
accomplished by moving the four values that define an address in
PCI configuration space (segment, bus, device, and function) to
@@ -6980,10 +7782,8 @@ The changes to the PCI configuration space interfaces led to a
reexamination of the complete set of address space access
interfaces for PCI, I/O, and Memory. The previously existing 18
interfaces have proven difficult to maintain (any small change
-must be propagated across at least 6 interfaces) and do not
-easily
-allow for future expansion to 64 bits if necessary. Also, on
-some
+must be propagated across at least 6 interfaces) and do not easily
+allow for future expansion to 64 bits if necessary. Also, on some
systems, it would not be appropriate to demultiplex the access
width (8, 16, 32,or 64) before calling the OSL if the
corresponding native OS interfaces contain a similar access width
@@ -7025,8 +7825,7 @@ buffer.
The ACPI 2.0 Switch/Case/Default operators have been implemented
and are fully functional. They will work with all ACPI 1.0
-interpreters, since the operators are simply translated to
-If/Else
+interpreters, since the operators are simply translated to If/Else
pairs.
The ACPI 2.0 ElseIf operator is implemented and will also work
@@ -7036,8 +7835,7 @@ Implemented support for ACPI 2.0 variable-length packages. These
packages have a separate opcode, and their size is determined by
the interpreter at run-time.
-Documentation The ACPI CA Programmer Reference has been updated
-to
+Documentation The ACPI CA Programmer Reference has been updated to
reflect the new interfaces and changes to existing interfaces.
------------------------------------------
@@ -7063,8 +7861,7 @@ a reference to a named field within a resource descriptor from a
byte offset to a bit offset if required.
Added some missing named fields from the resource descriptor
-support. These are the names that are automatically created by
-the
+support. These are the names that are automatically created by the
compiler to reference fields within a descriptor. They are only
valid at compile time and are not passed through to the AML
interpreter.
@@ -7078,8 +7875,7 @@ Summary of changes for this label: 05_18_01
ACPI CA Core Subsystem:
Fixed a couple of problems in the Field support code where bits
-from adjacent fields could be returned along with the proper
-field
+from adjacent fields could be returned along with the proper field
bits. Restructured the field support code to improve performance,
readability and maintainability.
@@ -7110,8 +7906,7 @@ buffers are now allocated from a large internal compiler buffer.
The temporary .SRC file is deleted unless the "-s" option is
specified
-The "-d" debug output option now sends all output to the .DBG
-file
+The "-d" debug output option now sends all output to the .DBG file
instead of the console.
"External" second parameter is now optional
@@ -7155,19 +7950,16 @@ Removed /proc/sys/acpi. You can still dump your DSDT from
ACPI CA Core Subsystem:
-Fixed a problem introduced in the previous label where some of
-the
+Fixed a problem introduced in the previous label where some of the
"small" resource descriptor types were not recognized.
-Improved error messages for the case where an ASL Field is
-outside
+Improved error messages for the case where an ASL Field is outside
the range of the parent operation region.
ASL Compiler, version X2018:
-Added error detection for ASL Fields that extend beyond the
-length
+Added error detection for ASL Fields that extend beyond the length
of the parent operation region (only if the length of the region
is known at compile time.) This includes fields that have a
minimum access width that is smaller than the parent region, and
@@ -7181,8 +7973,7 @@ Summary of changes for this label: 04_27_01
ACPI CA Core Subsystem:
-Fixed a problem where the namespace mutex could be released at
-the
+Fixed a problem where the namespace mutex could be released at the
wrong time during execution of AcpiRemoveAddressSpaceHandler.
Added optional thread ID output for debug traces, to simplify
@@ -7192,8 +7983,7 @@ executing ACPI code.
Some additional external data types have been prefixed with the
string "ACPI_" for consistency. This may effect existing code.
-The data types affected are the external callback typedefs -
-e.g.,
+The data types affected are the external callback typedefs - e.g.,
WALK_CALLBACK becomes ACPI_WALK_CALLBACK.
@@ -7235,8 +8025,7 @@ Resource support now supports QWORD address and IO resources. The
have been changed to properly handle Source Resource strings.
A ThreadId of -1 is now used to indicate a "mutex not acquired"
-condition internally and must never be returned by
-AcpiOsThreadId.
+condition internally and must never be returned by AcpiOsThreadId.
This reserved value was changed from 0 since Unix systems allow a
thread ID of 0.
@@ -7261,8 +8050,7 @@ Summary of changes for this label: 03_13_01
During ACPI initialization, the _SB_._INI method is now run if
present.
-Notify handler fix - notifies are deferred until the parent
-method
+Notify handler fix - notifies are deferred until the parent method
completes execution. This fixes the "mutex already acquired"
issue seen occasionally.
@@ -7339,13 +8127,11 @@ message.
ACPI CA Core Subsystem:
Added a new OSL Interface, AcpiOsGetThreadId. This was required
-for the deadlock detection code. Defined to return a non-zero,
-32-
+for the deadlock detection code. Defined to return a non-zero, 32-
bit thread ID for the currently executing thread. May be a non-
zero constant integer on single-thread systems.
-Implemented deadlock detection for internal subsystem mutexes.
-We
+Implemented deadlock detection for internal subsystem mutexes. We
may add conditional compilation for this code (debug only) later.
ASL/AML Mutex object semantics are now fully supported. This
@@ -7386,8 +8172,7 @@ from AcpiEvaluateObject.
Added external interfaces (Acpi*) to the ACPI debug memory
manager. This manager keeps a list of all outstanding
-allocations, and can therefore detect memory leaks and attempts
-to
+allocations, and can therefore detect memory leaks and attempts to
free memory blocks more than once. Useful for code such as the
power manager, etc. May not be appropriate for device drivers.
Performance with the debug code enabled is slow.
@@ -7419,8 +8204,7 @@ interfaces: AcpiOsGetThreadId AcpiAllocate AcpiCallocate AcpiFree
Summary of changes for this label: 02_08_01
Core ACPI CA Subsystem: Fixed a problem where an error was
-incorrectly returned if the return resource buffer was larger
-than
+incorrectly returned if the return resource buffer was larger than
the actual data (in the resource interfaces).
References to named objects within packages are resolved to the
@@ -7444,8 +8228,7 @@ The compiler tracks initialization of the arguments and issues an
exception if they are used without prior assignment (just like
locals).
-The -o option now specifies a filename prefix that is used for
-all
+The -o option now specifies a filename prefix that is used for all
output files, including the AML output file. Otherwise, the
default behavior is as follows: 1) the AML goes to the file
specified in the DSDT. 2) all other output files use the input
@@ -7477,8 +8260,7 @@ Fixed C2 and C3 latency calculations.
We no longer use the compilation date for the version message on
-initialization, but retrieve the version from
-AcpiGetSystemInfo().
+initialization, but retrieve the version from AcpiGetSystemInfo().
Incorporated for fix Sony VAIO machines.
@@ -7508,8 +8290,7 @@ target type before storing) is not yet implemented.
Support for 32-bit and 64-bit BCD integers is implemented.
-Problem fixed where a field read on an aligned field could cause
-a
+Problem fixed where a field read on an aligned field could cause a
read past the end of the field.
New exception, AE_AML_NO_RETURN_VALUE, is returned when a method
@@ -7520,14 +8301,12 @@ ASL Compiler:
Version X2011:
1. Static typechecking of all operands is implemented. This
-prevents the use of invalid objects (such as using a Package
-where
+prevents the use of invalid objects (such as using a Package where
an Integer is required) at compile time instead of at interpreter
run-time.
2. The ASL source line is printed with ALL errors and warnings.
3. Bug fix for source EOF without final linefeed.
-4. Debug option is split into a parse trace and a namespace
-trace.
+4. Debug option is split into a parse trace and a namespace trace.
5. Namespace output option (-n) includes initial values for
integers and strings.
6. Parse-only option added for quick syntax checking.
@@ -7570,8 +8349,7 @@ years.
------------------------------------------
Summary of changes for this label: 12_01_00
-Fixed a problem where method invocations within the ASL
-definition
+Fixed a problem where method invocations within the ASL definition
of both OperationRegions and CreateXXXFields did not work
properly. The symptom was an AE_AML_OPERAND_TYPE during
initialization of the region/field:
@@ -7602,19 +8380,15 @@ assignment. Subsequent assignments were ignored.
------------------------------------------
Summary of changes for this label: 11_15_00
-ACPI 2.0 table support with backwards support for ACPI 1.0 and
-the
-0.71 extensions. Note: although we can read ACPI 2.0 BIOS
-tables,
+ACPI 2.0 table support with backwards support for ACPI 1.0 and the
+0.71 extensions. Note: although we can read ACPI 2.0 BIOS tables,
the AML interpreter does NOT have support for the new 2.0 ASL
grammar terms at this time.
-All ACPI hardware access is via the GAS structures in the ACPI
-2.0
+All ACPI hardware access is via the GAS structures in the ACPI 2.0
FADT.
-All physical memory addresses across all platforms are now 64
-bits
+All physical memory addresses across all platforms are now 64 bits
wide. Logical address width remains dependent on the platform
(i.e., "void *").
@@ -7666,8 +8440,7 @@ necessary) AcpiLoadTables (RSDP) - load all tables found at RSDP-
>RSDT Obsolete Interfaces AcpiLoadFirmwareTables - replaced by
AcpiLoadTables
-Note: These interface changes require changes to all existing
-OSDs
+Note: These interface changes require changes to all existing OSDs
The PCI_Config default address space handler is always installed
at the root namespace object.
@@ -7681,8 +8454,7 @@ AcpiEnableSubsystem Obsolete Interfaces: AcpiLoadNamespace
(Namespace is automatically loaded when a table is loaded)
-The ACPI_OPERAND_OBJECT has been optimized to shrink its size
-from
+The ACPI_OPERAND_OBJECT has been optimized to shrink its size from
52 bytes to 32 bytes. There is usually one of these for every
namespace object, so the memory savings is significant.
@@ -7692,10 +8464,8 @@ Bug fixes for IA-64 support have been integrated.
Additional code review comments have been implemented
-The so-called "third pass parse" has been replaced by a final
-walk
-through the namespace to initialize all operation regions
-(address
+The so-called "third pass parse" has been replaced by a final walk
+through the namespace to initialize all operation regions (address
spaces) and fields that have not yet been initialized during the
execution of the various _INI and REG methods.
@@ -7704,11 +8474,9 @@ New file - namespace/nsinit.c
-------------------------------------------
Summary of changes for this label: 09_01_00
-Namespace manager data structures have been reworked to change
-the
+Namespace manager data structures have been reworked to change the
primary object from a table to a single object. This has
-resulted in dynamic memory savings of 3X within the namespace
-and
+resulted in dynamic memory savings of 3X within the namespace and
2X overall in the ACPI CA subsystem.
Fixed problem where the call to AcpiEvFindPciRootBuses was
@@ -7737,8 +8505,7 @@ Summary of changes for this label: 08_23_00
Fixed problem where TerminateControlMethod was being called
multiple times per method
-Fixed debugger problem where single stepping caused a semaphore
-to
+Fixed debugger problem where single stepping caused a semaphore to
be oversignalled
Improved performance through additional parse object caching -
@@ -7750,8 +8517,7 @@ Summary of changes for this label: 08_10_00
Parser/Interpreter integration: Eliminated the creation of
complete parse trees for ACPI tables and control methods.
Instead, parse subtrees are created and then deleted as soon as
-they are processed (Either entered into the namespace or
-executed
+they are processed (Either entered into the namespace or executed
by the interpreter). This reduces the use of dynamic kernel
memory significantly. (about 10X)
@@ -7778,8 +8544,7 @@ Summary of changes for this label: 07_28_00
Fixed a problem with the way addresses were calculated in
AcpiAmlReadFieldData() and AcpiAmlWriteFieldData(). This problem
manifested itself when a Field was created with WordAccess or
-DwordAccess, but the field unit defined within the Field was
-less
+DwordAccess, but the field unit defined within the Field was less
than a Word or Dword.
@@ -7791,8 +8556,7 @@ accessing an operand stack with two or more operands.
Fixed a problem with the PCI configuration space handlers where
context was getting confused between accesses. This required a
change to the generic address space handler and address space
-setup definitions. Handlers now get both a global handler
-context
+setup definitions. Handlers now get both a global handler context
(this is the one passed in by the user when executing
AcpiInstallAddressSpaceHandler() and a specific region context
that is unique to each region (For example, the _ADR, _SEG and
@@ -7812,8 +8576,7 @@ RegionHandle, UINT32 Function, void *HandlerContext, void
Summary of changes for this label: 07_21_00
Major file consolidation and rename. All files within the
-interpreter have been renamed as well as most header files.
-This
+interpreter have been renamed as well as most header files. This
was done to prevent collisions with existing files in the host
OSs -- filenames such as "config.h" and "global.h" seem to be
quite common. The VC project files have been updated. All
@@ -7861,8 +8624,7 @@ Osd* interfaces renamed to AcpiOs* to eliminate namespace
pollution/confusion within our target kernels. All OSD
interfaces must be modified to match the new naming convention.
-Files merged across the subsystem. A number of the smaller
-source
+Files merged across the subsystem. A number of the smaller source
and header files have been merged to reduce the file count and
increase the density of the existing files. There are too many
to list here. In general, makefiles that call out individual
@@ -7878,8 +8640,7 @@ the acronym "API" since it is somewhat windowsy. The new name is
All manifest constants have been forced to upper case (some were
-mixed case.) Also, the string "ACPI_" has been prepended to
-many
+mixed case.) Also, the string "ACPI_" has been prepended to many
(not all) of the constants, typedefs, and structs.
The globals "DebugLevel" and "DebugLayer" have been renamed
@@ -7888,8 +8649,7 @@ The globals "DebugLevel" and "DebugLayer" have been renamed
All other globals within the subsystem are now prefixed with
"AcpiGbl_" Internal procedures within the subsystem are now
prefixed with "Acpi" (with only a few exceptions). The original
-two-letter abbreviation for the subcomponent remains after
-"Acpi"
+two-letter abbreviation for the subcomponent remains after "Acpi"
- for example, CmCallocate became AcpiCmCallocate.
Added a source code translation/conversion utility. Used to
@@ -7909,8 +8669,7 @@ both types. However, implementers of this call may want to use
different OS primitives depending on the type of semaphore
requested. For example, some operating systems provide separate
-"mutex" and "semaphore" interfaces - where the mutex interface
-is
+"mutex" and "semaphore" interfaces - where the mutex interface is
much faster because it doesn't have all the overhead of a full
semaphore implementation.
@@ -7923,15 +8682,12 @@ Summary of changes for this label: 06_02_00
Support for environments that cannot handle unaligned data
accesses (e.g. firmware and OS environments devoid of alignment
-handler technology namely SAL/EFI and the IA-64 Linux kernel)
-has
+handler technology namely SAL/EFI and the IA-64 Linux kernel) has
been added (via configurable macros) in these three areas: -
Transfer of data from the raw AML byte stream is done via byte
-moves instead of word/dword/qword moves. - External objects
-are
+moves instead of word/dword/qword moves. - External objects are
aligned within the user buffer, including package elements (sub-
-objects). - Conversion of name strings to UINT32 Acpi Names is
-now
+objects). - Conversion of name strings to UINT32 Acpi Names is now
done byte-wise.
The Store operator was modified to mimic Microsoft's
diff --git a/usr/src/uts/intel/io/acpica/cmp_ca.sh b/usr/src/uts/intel/io/acpica/cmp_ca.sh
index 0113487ef6..07cde66d14 100755..100644
--- a/usr/src/uts/intel/io/acpica/cmp_ca.sh
+++ b/usr/src/uts/intel/io/acpica/cmp_ca.sh
@@ -20,36 +20,52 @@
# CDDL HEADER END
#
#
-# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
#
#
-# Set this to the fully-qualified path to the ACPI CA source directory
+# Set this to the fully-qualified path to the ACPI CA GIT directory
#
-ACDIR=/export/home/myers/acpica/acpica-unix-20060721
+ACDIR=/export/home/myers/acpica/acpica-unix-20080829
+
+ACSRC=$ACDIR
+ACINC=$ACDIR/include
DIFF="diff -w"
-WSDIR=`workspace name`
+
+#
+# Use which_scm to get the current WS path
+#
+which_scm | read WS_SCM WSDIR
+
WSSRC=usr/src/uts/intel/io/acpica
WSHDR=usr/src/uts/intel/sys/acpi
ACFILES=/tmp/$$.acfiles
-SRCDIRS="debugger disassembler events hardware interpreter namespace \
- resources tables utilities"
+SRCDIRS="debugger \
+ disassembler \
+ dispatcher \
+ events \
+ executer \
+ hardware \
+ namespace \
+ parser \
+ resources \
+ tables \
+ utilities"
#
#
#
-cd $ACDIR ; find $SRCDIRS -type f > $ACFILES ; cd -
+cd $ACSRC ; find $SRCDIRS -type f > $ACFILES ; cd -
for i in `<$ACFILES`
do
if [[ ! -a $WSDIR/$WSSRC/$i ]]
then
SRCNEW=$SRCNEW\ $i
else
- if (! $DIFF $WSDIR/$WSSRC/$i $ACDIR/$i > /dev/null )
+ if (! $DIFF $WSDIR/$WSSRC/$i $ACSRC/$i > /dev/null )
then
SRCCHG=$SRCCHG\ $i
fi
@@ -59,14 +75,14 @@ done
#
#
#
-cd $ACDIR/include ; find . -type f > $ACFILES ; cd -
+cd $ACINC ; find . -type f > $ACFILES ; cd -
for i in `<$ACFILES`
do
if [[ ! -a $WSDIR/$WSHDR/$i ]]
then
HDRNEW=$HDRNEW\ $i
else
- if (! $DIFF $WSDIR/$WSHDR/$i $ACDIR/include/$i > /dev/null )
+ if (! $DIFF $WSDIR/$WSHDR/$i $ACINC/$i > /dev/null )
then
HDRCHG=$HDRCHG\ $i
fi
@@ -77,40 +93,37 @@ cd $WSDIR
for i in $SRCCHG
do
targ=$WSSRC/$i
- wx edit $targ
- cp $ACDIR/$i $targ
+ cp $ACSRC/$i $targ
done
for i in $SRCNEW
do
targ=$WSSRC/$i
- cp $ACDIR/$i $targ
+ cp $ACSRC/$i $targ
chmod +w $targ
- wx create -f $targ
+ hg add $targ
done
for i in $HDRCHG
do
targ=$WSHDR/$i
- wx edit $targ
- cp $ACDIR/include/$i $targ
+ cp $ACINC/$i $targ
done
for i in $HDRNEW
do
targ=$WSHDR/$i
- cp $ACDIR/include/$i $targ
+ cp $ACINC/$i $targ
chmod +w $targ
- wx create -f $targ
+ hg add $targ
done
-cd -
if (! $DIFF $WSDIR/$WSSRC/changes.txt $ACDIR/changes.txt > /dev/null )
then
targ=$WSSRC/changes.txt
- wx edit $targ
cp $ACDIR/changes.txt $targ
fi
+cd -
echo New source files:
echo $SRCNEW
diff --git a/usr/src/uts/intel/io/acpica/debugger/dbcmds.c b/usr/src/uts/intel/io/acpica/debugger/dbcmds.c
index b3ae57d306..0cefe35436 100644
--- a/usr/src/uts/intel/io/acpica/debugger/dbcmds.c
+++ b/usr/src/uts/intel/io/acpica/debugger/dbcmds.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbcmds - debug commands and output routines
- * $Revision: 1.145 $
+ * $Revision: 1.157 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -117,14 +117,12 @@
#include "acpi.h"
#include "acdispat.h"
-#include "amlcode.h"
#include "acnamesp.h"
#include "acevents.h"
#include "acdebug.h"
#include "acresrc.h"
#include "acdisasm.h"
-
-
+#include "actables.h"
#include "acparser.h"
#ifdef ACPI_DEBUGGER
@@ -285,9 +283,6 @@ ACPI_STATUS
AcpiDbSleep (
char *ObjectArg)
{
-#if ACPI_MACHINE_WIDTH == 16
- return (AE_OK);
-#else
ACPI_STATUS Status;
UINT8 SleepState;
@@ -312,7 +307,6 @@ AcpiDbSleep (
Status = AcpiLeaveSleepState (SleepState);
return (Status);
-#endif
}
@@ -441,25 +435,29 @@ AcpiDbDisplayTableInfo (
ACPI_TABLE_DESC *TableDesc;
- for (i = 0; i < (ACPI_TABLE_ID_MAX+1); i++)
+ /* Walk the entire root table list */
+
+ for (i = 0; i < AcpiGbl_RootTableList.Count; i++)
{
- TableDesc = AcpiGbl_TableLists[i].Next;
- while (TableDesc)
- {
- AcpiOsPrintf ( "%s at %p length %.5X",
- AcpiGbl_TableData[i].Name, TableDesc->Pointer,
- (UINT32) TableDesc->Length);
+ TableDesc = &AcpiGbl_RootTableList.Tables[i];
+ AcpiOsPrintf ("%d ", i);
- if (i != ACPI_TABLE_ID_FACS)
- {
- AcpiOsPrintf (" OemID=%6s TableId=%8s OemRevision=%8.8X",
- TableDesc->Pointer->OemId,
- TableDesc->Pointer->OemTableId,
- TableDesc->Pointer->OemRevision);
- }
- AcpiOsPrintf ("\n");
+ /* Make sure that the table is mapped */
+
+ AcpiTbVerifyTable (TableDesc);
+
+ /* Dump the table header */
+
+ if (TableDesc->Pointer)
+ {
+ AcpiTbPrintTableHeader (TableDesc->Address, TableDesc->Pointer);
+ }
+ else
+ {
+ /* If the pointer is null, the table has been unloaded */
- TableDesc = TableDesc->Next;
+ ACPI_INFO ((AE_INFO, "%4.4s - Table has been unloaded",
+ TableDesc->Signature.Ascii));
}
}
}
@@ -485,6 +483,9 @@ AcpiDbUnloadAcpiTable (
char *TableArg,
char *InstanceArg)
{
+/* TBD: Need to reimplement for new data structures */
+
+#if 0
UINT32 i;
ACPI_STATUS Status;
@@ -514,6 +515,7 @@ AcpiDbUnloadAcpiTable (
}
AcpiOsPrintf ("Unknown table type [%s]\n", TableArg);
+#endif
}
@@ -677,7 +679,7 @@ AcpiDbDisassembleMethod (
Status = AcpiDsInitAmlWalk (WalkState, Op, NULL,
ObjDesc->Method.AmlStart,
- ObjDesc->Method.AmlLength, NULL, 1);
+ ObjDesc->Method.AmlLength, NULL, ACPI_IMODE_LOAD_PASS1);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -940,7 +942,7 @@ AcpiDbSetMethodData (
goto Cleanup;
}
- Status = AcpiDsStoreObjectToLocal (AML_ARG_OP, Index, ObjDesc,
+ Status = AcpiDsStoreObjectToLocal (ACPI_REFCLASS_ARG, Index, ObjDesc,
WalkState);
if (ACPI_FAILURE (Status))
{
@@ -963,7 +965,7 @@ AcpiDbSetMethodData (
goto Cleanup;
}
- Status = AcpiDsStoreObjectToLocal (AML_LOCAL_OP, Index, ObjDesc,
+ Status = AcpiDsStoreObjectToLocal (ACPI_REFCLASS_LOCAL, Index, ObjDesc,
WalkState);
if (ACPI_FAILURE (Status))
{
@@ -1413,8 +1415,8 @@ AcpiDmTestResourceConversion (
OriginalAml = ReturnObj.Pointer;
AcpiDmCompareAmlResources (
- OriginalAml->Buffer.Pointer, OriginalAml->Buffer.Length,
- NewAml.Pointer, NewAml.Length);
+ OriginalAml->Buffer.Pointer, (ACPI_RSDESC_SIZE) OriginalAml->Buffer.Length,
+ NewAml.Pointer, (ACPI_RSDESC_SIZE) NewAml.Length);
/* Cleanup and exit */
@@ -1443,8 +1445,6 @@ void
AcpiDbDisplayResources (
char *ObjectArg)
{
-#if ACPI_MACHINE_WIDTH != 16
-
ACPI_NAMESPACE_NODE *Node;
ACPI_STATUS Status;
ACPI_BUFFER ReturnObj;
@@ -1582,7 +1582,6 @@ Cleanup:
AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT);
return;
-#endif
}
@@ -1608,24 +1607,45 @@ AcpiDbIntegrityWalk (
ACPI_INTEGRITY_INFO *Info = (ACPI_INTEGRITY_INFO *) Context;
ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle;
ACPI_OPERAND_OBJECT *Object;
+ BOOLEAN Alias = TRUE;
Info->Nodes++;
- if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)
+
+ /* Verify the NS node, and dereference aliases */
+
+ while (Alias)
{
- AcpiOsPrintf ("Invalid Descriptor Type for Node %p [%s]\n",
- Node, AcpiUtGetDescriptorName (Node));
+ if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)
+ {
+ AcpiOsPrintf ("Invalid Descriptor Type for Node %p [%s] - is %2.2X should be %2.2X\n",
+ Node, AcpiUtGetDescriptorName (Node), ACPI_GET_DESCRIPTOR_TYPE (Node),
+ ACPI_DESC_TYPE_NAMED);
+ return (AE_OK);
+ }
+
+ if ((Node->Type == ACPI_TYPE_LOCAL_ALIAS) ||
+ (Node->Type == ACPI_TYPE_LOCAL_METHOD_ALIAS))
+ {
+ Node = (ACPI_NAMESPACE_NODE *) Node->Object;
+ }
+ else
+ {
+ Alias = FALSE;
+ }
}
if (Node->Type > ACPI_TYPE_LOCAL_MAX)
{
AcpiOsPrintf ("Invalid Object Type for Node %p, Type = %X\n",
Node, Node->Type);
+ return (AE_OK);
}
if (!AcpiUtValidAcpiName (Node->Name.Integer))
{
AcpiOsPrintf ("Invalid AcpiName for Node %p\n", Node);
+ return (AE_OK);
}
Object = AcpiNsGetAttachedObject (Node);
diff --git a/usr/src/uts/intel/io/acpica/debugger/dbdisply.c b/usr/src/uts/intel/io/acpica/debugger/dbdisply.c
index d2a7eb578a..abc437d90e 100644
--- a/usr/src/uts/intel/io/acpica/debugger/dbdisply.c
+++ b/usr/src/uts/intel/io/acpica/debugger/dbdisply.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbdisply - debug display commands
- * $Revision: 1.116 $
+ * $Revision: 1.121 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -160,24 +160,7 @@ AcpiDbGetPointer (
void *ObjPtr;
-#if ACPI_MACHINE_WIDTH == 16
-#include <stdio.h>
-
- /* Have to handle 16-bit pointers of the form segment:offset */
-
- if (!sscanf (Target, "%p", &ObjPtr))
- {
- AcpiOsPrintf ("Invalid pointer: %s\n", Target);
- return (NULL);
- }
-
-#else
-
- /* Simple flat pointer */
-
ObjPtr = ACPI_TO_POINTER (ACPI_STRTOUL (Target, NULL, 16));
-#endif
-
return (ObjPtr);
}
@@ -597,8 +580,10 @@ AcpiDbDisplayResults (
UINT32 i;
ACPI_WALK_STATE *WalkState;
ACPI_OPERAND_OBJECT *ObjDesc;
- UINT32 NumResults = 0;
+ UINT32 ResultCount = 0;
ACPI_NAMESPACE_NODE *Node;
+ ACPI_GENERIC_STATE *Frame;
+ UINT32 Index; /* Index onto current frame */
WalkState = AcpiDsGetCurrentWalkState (AcpiGbl_CurrentWalkList);
@@ -613,17 +598,28 @@ AcpiDbDisplayResults (
if (WalkState->Results)
{
- NumResults = WalkState->Results->Results.NumResults;
+ ResultCount = WalkState->ResultCount;
}
AcpiOsPrintf ("Method [%4.4s] has %X stacked result objects\n",
- AcpiUtGetNodeName (Node), NumResults);
+ AcpiUtGetNodeName (Node), ResultCount);
+
+ /* From the top element of result stack */
+
+ Frame = WalkState->Results;
+ Index = (ResultCount - 1) % ACPI_RESULTS_FRAME_OBJ_NUM;
- for (i = 0; i < NumResults; i++)
+ for (i = 0; i < ResultCount; i++)
{
- ObjDesc = WalkState->Results->Results.ObjDesc[i];
+ ObjDesc = Frame->Results.ObjDesc[Index];
AcpiOsPrintf ("Result%d: ", i);
AcpiDmDisplayInternalObject (ObjDesc, WalkState);
+ if (Index == 0)
+ {
+ Frame = Frame->Results.Next;
+ Index = ACPI_RESULTS_FRAME_OBJ_NUM;
+ }
+ Index--;
}
}
@@ -689,7 +685,7 @@ AcpiDbDisplayObjectType (
ACPI_BUFFER Buffer;
ACPI_DEVICE_INFO *Info;
ACPI_STATUS Status;
- ACPI_NATIVE_UINT i;
+ UINT32 i;
Handle = ACPI_TO_POINTER (ACPI_STRTOUL (ObjectArg, NULL, 16));
@@ -711,7 +707,7 @@ AcpiDbDisplayObjectType (
{
for (i = 0; i < Info->CompatibilityId.Count; i++)
{
- AcpiOsPrintf ("CID #%d: %s\n", (UINT32) i,
+ AcpiOsPrintf ("CID #%d: %s\n", i,
Info->CompatibilityId.Id[i].Value);
}
}
@@ -853,8 +849,8 @@ AcpiDbDisplayGpes (
AcpiOsPrintf (
" RegisterInfo: %p Status %8.8X%8.8X Enable %8.8X%8.8X\n",
GpeBlock->RegisterInfo,
- ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (GpeBlock->RegisterInfo->StatusAddress.Address)),
- ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (GpeBlock->RegisterInfo->EnableAddress.Address)));
+ ACPI_FORMAT_UINT64 (GpeBlock->RegisterInfo->StatusAddress.Address),
+ ACPI_FORMAT_UINT64 (GpeBlock->RegisterInfo->EnableAddress.Address));
AcpiOsPrintf (" EventInfo: %p\n", GpeBlock->EventInfo);
@@ -868,8 +864,8 @@ AcpiDbDisplayGpes (
" Reg %u: WakeEnable %2.2X, RunEnable %2.2X Status %8.8X%8.8X Enable %8.8X%8.8X\n",
i, GpeRegisterInfo->EnableForWake,
GpeRegisterInfo->EnableForRun,
- ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (GpeRegisterInfo->StatusAddress.Address)),
- ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (GpeRegisterInfo->EnableAddress.Address)));
+ ACPI_FORMAT_UINT64 (GpeRegisterInfo->StatusAddress.Address),
+ ACPI_FORMAT_UINT64 (GpeRegisterInfo->EnableAddress.Address));
/* Now look at the individual GPEs in this byte register */
@@ -886,9 +882,9 @@ AcpiDbDisplayGpes (
}
AcpiOsPrintf (
- " GPE %.3X: %p Bit %2.2X Flags %2.2X: ",
+ " GPE %.3X: %p Flags %2.2X: ",
GpeBlock->BlockBaseNumber + GpeIndex,
- GpeEventInfo, GpeEventInfo->RegisterBit,
+ GpeEventInfo,
GpeEventInfo->Flags);
if (GpeEventInfo->Flags & ACPI_GPE_LEVEL_TRIGGERED)
diff --git a/usr/src/uts/intel/io/acpica/debugger/dbexec.c b/usr/src/uts/intel/io/acpica/debugger/dbexec.c
index 4547f0e5b4..b1add758b6 100644
--- a/usr/src/uts/intel/io/acpica/debugger/dbexec.c
+++ b/usr/src/uts/intel/io/acpica/debugger/dbexec.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbexec - debugger control method execution
- * $Revision: 1.77 $
+ * $Revision: 1.83 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -153,12 +153,6 @@ AcpiDbExecutionWalk (
void *Context,
void **ReturnValue);
-#ifdef ACPI_DBG_TRACK_ALLOCATIONS
-static UINT32
-AcpiDbGetCacheInfo (
- ACPI_MEMORY_LIST *Cache);
-#endif
-
/*******************************************************************************
*
@@ -181,7 +175,10 @@ AcpiDbExecuteMethod (
ACPI_STATUS Status;
ACPI_OBJECT_LIST ParamObjects;
ACPI_OBJECT Params[ACPI_METHOD_NUM_ARGS];
+ ACPI_HANDLE Handle;
+ ACPI_BUFFER Buffer;
UINT32 i;
+ ACPI_DEVICE_INFO *ObjInfo;
if (AcpiGbl_DbOutputToFile && !AcpiDbgLevel)
@@ -189,34 +186,78 @@ AcpiDbExecuteMethod (
AcpiOsPrintf ("Warning: debug output is not enabled!\n");
}
- /* Are there arguments to the method? */
+ /* Get the NS node, determines existence also */
- if (Info->Args && Info->Args[0])
+ Status = AcpiGetHandle (NULL, Info->Pathname, &Handle);
+ if (ACPI_FAILURE (Status))
{
- for (i = 0; Info->Args[i] && i < ACPI_METHOD_NUM_ARGS; i++)
- {
- Params[i].Type = ACPI_TYPE_INTEGER;
- Params[i].Integer.Value = ACPI_STRTOUL (Info->Args[i], NULL, 16);
- }
+ return (Status);
+ }
+
+ /* Get the object info for number of method parameters */
- ParamObjects.Pointer = Params;
- ParamObjects.Count = i;
+ Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
+ Status = AcpiGetObjectInfo (Handle, &Buffer);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
}
- else
+
+ ParamObjects.Pointer = NULL;
+ ParamObjects.Count = 0;
+
+ ObjInfo = Buffer.Pointer;
+ if (ObjInfo->Type == ACPI_TYPE_METHOD)
{
- /* Setup default parameters */
+ /* Are there arguments to the method? */
- Params[0].Type = ACPI_TYPE_INTEGER;
- Params[0].Integer.Value = 0x01020304;
+ if (Info->Args && Info->Args[0])
+ {
+ for (i = 0; Info->Args[i] && i < ACPI_METHOD_NUM_ARGS; i++)
+ {
+ Params[i].Type = ACPI_TYPE_INTEGER;
+ Params[i].Integer.Value = ACPI_STRTOUL (Info->Args[i], NULL, 16);
+ }
- Params[1].Type = ACPI_TYPE_STRING;
- Params[1].String.Length = 12;
- Params[1].String.Pointer = "AML Debugger";
+ ParamObjects.Pointer = Params;
+ ParamObjects.Count = i;
+ }
+ else
+ {
+ /* Setup default parameters */
+
+ for (i = 0; i < ObjInfo->ParamCount; i++)
+ {
+ switch (i)
+ {
+ case 0:
+
+ Params[0].Type = ACPI_TYPE_INTEGER;
+ Params[0].Integer.Value = 0x01020304;
+ break;
+
+ case 1:
- ParamObjects.Pointer = Params;
- ParamObjects.Count = 2;
+ Params[1].Type = ACPI_TYPE_STRING;
+ Params[1].String.Length = 12;
+ Params[1].String.Pointer = "AML Debugger";
+ break;
+
+ default:
+
+ Params[i].Type = ACPI_TYPE_INTEGER;
+ Params[i].Integer.Value = i * (ACPI_INTEGER) 0x1000;
+ break;
+ }
+ }
+
+ ParamObjects.Pointer = Params;
+ ParamObjects.Count = ObjInfo->ParamCount;
+ }
}
+ ACPI_FREE (Buffer.Pointer);
+
/* Prepare for a return object of arbitrary size */
ReturnObj->Pointer = AcpiGbl_DbBuffer;
@@ -283,7 +324,7 @@ AcpiDbExecuteSetup (
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
-static UINT32
+UINT32
AcpiDbGetCacheInfo (
ACPI_MEMORY_LIST *Cache)
{
@@ -426,6 +467,8 @@ AcpiDbExecute (
return;
}
+ ACPI_MEMSET (&AcpiGbl_DbMethodInfo, 0, sizeof (ACPI_DB_METHOD_INFO));
+
ACPI_STRCPY (NameString, Name);
AcpiUtStrupr (NameString);
AcpiGbl_DbMethodInfo.Name = NameString;
@@ -509,9 +552,21 @@ AcpiDbMethodThread (
ACPI_STATUS Status;
ACPI_DB_METHOD_INFO *Info = Context;
UINT32 i;
+ UINT8 Allow;
ACPI_BUFFER ReturnObj;
+ if (Info->InitArgs)
+ {
+ AcpiDbUInt32ToHexString (Info->NumCreated, Info->IndexOfThreadStr);
+ AcpiDbUInt32ToHexString ((UINT32) AcpiOsGetThreadId (), Info->IdOfThreadStr);
+ }
+
+ if (Info->Threads && (Info->NumCreated < Info->NumThreads))
+ {
+ Info->Threads[Info->NumCreated++] = (UINT32) AcpiOsGetThreadId();
+ }
+
for (i = 0; i < Info->NumLoops; i++)
{
Status = AcpiDbExecuteMethod (Info, &ReturnObj);
@@ -525,12 +580,12 @@ AcpiDbMethodThread (
}
}
+#if 0
if ((i % 100) == 0)
{
- AcpiOsPrintf ("%d executions\n", i);
+ AcpiOsPrintf ("%d executions, Thread 0x%x\n", i, AcpiOsGetThreadId ());
}
-#if 0
if (ReturnObj.Length)
{
AcpiOsPrintf ("Execution of %s returned object %p Buflen %X\n",
@@ -542,11 +597,26 @@ AcpiDbMethodThread (
/* Signal our completion */
- Status = AcpiOsSignalSemaphore (Info->ThreadGate, 1);
- if (ACPI_FAILURE (Status))
+ Allow = 0;
+ (void) AcpiOsWaitSemaphore (Info->ThreadCompleteGate, 1, ACPI_WAIT_FOREVER);
+ Info->NumCompleted++;
+
+ if (Info->NumCompleted == Info->NumThreads)
{
- AcpiOsPrintf ("Could not signal debugger thread sync semaphore, %s\n",
- AcpiFormatException (Status));
+ /* Do signal for main thread once only */
+ Allow = 1;
+ }
+
+ (void) AcpiOsSignalSemaphore (Info->ThreadCompleteGate, 1);
+
+ if (Allow)
+ {
+ Status = AcpiOsSignalSemaphore (Info->MainThreadGate, 1);
+ if (ACPI_FAILURE (Status))
+ {
+ AcpiOsPrintf ("Could not signal debugger thread sync semaphore, %s\n",
+ AcpiFormatException (Status));
+ }
}
}
@@ -575,8 +645,9 @@ AcpiDbCreateExecutionThreads (
UINT32 NumThreads;
UINT32 NumLoops;
UINT32 i;
- ACPI_MUTEX ThreadGate;
-
+ UINT32 Size;
+ ACPI_MUTEX MainThreadGate;
+ ACPI_MUTEX ThreadCompleteGate;
/* Get the arguments */
@@ -590,23 +661,64 @@ AcpiDbCreateExecutionThreads (
return;
}
- /* Create the synchronization semaphore */
+ /*
+ * Create the semaphore for synchronization of
+ * the created threads with the main thread.
+ */
+ Status = AcpiOsCreateSemaphore (1, 0, &MainThreadGate);
+ if (ACPI_FAILURE (Status))
+ {
+ AcpiOsPrintf ("Could not create semaphore for synchronization with the main thread, %s\n",
+ AcpiFormatException (Status));
+ return;
+ }
- Status = AcpiOsCreateSemaphore (1, 0, &ThreadGate);
+ /*
+ * Create the semaphore for synchronization
+ * between the created threads.
+ */
+ Status = AcpiOsCreateSemaphore (1, 1, &ThreadCompleteGate);
if (ACPI_FAILURE (Status))
{
- AcpiOsPrintf ("Could not create semaphore, %s\n",
+ AcpiOsPrintf ("Could not create semaphore for synchronization between the created threads, %s\n",
AcpiFormatException (Status));
+ (void) AcpiOsDeleteSemaphore (MainThreadGate);
+ return;
+ }
+
+ ACPI_MEMSET (&AcpiGbl_DbMethodInfo, 0, sizeof (ACPI_DB_METHOD_INFO));
+
+ /* Array to store IDs of threads */
+
+ AcpiGbl_DbMethodInfo.NumThreads = NumThreads;
+ Size = 4 * AcpiGbl_DbMethodInfo.NumThreads;
+ AcpiGbl_DbMethodInfo.Threads = (UINT32 *) AcpiOsAllocate (Size);
+ if (AcpiGbl_DbMethodInfo.Threads == NULL)
+ {
+ AcpiOsPrintf ("No memory for thread IDs array\n");
+ (void) AcpiOsDeleteSemaphore (MainThreadGate);
+ (void) AcpiOsDeleteSemaphore (ThreadCompleteGate);
return;
}
+ ACPI_MEMSET (AcpiGbl_DbMethodInfo.Threads, 0, Size);
/* Setup the context to be passed to each thread */
AcpiGbl_DbMethodInfo.Name = MethodNameArg;
- AcpiGbl_DbMethodInfo.Args = NULL;
AcpiGbl_DbMethodInfo.Flags = 0;
AcpiGbl_DbMethodInfo.NumLoops = NumLoops;
- AcpiGbl_DbMethodInfo.ThreadGate = ThreadGate;
+ AcpiGbl_DbMethodInfo.MainThreadGate = MainThreadGate;
+ AcpiGbl_DbMethodInfo.ThreadCompleteGate = ThreadCompleteGate;
+
+ /* Init arguments to be passed to method */
+
+ AcpiGbl_DbMethodInfo.InitArgs = 1;
+ AcpiGbl_DbMethodInfo.Args = AcpiGbl_DbMethodInfo.Arguments;
+ AcpiGbl_DbMethodInfo.Arguments[0] = AcpiGbl_DbMethodInfo.NumThreadsStr;
+ AcpiGbl_DbMethodInfo.Arguments[1] = AcpiGbl_DbMethodInfo.IdOfThreadStr;
+ AcpiGbl_DbMethodInfo.Arguments[2] = AcpiGbl_DbMethodInfo.IndexOfThreadStr;
+ AcpiGbl_DbMethodInfo.Arguments[3] = NULL;
+ AcpiDbUInt32ToHexString (NumThreads, AcpiGbl_DbMethodInfo.NumThreadsStr);
AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo);
@@ -627,20 +739,19 @@ AcpiDbCreateExecutionThreads (
/* Wait for all threads to complete */
- i = NumThreads;
- while (i) /* Brain damage for host OSs that only support wait of 1 unit */
- {
- Status = AcpiOsWaitSemaphore (ThreadGate, 1, ACPI_WAIT_FOREVER);
- i--;
- }
-
- /* Cleanup and exit */
-
- (void) AcpiOsDeleteSemaphore (ThreadGate);
+ (void) AcpiOsWaitSemaphore (MainThreadGate, 1, ACPI_WAIT_FOREVER);
AcpiDbSetOutputDestination (ACPI_DB_DUPLICATE_OUTPUT);
AcpiOsPrintf ("All threads (%X) have completed\n", NumThreads);
AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT);
+
+ /* Cleanup and exit */
+
+ (void) AcpiOsDeleteSemaphore (MainThreadGate);
+ (void) AcpiOsDeleteSemaphore (ThreadCompleteGate);
+
+ AcpiOsFree (AcpiGbl_DbMethodInfo.Threads);
+ AcpiGbl_DbMethodInfo.Threads = NULL;
}
#endif /* ACPI_DEBUGGER */
diff --git a/usr/src/uts/intel/io/acpica/debugger/dbfileio.c b/usr/src/uts/intel/io/acpica/debugger/dbfileio.c
index 7a4c761882..c33518d160 100644
--- a/usr/src/uts/intel/io/acpica/debugger/dbfileio.c
+++ b/usr/src/uts/intel/io/acpica/debugger/dbfileio.c
@@ -1,8 +1,8 @@
/*******************************************************************************
*
- * Module Name: dbfileio - Debugger file I/O commands. These can't usually
+ * Module Name: dbfileio - Debugger file I/O commands. These can't usually
* be used when running the debugger in Ring 0 (Kernel mode)
- * $Revision: 1.92 $
+ * $Revision: 1.96 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -118,9 +118,10 @@
#include "acpi.h"
#include "acdebug.h"
-#include "acnamesp.h"
+
+#ifdef ACPI_APPLICATION
#include "actables.h"
-#include "acdisasm.h"
+#endif
#if (defined ACPI_DEBUGGER || defined ACPI_DISASSEMBLER)
@@ -128,7 +129,7 @@
ACPI_MODULE_NAME ("dbfileio")
/*
- * NOTE: this is here for lack of a better place. It is used in all
+ * NOTE: this is here for lack of a better place. It is used in all
* flavors of the debugger, need LCD file
*/
#ifdef ACPI_APPLICATION
@@ -263,7 +264,7 @@ AcpiDbCheckTextModeCorruption (
{
if (Table[i - 1] != 0x0D)
{
- /* The LF does not have a preceeding CR, table not corrupted */
+ /* The LF does not have a preceding CR, table not corrupted */
return (AE_OK);
}
@@ -355,7 +356,7 @@ AcpiDbReadTable (
}
else
{
- /* Read the table header */
+ /* Read the table header */
if (fread (&TableHeader, 1, sizeof (TableHeader), fp) !=
sizeof (ACPI_TABLE_HEADER))
@@ -364,6 +365,7 @@ AcpiDbReadTable (
return (AE_BAD_HEADER);
}
+#if 0
/* Validate the table header/length */
Status = AcpiTbValidateTableHeader (&TableHeader);
@@ -372,6 +374,7 @@ AcpiDbReadTable (
AcpiOsPrintf ("Table header is invalid!\n");
return (Status);
}
+#endif
/* File size must be at least as long as the Header-specified length */
@@ -421,7 +424,8 @@ AcpiDbReadTable (
{
/* Now validate the checksum */
- Status = AcpiTbVerifyTableChecksum (*Table);
+ Status = AcpiTbChecksum ((void *) *Table,
+ ACPI_CAST_PTR (ACPI_TABLE_HEADER, *Table)->Length);
if (Status == AE_BAD_CHECKSUM)
{
@@ -459,8 +463,8 @@ AcpiDbReadTable (
* RETURN: Status
*
* DESCRIPTION: This function is called to load a table from the caller's
- * buffer. The buffer must contain an entire ACPI Table including
- * a valid header. The header fields will be verified, and if it
+ * buffer. The buffer must contain an entire ACPI Table including
+ * a valid header. The header fields will be verified, and if it
* is determined that the table is invalid, the call will fail.
*
******************************************************************************/
@@ -469,11 +473,12 @@ static ACPI_STATUS
AeLocalLoadTable (
ACPI_TABLE_HEADER *Table)
{
- ACPI_STATUS Status;
- ACPI_TABLE_DESC TableInfo;
+ ACPI_STATUS Status = AE_OK;
+/* ACPI_TABLE_DESC TableInfo; */
ACPI_FUNCTION_TRACE (AeLocalLoadTable);
+#if 0
if (!Table)
@@ -517,6 +522,7 @@ AeLocalLoadTable (
return_ACPI_STATUS (Status);
}
#endif
+#endif
return_ACPI_STATUS (Status);
}
diff --git a/usr/src/uts/intel/io/acpica/debugger/dbhistry.c b/usr/src/uts/intel/io/acpica/debugger/dbhistry.c
index afc12ba0d6..5b64315d83 100644
--- a/usr/src/uts/intel/io/acpica/debugger/dbhistry.c
+++ b/usr/src/uts/intel/io/acpica/debugger/dbhistry.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dbhistry - debugger HISTORY command
- * $Revision: 1.33 $
+ * $Revision: 1.35 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -210,7 +210,7 @@ void
AcpiDbDisplayHistory (
void)
{
- ACPI_NATIVE_UINT i;
+ UINT32 i;
UINT16 HistoryIndex;
@@ -249,7 +249,7 @@ char *
AcpiDbGetFromHistory (
char *CommandNumArg)
{
- ACPI_NATIVE_UINT i;
+ UINT32 i;
UINT16 HistoryIndex;
UINT32 CmdNum;
diff --git a/usr/src/uts/intel/io/acpica/debugger/dbinput.c b/usr/src/uts/intel/io/acpica/debugger/dbinput.c
index cf0162f737..f1f6ddd89e 100644
--- a/usr/src/uts/intel/io/acpica/debugger/dbinput.c
+++ b/usr/src/uts/intel/io/acpica/debugger/dbinput.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbinput - user front-end to the AML debugger
- * $Revision: 1.113 $
+ * $Revision: 1.116 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -866,7 +866,7 @@ AcpiDbCommandDispatch (
break;
case CMD_TRACE:
- AcpiDebugTrace (AcpiGbl_DbArgs[1],0,0,1);
+ (void) AcpiDebugTrace (AcpiGbl_DbArgs[1],0,0,1);
break;
case CMD_TREE:
diff --git a/usr/src/uts/intel/io/acpica/debugger/dbstats.c b/usr/src/uts/intel/io/acpica/debugger/dbstats.c
index 3dde13c246..aec1833161 100644
--- a/usr/src/uts/intel/io/acpica/debugger/dbstats.c
+++ b/usr/src/uts/intel/io/acpica/debugger/dbstats.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbstats - Generation and display of ACPI table statistics
- * $Revision: 1.83 $
+ * $Revision: 1.90 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -141,9 +141,11 @@ AcpiDbClassifyOneObject (
void *Context,
void **ReturnValue);
+#if defined ACPI_DBG_TRACK_ALLOCATIONS || defined ACPI_USE_LOCAL_CACHE
static void
AcpiDbListInfo (
ACPI_MEMORY_LIST *List);
+#endif
/*
@@ -171,7 +173,6 @@ static ARGUMENT_INFO AcpiDbStatTypes [] =
#if defined ACPI_DBG_TRACK_ALLOCATIONS || defined ACPI_USE_LOCAL_CACHE
-
/*******************************************************************************
*
* FUNCTION: AcpiDbListInfo
@@ -190,7 +191,6 @@ AcpiDbListInfo (
{
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
UINT32 Outstanding;
- UINT32 Temp;
#endif
AcpiOsPrintf ("\n%s\n", List->ListName);
@@ -200,7 +200,7 @@ AcpiDbListInfo (
if (List->MaxDepth > 0)
{
AcpiOsPrintf (
- " Cache: [Depth Max Avail Size] % 7d % 7d % 7d % 7d B\n",
+ " Cache: [Depth MaxD Avail Size] %8.2X %8.2X %8.2X %8.2X\n",
List->CurrentDepth,
List->MaxDepth,
List->MaxDepth - List->CurrentDepth,
@@ -211,31 +211,36 @@ AcpiDbListInfo (
if (List->MaxDepth > 0)
{
AcpiOsPrintf (
- " Cache: [Requests Hits Misses ObjSize] % 7d % 7d % 7d % 7d B\n",
+ " Cache: [Requests Hits Misses ObjSize] %8.2X %8.2X %8.2X %8.2X\n",
List->Requests,
List->Hits,
List->Requests - List->Hits,
List->ObjectSize);
}
- Outstanding = List->TotalAllocated -
- List->TotalFreed -
- List->CurrentDepth;
+ Outstanding = AcpiDbGetCacheInfo (List);
if (List->ObjectSize)
{
- Temp = ACPI_ROUND_UP_TO_1K (Outstanding * List->ObjectSize);
+ AcpiOsPrintf (
+ " Mem: [Alloc Free Max CurSize Outstanding] %8.2X %8.2X %8.2X %8.2X %8.2X\n",
+ List->TotalAllocated,
+ List->TotalFreed,
+ List->MaxOccupied,
+ Outstanding * List->ObjectSize,
+ Outstanding);
}
else
{
- Temp = ACPI_ROUND_UP_TO_1K (List->CurrentTotalSize);
+ AcpiOsPrintf (
+ " Mem: [Alloc Free Max CurSize Outstanding Total] %8.2X %8.2X %8.2X %8.2X %8.2X %8.2X\n",
+ List->TotalAllocated,
+ List->TotalFreed,
+ List->MaxOccupied,
+ List->CurrentTotalSize,
+ Outstanding,
+ List->TotalSize);
}
-
- AcpiOsPrintf (
- " Mem: [Alloc Free Outstanding Size] % 7d % 7d % 7d % 7d Kb\n",
- List->TotalAllocated,
- List->TotalFreed,
- Outstanding, Temp);
#endif
}
#endif
@@ -465,11 +470,6 @@ AcpiDbDisplayStatistics (
UINT32 Temp;
- if (!AcpiGbl_DSDT)
- {
- AcpiOsPrintf ("*** Warning: There is no DSDT loaded\n");
- }
-
if (!TypeArg)
{
AcpiOsPrintf ("The following subcommands are available:\n ALLOCATIONS, OBJECTS, MEMORY, MISC, SIZES, TABLES\n");
@@ -496,12 +496,7 @@ AcpiDbDisplayStatistics (
case CMD_STAT_TABLES:
- AcpiOsPrintf ("ACPI Table Information:\n\n");
- if (AcpiGbl_DSDT)
- {
- AcpiOsPrintf ("DSDT Length:................% 7ld (%X)\n",
- AcpiGbl_DSDT->Length, AcpiGbl_DSDT->Length);
- }
+ AcpiOsPrintf ("ACPI Table Information (not implemented):\n\n");
break;
case CMD_STAT_OBJECTS:
@@ -528,18 +523,19 @@ AcpiDbDisplayStatistics (
case CMD_STAT_MEMORY:
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
- AcpiOsPrintf ("\n----Object and Cache Statistics---------------------------------------------\n");
+ AcpiOsPrintf ("\n----Object Statistics (all in hex)---------\n");
AcpiDbListInfo (AcpiGbl_GlobalList);
AcpiDbListInfo (AcpiGbl_NsNodeList);
+#endif
#ifdef ACPI_USE_LOCAL_CACHE
+ AcpiOsPrintf ("\n----Cache Statistics (all in hex)---------\n");
AcpiDbListInfo (AcpiGbl_OperandCache);
AcpiDbListInfo (AcpiGbl_PsNodeCache);
AcpiDbListInfo (AcpiGbl_PsNodeExtCache);
AcpiDbListInfo (AcpiGbl_StateCache);
#endif
-#endif
break;
@@ -596,6 +592,7 @@ AcpiDbDisplayStatistics (
AcpiOsPrintf ("ParseObjectAsl %3d\n", sizeof (ACPI_PARSE_OBJ_ASL));
AcpiOsPrintf ("OperandObject %3d\n", sizeof (ACPI_OPERAND_OBJECT));
AcpiOsPrintf ("NamespaceNode %3d\n", sizeof (ACPI_NAMESPACE_NODE));
+ AcpiOsPrintf ("AcpiObject %3d\n", sizeof (ACPI_OBJECT));
break;
@@ -603,13 +600,13 @@ AcpiDbDisplayStatistics (
case CMD_STAT_STACK:
#if defined(ACPI_DEBUG_OUTPUT)
- Temp = (UINT32) (AcpiGbl_EntryStackPointer - AcpiGbl_LowestStackPointer);
+ Temp = (UINT32) ACPI_PTR_DIFF (AcpiGbl_EntryStackPointer, AcpiGbl_LowestStackPointer);
AcpiOsPrintf ("\nSubsystem Stack Usage:\n\n");
- AcpiOsPrintf ("Entry Stack Pointer %X\n", AcpiGbl_EntryStackPointer);
- AcpiOsPrintf ("Lowest Stack Pointer %X\n", AcpiGbl_LowestStackPointer);
- AcpiOsPrintf ("Stack Use %X (%d)\n", Temp, Temp);
- AcpiOsPrintf ("Deepest Procedure Nesting %d\n", AcpiGbl_DeepestNesting);
+ AcpiOsPrintf ("Entry Stack Pointer %p\n", AcpiGbl_EntryStackPointer);
+ AcpiOsPrintf ("Lowest Stack Pointer %p\n", AcpiGbl_LowestStackPointer);
+ AcpiOsPrintf ("Stack Use %X (%u)\n", Temp, Temp);
+ AcpiOsPrintf ("Deepest Procedure Nesting %u\n", AcpiGbl_DeepestNesting);
#endif
break;
diff --git a/usr/src/uts/intel/io/acpica/debugger/dbutils.c b/usr/src/uts/intel/io/acpica/debugger/dbutils.c
index 5a1b1b017f..d867904b1f 100644
--- a/usr/src/uts/intel/io/acpica/debugger/dbutils.c
+++ b/usr/src/uts/intel/io/acpica/debugger/dbutils.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbutils - AML debugger utilities
- * $Revision: 1.81 $
+ * $Revision: 1.87 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -138,6 +138,8 @@ AcpiDbDumpBuffer (
UINT32 Address);
#endif
+static char *Converter = "0123456789ABCDEF";
+
/*******************************************************************************
*
@@ -246,8 +248,7 @@ AcpiDbDumpExternalObject (
{
case ACPI_TYPE_ANY:
- AcpiOsPrintf ("[Object Reference] = %p", ObjDesc->Reference.Handle);
- AcpiDmDisplayInternalObject (ObjDesc->Reference.Handle, NULL);
+ AcpiOsPrintf ("[Null Object] (Type=0)\n");
break;
@@ -298,7 +299,7 @@ AcpiDbDumpExternalObject (
case ACPI_TYPE_LOCAL_REFERENCE:
- AcpiOsPrintf ("[Object Reference] = %p", ObjDesc->Reference.Handle);
+ AcpiOsPrintf ("[Object Reference] = ");
AcpiDmDisplayInternalObject (ObjDesc->Reference.Handle, NULL);
break;
@@ -428,6 +429,47 @@ AcpiDbLocalNsLookup (
}
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDbUInt32ToHexString
+ *
+ * PARAMETERS: Value - The value to be converted to string
+ * Buffer - Buffer for result (not less than 11 bytes)
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Convert the unsigned 32-bit value to the hexadecimal image
+ *
+ * NOTE: It is the caller's responsibility to ensure that the length of buffer
+ * is sufficient.
+ *
+ ******************************************************************************/
+
+void
+AcpiDbUInt32ToHexString (
+ UINT32 Value,
+ char *Buffer)
+{
+ UINT8 i;
+
+
+ if (Value == 0)
+ {
+ ACPI_STRCPY (Buffer, "0");
+ return;
+ }
+
+ ACPI_STRCPY (Buffer, "0x");
+ Buffer[10] = '\0';
+
+ for (i = 9; i > 1; i--)
+ {
+ Buffer[i] = Converter [Value & 0x0F];
+ Value = Value >> 4;
+ }
+}
+
+
#ifdef ACPI_OBSOLETE_FUNCTIONS
/*******************************************************************************
*
diff --git a/usr/src/uts/intel/io/acpica/debugger/dbxface.c b/usr/src/uts/intel/io/acpica/debugger/dbxface.c
index fdc2ef797c..e82292630d 100644
--- a/usr/src/uts/intel/io/acpica/debugger/dbxface.c
+++ b/usr/src/uts/intel/io/acpica/debugger/dbxface.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbxface - AML Debugger external interfaces
- * $Revision: 1.77 $
+ * $Revision: 1.79 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/io/acpica/disassembler/dmbuffer.c b/usr/src/uts/intel/io/acpica/disassembler/dmbuffer.c
index 8f7bbb4c97..3f4cb50eac 100644
--- a/usr/src/uts/intel/io/acpica/disassembler/dmbuffer.c
+++ b/usr/src/uts/intel/io/acpica/disassembler/dmbuffer.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmbuffer - AML disassembler, buffer and string support
- * $Revision: 1.22 $
+ * $Revision: 1.26 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -143,7 +143,8 @@ AcpiDmUnicode (
*
* RETURN: None
*
- * DESCRIPTION: Dump an AML "ByteList" in Hex format
+ * DESCRIPTION: Dump an AML "ByteList" in Hex format. 8 bytes per line, prefixed
+ * with the hex buffer offset.
*
******************************************************************************/
@@ -161,12 +162,26 @@ AcpiDmDisasmByteList (
return;
}
- AcpiDmIndent (Level);
-
/* Dump the byte list */
for (i = 0; i < ByteCount; i++)
{
+ /* New line every 8 bytes */
+
+ if (((i % 8) == 0) && (i < ByteCount))
+ {
+ if (i > 0)
+ {
+ AcpiOsPrintf ("\n");
+ }
+
+ AcpiDmIndent (Level);
+ if (ByteCount > 7)
+ {
+ AcpiOsPrintf ("/* %04X */ ", i);
+ }
+ }
+
AcpiOsPrintf ("0x%2.2X", (UINT32) ByteData[i]);
/* Add comma if there are more bytes to display */
@@ -175,14 +190,6 @@ AcpiDmDisasmByteList (
{
AcpiOsPrintf (", ");
}
-
- /* New line every 8 bytes */
-
- if ((((i+1) % 8) == 0) && ((i+1) < ByteCount))
- {
- AcpiOsPrintf ("\n");
- AcpiDmIndent (Level);
- }
}
if (Level)
@@ -275,7 +282,7 @@ AcpiDmIsUnicodeBuffer (
UINT32 WordCount;
ACPI_PARSE_OBJECT *SizeOp;
ACPI_PARSE_OBJECT *NextOp;
- ACPI_NATIVE_UINT i;
+ UINT32 i;
/* Buffer size is the buffer argument */
@@ -313,7 +320,7 @@ AcpiDmIsUnicodeBuffer (
for (i = 0; i < (ByteCount - 2); i += 2)
{
if ((!ACPI_IS_PRINT (ByteData[i])) ||
- (ByteData[i + 1] != 0))
+ (ByteData[(ACPI_SIZE) i + 1] != 0))
{
return (FALSE);
}
@@ -434,54 +441,37 @@ AcpiDmUnicode (
/*******************************************************************************
*
- * FUNCTION: AcpiDmIsEisaId
+ * FUNCTION: AcpiDmIsEisaIdElement
*
* PARAMETERS: Op - Op to be examined
*
* RETURN: None
*
- * DESCRIPTION: Determine if an Op can be converted to an EisaId.
+ * DESCRIPTION: Determine if an Op (argument to _HID or _CID) can be converted
+ * to an EISA ID.
*
******************************************************************************/
void
-AcpiDmIsEisaId (
+AcpiDmIsEisaIdElement (
ACPI_PARSE_OBJECT *Op)
{
- UINT32 Name;
UINT32 BigEndianId;
- ACPI_PARSE_OBJECT *NextOp;
- ACPI_NATIVE_UINT i;
UINT32 Prefix[3];
+ UINT32 i;
- /* Get the NameSegment */
-
- Name = AcpiPsGetName (Op);
- if (!Name)
- {
- return;
- }
-
- /* We are looking for _HID */
-
- if (!ACPI_COMPARE_NAME (&Name, METHOD_NAME__HID))
- {
- return;
- }
-
/* The parameter must be either a word or a dword */
- NextOp = AcpiPsGetDepthNext (NULL, Op);
- if ((NextOp->Common.AmlOpcode != AML_DWORD_OP) &&
- (NextOp->Common.AmlOpcode != AML_WORD_OP))
+ if ((Op->Common.AmlOpcode != AML_DWORD_OP) &&
+ (Op->Common.AmlOpcode != AML_WORD_OP))
{
return;
}
/* Swap from little-endian to big-endian to simplify conversion */
- BigEndianId = AcpiUtDwordByteSwap ((UINT32) NextOp->Common.Value.Integer);
+ BigEndianId = AcpiUtDwordByteSwap ((UINT32) Op->Common.Value.Integer);
/* Create the 3 leading ASCII letters */
@@ -502,7 +492,79 @@ AcpiDmIsEisaId (
/* OK - mark this node as convertable to an EISA ID */
- NextOp->Common.DisasmOpcode = ACPI_DASM_EISAID;
+ Op->Common.DisasmOpcode = ACPI_DASM_EISAID;
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDmIsEisaId
+ *
+ * PARAMETERS: Op - Op to be examined
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Determine if a Name() Op can be converted to an EisaId.
+ *
+ ******************************************************************************/
+
+void
+AcpiDmIsEisaId (
+ ACPI_PARSE_OBJECT *Op)
+{
+ UINT32 Name;
+ ACPI_PARSE_OBJECT *NextOp;
+
+
+ /* Get the NameSegment */
+
+ Name = AcpiPsGetName (Op);
+ if (!Name)
+ {
+ return;
+ }
+
+ NextOp = AcpiPsGetDepthNext (NULL, Op);
+ if (!NextOp)
+ {
+ return;
+ }
+
+ /* Check for _HID - has one argument */
+
+ if (ACPI_COMPARE_NAME (&Name, METHOD_NAME__HID))
+ {
+ AcpiDmIsEisaIdElement (NextOp);
+ return;
+ }
+
+ /* Exit if not _CID */
+
+ if (!ACPI_COMPARE_NAME (&Name, METHOD_NAME__CID))
+ {
+ return;
+ }
+
+ /* _CID can contain a single argument or a package */
+
+ if (NextOp->Common.AmlOpcode != AML_PACKAGE_OP)
+ {
+ AcpiDmIsEisaIdElement (NextOp);
+ return;
+ }
+
+ /* _CID with Package: get the package length */
+
+ NextOp = AcpiPsGetDepthNext (NULL, NextOp);
+
+ /* Don't need to use the length, just walk the peer list */
+
+ NextOp = NextOp->Common.Next;
+ while (NextOp)
+ {
+ AcpiDmIsEisaIdElement (NextOp);
+ NextOp = NextOp->Common.Next;
+ }
}
diff --git a/usr/src/uts/intel/io/acpica/disassembler/dmnames.c b/usr/src/uts/intel/io/acpica/disassembler/dmnames.c
index 939f4b183b..bb9a31e39a 100644
--- a/usr/src/uts/intel/io/acpica/disassembler/dmnames.c
+++ b/usr/src/uts/intel/io/acpica/disassembler/dmnames.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmnames - AML disassembler, names, namestrings, pathnames
- * $Revision: 1.15 $
+ * $Revision: 1.19 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -150,16 +150,20 @@ AcpiDmDisplayPath (
UINT32
AcpiDmDumpName (
- char *Name)
+ UINT32 Name)
{
UINT32 i;
UINT32 Length;
char NewName[4];
+ /* Copy name locally in case the original name is not writeable */
+
+ *(UINT32 *) NewName = Name;
+
/* Ensure that the name is printable, even if we have to fix it */
- *(UINT32 *) NewName = AcpiUtRepairName (*(UINT32 *) Name);
+ AcpiUtRepairName (NewName);
/* Remove all trailing underscores from the name */
@@ -327,7 +331,7 @@ AcpiDmNamestring (
{
/* Append Name segment */
- AcpiDmDumpName ((char *) Name);
+ AcpiDmDumpName (*ACPI_CAST_PTR (UINT32, Name));
SegCount--;
if (SegCount)
diff --git a/usr/src/uts/intel/io/acpica/disassembler/dmobject.c b/usr/src/uts/intel/io/acpica/disassembler/dmobject.c
index d3756e8369..3e0f4dc738 100644
--- a/usr/src/uts/intel/io/acpica/disassembler/dmobject.c
+++ b/usr/src/uts/intel/io/acpica/disassembler/dmobject.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmobject - ACPI object decode and display
- * $Revision: 1.20 $
+ * $Revision: 1.24 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -116,10 +116,8 @@
#include "acpi.h"
-#include "amlcode.h"
#include "acnamesp.h"
#include "acdisasm.h"
-#include "acparser.h"
#ifdef ACPI_DISASSEMBLER
@@ -210,13 +208,16 @@ AcpiDmDumpMethodInfo (
if (NextWalkState == WalkState)
{
- /* Display currently executing ASL statement */
+ if (Op)
+ {
+ /* Display currently executing ASL statement */
- Next = Op->Common.Next;
- Op->Common.Next = NULL;
+ Next = Op->Common.Next;
+ Op->Common.Next = NULL;
- AcpiDmDisassemble (NextWalkState, Op, ACPI_UINT32_MAX);
- Op->Common.Next = Next;
+ AcpiDmDisassemble (NextWalkState, Op, ACPI_UINT32_MAX);
+ Op->Common.Next = Next;
+ }
}
else
{
@@ -349,7 +350,22 @@ AcpiDmDecodeNode (
AcpiOsPrintf (" [Method Local]");
}
- AcpiDmDecodeInternalObject (AcpiNsGetAttachedObject (Node));
+ switch (Node->Type)
+ {
+ /* These types have no attached object */
+
+ case ACPI_TYPE_DEVICE:
+ AcpiOsPrintf (" Device");
+ break;
+
+ case ACPI_TYPE_THERMAL:
+ AcpiOsPrintf (" Thermal Zone");
+ break;
+
+ default:
+ AcpiDmDecodeInternalObject (AcpiNsGetAttachedObject (Node));
+ break;
+ }
}
@@ -413,46 +429,44 @@ AcpiDmDisplayInternalObject (
{
case ACPI_TYPE_LOCAL_REFERENCE:
- switch (ObjDesc->Reference.Opcode)
+ AcpiOsPrintf ("[%s] ", AcpiUtGetReferenceName (ObjDesc));
+
+ /* Decode the refererence */
+
+ switch (ObjDesc->Reference.Class)
{
- case AML_LOCAL_OP:
+ case ACPI_REFCLASS_LOCAL:
- AcpiOsPrintf ("[Local%d] ", ObjDesc->Reference.Offset);
+ AcpiOsPrintf ("%X ", ObjDesc->Reference.Value);
if (WalkState)
{
- ObjDesc = WalkState->LocalVariables[
- ObjDesc->Reference.Offset].Object;
+ ObjDesc = WalkState->LocalVariables
+ [ObjDesc->Reference.Value].Object;
AcpiOsPrintf ("%p", ObjDesc);
AcpiDmDecodeInternalObject (ObjDesc);
}
break;
- case AML_ARG_OP:
+ case ACPI_REFCLASS_ARG:
- AcpiOsPrintf ("[Arg%d] ", ObjDesc->Reference.Offset);
+ AcpiOsPrintf ("%X ", ObjDesc->Reference.Value);
if (WalkState)
{
- ObjDesc = WalkState->Arguments[
- ObjDesc->Reference.Offset].Object;
+ ObjDesc = WalkState->Arguments
+ [ObjDesc->Reference.Value].Object;
AcpiOsPrintf ("%p", ObjDesc);
AcpiDmDecodeInternalObject (ObjDesc);
}
break;
- case AML_DEBUG_OP:
-
- AcpiOsPrintf ("[Debug] ");
- break;
-
+ case ACPI_REFCLASS_INDEX:
- case AML_INDEX_OP:
-
- AcpiOsPrintf ("[Index] ");
switch (ObjDesc->Reference.TargetType)
{
case ACPI_TYPE_BUFFER_FIELD:
+
AcpiOsPrintf ("%p", ObjDesc->Reference.Object);
AcpiDmDecodeInternalObject (ObjDesc->Reference.Object);
break;
@@ -462,7 +476,7 @@ AcpiDmDisplayInternalObject (
AcpiOsPrintf ("%p", ObjDesc->Reference.Where);
if (!ObjDesc->Reference.Where)
{
- AcpiOsPrintf (" Uninitialized WHERE ptr");
+ AcpiOsPrintf (" Uninitialized WHERE pointer");
}
else
{
@@ -472,25 +486,18 @@ AcpiDmDisplayInternalObject (
break;
default:
+
AcpiOsPrintf ("Unknown index target type");
break;
}
break;
- case AML_LOAD_OP:
-
- AcpiOsPrintf ("[DdbHandle] ");
- break;
-
-
- case AML_REF_OF_OP:
-
- AcpiOsPrintf ("[RefOf] ");
+ case ACPI_REFCLASS_REFOF:
if (!ObjDesc->Reference.Object)
{
- AcpiOsPrintf ("Uninitialized reference subobject ptr");
+ AcpiOsPrintf ("Uninitialized reference subobject pointer");
break;
}
@@ -511,20 +518,28 @@ AcpiDmDisplayInternalObject (
}
break;
- case AML_INT_NAMEPATH_OP:
+
+ case ACPI_REFCLASS_NAME:
AcpiDmDecodeNode (ObjDesc->Reference.Node);
break;
- default:
- AcpiOsPrintf ("Unknown Reference opcode %X (%s)\n",
- ObjDesc->Reference.Opcode,
- AcpiPsGetOpcodeName (ObjDesc->Reference.Opcode));
+ case ACPI_REFCLASS_DEBUG:
+ case ACPI_REFCLASS_TABLE:
+
+ AcpiOsPrintf ("\n");
+ break;
+
+
+ default: /* Unknown reference class */
+
+ AcpiOsPrintf ("%2.2X\n", ObjDesc->Reference.Class);
break;
}
break;
+
default:
AcpiOsPrintf ("<Obj> ");
@@ -537,7 +552,7 @@ AcpiDmDisplayInternalObject (
default:
AcpiOsPrintf ("<Not a valid ACPI Object Descriptor> [%s]",
- AcpiUtGetDescriptorName (ObjDesc));
+ AcpiUtGetDescriptorName (ObjDesc));
break;
}
diff --git a/usr/src/uts/intel/io/acpica/disassembler/dmopcode.c b/usr/src/uts/intel/io/acpica/disassembler/dmopcode.c
index 1d907e5bbb..7b398313c1 100644
--- a/usr/src/uts/intel/io/acpica/disassembler/dmopcode.c
+++ b/usr/src/uts/intel/io/acpica/disassembler/dmopcode.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmopcode - AML disassembler, specific AML opcodes
- * $Revision: 1.98 $
+ * $Revision: 1.106 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -202,8 +202,6 @@ AcpiDmFieldFlags (
UINT32 Flags;
- /* The next peer Op (not child op) contains the flags */
-
Op = Op->Common.Next;
Flags = (UINT8) Op->Common.Value.Integer;
@@ -376,6 +374,7 @@ AcpiDmDisassembleOneOp (
UINT32 Offset;
UINT32 Length;
ACPI_PARSE_OBJECT *Child;
+ ACPI_STATUS Status;
if (!Op)
@@ -405,6 +404,9 @@ AcpiDmDisassembleOneOp (
case AML_LLESS_OP:
AcpiOsPrintf ("LGreaterEqual");
break;
+
+ default:
+ break;
}
Op->Common.DisasmOpcode = 0;
Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
@@ -496,12 +498,19 @@ AcpiDmDisassembleOneOp (
* types of buffers, we have to closely look at the data in the
* buffer to determine the type.
*/
- if (AcpiDmIsResourceTemplate (Op))
+ Status = AcpiDmIsResourceTemplate (Op);
+ if (ACPI_SUCCESS (Status))
{
Op->Common.DisasmOpcode = ACPI_DASM_RESOURCE;
AcpiOsPrintf ("ResourceTemplate");
+ break;
}
- else if (AcpiDmIsUnicodeBuffer (Op))
+ else if (Status == AE_AML_NO_RESOURCE_END_TAG)
+ {
+ AcpiOsPrintf ("/**** Is ResourceTemplate, but EndTag not at buffer end ****/ ");
+ }
+
+ if (AcpiDmIsUnicodeBuffer (Op))
{
Op->Common.DisasmOpcode = ACPI_DASM_UNICODE;
AcpiOsPrintf ("Unicode (");
@@ -540,7 +549,7 @@ AcpiDmDisassembleOneOp (
case AML_INT_NAMEDFIELD_OP:
- Length = AcpiDmDumpName ((char *) &Op->Named.Name);
+ Length = AcpiDmDumpName (Op->Named.Name);
AcpiOsPrintf (",%*.s %d", (int) (5 - Length), " ",
(UINT32) Op->Common.Value.Integer);
AcpiDmCommaIfFieldMember (Op);
@@ -607,13 +616,15 @@ AcpiDmDisassembleOneOp (
if ((Op->Common.AmlOpcode == AML_INT_RETURN_VALUE_OP) &&
(WalkState) &&
(WalkState->Results) &&
- (WalkState->Results->Results.NumResults))
+ (WalkState->ResultCount))
{
AcpiDmDecodeInternalObject (
WalkState->Results->Results.ObjDesc [
- WalkState->Results->Results.NumResults-1]);
+ (WalkState->ResultCount - 1) %
+ ACPI_RESULTS_FRAME_OBJ_NUM]);
}
#endif
+
break;
}
}
diff --git a/usr/src/uts/intel/io/acpica/disassembler/dmresrc.c b/usr/src/uts/intel/io/acpica/disassembler/dmresrc.c
index 63e68926b6..e9aed02b77 100644
--- a/usr/src/uts/intel/io/acpica/disassembler/dmresrc.c
+++ b/usr/src/uts/intel/io/acpica/disassembler/dmresrc.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmresrc.c - Resource Descriptor disassembly
- * $Revision: 1.32 $
+ * $Revision: 1.36 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -133,7 +133,7 @@ void (*ACPI_RESOURCE_HANDLER) (
UINT32 Length,
UINT32 Level);
-static ACPI_RESOURCE_HANDLER AcpiGbl_DumpResourceDispatch [] =
+static ACPI_RESOURCE_HANDLER AcpiGbl_DmResourceDispatch [] =
{
/* Small descriptors */
@@ -248,8 +248,7 @@ AcpiDmDumpInteger64 (
UINT64 Value,
char *Name)
{
- AcpiOsPrintf ("0x%8.8X%8.8X, // %s\n",
- ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (Value)), Name);
+ AcpiOsPrintf ("0x%8.8X%8.8X, // %s\n", ACPI_FORMAT_UINT64 (Value), Name);
}
@@ -326,7 +325,7 @@ AcpiDmResourceTemplate (
UINT32 ByteCount)
{
ACPI_STATUS Status;
- ACPI_NATIVE_UINT CurrentByteOffset;
+ UINT32 CurrentByteOffset;
UINT8 ResourceType;
UINT32 ResourceLength;
void *Aml;
@@ -344,7 +343,7 @@ AcpiDmResourceTemplate (
Node = Node->Child;
}
- for (CurrentByteOffset = 0; CurrentByteOffset < ByteCount; )
+ for (CurrentByteOffset = 0; CurrentByteOffset < ByteCount;)
{
Aml = &ByteData[CurrentByteOffset];
@@ -424,7 +423,7 @@ AcpiDmResourceTemplate (
Node = Node->Peer;
}
- AcpiGbl_DumpResourceDispatch [ResourceIndex] (
+ AcpiGbl_DmResourceDispatch [ResourceIndex] (
Aml, ResourceLength, Level);
/* Descriptor post-processing */
@@ -444,15 +443,14 @@ AcpiDmResourceTemplate (
*
* PARAMETERS: Op - Buffer Op to be examined
*
- * RETURN: TRUE if this Buffer Op contains a valid resource
- * descriptor.
+ * RETURN: Status. AE_OK if valid template
*
* DESCRIPTION: Walk a byte list to determine if it consists of a valid set
* of resource descriptors. Nothing is output.
*
******************************************************************************/
-BOOLEAN
+ACPI_STATUS
AcpiDmIsResourceTemplate (
ACPI_PARSE_OBJECT *Op)
{
@@ -467,7 +465,7 @@ AcpiDmIsResourceTemplate (
if (Op->Common.AmlOpcode != AML_BUFFER_OP)
{
- return FALSE;
+ return (AE_TYPE);
}
/* Get the ByteData list and length */
@@ -476,7 +474,7 @@ AcpiDmIsResourceTemplate (
NextOp = NextOp->Common.Next;
if (!NextOp)
{
- return (FALSE);
+ return (AE_TYPE);
}
Aml = NextOp->Named.Data;
@@ -487,7 +485,7 @@ AcpiDmIsResourceTemplate (
Status = AcpiUtWalkAmlResources (Aml, Length, NULL, &EndAml);
if (ACPI_FAILURE (Status))
{
- return (FALSE);
+ return (AE_TYPE);
}
/*
@@ -498,14 +496,14 @@ AcpiDmIsResourceTemplate (
*/
if ((Aml + Length - sizeof (AML_RESOURCE_END_TAG)) != EndAml)
{
- return (FALSE);
+ return (AE_AML_NO_RESOURCE_END_TAG);
}
/*
* All resource descriptors are valid, therefore this list appears
* to be a valid resource template
*/
- return (TRUE);
+ return (AE_OK);
}
#endif
diff --git a/usr/src/uts/intel/io/acpica/disassembler/dmresrcl.c b/usr/src/uts/intel/io/acpica/disassembler/dmresrcl.c
index 514e139184..659554feb0 100644
--- a/usr/src/uts/intel/io/acpica/disassembler/dmresrcl.c
+++ b/usr/src/uts/intel/io/acpica/disassembler/dmresrcl.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmresrcl.c - "Large" Resource Descriptor disassembly
- * $Revision: 1.36 $
+ * $Revision: 1.38 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -215,7 +215,7 @@ AcpiDmMemoryFields (
UINT8 Type,
UINT32 Level)
{
- ACPI_NATIVE_UINT i;
+ UINT32 i;
for (i = 0; i < 4; i++)
@@ -261,7 +261,7 @@ AcpiDmAddressFields (
UINT8 Type,
UINT32 Level)
{
- ACPI_NATIVE_UINT i;
+ UINT32 i;
AcpiOsPrintf ("\n");
diff --git a/usr/src/uts/intel/io/acpica/disassembler/dmresrcs.c b/usr/src/uts/intel/io/acpica/disassembler/dmresrcs.c
index 86c9d9f8e5..c3c0c8a78e 100644
--- a/usr/src/uts/intel/io/acpica/disassembler/dmresrcs.c
+++ b/usr/src/uts/intel/io/acpica/disassembler/dmresrcs.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmresrcs.c - "Small" Resource Descriptor disassembly
- * $Revision: 1.15 $
+ * $Revision: 1.17 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/io/acpica/disassembler/dmutils.c b/usr/src/uts/intel/io/acpica/disassembler/dmutils.c
index ffcce5ca31..0b1313c2a0 100644
--- a/usr/src/uts/intel/io/acpica/disassembler/dmutils.c
+++ b/usr/src/uts/intel/io/acpica/disassembler/dmutils.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmutils - AML disassembler utilities
- * $Revision: 1.24 $
+ * $Revision: 1.26 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/io/acpica/disassembler/dmwalk.c b/usr/src/uts/intel/io/acpica/disassembler/dmwalk.c
index 69e38ff69d..b79a7ccd10 100644
--- a/usr/src/uts/intel/io/acpica/disassembler/dmwalk.c
+++ b/usr/src/uts/intel/io/acpica/disassembler/dmwalk.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dmwalk - AML disassembly tree walk
- * $Revision: 1.32 $
+ * $Revision: 1.35 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -622,7 +622,7 @@ AcpiDmDescendingOp (
}
else
{
- AcpiDmDumpName ((char *) &Name);
+ AcpiDmDumpName (Name);
}
if (Op->Common.AmlOpcode != AML_INT_NAMEDFIELD_OP)
diff --git a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsfield.c b/usr/src/uts/intel/io/acpica/dispatcher/dsfield.c
index 7f17d5ed4d..8e35db4bcc 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsfield.c
+++ b/usr/src/uts/intel/io/acpica/dispatcher/dsfield.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dsfield - Dispatcher field routines
- * $Revision: 1.83 $
+ * $Revision: 1.87 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -171,15 +171,18 @@ AcpiDsCreateBufferField (
ACPI_FUNCTION_TRACE (DsCreateBufferField);
- /* Get the NameString argument */
-
+ /*
+ * Get the NameString argument (name of the new BufferField)
+ */
if (Op->Common.AmlOpcode == AML_CREATE_FIELD_OP)
{
+ /* For CreateField, name is the 4th argument */
+
Arg = AcpiPsGetArg (Op, 3);
}
else
{
- /* Create Bit/Byte/Word/Dword field */
+ /* For all other CreateXXXField operators, name is the 3rd argument */
Arg = AcpiPsGetArg (Op, 2);
}
@@ -196,27 +199,30 @@ AcpiDsCreateBufferField (
}
else
{
- /*
- * During the load phase, we want to enter the name of the field into
- * the namespace. During the execute phase (when we evaluate the size
- * operand), we want to lookup the name
- */
- if (WalkState->ParseFlags & ACPI_PARSE_EXECUTE)
+ /* Execute flag should always be set when this function is entered */
+
+ if (!(WalkState->ParseFlags & ACPI_PARSE_EXECUTE))
{
- Flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE;
+ return_ACPI_STATUS (AE_AML_INTERNAL);
}
- else
+
+ /* Creating new namespace node, should not already exist */
+
+ Flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE |
+ ACPI_NS_ERROR_IF_FOUND;
+
+ /* Mark node temporary if we are executing a method */
+
+ if (WalkState->MethodNode)
{
- Flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE |
- ACPI_NS_ERROR_IF_FOUND;
+ Flags |= ACPI_NS_TEMPORARY;
}
- /*
- * Enter the NameString into the namespace
- */
+ /* Enter the NameString into the namespace */
+
Status = AcpiNsLookup (WalkState->ScopeInfo, Arg->Common.Value.String,
- ACPI_TYPE_ANY, ACPI_IMODE_LOAD_PASS1,
- Flags, WalkState, &(Node));
+ ACPI_TYPE_ANY, ACPI_IMODE_LOAD_PASS1,
+ Flags, WalkState, &Node);
if (ACPI_FAILURE (Status))
{
ACPI_ERROR_NAMESPACE (Arg->Common.Value.String, Status);
@@ -227,13 +233,13 @@ AcpiDsCreateBufferField (
/*
* We could put the returned object (Node) on the object stack for later,
* but for now, we will put it in the "op" object that the parser uses,
- * so we can get it again at the end of this scope
+ * so we can get it again at the end of this scope.
*/
Op->Common.Node = Node;
/*
* If there is no object attached to the node, this node was just created
- * and we need to create the field object. Otherwise, this was a lookup
+ * and we need to create the field object. Otherwise, this was a lookup
* of an existing node and we don't want to create the field object again.
*/
ObjDesc = AcpiNsGetAttachedObject (Node);
@@ -257,9 +263,8 @@ AcpiDsCreateBufferField (
}
/*
- * Remember location in AML stream of the field unit
- * opcode and operands -- since the buffer and index
- * operands must be evaluated.
+ * Remember location in AML stream of the field unit opcode and operands --
+ * since the buffer and index operands must be evaluated.
*/
SecondDesc = ObjDesc->Common.NextObject;
SecondDesc->Extra.AmlStart = Op->Named.Data;
@@ -364,34 +369,35 @@ AcpiDsGetFieldNames (
case AML_INT_NAMEDFIELD_OP:
- /* Lookup the name */
+ /* Lookup the name, it should already exist */
Status = AcpiNsLookup (WalkState->ScopeInfo,
- (char *) &Arg->Named.Name,
- Info->FieldType, ACPI_IMODE_EXECUTE,
- ACPI_NS_DONT_OPEN_SCOPE,
- WalkState, &Info->FieldNode);
+ (char *) &Arg->Named.Name, Info->FieldType,
+ ACPI_IMODE_EXECUTE, ACPI_NS_DONT_OPEN_SCOPE,
+ WalkState, &Info->FieldNode);
if (ACPI_FAILURE (Status))
{
ACPI_ERROR_NAMESPACE ((char *) &Arg->Named.Name, Status);
- if (Status != AE_ALREADY_EXISTS)
- {
- return_ACPI_STATUS (Status);
- }
-
- /* Already exists, ignore error */
+ return_ACPI_STATUS (Status);
}
else
{
Arg->Common.Node = Info->FieldNode;
Info->FieldBitLength = Arg->Common.Value.Size;
- /* Create and initialize an object for the new Field Node */
-
- Status = AcpiExPrepFieldValue (Info);
- if (ACPI_FAILURE (Status))
+ /*
+ * If there is no object attached to the node, this node was
+ * just created and we need to create the field object.
+ * Otherwise, this was a lookup of an existing node and we
+ * don't want to create the field object again.
+ */
+ if (!AcpiNsGetAttachedObject (Info->FieldNode))
{
- return_ACPI_STATUS (Status);
+ Status = AcpiExPrepFieldValue (Info);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
}
}
@@ -415,8 +421,7 @@ AcpiDsGetFieldNames (
default:
ACPI_ERROR ((AE_INFO,
- "Invalid opcode in field list: %X",
- Arg->Common.AmlOpcode));
+ "Invalid opcode in field list: %X", Arg->Common.AmlOpcode));
return_ACPI_STATUS (AE_AML_BAD_OPCODE);
}
@@ -511,11 +516,30 @@ AcpiDsInitFieldObjects (
ACPI_PARSE_OBJECT *Arg = NULL;
ACPI_NAMESPACE_NODE *Node;
UINT8 Type = 0;
+ UINT32 Flags;
ACPI_FUNCTION_TRACE_PTR (DsInitFieldObjects, Op);
+ /* Execute flag should always be set when this function is entered */
+
+ if (!(WalkState->ParseFlags & ACPI_PARSE_EXECUTE))
+ {
+ if (WalkState->ParseFlags & ACPI_PARSE_DEFERRED_OP)
+ {
+ /* BankField Op is deferred, just return OK */
+
+ return_ACPI_STATUS (AE_OK);
+ }
+
+ return_ACPI_STATUS (AE_AML_INTERNAL);
+ }
+
+ /*
+ * Get the FieldList argument for this opcode. This is the start of the
+ * list of field elements.
+ */
switch (WalkState->Opcode)
{
case AML_FIELD_OP:
@@ -537,21 +561,33 @@ AcpiDsInitFieldObjects (
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
+ /* Creating new namespace node(s), should not already exist */
+
+ Flags = ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE |
+ ACPI_NS_ERROR_IF_FOUND;
+
+ /* Mark node(s) temporary if we are executing a method */
+
+ if (WalkState->MethodNode)
+ {
+ Flags |= ACPI_NS_TEMPORARY;
+ }
+
/*
* Walk the list of entries in the FieldList
+ * Note: FieldList can be of zero length. In this case, Arg will be NULL.
*/
while (Arg)
{
- /* Ignore OFFSET and ACCESSAS terms here */
-
+ /*
+ * Ignore OFFSET and ACCESSAS terms here; we are only interested in the
+ * field names in order to enter them into the namespace.
+ */
if (Arg->Common.AmlOpcode == AML_INT_NAMEDFIELD_OP)
{
Status = AcpiNsLookup (WalkState->ScopeInfo,
- (char *) &Arg->Named.Name,
- Type, ACPI_IMODE_LOAD_PASS1,
- ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE |
- ACPI_NS_ERROR_IF_FOUND,
- WalkState, &Node);
+ (char *) &Arg->Named.Name, Type, ACPI_IMODE_LOAD_PASS1,
+ Flags, WalkState, &Node);
if (ACPI_FAILURE (Status))
{
ACPI_ERROR_NAMESPACE ((char *) &Arg->Named.Name, Status);
@@ -568,7 +604,7 @@ AcpiDsInitFieldObjects (
Arg->Common.Node = Node;
}
- /* Move to next field in the list */
+ /* Get the next field element in the list */
Arg = Arg->Common.Next;
}
@@ -583,7 +619,7 @@ AcpiDsInitFieldObjects (
*
* PARAMETERS: Op - Op containing the Field definition and args
* RegionNode - Object for the containing Operation Region
- * ` WalkState - Current method state
+ * WalkState - Current method state
*
* RETURN: Status
*
@@ -632,36 +668,13 @@ AcpiDsCreateBankField (
return_ACPI_STATUS (Status);
}
- /* Third arg is the BankValue */
-
- /* TBD: This arg is a TermArg, not a constant, and must be evaluated */
-
+ /*
+ * Third arg is the BankValue
+ * This arg is a TermArg, not a constant
+ * It will be evaluated later, by AcpiDsEvalBankFieldOperands
+ */
Arg = Arg->Common.Next;
- /* Currently, only the following constants are supported */
-
- switch (Arg->Common.AmlOpcode)
- {
- case AML_ZERO_OP:
- Info.BankValue = 0;
- break;
-
- case AML_ONE_OP:
- Info.BankValue = 1;
- break;
-
- case AML_BYTE_OP:
- case AML_WORD_OP:
- case AML_DWORD_OP:
- case AML_QWORD_OP:
- Info.BankValue = (UINT32) Arg->Common.Value.Integer;
- break;
-
- default:
- Info.BankValue = 0;
- ACPI_ERROR ((AE_INFO, "Non-constant BankValue for BankField is not implemented"));
- }
-
/* Fourth arg is the field flags */
Arg = Arg->Common.Next;
@@ -672,8 +685,17 @@ AcpiDsCreateBankField (
Info.FieldType = ACPI_TYPE_LOCAL_BANK_FIELD;
Info.RegionNode = RegionNode;
- Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Common.Next);
+ /*
+ * Use Info.DataRegisterNode to store BankField Op
+ * It's safe because DataRegisterNode will never be used when create bank field
+ * We store AmlStart and AmlLength in the BankField Op for late evaluation
+ * Used in AcpiExPrepFieldValue(Info)
+ *
+ * TBD: Or, should we add a field in ACPI_CREATE_FIELD_INFO, like "void *ParentOp"?
+ */
+ Info.DataRegisterNode = (ACPI_NAMESPACE_NODE*) Op;
+ Status = AcpiDsGetFieldNames (&Info, WalkState, Arg->Common.Next);
return_ACPI_STATUS (Status);
}
diff --git a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsinit.c b/usr/src/uts/intel/io/acpica/dispatcher/dsinit.c
index 4ead117b08..3f00b51348 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsinit.c
+++ b/usr/src/uts/intel/io/acpica/dispatcher/dsinit.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dsinit - Object initialization namespace walk
- * $Revision: 1.25 $
+ * $Revision: 1.29 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -119,6 +119,7 @@
#include "acpi.h"
#include "acdispat.h"
#include "acnamesp.h"
+#include "actables.h"
#define _COMPONENT ACPI_DISPATCHER
ACPI_MODULE_NAME ("dsinit")
@@ -173,7 +174,7 @@ AcpiDsInitOneObject (
* We are only interested in NS nodes owned by the table that
* was just loaded
*/
- if (Node->OwnerId != Info->TableDesc->OwnerId)
+ if (Node->OwnerId != Info->OwnerId)
{
return (AE_OK);
}
@@ -240,16 +241,24 @@ AcpiDsInitOneObject (
ACPI_STATUS
AcpiDsInitializeObjects (
- ACPI_TABLE_DESC *TableDesc,
+ UINT32 TableIndex,
ACPI_NAMESPACE_NODE *StartNode)
{
ACPI_STATUS Status;
ACPI_INIT_WALK_INFO Info;
+ ACPI_TABLE_HEADER *Table;
+ ACPI_OWNER_ID OwnerId;
ACPI_FUNCTION_TRACE (DsInitializeObjects);
+ Status = AcpiTbGetOwnerId (TableIndex, &OwnerId);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"**** Starting initialization of namespace objects ****\n"));
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "Parsing all Control Methods:"));
@@ -258,7 +267,8 @@ AcpiDsInitializeObjects (
Info.OpRegionCount = 0;
Info.ObjectCount = 0;
Info.DeviceCount = 0;
- Info.TableDesc = TableDesc;
+ Info.TableIndex = TableIndex;
+ Info.OwnerId = OwnerId;
/* Walk entire namespace from the supplied root */
@@ -269,9 +279,15 @@ AcpiDsInitializeObjects (
ACPI_EXCEPTION ((AE_INFO, Status, "During WalkNamespace"));
}
+ Status = AcpiGetTableByIndex (TableIndex, &Table);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
"\nTable [%4.4s](id %4.4X) - %hd Objects with %hd Devices %hd Methods %hd Regions\n",
- TableDesc->Pointer->Signature, TableDesc->OwnerId, Info.ObjectCount,
+ Table->Signature, OwnerId, Info.ObjectCount,
Info.DeviceCount, Info.MethodCount, Info.OpRegionCount));
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
diff --git a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsmethod.c b/usr/src/uts/intel/io/acpica/dispatcher/dsmethod.c
index cbb6869bd6..4b7ded59a6 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsmethod.c
+++ b/usr/src/uts/intel/io/acpica/dispatcher/dsmethod.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dsmethod - Parser/Interpreter interface - control method parsing
- * $Revision: 1.131 $
+ * $Revision: 1.140 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -117,7 +117,6 @@
#define __DSMETHOD_C__
#include "acpi.h"
-#include "acparser.h"
#include "amlcode.h"
#include "acdispat.h"
#include "acinterp.h"
@@ -183,9 +182,11 @@ AcpiDsMethodError (
WalkState->MethodNode ?
WalkState->MethodNode->Name.Integer : 0,
WalkState->Opcode, WalkState->AmlOffset, NULL);
- (void) AcpiExEnterInterpreter ();
+ AcpiExEnterInterpreter ();
}
+ AcpiDsClearImplicitReturn (WalkState);
+
#ifdef ACPI_DISASSEMBLER
if (ACPI_FAILURE (Status))
{
@@ -329,8 +330,8 @@ AcpiDsBeginMethodExecution (
* recursive call.
*/
if (!WalkState ||
- !ObjDesc->Method.Mutex->Mutex.OwnerThread ||
- (WalkState->Thread != ObjDesc->Method.Mutex->Mutex.OwnerThread))
+ !ObjDesc->Method.Mutex->Mutex.ThreadId ||
+ (WalkState->Thread->ThreadId != ObjDesc->Method.Mutex->Mutex.ThreadId))
{
/*
* Acquire the method mutex. This releases the interpreter if we
@@ -350,7 +351,7 @@ AcpiDsBeginMethodExecution (
ObjDesc->Method.Mutex->Mutex.OriginalSyncLevel =
WalkState->Thread->CurrentSyncLevel;
- ObjDesc->Method.Mutex->Mutex.OwnerThread = WalkState->Thread;
+ ObjDesc->Method.Mutex->Mutex.ThreadId = WalkState->Thread->ThreadId;
WalkState->Thread->CurrentSyncLevel = ObjDesc->Method.SyncLevel;
}
else
@@ -384,6 +385,7 @@ AcpiDsBeginMethodExecution (
* reentered one more time (even if it is the same thread)
*/
ObjDesc->Method.ThreadCount++;
+ AcpiMethodCount++;
return_ACPI_STATUS (Status);
@@ -428,7 +430,7 @@ AcpiDsCallControlMethod (
ACPI_FUNCTION_TRACE_PTR (DsCallControlMethod, ThisWalkState);
- ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Execute method %p, currentstate=%p\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Calling method %p, currentstate=%p\n",
ThisWalkState->PrevOp, ThisWalkState));
/*
@@ -455,51 +457,7 @@ AcpiDsCallControlMethod (
return_ACPI_STATUS (Status);
}
- /*
- * 1) Parse the method. All "normal" methods are parsed for each execution.
- * Internal methods (_OSI, etc.) do not require parsing.
- */
- if (!(ObjDesc->Method.MethodFlags & AML_METHOD_INTERNAL_ONLY))
- {
- /* Create a new walk state for the parse */
-
- NextWalkState = AcpiDsCreateWalkState (ObjDesc->Method.OwnerId,
- Op, ObjDesc, NULL);
- if (!NextWalkState)
- {
- Status = AE_NO_MEMORY;
- goto Cleanup;
- }
-
- /* Create and init a parse tree root */
-
- Op = AcpiPsCreateScopeOp ();
- if (!Op)
- {
- Status = AE_NO_MEMORY;
- goto Cleanup;
- }
-
- Status = AcpiDsInitAmlWalk (NextWalkState, Op, MethodNode,
- ObjDesc->Method.AmlStart, ObjDesc->Method.AmlLength,
- NULL, 1);
- if (ACPI_FAILURE (Status))
- {
- AcpiPsDeleteParseTree (Op);
- goto Cleanup;
- }
-
- /* Begin AML parse (deletes NextWalkState) */
-
- Status = AcpiPsParseAml (NextWalkState);
- AcpiPsDeleteParseTree (Op);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
- }
-
- /* 2) Begin method execution. Create a new walk state */
+ /* Begin method parse/execution. Create a new walk state */
NextWalkState = AcpiDsCreateWalkState (ObjDesc->Method.OwnerId,
NULL, ObjDesc, Thread);
@@ -528,11 +486,10 @@ AcpiDsCallControlMethod (
}
Info->Parameters = &ThisWalkState->Operands[0];
- Info->ParameterType = ACPI_PARAM_ARGS;
Status = AcpiDsInitAmlWalk (NextWalkState, NULL, MethodNode,
ObjDesc->Method.AmlStart, ObjDesc->Method.AmlLength,
- Info, 3);
+ Info, ACPI_IMODE_EXECUTE);
ACPI_FREE (Info);
if (ACPI_FAILURE (Status))
@@ -555,7 +512,8 @@ AcpiDsCallControlMethod (
ThisWalkState->NumOperands = 0;
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
- "Starting nested execution, newstate=%p\n", NextWalkState));
+ "**** Begin nested execution of [%4.4s] **** WalkState=%p\n",
+ MethodNode->Name.Ascii, NextWalkState));
/* Invoke an internal method if necessary */
@@ -694,9 +652,6 @@ AcpiDsTerminateControlMethod (
ACPI_OPERAND_OBJECT *MethodDesc,
ACPI_WALK_STATE *WalkState)
{
- ACPI_NAMESPACE_NODE *MethodNode;
- ACPI_STATUS Status;
-
ACPI_FUNCTION_TRACE_PTR (DsTerminateControlMethod, WalkState);
@@ -713,34 +668,25 @@ AcpiDsTerminateControlMethod (
/* Delete all arguments and locals */
AcpiDsMethodDataDeleteAll (WalkState);
- }
-
- /*
- * If method is serialized, release the mutex and restore the
- * current sync level for this thread
- */
- if (MethodDesc->Method.Mutex)
- {
- /* Acquisition Depth handles recursive calls */
- MethodDesc->Method.Mutex->Mutex.AcquisitionDepth--;
- if (!MethodDesc->Method.Mutex->Mutex.AcquisitionDepth)
+ /*
+ * If method is serialized, release the mutex and restore the
+ * current sync level for this thread
+ */
+ if (MethodDesc->Method.Mutex)
{
- WalkState->Thread->CurrentSyncLevel =
- MethodDesc->Method.Mutex->Mutex.OriginalSyncLevel;
+ /* Acquisition Depth handles recursive calls */
- AcpiOsReleaseMutex (MethodDesc->Method.Mutex->Mutex.OsMutex);
- MethodDesc->Method.Mutex->Mutex.OwnerThread = NULL;
- }
- }
+ MethodDesc->Method.Mutex->Mutex.AcquisitionDepth--;
+ if (!MethodDesc->Method.Mutex->Mutex.AcquisitionDepth)
+ {
+ WalkState->Thread->CurrentSyncLevel =
+ MethodDesc->Method.Mutex->Mutex.OriginalSyncLevel;
- if (WalkState)
- {
- /*
- * Delete any objects created by this method during execution.
- * The method Node is stored in the walk state
- */
- MethodNode = WalkState->MethodNode;
+ AcpiOsReleaseMutex (MethodDesc->Method.Mutex->Mutex.OsMutex);
+ MethodDesc->Method.Mutex->Mutex.ThreadId = 0;
+ }
+ }
/*
* Delete any namespace objects created anywhere within
@@ -790,7 +736,7 @@ AcpiDsTerminateControlMethod (
if ((MethodDesc->Method.MethodFlags & AML_METHOD_SERIALIZED) &&
(!MethodDesc->Method.Mutex))
{
- Status = AcpiDsCreateMethodMutex (MethodDesc);
+ (void) AcpiDsCreateMethodMutex (MethodDesc);
}
/* No more threads, we can free the OwnerId */
diff --git a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsmthdat.c b/usr/src/uts/intel/io/acpica/dispatcher/dsmthdat.c
index c649f10fd9..53096899d3 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsmthdat.c
+++ b/usr/src/uts/intel/io/acpica/dispatcher/dsmthdat.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dsmthdat - control method arguments and local variables
- * $Revision: 1.91 $
+ * $Revision: 1.94 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -118,7 +118,6 @@
#include "acpi.h"
#include "acdispat.h"
-#include "amlcode.h"
#include "acnamesp.h"
#include "acinterp.h"
@@ -130,13 +129,13 @@
static void
AcpiDsMethodDataDeleteValue (
- UINT16 Opcode,
+ UINT8 Type,
UINT32 Index,
ACPI_WALK_STATE *WalkState);
static ACPI_STATUS
AcpiDsMethodDataSetValue (
- UINT16 Opcode,
+ UINT8 Type,
UINT32 Index,
ACPI_OPERAND_OBJECT *Object,
ACPI_WALK_STATE *WalkState);
@@ -263,6 +262,8 @@ AcpiDsMethodDataDeleteAll (
}
}
+ AcpiDsClearImplicitReturn (WalkState);
+
return_VOID;
}
@@ -313,7 +314,7 @@ AcpiDsMethodDataInitArgs (
* Store the argument in the method/walk descriptor.
* Do not copy the arg in order to implement call by reference
*/
- Status = AcpiDsMethodDataSetValue (AML_ARG_OP, Index,
+ Status = AcpiDsMethodDataSetValue (ACPI_REFCLASS_ARG, Index,
Params[Index], WalkState);
if (ACPI_FAILURE (Status))
{
@@ -332,7 +333,8 @@ AcpiDsMethodDataInitArgs (
*
* FUNCTION: AcpiDsMethodDataGetNode
*
- * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
+ * PARAMETERS: Type - Either ACPI_REFCLASS_LOCAL or
+ * ACPI_REFCLASS_ARG
* Index - Which Local or Arg whose type to get
* WalkState - Current walk state object
* Node - Where the node is returned.
@@ -345,7 +347,7 @@ AcpiDsMethodDataInitArgs (
ACPI_STATUS
AcpiDsMethodDataGetNode (
- UINT16 Opcode,
+ UINT8 Type,
UINT32 Index,
ACPI_WALK_STATE *WalkState,
ACPI_NAMESPACE_NODE **Node)
@@ -356,9 +358,9 @@ AcpiDsMethodDataGetNode (
/*
* Method Locals and Arguments are supported
*/
- switch (Opcode)
+ switch (Type)
{
- case AML_LOCAL_OP:
+ case ACPI_REFCLASS_LOCAL:
if (Index > ACPI_METHOD_MAX_LOCAL)
{
@@ -373,7 +375,7 @@ AcpiDsMethodDataGetNode (
*Node = &WalkState->LocalVariables[Index];
break;
- case AML_ARG_OP:
+ case ACPI_REFCLASS_ARG:
if (Index > ACPI_METHOD_MAX_ARG)
{
@@ -389,8 +391,8 @@ AcpiDsMethodDataGetNode (
break;
default:
- ACPI_ERROR ((AE_INFO, "Opcode %d is invalid", Opcode));
- return_ACPI_STATUS (AE_AML_BAD_OPCODE);
+ ACPI_ERROR ((AE_INFO, "Type %d is invalid", Type));
+ return_ACPI_STATUS (AE_TYPE);
}
return_ACPI_STATUS (AE_OK);
@@ -401,7 +403,8 @@ AcpiDsMethodDataGetNode (
*
* FUNCTION: AcpiDsMethodDataSetValue
*
- * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
+ * PARAMETERS: Type - Either ACPI_REFCLASS_LOCAL or
+ * ACPI_REFCLASS_ARG
* Index - Which Local or Arg to get
* Object - Object to be inserted into the stack entry
* WalkState - Current walk state object
@@ -415,7 +418,7 @@ AcpiDsMethodDataGetNode (
static ACPI_STATUS
AcpiDsMethodDataSetValue (
- UINT16 Opcode,
+ UINT8 Type,
UINT32 Index,
ACPI_OPERAND_OBJECT *Object,
ACPI_WALK_STATE *WalkState)
@@ -428,13 +431,13 @@ AcpiDsMethodDataSetValue (
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
- "NewObj %p Opcode %X, Refs=%d [%s]\n", Object,
- Opcode, Object->Common.ReferenceCount,
+ "NewObj %p Type %2.2X, Refs=%d [%s]\n", Object,
+ Type, Object->Common.ReferenceCount,
AcpiUtGetTypeName (Object->Common.Type)));
/* Get the namespace node for the arg/local */
- Status = AcpiDsMethodDataGetNode (Opcode, Index, WalkState, &Node);
+ Status = AcpiDsMethodDataGetNode (Type, Index, WalkState, &Node);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -459,7 +462,8 @@ AcpiDsMethodDataSetValue (
*
* FUNCTION: AcpiDsMethodDataGetValue
*
- * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
+ * PARAMETERS: Type - Either ACPI_REFCLASS_LOCAL or
+ * ACPI_REFCLASS_ARG
* Index - Which localVar or argument to get
* WalkState - Current walk state object
* DestDesc - Where Arg or Local value is returned
@@ -473,7 +477,7 @@ AcpiDsMethodDataSetValue (
ACPI_STATUS
AcpiDsMethodDataGetValue (
- UINT16 Opcode,
+ UINT8 Type,
UINT32 Index,
ACPI_WALK_STATE *WalkState,
ACPI_OPERAND_OBJECT **DestDesc)
@@ -496,7 +500,7 @@ AcpiDsMethodDataGetValue (
/* Get the namespace node for the arg/local */
- Status = AcpiDsMethodDataGetNode (Opcode, Index, WalkState, &Node);
+ Status = AcpiDsMethodDataGetNode (Type, Index, WalkState, &Node);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -534,9 +538,9 @@ AcpiDsMethodDataGetValue (
/* Otherwise, return the error */
- else switch (Opcode)
+ else switch (Type)
{
- case AML_ARG_OP:
+ case ACPI_REFCLASS_ARG:
ACPI_ERROR ((AE_INFO,
"Uninitialized Arg[%d] at node %p",
@@ -544,16 +548,16 @@ AcpiDsMethodDataGetValue (
return_ACPI_STATUS (AE_AML_UNINITIALIZED_ARG);
- case AML_LOCAL_OP:
+ case ACPI_REFCLASS_LOCAL:
ACPI_ERROR ((AE_INFO,
- "Uninitialized Local[%d] at node %p",
- Index, Node));
+ "Uninitialized Local[%d] at node %p", Index, Node));
return_ACPI_STATUS (AE_AML_UNINITIALIZED_LOCAL);
default:
- ACPI_ERROR ((AE_INFO, "Not a Arg/Local opcode: %X", Opcode));
+
+ ACPI_ERROR ((AE_INFO, "Not a Arg/Local opcode: %X", Type));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
}
@@ -573,7 +577,8 @@ AcpiDsMethodDataGetValue (
*
* FUNCTION: AcpiDsMethodDataDeleteValue
*
- * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
+ * PARAMETERS: Type - Either ACPI_REFCLASS_LOCAL or
+ * ACPI_REFCLASS_ARG
* Index - Which localVar or argument to delete
* WalkState - Current walk state object
*
@@ -586,7 +591,7 @@ AcpiDsMethodDataGetValue (
static void
AcpiDsMethodDataDeleteValue (
- UINT16 Opcode,
+ UINT8 Type,
UINT32 Index,
ACPI_WALK_STATE *WalkState)
{
@@ -600,7 +605,7 @@ AcpiDsMethodDataDeleteValue (
/* Get the namespace node for the arg/local */
- Status = AcpiDsMethodDataGetNode (Opcode, Index, WalkState, &Node);
+ Status = AcpiDsMethodDataGetNode (Type, Index, WalkState, &Node);
if (ACPI_FAILURE (Status))
{
return_VOID;
@@ -636,7 +641,8 @@ AcpiDsMethodDataDeleteValue (
*
* FUNCTION: AcpiDsStoreObjectToLocal
*
- * PARAMETERS: Opcode - Either AML_LOCAL_OP or AML_ARG_OP
+ * PARAMETERS: Type - Either ACPI_REFCLASS_LOCAL or
+ * ACPI_REFCLASS_ARG
* Index - Which Local or Arg to set
* ObjDesc - Value to be stored
* WalkState - Current walk state
@@ -651,7 +657,7 @@ AcpiDsMethodDataDeleteValue (
ACPI_STATUS
AcpiDsStoreObjectToLocal (
- UINT16 Opcode,
+ UINT8 Type,
UINT32 Index,
ACPI_OPERAND_OBJECT *ObjDesc,
ACPI_WALK_STATE *WalkState)
@@ -663,8 +669,8 @@ AcpiDsStoreObjectToLocal (
ACPI_FUNCTION_TRACE (DsStoreObjectToLocal);
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Opcode=%X Index=%d Obj=%p\n",
- Opcode, Index, ObjDesc));
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Type=%2.2X Index=%d Obj=%p\n",
+ Type, Index, ObjDesc));
/* Parameter validation */
@@ -675,7 +681,7 @@ AcpiDsStoreObjectToLocal (
/* Get the namespace node for the arg/local */
- Status = AcpiDsMethodDataGetNode (Opcode, Index, WalkState, &Node);
+ Status = AcpiDsMethodDataGetNode (Type, Index, WalkState, &Node);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -730,7 +736,7 @@ AcpiDsStoreObjectToLocal (
*
* Weird, but true.
*/
- if (Opcode == AML_ARG_OP)
+ if (Type == ACPI_REFCLASS_ARG)
{
/*
* If we have a valid reference object that came from RefOf(),
@@ -738,7 +744,7 @@ AcpiDsStoreObjectToLocal (
*/
if ((ACPI_GET_DESCRIPTOR_TYPE (CurrentObjDesc) == ACPI_DESC_TYPE_OPERAND) &&
(CurrentObjDesc->Common.Type == ACPI_TYPE_LOCAL_REFERENCE) &&
- (CurrentObjDesc->Reference.Opcode == AML_REF_OF_OP))
+ (CurrentObjDesc->Reference.Class == ACPI_REFCLASS_REFOF))
{
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"Arg (%p) is an ObjRef(Node), storing in node %p\n",
@@ -763,11 +769,9 @@ AcpiDsStoreObjectToLocal (
}
}
- /*
- * Delete the existing object
- * before storing the new one
- */
- AcpiDsMethodDataDeleteValue (Opcode, Index, WalkState);
+ /* Delete the existing object before storing the new one */
+
+ AcpiDsMethodDataDeleteValue (Type, Index, WalkState);
}
/*
@@ -775,7 +779,7 @@ AcpiDsStoreObjectToLocal (
* the descriptor for the Arg or Local.
* (increments the object reference count by one)
*/
- Status = AcpiDsMethodDataSetValue (Opcode, Index, NewObjDesc, WalkState);
+ Status = AcpiDsMethodDataSetValue (Type, Index, NewObjDesc, WalkState);
/* Remove local reference if we copied the object above */
diff --git a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsobject.c b/usr/src/uts/intel/io/acpica/dispatcher/dsobject.c
index 54867104a3..11096c2a9e 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsobject.c
+++ b/usr/src/uts/intel/io/acpica/dispatcher/dsobject.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dsobject - Dispatcher object management routines
- * $Revision: 1.133 $
+ * $Revision: 1.140 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -212,23 +212,70 @@ AcpiDsBuildInternalObject (
}
}
- /*
- * If this is a reference to a common data type, resolve it immediately.
- * According to the ACPI spec, package elements can be "data objects" or
- * method references.
- */
- switch (Op->Common.Node->Type)
+ /* Special object resolution for elements of a package */
+
+ if ((Op->Common.Parent->Common.AmlOpcode == AML_PACKAGE_OP) ||
+ (Op->Common.Parent->Common.AmlOpcode == AML_VAR_PACKAGE_OP))
{
- case ACPI_TYPE_INTEGER:
- case ACPI_TYPE_BUFFER:
- case ACPI_TYPE_STRING:
- case ACPI_TYPE_PACKAGE:
- ObjDesc = Op->Common.Node->Object;
- AcpiUtAddReference (ObjDesc);
- goto Exit;
+ /*
+ * Attempt to resolve the node to a value before we insert it into
+ * the package. If this is a reference to a common data type,
+ * resolve it immediately. According to the ACPI spec, package
+ * elements can only be "data objects" or method references.
+ * Attempt to resolve to an Integer, Buffer, String or Package.
+ * If cannot, return the named reference (for things like Devices,
+ * Methods, etc.) Buffer Fields and Fields will resolve to simple
+ * objects (int/buf/str/pkg).
+ *
+ * NOTE: References to things like Devices, Methods, Mutexes, etc.
+ * will remain as named references. This behavior is not described
+ * in the ACPI spec, but it appears to be an oversight.
+ */
+ ObjDesc = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, Op->Common.Node);
- default:
- break;
+ Status = AcpiExResolveNodeToValue (
+ ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE, &ObjDesc),
+ WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ switch (Op->Common.Node->Type)
+ {
+ /*
+ * For these types, we need the actual node, not the subobject.
+ * However, the subobject did not get an extra reference count above.
+ *
+ * TBD: should ExResolveNodeToValue be changed to fix this?
+ */
+ case ACPI_TYPE_DEVICE:
+ case ACPI_TYPE_THERMAL:
+
+ AcpiUtAddReference (Op->Common.Node->Object);
+
+ /*lint -fallthrough */
+ /*
+ * For these types, we need the actual node, not the subobject.
+ * The subobject got an extra reference count in ExResolveNodeToValue.
+ */
+ case ACPI_TYPE_MUTEX:
+ case ACPI_TYPE_METHOD:
+ case ACPI_TYPE_POWER:
+ case ACPI_TYPE_PROCESSOR:
+ case ACPI_TYPE_EVENT:
+ case ACPI_TYPE_REGION:
+
+ /* We will create a reference object for these types below */
+ break;
+
+ default:
+ /*
+ * All other types - the node was resolved to an actual
+ * object, we are done.
+ */
+ goto Exit;
+ }
}
}
@@ -251,7 +298,7 @@ AcpiDsBuildInternalObject (
Exit:
*ObjDescPtr = ObjDesc;
- return_ACPI_STATUS (AE_OK);
+ return_ACPI_STATUS (Status);
}
@@ -412,7 +459,9 @@ AcpiDsBuildInternalPackageObj (
ACPI_PARSE_OBJECT *Parent;
ACPI_OPERAND_OBJECT *ObjDesc = NULL;
ACPI_STATUS Status = AE_OK;
- ACPI_NATIVE_UINT i;
+ UINT32 i;
+ UINT16 Index;
+ UINT16 ReferenceCount;
ACPI_FUNCTION_TRACE (DsBuildInternalPackageObj);
@@ -472,24 +521,83 @@ AcpiDsBuildInternalPackageObj (
{
if (Arg->Common.AmlOpcode == AML_INT_RETURN_VALUE_OP)
{
- /* This package element is already built, just get it */
+ if (Arg->Common.Node->Type == ACPI_TYPE_METHOD)
+ {
+ /*
+ * A method reference "looks" to the parser to be a method
+ * invocation, so we special case it here
+ */
+ Arg->Common.AmlOpcode = AML_INT_NAMEPATH_OP;
+ Status = AcpiDsBuildInternalObject (WalkState, Arg,
+ &ObjDesc->Package.Elements[i]);
+ }
+ else
+ {
+ /* This package element is already built, just get it */
- ObjDesc->Package.Elements[i] =
- ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, Arg->Common.Node);
+ ObjDesc->Package.Elements[i] =
+ ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, Arg->Common.Node);
+ }
}
else
{
Status = AcpiDsBuildInternalObject (WalkState, Arg,
&ObjDesc->Package.Elements[i]);
}
+
+ if (*ObjDescPtr)
+ {
+ /* Existing package, get existing reference count */
+
+ ReferenceCount = (*ObjDescPtr)->Common.ReferenceCount;
+ if (ReferenceCount > 1)
+ {
+ /* Make new element ref count match original ref count */
+
+ for (Index = 0; Index < (ReferenceCount - 1); Index++)
+ {
+ AcpiUtAddReference ((ObjDesc->Package.Elements[i]));
+ }
+ }
+ }
+
Arg = Arg->Common.Next;
}
- if (!Arg)
+ /* Check for match between NumElements and actual length of PackageList */
+
+ if (Arg)
+ {
+ /*
+ * NumElements was exhausted, but there are remaining elements in the
+ * PackageList.
+ *
+ * Note: technically, this is an error, from ACPI spec: "It is an error
+ * for NumElements to be less than the number of elements in the
+ * PackageList". However, for now, we just print an error message and
+ * no exception is returned.
+ */
+ while (Arg)
+ {
+ /* Find out how many elements there really are */
+
+ i++;
+ Arg = Arg->Common.Next;
+ }
+
+ ACPI_ERROR ((AE_INFO,
+ "Package List length (%X) larger than NumElements count (%X), truncated\n",
+ i, ElementCount));
+ }
+ else if (i < ElementCount)
{
+ /*
+ * Arg list (elements) was exhausted, but we did not reach NumElements count.
+ * Note: this is not an error, the package is padded out with NULLs.
+ */
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "Package List length larger than NumElements count (%X), truncated\n",
- ElementCount));
+ "Package List length (%X) smaller than NumElements count (%X), padded with null elements\n",
+ i, ElementCount));
}
ObjDesc->Package.Flags |= AOPOBJ_DATA_VALID;
@@ -731,45 +839,59 @@ AcpiDsInitObjectFromOp (
{
case AML_TYPE_LOCAL_VARIABLE:
- /* Split the opcode into a base opcode + offset */
+ /* Local ID (0-7) is (AML opcode - base AML_LOCAL_OP) */
- ObjDesc->Reference.Opcode = AML_LOCAL_OP;
- ObjDesc->Reference.Offset = Opcode - AML_LOCAL_OP;
+ ObjDesc->Reference.Value = Opcode - AML_LOCAL_OP;
+ ObjDesc->Reference.Class = ACPI_REFCLASS_LOCAL;
#ifndef ACPI_NO_METHOD_EXECUTION
- Status = AcpiDsMethodDataGetNode (AML_LOCAL_OP,
- ObjDesc->Reference.Offset,
- WalkState,
- (ACPI_NAMESPACE_NODE **) &ObjDesc->Reference.Object);
+ Status = AcpiDsMethodDataGetNode (ACPI_REFCLASS_LOCAL,
+ ObjDesc->Reference.Value, WalkState,
+ ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE,
+ &ObjDesc->Reference.Object));
#endif
break;
case AML_TYPE_METHOD_ARGUMENT:
- /* Split the opcode into a base opcode + offset */
+ /* Arg ID (0-6) is (AML opcode - base AML_ARG_OP) */
- ObjDesc->Reference.Opcode = AML_ARG_OP;
- ObjDesc->Reference.Offset = Opcode - AML_ARG_OP;
+ ObjDesc->Reference.Value = Opcode - AML_ARG_OP;
+ ObjDesc->Reference.Class = ACPI_REFCLASS_ARG;
#ifndef ACPI_NO_METHOD_EXECUTION
- Status = AcpiDsMethodDataGetNode (AML_ARG_OP,
- ObjDesc->Reference.Offset,
- WalkState,
- (ACPI_NAMESPACE_NODE **) &ObjDesc->Reference.Object);
+ Status = AcpiDsMethodDataGetNode (ACPI_REFCLASS_ARG,
+ ObjDesc->Reference.Value, WalkState,
+ ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE,
+ &ObjDesc->Reference.Object));
#endif
break;
- default: /* Other literals, etc.. */
+ default: /* Object name or Debug object */
- if (Op->Common.AmlOpcode == AML_INT_NAMEPATH_OP)
+ switch (Op->Common.AmlOpcode)
{
+ case AML_INT_NAMEPATH_OP:
+
/* Node was saved in Op */
ObjDesc->Reference.Node = Op->Common.Node;
- }
+ ObjDesc->Reference.Object = Op->Common.Node->Object;
+ ObjDesc->Reference.Class = ACPI_REFCLASS_NAME;
+ break;
- ObjDesc->Reference.Opcode = Opcode;
+ case AML_DEBUG_OP:
+
+ ObjDesc->Reference.Class = ACPI_REFCLASS_DEBUG;
+ break;
+
+ default:
+
+ ACPI_ERROR ((AE_INFO,
+ "Unimplemented reference type for AML opcode: %4.4X", Opcode));
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
+ }
break;
}
break;
diff --git a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsopcode.c b/usr/src/uts/intel/io/acpica/dispatcher/dsopcode.c
index b5e5675fa0..43e417d2da 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsopcode.c
+++ b/usr/src/uts/intel/io/acpica/dispatcher/dsopcode.c
@@ -2,7 +2,7 @@
*
* Module Name: dsopcode - Dispatcher Op Region support and handling of
* "control" opcodes
- * $Revision: 1.108 $
+ * $Revision: 1.115 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -124,6 +124,7 @@
#include "acinterp.h"
#include "acnamesp.h"
#include "acevents.h"
+#include "actables.h"
#define _COMPONENT ACPI_DISPATCHER
ACPI_MODULE_NAME ("dsopcode")
@@ -200,7 +201,7 @@ AcpiDsExecuteArguments (
}
Status = AcpiDsInitAmlWalk (WalkState, Op, NULL, AmlStart,
- AmlLength, NULL, 1);
+ AmlLength, NULL, ACPI_IMODE_LOAD_PASS1);
if (ACPI_FAILURE (Status))
{
AcpiDsDeleteWalkState (WalkState);
@@ -247,7 +248,7 @@ AcpiDsExecuteArguments (
/* Execute the opcode and arguments */
Status = AcpiDsInitAmlWalk (WalkState, Op, NULL, AmlStart,
- AmlLength, NULL, 3);
+ AmlLength, NULL, ACPI_IMODE_EXECUTE);
if (ACPI_FAILURE (Status))
{
AcpiDsDeleteWalkState (WalkState);
@@ -314,6 +315,53 @@ AcpiDsGetBufferFieldArguments (
/*******************************************************************************
*
+ * FUNCTION: AcpiDsGetBankFieldArguments
+ *
+ * PARAMETERS: ObjDesc - A valid BankField object
+ *
+ * RETURN: Status.
+ *
+ * DESCRIPTION: Get BankField BankValue. This implements the late
+ * evaluation of these field attributes.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDsGetBankFieldArguments (
+ ACPI_OPERAND_OBJECT *ObjDesc)
+{
+ ACPI_OPERAND_OBJECT *ExtraDesc;
+ ACPI_NAMESPACE_NODE *Node;
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE_PTR (DsGetBankFieldArguments, ObjDesc);
+
+
+ if (ObjDesc->Common.Flags & AOPOBJ_DATA_VALID)
+ {
+ return_ACPI_STATUS (AE_OK);
+ }
+
+ /* Get the AML pointer (method object) and BankField node */
+
+ ExtraDesc = AcpiNsGetSecondaryObject (ObjDesc);
+ Node = ObjDesc->BankField.Node;
+
+ ACPI_DEBUG_EXEC(AcpiUtDisplayInitPathname (ACPI_TYPE_LOCAL_BANK_FIELD, Node, NULL));
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] BankField Arg Init\n",
+ AcpiUtGetNodeName (Node)));
+
+ /* Execute the AML code for the TermArg arguments */
+
+ Status = AcpiDsExecuteArguments (Node, AcpiNsGetParentNode (Node),
+ ExtraDesc->Extra.AmlLength, ExtraDesc->Extra.AmlStart);
+ return_ACPI_STATUS (Status);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDsGetBufferArguments
*
* PARAMETERS: ObjDesc - A valid Buffer object
@@ -778,11 +826,6 @@ AcpiDsEvalBufferFieldOperands (
Status = AcpiExResolveOperands (Op->Common.AmlOpcode,
ACPI_WALK_OPERANDS, WalkState);
-
- ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS, ACPI_IMODE_EXECUTE,
- AcpiPsGetOpcodeName (Op->Common.AmlOpcode),
- WalkState->NumOperands, "after AcpiExResolveOperands");
-
if (ACPI_FAILURE (Status))
{
ACPI_ERROR ((AE_INFO, "(%s) bad operand(s) (%X)",
@@ -874,10 +917,6 @@ AcpiDsEvalRegionOperands (
return_ACPI_STATUS (Status);
}
- ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS, ACPI_IMODE_EXECUTE,
- AcpiPsGetOpcodeName (Op->Common.AmlOpcode),
- 1, "after AcpiExResolveOperands");
-
ObjDesc = AcpiNsGetAttachedObject (Node);
if (!ObjDesc)
{
@@ -905,7 +944,113 @@ AcpiDsEvalRegionOperands (
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
ObjDesc,
- ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
+ ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
+ ObjDesc->Region.Length));
+
+ /* Now the address and length are valid for this opregion */
+
+ ObjDesc->Region.Flags |= AOPOBJ_DATA_VALID;
+
+ return_ACPI_STATUS (Status);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDsEvalTableRegionOperands
+ *
+ * PARAMETERS: WalkState - Current walk
+ * Op - A valid region Op object
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Get region address and length
+ * Called from AcpiDsExecEndOp during DataTableRegion parse tree walk
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDsEvalTableRegionOperands (
+ ACPI_WALK_STATE *WalkState,
+ ACPI_PARSE_OBJECT *Op)
+{
+ ACPI_STATUS Status;
+ ACPI_OPERAND_OBJECT *ObjDesc;
+ ACPI_OPERAND_OBJECT **Operand;
+ ACPI_NAMESPACE_NODE *Node;
+ ACPI_PARSE_OBJECT *NextOp;
+ UINT32 TableIndex;
+ ACPI_TABLE_HEADER *Table;
+
+
+ ACPI_FUNCTION_TRACE_PTR (DsEvalTableRegionOperands, Op);
+
+
+ /*
+ * This is where we evaluate the SignatureString and OemIDString
+ * and OemTableIDString of the DataTableRegion declaration
+ */
+ Node = Op->Common.Node;
+
+ /* NextOp points to SignatureString op */
+
+ NextOp = Op->Common.Value.Arg;
+
+ /*
+ * Evaluate/create the SignatureString and OemIDString
+ * and OemTableIDString operands
+ */
+ Status = AcpiDsCreateOperands (WalkState, NextOp);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ /*
+ * Resolve the SignatureString and OemIDString
+ * and OemTableIDString operands
+ */
+ Status = AcpiExResolveOperands (Op->Common.AmlOpcode,
+ ACPI_WALK_OPERANDS, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ Operand = &WalkState->Operands[0];
+
+ /* Find the ACPI table */
+
+ Status = AcpiTbFindTable (Operand[0]->String.Pointer,
+ Operand[1]->String.Pointer, Operand[2]->String.Pointer,
+ &TableIndex);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ AcpiUtRemoveReference (Operand[0]);
+ AcpiUtRemoveReference (Operand[1]);
+ AcpiUtRemoveReference (Operand[2]);
+
+ Status = AcpiGetTableByIndex (TableIndex, &Table);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ ObjDesc = AcpiNsGetAttachedObject (Node);
+ if (!ObjDesc)
+ {
+ return_ACPI_STATUS (AE_NOT_EXIST);
+ }
+
+ ObjDesc->Region.Address = (ACPI_PHYSICAL_ADDRESS) ACPI_TO_INTEGER (Table);
+ ObjDesc->Region.Length = Table->Length;
+
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
+ ObjDesc,
+ ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
ObjDesc->Region.Length));
/* Now the address and length are valid for this opregion */
@@ -947,6 +1092,12 @@ AcpiDsEvalDataObjectOperands (
/* The first operand (for all of these data objects) is the length */
+ /*
+ * Set proper index into operand stack for AcpiDsObjStackPush
+ * invoked inside AcpiDsCreateOperand.
+ */
+ WalkState->OperandIndex = WalkState->NumOperands;
+
Status = AcpiDsCreateOperand (WalkState, Op->Common.Value.Arg, 1);
if (ACPI_FAILURE (Status))
{
@@ -1018,6 +1169,111 @@ AcpiDsEvalDataObjectOperands (
/*******************************************************************************
*
+ * FUNCTION: AcpiDsEvalBankFieldOperands
+ *
+ * PARAMETERS: WalkState - Current walk
+ * Op - A valid BankField Op object
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Get BankField BankValue
+ * Called from AcpiDsExecEndOp during BankField parse tree walk
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDsEvalBankFieldOperands (
+ ACPI_WALK_STATE *WalkState,
+ ACPI_PARSE_OBJECT *Op)
+{
+ ACPI_STATUS Status;
+ ACPI_OPERAND_OBJECT *ObjDesc;
+ ACPI_OPERAND_OBJECT *OperandDesc;
+ ACPI_NAMESPACE_NODE *Node;
+ ACPI_PARSE_OBJECT *NextOp;
+ ACPI_PARSE_OBJECT *Arg;
+
+
+ ACPI_FUNCTION_TRACE_PTR (DsEvalBankFieldOperands, Op);
+
+
+ /*
+ * This is where we evaluate the BankValue field of the
+ * BankField declaration
+ */
+
+ /* NextOp points to the op that holds the Region */
+
+ NextOp = Op->Common.Value.Arg;
+
+ /* NextOp points to the op that holds the Bank Register */
+
+ NextOp = NextOp->Common.Next;
+
+ /* NextOp points to the op that holds the Bank Value */
+
+ NextOp = NextOp->Common.Next;
+
+ /*
+ * Set proper index into operand stack for AcpiDsObjStackPush
+ * invoked inside AcpiDsCreateOperand.
+ *
+ * We use WalkState->Operands[0] to store the evaluated BankValue
+ */
+ WalkState->OperandIndex = 0;
+
+ Status = AcpiDsCreateOperand (WalkState, NextOp, 0);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ Status = AcpiExResolveToValue (&WalkState->Operands[0], WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS,
+ AcpiPsGetOpcodeName (Op->Common.AmlOpcode), 1);
+ /*
+ * Get the BankValue operand and save it
+ * (at Top of stack)
+ */
+ OperandDesc = WalkState->Operands[0];
+
+ /* Arg points to the start Bank Field */
+
+ Arg = AcpiPsGetArg (Op, 4);
+ while (Arg)
+ {
+ /* Ignore OFFSET and ACCESSAS terms here */
+
+ if (Arg->Common.AmlOpcode == AML_INT_NAMEDFIELD_OP)
+ {
+ Node = Arg->Common.Node;
+
+ ObjDesc = AcpiNsGetAttachedObject (Node);
+ if (!ObjDesc)
+ {
+ return_ACPI_STATUS (AE_NOT_EXIST);
+ }
+
+ ObjDesc->BankField.Value = (UINT32) OperandDesc->Integer.Value;
+ }
+
+ /* Move to next field in the list */
+
+ Arg = Arg->Common.Next;
+ }
+
+ AcpiUtRemoveReference (OperandDesc);
+ return_ACPI_STATUS (Status);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDsExecBeginControlOp
*
* PARAMETERS: WalkList - The list that owns the walk stack
@@ -1217,8 +1473,7 @@ AcpiDsExecEndControlOp (
*/
WalkState->ReturnDesc = WalkState->Operands[0];
}
- else if ((WalkState->Results) &&
- (WalkState->Results->Results.NumResults > 0))
+ else if (WalkState->ResultCount)
{
/* Since we have a real Return(), delete any implicit return */
@@ -1235,7 +1490,7 @@ AcpiDsExecEndControlOp (
*/
if ((ACPI_GET_DESCRIPTOR_TYPE (WalkState->Results->Results.ObjDesc[0]) == ACPI_DESC_TYPE_OPERAND) &&
(ACPI_GET_OBJECT_TYPE (WalkState->Results->Results.ObjDesc [0]) == ACPI_TYPE_LOCAL_REFERENCE) &&
- ((WalkState->Results->Results.ObjDesc [0])->Reference.Opcode != AML_INDEX_OP))
+ ((WalkState->Results->Results.ObjDesc [0])->Reference.Class != ACPI_REFCLASS_INDEX))
{
Status = AcpiExResolveToValue (&WalkState->Results->Results.ObjDesc [0], WalkState);
if (ACPI_FAILURE (Status))
diff --git a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsutils.c b/usr/src/uts/intel/io/acpica/dispatcher/dsutils.c
index 496df6767b..78a2eb97f5 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dsutils.c
+++ b/usr/src/uts/intel/io/acpica/dispatcher/dsutils.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dsutils - Dispatcher utilities
- * $Revision: 1.121 $
+ * $Revision: 1.127 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -374,7 +374,8 @@ AcpiDsIsResultUsed (
(Op->Common.Parent->Common.AmlOpcode == AML_PACKAGE_OP) ||
(Op->Common.Parent->Common.AmlOpcode == AML_VAR_PACKAGE_OP) ||
(Op->Common.Parent->Common.AmlOpcode == AML_BUFFER_OP) ||
- (Op->Common.Parent->Common.AmlOpcode == AML_INT_EVAL_SUBTREE_OP))
+ (Op->Common.Parent->Common.AmlOpcode == AML_INT_EVAL_SUBTREE_OP) ||
+ (Op->Common.Parent->Common.AmlOpcode == AML_BANK_FIELD_OP))
{
/*
* These opcodes allow TermArg(s) as operands and therefore
@@ -593,7 +594,8 @@ AcpiDsCreateOperand (
/* A valid name must be looked up in the namespace */
if ((Arg->Common.AmlOpcode == AML_INT_NAMEPATH_OP) &&
- (Arg->Common.Value.String))
+ (Arg->Common.Value.String) &&
+ !(Arg->Common.Flags & ACPI_PARSEOP_IN_STACK))
{
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Getting a name: Arg=%p\n", Arg));
@@ -715,7 +717,8 @@ AcpiDsCreateOperand (
{
/* Check for null name case */
- if (Arg->Common.AmlOpcode == AML_INT_NAMEPATH_OP)
+ if ((Arg->Common.AmlOpcode == AML_INT_NAMEPATH_OP) &&
+ !(Arg->Common.Flags & ACPI_PARSEOP_IN_STACK))
{
/*
* If the name is null, this means that this is an
@@ -741,7 +744,7 @@ AcpiDsCreateOperand (
return_ACPI_STATUS (AE_NOT_IMPLEMENTED);
}
- if (OpInfo->Flags & AML_HAS_RETVAL)
+ if ((OpInfo->Flags & AML_HAS_RETVAL) || (Arg->Common.Flags & ACPI_PARSEOP_IN_STACK))
{
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"Argument previously created, already stacked\n"));
@@ -753,7 +756,7 @@ AcpiDsCreateOperand (
* Use value that was already previously returned
* by the evaluation of this argument
*/
- Status = AcpiDsResultPopFromBottom (&ObjDesc, WalkState);
+ Status = AcpiDsResultPop (&ObjDesc, WalkState);
if (ACPI_FAILURE (Status))
{
/*
@@ -823,30 +826,57 @@ AcpiDsCreateOperands (
{
ACPI_STATUS Status = AE_OK;
ACPI_PARSE_OBJECT *Arg;
+ ACPI_PARSE_OBJECT *Arguments[ACPI_OBJ_NUM_OPERANDS];
UINT32 ArgCount = 0;
+ UINT32 Index = WalkState->NumOperands;
+ UINT32 i;
ACPI_FUNCTION_TRACE_PTR (DsCreateOperands, FirstArg);
- /* For all arguments in the list... */
+ /* Get all arguments in the list */
Arg = FirstArg;
while (Arg)
{
- Status = AcpiDsCreateOperand (WalkState, Arg, ArgCount);
- if (ACPI_FAILURE (Status))
+ if (Index >= ACPI_OBJ_NUM_OPERANDS)
{
- goto Cleanup;
+ return_ACPI_STATUS (AE_BAD_DATA);
}
- ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Arg #%d (%p) done, Arg1=%p\n",
- ArgCount, Arg, FirstArg));
+ Arguments[Index] = Arg;
+ WalkState->Operands [Index] = NULL;
/* Move on to next argument, if any */
Arg = Arg->Common.Next;
ArgCount++;
+ Index++;
+ }
+
+ Index--;
+
+ /* It is the appropriate order to get objects from the Result stack */
+
+ for (i = 0; i < ArgCount; i++)
+ {
+ Arg = Arguments[Index];
+
+ /* Force the filling of the operand stack in inverse order */
+
+ WalkState->OperandIndex = (UINT8) Index;
+
+ Status = AcpiDsCreateOperand (WalkState, Arg, Index);
+ if (ACPI_FAILURE (Status))
+ {
+ goto Cleanup;
+ }
+
+ Index--;
+
+ ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Arg #%d (%p) done, Arg1=%p\n",
+ Index, Arg, FirstArg));
}
return_ACPI_STATUS (Status);
@@ -858,11 +888,122 @@ Cleanup:
* pop everything off of the operand stack and delete those
* objects
*/
- (void) AcpiDsObjStackPopAndDelete (ArgCount, WalkState);
+ AcpiDsObjStackPopAndDelete (ArgCount, WalkState);
- ACPI_EXCEPTION ((AE_INFO, Status, "While creating Arg %d",
- (ArgCount + 1)));
+ ACPI_EXCEPTION ((AE_INFO, Status, "While creating Arg %d", Index));
return_ACPI_STATUS (Status);
}
+/*****************************************************************************
+ *
+ * FUNCTION: AcpiDsEvaluateNamePath
+ *
+ * PARAMETERS: WalkState - Current state of the parse tree walk,
+ * the opcode of current operation should be
+ * AML_INT_NAMEPATH_OP
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Translate the -NamePath- parse tree object to the equivalent
+ * interpreter object, convert it to value, if needed, duplicate
+ * it, if needed, and push it onto the current result stack.
+ *
+ ****************************************************************************/
+
+ACPI_STATUS
+AcpiDsEvaluateNamePath (
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_STATUS Status = AE_OK;
+ ACPI_PARSE_OBJECT *Op = WalkState->Op;
+ ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];
+ ACPI_OPERAND_OBJECT *NewObjDesc;
+ UINT8 Type;
+
+
+ ACPI_FUNCTION_TRACE_PTR (DsEvaluateNamePath, WalkState);
+
+
+ if (!Op->Common.Parent)
+ {
+ /* This happens after certain exception processing */
+
+ goto Exit;
+ }
+
+ if ((Op->Common.Parent->Common.AmlOpcode == AML_PACKAGE_OP) ||
+ (Op->Common.Parent->Common.AmlOpcode == AML_VAR_PACKAGE_OP) ||
+ (Op->Common.Parent->Common.AmlOpcode == AML_REF_OF_OP))
+ {
+ /* TBD: Should we specify this feature as a bit of OpInfo->Flags of these opcodes? */
+
+ goto Exit;
+ }
+
+ Status = AcpiDsCreateOperand (WalkState, Op, 0);
+ if (ACPI_FAILURE (Status))
+ {
+ goto Exit;
+ }
+
+ if (Op->Common.Flags & ACPI_PARSEOP_TARGET)
+ {
+ NewObjDesc = *Operand;
+ goto PushResult;
+ }
+
+ Type = ACPI_GET_OBJECT_TYPE (*Operand);
+
+ Status = AcpiExResolveToValue (Operand, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ goto Exit;
+ }
+
+ if (Type == ACPI_TYPE_INTEGER)
+ {
+ /* It was incremented by AcpiExResolveToValue */
+
+ AcpiUtRemoveReference (*Operand);
+
+ Status = AcpiUtCopyIobjectToIobject (*Operand, &NewObjDesc, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ goto Exit;
+ }
+ }
+ else
+ {
+ /*
+ * The object either was anew created or is
+ * a Namespace node - don't decrement it.
+ */
+ NewObjDesc = *Operand;
+ }
+
+ /* Cleanup for name-path operand */
+
+ Status = AcpiDsObjStackPop (1, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ WalkState->ResultObj = NewObjDesc;
+ goto Exit;
+ }
+
+PushResult:
+
+ WalkState->ResultObj = NewObjDesc;
+
+ Status = AcpiDsResultPush (WalkState->ResultObj, WalkState);
+ if (ACPI_SUCCESS (Status))
+ {
+ /* Force to take it from stack */
+
+ Op->Common.Flags |= ACPI_PARSEOP_IN_STACK;
+ }
+
+Exit:
+
+ return_ACPI_STATUS (Status);
+}
diff --git a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswexec.c b/usr/src/uts/intel/io/acpica/dispatcher/dswexec.c
index 4b84880880..3e6e8b0756 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswexec.c
+++ b/usr/src/uts/intel/io/acpica/dispatcher/dswexec.c
@@ -2,7 +2,7 @@
*
* Module Name: dswexec - Dispatcher method execution callbacks;
* dispatch to interpreter.
- * $Revision: 1.130 $
+ * $Revision: 1.138 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -315,7 +315,7 @@ AcpiDsExecBeginOp (
Status = AcpiDsLoad2BeginOp (WalkState, OutOp);
if (ACPI_FAILURE (Status))
{
- return_ACPI_STATUS (Status);
+ goto ErrorExit;
}
Op = *OutOp;
@@ -332,7 +332,7 @@ AcpiDsExecBeginOp (
Status = AcpiDsScopeStackPop (WalkState);
if (ACPI_FAILURE (Status))
{
- return_ACPI_STATUS (Status);
+ goto ErrorExit;
}
}
}
@@ -383,12 +383,6 @@ AcpiDsExecBeginOp (
{
case AML_CLASS_CONTROL:
- Status = AcpiDsResultStackPush (WalkState);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
Status = AcpiDsExecBeginControlOp (WalkState, Op);
break;
@@ -406,23 +400,12 @@ AcpiDsExecBeginOp (
Status = AcpiDsLoad2BeginOp (WalkState, NULL);
}
- if (Op->Common.AmlOpcode == AML_REGION_OP)
- {
- Status = AcpiDsResultStackPush (WalkState);
- }
break;
case AML_CLASS_EXECUTE:
case AML_CLASS_CREATE:
- /*
- * Most operators with arguments (except CreateXxxField operators)
- * Start a new result/operand state
- */
- if (WalkState->OpInfo->ObjectType != ACPI_TYPE_BUFFER_FIELD)
- {
- Status = AcpiDsResultStackPush (WalkState);
- }
+
break;
@@ -433,6 +416,11 @@ AcpiDsExecBeginOp (
/* Nothing to do here during method execution */
return_ACPI_STATUS (Status);
+
+
+ErrorExit:
+ Status = AcpiDsMethodError (Status, WalkState);
+ return_ACPI_STATUS (Status);
}
@@ -480,6 +468,7 @@ AcpiDsExecEndOp (
/* Init the walk state */
WalkState->NumOperands = 0;
+ WalkState->OperandIndex = 0;
WalkState->ReturnDesc = NULL;
WalkState->ResultObj = NULL;
@@ -492,11 +481,20 @@ AcpiDsExecEndOp (
switch (OpClass)
{
- case AML_CLASS_ARGUMENT: /* constants, literals, etc. - do nothing */
+ case AML_CLASS_ARGUMENT: /* Constants, literals, etc. */
+
+ if (WalkState->Opcode == AML_INT_NAMEPATH_OP)
+ {
+ Status = AcpiDsEvaluateNamePath (WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ goto Cleanup;
+ }
+ }
break;
- case AML_CLASS_EXECUTE: /* most operators with arguments */
+ case AML_CLASS_EXECUTE: /* Most operators with arguments */
/* Build resolved operand stack */
@@ -506,14 +504,6 @@ AcpiDsExecEndOp (
goto Cleanup;
}
- /* Done with this result state (Now that operand stack is built) */
-
- Status = AcpiDsResultStackPop (WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
-
/*
* All opcodes require operand resolution, with the only exceptions
* being the ObjectType and SizeOf operators.
@@ -525,12 +515,6 @@ AcpiDsExecEndOp (
Status = AcpiExResolveOperands (WalkState->Opcode,
&(WalkState->Operands [WalkState->NumOperands -1]),
WalkState);
- if (ACPI_SUCCESS (Status))
- {
- ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS, ACPI_IMODE_EXECUTE,
- AcpiPsGetOpcodeName (WalkState->Opcode),
- WalkState->NumOperands, "after ExResolveOperands");
- }
}
if (ACPI_SUCCESS (Status))
@@ -552,10 +536,10 @@ AcpiDsExecEndOp (
(WalkState->Opcode == AML_STORE_OP) &&
(WalkState->Operands[0]->Common.Type == ACPI_TYPE_LOCAL_REFERENCE) &&
(WalkState->Operands[1]->Common.Type == ACPI_TYPE_LOCAL_REFERENCE) &&
- (WalkState->Operands[0]->Reference.Opcode ==
- WalkState->Operands[1]->Reference.Opcode) &&
- (WalkState->Operands[0]->Reference.Offset ==
- WalkState->Operands[1]->Reference.Offset))
+ (WalkState->Operands[0]->Reference.Class ==
+ WalkState->Operands[1]->Reference.Class) &&
+ (WalkState->Operands[0]->Reference.Value ==
+ WalkState->Operands[1]->Reference.Value))
{
Status = AE_OK;
}
@@ -593,20 +577,6 @@ AcpiDsExecEndOp (
Status = AcpiDsExecEndControlOp (WalkState, Op);
- /* Make sure to properly pop the result stack */
-
- if (ACPI_SUCCESS (Status))
- {
- Status = AcpiDsResultStackPop (WalkState);
- }
- else if (Status == AE_CTRL_PENDING)
- {
- Status = AcpiDsResultStackPop (WalkState);
- if (ACPI_SUCCESS (Status))
- {
- Status = AE_CTRL_PENDING;
- }
- }
break;
@@ -624,7 +594,7 @@ AcpiDsExecEndOp (
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"Method Reference in a Package, Op=%p\n", Op));
- Op->Common.Node = (ACPI_NAMESPACE_NODE *) Op->Asl.Value.Arg->Asl.Node->Object;
+ Op->Common.Node = (ACPI_NAMESPACE_NODE *) Op->Asl.Value.Arg->Asl.Node;
AcpiUtAddReference (Op->Asl.Value.Arg->Asl.Node->Object);
return_ACPI_STATUS (AE_OK);
}
@@ -733,14 +703,6 @@ AcpiDsExecEndOp (
break;
}
- /* Done with result state (Now that operand stack is built) */
-
- Status = AcpiDsResultStackPop (WalkState);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
-
/*
* If a result object was returned from above, push it on the
* current result stack
@@ -773,8 +735,28 @@ AcpiDsExecEndOp (
{
break;
}
+ }
+ else if (Op->Common.AmlOpcode == AML_DATA_REGION_OP)
+ {
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ "Executing DataTableRegion Strings Op=%p\n", Op));
+
+ Status = AcpiDsEvalTableRegionOperands (WalkState, Op);
+ if (ACPI_FAILURE (Status))
+ {
+ break;
+ }
+ }
+ else if (Op->Common.AmlOpcode == AML_BANK_FIELD_OP)
+ {
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ "Executing BankField Op=%p\n", Op));
- Status = AcpiDsResultStackPop (WalkState);
+ Status = AcpiDsEvalBankFieldOperands (WalkState, Op);
+ if (ACPI_FAILURE (Status))
+ {
+ break;
+ }
}
break;
diff --git a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswload.c b/usr/src/uts/intel/io/acpica/dispatcher/dswload.c
index 1abe72c5fa..21d56dbd52 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswload.c
+++ b/usr/src/uts/intel/io/acpica/dispatcher/dswload.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswload - Dispatcher namespace load callbacks
- * $Revision: 1.112 $
+ * $Revision: 1.120 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -281,6 +281,7 @@ AcpiDsLoad1BeginOp (
*/
switch (Node->Type)
{
+ case ACPI_TYPE_ANY:
case ACPI_TYPE_LOCAL_SCOPE: /* Scope */
case ACPI_TYPE_DEVICE:
case ACPI_TYPE_POWER:
@@ -533,6 +534,15 @@ AcpiDsLoad1EndOp (
return_ACPI_STATUS (Status);
}
}
+ else if (Op->Common.AmlOpcode == AML_DATA_REGION_OP)
+ {
+ Status = AcpiExCreateRegion (Op->Named.Data, Op->Named.Length,
+ REGION_DATA_TABLE, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+ }
}
#endif
@@ -635,6 +645,7 @@ AcpiDsLoad2BeginOp (
ACPI_STATUS Status;
ACPI_OBJECT_TYPE ObjectType;
char *BufferPtr;
+ UINT32 Flags;
ACPI_FUNCTION_TRACE (DsLoad2BeginOp);
@@ -766,6 +777,7 @@ AcpiDsLoad2BeginOp (
*/
switch (Node->Type)
{
+ case ACPI_TYPE_ANY:
case ACPI_TYPE_LOCAL_SCOPE: /* Scope */
case ACPI_TYPE_DEVICE:
case ACPI_TYPE_POWER:
@@ -845,11 +857,25 @@ AcpiDsLoad2BeginOp (
break;
}
- /* Add new entry into namespace */
+ Flags = ACPI_NS_NO_UPSEARCH;
+ if (WalkState->PassNumber == ACPI_IMODE_EXECUTE)
+ {
+ /* Execution mode, node cannot already exist, node is temporary */
+
+ Flags |= (ACPI_NS_ERROR_IF_FOUND | ACPI_NS_TEMPORARY);
+ }
+
+ /* Add new entry or lookup existing entry */
Status = AcpiNsLookup (WalkState->ScopeInfo, BufferPtr, ObjectType,
- ACPI_IMODE_LOAD_PASS2, ACPI_NS_NO_UPSEARCH,
- WalkState, &(Node));
+ ACPI_IMODE_LOAD_PASS2, Flags, WalkState, &Node);
+
+ if (ACPI_SUCCESS (Status) && (Flags & ACPI_NS_TEMPORARY))
+ {
+ ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
+ "***New Node [%4.4s] %p is temporary\n",
+ AcpiUtGetNodeName (Node), Node));
+ }
break;
}
@@ -912,6 +938,7 @@ AcpiDsLoad2EndOp (
ACPI_NAMESPACE_NODE *NewNode;
#ifndef ACPI_NO_METHOD_EXECUTION
UINT32 i;
+ UINT8 RegionSpace;
#endif
@@ -1095,10 +1122,6 @@ AcpiDsLoad2EndOp (
Status = AcpiExCreateEvent (WalkState);
break;
- case AML_DATA_REGION_OP:
-
- Status = AcpiExCreateTableRegion (WalkState);
- break;
case AML_ALIAS_OP:
@@ -1129,6 +1152,17 @@ AcpiDsLoad2EndOp (
{
#ifndef ACPI_NO_METHOD_EXECUTION
case AML_REGION_OP:
+ case AML_DATA_REGION_OP:
+
+ if (Op->Common.AmlOpcode == AML_REGION_OP)
+ {
+ RegionSpace = (ACPI_ADR_SPACE_TYPE)
+ ((Op->Common.Value.Arg)->Common.Value.Integer);
+ }
+ else
+ {
+ RegionSpace = REGION_DATA_TABLE;
+ }
/*
* If we are executing a method, initialize the region
@@ -1136,9 +1170,7 @@ AcpiDsLoad2EndOp (
if (WalkState->MethodNode)
{
Status = AcpiExCreateRegion (Op->Named.Data, Op->Named.Length,
- (ACPI_ADR_SPACE_TYPE)
- ((Op->Common.Value.Arg)->Common.Value.Integer),
- WalkState);
+ RegionSpace, WalkState);
if (ACPI_FAILURE (Status))
{
return (Status);
diff --git a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswscope.c b/usr/src/uts/intel/io/acpica/dispatcher/dswscope.c
index f5d05a7496..f8143e6281 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswscope.c
+++ b/usr/src/uts/intel/io/acpica/dispatcher/dswscope.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswscope - Scope stack manipulation
- * $Revision: 1.68 $
+ * $Revision: 1.70 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswstate.c b/usr/src/uts/intel/io/acpica/dispatcher/dswstate.c
index 204acfc559..0d1defec2c 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/dispatcher/dswstate.c
+++ b/usr/src/uts/intel/io/acpica/dispatcher/dswstate.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: dswstate - Dispatcher parse tree walk management routines
- * $Revision: 1.98 $
+ * $Revision: 1.105 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -127,261 +127,146 @@
/* Local prototypes */
-#ifdef ACPI_OBSOLETE_FUNCTIONS
-ACPI_STATUS
-AcpiDsResultInsert (
- void *Object,
- UINT32 Index,
- ACPI_WALK_STATE *WalkState);
-
-ACPI_STATUS
-AcpiDsObjStackDeleteAll (
+static ACPI_STATUS
+AcpiDsResultStackPush (
ACPI_WALK_STATE *WalkState);
-ACPI_STATUS
-AcpiDsObjStackPopObject (
- ACPI_OPERAND_OBJECT **Object,
+static ACPI_STATUS
+AcpiDsResultStackPop (
ACPI_WALK_STATE *WalkState);
-void *
-AcpiDsObjStackGetValue (
- UINT32 Index,
- ACPI_WALK_STATE *WalkState);
-#endif
-
/*******************************************************************************
*
- * FUNCTION: AcpiDsResultRemove
+ * FUNCTION: AcpiDsResultPop
*
* PARAMETERS: Object - Where to return the popped object
- * Index - Where to extract the 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: Pop an object off the top of this walk's result stack
*
******************************************************************************/
ACPI_STATUS
-AcpiDsResultRemove (
+AcpiDsResultPop (
ACPI_OPERAND_OBJECT **Object,
- UINT32 Index,
ACPI_WALK_STATE *WalkState)
{
+ UINT32 Index;
ACPI_GENERIC_STATE *State;
+ ACPI_STATUS Status;
- ACPI_FUNCTION_NAME (DsResultRemove);
+ ACPI_FUNCTION_NAME (DsResultPop);
State = WalkState->Results;
- if (!State)
+
+ /* Incorrect state of result stack */
+
+ if (State && !WalkState->ResultCount)
{
- ACPI_ERROR ((AE_INFO, "No result object pushed! State=%p",
- WalkState));
- return (AE_NOT_EXIST);
+ ACPI_ERROR ((AE_INFO, "No results on result stack"));
+ return (AE_AML_INTERNAL);
}
- if (Index >= ACPI_OBJ_MAX_OPERAND)
+ if (!State && WalkState->ResultCount)
{
- ACPI_ERROR ((AE_INFO,
- "Index out of range: %X State=%p Num=%X",
- Index, WalkState, State->Results.NumResults));
+ ACPI_ERROR ((AE_INFO, "No result state for result stack"));
+ return (AE_AML_INTERNAL);
}
- /* Check for a valid result object */
+ /* Empty result stack */
- if (!State->Results.ObjDesc [Index])
+ if (!State)
{
- ACPI_ERROR ((AE_INFO,
- "Null operand! State=%p #Ops=%X, Index=%X",
- WalkState, State->Results.NumResults, Index));
+ ACPI_ERROR ((AE_INFO, "Result stack is empty! State=%p", WalkState));
return (AE_AML_NO_RETURN_VALUE);
}
- /* Remove the object */
+ /* Return object of the top element and clean that top element result stack */
- State->Results.NumResults--;
+ WalkState->ResultCount--;
+ Index = WalkState->ResultCount % ACPI_RESULTS_FRAME_OBJ_NUM;
*Object = State->Results.ObjDesc [Index];
- State->Results.ObjDesc [Index] = NULL;
-
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
- "Obj=%p [%s] Index=%X State=%p Num=%X\n",
- *Object, (*Object) ? AcpiUtGetObjectTypeName (*Object) : "NULL",
- Index, WalkState, State->Results.NumResults));
-
- return (AE_OK);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiDsResultPop
- *
- * 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.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiDsResultPop (
- ACPI_OPERAND_OBJECT **Object,
- ACPI_WALK_STATE *WalkState)
-{
- ACPI_NATIVE_UINT Index;
- ACPI_GENERIC_STATE *State;
-
-
- ACPI_FUNCTION_NAME (DsResultPop);
-
-
- State = WalkState->Results;
- if (!State)
- {
- return (AE_OK);
- }
-
- if (!State->Results.NumResults)
+ if (!*Object)
{
- ACPI_ERROR ((AE_INFO, "Result stack is empty! State=%p",
+ ACPI_ERROR ((AE_INFO, "No result objects on result stack, State=%p",
WalkState));
return (AE_AML_NO_RETURN_VALUE);
}
- /* Remove top element */
-
- State->Results.NumResults--;
-
- for (Index = ACPI_OBJ_NUM_OPERANDS; Index; Index--)
+ State->Results.ObjDesc [Index] = NULL;
+ if (Index == 0)
{
- /* Check for a valid result object */
-
- if (State->Results.ObjDesc [Index -1])
+ Status = AcpiDsResultStackPop (WalkState);
+ if (ACPI_FAILURE (Status))
{
- *Object = State->Results.ObjDesc [Index -1];
- State->Results.ObjDesc [Index -1] = NULL;
-
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
- "Obj=%p [%s] Index=%X State=%p Num=%X\n",
- *Object,
- (*Object) ? AcpiUtGetObjectTypeName (*Object) : "NULL",
- (UINT32) Index -1, WalkState, State->Results.NumResults));
-
- return (AE_OK);
+ return (Status);
}
}
- ACPI_ERROR ((AE_INFO,
- "No result objects! State=%p", WalkState));
- return (AE_AML_NO_RETURN_VALUE);
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ "Obj=%p [%s] Index=%X State=%p Num=%X\n", *Object,
+ AcpiUtGetObjectTypeName (*Object),
+ Index, WalkState, WalkState->ResultCount));
+
+ return (AE_OK);
}
/*******************************************************************************
*
- * FUNCTION: AcpiDsResultPopFromBottom
+ * 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
*
******************************************************************************/
ACPI_STATUS
-AcpiDsResultPopFromBottom (
- ACPI_OPERAND_OBJECT **Object,
+AcpiDsResultPush (
+ ACPI_OPERAND_OBJECT *Object,
ACPI_WALK_STATE *WalkState)
{
- ACPI_NATIVE_UINT Index;
ACPI_GENERIC_STATE *State;
+ ACPI_STATUS Status;
+ UINT32 Index;
- ACPI_FUNCTION_NAME (DsResultPopFromBottom);
+ ACPI_FUNCTION_NAME (DsResultPush);
- State = WalkState->Results;
- if (!State)
+ if (WalkState->ResultCount > WalkState->ResultSize)
{
- ACPI_ERROR ((AE_INFO,
- "No result object pushed! State=%p", WalkState));
- return (AE_NOT_EXIST);
+ ACPI_ERROR ((AE_INFO, "Result stack is full"));
+ return (AE_AML_INTERNAL);
}
-
- if (!State->Results.NumResults)
+ else if (WalkState->ResultCount == WalkState->ResultSize)
{
- ACPI_ERROR ((AE_INFO, "No result objects! State=%p",
- WalkState));
- return (AE_AML_NO_RETURN_VALUE);
- }
-
- /* Remove Bottom element */
-
- *Object = State->Results.ObjDesc [0];
+ /* Extend the result stack */
- /* Push entire stack down one element */
-
- for (Index = 0; Index < State->Results.NumResults; Index++)
- {
- State->Results.ObjDesc [Index] = State->Results.ObjDesc [Index + 1];
+ Status = AcpiDsResultStackPush (WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_ERROR ((AE_INFO, "Failed to extend the result stack"));
+ return (Status);
+ }
}
- State->Results.NumResults--;
-
- /* Check for a valid result object */
-
- if (!*Object)
+ if (!(WalkState->ResultCount < WalkState->ResultSize))
{
- ACPI_ERROR ((AE_INFO,
- "Null operand! State=%p #Ops=%X Index=%X",
- WalkState, State->Results.NumResults, (UINT32) Index));
- return (AE_AML_NO_RETURN_VALUE);
+ ACPI_ERROR ((AE_INFO, "No free elements in result stack"));
+ return (AE_AML_INTERNAL);
}
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p [%s] Results=%p State=%p\n",
- *Object, (*Object) ? AcpiUtGetObjectTypeName (*Object) : "NULL",
- State, WalkState));
-
- return (AE_OK);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiDsResultPush
- *
- * PARAMETERS: Object - Where to return the popped object
- * WalkState - Current Walk state
- *
- * RETURN: Status
- *
- * DESCRIPTION: Push an object onto the current result stack
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiDsResultPush (
- ACPI_OPERAND_OBJECT *Object,
- ACPI_WALK_STATE *WalkState)
-{
- ACPI_GENERIC_STATE *State;
-
-
- ACPI_FUNCTION_NAME (DsResultPush);
-
-
State = WalkState->Results;
if (!State)
{
@@ -389,28 +274,23 @@ AcpiDsResultPush (
return (AE_AML_INTERNAL);
}
- if (State->Results.NumResults == ACPI_OBJ_NUM_OPERANDS)
- {
- ACPI_ERROR ((AE_INFO,
- "Result stack overflow: Obj=%p State=%p Num=%X",
- Object, WalkState, State->Results.NumResults));
- return (AE_STACK_OVERFLOW);
- }
-
if (!Object)
{
ACPI_ERROR ((AE_INFO,
"Null Object! Obj=%p State=%p Num=%X",
- Object, WalkState, State->Results.NumResults));
+ Object, WalkState, WalkState->ResultCount));
return (AE_BAD_PARAMETER);
}
- State->Results.ObjDesc [State->Results.NumResults] = Object;
- State->Results.NumResults++;
+ /* Assign the address of object to the top free element of result stack */
+
+ Index = WalkState->ResultCount % ACPI_RESULTS_FRAME_OBJ_NUM;
+ State->Results.ObjDesc [Index] = Object;
+ WalkState->ResultCount++;
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p [%s] State=%p Num=%X Cur=%X\n",
- Object, Object ? AcpiUtGetObjectTypeName ((ACPI_OPERAND_OBJECT *) Object) : "NULL",
- WalkState, State->Results.NumResults, WalkState->CurrentResult));
+ Object, AcpiUtGetObjectTypeName ((ACPI_OPERAND_OBJECT *) Object),
+ WalkState, WalkState->ResultCount, WalkState->CurrentResult));
return (AE_OK);
}
@@ -424,19 +304,30 @@ AcpiDsResultPush (
*
* RETURN: Status
*
- * DESCRIPTION: Push an object onto the WalkState result stack.
+ * DESCRIPTION: Push an object onto the WalkState result stack
*
******************************************************************************/
-ACPI_STATUS
+static ACPI_STATUS
AcpiDsResultStackPush (
ACPI_WALK_STATE *WalkState)
{
ACPI_GENERIC_STATE *State;
+
ACPI_FUNCTION_NAME (DsResultStackPush);
+ /* Check for stack overflow */
+
+ if (((UINT32) WalkState->ResultSize + ACPI_RESULTS_FRAME_OBJ_NUM) >
+ ACPI_RESULTS_OBJ_NUM_MAX)
+ {
+ ACPI_ERROR ((AE_INFO, "Result stack overflow: State=%p Num=%X",
+ WalkState, WalkState->ResultSize));
+ return (AE_STACK_OVERFLOW);
+ }
+
State = AcpiUtCreateGenericState ();
if (!State)
{
@@ -446,6 +337,10 @@ AcpiDsResultStackPush (
State->Common.DescriptorType = ACPI_DESC_TYPE_STATE_RESULT;
AcpiUtPushGenericState (&WalkState->Results, State);
+ /* Increase the length of the result stack by the length of frame */
+
+ WalkState->ResultSize += ACPI_RESULTS_FRAME_OBJ_NUM;
+
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Results=%p State=%p\n",
State, WalkState));
@@ -461,16 +356,17 @@ AcpiDsResultStackPush (
*
* RETURN: Status
*
- * DESCRIPTION: Pop an object off of the WalkState result stack.
+ * DESCRIPTION: Pop an object off of the WalkState result stack
*
******************************************************************************/
-ACPI_STATUS
+static ACPI_STATUS
AcpiDsResultStackPop (
ACPI_WALK_STATE *WalkState)
{
ACPI_GENERIC_STATE *State;
+
ACPI_FUNCTION_NAME (DsResultStackPop);
@@ -478,18 +374,27 @@ AcpiDsResultStackPop (
if (WalkState->Results == NULL)
{
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Underflow - State=%p\n",
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Result stack underflow - State=%p\n",
WalkState));
return (AE_AML_NO_OPERAND);
}
+ if (WalkState->ResultSize < ACPI_RESULTS_FRAME_OBJ_NUM)
+ {
+ ACPI_ERROR ((AE_INFO, "Insufficient result stack size"));
+ return (AE_AML_INTERNAL);
+ }
+
State = AcpiUtPopGenericState (&WalkState->Results);
+ AcpiUtDeleteGenericState (State);
+
+ /* Decrease the length of result stack by the length of frame */
+
+ WalkState->ResultSize -= ACPI_RESULTS_FRAME_OBJ_NUM;
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"Result=%p RemainingResults=%X State=%p\n",
- State, State->Results.NumResults, WalkState));
-
- AcpiUtDeleteGenericState (State);
+ State, WalkState->ResultCount, WalkState));
return (AE_OK);
}
@@ -528,12 +433,16 @@ AcpiDsObjStackPush (
/* Put the object onto the stack */
- WalkState->Operands [WalkState->NumOperands] = Object;
+ WalkState->Operands [WalkState->OperandIndex] = Object;
WalkState->NumOperands++;
+ /* For the usual order of filling the operand stack */
+
+ WalkState->OperandIndex++;
+
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p [%s] State=%p #Ops=%X\n",
- Object, AcpiUtGetObjectTypeName ((ACPI_OPERAND_OBJECT *) Object),
- WalkState, WalkState->NumOperands));
+ Object, AcpiUtGetObjectTypeName ((ACPI_OPERAND_OBJECT *) Object),
+ WalkState, WalkState->NumOperands));
return (AE_OK);
}
@@ -560,6 +469,7 @@ AcpiDsObjStackPop (
{
UINT32 i;
+
ACPI_FUNCTION_NAME (DsObjStackPop);
@@ -582,7 +492,7 @@ AcpiDsObjStackPop (
}
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Count=%X State=%p #Ops=%X\n",
- PopCount, WalkState, WalkState->NumOperands));
+ PopCount, WalkState, WalkState->NumOperands));
return (AE_OK);
}
@@ -602,45 +512,43 @@ AcpiDsObjStackPop (
*
******************************************************************************/
-ACPI_STATUS
+void
AcpiDsObjStackPopAndDelete (
UINT32 PopCount,
ACPI_WALK_STATE *WalkState)
{
- UINT32 i;
+ INT32 i;
ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_FUNCTION_NAME (DsObjStackPopAndDelete);
- for (i = 0; i < PopCount; i++)
+ if (PopCount == 0)
{
- /* Check for stack underflow */
+ return;
+ }
+ for (i = (INT32) PopCount - 1; i >= 0; i--)
+ {
if (WalkState->NumOperands == 0)
{
- ACPI_ERROR ((AE_INFO,
- "Object stack underflow! Count=%X State=%p #Ops=%X",
- PopCount, WalkState, WalkState->NumOperands));
- return (AE_STACK_UNDERFLOW);
+ return;
}
/* Pop the stack and delete an object if present in this stack entry */
WalkState->NumOperands--;
- ObjDesc = WalkState->Operands [WalkState->NumOperands];
+ ObjDesc = WalkState->Operands [i];
if (ObjDesc)
{
- AcpiUtRemoveReference (WalkState->Operands [WalkState->NumOperands]);
- WalkState->Operands [WalkState->NumOperands] = NULL;
+ AcpiUtRemoveReference (WalkState->Operands [i]);
+ WalkState->Operands [i] = NULL;
}
}
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Count=%X State=%p #Ops=%X\n",
- PopCount, WalkState, WalkState->NumOperands));
-
- return (AE_OK);
+ PopCount, WalkState, WalkState->NumOperands));
}
@@ -660,7 +568,6 @@ AcpiDsObjStackPopAndDelete (
ACPI_WALK_STATE *
AcpiDsGetCurrentWalkState (
ACPI_THREAD_STATE *Thread)
-
{
ACPI_FUNCTION_NAME (DsGetCurrentWalkState);
@@ -686,7 +593,7 @@ AcpiDsGetCurrentWalkState (
*
* RETURN: None
*
- * DESCRIPTION: Place the Thread state at the head of the state list.
+ * DESCRIPTION: Place the Thread state at the head of the state list
*
******************************************************************************/
@@ -698,7 +605,7 @@ AcpiDsPushWalkState (
ACPI_FUNCTION_TRACE (DsPushWalkState);
- WalkState->Next = Thread->WalkStateList;
+ WalkState->Next = Thread->WalkStateList;
Thread->WalkStateList = WalkState;
return_VOID;
@@ -772,7 +679,6 @@ AcpiDsCreateWalkState (
ACPI_THREAD_STATE *Thread)
{
ACPI_WALK_STATE *WalkState;
- ACPI_STATUS Status;
ACPI_FUNCTION_TRACE (DsCreateWalkState);
@@ -798,15 +704,6 @@ AcpiDsCreateWalkState (
AcpiDsMethodDataInit (WalkState);
#endif
- /* Create an initial result stack entry */
-
- Status = AcpiDsResultStackPush (WalkState);
- if (ACPI_FAILURE (Status))
- {
- ACPI_FREE (WalkState);
- return_PTR (NULL);
- }
-
/* Put the new state at the head of the walk list */
if (Thread)
@@ -866,16 +763,8 @@ AcpiDsInitAmlWalk (
if (Info)
{
- if (Info->ParameterType == ACPI_PARAM_GPE)
- {
- WalkState->GpeEventInfo =
- ACPI_CAST_PTR (ACPI_GPE_EVENT_INFO, Info->Parameters);
- }
- else
- {
- WalkState->Params = Info->Parameters;
- WalkState->CallerReturnDesc = &Info->ReturnObject;
- }
+ WalkState->Params = Info->Parameters;
+ WalkState->CallerReturnDesc = &Info->ReturnObject;
}
Status = AcpiPsInitScope (&WalkState->ParserState, Op);
@@ -1027,209 +916,3 @@ AcpiDsDeleteWalkState (
}
-#ifdef ACPI_OBSOLETE_FUNCTIONS
-/*******************************************************************************
- *
- * FUNCTION: AcpiDsResultInsert
- *
- * PARAMETERS: Object - Object to push
- * Index - Where to insert the object
- * WalkState - Current Walk state
- *
- * RETURN: Status
- *
- * DESCRIPTION: Insert an object onto this walk's result stack
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiDsResultInsert (
- void *Object,
- UINT32 Index,
- ACPI_WALK_STATE *WalkState)
-{
- ACPI_GENERIC_STATE *State;
-
-
- ACPI_FUNCTION_NAME (DsResultInsert);
-
-
- State = WalkState->Results;
- if (!State)
- {
- ACPI_ERROR ((AE_INFO, "No result object pushed! State=%p",
- WalkState));
- return (AE_NOT_EXIST);
- }
-
- if (Index >= ACPI_OBJ_NUM_OPERANDS)
- {
- ACPI_ERROR ((AE_INFO,
- "Index out of range: %X Obj=%p State=%p Num=%X",
- Index, Object, WalkState, State->Results.NumResults));
- return (AE_BAD_PARAMETER);
- }
-
- if (!Object)
- {
- ACPI_ERROR ((AE_INFO,
- "Null Object! Index=%X Obj=%p State=%p Num=%X",
- Index, Object, WalkState, State->Results.NumResults));
- return (AE_BAD_PARAMETER);
- }
-
- State->Results.ObjDesc [Index] = Object;
- State->Results.NumResults++;
-
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
- "Obj=%p [%s] State=%p Num=%X Cur=%X\n",
- Object, Object ? AcpiUtGetObjectTypeName ((ACPI_OPERAND_OBJECT *) Object) : "NULL",
- WalkState, State->Results.NumResults, WalkState->CurrentResult));
-
- return (AE_OK);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiDsObjStackDeleteAll
- *
- * PARAMETERS: WalkState - Current Walk state
- *
- * RETURN: Status
- *
- * DESCRIPTION: Clear the object stack by deleting all objects that are on it.
- * Should be used with great care, if at all!
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiDsObjStackDeleteAll (
- ACPI_WALK_STATE *WalkState)
-{
- UINT32 i;
-
-
- ACPI_FUNCTION_TRACE_PTR (DsObjStackDeleteAll, WalkState);
-
-
- /* The stack size is configurable, but fixed */
-
- for (i = 0; i < ACPI_OBJ_NUM_OPERANDS; i++)
- {
- if (WalkState->Operands[i])
- {
- AcpiUtRemoveReference (WalkState->Operands[i]);
- WalkState->Operands[i] = NULL;
- }
- }
-
- return_ACPI_STATUS (AE_OK);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiDsObjStackPopObject
- *
- * PARAMETERS: Object - Where to return the popped object
- * WalkState - Current Walk state
- *
- * RETURN: Status
- *
- * DESCRIPTION: Pop this walk's object stack. Objects on the stack are NOT
- * deleted by this routine.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiDsObjStackPopObject (
- ACPI_OPERAND_OBJECT **Object,
- ACPI_WALK_STATE *WalkState)
-{
- ACPI_FUNCTION_NAME (DsObjStackPopObject);
-
-
- /* Check for stack underflow */
-
- if (WalkState->NumOperands == 0)
- {
- ACPI_ERROR ((AE_INFO,
- "Missing operand/stack empty! State=%p #Ops=%X",
- WalkState, WalkState->NumOperands));
- *Object = NULL;
- return (AE_AML_NO_OPERAND);
- }
-
- /* Pop the stack */
-
- WalkState->NumOperands--;
-
- /* Check for a valid operand */
-
- if (!WalkState->Operands [WalkState->NumOperands])
- {
- ACPI_ERROR ((AE_INFO,
- "Null operand! State=%p #Ops=%X",
- WalkState, WalkState->NumOperands));
- *Object = NULL;
- return (AE_AML_NO_OPERAND);
- }
-
- /* Get operand and set stack entry to null */
-
- *Object = WalkState->Operands [WalkState->NumOperands];
- WalkState->Operands [WalkState->NumOperands] = NULL;
-
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p [%s] State=%p #Ops=%X\n",
- *Object, AcpiUtGetObjectTypeName (*Object),
- WalkState, WalkState->NumOperands));
-
- return (AE_OK);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiDsObjStackGetValue
- *
- * PARAMETERS: Index - Stack index whose value is desired. Based
- * on the top of the stack (index=0 == top)
- * WalkState - Current Walk state
- *
- * RETURN: Pointer to the requested operand
- *
- * DESCRIPTION: Retrieve an object from this walk's operand stack. Index must
- * be within the range of the current stack pointer.
- *
- ******************************************************************************/
-
-void *
-AcpiDsObjStackGetValue (
- UINT32 Index,
- ACPI_WALK_STATE *WalkState)
-{
-
- ACPI_FUNCTION_TRACE_PTR (DsObjStackGetValue, WalkState);
-
-
- /* Can't do it if the stack is empty */
-
- if (WalkState->NumOperands == 0)
- {
- return_PTR (NULL);
- }
-
- /* or if the index is past the top of the stack */
-
- if (Index > (WalkState->NumOperands - (UINT32) 1))
- {
- return_PTR (NULL);
- }
-
- return_PTR (WalkState->Operands[(ACPI_NATIVE_UINT)(WalkState->NumOperands - 1) -
- Index]);
-}
-#endif
-
-
diff --git a/usr/src/uts/intel/io/acpica/events/evevent.c b/usr/src/uts/intel/io/acpica/events/evevent.c
index b9e880bf1a..ed8299a4a3 100644
--- a/usr/src/uts/intel/io/acpica/events/evevent.c
+++ b/usr/src/uts/intel/io/acpica/events/evevent.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evevent - Fixed Event handling and dispatch
- * $Revision: 1.122 $
+ * $Revision: 1.127 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -153,14 +153,6 @@ AcpiEvInitializeEvents (
ACPI_FUNCTION_TRACE (EvInitializeEvents);
- /* Make sure we have ACPI tables */
-
- if (!AcpiGbl_DSDT)
- {
- ACPI_WARNING ((AE_INFO, "No ACPI tables present!"));
- return_ACPI_STATUS (AE_NO_ACPI_TABLES);
- }
-
/*
* Initialize the Fixed and General Purpose Events. This is done prior to
* enabling SCIs to prevent interrupts from occurring before the handlers are
@@ -297,7 +289,7 @@ static ACPI_STATUS
AcpiEvFixedEventInitialize (
void)
{
- ACPI_NATIVE_UINT i;
+ UINT32 i;
ACPI_STATUS Status;
@@ -315,8 +307,7 @@ AcpiEvFixedEventInitialize (
if (AcpiGbl_FixedEventInfo[i].EnableRegisterId != 0xFF)
{
Status = AcpiSetRegister (
- AcpiGbl_FixedEventInfo[i].EnableRegisterId,
- 0, ACPI_MTX_LOCK);
+ AcpiGbl_FixedEventInfo[i].EnableRegisterId, 0);
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -347,7 +338,7 @@ AcpiEvFixedEventDetect (
UINT32 IntStatus = ACPI_INTERRUPT_NOT_HANDLED;
UINT32 FixedStatus;
UINT32 FixedEnable;
- ACPI_NATIVE_UINT i;
+ UINT32 i;
ACPI_FUNCTION_NAME (EvFixedEventDetect);
@@ -357,10 +348,8 @@ AcpiEvFixedEventDetect (
* Read the fixed feature status and enable registers, as all the cases
* depend on their values. Ignore errors here.
*/
- (void) AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_STATUS,
- &FixedStatus);
- (void) AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK, ACPI_REGISTER_PM1_ENABLE,
- &FixedEnable);
+ (void) AcpiHwRegisterRead (ACPI_REGISTER_PM1_STATUS, &FixedStatus);
+ (void) AcpiHwRegisterRead (ACPI_REGISTER_PM1_ENABLE, &FixedEnable);
ACPI_DEBUG_PRINT ((ACPI_DB_INTERRUPTS,
"Fixed Event Block: Enable %08X Status %08X\n",
@@ -378,7 +367,8 @@ AcpiEvFixedEventDetect (
{
/* Found an active (signalled) event */
- IntStatus |= AcpiEvFixedEventDispatch ((UINT32) i);
+ AcpiFixedEventCount[i]++;
+ IntStatus |= AcpiEvFixedEventDispatch (i);
}
}
@@ -404,14 +394,12 @@ AcpiEvFixedEventDispatch (
UINT32 Event)
{
-
ACPI_FUNCTION_ENTRY ();
/* Clear the status bit */
- (void) AcpiSetRegister (AcpiGbl_FixedEventInfo[Event].StatusRegisterId,
- 1, ACPI_MTX_DO_NOT_LOCK);
+ (void) AcpiSetRegister (AcpiGbl_FixedEventInfo[Event].StatusRegisterId, 1);
/*
* Make sure we've got a handler. If not, report an error.
@@ -419,8 +407,7 @@ AcpiEvFixedEventDispatch (
*/
if (NULL == AcpiGbl_FixedEventHandlers[Event].Handler)
{
- (void) AcpiSetRegister (AcpiGbl_FixedEventInfo[Event].EnableRegisterId,
- 0, ACPI_MTX_DO_NOT_LOCK);
+ (void) AcpiSetRegister (AcpiGbl_FixedEventInfo[Event].EnableRegisterId, 0);
ACPI_ERROR ((AE_INFO,
"No installed handler for fixed event [%08X]",
diff --git a/usr/src/uts/intel/io/acpica/events/evgpe.c b/usr/src/uts/intel/io/acpica/events/evgpe.c
index 52d244eba6..da87549a3a 100644
--- a/usr/src/uts/intel/io/acpica/events/evgpe.c
+++ b/usr/src/uts/intel/io/acpica/events/evgpe.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evgpe - General Purpose Event handling and dispatch
- * $Revision: 1.63 $
+ * $Revision: 1.72 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -127,6 +127,10 @@ static void ACPI_SYSTEM_XFACE
AcpiEvAsynchExecuteGpeMethod (
void *Context);
+static void ACPI_SYSTEM_XFACE
+AcpiEvAsynchEnableGpe (
+ void *Context);
+
/*******************************************************************************
*
@@ -208,7 +212,8 @@ AcpiEvUpdateGpeEnableMasks (
{
return_ACPI_STATUS (AE_NOT_EXIST);
}
- RegisterBit = GpeEventInfo->RegisterBit;
+ RegisterBit = (UINT8)
+ (1 << (GpeEventInfo->GpeNumber - GpeRegisterInfo->BaseGpeNumber));
/* 1) Disable case. Simply clear all enable bits */
@@ -344,10 +349,11 @@ AcpiEvDisableGpe (
ACPI_FUNCTION_TRACE (EvDisableGpe);
- if (!(GpeEventInfo->Flags & ACPI_GPE_ENABLE_MASK))
- {
- return_ACPI_STATUS (AE_OK);
- }
+ /*
+ * Note: Always disable the GPE, even if we think that that it is already
+ * disabled. It is possible that the AML or some other code has enabled
+ * the GPE behind our back.
+ */
/* Make sure HW enable masks are updated */
@@ -357,15 +363,17 @@ AcpiEvDisableGpe (
return_ACPI_STATUS (Status);
}
- /* Mark wake-disabled or HW disable, or both */
+ /* Clear the appropriate enabled flags for this GPE */
switch (GpeEventInfo->Flags & ACPI_GPE_TYPE_MASK)
{
case ACPI_GPE_TYPE_WAKE:
+
ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED);
break;
case ACPI_GPE_TYPE_WAKE_RUN:
+
ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_WAKE_ENABLED);
/*lint -fallthrough */
@@ -375,14 +383,22 @@ AcpiEvDisableGpe (
/* Disable the requested runtime GPE */
ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_RUN_ENABLED);
- Status = AcpiHwWriteGpeEnableReg (GpeEventInfo);
break;
default:
- return_ACPI_STATUS (AE_BAD_PARAMETER);
+ break;
}
- return_ACPI_STATUS (AE_OK);
+ /*
+ * Always H/W disable this GPE, even if we don't know the GPE type.
+ * Simply clear the enable bit for this particular GPE, but do not
+ * write out the current GPE enable mask since this may inadvertently
+ * enable GPEs too early. An example is a rogue GPE that has arrived
+ * during ACPICA initialization - possibly because AML or other code
+ * has enabled the GPE.
+ */
+ Status = AcpiHwLowDisableGpe (GpeEventInfo);
+ return_ACPI_STATUS (Status);
}
@@ -410,7 +426,7 @@ AcpiEvGetGpeEventInfo (
{
ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_GPE_BLOCK_INFO *GpeBlock;
- ACPI_NATIVE_UINT i;
+ UINT32 i;
ACPI_FUNCTION_ENTRY ();
@@ -489,8 +505,8 @@ AcpiEvGpeDetect (
UINT32 StatusReg;
UINT32 EnableReg;
ACPI_CPU_FLAGS Flags;
- ACPI_NATIVE_UINT i;
- ACPI_NATIVE_UINT j;
+ UINT32 i;
+ UINT32 j;
ACPI_FUNCTION_NAME (EvGpeDetect);
@@ -563,15 +579,15 @@ AcpiEvGpeDetect (
{
/* Examine one GPE bit */
- if (EnabledStatusByte & AcpiGbl_DecodeTo8bit[j])
+ if (EnabledStatusByte & (1 << j))
{
/*
* Found an active GPE. Dispatch the event to a handler
* or method.
*/
IntStatus |= AcpiEvGpeDispatch (
- &GpeBlock->EventInfo[(i * ACPI_GPE_REGISTER_WIDTH) + j],
- (UINT32) j + GpeRegisterInfo->BaseGpeNumber);
+ &GpeBlock->EventInfo[((ACPI_SIZE) i * ACPI_GPE_REGISTER_WIDTH) + j],
+ j + GpeRegisterInfo->BaseGpeNumber);
}
}
}
@@ -606,15 +622,25 @@ static void ACPI_SYSTEM_XFACE
AcpiEvAsynchExecuteGpeMethod (
void *Context)
{
- ACPI_GPE_EVENT_INFO *GpeEventInfo = (void *) Context;
+ ACPI_GPE_EVENT_INFO *GpeEventInfo = Context;
ACPI_STATUS Status;
- ACPI_GPE_EVENT_INFO LocalGpeEventInfo;
+ ACPI_GPE_EVENT_INFO *LocalGpeEventInfo;
ACPI_EVALUATE_INFO *Info;
ACPI_FUNCTION_TRACE (EvAsynchExecuteGpeMethod);
+ /* Allocate a local GPE block */
+
+ LocalGpeEventInfo = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_GPE_EVENT_INFO));
+ if (!LocalGpeEventInfo)
+ {
+ ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY,
+ "while handling a GPE"));
+ return_VOID;
+ }
+
Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
if (ACPI_FAILURE (Status))
{
@@ -637,7 +663,7 @@ AcpiEvAsynchExecuteGpeMethod (
* Take a snapshot of the GPE info for this level - we copy the
* info to prevent a race condition with RemoveHandler/RemoveBlock.
*/
- ACPI_MEMCPY (&LocalGpeEventInfo, GpeEventInfo,
+ ACPI_MEMCPY (LocalGpeEventInfo, GpeEventInfo,
sizeof (ACPI_GPE_EVENT_INFO));
Status = AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
@@ -650,7 +676,7 @@ AcpiEvAsynchExecuteGpeMethod (
* Must check for control method type dispatch one more
* time to avoid race with EvGpeInstallHandler
*/
- if ((LocalGpeEventInfo.Flags & ACPI_GPE_DISPATCH_MASK) ==
+ if ((LocalGpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
ACPI_GPE_DISPATCH_METHOD)
{
/* Allocate the evaluation information block */
@@ -666,9 +692,7 @@ AcpiEvAsynchExecuteGpeMethod (
* Invoke the GPE Method (_Lxx, _Exx) i.e., evaluate the _Lxx/_Exx
* control method that corresponds to this GPE
*/
- Info->PrefixNode = LocalGpeEventInfo.Dispatch.MethodNode;
- Info->Parameters = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT *, GpeEventInfo);
- Info->ParameterType = ACPI_PARAM_GPE;
+ Info->PrefixNode = LocalGpeEventInfo->Dispatch.MethodNode;
Info->Flags = ACPI_IGNORE_RETURN_VALUE;
Status = AcpiNsEvaluate (Info);
@@ -678,29 +702,65 @@ AcpiEvAsynchExecuteGpeMethod (
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status,
- "While evaluating GPE method [%4.4s]",
- AcpiUtGetNodeName (LocalGpeEventInfo.Dispatch.MethodNode)));
+ "while evaluating GPE method [%4.4s]",
+ AcpiUtGetNodeName (LocalGpeEventInfo->Dispatch.MethodNode)));
}
}
- if ((LocalGpeEventInfo.Flags & ACPI_GPE_XRUPT_TYPE_MASK) ==
+ /* Defer enabling of GPE until all notify handlers are done */
+
+ Status = AcpiOsExecute (OSL_NOTIFY_HANDLER,
+ AcpiEvAsynchEnableGpe, LocalGpeEventInfo);
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_FREE (LocalGpeEventInfo);
+ }
+ return_VOID;
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiEvAsynchEnableGpe
+ *
+ * PARAMETERS: Context (GpeEventInfo) - Info for this GPE
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Asynchronous clear/enable for GPE. This allows the GPE to
+ * complete (i.e., finish execution of Notify)
+ *
+ ******************************************************************************/
+
+static void ACPI_SYSTEM_XFACE
+AcpiEvAsynchEnableGpe (
+ void *Context)
+{
+ ACPI_GPE_EVENT_INFO *GpeEventInfo = Context;
+ ACPI_STATUS Status;
+
+
+ if ((GpeEventInfo->Flags & ACPI_GPE_XRUPT_TYPE_MASK) ==
ACPI_GPE_LEVEL_TRIGGERED)
{
/*
* GPE is level-triggered, we clear the GPE status bit after
* handling the event.
*/
- Status = AcpiHwClearGpe (&LocalGpeEventInfo);
+ Status = AcpiHwClearGpe (GpeEventInfo);
if (ACPI_FAILURE (Status))
{
- return_VOID;
+ goto Exit;
}
}
/* Enable this GPE */
- (void) AcpiHwWriteGpeEnableReg (&LocalGpeEventInfo);
- return_VOID;
+ (void) AcpiHwWriteGpeEnableReg (GpeEventInfo);
+
+Exit:
+ ACPI_FREE (GpeEventInfo);
+ return;
}
@@ -731,6 +791,8 @@ AcpiEvGpeDispatch (
ACPI_FUNCTION_TRACE (EvGpeDispatch);
+ AcpiGpeCount++;
+
/*
* If edge-triggered, clear the GPE status bit now. Note that
* level-triggered events are cleared after the GPE is serviced.
@@ -747,23 +809,12 @@ AcpiEvGpeDispatch (
}
}
- /* Save current system state */
-
- if (AcpiGbl_SystemAwakeAndRunning)
- {
- ACPI_SET_BIT (GpeEventInfo->Flags, ACPI_GPE_SYSTEM_RUNNING);
- }
- else
- {
- ACPI_CLEAR_BIT (GpeEventInfo->Flags, ACPI_GPE_SYSTEM_RUNNING);
- }
-
/*
- * Dispatch the GPE to either an installed handler, or the control
- * method associated with this GPE (_Lxx or _Exx).
- * If a handler exists, we invoke it and do not attempt to run the method.
- * If there is neither a handler nor a method, we disable the level to
- * prevent further events from coming in here.
+ * Dispatch the GPE to either an installed handler, or the control method
+ * associated with this GPE (_Lxx or _Exx). If a handler exists, we invoke
+ * it and do not attempt to run the method. If there is neither a handler
+ * nor a method, we disable this GPE to prevent further such pointless
+ * events from firing.
*/
switch (GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)
{
@@ -794,8 +845,8 @@ AcpiEvGpeDispatch (
case ACPI_GPE_DISPATCH_METHOD:
/*
- * Disable GPE, so it doesn't keep firing before the method has a
- * chance to run.
+ * Disable the GPE, so it doesn't keep firing before the method has a
+ * chance to run (it runs asynchronously with interrupts enabled).
*/
Status = AcpiEvDisableGpe (GpeEventInfo);
if (ACPI_FAILURE (Status))
@@ -828,7 +879,7 @@ AcpiEvGpeDispatch (
GpeNumber));
/*
- * Disable the GPE. The GPE will remain disabled until the ACPI
+ * Disable the GPE. The GPE will remain disabled until the ACPI
* Core Subsystem is restarted, or a handler is installed.
*/
Status = AcpiEvDisableGpe (GpeEventInfo);
@@ -844,55 +895,3 @@ AcpiEvGpeDispatch (
return_UINT32 (ACPI_INTERRUPT_HANDLED);
}
-
-#ifdef ACPI_GPE_NOTIFY_CHECK
-/*******************************************************************************
- * TBD: NOT USED, PROTOTYPE ONLY AND WILL PROBABLY BE REMOVED
- *
- * FUNCTION: AcpiEvCheckForWakeOnlyGpe
- *
- * PARAMETERS: GpeEventInfo - info for this GPE
- *
- * RETURN: Status
- *
- * DESCRIPTION: Determine if a a GPE is "wake-only".
- *
- * Called from Notify() code in interpreter when a "DeviceWake"
- * Notify comes in.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiEvCheckForWakeOnlyGpe (
- ACPI_GPE_EVENT_INFO *GpeEventInfo)
-{
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_TRACE (EvCheckForWakeOnlyGpe);
-
-
- if ((GpeEventInfo) && /* Only >0 for _Lxx/_Exx */
- ((GpeEventInfo->Flags & ACPI_GPE_SYSTEM_MASK) == ACPI_GPE_SYSTEM_RUNNING)) /* System state at GPE time */
- {
- /* This must be a wake-only GPE, disable it */
-
- Status = AcpiEvDisableGpe (GpeEventInfo);
-
- /* Set GPE to wake-only. Do not change wake disabled/enabled status */
-
- AcpiEvSetGpeType (GpeEventInfo, ACPI_GPE_TYPE_WAKE);
-
- ACPI_INFO ((AE_INFO, "GPE %p was updated from wake/run to wake-only",
- GpeEventInfo));
-
- /* This was a wake-only GPE */
-
- return_ACPI_STATUS (AE_WAKE_ONLY_GPE);
- }
-
- return_ACPI_STATUS (AE_OK);
-}
-#endif
-
-
diff --git a/usr/src/uts/intel/io/acpica/events/evgpeblk.c b/usr/src/uts/intel/io/acpica/events/evgpeblk.c
index 21a6692139..5095009d54 100644
--- a/usr/src/uts/intel/io/acpica/events/evgpeblk.c
+++ b/usr/src/uts/intel/io/acpica/events/evgpeblk.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evgpeblk - GPE block creation and initialization.
- * $Revision: 1.56 $
+ * $Revision: 1.62 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -286,8 +286,8 @@ AcpiEvDeleteGpeHandlers (
ACPI_GPE_BLOCK_INFO *GpeBlock)
{
ACPI_GPE_EVENT_INFO *GpeEventInfo;
- ACPI_NATIVE_UINT i;
- ACPI_NATIVE_UINT j;
+ UINT32 i;
+ UINT32 j;
ACPI_FUNCTION_TRACE (EvDeleteGpeHandlers);
@@ -301,7 +301,7 @@ AcpiEvDeleteGpeHandlers (
for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++)
{
- GpeEventInfo = &GpeBlock->EventInfo[(i * ACPI_GPE_REGISTER_WIDTH) + j];
+ GpeEventInfo = &GpeBlock->EventInfo[((ACPI_SIZE) i * ACPI_GPE_REGISTER_WIDTH) + j];
if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
ACPI_GPE_DISPATCH_HANDLER)
@@ -644,7 +644,7 @@ AcpiEvGetGpeXruptBlock (
/* Install new interrupt handler if not SCI_INT */
- if (InterruptNumber != AcpiGbl_FADT->SciInt)
+ if (InterruptNumber != AcpiGbl_FADT.SciInterrupt)
{
Status = AcpiOsInstallInterruptHandler (InterruptNumber,
AcpiEvGpeXruptHandler, GpeXrupt);
@@ -687,7 +687,7 @@ AcpiEvDeleteGpeXrupt (
/* We never want to remove the SCI interrupt handler */
- if (GpeXrupt->InterruptNumber == AcpiGbl_FADT->SciInt)
+ if (GpeXrupt->InterruptNumber == AcpiGbl_FADT.SciInterrupt)
{
GpeXrupt->GpeBlockListHead = NULL;
return_ACPI_STATUS (AE_OK);
@@ -709,6 +709,12 @@ AcpiEvDeleteGpeXrupt (
{
GpeXrupt->Previous->Next = GpeXrupt->Next;
}
+ else
+ {
+ /* No previous, update list head */
+
+ AcpiGbl_GpeXruptListHead = GpeXrupt->Next;
+ }
if (GpeXrupt->Next)
{
@@ -888,8 +894,8 @@ AcpiEvCreateGpeInfoBlocks (
ACPI_GPE_EVENT_INFO *GpeEventInfo = NULL;
ACPI_GPE_EVENT_INFO *ThisEvent;
ACPI_GPE_REGISTER_INFO *ThisRegister;
- ACPI_NATIVE_UINT i;
- ACPI_NATIVE_UINT j;
+ UINT32 i;
+ UINT32 j;
ACPI_STATUS Status;
@@ -945,27 +951,24 @@ AcpiEvCreateGpeInfoBlocks (
ThisRegister->BaseGpeNumber = (UINT8) (GpeBlock->BlockBaseNumber +
(i * ACPI_GPE_REGISTER_WIDTH));
- ACPI_STORE_ADDRESS (ThisRegister->StatusAddress.Address,
- (ACPI_GET_ADDRESS (GpeBlock->BlockAddress.Address)
- + i));
+ ThisRegister->StatusAddress.Address =
+ GpeBlock->BlockAddress.Address + i;
- ACPI_STORE_ADDRESS (ThisRegister->EnableAddress.Address,
- (ACPI_GET_ADDRESS (GpeBlock->BlockAddress.Address)
- + i
- + GpeBlock->RegisterCount));
+ ThisRegister->EnableAddress.Address =
+ GpeBlock->BlockAddress.Address + i + GpeBlock->RegisterCount;
- ThisRegister->StatusAddress.AddressSpaceId = GpeBlock->BlockAddress.AddressSpaceId;
- ThisRegister->EnableAddress.AddressSpaceId = GpeBlock->BlockAddress.AddressSpaceId;
- ThisRegister->StatusAddress.RegisterBitWidth = ACPI_GPE_REGISTER_WIDTH;
- ThisRegister->EnableAddress.RegisterBitWidth = ACPI_GPE_REGISTER_WIDTH;
- ThisRegister->StatusAddress.RegisterBitOffset = ACPI_GPE_REGISTER_WIDTH;
- ThisRegister->EnableAddress.RegisterBitOffset = ACPI_GPE_REGISTER_WIDTH;
+ ThisRegister->StatusAddress.SpaceId = GpeBlock->BlockAddress.SpaceId;
+ ThisRegister->EnableAddress.SpaceId = GpeBlock->BlockAddress.SpaceId;
+ ThisRegister->StatusAddress.BitWidth = ACPI_GPE_REGISTER_WIDTH;
+ ThisRegister->EnableAddress.BitWidth = ACPI_GPE_REGISTER_WIDTH;
+ ThisRegister->StatusAddress.BitOffset = ACPI_GPE_REGISTER_WIDTH;
+ ThisRegister->EnableAddress.BitOffset = ACPI_GPE_REGISTER_WIDTH;
/* Init the EventInfo for each GPE within this register */
for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++)
{
- ThisEvent->RegisterBit = AcpiGbl_DecodeTo8bit[j];
+ ThisEvent->GpeNumber = (UINT8) (ThisRegister->BaseGpeNumber + j);
ThisEvent->RegisterInfo = ThisRegister;
ThisEvent++;
}
@@ -1137,8 +1140,8 @@ AcpiEvInitializeGpeBlock (
ACPI_GPE_WALK_INFO GpeInfo;
UINT32 WakeGpeCount;
UINT32 GpeEnabledCount;
- ACPI_NATIVE_UINT i;
- ACPI_NATIVE_UINT j;
+ UINT32 i;
+ UINT32 j;
ACPI_FUNCTION_TRACE (EvInitializeGpeBlock);
@@ -1188,7 +1191,7 @@ AcpiEvInitializeGpeBlock (
{
/* Get the info block for this particular GPE */
- GpeEventInfo = &GpeBlock->EventInfo[(i * ACPI_GPE_REGISTER_WIDTH) + j];
+ GpeEventInfo = &GpeBlock->EventInfo[((ACPI_SIZE) i * ACPI_GPE_REGISTER_WIDTH) + j];
if (((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == ACPI_GPE_DISPATCH_METHOD) &&
(GpeEventInfo->Flags & ACPI_GPE_TYPE_RUNTIME))
@@ -1276,20 +1279,20 @@ AcpiEvGpeInitialize (
* If EITHER the register length OR the block address are zero, then that
* particular block is not supported.
*/
- if (AcpiGbl_FADT->Gpe0BlkLen &&
- ACPI_GET_ADDRESS (AcpiGbl_FADT->XGpe0Blk.Address))
+ if (AcpiGbl_FADT.Gpe0BlockLength &&
+ AcpiGbl_FADT.XGpe0Block.Address)
{
/* GPE block 0 exists (has both length and address > 0) */
- RegisterCount0 = (UINT16) (AcpiGbl_FADT->Gpe0BlkLen / 2);
+ RegisterCount0 = (UINT16) (AcpiGbl_FADT.Gpe0BlockLength / 2);
GpeNumberMax = (RegisterCount0 * ACPI_GPE_REGISTER_WIDTH) - 1;
/* Install GPE Block 0 */
Status = AcpiEvCreateGpeBlock (AcpiGbl_FadtGpeDevice,
- &AcpiGbl_FADT->XGpe0Blk, RegisterCount0, 0,
- AcpiGbl_FADT->SciInt, &AcpiGbl_GpeFadtBlocks[0]);
+ &AcpiGbl_FADT.XGpe0Block, RegisterCount0, 0,
+ AcpiGbl_FADT.SciInterrupt, &AcpiGbl_GpeFadtBlocks[0]);
if (ACPI_FAILURE (Status))
{
@@ -1298,22 +1301,22 @@ AcpiEvGpeInitialize (
}
}
- if (AcpiGbl_FADT->Gpe1BlkLen &&
- ACPI_GET_ADDRESS (AcpiGbl_FADT->XGpe1Blk.Address))
+ if (AcpiGbl_FADT.Gpe1BlockLength &&
+ AcpiGbl_FADT.XGpe1Block.Address)
{
/* GPE block 1 exists (has both length and address > 0) */
- RegisterCount1 = (UINT16) (AcpiGbl_FADT->Gpe1BlkLen / 2);
+ RegisterCount1 = (UINT16) (AcpiGbl_FADT.Gpe1BlockLength / 2);
/* Check for GPE0/GPE1 overlap (if both banks exist) */
if ((RegisterCount0) &&
- (GpeNumberMax >= AcpiGbl_FADT->Gpe1Base))
+ (GpeNumberMax >= AcpiGbl_FADT.Gpe1Base))
{
ACPI_ERROR ((AE_INFO,
"GPE0 block (GPE 0 to %d) overlaps the GPE1 block (GPE %d to %d) - Ignoring GPE1",
- GpeNumberMax, AcpiGbl_FADT->Gpe1Base,
- AcpiGbl_FADT->Gpe1Base +
+ GpeNumberMax, AcpiGbl_FADT.Gpe1Base,
+ AcpiGbl_FADT.Gpe1Base +
((RegisterCount1 * ACPI_GPE_REGISTER_WIDTH) - 1)));
/* Ignore GPE1 block by setting the register count to zero */
@@ -1325,9 +1328,9 @@ AcpiEvGpeInitialize (
/* Install GPE Block 1 */
Status = AcpiEvCreateGpeBlock (AcpiGbl_FadtGpeDevice,
- &AcpiGbl_FADT->XGpe1Blk, RegisterCount1,
- AcpiGbl_FADT->Gpe1Base,
- AcpiGbl_FADT->SciInt, &AcpiGbl_GpeFadtBlocks[1]);
+ &AcpiGbl_FADT.XGpe1Block, RegisterCount1,
+ AcpiGbl_FADT.Gpe1Base,
+ AcpiGbl_FADT.SciInterrupt, &AcpiGbl_GpeFadtBlocks[1]);
if (ACPI_FAILURE (Status))
{
@@ -1339,7 +1342,7 @@ AcpiEvGpeInitialize (
* GPE0 and GPE1 do not have to be contiguous in the GPE number
* space. However, GPE0 always starts at GPE number zero.
*/
- GpeNumberMax = AcpiGbl_FADT->Gpe1Base +
+ GpeNumberMax = AcpiGbl_FADT.Gpe1Base +
((RegisterCount1 * ACPI_GPE_REGISTER_WIDTH) - 1);
}
}
diff --git a/usr/src/uts/intel/io/acpica/events/evmisc.c b/usr/src/uts/intel/io/acpica/events/evmisc.c
index d63b1b66ac..e77235f04c 100644
--- a/usr/src/uts/intel/io/acpica/events/evmisc.c
+++ b/usr/src/uts/intel/io/acpica/events/evmisc.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evmisc - Miscellaneous event manager support functions
- * $Revision: 1.96 $
+ * $Revision: 1.109 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -123,21 +123,9 @@
ACPI_MODULE_NAME ("evmisc")
-/* Names for Notify() values, used for debug output */
+/* Pointer to FACS needed for the Global Lock */
-#ifdef ACPI_DEBUG_OUTPUT
-static const char *AcpiNotifyValueNames[] =
-{
- "Bus Check",
- "Device Check",
- "Device Wake",
- "Eject Request",
- "Device Check Light",
- "Frequency Mismatch",
- "Bus Mode Mismatch",
- "Power Fault"
-};
-#endif
+static ACPI_TABLE_FACS *Facs = NULL;
/* Local prototypes */
@@ -149,6 +137,10 @@ static UINT32
AcpiEvGlobalLockHandler (
void *Context);
+static ACPI_STATUS
+AcpiEvRemoveGlobalLockHandler (
+ void);
+
/*******************************************************************************
*
@@ -172,7 +164,6 @@ AcpiEvIsNotifyObject (
{
case ACPI_TYPE_DEVICE:
case ACPI_TYPE_PROCESSOR:
- case ACPI_TYPE_POWER:
case ACPI_TYPE_THERMAL:
/*
* These are the ONLY objects that can receive ACPI notifications
@@ -221,19 +212,9 @@ AcpiEvQueueNotifyRequest (
* initiate soft-off or sleep operation?
*/
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "Dispatching Notify(%X) on node %p\n", NotifyValue, Node));
-
- if (NotifyValue <= 7)
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Notify value: %s\n",
- AcpiNotifyValueNames[NotifyValue]));
- }
- else
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "Notify value: 0x%2.2X **Device Specific**\n",
- NotifyValue));
- }
+ "Dispatching Notify on [%4.4s] Node %p Value 0x%2.2X (%s)\n",
+ AcpiUtGetNodeName (Node), Node, NotifyValue,
+ AcpiUtGetNotifyName (NotifyValue)));
/* Get the notify object attached to the NS Node */
@@ -244,10 +225,11 @@ AcpiEvQueueNotifyRequest (
switch (Node->Type)
{
+ /* Notify allowed only on these types */
+
case ACPI_TYPE_DEVICE:
case ACPI_TYPE_THERMAL:
case ACPI_TYPE_PROCESSOR:
- case ACPI_TYPE_POWER:
if (NotifyValue <= ACPI_MAX_SYS_NOTIFY)
{
@@ -265,8 +247,13 @@ AcpiEvQueueNotifyRequest (
}
}
- /* If there is any handler to run, schedule the dispatcher */
-
+ /*
+ * If there is any handler to run, schedule the dispatcher.
+ * Check for:
+ * 1) Global system notify handler
+ * 2) Global device notify handler
+ * 3) Per-device notify handler
+ */
if ((AcpiGbl_SystemNotify.Handler && (NotifyValue <= ACPI_MAX_SYS_NOTIFY)) ||
(AcpiGbl_DeviceNotify.Handler && (NotifyValue > ACPI_MAX_SYS_NOTIFY)) ||
HandlerObj)
@@ -277,6 +264,13 @@ AcpiEvQueueNotifyRequest (
return (AE_NO_MEMORY);
}
+ if (!HandlerObj)
+ {
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+ "Executing system notify handler for Notify (%4.4s, %X) node %p\n",
+ AcpiUtGetNodeName (Node), NotifyValue, Node));
+ }
+
NotifyInfo->Common.DescriptorType = ACPI_DESC_TYPE_STATE_NOTIFY;
NotifyInfo->Notify.Node = Node;
NotifyInfo->Notify.Value = (UINT16) NotifyValue;
@@ -289,15 +283,13 @@ AcpiEvQueueNotifyRequest (
AcpiUtDeleteGenericState (NotifyInfo);
}
}
-
- if (!HandlerObj)
+ else
{
/*
- * There is no per-device notify handler for this device.
- * This may or may not be a problem.
+ * There is no notify handler (per-device or system) for this device.
*/
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "No notify handler for Notify(%4.4s, %X) node %p\n",
+ "No notify handler for Notify (%4.4s, %X) node %p\n",
AcpiUtGetNodeName (Node), NotifyValue, Node));
}
@@ -413,7 +405,7 @@ AcpiEvGlobalLockHandler (
* If we don't get it now, it will be marked pending and we will
* take another interrupt when it becomes free.
*/
- ACPI_ACQUIRE_GLOBAL_LOCK (AcpiGbl_CommonFACS.GlobalLock, Acquired);
+ ACPI_ACQUIRE_GLOBAL_LOCK (Facs, Acquired);
if (Acquired)
{
/* Got the lock, now wake the thread waiting for it */
@@ -455,6 +447,13 @@ AcpiEvInitGlobalLockHandler (
ACPI_FUNCTION_TRACE (EvInitGlobalLockHandler);
+ Status = AcpiGetTableByIndex (ACPI_TABLE_INDEX_FACS,
+ ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &Facs));
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
AcpiGbl_GlobalLockPresent = TRUE;
Status = AcpiInstallFixedEventHandler (ACPI_EVENT_GLOBAL,
AcpiEvGlobalLockHandler, NULL);
@@ -479,6 +478,35 @@ AcpiEvInitGlobalLockHandler (
}
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiEvRemoveGlobalLockHandler
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Remove the handler for the Global Lock
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiEvRemoveGlobalLockHandler (
+ void)
+{
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (EvRemoveGlobalLockHandler);
+
+ AcpiGbl_GlobalLockPresent = FALSE;
+ Status = AcpiRemoveFixedEventHandler (ACPI_EVENT_GLOBAL,
+ AcpiEvGlobalLockHandler);
+
+ return_ACPI_STATUS (Status);
+}
+
+
/******************************************************************************
*
* FUNCTION: AcpiEvAcquireGlobalLock
@@ -516,13 +544,28 @@ AcpiEvAcquireGlobalLock (
* Only one thread can acquire the GL at a time, the GlobalLockMutex
* enforces this. This interface releases the interpreter if we must wait.
*/
- Status = AcpiExSystemWaitMutex (AcpiGbl_GlobalLockMutex, Timeout);
+ Status = AcpiExSystemWaitMutex (AcpiGbl_GlobalLockMutex->Mutex.OsMutex,
+ Timeout);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
/*
+ * Update the global lock handle and check for wraparound. The handle is
+ * only used for the external global lock interfaces, but it is updated
+ * here to properly handle the case where a single thread may acquire the
+ * lock via both the AML and the AcpiAcquireGlobalLock interfaces. The
+ * handle is therefore updated on the first acquire from a given thread
+ * regardless of where the acquisition request originated.
+ */
+ AcpiGbl_GlobalLockHandle++;
+ if (AcpiGbl_GlobalLockHandle == 0)
+ {
+ AcpiGbl_GlobalLockHandle = 1;
+ }
+
+ /*
* Make sure that a global lock actually exists. If not, just treat
* the lock as a standard mutex.
*/
@@ -534,7 +577,7 @@ AcpiEvAcquireGlobalLock (
/* Attempt to acquire the actual hardware lock */
- ACPI_ACQUIRE_GLOBAL_LOCK (AcpiGbl_CommonFACS.GlobalLock, Acquired);
+ ACPI_ACQUIRE_GLOBAL_LOCK (Facs, Acquired);
if (Acquired)
{
/* We got the lock */
@@ -557,6 +600,7 @@ AcpiEvAcquireGlobalLock (
*/
Status = AcpiExSystemWaitSemaphore (AcpiGbl_GlobalLockSemaphore,
ACPI_WAIT_FOREVER);
+
return_ACPI_STATUS (Status);
}
@@ -597,7 +641,7 @@ AcpiEvReleaseGlobalLock (
{
/* Allow any thread to release the lock */
- ACPI_RELEASE_GLOBAL_LOCK (AcpiGbl_CommonFACS.GlobalLock, Pending);
+ ACPI_RELEASE_GLOBAL_LOCK (Facs, Pending);
/*
* If the pending bit was set, we must write GBL_RLS to the control
@@ -606,7 +650,7 @@ AcpiEvReleaseGlobalLock (
if (Pending)
{
Status = AcpiSetRegister (
- ACPI_BITREG_GLOBAL_LOCK_RELEASE, 1, ACPI_MTX_LOCK);
+ ACPI_BITREG_GLOBAL_LOCK_RELEASE, 1);
}
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Released hardware Global Lock\n"));
@@ -616,7 +660,7 @@ AcpiEvReleaseGlobalLock (
/* Release the local GL mutex */
- AcpiOsReleaseMutex (AcpiGbl_GlobalLockMutex);
+ AcpiOsReleaseMutex (AcpiGbl_GlobalLockMutex->Mutex.OsMutex);
return_ACPI_STATUS (Status);
}
@@ -637,7 +681,7 @@ void
AcpiEvTerminate (
void)
{
- ACPI_NATIVE_UINT i;
+ UINT32 i;
ACPI_STATUS Status;
@@ -655,7 +699,7 @@ AcpiEvTerminate (
for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++)
{
- Status = AcpiDisableEvent ((UINT32) i, 0);
+ Status = AcpiDisableEvent (i, 0);
if (ACPI_FAILURE (Status))
{
ACPI_ERROR ((AE_INFO,
@@ -675,6 +719,13 @@ AcpiEvTerminate (
ACPI_ERROR ((AE_INFO,
"Could not remove SCI handler"));
}
+
+ Status = AcpiEvRemoveGlobalLockHandler ();
+ if (ACPI_FAILURE(Status))
+ {
+ ACPI_ERROR ((AE_INFO,
+ "Could not remove Global Lock handler"));
+ }
}
/* Deallocate all handler objects installed within GPE info structs */
diff --git a/usr/src/uts/intel/io/acpica/events/evregion.c b/usr/src/uts/intel/io/acpica/events/evregion.c
index 27a470d1c7..bc555903e5 100644
--- a/usr/src/uts/intel/io/acpica/events/evregion.c
+++ b/usr/src/uts/intel/io/acpica/events/evregion.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evregion - ACPI AddressSpace (OpRegion) handler dispatch
- * $Revision: 1.166 $
+ * $Revision: 1.171 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -169,7 +169,7 @@ AcpiEvInstallRegionHandlers (
void)
{
ACPI_STATUS Status;
- ACPI_NATIVE_UINT i;
+ UINT32 i;
ACPI_FUNCTION_TRACE (EvInstallRegionHandlers);
@@ -245,7 +245,7 @@ AcpiEvInitializeOpRegions (
void)
{
ACPI_STATUS Status;
- ACPI_NATIVE_UINT i;
+ UINT32 i;
ACPI_FUNCTION_TRACE (EvInitializeOpRegions);
@@ -323,7 +323,6 @@ AcpiEvExecuteRegMethod (
Info->PrefixNode = RegionObj2->Extra.Method_REG;
Info->Pathname = NULL;
Info->Parameters = Args;
- Info->ParameterType = ACPI_PARAM_ARGS;
Info->Flags = ACPI_IGNORE_RETURN_VALUE;
/*
@@ -400,7 +399,6 @@ AcpiEvAddressSpaceDispatch (
ACPI_INTEGER *Value)
{
ACPI_STATUS Status;
- ACPI_STATUS Status2;
ACPI_ADR_SPACE_HANDLER Handler;
ACPI_ADR_SPACE_SETUP RegionSetup;
ACPI_OPERAND_OBJECT *HandlerDesc;
@@ -462,11 +460,7 @@ AcpiEvAddressSpaceDispatch (
/* Re-enter the interpreter */
- Status2 = AcpiExEnterInterpreter ();
- if (ACPI_FAILURE (Status2))
- {
- return_ACPI_STATUS (Status2);
- }
+ AcpiExEnterInterpreter ();
/* Check for failure of the Region Setup */
@@ -509,7 +503,7 @@ AcpiEvAddressSpaceDispatch (
ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
"Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
&RegionObj->Region.Handler->AddressSpace, Handler,
- ACPI_FORMAT_UINT64 (Address),
+ ACPI_FORMAT_NATIVE_UINT (Address),
AcpiUtGetRegionName (RegionObj->Region.SpaceId)));
if (!(HandlerDesc->AddressSpace.HandlerFlags &
@@ -541,11 +535,7 @@ AcpiEvAddressSpaceDispatch (
* We just returned from a non-default handler, we must re-enter the
* interpreter
*/
- Status2 = AcpiExEnterInterpreter ();
- if (ACPI_FAILURE (Status2))
- {
- return_ACPI_STATUS (Status2);
- }
+ AcpiExEnterInterpreter ();
}
return_ACPI_STATUS (Status);
diff --git a/usr/src/uts/intel/io/acpica/events/evrgnini.c b/usr/src/uts/intel/io/acpica/events/evrgnini.c
index 88a7b1b23f..c89f700e8b 100644
--- a/usr/src/uts/intel/io/acpica/events/evrgnini.c
+++ b/usr/src/uts/intel/io/acpica/events/evrgnini.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evrgnini- ACPI AddressSpace (OpRegion) init
- * $Revision: 1.85 $
+ * $Revision: 1.89 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -124,6 +124,16 @@
#define _COMPONENT ACPI_EVENTS
ACPI_MODULE_NAME ("evrgnini")
+/* Local prototypes */
+
+static BOOLEAN
+AcpiEvMatchPciRootBridge (
+ char *Id);
+
+static BOOLEAN
+AcpiEvIsPciRootBridge (
+ ACPI_NAMESPACE_NODE *Node);
+
/*******************************************************************************
*
@@ -259,8 +269,8 @@ AcpiEvPciConfigRegionSetup (
ACPI_OPERAND_OBJECT *HandlerObj;
ACPI_NAMESPACE_NODE *ParentNode;
ACPI_NAMESPACE_NODE *PciRootNode;
+ ACPI_NAMESPACE_NODE *PciDeviceNode;
ACPI_OPERAND_OBJECT *RegionObj = (ACPI_OPERAND_OBJECT *) Handle;
- ACPI_DEVICE_ID ObjectHID;
ACPI_FUNCTION_TRACE (EvPciConfigRegionSetup);
@@ -310,43 +320,35 @@ AcpiEvPciConfigRegionSetup (
PciRootNode = ParentNode;
while (PciRootNode != AcpiGbl_RootNode)
{
- Status = AcpiUtExecute_HID (PciRootNode, &ObjectHID);
- if (ACPI_SUCCESS (Status))
+ /* Get the _HID/_CID in order to detect a RootBridge */
+
+ if (AcpiEvIsPciRootBridge (PciRootNode))
{
- /*
- * Got a valid _HID string, check if this is a PCI root.
- * New for ACPI 3.0: check for a PCI Express root also.
- */
- if (!(ACPI_STRNCMP (ObjectHID.Value, PCI_ROOT_HID_STRING,
- sizeof (PCI_ROOT_HID_STRING)) ||
- !(ACPI_STRNCMP (ObjectHID.Value, PCI_EXPRESS_ROOT_HID_STRING,
- sizeof (PCI_EXPRESS_ROOT_HID_STRING)))))
- {
- /* Install a handler for this PCI root bridge */
+ /* Install a handler for this PCI root bridge */
- Status = AcpiInstallAddressSpaceHandler ((ACPI_HANDLE) PciRootNode,
- ACPI_ADR_SPACE_PCI_CONFIG,
- ACPI_DEFAULT_HANDLER, NULL, NULL);
- if (ACPI_FAILURE (Status))
+ Status = AcpiInstallAddressSpaceHandler (
+ (ACPI_HANDLE) PciRootNode,
+ ACPI_ADR_SPACE_PCI_CONFIG,
+ ACPI_DEFAULT_HANDLER, NULL, NULL);
+ if (ACPI_FAILURE (Status))
+ {
+ if (Status == AE_SAME_HANDLER)
{
- if (Status == AE_SAME_HANDLER)
- {
- /*
- * It is OK if the handler is already installed on the root
- * bridge. Still need to return a context object for the
- * new PCI_Config operation region, however.
- */
- Status = AE_OK;
- }
- else
- {
- ACPI_EXCEPTION ((AE_INFO, Status,
- "Could not install PciConfig handler for Root Bridge %4.4s",
- AcpiUtGetNodeName (PciRootNode)));
- }
+ /*
+ * It is OK if the handler is already installed on the root
+ * bridge. Still need to return a context object for the
+ * new PCI_Config operation region, however.
+ */
+ Status = AE_OK;
+ }
+ else
+ {
+ ACPI_EXCEPTION ((AE_INFO, Status,
+ "Could not install PciConfig handler for Root Bridge %4.4s",
+ AcpiUtGetNodeName (PciRootNode)));
}
- break;
}
+ break;
}
PciRootNode = AcpiNsGetParentNode (PciRootNode);
@@ -379,13 +381,27 @@ AcpiEvPciConfigRegionSetup (
/*
* For PCI_Config space access, we need the segment, bus,
* device and function numbers. Acquire them here.
+ *
+ * Find the parent device object. (This allows the operation region to be
+ * within a subscope under the device, such as a control method.)
*/
+ PciDeviceNode = RegionObj->Region.Node;
+ while (PciDeviceNode && (PciDeviceNode->Type != ACPI_TYPE_DEVICE))
+ {
+ PciDeviceNode = AcpiNsGetParentNode (PciDeviceNode);
+ }
+
+ if (!PciDeviceNode)
+ {
+ ACPI_FREE (PciId);
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
+ }
/*
* Get the PCI device and function numbers from the _ADR object
* contained in the parent's scope.
*/
- Status = AcpiUtEvaluateNumericObject (METHOD_NAME__ADR, ParentNode, &PciValue);
+ Status = AcpiUtEvaluateNumericObject (METHOD_NAME__ADR, PciDeviceNode, &PciValue);
/*
* The default is zero, and since the allocation above zeroed
@@ -424,6 +440,105 @@ AcpiEvPciConfigRegionSetup (
/*******************************************************************************
*
+ * FUNCTION: AcpiEvMatchPciRootBridge
+ *
+ * PARAMETERS: Id - The HID/CID in string format
+ *
+ * RETURN: TRUE if the Id is a match for a PCI/PCI-Express Root Bridge
+ *
+ * DESCRIPTION: Determine if the input ID is a PCI Root Bridge ID.
+ *
+ ******************************************************************************/
+
+static BOOLEAN
+AcpiEvMatchPciRootBridge (
+ char *Id)
+{
+
+ /*
+ * Check if this is a PCI root.
+ * ACPI 3.0+: check for a PCI Express root also.
+ */
+ if (!(ACPI_STRNCMP (Id,
+ PCI_ROOT_HID_STRING,
+ sizeof (PCI_ROOT_HID_STRING))) ||
+
+ !(ACPI_STRNCMP (Id,
+ PCI_EXPRESS_ROOT_HID_STRING,
+ sizeof (PCI_EXPRESS_ROOT_HID_STRING))))
+ {
+ return (TRUE);
+ }
+
+ return (FALSE);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiEvIsPciRootBridge
+ *
+ * PARAMETERS: Node - Device node being examined
+ *
+ * RETURN: TRUE if device is a PCI/PCI-Express Root Bridge
+ *
+ * DESCRIPTION: Determine if the input device represents a PCI Root Bridge by
+ * examining the _HID and _CID for the device.
+ *
+ ******************************************************************************/
+
+static BOOLEAN
+AcpiEvIsPciRootBridge (
+ ACPI_NAMESPACE_NODE *Node)
+{
+ ACPI_STATUS Status;
+ ACPI_DEVICE_ID Hid;
+ ACPI_COMPATIBLE_ID_LIST *Cid;
+ UINT32 i;
+
+
+ /*
+ * Get the _HID and check for a PCI Root Bridge
+ */
+ Status = AcpiUtExecute_HID (Node, &Hid);
+ if (ACPI_FAILURE (Status))
+ {
+ return (FALSE);
+ }
+
+ if (AcpiEvMatchPciRootBridge (Hid.Value))
+ {
+ return (TRUE);
+ }
+
+ /*
+ * The _HID did not match.
+ * Get the _CID and check for a PCI Root Bridge
+ */
+ Status = AcpiUtExecute_CID (Node, &Cid);
+ if (ACPI_FAILURE (Status))
+ {
+ return (FALSE);
+ }
+
+ /* Check all _CIDs in the returned list */
+
+ for (i = 0; i < Cid->Count; i++)
+ {
+ if (AcpiEvMatchPciRootBridge (Cid->Id[i].Value))
+ {
+ ACPI_FREE (Cid);
+ return (TRUE);
+ }
+ }
+
+ ACPI_FREE (Cid);
+ return (FALSE);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiEvPciBarRegionSetup
*
* PARAMETERS: Handle - Region we are interested in
diff --git a/usr/src/uts/intel/io/acpica/events/evsci.c b/usr/src/uts/intel/io/acpica/events/evsci.c
index abde1c9d28..1746d84b6f 100644
--- a/usr/src/uts/intel/io/acpica/events/evsci.c
+++ b/usr/src/uts/intel/io/acpica/events/evsci.c
@@ -2,7 +2,7 @@
*
* Module Name: evsci - System Control Interrupt configuration and
* legacy to ACPI mode state transition functions
- * $Revision: 1.100 $
+ * $Revision: 1.104 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -171,6 +171,7 @@ AcpiEvSciXruptHandler (
*/
InterruptHandled |= AcpiEvGpeDetect (GpeXruptList);
+ AcpiSciCount++;
return_UINT32 (InterruptHandled);
}
@@ -235,8 +236,8 @@ AcpiEvInstallSciHandler (
ACPI_FUNCTION_TRACE (EvInstallSciHandler);
- Status = AcpiOsInstallInterruptHandler ((UINT32) AcpiGbl_FADT->SciInt,
- AcpiEvSciXruptHandler, AcpiGbl_GpeXruptListHead);
+ Status = AcpiOsInstallInterruptHandler ((UINT32) AcpiGbl_FADT.SciInterrupt,
+ AcpiEvSciXruptHandler, AcpiGbl_GpeXruptListHead);
return_ACPI_STATUS (Status);
}
@@ -272,8 +273,8 @@ AcpiEvRemoveSciHandler (
/* Just let the OS remove the handler and disable the level */
- Status = AcpiOsRemoveInterruptHandler ((UINT32) AcpiGbl_FADT->SciInt,
- AcpiEvSciXruptHandler);
+ Status = AcpiOsRemoveInterruptHandler ((UINT32) AcpiGbl_FADT.SciInterrupt,
+ AcpiEvSciXruptHandler);
return_ACPI_STATUS (Status);
}
diff --git a/usr/src/uts/intel/io/acpica/events/evxface.c b/usr/src/uts/intel/io/acpica/events/evxface.c
index ae1a12144f..64fcd8a5e1 100644
--- a/usr/src/uts/intel/io/acpica/events/evxface.c
+++ b/usr/src/uts/intel/io/acpica/events/evxface.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evxface - External interfaces for ACPI events
- * $Revision: 1.161 $
+ * $Revision: 1.167 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -891,6 +891,12 @@ ACPI_EXPORT_SYMBOL (AcpiRemoveGpeHandler)
*
* DESCRIPTION: Acquire the ACPI Global Lock
*
+ * Note: Allows callers with the same thread ID to acquire the global lock
+ * multiple times. In other words, externally, the behavior of the global lock
+ * is identical to an AML mutex. On the first acquire, a new handle is
+ * returned. On any subsequent calls to acquire by the same thread, the same
+ * handle is returned.
+ *
******************************************************************************/
ACPI_STATUS
@@ -906,21 +912,21 @@ AcpiAcquireGlobalLock (
return (AE_BAD_PARAMETER);
}
- Status = AcpiExEnterInterpreter ();
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
+ /* Must lock interpreter to prevent race conditions */
- Status = AcpiEvAcquireGlobalLock (Timeout);
- AcpiExExitInterpreter ();
+ AcpiExEnterInterpreter ();
+
+ Status = AcpiExAcquireMutexObject (Timeout,
+ AcpiGbl_GlobalLockMutex, AcpiOsGetThreadId ());
if (ACPI_SUCCESS (Status))
{
- AcpiGbl_GlobalLockHandle++;
+ /* Return the global lock handle (updated in AcpiEvAcquireGlobalLock) */
+
*Handle = AcpiGbl_GlobalLockHandle;
}
+ AcpiExExitInterpreter ();
return (Status);
}
@@ -946,12 +952,12 @@ AcpiReleaseGlobalLock (
ACPI_STATUS Status;
- if (Handle != AcpiGbl_GlobalLockHandle)
+ if (!Handle || (Handle != AcpiGbl_GlobalLockHandle))
{
return (AE_NOT_ACQUIRED);
}
- Status = AcpiEvReleaseGlobalLock ();
+ Status = AcpiExReleaseMutexObject (AcpiGbl_GlobalLockMutex);
return (Status);
}
diff --git a/usr/src/uts/intel/io/acpica/events/evxfevnt.c b/usr/src/uts/intel/io/acpica/events/evxfevnt.c
index 5f52cdce82..1318fa1d50 100644
--- a/usr/src/uts/intel/io/acpica/events/evxfevnt.c
+++ b/usr/src/uts/intel/io/acpica/events/evxfevnt.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: evxfevnt - External Interfaces, ACPI event disable/enable
- * $Revision: 1.88 $
+ * $Revision: 1.94 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -120,6 +120,7 @@
#include "acpi.h"
#include "acevents.h"
#include "acnamesp.h"
+#include "actables.h"
#define _COMPONENT ACPI_EVENTS
ACPI_MODULE_NAME ("evxfevnt")
@@ -147,14 +148,15 @@ AcpiEnable (
ACPI_FUNCTION_TRACE (AcpiEnable);
- /* Make sure we have the FADT */
+ /* ACPI tables must be present */
- if (!AcpiGbl_FADT)
+ if (!AcpiTbTablesLoaded ())
{
- ACPI_WARNING ((AE_INFO, "No FADT information present!"));
return_ACPI_STATUS (AE_NO_ACPI_TABLES);
}
+ /* Check current mode */
+
if (AcpiHwGetMode() == ACPI_SYS_MODE_ACPI)
{
ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "System is already in ACPI mode\n"));
@@ -202,12 +204,6 @@ AcpiDisable (
ACPI_FUNCTION_TRACE (AcpiDisable);
- if (!AcpiGbl_FADT)
- {
- ACPI_WARNING ((AE_INFO, "No FADT information present!"));
- return_ACPI_STATUS (AE_NO_ACPI_TABLES);
- }
-
if (AcpiHwGetMode() == ACPI_SYS_MODE_LEGACY)
{
ACPI_DEBUG_PRINT ((ACPI_DB_INIT,
@@ -271,8 +267,7 @@ AcpiEnableEvent (
* Enable the requested fixed event (by writing a one to the
* enable register bit)
*/
- Status = AcpiSetRegister (AcpiGbl_FixedEventInfo[Event].EnableRegisterId,
- 1, ACPI_MTX_LOCK);
+ Status = AcpiSetRegister (AcpiGbl_FixedEventInfo[Event].EnableRegisterId, 1);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -281,7 +276,7 @@ AcpiEnableEvent (
/* Make sure that the hardware responded */
Status = AcpiGetRegister (AcpiGbl_FixedEventInfo[Event].EnableRegisterId,
- &Value, ACPI_MTX_LOCK);
+ &Value);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -512,15 +507,14 @@ AcpiDisableEvent (
* Disable the requested fixed event (by writing a zero to the
* enable register bit)
*/
- Status = AcpiSetRegister (AcpiGbl_FixedEventInfo[Event].EnableRegisterId,
- 0, ACPI_MTX_LOCK);
+ Status = AcpiSetRegister (AcpiGbl_FixedEventInfo[Event].EnableRegisterId, 0);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
Status = AcpiGetRegister (AcpiGbl_FixedEventInfo[Event].EnableRegisterId,
- &Value, ACPI_MTX_LOCK);
+ &Value);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -572,8 +566,7 @@ AcpiClearEvent (
* Clear the requested fixed event (By writing a one to the
* status register bit)
*/
- Status = AcpiSetRegister (AcpiGbl_FixedEventInfo[Event].StatusRegisterId,
- 1, ACPI_MTX_LOCK);
+ Status = AcpiSetRegister (AcpiGbl_FixedEventInfo[Event].StatusRegisterId, 1);
return_ACPI_STATUS (Status);
}
@@ -681,7 +674,7 @@ AcpiGetEventStatus (
/* Get the status of the requested fixed event */
Status = AcpiGetRegister (AcpiGbl_FixedEventInfo[Event].StatusRegisterId,
- EventStatus, ACPI_MTX_LOCK);
+ EventStatus);
return_ACPI_STATUS (Status);
}
diff --git a/usr/src/uts/intel/io/acpica/events/evxfregn.c b/usr/src/uts/intel/io/acpica/events/evxfregn.c
index 834d65a65d..8cfeca5725 100644
--- a/usr/src/uts/intel/io/acpica/events/evxfregn.c
+++ b/usr/src/uts/intel/io/acpica/events/evxfregn.c
@@ -2,7 +2,7 @@
*
* Module Name: evxfregn - External Interfaces, ACPI Operation Regions and
* Address Spaces.
- * $Revision: 1.69 $
+ * $Revision: 1.71 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exconfig.c b/usr/src/uts/intel/io/acpica/executer/exconfig.c
index 90bb058480..0266410adf 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exconfig.c
+++ b/usr/src/uts/intel/io/acpica/executer/exconfig.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: exconfig - Namespace reconfiguration (Load/Unload opcodes)
- * $Revision: 1.99 $
+ * $Revision: 1.113 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -119,9 +119,7 @@
#include "acpi.h"
#include "acinterp.h"
-#include "amlcode.h"
#include "acnamesp.h"
-#include "acevents.h"
#include "actables.h"
#include "acdispat.h"
@@ -133,7 +131,7 @@
static ACPI_STATUS
AcpiExAddTable (
- ACPI_TABLE_HEADER *Table,
+ UINT32 TableIndex,
ACPI_NAMESPACE_NODE *ParentNode,
ACPI_OPERAND_OBJECT **DdbHandle);
@@ -155,12 +153,11 @@ AcpiExAddTable (
static ACPI_STATUS
AcpiExAddTable (
- ACPI_TABLE_HEADER *Table,
+ UINT32 TableIndex,
ACPI_NAMESPACE_NODE *ParentNode,
ACPI_OPERAND_OBJECT **DdbHandle)
{
ACPI_STATUS Status;
- ACPI_TABLE_DESC TableInfo;
ACPI_OPERAND_OBJECT *ObjDesc;
@@ -177,49 +174,22 @@ AcpiExAddTable (
/* Init the table handle */
- ObjDesc->Reference.Opcode = AML_LOAD_OP;
+ ObjDesc->Reference.Class = ACPI_REFCLASS_TABLE;
*DdbHandle = ObjDesc;
/* Install the new table into the local data structures */
- ACPI_MEMSET (&TableInfo, 0, sizeof (ACPI_TABLE_DESC));
-
- TableInfo.Type = ACPI_TABLE_ID_SSDT;
- TableInfo.Pointer = Table;
- TableInfo.Length = (ACPI_SIZE) Table->Length;
- TableInfo.Allocation = ACPI_MEM_ALLOCATED;
-
- Status = AcpiTbInstallTable (&TableInfo);
- ObjDesc->Reference.Object = TableInfo.InstalledDesc;
-
- if (ACPI_FAILURE (Status))
- {
- if (Status == AE_ALREADY_EXISTS)
- {
- /* Table already exists, just return the handle */
-
- return_ACPI_STATUS (AE_OK);
- }
- goto Cleanup;
- }
+ ObjDesc->Reference.Value = TableIndex;
/* Add the table to the namespace */
- Status = AcpiNsLoadTable (TableInfo.InstalledDesc, ParentNode);
+ Status = AcpiNsLoadTable (TableIndex, ParentNode);
if (ACPI_FAILURE (Status))
{
- /* Uninstall table on error */
-
- (void) AcpiTbUninstallTable (TableInfo.InstalledDesc);
- goto Cleanup;
+ AcpiUtRemoveReference (ObjDesc);
+ *DdbHandle = NULL;
}
- return_ACPI_STATUS (AE_OK);
-
-
-Cleanup:
- AcpiUtRemoveReference (ObjDesc);
- *DdbHandle = NULL;
return_ACPI_STATUS (Status);
}
@@ -233,7 +203,7 @@ Cleanup:
*
* RETURN: Status
*
- * DESCRIPTION: Load an ACPI table
+ * DESCRIPTION: Load an ACPI table from the RSDT/XSDT
*
******************************************************************************/
@@ -244,35 +214,31 @@ AcpiExLoadTableOp (
{
ACPI_STATUS Status;
ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];
- ACPI_TABLE_HEADER *Table;
ACPI_NAMESPACE_NODE *ParentNode;
ACPI_NAMESPACE_NODE *StartNode;
ACPI_NAMESPACE_NODE *ParameterNode = NULL;
ACPI_OPERAND_OBJECT *DdbHandle;
+ ACPI_TABLE_HEADER *Table;
+ UINT32 TableIndex;
ACPI_FUNCTION_TRACE (ExLoadTableOp);
-#if 0
- /*
- * Make sure that the signature does not match one of the tables that
- * is already loaded.
- */
- Status = AcpiTbMatchSignature (Operand[0]->String.Pointer, NULL);
- if (Status == AE_OK)
- {
- /* Signature matched -- don't allow override */
+ /* Validate lengths for the SignatureString, OEMIDString, OEMTableID */
- return_ACPI_STATUS (AE_ALREADY_EXISTS);
+ if ((Operand[0]->String.Length > ACPI_NAME_SIZE) ||
+ (Operand[1]->String.Length > ACPI_OEM_ID_SIZE) ||
+ (Operand[2]->String.Length > ACPI_OEM_TABLE_ID_SIZE))
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
}
-#endif
- /* Find the ACPI table */
+ /* Find the ACPI table in the RSDT/XSDT */
Status = AcpiTbFindTable (Operand[0]->String.Pointer,
Operand[1]->String.Pointer,
- Operand[2]->String.Pointer, &Table);
+ Operand[2]->String.Pointer, &TableIndex);
if (ACPI_FAILURE (Status))
{
if (Status != AE_NOT_FOUND)
@@ -341,7 +307,7 @@ AcpiExLoadTableOp (
/* Load the table into the namespace */
- Status = AcpiExAddTable (Table, ParentNode, &DdbHandle);
+ Status = AcpiExAddTable (TableIndex, ParentNode, &DdbHandle);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -363,9 +329,21 @@ AcpiExLoadTableOp (
}
}
- ACPI_INFO ((AE_INFO,
- "Dynamic OEM Table Load - [%4.4s] OemId [%6.6s] OemTableId [%8.8s]",
- Table->Signature, Table->OemId, Table->OemTableId));
+ Status = AcpiGetTableByIndex (TableIndex, &Table);
+ if (ACPI_SUCCESS (Status))
+ {
+ ACPI_INFO ((AE_INFO,
+ "Dynamic OEM Table Load - [%.4s] OemId [%.6s] OemTableId [%.8s]",
+ Table->Signature, Table->OemId, Table->OemTableId));
+ }
+
+ /* Invoke table handler if present */
+
+ if (AcpiGbl_TableHandler)
+ {
+ (void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_LOAD, Table,
+ AcpiGbl_TableHandlerContext);
+ }
*ReturnDesc = DdbHandle;
return_ACPI_STATUS (Status);
@@ -376,7 +354,7 @@ AcpiExLoadTableOp (
*
* FUNCTION: AcpiExLoadOp
*
- * PARAMETERS: ObjDesc - Region or Field where the table will be
+ * PARAMETERS: ObjDesc - Region or Buffer/Field where the table will be
* obtained
* Target - Where a handle to the table will be stored
* WalkState - Current state
@@ -385,6 +363,12 @@ AcpiExLoadTableOp (
*
* DESCRIPTION: Load an ACPI table from a field or operation region
*
+ * NOTE: Region Fields (Field, BankField, IndexFields) are resolved to buffer
+ * objects before this code is reached.
+ *
+ * If source is an operation region, it must refer to SystemMemory, as
+ * per the ACPI specification.
+ *
******************************************************************************/
ACPI_STATUS
@@ -393,26 +377,34 @@ AcpiExLoadOp (
ACPI_OPERAND_OBJECT *Target,
ACPI_WALK_STATE *WalkState)
{
- ACPI_STATUS Status;
ACPI_OPERAND_OBJECT *DdbHandle;
- ACPI_OPERAND_OBJECT *BufferDesc = NULL;
- ACPI_TABLE_HEADER *TablePtr = NULL;
- ACPI_PHYSICAL_ADDRESS Address;
- ACPI_TABLE_HEADER TableHeader;
- ACPI_INTEGER Temp;
- UINT32 i;
+ ACPI_TABLE_HEADER *Table;
+ ACPI_TABLE_DESC TableDesc;
+ UINT32 TableIndex;
+ ACPI_STATUS Status;
+ UINT32 Length;
+
ACPI_FUNCTION_TRACE (ExLoadOp);
- /* Object can be either an OpRegion or a Field */
+ ACPI_MEMSET (&TableDesc, 0, sizeof (ACPI_TABLE_DESC));
+
+ /* Source Object can be either an OpRegion or a Buffer/Field */
switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
{
case ACPI_TYPE_REGION:
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Load from Region %p %s\n",
- ObjDesc, AcpiUtGetObjectTypeName (ObjDesc)));
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ "Load table from Region %p\n", ObjDesc));
+
+ /* Region must be SystemMemory (from ACPI spec) */
+
+ if (ObjDesc->Region.SpaceId != ACPI_ADR_SPACE_SYSTEM_MEMORY)
+ {
+ return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
+ }
/*
* If the Region Address and Length have not been previously evaluated,
@@ -427,93 +419,98 @@ AcpiExLoadOp (
}
}
- /* Get the base physical address of the region */
-
- Address = ObjDesc->Region.Address;
-
- /* Get part of the table header to get the table length */
-
- TableHeader.Length = 0;
- for (i = 0; i < 8; i++)
+ /*
+ * Map the table header and get the actual table length. The region
+ * length is not guaranteed to be the same as the table length.
+ */
+ Table = AcpiOsMapMemory (ObjDesc->Region.Address,
+ sizeof (ACPI_TABLE_HEADER));
+ if (!Table)
{
- Status = AcpiEvAddressSpaceDispatch (ObjDesc, ACPI_READ,
- (ACPI_PHYSICAL_ADDRESS) (i + Address), 8, &Temp);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- /* Get the one valid byte of the returned 64-bit value */
-
- ACPI_CAST_PTR (UINT8, &TableHeader)[i] = (UINT8) Temp;
+ return_ACPI_STATUS (AE_NO_MEMORY);
}
- /* Sanity check the table length */
+ Length = Table->Length;
+ AcpiOsUnmapMemory (Table, sizeof (ACPI_TABLE_HEADER));
+
+ /* Must have at least an ACPI table header */
- if (TableHeader.Length < sizeof (ACPI_TABLE_HEADER))
+ if (Length < sizeof (ACPI_TABLE_HEADER))
{
- return_ACPI_STATUS (AE_BAD_HEADER);
+ return_ACPI_STATUS (AE_INVALID_TABLE_LENGTH);
}
- /* Allocate a buffer for the entire table */
+ /*
+ * The memory region is not guaranteed to remain stable and we must
+ * copy the table to a local buffer. For example, the memory region
+ * is corrupted after suspend on some machines. Dynamically loaded
+ * tables are usually small, so this overhead is minimal.
+ */
- TablePtr = ACPI_ALLOCATE (TableHeader.Length);
- if (!TablePtr)
+ /* Allocate a buffer for the table */
+
+ TableDesc.Pointer = ACPI_ALLOCATE (Length);
+ if (!TableDesc.Pointer)
{
return_ACPI_STATUS (AE_NO_MEMORY);
}
- /* Get the entire table from the op region */
+ /* Map the entire table and copy it */
- for (i = 0; i < TableHeader.Length; i++)
+ Table = AcpiOsMapMemory (ObjDesc->Region.Address, Length);
+ if (!Table)
{
- Status = AcpiEvAddressSpaceDispatch (ObjDesc, ACPI_READ,
- (ACPI_PHYSICAL_ADDRESS) (i + Address), 8, &Temp);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
+ ACPI_FREE (TableDesc.Pointer);
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
- /* Get the one valid byte of the returned 64-bit value */
+ ACPI_MEMCPY (TableDesc.Pointer, Table, Length);
+ AcpiOsUnmapMemory (Table, Length);
- ACPI_CAST_PTR (UINT8, TablePtr)[i] = (UINT8) Temp;
- }
+ TableDesc.Address = ObjDesc->Region.Address;
break;
- case ACPI_TYPE_LOCAL_REGION_FIELD:
- case ACPI_TYPE_LOCAL_BANK_FIELD:
- case ACPI_TYPE_LOCAL_INDEX_FIELD:
+ case ACPI_TYPE_BUFFER: /* Buffer or resolved RegionField */
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Load from Field %p %s\n",
- ObjDesc, AcpiUtGetObjectTypeName (ObjDesc)));
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ "Load table from Buffer or Field %p\n", ObjDesc));
- /*
- * The length of the field must be at least as large as the table.
- * Read the entire field and thus the entire table. Buffer is
- * allocated during the read.
- */
- Status = AcpiExReadDataFromField (WalkState, ObjDesc, &BufferDesc);
- if (ACPI_FAILURE (Status))
+ /* Must have at least an ACPI table header */
+
+ if (ObjDesc->Buffer.Length < sizeof (ACPI_TABLE_HEADER))
{
- return_ACPI_STATUS (Status);
+ return_ACPI_STATUS (AE_INVALID_TABLE_LENGTH);
}
- TablePtr = ACPI_CAST_PTR (ACPI_TABLE_HEADER,
- BufferDesc->Buffer.Pointer);
+ /* Get the actual table length from the table header */
- /* All done with the BufferDesc, delete it */
+ Table = ACPI_CAST_PTR (ACPI_TABLE_HEADER, ObjDesc->Buffer.Pointer);
+ Length = Table->Length;
- BufferDesc->Buffer.Pointer = NULL;
- AcpiUtRemoveReference (BufferDesc);
+ /* Table cannot extend beyond the buffer */
- /* Sanity check the table length */
+ if (Length > ObjDesc->Buffer.Length)
+ {
+ return_ACPI_STATUS (AE_AML_BUFFER_LIMIT);
+ }
+ if (Length < sizeof (ACPI_TABLE_HEADER))
+ {
+ return_ACPI_STATUS (AE_INVALID_TABLE_LENGTH);
+ }
- if (TablePtr->Length < sizeof (ACPI_TABLE_HEADER))
+ /*
+ * Copy the table from the buffer because the buffer could be modified
+ * or even deleted in the future
+ */
+ TableDesc.Pointer = ACPI_ALLOCATE (Length);
+ if (!TableDesc.Pointer)
{
- Status = AE_BAD_HEADER;
- goto Cleanup;
+ return_ACPI_STATUS (AE_NO_MEMORY);
}
+
+ ACPI_MEMCPY (TableDesc.Pointer, Table, Length);
+ TableDesc.Address = ACPI_TO_INTEGER (TableDesc.Pointer);
break;
@@ -521,21 +518,36 @@ AcpiExLoadOp (
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
- /* The table must be either an SSDT or a PSDT */
+ /* Validate table checksum (will not get validated in TbAddTable) */
- if ((!ACPI_COMPARE_NAME (TablePtr->Signature, PSDT_SIG)) &&
- (!ACPI_COMPARE_NAME (TablePtr->Signature, SSDT_SIG)))
+ Status = AcpiTbVerifyChecksum (TableDesc.Pointer, Length);
+ if (ACPI_FAILURE (Status))
{
- ACPI_ERROR ((AE_INFO,
- "Table has invalid signature [%4.4s], must be SSDT or PSDT",
- TablePtr->Signature));
- Status = AE_BAD_SIGNATURE;
- goto Cleanup;
+ ACPI_FREE (TableDesc.Pointer);
+ return_ACPI_STATUS (Status);
}
+ /* Complete the table descriptor */
+
+ TableDesc.Length = Length;
+ TableDesc.Flags = ACPI_TABLE_ORIGIN_ALLOCATED;
+
/* Install the new table into the local data structures */
- Status = AcpiExAddTable (TablePtr, AcpiGbl_RootNode, &DdbHandle);
+ Status = AcpiTbAddTable (&TableDesc, &TableIndex);
+ if (ACPI_FAILURE (Status))
+ {
+ goto Cleanup;
+ }
+
+ /*
+ * Add the table to the namespace.
+ *
+ * Note: Load the table objects relative to the root of the namespace.
+ * This appears to go against the ACPI specification, but we do it for
+ * compatibility with other ACPI implementations.
+ */
+ Status = AcpiExAddTable (TableIndex, AcpiGbl_RootNode, &DdbHandle);
if (ACPI_FAILURE (Status))
{
/* On error, TablePtr was deallocated above */
@@ -552,17 +564,24 @@ AcpiExLoadOp (
/* TablePtr was deallocated above */
+ AcpiUtRemoveReference (DdbHandle);
return_ACPI_STATUS (Status);
}
- ACPI_INFO ((AE_INFO,
- "Dynamic SSDT Load - OemId [%6.6s] OemTableId [%8.8s]",
- TablePtr->OemId, TablePtr->OemTableId));
+ /* Invoke table handler if present */
+
+ if (AcpiGbl_TableHandler)
+ {
+ (void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_LOAD, TableDesc.Pointer,
+ AcpiGbl_TableHandlerContext);
+ }
Cleanup:
if (ACPI_FAILURE (Status))
{
- ACPI_FREE (TablePtr);
+ /* Delete allocated table buffer */
+
+ AcpiTbDeleteTable (&TableDesc);
}
return_ACPI_STATUS (Status);
}
@@ -586,7 +605,8 @@ AcpiExUnloadTable (
{
ACPI_STATUS Status = AE_OK;
ACPI_OPERAND_OBJECT *TableDesc = DdbHandle;
- ACPI_TABLE_DESC *TableInfo;
+ UINT32 TableIndex;
+ ACPI_TABLE_HEADER *Table;
ACPI_FUNCTION_TRACE (ExUnloadTable);
@@ -605,23 +625,34 @@ AcpiExUnloadTable (
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
- /* Get the actual table descriptor from the DdbHandle */
+ /* Get the table index from the DdbHandle */
- TableInfo = (ACPI_TABLE_DESC *) TableDesc->Reference.Object;
+ TableIndex = TableDesc->Reference.Value;
+
+ /* Invoke table handler if present */
+
+ if (AcpiGbl_TableHandler)
+ {
+ Status = AcpiGetTableByIndex (TableIndex, &Table);
+ if (ACPI_SUCCESS (Status))
+ {
+ (void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_UNLOAD, Table,
+ AcpiGbl_TableHandlerContext);
+ }
+ }
/*
* Delete the entire namespace under this table Node
* (Offset contains the TableId)
*/
- AcpiNsDeleteNamespaceByOwner (TableInfo->OwnerId);
+ AcpiTbDeleteNamespaceByOwner (TableIndex);
+ (void) AcpiTbReleaseOwnerId (TableIndex);
- /* Delete the table itself */
+ AcpiTbSetTableLoadedFlag (TableIndex, FALSE);
- (void) AcpiTbUninstallTable (TableInfo->InstalledDesc);
+ /* Table unloaded, remove a reference to the DdbHandle object */
- /* Delete the table descriptor (DdbHandle) */
-
- AcpiUtRemoveReference (TableDesc);
- return_ACPI_STATUS (Status);
+ AcpiUtRemoveReference (DdbHandle);
+ return_ACPI_STATUS (AE_OK);
}
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exconvrt.c b/usr/src/uts/intel/io/acpica/executer/exconvrt.c
index a5882b183a..a84731d21e 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exconvrt.c
+++ b/usr/src/uts/intel/io/acpica/executer/exconvrt.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: exconvrt - Object conversion routines
- * $Revision: 1.73 $
+ * $Revision: 1.75 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -139,7 +139,7 @@ AcpiExConvertToAscii (
*
* FUNCTION: AcpiExConvertToInteger
*
- * PARAMETERS: ObjDesc - Object to be converted. Must be an
+ * PARAMETERS: ObjDesc - Object to be converted. Must be an
* Integer, Buffer, or String
* ResultDesc - Where the new Integer object is returned
* Flags - Used for string conversion
@@ -190,7 +190,7 @@ AcpiExConvertToInteger (
}
/*
- * Convert the buffer/string to an integer. Note that both buffers and
+ * 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.
*
@@ -208,7 +208,7 @@ AcpiExConvertToInteger (
/*
* Convert string to an integer - for most cases, the string must be
- * hexadecimal as per the ACPI specification. The only exception (as
+ * hexadecimal as per the ACPI specification. The only exception (as
* of ACPI 3.0) is that the ToInteger() operator allows both decimal
* and hexadecimal strings (hex prefixed with "0x").
*/
@@ -253,6 +253,7 @@ AcpiExConvertToInteger (
default:
+
/* No other types can get here */
break;
}
@@ -281,7 +282,7 @@ AcpiExConvertToInteger (
*
* FUNCTION: AcpiExConvertToBuffer
*
- * PARAMETERS: ObjDesc - Object to be converted. Must be an
+ * PARAMETERS: ObjDesc - Object to be converted. Must be an
* Integer, Buffer, or String
* ResultDesc - Where the new buffer object is returned
*
@@ -395,11 +396,11 @@ AcpiExConvertToAscii (
UINT8 DataWidth)
{
ACPI_INTEGER Digit;
- ACPI_NATIVE_UINT i;
- ACPI_NATIVE_UINT j;
- ACPI_NATIVE_UINT k = 0;
- ACPI_NATIVE_UINT HexLength;
- ACPI_NATIVE_UINT DecimalLength;
+ UINT32 i;
+ UINT32 j;
+ UINT32 k = 0;
+ UINT32 HexLength;
+ UINT32 DecimalLength;
UINT32 Remainder;
BOOLEAN SupressZeros;
@@ -461,7 +462,7 @@ AcpiExConvertToAscii (
/* HexLength: 2 ascii hex chars per data byte */
- HexLength = (ACPI_NATIVE_UINT) ACPI_MUL_2 (DataWidth);
+ HexLength = ACPI_MUL_2 (DataWidth);
for (i = 0, j = (HexLength-1); i < HexLength; i++, j--)
{
/* Get one hex digit, most significant digits first */
@@ -476,7 +477,7 @@ AcpiExConvertToAscii (
}
/*
- * Since leading zeros are supressed, we must check for the case where
+ * Since leading zeros are suppressed, we must check for the case where
* the integer equals 0
*
* Finally, null terminate the string and return the length
@@ -496,7 +497,7 @@ AcpiExConvertToAscii (
*
* FUNCTION: AcpiExConvertToString
*
- * PARAMETERS: ObjDesc - Object to be converted. Must be an
+ * PARAMETERS: ObjDesc - Object to be converted. Must be an
* Integer, Buffer, or String
* ResultDesc - Where the string object is returned
* Type - String flags (base and conversion type)
@@ -592,7 +593,7 @@ AcpiExConvertToString (
Base = 10;
/*
- * Calculate the final string length. Individual string values
+ * Calculate the final string length. Individual string values
* are variable length (include separator for each)
*/
for (i = 0; i < ObjDesc->Buffer.Length; i++)
@@ -749,7 +750,7 @@ AcpiExConvertToTargetType (
case ACPI_TYPE_LOCAL_BANK_FIELD:
case ACPI_TYPE_LOCAL_INDEX_FIELD:
/*
- * These types require an Integer operand. We can convert
+ * These types require an Integer operand. We can convert
* a Buffer or a String to an Integer if necessary.
*/
Status = AcpiExConvertToInteger (SourceDesc, ResultDesc,
@@ -759,7 +760,7 @@ AcpiExConvertToTargetType (
case ACPI_TYPE_STRING:
/*
- * The operand must be a String. We can convert an
+ * The operand must be a String. We can convert an
* Integer or Buffer if necessary
*/
Status = AcpiExConvertToString (SourceDesc, ResultDesc,
@@ -769,7 +770,7 @@ AcpiExConvertToTargetType (
case ACPI_TYPE_BUFFER:
/*
- * The operand must be a Buffer. We can convert an
+ * The operand must be a Buffer. We can convert an
* Integer or String if necessary
*/
Status = AcpiExConvertToBuffer (SourceDesc, ResultDesc);
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/excreate.c b/usr/src/uts/intel/io/acpica/executer/excreate.c
index 64b2920060..dc397dea9a 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/excreate.c
+++ b/usr/src/uts/intel/io/acpica/executer/excreate.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: excreate - Named object creation
- * $Revision: 1.111 $
+ * $Revision: 1.117 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -121,8 +121,6 @@
#include "acinterp.h"
#include "amlcode.h"
#include "acnamesp.h"
-#include "acevents.h"
-#include "actables.h"
#define _COMPONENT ACPI_EXECUTER
@@ -180,16 +178,28 @@ AcpiExCreateAlias (
*/
switch (TargetNode->Type)
{
+
+ /* For these types, the sub-object can change dynamically via a Store */
+
case ACPI_TYPE_INTEGER:
case ACPI_TYPE_STRING:
case ACPI_TYPE_BUFFER:
case ACPI_TYPE_PACKAGE:
case ACPI_TYPE_BUFFER_FIELD:
+ /*
+ * These types open a new scope, so we need the NS node in order to access
+ * any children.
+ */
+ case ACPI_TYPE_DEVICE:
+ case ACPI_TYPE_POWER:
+ case ACPI_TYPE_PROCESSOR:
+ case ACPI_TYPE_THERMAL:
+ case ACPI_TYPE_LOCAL_SCOPE:
+
/*
* The new alias has the type ALIAS and points to the original
- * NS node, not the object itself. This is because for these
- * types, the object can change dynamically via a Store.
+ * NS node, not the object itself.
*/
AliasNode->Type = ACPI_TYPE_LOCAL_ALIAS;
AliasNode->Object = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, TargetNode);
@@ -198,9 +208,7 @@ AcpiExCreateAlias (
case ACPI_TYPE_METHOD:
/*
- * The new alias has the type ALIAS and points to the original
- * NS node, not the object itself. This is because for these
- * types, the object can change dynamically via a Store.
+ * Control method aliases need to be differentiated
*/
AliasNode->Type = ACPI_TYPE_LOCAL_METHOD_ALIAS;
AliasNode->Object = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, TargetNode);
@@ -441,107 +449,6 @@ Cleanup:
/*******************************************************************************
*
- * FUNCTION: AcpiExCreateTableRegion
- *
- * PARAMETERS: WalkState - Current state
- *
- * RETURN: Status
- *
- * DESCRIPTION: Create a new DataTableRegion object
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiExCreateTableRegion (
- ACPI_WALK_STATE *WalkState)
-{
- ACPI_STATUS Status;
- ACPI_OPERAND_OBJECT **Operand = &WalkState->Operands[0];
- ACPI_OPERAND_OBJECT *ObjDesc;
- ACPI_NAMESPACE_NODE *Node;
- ACPI_TABLE_HEADER *Table;
- ACPI_OPERAND_OBJECT *RegionObj2;
-
-
- ACPI_FUNCTION_TRACE (ExCreateTableRegion);
-
-
- /* Get the Node from the object stack */
-
- Node = WalkState->Op->Common.Node;
-
- /*
- * If the region object is already attached to this node,
- * just return
- */
- if (AcpiNsGetAttachedObject (Node))
- {
- return_ACPI_STATUS (AE_OK);
- }
-
- /* Find the ACPI table */
-
- Status = AcpiTbFindTable (Operand[1]->String.Pointer,
- Operand[2]->String.Pointer, Operand[3]->String.Pointer, &Table);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- /* Create the region descriptor */
-
- ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_REGION);
- if (!ObjDesc)
- {
- return_ACPI_STATUS (AE_NO_MEMORY);
- }
-
- RegionObj2 = ObjDesc->Common.NextObject;
- RegionObj2->Extra.RegionContext = NULL;
-
- /* Init the region from the operands */
-
- ObjDesc->Region.SpaceId = REGION_DATA_TABLE;
- ObjDesc->Region.Address = (ACPI_PHYSICAL_ADDRESS) ACPI_TO_INTEGER (Table);
- ObjDesc->Region.Length = Table->Length;
- ObjDesc->Region.Node = Node;
- ObjDesc->Region.Flags = AOPOBJ_DATA_VALID;
-
- /* Install the new region object in the parent Node */
-
- Status = AcpiNsAttachObject (Node, ObjDesc, ACPI_TYPE_REGION);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
-
- Status = AcpiEvInitializeRegion (ObjDesc, FALSE);
- if (ACPI_FAILURE (Status))
- {
- if (Status == AE_NOT_EXIST)
- {
- Status = AE_OK;
- }
- else
- {
- goto Cleanup;
- }
- }
-
- ObjDesc->Region.Flags |= AOPOBJ_SETUP_COMPLETE;
-
-
-Cleanup:
-
- /* Remove local reference to the object */
-
- AcpiUtRemoveReference (ObjDesc);
- return_ACPI_STATUS (Status);
-}
-
-
-/*******************************************************************************
- *
* FUNCTION: AcpiExCreateProcessor
*
* PARAMETERS: WalkState - Current state
@@ -678,7 +585,8 @@ AcpiExCreateMethod (
ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD);
if (!ObjDesc)
{
- return_ACPI_STATUS (AE_NO_MEMORY);
+ Status = AE_NO_MEMORY;
+ goto Exit;
}
/* Save the method's AML pointer and length */
@@ -699,12 +607,7 @@ AcpiExCreateMethod (
* Get the SyncLevel. If method is serialized, a mutex will be
* created for this method when it is parsed.
*/
- if (AcpiGbl_AllMethodsSerialized)
- {
- ObjDesc->Method.SyncLevel = 0;
- ObjDesc->Method.MethodFlags |= AML_METHOD_SERIALIZED;
- }
- else if (MethodFlags & AML_METHOD_SERIALIZED)
+ if (MethodFlags & AML_METHOD_SERIALIZED)
{
/*
* ACPI 1.0: SyncLevel = 0
@@ -723,6 +626,7 @@ AcpiExCreateMethod (
AcpiUtRemoveReference (ObjDesc);
+Exit:
/* Remove a reference to the operand */
AcpiUtRemoveReference (Operand[1]);
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exdump.c b/usr/src/uts/intel/io/acpica/executer/exdump.c
index 2a106e871f..8658a1ae96 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exdump.c
+++ b/usr/src/uts/intel/io/acpica/executer/exdump.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: exdump - Interpreter debug output routines
- * $Revision: 1.199 $
+ * $Revision: 1.206 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -120,7 +120,7 @@
#include "acinterp.h"
#include "amlcode.h"
#include "acnamesp.h"
-#include "acparser.h"
+
#define _COMPONENT ACPI_EXECUTER
ACPI_MODULE_NAME ("exdump")
@@ -143,11 +143,6 @@ AcpiExOutPointer (
void *Value);
static void
-AcpiExOutAddress (
- char *Title,
- ACPI_PHYSICAL_ADDRESS Value);
-
-static void
AcpiExDumpObject (
ACPI_OPERAND_OBJECT *ObjDesc,
ACPI_EXDUMP_INFO *Info);
@@ -186,11 +181,12 @@ static ACPI_EXDUMP_INFO AcpiExDumpString[4] =
{ACPI_EXD_STRING, 0, NULL}
};
-static ACPI_EXDUMP_INFO AcpiExDumpBuffer[4] =
+static ACPI_EXDUMP_INFO AcpiExDumpBuffer[5] =
{
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpBuffer), NULL},
{ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Buffer.Length), "Length"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Buffer.Pointer), "Pointer"},
+ {ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Buffer.Node), "Parent Node"},
{ACPI_EXD_BUFFER, 0, NULL}
};
@@ -261,8 +257,8 @@ static ACPI_EXDUMP_INFO AcpiExDumpPower[5] =
static ACPI_EXDUMP_INFO AcpiExDumpProcessor[7] =
{
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpProcessor), NULL},
- {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Processor.ProcId), "Processor ID"},
- {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Processor.Length), "Length"},
+ {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Processor.ProcId), "Processor ID"},
+ {ACPI_EXD_UINT8 , ACPI_EXD_OFFSET (Processor.Length), "Length"},
{ACPI_EXD_ADDRESS, ACPI_EXD_OFFSET (Processor.Address), "Address"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Processor.SystemNotify), "System Notify"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Processor.DeviceNotify), "Device Notify"},
@@ -310,11 +306,12 @@ static ACPI_EXDUMP_INFO AcpiExDumpIndexField[5] =
};
-static ACPI_EXDUMP_INFO AcpiExDumpReference[7] =
+static ACPI_EXDUMP_INFO AcpiExDumpReference[8] =
{
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpReference), NULL},
+ {ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Reference.Class), "Class"},
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Reference.TargetType), "Target Type"},
- {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Reference.Offset), "Offset"},
+ {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Reference.Value), "Value"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Reference.Object), "Object Desc"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Reference.Node), "Node"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Reference.Where), "Where"},
@@ -478,13 +475,9 @@ AcpiExDumpObject (
break;
case ACPI_EXD_POINTER:
-
- AcpiExOutPointer (Name, *ACPI_CAST_PTR (void *, Target));
- break;
-
case ACPI_EXD_ADDRESS:
- AcpiExOutAddress (Name, *ACPI_CAST_PTR (ACPI_PHYSICAL_ADDRESS, Target));
+ AcpiExOutPointer (Name, *ACPI_CAST_PTR (void *, Target));
break;
case ACPI_EXD_STRING:
@@ -513,8 +506,7 @@ AcpiExDumpObject (
case ACPI_EXD_REFERENCE:
- AcpiExOutString ("Opcode",
- (AcpiPsGetOpcodeInfo (ObjDesc->Reference.Opcode))->Name);
+ AcpiExOutString ("Class Name", (char *) AcpiUtGetReferenceName (ObjDesc));
AcpiExDumpReferenceObj (ObjDesc);
break;
@@ -601,40 +593,39 @@ AcpiExDumpOperand (
{
case ACPI_TYPE_LOCAL_REFERENCE:
- switch (ObjDesc->Reference.Opcode)
+ AcpiOsPrintf ("Reference: [%s] ", AcpiUtGetReferenceName (ObjDesc));
+
+ switch (ObjDesc->Reference.Class)
{
- case AML_DEBUG_OP:
+ case ACPI_REFCLASS_DEBUG:
- AcpiOsPrintf ("Reference: Debug\n");
+ AcpiOsPrintf ("\n");
break;
- case AML_NAME_OP:
+ case ACPI_REFCLASS_INDEX:
- ACPI_DUMP_PATHNAME (ObjDesc->Reference.Object,
- "Reference: Name: ", ACPI_LV_INFO, _COMPONENT);
- ACPI_DUMP_ENTRY (ObjDesc->Reference.Object, ACPI_LV_INFO);
+ AcpiOsPrintf ("%p\n", ObjDesc->Reference.Object);
break;
- case AML_INDEX_OP:
+ case ACPI_REFCLASS_TABLE:
- AcpiOsPrintf ("Reference: Index %p\n",
- ObjDesc->Reference.Object);
+ AcpiOsPrintf ("Table Index %X\n", ObjDesc->Reference.Value);
break;
- case AML_REF_OF_OP:
+ case ACPI_REFCLASS_REFOF:
- AcpiOsPrintf ("Reference: (RefOf) %p\n",
- ObjDesc->Reference.Object);
+ AcpiOsPrintf ("%p [%s]\n", ObjDesc->Reference.Object,
+ AcpiUtGetTypeName (((ACPI_OPERAND_OBJECT *)
+ ObjDesc->Reference.Object)->Common.Type));
break;
- case AML_ARG_OP:
+ case ACPI_REFCLASS_ARG:
- AcpiOsPrintf ("Reference: Arg%d",
- ObjDesc->Reference.Offset);
+ AcpiOsPrintf ("%X", ObjDesc->Reference.Value);
if (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_INTEGER)
{
@@ -648,14 +639,12 @@ AcpiExDumpOperand (
break;
- case AML_LOCAL_OP:
+ case ACPI_REFCLASS_LOCAL:
- AcpiOsPrintf ("Reference: Local%d",
- ObjDesc->Reference.Offset);
+ AcpiOsPrintf ("%X", ObjDesc->Reference.Value);
if (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_INTEGER)
{
-
/* Value is an Integer */
AcpiOsPrintf (" value is [%8.8X%8.8x]",
@@ -666,47 +655,38 @@ AcpiExDumpOperand (
break;
- case AML_INT_NAMEPATH_OP:
+ case ACPI_REFCLASS_NAME:
- AcpiOsPrintf ("Reference.Node->Name %X\n",
- ObjDesc->Reference.Node->Name.Integer);
+ AcpiOsPrintf ("- [%4.4s]\n", ObjDesc->Reference.Node->Name.Ascii);
break;
- default:
-
- /* Unknown opcode */
+ default: /* Unknown reference class */
- AcpiOsPrintf ("Unknown Reference opcode=%X\n",
- ObjDesc->Reference.Opcode);
+ AcpiOsPrintf ("%2.2X\n", ObjDesc->Reference.Class);
break;
-
}
break;
case ACPI_TYPE_BUFFER:
- AcpiOsPrintf ("Buffer len %X @ %p\n",
+ AcpiOsPrintf ("Buffer length %.2X @ %p\n",
ObjDesc->Buffer.Length, ObjDesc->Buffer.Pointer);
- Length = ObjDesc->Buffer.Length;
- if (Length > 64)
- {
- Length = 64;
- }
/* Debug only -- dump the buffer contents */
if (ObjDesc->Buffer.Pointer)
{
- AcpiOsPrintf ("Buffer Contents: ");
-
- for (Index = 0; Index < Length; Index++)
+ Length = ObjDesc->Buffer.Length;
+ if (Length > 128)
{
- AcpiOsPrintf (" %02x", ObjDesc->Buffer.Pointer[Index]);
+ Length = 128;
}
- AcpiOsPrintf ("\n");
+
+ AcpiOsPrintf ("Buffer Contents: (displaying length 0x%.2X)\n", Length);
+ ACPI_DUMP_BUFFER (ObjDesc->Buffer.Pointer, Length);
}
break;
@@ -756,7 +736,7 @@ AcpiExDumpOperand (
else
{
AcpiOsPrintf (" base %8.8X%8.8X Length %X\n",
- ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
+ ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
ObjDesc->Region.Length);
}
break;
@@ -884,63 +864,48 @@ AcpiExDumpOperand (
*
* FUNCTION: AcpiExDumpOperands
*
- * PARAMETERS: Operands - Operand list
- * InterpreterMode - Load or Exec
- * Ident - Identification
- * NumLevels - # of stack entries to dump above line
- * Note - Output notation
- * ModuleName - Caller's module name
- * LineNumber - Caller's invocation line number
+ * PARAMETERS: Operands - A list of Operand objects
+ * OpcodeName - AML opcode name
+ * NumOperands - Operand count for this opcode
*
- * DESCRIPTION: Dump the object stack
+ * DESCRIPTION: Dump the operands associated with the opcode
*
******************************************************************************/
void
AcpiExDumpOperands (
ACPI_OPERAND_OBJECT **Operands,
- ACPI_INTERPRETER_MODE InterpreterMode,
- char *Ident,
- UINT32 NumLevels,
- char *Note,
- char *ModuleName,
- UINT32 LineNumber)
+ const char *OpcodeName,
+ UINT32 NumOperands)
{
- ACPI_NATIVE_UINT i;
-
-
ACPI_FUNCTION_NAME (ExDumpOperands);
- if (!Ident)
- {
- Ident = "?";
- }
-
- if (!Note)
+ if (!OpcodeName)
{
- Note = "?";
+ OpcodeName = "UNKNOWN";
}
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
- "************* Operand Stack Contents (Opcode [%s], %d Operands)\n",
- Ident, NumLevels));
+ "**** Start operand dump for opcode [%s], %d operands\n",
+ OpcodeName, NumOperands));
- if (NumLevels == 0)
+ if (NumOperands == 0)
{
- NumLevels = 1;
+ NumOperands = 1;
}
- /* Dump the operand stack starting at the top */
+ /* Dump the individual operands */
- for (i = 0; NumLevels > 0; i--, NumLevels--)
+ while (NumOperands)
{
- AcpiExDumpOperand (Operands[i], 0);
+ AcpiExDumpOperand (*Operands, 0);
+ Operands++;
+ NumOperands--;
}
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
- "************* Operand Stack dump from %s(%d), %s\n",
- ModuleName, LineNumber, Note));
+ "**** End operand dump for [%s]\n", OpcodeName));
return;
}
@@ -974,19 +939,6 @@ AcpiExOutPointer (
AcpiOsPrintf ("%20s : %p\n", Title, Value);
}
-static void
-AcpiExOutAddress (
- char *Title,
- ACPI_PHYSICAL_ADDRESS Value)
-{
-
-#if ACPI_MACHINE_WIDTH == 16
- AcpiOsPrintf ("%20s : %p\n", Title, Value);
-#else
- AcpiOsPrintf ("%20s : %8.8X%8.8X\n", Title, ACPI_FORMAT_UINT64 (Value));
-#endif
-}
-
/*******************************************************************************
*
@@ -1016,7 +968,6 @@ AcpiExDumpNamespaceNode (
}
}
-
AcpiOsPrintf ("%20s : %4.4s\n", "Name", AcpiUtGetNodeName (Node));
AcpiExOutString ("Type", AcpiUtGetTypeName (Node->Type));
AcpiExOutPointer ("Attached Object", AcpiNsGetAttachedObject (Node));
@@ -1047,14 +998,14 @@ AcpiExDumpReferenceObj (
RetBuf.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
- if (ObjDesc->Reference.Opcode == AML_INT_NAMEPATH_OP)
+ if (ObjDesc->Reference.Class == ACPI_REFCLASS_NAME)
{
- AcpiOsPrintf ("Named Object %p ", ObjDesc->Reference.Node);
+ AcpiOsPrintf (" %p ", ObjDesc->Reference.Node);
Status = AcpiNsHandleToPathname (ObjDesc->Reference.Node, &RetBuf);
if (ACPI_FAILURE (Status))
{
- AcpiOsPrintf ("Could not convert name to pathname\n");
+ AcpiOsPrintf (" Could not convert name to pathname\n");
}
else
{
@@ -1064,7 +1015,27 @@ AcpiExDumpReferenceObj (
}
else if (ObjDesc->Reference.Object)
{
- AcpiOsPrintf ("\nReferenced Object: %p\n", ObjDesc->Reference.Object);
+ if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_OPERAND)
+ {
+ AcpiOsPrintf (" Target: %p", ObjDesc->Reference.Object);
+ if (ObjDesc->Reference.Class == ACPI_REFCLASS_TABLE)
+ {
+ AcpiOsPrintf (" Table Index: %X\n",
+ ObjDesc->Reference.Value);
+ }
+ else
+ {
+ AcpiOsPrintf (" Target: %p [%s]\n",
+ ObjDesc->Reference.Object,
+ AcpiUtGetTypeName (((ACPI_OPERAND_OBJECT *)
+ ObjDesc->Reference.Object)->Common.Type));
+ }
+ }
+ else
+ {
+ AcpiOsPrintf (" Target: %p\n",
+ ObjDesc->Reference.Object);
+ }
}
}
@@ -1163,7 +1134,9 @@ AcpiExDumpPackageObj (
case ACPI_TYPE_LOCAL_REFERENCE:
- AcpiOsPrintf ("[Object Reference] ");
+ AcpiOsPrintf ("[Object Reference] Type [%s] %2.2X",
+ AcpiUtGetReferenceName (ObjDesc),
+ ObjDesc->Reference.Class);
AcpiExDumpReferenceObj (ObjDesc);
break;
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exfield.c b/usr/src/uts/intel/io/acpica/executer/exfield.c
index b134302c8d..3f28224c39 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exfield.c
+++ b/usr/src/uts/intel/io/acpica/executer/exfield.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: exfield - ACPI AML (p-code) execution - field manipulation
- * $Revision: 1.128 $
+ * $Revision: 1.133 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -151,7 +151,6 @@ AcpiExReadDataFromField (
ACPI_OPERAND_OBJECT *BufferDesc;
ACPI_SIZE Length;
void *Buffer;
- BOOLEAN Locked;
ACPI_FUNCTION_TRACE_PTR (ExReadDataFromField, ObjDesc);
@@ -198,7 +197,7 @@ AcpiExReadDataFromField (
/* Lock entire transaction if requested */
- Locked = AcpiExAcquireGlobalLock (ObjDesc->CommonField.FieldFlags);
+ AcpiExAcquireGlobalLock (ObjDesc->CommonField.FieldFlags);
/*
* Perform the read.
@@ -207,7 +206,7 @@ AcpiExReadDataFromField (
Status = AcpiExAccessRegion (ObjDesc, 0,
ACPI_CAST_PTR (ACPI_INTEGER, BufferDesc->Buffer.Pointer),
ACPI_READ | (ObjDesc->Field.Attribute << 16));
- AcpiExReleaseGlobalLock (Locked);
+ AcpiExReleaseGlobalLock (ObjDesc->CommonField.FieldFlags);
goto Exit;
}
@@ -259,12 +258,12 @@ AcpiExReadDataFromField (
/* Lock entire transaction if requested */
- Locked = AcpiExAcquireGlobalLock (ObjDesc->CommonField.FieldFlags);
+ AcpiExAcquireGlobalLock (ObjDesc->CommonField.FieldFlags);
/* Read from the field */
Status = AcpiExExtractFromField (ObjDesc, Buffer, (UINT32) Length);
- AcpiExReleaseGlobalLock (Locked);
+ AcpiExReleaseGlobalLock (ObjDesc->CommonField.FieldFlags);
Exit:
@@ -303,10 +302,7 @@ AcpiExWriteDataToField (
{
ACPI_STATUS Status;
UINT32 Length;
- UINT32 RequiredLength;
void *Buffer;
- void *NewBuffer;
- BOOLEAN Locked;
ACPI_OPERAND_OBJECT *BufferDesc;
@@ -373,7 +369,7 @@ AcpiExWriteDataToField (
/* Lock entire transaction if requested */
- Locked = AcpiExAcquireGlobalLock (ObjDesc->CommonField.FieldFlags);
+ AcpiExAcquireGlobalLock (ObjDesc->CommonField.FieldFlags);
/*
* Perform the write (returns status and perhaps data in the
@@ -383,7 +379,7 @@ AcpiExWriteDataToField (
Status = AcpiExAccessRegion (ObjDesc, 0,
(ACPI_INTEGER *) Buffer,
ACPI_WRITE | (ObjDesc->Field.Attribute << 16));
- AcpiExReleaseGlobalLock (Locked);
+ AcpiExReleaseGlobalLock (ObjDesc->CommonField.FieldFlags);
*ResultDesc = BufferDesc;
return_ACPI_STATUS (Status);
@@ -412,36 +408,6 @@ AcpiExWriteDataToField (
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
- /*
- * We must have a buffer that is at least as long as the field
- * we are writing to. This is because individual fields are
- * indivisible and partial writes are not supported -- as per
- * the ACPI specification.
- */
- NewBuffer = NULL;
- RequiredLength = ACPI_ROUND_BITS_UP_TO_BYTES (
- ObjDesc->CommonField.BitLength);
-
- if (Length < RequiredLength)
- {
- /* We need to create a new buffer */
-
- NewBuffer = ACPI_ALLOCATE_ZEROED (RequiredLength);
- if (!NewBuffer)
- {
- return_ACPI_STATUS (AE_NO_MEMORY);
- }
-
- /*
- * Copy the original data to the new buffer, starting
- * at Byte zero. All unused (upper) bytes of the
- * buffer will be 0.
- */
- ACPI_MEMCPY ((char *) NewBuffer, (char *) Buffer, Length);
- Buffer = NewBuffer;
- Length = RequiredLength;
- }
-
ACPI_DEBUG_PRINT ((ACPI_DB_BFIELD,
"FieldWrite [FROM]: Obj %p (%s:%X), Buf %p, ByteLen %X\n",
SourceDesc, AcpiUtGetTypeName (ACPI_GET_OBJECT_TYPE (SourceDesc)),
@@ -457,19 +423,12 @@ AcpiExWriteDataToField (
/* Lock entire transaction if requested */
- Locked = AcpiExAcquireGlobalLock (ObjDesc->CommonField.FieldFlags);
+ AcpiExAcquireGlobalLock (ObjDesc->CommonField.FieldFlags);
/* Write to the field */
Status = AcpiExInsertIntoField (ObjDesc, Buffer, Length);
- AcpiExReleaseGlobalLock (Locked);
-
- /* Free temporary buffer if we used one */
-
- if (NewBuffer)
- {
- ACPI_FREE (NewBuffer);
- }
+ AcpiExReleaseGlobalLock (ObjDesc->CommonField.FieldFlags);
return_ACPI_STATUS (Status);
}
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exfldio.c b/usr/src/uts/intel/io/acpica/executer/exfldio.c
index d17d4fb68f..a7ca38827c 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exfldio.c
+++ b/usr/src/uts/intel/io/acpica/executer/exfldio.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: exfldio - Aml Field I/O
- * $Revision: 1.126 $
+ * $Revision: 1.131 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -248,13 +248,13 @@ AcpiExSetupRegion (
/*
* Slack mode only: We will go ahead and allow access to this
* field if it is within the region length rounded up to the next
- * access width boundary.
+ * access width boundary. ACPI_SIZE cast for 64-bit compile.
*/
if (ACPI_ROUND_UP (RgnDesc->Region.Length,
ObjDesc->CommonField.AccessByteWidth) >=
- (ObjDesc->CommonField.BaseByteOffset +
- (ACPI_NATIVE_UINT) ObjDesc->CommonField.AccessByteWidth +
- FieldDatumByteOffset))
+ ((ACPI_SIZE) ObjDesc->CommonField.BaseByteOffset +
+ ObjDesc->CommonField.AccessByteWidth +
+ FieldDatumByteOffset))
{
return_ACPI_STATUS (AE_OK);
}
@@ -359,13 +359,13 @@ AcpiExAccessRegion (
}
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_BFIELD,
- " Region [%s:%X], Width %X, ByteBase %X, Offset %X at %8.8X%8.8X\n",
+ " Region [%s:%X], Width %X, ByteBase %X, Offset %X at %p\n",
AcpiUtGetRegionName (RgnDesc->Region.SpaceId),
RgnDesc->Region.SpaceId,
ObjDesc->CommonField.AccessByteWidth,
ObjDesc->CommonField.BaseByteOffset,
FieldDatumByteOffset,
- ACPI_FORMAT_UINT64 (Address)));
+ ACPI_CAST_PTR (void, Address)));
/* Invoke the appropriate AddressSpace/OpRegion handler */
@@ -930,6 +930,8 @@ AcpiExInsertIntoField (
UINT32 DatumCount;
UINT32 FieldDatumCount;
UINT32 i;
+ UINT32 RequiredLength;
+ void *NewBuffer;
ACPI_FUNCTION_TRACE (ExInsertIntoField);
@@ -937,14 +939,33 @@ AcpiExInsertIntoField (
/* Validate input buffer */
- if (BufferLength <
- ACPI_ROUND_BITS_UP_TO_BYTES (ObjDesc->CommonField.BitLength))
+ NewBuffer = NULL;
+ RequiredLength = ACPI_ROUND_BITS_UP_TO_BYTES (
+ ObjDesc->CommonField.BitLength);
+ /*
+ * We must have a buffer that is at least as long as the field
+ * we are writing to. This is because individual fields are
+ * indivisible and partial writes are not supported -- as per
+ * the ACPI specification.
+ */
+ if (BufferLength < RequiredLength)
{
- ACPI_ERROR ((AE_INFO,
- "Field size %X (bits) is too large for buffer (%X)",
- ObjDesc->CommonField.BitLength, BufferLength));
+ /* We need to create a new buffer */
- return_ACPI_STATUS (AE_BUFFER_OVERFLOW);
+ NewBuffer = ACPI_ALLOCATE_ZEROED (RequiredLength);
+ if (!NewBuffer)
+ {
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
+
+ /*
+ * Copy the original data to the new buffer, starting
+ * at Byte zero. All unused (upper) bytes of the
+ * buffer will be 0.
+ */
+ ACPI_MEMCPY ((char *) NewBuffer, (char *) Buffer, BufferLength);
+ Buffer = NewBuffer;
+ BufferLength = RequiredLength;
}
/*
@@ -992,7 +1013,7 @@ AcpiExInsertIntoField (
MergedDatum, FieldOffset);
if (ACPI_FAILURE (Status))
{
- return_ACPI_STATUS (Status);
+ goto Exit;
}
FieldOffset += ObjDesc->CommonField.AccessByteWidth;
@@ -1050,6 +1071,13 @@ AcpiExInsertIntoField (
Status = AcpiExWriteWithUpdateRule (ObjDesc,
Mask, MergedDatum, FieldOffset);
+Exit:
+ /* Free temporary buffer if we used one */
+
+ if (NewBuffer)
+ {
+ ACPI_FREE (NewBuffer);
+ }
return_ACPI_STATUS (Status);
}
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exmisc.c b/usr/src/uts/intel/io/acpica/executer/exmisc.c
index 21f065ba89..b3284f4e13 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exmisc.c
+++ b/usr/src/uts/intel/io/acpica/executer/exmisc.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exmisc - ACPI AML (p-code) execution - specific opcodes
- * $Revision: 1.143 $
+ * $Revision: 1.145 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -170,11 +170,11 @@ AcpiExGetObjectReference (
/*
* Must be a reference to a Local or Arg
*/
- switch (ObjDesc->Reference.Opcode)
+ switch (ObjDesc->Reference.Class)
{
- case AML_LOCAL_OP:
- case AML_ARG_OP:
- case AML_DEBUG_OP:
+ case ACPI_REFCLASS_LOCAL:
+ case ACPI_REFCLASS_ARG:
+ case ACPI_REFCLASS_DEBUG:
/* The referenced object is the pseudo-node for the local/arg */
@@ -183,8 +183,8 @@ AcpiExGetObjectReference (
default:
- ACPI_ERROR ((AE_INFO, "Unknown Reference opcode %X",
- ObjDesc->Reference.Opcode));
+ ACPI_ERROR ((AE_INFO, "Unknown Reference Class %2.2X",
+ ObjDesc->Reference.Class));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
break;
@@ -215,7 +215,7 @@ AcpiExGetObjectReference (
return_ACPI_STATUS (AE_NO_MEMORY);
}
- ReferenceObj->Reference.Opcode = AML_REF_OF_OP;
+ ReferenceObj->Reference.Class = ACPI_REFCLASS_REFOF;
ReferenceObj->Reference.Object = ReferencedObj;
*ReturnDesc = ReferenceObj;
@@ -429,8 +429,8 @@ AcpiExDoConcatenate (
/* Result of two Strings is a String */
- ReturnDesc = AcpiUtCreateStringObject ((ACPI_SIZE)
- (Operand0->String.Length +
+ ReturnDesc = AcpiUtCreateStringObject (
+ ((ACPI_SIZE) Operand0->String.Length +
LocalOperand1->String.Length));
if (!ReturnDesc)
{
@@ -451,8 +451,8 @@ AcpiExDoConcatenate (
/* Result of two Buffers is a Buffer */
- ReturnDesc = AcpiUtCreateBufferObject ((ACPI_SIZE)
- (Operand0->Buffer.Length +
+ ReturnDesc = AcpiUtCreateBufferObject (
+ ((ACPI_SIZE) Operand0->Buffer.Length +
LocalOperand1->Buffer.Length));
if (!ReturnDesc)
{
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exmutex.c b/usr/src/uts/intel/io/acpica/executer/exmutex.c
index 23414c4457..8e6e8d5899 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exmutex.c
+++ b/usr/src/uts/intel/io/acpica/executer/exmutex.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exmutex - ASL Mutex Acquire/Release functions
- * $Revision: 1.34 $
+ * $Revision: 1.43 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -217,6 +217,88 @@ AcpiExLinkMutex (
/*******************************************************************************
*
+ * FUNCTION: AcpiExAcquireMutexObject
+ *
+ * PARAMETERS: TimeDesc - Timeout in milliseconds
+ * ObjDesc - Mutex object
+ * Thread - Current thread state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Acquire an AML mutex, low-level interface. Provides a common
+ * path that supports multiple acquires by the same thread.
+ *
+ * MUTEX: Interpreter must be locked
+ *
+ * NOTE: This interface is called from three places:
+ * 1) From AcpiExAcquireMutex, via an AML Acquire() operator
+ * 2) From AcpiExAcquireGlobalLock when an AML Field access requires the
+ * global lock
+ * 3) From the external interface, AcpiAcquireGlobalLock
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiExAcquireMutexObject (
+ UINT16 Timeout,
+ ACPI_OPERAND_OBJECT *ObjDesc,
+ ACPI_THREAD_ID ThreadId)
+{
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE_PTR (ExAcquireMutexObject, ObjDesc);
+
+
+ if (!ObjDesc)
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
+
+ /* Support for multiple acquires by the owning thread */
+
+ if (ObjDesc->Mutex.ThreadId == ThreadId)
+ {
+ /*
+ * The mutex is already owned by this thread, just increment the
+ * acquisition depth
+ */
+ ObjDesc->Mutex.AcquisitionDepth++;
+ return_ACPI_STATUS (AE_OK);
+ }
+
+ /* Acquire the mutex, wait if necessary. Special case for Global Lock */
+
+ if (ObjDesc == AcpiGbl_GlobalLockMutex)
+ {
+ Status = AcpiEvAcquireGlobalLock (Timeout);
+ }
+ else
+ {
+ Status = AcpiExSystemWaitMutex (ObjDesc->Mutex.OsMutex,
+ Timeout);
+ }
+
+ if (ACPI_FAILURE (Status))
+ {
+ /* Includes failure from a timeout on TimeDesc */
+
+ return_ACPI_STATUS (Status);
+ }
+
+ /* Acquired the mutex: update mutex object */
+
+ ObjDesc->Mutex.ThreadId = ThreadId;
+ ObjDesc->Mutex.AcquisitionDepth = 1;
+ ObjDesc->Mutex.OriginalSyncLevel = 0;
+ ObjDesc->Mutex.OwnerThread = NULL; /* Used only for AML Acquire() */
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiExAcquireMutex
*
* PARAMETERS: TimeDesc - Timeout integer
@@ -246,7 +328,7 @@ AcpiExAcquireMutex (
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
- /* Sanity check: we must have a valid thread ID */
+ /* Must have a valid thread ID */
if (!WalkState->Thread)
{
@@ -256,7 +338,7 @@ AcpiExAcquireMutex (
}
/*
- * Current Sync must be less than or equal to the sync level of the
+ * Current sync level must be less than or equal to the sync level of the
* mutex. This mechanism provides some deadlock prevention
*/
if (WalkState->Thread->CurrentSyncLevel > ObjDesc->Mutex.SyncLevel)
@@ -268,53 +350,95 @@ AcpiExAcquireMutex (
return_ACPI_STATUS (AE_AML_MUTEX_ORDER);
}
- /* Support for multiple acquires by the owning thread */
-
- if (ObjDesc->Mutex.OwnerThread)
+ Status = AcpiExAcquireMutexObject ((UINT16) TimeDesc->Integer.Value,
+ ObjDesc, WalkState->Thread->ThreadId);
+ if (ACPI_SUCCESS (Status) && ObjDesc->Mutex.AcquisitionDepth == 1)
{
- if (ObjDesc->Mutex.OwnerThread->ThreadId ==
- WalkState->Thread->ThreadId)
- {
- /*
- * The mutex is already owned by this thread, just increment the
- * acquisition depth
- */
- ObjDesc->Mutex.AcquisitionDepth++;
- return_ACPI_STATUS (AE_OK);
- }
+ /* Save Thread object, original/current sync levels */
+
+ ObjDesc->Mutex.OwnerThread = WalkState->Thread;
+ ObjDesc->Mutex.OriginalSyncLevel = WalkState->Thread->CurrentSyncLevel;
+ WalkState->Thread->CurrentSyncLevel = ObjDesc->Mutex.SyncLevel;
+
+ /* Link the mutex to the current thread for force-unlock at method exit */
+
+ AcpiExLinkMutex (ObjDesc, WalkState->Thread);
}
- /* Acquire the mutex, wait if necessary. Special case for Global Lock */
+ return_ACPI_STATUS (Status);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiExReleaseMutexObject
+ *
+ * PARAMETERS: ObjDesc - The object descriptor for this op
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Release a previously acquired Mutex, low level interface.
+ * Provides a common path that supports multiple releases (after
+ * previous multiple acquires) by the same thread.
+ *
+ * MUTEX: Interpreter must be locked
+ *
+ * NOTE: This interface is called from three places:
+ * 1) From AcpiExReleaseMutex, via an AML Acquire() operator
+ * 2) From AcpiExReleaseGlobalLock when an AML Field access requires the
+ * global lock
+ * 3) From the external interface, AcpiReleaseGlobalLock
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiExReleaseMutexObject (
+ ACPI_OPERAND_OBJECT *ObjDesc)
+{
+ ACPI_STATUS Status = AE_OK;
+
+
+ ACPI_FUNCTION_TRACE (ExReleaseMutexObject);
+
- if (ObjDesc->Mutex.OsMutex == AcpiGbl_GlobalLockMutex)
+ if (ObjDesc->Mutex.AcquisitionDepth == 0)
{
- Status = AcpiEvAcquireGlobalLock ((UINT16) TimeDesc->Integer.Value);
+ return (AE_NOT_ACQUIRED);
}
- else
+
+ /* Match multiple Acquires with multiple Releases */
+
+ ObjDesc->Mutex.AcquisitionDepth--;
+ if (ObjDesc->Mutex.AcquisitionDepth != 0)
{
- Status = AcpiExSystemWaitMutex (ObjDesc->Mutex.OsMutex,
- (UINT16) TimeDesc->Integer.Value);
+ /* Just decrement the depth and return */
+
+ return_ACPI_STATUS (AE_OK);
}
- if (ACPI_FAILURE (Status))
+ if (ObjDesc->Mutex.OwnerThread)
{
- /* Includes failure from a timeout on TimeDesc */
+ /* Unlink the mutex from the owner's list */
- return_ACPI_STATUS (Status);
+ AcpiExUnlinkMutex (ObjDesc);
+ ObjDesc->Mutex.OwnerThread = NULL;
}
- /* Have the mutex: update mutex and walk info and save the SyncLevel */
-
- ObjDesc->Mutex.OwnerThread = WalkState->Thread;
- ObjDesc->Mutex.AcquisitionDepth = 1;
- ObjDesc->Mutex.OriginalSyncLevel = WalkState->Thread->CurrentSyncLevel;
+ /* Release the mutex, special case for Global Lock */
- WalkState->Thread->CurrentSyncLevel = ObjDesc->Mutex.SyncLevel;
+ if (ObjDesc == AcpiGbl_GlobalLockMutex)
+ {
+ Status = AcpiEvReleaseGlobalLock ();
+ }
+ else
+ {
+ AcpiOsReleaseMutex (ObjDesc->Mutex.OsMutex);
+ }
- /* Link the mutex to the current thread for force-unlock at method exit */
+ /* Clear mutex info */
- AcpiExLinkMutex (ObjDesc, WalkState->Thread);
- return_ACPI_STATUS (AE_OK);
+ ObjDesc->Mutex.ThreadId = 0;
+ return_ACPI_STATUS (Status);
}
@@ -356,21 +480,12 @@ AcpiExReleaseMutex (
return_ACPI_STATUS (AE_AML_MUTEX_NOT_ACQUIRED);
}
- /* Sanity check: we must have a valid thread ID */
-
- if (!WalkState->Thread)
- {
- ACPI_ERROR ((AE_INFO, "Cannot release Mutex [%4.4s], null thread info",
- AcpiUtGetNodeName (ObjDesc->Mutex.Node)));
- return_ACPI_STATUS (AE_AML_INTERNAL);
- }
-
/*
* The Mutex is owned, but this thread must be the owner.
* Special case for Global Lock, any thread can release
*/
if ((ObjDesc->Mutex.OwnerThread->ThreadId != WalkState->Thread->ThreadId) &&
- (ObjDesc->Mutex.OsMutex != AcpiGbl_GlobalLockMutex))
+ (ObjDesc != AcpiGbl_GlobalLockMutex))
{
ACPI_ERROR ((AE_INFO,
"Thread %X cannot release Mutex [%4.4s] acquired by thread %X",
@@ -380,6 +495,15 @@ AcpiExReleaseMutex (
return_ACPI_STATUS (AE_AML_NOT_OWNER);
}
+ /* Must have a valid thread ID */
+
+ if (!WalkState->Thread)
+ {
+ ACPI_ERROR ((AE_INFO, "Cannot release Mutex [%4.4s], null thread info",
+ AcpiUtGetNodeName (ObjDesc->Mutex.Node)));
+ return_ACPI_STATUS (AE_AML_INTERNAL);
+ }
+
/*
* The sync level of the mutex must be less than or equal to the current
* sync level
@@ -387,41 +511,20 @@ AcpiExReleaseMutex (
if (ObjDesc->Mutex.SyncLevel > WalkState->Thread->CurrentSyncLevel)
{
ACPI_ERROR ((AE_INFO,
- "Cannot release Mutex [%4.4s], incorrect SyncLevel",
- AcpiUtGetNodeName (ObjDesc->Mutex.Node)));
+ "Cannot release Mutex [%4.4s], SyncLevel mismatch: mutex %d current %d",
+ AcpiUtGetNodeName (ObjDesc->Mutex.Node),
+ ObjDesc->Mutex.SyncLevel, WalkState->Thread->CurrentSyncLevel));
return_ACPI_STATUS (AE_AML_MUTEX_ORDER);
}
- /* Match multiple Acquires with multiple Releases */
+ Status = AcpiExReleaseMutexObject (ObjDesc);
- ObjDesc->Mutex.AcquisitionDepth--;
- if (ObjDesc->Mutex.AcquisitionDepth != 0)
+ if (ObjDesc->Mutex.AcquisitionDepth == 0)
{
- /* Just decrement the depth and return */
+ /* Restore the original SyncLevel */
- return_ACPI_STATUS (AE_OK);
+ WalkState->Thread->CurrentSyncLevel = ObjDesc->Mutex.OriginalSyncLevel;
}
-
- /* Unlink the mutex from the owner's list */
-
- AcpiExUnlinkMutex (ObjDesc);
-
- /* Release the mutex, special case for Global Lock */
-
- if (ObjDesc->Mutex.OsMutex == AcpiGbl_GlobalLockMutex)
- {
- Status = AcpiEvReleaseGlobalLock ();
- }
- else
- {
- AcpiOsReleaseMutex (ObjDesc->Mutex.OsMutex);
- }
-
- /* Update the mutex and restore SyncLevel */
-
- ObjDesc->Mutex.OwnerThread = NULL;
- WalkState->Thread->CurrentSyncLevel = ObjDesc->Mutex.OriginalSyncLevel;
-
return_ACPI_STATUS (Status);
}
@@ -436,6 +539,12 @@ AcpiExReleaseMutex (
*
* DESCRIPTION: Release all mutexes held by this thread
*
+ * NOTE: This function is called as the thread is exiting the interpreter.
+ * Mutexes are not released when an individual control method is exited, but
+ * only when the parent thread actually exits the interpreter. This allows one
+ * method to acquire a mutex, and a different method to release it, as long as
+ * this is performed underneath a single parent control method.
+ *
******************************************************************************/
void
@@ -458,11 +567,11 @@ AcpiExReleaseAllMutexes (
ObjDesc->Mutex.Prev = NULL;
ObjDesc->Mutex.Next = NULL;
- ObjDesc->Mutex.AcquisitionDepth = 1;
+ ObjDesc->Mutex.AcquisitionDepth = 0;
/* Release the mutex, special case for Global Lock */
- if (ObjDesc->Mutex.OsMutex == AcpiGbl_GlobalLockMutex)
+ if (ObjDesc == AcpiGbl_GlobalLockMutex)
{
/* Ignore errors */
@@ -476,6 +585,7 @@ AcpiExReleaseAllMutexes (
/* Mark mutex unowned */
ObjDesc->Mutex.OwnerThread = NULL;
+ ObjDesc->Mutex.ThreadId = 0;
/* Update Thread SyncLevel (Last mutex is the important one) */
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exnames.c b/usr/src/uts/intel/io/acpica/executer/exnames.c
index 1fd5d260db..65dff5e24f 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exnames.c
+++ b/usr/src/uts/intel/io/acpica/executer/exnames.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exnames - interpreter/scanner name load/execute
- * $Revision: 1.110 $
+ * $Revision: 1.112 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exoparg1.c b/usr/src/uts/intel/io/acpica/executer/exoparg1.c
index 70157e591d..54811e21f2 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exoparg1.c
+++ b/usr/src/uts/intel/io/acpica/executer/exoparg1.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exoparg1 - AML execution - opcodes with 1 argument
- * $Revision: 1.181 $
+ * $Revision: 1.186 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -189,9 +189,7 @@ AcpiExOpcode_0A_0T_1R (
Status = AE_NO_MEMORY;
goto Cleanup;
}
-#if ACPI_MACHINE_WIDTH != 16
ReturnDesc->Integer.Value = AcpiOsGetTimer ();
-#endif
break;
default: /* Unknown opcode */
@@ -209,6 +207,7 @@ Cleanup:
if ((ACPI_FAILURE (Status)) || WalkState->ResultObj)
{
AcpiUtRemoveReference (ReturnDesc);
+ WalkState->ResultObj = NULL;
}
else
{
@@ -881,26 +880,39 @@ AcpiExOpcode_1A_0T_1R (
Value = AcpiGbl_IntegerByteWidth;
break;
- case ACPI_TYPE_BUFFER:
- Value = TempDesc->Buffer.Length;
- break;
-
case ACPI_TYPE_STRING:
Value = TempDesc->String.Length;
break;
+ case ACPI_TYPE_BUFFER:
+
+ /* Buffer arguments may not be evaluated at this point */
+
+ Status = AcpiDsGetBufferArguments (TempDesc);
+ Value = TempDesc->Buffer.Length;
+ break;
+
case ACPI_TYPE_PACKAGE:
+
+ /* Package arguments may not be evaluated at this point */
+
+ Status = AcpiDsGetPackageArguments (TempDesc);
Value = TempDesc->Package.Count;
break;
default:
ACPI_ERROR ((AE_INFO,
- "Operand is not Buf/Int/Str/Pkg - found type %s",
+ "Operand must be Buffer/Integer/String/Package - found type %s",
AcpiUtGetTypeName (Type)));
Status = AE_AML_OPERAND_TYPE;
goto Cleanup;
}
+ if (ACPI_FAILURE (Status))
+ {
+ goto Cleanup;
+ }
+
/*
* Now that we have the size of the object, create a result
* object to hold the value
@@ -957,16 +969,16 @@ AcpiExOpcode_1A_0T_1R (
*
* Must resolve/dereference the local/arg reference first
*/
- switch (Operand[0]->Reference.Opcode)
+ switch (Operand[0]->Reference.Class)
{
- case AML_LOCAL_OP:
- case AML_ARG_OP:
+ case ACPI_REFCLASS_LOCAL:
+ case ACPI_REFCLASS_ARG:
/* Set Operand[0] to the value of the local/arg */
Status = AcpiDsMethodDataGetValue (
- Operand[0]->Reference.Opcode,
- Operand[0]->Reference.Offset,
+ Operand[0]->Reference.Class,
+ Operand[0]->Reference.Value,
WalkState, &TempDesc);
if (ACPI_FAILURE (Status))
{
@@ -981,7 +993,7 @@ AcpiExOpcode_1A_0T_1R (
Operand[0] = TempDesc;
break;
- case AML_REF_OF_OP:
+ case ACPI_REFCLASS_REFOF:
/* Get the object to which the reference refers */
@@ -1056,9 +1068,9 @@ AcpiExOpcode_1A_0T_1R (
* This must be a reference object produced by either the
* Index() or RefOf() operator
*/
- switch (Operand[0]->Reference.Opcode)
+ switch (Operand[0]->Reference.Class)
{
- case AML_INDEX_OP:
+ case ACPI_REFCLASS_INDEX:
/*
* The target type for the Index operator must be
@@ -1091,7 +1103,7 @@ AcpiExOpcode_1A_0T_1R (
* reference to the buffer itself.
*/
ReturnDesc->Integer.Value =
- TempDesc->Buffer.Pointer[Operand[0]->Reference.Offset];
+ TempDesc->Buffer.Pointer[Operand[0]->Reference.Value];
break;
@@ -1112,7 +1124,7 @@ AcpiExOpcode_1A_0T_1R (
default:
ACPI_ERROR ((AE_INFO,
- "Unknown Index TargetType %X in obj %p",
+ "Unknown Index TargetType %X in reference object %p",
Operand[0]->Reference.TargetType, Operand[0]));
Status = AE_AML_OPERAND_TYPE;
goto Cleanup;
@@ -1120,7 +1132,7 @@ AcpiExOpcode_1A_0T_1R (
break;
- case AML_REF_OF_OP:
+ case ACPI_REFCLASS_REFOF:
ReturnDesc = Operand[0]->Reference.Object;
@@ -1139,8 +1151,8 @@ AcpiExOpcode_1A_0T_1R (
default:
ACPI_ERROR ((AE_INFO,
- "Unknown opcode in reference(%p) - %X",
- Operand[0], Operand[0]->Reference.Opcode));
+ "Unknown class in reference(%p) - %2.2X",
+ Operand[0], Operand[0]->Reference.Class));
Status = AE_TYPE;
goto Cleanup;
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exoparg2.c b/usr/src/uts/intel/io/acpica/executer/exoparg2.c
index 53ee147640..43fbab3ade 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exoparg2.c
+++ b/usr/src/uts/intel/io/acpica/executer/exoparg2.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: exoparg2 - AML execution - opcodes with 2 arguments
- * $Revision: 1.141 $
+ * $Revision: 1.146 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -339,11 +339,6 @@ AcpiExOpcode_2A_2T_1R (
goto Cleanup;
}
- /* Return the remainder */
-
- WalkState->ResultObj = ReturnDesc1;
-
-
Cleanup:
/*
* Since the remainder is not returned indirectly, remove a reference to
@@ -358,6 +353,13 @@ Cleanup:
AcpiUtRemoveReference (ReturnDesc1);
}
+ /* Save return object (the remainder) on success */
+
+ else
+ {
+ WalkState->ResultObj = ReturnDesc1;
+ }
+
return_ACPI_STATUS (Status);
}
@@ -502,8 +504,8 @@ AcpiExOpcode_2A_1T_1R (
/* Initialize the Index reference object */
Index = Operand[1]->Integer.Value;
- ReturnDesc->Reference.Offset = (UINT32) Index;
- ReturnDesc->Reference.Opcode = AML_INDEX_OP;
+ ReturnDesc->Reference.Value = (UINT32) Index;
+ ReturnDesc->Reference.Class = ACPI_REFCLASS_INDEX;
/*
* At this point, the Source operand is a String, Buffer, or Package.
@@ -612,6 +614,7 @@ Cleanup:
if (ACPI_FAILURE (Status))
{
AcpiUtRemoveReference (ReturnDesc);
+ WalkState->ResultObj = NULL;
}
return_ACPI_STATUS (Status);
@@ -716,9 +719,6 @@ StoreLogicalResult:
ReturnDesc->Integer.Value = ACPI_INTEGER_MAX;
}
- WalkState->ResultObj = ReturnDesc;
-
-
Cleanup:
/* Delete return object on error */
@@ -728,6 +728,13 @@ Cleanup:
AcpiUtRemoveReference (ReturnDesc);
}
+ /* Save return object on success */
+
+ else
+ {
+ WalkState->ResultObj = ReturnDesc;
+ }
+
return_ACPI_STATUS (Status);
}
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exoparg3.c b/usr/src/uts/intel/io/acpica/executer/exoparg3.c
index 77a4e915b6..fad6272b2f 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exoparg3.c
+++ b/usr/src/uts/intel/io/acpica/executer/exoparg3.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exoparg3 - AML execution - opcodes with 3 arguments
- * $Revision: 1.33 $
+ * $Revision: 1.36 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -362,6 +362,7 @@ Cleanup:
if (ACPI_FAILURE (Status) || WalkState->ResultObj)
{
AcpiUtRemoveReference (ReturnDesc);
+ WalkState->ResultObj = NULL;
}
/* Set the return object and exit */
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exoparg6.c b/usr/src/uts/intel/io/acpica/executer/exoparg6.c
index f65c313f93..2b3bc3cf4c 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exoparg6.c
+++ b/usr/src/uts/intel/io/acpica/executer/exoparg6.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exoparg6 - AML execution - opcodes with 6 arguments
- * $Revision: 1.27 $
+ * $Revision: 1.30 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -420,8 +420,6 @@ AcpiExOpcode_6A_0T_1R (
goto Cleanup;
}
- WalkState->ResultObj = ReturnDesc;
-
Cleanup:
@@ -432,5 +430,12 @@ Cleanup:
AcpiUtRemoveReference (ReturnDesc);
}
+ /* Save return object on success */
+
+ else
+ {
+ WalkState->ResultObj = ReturnDesc;
+ }
+
return_ACPI_STATUS (Status);
}
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exprep.c b/usr/src/uts/intel/io/acpica/executer/exprep.c
index 7c024ec11d..a99c6c5738 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exprep.c
+++ b/usr/src/uts/intel/io/acpica/executer/exprep.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exprep - ACPI AML (p-code) execution - field prep utilities
- * $Revision: 1.141 $
+ * $Revision: 1.144 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -511,6 +511,7 @@ AcpiExPrepFieldValue (
ACPI_CREATE_FIELD_INFO *Info)
{
ACPI_OPERAND_OBJECT *ObjDesc;
+ ACPI_OPERAND_OBJECT *SecondDesc = NULL;
UINT32 Type;
ACPI_STATUS Status;
@@ -597,6 +598,16 @@ AcpiExPrepFieldValue (
ObjDesc->Field.AccessByteWidth,
ObjDesc->BankField.RegionObj,
ObjDesc->BankField.BankObj));
+
+ /*
+ * Remember location in AML stream of the field unit
+ * opcode and operands -- since the BankValue
+ * operands must be evaluated.
+ */
+ SecondDesc = ObjDesc->Common.NextObject;
+ SecondDesc->Extra.AmlStart = ACPI_CAST_PTR (ACPI_PARSE_OBJECT, Info->DataRegisterNode)->Named.Data;
+ SecondDesc->Extra.AmlLength = ACPI_CAST_PTR (ACPI_PARSE_OBJECT, Info->DataRegisterNode)->Named.Length;
+
break;
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exregion.c b/usr/src/uts/intel/io/acpica/executer/exregion.c
index c53757fea6..8fcf845114 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exregion.c
+++ b/usr/src/uts/intel/io/acpica/executer/exregion.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exregion - ACPI default OpRegion (address space) handlers
- * $Revision: 1.98 $
+ * $Revision: 1.103 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -240,15 +240,15 @@ AcpiExSystemMemorySpaceHandler (
/* Create a new mapping starting at the address given */
- Status = AcpiOsMapMemory (Address, WindowSize,
- (void **) &MemInfo->MappedLogicalAddress);
- if (ACPI_FAILURE (Status))
+ MemInfo->MappedLogicalAddress = AcpiOsMapMemory (
+ (ACPI_PHYSICAL_ADDRESS) Address, WindowSize);
+ if (!MemInfo->MappedLogicalAddress)
{
ACPI_ERROR ((AE_INFO,
"Could not map memory at %8.8X%8.8X, size %X",
- ACPI_FORMAT_UINT64 (Address), (UINT32) WindowSize));
+ ACPI_FORMAT_NATIVE_UINT (Address), (UINT32) WindowSize));
MemInfo->MappedLength = 0;
- return_ACPI_STATUS (Status);
+ return_ACPI_STATUS (AE_NO_MEMORY);
}
/* Save the physical address and mapping size */
@@ -266,7 +266,7 @@ AcpiExSystemMemorySpaceHandler (
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"System-Memory (width %d) R/W %d Address=%8.8X%8.8X\n",
- BitWidth, Function, ACPI_FORMAT_UINT64 (Address)));
+ BitWidth, Function, ACPI_FORMAT_NATIVE_UINT (Address)));
/*
* Perform the memory read or write
@@ -295,11 +295,10 @@ AcpiExSystemMemorySpaceHandler (
*Value = (ACPI_INTEGER) ACPI_GET32 (LogicalAddrPtr);
break;
-#if ACPI_MACHINE_WIDTH != 16
case 64:
*Value = (ACPI_INTEGER) ACPI_GET64 (LogicalAddrPtr);
break;
-#endif
+
default:
/* BitWidth was already validated */
break;
@@ -322,11 +321,9 @@ AcpiExSystemMemorySpaceHandler (
ACPI_SET32 ( LogicalAddrPtr) = (UINT32) *Value;
break;
-#if ACPI_MACHINE_WIDTH != 16
case 64:
ACPI_SET64 (LogicalAddrPtr) = (UINT64) *Value;
break;
-#endif
default:
/* BitWidth was already validated */
@@ -379,7 +376,7 @@ AcpiExSystemIoSpaceHandler (
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"System-IO (width %d) R/W %d Address=%8.8X%8.8X\n",
- BitWidth, Function, ACPI_FORMAT_UINT64 (Address)));
+ BitWidth, Function, ACPI_FORMAT_NATIVE_UINT (Address)));
/* Decode the function parameter */
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exresnte.c b/usr/src/uts/intel/io/acpica/executer/exresnte.c
index c7b5a460c5..143d9208a7 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exresnte.c
+++ b/usr/src/uts/intel/io/acpica/executer/exresnte.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exresnte - AML Interpreter object resolution
- * $Revision: 1.74 $
+ * $Revision: 1.78 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -121,8 +121,6 @@
#include "acdispat.h"
#include "acinterp.h"
#include "acnamesp.h"
-#include "acparser.h"
-#include "amlcode.h"
#define _COMPONENT ACPI_EXECUTER
@@ -197,9 +195,11 @@ AcpiExResolveNodeToValue (
* Several object types require no further processing:
* 1) Device/Thermal objects don't have a "real" subobject, return the Node
* 2) Method locals and arguments have a pseudo-Node
+ * 3) 10/2007: Added method type to assist with Package construction.
*/
if ((EntryType == ACPI_TYPE_DEVICE) ||
(EntryType == ACPI_TYPE_THERMAL) ||
+ (EntryType == ACPI_TYPE_METHOD) ||
(Node->Flags & (ANOBJ_METHOD_ARG | ANOBJ_METHOD_LOCAL)))
{
return_ACPI_STATUS (AE_OK);
@@ -305,7 +305,6 @@ AcpiExResolveNodeToValue (
/* For these objects, just return the object attached to the Node */
case ACPI_TYPE_MUTEX:
- case ACPI_TYPE_METHOD:
case ACPI_TYPE_POWER:
case ACPI_TYPE_PROCESSOR:
case ACPI_TYPE_EVENT:
@@ -329,15 +328,14 @@ AcpiExResolveNodeToValue (
case ACPI_TYPE_LOCAL_REFERENCE:
- switch (SourceDesc->Reference.Opcode)
+ switch (SourceDesc->Reference.Class)
{
- case AML_LOAD_OP:
+ case ACPI_REFCLASS_TABLE: /* This is a DdbHandle */
+ case ACPI_REFCLASS_REFOF:
+ case ACPI_REFCLASS_INDEX:
- /* This is a DdbHandle */
/* Return an additional reference to the object */
- case AML_REF_OF_OP:
-
ObjDesc = SourceDesc;
AcpiUtAddReference (ObjDesc);
break;
@@ -346,9 +344,8 @@ AcpiExResolveNodeToValue (
/* No named references are allowed here */
ACPI_ERROR ((AE_INFO,
- "Unsupported Reference opcode %X (%s)",
- SourceDesc->Reference.Opcode,
- AcpiPsGetOpcodeName (SourceDesc->Reference.Opcode)));
+ "Unsupported Reference type %X",
+ SourceDesc->Reference.Class));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exresolv.c b/usr/src/uts/intel/io/acpica/executer/exresolv.c
index 2efa748144..47bd941259 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exresolv.c
+++ b/usr/src/uts/intel/io/acpica/executer/exresolv.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exresolv - AML Interpreter object resolution
- * $Revision: 1.139 $
+ * $Revision: 1.146 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -122,7 +122,6 @@
#include "acdispat.h"
#include "acinterp.h"
#include "acnamesp.h"
-#include "acparser.h"
#define _COMPONENT ACPI_EXECUTER
@@ -229,9 +228,8 @@ AcpiExResolveObjectToValue (
{
ACPI_STATUS Status = AE_OK;
ACPI_OPERAND_OBJECT *StackDesc;
- void *TempNode;
- ACPI_OPERAND_OBJECT *ObjDesc;
- UINT16 Opcode;
+ ACPI_OPERAND_OBJECT *ObjDesc = NULL;
+ UINT8 RefType;
ACPI_FUNCTION_TRACE (ExResolveObjectToValue);
@@ -245,44 +243,26 @@ AcpiExResolveObjectToValue (
{
case ACPI_TYPE_LOCAL_REFERENCE:
- Opcode = StackDesc->Reference.Opcode;
+ RefType = StackDesc->Reference.Class;
- switch (Opcode)
+ switch (RefType)
{
- case AML_NAME_OP:
-
- /*
- * Convert name reference to a namespace node
- * Then, AcpiExResolveNodeToValue can be used to get the value
- */
- TempNode = StackDesc->Reference.Object;
-
- /* Delete the Reference Object */
-
- AcpiUtRemoveReference (StackDesc);
-
- /* Return the namespace node */
-
- (*StackPtr) = TempNode;
- break;
-
-
- case AML_LOCAL_OP:
- case AML_ARG_OP:
+ case ACPI_REFCLASS_LOCAL:
+ case ACPI_REFCLASS_ARG:
/*
* Get the local from the method's state info
* Note: this increments the local's object reference count
*/
- Status = AcpiDsMethodDataGetValue (Opcode,
- StackDesc->Reference.Offset, WalkState, &ObjDesc);
+ Status = AcpiDsMethodDataGetValue (RefType,
+ StackDesc->Reference.Value, WalkState, &ObjDesc);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Arg/Local %X] ValueObj is %p\n",
- StackDesc->Reference.Offset, ObjDesc));
+ StackDesc->Reference.Value, ObjDesc));
/*
* Now we can delete the original Reference Object and
@@ -293,23 +273,33 @@ AcpiExResolveObjectToValue (
break;
- case AML_INDEX_OP:
+ case ACPI_REFCLASS_INDEX:
switch (StackDesc->Reference.TargetType)
{
case ACPI_TYPE_BUFFER_FIELD:
- /* Just return - leave the Reference on the stack */
+ /* Just return - do not dereference */
break;
case ACPI_TYPE_PACKAGE:
+ /* If method call or CopyObject - do not dereference */
+
+ if ((WalkState->Opcode == AML_INT_METHODCALL_OP) ||
+ (WalkState->Opcode == AML_COPY_OP))
+ {
+ break;
+ }
+
+ /* Otherwise, dereference the PackageIndex to a package element */
+
ObjDesc = *StackDesc->Reference.Where;
if (ObjDesc)
{
/*
- * Valid obj descriptor, copy pointer to return value
+ * Valid object descriptor, copy pointer to return value
* (i.e., dereference the package index)
* Delete the ref object, increment the returned object
*/
@@ -320,11 +310,11 @@ AcpiExResolveObjectToValue (
else
{
/*
- * A NULL object descriptor means an unitialized element of
+ * A NULL object descriptor means an uninitialized element of
* the package, can't dereference it
*/
ACPI_ERROR ((AE_INFO,
- "Attempt to deref an Index to NULL pkg element Idx=%p",
+ "Attempt to dereference an Index to NULL package element Idx=%p",
StackDesc));
Status = AE_AML_UNINITIALIZED_ELEMENT;
}
@@ -336,7 +326,7 @@ AcpiExResolveObjectToValue (
/* Invalid reference object */
ACPI_ERROR ((AE_INFO,
- "Unknown TargetType %X in Index/Reference obj %p",
+ "Unknown TargetType %X in Index/Reference object %p",
StackDesc->Reference.TargetType, StackDesc));
Status = AE_AML_INTERNAL;
break;
@@ -344,15 +334,15 @@ AcpiExResolveObjectToValue (
break;
- case AML_REF_OF_OP:
- case AML_DEBUG_OP:
- case AML_LOAD_OP:
+ case ACPI_REFCLASS_REFOF:
+ case ACPI_REFCLASS_DEBUG:
+ case ACPI_REFCLASS_TABLE:
- /* Just leave the object as-is */
+ /* Just leave the object as-is, do not dereference */
break;
- case AML_INT_NAMEPATH_OP: /* Reference to a named object */
+ case ACPI_REFCLASS_NAME: /* Reference to a named object */
/* Dereference the name */
@@ -377,8 +367,7 @@ AcpiExResolveObjectToValue (
default:
ACPI_ERROR ((AE_INFO,
- "Unknown Reference opcode %X (%s) in %p",
- Opcode, AcpiPsGetOpcodeName (Opcode), StackDesc));
+ "Unknown Reference type %X in %p", RefType, StackDesc));
Status = AE_AML_INTERNAL;
break;
}
@@ -397,8 +386,6 @@ AcpiExResolveObjectToValue (
break;
- /* These cases may never happen here, but just in case.. */
-
case ACPI_TYPE_BUFFER_FIELD:
case ACPI_TYPE_LOCAL_REGION_FIELD:
case ACPI_TYPE_LOCAL_BANK_FIELD:
@@ -408,6 +395,10 @@ AcpiExResolveObjectToValue (
StackDesc, ACPI_GET_OBJECT_TYPE (StackDesc)));
Status = AcpiExReadDataFromField (WalkState, StackDesc, &ObjDesc);
+
+ /* Remove a reference to the original operand, then override */
+
+ AcpiUtRemoveReference (*StackPtr);
*StackPtr = (void *) ObjDesc;
break;
@@ -484,21 +475,21 @@ AcpiExResolveMultiple (
}
/*
- * For reference objects created via the RefOf or Index operators,
- * we need to get to the base object (as per the ACPI specification
- * of the ObjectType and SizeOf operators). This means traversing
- * the list of possibly many nested references.
+ * For reference objects created via the RefOf, Index, or Load/LoadTable
+ * operators, we need to get to the base object (as per the ACPI
+ * specification of the ObjectType and SizeOf operators). This means
+ * traversing the list of possibly many nested references.
*/
while (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_LOCAL_REFERENCE)
{
- switch (ObjDesc->Reference.Opcode)
+ switch (ObjDesc->Reference.Class)
{
- case AML_REF_OF_OP:
- case AML_INT_NAMEPATH_OP:
+ case ACPI_REFCLASS_REFOF:
+ case ACPI_REFCLASS_NAME:
/* Dereference the reference pointer */
- if (ObjDesc->Reference.Opcode == AML_REF_OF_OP)
+ if (ObjDesc->Reference.Class == ACPI_REFCLASS_REFOF)
{
Node = ObjDesc->Reference.Object;
}
@@ -537,7 +528,7 @@ AcpiExResolveMultiple (
break;
- case AML_INDEX_OP:
+ case ACPI_REFCLASS_INDEX:
/* Get the type of this reference (index into another object) */
@@ -565,13 +556,19 @@ AcpiExResolveMultiple (
break;
- case AML_LOCAL_OP:
- case AML_ARG_OP:
+ case ACPI_REFCLASS_TABLE:
+
+ Type = ACPI_TYPE_DDB_HANDLE;
+ goto Exit;
+
+
+ case ACPI_REFCLASS_LOCAL:
+ case ACPI_REFCLASS_ARG:
if (ReturnDesc)
{
- Status = AcpiDsMethodDataGetValue (ObjDesc->Reference.Opcode,
- ObjDesc->Reference.Offset, WalkState, &ObjDesc);
+ Status = AcpiDsMethodDataGetValue (ObjDesc->Reference.Class,
+ ObjDesc->Reference.Value, WalkState, &ObjDesc);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -580,8 +577,8 @@ AcpiExResolveMultiple (
}
else
{
- Status = AcpiDsMethodDataGetNode (ObjDesc->Reference.Opcode,
- ObjDesc->Reference.Offset, WalkState, &Node);
+ Status = AcpiDsMethodDataGetNode (ObjDesc->Reference.Class,
+ ObjDesc->Reference.Value, WalkState, &Node);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -597,7 +594,7 @@ AcpiExResolveMultiple (
break;
- case AML_DEBUG_OP:
+ case ACPI_REFCLASS_DEBUG:
/* The Debug Object is of type "DebugObject" */
@@ -608,8 +605,7 @@ AcpiExResolveMultiple (
default:
ACPI_ERROR ((AE_INFO,
- "Unknown Reference subtype %X",
- ObjDesc->Reference.Opcode));
+ "Unknown Reference Class %2.2X", ObjDesc->Reference.Class));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
}
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exresop.c b/usr/src/uts/intel/io/acpica/executer/exresop.c
index 2f684ae4df..41f536bdd4 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exresop.c
+++ b/usr/src/uts/intel/io/acpica/executer/exresop.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exresop - AML Interpreter operand/object resolution
- * $Revision: 1.92 $
+ * $Revision: 1.96 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -224,7 +224,6 @@ AcpiExResolveOperands (
ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_STATUS Status = AE_OK;
UINT8 ObjectType;
- void *TempNode;
UINT32 ArgTypes;
const ACPI_OPCODE_INFO *OpInfo;
UINT32 ThisArgType;
@@ -310,46 +309,41 @@ AcpiExResolveOperands (
if (!AcpiUtValidObjectType (ObjectType))
{
ACPI_ERROR ((AE_INFO,
- "Bad operand object type [%X]",
- ObjectType));
+ "Bad operand object type [%X]", ObjectType));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
if (ObjectType == (UINT8) ACPI_TYPE_LOCAL_REFERENCE)
{
- /* Decode the Reference */
+ /* Validate the Reference */
- OpInfo = AcpiPsGetOpcodeInfo (Opcode);
- if (OpInfo->Class == AML_CLASS_UNKNOWN)
+ switch (ObjDesc->Reference.Class)
{
- return_ACPI_STATUS (AE_AML_BAD_OPCODE);
- }
+ case ACPI_REFCLASS_DEBUG:
- switch (ObjDesc->Reference.Opcode)
- {
- case AML_DEBUG_OP:
TargetOp = AML_DEBUG_OP;
/*lint -fallthrough */
- case AML_NAME_OP:
- case AML_INDEX_OP:
- case AML_REF_OF_OP:
- case AML_ARG_OP:
- case AML_LOCAL_OP:
- case AML_LOAD_OP: /* DdbHandle from LOAD_OP or LOAD_TABLE_OP */
- case AML_INT_NAMEPATH_OP: /* Reference to a named object */
-
- ACPI_DEBUG_ONLY_MEMBERS (ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
- "Operand is a Reference, RefOpcode [%s]\n",
- (AcpiPsGetOpcodeInfo (ObjDesc->Reference.Opcode))->Name)));
+ case ACPI_REFCLASS_ARG:
+ case ACPI_REFCLASS_LOCAL:
+ case ACPI_REFCLASS_INDEX:
+ case ACPI_REFCLASS_REFOF:
+ case ACPI_REFCLASS_TABLE: /* DdbHandle from LOAD_OP or LOAD_TABLE_OP */
+ case ACPI_REFCLASS_NAME: /* Reference to a named object */
+
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ "Operand is a Reference, Class [%s] %2.2X\n",
+ AcpiUtGetReferenceName (ObjDesc),
+ ObjDesc->Reference.Class));
break;
default:
+
ACPI_ERROR ((AE_INFO,
- "Operand is a Reference, Unknown Reference Opcode: %X",
- ObjDesc->Reference.Opcode));
+ "Unknown Reference Class %2.2X in %p",
+ ObjDesc->Reference.Class, ObjDesc));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
@@ -361,8 +355,7 @@ AcpiExResolveOperands (
/* Invalid descriptor */
- ACPI_ERROR ((AE_INFO,
- "Invalid descriptor %p [%s]",
+ ACPI_ERROR ((AE_INFO, "Invalid descriptor %p [%s]",
ObjDesc, AcpiUtGetDescriptorName (ObjDesc)));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
@@ -420,15 +413,6 @@ AcpiExResolveOperands (
{
return_ACPI_STATUS (Status);
}
-
- if (ObjDesc->Reference.Opcode == AML_NAME_OP)
- {
- /* Convert a named reference to the actual named object */
-
- TempNode = ObjDesc->Reference.Object;
- AcpiUtRemoveReference (ObjDesc);
- (*StackPtr) = TempNode;
- }
goto NextOperand;
@@ -442,7 +426,7 @@ AcpiExResolveOperands (
*/
if ((Opcode == AML_STORE_OP) &&
(ACPI_GET_OBJECT_TYPE (*StackPtr) == ACPI_TYPE_LOCAL_REFERENCE) &&
- ((*StackPtr)->Reference.Opcode == AML_INDEX_OP))
+ ((*StackPtr)->Reference.Class == ACPI_REFCLASS_INDEX))
{
goto NextOperand;
}
@@ -714,23 +698,21 @@ AcpiExResolveOperands (
goto NextOperand;
- case ARGI_REGION_OR_FIELD:
+ case ARGI_REGION_OR_BUFFER: /* Used by Load() only */
- /* Need an operand of type REGION or a FIELD in a region */
+ /* Need an operand of type REGION or a BUFFER (which could be a resolved region field) */
switch (ACPI_GET_OBJECT_TYPE (ObjDesc))
{
+ case ACPI_TYPE_BUFFER:
case ACPI_TYPE_REGION:
- case ACPI_TYPE_LOCAL_REGION_FIELD:
- case ACPI_TYPE_LOCAL_BANK_FIELD:
- case ACPI_TYPE_LOCAL_INDEX_FIELD:
/* Valid operand */
break;
default:
ACPI_ERROR ((AE_INFO,
- "Needed [Region/RegionField], found [%s] %p",
+ "Needed [Region/Buffer], found [%s] %p",
AcpiUtGetObjectTypeName (ObjDesc), ObjDesc));
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
@@ -819,6 +801,9 @@ NextOperand:
}
}
+ ACPI_DUMP_OPERANDS (WalkState->Operands,
+ AcpiPsGetOpcodeName (Opcode), WalkState->NumOperands);
+
return_ACPI_STATUS (Status);
}
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exstore.c b/usr/src/uts/intel/io/acpica/executer/exstore.c
index bc3ee25f39..c870424c0a 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exstore.c
+++ b/usr/src/uts/intel/io/acpica/executer/exstore.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exstore - AML Interpreter object store support
- * $Revision: 1.200 $
+ * $Revision: 1.210 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -122,7 +122,6 @@
#include "acinterp.h"
#include "amlcode.h"
#include "acnamesp.h"
-#include "acparser.h"
#define _COMPONENT ACPI_EXECUTER
@@ -169,8 +168,13 @@ AcpiExDoDebugObject (
ACPI_FUNCTION_TRACE_PTR (ExDoDebugObject, SourceDesc);
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[ACPI Debug] %*s",
- Level, " "));
+ /* Print line header as long as we are not in the middle of an object display */
+
+ if (!((Level > 0) && Index == 0))
+ {
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[ACPI Debug] %*s",
+ Level, " "));
+ }
/* Display index for package output only */
@@ -182,13 +186,13 @@ AcpiExDoDebugObject (
if (!SourceDesc)
{
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "<Null Object>\n"));
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[Null Object]\n"));
return_VOID;
}
if (ACPI_GET_DESCRIPTOR_TYPE (SourceDesc) == ACPI_DESC_TYPE_OPERAND)
{
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "%s: ",
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "%s ",
AcpiUtGetObjectTypeName (SourceDesc)));
if (!AcpiUtValidInternalObject (SourceDesc))
@@ -210,6 +214,8 @@ AcpiExDoDebugObject (
return_VOID;
}
+ /* SourceDesc is of type ACPI_DESC_TYPE_OPERAND */
+
switch (ACPI_GET_OBJECT_TYPE (SourceDesc))
{
case ACPI_TYPE_INTEGER:
@@ -233,7 +239,7 @@ AcpiExDoDebugObject (
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[0x%.2X]\n",
(UINT32) SourceDesc->Buffer.Length));
ACPI_DUMP_BUFFER (SourceDesc->Buffer.Pointer,
- (SourceDesc->Buffer.Length < 32) ? SourceDesc->Buffer.Length : 32);
+ (SourceDesc->Buffer.Length < 256) ? SourceDesc->Buffer.Length : 256);
break;
case ACPI_TYPE_STRING:
@@ -244,7 +250,7 @@ AcpiExDoDebugObject (
case ACPI_TYPE_PACKAGE:
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[0x%.2X Elements]\n",
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[Contains 0x%.2X Elements]\n",
SourceDesc->Package.Count));
/* Output the entire contents of the package */
@@ -258,20 +264,67 @@ AcpiExDoDebugObject (
case ACPI_TYPE_LOCAL_REFERENCE:
- if (SourceDesc->Reference.Opcode == AML_INDEX_OP)
- {
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[%s, 0x%X]\n",
- AcpiPsGetOpcodeName (SourceDesc->Reference.Opcode),
- SourceDesc->Reference.Offset));
- }
- else
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[%s] ",
+ AcpiUtGetReferenceName (SourceDesc)));
+
+ /* Decode the reference */
+
+ switch (SourceDesc->Reference.Class)
{
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "[%s]\n",
- AcpiPsGetOpcodeName (SourceDesc->Reference.Opcode)));
+ case ACPI_REFCLASS_INDEX:
+
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "0x%X\n",
+ SourceDesc->Reference.Value));
+ break;
+
+ case ACPI_REFCLASS_TABLE:
+
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "Table Index 0x%X\n",
+ SourceDesc->Reference.Value));
+ break;
+
+ default:
+ break;
}
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, " "));
- if (SourceDesc->Reference.Object)
+ /* Check for valid node first, then valid object */
+
+ if (SourceDesc->Reference.Node)
+ {
+ if (ACPI_GET_DESCRIPTOR_TYPE (SourceDesc->Reference.Node) !=
+ ACPI_DESC_TYPE_NAMED)
+ {
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT,
+ " %p - Not a valid namespace node\n",
+ SourceDesc->Reference.Node));
+ }
+ else
+ {
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "Node %p [%4.4s] ",
+ SourceDesc->Reference.Node, (SourceDesc->Reference.Node)->Name.Ascii));
+
+ switch ((SourceDesc->Reference.Node)->Type)
+ {
+ /* These types have no attached object */
+
+ case ACPI_TYPE_DEVICE:
+ AcpiOsPrintf ("Device\n");
+ break;
+
+ case ACPI_TYPE_THERMAL:
+ AcpiOsPrintf ("Thermal Zone\n");
+ break;
+
+ default:
+ AcpiExDoDebugObject ((SourceDesc->Reference.Node)->Object,
+ Level+4, 0);
+ break;
+ }
+ }
+ }
+ else if (SourceDesc->Reference.Object)
{
if (ACPI_GET_DESCRIPTOR_TYPE (SourceDesc->Reference.Object) ==
ACPI_DESC_TYPE_NAMED)
@@ -285,17 +338,12 @@ AcpiExDoDebugObject (
AcpiExDoDebugObject (SourceDesc->Reference.Object, Level+4, 0);
}
}
- else if (SourceDesc->Reference.Node)
- {
- AcpiExDoDebugObject ((SourceDesc->Reference.Node)->Object,
- Level+4, 0);
- }
break;
default:
- ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "%p %s\n",
- SourceDesc, AcpiUtGetObjectTypeName (SourceDesc)));
+ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_DEBUG_OBJECT, "%p\n",
+ SourceDesc));
break;
}
@@ -386,26 +434,20 @@ AcpiExStore (
"Target is not a Reference or Constant object - %s [%p]",
AcpiUtGetObjectTypeName (DestDesc), DestDesc));
- ACPI_DUMP_STACK_ENTRY (SourceDesc);
- ACPI_DUMP_STACK_ENTRY (DestDesc);
- ACPI_DUMP_OPERANDS (&DestDesc, ACPI_IMODE_EXECUTE, "ExStore",
- 2, "Target is not a Reference or Constant object");
-
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
/*
- * Examine the Reference opcode. These cases are handled:
+ * Examine the Reference class. 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
*/
- switch (RefDesc->Reference.Opcode)
+ switch (RefDesc->Reference.Class)
{
- case AML_NAME_OP:
- case AML_REF_OF_OP:
+ case ACPI_REFCLASS_REFOF:
/* Storing an object into a Name "container" */
@@ -415,7 +457,7 @@ AcpiExStore (
break;
- case AML_INDEX_OP:
+ case ACPI_REFCLASS_INDEX:
/* Storing to an Index (pointer into a packager or buffer) */
@@ -423,17 +465,17 @@ AcpiExStore (
break;
- case AML_LOCAL_OP:
- case AML_ARG_OP:
+ case ACPI_REFCLASS_LOCAL:
+ case ACPI_REFCLASS_ARG:
/* Store to a method local/arg */
- Status = AcpiDsStoreObjectToLocal (RefDesc->Reference.Opcode,
- RefDesc->Reference.Offset, SourceDesc, WalkState);
+ Status = AcpiDsStoreObjectToLocal (RefDesc->Reference.Class,
+ RefDesc->Reference.Value, SourceDesc, WalkState);
break;
- case AML_DEBUG_OP:
+ case ACPI_REFCLASS_DEBUG:
/*
* Storing to the Debug object causes the value stored to be
@@ -449,9 +491,9 @@ AcpiExStore (
default:
- ACPI_ERROR ((AE_INFO, "Unknown Reference opcode %X",
- RefDesc->Reference.Opcode));
- ACPI_DUMP_ENTRY (RefDesc, ACPI_LV_ERROR);
+ ACPI_ERROR ((AE_INFO, "Unknown Reference Class %2.2X",
+ RefDesc->Reference.Class));
+ ACPI_DUMP_ENTRY (RefDesc, ACPI_LV_INFO);
Status = AE_AML_INTERNAL;
break;
@@ -509,10 +551,23 @@ AcpiExStoreObjectToIndex (
*/
ObjDesc = *(IndexDesc->Reference.Where);
- Status = AcpiUtCopyIobjectToIobject (SourceDesc, &NewDesc, WalkState);
- if (ACPI_FAILURE (Status))
+ if (ACPI_GET_OBJECT_TYPE (SourceDesc) == ACPI_TYPE_LOCAL_REFERENCE &&
+ SourceDesc->Reference.Class == ACPI_REFCLASS_TABLE)
{
- return_ACPI_STATUS (Status);
+ /* This is a DDBHandle, just add a reference to it */
+
+ AcpiUtAddReference (SourceDesc);
+ NewDesc = SourceDesc;
+ }
+ else
+ {
+ /* Normal object, copy it */
+
+ Status = AcpiUtCopyIobjectToIobject (SourceDesc, &NewDesc, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
}
if (ObjDesc)
@@ -599,7 +654,7 @@ AcpiExStoreObjectToIndex (
/* Store the source value into the target buffer byte */
- ObjDesc->Buffer.Pointer[IndexDesc->Reference.Offset] = Value;
+ ObjDesc->Buffer.Pointer[IndexDesc->Reference.Value] = Value;
break;
@@ -677,10 +732,18 @@ AcpiExStoreObjectToNode (
/* If no implicit conversion, drop into the default case below */
- if ((!ImplicitConversion) || (WalkState->Opcode == AML_COPY_OP))
+ if ((!ImplicitConversion) ||
+ ((WalkState->Opcode == AML_COPY_OP) &&
+ (TargetType != ACPI_TYPE_LOCAL_REGION_FIELD) &&
+ (TargetType != ACPI_TYPE_LOCAL_BANK_FIELD) &&
+ (TargetType != ACPI_TYPE_LOCAL_INDEX_FIELD)))
{
- /* Force execution of default (no implicit conversion) */
-
+ /*
+ * Force execution of default (no implicit conversion). Note:
+ * CopyObject does not perform an implicit conversion, as per the ACPI
+ * spec -- except in case of region/bank/index fields -- because these
+ * objects must retain their original type permanently.
+ */
TargetType = ACPI_TYPE_ANY;
}
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exstoren.c b/usr/src/uts/intel/io/acpica/executer/exstoren.c
index 452563ff44..734cb082c2 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exstoren.c
+++ b/usr/src/uts/intel/io/acpica/executer/exstoren.c
@@ -3,7 +3,7 @@
*
* Module Name: exstoren - AML Interpreter object store support,
* Store to Node (namespace object)
- * $Revision: 1.70 $
+ * $Revision: 1.72 $
*
*****************************************************************************/
@@ -11,7 +11,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -200,7 +200,8 @@ AcpiExResolveObject (
if ((ACPI_GET_OBJECT_TYPE (SourceDesc) != ACPI_TYPE_INTEGER) &&
(ACPI_GET_OBJECT_TYPE (SourceDesc) != ACPI_TYPE_BUFFER) &&
(ACPI_GET_OBJECT_TYPE (SourceDesc) != ACPI_TYPE_STRING) &&
- !((ACPI_GET_OBJECT_TYPE (SourceDesc) == ACPI_TYPE_LOCAL_REFERENCE) && (SourceDesc->Reference.Opcode == AML_LOAD_OP)))
+ !((ACPI_GET_OBJECT_TYPE (SourceDesc) == ACPI_TYPE_LOCAL_REFERENCE) &&
+ (SourceDesc->Reference.Class== ACPI_REFCLASS_TABLE)))
{
/* Conversion successful but still not a valid type */
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exstorob.c b/usr/src/uts/intel/io/acpica/executer/exstorob.c
index 4810c0b860..3057ea6e65 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exstorob.c
+++ b/usr/src/uts/intel/io/acpica/executer/exstorob.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exstorob - AML Interpreter object store support, store to object
- * $Revision: 1.61 $
+ * $Revision: 1.63 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exsystem.c b/usr/src/uts/intel/io/acpica/executer/exsystem.c
index 194bdaf293..a3c6424c76 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exsystem.c
+++ b/usr/src/uts/intel/io/acpica/executer/exsystem.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exsystem - Interface to OS services
- * $Revision: 1.91 $
+ * $Revision: 1.95 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -119,7 +119,6 @@
#include "acpi.h"
#include "acinterp.h"
-#include "acevents.h"
#define _COMPONENT ACPI_EXECUTER
ACPI_MODULE_NAME ("exsystem")
@@ -146,7 +145,6 @@ AcpiExSystemWaitSemaphore (
UINT16 Timeout)
{
ACPI_STATUS Status;
- ACPI_STATUS Status2;
ACPI_FUNCTION_TRACE (ExSystemWaitSemaphore);
@@ -162,7 +160,7 @@ AcpiExSystemWaitSemaphore (
{
/* We must wait, so unlock the interpreter */
- AcpiExExitInterpreter ();
+ AcpiExRelinquishInterpreter ();
Status = AcpiOsWaitSemaphore (Semaphore, 1, Timeout);
@@ -172,13 +170,7 @@ AcpiExSystemWaitSemaphore (
/* Reacquire the interpreter */
- Status2 = AcpiExEnterInterpreter ();
- if (ACPI_FAILURE (Status2))
- {
- /* Report fatal error, could not acquire interpreter */
-
- return_ACPI_STATUS (Status2);
- }
+ AcpiExReacquireInterpreter ();
}
return_ACPI_STATUS (Status);
@@ -206,7 +198,6 @@ AcpiExSystemWaitMutex (
UINT16 Timeout)
{
ACPI_STATUS Status;
- ACPI_STATUS Status2;
ACPI_FUNCTION_TRACE (ExSystemWaitMutex);
@@ -222,7 +213,7 @@ AcpiExSystemWaitMutex (
{
/* We must wait, so unlock the interpreter */
- AcpiExExitInterpreter ();
+ AcpiExRelinquishInterpreter ();
Status = AcpiOsAcquireMutex (Mutex, Timeout);
@@ -232,13 +223,7 @@ AcpiExSystemWaitMutex (
/* Reacquire the interpreter */
- Status2 = AcpiExEnterInterpreter ();
- if (ACPI_FAILURE (Status2))
- {
- /* Report fatal error, could not acquire interpreter */
-
- return_ACPI_STATUS (Status2);
- }
+ AcpiExReacquireInterpreter ();
}
return_ACPI_STATUS (Status);
@@ -310,22 +295,19 @@ ACPI_STATUS
AcpiExSystemDoSuspend (
ACPI_INTEGER HowLong)
{
- ACPI_STATUS Status;
-
-
ACPI_FUNCTION_ENTRY ();
/* Since this thread will sleep, we must release the interpreter */
- AcpiExExitInterpreter ();
+ AcpiExRelinquishInterpreter ();
AcpiOsSleep (HowLong);
/* And now we must get the interpreter again */
- Status = AcpiExEnterInterpreter ();
- return (Status);
+ AcpiExReacquireInterpreter ();
+ return (AE_OK);
}
diff --git a/usr/src/uts/intel/io/acpica/interpreter/executer/exutils.c b/usr/src/uts/intel/io/acpica/executer/exutils.c
index 1d17091203..3314fa71be 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/executer/exutils.c
+++ b/usr/src/uts/intel/io/acpica/executer/exutils.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: exutils - interpreter/scanner utilities
- * $Revision: 1.123 $
+ * $Revision: 1.131 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -136,7 +136,6 @@
#include "acpi.h"
#include "acinterp.h"
#include "amlcode.h"
-#include "acevents.h"
#define _COMPONENT ACPI_EXECUTER
ACPI_MODULE_NAME ("exutils")
@@ -156,51 +155,81 @@ AcpiExDigitsNeeded (
*
* PARAMETERS: None
*
- * RETURN: Status
+ * RETURN: None
*
- * DESCRIPTION: Enter the interpreter execution region. Failure to enter
- * the interpreter region is a fatal system error
+ * DESCRIPTION: Enter the interpreter execution region. Failure to enter
+ * the interpreter region is a fatal system error. Used in
+ * conjunction with ExitInterpreter.
*
******************************************************************************/
-ACPI_STATUS
+void
AcpiExEnterInterpreter (
void)
{
ACPI_STATUS Status;
+
ACPI_FUNCTION_TRACE (ExEnterInterpreter);
Status = AcpiUtAcquireMutex (ACPI_MTX_INTERPRETER);
if (ACPI_FAILURE (Status))
{
- ACPI_ERROR ((AE_INFO, "Could not acquire interpreter mutex"));
+ ACPI_ERROR ((AE_INFO, "Could not acquire AML Interpreter mutex"));
}
- return_ACPI_STATUS (Status);
+ return_VOID;
}
/*******************************************************************************
*
- * FUNCTION: AcpiExExitInterpreter
+ * FUNCTION: AcpiExReacquireInterpreter
*
* PARAMETERS: None
*
* RETURN: None
*
- * DESCRIPTION: Exit the interpreter execution region
+ * DESCRIPTION: Reacquire the interpreter execution region from within the
+ * interpreter code. Failure to enter the interpreter region is a
+ * fatal system error. Used in conjuction with
+ * RelinquishInterpreter
*
- * Cases where the interpreter is unlocked:
- * 1) Completion of the execution of a control method
- * 2) Method blocked on a Sleep() AML opcode
- * 3) Method blocked on an Acquire() AML opcode
- * 4) Method blocked on a Wait() AML opcode
- * 5) Method blocked to acquire the global lock
- * 6) Method blocked to execute a serialized control method that is
- * already executing
- * 7) About to invoke a user-installed opregion handler
+ ******************************************************************************/
+
+void
+AcpiExReacquireInterpreter (
+ void)
+{
+ ACPI_FUNCTION_TRACE (ExReacquireInterpreter);
+
+
+ /*
+ * If the global serialized flag is set, do not release the interpreter,
+ * since it was not actually released by AcpiExRelinquishInterpreter.
+ * This forces the interpreter to be single threaded.
+ */
+ if (!AcpiGbl_AllMethodsSerialized)
+ {
+ AcpiExEnterInterpreter ();
+ }
+
+ return_VOID;
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiExExitInterpreter
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Exit the interpreter execution region. This is the top level
+ * routine used to exit the interpreter when all processing has
+ * been completed.
*
******************************************************************************/
@@ -217,7 +246,50 @@ AcpiExExitInterpreter (
Status = AcpiUtReleaseMutex (ACPI_MTX_INTERPRETER);
if (ACPI_FAILURE (Status))
{
- ACPI_ERROR ((AE_INFO, "Could not release interpreter mutex"));
+ ACPI_ERROR ((AE_INFO, "Could not release AML Interpreter mutex"));
+ }
+
+ return_VOID;
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiExRelinquishInterpreter
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Exit the interpreter execution region, from within the
+ * interpreter - before attempting an operation that will possibly
+ * block the running thread.
+ *
+ * Cases where the interpreter is unlocked internally
+ * 1) Method to be blocked on a Sleep() AML opcode
+ * 2) Method to be blocked on an Acquire() AML opcode
+ * 3) Method to be blocked on a Wait() AML opcode
+ * 4) Method to be blocked to acquire the global lock
+ * 5) Method to be blocked waiting to execute a serialized control method
+ * that is currently executing
+ * 6) About to invoke a user-installed opregion handler
+ *
+ ******************************************************************************/
+
+void
+AcpiExRelinquishInterpreter (
+ void)
+{
+ ACPI_FUNCTION_TRACE (ExRelinquishInterpreter);
+
+
+ /*
+ * If the global serialized flag is set, do not release the interpreter.
+ * This forces the interpreter to be single threaded.
+ */
+ if (!AcpiGbl_AllMethodsSerialized)
+ {
+ AcpiExExitInterpreter ();
}
return_VOID;
@@ -232,8 +304,8 @@ AcpiExExitInterpreter (
*
* RETURN: none
*
- * DESCRIPTION: Truncate a number to 32-bits if the currently executing method
- * belongs to a 32-bit ACPI table.
+ * DESCRIPTION: Truncate an ACPI Integer to 32 bits if the execution mode is
+ * 32-bit, as determined by the revision of the DSDT.
*
******************************************************************************/
@@ -247,9 +319,10 @@ AcpiExTruncateFor32bitTable (
/*
* Object must be a valid number and we must be executing
- * a control method
+ * a control method. NS node could be there for AML_INT_NAMEPATH_OP.
*/
if ((!ObjDesc) ||
+ (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND) ||
(ACPI_GET_OBJECT_TYPE (ObjDesc) != ACPI_TYPE_INTEGER))
{
return;
@@ -273,44 +346,42 @@ AcpiExTruncateFor32bitTable (
* PARAMETERS: FieldFlags - Flags with Lock rule:
* AlwaysLock or NeverLock
*
- * RETURN: TRUE/FALSE indicating whether the lock was actually acquired
+ * RETURN: None
*
- * DESCRIPTION: Obtain the global lock and keep track of this fact via two
- * methods. A global variable keeps the state of the lock, and
- * the state is returned to the caller.
+ * DESCRIPTION: Obtain the ACPI hardware Global Lock, only if the field
+ * flags specifiy that it is to be obtained before field access.
*
******************************************************************************/
-BOOLEAN
+void
AcpiExAcquireGlobalLock (
UINT32 FieldFlags)
{
- BOOLEAN Locked = FALSE;
ACPI_STATUS Status;
ACPI_FUNCTION_TRACE (ExAcquireGlobalLock);
- /* Only attempt lock if the AlwaysLock bit is set */
+ /* Only use the lock if the AlwaysLock bit is set */
- if (FieldFlags & AML_FIELD_LOCK_RULE_MASK)
+ if (!(FieldFlags & AML_FIELD_LOCK_RULE_MASK))
{
- /* We should attempt to get the lock, wait forever */
-
- Status = AcpiEvAcquireGlobalLock (ACPI_WAIT_FOREVER);
- if (ACPI_SUCCESS (Status))
- {
- Locked = TRUE;
- }
- else
- {
- ACPI_EXCEPTION ((AE_INFO, Status,
- "Could not acquire Global Lock"));
- }
+ return_VOID;
}
- return_UINT8 (Locked);
+ /* Attempt to get the global lock, wait forever */
+
+ Status = AcpiExAcquireMutexObject (ACPI_WAIT_FOREVER,
+ AcpiGbl_GlobalLockMutex, AcpiOsGetThreadId ());
+
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_EXCEPTION ((AE_INFO, Status,
+ "Could not acquire Global Lock"));
+ }
+
+ return_VOID;
}
@@ -318,18 +389,18 @@ AcpiExAcquireGlobalLock (
*
* FUNCTION: AcpiExReleaseGlobalLock
*
- * PARAMETERS: LockedByMe - Return value from corresponding call to
- * AcquireGlobalLock.
+ * PARAMETERS: FieldFlags - Flags with Lock rule:
+ * AlwaysLock or NeverLock
*
* RETURN: None
*
- * DESCRIPTION: Release the global lock if it is locked.
+ * DESCRIPTION: Release the ACPI hardware Global Lock
*
******************************************************************************/
void
AcpiExReleaseGlobalLock (
- BOOLEAN LockedByMe)
+ UINT32 FieldFlags)
{
ACPI_STATUS Status;
@@ -337,20 +408,22 @@ AcpiExReleaseGlobalLock (
ACPI_FUNCTION_TRACE (ExReleaseGlobalLock);
- /* Only attempt unlock if the caller locked it */
+ /* Only use the lock if the AlwaysLock bit is set */
- if (LockedByMe)
+ if (!(FieldFlags & AML_FIELD_LOCK_RULE_MASK))
{
- /* OK, now release the lock */
+ return_VOID;
+ }
- Status = AcpiEvReleaseGlobalLock ();
- if (ACPI_FAILURE (Status))
- {
- /* Report the error, but there isn't much else we can do */
+ /* Release the global lock */
- ACPI_EXCEPTION ((AE_INFO, Status,
- "Could not release ACPI Global Lock"));
- }
+ Status = AcpiExReleaseMutexObject (AcpiGbl_GlobalLockMutex);
+ if (ACPI_FAILURE (Status))
+ {
+ /* Report the error, but there isn't much else we can do */
+
+ ACPI_EXCEPTION ((AE_INFO, Status,
+ "Could not release Global Lock"));
}
return_VOID;
@@ -481,23 +554,4 @@ AcpiExUnsignedIntegerToString (
}
}
-ACPI_INTEGER
-AcpiExStringToUnsignedInteger (
- char *String)
-{
- UINT32 Count;
- int i;
-
- ACPI_FUNCTION_ENTRY ();
-
- if (String == NULL || *String == '\0')
- return (0);
-
- i = (*String++ - '0');
-
- while (*String != '\0')
- i = 10 * i + (*String++ - '0');
-
- return (i);
-}
#endif
diff --git a/usr/src/uts/intel/io/acpica/hardware/hwacpi.c b/usr/src/uts/intel/io/acpica/hardware/hwacpi.c
index 6849bb0321..9bb15ea2e2 100644
--- a/usr/src/uts/intel/io/acpica/hardware/hwacpi.c
+++ b/usr/src/uts/intel/io/acpica/hardware/hwacpi.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: hwacpi - ACPI Hardware Initialization/Mode Interface
- * $Revision: 1.74 $
+ * $Revision: 1.79 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -126,49 +126,6 @@
/******************************************************************************
*
- * FUNCTION: AcpiHwInitialize
- *
- * PARAMETERS: None
- *
- * RETURN: Status
- *
- * DESCRIPTION: Initialize and validate the various ACPI registers defined in
- * the FADT.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiHwInitialize (
- void)
-{
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_TRACE (HwInitialize);
-
-
- /* We must have the ACPI tables by the time we get here */
-
- if (!AcpiGbl_FADT)
- {
- ACPI_ERROR ((AE_INFO, "No FADT is present"));
- return_ACPI_STATUS (AE_NO_ACPI_TABLES);
- }
-
- /* Sanity check the FADT for valid values */
-
- Status = AcpiUtValidateFadt ();
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- return_ACPI_STATUS (AE_OK);
-}
-
-
-/******************************************************************************
- *
* FUNCTION: AcpiHwSetMode
*
* PARAMETERS: Mode - SYS_MODE_ACPI or SYS_MODE_LEGACY
@@ -194,7 +151,7 @@ AcpiHwSetMode (
* ACPI 2.0 clarified that if SMI_CMD in FADT is zero,
* system does not support mode transition.
*/
- if (!AcpiGbl_FADT->SmiCmd)
+ if (!AcpiGbl_FADT.SmiCommand)
{
ACPI_ERROR ((AE_INFO, "No SMI_CMD in FADT, mode transition failed"));
return_ACPI_STATUS (AE_NO_HARDWARE_RESPONSE);
@@ -207,7 +164,7 @@ AcpiHwSetMode (
* we make sure both the numbers are zero to determine these
* transitions are not supported.
*/
- if (!AcpiGbl_FADT->AcpiEnable && !AcpiGbl_FADT->AcpiDisable)
+ if (!AcpiGbl_FADT.AcpiEnable && !AcpiGbl_FADT.AcpiDisable)
{
ACPI_ERROR ((AE_INFO,
"No ACPI mode transition supported in this system (enable/disable both zero)"));
@@ -220,8 +177,8 @@ AcpiHwSetMode (
/* BIOS should have disabled ALL fixed and GP events */
- Status = AcpiOsWritePort (AcpiGbl_FADT->SmiCmd,
- (UINT32) AcpiGbl_FADT->AcpiEnable, 8);
+ Status = AcpiOsWritePort (AcpiGbl_FADT.SmiCommand,
+ (UINT32) AcpiGbl_FADT.AcpiEnable, 8);
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Attempting to enable ACPI mode\n"));
break;
@@ -231,8 +188,8 @@ AcpiHwSetMode (
* BIOS should clear all fixed status bits and restore fixed event
* enable bits to default
*/
- Status = AcpiOsWritePort (AcpiGbl_FADT->SmiCmd,
- (UINT32) AcpiGbl_FADT->AcpiDisable, 8);
+ Status = AcpiOsWritePort (AcpiGbl_FADT.SmiCommand,
+ (UINT32) AcpiGbl_FADT.AcpiDisable, 8);
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"Attempting to enable Legacy (non-ACPI) mode\n"));
break;
@@ -298,12 +255,12 @@ AcpiHwGetMode (
* ACPI 2.0 clarified that if SMI_CMD in FADT is zero,
* system does not support mode transition.
*/
- if (!AcpiGbl_FADT->SmiCmd)
+ if (!AcpiGbl_FADT.SmiCommand)
{
return_UINT32 (ACPI_SYS_MODE_ACPI);
}
- Status = AcpiGetRegister (ACPI_BITREG_SCI_ENABLE, &Value, ACPI_MTX_LOCK);
+ Status = AcpiGetRegister (ACPI_BITREG_SCI_ENABLE, &Value);
if (ACPI_FAILURE (Status))
{
return_UINT32 (ACPI_SYS_MODE_LEGACY);
diff --git a/usr/src/uts/intel/io/acpica/hardware/hwgpe.c b/usr/src/uts/intel/io/acpica/hardware/hwgpe.c
index a9da5e29ac..473c1d62da 100644
--- a/usr/src/uts/intel/io/acpica/hardware/hwgpe.c
+++ b/usr/src/uts/intel/io/acpica/hardware/hwgpe.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: hwgpe - Low level GPE enable/disable/clear functions
- * $Revision: 1.73 $
+ * $Revision: 1.76 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -129,6 +129,60 @@ AcpiHwEnableWakeupGpeBlock (
ACPI_GPE_BLOCK_INFO *GpeBlock);
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiHwLowDisableGpe
+ *
+ * PARAMETERS: GpeEventInfo - Info block for the GPE to be disabled
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Disable a single GPE in the enable register.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiHwLowDisableGpe (
+ ACPI_GPE_EVENT_INFO *GpeEventInfo)
+{
+ ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
+ ACPI_STATUS Status;
+ UINT32 EnableMask;
+
+
+ /* Get the info block for the entire GPE register */
+
+ GpeRegisterInfo = GpeEventInfo->RegisterInfo;
+ if (!GpeRegisterInfo)
+ {
+ return (AE_NOT_EXIST);
+ }
+
+ /* Get current value of the enable register that contains this GPE */
+
+ Status = AcpiHwLowLevelRead (ACPI_GPE_REGISTER_WIDTH, &EnableMask,
+ &GpeRegisterInfo->EnableAddress);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ /* Clear just the bit that corresponds to this GPE */
+
+ ACPI_CLEAR_BIT (EnableMask,
+ ((UINT32) 1 << (GpeEventInfo->GpeNumber - GpeRegisterInfo->BaseGpeNumber)));
+
+
+ /* Write the updated enable mask */
+
+ Status = AcpiHwLowLevelWrite (ACPI_GPE_REGISTER_WIDTH, EnableMask,
+ &GpeRegisterInfo->EnableAddress);
+
+ return (Status);
+}
+
+
/******************************************************************************
*
* FUNCTION: AcpiHwWriteGpeEnableReg
@@ -188,16 +242,20 @@ AcpiHwClearGpe (
ACPI_GPE_EVENT_INFO *GpeEventInfo)
{
ACPI_STATUS Status;
+ UINT8 RegisterBit;
ACPI_FUNCTION_ENTRY ();
+ RegisterBit = (UINT8)
+ (1 << (GpeEventInfo->GpeNumber - GpeEventInfo->RegisterInfo->BaseGpeNumber));
+
/*
* Write a one to the appropriate bit in the status register to
* clear this GPE.
*/
- Status = AcpiHwLowLevelWrite (8, GpeEventInfo->RegisterBit,
+ Status = AcpiHwLowLevelWrite (8, RegisterBit,
&GpeEventInfo->RegisterInfo->StatusAddress);
return (Status);
@@ -243,7 +301,8 @@ AcpiHwGetGpeStatus (
/* Get the register bitmask for this GPE */
- RegisterBit = GpeEventInfo->RegisterBit;
+ RegisterBit = (UINT8)
+ (1 << (GpeEventInfo->GpeNumber - GpeEventInfo->RegisterInfo->BaseGpeNumber));
/* GPE currently enabled? (enabled for runtime?) */
diff --git a/usr/src/uts/intel/io/acpica/hardware/hwregs.c b/usr/src/uts/intel/io/acpica/hardware/hwregs.c
index 81d63f8f2a..10b8c0d734 100644
--- a/usr/src/uts/intel/io/acpica/hardware/hwregs.c
+++ b/usr/src/uts/intel/io/acpica/hardware/hwregs.c
@@ -3,7 +3,7 @@
*
* Module Name: hwregs - Read/write access functions for the various ACPI
* control and status registers.
- * $Revision: 1.183 $
+ * $Revision: 1.188 $
*
******************************************************************************/
@@ -11,7 +11,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -130,20 +130,18 @@
*
* FUNCTION: AcpiHwClearAcpiStatus
*
- * PARAMETERS: Flags - Lock the hardware or not
+ * PARAMETERS: None
*
- * RETURN: none
+ * RETURN: None
*
* DESCRIPTION: Clears all fixed and general purpose status bits
* THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
*
- * NOTE: TBD: Flags parameter is obsolete, to be removed
- *
******************************************************************************/
ACPI_STATUS
AcpiHwClearAcpiStatus (
- UINT32 Flags)
+ void)
{
ACPI_STATUS Status;
ACPI_CPU_FLAGS LockFlags = 0;
@@ -154,12 +152,11 @@ AcpiHwClearAcpiStatus (
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "About to write %04X to %04X\n",
ACPI_BITMASK_ALL_FIXED_STATUS,
- (UINT16) ACPI_GET_ADDRESS (AcpiGbl_FADT->XPm1aEvtBlk.Address)));
+ (UINT16) AcpiGbl_FADT.XPm1aEventBlock.Address));
LockFlags = AcpiOsAcquireLock (AcpiGbl_HardwareLock);
- Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
- ACPI_REGISTER_PM1_STATUS,
+ Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1_STATUS,
ACPI_BITMASK_ALL_FIXED_STATUS);
if (ACPI_FAILURE (Status))
{
@@ -168,10 +165,10 @@ AcpiHwClearAcpiStatus (
/* Clear the fixed events */
- if (ACPI_VALID_ADDRESS (AcpiGbl_FADT->XPm1bEvtBlk.Address))
+ if (AcpiGbl_FADT.XPm1bEventBlock.Address)
{
Status = AcpiHwLowLevelWrite (16, ACPI_BITMASK_ALL_FIXED_STATUS,
- &AcpiGbl_FADT->XPm1bEvtBlk);
+ &AcpiGbl_FADT.XPm1bEventBlock);
if (ACPI_FAILURE (Status))
{
goto UnlockAndExit;
@@ -349,33 +346,29 @@ AcpiHwGetBitRegisterInfo (
/*******************************************************************************
*
- * FUNCTION: AcpiGetRegister
+ * FUNCTION: AcpiGetRegisterUnlocked
*
* PARAMETERS: RegisterId - ID of ACPI BitRegister to access
* ReturnValue - Value that was read from the register
- * Flags - Lock the hardware or not
*
* RETURN: Status and the value read from specified Register. Value
* returned is normalized to bit0 (is shifted all the way right)
*
- * DESCRIPTION: ACPI BitRegister read function.
- *
- * NOTE: TBD: Flags parameter is obsolete, to be removed
+ * DESCRIPTION: ACPI BitRegister read function. Does not acquire the HW lock.
*
******************************************************************************/
ACPI_STATUS
-AcpiGetRegister (
+AcpiGetRegisterUnlocked (
UINT32 RegisterId,
- UINT32 *ReturnValue,
- UINT32 Flags)
+ UINT32 *ReturnValue)
{
UINT32 RegisterValue = 0;
ACPI_BIT_REGISTER_INFO *BitRegInfo;
ACPI_STATUS Status;
- ACPI_FUNCTION_TRACE (AcpiGetRegister);
+ ACPI_FUNCTION_TRACE (AcpiGetRegisterUnlocked);
/* Get the info structure corresponding to the requested ACPI Register */
@@ -388,8 +381,8 @@ AcpiGetRegister (
/* Read from the register */
- Status = AcpiHwRegisterRead (ACPI_MTX_LOCK,
- BitRegInfo->ParentRegister, &RegisterValue);
+ Status = AcpiHwRegisterRead (BitRegInfo->ParentRegister,
+ &RegisterValue);
if (ACPI_SUCCESS (Status))
{
@@ -407,6 +400,37 @@ AcpiGetRegister (
return_ACPI_STATUS (Status);
}
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiGetRegister
+ *
+ * PARAMETERS: RegisterId - ID of ACPI BitRegister to access
+ * ReturnValue - Value that was read from the register
+ *
+ * RETURN: Status and the value read from specified Register. Value
+ * returned is normalized to bit0 (is shifted all the way right)
+ *
+ * DESCRIPTION: ACPI BitRegister read function.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiGetRegister (
+ UINT32 RegisterId,
+ UINT32 *ReturnValue)
+{
+ ACPI_STATUS Status;
+ ACPI_CPU_FLAGS Flags;
+
+
+ Flags = AcpiOsAcquireLock (AcpiGbl_HardwareLock);
+ Status = AcpiGetRegisterUnlocked (RegisterId, ReturnValue);
+ AcpiOsReleaseLock (AcpiGbl_HardwareLock, Flags);
+
+ return (Status);
+}
+
ACPI_EXPORT_SYMBOL (AcpiGetRegister)
@@ -417,21 +441,17 @@ ACPI_EXPORT_SYMBOL (AcpiGetRegister)
* PARAMETERS: RegisterId - ID of ACPI BitRegister to access
* Value - (only used on write) value to write to the
* Register, NOT pre-normalized to the bit pos
- * Flags - Lock the hardware or not
*
* RETURN: Status
*
* DESCRIPTION: ACPI Bit Register write function.
*
- * NOTE: TBD: Flags parameter is obsolete, to be removed
- *
******************************************************************************/
ACPI_STATUS
AcpiSetRegister (
UINT32 RegisterId,
- UINT32 Value,
- UINT32 Flags)
+ UINT32 Value)
{
UINT32 RegisterValue = 0;
ACPI_BIT_REGISTER_INFO *BitRegInfo;
@@ -455,8 +475,8 @@ AcpiSetRegister (
/* Always do a register read first so we can insert the new bits */
- Status = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK,
- BitRegInfo->ParentRegister, &RegisterValue);
+ Status = AcpiHwRegisterRead (BitRegInfo->ParentRegister,
+ &RegisterValue);
if (ACPI_FAILURE (Status))
{
goto UnlockAndExit;
@@ -483,8 +503,8 @@ AcpiSetRegister (
BitRegInfo->BitPosition, BitRegInfo->AccessBitMask);
if (Value)
{
- Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
- ACPI_REGISTER_PM1_STATUS, (UINT16) Value);
+ Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1_STATUS,
+ (UINT16) Value);
RegisterValue = 0;
}
break;
@@ -495,8 +515,8 @@ AcpiSetRegister (
ACPI_REGISTER_INSERT_VALUE (RegisterValue, BitRegInfo->BitPosition,
BitRegInfo->AccessBitMask, Value);
- Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
- ACPI_REGISTER_PM1_ENABLE, (UINT16) RegisterValue);
+ Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1_ENABLE,
+ (UINT16) RegisterValue);
break;
@@ -513,15 +533,15 @@ AcpiSetRegister (
ACPI_REGISTER_INSERT_VALUE (RegisterValue, BitRegInfo->BitPosition,
BitRegInfo->AccessBitMask, Value);
- Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
- ACPI_REGISTER_PM1_CONTROL, (UINT16) RegisterValue);
+ Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1_CONTROL,
+ (UINT16) RegisterValue);
break;
case ACPI_REGISTER_PM2_CONTROL:
- Status = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK,
- ACPI_REGISTER_PM2_CONTROL, &RegisterValue);
+ Status = AcpiHwRegisterRead (ACPI_REGISTER_PM2_CONTROL,
+ &RegisterValue);
if (ACPI_FAILURE (Status))
{
goto UnlockAndExit;
@@ -529,19 +549,17 @@ AcpiSetRegister (
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "PM2 control: Read %X from %8.8X%8.8X\n",
RegisterValue,
- ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (
- AcpiGbl_FADT->XPm2CntBlk.Address))));
+ ACPI_FORMAT_UINT64 (AcpiGbl_FADT.XPm2ControlBlock.Address)));
ACPI_REGISTER_INSERT_VALUE (RegisterValue, BitRegInfo->BitPosition,
BitRegInfo->AccessBitMask, Value);
ACPI_DEBUG_PRINT ((ACPI_DB_IO, "About to write %4.4X to %8.8X%8.8X\n",
RegisterValue,
- ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (
- AcpiGbl_FADT->XPm2CntBlk.Address))));
+ ACPI_FORMAT_UINT64 (AcpiGbl_FADT.XPm2ControlBlock.Address)));
- Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
- ACPI_REGISTER_PM2_CONTROL, (UINT8) (RegisterValue));
+ Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM2_CONTROL,
+ (UINT8) (RegisterValue));
break;
@@ -572,8 +590,7 @@ ACPI_EXPORT_SYMBOL (AcpiSetRegister)
*
* FUNCTION: AcpiHwRegisterRead
*
- * PARAMETERS: UseLock - Lock hardware? True/False
- * RegisterId - ACPI Register ID
+ * PARAMETERS: RegisterId - ACPI Register ID
* ReturnValue - Where the register value is returned
*
* RETURN: Status and the value read.
@@ -584,37 +601,30 @@ ACPI_EXPORT_SYMBOL (AcpiSetRegister)
ACPI_STATUS
AcpiHwRegisterRead (
- BOOLEAN UseLock,
UINT32 RegisterId,
UINT32 *ReturnValue)
{
UINT32 Value1 = 0;
UINT32 Value2 = 0;
ACPI_STATUS Status;
- ACPI_CPU_FLAGS LockFlags = 0;
ACPI_FUNCTION_TRACE (HwRegisterRead);
- if (ACPI_MTX_LOCK == UseLock)
- {
- LockFlags = AcpiOsAcquireLock (AcpiGbl_HardwareLock);
- }
-
switch (RegisterId)
{
case ACPI_REGISTER_PM1_STATUS: /* 16-bit access */
- Status = AcpiHwLowLevelRead (16, &Value1, &AcpiGbl_FADT->XPm1aEvtBlk);
+ Status = AcpiHwLowLevelRead (16, &Value1, &AcpiGbl_FADT.XPm1aEventBlock);
if (ACPI_FAILURE (Status))
{
- goto UnlockAndExit;
+ goto Exit;
}
/* PM1B is optional */
- Status = AcpiHwLowLevelRead (16, &Value2, &AcpiGbl_FADT->XPm1bEvtBlk);
+ Status = AcpiHwLowLevelRead (16, &Value2, &AcpiGbl_FADT.XPm1bEventBlock);
Value1 |= Value2;
break;
@@ -624,7 +634,7 @@ AcpiHwRegisterRead (
Status = AcpiHwLowLevelRead (16, &Value1, &AcpiGbl_XPm1aEnable);
if (ACPI_FAILURE (Status))
{
- goto UnlockAndExit;
+ goto Exit;
}
/* PM1B is optional */
@@ -636,31 +646,31 @@ AcpiHwRegisterRead (
case ACPI_REGISTER_PM1_CONTROL: /* 16-bit access */
- Status = AcpiHwLowLevelRead (16, &Value1, &AcpiGbl_FADT->XPm1aCntBlk);
+ Status = AcpiHwLowLevelRead (16, &Value1, &AcpiGbl_FADT.XPm1aControlBlock);
if (ACPI_FAILURE (Status))
{
- goto UnlockAndExit;
+ goto Exit;
}
- Status = AcpiHwLowLevelRead (16, &Value2, &AcpiGbl_FADT->XPm1bCntBlk);
+ Status = AcpiHwLowLevelRead (16, &Value2, &AcpiGbl_FADT.XPm1bControlBlock);
Value1 |= Value2;
break;
case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */
- Status = AcpiHwLowLevelRead (8, &Value1, &AcpiGbl_FADT->XPm2CntBlk);
+ Status = AcpiHwLowLevelRead (8, &Value1, &AcpiGbl_FADT.XPm2ControlBlock);
break;
case ACPI_REGISTER_PM_TIMER: /* 32-bit access */
- Status = AcpiHwLowLevelRead (32, &Value1, &AcpiGbl_FADT->XPmTmrBlk);
+ Status = AcpiHwLowLevelRead (32, &Value1, &AcpiGbl_FADT.XPmTimerBlock);
break;
case ACPI_REGISTER_SMI_COMMAND_BLOCK: /* 8-bit access */
- Status = AcpiOsReadPort (AcpiGbl_FADT->SmiCmd, &Value1, 8);
+ Status = AcpiOsReadPort (AcpiGbl_FADT.SmiCommand, &Value1, 8);
break;
default:
@@ -670,12 +680,7 @@ AcpiHwRegisterRead (
break;
}
-UnlockAndExit:
- if (ACPI_MTX_LOCK == UseLock)
- {
- AcpiOsReleaseLock (AcpiGbl_HardwareLock, LockFlags);
- }
-
+Exit:
if (ACPI_SUCCESS (Status))
{
*ReturnValue = Value1;
@@ -689,8 +694,7 @@ UnlockAndExit:
*
* FUNCTION: AcpiHwRegisterWrite
*
- * PARAMETERS: UseLock - Lock hardware? True/False
- * RegisterId - ACPI Register ID
+ * PARAMETERS: RegisterId - ACPI Register ID
* Value - The value to write
*
* RETURN: Status
@@ -714,34 +718,27 @@ UnlockAndExit:
ACPI_STATUS
AcpiHwRegisterWrite (
- BOOLEAN UseLock,
UINT32 RegisterId,
UINT32 Value)
{
ACPI_STATUS Status;
- ACPI_CPU_FLAGS LockFlags = 0;
UINT32 ReadValue;
ACPI_FUNCTION_TRACE (HwRegisterWrite);
- if (ACPI_MTX_LOCK == UseLock)
- {
- LockFlags = AcpiOsAcquireLock (AcpiGbl_HardwareLock);
- }
-
switch (RegisterId)
{
case ACPI_REGISTER_PM1_STATUS: /* 16-bit access */
/* Perform a read first to preserve certain bits (per ACPI spec) */
- Status = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK,
- ACPI_REGISTER_PM1_STATUS, &ReadValue);
+ Status = AcpiHwRegisterRead (ACPI_REGISTER_PM1_STATUS,
+ &ReadValue);
if (ACPI_FAILURE (Status))
{
- goto UnlockAndExit;
+ goto Exit;
}
/* Insert the bits to be preserved */
@@ -750,15 +747,15 @@ AcpiHwRegisterWrite (
/* Now we can write the data */
- Status = AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aEvtBlk);
+ Status = AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT.XPm1aEventBlock);
if (ACPI_FAILURE (Status))
{
- goto UnlockAndExit;
+ goto Exit;
}
/* PM1B is optional */
- Status = AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bEvtBlk);
+ Status = AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT.XPm1bEventBlock);
break;
@@ -767,7 +764,7 @@ AcpiHwRegisterWrite (
Status = AcpiHwLowLevelWrite (16, Value, &AcpiGbl_XPm1aEnable);
if (ACPI_FAILURE (Status))
{
- goto UnlockAndExit;
+ goto Exit;
}
/* PM1B is optional */
@@ -783,11 +780,11 @@ AcpiHwRegisterWrite (
*
* Note: This includes SCI_EN, we never want to change this bit
*/
- Status = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK,
- ACPI_REGISTER_PM1_CONTROL, &ReadValue);
+ Status = AcpiHwRegisterRead (ACPI_REGISTER_PM1_CONTROL,
+ &ReadValue);
if (ACPI_FAILURE (Status))
{
- goto UnlockAndExit;
+ goto Exit;
}
/* Insert the bits to be preserved */
@@ -796,37 +793,37 @@ AcpiHwRegisterWrite (
/* Now we can write the data */
- Status = AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aCntBlk);
+ Status = AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT.XPm1aControlBlock);
if (ACPI_FAILURE (Status))
{
- goto UnlockAndExit;
+ goto Exit;
}
- Status = AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bCntBlk);
+ Status = AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT.XPm1bControlBlock);
break;
case ACPI_REGISTER_PM1A_CONTROL: /* 16-bit access */
- Status = AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1aCntBlk);
+ Status = AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT.XPm1aControlBlock);
break;
case ACPI_REGISTER_PM1B_CONTROL: /* 16-bit access */
- Status = AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT->XPm1bCntBlk);
+ Status = AcpiHwLowLevelWrite (16, Value, &AcpiGbl_FADT.XPm1bControlBlock);
break;
case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */
- Status = AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT->XPm2CntBlk);
+ Status = AcpiHwLowLevelWrite (8, Value, &AcpiGbl_FADT.XPm2ControlBlock);
break;
case ACPI_REGISTER_PM_TIMER: /* 32-bit access */
- Status = AcpiHwLowLevelWrite (32, Value, &AcpiGbl_FADT->XPmTmrBlk);
+ Status = AcpiHwLowLevelWrite (32, Value, &AcpiGbl_FADT.XPmTimerBlock);
break;
@@ -834,7 +831,7 @@ AcpiHwRegisterWrite (
/* SMI_CMD is currently always in IO space */
- Status = AcpiOsWritePort (AcpiGbl_FADT->SmiCmd, Value, 8);
+ Status = AcpiOsWritePort (AcpiGbl_FADT.SmiCommand, Value, 8);
break;
@@ -843,12 +840,7 @@ AcpiHwRegisterWrite (
break;
}
-UnlockAndExit:
- if (ACPI_MTX_LOCK == UseLock)
- {
- AcpiOsReleaseLock (AcpiGbl_HardwareLock, LockFlags);
- }
-
+Exit:
return_ACPI_STATUS (Status);
}
@@ -893,7 +885,7 @@ AcpiHwLowLevelRead (
/* Get a local copy of the address. Handles possible alignment issues */
ACPI_MOVE_64_TO_64 (&Address, &Reg->Address);
- if (!ACPI_VALID_ADDRESS (Address))
+ if (!Address)
{
return (AE_OK);
}
@@ -903,34 +895,31 @@ AcpiHwLowLevelRead (
* Two address spaces supported: Memory or IO.
* PCI_Config is not supported here because the GAS struct is insufficient
*/
- switch (Reg->AddressSpaceId)
+ switch (Reg->SpaceId)
{
case ACPI_ADR_SPACE_SYSTEM_MEMORY:
Status = AcpiOsReadMemory (
- (ACPI_PHYSICAL_ADDRESS) ACPI_GET_ADDRESS (Address),
- Value, Width);
+ (ACPI_PHYSICAL_ADDRESS) Address, Value, Width);
break;
case ACPI_ADR_SPACE_SYSTEM_IO:
- Status = AcpiOsReadPort ((ACPI_IO_ADDRESS) ACPI_GET_ADDRESS (Address),
- Value, Width);
+ Status = AcpiOsReadPort ((ACPI_IO_ADDRESS) Address, Value, Width);
break;
default:
ACPI_ERROR ((AE_INFO,
- "Unsupported address space: %X", Reg->AddressSpaceId));
+ "Unsupported address space: %X", Reg->SpaceId));
return (AE_BAD_PARAMETER);
}
ACPI_DEBUG_PRINT ((ACPI_DB_IO,
"Read: %8.8X width %2d from %8.8X%8.8X (%s)\n",
- *Value, Width,
- ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (Address)),
- AcpiUtGetRegionName (Reg->AddressSpaceId)));
+ *Value, Width, ACPI_FORMAT_UINT64 (Address),
+ AcpiUtGetRegionName (Reg->SpaceId)));
return (Status);
}
@@ -976,7 +965,7 @@ AcpiHwLowLevelWrite (
/* Get a local copy of the address. Handles possible alignment issues */
ACPI_MOVE_64_TO_64 (&Address, &Reg->Address);
- if (!ACPI_VALID_ADDRESS (Address))
+ if (!Address)
{
return (AE_OK);
}
@@ -985,34 +974,32 @@ AcpiHwLowLevelWrite (
* Two address spaces supported: Memory or IO.
* PCI_Config is not supported here because the GAS struct is insufficient
*/
- switch (Reg->AddressSpaceId)
+ switch (Reg->SpaceId)
{
case ACPI_ADR_SPACE_SYSTEM_MEMORY:
Status = AcpiOsWriteMemory (
- (ACPI_PHYSICAL_ADDRESS) ACPI_GET_ADDRESS (Address),
- Value, Width);
+ (ACPI_PHYSICAL_ADDRESS) Address, Value, Width);
break;
case ACPI_ADR_SPACE_SYSTEM_IO:
- Status = AcpiOsWritePort ((ACPI_IO_ADDRESS) ACPI_GET_ADDRESS (Address),
- Value, Width);
+ Status = AcpiOsWritePort (
+ (ACPI_IO_ADDRESS) Address, Value, Width);
break;
default:
ACPI_ERROR ((AE_INFO,
- "Unsupported address space: %X", Reg->AddressSpaceId));
+ "Unsupported address space: %X", Reg->SpaceId));
return (AE_BAD_PARAMETER);
}
ACPI_DEBUG_PRINT ((ACPI_DB_IO,
"Wrote: %8.8X width %2d to %8.8X%8.8X (%s)\n",
- Value, Width,
- ACPI_FORMAT_UINT64 (ACPI_GET_ADDRESS (Address)),
- AcpiUtGetRegionName (Reg->AddressSpaceId)));
+ Value, Width, ACPI_FORMAT_UINT64 (Address),
+ AcpiUtGetRegionName (Reg->SpaceId)));
return (Status);
}
diff --git a/usr/src/uts/intel/io/acpica/hardware/hwsleep.c b/usr/src/uts/intel/io/acpica/hardware/hwsleep.c
index 56e7783a20..34f13c9e4f 100644
--- a/usr/src/uts/intel/io/acpica/hardware/hwsleep.c
+++ b/usr/src/uts/intel/io/acpica/hardware/hwsleep.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Name: hwsleep.c - ACPI Hardware Sleep/Wake Interface
- * $Revision: 1.82 $
+ * $Revision: 1.89 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -136,23 +136,39 @@
ACPI_STATUS
AcpiSetFirmwareWakingVector (
- ACPI_PHYSICAL_ADDRESS PhysicalAddress)
+ ACPI_PHYSICAL_ADDRESS PhysicalAddress)
{
+ ACPI_TABLE_FACS *Facs;
+ ACPI_STATUS Status;
+
ACPI_FUNCTION_TRACE (AcpiSetFirmwareWakingVector);
+ /* Get the FACS */
+
+ Status = AcpiGetTableByIndex (ACPI_TABLE_INDEX_FACS,
+ ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &Facs));
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
/* Set the vector */
- if (AcpiGbl_CommonFACS.VectorWidth == 32)
+ if ((Facs->Length < 32) ||
+ (!(Facs->XFirmwareWakingVector)))
{
- *(ACPI_CAST_PTR (UINT32, AcpiGbl_CommonFACS.FirmwareWakingVector))
- = (UINT32) PhysicalAddress;
+ /*
+ * ACPI 1.0 FACS or short table or optional X_ field is zero
+ */
+ Facs->FirmwareWakingVector = (UINT32) PhysicalAddress;
}
else
{
- *AcpiGbl_CommonFACS.FirmwareWakingVector
- = PhysicalAddress;
+ /*
+ * ACPI 2.0 FACS with valid X_ field
+ */
+ Facs->XFirmwareWakingVector = PhysicalAddress;
}
return_ACPI_STATUS (AE_OK);
@@ -177,8 +193,11 @@ ACPI_EXPORT_SYMBOL (AcpiSetFirmwareWakingVector)
ACPI_STATUS
AcpiGetFirmwareWakingVector (
- ACPI_PHYSICAL_ADDRESS *PhysicalAddress)
+ ACPI_PHYSICAL_ADDRESS *PhysicalAddress)
{
+ ACPI_TABLE_FACS *Facs;
+ ACPI_STATUS Status;
+
ACPI_FUNCTION_TRACE (AcpiGetFirmwareWakingVector);
@@ -188,17 +207,32 @@ AcpiGetFirmwareWakingVector (
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
+ /* Get the FACS */
+
+ Status = AcpiGetTableByIndex (ACPI_TABLE_INDEX_FACS,
+ ACPI_CAST_INDIRECT_PTR (ACPI_TABLE_HEADER, &Facs));
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
/* Get the vector */
- if (AcpiGbl_CommonFACS.VectorWidth == 32)
+ if ((Facs->Length < 32) ||
+ (!(Facs->XFirmwareWakingVector)))
{
- *PhysicalAddress = (ACPI_PHYSICAL_ADDRESS)
- *(ACPI_CAST_PTR (UINT32, AcpiGbl_CommonFACS.FirmwareWakingVector));
+ /*
+ * ACPI 1.0 FACS or short table or optional X_ field is zero
+ */
+ *PhysicalAddress =
+ (ACPI_PHYSICAL_ADDRESS) Facs->FirmwareWakingVector;
}
else
{
- *PhysicalAddress =
- *AcpiGbl_CommonFACS.FirmwareWakingVector;
+ /*
+ * ACPI 2.0 FACS with valid X_ field
+ */
+ *PhysicalAddress = (ACPI_PHYSICAL_ADDRESS) Facs->XFirmwareWakingVector;
}
return_ACPI_STATUS (AE_OK);
@@ -224,11 +258,11 @@ ACPI_EXPORT_SYMBOL (AcpiGetFirmwareWakingVector)
ACPI_STATUS
AcpiEnterSleepStatePrep (
- UINT8 SleepState)
+ UINT8 SleepState)
{
- ACPI_STATUS Status;
- ACPI_OBJECT_LIST ArgList;
- ACPI_OBJECT Arg;
+ ACPI_STATUS Status;
+ ACPI_OBJECT_LIST ArgList;
+ ACPI_OBJECT Arg;
ACPI_FUNCTION_TRACE (AcpiEnterSleepStatePrep);
@@ -244,29 +278,20 @@ AcpiEnterSleepStatePrep (
return_ACPI_STATUS (Status);
}
- /* Setup parameter object */
+ /* Execute the _PTS method (Prepare To Sleep) */
ArgList.Count = 1;
ArgList.Pointer = &Arg;
-
Arg.Type = ACPI_TYPE_INTEGER;
Arg.Integer.Value = SleepState;
- /* Run the _PTS and _GTS methods */
-
Status = AcpiEvaluateObject (NULL, METHOD_NAME__PTS, &ArgList, NULL);
if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
{
return_ACPI_STATUS (Status);
}
- Status = AcpiEvaluateObject (NULL, METHOD_NAME__GTS, &ArgList, NULL);
- if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
- {
- return_ACPI_STATUS (Status);
- }
-
- /* Setup the argument to _SST */
+ /* Setup the argument to the _SST method (System STatus) */
switch (SleepState)
{
@@ -289,8 +314,10 @@ AcpiEnterSleepStatePrep (
break;
}
- /* Set the system indicators to show the desired sleep state. */
-
+ /*
+ * Set the system indicators to show the desired sleep state.
+ * _SST is an optional method (return no error if not found)
+ */
Status = AcpiEvaluateObject (NULL, METHOD_NAME__SST, &ArgList, NULL);
if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
{
@@ -311,7 +338,7 @@ ACPI_EXPORT_SYMBOL (AcpiEnterSleepStatePrep)
*
* RETURN: Status
*
- * DESCRIPTION: Enter a system sleep state (see ACPI 2.0 spec p 231)
+ * DESCRIPTION: Enter a system sleep state
* THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
*
******************************************************************************/
@@ -325,6 +352,8 @@ AcpiEnterSleepState (
ACPI_BIT_REGISTER_INFO *SleepTypeRegInfo;
ACPI_BIT_REGISTER_INFO *SleepEnableRegInfo;
UINT32 InValue;
+ ACPI_OBJECT_LIST ArgList;
+ ACPI_OBJECT Arg;
ACPI_STATUS Status;
@@ -344,7 +373,7 @@ AcpiEnterSleepState (
/* Clear wake status */
- Status = AcpiSetRegister (ACPI_BITREG_WAKE_STATUS, 1, ACPI_MTX_DO_NOT_LOCK);
+ Status = AcpiSetRegister (ACPI_BITREG_WAKE_STATUS, 1);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -352,7 +381,7 @@ AcpiEnterSleepState (
/* Clear all fixed and general purpose status bits */
- Status = AcpiHwClearAcpiStatus (ACPI_MTX_DO_NOT_LOCK);
+ Status = AcpiHwClearAcpiStatus ();
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -362,8 +391,7 @@ AcpiEnterSleepState (
{
/* Disable BM arbitration */
- Status = AcpiSetRegister (ACPI_BITREG_ARB_DISABLE,
- 1, ACPI_MTX_DO_NOT_LOCK);
+ Status = AcpiSetRegister (ACPI_BITREG_ARB_DISABLE, 1);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -387,10 +415,23 @@ AcpiEnterSleepState (
return_ACPI_STATUS (Status);
}
+ /* Execute the _GTS method (Going To Sleep) */
+
+ ArgList.Count = 1;
+ ArgList.Pointer = &Arg;
+ Arg.Type = ACPI_TYPE_INTEGER;
+ Arg.Integer.Value = SleepState;
+
+ Status = AcpiEvaluateObject (NULL, METHOD_NAME__GTS, &ArgList, NULL);
+ if (ACPI_FAILURE (Status) && Status != AE_NOT_FOUND)
+ {
+ return_ACPI_STATUS (Status);
+ }
+
/* Get current value of PM1A control */
- Status = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK,
- ACPI_REGISTER_PM1_CONTROL, &PM1AControl);
+ Status = AcpiHwRegisterRead (ACPI_REGISTER_PM1_CONTROL,
+ &PM1AControl);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -416,15 +457,15 @@ AcpiEnterSleepState (
/* Write #1: fill in SLP_TYP data */
- Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
- ACPI_REGISTER_PM1A_CONTROL, PM1AControl);
+ Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1A_CONTROL,
+ PM1AControl);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
- Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
- ACPI_REGISTER_PM1B_CONTROL, PM1BControl);
+ Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1B_CONTROL,
+ PM1BControl);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -439,15 +480,15 @@ AcpiEnterSleepState (
ACPI_FLUSH_CPU_CACHE ();
- Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
- ACPI_REGISTER_PM1A_CONTROL, PM1AControl);
+ Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1A_CONTROL,
+ PM1AControl);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
- Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
- ACPI_REGISTER_PM1B_CONTROL, PM1BControl);
+ Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1B_CONTROL,
+ PM1BControl);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -468,8 +509,7 @@ AcpiEnterSleepState (
*/
AcpiOsStall (10000000);
- Status = AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
- ACPI_REGISTER_PM1_CONTROL,
+ Status = AcpiHwRegisterWrite (ACPI_REGISTER_PM1_CONTROL,
SleepEnableRegInfo->AccessBitMask);
if (ACPI_FAILURE (Status))
{
@@ -481,8 +521,7 @@ AcpiEnterSleepState (
do
{
- Status = AcpiGetRegister (ACPI_BITREG_WAKE_STATUS, &InValue,
- ACPI_MTX_DO_NOT_LOCK);
+ Status = AcpiGetRegister (ACPI_BITREG_WAKE_STATUS, &InValue);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -522,13 +561,13 @@ AcpiEnterSleepStateS4bios (
ACPI_FUNCTION_TRACE (AcpiEnterSleepStateS4bios);
- Status = AcpiSetRegister (ACPI_BITREG_WAKE_STATUS, 1, ACPI_MTX_DO_NOT_LOCK);
+ Status = AcpiSetRegister (ACPI_BITREG_WAKE_STATUS, 1);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
- Status = AcpiHwClearAcpiStatus (ACPI_MTX_DO_NOT_LOCK);
+ Status = AcpiHwClearAcpiStatus ();
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -553,13 +592,12 @@ AcpiEnterSleepStateS4bios (
ACPI_FLUSH_CPU_CACHE ();
- Status = AcpiOsWritePort (AcpiGbl_FADT->SmiCmd,
- (UINT32) AcpiGbl_FADT->S4BiosReq, 8);
+ Status = AcpiOsWritePort (AcpiGbl_FADT.SmiCommand,
+ (UINT32) AcpiGbl_FADT.S4BiosRequest, 8);
do {
AcpiOsStall(1000);
- Status = AcpiGetRegister (ACPI_BITREG_WAKE_STATUS, &InValue,
- ACPI_MTX_DO_NOT_LOCK);
+ Status = AcpiGetRegister (ACPI_BITREG_WAKE_STATUS, &InValue);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -615,8 +653,8 @@ AcpiLeaveSleepState (
/* Get current value of PM1A control */
- Status = AcpiHwRegisterRead (ACPI_MTX_DO_NOT_LOCK,
- ACPI_REGISTER_PM1_CONTROL, &PM1AControl);
+ Status = AcpiHwRegisterRead (ACPI_REGISTER_PM1_CONTROL,
+ &PM1AControl);
if (ACPI_SUCCESS (Status))
{
/* Clear SLP_EN and SLP_TYP fields */
@@ -632,10 +670,10 @@ AcpiLeaveSleepState (
/* Just ignore any errors */
- (void) AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
- ACPI_REGISTER_PM1A_CONTROL, PM1AControl);
- (void) AcpiHwRegisterWrite (ACPI_MTX_DO_NOT_LOCK,
- ACPI_REGISTER_PM1B_CONTROL, PM1BControl);
+ (void) AcpiHwRegisterWrite (ACPI_REGISTER_PM1A_CONTROL,
+ PM1AControl);
+ (void) AcpiHwRegisterWrite (ACPI_REGISTER_PM1B_CONTROL,
+ PM1BControl);
}
}
@@ -693,16 +731,14 @@ AcpiLeaveSleepState (
/* Enable power button */
(void) AcpiSetRegister(
- AcpiGbl_FixedEventInfo[ACPI_EVENT_POWER_BUTTON].EnableRegisterId,
- 1, ACPI_MTX_DO_NOT_LOCK);
+ AcpiGbl_FixedEventInfo[ACPI_EVENT_POWER_BUTTON].EnableRegisterId, 1);
(void) AcpiSetRegister(
- AcpiGbl_FixedEventInfo[ACPI_EVENT_POWER_BUTTON].StatusRegisterId,
- 1, ACPI_MTX_DO_NOT_LOCK);
+ AcpiGbl_FixedEventInfo[ACPI_EVENT_POWER_BUTTON].StatusRegisterId, 1);
/* Enable BM arbitration */
- Status = AcpiSetRegister (ACPI_BITREG_ARB_DISABLE, 0, ACPI_MTX_LOCK);
+ Status = AcpiSetRegister (ACPI_BITREG_ARB_DISABLE, 0);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
diff --git a/usr/src/uts/intel/io/acpica/hardware/hwtimer.c b/usr/src/uts/intel/io/acpica/hardware/hwtimer.c
index 827a828b8c..41b1e9bcfc 100644
--- a/usr/src/uts/intel/io/acpica/hardware/hwtimer.c
+++ b/usr/src/uts/intel/io/acpica/hardware/hwtimer.c
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Name: hwtimer.c - ACPI Power Management Timer Interface
- * $Revision: 1.35 $
+ * $Revision: 1.38 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -145,7 +145,7 @@ AcpiGetTimerResolution (
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
- if (AcpiGbl_FADT->TmrValExt == 0)
+ if ((AcpiGbl_FADT.Flags & ACPI_FADT_32BIT_TIMER) == 0)
{
*Resolution = 24;
}
@@ -187,7 +187,7 @@ AcpiGetTimer (
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
- Status = AcpiHwLowLevelRead (32, Ticks, &AcpiGbl_FADT->XPmTmrBlk);
+ Status = AcpiHwLowLevelRead (32, Ticks, &AcpiGbl_FADT.XPmTimerBlock);
return_ACPI_STATUS (Status);
}
@@ -253,7 +253,7 @@ AcpiGetTimerDuration (
}
else if (StartTicks > EndTicks)
{
- if (AcpiGbl_FADT->TmrValExt == 0)
+ if ((AcpiGbl_FADT.Flags & ACPI_FADT_32BIT_TIMER) == 0)
{
/* 24-bit Timer */
diff --git a/usr/src/uts/intel/io/acpica/interpreter/parser/psloop.c b/usr/src/uts/intel/io/acpica/interpreter/parser/psloop.c
deleted file mode 100644
index d3ef539bd1..0000000000
--- a/usr/src/uts/intel/io/acpica/interpreter/parser/psloop.c
+++ /dev/null
@@ -1,944 +0,0 @@
-/******************************************************************************
- *
- * Module Name: psloop - Main AML parse loop
- * $Revision: 1.11 $
- *
- *****************************************************************************/
-
-/******************************************************************************
- *
- * 1. Copyright Notice
- *
- * Some or all of this work - Copyright (c) 1999 - 2006, 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.
- *
- *****************************************************************************/
-
-
-/*
- * Parse the AML and build an operation tree as most interpreters,
- * like Perl, do. Parsing is done by hand rather than with a YACC
- * generated parser to tightly constrain stack and dynamic memory
- * usage. At the same time, parsing is kept flexible and the code
- * fairly compact by parsing based on a list of AML opcode
- * templates in AmlOpInfo[]
- */
-
-#include "acpi.h"
-#include "acparser.h"
-#include "acdispat.h"
-#include "amlcode.h"
-
-#define _COMPONENT ACPI_PARSER
- ACPI_MODULE_NAME ("psloop")
-
-static UINT32 AcpiGbl_Depth = 0;
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiPsParseLoop
- *
- * PARAMETERS: WalkState - Current state
- *
- * RETURN: Status
- *
- * DESCRIPTION: Parse AML (pointed to by the current parser state) and return
- * a tree of ops.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiPsParseLoop (
- ACPI_WALK_STATE *WalkState)
-{
- ACPI_STATUS Status = AE_OK;
- ACPI_STATUS Status2;
- ACPI_PARSE_OBJECT *Op = NULL; /* current op */
- ACPI_PARSE_OBJECT *Arg = NULL;
- ACPI_PARSE_OBJECT *PreOp = NULL;
- ACPI_PARSE_STATE *ParserState;
- UINT8 *AmlOpStart = NULL;
-
-
- ACPI_FUNCTION_TRACE_PTR (PsParseLoop, WalkState);
-
- if (WalkState->DescendingCallback == NULL)
- {
- return_ACPI_STATUS (AE_BAD_PARAMETER);
- }
-
- ParserState = &WalkState->ParserState;
- WalkState->ArgTypes = 0;
-
-#if (!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY))
-
- if (WalkState->WalkType & ACPI_WALK_METHOD_RESTART)
- {
- /* We are restarting a preempted control method */
-
- if (AcpiPsHasCompletedScope (ParserState))
- {
- /*
- * We must check if a predicate to an IF or WHILE statement
- * was just completed
- */
- if ((ParserState->Scope->ParseScope.Op) &&
- ((ParserState->Scope->ParseScope.Op->Common.AmlOpcode == AML_IF_OP) ||
- (ParserState->Scope->ParseScope.Op->Common.AmlOpcode == AML_WHILE_OP)) &&
- (WalkState->ControlState) &&
- (WalkState->ControlState->Common.State ==
- ACPI_CONTROL_PREDICATE_EXECUTING))
- {
- /*
- * A predicate was just completed, get the value of the
- * predicate and branch based on that value
- */
- WalkState->Op = NULL;
- Status = AcpiDsGetPredicateValue (WalkState, ACPI_TO_POINTER (TRUE));
- if (ACPI_FAILURE (Status) &&
- ((Status & AE_CODE_MASK) != AE_CODE_CONTROL))
- {
- if (Status == AE_AML_NO_RETURN_VALUE)
- {
- ACPI_EXCEPTION ((AE_INFO, Status,
- "Invoked method did not return a value"));
-
- }
- ACPI_EXCEPTION ((AE_INFO, Status,
- "GetPredicate Failed"));
- return_ACPI_STATUS (Status);
- }
-
- Status = AcpiPsNextParseState (WalkState, Op, Status);
- }
-
- AcpiPsPopScope (ParserState, &Op,
- &WalkState->ArgTypes, &WalkState->ArgCount);
- ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Popped scope, Op=%p\n", Op));
- }
- else if (WalkState->PrevOp)
- {
- /* We were in the middle of an op */
-
- Op = WalkState->PrevOp;
- WalkState->ArgTypes = WalkState->PrevArgTypes;
- }
- }
-#endif
-
- /* Iterative parsing loop, while there is more AML to process: */
-
- while ((ParserState->Aml < ParserState->AmlEnd) || (Op))
- {
- AmlOpStart = ParserState->Aml;
- if (!Op)
- {
- /* Get the next opcode from the AML stream */
-
- WalkState->AmlOffset = (UINT32) ACPI_PTR_DIFF (ParserState->Aml,
- ParserState->AmlStart);
- WalkState->Opcode = AcpiPsPeekOpcode (ParserState);
-
- /*
- * First cut to determine what we have found:
- * 1) A valid AML opcode
- * 2) A name string
- * 3) An unknown/invalid opcode
- */
- WalkState->OpInfo = AcpiPsGetOpcodeInfo (WalkState->Opcode);
- switch (WalkState->OpInfo->Class)
- {
- case AML_CLASS_ASCII:
- case AML_CLASS_PREFIX:
- /*
- * Starts with a valid prefix or ASCII char, this is a name
- * string. Convert the bare name string to a namepath.
- */
- WalkState->Opcode = AML_INT_NAMEPATH_OP;
- WalkState->ArgTypes = ARGP_NAMESTRING;
- break;
-
- case AML_CLASS_UNKNOWN:
-
- /* The opcode is unrecognized. Just skip unknown opcodes */
-
- ACPI_ERROR ((AE_INFO,
- "Found unknown opcode %X at AML address %p offset %X, ignoring",
- WalkState->Opcode, ParserState->Aml, WalkState->AmlOffset));
-
- ACPI_DUMP_BUFFER (ParserState->Aml, 128);
-
- /* Assume one-byte bad opcode */
-
- ParserState->Aml++;
- continue;
-
- default:
-
- /* Found opcode info, this is a normal opcode */
-
- ParserState->Aml += AcpiPsGetOpcodeSize (WalkState->Opcode);
- WalkState->ArgTypes = WalkState->OpInfo->ParseArgs;
- break;
- }
-
- /* Create Op structure and append to parent's argument list */
-
- if (WalkState->OpInfo->Flags & AML_NAMED)
- {
- /* Allocate a new PreOp if necessary */
-
- if (!PreOp)
- {
- PreOp = AcpiPsAllocOp (WalkState->Opcode);
- if (!PreOp)
- {
- Status = AE_NO_MEMORY;
- goto CloseThisOp;
- }
- }
-
- PreOp->Common.Value.Arg = NULL;
- PreOp->Common.AmlOpcode = WalkState->Opcode;
-
- /*
- * Get and append arguments until we find the node that contains
- * the name (the type ARGP_NAME).
- */
- while (GET_CURRENT_ARG_TYPE (WalkState->ArgTypes) &&
- (GET_CURRENT_ARG_TYPE (WalkState->ArgTypes) != ARGP_NAME))
- {
- Status = AcpiPsGetNextArg (WalkState, ParserState,
- GET_CURRENT_ARG_TYPE (WalkState->ArgTypes), &Arg);
- if (ACPI_FAILURE (Status))
- {
- goto CloseThisOp;
- }
-
- AcpiPsAppendArg (PreOp, Arg);
- INCREMENT_ARG_LIST (WalkState->ArgTypes);
- }
-
- /*
- * Make sure that we found a NAME and didn't run out of
- * arguments
- */
- if (!GET_CURRENT_ARG_TYPE (WalkState->ArgTypes))
- {
- Status = AE_AML_NO_OPERAND;
- goto CloseThisOp;
- }
-
- /* We know that this arg is a name, move to next arg */
-
- INCREMENT_ARG_LIST (WalkState->ArgTypes);
-
- /*
- * Find the object. This will either insert the object into
- * the namespace or simply look it up
- */
- WalkState->Op = NULL;
-
- Status = WalkState->DescendingCallback (WalkState, &Op);
- if (ACPI_FAILURE (Status))
- {
- ACPI_EXCEPTION ((AE_INFO, Status,
- "During name lookup/catalog"));
- goto CloseThisOp;
- }
-
- if (!Op)
- {
- continue;
- }
-
- Status = AcpiPsNextParseState (WalkState, Op, Status);
- if (Status == AE_CTRL_PENDING)
- {
- Status = AE_OK;
- goto CloseThisOp;
- }
-
- if (ACPI_FAILURE (Status))
- {
- goto CloseThisOp;
- }
-
- AcpiPsAppendArg (Op, PreOp->Common.Value.Arg);
- AcpiGbl_Depth++;
-
- if (Op->Common.AmlOpcode == AML_REGION_OP)
- {
- /*
- * Defer final parsing of an OperationRegion body,
- * because we don't have enough info in the first pass
- * to parse it correctly (i.e., there may be method
- * calls within the TermArg elements of the body.)
- *
- * However, we must continue parsing because
- * the opregion is not a standalone package --
- * we don't know where the end is at this point.
- *
- * (Length is unknown until parse of the body complete)
- */
- Op->Named.Data = AmlOpStart;
- Op->Named.Length = 0;
- }
- }
- else
- {
- /* Not a named opcode, just allocate Op and append to parent */
-
- WalkState->OpInfo = AcpiPsGetOpcodeInfo (WalkState->Opcode);
- Op = AcpiPsAllocOp (WalkState->Opcode);
- if (!Op)
- {
- Status = AE_NO_MEMORY;
- goto CloseThisOp;
- }
-
- if (WalkState->OpInfo->Flags & AML_CREATE)
- {
- /*
- * Backup to beginning of CreateXXXfield declaration
- * BodyLength is unknown until we parse the body
- */
- Op->Named.Data = AmlOpStart;
- Op->Named.Length = 0;
- }
-
- AcpiPsAppendArg (AcpiPsGetParentScope (ParserState), Op);
-
- if ((WalkState->DescendingCallback != NULL))
- {
- /*
- * Find the object. This will either insert the object into
- * the namespace or simply look it up
- */
- WalkState->Op = Op;
-
- Status = WalkState->DescendingCallback (WalkState, &Op);
- Status = AcpiPsNextParseState (WalkState, Op, Status);
- if (Status == AE_CTRL_PENDING)
- {
- Status = AE_OK;
- goto CloseThisOp;
- }
-
- if (ACPI_FAILURE (Status))
- {
- goto CloseThisOp;
- }
- }
- }
-
- Op->Common.AmlOffset = WalkState->AmlOffset;
-
- if (WalkState->OpInfo)
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
- "Opcode %4.4X [%s] Op %p Aml %p AmlOffset %5.5X\n",
- (UINT32) Op->Common.AmlOpcode, WalkState->OpInfo->Name,
- Op, ParserState->Aml, Op->Common.AmlOffset));
- }
- }
-
-
- /*
- * Start ArgCount at zero because we don't know if there are
- * any args yet
- */
- WalkState->ArgCount = 0;
-
- /* Are there any arguments that must be processed? */
-
- if (WalkState->ArgTypes)
- {
- /* Get arguments */
-
- switch (Op->Common.AmlOpcode)
- {
- case AML_BYTE_OP: /* AML_BYTEDATA_ARG */
- case AML_WORD_OP: /* AML_WORDDATA_ARG */
- case AML_DWORD_OP: /* AML_DWORDATA_ARG */
- case AML_QWORD_OP: /* AML_QWORDATA_ARG */
- case AML_STRING_OP: /* AML_ASCIICHARLIST_ARG */
-
- /* Fill in constant or string argument directly */
-
- AcpiPsGetNextSimpleArg (ParserState,
- GET_CURRENT_ARG_TYPE (WalkState->ArgTypes), Op);
- break;
-
- case AML_INT_NAMEPATH_OP: /* AML_NAMESTRING_ARG */
-
- Status = AcpiPsGetNextNamepath (WalkState, ParserState, Op, 1);
- if (ACPI_FAILURE (Status))
- {
- goto CloseThisOp;
- }
-
- WalkState->ArgTypes = 0;
- break;
-
- default:
- /*
- * Op is not a constant or string, append each argument
- * to the Op
- */
- while (GET_CURRENT_ARG_TYPE (WalkState->ArgTypes) &&
- !WalkState->ArgCount)
- {
- WalkState->AmlOffset = (UINT32)
- ACPI_PTR_DIFF (ParserState->Aml, ParserState->AmlStart);
-
- Status = AcpiPsGetNextArg (WalkState, ParserState,
- GET_CURRENT_ARG_TYPE (WalkState->ArgTypes),
- &Arg);
- if (ACPI_FAILURE (Status))
- {
- goto CloseThisOp;
- }
-
- if (Arg)
- {
- Arg->Common.AmlOffset = WalkState->AmlOffset;
- AcpiPsAppendArg (Op, Arg);
- }
- INCREMENT_ARG_LIST (WalkState->ArgTypes);
- }
-
-
- /* Special processing for certain opcodes */
-
- /* TBD (remove): Temporary mechanism to disable this code if needed */
-
-#ifdef ACPI_ENABLE_MODULE_LEVEL_CODE
-
- if ((WalkState->PassNumber <= ACPI_IMODE_LOAD_PASS1) &&
- ((WalkState->ParseFlags & ACPI_PARSE_DISASSEMBLE) == 0))
- {
- /*
- * We want to skip If/Else/While constructs during Pass1
- * because we want to actually conditionally execute the
- * code during Pass2.
- *
- * Except for disassembly, where we always want to
- * walk the If/Else/While packages
- */
- switch (Op->Common.AmlOpcode)
- {
- case AML_IF_OP:
- case AML_ELSE_OP:
- case AML_WHILE_OP:
-
- ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
- "Pass1: Skipping an If/Else/While body\n"));
-
- /* Skip body of if/else/while in pass 1 */
-
- ParserState->Aml = ParserState->PkgEnd;
- WalkState->ArgCount = 0;
- break;
-
- default:
- break;
- }
- }
-#endif
- switch (Op->Common.AmlOpcode)
- {
- case AML_METHOD_OP:
-
- /*
- * Skip parsing of control method
- * because we don't have enough info in the first pass
- * to parse it correctly.
- *
- * Save the length and address of the body
- */
- Op->Named.Data = ParserState->Aml;
- Op->Named.Length = (UINT32) (ParserState->PkgEnd -
- ParserState->Aml);
-
- /* Skip body of method */
-
- ParserState->Aml = ParserState->PkgEnd;
- WalkState->ArgCount = 0;
- break;
-
- case AML_BUFFER_OP:
- case AML_PACKAGE_OP:
- case AML_VAR_PACKAGE_OP:
-
- if ((Op->Common.Parent) &&
- (Op->Common.Parent->Common.AmlOpcode == AML_NAME_OP) &&
- (WalkState->PassNumber <= ACPI_IMODE_LOAD_PASS2))
- {
- /*
- * Skip parsing of Buffers and Packages
- * because we don't have enough info in the first pass
- * to parse them correctly.
- */
- Op->Named.Data = AmlOpStart;
- Op->Named.Length = (UINT32) (ParserState->PkgEnd -
- AmlOpStart);
-
- /* Skip body */
-
- ParserState->Aml = ParserState->PkgEnd;
- WalkState->ArgCount = 0;
- }
- break;
-
- case AML_WHILE_OP:
-
- if (WalkState->ControlState)
- {
- WalkState->ControlState->Control.PackageEnd =
- ParserState->PkgEnd;
- }
- break;
-
- default:
-
- /* No action for all other opcodes */
- break;
- }
- break;
- }
- }
-
- /* Check for arguments that need to be processed */
-
- if (WalkState->ArgCount)
- {
- /*
- * There are arguments (complex ones), push Op and
- * prepare for argument
- */
- Status = AcpiPsPushScope (ParserState, Op,
- WalkState->ArgTypes, WalkState->ArgCount);
- if (ACPI_FAILURE (Status))
- {
- goto CloseThisOp;
- }
- Op = NULL;
- continue;
- }
-
- /*
- * All arguments have been processed -- Op is complete,
- * prepare for next
- */
- WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
- if (WalkState->OpInfo->Flags & AML_NAMED)
- {
- if (AcpiGbl_Depth)
- {
- AcpiGbl_Depth--;
- }
-
- if (Op->Common.AmlOpcode == AML_REGION_OP)
- {
- /*
- * Skip parsing of control method or opregion body,
- * because we don't have enough info in the first pass
- * to parse them correctly.
- *
- * Completed parsing an OpRegion declaration, we now
- * know the length.
- */
- Op->Named.Length = (UINT32) (ParserState->Aml - Op->Named.Data);
- }
- }
-
- if (WalkState->OpInfo->Flags & AML_CREATE)
- {
- /*
- * Backup to beginning of CreateXXXfield declaration (1 for
- * Opcode)
- *
- * BodyLength is unknown until we parse the body
- */
- Op->Named.Length = (UINT32) (ParserState->Aml - Op->Named.Data);
- }
-
- /* This op complete, notify the dispatcher */
-
- if (WalkState->AscendingCallback != NULL)
- {
- WalkState->Op = Op;
- WalkState->Opcode = Op->Common.AmlOpcode;
-
- Status = WalkState->AscendingCallback (WalkState);
- Status = AcpiPsNextParseState (WalkState, Op, Status);
- if (Status == AE_CTRL_PENDING)
- {
- Status = AE_OK;
- goto CloseThisOp;
- }
- }
-
-
-CloseThisOp:
- /*
- * Finished one argument of the containing scope
- */
- ParserState->Scope->ParseScope.ArgCount--;
-
- /* Finished with PreOp */
-
- if (PreOp)
- {
- AcpiPsFreeOp (PreOp);
- PreOp = NULL;
- }
-
- /* Close this Op (will result in parse subtree deletion) */
-
- Status2 = AcpiPsCompleteThisOp (WalkState, Op);
- if (ACPI_FAILURE (Status2))
- {
- return_ACPI_STATUS (Status2);
- }
- Op = NULL;
-
- switch (Status)
- {
- case AE_OK:
- break;
-
-
- case AE_CTRL_TRANSFER:
-
- /* We are about to transfer to a called method. */
-
- WalkState->PrevOp = Op;
- WalkState->PrevArgTypes = WalkState->ArgTypes;
- return_ACPI_STATUS (Status);
-
-
- case AE_CTRL_END:
-
- AcpiPsPopScope (ParserState, &Op,
- &WalkState->ArgTypes, &WalkState->ArgCount);
-
- if (Op)
- {
- WalkState->Op = Op;
- WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
- WalkState->Opcode = Op->Common.AmlOpcode;
-
- Status = WalkState->AscendingCallback (WalkState);
- Status = AcpiPsNextParseState (WalkState, Op, Status);
-
- Status2 = AcpiPsCompleteThisOp (WalkState, Op);
- if (ACPI_FAILURE (Status2))
- {
- return_ACPI_STATUS (Status2);
- }
- Op = NULL;
- }
- Status = AE_OK;
- break;
-
-
- case AE_CTRL_BREAK:
- case AE_CTRL_CONTINUE:
-
- /* Pop off scopes until we find the While */
-
- while (!Op || (Op->Common.AmlOpcode != AML_WHILE_OP))
- {
- AcpiPsPopScope (ParserState, &Op,
- &WalkState->ArgTypes, &WalkState->ArgCount);
-
- if (Op->Common.AmlOpcode != AML_WHILE_OP)
- {
- Status2 = AcpiDsResultStackPop (WalkState);
- if (ACPI_FAILURE (Status2))
- {
- return_ACPI_STATUS (Status2);
- }
- }
- }
-
- /* Close this iteration of the While loop */
-
- WalkState->Op = Op;
- WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
- WalkState->Opcode = Op->Common.AmlOpcode;
-
- Status = WalkState->AscendingCallback (WalkState);
- Status = AcpiPsNextParseState (WalkState, Op, Status);
-
- Status2 = AcpiPsCompleteThisOp (WalkState, Op);
- if (ACPI_FAILURE (Status2))
- {
- return_ACPI_STATUS (Status2);
- }
- Op = NULL;
-
- Status = AE_OK;
- break;
-
-
- case AE_CTRL_TERMINATE:
-
- Status = AE_OK;
-
- /* Clean up */
- do
- {
- if (Op)
- {
- Status2 = AcpiPsCompleteThisOp (WalkState, Op);
- if (ACPI_FAILURE (Status2))
- {
- return_ACPI_STATUS (Status2);
- }
-
- Status2 = AcpiDsResultStackPop (WalkState);
- if (ACPI_FAILURE (Status2))
- {
- return_ACPI_STATUS (Status2);
- }
-
- AcpiUtDeleteGenericState (
- AcpiUtPopGenericState (&WalkState->ControlState));
- }
-
- AcpiPsPopScope (ParserState, &Op,
- &WalkState->ArgTypes, &WalkState->ArgCount);
-
- } while (Op);
-
- return_ACPI_STATUS (Status);
-
-
- default: /* All other non-AE_OK status */
-
- do
- {
- if (Op)
- {
- Status2 = AcpiPsCompleteThisOp (WalkState, Op);
- if (ACPI_FAILURE (Status2))
- {
- return_ACPI_STATUS (Status2);
- }
- }
-
- AcpiPsPopScope (ParserState, &Op,
- &WalkState->ArgTypes, &WalkState->ArgCount);
-
- } while (Op);
-
-
- /*
- * TBD: Cleanup parse ops on error
- */
-#if 0
- if (Op == NULL)
- {
- AcpiPsPopScope (ParserState, &Op,
- &WalkState->ArgTypes, &WalkState->ArgCount);
- }
-#endif
- WalkState->PrevOp = Op;
- WalkState->PrevArgTypes = WalkState->ArgTypes;
- return_ACPI_STATUS (Status);
- }
-
- /* This scope complete? */
-
- if (AcpiPsHasCompletedScope (ParserState))
- {
- AcpiPsPopScope (ParserState, &Op,
- &WalkState->ArgTypes, &WalkState->ArgCount);
- ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Popped scope, Op=%p\n", Op));
- }
- else
- {
- Op = NULL;
- }
-
- } /* while ParserState->Aml */
-
-
- /*
- * Complete the last Op (if not completed), and clear the scope stack.
- * It is easily possible to end an AML "package" with an unbounded number
- * of open scopes (such as when several ASL blocks are closed with
- * sequential closing braces). We want to terminate each one cleanly.
- */
- ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "AML package complete at Op %p\n", Op));
- do
- {
- if (Op)
- {
- if (WalkState->AscendingCallback != NULL)
- {
- WalkState->Op = Op;
- WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
- WalkState->Opcode = Op->Common.AmlOpcode;
-
- Status = WalkState->AscendingCallback (WalkState);
- Status = AcpiPsNextParseState (WalkState, Op, Status);
- if (Status == AE_CTRL_PENDING)
- {
- Status = AE_OK;
- goto CloseThisOp;
- }
-
- if (Status == AE_CTRL_TERMINATE)
- {
- Status = AE_OK;
-
- /* Clean up */
- do
- {
- if (Op)
- {
- Status2 = AcpiPsCompleteThisOp (WalkState, Op);
- if (ACPI_FAILURE (Status2))
- {
- return_ACPI_STATUS (Status2);
- }
- }
-
- AcpiPsPopScope (ParserState, &Op,
- &WalkState->ArgTypes, &WalkState->ArgCount);
-
- } while (Op);
-
- return_ACPI_STATUS (Status);
- }
-
- else if (ACPI_FAILURE (Status))
- {
- /* First error is most important */
-
- (void) AcpiPsCompleteThisOp (WalkState, Op);
- return_ACPI_STATUS (Status);
- }
- }
-
- Status2 = AcpiPsCompleteThisOp (WalkState, Op);
- if (ACPI_FAILURE (Status2))
- {
- return_ACPI_STATUS (Status2);
- }
- }
-
- AcpiPsPopScope (ParserState, &Op, &WalkState->ArgTypes,
- &WalkState->ArgCount);
-
- } while (Op);
-
- return_ACPI_STATUS (Status);
-}
-
-
diff --git a/usr/src/uts/intel/io/acpica/namespace/nsaccess.c b/usr/src/uts/intel/io/acpica/namespace/nsaccess.c
index 9452903499..810819d145 100644
--- a/usr/src/uts/intel/io/acpica/namespace/nsaccess.c
+++ b/usr/src/uts/intel/io/acpica/namespace/nsaccess.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nsaccess - Top-level functions for accessing ACPI namespace
- * $Revision: 1.203 $
+ * $Revision: 1.209 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -294,12 +294,12 @@ AcpiNsRootInitialize (
if (ACPI_STRCMP (InitVal->Name, "_GL_") == 0)
{
- AcpiGbl_GlobalLockMutex = ObjDesc->Mutex.OsMutex;
+ AcpiGbl_GlobalLockMutex = ObjDesc;
/* Create additional counting semaphore for global lock */
Status = AcpiOsCreateSemaphore (
- 1, 1, &AcpiGbl_GlobalLockSemaphore);
+ 1, 0, &AcpiGbl_GlobalLockSemaphore);
if (ACPI_FAILURE (Status))
{
AcpiUtRemoveReference (ObjDesc);
@@ -679,44 +679,67 @@ AcpiNsLookup (
return_ACPI_STATUS (Status);
}
- /*
- * Sanity typecheck of the target object:
- *
- * If 1) This is the last segment (NumSegments == 0)
- * 2) And we are looking for a specific type
- * (Not checking for TYPE_ANY)
- * 3) Which is not an alias
- * 4) Which is not a local type (TYPE_SCOPE)
- * 5) And the type of target object is known (not TYPE_ANY)
- * 6) And target object does not match what we are looking for
- *
- * Then we have a type mismatch. Just warn and ignore it.
- */
- if ((NumSegments == 0) &&
- (TypeToCheckFor != ACPI_TYPE_ANY) &&
- (TypeToCheckFor != ACPI_TYPE_LOCAL_ALIAS) &&
- (TypeToCheckFor != ACPI_TYPE_LOCAL_METHOD_ALIAS) &&
- (TypeToCheckFor != ACPI_TYPE_LOCAL_SCOPE) &&
- (ThisNode->Type != ACPI_TYPE_ANY) &&
- (ThisNode->Type != TypeToCheckFor))
- {
- /* Complain about a type mismatch */
+ /* More segments to follow? */
- ACPI_WARNING ((AE_INFO,
- "NsLookup: Type mismatch on %4.4s (%s), searching for (%s)",
- ACPI_CAST_PTR (char, &SimpleName),
- AcpiUtGetTypeName (ThisNode->Type),
- AcpiUtGetTypeName (TypeToCheckFor)));
+ if (NumSegments > 0)
+ {
+ /*
+ * If we have an alias to an object that opens a scope (such as a
+ * device or processor), we need to dereference the alias here so that
+ * we can access any children of the original node (via the remaining
+ * segments).
+ */
+ if (ThisNode->Type == ACPI_TYPE_LOCAL_ALIAS)
+ {
+ if (AcpiNsOpensScope (((ACPI_NAMESPACE_NODE *) ThisNode->Object)->Type))
+ {
+ ThisNode = (ACPI_NAMESPACE_NODE *) ThisNode->Object;
+ }
+ }
}
- /*
- * If this is the last name segment and we are not looking for a
- * specific type, but the type of found object is known, use that type
- * to see if it opens a scope.
- */
- if ((NumSegments == 0) && (Type == ACPI_TYPE_ANY))
+ /* Special handling for the last segment (NumSegments == 0) */
+
+ else
{
- Type = ThisNode->Type;
+ /*
+ * Sanity typecheck of the target object:
+ *
+ * If 1) This is the last segment (NumSegments == 0)
+ * 2) And we are looking for a specific type
+ * (Not checking for TYPE_ANY)
+ * 3) Which is not an alias
+ * 4) Which is not a local type (TYPE_SCOPE)
+ * 5) And the type of target object is known (not TYPE_ANY)
+ * 6) And target object does not match what we are looking for
+ *
+ * Then we have a type mismatch. Just warn and ignore it.
+ */
+ if ((TypeToCheckFor != ACPI_TYPE_ANY) &&
+ (TypeToCheckFor != ACPI_TYPE_LOCAL_ALIAS) &&
+ (TypeToCheckFor != ACPI_TYPE_LOCAL_METHOD_ALIAS) &&
+ (TypeToCheckFor != ACPI_TYPE_LOCAL_SCOPE) &&
+ (ThisNode->Type != ACPI_TYPE_ANY) &&
+ (ThisNode->Type != TypeToCheckFor))
+ {
+ /* Complain about a type mismatch */
+
+ ACPI_WARNING ((AE_INFO,
+ "NsLookup: Type mismatch on %4.4s (%s), searching for (%s)",
+ ACPI_CAST_PTR (char, &SimpleName),
+ AcpiUtGetTypeName (ThisNode->Type),
+ AcpiUtGetTypeName (TypeToCheckFor)));
+ }
+
+ /*
+ * If this is the last name segment and we are not looking for a
+ * specific type, but the type of found object is known, use that type
+ * to (later) see if it opens a scope.
+ */
+ if (Type == ACPI_TYPE_ANY)
+ {
+ Type = ThisNode->Type;
+ }
}
/* Point to next name segment and make this node current */
diff --git a/usr/src/uts/intel/io/acpica/namespace/nsalloc.c b/usr/src/uts/intel/io/acpica/namespace/nsalloc.c
index 322e0b8117..4fef3c1426 100644
--- a/usr/src/uts/intel/io/acpica/namespace/nsalloc.c
+++ b/usr/src/uts/intel/io/acpica/namespace/nsalloc.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nsalloc - Namespace allocation and deletion utilities
- * $Revision: 1.106 $
+ * $Revision: 1.109 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -142,6 +142,9 @@ AcpiNsCreateNode (
UINT32 Name)
{
ACPI_NAMESPACE_NODE *Node;
+#ifdef ACPI_DBG_TRACK_ALLOCATIONS
+ UINT32 Temp;
+#endif
ACPI_FUNCTION_TRACE (NsCreateNode);
@@ -155,6 +158,14 @@ AcpiNsCreateNode (
ACPI_MEM_TRACKING (AcpiGbl_NsNodeList->TotalAllocated++);
+#ifdef ACPI_DBG_TRACK_ALLOCATIONS
+ Temp = AcpiGbl_NsNodeList->TotalAllocated - AcpiGbl_NsNodeList->TotalFreed;
+ if (Temp > AcpiGbl_NsNodeList->MaxOccupied)
+ {
+ AcpiGbl_NsNodeList->MaxOccupied = Temp;
+ }
+#endif
+
Node->Name.Integer = Name;
ACPI_SET_DESCRIPTOR_TYPE (Node, ACPI_DESC_TYPE_NAMED);
return_PTR (Node);
diff --git a/usr/src/uts/intel/io/acpica/namespace/nsdump.c b/usr/src/uts/intel/io/acpica/namespace/nsdump.c
index 5621745320..8c8f22d7a6 100644
--- a/usr/src/uts/intel/io/acpica/namespace/nsdump.c
+++ b/usr/src/uts/intel/io/acpica/namespace/nsdump.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsdump - table dumping routines for debug
- * $Revision: 1.178 $
+ * $Revision: 1.185 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -119,7 +119,6 @@
#include "acpi.h"
#include "acnamesp.h"
-#include "acparser.h"
#define _COMPONENT ACPI_NAMESPACE
@@ -160,7 +159,7 @@ AcpiNsPrintPathname (
UINT32 NumSegments,
char *Pathname)
{
- ACPI_NATIVE_UINT i;
+ UINT32 i;
ACPI_FUNCTION_NAME (NsPrintPathname);
@@ -311,14 +310,6 @@ AcpiNsDumpOneObject (
ACPI_WARNING ((AE_INFO, "Invalid ACPI Object Type %08X", Type));
}
- if (!AcpiUtValidAcpiName (ThisNode->Name.Integer))
- {
- ThisNode->Name.Integer = AcpiUtRepairName (ThisNode->Name.Integer);
-
- ACPI_WARNING ((AE_INFO, "Invalid ACPI Name %08X",
- ThisNode->Name.Integer));
- }
-
AcpiOsPrintf ("%4.4s", AcpiUtGetNodeName (ThisNode));
}
@@ -333,6 +324,13 @@ AcpiNsDumpOneObject (
ObjDesc = AcpiNsGetAttachedObject (ThisNode);
AcpiDbgLevel = DbgLevel;
+ /* Temp nodes are those nodes created by a control method */
+
+ if (ThisNode->Flags & ANOBJ_TEMPORARY)
+ {
+ AcpiOsPrintf ("(T) ");
+ }
+
switch (Info->DisplayType & ACPI_DISPLAY_MASK)
{
case ACPI_DISPLAY_SUMMARY:
@@ -351,7 +349,7 @@ AcpiNsDumpOneObject (
AcpiOsPrintf ("ID %X Len %.4X Addr %p\n",
ObjDesc->Processor.ProcId, ObjDesc->Processor.Length,
- (char *) ObjDesc->Processor.Address);
+ ACPI_CAST_PTR (void, ObjDesc->Processor.Address));
break;
@@ -431,7 +429,7 @@ AcpiNsDumpOneObject (
if (ObjDesc->Region.Flags & AOPOBJ_DATA_VALID)
{
AcpiOsPrintf (" Addr %8.8X%8.8X Len %.4X\n",
- ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
+ ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
ObjDesc->Region.Length);
}
else
@@ -443,8 +441,7 @@ AcpiNsDumpOneObject (
case ACPI_TYPE_LOCAL_REFERENCE:
- AcpiOsPrintf ("[%s]\n",
- AcpiPsGetOpcodeName (ObjDesc->Reference.Opcode));
+ AcpiOsPrintf ("[%s]\n", AcpiUtGetReferenceName (ObjDesc));
break;
@@ -610,13 +607,13 @@ AcpiNsDumpOneObject (
if (ObjType > ACPI_TYPE_LOCAL_MAX)
{
- AcpiOsPrintf ("(Ptr to ACPI Object type %X [UNKNOWN])\n",
+ AcpiOsPrintf ("(Pointer to ACPI Object type %.2X [UNKNOWN])\n",
ObjType);
BytesToDump = 32;
}
else
{
- AcpiOsPrintf ("(Ptr to ACPI Object type %X [%s])\n",
+ AcpiOsPrintf ("(Pointer to ACPI Object type %.2X [%s])\n",
ObjType, AcpiUtGetTypeName (ObjType));
BytesToDump = sizeof (ACPI_OPERAND_OBJECT);
}
@@ -728,8 +725,8 @@ AcpiNsDumpObjects (
Info.DisplayType = DisplayType;
(void) AcpiNsWalkNamespace (Type, StartHandle, MaxDepth,
- ACPI_NS_WALK_NO_UNLOCK, AcpiNsDumpOneObject,
- (void *) &Info, NULL);
+ ACPI_NS_WALK_NO_UNLOCK | ACPI_NS_WALK_TEMP_NODES,
+ AcpiNsDumpOneObject, (void *) &Info, NULL);
}
diff --git a/usr/src/uts/intel/io/acpica/namespace/nsdumpdv.c b/usr/src/uts/intel/io/acpica/namespace/nsdumpdv.c
index c74b4c386f..a5584cab95 100644
--- a/usr/src/uts/intel/io/acpica/namespace/nsdumpdv.c
+++ b/usr/src/uts/intel/io/acpica/namespace/nsdumpdv.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsdump - table dumping routines for debug
- * $Revision: 1.19 $
+ * $Revision: 1.21 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/io/acpica/namespace/nseval.c b/usr/src/uts/intel/io/acpica/namespace/nseval.c
index f9b7ead8d7..5490fad31b 100644
--- a/usr/src/uts/intel/io/acpica/namespace/nseval.c
+++ b/usr/src/uts/intel/io/acpica/namespace/nseval.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nseval - Object evaluation, includes control method execution
- * $Revision: 1.142 $
+ * $Revision: 1.145 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -221,6 +221,39 @@ AcpiNsEvaluate (
return_ACPI_STATUS (AE_NULL_OBJECT);
}
+ /* Calculate the number of arguments being passed to the method */
+
+ Info->ParamCount = 0;
+ if (Info->Parameters)
+ {
+ while (Info->Parameters[Info->ParamCount])
+ {
+ Info->ParamCount++;
+ }
+ }
+
+ /*
+ * Warning if too few or too many arguments have been passed by the
+ * caller. We don't want to abort here with an error because an
+ * incorrect number of arguments may not cause the method to fail.
+ * However, the method will fail if there are too few arguments passed
+ * and the method attempts to use one of the missing ones.
+ */
+ if (Info->ParamCount < Info->ObjDesc->Method.ParamCount)
+ {
+ ACPI_WARNING ((AE_INFO,
+ "Insufficient arguments - method [%4.4s] needs %d, found %d",
+ AcpiUtGetNodeName (Info->ResolvedNode),
+ Info->ObjDesc->Method.ParamCount, Info->ParamCount));
+ }
+ else if (Info->ParamCount > Info->ObjDesc->Method.ParamCount)
+ {
+ ACPI_WARNING ((AE_INFO,
+ "Excess arguments - method [%4.4s] needs %d, found %d",
+ AcpiUtGetNodeName (Info->ResolvedNode),
+ Info->ObjDesc->Method.ParamCount, Info->ParamCount));
+ }
+
ACPI_DUMP_PATHNAME (Info->ResolvedNode, "Execute Method:",
ACPI_LV_INFO, _COMPONENT);
@@ -237,12 +270,7 @@ AcpiNsEvaluate (
* Execute the method via the interpreter. The interpreter is locked
* here before calling into the AML parser
*/
- Status = AcpiExEnterInterpreter ();
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
+ AcpiExEnterInterpreter ();
Status = AcpiPsExecuteMethod (Info);
AcpiExExitInterpreter ();
}
@@ -250,7 +278,28 @@ AcpiNsEvaluate (
{
/*
* 2) Object is not a method, return its current value
+ *
+ * Disallow certain object types. For these, "evaluation" is undefined.
*/
+ switch (Info->ResolvedNode->Type)
+ {
+ case ACPI_TYPE_DEVICE:
+ case ACPI_TYPE_EVENT:
+ case ACPI_TYPE_MUTEX:
+ case ACPI_TYPE_REGION:
+ case ACPI_TYPE_THERMAL:
+ case ACPI_TYPE_LOCAL_SCOPE:
+
+ ACPI_ERROR ((AE_INFO,
+ "[%4.4s] Evaluation of object type [%s] is not supported",
+ Info->ResolvedNode->Name.Ascii,
+ AcpiUtGetTypeName (Info->ResolvedNode->Type)));
+
+ return_ACPI_STATUS (AE_TYPE);
+
+ default:
+ break;
+ }
/*
* Objects require additional resolution steps (e.g., the Node may be
@@ -268,11 +317,7 @@ AcpiNsEvaluate (
* resolution, we must lock it because we could access an opregion.
* The opregion access code assumes that the interpreter is locked.
*/
- Status = AcpiExEnterInterpreter ();
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
+ AcpiExEnterInterpreter ();
/* Function has a strange interface */
diff --git a/usr/src/uts/intel/io/acpica/namespace/nsinit.c b/usr/src/uts/intel/io/acpica/namespace/nsinit.c
index be13cb49be..e0116e0eb0 100644
--- a/usr/src/uts/intel/io/acpica/namespace/nsinit.c
+++ b/usr/src/uts/intel/io/acpica/namespace/nsinit.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsinit - namespace initialization
- * $Revision: 1.84 $
+ * $Revision: 1.88 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -314,7 +314,7 @@ AcpiNsInitOneObject (
void **ReturnValue)
{
ACPI_OBJECT_TYPE Type;
- ACPI_STATUS Status;
+ ACPI_STATUS Status = AE_OK;
ACPI_INIT_WALK_INFO *Info = (ACPI_INIT_WALK_INFO *) Context;
ACPI_NAMESPACE_NODE *Node = (ACPI_NAMESPACE_NODE *) ObjHandle;
ACPI_OPERAND_OBJECT *ObjDesc;
@@ -346,6 +346,10 @@ AcpiNsInitOneObject (
Info->FieldCount++;
break;
+ case ACPI_TYPE_LOCAL_BANK_FIELD:
+ Info->FieldCount++;
+ break;
+
case ACPI_TYPE_BUFFER:
Info->BufferCount++;
break;
@@ -371,11 +375,7 @@ AcpiNsInitOneObject (
/*
* Must lock the interpreter before executing AML code
*/
- Status = AcpiExEnterInterpreter ();
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
+ AcpiExEnterInterpreter ();
/*
* Each of these types can contain executable AML code within the
@@ -395,6 +395,12 @@ AcpiNsInitOneObject (
Status = AcpiDsGetBufferFieldArguments (ObjDesc);
break;
+ case ACPI_TYPE_LOCAL_BANK_FIELD:
+
+ Info->FieldInit++;
+ Status = AcpiDsGetBankFieldArguments (ObjDesc);
+ break;
+
case ACPI_TYPE_BUFFER:
Info->BufferInit++;
@@ -660,7 +666,6 @@ AcpiNsInitOneDevice (
Info->PrefixNode = DeviceNode;
Info->Pathname = METHOD_NAME__INI;
Info->Parameters = NULL;
- Info->ParameterType = ACPI_PARAM_ARGS;
Info->Flags = ACPI_IGNORE_RETURN_VALUE;
Status = AcpiNsEvaluate (Info);
diff --git a/usr/src/uts/intel/io/acpica/namespace/nsload.c b/usr/src/uts/intel/io/acpica/namespace/nsload.c
index 10a75070e5..8e11306105 100644
--- a/usr/src/uts/intel/io/acpica/namespace/nsload.c
+++ b/usr/src/uts/intel/io/acpica/namespace/nsload.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsload - namespace loading/expanding/contracting procedures
- * $Revision: 1.78 $
+ * $Revision: 1.83 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -119,6 +119,7 @@
#include "acpi.h"
#include "acnamesp.h"
#include "acdispat.h"
+#include "actables.h"
#define _COMPONENT ACPI_NAMESPACE
@@ -126,10 +127,6 @@
/* Local prototypes */
-static ACPI_STATUS
-AcpiNsLoadTableByType (
- ACPI_TABLE_TYPE TableType);
-
#ifdef ACPI_FUTURE_IMPLEMENTATION
ACPI_STATUS
AcpiNsUnloadNamespace (
@@ -146,7 +143,7 @@ AcpiNsDeleteSubtree (
*
* FUNCTION: AcpiNsLoadTable
*
- * PARAMETERS: TableDesc - Descriptor for table to be loaded
+ * PARAMETERS: TableIndex - Index for table to be loaded
* Node - Owning NS node
*
* RETURN: Status
@@ -157,7 +154,7 @@ AcpiNsDeleteSubtree (
ACPI_STATUS
AcpiNsLoadTable (
- ACPI_TABLE_DESC *TableDesc,
+ UINT32 TableIndex,
ACPI_NAMESPACE_NODE *Node)
{
ACPI_STATUS Status;
@@ -166,35 +163,6 @@ AcpiNsLoadTable (
ACPI_FUNCTION_TRACE (NsLoadTable);
- /* Check if table contains valid AML (must be DSDT, PSDT, SSDT, etc.) */
-
- if (!(AcpiGbl_TableData[TableDesc->Type].Flags & ACPI_TABLE_EXECUTABLE))
- {
- /* Just ignore this table */
-
- return_ACPI_STATUS (AE_OK);
- }
-
- /* Check validity of the AML start and length */
-
- if (!TableDesc->AmlStart)
- {
- ACPI_ERROR ((AE_INFO, "Null AML pointer"));
- return_ACPI_STATUS (AE_BAD_PARAMETER);
- }
-
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "AML block at %p\n",
- TableDesc->AmlStart));
-
- /* Ignore table if there is no AML contained within */
-
- if (!TableDesc->AmlLength)
- {
- ACPI_WARNING ((AE_INFO, "Zero-length AML block in table [%4.4s]",
- TableDesc->Pointer->Signature));
- return_ACPI_STATUS (AE_OK);
- }
-
/*
* Parse the table and load the namespace with all named
* objects found within. Control methods are NOT parsed
@@ -204,16 +172,40 @@ AcpiNsLoadTable (
* to another control method, we can't continue parsing
* because we don't know how many arguments to parse next!
*/
+ Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ /* If table already loaded into namespace, just return */
+
+ if (AcpiTbIsTableLoaded (TableIndex))
+ {
+ Status = AE_ALREADY_EXISTS;
+ goto Unlock;
+ }
+
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"**** Loading table into namespace ****\n"));
- Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
+ Status = AcpiTbAllocateOwnerId (TableIndex);
if (ACPI_FAILURE (Status))
{
- return_ACPI_STATUS (Status);
+ goto Unlock;
}
- Status = AcpiNsParseTable (TableDesc, Node->Child);
+ Status = AcpiNsParseTable (TableIndex, Node);
+ if (ACPI_SUCCESS (Status))
+ {
+ AcpiTbSetTableLoadedFlag (TableIndex, TRUE);
+ }
+ else
+ {
+ (void) AcpiTbReleaseOwnerId (TableIndex);
+ }
+
+Unlock:
(void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
if (ACPI_FAILURE (Status))
@@ -230,7 +222,7 @@ AcpiNsLoadTable (
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"**** Begin Table Method Parsing and Object Initialization ****\n"));
- Status = AcpiDsInitializeObjects (TableDesc, Node);
+ Status = AcpiDsInitializeObjects (TableIndex, Node);
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"**** Completed Table Method Parsing and Object Initialization ****\n"));
@@ -239,111 +231,7 @@ AcpiNsLoadTable (
}
-/*******************************************************************************
- *
- * FUNCTION: AcpiNsLoadTableByType
- *
- * PARAMETERS: TableType - Id of the table type to load
- *
- * RETURN: Status
- *
- * DESCRIPTION: Load an ACPI table or tables into the namespace. All tables
- * of the given type are loaded. The mechanism allows this
- * routine to be called repeatedly.
- *
- ******************************************************************************/
-
-static ACPI_STATUS
-AcpiNsLoadTableByType (
- ACPI_TABLE_TYPE TableType)
-{
- UINT32 i;
- ACPI_STATUS Status;
- ACPI_TABLE_DESC *TableDesc;
-
-
- ACPI_FUNCTION_TRACE (NsLoadTableByType);
-
-
- Status = AcpiUtAcquireMutex (ACPI_MTX_TABLES);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- /*
- * Table types supported are:
- * DSDT (one), SSDT/PSDT (multiple)
- */
- switch (TableType)
- {
- case ACPI_TABLE_ID_DSDT:
-
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Namespace load: DSDT\n"));
-
- TableDesc = AcpiGbl_TableLists[ACPI_TABLE_ID_DSDT].Next;
-
- /* If table already loaded into namespace, just return */
-
- if (TableDesc->LoadedIntoNamespace)
- {
- goto UnlockAndExit;
- }
-
- /* Now load the single DSDT */
-
- Status = AcpiNsLoadTable (TableDesc, AcpiGbl_RootNode);
- if (ACPI_SUCCESS (Status))
- {
- TableDesc->LoadedIntoNamespace = TRUE;
- }
- break;
-
-
- case ACPI_TABLE_ID_SSDT:
- case ACPI_TABLE_ID_PSDT:
-
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Namespace load: %d SSDT or PSDTs\n",
- AcpiGbl_TableLists[TableType].Count));
-
- /*
- * Traverse list of SSDT or PSDT tables
- */
- TableDesc = AcpiGbl_TableLists[TableType].Next;
- for (i = 0; i < AcpiGbl_TableLists[TableType].Count; i++)
- {
- /*
- * Only attempt to load table into namespace if it is not
- * already loaded!
- */
- if (!TableDesc->LoadedIntoNamespace)
- {
- Status = AcpiNsLoadTable (TableDesc, AcpiGbl_RootNode);
- if (ACPI_FAILURE (Status))
- {
- break;
- }
-
- TableDesc->LoadedIntoNamespace = TRUE;
- }
-
- TableDesc = TableDesc->Next;
- }
- break;
-
-
- default:
- Status = AE_SUPPORT;
- break;
- }
-
-
-UnlockAndExit:
- (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
- return_ACPI_STATUS (Status);
-}
-
-
+#ifdef ACPI_OBSOLETE_FUNCTIONS
/*******************************************************************************
*
* FUNCTION: AcpiLoadNamespace
@@ -396,7 +284,7 @@ AcpiNsLoadNamespace (
return_ACPI_STATUS (Status);
}
-
+#endif
#ifdef ACPI_FUTURE_IMPLEMENTATION
/*******************************************************************************
diff --git a/usr/src/uts/intel/io/acpica/namespace/nsnames.c b/usr/src/uts/intel/io/acpica/namespace/nsnames.c
index 236776c994..7fac9570a5 100644
--- a/usr/src/uts/intel/io/acpica/namespace/nsnames.c
+++ b/usr/src/uts/intel/io/acpica/namespace/nsnames.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nsnames - Name manipulation and search
- * $Revision: 1.97 $
+ * $Revision: 1.101 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -133,14 +133,15 @@
* Size - Size of the pathname
* *NameBuffer - Where to return the pathname
*
- * RETURN: Places the pathname into the NameBuffer, in external format
+ * RETURN: Status
+ * Places the pathname into the NameBuffer, in external format
* (name segments separated by path separators)
*
* DESCRIPTION: Generate a full pathaname
*
******************************************************************************/
-void
+ACPI_STATUS
AcpiNsBuildExternalPath (
ACPI_NAMESPACE_NODE *Node,
ACPI_SIZE Size,
@@ -160,7 +161,7 @@ AcpiNsBuildExternalPath (
{
NameBuffer[0] = AML_ROOT_PREFIX;
NameBuffer[1] = 0;
- return;
+ return (AE_OK);
}
/* Store terminator byte, then build name backwards */
@@ -190,11 +191,13 @@ AcpiNsBuildExternalPath (
if (Index != 0)
{
ACPI_ERROR ((AE_INFO,
- "Could not construct pathname; index=%X, size=%X, Path=%s",
+ "Could not construct external pathname; index=%X, size=%X, Path=%s",
(UINT32) Index, (UINT32) Size, &NameBuffer[Size]));
+
+ return (AE_BAD_PARAMETER);
}
- return;
+ return (AE_OK);
}
@@ -217,6 +220,7 @@ char *
AcpiNsGetExternalPathname (
ACPI_NAMESPACE_NODE *Node)
{
+ ACPI_STATUS Status;
char *NameBuffer;
ACPI_SIZE Size;
@@ -227,6 +231,10 @@ AcpiNsGetExternalPathname (
/* Calculate required buffer size based on depth below root */
Size = AcpiNsGetPathnameLength (Node);
+ if (!Size)
+ {
+ return_PTR (NULL);
+ }
/* Allocate a buffer to be returned to caller */
@@ -239,7 +247,13 @@ AcpiNsGetExternalPathname (
/* Build the path in the allocated buffer */
- AcpiNsBuildExternalPath (Node, Size, NameBuffer);
+ Status = AcpiNsBuildExternalPath (Node, Size, NameBuffer);
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_FREE (NameBuffer);
+ return_PTR (NULL);
+ }
+
return_PTR (NameBuffer);
}
#endif
@@ -277,6 +291,13 @@ AcpiNsGetPathnameLength (
while (NextNode && (NextNode != AcpiGbl_RootNode))
{
+ if (ACPI_GET_DESCRIPTOR_TYPE (NextNode) != ACPI_DESC_TYPE_NAMED)
+ {
+ ACPI_ERROR ((AE_INFO,
+ "Invalid Namespace Node (%p) while traversing namespace",
+ NextNode));
+ return 0;
+ }
Size += ACPI_PATH_SEGMENT_LENGTH;
NextNode = AcpiNsGetParentNode (NextNode);
}
@@ -326,6 +347,10 @@ AcpiNsHandleToPathname (
/* Determine size required for the caller buffer */
RequiredSize = AcpiNsGetPathnameLength (Node);
+ if (!RequiredSize)
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
/* Validate/Allocate/Clear caller buffer */
@@ -337,7 +362,11 @@ AcpiNsHandleToPathname (
/* Build the path in the caller buffer */
- AcpiNsBuildExternalPath (Node, RequiredSize, Buffer->Pointer);
+ Status = AcpiNsBuildExternalPath (Node, RequiredSize, Buffer->Pointer);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%s [%X]\n",
(char *) Buffer->Pointer, (UINT32) RequiredSize));
diff --git a/usr/src/uts/intel/io/acpica/namespace/nsobject.c b/usr/src/uts/intel/io/acpica/namespace/nsobject.c
index a59f0c0748..d86a4fa34d 100644
--- a/usr/src/uts/intel/io/acpica/namespace/nsobject.c
+++ b/usr/src/uts/intel/io/acpica/namespace/nsobject.c
@@ -2,7 +2,7 @@
*
* Module Name: nsobject - Utilities for objects attached to namespace
* table entries
- * $Revision: 1.97 $
+ * $Revision: 1.99 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/io/acpica/namespace/nsparse.c b/usr/src/uts/intel/io/acpica/namespace/nsparse.c
index c5a21928ab..2bd28decfa 100644
--- a/usr/src/uts/intel/io/acpica/namespace/nsparse.c
+++ b/usr/src/uts/intel/io/acpica/namespace/nsparse.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nsparse - namespace interface to AML parser
- * $Revision: 1.12 $
+ * $Revision: 1.19 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -120,6 +120,7 @@
#include "acnamesp.h"
#include "acparser.h"
#include "acdispat.h"
+#include "actables.h"
#define _COMPONENT ACPI_NAMESPACE
@@ -141,17 +142,28 @@
ACPI_STATUS
AcpiNsOneCompleteParse (
- UINT8 PassNumber,
- ACPI_TABLE_DESC *TableDesc)
+ UINT32 PassNumber,
+ UINT32 TableIndex,
+ ACPI_NAMESPACE_NODE *StartNode)
{
ACPI_PARSE_OBJECT *ParseRoot;
ACPI_STATUS Status;
+ UINT32 AmlLength;
+ UINT8 *AmlStart;
ACPI_WALK_STATE *WalkState;
+ ACPI_TABLE_HEADER *Table;
+ ACPI_OWNER_ID OwnerId;
ACPI_FUNCTION_TRACE (NsOneCompleteParse);
+ Status = AcpiTbGetOwnerId (TableIndex, &OwnerId);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
/* Create and init a Root Node */
ParseRoot = AcpiPsCreateScopeOp ();
@@ -162,28 +174,59 @@ AcpiNsOneCompleteParse (
/* Create and initialize a new walk state */
- WalkState = AcpiDsCreateWalkState (TableDesc->OwnerId,
- NULL, NULL, NULL);
+ WalkState = AcpiDsCreateWalkState (OwnerId, NULL, NULL, NULL);
if (!WalkState)
{
AcpiPsFreeOp (ParseRoot);
return_ACPI_STATUS (AE_NO_MEMORY);
}
- Status = AcpiDsInitAmlWalk (WalkState, ParseRoot, NULL,
- TableDesc->AmlStart, TableDesc->AmlLength,
- NULL, PassNumber);
+ Status = AcpiGetTableByIndex (TableIndex, &Table);
if (ACPI_FAILURE (Status))
{
AcpiDsDeleteWalkState (WalkState);
+ AcpiPsFreeOp (ParseRoot);
return_ACPI_STATUS (Status);
}
+ /* Table must consist of at least a complete header */
+
+ if (Table->Length < sizeof (ACPI_TABLE_HEADER))
+ {
+ Status = AE_BAD_HEADER;
+ }
+ else
+ {
+ AmlStart = (UINT8 *) Table + sizeof (ACPI_TABLE_HEADER);
+ AmlLength = Table->Length - sizeof (ACPI_TABLE_HEADER);
+ Status = AcpiDsInitAmlWalk (WalkState, ParseRoot, NULL,
+ AmlStart, AmlLength, NULL, (UINT8) PassNumber);
+ }
+
+ if (ACPI_FAILURE (Status))
+ {
+ AcpiDsDeleteWalkState (WalkState);
+ goto Cleanup;
+ }
+
+ /* StartNode is the default location to load the table */
+
+ if (StartNode && StartNode != AcpiGbl_RootNode)
+ {
+ Status = AcpiDsScopeStackPush (StartNode, ACPI_TYPE_METHOD, WalkState);
+ if (ACPI_FAILURE (Status))
+ {
+ AcpiDsDeleteWalkState (WalkState);
+ goto Cleanup;
+ }
+ }
+
/* Parse the AML */
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "*PARSE* pass %d parse\n", PassNumber));
Status = AcpiPsParseAml (WalkState);
+Cleanup:
AcpiPsDeleteParseTree (ParseRoot);
return_ACPI_STATUS (Status);
}
@@ -204,7 +247,7 @@ AcpiNsOneCompleteParse (
ACPI_STATUS
AcpiNsParseTable (
- ACPI_TABLE_DESC *TableDesc,
+ UINT32 TableIndex,
ACPI_NAMESPACE_NODE *StartNode)
{
ACPI_STATUS Status;
@@ -221,10 +264,10 @@ AcpiNsParseTable (
* each Parser Op subtree is deleted when it is finished. This saves
* a great deal of memory, and allows a small cache of parse objects
* to service the entire parse. The second pass of the parse then
- * performs another complete parse of the AML..
+ * performs another complete parse of the AML.
*/
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "**** Start pass 1\n"));
- Status = AcpiNsOneCompleteParse (1, TableDesc);
+ Status = AcpiNsOneCompleteParse (ACPI_IMODE_LOAD_PASS1, TableIndex, StartNode);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -240,7 +283,7 @@ AcpiNsParseTable (
* parse objects are all cached.
*/
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "**** Start pass 2\n"));
- Status = AcpiNsOneCompleteParse (2, TableDesc);
+ Status = AcpiNsOneCompleteParse (ACPI_IMODE_LOAD_PASS2, TableIndex, StartNode);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
diff --git a/usr/src/uts/intel/io/acpica/namespace/nssearch.c b/usr/src/uts/intel/io/acpica/namespace/nssearch.c
index 7ec8f1f048..223e0e9521 100644
--- a/usr/src/uts/intel/io/acpica/namespace/nssearch.c
+++ b/usr/src/uts/intel/io/acpica/namespace/nssearch.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: nssearch - Namespace search
- * $Revision: 1.118 $
+ * $Revision: 1.123 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -408,25 +408,7 @@ AcpiNsSearchAndEnter (
* this problem, and we want to be able to enable ACPI support for them,
* even though there are a few bad names.
*/
- if (!AcpiUtValidAcpiName (TargetName))
- {
- TargetName = AcpiUtRepairName (TargetName);
-
- /* Report warning only if in strict mode or debug mode */
-
- if (!AcpiGbl_EnableInterpreterSlack)
- {
- ACPI_WARNING ((AE_INFO,
- "Found bad character(s) in name, repaired: [%4.4s]\n",
- ACPI_CAST_PTR (char, &TargetName)));
- }
- else
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_WARN,
- "Found bad character(s) in name, repaired: [%4.4s]\n",
- ACPI_CAST_PTR (char, &TargetName)));
- }
- }
+ AcpiUtRepairName (ACPI_CAST_PTR (char, &TargetName));
/* Try to find the name in the namespace level specified by the caller */
@@ -500,6 +482,11 @@ AcpiNsSearchAndEnter (
}
#endif
+ if (Flags & ACPI_NS_TEMPORARY)
+ {
+ NewNode->Flags |= ANOBJ_TEMPORARY;
+ }
+
/* Install the new object into the parent's list of children */
AcpiNsInstallNode (WalkState, Node, NewNode, Type);
diff --git a/usr/src/uts/intel/io/acpica/namespace/nsutils.c b/usr/src/uts/intel/io/acpica/namespace/nsutils.c
index 4994384da8..1c508a6afe 100644
--- a/usr/src/uts/intel/io/acpica/namespace/nsutils.c
+++ b/usr/src/uts/intel/io/acpica/namespace/nsutils.c
@@ -2,7 +2,7 @@
*
* Module Name: nsutils - Utilities for accessing ACPI namespace, accessing
* parents and siblings and Scope manipulation
- * $Revision: 1.153 $
+ * $Revision: 1.157 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -120,7 +120,6 @@
#include "acpi.h"
#include "acnamesp.h"
#include "amlcode.h"
-#include "actables.h"
#define _COMPONENT ACPI_NAMESPACE
ACPI_MODULE_NAME ("nsutils")
@@ -155,9 +154,9 @@ AcpiNsFindParentName (
void
AcpiNsReportError (
- char *ModuleName,
+ const char *ModuleName,
UINT32 LineNumber,
- char *InternalName,
+ const char *InternalName,
ACPI_STATUS LookupStatus)
{
ACPI_STATUS Status;
@@ -222,11 +221,11 @@ AcpiNsReportError (
void
AcpiNsReportMethodError (
- char *ModuleName,
+ const char *ModuleName,
UINT32 LineNumber,
- char *Message,
+ const char *Message,
ACPI_NAMESPACE_NODE *PrefixNode,
- char *Path,
+ const char *Path,
ACPI_STATUS MethodStatus)
{
ACPI_STATUS Status;
@@ -265,7 +264,7 @@ AcpiNsReportMethodError (
void
AcpiNsPrintNodePathname (
ACPI_NAMESPACE_NODE *Node,
- char *Message)
+ const char *Message)
{
ACPI_BUFFER Buffer;
ACPI_STATUS Status;
@@ -416,7 +415,7 @@ void
AcpiNsGetInternalNameLength (
ACPI_NAMESTRING_INFO *Info)
{
- char *NextExternalChar;
+ const char *NextExternalChar;
UINT32 i;
@@ -495,9 +494,9 @@ AcpiNsBuildInternalName (
{
UINT32 NumSegments = Info->NumSegments;
char *InternalName = Info->InternalName;
- char *ExternalName = Info->NextExternalChar;
+ const char *ExternalName = Info->NextExternalChar;
char *Result = NULL;
- ACPI_NATIVE_UINT i;
+ UINT32 i;
ACPI_FUNCTION_TRACE (NsBuildInternalName);
@@ -547,13 +546,13 @@ AcpiNsBuildInternalName (
else if (NumSegments == 2)
{
InternalName[i] = AML_DUAL_NAME_PREFIX;
- Result = &InternalName[(ACPI_NATIVE_UINT) (i+1)];
+ Result = &InternalName[(ACPI_SIZE) i+1];
}
else
{
InternalName[i] = AML_MULTI_NAME_PREFIX_OP;
- InternalName[(ACPI_NATIVE_UINT) (i+1)] = (char) NumSegments;
- Result = &InternalName[(ACPI_NATIVE_UINT) (i+2)];
+ InternalName[(ACPI_SIZE) i+1] = (char) NumSegments;
+ Result = &InternalName[(ACPI_SIZE) i+2];
}
}
@@ -629,7 +628,7 @@ AcpiNsBuildInternalName (
ACPI_STATUS
AcpiNsInternalizeName (
- char *ExternalName,
+ const char *ExternalName,
char **ConvertedName)
{
char *InternalName;
@@ -695,16 +694,16 @@ AcpiNsInternalizeName (
ACPI_STATUS
AcpiNsExternalizeName (
UINT32 InternalNameLength,
- char *InternalName,
+ const char *InternalName,
UINT32 *ConvertedNameLength,
char **ConvertedName)
{
- ACPI_NATIVE_UINT NamesIndex = 0;
- ACPI_NATIVE_UINT NumSegments = 0;
- ACPI_NATIVE_UINT RequiredLength;
- ACPI_NATIVE_UINT PrefixLength = 0;
- ACPI_NATIVE_UINT i = 0;
- ACPI_NATIVE_UINT j = 0;
+ UINT32 NamesIndex = 0;
+ UINT32 NumSegments = 0;
+ UINT32 RequiredLength;
+ UINT32 PrefixLength = 0;
+ UINT32 i = 0;
+ UINT32 j = 0;
ACPI_FUNCTION_TRACE (NsExternalizeName);
@@ -763,8 +762,8 @@ AcpiNsExternalizeName (
/* <count> 4-byte names */
NamesIndex = PrefixLength + 2;
- NumSegments = (ACPI_NATIVE_UINT) (UINT8)
- InternalName[(ACPI_NATIVE_UINT) (PrefixLength + 1)];
+ NumSegments = (UINT8)
+ InternalName[(ACPI_SIZE) PrefixLength + 1];
break;
case AML_DUAL_NAME_PREFIX:
@@ -975,13 +974,6 @@ AcpiNsTerminate (
}
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Namespace freed\n"));
-
- /*
- * 2) Now we can delete the ACPI tables
- */
- AcpiTbDeleteAllTables ();
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "ACPI Tables freed\n"));
-
return_VOID;
}
@@ -1041,7 +1033,7 @@ AcpiNsOpensScope (
ACPI_STATUS
AcpiNsGetNode (
ACPI_NAMESPACE_NODE *PrefixNode,
- char *Pathname,
+ const char *Pathname,
UINT32 Flags,
ACPI_NAMESPACE_NODE **ReturnNode)
{
diff --git a/usr/src/uts/intel/io/acpica/namespace/nswalk.c b/usr/src/uts/intel/io/acpica/namespace/nswalk.c
index b1d5087c78..c946835d06 100644
--- a/usr/src/uts/intel/io/acpica/namespace/nswalk.c
+++ b/usr/src/uts/intel/io/acpica/namespace/nswalk.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: nswalk - Functions for walking the ACPI namespace
- * $Revision: 1.41 $
+ * $Revision: 1.47 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -160,10 +160,7 @@ AcpiNsGetNextNode (
{
/* It's really the parent's _scope_ that we want */
- if (ParentNode->Child)
- {
- NextNode = ParentNode->Child;
- }
+ NextNode = ParentNode->Child;
}
else
@@ -211,7 +208,7 @@ AcpiNsGetNextNode (
* PARAMETERS: Type - ACPI_OBJECT_TYPE to search for
* StartNode - Handle in namespace where search begins
* MaxDepth - Depth to which search is to reach
- * UnlockBeforeCallback- Whether to unlock the NS before invoking
+ * Flags - Whether to unlock the NS before invoking
* the callback routine
* UserFunction - Called when an object of "Type" is found
* Context - Passed to user function
@@ -239,7 +236,7 @@ AcpiNsWalkNamespace (
ACPI_OBJECT_TYPE Type,
ACPI_HANDLE StartNode,
UINT32 MaxDepth,
- BOOLEAN UnlockBeforeCallback,
+ UINT32 Flags,
ACPI_WALK_CALLBACK UserFunction,
void *Context,
void **ReturnValue)
@@ -282,22 +279,36 @@ AcpiNsWalkNamespace (
ChildNode = AcpiNsGetNextNode (ACPI_TYPE_ANY, ParentNode, ChildNode);
if (ChildNode)
{
- /*
- * Found node, Get the type if we are not
- * searching for ANY
- */
+ /* Found next child, get the type if we are not searching for ANY */
+
if (Type != ACPI_TYPE_ANY)
{
ChildType = ChildNode->Type;
}
- if (ChildType == Type)
+ /*
+ * Ignore all temporary namespace nodes (created during control
+ * method execution) unless told otherwise. These temporary nodes
+ * can cause a race condition because they can be deleted during the
+ * execution of the user function (if the namespace is unlocked before
+ * invocation of the user function.) Only the debugger namespace dump
+ * will examine the temporary nodes.
+ */
+ if ((ChildNode->Flags & ANOBJ_TEMPORARY) &&
+ !(Flags & ACPI_NS_WALK_TEMP_NODES))
+ {
+ Status = AE_CTRL_DEPTH;
+ }
+
+ /* Type must match requested type */
+
+ else if (ChildType == Type)
{
/*
- * Found a matching node, invoke the user
- * callback function
+ * Found a matching node, invoke the user callback function.
+ * Unlock the namespace if flag is set.
*/
- if (UnlockBeforeCallback)
+ if (Flags & ACPI_NS_WALK_UNLOCK)
{
MutexStatus = AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
if (ACPI_FAILURE (MutexStatus))
@@ -306,10 +317,9 @@ AcpiNsWalkNamespace (
}
}
- Status = UserFunction (ChildNode, Level,
- Context, ReturnValue);
+ Status = UserFunction (ChildNode, Level, Context, ReturnValue);
- if (UnlockBeforeCallback)
+ if (Flags & ACPI_NS_WALK_UNLOCK)
{
MutexStatus = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
if (ACPI_FAILURE (MutexStatus))
@@ -341,33 +351,28 @@ AcpiNsWalkNamespace (
}
/*
- * Depth first search:
- * Attempt to go down another level in the namespace
- * if we are allowed to. Don't go any further if we
- * have reached the caller specified maximum depth
- * or if the user function has specified that the
- * maximum depth has been reached.
+ * Depth first search: Attempt to go down another level in the
+ * namespace if we are allowed to. Don't go any further if we have
+ * reached the caller specified maximum depth or if the user
+ * function has specified that the maximum depth has been reached.
*/
if ((Level < MaxDepth) && (Status != AE_CTRL_DEPTH))
{
if (AcpiNsGetNextNode (ACPI_TYPE_ANY, ChildNode, NULL))
{
- /*
- * There is at least one child of this
- * node, visit the onde
- */
+ /* There is at least one child of this node, visit it */
+
Level++;
ParentNode = ChildNode;
- ChildNode = NULL;
+ ChildNode = NULL;
}
}
}
else
{
/*
- * No more children of this node (AcpiNsGetNextNode
- * failed), go back upwards in the namespace tree to
- * the node's parent.
+ * No more children of this node (AcpiNsGetNextNode failed), go
+ * back upwards in the namespace tree to the node's parent.
*/
Level--;
ChildNode = ParentNode;
diff --git a/usr/src/uts/intel/io/acpica/namespace/nsxfeval.c b/usr/src/uts/intel/io/acpica/namespace/nsxfeval.c
index 3b88369187..f1bc6b8d7a 100644
--- a/usr/src/uts/intel/io/acpica/namespace/nsxfeval.c
+++ b/usr/src/uts/intel/io/acpica/namespace/nsxfeval.c
@@ -2,7 +2,7 @@
*
* Module Name: nsxfeval - Public interfaces to the ACPI subsystem
* ACPI Object evaluation interfaces
- * $Revision: 1.28 $
+ * $Revision: 1.33 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -126,6 +126,12 @@
#define _COMPONENT ACPI_NAMESPACE
ACPI_MODULE_NAME ("nsxfeval")
+/* Local prototypes */
+
+static void
+AcpiNsResolveReferences (
+ ACPI_EVALUATE_INFO *Info);
+
/*******************************************************************************
*
@@ -255,7 +261,6 @@ AcpiEvaluateObject (
ACPI_BUFFER *ReturnBuffer)
{
ACPI_STATUS Status;
- ACPI_STATUS Status2;
ACPI_EVALUATE_INFO *Info;
ACPI_SIZE BufferSpaceNeeded;
UINT32 i;
@@ -273,7 +278,6 @@ AcpiEvaluateObject (
}
Info->Pathname = Pathname;
- Info->ParameterType = ACPI_PARAM_ARGS;
/* Convert and validate the device handle */
@@ -387,6 +391,10 @@ AcpiEvaluateObject (
if (ACPI_SUCCESS (Status))
{
+ /* Dereference Index and RefOf references */
+
+ AcpiNsResolveReferences (Info);
+
/* Get the size of the returned object */
Status = AcpiUtGetObjectSize (Info->ReturnObject,
@@ -426,14 +434,12 @@ AcpiEvaluateObject (
* Delete the internal return object. NOTE: Interpreter must be
* locked to avoid race condition.
*/
- Status2 = AcpiExEnterInterpreter ();
- if (ACPI_SUCCESS (Status2))
- {
- /* Remove one reference on the return object (should delete it) */
+ AcpiExEnterInterpreter ();
- AcpiUtRemoveReference (Info->ReturnObject);
- AcpiExExitInterpreter ();
- }
+ /* Remove one reference on the return object (should delete it) */
+
+ AcpiUtRemoveReference (Info->ReturnObject);
+ AcpiExExitInterpreter ();
}
@@ -457,6 +463,82 @@ ACPI_EXPORT_SYMBOL (AcpiEvaluateObject)
/*******************************************************************************
*
+ * FUNCTION: AcpiNsResolveReferences
+ *
+ * PARAMETERS: Info - Evaluation info block
+ *
+ * RETURN: Info->ReturnObject is replaced with the dereferenced object
+ *
+ * DESCRIPTION: Dereference certain reference objects. Called before an
+ * internal return object is converted to an external ACPI_OBJECT.
+ *
+ * Performs an automatic dereference of Index and RefOf reference objects.
+ * These reference objects are not supported by the ACPI_OBJECT, so this is a
+ * last resort effort to return something useful. Also, provides compatibility
+ * with other ACPI implementations.
+ *
+ * NOTE: does not handle references within returned package objects or nested
+ * references, but this support could be added later if found to be necessary.
+ *
+ ******************************************************************************/
+
+static void
+AcpiNsResolveReferences (
+ ACPI_EVALUATE_INFO *Info)
+{
+ ACPI_OPERAND_OBJECT *ObjDesc = NULL;
+ ACPI_NAMESPACE_NODE *Node;
+
+
+ /* We are interested in reference objects only */
+
+ if (ACPI_GET_OBJECT_TYPE (Info->ReturnObject) != ACPI_TYPE_LOCAL_REFERENCE)
+ {
+ return;
+ }
+
+ /*
+ * Two types of references are supported - those created by Index and
+ * RefOf operators. A name reference (AML_NAMEPATH_OP) can be converted
+ * to an ACPI_OBJECT, so it is not dereferenced here. A DdbHandle
+ * (AML_LOAD_OP) cannot be dereferenced, nor can it be converted to
+ * an ACPI_OBJECT.
+ */
+ switch (Info->ReturnObject->Reference.Class)
+ {
+ case ACPI_REFCLASS_INDEX:
+
+ ObjDesc = *(Info->ReturnObject->Reference.Where);
+ break;
+
+ case ACPI_REFCLASS_REFOF:
+
+ Node = Info->ReturnObject->Reference.Object;
+ if (Node)
+ {
+ ObjDesc = Node->Object;
+ }
+ break;
+
+ default:
+ return;
+ }
+
+ /* Replace the existing reference object */
+
+ if (ObjDesc)
+ {
+ AcpiUtAddReference (ObjDesc);
+ AcpiUtRemoveReference (Info->ReturnObject);
+ Info->ReturnObject = ObjDesc;
+ }
+
+ return;
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiWalkNamespace
*
* PARAMETERS: Type - ACPI_OBJECT_TYPE to search for
@@ -559,7 +641,8 @@ AcpiNsGetDeviceCallback (
UINT32 Flags;
ACPI_DEVICE_ID Hid;
ACPI_COMPATIBLE_ID_LIST *Cid;
- ACPI_NATIVE_UINT i;
+ UINT32 i;
+ BOOLEAN Found;
Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
@@ -588,10 +671,14 @@ AcpiNsGetDeviceCallback (
return (AE_CTRL_DEPTH);
}
- if (!(Flags & ACPI_STA_DEVICE_PRESENT))
+ if (!(Flags & ACPI_STA_DEVICE_PRESENT) &&
+ !(Flags & ACPI_STA_DEVICE_FUNCTIONING))
{
- /* Don't examine children of the device if not present */
-
+ /*
+ * Don't examine the children of the device only when the
+ * device is neither present nor functional. See ACPI spec,
+ * description of _STA for more information.
+ */
return (AE_CTRL_DEPTH);
}
@@ -611,8 +698,10 @@ AcpiNsGetDeviceCallback (
if (ACPI_STRNCMP (Hid.Value, Info->Hid, sizeof (Hid.Value)) != 0)
{
- /* Get the list of Compatible IDs */
-
+ /*
+ * HID does not match, attempt match within the
+ * list of Compatible IDs (CIDs)
+ */
Status = AcpiUtExecute_CID (Node, &Cid);
if (Status == AE_NOT_FOUND)
{
@@ -625,19 +714,29 @@ AcpiNsGetDeviceCallback (
/* Walk the CID list */
+ Found = FALSE;
for (i = 0; i < Cid->Count; i++)
{
if (ACPI_STRNCMP (Cid->Id[i].Value, Info->Hid,
- sizeof (ACPI_COMPATIBLE_ID)) != 0)
+ sizeof (ACPI_COMPATIBLE_ID)) == 0)
{
- ACPI_FREE (Cid);
- return (AE_OK);
+ /* Found a matching CID */
+
+ Found = TRUE;
+ break;
}
}
+
ACPI_FREE (Cid);
+ if (!Found)
+ {
+ return (AE_OK);
+ }
}
}
+ /* We have a valid device, invoke the user function */
+
Status = Info->UserFunction (ObjHandle, NestingLevel, Info->Context,
ReturnValue);
return (Status);
@@ -665,7 +764,7 @@ AcpiNsGetDeviceCallback (
* value is returned to the caller.
*
* This is a wrapper for WalkNamespace, but the callback performs
- * additional filtering. Please see AcpiGetDeviceCallback.
+ * additional filtering. Please see AcpiNsGetDeviceCallback.
*
******************************************************************************/
diff --git a/usr/src/uts/intel/io/acpica/namespace/nsxfname.c b/usr/src/uts/intel/io/acpica/namespace/nsxfname.c
index 5aa6d37c42..c8825a2164 100644
--- a/usr/src/uts/intel/io/acpica/namespace/nsxfname.c
+++ b/usr/src/uts/intel/io/acpica/namespace/nsxfname.c
@@ -2,7 +2,7 @@
*
* Module Name: nsxfname - Public interfaces to the ACPI subsystem
* ACPI Namespace oriented interfaces
- * $Revision: 1.110 $
+ * $Revision: 1.113 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -168,41 +168,42 @@ AcpiGetHandle (
if (Parent)
{
- Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
-
PrefixNode = AcpiNsMapHandleToNode (Parent);
if (!PrefixNode)
{
- (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
return (AE_BAD_PARAMETER);
}
+ }
+
+ /*
+ * Valid cases are:
+ * 1) Fully qualified pathname
+ * 2) Parent + Relative pathname
+ *
+ * Error for <null Parent + relative path>
+ */
+ if (AcpiNsValidRootPrefix (Pathname[0]))
+ {
+ /* Pathname is fully qualified (starts with '\') */
- Status = AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
- if (ACPI_FAILURE (Status))
+ /* Special case for root-only, since we can't search for it */
+
+ if (!ACPI_STRCMP (Pathname, ACPI_NS_ROOT_PATH))
{
- return (Status);
+ *RetHandle = AcpiNsConvertEntryToHandle (AcpiGbl_RootNode);
+ return (AE_OK);
}
}
-
- /* Special case for root, since we can't search for it */
-
- if (ACPI_STRCMP (Pathname, ACPI_NS_ROOT_PATH) == 0)
+ else if (!PrefixNode)
{
- *RetHandle = AcpiNsConvertEntryToHandle (AcpiGbl_RootNode);
- return (AE_OK);
+ /* Relative path with null prefix is disallowed */
+
+ return (AE_BAD_PARAMETER);
}
- /*
- * Find the Node and convert to a handle
- */
- Status = AcpiNsGetNode (PrefixNode, Pathname, ACPI_NS_NO_UPSEARCH,
- &Node);
+ /* Find the Node and convert to a handle */
- *RetHandle = NULL;
+ Status = AcpiNsGetNode (PrefixNode, Pathname, ACPI_NS_NO_UPSEARCH, &Node);
if (ACPI_SUCCESS (Status))
{
*RetHandle = AcpiNsConvertEntryToHandle (Node);
@@ -360,6 +361,7 @@ AcpiGetObjectInfo (
if (!Node)
{
(void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
+ Status = AE_BAD_PARAMETER;
goto Cleanup;
}
@@ -371,6 +373,11 @@ AcpiGetObjectInfo (
Info->Name = Node->Name.Integer;
Info->Valid = 0;
+ if (Node->Type == ACPI_TYPE_METHOD)
+ {
+ Info->ParamCount = Node->Object->Method.ParamCount;
+ }
+
Status = AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
if (ACPI_FAILURE (Status))
{
diff --git a/usr/src/uts/intel/io/acpica/namespace/nsxfobj.c b/usr/src/uts/intel/io/acpica/namespace/nsxfobj.c
index 799729b1a4..3f03426064 100644
--- a/usr/src/uts/intel/io/acpica/namespace/nsxfobj.c
+++ b/usr/src/uts/intel/io/acpica/namespace/nsxfobj.c
@@ -2,7 +2,7 @@
*
* Module Name: nsxfobj - Public interfaces to the ACPI subsystem
* ACPI Object oriented interfaces
- * $Revision: 1.121 $
+ * $Revision: 1.123 $
*
******************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/io/acpica/osl.c b/usr/src/uts/intel/io/acpica/osl.c
index 9ba778656e..2bab5edbd1 100644
--- a/usr/src/uts/intel/io/acpica/osl.c
+++ b/usr/src/uts/intel/io/acpica/osl.c
@@ -27,9 +27,6 @@
* ACPI CA OSL for Solaris x86
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-
#include <sys/types.h>
#include <sys/kmem.h>
#include <sys/psm.h>
@@ -64,11 +61,28 @@ static void acpica_devinfo_handler(ACPI_HANDLE, UINT32, void *);
/*
* Event queue vars
*/
-int acpica_eventq_thread_count = 1;
int acpica_eventq_init = 0;
ddi_taskq_t *osl_eventq[OSL_EC_BURST_HANDLER+1];
/*
+ * Priorities relative to minclsyspri that each taskq
+ * run at; OSL_NOTIFY_HANDLER needs to run at a higher
+ * priority than OSL_GPE_HANDLER. There's an implicit
+ * assumption that no priority here results in exceeding
+ * maxclsyspri.
+ * Note: these initializations need to match the order of
+ * ACPI_EXECUTE_TYPE.
+ */
+int osl_eventq_pri_delta[OSL_EC_BURST_HANDLER+1] = {
+ 0, /* OSL_GLOBAL_LOCK_HANDLER */
+ 2, /* OSL_NOTIFY_HANDLER */
+ 0, /* OSL_GPE_HANDLER */
+ 0, /* OSL_DEBUGGER_THREAD */
+ 0, /* OSL_EC_POLL_HANDLER */
+ 0 /* OSL_EC_BURST_HANDLER */
+};
+
+/*
* Note, if you change this path, you need to update
* /boot/grub/filelist.ramdisk and pkg SUNWckr/prototype_i386
*/
@@ -131,10 +145,11 @@ init_event_queues()
* Initialize event queues
*/
+ /* Always allocate only 1 thread per queue to force FIFO execution */
for (i = OSL_GLOBAL_LOCK_HANDLER; i <= OSL_EC_BURST_HANDLER; i++) {
snprintf(namebuf, 32, "ACPI%d", i);
- osl_eventq[i] = ddi_taskq_create(NULL, namebuf,
- acpica_eventq_thread_count, TASKQ_DEFAULTPRI, 0);
+ osl_eventq[i] = ddi_taskq_create(NULL, namebuf, 1,
+ osl_eventq_pri_delta[i] + minclsyspri, 0);
if (osl_eventq[i] == NULL)
error++;
}
@@ -183,24 +198,23 @@ AcpiOsTerminate(void)
}
-ACPI_STATUS
-AcpiOsGetRootPointer(UINT32 Flags, ACPI_POINTER *Address)
+ACPI_PHYSICAL_ADDRESS
+AcpiOsGetRootPointer()
{
- uint_t acpi_root_tab;
+ ACPI_PHYSICAL_ADDRESS Address;
/*
* For EFI firmware, the root pointer is defined in EFI systab.
* The boot code process the table and put the physical address
* in the acpi-root-tab property.
*/
- acpi_root_tab = ddi_prop_get_int(DDI_DEV_T_ANY, ddi_root_node(), 0,
- "acpi-root-tab", 0);
- if (acpi_root_tab != 0) {
- Address->PointerType = ACPI_PHYSICAL_POINTER;
- Address->Pointer.Physical = acpi_root_tab;
- return (AE_OK);
- }
- return (AcpiFindRootPointer(Flags, Address));
+ Address = ddi_prop_get_int(DDI_DEV_T_ANY, ddi_root_node(), 0,
+ "acpi-root-tab", NULL);
+
+ if ((Address == NULL) && ACPI_FAILURE(AcpiFindRootPointer(&Address)))
+ Address = NULL;
+
+ return (Address);
}
/*ARGSUSED*/
@@ -456,25 +470,19 @@ AcpiOsDeleteLock(ACPI_HANDLE Handle)
kmem_free((void *)Handle, sizeof (kmutex_t));
}
-ACPI_NATIVE_UINT
+ACPI_CPU_FLAGS
AcpiOsAcquireLock(ACPI_HANDLE Handle)
{
- if (Handle == NULL)
- return (AE_BAD_PARAMETER);
-
mutex_enter((kmutex_t *)Handle);
- return (AE_OK);
+ return (0);
}
void
-AcpiOsReleaseLock(ACPI_HANDLE Handle, ACPI_NATIVE_UINT Flags)
+AcpiOsReleaseLock(ACPI_HANDLE Handle, ACPI_CPU_FLAGS Flags)
{
_NOTE(ARGUNUSED(Flags))
- if (Handle == NULL)
- return;
-
mutex_exit((kmutex_t *)Handle);
}
@@ -501,15 +509,12 @@ AcpiOsFree(void *Memory)
kmem_free(tmp_ptr, size);
}
-ACPI_STATUS
-AcpiOsMapMemory(ACPI_PHYSICAL_ADDRESS PhysicalAddress,
- ACPI_SIZE Size, void **LogicalAddress)
+void *
+AcpiOsMapMemory(ACPI_PHYSICAL_ADDRESS PhysicalAddress, ACPI_SIZE Size)
{
/* FUTUREWORK: test PhysicalAddress for > 32 bits */
- *LogicalAddress = psm_map_new((paddr_t)PhysicalAddress,
- (size_t)Size, PSM_PROT_WRITE | PSM_PROT_READ);
-
- return (*LogicalAddress == NULL ? AE_NO_MEMORY : AE_OK);
+ return (psm_map_new((paddr_t)PhysicalAddress,
+ (size_t)Size, PSM_PROT_WRITE | PSM_PROT_READ));
}
void
@@ -1259,7 +1264,8 @@ acpica_eval_hid(ACPI_HANDLE dev, char *method, int *rint)
rb.Pointer = NULL;
rb.Length = ACPI_ALLOCATE_BUFFER;
- if (AcpiEvaluateObject(dev, method, NULL, &rb) == AE_OK) {
+ if (AcpiEvaluateObject(dev, method, NULL, &rb) == AE_OK &&
+ rb.Length != 0) {
rv = rb.Pointer;
if (rv->Type == ACPI_TYPE_INTEGER) {
*rint = rv->Integer.Value;
@@ -1406,6 +1412,65 @@ acpica_get_handle_cpu(dev_info_t *dip, ACPI_HANDLE *rh)
}
/*
+ * Convert CPU device _UID strings into unique integers
+ * ACPI 3.0 spec 6.1.9 permits _UID to be either
+ * an arbitrary string or numeric value. ACPI CA converts
+ * numeric types to a string, providing a consistent API,
+ * but it can not be assumed that _UID is always numeric.
+ * Keep a private list of CPU _UIDs and convert them to
+ * an integer representation.
+ */
+
+struct acpica_cpu_uid {
+ struct acpica_cpu_uid *next;
+ char *uid;
+};
+
+static struct acpica_cpu_uid *acpica_cpu_uid_list = NULL;
+
+static UINT32
+acpica_cpu_uid_str_to_uint(char *uidstr)
+{
+ UINT32 n;
+ struct acpica_cpu_uid *current, **tail;
+
+ ASSERT(uidstr != NULL);
+
+ n = 0;
+ current = acpica_cpu_uid_list;
+ tail = &acpica_cpu_uid_list;
+ while (current != NULL) {
+ if (strcmp(current->uid, uidstr) == 0)
+ break;
+ n++;
+ tail = &current->next;
+ current = current->next;
+ }
+
+ /*
+ * failed to find a matching element; create it here
+ */
+ if (current == NULL) {
+ /* allocate new list element as current one */
+ current = (struct acpica_cpu_uid *)kmem_zalloc(
+ sizeof (struct acpica_cpu_uid), KM_SLEEP);
+
+ /* allocate storage for the device ID string */
+ current->uid = (char *)kmem_zalloc(strlen(uidstr) + 1,
+ KM_SLEEP);
+
+ strcpy(current->uid, uidstr);
+ *tail = current;
+ }
+
+ /*
+ * 'n' correctly contains the index for either
+ * a new element or an existing element
+ */
+ return (n);
+}
+
+/*
* Determine if this object is a processor
*/
static ACPI_STATUS
@@ -1423,13 +1488,12 @@ acpica_probe_processor(ACPI_HANDLE obj, UINT32 level, void *ctx, void **rv)
/* process a Processor */
rb.Pointer = NULL;
rb.Length = ACPI_ALLOCATE_BUFFER;
- status = AcpiEvaluateObject(obj, NULL, NULL, &rb);
+ status = AcpiEvaluateObjectTyped(obj, NULL, NULL, &rb,
+ ACPI_TYPE_PROCESSOR);
if (status != AE_OK) {
cmn_err(CE_WARN, "acpica: error probing Processor");
return (status);
}
- ASSERT(((ACPI_OBJECT *)rb.Pointer)->Type ==
- ACPI_TYPE_PROCESSOR);
acpi_id = ((ACPI_OBJECT *)rb.Pointer)->Processor.ProcId;
AcpiOsFree(rb.Pointer);
} else if (objtype == ACPI_TYPE_DEVICE) {
@@ -1444,7 +1508,7 @@ acpica_probe_processor(ACPI_HANDLE obj, UINT32 level, void *ctx, void **rv)
}
ASSERT(((ACPI_OBJECT *)rb.Pointer)->Type ==
ACPI_TYPE_DEVICE);
- acpi_id = AcpiExStringToUnsignedInteger(
+ acpi_id = acpica_cpu_uid_str_to_uint(
((ACPI_DEVICE_INFO *)rb.Pointer)->UniqueId.Value);
AcpiOsFree(rb.Pointer);
}
diff --git a/usr/src/uts/intel/io/acpica/osl_ml.s b/usr/src/uts/intel/io/acpica/osl_ml.s
index 07c85bbc6b..9d6bbc97f4 100644
--- a/usr/src/uts/intel/io/acpica/osl_ml.s
+++ b/usr/src/uts/intel/io/acpica/osl_ml.s
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,11 +19,9 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
- * All rights reserved.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/asm_linkage.h>
#include <sys/asm_misc.h>
@@ -54,20 +51,25 @@
* |---------|------------|------------|-----------------------------------|
*/
+/* Offset of GlobalLock element in FACS structure */
+#define GlobalLock 0x10
#if defined(lint) || defined(__lint)
/* ARGSUSED */
UINT32
-__acpi_acquire_global_lock(UINT32 *glp)
+__acpi_acquire_global_lock(void *Facs)
{ return (0); }
#else /* lint */
#if defined(__amd64)
ENTRY(__acpi_acquire_global_lock)
- movq %rdi, %rcx / %ecx - glp
-__acpi_acquire_global_lock_000:
+ movq $0xff, %rax / error return if FACS is null
+ orq %rdi, %rdi / %rdi contains pointer to FACS
+ jz 1f
+ leaq GlobalLock(%rdi), %rdi / make %rdi point at the lock
+0:
movl (%rdi), %eax / get current value of Global Lock
movl %eax, %edx
andl $0xFFFFFFFE, %edx / Clear pending bit
@@ -75,17 +77,22 @@ __acpi_acquire_global_lock_000:
adcl $0, %edx / If owned, set pending bit
lock
cmpxchgl %edx, (%rdi) / Attempt to set new value
- jnz __acpi_acquire_global_lock_000 / If not set, try again
+ jnz 0b / If not set, try again
cmpb $3, %dl / Was it acquired or marked pending?
sbbq %rax, %rax / acquired = -1, pending = 0
+1:
ret
SET_SIZE(__acpi_acquire_global_lock)
#elif defined(__i386)
ENTRY(__acpi_acquire_global_lock)
- movl 4(%esp), %ecx / %ecx - glp
-__acpi_acquire_global_lock_000:
+ movl $0xff, %eax / error return if FACS is null
+ movl 4(%esp), %ecx / %ecx contains pointer to FACS
+ orl %ecx, %ecx
+ jz 1f
+ leal GlobalLock(%ecx), %ecx / make %ecx point at the lock
+0:
movl (%ecx), %eax
movl %eax, %edx
andl $0xFFFFFFFE, %edx
@@ -93,9 +100,10 @@ __acpi_acquire_global_lock_000:
adcl $0, %edx
lock
cmpxchgl %edx, (%ecx)
- jnz __acpi_acquire_global_lock_000
+ jnz 0b
cmpb $3, %dl
sbbl %eax, %eax
+1:
ret
SET_SIZE(__acpi_acquire_global_lock)
@@ -108,37 +116,46 @@ __acpi_acquire_global_lock_000:
/* ARGSUSED */
UINT32
-__acpi_release_global_lock(UINT32 *glp)
+__acpi_release_global_lock(void *Facs)
{ return (0); }
#else /* lint */
#if defined(__amd64)
ENTRY(__acpi_release_global_lock)
- movq %rdi, %rcx
-__acpi_release_global_lock_000:
+ xorq %rax, %rax / error return if FACS is null
+ orq %rdi, %rdi / %rdi contains pointer to FACS
+ jz 1f
+ leaq GlobalLock(%rdi), %rdi / make %rdi point at the lock
+0:
movl (%rdi), %eax
movl %eax, %edx
andl $0xFFFFFFFC, %edx
lock
cmpxchgl %edx, (%rdi)
- jnz __acpi_release_global_lock_000
- andq $1, %Rax
+ jnz 0b
+ andq $1, %rax
+1:
ret
SET_SIZE(__acpi_release_global_lock)
#elif defined(__i386)
ENTRY(__acpi_release_global_lock)
- movl 4(%esp), %ecx
-__acpi_release_global_lock_000:
+ xorl %eax, %eax / error return if FACS is null
+ movl 4(%esp), %ecx / %ecx contains pointer to FACS
+ orl %ecx, %ecx
+ jz 1f
+ leal GlobalLock(%ecx), %ecx / make %ecx point at the lock
+0:
movl (%ecx), %eax
movl %eax, %edx
andl $0xFFFFFFFC, %edx
lock
cmpxchgl %edx, (%ecx)
- jnz __acpi_release_global_lock_000
+ jnz 0b
andl $1, %eax
+1:
ret
SET_SIZE(__acpi_release_global_lock)
diff --git a/usr/src/uts/intel/io/acpica/interpreter/parser/psargs.c b/usr/src/uts/intel/io/acpica/parser/psargs.c
index a5aca6460a..c32543c1c3 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/parser/psargs.c
+++ b/usr/src/uts/intel/io/acpica/parser/psargs.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psargs - Parse AML opcode arguments
- * $Revision: 1.91 $
+ * $Revision: 1.95 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -156,7 +156,7 @@ AcpiPsGetNextPackageLength (
{
UINT8 *Aml = ParserState->Aml;
UINT32 PackageLength = 0;
- ACPI_NATIVE_UINT ByteCount;
+ UINT32 ByteCount;
UINT8 ByteZeroMask = 0x3F; /* Default [0:5] */
@@ -168,7 +168,7 @@ AcpiPsGetNextPackageLength (
* used to encode the package length, either 0,1,2, or 3
*/
ByteCount = (Aml[0] >> 6);
- ParserState->Aml += (ByteCount + 1);
+ ParserState->Aml += ((ACPI_SIZE) ByteCount + 1);
/* Get bytes 3, 2, 1 as needed */
@@ -329,12 +329,12 @@ AcpiPsGetNextNamepath (
ACPI_PARSE_OBJECT *Arg,
BOOLEAN PossibleMethodCall)
{
+ ACPI_STATUS Status;
char *Path;
ACPI_PARSE_OBJECT *NameOp;
- ACPI_STATUS Status;
ACPI_OPERAND_OBJECT *MethodDesc;
ACPI_NAMESPACE_NODE *Node;
- ACPI_GENERIC_STATE ScopeInfo;
+ UINT8 *Start = ParserState->Aml;
ACPI_FUNCTION_TRACE (PsGetNextNamepath);
@@ -351,23 +351,16 @@ AcpiPsGetNextNamepath (
return_ACPI_STATUS (AE_OK);
}
- /* Setup search scope info */
-
- ScopeInfo.Scope.Node = NULL;
- Node = ParserState->StartNode;
- if (Node)
- {
- ScopeInfo.Scope.Node = Node;
- }
-
/*
- * Lookup the name in the internal namespace. We don't want to add
- * anything new to the namespace here, however, so we use MODE_EXECUTE.
+ * Lookup the name in the internal namespace, starting with the current
+ * scope. We don't want to add anything new to the namespace here,
+ * however, so we use MODE_EXECUTE.
* Allow searching of the parent tree, but don't open a new scope -
* we just want to lookup the object (must be mode EXECUTE to perform
* the upsearch)
*/
- Status = AcpiNsLookup (&ScopeInfo, Path, ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
+ Status = AcpiNsLookup (WalkState->ScopeInfo, Path,
+ ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, NULL, &Node);
/*
@@ -378,6 +371,18 @@ AcpiPsGetNextNamepath (
PossibleMethodCall &&
(Node->Type == ACPI_TYPE_METHOD))
{
+ if (WalkState->Opcode == AML_UNLOAD_OP)
+ {
+ /*
+ * AcpiPsGetNextNamestring has increased the AML pointer,
+ * so we need to restore the saved AML pointer for method call.
+ */
+ WalkState->ParserState.Aml = Start;
+ WalkState->ArgCount = 1;
+ AcpiPsInitOp (Arg, AML_INT_METHODCALL_OP);
+ return_ACPI_STATUS (AE_OK);
+ }
+
/* This name is actually a control method invocation */
MethodDesc = AcpiNsGetAttachedObject (Node);
@@ -824,7 +829,26 @@ AcpiPsGetNextArg (
return_ACPI_STATUS (AE_NO_MEMORY);
}
- Status = AcpiPsGetNextNamepath (WalkState, ParserState, Arg, 0);
+ /* To support SuperName arg of Unload */
+
+ if (WalkState->Opcode == AML_UNLOAD_OP)
+ {
+ Status = AcpiPsGetNextNamepath (WalkState, ParserState, Arg, 1);
+
+ /*
+ * If the SuperName arg of Unload is a method call,
+ * we have restored the AML pointer, just free this Arg
+ */
+ if (Arg->Common.AmlOpcode == AML_INT_METHODCALL_OP)
+ {
+ AcpiPsFreeOp (Arg);
+ Arg = NULL;
+ }
+ }
+ else
+ {
+ Status = AcpiPsGetNextNamepath (WalkState, ParserState, Arg, 0);
+ }
}
else
{
diff --git a/usr/src/uts/intel/io/acpica/parser/psloop.c b/usr/src/uts/intel/io/acpica/parser/psloop.c
new file mode 100644
index 0000000000..6760d5c125
--- /dev/null
+++ b/usr/src/uts/intel/io/acpica/parser/psloop.c
@@ -0,0 +1,1208 @@
+/******************************************************************************
+ *
+ * Module Name: psloop - Main AML parse loop
+ * $Revision: 1.19 $
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999 - 2008, 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.
+ *
+ *****************************************************************************/
+
+
+/*
+ * Parse the AML and build an operation tree as most interpreters, (such as
+ * Perl) do. Parsing is done by hand rather than with a YACC generated parser
+ * to tightly constrain stack and dynamic memory usage. Parsing is kept
+ * flexible and the code fairly compact by parsing based on a list of AML
+ * opcode templates in AmlOpInfo[].
+ */
+
+#include "acpi.h"
+#include "acparser.h"
+#include "acdispat.h"
+#include "amlcode.h"
+
+#define _COMPONENT ACPI_PARSER
+ ACPI_MODULE_NAME ("psloop")
+
+static UINT32 AcpiGbl_Depth = 0;
+
+
+/* Local prototypes */
+
+static ACPI_STATUS
+AcpiPsGetAmlOpcode (
+ ACPI_WALK_STATE *WalkState);
+
+static ACPI_STATUS
+AcpiPsBuildNamedOp (
+ ACPI_WALK_STATE *WalkState,
+ UINT8 *AmlOpStart,
+ ACPI_PARSE_OBJECT *UnnamedOp,
+ ACPI_PARSE_OBJECT **Op);
+
+static ACPI_STATUS
+AcpiPsCreateOp (
+ ACPI_WALK_STATE *WalkState,
+ UINT8 *AmlOpStart,
+ ACPI_PARSE_OBJECT **NewOp);
+
+static ACPI_STATUS
+AcpiPsGetArguments (
+ ACPI_WALK_STATE *WalkState,
+ UINT8 *AmlOpStart,
+ ACPI_PARSE_OBJECT *Op);
+
+static ACPI_STATUS
+AcpiPsCompleteOp (
+ ACPI_WALK_STATE *WalkState,
+ ACPI_PARSE_OBJECT **Op,
+ ACPI_STATUS Status);
+
+static ACPI_STATUS
+AcpiPsCompleteFinalOp (
+ ACPI_WALK_STATE *WalkState,
+ ACPI_PARSE_OBJECT *Op,
+ ACPI_STATUS Status);
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiPsGetAmlOpcode
+ *
+ * PARAMETERS: WalkState - Current state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Extract the next AML opcode from the input stream.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiPsGetAmlOpcode (
+ ACPI_WALK_STATE *WalkState)
+{
+
+ ACPI_FUNCTION_TRACE_PTR (PsGetAmlOpcode, WalkState);
+
+
+ WalkState->AmlOffset = (UINT32) ACPI_PTR_DIFF (WalkState->ParserState.Aml,
+ WalkState->ParserState.AmlStart);
+ WalkState->Opcode = AcpiPsPeekOpcode (&(WalkState->ParserState));
+
+ /*
+ * First cut to determine what we have found:
+ * 1) A valid AML opcode
+ * 2) A name string
+ * 3) An unknown/invalid opcode
+ */
+ WalkState->OpInfo = AcpiPsGetOpcodeInfo (WalkState->Opcode);
+
+ switch (WalkState->OpInfo->Class)
+ {
+ case AML_CLASS_ASCII:
+ case AML_CLASS_PREFIX:
+ /*
+ * Starts with a valid prefix or ASCII char, this is a name
+ * string. Convert the bare name string to a namepath.
+ */
+ WalkState->Opcode = AML_INT_NAMEPATH_OP;
+ WalkState->ArgTypes = ARGP_NAMESTRING;
+ break;
+
+ case AML_CLASS_UNKNOWN:
+
+ /* The opcode is unrecognized. Just skip unknown opcodes */
+
+ ACPI_ERROR ((AE_INFO,
+ "Found unknown opcode %X at AML address %p offset %X, ignoring",
+ WalkState->Opcode, WalkState->ParserState.Aml, WalkState->AmlOffset));
+
+ ACPI_DUMP_BUFFER (WalkState->ParserState.Aml, 128);
+
+ /* Assume one-byte bad opcode */
+
+ WalkState->ParserState.Aml++;
+ return_ACPI_STATUS (AE_CTRL_PARSE_CONTINUE);
+
+ default:
+
+ /* Found opcode info, this is a normal opcode */
+
+ WalkState->ParserState.Aml += AcpiPsGetOpcodeSize (WalkState->Opcode);
+ WalkState->ArgTypes = WalkState->OpInfo->ParseArgs;
+ break;
+ }
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiPsBuildNamedOp
+ *
+ * PARAMETERS: WalkState - Current state
+ * AmlOpStart - Begin of named Op in AML
+ * UnnamedOp - Early Op (not a named Op)
+ * Op - Returned Op
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Parse a named Op
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiPsBuildNamedOp (
+ ACPI_WALK_STATE *WalkState,
+ UINT8 *AmlOpStart,
+ ACPI_PARSE_OBJECT *UnnamedOp,
+ ACPI_PARSE_OBJECT **Op)
+{
+ ACPI_STATUS Status = AE_OK;
+ ACPI_PARSE_OBJECT *Arg = NULL;
+
+
+ ACPI_FUNCTION_TRACE_PTR (PsBuildNamedOp, WalkState);
+
+
+ UnnamedOp->Common.Value.Arg = NULL;
+ UnnamedOp->Common.ArgListLength = 0;
+ UnnamedOp->Common.AmlOpcode = WalkState->Opcode;
+
+ /*
+ * Get and append arguments until we find the node that contains
+ * the name (the type ARGP_NAME).
+ */
+ while (GET_CURRENT_ARG_TYPE (WalkState->ArgTypes) &&
+ (GET_CURRENT_ARG_TYPE (WalkState->ArgTypes) != ARGP_NAME))
+ {
+ Status = AcpiPsGetNextArg (WalkState, &(WalkState->ParserState),
+ GET_CURRENT_ARG_TYPE (WalkState->ArgTypes), &Arg);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ AcpiPsAppendArg (UnnamedOp, Arg);
+ INCREMENT_ARG_LIST (WalkState->ArgTypes);
+ }
+
+ /*
+ * Make sure that we found a NAME and didn't run out of arguments
+ */
+ if (!GET_CURRENT_ARG_TYPE (WalkState->ArgTypes))
+ {
+ return_ACPI_STATUS (AE_AML_NO_OPERAND);
+ }
+
+ /* We know that this arg is a name, move to next arg */
+
+ INCREMENT_ARG_LIST (WalkState->ArgTypes);
+
+ /*
+ * Find the object. This will either insert the object into
+ * the namespace or simply look it up
+ */
+ WalkState->Op = NULL;
+
+ Status = WalkState->DescendingCallback (WalkState, Op);
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_EXCEPTION ((AE_INFO, Status, "During name lookup/catalog"));
+ return_ACPI_STATUS (Status);
+ }
+
+ if (!*Op)
+ {
+ return_ACPI_STATUS (AE_CTRL_PARSE_CONTINUE);
+ }
+
+ Status = AcpiPsNextParseState (WalkState, *Op, Status);
+ if (ACPI_FAILURE (Status))
+ {
+ if (Status == AE_CTRL_PENDING)
+ {
+ return_ACPI_STATUS (AE_CTRL_PARSE_PENDING);
+ }
+ return_ACPI_STATUS (Status);
+ }
+
+ AcpiPsAppendArg (*Op, UnnamedOp->Common.Value.Arg);
+ AcpiGbl_Depth++;
+
+ if ((*Op)->Common.AmlOpcode == AML_REGION_OP ||
+ (*Op)->Common.AmlOpcode == AML_DATA_REGION_OP)
+ {
+ /*
+ * Defer final parsing of an OperationRegion body, because we don't
+ * have enough info in the first pass to parse it correctly (i.e.,
+ * there may be method calls within the TermArg elements of the body.)
+ *
+ * However, we must continue parsing because the opregion is not a
+ * standalone package -- we don't know where the end is at this point.
+ *
+ * (Length is unknown until parse of the body complete)
+ */
+ (*Op)->Named.Data = AmlOpStart;
+ (*Op)->Named.Length = 0;
+ }
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiPsCreateOp
+ *
+ * PARAMETERS: WalkState - Current state
+ * AmlOpStart - Op start in AML
+ * NewOp - Returned Op
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Get Op from AML
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiPsCreateOp (
+ ACPI_WALK_STATE *WalkState,
+ UINT8 *AmlOpStart,
+ ACPI_PARSE_OBJECT **NewOp)
+{
+ ACPI_STATUS Status = AE_OK;
+ ACPI_PARSE_OBJECT *Op;
+ ACPI_PARSE_OBJECT *NamedOp = NULL;
+ ACPI_PARSE_OBJECT *ParentScope;
+ UINT8 ArgumentCount;
+ const ACPI_OPCODE_INFO *OpInfo;
+
+
+ ACPI_FUNCTION_TRACE_PTR (PsCreateOp, WalkState);
+
+
+ Status = AcpiPsGetAmlOpcode (WalkState);
+ if (Status == AE_CTRL_PARSE_CONTINUE)
+ {
+ return_ACPI_STATUS (AE_CTRL_PARSE_CONTINUE);
+ }
+
+ /* Create Op structure and append to parent's argument list */
+
+ WalkState->OpInfo = AcpiPsGetOpcodeInfo (WalkState->Opcode);
+ Op = AcpiPsAllocOp (WalkState->Opcode);
+ if (!Op)
+ {
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
+
+ if (WalkState->OpInfo->Flags & AML_NAMED)
+ {
+ Status = AcpiPsBuildNamedOp (WalkState, AmlOpStart, Op, &NamedOp);
+ AcpiPsFreeOp (Op);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ *NewOp = NamedOp;
+ return_ACPI_STATUS (AE_OK);
+ }
+
+ /* Not a named opcode, just allocate Op and append to parent */
+
+ if (WalkState->OpInfo->Flags & AML_CREATE)
+ {
+ /*
+ * Backup to beginning of CreateXXXfield declaration
+ * BodyLength is unknown until we parse the body
+ */
+ Op->Named.Data = AmlOpStart;
+ Op->Named.Length = 0;
+ }
+
+ if (WalkState->Opcode == AML_BANK_FIELD_OP)
+ {
+ /*
+ * Backup to beginning of BankField declaration
+ * BodyLength is unknown until we parse the body
+ */
+ Op->Named.Data = AmlOpStart;
+ Op->Named.Length = 0;
+ }
+
+ ParentScope = AcpiPsGetParentScope (&(WalkState->ParserState));
+ AcpiPsAppendArg (ParentScope, Op);
+
+ if (ParentScope)
+ {
+ OpInfo = AcpiPsGetOpcodeInfo (ParentScope->Common.AmlOpcode);
+ if (OpInfo->Flags & AML_HAS_TARGET)
+ {
+ ArgumentCount = AcpiPsGetArgumentCount (OpInfo->Type);
+ if (ParentScope->Common.ArgListLength > ArgumentCount)
+ {
+ Op->Common.Flags |= ACPI_PARSEOP_TARGET;
+ }
+ }
+ else if (ParentScope->Common.AmlOpcode == AML_INCREMENT_OP)
+ {
+ Op->Common.Flags |= ACPI_PARSEOP_TARGET;
+ }
+ }
+
+ if (WalkState->DescendingCallback != NULL)
+ {
+ /*
+ * Find the object. This will either insert the object into
+ * the namespace or simply look it up
+ */
+ WalkState->Op = *NewOp = Op;
+
+ Status = WalkState->DescendingCallback (WalkState, &Op);
+ Status = AcpiPsNextParseState (WalkState, Op, Status);
+ if (Status == AE_CTRL_PENDING)
+ {
+ Status = AE_CTRL_PARSE_PENDING;
+ }
+ }
+
+ return_ACPI_STATUS (Status);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiPsGetArguments
+ *
+ * PARAMETERS: WalkState - Current state
+ * AmlOpStart - Op start in AML
+ * Op - Current Op
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Get arguments for passed Op.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiPsGetArguments (
+ ACPI_WALK_STATE *WalkState,
+ UINT8 *AmlOpStart,
+ ACPI_PARSE_OBJECT *Op)
+{
+ ACPI_STATUS Status = AE_OK;
+ ACPI_PARSE_OBJECT *Arg = NULL;
+
+
+ ACPI_FUNCTION_TRACE_PTR (PsGetArguments, WalkState);
+
+
+ switch (Op->Common.AmlOpcode)
+ {
+ case AML_BYTE_OP: /* AML_BYTEDATA_ARG */
+ case AML_WORD_OP: /* AML_WORDDATA_ARG */
+ case AML_DWORD_OP: /* AML_DWORDATA_ARG */
+ case AML_QWORD_OP: /* AML_QWORDATA_ARG */
+ case AML_STRING_OP: /* AML_ASCIICHARLIST_ARG */
+
+ /* Fill in constant or string argument directly */
+
+ AcpiPsGetNextSimpleArg (&(WalkState->ParserState),
+ GET_CURRENT_ARG_TYPE (WalkState->ArgTypes), Op);
+ break;
+
+ case AML_INT_NAMEPATH_OP: /* AML_NAMESTRING_ARG */
+
+ Status = AcpiPsGetNextNamepath (WalkState, &(WalkState->ParserState), Op, 1);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ WalkState->ArgTypes = 0;
+ break;
+
+ default:
+ /*
+ * Op is not a constant or string, append each argument to the Op
+ */
+ while (GET_CURRENT_ARG_TYPE (WalkState->ArgTypes) && !WalkState->ArgCount)
+ {
+ WalkState->AmlOffset = (UINT32) ACPI_PTR_DIFF (WalkState->ParserState.Aml,
+ WalkState->ParserState.AmlStart);
+
+ Status = AcpiPsGetNextArg (WalkState, &(WalkState->ParserState),
+ GET_CURRENT_ARG_TYPE (WalkState->ArgTypes), &Arg);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ if (Arg)
+ {
+ Arg->Common.AmlOffset = WalkState->AmlOffset;
+ AcpiPsAppendArg (Op, Arg);
+ }
+
+ INCREMENT_ARG_LIST (WalkState->ArgTypes);
+ }
+
+
+ /* Special processing for certain opcodes */
+
+ /* TBD (remove): Temporary mechanism to disable this code if needed */
+
+#ifdef ACPI_ENABLE_MODULE_LEVEL_CODE
+
+ if ((WalkState->PassNumber <= ACPI_IMODE_LOAD_PASS1) &&
+ ((WalkState->ParseFlags & ACPI_PARSE_DISASSEMBLE) == 0))
+ {
+ /*
+ * We want to skip If/Else/While constructs during Pass1 because we
+ * want to actually conditionally execute the code during Pass2.
+ *
+ * Except for disassembly, where we always want to walk the
+ * If/Else/While packages
+ */
+ switch (Op->Common.AmlOpcode)
+ {
+ case AML_IF_OP:
+ case AML_ELSE_OP:
+ case AML_WHILE_OP:
+
+ ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
+ "Pass1: Skipping an If/Else/While body\n"));
+
+ /* Skip body of if/else/while in pass 1 */
+
+ WalkState->ParserState.Aml = WalkState->ParserState.PkgEnd;
+ WalkState->ArgCount = 0;
+ break;
+
+ default:
+ break;
+ }
+ }
+#endif
+
+ switch (Op->Common.AmlOpcode)
+ {
+ case AML_METHOD_OP:
+ /*
+ * Skip parsing of control method because we don't have enough
+ * info in the first pass to parse it correctly.
+ *
+ * Save the length and address of the body
+ */
+ Op->Named.Data = WalkState->ParserState.Aml;
+ Op->Named.Length = (UINT32)
+ (WalkState->ParserState.PkgEnd - WalkState->ParserState.Aml);
+
+ /* Skip body of method */
+
+ WalkState->ParserState.Aml = WalkState->ParserState.PkgEnd;
+ WalkState->ArgCount = 0;
+ break;
+
+ case AML_BUFFER_OP:
+ case AML_PACKAGE_OP:
+ case AML_VAR_PACKAGE_OP:
+
+ if ((Op->Common.Parent) &&
+ (Op->Common.Parent->Common.AmlOpcode == AML_NAME_OP) &&
+ (WalkState->PassNumber <= ACPI_IMODE_LOAD_PASS2))
+ {
+ /*
+ * Skip parsing of Buffers and Packages because we don't have
+ * enough info in the first pass to parse them correctly.
+ */
+ Op->Named.Data = AmlOpStart;
+ Op->Named.Length = (UINT32)
+ (WalkState->ParserState.PkgEnd - AmlOpStart);
+
+ /* Skip body */
+
+ WalkState->ParserState.Aml = WalkState->ParserState.PkgEnd;
+ WalkState->ArgCount = 0;
+ }
+ break;
+
+ case AML_WHILE_OP:
+
+ if (WalkState->ControlState)
+ {
+ WalkState->ControlState->Control.PackageEnd =
+ WalkState->ParserState.PkgEnd;
+ }
+ break;
+
+ default:
+
+ /* No action for all other opcodes */
+ break;
+ }
+
+ break;
+ }
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiPsCompleteOp
+ *
+ * PARAMETERS: WalkState - Current state
+ * Op - Returned Op
+ * Status - Parse status before complete Op
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Complete Op
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiPsCompleteOp (
+ ACPI_WALK_STATE *WalkState,
+ ACPI_PARSE_OBJECT **Op,
+ ACPI_STATUS Status)
+{
+ ACPI_STATUS Status2;
+
+
+ ACPI_FUNCTION_TRACE_PTR (PsCompleteOp, WalkState);
+
+
+ /*
+ * Finished one argument of the containing scope
+ */
+ WalkState->ParserState.Scope->ParseScope.ArgCount--;
+
+ /* Close this Op (will result in parse subtree deletion) */
+
+ Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
+ if (ACPI_FAILURE (Status2))
+ {
+ return_ACPI_STATUS (Status2);
+ }
+
+ *Op = NULL;
+
+ switch (Status)
+ {
+ case AE_OK:
+ break;
+
+
+ case AE_CTRL_TRANSFER:
+
+ /* We are about to transfer to a called method */
+
+ WalkState->PrevOp = NULL;
+ WalkState->PrevArgTypes = WalkState->ArgTypes;
+ return_ACPI_STATUS (Status);
+
+
+ case AE_CTRL_END:
+
+ AcpiPsPopScope (&(WalkState->ParserState), Op,
+ &WalkState->ArgTypes, &WalkState->ArgCount);
+
+ if (*Op)
+ {
+ WalkState->Op = *Op;
+ WalkState->OpInfo = AcpiPsGetOpcodeInfo ((*Op)->Common.AmlOpcode);
+ WalkState->Opcode = (*Op)->Common.AmlOpcode;
+
+ Status = WalkState->AscendingCallback (WalkState);
+ Status = AcpiPsNextParseState (WalkState, *Op, Status);
+
+ Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
+ if (ACPI_FAILURE (Status2))
+ {
+ return_ACPI_STATUS (Status2);
+ }
+ }
+
+ Status = AE_OK;
+ break;
+
+
+ case AE_CTRL_BREAK:
+ case AE_CTRL_CONTINUE:
+
+ /* Pop off scopes until we find the While */
+
+ while (!(*Op) || ((*Op)->Common.AmlOpcode != AML_WHILE_OP))
+ {
+ AcpiPsPopScope (&(WalkState->ParserState), Op,
+ &WalkState->ArgTypes, &WalkState->ArgCount);
+ }
+
+ /* Close this iteration of the While loop */
+
+ WalkState->Op = *Op;
+ WalkState->OpInfo = AcpiPsGetOpcodeInfo ((*Op)->Common.AmlOpcode);
+ WalkState->Opcode = (*Op)->Common.AmlOpcode;
+
+ Status = WalkState->AscendingCallback (WalkState);
+ Status = AcpiPsNextParseState (WalkState, *Op, Status);
+
+ Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
+ if (ACPI_FAILURE (Status2))
+ {
+ return_ACPI_STATUS (Status2);
+ }
+
+ Status = AE_OK;
+ break;
+
+
+ case AE_CTRL_TERMINATE:
+
+ /* Clean up */
+ do
+ {
+ if (*Op)
+ {
+ Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
+ if (ACPI_FAILURE (Status2))
+ {
+ return_ACPI_STATUS (Status2);
+ }
+
+ AcpiUtDeleteGenericState (
+ AcpiUtPopGenericState (&WalkState->ControlState));
+ }
+
+ AcpiPsPopScope (&(WalkState->ParserState), Op,
+ &WalkState->ArgTypes, &WalkState->ArgCount);
+
+ } while (*Op);
+
+ return_ACPI_STATUS (AE_OK);
+
+
+ default: /* All other non-AE_OK status */
+
+ do
+ {
+ if (*Op)
+ {
+ Status2 = AcpiPsCompleteThisOp (WalkState, *Op);
+ if (ACPI_FAILURE (Status2))
+ {
+ return_ACPI_STATUS (Status2);
+ }
+ }
+
+ AcpiPsPopScope (&(WalkState->ParserState), Op,
+ &WalkState->ArgTypes, &WalkState->ArgCount);
+
+ } while (*Op);
+
+
+#if 0
+ /*
+ * TBD: Cleanup parse ops on error
+ */
+ if (*Op == NULL)
+ {
+ AcpiPsPopScope (ParserState, Op,
+ &WalkState->ArgTypes, &WalkState->ArgCount);
+ }
+#endif
+ WalkState->PrevOp = NULL;
+ WalkState->PrevArgTypes = WalkState->ArgTypes;
+ return_ACPI_STATUS (Status);
+ }
+
+ /* This scope complete? */
+
+ if (AcpiPsHasCompletedScope (&(WalkState->ParserState)))
+ {
+ AcpiPsPopScope (&(WalkState->ParserState), Op,
+ &WalkState->ArgTypes, &WalkState->ArgCount);
+ ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Popped scope, Op=%p\n", *Op));
+ }
+ else
+ {
+ *Op = NULL;
+ }
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiPsCompleteFinalOp
+ *
+ * PARAMETERS: WalkState - Current state
+ * Op - Current Op
+ * Status - Current parse status before complete last
+ * Op
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Complete last Op.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiPsCompleteFinalOp (
+ ACPI_WALK_STATE *WalkState,
+ ACPI_PARSE_OBJECT *Op,
+ ACPI_STATUS Status)
+{
+ ACPI_STATUS Status2;
+
+
+ ACPI_FUNCTION_TRACE_PTR (PsCompleteFinalOp, WalkState);
+
+
+ /*
+ * Complete the last Op (if not completed), and clear the scope stack.
+ * It is easily possible to end an AML "package" with an unbounded number
+ * of open scopes (such as when several ASL blocks are closed with
+ * sequential closing braces). We want to terminate each one cleanly.
+ */
+ ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "AML package complete at Op %p\n", Op));
+ do
+ {
+ if (Op)
+ {
+ if (WalkState->AscendingCallback != NULL)
+ {
+ WalkState->Op = Op;
+ WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
+ WalkState->Opcode = Op->Common.AmlOpcode;
+
+ Status = WalkState->AscendingCallback (WalkState);
+ Status = AcpiPsNextParseState (WalkState, Op, Status);
+ if (Status == AE_CTRL_PENDING)
+ {
+ Status = AcpiPsCompleteOp (WalkState, &Op, AE_OK);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+ }
+
+ if (Status == AE_CTRL_TERMINATE)
+ {
+ Status = AE_OK;
+
+ /* Clean up */
+ do
+ {
+ if (Op)
+ {
+ Status2 = AcpiPsCompleteThisOp (WalkState, Op);
+ if (ACPI_FAILURE (Status2))
+ {
+ return_ACPI_STATUS (Status2);
+ }
+ }
+
+ AcpiPsPopScope (&(WalkState->ParserState), &Op,
+ &WalkState->ArgTypes, &WalkState->ArgCount);
+
+ } while (Op);
+
+ return_ACPI_STATUS (Status);
+ }
+
+ else if (ACPI_FAILURE (Status))
+ {
+ /* First error is most important */
+
+ (void) AcpiPsCompleteThisOp (WalkState, Op);
+ return_ACPI_STATUS (Status);
+ }
+ }
+
+ Status2 = AcpiPsCompleteThisOp (WalkState, Op);
+ if (ACPI_FAILURE (Status2))
+ {
+ return_ACPI_STATUS (Status2);
+ }
+ }
+
+ AcpiPsPopScope (&(WalkState->ParserState), &Op, &WalkState->ArgTypes,
+ &WalkState->ArgCount);
+
+ } while (Op);
+
+ return_ACPI_STATUS (Status);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiPsParseLoop
+ *
+ * PARAMETERS: WalkState - Current state
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Parse AML (pointed to by the current parser state) and return
+ * a tree of ops.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiPsParseLoop (
+ ACPI_WALK_STATE *WalkState)
+{
+ ACPI_STATUS Status = AE_OK;
+ ACPI_PARSE_OBJECT *Op = NULL; /* current op */
+ ACPI_PARSE_STATE *ParserState;
+ UINT8 *AmlOpStart = NULL;
+
+
+ ACPI_FUNCTION_TRACE_PTR (PsParseLoop, WalkState);
+
+
+ if (WalkState->DescendingCallback == NULL)
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
+
+ ParserState = &WalkState->ParserState;
+ WalkState->ArgTypes = 0;
+
+#if (!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY))
+
+ if (WalkState->WalkType & ACPI_WALK_METHOD_RESTART)
+ {
+ /* We are restarting a preempted control method */
+
+ if (AcpiPsHasCompletedScope (ParserState))
+ {
+ /*
+ * We must check if a predicate to an IF or WHILE statement
+ * was just completed
+ */
+ if ((ParserState->Scope->ParseScope.Op) &&
+ ((ParserState->Scope->ParseScope.Op->Common.AmlOpcode == AML_IF_OP) ||
+ (ParserState->Scope->ParseScope.Op->Common.AmlOpcode == AML_WHILE_OP)) &&
+ (WalkState->ControlState) &&
+ (WalkState->ControlState->Common.State ==
+ ACPI_CONTROL_PREDICATE_EXECUTING))
+ {
+ /*
+ * A predicate was just completed, get the value of the
+ * predicate and branch based on that value
+ */
+ WalkState->Op = NULL;
+ Status = AcpiDsGetPredicateValue (WalkState, ACPI_TO_POINTER (TRUE));
+ if (ACPI_FAILURE (Status) &&
+ ((Status & AE_CODE_MASK) != AE_CODE_CONTROL))
+ {
+ if (Status == AE_AML_NO_RETURN_VALUE)
+ {
+ ACPI_EXCEPTION ((AE_INFO, Status,
+ "Invoked method did not return a value"));
+
+ }
+
+ ACPI_EXCEPTION ((AE_INFO, Status, "GetPredicate Failed"));
+ return_ACPI_STATUS (Status);
+ }
+
+ Status = AcpiPsNextParseState (WalkState, Op, Status);
+ }
+
+ AcpiPsPopScope (ParserState, &Op,
+ &WalkState->ArgTypes, &WalkState->ArgCount);
+ ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "Popped scope, Op=%p\n", Op));
+ }
+ else if (WalkState->PrevOp)
+ {
+ /* We were in the middle of an op */
+
+ Op = WalkState->PrevOp;
+ WalkState->ArgTypes = WalkState->PrevArgTypes;
+ }
+ }
+#endif
+
+ /* Iterative parsing loop, while there is more AML to process: */
+
+ while ((ParserState->Aml < ParserState->AmlEnd) || (Op))
+ {
+ AmlOpStart = ParserState->Aml;
+ if (!Op)
+ {
+ Status = AcpiPsCreateOp (WalkState, AmlOpStart, &Op);
+ if (ACPI_FAILURE (Status))
+ {
+ if (Status == AE_CTRL_PARSE_CONTINUE)
+ {
+ continue;
+ }
+
+ if (Status == AE_CTRL_PARSE_PENDING)
+ {
+ Status = AE_OK;
+ }
+
+ Status = AcpiPsCompleteOp (WalkState, &Op, Status);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ continue;
+ }
+
+ Op->Common.AmlOffset = WalkState->AmlOffset;
+
+ if (WalkState->OpInfo)
+ {
+ ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
+ "Opcode %4.4X [%s] Op %p Aml %p AmlOffset %5.5X\n",
+ (UINT32) Op->Common.AmlOpcode, WalkState->OpInfo->Name,
+ Op, ParserState->Aml, Op->Common.AmlOffset));
+ }
+ }
+
+
+ /*
+ * Start ArgCount at zero because we don't know if there are
+ * any args yet
+ */
+ WalkState->ArgCount = 0;
+
+ /* Are there any arguments that must be processed? */
+
+ if (WalkState->ArgTypes)
+ {
+ /* Get arguments */
+
+ Status = AcpiPsGetArguments (WalkState, AmlOpStart, Op);
+ if (ACPI_FAILURE (Status))
+ {
+ Status = AcpiPsCompleteOp (WalkState, &Op, Status);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ continue;
+ }
+ }
+
+ /* Check for arguments that need to be processed */
+
+ if (WalkState->ArgCount)
+ {
+ /*
+ * There are arguments (complex ones), push Op and
+ * prepare for argument
+ */
+ Status = AcpiPsPushScope (ParserState, Op,
+ WalkState->ArgTypes, WalkState->ArgCount);
+ if (ACPI_FAILURE (Status))
+ {
+ Status = AcpiPsCompleteOp (WalkState, &Op, Status);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ continue;
+ }
+
+ Op = NULL;
+ continue;
+ }
+
+ /*
+ * All arguments have been processed -- Op is complete,
+ * prepare for next
+ */
+ WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
+ if (WalkState->OpInfo->Flags & AML_NAMED)
+ {
+ if (AcpiGbl_Depth)
+ {
+ AcpiGbl_Depth--;
+ }
+
+ if (Op->Common.AmlOpcode == AML_REGION_OP ||
+ Op->Common.AmlOpcode == AML_DATA_REGION_OP)
+ {
+ /*
+ * Skip parsing of control method or opregion body,
+ * because we don't have enough info in the first pass
+ * to parse them correctly.
+ *
+ * Completed parsing an OpRegion declaration, we now
+ * know the length.
+ */
+ Op->Named.Length = (UINT32) (ParserState->Aml - Op->Named.Data);
+ }
+ }
+
+ if (WalkState->OpInfo->Flags & AML_CREATE)
+ {
+ /*
+ * Backup to beginning of CreateXXXfield declaration (1 for
+ * Opcode)
+ *
+ * BodyLength is unknown until we parse the body
+ */
+ Op->Named.Length = (UINT32) (ParserState->Aml - Op->Named.Data);
+ }
+
+ if (Op->Common.AmlOpcode == AML_BANK_FIELD_OP)
+ {
+ /*
+ * Backup to beginning of BankField declaration
+ *
+ * BodyLength is unknown until we parse the body
+ */
+ Op->Named.Length = (UINT32) (ParserState->Aml - Op->Named.Data);
+ }
+
+ /* This op complete, notify the dispatcher */
+
+ if (WalkState->AscendingCallback != NULL)
+ {
+ WalkState->Op = Op;
+ WalkState->Opcode = Op->Common.AmlOpcode;
+
+ Status = WalkState->AscendingCallback (WalkState);
+ Status = AcpiPsNextParseState (WalkState, Op, Status);
+ if (Status == AE_CTRL_PENDING)
+ {
+ Status = AE_OK;
+ }
+ }
+
+ Status = AcpiPsCompleteOp (WalkState, &Op, Status);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ } /* while ParserState->Aml */
+
+ Status = AcpiPsCompleteFinalOp (WalkState, Op, Status);
+ return_ACPI_STATUS (Status);
+}
+
diff --git a/usr/src/uts/intel/io/acpica/interpreter/parser/psopcode.c b/usr/src/uts/intel/io/acpica/parser/psopcode.c
index 833073f612..0f5086e0f2 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/parser/psopcode.c
+++ b/usr/src/uts/intel/io/acpica/parser/psopcode.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psopcode - Parser/Interpreter opcode information table
- * $Revision: 1.97 $
+ * $Revision: 1.103 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -125,6 +125,9 @@
ACPI_MODULE_NAME ("psopcode")
+static const UINT8 AcpiGbl_ArgumentCount[] = {0,1,1,1,1,2,2,2,2,3,3,6};
+
+
/*******************************************************************************
*
* NAME: AcpiGbl_AmlOpInfo
@@ -362,7 +365,7 @@ const ACPI_OPCODE_INFO AcpiGbl_AmlOpInfo[AML_NUM_OPCODES] =
/* 5C */ ACPI_OP ("PowerResource", ARGP_POWER_RES_OP, ARGI_POWER_RES_OP, ACPI_TYPE_POWER, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_SIMPLE, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
/* 5D */ ACPI_OP ("ThermalZone", ARGP_THERMAL_ZONE_OP, ARGI_THERMAL_ZONE_OP, ACPI_TYPE_THERMAL, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_NO_OBJ, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
/* 5E */ ACPI_OP ("IndexField", ARGP_INDEX_FIELD_OP, ARGI_INDEX_FIELD_OP, ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_FIELD, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD),
-/* 5F */ ACPI_OP ("BankField", ARGP_BANK_FIELD_OP, ARGI_BANK_FIELD_OP, ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_FIELD, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD),
+/* 5F */ ACPI_OP ("BankField", ARGP_BANK_FIELD_OP, ARGI_BANK_FIELD_OP, ACPI_TYPE_LOCAL_BANK_FIELD, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_FIELD, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_FIELD | AML_DEFER),
/* Internal opcodes that map to invalid AML opcodes */
@@ -397,7 +400,7 @@ const ACPI_OPCODE_INFO AcpiGbl_AmlOpInfo[AML_NUM_OPCODES] =
/* 79 */ ACPI_OP ("Mid", ARGP_MID_OP, ARGI_MID_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_3A_1T_1R, AML_FLAGS_EXEC_3A_1T_1R | AML_CONSTANT),
/* 7A */ ACPI_OP ("Continue", ARGP_CONTINUE_OP, ARGI_CONTINUE_OP, ACPI_TYPE_ANY, AML_CLASS_CONTROL, AML_TYPE_CONTROL, 0),
/* 7B */ ACPI_OP ("LoadTable", ARGP_LOAD_TABLE_OP, ARGI_LOAD_TABLE_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_6A_0T_1R, AML_FLAGS_EXEC_6A_0T_1R),
-/* 7C */ ACPI_OP ("DataTableRegion", ARGP_DATA_REGION_OP, ARGI_DATA_REGION_OP, ACPI_TYPE_REGION, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_SIMPLE, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED),
+/* 7C */ ACPI_OP ("DataTableRegion", ARGP_DATA_REGION_OP, ARGI_DATA_REGION_OP, ACPI_TYPE_REGION, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_COMPLEX, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED | AML_DEFER),
/* 7D */ ACPI_OP ("[EvalSubTree]", ARGP_SCOPE_OP, ARGI_SCOPE_OP, ACPI_TYPE_ANY, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_NO_OBJ, AML_HAS_ARGS | AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE),
/* ACPI 3.0 opcodes */
@@ -559,3 +562,28 @@ AcpiPsGetOpcodeName (
#endif
}
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiPsGetArgumentCount
+ *
+ * PARAMETERS: OpType - Type associated with the AML opcode
+ *
+ * RETURN: Argument count
+ *
+ * DESCRIPTION: Obtain the number of expected arguments for an AML opcode
+ *
+ ******************************************************************************/
+
+UINT8
+AcpiPsGetArgumentCount (
+ UINT32 OpType)
+{
+
+ if (OpType <= AML_TYPE_EXEC_6A_0T_1R)
+ {
+ return (AcpiGbl_ArgumentCount[OpType]);
+ }
+
+ return (0);
+}
diff --git a/usr/src/uts/intel/io/acpica/interpreter/parser/psparse.c b/usr/src/uts/intel/io/acpica/parser/psparse.c
index 6bf7fdc7c5..135111966d 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/parser/psparse.c
+++ b/usr/src/uts/intel/io/acpica/parser/psparse.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psparse - Parser top level AML parse routines
- * $Revision: 1.168 $
+ * $Revision: 1.176 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -288,6 +288,7 @@ AcpiPsCompleteThisOp (
(Op->Common.Parent->Common.AmlOpcode == AML_DATA_REGION_OP) ||
(Op->Common.Parent->Common.AmlOpcode == AML_BUFFER_OP) ||
(Op->Common.Parent->Common.AmlOpcode == AML_PACKAGE_OP) ||
+ (Op->Common.Parent->Common.AmlOpcode == AML_BANK_FIELD_OP) ||
(Op->Common.Parent->Common.AmlOpcode == AML_VAR_PACKAGE_OP))
{
ReplacementOp = AcpiPsAllocOp (AML_INT_RETURN_VALUE_OP);
@@ -434,22 +435,14 @@ AcpiPsNextParseState (
ParserState->Aml = WalkState->AmlLastWhile;
WalkState->ControlState->Common.Value = FALSE;
- Status = AcpiDsResultStackPop (WalkState);
- if (ACPI_SUCCESS (Status))
- {
- Status = AE_CTRL_BREAK;
- }
+ Status = AE_CTRL_BREAK;
break;
case AE_CTRL_CONTINUE:
ParserState->Aml = WalkState->AmlLastWhile;
- Status = AcpiDsResultStackPop (WalkState);
- if (ACPI_SUCCESS (Status))
- {
- Status = AE_CTRL_CONTINUE;
- }
+ Status = AE_CTRL_CONTINUE;
break;
@@ -472,11 +465,7 @@ AcpiPsNextParseState (
* Just close out this package
*/
ParserState->Aml = AcpiPsGetNextPackageEnd (ParserState);
- Status = AcpiDsResultStackPop (WalkState);
- if (ACPI_SUCCESS (Status))
- {
- Status = AE_CTRL_PENDING;
- }
+ Status = AE_CTRL_PENDING;
break;
@@ -642,6 +631,10 @@ AcpiPsParseAml (
if ((Status == AE_ALREADY_EXISTS) &&
(!WalkState->MethodDesc->Method.Mutex))
{
+ ACPI_INFO ((AE_INFO,
+ "Marking method %4.4s as Serialized because of AE_ALREADY_EXISTS error",
+ WalkState->MethodNode->Name.Ascii));
+
/*
* Method tried to create an object twice. The probable cause is
* that the method cannot handle reentrancy.
@@ -698,6 +691,25 @@ AcpiPsParseAml (
*/
if (!PreviousWalkState->ReturnDesc)
{
+ /*
+ * In slack mode execution, if there is no return value
+ * we should implicitly return zero (0) as a default value.
+ */
+ if (AcpiGbl_EnableInterpreterSlack &&
+ !PreviousWalkState->ImplicitReturnObj)
+ {
+ PreviousWalkState->ImplicitReturnObj =
+ AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER);
+ if (!PreviousWalkState->ImplicitReturnObj)
+ {
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
+
+ PreviousWalkState->ImplicitReturnObj->Integer.Value = 0;
+ }
+
+ /* Restart the calling control method */
+
Status = AcpiDsRestartControlMethod (WalkState,
PreviousWalkState->ImplicitReturnObj);
}
diff --git a/usr/src/uts/intel/io/acpica/interpreter/parser/psscope.c b/usr/src/uts/intel/io/acpica/parser/psscope.c
index aa57aa3bc5..25ac459e33 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/parser/psscope.c
+++ b/usr/src/uts/intel/io/acpica/parser/psscope.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psscope - Parser scope stack management routines
- * $Revision: 1.46 $
+ * $Revision: 1.48 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/io/acpica/interpreter/parser/pstree.c b/usr/src/uts/intel/io/acpica/parser/pstree.c
index d7f62ebecc..22a12cb74d 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/parser/pstree.c
+++ b/usr/src/uts/intel/io/acpica/parser/pstree.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: pstree - Parser op tree manipulation/traversal/search
- * $Revision: 1.49 $
+ * $Revision: 1.52 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -267,6 +267,8 @@ AcpiPsAppendArg (
{
Arg->Common.Parent = Op;
Arg = Arg->Common.Next;
+
+ Op->Common.ArgListLength++;
}
}
diff --git a/usr/src/uts/intel/io/acpica/interpreter/parser/psutils.c b/usr/src/uts/intel/io/acpica/parser/psutils.c
index 63105b4615..5c329a2d56 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/parser/psutils.c
+++ b/usr/src/uts/intel/io/acpica/parser/psutils.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psutils - Parser miscellaneous utilities (Parser only)
- * $Revision: 1.69 $
+ * $Revision: 1.71 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/io/acpica/interpreter/parser/pswalk.c b/usr/src/uts/intel/io/acpica/parser/pswalk.c
index 439f842b53..5944635293 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/parser/pswalk.c
+++ b/usr/src/uts/intel/io/acpica/parser/pswalk.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: pswalk - Parser routines to walk parsed op tree(s)
- * $Revision: 1.77 $
+ * $Revision: 1.79 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/io/acpica/interpreter/parser/psxface.c b/usr/src/uts/intel/io/acpica/parser/psxface.c
index ac1dbdb6f6..a68171397c 100644
--- a/usr/src/uts/intel/io/acpica/interpreter/parser/psxface.c
+++ b/usr/src/uts/intel/io/acpica/parser/psxface.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: psxface - Parser external interfaces
- * $Revision: 1.90 $
+ * $Revision: 1.94 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -135,10 +135,6 @@ static void
AcpiPsStopTrace (
ACPI_EVALUATE_INFO *Info);
-static ACPI_STATUS
-AcpiPsExecutePass (
- ACPI_EVALUATE_INFO *Info);
-
static void
AcpiPsUpdateParameterList (
ACPI_EVALUATE_INFO *Info,
@@ -330,6 +326,8 @@ AcpiPsExecuteMethod (
ACPI_EVALUATE_INFO *Info)
{
ACPI_STATUS Status;
+ ACPI_PARSE_OBJECT *Op;
+ ACPI_WALK_STATE *WalkState;
ACPI_FUNCTION_TRACE (PsExecuteMethod);
@@ -351,8 +349,7 @@ AcpiPsExecuteMethod (
}
/*
- * The caller "owns" the parameters, so give each one an extra
- * reference
+ * The caller "owns" the parameters, so give each one an extra reference
*/
AcpiPsUpdateParameterList (Info, REF_INCREMENT);
@@ -361,32 +358,50 @@ AcpiPsExecuteMethod (
AcpiPsStartTrace (Info);
/*
- * 1) Perform the first pass parse of the method to enter any
- * named objects that it creates into the namespace
+ * Execute the method. Performs parse simultaneously
*/
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
- "**** Begin Method Parse **** Entry=%p obj=%p\n",
- Info->ResolvedNode, Info->ObjDesc));
+ "**** Begin Method Parse/Execute [%4.4s] **** Node=%p Obj=%p\n",
+ Info->ResolvedNode->Name.Ascii, Info->ResolvedNode, Info->ObjDesc));
+
+ /* Create and init a Root Node */
+
+ Op = AcpiPsCreateScopeOp ();
+ if (!Op)
+ {
+ Status = AE_NO_MEMORY;
+ goto Cleanup;
+ }
+
+ /* Create and initialize a new walk state */
- Info->PassNumber = 1;
- Status = AcpiPsExecutePass (Info);
+ Info->PassNumber = ACPI_IMODE_EXECUTE;
+ WalkState = AcpiDsCreateWalkState (
+ Info->ObjDesc->Method.OwnerId, NULL, NULL, NULL);
+ if (!WalkState)
+ {
+ Status = AE_NO_MEMORY;
+ goto Cleanup;
+ }
+
+ Status = AcpiDsInitAmlWalk (WalkState, Op, Info->ResolvedNode,
+ Info->ObjDesc->Method.AmlStart,
+ Info->ObjDesc->Method.AmlLength, Info, Info->PassNumber);
if (ACPI_FAILURE (Status))
{
+ AcpiDsDeleteWalkState (WalkState);
goto Cleanup;
}
- /*
- * 2) Execute the method. Performs second pass parse simultaneously
- */
- ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
- "**** Begin Method Execution **** Entry=%p obj=%p\n",
- Info->ResolvedNode, Info->ObjDesc));
+ /* Parse the AML */
- Info->PassNumber = 3;
- Status = AcpiPsExecutePass (Info);
+ Status = AcpiPsParseAml (WalkState);
+ /* WalkState was deleted by ParseAml */
Cleanup:
+ AcpiPsDeleteParseTree (Op);
+
/* End optional tracing */
AcpiPsStopTrace (Info);
@@ -438,11 +453,10 @@ AcpiPsUpdateParameterList (
ACPI_EVALUATE_INFO *Info,
UINT16 Action)
{
- ACPI_NATIVE_UINT i;
+ UINT32 i;
- if ((Info->ParameterType == ACPI_PARAM_ARGS) &&
- (Info->Parameters))
+ if (Info->Parameters)
{
/* Update reference count for each parameter */
@@ -456,69 +470,3 @@ AcpiPsUpdateParameterList (
}
-/*******************************************************************************
- *
- * FUNCTION: AcpiPsExecutePass
- *
- * PARAMETERS: Info - See ACPI_EVALUATE_INFO
- * (Used: PassNumber, Node, and ObjDesc)
- *
- * RETURN: Status
- *
- * DESCRIPTION: Single AML pass: Parse or Execute a control method
- *
- ******************************************************************************/
-
-static ACPI_STATUS
-AcpiPsExecutePass (
- ACPI_EVALUATE_INFO *Info)
-{
- ACPI_STATUS Status;
- ACPI_PARSE_OBJECT *Op;
- ACPI_WALK_STATE *WalkState;
-
-
- ACPI_FUNCTION_TRACE (PsExecutePass);
-
-
- /* Create and init a Root Node */
-
- Op = AcpiPsCreateScopeOp ();
- if (!Op)
- {
- return_ACPI_STATUS (AE_NO_MEMORY);
- }
-
- /* Create and initialize a new walk state */
-
- WalkState = AcpiDsCreateWalkState (
- Info->ObjDesc->Method.OwnerId, NULL, NULL, NULL);
- if (!WalkState)
- {
- Status = AE_NO_MEMORY;
- goto Cleanup;
- }
-
- Status = AcpiDsInitAmlWalk (WalkState, Op, Info->ResolvedNode,
- Info->ObjDesc->Method.AmlStart,
- Info->ObjDesc->Method.AmlLength,
- Info->PassNumber == 1 ? NULL : Info,
- Info->PassNumber);
- if (ACPI_FAILURE (Status))
- {
- AcpiDsDeleteWalkState (WalkState);
- goto Cleanup;
- }
-
- /* Parse the AML */
-
- Status = AcpiPsParseAml (WalkState);
-
- /* Walk state was deleted by ParseAml */
-
-Cleanup:
- AcpiPsDeleteParseTree (Op);
- return_ACPI_STATUS (Status);
-}
-
-
diff --git a/usr/src/uts/intel/io/acpica/resources/rsaddr.c b/usr/src/uts/intel/io/acpica/resources/rsaddr.c
index 5172e77f1b..a51156e608 100644
--- a/usr/src/uts/intel/io/acpica/resources/rsaddr.c
+++ b/usr/src/uts/intel/io/acpica/resources/rsaddr.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsaddr - Address resource descriptors (16/32/64)
- * $Revision: 1.49 $
+ * $Revision: 1.51 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/io/acpica/resources/rscalc.c b/usr/src/uts/intel/io/acpica/resources/rscalc.c
index 97fd5a3e71..cb8973a7ee 100644
--- a/usr/src/uts/intel/io/acpica/resources/rscalc.c
+++ b/usr/src/uts/intel/io/acpica/resources/rscalc.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rscalc - Calculate stream and list lengths
- * $Revision: 1.79 $
+ * $Revision: 1.84 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -118,9 +118,9 @@
#include "acpi.h"
#include "acresrc.h"
-#include "amlcode.h"
#include "acnamesp.h"
+
#define _COMPONENT ACPI_RESOURCES
ACPI_MODULE_NAME ("rscalc")
@@ -168,7 +168,7 @@ AcpiRsCountSetBits (
{
/* Zero the least significant bit that is set */
- BitField &= (BitField - 1);
+ BitField &= (UINT16) (BitField - 1);
}
return (BitsSet);
@@ -312,6 +312,28 @@ AcpiRsGetAmlLength (
*/
switch (Resource->Type)
{
+ case ACPI_RESOURCE_TYPE_IRQ:
+
+ /* Length can be 3 or 2 */
+
+ if (Resource->Data.Irq.DescriptorLength == 2)
+ {
+ TotalSize--;
+ }
+ break;
+
+
+ case ACPI_RESOURCE_TYPE_START_DEPENDENT:
+
+ /* Length can be 1 or 0 */
+
+ if (Resource->Data.Irq.DescriptorLength == 0)
+ {
+ TotalSize--;
+ }
+ break;
+
+
case ACPI_RESOURCE_TYPE_VENDOR:
/*
* Vendor Defined Resource:
@@ -654,8 +676,8 @@ AcpiRsGetPciRoutingTableLength (
((ACPI_TYPE_LOCAL_REFERENCE ==
ACPI_GET_OBJECT_TYPE (*SubObjectList)) &&
- ((*SubObjectList)->Reference.Opcode ==
- AML_INT_NAMEPATH_OP))))
+ ((*SubObjectList)->Reference.Class ==
+ ACPI_REFCLASS_NAME))))
{
NameFound = TRUE;
}
@@ -686,6 +708,10 @@ AcpiRsGetPciRoutingTableLength (
{
TempSizeNeeded += AcpiNsGetPathnameLength (
(*SubObjectList)->Reference.Node);
+ if (!TempSizeNeeded)
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
}
}
else
diff --git a/usr/src/uts/intel/io/acpica/resources/rscreate.c b/usr/src/uts/intel/io/acpica/resources/rscreate.c
index 1cb836adc7..9665fbadd6 100644
--- a/usr/src/uts/intel/io/acpica/resources/rscreate.c
+++ b/usr/src/uts/intel/io/acpica/resources/rscreate.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rscreate - Create resource lists/tables
- * $Revision: 1.77 $
+ * $Revision: 1.79 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -114,12 +114,10 @@
*
*****************************************************************************/
-
#define __RSCREATE_C__
#include "acpi.h"
#include "acresrc.h"
-#include "amlcode.h"
#include "acnamesp.h"
#define _COMPONENT ACPI_RESOURCES
@@ -271,9 +269,9 @@ AcpiRsCreatePciRoutingTable (
}
/*
- * Loop through the ACPI_INTERNAL_OBJECTS - Each object
- * should be a package that in turn contains an
- * ACPI_INTEGER Address, a UINT8 Pin, a Name and a UINT8 SourceIndex.
+ * Loop through the ACPI_INTERNAL_OBJECTS - Each object should be a
+ * package that in turn contains an ACPI_INTEGER Address, a UINT8 Pin,
+ * a Name, and a UINT8 SourceIndex.
*/
TopObjectList = PackageObject->Package.Elements;
NumberOfElements = PackageObject->Package.Count;
@@ -328,33 +326,44 @@ AcpiRsCreatePciRoutingTable (
/* 1) First subobject: Dereference the PRT.Address */
ObjDesc = SubObjectList[0];
- if (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_INTEGER)
- {
- UserPrt->Address = ObjDesc->Integer.Value;
- }
- else
+ if (ACPI_GET_OBJECT_TYPE (ObjDesc) != ACPI_TYPE_INTEGER)
{
- ACPI_ERROR ((AE_INFO,
- "(PRT[%X].Address) Need Integer, found %s",
+ ACPI_ERROR ((AE_INFO, "(PRT[%X].Address) Need Integer, found %s",
Index, AcpiUtGetObjectTypeName (ObjDesc)));
return_ACPI_STATUS (AE_BAD_DATA);
}
+ UserPrt->Address = ObjDesc->Integer.Value;
+
/* 2) Second subobject: Dereference the PRT.Pin */
ObjDesc = SubObjectList[1];
- if (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_INTEGER)
+ if (ACPI_GET_OBJECT_TYPE (ObjDesc) != ACPI_TYPE_INTEGER)
{
- UserPrt->Pin = (UINT32) ObjDesc->Integer.Value;
- }
- else
- {
- ACPI_ERROR ((AE_INFO,
- "(PRT[%X].Pin) Need Integer, found %s",
+ ACPI_ERROR ((AE_INFO, "(PRT[%X].Pin) Need Integer, found %s",
Index, AcpiUtGetObjectTypeName (ObjDesc)));
return_ACPI_STATUS (AE_BAD_DATA);
}
+ UserPrt->Pin = (UINT32) ObjDesc->Integer.Value;
+
+ /*
+ * If the BIOS has erroneously reversed the _PRT SourceName (index 2)
+ * and the SourceIndex (index 3), fix it. _PRT is important enough to
+ * workaround this BIOS error. This also provides compatibility with
+ * other ACPI implementations.
+ */
+ ObjDesc = SubObjectList[3];
+ if (!ObjDesc || (ACPI_GET_OBJECT_TYPE (ObjDesc) != ACPI_TYPE_INTEGER))
+ {
+ SubObjectList[3] = SubObjectList[2];
+ SubObjectList[2] = ObjDesc;
+
+ ACPI_WARNING ((AE_INFO,
+ "(PRT[%X].Source) SourceName and SourceIndex are reversed, fixed",
+ Index));
+ }
+
/*
* 3) Third subobject: Dereference the PRT.SourceName
* The name may be unresolved (slack mode), so allow a null object
@@ -366,11 +375,11 @@ AcpiRsCreatePciRoutingTable (
{
case ACPI_TYPE_LOCAL_REFERENCE:
- if (ObjDesc->Reference.Opcode != AML_INT_NAMEPATH_OP)
+ if (ObjDesc->Reference.Class != ACPI_REFCLASS_NAME)
{
ACPI_ERROR ((AE_INFO,
- "(PRT[%X].Source) Need name, found reference op %X",
- Index, ObjDesc->Reference.Opcode));
+ "(PRT[%X].Source) Need name, found Reference Class %X",
+ Index, ObjDesc->Reference.Class));
return_ACPI_STATUS (AE_BAD_DATA);
}
@@ -430,11 +439,7 @@ AcpiRsCreatePciRoutingTable (
/* 4) Fourth subobject: Dereference the PRT.SourceIndex */
ObjDesc = SubObjectList[3];
- if (ACPI_GET_OBJECT_TYPE (ObjDesc) == ACPI_TYPE_INTEGER)
- {
- UserPrt->SourceIndex = (UINT32) ObjDesc->Integer.Value;
- }
- else
+ if (ACPI_GET_OBJECT_TYPE (ObjDesc) != ACPI_TYPE_INTEGER)
{
ACPI_ERROR ((AE_INFO,
"(PRT[%X].SourceIndex) Need Integer, found %s",
@@ -442,6 +447,8 @@ AcpiRsCreatePciRoutingTable (
return_ACPI_STATUS (AE_BAD_DATA);
}
+ UserPrt->SourceIndex = (UINT32) ObjDesc->Integer.Value;
+
/* Point to the next ACPI_OPERAND_OBJECT in the top level package */
TopObjectList++;
diff --git a/usr/src/uts/intel/io/acpica/resources/rsdump.c b/usr/src/uts/intel/io/acpica/resources/rsdump.c
index 1f90cf7b42..a6784d2a8d 100644
--- a/usr/src/uts/intel/io/acpica/resources/rsdump.c
+++ b/usr/src/uts/intel/io/acpica/resources/rsdump.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsdump - Functions to display the resource structures.
- * $Revision: 1.61 $
+ * $Revision: 1.64 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -200,9 +200,10 @@ AcpiRsDumpDescriptor (
*
******************************************************************************/
-ACPI_RSDUMP_INFO AcpiRsDumpIrq[6] =
+ACPI_RSDUMP_INFO AcpiRsDumpIrq[7] =
{
{ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpIrq), "IRQ", NULL},
+ {ACPI_RSD_UINT8 , ACPI_RSD_OFFSET (Irq.DescriptorLength), "Descriptor Length", NULL},
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (Irq.Triggering), "Triggering", AcpiGbl_HeDecode},
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (Irq.Polarity), "Polarity", AcpiGbl_LlDecode},
{ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (Irq.Sharable), "Sharing", AcpiGbl_ShrDecode},
@@ -220,9 +221,10 @@ ACPI_RSDUMP_INFO AcpiRsDumpDma[6] =
{ACPI_RSD_SHORTLIST,ACPI_RSD_OFFSET (Dma.Channels[0]), "Channel List", NULL}
};
-ACPI_RSDUMP_INFO AcpiRsDumpStartDpf[3] =
+ACPI_RSDUMP_INFO AcpiRsDumpStartDpf[4] =
{
{ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE (AcpiRsDumpStartDpf), "Start-Dependent-Functions",NULL},
+ {ACPI_RSD_UINT8 , ACPI_RSD_OFFSET (StartDpf.DescriptorLength), "Descriptor Length", NULL},
{ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (StartDpf.CompatibilityPriority), "Compatibility Priority", AcpiGbl_ConfigDecode},
{ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (StartDpf.PerformanceRobustness), "Performance/Robustness", AcpiGbl_ConfigDecode}
};
diff --git a/usr/src/uts/intel/io/acpica/resources/rsinfo.c b/usr/src/uts/intel/io/acpica/resources/rsinfo.c
index e731c5413c..4bab1cde3c 100644
--- a/usr/src/uts/intel/io/acpica/resources/rsinfo.c
+++ b/usr/src/uts/intel/io/acpica/resources/rsinfo.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsinfo - Dispatch and Info tables
- * $Revision: 1.7 $
+ * $Revision: 1.9 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/io/acpica/resources/rsio.c b/usr/src/uts/intel/io/acpica/resources/rsio.c
index 8cbc3c06c1..7c5deea1ef 100644
--- a/usr/src/uts/intel/io/acpica/resources/rsio.c
+++ b/usr/src/uts/intel/io/acpica/resources/rsio.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsio - IO and DMA resource descriptors
- * $Revision: 1.34 $
+ * $Revision: 1.38 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -272,7 +272,7 @@ ACPI_RSCONVERT_INFO AcpiRsConvertEndTag[2] =
*
******************************************************************************/
-ACPI_RSCONVERT_INFO AcpiRsGetStartDpf[5] =
+ACPI_RSCONVERT_INFO AcpiRsGetStartDpf[6] =
{
{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_START_DEPENDENT,
ACPI_RS_SIZE (ACPI_RESOURCE_START_DEPENDENT),
@@ -284,6 +284,12 @@ ACPI_RSCONVERT_INFO AcpiRsGetStartDpf[5] =
ACPI_ACCEPTABLE_CONFIGURATION,
2},
+ /* Get the descriptor length (0 or 1 for Start Dpf descriptor) */
+
+ {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.StartDpf.DescriptorLength),
+ AML_OFFSET (StartDpf.DescriptorType),
+ 0},
+
/* All done if there is no flag byte present in the descriptor */
{ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_AML_LENGTH, 0, 1},
@@ -306,8 +312,10 @@ ACPI_RSCONVERT_INFO AcpiRsGetStartDpf[5] =
*
******************************************************************************/
-ACPI_RSCONVERT_INFO AcpiRsSetStartDpf[6] =
+ACPI_RSCONVERT_INFO AcpiRsSetStartDpf[10] =
{
+ /* Start with a default descriptor of length 1 */
+
{ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_START_DEPENDENT,
sizeof (AML_RESOURCE_START_DEPENDENT),
ACPI_RSC_TABLE_SIZE (AcpiRsSetStartDpf)},
@@ -322,6 +330,33 @@ ACPI_RSCONVERT_INFO AcpiRsSetStartDpf[6] =
AML_OFFSET (StartDpf.Flags),
2},
/*
+ * All done if the output descriptor length is required to be 1
+ * (i.e., optimization to 0 bytes cannot be attempted)
+ */
+ {ACPI_RSC_EXIT_EQ, ACPI_RSC_COMPARE_VALUE,
+ ACPI_RS_OFFSET(Data.StartDpf.DescriptorLength),
+ 1},
+
+ /* Set length to 0 bytes (no flags byte) */
+
+ {ACPI_RSC_LENGTH, 0, 0, sizeof (AML_RESOURCE_START_DEPENDENT_NOPRIO)},
+
+ /*
+ * All done if the output descriptor length is required to be 0.
+ *
+ * TBD: Perhaps we should check for error if input flags are not
+ * compatible with a 0-byte descriptor.
+ */
+ {ACPI_RSC_EXIT_EQ, ACPI_RSC_COMPARE_VALUE,
+ ACPI_RS_OFFSET(Data.StartDpf.DescriptorLength),
+ 0},
+
+ /* Reset length to 1 byte (descriptor with flags byte) */
+
+ {ACPI_RSC_LENGTH, 0, 0, sizeof (AML_RESOURCE_START_DEPENDENT)},
+
+
+ /*
* All done if flags byte is necessary -- if either priority value
* is not ACPI_ACCEPTABLE_CONFIGURATION
*/
diff --git a/usr/src/uts/intel/io/acpica/resources/rsirq.c b/usr/src/uts/intel/io/acpica/resources/rsirq.c
index bfd15936bd..d4afc91e56 100644
--- a/usr/src/uts/intel/io/acpica/resources/rsirq.c
+++ b/usr/src/uts/intel/io/acpica/resources/rsirq.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsirq - IRQ resource descriptors
- * $Revision: 1.49 $
+ * $Revision: 1.52 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -129,7 +129,7 @@
*
******************************************************************************/
-ACPI_RSCONVERT_INFO AcpiRsGetIrq[7] =
+ACPI_RSCONVERT_INFO AcpiRsGetIrq[8] =
{
{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_IRQ,
ACPI_RS_SIZE (ACPI_RESOURCE_IRQ),
@@ -147,6 +147,12 @@ ACPI_RSCONVERT_INFO AcpiRsGetIrq[7] =
ACPI_EDGE_SENSITIVE,
1},
+ /* Get the descriptor length (2 or 3 for IRQ descriptor) */
+
+ {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.Irq.DescriptorLength),
+ AML_OFFSET (Irq.DescriptorType),
+ 0},
+
/* All done if no flag byte present in descriptor */
{ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_AML_LENGTH, 0, 3},
@@ -173,8 +179,10 @@ ACPI_RSCONVERT_INFO AcpiRsGetIrq[7] =
*
******************************************************************************/
-ACPI_RSCONVERT_INFO AcpiRsSetIrq[9] =
+ACPI_RSCONVERT_INFO AcpiRsSetIrq[13] =
{
+ /* Start with a default descriptor of length 3 */
+
{ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_IRQ,
sizeof (AML_RESOURCE_IRQ),
ACPI_RSC_TABLE_SIZE (AcpiRsSetIrq)},
@@ -185,7 +193,7 @@ ACPI_RSCONVERT_INFO AcpiRsSetIrq[9] =
AML_OFFSET (Irq.IrqMask),
ACPI_RS_OFFSET (Data.Irq.InterruptCount)},
- /* Set the flags byte by default */
+ /* Set the flags byte */
{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Irq.Triggering),
AML_OFFSET (Irq.Flags),
@@ -198,6 +206,33 @@ ACPI_RSCONVERT_INFO AcpiRsSetIrq[9] =
{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Irq.Sharable),
AML_OFFSET (Irq.Flags),
4},
+
+ /*
+ * All done if the output descriptor length is required to be 3
+ * (i.e., optimization to 2 bytes cannot be attempted)
+ */
+ {ACPI_RSC_EXIT_EQ, ACPI_RSC_COMPARE_VALUE,
+ ACPI_RS_OFFSET(Data.Irq.DescriptorLength),
+ 3},
+
+ /* Set length to 2 bytes (no flags byte) */
+
+ {ACPI_RSC_LENGTH, 0, 0, sizeof (AML_RESOURCE_IRQ_NOFLAGS)},
+
+ /*
+ * All done if the output descriptor length is required to be 2.
+ *
+ * TBD: Perhaps we should check for error if input flags are not
+ * compatible with a 2-byte descriptor.
+ */
+ {ACPI_RSC_EXIT_EQ, ACPI_RSC_COMPARE_VALUE,
+ ACPI_RS_OFFSET(Data.Irq.DescriptorLength),
+ 2},
+
+ /* Reset length to 3 bytes (descriptor with flags byte) */
+
+ {ACPI_RSC_LENGTH, 0, 0, sizeof (AML_RESOURCE_IRQ)},
+
/*
* Check if the flags byte is necessary. Not needed if the flags are:
* ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_HIGH, ACPI_EXCLUSIVE
@@ -214,7 +249,7 @@ ACPI_RSCONVERT_INFO AcpiRsSetIrq[9] =
ACPI_RS_OFFSET (Data.Irq.Sharable),
ACPI_EXCLUSIVE},
- /* IrqNoFlags() descriptor can be used */
+ /* We can optimize to a 2-byte IrqNoFlags() descriptor */
{ACPI_RSC_LENGTH, 0, 0, sizeof (AML_RESOURCE_IRQ_NOFLAGS)}
};
diff --git a/usr/src/uts/intel/io/acpica/resources/rslist.c b/usr/src/uts/intel/io/acpica/resources/rslist.c
index d1d60e4630..278c38a152 100644
--- a/usr/src/uts/intel/io/acpica/resources/rslist.c
+++ b/usr/src/uts/intel/io/acpica/resources/rslist.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rslist - Linked list utilities
- * $Revision: 1.61 $
+ * $Revision: 1.63 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/io/acpica/resources/rsmemory.c b/usr/src/uts/intel/io/acpica/resources/rsmemory.c
index 0e0e3a8dae..08cd4aab10 100644
--- a/usr/src/uts/intel/io/acpica/resources/rsmemory.c
+++ b/usr/src/uts/intel/io/acpica/resources/rsmemory.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsmem24 - Memory resource descriptors
- * $Revision: 1.33 $
+ * $Revision: 1.35 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/io/acpica/resources/rsmisc.c b/usr/src/uts/intel/io/acpica/resources/rsmisc.c
index e7da574321..2b77b91cef 100644
--- a/usr/src/uts/intel/io/acpica/resources/rsmisc.c
+++ b/usr/src/uts/intel/io/acpica/resources/rsmisc.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsmisc - Miscellaneous resource descriptors
- * $Revision: 1.45 $
+ * $Revision: 1.48 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -166,7 +166,7 @@ AcpiRsConvertAmlToResource (
ACPI_FUNCTION_TRACE (RsConvertAmlToResource);
- if (((ACPI_NATIVE_UINT) Resource) & 0x3)
+ if (((ACPI_SIZE) Resource) & 0x3)
{
/* Each internal resource struct is expected to be 32-bit aligned */
@@ -610,6 +610,18 @@ AcpiRsConvertResourceToAml (
break;
+ case ACPI_RSC_EXIT_EQ:
+ /*
+ * Control - Exit conversion if equal
+ */
+ if (*ACPI_ADD_PTR (UINT8, Resource,
+ COMPARE_TARGET (Info)) == COMPARE_VALUE (Info))
+ {
+ goto Exit;
+ }
+ break;
+
+
default:
ACPI_ERROR ((AE_INFO, "Invalid conversion opcode"));
diff --git a/usr/src/uts/intel/io/acpica/resources/rsutils.c b/usr/src/uts/intel/io/acpica/resources/rsutils.c
index f17c68b64f..f324a74281 100644
--- a/usr/src/uts/intel/io/acpica/resources/rsutils.c
+++ b/usr/src/uts/intel/io/acpica/resources/rsutils.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsutils - Utilities for the resource manager
- * $Revision: 1.66 $
+ * $Revision: 1.69 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -144,7 +144,7 @@ AcpiRsDecodeBitmask (
UINT16 Mask,
UINT8 *List)
{
- ACPI_NATIVE_UINT i;
+ UINT8 i;
UINT8 BitCount;
@@ -157,7 +157,7 @@ AcpiRsDecodeBitmask (
{
if (Mask & 0x0001)
{
- List[BitCount] = (UINT8) i;
+ List[BitCount] = i;
BitCount++;
}
@@ -186,7 +186,7 @@ AcpiRsEncodeBitmask (
UINT8 *List,
UINT8 Count)
{
- ACPI_NATIVE_UINT i;
+ UINT32 i;
UINT16 Mask;
@@ -197,7 +197,7 @@ AcpiRsEncodeBitmask (
for (i = 0, Mask = 0; i < Count; i++)
{
- Mask |= (0x0001 << List[i]);
+ Mask |= (0x1 << List[i]);
}
return (Mask);
@@ -228,7 +228,7 @@ AcpiRsMoveData (
UINT16 ItemCount,
UINT8 MoveType)
{
- ACPI_NATIVE_UINT i;
+ UINT32 i;
ACPI_FUNCTION_ENTRY ();
@@ -824,7 +824,6 @@ AcpiRsSetSrsMethodData (
Info->PrefixNode = Node;
Info->Pathname = METHOD_NAME__SRS;
Info->Parameters = Args;
- Info->ParameterType = ACPI_PARAM_ARGS;
Info->Flags = ACPI_IGNORE_RETURN_VALUE;
/*
diff --git a/usr/src/uts/intel/io/acpica/resources/rsxface.c b/usr/src/uts/intel/io/acpica/resources/rsxface.c
index 1ff12f34b2..c98a3b0925 100644
--- a/usr/src/uts/intel/io/acpica/resources/rsxface.c
+++ b/usr/src/uts/intel/io/acpica/resources/rsxface.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: rsxface - Public interfaces to the resource manager
- * $Revision: 1.47 $
+ * $Revision: 1.49 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/io/acpica/tables/tbfadt.c b/usr/src/uts/intel/io/acpica/tables/tbfadt.c
new file mode 100644
index 0000000000..ab911c740f
--- /dev/null
+++ b/usr/src/uts/intel/io/acpica/tables/tbfadt.c
@@ -0,0 +1,541 @@
+/******************************************************************************
+ *
+ * Module Name: tbfadt - FADT table utilities
+ * $Revision: 1.8 $
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999 - 2008, 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 __TBFADT_C__
+
+#include "acpi.h"
+#include "actables.h"
+
+#define _COMPONENT ACPI_TABLES
+ ACPI_MODULE_NAME ("tbfadt")
+
+/* Local prototypes */
+
+static void inline
+AcpiTbInitGenericAddress (
+ ACPI_GENERIC_ADDRESS *GenericAddress,
+ UINT8 BitWidth,
+ UINT64 Address);
+
+static void
+AcpiTbConvertFadt (
+ void);
+
+static void
+AcpiTbValidateFadt (
+ void);
+
+
+/* Table for conversion of FADT to common internal format and FADT validation */
+
+typedef struct acpi_fadt_info
+{
+ char *Name;
+ UINT8 Target;
+ UINT8 Source;
+ UINT8 Length;
+ UINT8 Type;
+
+} ACPI_FADT_INFO;
+
+#define ACPI_FADT_REQUIRED 1
+#define ACPI_FADT_SEPARATE_LENGTH 2
+
+static ACPI_FADT_INFO FadtInfoTable[] =
+{
+ {"Pm1aEventBlock", ACPI_FADT_OFFSET (XPm1aEventBlock),
+ ACPI_FADT_OFFSET (Pm1aEventBlock),
+ ACPI_FADT_OFFSET (Pm1EventLength), ACPI_FADT_REQUIRED},
+
+ {"Pm1bEventBlock", ACPI_FADT_OFFSET (XPm1bEventBlock),
+ ACPI_FADT_OFFSET (Pm1bEventBlock),
+ ACPI_FADT_OFFSET (Pm1EventLength), 0},
+
+ {"Pm1aControlBlock", ACPI_FADT_OFFSET (XPm1aControlBlock),
+ ACPI_FADT_OFFSET (Pm1aControlBlock),
+ ACPI_FADT_OFFSET (Pm1ControlLength), ACPI_FADT_REQUIRED},
+
+ {"Pm1bControlBlock", ACPI_FADT_OFFSET (XPm1bControlBlock),
+ ACPI_FADT_OFFSET (Pm1bControlBlock),
+ ACPI_FADT_OFFSET (Pm1ControlLength), 0},
+
+ {"Pm2ControlBlock", ACPI_FADT_OFFSET (XPm2ControlBlock),
+ ACPI_FADT_OFFSET (Pm2ControlBlock),
+ ACPI_FADT_OFFSET (Pm2ControlLength), ACPI_FADT_SEPARATE_LENGTH},
+
+ {"PmTimerBlock", ACPI_FADT_OFFSET (XPmTimerBlock),
+ ACPI_FADT_OFFSET (PmTimerBlock),
+ ACPI_FADT_OFFSET (PmTimerLength), ACPI_FADT_REQUIRED},
+
+ {"Gpe0Block", ACPI_FADT_OFFSET (XGpe0Block),
+ ACPI_FADT_OFFSET (Gpe0Block),
+ ACPI_FADT_OFFSET (Gpe0BlockLength), ACPI_FADT_SEPARATE_LENGTH},
+
+ {"Gpe1Block", ACPI_FADT_OFFSET (XGpe1Block),
+ ACPI_FADT_OFFSET (Gpe1Block),
+ ACPI_FADT_OFFSET (Gpe1BlockLength), ACPI_FADT_SEPARATE_LENGTH}
+};
+
+#define ACPI_FADT_INFO_ENTRIES (sizeof (FadtInfoTable) / sizeof (ACPI_FADT_INFO))
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiTbInitGenericAddress
+ *
+ * PARAMETERS: GenericAddress - GAS struct to be initialized
+ * BitWidth - Width of this register
+ * Address - Address of the register
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Initialize a Generic Address Structure (GAS)
+ * See the ACPI specification for a full description and
+ * definition of this structure.
+ *
+ ******************************************************************************/
+
+static void inline
+AcpiTbInitGenericAddress (
+ ACPI_GENERIC_ADDRESS *GenericAddress,
+ UINT8 BitWidth,
+ UINT64 Address)
+{
+
+ /*
+ * The 64-bit Address field is non-aligned in the byte packed
+ * GAS struct.
+ */
+ ACPI_MOVE_64_TO_64 (&GenericAddress->Address, &Address);
+
+ /* All other fields are byte-wide */
+
+ GenericAddress->SpaceId = ACPI_ADR_SPACE_SYSTEM_IO;
+ GenericAddress->BitWidth = BitWidth;
+ GenericAddress->BitOffset = 0;
+ GenericAddress->AccessWidth = 0;
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiTbParseFadt
+ *
+ * PARAMETERS: TableIndex - Index for the FADT
+ * Flags - Flags
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Initialize the FADT, DSDT and FACS tables
+ * (FADT contains the addresses of the DSDT and FACS)
+ *
+ ******************************************************************************/
+
+void
+AcpiTbParseFadt (
+ UINT32 TableIndex,
+ UINT8 Flags)
+{
+ UINT32 Length;
+ ACPI_TABLE_HEADER *Table;
+
+
+ /*
+ * The FADT has multiple versions with different lengths,
+ * and it contains pointers to both the DSDT and FACS tables.
+ *
+ * Get a local copy of the FADT and convert it to a common format
+ * Map entire FADT, assumed to be smaller than one page.
+ */
+ Length = AcpiGbl_RootTableList.Tables[TableIndex].Length;
+
+ Table = AcpiOsMapMemory (
+ AcpiGbl_RootTableList.Tables[TableIndex].Address, Length);
+ if (!Table)
+ {
+ return;
+ }
+
+ /*
+ * Validate the FADT checksum before we copy the table. Ignore
+ * checksum error as we want to try to get the DSDT and FACS.
+ */
+ (void) AcpiTbVerifyChecksum (Table, Length);
+
+ /* Obtain a local copy of the FADT in common ACPI 2.0+ format */
+
+ AcpiTbCreateLocalFadt (Table, Length);
+
+ /* All done with the real FADT, unmap it */
+
+ AcpiOsUnmapMemory (Table, Length);
+
+ /* Obtain the DSDT and FACS tables via their addresses within the FADT */
+
+ AcpiTbInstallTable ((ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.XDsdt,
+ Flags, ACPI_SIG_DSDT, ACPI_TABLE_INDEX_DSDT);
+
+ AcpiTbInstallTable ((ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.XFacs,
+ Flags, ACPI_SIG_FACS, ACPI_TABLE_INDEX_FACS);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiTbCreateLocalFadt
+ *
+ * PARAMETERS: Table - Pointer to BIOS FADT
+ * Length - Length of the table
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Get a local copy of the FADT and convert it to a common format.
+ * Performs validation on some important FADT fields.
+ *
+ * NOTE: We create a local copy of the FADT regardless of the version.
+ *
+ ******************************************************************************/
+
+void
+AcpiTbCreateLocalFadt (
+ ACPI_TABLE_HEADER *Table,
+ UINT32 Length)
+{
+
+ /*
+ * Check if the FADT is larger than the largest table that we expect
+ * (the ACPI 2.0/3.0 version). If so, truncate the table, and issue
+ * a warning.
+ */
+ if (Length > sizeof (ACPI_TABLE_FADT))
+ {
+ ACPI_WARNING ((AE_INFO,
+ "FADT (revision %u) is longer than ACPI 2.0 version, truncating length 0x%X to 0x%X",
+ Table->Revision, Length, sizeof (ACPI_TABLE_FADT)));
+ }
+
+ /* Clear the entire local FADT */
+
+ ACPI_MEMSET (&AcpiGbl_FADT, 0, sizeof (ACPI_TABLE_FADT));
+
+ /* Copy the original FADT, up to sizeof (ACPI_TABLE_FADT) */
+
+ ACPI_MEMCPY (&AcpiGbl_FADT, Table,
+ ACPI_MIN (Length, sizeof (ACPI_TABLE_FADT)));
+
+ /*
+ * 1) Convert the local copy of the FADT to the common internal format
+ * 2) Validate some of the important values within the FADT
+ */
+ AcpiTbConvertFadt ();
+ AcpiTbValidateFadt ();
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiTbConvertFadt
+ *
+ * PARAMETERS: None, uses AcpiGbl_FADT
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Converts all versions of the FADT to a common internal format.
+ * Expand all 32-bit addresses to 64-bit.
+ *
+ * NOTE: AcpiGbl_FADT must be of size (ACPI_TABLE_FADT),
+ * and must contain a copy of the actual FADT.
+ *
+ * ACPICA will use the "X" fields of the FADT for all addresses.
+ *
+ * "X" fields are optional extensions to the original V1.0 fields. Even if
+ * they are present in the structure, they can be optionally not used by
+ * setting them to zero. Therefore, we must selectively expand V1.0 fields
+ * if the corresponding X field is zero.
+ *
+ * For ACPI 1.0 FADTs, all address fields are expanded to the corresponding
+ * "X" fields.
+ *
+ * For ACPI 2.0 FADTs, any "X" fields that are NULL are filled in by
+ * expanding the corresponding ACPI 1.0 field.
+ *
+ ******************************************************************************/
+
+static void
+AcpiTbConvertFadt (
+ void)
+{
+ UINT8 Pm1RegisterLength;
+ ACPI_GENERIC_ADDRESS *Target;
+ UINT32 i;
+
+
+ /* Update the local FADT table header length */
+
+ AcpiGbl_FADT.Header.Length = sizeof (ACPI_TABLE_FADT);
+
+ /* Expand the 32-bit FACS and DSDT addresses to 64-bit as necessary */
+
+ if (!AcpiGbl_FADT.XFacs)
+ {
+ AcpiGbl_FADT.XFacs = (UINT64) AcpiGbl_FADT.Facs;
+ }
+
+ if (!AcpiGbl_FADT.XDsdt)
+ {
+ AcpiGbl_FADT.XDsdt = (UINT64) AcpiGbl_FADT.Dsdt;
+ }
+
+ /*
+ * For ACPI 1.0 FADTs (revision 1 or 2), ensure that reserved fields which
+ * should be zero are indeed zero. This will workaround BIOSs that
+ * inadvertently place values in these fields.
+ *
+ * The ACPI 1.0 reserved fields that will be zeroed are the bytes located at
+ * offset 45, 55, 95, and the word located at offset 109, 110.
+ */
+ if (AcpiGbl_FADT.Header.Revision < 3)
+ {
+ AcpiGbl_FADT.PreferredProfile = 0;
+ AcpiGbl_FADT.PstateControl = 0;
+ AcpiGbl_FADT.CstControl = 0;
+ AcpiGbl_FADT.BootFlags = 0;
+ }
+
+ /*
+ * Expand the ACPI 1.0 32-bit V1.0 addresses to the ACPI 2.0 64-bit "X"
+ * generic address structures as necessary.
+ */
+ for (i = 0; i < ACPI_FADT_INFO_ENTRIES; i++)
+ {
+ Target = ACPI_ADD_PTR (
+ ACPI_GENERIC_ADDRESS, &AcpiGbl_FADT, FadtInfoTable[i].Target);
+
+ /* Expand only if the X target is null */
+
+ if (!Target->Address)
+ {
+ AcpiTbInitGenericAddress (Target,
+ *ACPI_ADD_PTR (UINT8, &AcpiGbl_FADT, FadtInfoTable[i].Length),
+ (UINT64) *ACPI_ADD_PTR (UINT32, &AcpiGbl_FADT, FadtInfoTable[i].Source));
+ }
+ }
+
+ /*
+ * Calculate separate GAS structs for the PM1 Enable registers.
+ * These addresses do not appear (directly) in the FADT, so it is
+ * useful to calculate them once, here.
+ *
+ * The PM event blocks are split into two register blocks, first is the
+ * PM Status Register block, followed immediately by the PM Enable Register
+ * block. Each is of length (Pm1EventLength/2)
+ */
+ Pm1RegisterLength = (UINT8) ACPI_DIV_2 (AcpiGbl_FADT.Pm1EventLength);
+
+ /* The PM1A register block is required */
+
+ AcpiTbInitGenericAddress (&AcpiGbl_XPm1aEnable, Pm1RegisterLength,
+ (AcpiGbl_FADT.XPm1aEventBlock.Address + Pm1RegisterLength));
+
+ /* The PM1B register block is optional, ignore if not present */
+
+ if (AcpiGbl_FADT.XPm1bEventBlock.Address)
+ {
+ AcpiTbInitGenericAddress (&AcpiGbl_XPm1bEnable, Pm1RegisterLength,
+ (AcpiGbl_FADT.XPm1bEventBlock.Address + Pm1RegisterLength));
+ }
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiTbValidateFadt
+ *
+ * PARAMETERS: Table - Pointer to the FADT to be validated
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Validate various important fields within the FADT. If a problem
+ * is found, issue a message, but no status is returned.
+ * Used by both the table manager and the disassembler.
+ *
+ * Possible additional checks:
+ * (AcpiGbl_FADT.Pm1EventLength >= 4)
+ * (AcpiGbl_FADT.Pm1ControlLength >= 2)
+ * (AcpiGbl_FADT.PmTimerLength >= 4)
+ * Gpe block lengths must be multiple of 2
+ *
+ ******************************************************************************/
+
+static void
+AcpiTbValidateFadt (
+ void)
+{
+ UINT32 *Address32;
+ ACPI_GENERIC_ADDRESS *Address64;
+ UINT8 Length;
+ UINT32 i;
+
+
+ /* Examine all of the 64-bit extended address fields (X fields) */
+
+ for (i = 0; i < ACPI_FADT_INFO_ENTRIES; i++)
+ {
+ /* Generate pointers to the 32-bit and 64-bit addresses and get the length */
+
+ Address64 = ACPI_ADD_PTR (ACPI_GENERIC_ADDRESS, &AcpiGbl_FADT, FadtInfoTable[i].Target);
+ Address32 = ACPI_ADD_PTR (UINT32, &AcpiGbl_FADT, FadtInfoTable[i].Source);
+ Length = *ACPI_ADD_PTR (UINT8, &AcpiGbl_FADT, FadtInfoTable[i].Length);
+
+ if (FadtInfoTable[i].Type & ACPI_FADT_REQUIRED)
+ {
+ /*
+ * Field is required (PM1aEvent, PM1aControl, PmTimer).
+ * Both the address and length must be non-zero.
+ */
+ if (!Address64->Address || !Length)
+ {
+ ACPI_ERROR ((AE_INFO,
+ "Required field \"%s\" has zero address and/or length: %8.8X%8.8X/%X",
+ FadtInfoTable[i].Name, ACPI_FORMAT_UINT64 (Address64->Address), Length));
+ }
+ }
+ else if (FadtInfoTable[i].Type & ACPI_FADT_SEPARATE_LENGTH)
+ {
+ /*
+ * Field is optional (PM2Control, GPE0, GPE1) AND has its own
+ * length field. If present, both the address and length must be valid.
+ */
+ if ((Address64->Address && !Length) || (!Address64->Address && Length))
+ {
+ ACPI_WARNING ((AE_INFO,
+ "Optional field \"%s\" has zero address or length: %8.8X%8.8X/%X",
+ FadtInfoTable[i].Name, ACPI_FORMAT_UINT64 (Address64->Address), Length));
+ }
+ }
+
+ /* If both 32- and 64-bit addresses are valid (non-zero), they must match */
+
+ if (Address64->Address && *Address32 &&
+ (Address64->Address != (UINT64) *Address32))
+ {
+ ACPI_ERROR ((AE_INFO,
+ "32/64X address mismatch in \"%s\": [%8.8X] [%8.8X%8.8X], using 64X",
+ FadtInfoTable[i].Name, *Address32, ACPI_FORMAT_UINT64 (Address64->Address)));
+ }
+ }
+}
+
diff --git a/usr/src/uts/intel/io/acpica/tables/tbfind.c b/usr/src/uts/intel/io/acpica/tables/tbfind.c
new file mode 100644
index 0000000000..8fb4df1c0d
--- /dev/null
+++ b/usr/src/uts/intel/io/acpica/tables/tbfind.c
@@ -0,0 +1,215 @@
+/******************************************************************************
+ *
+ * Module Name: tbfind - find table
+ * $Revision: 1.5 $
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999 - 2008, 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 __TBFIND_C__
+
+#include "acpi.h"
+#include "actables.h"
+
+#define _COMPONENT ACPI_TABLES
+ ACPI_MODULE_NAME ("tbfind")
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiTbFindTable
+ *
+ * PARAMETERS: Signature - String with ACPI table signature
+ * OemId - String with the table OEM ID
+ * OemTableId - String with the OEM Table ID
+ * TableIndex - Where the table index is returned
+ *
+ * RETURN: Status and table index
+ *
+ * DESCRIPTION: Find an ACPI table (in the RSDT/XSDT) that matches the
+ * Signature, OEM ID and OEM Table ID. Returns an index that can
+ * be used to get the table header or entire table.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiTbFindTable (
+ char *Signature,
+ char *OemId,
+ char *OemTableId,
+ UINT32 *TableIndex)
+{
+ UINT32 i;
+ ACPI_STATUS Status;
+ ACPI_TABLE_HEADER Header;
+
+
+ ACPI_FUNCTION_TRACE (TbFindTable);
+
+
+ /* Normalize the input strings */
+
+ ACPI_MEMSET (&Header, 0, sizeof (ACPI_TABLE_HEADER));
+ ACPI_STRNCPY (Header.Signature, Signature, ACPI_NAME_SIZE);
+ ACPI_STRNCPY (Header.OemId, OemId, ACPI_OEM_ID_SIZE);
+ ACPI_STRNCPY (Header.OemTableId, OemTableId, ACPI_OEM_TABLE_ID_SIZE);
+
+ /* Search for the table */
+
+ for (i = 0; i < AcpiGbl_RootTableList.Count; ++i)
+ {
+ if (ACPI_MEMCMP (&(AcpiGbl_RootTableList.Tables[i].Signature),
+ Header.Signature, ACPI_NAME_SIZE))
+ {
+ /* Not the requested table */
+
+ continue;
+ }
+
+ /* Table with matching signature has been found */
+
+ if (!AcpiGbl_RootTableList.Tables[i].Pointer)
+ {
+ /* Table is not currently mapped, map it */
+
+ Status = AcpiTbVerifyTable (&AcpiGbl_RootTableList.Tables[i]);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ if (!AcpiGbl_RootTableList.Tables[i].Pointer)
+ {
+ continue;
+ }
+ }
+
+ /* Check for table match on all IDs */
+
+ if (!ACPI_MEMCMP (AcpiGbl_RootTableList.Tables[i].Pointer->Signature,
+ Header.Signature, ACPI_NAME_SIZE) &&
+ (!OemId[0] ||
+ !ACPI_MEMCMP (AcpiGbl_RootTableList.Tables[i].Pointer->OemId,
+ Header.OemId, ACPI_OEM_ID_SIZE)) &&
+ (!OemTableId[0] ||
+ !ACPI_MEMCMP (AcpiGbl_RootTableList.Tables[i].Pointer->OemTableId,
+ Header.OemTableId, ACPI_OEM_TABLE_ID_SIZE)))
+ {
+ *TableIndex = i;
+
+ ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "Found table [%4.4s]\n",
+ Header.Signature));
+ return_ACPI_STATUS (AE_OK);
+ }
+ }
+
+ return_ACPI_STATUS (AE_NOT_FOUND);
+}
diff --git a/usr/src/uts/intel/io/acpica/tables/tbinstal.c b/usr/src/uts/intel/io/acpica/tables/tbinstal.c
index b192646abb..b8325cd4ae 100644
--- a/usr/src/uts/intel/io/acpica/tables/tbinstal.c
+++ b/usr/src/uts/intel/io/acpica/tables/tbinstal.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbinstal - ACPI table installation and removal
- * $Revision: 1.87 $
+ * $Revision: 1.94 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -118,138 +118,191 @@
#define __TBINSTAL_C__
#include "acpi.h"
+#include "acnamesp.h"
#include "actables.h"
#define _COMPONENT ACPI_TABLES
ACPI_MODULE_NAME ("tbinstal")
-/* Local prototypes */
-static ACPI_STATUS
-AcpiTbMatchSignature (
- char *Signature,
- ACPI_TABLE_DESC *TableInfo,
- UINT8 SearchType);
-
-
-/*******************************************************************************
+/******************************************************************************
*
- * FUNCTION: AcpiTbMatchSignature
+ * FUNCTION: AcpiTbVerifyTable
*
- * PARAMETERS: Signature - Table signature to match
- * TableInfo - Return data
- * SearchType - Table type to match (primary/secondary)
+ * PARAMETERS: TableDesc - table
*
* RETURN: Status
*
- * DESCRIPTION: Compare signature against the list of "ACPI-subsystem-owned"
- * tables (DSDT/FADT/SSDT, etc.) Returns the TableTypeID on match.
+ * DESCRIPTION: this function is called to verify and map table
*
- ******************************************************************************/
+ *****************************************************************************/
-static ACPI_STATUS
-AcpiTbMatchSignature (
- char *Signature,
- ACPI_TABLE_DESC *TableInfo,
- UINT8 SearchType)
+ACPI_STATUS
+AcpiTbVerifyTable (
+ ACPI_TABLE_DESC *TableDesc)
{
- ACPI_NATIVE_UINT i;
+ ACPI_STATUS Status = AE_OK;
- ACPI_FUNCTION_TRACE (TbMatchSignature);
+ ACPI_FUNCTION_TRACE (TbVerifyTable);
- /* Search for a signature match among the known table types */
+ /* Map the table if necessary */
- for (i = 0; i < (ACPI_TABLE_ID_MAX+1); i++)
+ if (!TableDesc->Pointer)
{
- if (!(AcpiGbl_TableData[i].Flags & SearchType))
+ if ((TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK) ==
+ ACPI_TABLE_ORIGIN_MAPPED)
{
- continue;
+ TableDesc->Pointer = AcpiOsMapMemory (TableDesc->Address, TableDesc->Length);
}
- if (!ACPI_STRNCMP (Signature, AcpiGbl_TableData[i].Signature,
- AcpiGbl_TableData[i].SigLength))
+ if (!TableDesc->Pointer)
{
- /* Found a signature match, return index if requested */
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
+ }
- if (TableInfo)
- {
- TableInfo->Type = (UINT8) i;
- }
+ /* FACS is the odd table, has no standard ACPI header and no checksum */
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "Table [%4.4s] is an ACPI table consumed by the core subsystem\n",
- (char *) AcpiGbl_TableData[i].Signature));
+ if (!ACPI_COMPARE_NAME (&TableDesc->Signature, ACPI_SIG_FACS))
+ {
+ /* Always calculate checksum, ignore bad checksum if requested */
- return_ACPI_STATUS (AE_OK);
- }
+ Status = AcpiTbVerifyChecksum (TableDesc->Pointer, TableDesc->Length);
}
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "Table [%4.4s] is not an ACPI table consumed by the core subsystem - ignored\n",
- (char *) Signature));
-
- return_ACPI_STATUS (AE_TABLE_NOT_SUPPORTED);
+ return_ACPI_STATUS (Status);
}
/*******************************************************************************
*
- * FUNCTION: AcpiTbInstallTable
+ * FUNCTION: AcpiTbAddTable
*
- * PARAMETERS: TableInfo - Return value from AcpiTbGetTableBody
+ * PARAMETERS: TableDesc - Table descriptor
+ * TableIndex - Where the table index is returned
*
* RETURN: Status
*
- * DESCRIPTION: Install the table into the global data structures.
+ * DESCRIPTION: This function is called to add the ACPI table
*
******************************************************************************/
ACPI_STATUS
-AcpiTbInstallTable (
- ACPI_TABLE_DESC *TableInfo)
+AcpiTbAddTable (
+ ACPI_TABLE_DESC *TableDesc,
+ UINT32 *TableIndex)
{
- ACPI_STATUS Status;
-
+ UINT32 i;
+ ACPI_STATUS Status = AE_OK;
- ACPI_FUNCTION_TRACE (TbInstallTable);
+ ACPI_FUNCTION_TRACE (TbAddTable);
- /* Lock tables while installing */
- Status = AcpiUtAcquireMutex (ACPI_MTX_TABLES);
- if (ACPI_FAILURE (Status))
+ if (!TableDesc->Pointer)
{
- ACPI_EXCEPTION ((AE_INFO, Status, "Could not acquire table mutex"));
- return_ACPI_STATUS (Status);
+ Status = AcpiTbVerifyTable (TableDesc);
+ if (ACPI_FAILURE (Status) || !TableDesc->Pointer)
+ {
+ return_ACPI_STATUS (Status);
+ }
}
/*
- * Ignore a table that is already installed. For example, some BIOS
- * ASL code will repeatedly attempt to load the same SSDT.
+ * Originally, we checked the table signature for "SSDT" or "PSDT" here.
+ * Next, we added support for OEMx tables, signature "OEM".
+ * Valid tables were encountered with a null signature, so we've just
+ * given up on validating the signature, since it seems to be a waste
+ * of code. The original code was removed (05/2008).
*/
- Status = AcpiTbIsTableInstalled (TableInfo);
- if (ACPI_FAILURE (Status))
+
+ (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
+
+ /* Check if table is already registered */
+
+ for (i = 0; i < AcpiGbl_RootTableList.Count; ++i)
{
- goto UnlockAndExit;
+ if (!AcpiGbl_RootTableList.Tables[i].Pointer)
+ {
+ Status = AcpiTbVerifyTable (&AcpiGbl_RootTableList.Tables[i]);
+ if (ACPI_FAILURE (Status) || !AcpiGbl_RootTableList.Tables[i].Pointer)
+ {
+ continue;
+ }
+ }
+
+ /*
+ * Check for a table match on the entire table length,
+ * not just the header.
+ */
+ if (TableDesc->Length != AcpiGbl_RootTableList.Tables[i].Length)
+ {
+ continue;
+ }
+
+ if (ACPI_MEMCMP (TableDesc->Pointer,
+ AcpiGbl_RootTableList.Tables[i].Pointer,
+ AcpiGbl_RootTableList.Tables[i].Length))
+ {
+ continue;
+ }
+
+ /*
+ * Note: the current mechanism does not unregister a table if it is
+ * dynamically unloaded. The related namespace entries are deleted,
+ * but the table remains in the root table list.
+ *
+ * The assumption here is that the number of different tables that
+ * will be loaded is actually small, and there is minimal overhead
+ * in just keeping the table in case it is needed again.
+ *
+ * If this assumption changes in the future (perhaps on large
+ * machines with many table load/unload operations), tables will
+ * need to be unregistered when they are unloaded, and slots in the
+ * root table list should be reused when empty.
+ */
+
+ /*
+ * Table is already registered.
+ * We can delete the table that was passed as a parameter.
+ */
+ AcpiTbDeleteTable (TableDesc);
+ *TableIndex = i;
+
+ if (AcpiGbl_RootTableList.Tables[i].Flags & ACPI_TABLE_IS_LOADED)
+ {
+ /* Table is still loaded, this is an error */
+
+ Status = AE_ALREADY_EXISTS;
+ goto Release;
+ }
+ else
+ {
+ /* Table was unloaded, allow it to be reloaded */
+
+ TableDesc->Pointer = AcpiGbl_RootTableList.Tables[i].Pointer;
+ TableDesc->Address = AcpiGbl_RootTableList.Tables[i].Address;
+ Status = AE_OK;
+ goto PrintHeader;
+ }
}
- /* Install the table into the global data structure */
+ /* Add the table to the global root table list */
- Status = AcpiTbInitTableDescriptor (TableInfo->Type, TableInfo);
+ Status = AcpiTbStoreTable (TableDesc->Address, TableDesc->Pointer,
+ TableDesc->Length, TableDesc->Flags, TableIndex);
if (ACPI_FAILURE (Status))
{
- ACPI_EXCEPTION ((AE_INFO, Status, "Could not install table [%4.4s]",
- TableInfo->Pointer->Signature));
+ goto Release;
}
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%s located at %p\n",
- AcpiGbl_TableData[TableInfo->Type].Name, TableInfo->Pointer));
-
+PrintHeader:
+ AcpiTbPrintTableHeader (TableDesc->Address, TableDesc->Pointer);
-UnlockAndExit:
+Release:
(void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
return_ACPI_STATUS (Status);
}
@@ -257,442 +310,412 @@ UnlockAndExit:
/*******************************************************************************
*
- * FUNCTION: AcpiTbRecognizeTable
+ * FUNCTION: AcpiTbResizeRootTableList
*
- * PARAMETERS: TableInfo - Return value from AcpiTbGetTableBody
- * SearchType - Table type to match (primary/secondary)
+ * PARAMETERS: None
*
* RETURN: Status
*
- * DESCRIPTION: Check a table signature for a match against known table types
- *
- * NOTE: All table pointers are validated as follows:
- * 1) Table pointer must point to valid physical memory
- * 2) Signature must be 4 ASCII chars, even if we don't recognize the
- * name
- * 3) Table must be readable for length specified in the header
- * 4) Table checksum must be valid (with the exception of the FACS
- * which has no checksum for some odd reason)
+ * DESCRIPTION: Expand the size of global table array
*
******************************************************************************/
ACPI_STATUS
-AcpiTbRecognizeTable (
- ACPI_TABLE_DESC *TableInfo,
- UINT8 SearchType)
+AcpiTbResizeRootTableList (
+ void)
{
- ACPI_TABLE_HEADER *TableHeader;
- ACPI_STATUS Status;
+ ACPI_TABLE_DESC *Tables;
- ACPI_FUNCTION_TRACE (TbRecognizeTable);
+ ACPI_FUNCTION_TRACE (TbResizeRootTableList);
- /* Ensure that we have a valid table pointer */
+ /* AllowResize flag is a parameter to AcpiInitializeTables */
- TableHeader = (ACPI_TABLE_HEADER *) TableInfo->Pointer;
- if (!TableHeader)
+ if (!(AcpiGbl_RootTableList.Flags & ACPI_ROOT_ALLOW_RESIZE))
{
- return_ACPI_STATUS (AE_BAD_PARAMETER);
+ ACPI_ERROR ((AE_INFO, "Resize of Root Table Array is not allowed"));
+ return_ACPI_STATUS (AE_SUPPORT);
}
- /*
- * We only "recognize" a limited number of ACPI tables -- namely, the
- * ones that are used by the subsystem (DSDT, FADT, etc.)
- *
- * An AE_TABLE_NOT_SUPPORTED means that the table was not recognized.
- * This can be any one of many valid ACPI tables, it just isn't one of
- * the tables that is consumed by the core subsystem
- */
- Status = AcpiTbMatchSignature (TableHeader->Signature,
- TableInfo, SearchType);
- if (ACPI_FAILURE (Status))
+ /* Increase the Table Array size */
+
+ Tables = ACPI_ALLOCATE_ZEROED (
+ ((ACPI_SIZE) AcpiGbl_RootTableList.Size + ACPI_ROOT_TABLE_SIZE_INCREMENT)
+ * sizeof (ACPI_TABLE_DESC));
+ if (!Tables)
{
- return_ACPI_STATUS (Status);
+ ACPI_ERROR ((AE_INFO, "Could not allocate new root table array"));
+ return_ACPI_STATUS (AE_NO_MEMORY);
}
- Status = AcpiTbValidateTableHeader (TableHeader);
- if (ACPI_FAILURE (Status))
+ /* Copy and free the previous table array */
+
+ if (AcpiGbl_RootTableList.Tables)
{
- return_ACPI_STATUS (Status);
+ ACPI_MEMCPY (Tables, AcpiGbl_RootTableList.Tables,
+ (ACPI_SIZE) AcpiGbl_RootTableList.Size * sizeof (ACPI_TABLE_DESC));
+
+ if (AcpiGbl_RootTableList.Flags & ACPI_ROOT_ORIGIN_ALLOCATED)
+ {
+ ACPI_FREE (AcpiGbl_RootTableList.Tables);
+ }
}
- /* Return the table type and length via the info struct */
+ AcpiGbl_RootTableList.Tables = Tables;
+ AcpiGbl_RootTableList.Size += ACPI_ROOT_TABLE_SIZE_INCREMENT;
+ AcpiGbl_RootTableList.Flags |= (UINT8) ACPI_ROOT_ORIGIN_ALLOCATED;
- TableInfo->Length = (ACPI_SIZE) TableHeader->Length;
- return_ACPI_STATUS (Status);
+ return_ACPI_STATUS (AE_OK);
}
/*******************************************************************************
*
- * FUNCTION: AcpiTbInitTableDescriptor
+ * FUNCTION: AcpiTbStoreTable
*
- * PARAMETERS: TableType - The type of the table
- * TableInfo - A table info struct
+ * PARAMETERS: Address - Table address
+ * Table - Table header
+ * Length - Table length
+ * Flags - flags
*
- * RETURN: None.
+ * RETURN: Status and table index.
*
- * DESCRIPTION: Install a table into the global data structs.
+ * DESCRIPTION: Add an ACPI table to the global table list
*
******************************************************************************/
ACPI_STATUS
-AcpiTbInitTableDescriptor (
- ACPI_TABLE_TYPE TableType,
- ACPI_TABLE_DESC *TableInfo)
+AcpiTbStoreTable (
+ ACPI_PHYSICAL_ADDRESS Address,
+ ACPI_TABLE_HEADER *Table,
+ UINT32 Length,
+ UINT8 Flags,
+ UINT32 *TableIndex)
{
- ACPI_TABLE_LIST *ListHead;
- ACPI_TABLE_DESC *TableDesc;
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_TRACE_U32 (TbInitTableDescriptor, TableType);
-
-
- /* Allocate a descriptor for this table */
+ ACPI_STATUS Status = AE_OK;
- TableDesc = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_TABLE_DESC));
- if (!TableDesc)
- {
- return_ACPI_STATUS (AE_NO_MEMORY);
- }
- /* Get a new owner ID for the table */
+ /* Ensure that there is room for the table in the Root Table List */
- Status = AcpiUtAllocateOwnerId (&TableDesc->OwnerId);
- if (ACPI_FAILURE (Status))
+ if (AcpiGbl_RootTableList.Count >= AcpiGbl_RootTableList.Size)
{
- goto ErrorExit1;
- }
-
- /* Install the table into the global data structure */
-
- ListHead = &AcpiGbl_TableLists[TableType];
-
- /*
- * Two major types of tables: 1) Only one instance is allowed. This
- * includes most ACPI tables such as the DSDT. 2) Multiple instances of
- * the table are allowed. This includes SSDT and PSDTs.
- */
- if (ACPI_IS_SINGLE_TABLE (AcpiGbl_TableData[TableType].Flags))
- {
- /*
- * Only one table allowed, and a table has alread been installed
- * at this location, so return an error.
- */
- if (ListHead->Next)
+ Status = AcpiTbResizeRootTableList();
+ if (ACPI_FAILURE (Status))
{
- Status = AE_ALREADY_EXISTS;
- goto ErrorExit2;
+ return (Status);
}
+ }
- TableDesc->Next = ListHead->Next;
- ListHead->Next = TableDesc;
+ /* Initialize added table */
- if (TableDesc->Next)
- {
- TableDesc->Next->Prev = TableDesc;
- }
+ AcpiGbl_RootTableList.Tables[AcpiGbl_RootTableList.Count].Address = Address;
+ AcpiGbl_RootTableList.Tables[AcpiGbl_RootTableList.Count].Pointer = Table;
+ AcpiGbl_RootTableList.Tables[AcpiGbl_RootTableList.Count].Length = Length;
+ AcpiGbl_RootTableList.Tables[AcpiGbl_RootTableList.Count].OwnerId = 0;
+ AcpiGbl_RootTableList.Tables[AcpiGbl_RootTableList.Count].Flags = Flags;
- ListHead->Count++;
- }
- else
- {
- /*
- * Link the new table in to the list of tables of this type.
- * Insert at the end of the list, order IS IMPORTANT.
- *
- * TableDesc->Prev & Next are already NULL from calloc()
- */
- ListHead->Count++;
+ ACPI_MOVE_32_TO_32 (
+ &(AcpiGbl_RootTableList.Tables[AcpiGbl_RootTableList.Count].Signature),
+ Table->Signature);
- if (!ListHead->Next)
- {
- ListHead->Next = TableDesc;
- }
- else
- {
- TableDesc->Next = ListHead->Next;
+ *TableIndex = AcpiGbl_RootTableList.Count;
+ AcpiGbl_RootTableList.Count++;
+ return (Status);
+}
- while (TableDesc->Next->Next)
- {
- TableDesc->Next = TableDesc->Next->Next;
- }
- TableDesc->Next->Next = TableDesc;
- TableDesc->Prev = TableDesc->Next;
- TableDesc->Next = NULL;
- }
- }
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiTbDeleteTable
+ *
+ * PARAMETERS: TableIndex - Table index
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Delete one internal ACPI table
+ *
+ ******************************************************************************/
- /* Finish initialization of the table descriptor */
+void
+AcpiTbDeleteTable (
+ ACPI_TABLE_DESC *TableDesc)
+{
- TableDesc->LoadedIntoNamespace = FALSE;
- TableDesc->Type = (UINT8) TableType;
- TableDesc->Pointer = TableInfo->Pointer;
- TableDesc->Length = TableInfo->Length;
- TableDesc->Allocation = TableInfo->Allocation;
- TableDesc->AmlStart = (UINT8 *) (TableDesc->Pointer + 1),
- TableDesc->AmlLength = (UINT32)
- (TableDesc->Length - (UINT32) sizeof (ACPI_TABLE_HEADER));
+ /* Table must be mapped or allocated */
- /*
- * Set the appropriate global pointer (if there is one) to point to the
- * newly installed table
- */
- if (AcpiGbl_TableData[TableType].GlobalPtr)
+ if (!TableDesc->Pointer)
{
- *(AcpiGbl_TableData[TableType].GlobalPtr) = TableInfo->Pointer;
+ return;
}
- /* Return Data */
-
- TableInfo->OwnerId = TableDesc->OwnerId;
- TableInfo->InstalledDesc = TableDesc;
- return_ACPI_STATUS (AE_OK);
-
-
- /* Error exit with cleanup */
-
-ErrorExit2:
+ switch (TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK)
+ {
+ case ACPI_TABLE_ORIGIN_MAPPED:
+ AcpiOsUnmapMemory (TableDesc->Pointer, TableDesc->Length);
+ break;
- AcpiUtReleaseOwnerId (&TableDesc->OwnerId);
+ case ACPI_TABLE_ORIGIN_ALLOCATED:
+ ACPI_FREE (TableDesc->Pointer);
+ break;
-ErrorExit1:
+ default:
+ break;
+ }
- ACPI_FREE (TableDesc);
- return_ACPI_STATUS (Status);
+ TableDesc->Pointer = NULL;
}
/*******************************************************************************
*
- * FUNCTION: AcpiTbDeleteAllTables
+ * FUNCTION: AcpiTbTerminate
*
- * PARAMETERS: None.
+ * PARAMETERS: None
*
- * RETURN: None.
+ * RETURN: None
*
* DESCRIPTION: Delete all internal ACPI tables
*
******************************************************************************/
void
-AcpiTbDeleteAllTables (
+AcpiTbTerminate (
void)
{
- ACPI_TABLE_TYPE Type;
+ UINT32 i;
+ ACPI_FUNCTION_TRACE (TbTerminate);
+
+
+ (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
+
+ /* Delete the individual tables */
+
+ for (i = 0; i < AcpiGbl_RootTableList.Count; i++)
+ {
+ AcpiTbDeleteTable (&AcpiGbl_RootTableList.Tables[i]);
+ }
+
/*
- * Free memory allocated for ACPI tables
- * Memory can either be mapped or allocated
+ * Delete the root table array if allocated locally. Array cannot be
+ * mapped, so we don't need to check for that flag.
*/
- for (Type = 0; Type < (ACPI_TABLE_ID_MAX+1); Type++)
+ if (AcpiGbl_RootTableList.Flags & ACPI_ROOT_ORIGIN_ALLOCATED)
{
- AcpiTbDeleteTablesByType (Type);
+ ACPI_FREE (AcpiGbl_RootTableList.Tables);
}
+
+ AcpiGbl_RootTableList.Tables = NULL;
+ AcpiGbl_RootTableList.Flags = 0;
+ AcpiGbl_RootTableList.Count = 0;
+
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "ACPI Tables freed\n"));
+ (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
}
/*******************************************************************************
*
- * FUNCTION: AcpiTbDeleteTablesByType
+ * FUNCTION: AcpiTbDeleteNamespaceByOwner
*
- * PARAMETERS: Type - The table type to be deleted
+ * PARAMETERS: TableIndex - Table index
*
- * RETURN: None.
+ * RETURN: None
*
- * DESCRIPTION: Delete an internal ACPI table
- * Locks the ACPI table mutex
+ * DESCRIPTION: Delete all namespace objects created when this table was loaded.
*
******************************************************************************/
void
-AcpiTbDeleteTablesByType (
- ACPI_TABLE_TYPE Type)
+AcpiTbDeleteNamespaceByOwner (
+ UINT32 TableIndex)
{
- ACPI_TABLE_DESC *TableDesc;
- UINT32 Count;
- UINT32 i;
-
+ ACPI_OWNER_ID OwnerId;
- ACPI_FUNCTION_TRACE_U32 (TbDeleteTablesByType, Type);
-
- if (Type > ACPI_TABLE_ID_MAX)
+ (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
+ if (TableIndex < AcpiGbl_RootTableList.Count)
{
- return_VOID;
+ OwnerId = AcpiGbl_RootTableList.Tables[TableIndex].OwnerId;
}
-
- if (ACPI_FAILURE (AcpiUtAcquireMutex (ACPI_MTX_TABLES)))
+ else
{
+ (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
return;
}
- /* Clear the appropriate "typed" global table pointer */
-
- switch (Type)
- {
- case ACPI_TABLE_ID_RSDP:
- AcpiGbl_RSDP = NULL;
- break;
+ (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
+ AcpiNsDeleteNamespaceByOwner (OwnerId);
+}
- case ACPI_TABLE_ID_DSDT:
- AcpiGbl_DSDT = NULL;
- break;
- case ACPI_TABLE_ID_FADT:
- AcpiGbl_FADT = NULL;
- break;
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiTbAllocateOwnerId
+ *
+ * PARAMETERS: TableIndex - Table index
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Allocates OwnerId in TableDesc
+ *
+ ******************************************************************************/
- case ACPI_TABLE_ID_FACS:
- AcpiGbl_FACS = NULL;
- break;
+ACPI_STATUS
+AcpiTbAllocateOwnerId (
+ UINT32 TableIndex)
+{
+ ACPI_STATUS Status = AE_BAD_PARAMETER;
- case ACPI_TABLE_ID_XSDT:
- AcpiGbl_XSDT = NULL;
- break;
- case ACPI_TABLE_ID_SSDT:
- case ACPI_TABLE_ID_PSDT:
- default:
- break;
- }
+ ACPI_FUNCTION_TRACE (TbAllocateOwnerId);
- /*
- * Free the table
- * 1) Get the head of the list
- */
- TableDesc = AcpiGbl_TableLists[Type].Next;
- Count = AcpiGbl_TableLists[Type].Count;
- /*
- * 2) Walk the entire list, deleting both the allocated tables
- * and the table descriptors
- */
- for (i = 0; i < Count; i++)
+ (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
+ if (TableIndex < AcpiGbl_RootTableList.Count)
{
- TableDesc = AcpiTbUninstallTable (TableDesc);
+ Status = AcpiUtAllocateOwnerId
+ (&(AcpiGbl_RootTableList.Tables[TableIndex].OwnerId));
}
(void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
- return_VOID;
+ return_ACPI_STATUS (Status);
}
/*******************************************************************************
*
- * FUNCTION: AcpiTbDeleteSingleTable
+ * FUNCTION: AcpiTbReleaseOwnerId
*
- * PARAMETERS: TableInfo - A table info struct
+ * PARAMETERS: TableIndex - Table index
*
- * RETURN: None.
+ * RETURN: Status
*
- * DESCRIPTION: Low-level free for a single ACPI table. Handles cases where
- * the table was allocated a buffer or was mapped.
+ * DESCRIPTION: Releases OwnerId in TableDesc
*
******************************************************************************/
-void
-AcpiTbDeleteSingleTable (
- ACPI_TABLE_DESC *TableDesc)
+ACPI_STATUS
+AcpiTbReleaseOwnerId (
+ UINT32 TableIndex)
{
+ ACPI_STATUS Status = AE_BAD_PARAMETER;
- /* Must have a valid table descriptor and pointer */
- if ((!TableDesc) ||
- (!TableDesc->Pointer))
- {
- return;
- }
+ ACPI_FUNCTION_TRACE (TbReleaseOwnerId);
- /* Valid table, determine type of memory allocation */
- switch (TableDesc->Allocation)
+ (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
+ if (TableIndex < AcpiGbl_RootTableList.Count)
{
- case ACPI_MEM_NOT_ALLOCATED:
- break;
-
- case ACPI_MEM_ALLOCATED:
-
- ACPI_FREE (TableDesc->Pointer);
- break;
-
- case ACPI_MEM_MAPPED:
-
- AcpiOsUnmapMemory (TableDesc->Pointer, TableDesc->Length);
- break;
-
- default:
- break;
+ AcpiUtReleaseOwnerId (&(AcpiGbl_RootTableList.Tables[TableIndex].OwnerId));
+ Status = AE_OK;
}
+
+ (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
+ return_ACPI_STATUS (Status);
}
/*******************************************************************************
*
- * FUNCTION: AcpiTbUninstallTable
+ * FUNCTION: AcpiTbGetOwnerId
*
- * PARAMETERS: TableInfo - A table info struct
+ * PARAMETERS: TableIndex - Table index
+ * OwnerId - Where the table OwnerId is returned
*
- * RETURN: Pointer to the next table in the list (of same type)
+ * RETURN: Status
*
- * DESCRIPTION: Free the memory associated with an internal ACPI table that
- * is either installed or has never been installed.
- * Table mutex should be locked.
+ * DESCRIPTION: returns OwnerId for the ACPI table
*
******************************************************************************/
-ACPI_TABLE_DESC *
-AcpiTbUninstallTable (
- ACPI_TABLE_DESC *TableDesc)
+ACPI_STATUS
+AcpiTbGetOwnerId (
+ UINT32 TableIndex,
+ ACPI_OWNER_ID *OwnerId)
{
- ACPI_TABLE_DESC *NextDesc;
+ ACPI_STATUS Status = AE_BAD_PARAMETER;
- ACPI_FUNCTION_TRACE_PTR (TbUninstallTable, TableDesc);
+ ACPI_FUNCTION_TRACE (TbGetOwnerId);
- if (!TableDesc)
+ (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
+ if (TableIndex < AcpiGbl_RootTableList.Count)
{
- return_PTR (NULL);
+ *OwnerId = AcpiGbl_RootTableList.Tables[TableIndex].OwnerId;
+ Status = AE_OK;
}
- /* Unlink the descriptor from the doubly linked list */
+ (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
+ return_ACPI_STATUS (Status);
+}
- if (TableDesc->Prev)
- {
- TableDesc->Prev->Next = TableDesc->Next;
- }
- else
- {
- /* Is first on list, update list head */
- AcpiGbl_TableLists[TableDesc->Type].Next = TableDesc->Next;
- }
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiTbIsTableLoaded
+ *
+ * PARAMETERS: TableIndex - Table index
+ *
+ * RETURN: Table Loaded Flag
+ *
+ ******************************************************************************/
- if (TableDesc->Next)
- {
- TableDesc->Next->Prev = TableDesc->Prev;
- }
+BOOLEAN
+AcpiTbIsTableLoaded (
+ UINT32 TableIndex)
+{
+ BOOLEAN IsLoaded = FALSE;
- /* Free the memory allocated for the table itself */
- AcpiTbDeleteSingleTable (TableDesc);
+ (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
+ if (TableIndex < AcpiGbl_RootTableList.Count)
+ {
+ IsLoaded = (BOOLEAN)
+ (AcpiGbl_RootTableList.Tables[TableIndex].Flags & ACPI_TABLE_IS_LOADED);
+ }
- /* Free the owner ID associated with this table */
+ (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
+ return (IsLoaded);
+}
- AcpiUtReleaseOwnerId (&TableDesc->OwnerId);
- /* Free the table descriptor */
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiTbSetTableLoadedFlag
+ *
+ * PARAMETERS: TableIndex - Table index
+ * IsLoaded - TRUE if table is loaded, FALSE otherwise
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Sets the table loaded flag to either TRUE or FALSE.
+ *
+ ******************************************************************************/
- NextDesc = TableDesc->Next;
- ACPI_FREE (TableDesc);
+void
+AcpiTbSetTableLoadedFlag (
+ UINT32 TableIndex,
+ BOOLEAN IsLoaded)
+{
- /* Return pointer to the next descriptor */
+ (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
+ if (TableIndex < AcpiGbl_RootTableList.Count)
+ {
+ if (IsLoaded)
+ {
+ AcpiGbl_RootTableList.Tables[TableIndex].Flags |= ACPI_TABLE_IS_LOADED;
+ }
+ else
+ {
+ AcpiGbl_RootTableList.Tables[TableIndex].Flags &= ~ACPI_TABLE_IS_LOADED;
+ }
+ }
- return_PTR (NextDesc);
+ (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
}
diff --git a/usr/src/uts/intel/io/acpica/tables/tbutils.c b/usr/src/uts/intel/io/acpica/tables/tbutils.c
index ac09472a7b..ab21db646e 100644
--- a/usr/src/uts/intel/io/acpica/tables/tbutils.c
+++ b/usr/src/uts/intel/io/acpica/tables/tbutils.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
- * Module Name: tbutils - Table manipulation utilities
- * $Revision: 1.79 $
+ * Module Name: tbutils - table utilities
+ * $Revision: 1.91 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -119,152 +119,132 @@
#include "acpi.h"
#include "actables.h"
-
#define _COMPONENT ACPI_TABLES
ACPI_MODULE_NAME ("tbutils")
/* Local prototypes */
-#ifdef ACPI_OBSOLETE_FUNCTIONS
-ACPI_STATUS
-AcpiTbHandleToObject (
- UINT16 TableId,
- ACPI_TABLE_DESC **TableDesc);
-#endif
+static ACPI_PHYSICAL_ADDRESS
+AcpiTbGetRootTableEntry (
+ UINT8 *TableEntry,
+ UINT32 TableEntrySize);
/*******************************************************************************
*
- * FUNCTION: AcpiTbIsTableInstalled
+ * FUNCTION: AcpiTbTablesLoaded
*
- * PARAMETERS: NewTableDesc - Descriptor for new table being installed
+ * PARAMETERS: None
*
- * RETURN: Status - AE_ALREADY_EXISTS if the table is already installed
+ * RETURN: TRUE if required ACPI tables are loaded
*
- * DESCRIPTION: Determine if an ACPI table is already installed
- *
- * MUTEX: Table data structures should be locked
+ * DESCRIPTION: Determine if the minimum required ACPI tables are present
+ * (FADT, FACS, DSDT)
*
******************************************************************************/
-ACPI_STATUS
-AcpiTbIsTableInstalled (
- ACPI_TABLE_DESC *NewTableDesc)
+BOOLEAN
+AcpiTbTablesLoaded (
+ void)
{
- ACPI_TABLE_DESC *TableDesc;
+ if (AcpiGbl_RootTableList.Count >= 3)
+ {
+ return (TRUE);
+ }
- ACPI_FUNCTION_TRACE (TbIsTableInstalled);
-
+ return (FALSE);
+}
- /* Get the list descriptor and first table descriptor */
- TableDesc = AcpiGbl_TableLists[NewTableDesc->Type].Next;
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiTbPrintTableHeader
+ *
+ * PARAMETERS: Address - Table physical address
+ * Header - Table header
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Print an ACPI table header. Special cases for FACS and RSDP.
+ *
+ ******************************************************************************/
- /* Examine all installed tables of this type */
+void
+AcpiTbPrintTableHeader (
+ ACPI_PHYSICAL_ADDRESS Address,
+ ACPI_TABLE_HEADER *Header)
+{
- while (TableDesc)
+ if (ACPI_COMPARE_NAME (Header->Signature, ACPI_SIG_FACS))
{
- /*
- * If the table lengths match, perform a full bytewise compare. This
- * means that we will allow tables with duplicate OemTableId(s), as
- * long as the tables are different in some way.
- *
- * Checking if the table has been loaded into the namespace means that
- * we don't check for duplicate tables during the initial installation
- * of tables within the RSDT/XSDT.
- */
- if ((TableDesc->LoadedIntoNamespace) &&
- (TableDesc->Pointer->Length == NewTableDesc->Pointer->Length) &&
- (!ACPI_MEMCMP (TableDesc->Pointer, NewTableDesc->Pointer,
- NewTableDesc->Pointer->Length)))
- {
- /* Match: this table is already installed */
-
- ACPI_DEBUG_PRINT ((ACPI_DB_TABLES,
- "Table [%4.4s] already installed: Rev %X OemTableId [%8.8s]\n",
- NewTableDesc->Pointer->Signature,
- NewTableDesc->Pointer->Revision,
- NewTableDesc->Pointer->OemTableId));
-
- NewTableDesc->OwnerId = TableDesc->OwnerId;
- NewTableDesc->InstalledDesc = TableDesc;
-
- return_ACPI_STATUS (AE_ALREADY_EXISTS);
- }
-
- /* Get next table on the list */
+ /* FACS only has signature and length fields of common table header */
- TableDesc = TableDesc->Next;
+ ACPI_INFO ((AE_INFO, "%4.4s @ 0x%p/0x%04X",
+ Header->Signature, ACPI_CAST_PTR (UINT64, Address), Header->Length));
+ }
+ else if (ACPI_COMPARE_NAME (Header->Signature, ACPI_SIG_RSDP))
+ {
+ /* RSDP has no common fields */
+
+ ACPI_INFO ((AE_INFO, "RSDP @ 0x%p/0x%04X (v%3.3d %6.6s)",
+ ACPI_CAST_PTR (void, Address),
+ (ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->Revision > 0) ?
+ ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->Length : 20,
+ ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->Revision,
+ ACPI_CAST_PTR (ACPI_TABLE_RSDP, Header)->OemId));
+ }
+ else
+ {
+ /* Standard ACPI table with full common header */
+
+ ACPI_INFO ((AE_INFO,
+ "%4.4s @ 0x%p/0x%04X (v%3.3d %6.6s %8.8s 0x%08X %4.4s 0x%08X)",
+ Header->Signature, ACPI_CAST_PTR (void, Address),
+ Header->Length, Header->Revision, Header->OemId,
+ Header->OemTableId, Header->OemRevision, Header->AslCompilerId,
+ Header->AslCompilerRevision));
}
-
- return_ACPI_STATUS (AE_OK);
}
/*******************************************************************************
*
- * FUNCTION: AcpiTbValidateTableHeader
+ * FUNCTION: AcpiTbValidateChecksum
*
- * PARAMETERS: TableHeader - Logical pointer to the table
+ * PARAMETERS: Table - ACPI table to verify
+ * Length - Length of entire table
*
* RETURN: Status
*
- * DESCRIPTION: Check an ACPI table header for validity
- *
- * NOTE: Table pointers are validated as follows:
- * 1) Table pointer must point to valid physical memory
- * 2) Signature must be 4 ASCII chars, even if we don't recognize the
- * name
- * 3) Table must be readable for length specified in the header
- * 4) Table checksum must be valid (with the exception of the FACS
- * which has no checksum because it contains variable fields)
+ * DESCRIPTION: Verifies that the table checksums to zero. Optionally returns
+ * exception on bad checksum.
*
******************************************************************************/
ACPI_STATUS
-AcpiTbValidateTableHeader (
- ACPI_TABLE_HEADER *TableHeader)
+AcpiTbVerifyChecksum (
+ ACPI_TABLE_HEADER *Table,
+ UINT32 Length)
{
- ACPI_NAME Signature;
-
-
- ACPI_FUNCTION_ENTRY ();
-
-
- /* Verify that this is a valid address */
-
- if (!AcpiOsReadable (TableHeader, sizeof (ACPI_TABLE_HEADER)))
- {
- ACPI_ERROR ((AE_INFO,
- "Cannot read table header at %p", TableHeader));
-
- return (AE_BAD_ADDRESS);
- }
+ UINT8 Checksum;
- /* Ensure that the signature is 4 ASCII characters */
- ACPI_MOVE_32_TO_32 (&Signature, TableHeader->Signature);
- if (!AcpiUtValidAcpiName (Signature))
- {
- ACPI_ERROR ((AE_INFO, "Invalid table signature 0x%8.8X",
- Signature));
+ /* Compute the checksum on the table */
- ACPI_DUMP_BUFFER (TableHeader, sizeof (ACPI_TABLE_HEADER));
- return (AE_BAD_SIGNATURE);
- }
+ Checksum = AcpiTbChecksum (ACPI_CAST_PTR (UINT8, Table), Length);
- /* Validate the table length */
+ /* Checksum ok? (should be zero) */
- if (TableHeader->Length < sizeof (ACPI_TABLE_HEADER))
+ if (Checksum)
{
- ACPI_ERROR ((AE_INFO,
- "Invalid length 0x%X in table with signature %4.4s",
- (UINT32) TableHeader->Length,
- ACPI_CAST_PTR (char, &Signature)));
+ ACPI_WARNING ((AE_INFO,
+ "Incorrect checksum in table [%4.4s] - %2.2X, should be %2.2X",
+ Table->Signature, Table->Checksum, (UINT8) (Table->Checksum - Checksum)));
- ACPI_DUMP_BUFFER (TableHeader, sizeof (ACPI_TABLE_HEADER));
- return (AE_BAD_HEADER);
+#if (ACPI_CHECKSUM_ABORT)
+ return (AE_BAD_CHECKSUM);
+#endif
}
return (AE_OK);
@@ -273,184 +253,342 @@ AcpiTbValidateTableHeader (
/*******************************************************************************
*
- * FUNCTION: AcpiTbSumTable
+ * FUNCTION: AcpiTbChecksum
*
- * PARAMETERS: Buffer - Buffer to sum
- * Length - Size of the buffer
+ * PARAMETERS: Buffer - Pointer to memory region to be checked
+ * Length - Length of this memory region
*
- * RETURN: 8 bit sum of buffer
+ * RETURN: Checksum (UINT8)
*
- * DESCRIPTION: Computes an 8 bit sum of the buffer(length) and returns it.
+ * DESCRIPTION: Calculates circular checksum of memory region.
*
******************************************************************************/
UINT8
-AcpiTbSumTable (
- void *Buffer,
+AcpiTbChecksum (
+ UINT8 *Buffer,
UINT32 Length)
{
- ACPI_NATIVE_UINT i;
UINT8 Sum = 0;
+ UINT8 *End = Buffer + Length;
- if (!Buffer || !Length)
+ while (Buffer < End)
{
- return (0);
+ Sum = (UINT8) (Sum + *(Buffer++));
}
- for (i = 0; i < Length; i++)
- {
- Sum = (UINT8) (Sum + ((UINT8 *) Buffer)[i]);
- }
- return (Sum);
+ return Sum;
}
/*******************************************************************************
*
- * FUNCTION: AcpiTbGenerateChecksum
+ * FUNCTION: AcpiTbInstallTable
*
- * PARAMETERS: Table - Pointer to a valid ACPI table (with a
- * standard ACPI header)
+ * PARAMETERS: Address - Physical address of DSDT or FACS
+ * Flags - Flags
+ * Signature - Table signature, NULL if no need to
+ * match
+ * TableIndex - Index into root table array
*
- * RETURN: 8 bit checksum of buffer
+ * RETURN: None
*
- * DESCRIPTION: Computes an 8 bit checksum of the table.
+ * DESCRIPTION: Install an ACPI table into the global data structure.
*
******************************************************************************/
-UINT8
-AcpiTbGenerateChecksum (
- ACPI_TABLE_HEADER *Table)
+void
+AcpiTbInstallTable (
+ ACPI_PHYSICAL_ADDRESS Address,
+ UINT8 Flags,
+ char *Signature,
+ UINT32 TableIndex)
{
- UINT8 Checksum;
+ ACPI_TABLE_HEADER *Table;
+
+
+ if (!Address)
+ {
+ ACPI_ERROR ((AE_INFO, "Null physical address for ACPI table [%s]",
+ Signature));
+ return;
+ }
+
+ /* Map just the table header */
+ Table = AcpiOsMapMemory (Address, sizeof (ACPI_TABLE_HEADER));
+ if (!Table)
+ {
+ return;
+ }
+
+ /* If a particular signature is expected, signature must match */
+
+ if (Signature &&
+ !ACPI_COMPARE_NAME (Table->Signature, Signature))
+ {
+ ACPI_ERROR ((AE_INFO, "Invalid signature 0x%X for ACPI table [%s]",
+ *ACPI_CAST_PTR (UINT32, Table->Signature), Signature));
+ goto UnmapAndExit;
+ }
- /* Sum the entire table as-is */
+ /* Initialize the table entry */
- Checksum = AcpiTbSumTable (Table, Table->Length);
+ AcpiGbl_RootTableList.Tables[TableIndex].Address = Address;
+ AcpiGbl_RootTableList.Tables[TableIndex].Length = Table->Length;
+ AcpiGbl_RootTableList.Tables[TableIndex].Flags = Flags;
- /* Subtract off the existing checksum value in the table */
+ ACPI_MOVE_32_TO_32 (
+ &(AcpiGbl_RootTableList.Tables[TableIndex].Signature),
+ Table->Signature);
- Checksum = (UINT8) (Checksum - Table->Checksum);
+ AcpiTbPrintTableHeader (Address, Table);
+
+ if (TableIndex == ACPI_TABLE_INDEX_DSDT)
+ {
+ /* Global integer width is based upon revision of the DSDT */
- /* Compute the final checksum */
+ AcpiUtSetIntegerWidth (Table->Revision);
+ }
- Checksum = (UINT8) (0 - Checksum);
- return (Checksum);
+UnmapAndExit:
+ AcpiOsUnmapMemory (Table, sizeof (ACPI_TABLE_HEADER));
}
/*******************************************************************************
*
- * FUNCTION: AcpiTbSetChecksum
+ * FUNCTION: AcpiTbGetRootTableEntry
+ *
+ * PARAMETERS: TableEntry - Pointer to the RSDT/XSDT table entry
+ * TableEntrySize - sizeof 32 or 64 (RSDT or XSDT)
*
- * PARAMETERS: Table - Pointer to a valid ACPI table (with a
- * standard ACPI header)
+ * RETURN: Physical address extracted from the root table
*
- * RETURN: None. Sets the table checksum field
+ * DESCRIPTION: Get one root table entry. Handles 32-bit and 64-bit cases on
+ * both 32-bit and 64-bit platforms
*
- * DESCRIPTION: Computes an 8 bit checksum of the table and inserts the
- * checksum into the table header.
+ * NOTE: ACPI_PHYSICAL_ADDRESS is 32-bit on 32-bit platforms, 64-bit on
+ * 64-bit platforms.
*
******************************************************************************/
-void
-AcpiTbSetChecksum (
- ACPI_TABLE_HEADER *Table)
+static ACPI_PHYSICAL_ADDRESS
+AcpiTbGetRootTableEntry (
+ UINT8 *TableEntry,
+ UINT32 TableEntrySize)
{
+ UINT64 Address64;
- Table->Checksum = AcpiTbGenerateChecksum (Table);
+
+ /*
+ * Get the table physical address (32-bit for RSDT, 64-bit for XSDT):
+ * Note: Addresses are 32-bit aligned (not 64) in both RSDT and XSDT
+ */
+ if (TableEntrySize == sizeof (UINT32))
+ {
+ /*
+ * 32-bit platform, RSDT: Return 32-bit table entry
+ * 64-bit platform, RSDT: Expand 32-bit to 64-bit and return
+ */
+ return ((ACPI_PHYSICAL_ADDRESS) (*ACPI_CAST_PTR (UINT32, TableEntry)));
+ }
+ else
+ {
+ /*
+ * 32-bit platform, XSDT: Truncate 64-bit to 32-bit and return
+ * 64-bit platform, XSDT: Move (unaligned) 64-bit to local, return 64-bit
+ */
+ ACPI_MOVE_64_TO_64 (&Address64, TableEntry);
+
+#if ACPI_MACHINE_WIDTH == 32
+ if (Address64 > ACPI_UINT32_MAX)
+ {
+ /* Will truncate 64-bit address to 32 bits, issue warning */
+
+ ACPI_WARNING ((AE_INFO,
+ "64-bit Physical Address in XSDT is too large (%8.8X%8.8X), truncating",
+ ACPI_FORMAT_UINT64 (Address64)));
+ }
+#endif
+ return ((ACPI_PHYSICAL_ADDRESS) (Address64));
+ }
}
/*******************************************************************************
*
- * FUNCTION: AcpiTbVerifyTableChecksum
+ * FUNCTION: AcpiTbParseRootTable
*
- * PARAMETERS: *TableHeader - ACPI table to verify
+ * PARAMETERS: Rsdp - Pointer to the RSDP
+ * Flags - Flags
*
- * RETURN: 8 bit checksum of table
+ * RETURN: Status
+ *
+ * DESCRIPTION: This function is called to parse the Root System Description
+ * Table (RSDT or XSDT)
*
- * DESCRIPTION: Generates an 8 bit checksum of table and returns and compares
- * it to the existing checksum value.
+ * NOTE: Tables are mapped (not copied) for efficiency. The FACS must
+ * be mapped and cannot be copied because it contains the actual
+ * memory location of the ACPI Global Lock.
*
******************************************************************************/
ACPI_STATUS
-AcpiTbVerifyTableChecksum (
- ACPI_TABLE_HEADER *TableHeader)
+AcpiTbParseRootTable (
+ ACPI_PHYSICAL_ADDRESS RsdpAddress,
+ UINT8 Flags)
{
- UINT8 Checksum;
+ ACPI_TABLE_RSDP *Rsdp;
+ UINT32 TableEntrySize;
+ UINT32 i;
+ UINT32 TableCount;
+ ACPI_TABLE_HEADER *Table;
+ ACPI_PHYSICAL_ADDRESS Address;
+ UINT32 Length;
+ UINT8 *TableEntry;
+ ACPI_STATUS Status;
- ACPI_FUNCTION_TRACE (TbVerifyTableChecksum);
+ ACPI_FUNCTION_TRACE (TbParseRootTable);
- /* Compute the checksum on the table */
+ /*
+ * Map the entire RSDP and extract the address of the RSDT or XSDT
+ */
+ Rsdp = AcpiOsMapMemory (RsdpAddress, sizeof (ACPI_TABLE_RSDP));
+ if (!Rsdp)
+ {
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
- Checksum = AcpiTbGenerateChecksum (TableHeader);
+ AcpiTbPrintTableHeader (RsdpAddress, ACPI_CAST_PTR (ACPI_TABLE_HEADER, Rsdp));
- /* Checksum ok? */
+ /* Differentiate between RSDT and XSDT root tables */
- if (Checksum == TableHeader->Checksum)
+ if (Rsdp->Revision > 1 && Rsdp->XsdtPhysicalAddress)
{
- return_ACPI_STATUS (AE_OK);
+ /*
+ * Root table is an XSDT (64-bit physical addresses). We must use the
+ * XSDT if the revision is > 1 and the XSDT pointer is present, as per
+ * the ACPI specification.
+ */
+ Address = (ACPI_PHYSICAL_ADDRESS) Rsdp->XsdtPhysicalAddress;
+ TableEntrySize = sizeof (UINT64);
}
+ else
+ {
+ /* Root table is an RSDT (32-bit physical addresses) */
- ACPI_WARNING ((AE_INFO,
- "Incorrect checksum in table [%4.4s] - is %2.2X, should be %2.2X",
- TableHeader->Signature, TableHeader->Checksum,
- Checksum));
+ Address = (ACPI_PHYSICAL_ADDRESS) Rsdp->RsdtPhysicalAddress;
+ TableEntrySize = sizeof (UINT32);
+ }
- return_ACPI_STATUS (AE_BAD_CHECKSUM);
-}
+ /*
+ * It is not possible to map more than one entry in some environments,
+ * so unmap the RSDP here before mapping other tables
+ */
+ AcpiOsUnmapMemory (Rsdp, sizeof (ACPI_TABLE_RSDP));
-#ifdef ACPI_OBSOLETE_FUNCTIONS
-/*******************************************************************************
- *
- * FUNCTION: AcpiTbHandleToObject
- *
- * PARAMETERS: TableId - Id for which the function is searching
- * TableDesc - Pointer to return the matching table
- * descriptor.
- *
- * RETURN: Search the tables to find one with a matching TableId and
- * return a pointer to that table descriptor.
- *
- ******************************************************************************/
+ /* Map the RSDT/XSDT table header to get the full table length */
-ACPI_STATUS
-AcpiTbHandleToObject (
- UINT16 TableId,
- ACPI_TABLE_DESC **ReturnTableDesc)
-{
- UINT32 i;
- ACPI_TABLE_DESC *TableDesc;
+ Table = AcpiOsMapMemory (Address, sizeof (ACPI_TABLE_HEADER));
+ if (!Table)
+ {
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
+
+ AcpiTbPrintTableHeader (Address, Table);
+ /* Get the length of the full table, verify length and map entire table */
- ACPI_FUNCTION_NAME (TbHandleToObject);
+ Length = Table->Length;
+ AcpiOsUnmapMemory (Table, sizeof (ACPI_TABLE_HEADER));
+ if (Length < sizeof (ACPI_TABLE_HEADER))
+ {
+ ACPI_ERROR ((AE_INFO, "Invalid length 0x%X in RSDT/XSDT", Length));
+ return_ACPI_STATUS (AE_INVALID_TABLE_LENGTH);
+ }
- for (i = 0; i < ACPI_TABLE_MAX; i++)
+ Table = AcpiOsMapMemory (Address, Length);
+ if (!Table)
{
- TableDesc = AcpiGbl_TableLists[i].Next;
- while (TableDesc)
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
+
+ /* Validate the root table checksum */
+
+ Status = AcpiTbVerifyChecksum (Table, Length);
+ if (ACPI_FAILURE (Status))
+ {
+ AcpiOsUnmapMemory (Table, Length);
+ return_ACPI_STATUS (Status);
+ }
+
+ /* Calculate the number of tables described in the root table */
+
+ TableCount = (UINT32) ((Table->Length - sizeof (ACPI_TABLE_HEADER)) / TableEntrySize);
+
+ /*
+ * First two entries in the table array are reserved for the DSDT and FACS,
+ * which are not actually present in the RSDT/XSDT - they come from the FADT
+ */
+ TableEntry = ACPI_CAST_PTR (UINT8, Table) + sizeof (ACPI_TABLE_HEADER);
+ AcpiGbl_RootTableList.Count = 2;
+
+ /*
+ * Initialize the root table array from the RSDT/XSDT
+ */
+ for (i = 0; i < TableCount; i++)
+ {
+ if (AcpiGbl_RootTableList.Count >= AcpiGbl_RootTableList.Size)
{
- if (TableDesc->TableId == TableId)
+ /* There is no more room in the root table array, attempt resize */
+
+ Status = AcpiTbResizeRootTableList ();
+ if (ACPI_FAILURE (Status))
{
- *ReturnTableDesc = TableDesc;
- return (AE_OK);
+ ACPI_WARNING ((AE_INFO, "Truncating %u table entries!",
+ (unsigned) (AcpiGbl_RootTableList.Size - AcpiGbl_RootTableList.Count)));
+ break;
}
-
- TableDesc = TableDesc->Next;
}
+
+ /* Get the table physical address (32-bit for RSDT, 64-bit for XSDT) */
+
+ AcpiGbl_RootTableList.Tables[AcpiGbl_RootTableList.Count].Address =
+ AcpiTbGetRootTableEntry (TableEntry, TableEntrySize);
+
+ TableEntry += TableEntrySize;
+ AcpiGbl_RootTableList.Count++;
}
- ACPI_ERROR ((AE_INFO, "TableId=%X does not exist", TableId));
- return (AE_BAD_PARAMETER);
-}
-#endif
+ /*
+ * It is not possible to map more than one entry in some environments,
+ * so unmap the root table here before mapping other tables
+ */
+ AcpiOsUnmapMemory (Table, Length);
+
+ /*
+ * Complete the initialization of the root table array by examining
+ * the header of each table
+ */
+ for (i = 2; i < AcpiGbl_RootTableList.Count; i++)
+ {
+ AcpiTbInstallTable (AcpiGbl_RootTableList.Tables[i].Address,
+ Flags, NULL, i);
+ /* Special case for FADT - get the DSDT and FACS */
+
+ if (ACPI_COMPARE_NAME (
+ &AcpiGbl_RootTableList.Tables[i].Signature, ACPI_SIG_FADT))
+ {
+ AcpiTbParseFadt (i, Flags);
+ }
+ }
+ return_ACPI_STATUS (AE_OK);
+}
diff --git a/usr/src/uts/intel/io/acpica/tables/tbxface.c b/usr/src/uts/intel/io/acpica/tables/tbxface.c
index 3a37e79dbd..7e10ac221e 100644
--- a/usr/src/uts/intel/io/acpica/tables/tbxface.c
+++ b/usr/src/uts/intel/io/acpica/tables/tbxface.c
@@ -2,7 +2,7 @@
*
* Module Name: tbxface - Public interfaces to the ACPI subsystem
* ACPI table oriented interfaces
- * $Revision: 1.79 $
+ * $Revision: 1.88 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -121,440 +121,649 @@
#include "acnamesp.h"
#include "actables.h"
-
#define _COMPONENT ACPI_TABLES
ACPI_MODULE_NAME ("tbxface")
+/* Local prototypes */
+
+static ACPI_STATUS
+AcpiTbLoadNamespace (
+ void);
+
/*******************************************************************************
*
- * FUNCTION: AcpiLoadTables
+ * FUNCTION: AcpiAllocateRootTable
*
- * PARAMETERS: None
+ * PARAMETERS: InitialTableCount - Size of InitialTableArray, in number of
+ * ACPI_TABLE_DESC structures
*
* RETURN: Status
*
- * DESCRIPTION: This function is called to load the ACPI tables from the
- * provided RSDT
+ * DESCRIPTION: Allocate a root table array. Used by iASL compiler and
+ * AcpiInitializeTables.
*
******************************************************************************/
ACPI_STATUS
-AcpiLoadTables (
- void)
+AcpiAllocateRootTable (
+ UINT32 InitialTableCount)
{
- ACPI_POINTER RsdpAddress;
- ACPI_STATUS Status;
+ AcpiGbl_RootTableList.Size = InitialTableCount;
+ AcpiGbl_RootTableList.Flags = ACPI_ROOT_ALLOW_RESIZE;
- ACPI_FUNCTION_TRACE (AcpiLoadTables);
-
+ return (AcpiTbResizeRootTableList ());
+}
- /* Get the RSDP */
- Status = AcpiOsGetRootPointer (ACPI_LOGICAL_ADDRESSING,
- &RsdpAddress);
- if (ACPI_FAILURE (Status))
- {
- ACPI_EXCEPTION ((AE_INFO, Status, "Could not get the RSDP"));
- goto ErrorExit;
- }
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiInitializeTables
+ *
+ * PARAMETERS: InitialTableArray - Pointer to an array of pre-allocated
+ * ACPI_TABLE_DESC structures. If NULL, the
+ * array is dynamically allocated.
+ * InitialTableCount - Size of InitialTableArray, in number of
+ * ACPI_TABLE_DESC structures
+ * AllowRealloc - Flag to tell Table Manager if resize of
+ * pre-allocated array is allowed. Ignored
+ * if InitialTableArray is NULL.
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Initialize the table manager, get the RSDP and RSDT/XSDT.
+ *
+ * NOTE: Allows static allocation of the initial table array in order
+ * to avoid the use of dynamic memory in confined environments
+ * such as the kernel boot sequence where it may not be available.
+ *
+ * If the host OS memory managers are initialized, use NULL for
+ * InitialTableArray, and the table will be dynamically allocated.
+ *
+ ******************************************************************************/
- /* Map and validate the RSDP */
+ACPI_STATUS
+AcpiInitializeTables (
+ ACPI_TABLE_DESC *InitialTableArray,
+ UINT32 InitialTableCount,
+ BOOLEAN AllowResize)
+{
+ ACPI_PHYSICAL_ADDRESS RsdpAddress;
+ ACPI_STATUS Status;
- AcpiGbl_TableFlags = RsdpAddress.PointerType;
- Status = AcpiTbVerifyRsdp (&RsdpAddress);
- if (ACPI_FAILURE (Status))
- {
- ACPI_EXCEPTION ((AE_INFO, Status, "During RSDP validation"));
- goto ErrorExit;
- }
+ ACPI_FUNCTION_TRACE (AcpiInitializeTables);
- /* Get the RSDT via the RSDP */
- Status = AcpiTbGetTableRsdt ();
- if (ACPI_FAILURE (Status))
+ /*
+ * Set up the Root Table Array
+ * Allocate the table array if requested
+ */
+ if (!InitialTableArray)
{
- ACPI_EXCEPTION ((AE_INFO, Status, "Could not load RSDT"));
- goto ErrorExit;
+ Status = AcpiAllocateRootTable (InitialTableCount);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
}
+ else
+ {
+ /* Root Table Array has been statically allocated by the host */
- /* Now get the tables needed by this subsystem (FADT, DSDT, etc.) */
+ ACPI_MEMSET (InitialTableArray, 0,
+ (ACPI_SIZE) InitialTableCount * sizeof (ACPI_TABLE_DESC));
- Status = AcpiTbGetRequiredTables ();
- if (ACPI_FAILURE (Status))
- {
- ACPI_EXCEPTION ((AE_INFO, Status,
- "Could not get all required tables (DSDT/FADT/FACS)"));
- goto ErrorExit;
+ AcpiGbl_RootTableList.Tables = InitialTableArray;
+ AcpiGbl_RootTableList.Size = InitialTableCount;
+ AcpiGbl_RootTableList.Flags = ACPI_ROOT_ORIGIN_UNKNOWN;
+ if (AllowResize)
+ {
+ AcpiGbl_RootTableList.Flags |= ACPI_ROOT_ALLOW_RESIZE;
+ }
}
- ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "ACPI Tables successfully acquired\n"));
-
- /* Load the namespace from the tables */
+ /* Get the address of the RSDP */
- Status = AcpiNsLoadNamespace ();
- if (ACPI_FAILURE (Status))
+ RsdpAddress = AcpiOsGetRootPointer ();
+ if (!RsdpAddress)
{
- ACPI_EXCEPTION ((AE_INFO, Status, "Could not load namespace"));
- goto ErrorExit;
+ return_ACPI_STATUS (AE_NOT_FOUND);
}
- return_ACPI_STATUS (AE_OK);
-
-
-ErrorExit:
- ACPI_EXCEPTION ((AE_INFO, Status, "Could not load tables"));
+ /*
+ * Get the root table (RSDT or XSDT) and extract all entries to the local
+ * Root Table Array. This array contains the information of the RSDT/XSDT
+ * in a common, more useable format.
+ */
+ Status = AcpiTbParseRootTable (RsdpAddress, ACPI_TABLE_ORIGIN_MAPPED);
return_ACPI_STATUS (Status);
}
-ACPI_EXPORT_SYMBOL (AcpiLoadTables)
+ACPI_EXPORT_SYMBOL (AcpiInitializeTables)
/*******************************************************************************
*
- * FUNCTION: AcpiLoadTable
+ * FUNCTION: AcpiReallocateRootTable
*
- * PARAMETERS: TablePtr - pointer to a buffer containing the entire
- * table to be loaded
+ * PARAMETERS: None
*
* RETURN: Status
*
- * DESCRIPTION: This function is called to load a table from the caller's
- * buffer. The buffer must contain an entire ACPI Table including
- * a valid header. The header fields will be verified, and if it
- * is determined that the table is invalid, the call will fail.
+ * DESCRIPTION: Reallocate Root Table List into dynamic memory. Copies the
+ * root list from the previously provided scratch area. Should
+ * be called once dynamic memory allocation is available in the
+ * kernel
*
******************************************************************************/
ACPI_STATUS
-AcpiLoadTable (
- ACPI_TABLE_HEADER *TablePtr)
+AcpiReallocateRootTable (
+ void)
{
- ACPI_STATUS Status;
- ACPI_TABLE_DESC TableInfo;
- ACPI_POINTER Address;
+ ACPI_TABLE_DESC *Tables;
+ ACPI_SIZE NewSize;
- ACPI_FUNCTION_TRACE (AcpiLoadTable);
+ ACPI_FUNCTION_TRACE (AcpiReallocateRootTable);
- if (!TablePtr)
+ /*
+ * Only reallocate the root table if the host provided a static buffer
+ * for the table array in the call to AcpiInitializeTables.
+ */
+ if (AcpiGbl_RootTableList.Flags & ACPI_ROOT_ORIGIN_ALLOCATED)
{
- return_ACPI_STATUS (AE_BAD_PARAMETER);
+ return_ACPI_STATUS (AE_SUPPORT);
}
- /* Copy the table to a local buffer */
+ NewSize = ((ACPI_SIZE) AcpiGbl_RootTableList.Count +
+ ACPI_ROOT_TABLE_SIZE_INCREMENT) *
+ sizeof (ACPI_TABLE_DESC);
- Address.PointerType = ACPI_LOGICAL_POINTER | ACPI_LOGICAL_ADDRESSING;
- Address.Pointer.Logical = TablePtr;
+ /* Create new array and copy the old array */
- Status = AcpiTbGetTableBody (&Address, TablePtr, &TableInfo);
- if (ACPI_FAILURE (Status))
+ Tables = ACPI_ALLOCATE_ZEROED (NewSize);
+ if (!Tables)
{
- return_ACPI_STATUS (Status);
+ return_ACPI_STATUS (AE_NO_MEMORY);
}
- /* Check signature for a valid table type */
+ ACPI_MEMCPY (Tables, AcpiGbl_RootTableList.Tables, NewSize);
- Status = AcpiTbRecognizeTable (&TableInfo, ACPI_TABLE_ALL);
- if (ACPI_FAILURE (Status))
+ AcpiGbl_RootTableList.Size = AcpiGbl_RootTableList.Count;
+ AcpiGbl_RootTableList.Tables = Tables;
+ AcpiGbl_RootTableList.Flags =
+ ACPI_ROOT_ORIGIN_ALLOCATED | ACPI_ROOT_ALLOW_RESIZE;
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiReallocateRootTable)
+
+
+/******************************************************************************
+ *
+ * FUNCTION: AcpiGetTableHeader
+ *
+ * PARAMETERS: Signature - ACPI signature of needed table
+ * Instance - Which instance (for SSDTs)
+ * OutTableHeader - The pointer to the table header to fill
+ *
+ * RETURN: Status and pointer to mapped table header
+ *
+ * DESCRIPTION: Finds an ACPI table header.
+ *
+ * NOTE: Caller is responsible in unmapping the header with
+ * AcpiOsUnmapMemory
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+AcpiGetTableHeader (
+ char *Signature,
+ UINT32 Instance,
+ ACPI_TABLE_HEADER *OutTableHeader)
+{
+ UINT32 i;
+ UINT32 j;
+ ACPI_TABLE_HEADER *Header;
+
+
+ /* Parameter validation */
+
+ if (!Signature || !OutTableHeader)
{
- return_ACPI_STATUS (Status);
+ return (AE_BAD_PARAMETER);
}
- /* Install the new table into the local data structures */
-
- Status = AcpiTbInstallTable (&TableInfo);
- if (ACPI_FAILURE (Status))
+ /*
+ * Walk the root table list
+ */
+ for (i = 0, j = 0; i < AcpiGbl_RootTableList.Count; i++)
{
- if (Status == AE_ALREADY_EXISTS)
+ if (!ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature),
+ Signature))
{
- /* Table already exists, no error */
+ continue;
+ }
- Status = AE_OK;
+ if (++j < Instance)
+ {
+ continue;
}
- /* Free table allocated by AcpiTbGetTableBody */
+ if (!AcpiGbl_RootTableList.Tables[i].Pointer)
+ {
+ if ((AcpiGbl_RootTableList.Tables[i].Flags & ACPI_TABLE_ORIGIN_MASK) ==
+ ACPI_TABLE_ORIGIN_MAPPED)
+ {
+ Header = AcpiOsMapMemory (AcpiGbl_RootTableList.Tables[i].Address,
+ sizeof (ACPI_TABLE_HEADER));
+ if (!Header)
+ {
+ return AE_NO_MEMORY;
+ }
+
+ ACPI_MEMCPY (OutTableHeader, Header, sizeof(ACPI_TABLE_HEADER));
+ AcpiOsUnmapMemory (Header, sizeof(ACPI_TABLE_HEADER));
+ }
+
+ else
+ {
+ return AE_NOT_FOUND;
+ }
+ }
- AcpiTbDeleteSingleTable (&TableInfo);
- return_ACPI_STATUS (Status);
+ else
+ {
+ ACPI_MEMCPY (OutTableHeader, AcpiGbl_RootTableList.Tables[i].Pointer,
+ sizeof(ACPI_TABLE_HEADER));
+ }
+
+ return (AE_OK);
}
- /* Convert the table to common format if necessary */
+ return (AE_NOT_FOUND);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiGetTableHeader)
- switch (TableInfo.Type)
- {
- case ACPI_TABLE_ID_FADT:
- Status = AcpiTbConvertTableFadt ();
- break;
+/******************************************************************************
+ *
+ * FUNCTION: AcpiGetTable
+ *
+ * PARAMETERS: Signature - ACPI signature of needed table
+ * Instance - Which instance (for SSDTs)
+ * OutTable - Where the pointer to the table is returned
+ *
+ * RETURN: Status and pointer to table
+ *
+ * DESCRIPTION: Finds and verifies an ACPI table.
+ *
+ *****************************************************************************/
- case ACPI_TABLE_ID_FACS:
+ACPI_STATUS
+AcpiGetTable (
+ char *Signature,
+ UINT32 Instance,
+ ACPI_TABLE_HEADER **OutTable)
+{
+ UINT32 i;
+ UINT32 j;
+ ACPI_STATUS Status;
- Status = AcpiTbBuildCommonFacs (&TableInfo);
- break;
- default:
- /* Load table into namespace if it contains executable AML */
+ /* Parameter validation */
- Status = AcpiNsLoadTable (TableInfo.InstalledDesc, AcpiGbl_RootNode);
- break;
+ if (!Signature || !OutTable)
+ {
+ return (AE_BAD_PARAMETER);
}
- if (ACPI_FAILURE (Status))
+ /*
+ * Walk the root table list
+ */
+ for (i = 0, j = 0; i < AcpiGbl_RootTableList.Count; i++)
{
- /* Uninstall table and free the buffer */
+ if (!ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature),
+ Signature))
+ {
+ continue;
+ }
+
+ if (++j < Instance)
+ {
+ continue;
+ }
+
+ Status = AcpiTbVerifyTable (&AcpiGbl_RootTableList.Tables[i]);
+ if (ACPI_SUCCESS (Status))
+ {
+ *OutTable = AcpiGbl_RootTableList.Tables[i].Pointer;
+ }
- (void) AcpiTbUninstallTable (TableInfo.InstalledDesc);
+ return (Status);
}
- return_ACPI_STATUS (Status);
+ return (AE_NOT_FOUND);
}
-ACPI_EXPORT_SYMBOL (AcpiLoadTable)
+ACPI_EXPORT_SYMBOL (AcpiGetTable)
/*******************************************************************************
*
- * FUNCTION: AcpiUnloadTable
+ * FUNCTION: AcpiGetTableByIndex
*
- * PARAMETERS: TableType - Type of table to be unloaded
+ * PARAMETERS: TableIndex - Table index
+ * Table - Where the pointer to the table is returned
*
- * RETURN: Status
+ * RETURN: Status and pointer to the table
*
- * DESCRIPTION: This routine is used to force the unload of a table
+ * DESCRIPTION: Obtain a table by an index into the global table list.
*
******************************************************************************/
ACPI_STATUS
-AcpiUnloadTable (
- ACPI_TABLE_TYPE TableType)
+AcpiGetTableByIndex (
+ UINT32 TableIndex,
+ ACPI_TABLE_HEADER **Table)
{
- ACPI_TABLE_DESC *TableDesc;
+ ACPI_STATUS Status;
- ACPI_FUNCTION_TRACE (AcpiUnloadTable);
+ ACPI_FUNCTION_TRACE (AcpiGetTableByIndex);
/* Parameter validation */
- if (TableType > ACPI_TABLE_ID_MAX)
+ if (!Table)
{
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
- /* Find all tables of the requested type */
+ (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
- TableDesc = AcpiGbl_TableLists[TableType].Next;
- if (!TableDesc)
+ /* Validate index */
+
+ if (TableIndex >= AcpiGbl_RootTableList.Count)
{
- return_ACPI_STATUS (AE_NOT_EXIST);
+ (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
}
- while (TableDesc)
+ if (!AcpiGbl_RootTableList.Tables[TableIndex].Pointer)
{
- /*
- * Delete all namespace objects owned by this table. Note that these
- * objects can appear anywhere in the namespace by virtue of the AML
- * "Scope" operator. Thus, we need to track ownership by an ID, not
- * simply a position within the hierarchy
- */
- AcpiNsDeleteNamespaceByOwner (TableDesc->OwnerId);
- TableDesc = TableDesc->Next;
- }
+ /* Table is not mapped, map it */
- /* Delete (or unmap) all tables of this type */
+ Status = AcpiTbVerifyTable (&AcpiGbl_RootTableList.Tables[TableIndex]);
+ if (ACPI_FAILURE (Status))
+ {
+ (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
+ return_ACPI_STATUS (Status);
+ }
+ }
- AcpiTbDeleteTablesByType (TableType);
+ *Table = AcpiGbl_RootTableList.Tables[TableIndex].Pointer;
+ (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
return_ACPI_STATUS (AE_OK);
}
-ACPI_EXPORT_SYMBOL (AcpiUnloadTable)
+ACPI_EXPORT_SYMBOL (AcpiGetTableByIndex)
/*******************************************************************************
*
- * FUNCTION: AcpiGetTableHeader
+ * FUNCTION: AcpiTbLoadNamespace
*
- * PARAMETERS: TableType - one of the defined table types
- * Instance - the non zero instance of the table, allows
- * support for multiple tables of the same type
- * see AcpiGbl_AcpiTableFlag
- * OutTableHeader - pointer to the ACPI_TABLE_HEADER if successful
+ * PARAMETERS: None
*
- * DESCRIPTION: This function is called to get an ACPI table header. The caller
- * supplies an pointer to a data area sufficient to contain an ACPI
- * ACPI_TABLE_HEADER structure.
+ * RETURN: Status
*
- * The header contains a length field that can be used to determine
- * the size of the buffer needed to contain the entire table. This
- * function is not valid for the RSD PTR table since it does not
- * have a standard header and is fixed length.
+ * DESCRIPTION: Load the namespace from the DSDT and all SSDTs/PSDTs found in
+ * the RSDT/XSDT.
*
******************************************************************************/
-ACPI_STATUS
-AcpiGetTableHeader (
- ACPI_TABLE_TYPE TableType,
- UINT32 Instance,
- ACPI_TABLE_HEADER *OutTableHeader)
+static ACPI_STATUS
+AcpiTbLoadNamespace (
+ void)
{
- ACPI_TABLE_HEADER *TblPtr;
ACPI_STATUS Status;
+ ACPI_TABLE_HEADER *Table;
+ UINT32 i;
- ACPI_FUNCTION_TRACE (AcpiGetTableHeader);
+ ACPI_FUNCTION_TRACE (TbLoadNamespace);
- if ((Instance == 0) ||
- (TableType == ACPI_TABLE_ID_RSDP) ||
- (!OutTableHeader))
+ (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
+
+ /*
+ * Load the namespace. The DSDT is required, but any SSDT and PSDT tables
+ * are optional.
+ */
+ if (!AcpiGbl_RootTableList.Count ||
+ !ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Signature),
+ ACPI_SIG_DSDT) ||
+ ACPI_FAILURE (AcpiTbVerifyTable(&AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT])))
{
- return_ACPI_STATUS (AE_BAD_PARAMETER);
+ Status = AE_NO_ACPI_TABLES;
+ goto UnlockAndExit;
}
- /* Check the table type and instance */
+ /*
+ * Find DSDT table
+ */
+ Status = AcpiOsTableOverride (
+ AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Pointer, &Table);
+ if (ACPI_SUCCESS (Status) && Table)
+ {
+ /*
+ * DSDT table has been found
+ */
+ AcpiTbDeleteTable (&AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT]);
+ AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Pointer = Table;
+ AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Length = Table->Length;
+ AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT].Flags = ACPI_TABLE_ORIGIN_UNKNOWN;
+
+ ACPI_INFO ((AE_INFO, "Table DSDT replaced by host OS"));
+ AcpiTbPrintTableHeader (0, Table);
+ }
- if ((TableType > ACPI_TABLE_ID_MAX) ||
- (ACPI_IS_SINGLE_TABLE (AcpiGbl_TableData[TableType].Flags) &&
- Instance > 1))
+ Status = AcpiTbVerifyTable (&AcpiGbl_RootTableList.Tables[ACPI_TABLE_INDEX_DSDT]);
+ if (ACPI_FAILURE (Status))
{
- return_ACPI_STATUS (AE_BAD_PARAMETER);
+ /* A valid DSDT is required */
+
+ Status = AE_NO_ACPI_TABLES;
+ goto UnlockAndExit;
}
- /* Get a pointer to the entire table */
+ (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
- Status = AcpiTbGetTablePtr (TableType, Instance, &TblPtr);
+ /*
+ * Load and parse tables.
+ */
+ Status = AcpiNsLoadTable (ACPI_TABLE_INDEX_DSDT, AcpiGbl_RootNode);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
- /* The function will return a NULL pointer if the table is not loaded */
-
- if (TblPtr == NULL)
+ /*
+ * Load any SSDT or PSDT tables. Note: Loop leaves tables locked
+ */
+ (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
+ for (i = 0; i < AcpiGbl_RootTableList.Count; ++i)
{
- return_ACPI_STATUS (AE_NOT_EXIST);
+ if ((!ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature),
+ ACPI_SIG_SSDT) &&
+ !ACPI_COMPARE_NAME (&(AcpiGbl_RootTableList.Tables[i].Signature),
+ ACPI_SIG_PSDT)) ||
+ ACPI_FAILURE (AcpiTbVerifyTable (&AcpiGbl_RootTableList.Tables[i])))
+ {
+ continue;
+ }
+
+ /* Ignore errors while loading tables, get as many as possible */
+
+ (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
+ (void) AcpiNsLoadTable (i, AcpiGbl_RootNode);
+ (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
}
- /* Copy the header to the caller's buffer */
+ ACPI_DEBUG_PRINT ((ACPI_DB_INIT, "ACPI Tables successfully acquired\n"));
+
+UnlockAndExit:
+ (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
+ return_ACPI_STATUS (Status);
+}
- ACPI_MEMCPY (ACPI_CAST_PTR (void, OutTableHeader),
- ACPI_CAST_PTR (void, TblPtr), sizeof (ACPI_TABLE_HEADER));
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiLoadTables
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Load the ACPI tables from the RSDT/XSDT
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiLoadTables (
+ void)
+{
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (AcpiLoadTables);
+
+
+ /*
+ * Load the namespace from the tables
+ */
+ Status = AcpiTbLoadNamespace ();
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_EXCEPTION ((AE_INFO, Status, "While loading namespace from ACPI tables"));
+ }
return_ACPI_STATUS (Status);
}
-ACPI_EXPORT_SYMBOL (AcpiGetTableHeader)
+ACPI_EXPORT_SYMBOL (AcpiLoadTables)
/*******************************************************************************
*
- * FUNCTION: AcpiGetTable
+ * FUNCTION: AcpiInstallTableHandler
*
- * PARAMETERS: TableType - one of the defined table types
- * Instance - the non zero instance of the table, allows
- * support for multiple tables of the same type
- * see AcpiGbl_AcpiTableFlag
- * RetBuffer - pointer to a structure containing a buffer to
- * receive the table
+ * PARAMETERS: Handler - Table event handler
+ * Context - Value passed to the handler on each event
*
* RETURN: Status
*
- * DESCRIPTION: This function is called to get an ACPI table. The caller
- * supplies an OutBuffer large enough to contain the entire ACPI
- * table. The caller should call the AcpiGetTableHeader function
- * first to determine the buffer size needed. Upon completion
- * the OutBuffer->Length field will indicate the number of bytes
- * copied into the OutBuffer->BufPtr buffer. This table will be
- * a complete table including the header.
+ * DESCRIPTION: Install table event handler
*
******************************************************************************/
ACPI_STATUS
-AcpiGetTable (
- ACPI_TABLE_TYPE TableType,
- UINT32 Instance,
- ACPI_BUFFER *RetBuffer)
+AcpiInstallTableHandler (
+ ACPI_TABLE_HANDLER Handler,
+ void *Context)
{
- ACPI_TABLE_HEADER *TblPtr;
ACPI_STATUS Status;
- ACPI_SIZE TableLength;
-
- ACPI_FUNCTION_TRACE (AcpiGetTable);
+ ACPI_FUNCTION_TRACE (AcpiInstallTableHandler);
- /* Parameter validation */
- if (Instance == 0)
+ if (!Handler)
{
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
- Status = AcpiUtValidateBuffer (RetBuffer);
+ Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
- /* Check the table type and instance */
+ /* Don't allow more than one handler */
- if ((TableType > ACPI_TABLE_ID_MAX) ||
- (ACPI_IS_SINGLE_TABLE (AcpiGbl_TableData[TableType].Flags) &&
- Instance > 1))
+ if (AcpiGbl_TableHandler)
{
- return_ACPI_STATUS (AE_BAD_PARAMETER);
+ Status = AE_ALREADY_EXISTS;
+ goto Cleanup;
}
- /* Get a pointer to the entire table */
+ /* Install the handler */
- Status = AcpiTbGetTablePtr (TableType, Instance, &TblPtr);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
+ AcpiGbl_TableHandler = Handler;
+ AcpiGbl_TableHandlerContext = Context;
- /*
- * AcpiTbGetTablePtr will return a NULL pointer if the
- * table is not loaded.
- */
- if (TblPtr == NULL)
- {
- return_ACPI_STATUS (AE_NOT_EXIST);
- }
+Cleanup:
+ (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
+ return_ACPI_STATUS (Status);
+}
- /* Get the table length */
+ACPI_EXPORT_SYMBOL (AcpiInstallTableHandler)
- if (TableType == ACPI_TABLE_ID_RSDP)
- {
- /* RSD PTR is the only "table" without a header */
- TableLength = sizeof (RSDP_DESCRIPTOR);
- }
- else
- {
- TableLength = (ACPI_SIZE) TblPtr->Length;
- }
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiRemoveTableHandler
+ *
+ * PARAMETERS: Handler - Table event handler that was installed
+ * previously.
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Remove table event handler
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiRemoveTableHandler (
+ ACPI_TABLE_HANDLER Handler)
+{
+ ACPI_STATUS Status;
+
- /* Validate/Allocate/Clear caller buffer */
+ ACPI_FUNCTION_TRACE (AcpiRemoveTableHandler);
- Status = AcpiUtInitializeBuffer (RetBuffer, TableLength);
+
+ Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
}
- /* Copy the table to the buffer */
+ /* Make sure that the installed handler is the same */
- ACPI_MEMCPY (ACPI_CAST_PTR (void, RetBuffer->Pointer),
- ACPI_CAST_PTR (void, TblPtr), TableLength);
+ if (!Handler ||
+ Handler != AcpiGbl_TableHandler)
+ {
+ Status = AE_BAD_PARAMETER;
+ goto Cleanup;
+ }
- return_ACPI_STATUS (AE_OK);
-}
+ /* Remove the handler */
-ACPI_EXPORT_SYMBOL (AcpiGetTable)
+ AcpiGbl_TableHandler = NULL;
+
+Cleanup:
+ (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
+ return_ACPI_STATUS (Status);
+}
+ACPI_EXPORT_SYMBOL (AcpiRemoveTableHandler)
diff --git a/usr/src/uts/intel/io/acpica/tables/tbxfroot.c b/usr/src/uts/intel/io/acpica/tables/tbxfroot.c
index de849be97b..0f971496e7 100644
--- a/usr/src/uts/intel/io/acpica/tables/tbxfroot.c
+++ b/usr/src/uts/intel/io/acpica/tables/tbxfroot.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: tbxfroot - Find the root ACPI table (RSDT)
- * $Revision: 1.102 $
+ * $Revision: 1.106 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -125,22 +125,21 @@
/* Local prototypes */
-static ACPI_STATUS
-AcpiTbFindRsdp (
- ACPI_TABLE_DESC *TableInfo,
- UINT32 Flags);
-
static UINT8 *
AcpiTbScanMemoryForRsdp (
UINT8 *StartAddress,
UINT32 Length);
+static ACPI_STATUS
+AcpiTbValidateRsdp (
+ ACPI_TABLE_RSDP *Rsdp);
+
/*******************************************************************************
*
* FUNCTION: AcpiTbValidateRsdp
*
- * PARAMETERS: Rsdp - Pointer to unvalidated RSDP
+ * PARAMETERS: Rsdp - Pointer to unvalidated RSDP
*
* RETURN: Status
*
@@ -148,17 +147,20 @@ AcpiTbScanMemoryForRsdp (
*
******************************************************************************/
-ACPI_STATUS
+static ACPI_STATUS
AcpiTbValidateRsdp (
- RSDP_DESCRIPTOR *Rsdp)
+ ACPI_TABLE_RSDP *Rsdp)
{
ACPI_FUNCTION_ENTRY ();
/*
- * The signature and checksum must both be correct
+ * The signature and checksum must both be correct
+ *
+ * Note: Sometimes there exists more than one RSDP in memory; the valid
+ * RSDP has a valid checksum, all others have an invalid checksum.
*/
- if (ACPI_STRNCMP ((char *) Rsdp, RSDP_SIG, sizeof (RSDP_SIG)-1) != 0)
+ if (ACPI_STRNCMP ((char *) Rsdp, ACPI_SIG_RSDP, sizeof (ACPI_SIG_RSDP)-1) != 0)
{
/* Nope, BAD Signature */
@@ -167,7 +169,7 @@ AcpiTbValidateRsdp (
/* Check the standard checksum */
- if (AcpiTbSumTable (Rsdp, ACPI_RSDP_CHECKSUM_LENGTH) != 0)
+ if (AcpiTbChecksum ((UINT8 *) Rsdp, ACPI_RSDP_CHECKSUM_LENGTH) != 0)
{
return (AE_BAD_CHECKSUM);
}
@@ -175,7 +177,7 @@ AcpiTbValidateRsdp (
/* Check extended checksum if table version >= 2 */
if ((Rsdp->Revision >= 2) &&
- (AcpiTbSumTable (Rsdp, ACPI_RSDP_XCHECKSUM_LENGTH) != 0))
+ (AcpiTbChecksum ((UINT8 *) Rsdp, ACPI_RSDP_XCHECKSUM_LENGTH) != 0))
{
return (AE_BAD_CHECKSUM);
}
@@ -186,357 +188,125 @@ AcpiTbValidateRsdp (
/*******************************************************************************
*
- * FUNCTION: AcpiTbFindTable
- *
- * PARAMETERS: Signature - String with ACPI table signature
- * OemId - String with the table OEM ID
- * OemTableId - String with the OEM Table ID
- * TablePtr - Where the table pointer is returned
- *
- * RETURN: Status
- *
- * DESCRIPTION: Find an ACPI table (in the RSDT/XSDT) that matches the
- * Signature, OEM ID and OEM Table ID.
+ * FUNCTION: AcpiTbFindRsdp
*
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiTbFindTable (
- char *Signature,
- char *OemId,
- char *OemTableId,
- ACPI_TABLE_HEADER **TablePtr)
-{
- ACPI_STATUS Status;
- ACPI_TABLE_HEADER *Table;
-
-
- ACPI_FUNCTION_TRACE (TbFindTable);
-
-
- /* Validate string lengths */
-
- if ((ACPI_STRLEN (Signature) > ACPI_NAME_SIZE) ||
- (ACPI_STRLEN (OemId) > sizeof (Table->OemId)) ||
- (ACPI_STRLEN (OemTableId) > sizeof (Table->OemTableId)))
- {
- return_ACPI_STATUS (AE_AML_STRING_LIMIT);
- }
-
- if (ACPI_COMPARE_NAME (Signature, DSDT_SIG))
- {
- /*
- * The DSDT pointer is contained in the FADT, not the RSDT.
- * This code should suffice, because the only code that would perform
- * a "find" on the DSDT is the DataTableRegion() AML opcode -- in
- * which case, the DSDT is guaranteed to be already loaded.
- * If this becomes insufficient, the FADT will have to be found first.
- */
- if (!AcpiGbl_DSDT)
- {
- return_ACPI_STATUS (AE_NO_ACPI_TABLES);
- }
- Table = AcpiGbl_DSDT;
- }
- else
- {
- /* Find the table */
-
- Status = AcpiGetFirmwareTable (Signature, 1,
- ACPI_LOGICAL_ADDRESSING, &Table);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
- }
-
- /* Check OemId and OemTableId */
-
- if ((OemId[0] &&
- ACPI_STRNCMP (
- OemId, Table->OemId,
- sizeof (Table->OemId))) ||
-
- (OemTableId[0] &&
- ACPI_STRNCMP (
- OemTableId, Table->OemTableId,
- sizeof (Table->OemTableId))))
- {
- return_ACPI_STATUS (AE_AML_NAME_NOT_FOUND);
- }
-
- ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "Found table [%4.4s]\n",
- Table->Signature));
-
- *TablePtr = Table;
- return_ACPI_STATUS (AE_OK);
-}
-
-
-/*******************************************************************************
+ * PARAMETERS: TableAddress - Where the table pointer is returned
*
- * FUNCTION: AcpiGetFirmwareTable
+ * RETURN: Status, RSDP physical address
*
- * PARAMETERS: Signature - Any ACPI table signature
- * Instance - the non zero instance of the table, allows
- * support for multiple tables of the same type
- * Flags - Physical/Virtual support
- * TablePointer - Where a buffer containing the table is
- * returned
+ * DESCRIPTION: Search lower 1Mbyte of memory for the root system descriptor
+ * pointer structure. If it is found, set *RSDP to point to it.
*
- * RETURN: Status
+ * NOTE1: The RSDP must be either in the first 1K of the Extended
+ * BIOS Data Area or between E0000 and FFFFF (From ACPI Spec.)
+ * Only a 32-bit physical address is necessary.
*
- * DESCRIPTION: This function is called to get an ACPI table. A buffer is
- * allocated for the table and returned in TablePointer.
- * This table will be a complete table including the header.
+ * NOTE2: This function is always available, regardless of the
+ * initialization state of the rest of ACPI.
*
******************************************************************************/
ACPI_STATUS
-AcpiGetFirmwareTable (
- ACPI_STRING Signature,
- UINT32 Instance,
- UINT32 Flags,
- ACPI_TABLE_HEADER **TablePointer)
+AcpiFindRootPointer (
+ ACPI_SIZE *TableAddress)
{
- ACPI_STATUS Status;
- ACPI_POINTER Address;
- ACPI_TABLE_HEADER *Header = NULL;
- ACPI_TABLE_DESC *TableInfo = NULL;
- ACPI_TABLE_DESC *RsdtInfo;
- UINT32 TableCount;
- UINT32 i;
- UINT32 j;
-
+ UINT8 *TablePtr;
+ UINT8 *MemRover;
+ UINT32 PhysicalAddress;
- ACPI_FUNCTION_TRACE (AcpiGetFirmwareTable);
+ ACPI_FUNCTION_TRACE (AcpiFindRootPointer);
- /*
- * Ensure that at least the table manager is initialized. We don't
- * require that the entire ACPI subsystem is up for this interface.
- * If we have a buffer, we must have a length too
- */
- if ((Instance == 0) ||
- (!Signature) ||
- (!TablePointer))
- {
- return_ACPI_STATUS (AE_BAD_PARAMETER);
- }
- /* Ensure that we have a RSDP */
+ /* 1a) Get the location of the Extended BIOS Data Area (EBDA) */
- if (!AcpiGbl_RSDP)
+ TablePtr = AcpiOsMapMemory (
+ (ACPI_PHYSICAL_ADDRESS) ACPI_EBDA_PTR_LOCATION,
+ ACPI_EBDA_PTR_LENGTH);
+ if (!TablePtr)
{
- /* Get the RSDP */
+ ACPI_ERROR ((AE_INFO,
+ "Could not map memory at %8.8X for length %X",
+ ACPI_EBDA_PTR_LOCATION, ACPI_EBDA_PTR_LENGTH));
- Status = AcpiOsGetRootPointer (Flags, &Address);
- if (ACPI_FAILURE (Status))
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "RSDP not found\n"));
- return_ACPI_STATUS (AE_NO_ACPI_TABLES);
- }
-
- /* Map and validate the RSDP */
-
- if ((Flags & ACPI_MEMORY_MODE) == ACPI_LOGICAL_ADDRESSING)
- {
- Status = AcpiOsMapMemory (Address.Pointer.Physical,
- sizeof (RSDP_DESCRIPTOR), (void *) &AcpiGbl_RSDP);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
- }
- else
- {
- AcpiGbl_RSDP = Address.Pointer.Logical;
- }
-
- /* The RDSP signature and checksum must both be correct */
-
- Status = AcpiTbValidateRsdp (AcpiGbl_RSDP);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
- }
-
- /* Get the RSDT address via the RSDP */
-
- AcpiTbGetRsdtAddress (&Address);
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "RSDP located at %p, RSDT physical=%8.8X%8.8X\n",
- AcpiGbl_RSDP,
- ACPI_FORMAT_UINT64 (Address.Pointer.Value)));
-
- /* Insert ProcessorMode flags */
-
- Address.PointerType |= Flags;
-
- /* Get and validate the RSDT */
-
- RsdtInfo = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_TABLE_DESC));
- if (!RsdtInfo)
- {
return_ACPI_STATUS (AE_NO_MEMORY);
}
- Status = AcpiTbGetTable (&Address, RsdtInfo);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
-
- Status = AcpiTbValidateRsdt (RsdtInfo->Pointer);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
+ ACPI_MOVE_16_TO_32 (&PhysicalAddress, TablePtr);
- /* Allocate a scratch table header and table descriptor */
+ /* Convert segment part to physical address */
- Header = ACPI_ALLOCATE (sizeof (ACPI_TABLE_HEADER));
- if (!Header)
- {
- Status = AE_NO_MEMORY;
- goto Cleanup;
- }
+ PhysicalAddress <<= 4;
+ AcpiOsUnmapMemory (TablePtr, ACPI_EBDA_PTR_LENGTH);
- TableInfo = ACPI_ALLOCATE (sizeof (ACPI_TABLE_DESC));
- if (!TableInfo)
- {
- Status = AE_NO_MEMORY;
- goto Cleanup;
- }
+ /* EBDA present? */
- /* Get the number of table pointers within the RSDT */
-
- TableCount = AcpiTbGetTableCount (AcpiGbl_RSDP, RsdtInfo->Pointer);
- Address.PointerType = AcpiGbl_TableFlags | Flags;
-
- /*
- * Search the RSDT/XSDT for the correct instance of the
- * requested table
- */
- for (i = 0, j = 0; i < TableCount; i++)
+ if (PhysicalAddress > 0x400)
{
/*
- * Get the next table pointer, handle RSDT vs. XSDT
- * RSDT pointers are 32 bits, XSDT pointers are 64 bits
+ * 1b) Search EBDA paragraphs (EBDA is required to be a
+ * minimum of 1K length)
*/
- if (AcpiGbl_RootTableType == ACPI_TABLE_TYPE_RSDT)
+ TablePtr = AcpiOsMapMemory (
+ (ACPI_PHYSICAL_ADDRESS) PhysicalAddress,
+ ACPI_EBDA_WINDOW_SIZE);
+ if (!TablePtr)
{
- Address.Pointer.Value = (ACPI_CAST_PTR (
- RSDT_DESCRIPTOR, RsdtInfo->Pointer))->TableOffsetEntry[i];
- }
- else
- {
- Address.Pointer.Value = ACPI_GET_ADDRESS ((ACPI_CAST_PTR (
- XSDT_DESCRIPTOR, RsdtInfo->Pointer))->TableOffsetEntry[i]);
+ ACPI_ERROR ((AE_INFO,
+ "Could not map memory at %8.8X for length %X",
+ PhysicalAddress, ACPI_EBDA_WINDOW_SIZE));
+
+ return_ACPI_STATUS (AE_NO_MEMORY);
}
- /* Get the table header */
+ MemRover = AcpiTbScanMemoryForRsdp (TablePtr, ACPI_EBDA_WINDOW_SIZE);
+ AcpiOsUnmapMemory (TablePtr, ACPI_EBDA_WINDOW_SIZE);
- Status = AcpiTbGetTableHeader (&Address, Header);
- if (ACPI_FAILURE (Status))
+ if (MemRover)
{
- goto Cleanup;
- }
+ /* Return the physical address */
- /* Compare table signatures and table instance */
+ PhysicalAddress += (UINT32) ACPI_PTR_DIFF (MemRover, TablePtr);
- if (ACPI_COMPARE_NAME (Header->Signature, Signature))
- {
- /* An instance of the table was found */
-
- j++;
- if (j >= Instance)
- {
- /* Found the correct instance, get the entire table */
-
- Status = AcpiTbGetTableBody (&Address, Header, TableInfo);
- if (ACPI_FAILURE (Status))
- {
- goto Cleanup;
- }
-
- *TablePointer = TableInfo->Pointer;
- goto Cleanup;
- }
+ *TableAddress = PhysicalAddress;
+ return_ACPI_STATUS (AE_OK);
}
}
- /* Did not find the table */
-
- Status = AE_NOT_EXIST;
-
+ /*
+ * 2) Search upper memory: 16-byte boundaries in E0000h-FFFFFh
+ */
+ TablePtr = AcpiOsMapMemory (
+ (ACPI_PHYSICAL_ADDRESS) ACPI_HI_RSDP_WINDOW_BASE,
+ ACPI_HI_RSDP_WINDOW_SIZE);
-Cleanup:
- if (RsdtInfo->Pointer)
+ if (!TablePtr)
{
- AcpiOsUnmapMemory (RsdtInfo->Pointer,
- (ACPI_SIZE) RsdtInfo->Pointer->Length);
- }
- ACPI_FREE (RsdtInfo);
+ ACPI_ERROR ((AE_INFO,
+ "Could not map memory at %8.8X for length %X",
+ ACPI_HI_RSDP_WINDOW_BASE, ACPI_HI_RSDP_WINDOW_SIZE));
- if (Header)
- {
- ACPI_FREE (Header);
- }
- if (TableInfo)
- {
- ACPI_FREE (TableInfo);
+ return_ACPI_STATUS (AE_NO_MEMORY);
}
- return_ACPI_STATUS (Status);
-}
-
-ACPI_EXPORT_SYMBOL (AcpiGetFirmwareTable)
+ MemRover = AcpiTbScanMemoryForRsdp (TablePtr, ACPI_HI_RSDP_WINDOW_SIZE);
+ AcpiOsUnmapMemory (TablePtr, ACPI_HI_RSDP_WINDOW_SIZE);
-/* TBD: Move to a new file */
-
-#if ACPI_MACHINE_WIDTH != 16
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiFindRootPointer
- *
- * PARAMETERS: Flags - Logical/Physical addressing
- * RsdpAddress - Where to place the RSDP address
- *
- * RETURN: Status, Physical address of the RSDP
- *
- * DESCRIPTION: Find the RSDP
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiFindRootPointer (
- UINT32 Flags,
- ACPI_POINTER *RsdpAddress)
-{
- ACPI_TABLE_DESC TableInfo;
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_TRACE (AcpiFindRootPointer);
-
-
- /* Get the RSDP */
-
- Status = AcpiTbFindRsdp (&TableInfo, Flags);
- if (ACPI_FAILURE (Status))
+ if (MemRover)
{
- ACPI_EXCEPTION ((AE_INFO, Status,
- "RSDP structure not found - Flags=%X", Flags));
+ /* Return the physical address */
- return_ACPI_STATUS (AE_NO_ACPI_TABLES);
+ PhysicalAddress = (UINT32)
+ (ACPI_HI_RSDP_WINDOW_BASE + ACPI_PTR_DIFF (MemRover, TablePtr));
+
+ *TableAddress = PhysicalAddress;
+ return_ACPI_STATUS (AE_OK);
}
- RsdpAddress->PointerType = ACPI_PHYSICAL_POINTER;
- RsdpAddress->Pointer.Physical = TableInfo.PhysicalAddress;
- return_ACPI_STATUS (AE_OK);
+ /* A valid RSDP was not found */
+
+ ACPI_ERROR ((AE_INFO, "A valid RSDP was not found"));
+ return_ACPI_STATUS (AE_NOT_FOUND);
}
ACPI_EXPORT_SYMBOL (AcpiFindRootPointer)
@@ -577,7 +347,7 @@ AcpiTbScanMemoryForRsdp (
{
/* The RSDP signature and checksum must both be correct */
- Status = AcpiTbValidateRsdp (ACPI_CAST_PTR (RSDP_DESCRIPTOR, MemRover));
+ Status = AcpiTbValidateRsdp (ACPI_CAST_PTR (ACPI_TABLE_RSDP, MemRover));
if (ACPI_SUCCESS (Status))
{
/* Sig and checksum valid, we have found a real RSDP */
@@ -598,186 +368,3 @@ AcpiTbScanMemoryForRsdp (
return_PTR (NULL);
}
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiTbFindRsdp
- *
- * PARAMETERS: TableInfo - Where the table info is returned
- * Flags - Current memory mode (logical vs.
- * physical addressing)
- *
- * RETURN: Status, RSDP physical address
- *
- * DESCRIPTION: Search lower 1Mbyte of memory for the root system descriptor
- * pointer structure. If it is found, set *RSDP to point to it.
- *
- * NOTE1: The RSDP must be either in the first 1K of the Extended
- * BIOS Data Area or between E0000 and FFFFF (From ACPI Spec.)
- * Only a 32-bit physical address is necessary.
- *
- * NOTE2: This function is always available, regardless of the
- * initialization state of the rest of ACPI.
- *
- ******************************************************************************/
-
-static ACPI_STATUS
-AcpiTbFindRsdp (
- ACPI_TABLE_DESC *TableInfo,
- UINT32 Flags)
-{
- UINT8 *TablePtr;
- UINT8 *MemRover;
- UINT32 PhysicalAddress;
- ACPI_STATUS Status;
-
-
- ACPI_FUNCTION_TRACE (TbFindRsdp);
-
-
- /*
- * Scan supports either logical addressing or physical addressing
- */
- if ((Flags & ACPI_MEMORY_MODE) == ACPI_LOGICAL_ADDRESSING)
- {
- /* 1a) Get the location of the Extended BIOS Data Area (EBDA) */
-
- Status = AcpiOsMapMemory (
- (ACPI_PHYSICAL_ADDRESS) ACPI_EBDA_PTR_LOCATION,
- ACPI_EBDA_PTR_LENGTH, (void *) &TablePtr);
- if (ACPI_FAILURE (Status))
- {
- ACPI_ERROR ((AE_INFO,
- "Could not map memory at %8.8X for length %X",
- ACPI_EBDA_PTR_LOCATION, ACPI_EBDA_PTR_LENGTH));
-
- return_ACPI_STATUS (Status);
- }
-
- ACPI_MOVE_16_TO_32 (&PhysicalAddress, TablePtr);
-
- /* Convert segment part to physical address */
-
- PhysicalAddress <<= 4;
- AcpiOsUnmapMemory (TablePtr, ACPI_EBDA_PTR_LENGTH);
-
- /* EBDA present? */
-
- if (PhysicalAddress > 0x400)
- {
- /*
- * 1b) Search EBDA paragraphs (EBDA is required to be a
- * minimum of 1K length)
- */
- Status = AcpiOsMapMemory (
- (ACPI_PHYSICAL_ADDRESS) PhysicalAddress,
- ACPI_EBDA_WINDOW_SIZE, (void *) &TablePtr);
- if (ACPI_FAILURE (Status))
- {
- ACPI_ERROR ((AE_INFO,
- "Could not map memory at %8.8X for length %X",
- PhysicalAddress, ACPI_EBDA_WINDOW_SIZE));
-
- return_ACPI_STATUS (Status);
- }
-
- MemRover = AcpiTbScanMemoryForRsdp (TablePtr,
- ACPI_EBDA_WINDOW_SIZE);
- AcpiOsUnmapMemory (TablePtr, ACPI_EBDA_WINDOW_SIZE);
-
- if (MemRover)
- {
- /* Return the physical address */
-
- PhysicalAddress += (UINT32) ACPI_PTR_DIFF (MemRover, TablePtr);
-
- TableInfo->PhysicalAddress =
- (ACPI_PHYSICAL_ADDRESS) PhysicalAddress;
- return_ACPI_STATUS (AE_OK);
- }
- }
-
- /*
- * 2) Search upper memory: 16-byte boundaries in E0000h-FFFFFh
- */
- Status = AcpiOsMapMemory (
- (ACPI_PHYSICAL_ADDRESS) ACPI_HI_RSDP_WINDOW_BASE,
- ACPI_HI_RSDP_WINDOW_SIZE, (void *) &TablePtr);
-
- if (ACPI_FAILURE (Status))
- {
- ACPI_ERROR ((AE_INFO,
- "Could not map memory at %8.8X for length %X",
- ACPI_HI_RSDP_WINDOW_BASE, ACPI_HI_RSDP_WINDOW_SIZE));
-
- return_ACPI_STATUS (Status);
- }
-
- MemRover = AcpiTbScanMemoryForRsdp (TablePtr, ACPI_HI_RSDP_WINDOW_SIZE);
- AcpiOsUnmapMemory (TablePtr, ACPI_HI_RSDP_WINDOW_SIZE);
-
- if (MemRover)
- {
- /* Return the physical address */
-
- PhysicalAddress = (UINT32)
- (ACPI_HI_RSDP_WINDOW_BASE + ACPI_PTR_DIFF (MemRover, TablePtr));
-
- TableInfo->PhysicalAddress =
- (ACPI_PHYSICAL_ADDRESS) PhysicalAddress;
- return_ACPI_STATUS (AE_OK);
- }
- }
-
- /*
- * Physical addressing
- */
- else
- {
- /* 1a) Get the location of the EBDA */
-
- ACPI_MOVE_16_TO_32 (&PhysicalAddress, ACPI_EBDA_PTR_LOCATION);
- PhysicalAddress <<= 4; /* Convert segment to physical address */
-
- /* EBDA present? */
-
- if (PhysicalAddress > 0x400)
- {
- /*
- * 1b) Search EBDA paragraphs (EBDA is required to be a minimum of
- * 1K length)
- */
- MemRover = AcpiTbScanMemoryForRsdp (
- ACPI_PHYSADDR_TO_PTR (PhysicalAddress),
- ACPI_EBDA_WINDOW_SIZE);
- if (MemRover)
- {
- /* Return the physical address */
-
- TableInfo->PhysicalAddress = ACPI_TO_INTEGER (MemRover);
- return_ACPI_STATUS (AE_OK);
- }
- }
-
- /* 2) Search upper memory: 16-byte boundaries in E0000h-FFFFFh */
-
- MemRover = AcpiTbScanMemoryForRsdp (
- ACPI_PHYSADDR_TO_PTR (ACPI_HI_RSDP_WINDOW_BASE),
- ACPI_HI_RSDP_WINDOW_SIZE);
- if (MemRover)
- {
- /* Found it, return the physical address */
-
- TableInfo->PhysicalAddress = ACPI_TO_INTEGER (MemRover);
- return_ACPI_STATUS (AE_OK);
- }
- }
-
- /* A valid RSDP was not found */
-
- ACPI_ERROR ((AE_INFO, "No valid RSDP was found"));
- return_ACPI_STATUS (AE_NOT_FOUND);
-}
-
-#endif
-
diff --git a/usr/src/uts/intel/io/acpica/utilities/utalloc.c b/usr/src/uts/intel/io/acpica/utilities/utalloc.c
index 91dcfcfcec..49ee6bdaca 100644
--- a/usr/src/uts/intel/io/acpica/utilities/utalloc.c
+++ b/usr/src/uts/intel/io/acpica/utilities/utalloc.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utalloc - local memory allocation routines
- * $Revision: 1.162 $
+ * $Revision: 1.166 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -117,6 +117,7 @@
#define __UTALLOC_C__
#include "acpi.h"
+#include "acdebug.h"
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME ("utalloc")
@@ -218,6 +219,15 @@ ACPI_STATUS
AcpiUtDeleteCaches (
void)
{
+#ifdef ACPI_DBG_TRACK_ALLOCATIONS
+ char Buffer[7];
+
+ if (AcpiGbl_DisplayFinalMemStats)
+ {
+ ACPI_STRCPY (Buffer, "MEMORY");
+ (void) AcpiDbDisplayStatistics (Buffer);
+ }
+#endif
(void) AcpiOsDeleteCache (AcpiGbl_NamespaceCache);
AcpiGbl_NamespaceCache = NULL;
@@ -320,6 +330,13 @@ AcpiUtInitializeBuffer (
ACPI_STATUS Status = AE_OK;
+ /* Parameter validation */
+
+ if (!Buffer || !RequiredLength)
+ {
+ return (AE_BAD_PARAMETER);
+ }
+
switch (Buffer->Length)
{
case ACPI_NO_BUFFER:
@@ -398,7 +415,7 @@ void *
AcpiUtAllocate (
ACPI_SIZE Size,
UINT32 Component,
- char *Module,
+ const char *Module,
UINT32 Line)
{
void *Allocation;
@@ -450,7 +467,7 @@ void *
AcpiUtAllocateZeroed (
ACPI_SIZE Size,
UINT32 Component,
- char *Module,
+ const char *Module,
UINT32 Line)
{
void *Allocation;
diff --git a/usr/src/uts/intel/io/acpica/utilities/utcache.c b/usr/src/uts/intel/io/acpica/utilities/utcache.c
index 7b6ff37126..fe7fa4ddfe 100644
--- a/usr/src/uts/intel/io/acpica/utilities/utcache.c
+++ b/usr/src/uts/intel/io/acpica/utilities/utcache.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utcache - local cache allocation routines
- * $Revision: 1.6 $
+ * $Revision: 1.9 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -396,6 +396,13 @@ AcpiOsAcquireObject (
ACPI_MEM_TRACKING (Cache->TotalAllocated++);
+#ifdef ACPI_DBG_TRACK_ALLOCATIONS
+ if ((Cache->TotalAllocated - Cache->TotalFreed) > Cache->MaxOccupied)
+ {
+ Cache->MaxOccupied = Cache->TotalAllocated - Cache->TotalFreed;
+ }
+#endif
+
/* Avoid deadlock with ACPI_ALLOCATE_ZEROED */
Status = AcpiUtReleaseMutex (ACPI_MTX_CACHES);
diff --git a/usr/src/uts/intel/io/acpica/utilities/utclib.c b/usr/src/uts/intel/io/acpica/utilities/utclib.c
index 2fbebcb804..f4a9a370c1 100644
--- a/usr/src/uts/intel/io/acpica/utilities/utclib.c
+++ b/usr/src/uts/intel/io/acpica/utilities/utclib.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: cmclib - Local implementation of C library functions
- * $Revision: 1.59 $
+ * $Revision: 1.61 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -218,7 +218,7 @@ AcpiUtMemcpy (
void *
AcpiUtMemset (
void *Dest,
- ACPI_NATIVE_UINT Value,
+ UINT8 Value,
ACPI_SIZE Count)
{
char *New = (char *) Dest;
diff --git a/usr/src/uts/intel/io/acpica/utilities/utcopy.c b/usr/src/uts/intel/io/acpica/utilities/utcopy.c
index 111af3085f..40115e798a 100644
--- a/usr/src/uts/intel/io/acpica/utilities/utcopy.c
+++ b/usr/src/uts/intel/io/acpica/utilities/utcopy.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utcopy - Internal to external object translation utilities
- * $Revision: 1.129 $
+ * $Revision: 1.137 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -117,7 +117,7 @@
#define __UTCOPY_C__
#include "acpi.h"
-#include "amlcode.h"
+#include "acnamesp.h"
#define _COMPONENT ACPI_UTILITIES
@@ -151,6 +151,11 @@ AcpiUtCopyEsimpleToIsimple(
ACPI_OPERAND_OBJECT **ReturnObj);
static ACPI_STATUS
+AcpiUtCopyEpackageToIpackage (
+ ACPI_OBJECT *ExternalObject,
+ ACPI_OPERAND_OBJECT **InternalObject);
+
+static ACPI_STATUS
AcpiUtCopySimpleObject (
ACPI_OPERAND_OBJECT *SourceDesc,
ACPI_OPERAND_OBJECT *DestDesc);
@@ -261,42 +266,49 @@ AcpiUtCopyIsimpleToEsimple (
case ACPI_TYPE_LOCAL_REFERENCE:
- /*
- * This is an object reference. Attempt to dereference it.
- */
- switch (InternalObject->Reference.Opcode)
- {
- case AML_INT_NAMEPATH_OP:
+ /* This is an object reference. */
- /* For namepath, return the object handle ("reference") */
+ switch (InternalObject->Reference.Class)
+ {
+ case ACPI_REFCLASS_NAME:
- default:
/*
- * Use the object type of "Any" to indicate a reference
- * to object containing a handle to an ACPI named object.
+ * For namepath, return the object handle ("reference")
+ * We are referring to the namespace node
*/
- ExternalObject->Type = ACPI_TYPE_ANY;
- ExternalObject->Reference.Handle = InternalObject->Reference.Node;
+ ExternalObject->Reference.Handle =
+ InternalObject->Reference.Node;
+ ExternalObject->Reference.ActualType =
+ AcpiNsGetType (InternalObject->Reference.Node);
break;
+
+ default:
+
+ /* All other reference types are unsupported */
+
+ return_ACPI_STATUS (AE_TYPE);
}
break;
case ACPI_TYPE_PROCESSOR:
- ExternalObject->Processor.ProcId = InternalObject->Processor.ProcId;
- ExternalObject->Processor.PblkAddress = InternalObject->Processor.Address;
- ExternalObject->Processor.PblkLength = InternalObject->Processor.Length;
+ ExternalObject->Processor.ProcId =
+ InternalObject->Processor.ProcId;
+ ExternalObject->Processor.PblkAddress =
+ InternalObject->Processor.Address;
+ ExternalObject->Processor.PblkLength =
+ InternalObject->Processor.Length;
break;
case ACPI_TYPE_POWER:
ExternalObject->PowerResource.SystemLevel =
- InternalObject->PowerResource.SystemLevel;
+ InternalObject->PowerResource.SystemLevel;
ExternalObject->PowerResource.ResourceOrder =
- InternalObject->PowerResource.ResourceOrder;
+ InternalObject->PowerResource.ResourceOrder;
break;
@@ -304,6 +316,10 @@ AcpiUtCopyIsimpleToEsimple (
/*
* There is no corresponding external object type
*/
+ ACPI_ERROR ((AE_INFO,
+ "Unsupported object type, cannot convert to external object: %s",
+ AcpiUtGetTypeName (ACPI_GET_OBJECT_TYPE (InternalObject))));
+
return_ACPI_STATUS (AE_SUPPORT);
}
@@ -554,6 +570,7 @@ AcpiUtCopyEsimpleToIsimple (
case ACPI_TYPE_STRING:
case ACPI_TYPE_BUFFER:
case ACPI_TYPE_INTEGER:
+ case ACPI_TYPE_LOCAL_REFERENCE:
InternalObject = AcpiUtCreateInternalObject (
(UINT8) ExternalObject->Type);
@@ -563,9 +580,17 @@ AcpiUtCopyEsimpleToIsimple (
}
break;
+ case ACPI_TYPE_ANY: /* This is the case for a NULL object */
+
+ *RetInternalObject = NULL;
+ return_ACPI_STATUS (AE_OK);
+
default:
/* All other types are not supported */
+ ACPI_ERROR ((AE_INFO, "Unsupported object type, cannot convert to internal object: %s",
+ AcpiUtGetTypeName (ExternalObject->Type)));
+
return_ACPI_STATUS (AE_SUPPORT);
}
@@ -605,6 +630,10 @@ AcpiUtCopyEsimpleToIsimple (
ExternalObject->Buffer.Length);
InternalObject->Buffer.Length = ExternalObject->Buffer.Length;
+
+ /* Mark buffer data valid */
+
+ InternalObject->Buffer.Flags |= AOPOBJ_DATA_VALID;
break;
@@ -613,6 +642,14 @@ AcpiUtCopyEsimpleToIsimple (
InternalObject->Integer.Value = ExternalObject->Integer.Value;
break;
+ case ACPI_TYPE_LOCAL_REFERENCE:
+
+ /* TBD: should validate incoming handle */
+
+ InternalObject->Reference.Class = ACPI_REFCLASS_NAME;
+ InternalObject->Reference.Node = ExternalObject->Reference.Handle;
+ break;
+
default:
/* Other types can't get here */
break;
@@ -628,83 +665,81 @@ ErrorExit:
}
-#ifdef ACPI_FUTURE_IMPLEMENTATION
-/* Code to convert packages that are parameters to control methods */
-
/*******************************************************************************
*
* FUNCTION: AcpiUtCopyEpackageToIpackage
*
- * PARAMETERS: *InternalObject - Pointer to the object we are returning
- * *Buffer - Where the object is returned
- * *SpaceUsed - Where the length of the object is returned
+ * PARAMETERS: ExternalObject - The external object to be converted
+ * InternalObject - Where the internal object is returned
*
* RETURN: Status
*
- * DESCRIPTION: This function is called to place a package object in a user
- * buffer. A package object by definition contains other objects.
- *
- * The buffer is assumed to have sufficient space for the object.
- * The caller must have verified the buffer length needed using the
- * AcpiUtGetObjectSize function before calling this function.
+ * DESCRIPTION: Copy an external package object to an internal package.
+ * Handles nested packages.
*
******************************************************************************/
static ACPI_STATUS
AcpiUtCopyEpackageToIpackage (
- ACPI_OPERAND_OBJECT *InternalObject,
- UINT8 *Buffer,
- UINT32 *SpaceUsed)
+ ACPI_OBJECT *ExternalObject,
+ ACPI_OPERAND_OBJECT **InternalObject)
{
- UINT8 *FreeSpace;
- ACPI_OBJECT *ExternalObject;
- UINT32 Length = 0;
- UINT32 ThisIndex;
- UINT32 ObjectSpace = 0;
- ACPI_OPERAND_OBJECT *ThisInternalObj;
- ACPI_OBJECT *ThisExternalObj;
+ ACPI_STATUS Status = AE_OK;
+ ACPI_OPERAND_OBJECT *PackageObject;
+ ACPI_OPERAND_OBJECT **PackageElements;
+ UINT32 i;
ACPI_FUNCTION_TRACE (UtCopyEpackageToIpackage);
- /*
- * First package at head of the buffer
- */
- ExternalObject = (ACPI_OBJECT *)Buffer;
-
- /*
- * Free space begins right after the first package
- */
- FreeSpace = Buffer + sizeof(ACPI_OBJECT);
+ /* Create the package object */
+ PackageObject = AcpiUtCreatePackageObject (ExternalObject->Package.Count);
+ if (!PackageObject)
+ {
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
- ExternalObject->Type = ACPI_GET_OBJECT_TYPE (InternalObject);
- ExternalObject->Package.Count = InternalObject->Package.Count;
- ExternalObject->Package.Elements = (ACPI_OBJECT *)FreeSpace;
+ PackageElements = PackageObject->Package.Elements;
/*
- * Build an array of ACPI_OBJECTS in the buffer
- * and move the free space past it
+ * Recursive implementation. Probably ok, since nested external packages
+ * as parameters should be very rare.
*/
- FreeSpace += ExternalObject->Package.Count * sizeof(ACPI_OBJECT);
+ for (i = 0; i < ExternalObject->Package.Count; i++)
+ {
+ Status = AcpiUtCopyEobjectToIobject (
+ &ExternalObject->Package.Elements[i],
+ &PackageElements[i]);
+ if (ACPI_FAILURE (Status))
+ {
+ /* Truncate package and delete it */
+
+ PackageObject->Package.Count = i;
+ PackageElements[i] = NULL;
+ AcpiUtRemoveReference (PackageObject);
+ return_ACPI_STATUS (Status);
+ }
+ }
+ /* Mark package data valid */
- /* Call WalkPackage */
+ PackageObject->Package.Flags |= AOPOBJ_DATA_VALID;
+ *InternalObject = PackageObject;
+ return_ACPI_STATUS (Status);
}
-#endif /* Future implementation */
-
/*******************************************************************************
*
* FUNCTION: AcpiUtCopyEobjectToIobject
*
- * PARAMETERS: *InternalObject - The external object to be converted
- * *BufferPtr - Where the internal object is returned
+ * PARAMETERS: ExternalObject - The external object to be converted
+ * InternalObject - Where the internal object is returned
*
- * RETURN: Status - the status of the call
+ * RETURN: Status - the status of the call
*
* DESCRIPTION: Converts an external object to an internal object.
*
@@ -723,15 +758,8 @@ AcpiUtCopyEobjectToIobject (
if (ExternalObject->Type == ACPI_TYPE_PACKAGE)
{
- /*
- * Packages as external input to control methods are not supported,
- */
- ACPI_ERROR ((AE_INFO,
- "Packages as parameters not implemented!"));
-
- return_ACPI_STATUS (AE_NOT_IMPLEMENTED);
+ Status = AcpiUtCopyEpackageToIpackage (ExternalObject, InternalObject);
}
-
else
{
/*
@@ -840,7 +868,16 @@ AcpiUtCopySimpleObject (
/*
* We copied the reference object, so we now must add a reference
* to the object pointed to by the reference
+ *
+ * DDBHandle reference (from Load/LoadTable) is a special reference,
+ * it does not have a Reference.Object, so does not need to
+ * increase the reference count
*/
+ if (SourceDesc->Reference.Class == ACPI_REFCLASS_TABLE)
+ {
+ break;
+ }
+
AcpiUtAddReference (SourceDesc->Reference.Object);
break;
@@ -936,34 +973,20 @@ AcpiUtCopyIelementToIelement (
* This object is a package - go down another nesting level
* Create and build the package object
*/
- TargetObject = AcpiUtCreateInternalObject (ACPI_TYPE_PACKAGE);
+ TargetObject = AcpiUtCreatePackageObject (SourceObject->Package.Count);
if (!TargetObject)
{
return (AE_NO_MEMORY);
}
- TargetObject->Package.Count = SourceObject->Package.Count;
- TargetObject->Common.Flags = SourceObject->Common.Flags;
+ TargetObject->Common.Flags = SourceObject->Common.Flags;
- /*
- * Create the object array
- */
- TargetObject->Package.Elements = ACPI_ALLOCATE_ZEROED (
- ((ACPI_SIZE) SourceObject->Package.Count + 1) * sizeof (void *));
- if (!TargetObject->Package.Elements)
- {
- Status = AE_NO_MEMORY;
- goto ErrorExit;
- }
+ /* Pass the new package object back to the package walk routine */
- /*
- * Pass the new package object back to the package walk routine
- */
State->Pkg.ThisTargetObj = TargetObject;
- /*
- * Store the object pointer in the parent package object
- */
+ /* Store the object pointer in the parent package object */
+
*ThisTargetPtr = TargetObject;
break;
diff --git a/usr/src/uts/intel/io/acpica/utilities/utdebug.c b/usr/src/uts/intel/io/acpica/utilities/utdebug.c
index 4cb018aed2..70e4db8a2b 100644
--- a/usr/src/uts/intel/io/acpica/utilities/utdebug.c
+++ b/usr/src/uts/intel/io/acpica/utilities/utdebug.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utdebug - Debug print routines
- * $Revision: 1.132 $
+ * $Revision: 1.137 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -124,9 +124,9 @@
#ifdef ACPI_DEBUG_OUTPUT
-static UINT32 AcpiGbl_PrevThreadId = 0xFFFFFFFF;
-static char *AcpiGbl_FnEntryStr = "----Entry";
-static char *AcpiGbl_FnExitStr = "----Exit-";
+static ACPI_THREAD_ID AcpiGbl_PrevThreadId = 0xFFFFFFFF;
+static char *AcpiGbl_FnEntryStr = "----Entry";
+static char *AcpiGbl_FnExitStr = "----Exit-";
/* Local prototypes */
@@ -151,10 +151,10 @@ void
AcpiUtInitStackPtrTrace (
void)
{
- UINT32 CurrentSp;
+ ACPI_SIZE CurrentSp;
- AcpiGbl_EntryStackPointer = ACPI_PTR_DIFF (&CurrentSp, NULL);
+ AcpiGbl_EntryStackPointer = &CurrentSp;
}
@@ -177,11 +177,9 @@ AcpiUtTrackStackPtr (
ACPI_SIZE CurrentSp;
- CurrentSp = ACPI_PTR_DIFF (&CurrentSp, NULL);
-
- if (CurrentSp < AcpiGbl_LowestStackPointer)
+ if (&CurrentSp < AcpiGbl_LowestStackPointer)
{
- AcpiGbl_LowestStackPointer = CurrentSp;
+ AcpiGbl_LowestStackPointer = &CurrentSp;
}
if (AcpiGbl_NestingLevel > AcpiGbl_DeepestNesting)
@@ -254,9 +252,9 @@ AcpiUtDebugPrint (
UINT32 RequestedDebugLevel,
UINT32 LineNumber,
const char *FunctionName,
- char *ModuleName,
+ const char *ModuleName,
UINT32 ComponentId,
- char *Format,
+ const char *Format,
...)
{
ACPI_THREAD_ID ThreadId;
@@ -304,6 +302,7 @@ AcpiUtDebugPrint (
va_start (args, Format);
AcpiOsVprintf (Format, args);
+ va_end (args);
}
ACPI_EXPORT_SYMBOL (AcpiUtDebugPrint)
@@ -333,9 +332,9 @@ AcpiUtDebugPrintRaw (
UINT32 RequestedDebugLevel,
UINT32 LineNumber,
const char *FunctionName,
- char *ModuleName,
+ const char *ModuleName,
UINT32 ComponentId,
- char *Format,
+ const char *Format,
...)
{
va_list args;
@@ -349,6 +348,7 @@ AcpiUtDebugPrintRaw (
va_start (args, Format);
AcpiOsVprintf (Format, args);
+ va_end (args);
}
ACPI_EXPORT_SYMBOL (AcpiUtDebugPrintRaw)
@@ -374,7 +374,7 @@ void
AcpiUtTrace (
UINT32 LineNumber,
const char *FunctionName,
- char *ModuleName,
+ const char *ModuleName,
UINT32 ComponentId)
{
@@ -410,7 +410,7 @@ void
AcpiUtTracePtr (
UINT32 LineNumber,
const char *FunctionName,
- char *ModuleName,
+ const char *ModuleName,
UINT32 ComponentId,
void *Pointer)
{
@@ -444,7 +444,7 @@ void
AcpiUtTraceStr (
UINT32 LineNumber,
const char *FunctionName,
- char *ModuleName,
+ const char *ModuleName,
UINT32 ComponentId,
char *String)
{
@@ -479,7 +479,7 @@ void
AcpiUtTraceU32 (
UINT32 LineNumber,
const char *FunctionName,
- char *ModuleName,
+ const char *ModuleName,
UINT32 ComponentId,
UINT32 Integer)
{
@@ -513,7 +513,7 @@ void
AcpiUtExit (
UINT32 LineNumber,
const char *FunctionName,
- char *ModuleName,
+ const char *ModuleName,
UINT32 ComponentId)
{
@@ -548,7 +548,7 @@ void
AcpiUtStatusExit (
UINT32 LineNumber,
const char *FunctionName,
- char *ModuleName,
+ const char *ModuleName,
UINT32 ComponentId,
ACPI_STATUS Status)
{
@@ -595,7 +595,7 @@ void
AcpiUtValueExit (
UINT32 LineNumber,
const char *FunctionName,
- char *ModuleName,
+ const char *ModuleName,
UINT32 ComponentId,
ACPI_INTEGER Value)
{
@@ -632,7 +632,7 @@ void
AcpiUtPtrExit (
UINT32 LineNumber,
const char *FunctionName,
- char *ModuleName,
+ const char *ModuleName,
UINT32 ComponentId,
UINT8 *Ptr)
{
@@ -668,12 +668,18 @@ AcpiUtDumpBuffer2 (
UINT32 Count,
UINT32 Display)
{
- ACPI_NATIVE_UINT i = 0;
- ACPI_NATIVE_UINT j;
+ UINT32 i = 0;
+ UINT32 j;
UINT32 Temp32;
UINT8 BufChar;
+ if (!Buffer)
+ {
+ AcpiOsPrintf ("Null Buffer Pointer in DumpBuffer!\n");
+ return;
+ }
+
if ((Count < 4) || (Count & 0x01))
{
Display = DB_BYTE_DISPLAY;
@@ -685,7 +691,7 @@ AcpiUtDumpBuffer2 (
{
/* Print current offset */
- AcpiOsPrintf ("%6.4X: ", (UINT32) i);
+ AcpiOsPrintf ("%6.4X: ", i);
/* Print 16 hex chars */
@@ -696,7 +702,7 @@ AcpiUtDumpBuffer2 (
/* Dump fill spaces */
AcpiOsPrintf ("%*s", ((Display * 2) + 1), " ");
- j += (ACPI_NATIVE_UINT) Display;
+ j += Display;
continue;
}
@@ -705,35 +711,35 @@ AcpiUtDumpBuffer2 (
case DB_BYTE_DISPLAY:
default: /* Default is BYTE display */
- AcpiOsPrintf ("%02X ", Buffer[i + j]);
+ AcpiOsPrintf ("%02X ", Buffer[(ACPI_SIZE) i + j]);
break;
case DB_WORD_DISPLAY:
- ACPI_MOVE_16_TO_32 (&Temp32, &Buffer[i + j]);
+ ACPI_MOVE_16_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j]);
AcpiOsPrintf ("%04X ", Temp32);
break;
case DB_DWORD_DISPLAY:
- ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[i + j]);
+ ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j]);
AcpiOsPrintf ("%08X ", Temp32);
break;
case DB_QWORD_DISPLAY:
- ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[i + j]);
+ ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j]);
AcpiOsPrintf ("%08X", Temp32);
- ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[i + j + 4]);
+ ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j + 4]);
AcpiOsPrintf ("%08X ", Temp32);
break;
}
- j += (ACPI_NATIVE_UINT) Display;
+ j += Display;
}
/*
@@ -749,7 +755,7 @@ AcpiUtDumpBuffer2 (
return;
}
- BufChar = Buffer[i + j];
+ BufChar = Buffer[(ACPI_SIZE) i + j];
if (ACPI_IS_PRINT (BufChar))
{
AcpiOsPrintf ("%c", BufChar);
diff --git a/usr/src/uts/intel/io/acpica/utilities/utdelete.c b/usr/src/uts/intel/io/acpica/utilities/utdelete.c
index c85ea669be..5047b5d9d2 100644
--- a/usr/src/uts/intel/io/acpica/utilities/utdelete.c
+++ b/usr/src/uts/intel/io/acpica/utilities/utdelete.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: utdelete - object deletion and reference count utilities
- * $Revision: 1.121 $
+ * $Revision: 1.126 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -120,7 +120,7 @@
#include "acinterp.h"
#include "acnamesp.h"
#include "acevents.h"
-#include "amlcode.h"
+
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME ("utdelete")
@@ -222,6 +222,10 @@ AcpiUtDeleteInternalObj (
break;
+ /*
+ * These objects have a possible list of notify handlers.
+ * Device object also may have a GPE block.
+ */
case ACPI_TYPE_DEVICE:
if (Object->Device.GpeBlock)
@@ -229,9 +233,14 @@ AcpiUtDeleteInternalObj (
(void) AcpiEvDeleteGpeBlock (Object->Device.GpeBlock);
}
- /* Walk the handler list for this device */
+ /*lint -fallthrough */
+
+ case ACPI_TYPE_PROCESSOR:
+ case ACPI_TYPE_THERMAL:
- HandlerDesc = Object->Device.Handler;
+ /* Walk the notify handler list for this object */
+
+ HandlerDesc = Object->CommonNotify.Handler;
while (HandlerDesc)
{
NextDesc = HandlerDesc->AddressSpace.Next;
@@ -247,7 +256,7 @@ AcpiUtDeleteInternalObj (
"***** Mutex %p, OS Mutex %p\n",
Object, Object->Mutex.OsMutex));
- if (Object->Mutex.OsMutex == AcpiGbl_GlobalLockMutex)
+ if (Object == AcpiGbl_GlobalLockMutex)
{
/* Global Lock has extra semaphore */
@@ -345,6 +354,19 @@ AcpiUtDeleteInternalObj (
break;
+ case ACPI_TYPE_LOCAL_BANK_FIELD:
+
+ ACPI_DEBUG_PRINT ((ACPI_DB_ALLOCATIONS,
+ "***** Bank Field %p\n", Object));
+
+ SecondDesc = AcpiNsGetSecondaryObject (Object);
+ if (SecondDesc)
+ {
+ AcpiUtDeleteObjectDesc (SecondDesc);
+ }
+ break;
+
+
default:
break;
}
@@ -544,7 +566,7 @@ AcpiUtUpdateObjectReference (
ACPI_GENERIC_STATE *StateList = NULL;
ACPI_OPERAND_OBJECT *NextObject = NULL;
ACPI_GENERIC_STATE *State;
- ACPI_NATIVE_UINT i;
+ UINT32 i;
ACPI_FUNCTION_TRACE_PTR (UtUpdateObjectReference, Object);
@@ -633,10 +655,12 @@ AcpiUtUpdateObjectReference (
case ACPI_TYPE_LOCAL_REFERENCE:
/*
- * The target of an Index (a package, string, or buffer) must track
- * changes to the ref count of the index.
+ * The target of an Index (a package, string, or buffer) or a named
+ * reference must track changes to the ref count of the index or
+ * target object.
*/
- if (Object->Reference.Opcode == AML_INDEX_OP)
+ if ((Object->Reference.Class == ACPI_REFCLASS_INDEX) ||
+ (Object->Reference.Class== ACPI_REFCLASS_NAME))
{
NextObject = Object->Reference.Object;
}
diff --git a/usr/src/uts/intel/io/acpica/utilities/uteval.c b/usr/src/uts/intel/io/acpica/utilities/uteval.c
index ab747d452f..ce81314520 100644
--- a/usr/src/uts/intel/io/acpica/utilities/uteval.c
+++ b/usr/src/uts/intel/io/acpica/utilities/uteval.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: uteval - Object evaluation
- * $Revision: 1.70 $
+ * $Revision: 1.73 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -146,16 +146,13 @@ static const char *AcpiInterfacesSupported[] =
/* Operating System Vendor Strings */
"Linux",
- "Windows 2000",
- "Windows 2001",
- "Windows 2001 SP0",
- "Windows 2001 SP1",
- "Windows 2001 SP2",
- "Windows 2001 SP3",
- "Windows 2001 SP4",
- "Windows 2001.1",
- "Windows 2001.1 SP1", /* Added 03/2006 */
- "Windows 2006", /* Added 03/2006 */
+ "Windows 2000", /* Windows 2000 */
+ "Windows 2001", /* Windows XP */
+ "Windows 2001 SP1", /* Windows XP SP1 */
+ "Windows 2001 SP2", /* Windows XP SP2 */
+ "Windows 2001.1", /* Windows Server 2003 */
+ "Windows 2001.1 SP1", /* Windows Server 2003 SP1 - Added 03/2006 */
+ "Windows 2006", /* Windows Vista - Added 03/2006 */
/* Feature Group Strings */
@@ -188,7 +185,7 @@ AcpiUtOsiImplementation (
ACPI_STATUS Status;
ACPI_OPERAND_OBJECT *StringDesc;
ACPI_OPERAND_OBJECT *ReturnDesc;
- ACPI_NATIVE_UINT i;
+ UINT32 i;
ACPI_FUNCTION_TRACE (UtOsiImplementation);
@@ -291,7 +288,6 @@ AcpiUtEvaluateObject (
Info->PrefixNode = PrefixNode;
Info->Pathname = Path;
- Info->ParameterType = ACPI_PARAM_ARGS;
/* Evaluate the object/method */
@@ -616,7 +612,7 @@ AcpiUtExecute_CID (
UINT32 Count;
UINT32 Size;
ACPI_COMPATIBLE_ID_LIST *CidList;
- ACPI_NATIVE_UINT i;
+ UINT32 i;
ACPI_FUNCTION_TRACE (UtExecute_CID);
diff --git a/usr/src/uts/intel/io/acpica/utilities/utglobal.c b/usr/src/uts/intel/io/acpica/utilities/utglobal.c
index 9a7323df41..acf47469b5 100644
--- a/usr/src/uts/intel/io/acpica/utilities/utglobal.c
+++ b/usr/src/uts/intel/io/acpica/utilities/utglobal.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utglobal - Global variables for the ACPI subsystem
- * $Revision: 1.242 $
+ * $Revision: 1.256 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -120,101 +120,14 @@
#include "acpi.h"
#include "acnamesp.h"
+ACPI_EXPORT_SYMBOL (AcpiGbl_FADT)
+
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME ("utglobal")
/*******************************************************************************
*
- * FUNCTION: AcpiFormatException
- *
- * PARAMETERS: Status - The ACPI_STATUS code to be formatted
- *
- * RETURN: A string containing the exception text. A valid pointer is
- * always returned.
- *
- * DESCRIPTION: This function translates an ACPI exception into an ASCII string.
- *
- ******************************************************************************/
-
-const char *
-AcpiFormatException (
- ACPI_STATUS Status)
-{
- ACPI_STATUS SubStatus;
- const char *Exception = NULL;
-
-
- ACPI_FUNCTION_ENTRY ();
-
-
- /*
- * Status is composed of two parts, a "type" and an actual code
- */
- SubStatus = (Status & ~AE_CODE_MASK);
-
- switch (Status & AE_CODE_MASK)
- {
- case AE_CODE_ENVIRONMENTAL:
-
- if (SubStatus <= AE_CODE_ENV_MAX)
- {
- Exception = AcpiGbl_ExceptionNames_Env [SubStatus];
- }
- break;
-
- case AE_CODE_PROGRAMMER:
-
- if (SubStatus <= AE_CODE_PGM_MAX)
- {
- Exception = AcpiGbl_ExceptionNames_Pgm [SubStatus -1];
- }
- break;
-
- case AE_CODE_ACPI_TABLES:
-
- if (SubStatus <= AE_CODE_TBL_MAX)
- {
- Exception = AcpiGbl_ExceptionNames_Tbl [SubStatus -1];
- }
- break;
-
- case AE_CODE_AML:
-
- if (SubStatus <= AE_CODE_AML_MAX)
- {
- Exception = AcpiGbl_ExceptionNames_Aml [SubStatus -1];
- }
- break;
-
- case AE_CODE_CONTROL:
-
- if (SubStatus <= AE_CODE_CTRL_MAX)
- {
- Exception = AcpiGbl_ExceptionNames_Ctrl [SubStatus -1];
- }
- break;
-
- default:
- break;
- }
-
- if (!Exception)
- {
- /* Exception code was not recognized */
-
- ACPI_ERROR ((AE_INFO,
- "Unknown exception code: 0x%8.8X", Status));
-
- Exception = "UNKNOWN_STATUS_CODE";
- }
-
- return (ACPI_CAST_PTR (const char, Exception));
-}
-
-
-/*******************************************************************************
- *
* Static global variable initialization.
*
******************************************************************************/
@@ -251,8 +164,6 @@ UINT32 AcpiGbl_StartupFlags = 0;
BOOLEAN AcpiGbl_Shutdown = TRUE;
-const UINT8 AcpiGbl_DecodeTo8bit [8] = {1,2,4,8,16,32,64,128};
-
const char *AcpiGbl_SleepStateNames[ACPI_S_STATE_COUNT] =
{
"\\_S0_",
@@ -274,6 +185,47 @@ const char *AcpiGbl_HighestDstateNames[4] =
/*******************************************************************************
*
+ * FUNCTION: AcpiFormatException
+ *
+ * PARAMETERS: Status - The ACPI_STATUS code to be formatted
+ *
+ * RETURN: A string containing the exception text. A valid pointer is
+ * always returned.
+ *
+ * DESCRIPTION: This function translates an ACPI exception into an ASCII string
+ * It is here instead of utxface.c so it is always present.
+ *
+ ******************************************************************************/
+
+const char *
+AcpiFormatException (
+ ACPI_STATUS Status)
+{
+ const char *Exception = NULL;
+
+
+ ACPI_FUNCTION_ENTRY ();
+
+
+ Exception = AcpiUtValidateException (Status);
+ if (!Exception)
+ {
+ /* Exception code was not recognized */
+
+ ACPI_ERROR ((AE_INFO,
+ "Unknown exception code: 0x%8.8X", Status));
+
+ Exception = "UNKNOWN_STATUS_CODE";
+ }
+
+ return (ACPI_CAST_PTR (const char, Exception));
+}
+
+ACPI_EXPORT_SYMBOL (AcpiFormatException)
+
+
+/*******************************************************************************
+ *
* Namespace globals
*
******************************************************************************/
@@ -311,7 +263,7 @@ const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames[] =
* Properties of the ACPI Object Types, both internal and external.
* The table is indexed by values of ACPI_OBJECT_TYPE
*/
-const UINT8 AcpiGbl_NsProperties[] =
+const UINT8 AcpiGbl_NsProperties[ACPI_NUM_NS_TYPES] =
{
ACPI_NS_NORMAL, /* 00 Any */
ACPI_NS_NORMAL, /* 01 Number */
@@ -380,35 +332,6 @@ AcpiUtHexToAsciiChar (
}
-/*******************************************************************************
- *
- * Table name globals
- *
- * NOTE: This table includes ONLY the ACPI tables that the subsystem consumes.
- * it is NOT an exhaustive list of all possible ACPI tables. All ACPI tables
- * that are not used by the subsystem are simply ignored.
- *
- * Do NOT add any table to this list that is not consumed directly by this
- * subsystem (No MADT, ECDT, SBST, etc.)
- *
- ******************************************************************************/
-
-ACPI_TABLE_LIST AcpiGbl_TableLists[ACPI_TABLE_ID_MAX+1];
-
-ACPI_TABLE_SUPPORT AcpiGbl_TableData[ACPI_TABLE_ID_MAX+1] =
-{
- /*********** Name, Signature, Global typed pointer Signature size, Type How many allowed?, Contains valid AML? */
-
- /* RSDP 0 */ {RSDP_NAME, RSDP_SIG, NULL, sizeof (RSDP_SIG)-1, ACPI_TABLE_ROOT | ACPI_TABLE_SINGLE},
- /* DSDT 1 */ {DSDT_SIG, DSDT_SIG, (void *) &AcpiGbl_DSDT, sizeof (DSDT_SIG)-1, ACPI_TABLE_SECONDARY| ACPI_TABLE_SINGLE | ACPI_TABLE_EXECUTABLE},
- /* FADT 2 */ {FADT_SIG, FADT_SIG, (void *) &AcpiGbl_FADT, sizeof (FADT_SIG)-1, ACPI_TABLE_PRIMARY | ACPI_TABLE_SINGLE},
- /* FACS 3 */ {FACS_SIG, FACS_SIG, (void *) &AcpiGbl_FACS, sizeof (FACS_SIG)-1, ACPI_TABLE_SECONDARY| ACPI_TABLE_SINGLE},
- /* PSDT 4 */ {PSDT_SIG, PSDT_SIG, NULL, sizeof (PSDT_SIG)-1, ACPI_TABLE_PRIMARY | ACPI_TABLE_MULTIPLE | ACPI_TABLE_EXECUTABLE},
- /* SSDT 5 */ {SSDT_SIG, SSDT_SIG, NULL, sizeof (SSDT_SIG)-1, ACPI_TABLE_PRIMARY | ACPI_TABLE_MULTIPLE | ACPI_TABLE_EXECUTABLE},
- /* XSDT 6 */ {XSDT_SIG, XSDT_SIG, NULL, sizeof (RSDT_SIG)-1, ACPI_TABLE_ROOT | ACPI_TABLE_SINGLE},
-};
-
-
/******************************************************************************
*
* Event and Hardware globals
@@ -668,12 +591,11 @@ AcpiUtGetNodeName (
return ("####");
}
- /* Name must be a valid ACPI name */
-
- if (!AcpiUtValidAcpiName (Node->Name.Integer))
- {
- Node->Name.Integer = AcpiUtRepairName (Node->Name.Integer);
- }
+ /*
+ * Ensure name is valid. The name was validated/repaired when the node
+ * was created, but make sure it has not been corrupted.
+ */
+ AcpiUtRepairName (Node->Name.Ascii);
/* Return the name */
@@ -737,6 +659,60 @@ AcpiUtGetDescriptorName (
}
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtGetReferenceName
+ *
+ * PARAMETERS: Object - An ACPI reference object
+ *
+ * RETURN: Pointer to a string
+ *
+ * DESCRIPTION: Decode a reference object sub-type to a string.
+ *
+ ******************************************************************************/
+
+/* Printable names of reference object sub-types */
+
+static const char *AcpiGbl_RefClassNames[] =
+{
+ /* 00 */ "Local",
+ /* 01 */ "Argument",
+ /* 02 */ "RefOf",
+ /* 03 */ "Index",
+ /* 04 */ "DdbHandle",
+ /* 05 */ "Named Object",
+ /* 06 */ "Debug"
+};
+
+const char *
+AcpiUtGetReferenceName (
+ ACPI_OPERAND_OBJECT *Object)
+{
+
+ if (!Object)
+ {
+ return ("NULL Object");
+ }
+
+ if (ACPI_GET_DESCRIPTOR_TYPE (Object) != ACPI_DESC_TYPE_OPERAND)
+ {
+ return ("Not an Operand object");
+ }
+
+ if (Object->Common.Type != ACPI_TYPE_LOCAL_REFERENCE)
+ {
+ return ("Not a Reference object");
+ }
+
+ if (Object->Reference.Class > ACPI_REFCLASS_MAX)
+ {
+ return ("Unknown Reference class");
+ }
+
+ return (AcpiGbl_RefClassNames[Object->Reference.Class]);
+}
+
+
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
/*
* Strings and procedures used for debug only
@@ -767,6 +743,56 @@ AcpiUtGetMutexName (
return (AcpiGbl_MutexNames[MutexId]);
}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtGetNotifyName
+ *
+ * PARAMETERS: NotifyValue - Value from the Notify() request
+ *
+ * RETURN: String corresponding to the Notify Value.
+ *
+ * DESCRIPTION: Translate a Notify Value to a notify namestring.
+ *
+ ******************************************************************************/
+
+/* Names for Notify() values, used for debug output */
+
+static const char *AcpiGbl_NotifyValueNames[] =
+{
+ "Bus Check",
+ "Device Check",
+ "Device Wake",
+ "Eject Request",
+ "Device Check Light",
+ "Frequency Mismatch",
+ "Bus Mode Mismatch",
+ "Power Fault",
+ "Capabilities Check",
+ "Device PLD Check",
+ "Reserved",
+ "System Locality Update"
+};
+
+const char *
+AcpiUtGetNotifyName (
+ UINT32 NotifyValue)
+{
+
+ if (NotifyValue <= ACPI_NOTIFY_MAX)
+ {
+ return (AcpiGbl_NotifyValueNames[NotifyValue]);
+ }
+ else if (NotifyValue <= ACPI_MAX_SYS_NOTIFY)
+ {
+ return ("Reserved");
+ }
+ else /* Greater or equal to 0x80 */
+ {
+ return ("**Device Specific**");
+ }
+}
#endif
@@ -804,14 +830,14 @@ AcpiUtValidObjectType (
*
* PARAMETERS: None
*
- * RETURN: None
+ * RETURN: Status
*
* DESCRIPTION: Init library globals. All globals that require specific
* initialization should be initialized here!
*
******************************************************************************/
-void
+ACPI_STATUS
AcpiUtInitGlobals (
void)
{
@@ -827,15 +853,7 @@ AcpiUtInitGlobals (
Status = AcpiUtCreateCaches ();
if (ACPI_FAILURE (Status))
{
- return;
- }
-
- /* ACPI table structure */
-
- for (i = 0; i < (ACPI_TABLE_ID_MAX+1); i++)
- {
- AcpiGbl_TableLists[i].Next = NULL;
- AcpiGbl_TableLists[i].Count = 0;
+ return_ACPI_STATUS (Status);
}
/* Mutex locked flags */
@@ -853,26 +871,30 @@ AcpiUtInitGlobals (
}
AcpiGbl_OwnerIdMask[ACPI_NUM_OWNERID_MASKS - 1] = 0x80000000; /* Last ID is never valid */
+ /* Event counters */
+
+ AcpiMethodCount = 0;
+ AcpiSciCount = 0;
+ AcpiGpeCount = 0;
+
+ for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++)
+ {
+ AcpiFixedEventCount[i] = 0;
+ }
+
/* GPE support */
AcpiGbl_GpeXruptListHead = NULL;
AcpiGbl_GpeFadtBlocks[0] = NULL;
AcpiGbl_GpeFadtBlocks[1] = NULL;
- /* Global notify handlers */
+ /* Global handlers */
AcpiGbl_SystemNotify.Handler = NULL;
AcpiGbl_DeviceNotify.Handler = NULL;
AcpiGbl_ExceptionHandler = NULL;
AcpiGbl_InitHandler = NULL;
-
- /* Global "typed" ACPI table pointers */
-
- AcpiGbl_RSDP = NULL;
- AcpiGbl_XSDT = NULL;
- AcpiGbl_FACS = NULL;
- AcpiGbl_FADT = NULL;
- AcpiGbl_DSDT = NULL;
+ AcpiGbl_TableHandler = NULL;
/* Global Lock support */
@@ -883,8 +905,6 @@ AcpiUtInitGlobals (
/* Miscellaneous variables */
- AcpiGbl_TableFlags = ACPI_PHYSICAL_POINTER;
- AcpiGbl_RsdpOriginalLocation = 0;
AcpiGbl_CmSingleStep = FALSE;
AcpiGbl_DbTerminateThreads = FALSE;
AcpiGbl_Shutdown = FALSE;
@@ -917,15 +937,20 @@ AcpiUtInitGlobals (
#ifdef ACPI_DEBUG_OUTPUT
- AcpiGbl_LowestStackPointer = ACPI_SIZE_MAX;
+ AcpiGbl_LowestStackPointer = ACPI_CAST_PTR (ACPI_SIZE, ACPI_SIZE_MAX);
+#endif
+
+#ifdef ACPI_DBG_TRACK_ALLOCATIONS
+ AcpiGbl_DisplayFinalMemStats = FALSE;
#endif
- return_VOID;
+ return_ACPI_STATUS (AE_OK);
}
/* Public globals */
ACPI_EXPORT_SYMBOL (AcpiDbgLevel)
ACPI_EXPORT_SYMBOL (AcpiDbgLayer)
+ACPI_EXPORT_SYMBOL (AcpiGpeCount)
diff --git a/usr/src/uts/intel/io/acpica/utilities/utinit.c b/usr/src/uts/intel/io/acpica/utilities/utinit.c
index e9bfab002e..1fcc5bcaab 100644
--- a/usr/src/uts/intel/io/acpica/utilities/utinit.c
+++ b/usr/src/uts/intel/io/acpica/utilities/utinit.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utinit - Common ACPI subsystem initialization
- * $Revision: 1.131 $
+ * $Revision: 1.137 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -120,138 +120,17 @@
#include "acpi.h"
#include "acnamesp.h"
#include "acevents.h"
+#include "actables.h"
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME ("utinit")
/* Local prototypes */
-static void
-AcpiUtFadtRegisterError (
- char *RegisterName,
- UINT32 Value,
- UINT8 Offset);
-
static void AcpiUtTerminate (
void);
-/*******************************************************************************
- *
- * FUNCTION: AcpiUtFadtRegisterError
- *
- * PARAMETERS: RegisterName - Pointer to string identifying register
- * Value - Actual register contents value
- * Offset - Byte offset in the FADT
- *
- * RETURN: AE_BAD_VALUE
- *
- * DESCRIPTION: Display failure message
- *
- ******************************************************************************/
-
-static void
-AcpiUtFadtRegisterError (
- char *RegisterName,
- UINT32 Value,
- UINT8 Offset)
-{
-
- ACPI_WARNING ((AE_INFO,
- "Invalid FADT value %s=%X at offset %X FADT=%p",
- RegisterName, Value, Offset, AcpiGbl_FADT));
-}
-
-
-/******************************************************************************
- *
- * FUNCTION: AcpiUtValidateFadt
- *
- * PARAMETERS: None
- *
- * RETURN: Status
- *
- * DESCRIPTION: Validate various ACPI registers in the FADT
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiUtValidateFadt (
- void)
-{
-
- /*
- * Verify Fixed ACPI Description Table fields,
- * but don't abort on any problems, just display error
- */
- if (AcpiGbl_FADT->Pm1EvtLen < 4)
- {
- AcpiUtFadtRegisterError ("PM1_EVT_LEN",
- (UINT32) AcpiGbl_FADT->Pm1EvtLen,
- ACPI_FADT_OFFSET (Pm1EvtLen));
- }
-
- if (!AcpiGbl_FADT->Pm1CntLen)
- {
- AcpiUtFadtRegisterError ("PM1_CNT_LEN", 0,
- ACPI_FADT_OFFSET (Pm1CntLen));
- }
-
- if (!ACPI_VALID_ADDRESS (AcpiGbl_FADT->XPm1aEvtBlk.Address))
- {
- AcpiUtFadtRegisterError ("X_PM1a_EVT_BLK", 0,
- ACPI_FADT_OFFSET (XPm1aEvtBlk.Address));
- }
-
- if (!ACPI_VALID_ADDRESS (AcpiGbl_FADT->XPm1aCntBlk.Address))
- {
- AcpiUtFadtRegisterError ("X_PM1a_CNT_BLK", 0,
- ACPI_FADT_OFFSET (XPm1aCntBlk.Address));
- }
-
- if (!ACPI_VALID_ADDRESS (AcpiGbl_FADT->XPmTmrBlk.Address))
- {
- AcpiUtFadtRegisterError ("X_PM_TMR_BLK", 0,
- ACPI_FADT_OFFSET (XPmTmrBlk.Address));
- }
-
- if ((ACPI_VALID_ADDRESS (AcpiGbl_FADT->XPm2CntBlk.Address) &&
- !AcpiGbl_FADT->Pm2CntLen))
- {
- AcpiUtFadtRegisterError ("PM2_CNT_LEN",
- (UINT32) AcpiGbl_FADT->Pm2CntLen,
- ACPI_FADT_OFFSET (Pm2CntLen));
- }
-
- if (AcpiGbl_FADT->PmTmLen < 4)
- {
- AcpiUtFadtRegisterError ("PM_TM_LEN",
- (UINT32) AcpiGbl_FADT->PmTmLen,
- ACPI_FADT_OFFSET (PmTmLen));
- }
-
- /* Length of GPE blocks must be a multiple of 2 */
-
- if (ACPI_VALID_ADDRESS (AcpiGbl_FADT->XGpe0Blk.Address) &&
- (AcpiGbl_FADT->Gpe0BlkLen & 1))
- {
- AcpiUtFadtRegisterError ("(x)GPE0_BLK_LEN",
- (UINT32) AcpiGbl_FADT->Gpe0BlkLen,
- ACPI_FADT_OFFSET (Gpe0BlkLen));
- }
-
- if (ACPI_VALID_ADDRESS (AcpiGbl_FADT->XGpe1Blk.Address) &&
- (AcpiGbl_FADT->Gpe1BlkLen & 1))
- {
- AcpiUtFadtRegisterError ("(x)GPE1_BLK_LEN",
- (UINT32) AcpiGbl_FADT->Gpe1BlkLen,
- ACPI_FADT_OFFSET (Gpe1BlkLen));
- }
-
- return (AE_OK);
-}
-
-
/******************************************************************************
*
* FUNCTION: AcpiUtTerminate
@@ -277,7 +156,6 @@ AcpiUtTerminate (
ACPI_FUNCTION_TRACE (UtTerminate);
- /* Free global tables, etc. */
/* Free global GPE blocks and related info structures */
GpeXruptInfo = AcpiGbl_GpeXruptListHead;
@@ -338,14 +216,21 @@ AcpiUtSubsystemShutdown (
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"Shutting down ACPI Subsystem\n"));
+#ifndef ACPI_ASL_COMPILER
+
/* Close the AcpiEvent Handling */
AcpiEvTerminate ();
+#endif
/* Close the Namespace */
AcpiNsTerminate ();
+ /* Delete the ACPI tables */
+
+ AcpiTbTerminate ();
+
/* Close the globals */
AcpiUtTerminate ();
diff --git a/usr/src/uts/intel/io/acpica/utilities/utmath.c b/usr/src/uts/intel/io/acpica/utilities/utmath.c
index 0cb9e0782e..c0b37228eb 100644
--- a/usr/src/uts/intel/io/acpica/utilities/utmath.c
+++ b/usr/src/uts/intel/io/acpica/utilities/utmath.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: utmath - Integer math support routines
- * $Revision: 1.21 $
+ * $Revision: 1.24 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -387,7 +387,7 @@ AcpiUtShortDivide (
}
if (OutRemainder)
{
- *OutRemainder = (UINT32) InDividend % Divisor;
+ *OutRemainder = (UINT32) (InDividend % Divisor);
}
return_ACPI_STATUS (AE_OK);
diff --git a/usr/src/uts/intel/io/acpica/utilities/utmisc.c b/usr/src/uts/intel/io/acpica/utilities/utmisc.c
index 79a6b51ac1..1993c08d73 100644
--- a/usr/src/uts/intel/io/acpica/utilities/utmisc.c
+++ b/usr/src/uts/intel/io/acpica/utilities/utmisc.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: utmisc - common utility procedures
- * $Revision: 1.146 $
+ * $Revision: 1.154 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -127,6 +127,86 @@
/*******************************************************************************
*
+ * FUNCTION: AcpiUtValidateException
+ *
+ * PARAMETERS: Status - The ACPI_STATUS code to be formatted
+ *
+ * RETURN: A string containing the exception text. NULL if exception is
+ * not valid.
+ *
+ * DESCRIPTION: This function validates and translates an ACPI exception into
+ * an ASCII string.
+ *
+ ******************************************************************************/
+
+const char *
+AcpiUtValidateException (
+ ACPI_STATUS Status)
+{
+ UINT32 SubStatus;
+ const char *Exception = NULL;
+
+
+ ACPI_FUNCTION_ENTRY ();
+
+
+ /*
+ * Status is composed of two parts, a "type" and an actual code
+ */
+ SubStatus = (Status & ~AE_CODE_MASK);
+
+ switch (Status & AE_CODE_MASK)
+ {
+ case AE_CODE_ENVIRONMENTAL:
+
+ if (SubStatus <= AE_CODE_ENV_MAX)
+ {
+ Exception = AcpiGbl_ExceptionNames_Env [SubStatus];
+ }
+ break;
+
+ case AE_CODE_PROGRAMMER:
+
+ if (SubStatus <= AE_CODE_PGM_MAX)
+ {
+ Exception = AcpiGbl_ExceptionNames_Pgm [SubStatus];
+ }
+ break;
+
+ case AE_CODE_ACPI_TABLES:
+
+ if (SubStatus <= AE_CODE_TBL_MAX)
+ {
+ Exception = AcpiGbl_ExceptionNames_Tbl [SubStatus];
+ }
+ break;
+
+ case AE_CODE_AML:
+
+ if (SubStatus <= AE_CODE_AML_MAX)
+ {
+ Exception = AcpiGbl_ExceptionNames_Aml [SubStatus];
+ }
+ break;
+
+ case AE_CODE_CONTROL:
+
+ if (SubStatus <= AE_CODE_CTRL_MAX)
+ {
+ Exception = AcpiGbl_ExceptionNames_Ctrl [SubStatus];
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ return (ACPI_CAST_PTR (const char, Exception));
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiUtIsAmlTable
*
* PARAMETERS: Table - An ACPI table
@@ -146,9 +226,9 @@ AcpiUtIsAmlTable (
/* These are the only tables that contain executable AML */
- if (ACPI_COMPARE_NAME (Table->Signature, DSDT_SIG) ||
- ACPI_COMPARE_NAME (Table->Signature, PSDT_SIG) ||
- ACPI_COMPARE_NAME (Table->Signature, SSDT_SIG))
+ if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT) ||
+ ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_PSDT) ||
+ ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_SSDT))
{
return (TRUE);
}
@@ -175,9 +255,9 @@ ACPI_STATUS
AcpiUtAllocateOwnerId (
ACPI_OWNER_ID *OwnerId)
{
- ACPI_NATIVE_UINT i;
- ACPI_NATIVE_UINT j;
- ACPI_NATIVE_UINT k;
+ UINT32 i;
+ UINT32 j;
+ UINT32 k;
ACPI_STATUS Status;
@@ -292,7 +372,7 @@ AcpiUtReleaseOwnerId (
{
ACPI_OWNER_ID OwnerId = *OwnerIdPtr;
ACPI_STATUS Status;
- ACPI_NATIVE_UINT Index;
+ UINT32 Index;
UINT32 Bit;
@@ -544,7 +624,7 @@ AcpiUtSetIntegerWidth (
UINT8 Revision)
{
- if (Revision <= 1)
+ if (Revision < 2)
{
/* 32-bit case */
@@ -660,7 +740,7 @@ AcpiUtDisplayInitPathname (
BOOLEAN
AcpiUtValidAcpiChar (
char Character,
- ACPI_NATIVE_UINT Position)
+ UINT32 Position)
{
if (!((Character >= 'A' && Character <= 'Z') ||
@@ -700,7 +780,7 @@ BOOLEAN
AcpiUtValidAcpiName (
UINT32 Name)
{
- ACPI_NATIVE_UINT i;
+ UINT32 i;
ACPI_FUNCTION_ENTRY ();
@@ -727,35 +807,63 @@ AcpiUtValidAcpiName (
* RETURN: Repaired version of the name
*
* DESCRIPTION: Repair an ACPI name: Change invalid characters to '*' and
- * return the new name.
+ * return the new name. NOTE: the Name parameter must reside in
+ * read/write memory, cannot be a const.
+ *
+ * An ACPI Name must consist of valid ACPI characters. We will repair the name
+ * if necessary because we don't want to abort because of this, but we want
+ * all namespace names to be printable. A warning message is appropriate.
+ *
+ * This issue came up because there are in fact machines that exhibit
+ * this problem, and we want to be able to enable ACPI support for them,
+ * even though there are a few bad names.
*
******************************************************************************/
-ACPI_NAME
+void
AcpiUtRepairName (
- ACPI_NAME Name)
+ char *Name)
{
- char *NamePtr = ACPI_CAST_PTR (char, &Name);
- char NewName[ACPI_NAME_SIZE];
- ACPI_NATIVE_UINT i;
+ UINT32 i;
+ BOOLEAN FoundBadChar = FALSE;
+ ACPI_FUNCTION_NAME (UtRepairName);
+
+
+ /* Check each character in the name */
+
for (i = 0; i < ACPI_NAME_SIZE; i++)
{
- NewName[i] = NamePtr[i];
+ if (AcpiUtValidAcpiChar (Name[i], i))
+ {
+ continue;
+ }
/*
* Replace a bad character with something printable, yet technically
* still invalid. This prevents any collisions with existing "good"
* names in the namespace.
*/
- if (!AcpiUtValidAcpiChar (NamePtr[i], i))
+ Name[i] = '*';
+ FoundBadChar = TRUE;
+ }
+
+ if (FoundBadChar)
+ {
+ /* Report warning only if in strict mode or debug mode */
+
+ if (!AcpiGbl_EnableInterpreterSlack)
{
- NewName[i] = '*';
+ ACPI_WARNING ((AE_INFO,
+ "Found bad character(s) in name, repaired: [%4.4s]\n", Name));
+ }
+ else
+ {
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+ "Found bad character(s) in name, repaired: [%4.4s]\n", Name));
}
}
-
- return (*ACPI_CAST_PTR (UINT32, NewName));
}
@@ -1156,9 +1264,9 @@ AcpiUtWalkPackageTree (
void ACPI_INTERNAL_VAR_XFACE
AcpiUtError (
- char *ModuleName,
+ const char *ModuleName,
UINT32 LineNumber,
- char *Format,
+ const char *Format,
...)
{
va_list args;
@@ -1169,14 +1277,15 @@ AcpiUtError (
va_start (args, Format);
AcpiOsVprintf (Format, args);
AcpiOsPrintf (" [%X]\n", ACPI_CA_VERSION);
+ va_end (args);
}
void ACPI_INTERNAL_VAR_XFACE
AcpiUtException (
- char *ModuleName,
+ const char *ModuleName,
UINT32 LineNumber,
ACPI_STATUS Status,
- char *Format,
+ const char *Format,
...)
{
va_list args;
@@ -1188,13 +1297,14 @@ AcpiUtException (
va_start (args, Format);
AcpiOsVprintf (Format, args);
AcpiOsPrintf (" [%X]\n", ACPI_CA_VERSION);
+ va_end (args);
}
void ACPI_INTERNAL_VAR_XFACE
AcpiUtWarning (
- char *ModuleName,
+ const char *ModuleName,
UINT32 LineNumber,
- char *Format,
+ const char *Format,
...)
{
va_list args;
@@ -1205,22 +1315,28 @@ AcpiUtWarning (
va_start (args, Format);
AcpiOsVprintf (Format, args);
AcpiOsPrintf (" [%X]\n", ACPI_CA_VERSION);
+ va_end (args);
}
void ACPI_INTERNAL_VAR_XFACE
AcpiUtInfo (
- char *ModuleName,
+ const char *ModuleName,
UINT32 LineNumber,
- char *Format,
+ const char *Format,
...)
{
va_list args;
- AcpiOsPrintf ("ACPI (%s-%04d): ", ModuleName, LineNumber);
+ /*
+ * Removed ModuleName, LineNumber, and acpica version, not needed
+ * for info output
+ */
+ AcpiOsPrintf ("ACPI: ");
va_start (args, Format);
AcpiOsVprintf (Format, args);
- AcpiOsPrintf (" [%X]\n", ACPI_CA_VERSION);
+ AcpiOsPrintf ("\n");
+ va_end (args);
}
diff --git a/usr/src/uts/intel/io/acpica/utilities/utmutex.c b/usr/src/uts/intel/io/acpica/utilities/utmutex.c
index 53186ec8c5..0abc24cf1a 100644
--- a/usr/src/uts/intel/io/acpica/utilities/utmutex.c
+++ b/usr/src/uts/intel/io/acpica/utilities/utmutex.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: utmutex - local mutex support
- * $Revision: 1.11 $
+ * $Revision: 1.13 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -332,7 +332,7 @@ AcpiUtAcquireMutex (
* the mutex ordering rule. This indicates a coding error somewhere in
* the ACPI subsystem code.
*/
- for (i = MutexId; i < ACPI_MAX_MUTEX; i++)
+ for (i = MutexId; i < ACPI_NUM_MUTEX; i++)
{
if (AcpiGbl_MutexInfo[i].ThreadId == ThisThreadId)
{
@@ -434,7 +434,7 @@ AcpiUtReleaseMutex (
* ordering rule. This indicates a coding error somewhere in
* the ACPI subsystem code.
*/
- for (i = MutexId; i < ACPI_MAX_MUTEX; i++)
+ for (i = MutexId; i < ACPI_NUM_MUTEX; i++)
{
if (AcpiGbl_MutexInfo[i].ThreadId == ThisThreadId)
{
diff --git a/usr/src/uts/intel/io/acpica/utilities/utobject.c b/usr/src/uts/intel/io/acpica/utilities/utobject.c
index 6d7a058e5a..916e7f6f03 100644
--- a/usr/src/uts/intel/io/acpica/utilities/utobject.c
+++ b/usr/src/uts/intel/io/acpica/utilities/utobject.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utobject - ACPI object create/delete/size/cache routines
- * $Revision: 1.103 $
+ * $Revision: 1.108 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -118,7 +118,6 @@
#include "acpi.h"
#include "acnamesp.h"
-#include "amlcode.h"
#define _COMPONENT ACPI_UTILITIES
@@ -167,7 +166,7 @@ AcpiUtGetElementLength (
ACPI_OPERAND_OBJECT *
AcpiUtCreateInternalObjectDbg (
- char *ModuleName,
+ const char *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId,
ACPI_OBJECT_TYPE Type)
@@ -192,6 +191,7 @@ AcpiUtCreateInternalObjectDbg (
{
case ACPI_TYPE_REGION:
case ACPI_TYPE_BUFFER_FIELD:
+ case ACPI_TYPE_LOCAL_BANK_FIELD:
/* These types require a secondary object */
@@ -232,6 +232,55 @@ AcpiUtCreateInternalObjectDbg (
/*******************************************************************************
*
+ * FUNCTION: AcpiUtCreatePackageObject
+ *
+ * PARAMETERS: Count - Number of package elements
+ *
+ * RETURN: Pointer to a new Package object, null on failure
+ *
+ * DESCRIPTION: Create a fully initialized package object
+ *
+ ******************************************************************************/
+
+ACPI_OPERAND_OBJECT *
+AcpiUtCreatePackageObject (
+ UINT32 Count)
+{
+ ACPI_OPERAND_OBJECT *PackageDesc;
+ ACPI_OPERAND_OBJECT **PackageElements;
+
+
+ ACPI_FUNCTION_TRACE_U32 (UtCreatePackageObject, Count);
+
+
+ /* Create a new Package object */
+
+ PackageDesc = AcpiUtCreateInternalObject (ACPI_TYPE_PACKAGE);
+ if (!PackageDesc)
+ {
+ return_PTR (NULL);
+ }
+
+ /*
+ * Create the element array. Count+1 allows the array to be null
+ * terminated.
+ */
+ PackageElements = ACPI_ALLOCATE_ZEROED (
+ ((ACPI_SIZE) Count + 1) * sizeof (void *));
+ if (!PackageElements)
+ {
+ ACPI_FREE (PackageDesc);
+ return_PTR (NULL);
+ }
+
+ PackageDesc->Package.Count = Count;
+ PackageDesc->Package.Elements = PackageElements;
+ return_PTR (PackageDesc);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiUtCreateBufferObject
*
* PARAMETERS: BufferSize - Size of buffer to be created
@@ -412,7 +461,7 @@ AcpiUtValidInternalObject (
void *
AcpiUtAllocateObjectDescDbg (
- char *ModuleName,
+ const char *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId)
{
@@ -499,32 +548,36 @@ AcpiUtGetSimpleObjectSize (
ACPI_SIZE *ObjLength)
{
ACPI_SIZE Length;
+ ACPI_SIZE Size;
ACPI_STATUS Status = AE_OK;
ACPI_FUNCTION_TRACE_PTR (UtGetSimpleObjectSize, InternalObject);
- /*
- * Handle a null object (Could be a uninitialized package
- * element -- which is legal)
- */
+ /* Start with the length of the (external) Acpi object */
+
+ Length = sizeof (ACPI_OBJECT);
+
+ /* A NULL object is allowed, can be a legal uninitialized package element */
+
if (!InternalObject)
{
- *ObjLength = 0;
+ /*
+ * Object is NULL, just return the length of ACPI_OBJECT
+ * (A NULL ACPI_OBJECT is an object of all zeroes.)
+ */
+ *ObjLength = ACPI_ROUND_UP_TO_NATIVE_WORD (Length);
return_ACPI_STATUS (AE_OK);
}
- /* Start with the length of the Acpi object */
-
- Length = sizeof (ACPI_OBJECT);
+ /* A Namespace Node should never appear here */
if (ACPI_GET_DESCRIPTOR_TYPE (InternalObject) == ACPI_DESC_TYPE_NAMED)
{
- /* Object is a named object (reference), just return the length */
+ /* A namespace node should never get here */
- *ObjLength = ACPI_ROUND_UP_TO_NATIVE_WORD (Length);
- return_ACPI_STATUS (Status);
+ return_ACPI_STATUS (AE_AML_INTERNAL);
}
/*
@@ -551,24 +604,28 @@ AcpiUtGetSimpleObjectSize (
case ACPI_TYPE_PROCESSOR:
case ACPI_TYPE_POWER:
- /*
- * No extra data for these types
- */
+ /* No extra data for these types */
+
break;
case ACPI_TYPE_LOCAL_REFERENCE:
- switch (InternalObject->Reference.Opcode)
+ switch (InternalObject->Reference.Class)
{
- case AML_INT_NAMEPATH_OP:
+ case ACPI_REFCLASS_NAME:
/*
* Get the actual length of the full pathname to this object.
* The reference will be converted to the pathname to the object
*/
- Length += ACPI_ROUND_UP_TO_NATIVE_WORD (
- AcpiNsGetPathnameLength (InternalObject->Reference.Node));
+ Size = AcpiNsGetPathnameLength (InternalObject->Reference.Node);
+ if (!Size)
+ {
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
+ }
+
+ Length += ACPI_ROUND_UP_TO_NATIVE_WORD (Size);
break;
default:
@@ -578,9 +635,10 @@ AcpiUtGetSimpleObjectSize (
* Notably, Locals and Args are not supported, but this may be
* required eventually.
*/
- ACPI_ERROR ((AE_INFO,
- "Unsupported Reference opcode=%X in object %p",
- InternalObject->Reference.Opcode, InternalObject));
+ ACPI_ERROR ((AE_INFO, "Cannot convert to external object - "
+ "unsupported Reference Class [%s] %X in object %p",
+ AcpiUtGetReferenceName (InternalObject),
+ InternalObject->Reference.Class, InternalObject));
Status = AE_TYPE;
break;
}
@@ -589,7 +647,9 @@ AcpiUtGetSimpleObjectSize (
default:
- ACPI_ERROR ((AE_INFO, "Unsupported type=%X in object %p",
+ ACPI_ERROR ((AE_INFO, "Cannot convert to external object - "
+ "unsupported type [%s] %X in object %p",
+ AcpiUtGetObjectTypeName (InternalObject),
ACPI_GET_OBJECT_TYPE (InternalObject), InternalObject));
Status = AE_TYPE;
break;
diff --git a/usr/src/uts/intel/io/acpica/utilities/utresrc.c b/usr/src/uts/intel/io/acpica/utilities/utresrc.c
index 87f0c15e8e..d62e8ba89a 100644
--- a/usr/src/uts/intel/io/acpica/utilities/utresrc.c
+++ b/usr/src/uts/intel/io/acpica/utilities/utresrc.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: utresrc - Resource managment utilities
- * $Revision: 1.13 $
+ * $Revision: 1.15 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/io/acpica/utilities/utstate.c b/usr/src/uts/intel/io/acpica/utilities/utstate.c
index 7c9d72f125..1da17203d0 100644
--- a/usr/src/uts/intel/io/acpica/utilities/utstate.c
+++ b/usr/src/uts/intel/io/acpica/utilities/utstate.c
@@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: utstate - state object support procedures
- * $Revision: 1.7 $
+ * $Revision: 1.9 $
*
******************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/io/acpica/utilities/uttrack.c b/usr/src/uts/intel/io/acpica/utilities/uttrack.c
index 4dbf0bf755..5a0a22185d 100644
--- a/usr/src/uts/intel/io/acpica/utilities/uttrack.c
+++ b/usr/src/uts/intel/io/acpica/utilities/uttrack.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: uttrack - Memory allocation tracking routines (debug only)
- * $Revision: 1.3 $
+ * $Revision: 1.6 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -146,14 +146,14 @@ AcpiUtTrackAllocation (
ACPI_SIZE Size,
UINT8 AllocType,
UINT32 Component,
- char *Module,
+ const char *Module,
UINT32 Line);
static ACPI_STATUS
AcpiUtRemoveAllocation (
ACPI_DEBUG_MEM_BLOCK *Address,
UINT32 Component,
- char *Module,
+ const char *Module,
UINT32 Line);
@@ -215,7 +215,7 @@ void *
AcpiUtAllocateAndTrack (
ACPI_SIZE Size,
UINT32 Component,
- char *Module,
+ const char *Module,
UINT32 Line)
{
ACPI_DEBUG_MEM_BLOCK *Allocation;
@@ -238,7 +238,12 @@ AcpiUtAllocateAndTrack (
}
AcpiGbl_GlobalList->TotalAllocated++;
+ AcpiGbl_GlobalList->TotalSize += (UINT32) Size;
AcpiGbl_GlobalList->CurrentTotalSize += (UINT32) Size;
+ if (AcpiGbl_GlobalList->CurrentTotalSize > AcpiGbl_GlobalList->MaxOccupied)
+ {
+ AcpiGbl_GlobalList->MaxOccupied = AcpiGbl_GlobalList->CurrentTotalSize;
+ }
return ((void *) &Allocation->UserSpace);
}
@@ -263,7 +268,7 @@ void *
AcpiUtAllocateZeroedAndTrack (
ACPI_SIZE Size,
UINT32 Component,
- char *Module,
+ const char *Module,
UINT32 Line)
{
ACPI_DEBUG_MEM_BLOCK *Allocation;
@@ -290,7 +295,12 @@ AcpiUtAllocateZeroedAndTrack (
}
AcpiGbl_GlobalList->TotalAllocated++;
+ AcpiGbl_GlobalList->TotalSize += (UINT32) Size;
AcpiGbl_GlobalList->CurrentTotalSize += (UINT32) Size;
+ if (AcpiGbl_GlobalList->CurrentTotalSize > AcpiGbl_GlobalList->MaxOccupied)
+ {
+ AcpiGbl_GlobalList->MaxOccupied = AcpiGbl_GlobalList->CurrentTotalSize;
+ }
return ((void *) &Allocation->UserSpace);
}
@@ -315,7 +325,7 @@ void
AcpiUtFreeAndTrack (
void *Allocation,
UINT32 Component,
- char *Module,
+ const char *Module,
UINT32 Line)
{
ACPI_DEBUG_MEM_BLOCK *DebugBlock;
@@ -415,7 +425,7 @@ AcpiUtTrackAllocation (
ACPI_SIZE Size,
UINT8 AllocType,
UINT32 Component,
- char *Module,
+ const char *Module,
UINT32 Line)
{
ACPI_MEMORY_LIST *MemList;
@@ -498,7 +508,7 @@ static ACPI_STATUS
AcpiUtRemoveAllocation (
ACPI_DEBUG_MEM_BLOCK *Allocation,
UINT32 Component,
- char *Module,
+ const char *Module,
UINT32 Line)
{
ACPI_MEMORY_LIST *MemList;
@@ -629,7 +639,7 @@ AcpiUtDumpAllocationInfo (
void
AcpiUtDumpAllocations (
UINT32 Component,
- char *Module)
+ const char *Module)
{
ACPI_DEBUG_MEM_BLOCK *Element;
ACPI_DESCRIPTOR *Descriptor;
diff --git a/usr/src/uts/intel/io/acpica/utilities/utxface.c b/usr/src/uts/intel/io/acpica/utilities/utxface.c
index 4fad6dfa2d..f87106b755 100644
--- a/usr/src/uts/intel/io/acpica/utilities/utxface.c
+++ b/usr/src/uts/intel/io/acpica/utilities/utxface.c
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: utxface - External interfaces for "global" ACPI functions
- * $Revision: 1.121 $
+ * $Revision: 1.128 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -126,6 +126,8 @@
ACPI_MODULE_NAME ("utxface")
+#ifndef ACPI_ASL_COMPILER
+
/*******************************************************************************
*
* FUNCTION: AcpiInitializeSubsystem
@@ -149,6 +151,7 @@ AcpiInitializeSubsystem (
ACPI_FUNCTION_TRACE (AcpiInitializeSubsystem);
+ AcpiGbl_StartupFlags = ACPI_SUBSYSTEM_INITIALIZE;
ACPI_DEBUG_EXEC (AcpiUtInitStackPtrTrace ());
/* Initialize the OS-Dependent layer */
@@ -162,7 +165,12 @@ AcpiInitializeSubsystem (
/* Initialize all globals used by the subsystem */
- AcpiUtInitGlobals ();
+ Status = AcpiUtInitGlobals ();
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_EXCEPTION ((AE_INFO, Status, "During initialization of globals"));
+ return_ACPI_STATUS (Status);
+ }
/* Create the default mutex objects */
@@ -216,22 +224,6 @@ AcpiEnableSubsystem (
ACPI_FUNCTION_TRACE (AcpiEnableSubsystem);
- /*
- * We must initialize the hardware before we can enable ACPI.
- * The values from the FADT are validated here.
- */
- if (!(Flags & ACPI_NO_HARDWARE_INIT))
- {
- ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
- "[Init] Initializing ACPI hardware\n"));
-
- Status = AcpiHwInitialize ();
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
- }
-
/* Enable ACPI mode */
if (!(Flags & ACPI_NO_ACPI_ENABLE))
@@ -275,7 +267,9 @@ AcpiEnableSubsystem (
*
* Note2: Fixed events are initialized and enabled here. GPEs are
* initialized, but cannot be enabled until after the hardware is
- * completely initialized (SCI and GlobalLock activated)
+ * completely initialized (SCI and GlobalLock activated) and the various
+ * initialization control methods are run (_REG, _STA, _INI) on the
+ * entire namespace.
*/
if (!(Flags & ACPI_NO_EVENT_INIT))
{
@@ -305,26 +299,6 @@ AcpiEnableSubsystem (
}
}
- /*
- * Complete the GPE initialization for the GPE blocks defined in the FADT
- * (GPE block 0 and 1).
- *
- * Note1: This is where the _PRW methods are executed for the GPEs. These
- * methods can only be executed after the SCI and Global Lock handlers are
- * installed and initialized.
- *
- * Note2: Currently, there seems to be no need to run the _REG methods
- * before execution of the _PRW methods and enabling of the GPEs.
- */
- if (!(Flags & ACPI_NO_EVENT_INIT))
- {
- Status = AcpiEvInstallFadtGpes ();
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
- }
-
return_ACPI_STATUS (Status);
}
@@ -407,6 +381,27 @@ AcpiInitializeObjects (
}
/*
+ * Initialize the GPE blocks defined in the FADT (GPE block 0 and 1).
+ * The runtime GPEs are enabled here.
+ *
+ * This is where the _PRW methods are executed for the GPEs. These
+ * methods can only be executed after the SCI and Global Lock handlers are
+ * installed and initialized.
+ *
+ * GPEs can only be enabled after the _REG, _STA, and _INI methods have
+ * been run. This ensures that all Operation Regions and all Devices have
+ * been initialized and are ready.
+ */
+ if (!(Flags & ACPI_NO_EVENT_INIT))
+ {
+ Status = AcpiEvInstallFadtGpes ();
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ }
+
+ /*
* Empty the caches (delete the cached objects) on the assumption that
* the table load filled them up more than they will be at runtime --
* thus wasting non-paged memory.
@@ -420,6 +415,8 @@ AcpiInitializeObjects (
ACPI_EXPORT_SYMBOL (AcpiInitializeObjects)
+#endif
+
/*******************************************************************************
*
* FUNCTION: AcpiTerminate
@@ -471,6 +468,7 @@ AcpiTerminate (
ACPI_EXPORT_SYMBOL (AcpiTerminate)
+#ifndef ACPI_ASL_COMPILER
/*******************************************************************************
*
@@ -528,7 +526,6 @@ AcpiGetSystemInfo (
{
ACPI_SYSTEM_INFO *InfoPtr;
ACPI_STATUS Status;
- UINT32 i;
ACPI_FUNCTION_TRACE (AcpiGetSystemInfo);
@@ -563,11 +560,7 @@ AcpiGetSystemInfo (
/* Timer resolution - 24 or 32 bits */
- if (!AcpiGbl_FADT)
- {
- InfoPtr->TimerResolution = 0;
- }
- else if (AcpiGbl_FADT->TmrValExt == 0)
+ if (AcpiGbl_FADT.Flags & ACPI_FADT_32BIT_TIMER)
{
InfoPtr->TimerResolution = 24;
}
@@ -586,18 +579,55 @@ AcpiGetSystemInfo (
InfoPtr->DebugLayer = AcpiDbgLayer;
InfoPtr->DebugLevel = AcpiDbgLevel;
- /* Current status of the ACPI tables, per table type */
+ return_ACPI_STATUS (AE_OK);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiGetSystemInfo)
+
- InfoPtr->NumTableTypes = ACPI_TABLE_ID_MAX+1;
- for (i = 0; i < (ACPI_TABLE_ID_MAX+1); i++)
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiGetStatistics
+ *
+ * PARAMETERS: Stats - Where the statistics are returned
+ *
+ * RETURN: Status - the status of the call
+ *
+ * DESCRIPTION: Get the contents of the various system counters
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiGetStatistics (
+ ACPI_STATISTICS *Stats)
+{
+ ACPI_FUNCTION_TRACE (AcpiGetStatistics);
+
+
+ /* Parameter validation */
+
+ if (!Stats)
{
- InfoPtr->TableInfo[i].Count = AcpiGbl_TableLists[i].Count;
+ return_ACPI_STATUS (AE_BAD_PARAMETER);
}
+ /* Various interrupt-based event counters */
+
+ Stats->SciCount = AcpiSciCount;
+ Stats->GpeCount = AcpiGpeCount;
+
+ ACPI_MEMCPY (Stats->FixedEventCount, AcpiFixedEventCount,
+ sizeof (AcpiFixedEventCount));
+
+
+ /* Other counters */
+
+ Stats->MethodCount = AcpiMethodCount;
+
return_ACPI_STATUS (AE_OK);
}
-ACPI_EXPORT_SYMBOL (AcpiGetSystemInfo)
+ACPI_EXPORT_SYMBOL (AcpiGetStatistics)
/*****************************************************************************
@@ -664,3 +694,5 @@ AcpiPurgeCachedObjects (
}
ACPI_EXPORT_SYMBOL (AcpiPurgeCachedObjects)
+
+#endif
diff --git a/usr/src/uts/intel/io/amd_iommu/amd_iommu_acpi.c b/usr/src/uts/intel/io/amd_iommu/amd_iommu_acpi.c
index b1cbbda077..018f0514e6 100644
--- a/usr/src/uts/intel/io/amd_iommu/amd_iommu_acpi.c
+++ b/usr/src/uts/intel/io/amd_iommu/amd_iommu_acpi.c
@@ -260,7 +260,6 @@ process_ivmd(amd_iommu_acpi_t *acpi, ivmd_t *ivmdp)
int
amd_iommu_acpi_init(amd_iommu_acpi_t **acpipp)
{
- ACPI_STATUS status;
ivrs_t *ivrsp;
caddr_t ivrsp_end;
caddr_t table_end;
@@ -268,9 +267,7 @@ amd_iommu_acpi_init(amd_iommu_acpi_t **acpipp)
uint8_t type8;
amd_iommu_acpi_t *acpi;
- status = AcpiGetFirmwareTable(IVRS_SIG, 1, ACPI_LOGICAL_ADDRESSING,
- (ACPI_TABLE_HEADER **)&ivrsp);
- if (status != AE_OK) {
+ if (AcpiGetTable(IVRS_SIG, 1, (ACPI_TABLE_HEADER **)&ivrsp) != AE_OK) {
cmn_err(CE_NOTE, "!amd_iommu: No AMD IOMMU ACPI IVRS table");
return (DDI_FAILURE);
}
diff --git a/usr/src/uts/intel/io/hotplug/pciehpc/pciehpc_acpi.c b/usr/src/uts/intel/io/hotplug/pciehpc/pciehpc_acpi.c
index 7437c0ac34..0a622d7897 100644
--- a/usr/src/uts/intel/io/hotplug/pciehpc/pciehpc_acpi.c
+++ b/usr/src/uts/intel/io/hotplug/pciehpc/pciehpc_acpi.c
@@ -20,12 +20,10 @@
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* ACPI interface related functions used in PCIEHPC driver module.
*/
@@ -214,7 +212,7 @@ pciehpc_acpi_hpc_init(pciehpc_t *ctrl_p)
/* get the ACPI object handle for the child node */
status = AcpiGetNextObject(ACPI_TYPE_DEVICE, pcibus_obj,
- NULL, &slot_dev_obj);
+ NULL, &slot_dev_obj);
if (status != AE_OK)
return (DDI_FAILURE);
@@ -252,7 +250,7 @@ pciehpc_acpi_hpc_init(pciehpc_t *ctrl_p)
/* initialize the slot mutex */
mutex_init(&ctrl_p->pciehpc_mutex, NULL, MUTEX_DRIVER,
- (void *)PCIEHPC_INTR_PRI);
+ (void *)PCIEHPC_INTR_PRI);
return (DDI_SUCCESS);
}
@@ -329,32 +327,32 @@ pciehpc_acpi_slotinfo_init(pciehpc_t *ctrl_p)
p->slot_info.version = HPC_SLOT_OPS_VERSION;
p->slot_info.slot_type = HPC_SLOT_TYPE_PCIE;
p->slot_info.slot_flags =
- HPC_SLOT_CREATE_DEVLINK | HPC_SLOT_NO_AUTO_ENABLE;
+ HPC_SLOT_CREATE_DEVLINK | HPC_SLOT_NO_AUTO_ENABLE;
p->slot_info.pci_slot_capabilities = HPC_SLOT_64BITS;
/* the device number is fixed as 0 as per the spec */
p->slot_info.pci_dev_num = 0;
/* read Slot Capabilities Register */
slot_capabilities = pciehpc_reg_get32(ctrl_p,
- ctrl_p->pcie_caps_reg_offset + PCIE_SLOTCAP);
+ ctrl_p->pcie_caps_reg_offset + PCIE_SLOTCAP);
/* setup slot number/name */
pciehpc_set_slot_name(ctrl_p);
/* check if Attn Button present */
ctrl_p->has_attn = (slot_capabilities & PCIE_SLOTCAP_ATTN_BUTTON) ?
- B_TRUE : B_FALSE;
+ B_TRUE : B_FALSE;
/* check if Manual Retention Latch sensor present */
ctrl_p->has_mrl = (slot_capabilities & PCIE_SLOTCAP_MRL_SENSOR) ?
- B_TRUE : B_FALSE;
+ B_TRUE : B_FALSE;
/*
* PCI-E (draft) version 1.1 defines EMI Lock Present bit
* in Slot Capabilities register. Check for it.
*/
ctrl_p->has_emi_lock = (slot_capabilities &
- PCIE_SLOTCAP_EMI_LOCK_PRESENT) ? B_TRUE : B_FALSE;
+ PCIE_SLOTCAP_EMI_LOCK_PRESENT) ? B_TRUE : B_FALSE;
/* initialize synchronization conditional variable */
cv_init(&ctrl_p->slot.cmd_comp_cv, NULL, CV_DRIVER, NULL);
@@ -368,7 +366,7 @@ pciehpc_acpi_slotinfo_init(pciehpc_t *ctrl_p)
return (DDI_FAILURE);
PCIEHPC_DEBUG((CE_NOTE, "ACPI hot plug is enabled for slot #%d\n",
- ctrl_p->slot.slotNum));
+ ctrl_p->slot.slotNum));
return (DDI_SUCCESS);
}
@@ -421,13 +419,13 @@ pciehpc_acpi_slot_connect(caddr_t ops_arg, hpc_slot_t slot_hdl,
/* read the Slot Status Register */
status = pciehpc_reg_get16(ctrl_p,
- ctrl_p->pcie_caps_reg_offset + PCIE_SLOTSTS);
+ ctrl_p->pcie_caps_reg_offset + PCIE_SLOTSTS);
/* make sure the MRL switch is closed if present */
if ((ctrl_p->has_mrl) && (status & PCIE_SLOTSTS_MRL_SENSOR_OPEN)) {
/* MRL switch is open */
cmn_err(CE_WARN, "MRL switch is open on slot %d",
- ctrl_p->slot.slotNum);
+ ctrl_p->slot.slotNum);
goto cleanup;
}
@@ -441,7 +439,7 @@ pciehpc_acpi_slot_connect(caddr_t ops_arg, hpc_slot_t slot_hdl,
/* get the current state of Slot Control Register */
control = pciehpc_reg_get16(ctrl_p,
- ctrl_p->pcie_caps_reg_offset + PCIE_SLOTCTL);
+ ctrl_p->pcie_caps_reg_offset + PCIE_SLOTCTL);
/* check if the slot's power state is ON */
if (!(control & PCIE_SLOTCTL_PWR_CONTROL)) {
@@ -499,7 +497,7 @@ pciehpc_acpi_slot_disconnect(caddr_t ops_arg, hpc_slot_t slot_hdl,
/* read the Slot Status Register */
status = pciehpc_reg_get16(ctrl_p,
- ctrl_p->pcie_caps_reg_offset + PCIE_SLOTSTS);
+ ctrl_p->pcie_caps_reg_offset + PCIE_SLOTSTS);
/* make sure the slot has a device present */
if (!(status & PCIE_SLOTSTS_PRESENCE_DETECTED)) {
@@ -533,7 +531,7 @@ pciehpc_acpi_install_event_handler(pciehpc_t *ctrl_p)
pciehpc_acpi_t *acpi_p;
PCIEHPC_DEBUG3((CE_CONT, "install event handler for slot %d\n",
- ctrl_p->slot.slotNum));
+ ctrl_p->slot.slotNum));
acpi_p = ctrl_p->misc_data;
if (acpi_p->slot_dev_obj == NULL)
return (AE_NOT_FOUND);
@@ -543,8 +541,7 @@ pciehpc_acpi_install_event_handler(pciehpc_t *ctrl_p)
* (Note: Insert event (hot-insert) is delivered on this object)
*/
status = AcpiInstallNotifyHandler(acpi_p->slot_dev_obj,
- ACPI_SYSTEM_NOTIFY,
- pciehpc_acpi_notify_handler, (void *)ctrl_p);
+ ACPI_SYSTEM_NOTIFY, pciehpc_acpi_notify_handler, (void *)ctrl_p);
if (status != AE_OK)
goto cleanup;
@@ -556,14 +553,13 @@ pciehpc_acpi_install_event_handler(pciehpc_t *ctrl_p)
* on all of the 8 possible device functions so, subscribing to
* one of them is sufficient.
*/
- status = AcpiInstallNotifyHandler(acpi_p->bus_obj,
- ACPI_SYSTEM_NOTIFY,
- pciehpc_acpi_notify_handler, (void *)ctrl_p);
+ status = AcpiInstallNotifyHandler(acpi_p->bus_obj, ACPI_SYSTEM_NOTIFY,
+ pciehpc_acpi_notify_handler, (void *)ctrl_p);
return (status);
cleanup:
(void) AcpiRemoveNotifyHandler(acpi_p->slot_dev_obj,
- ACPI_SYSTEM_NOTIFY, pciehpc_acpi_notify_handler);
+ ACPI_SYSTEM_NOTIFY, pciehpc_acpi_notify_handler);
return (status);
}
@@ -585,12 +581,12 @@ pciehpc_acpi_notify_handler(ACPI_HANDLE device, uint32_t val, void *context)
*/
acpi_p = ctrl_p->misc_data;
if (pciehpc_acpi_get_dev_state(acpi_p->slot_dev_obj,
- &dev_state) != AE_OK) {
+ &dev_state) != AE_OK) {
cmn_err(CE_WARN, "failed to get device status on slot %d",
- ctrl_p->slot.slotNum);
+ ctrl_p->slot.slotNum);
}
PCIEHPC_DEBUG((CE_CONT, "(1)device state on slot #%d: 0x%x\n",
- ctrl_p->slot.slotNum, dev_state));
+ ctrl_p->slot.slotNum, dev_state));
pciehpc_get_slot_state(ctrl_p);
@@ -598,17 +594,17 @@ pciehpc_acpi_notify_handler(ACPI_HANDLE device, uint32_t val, void *context)
case 0: /* (re)enumerate the device */
case 3: /* Request Eject */
if (ctrl_p->slot.slot_state != HPC_SLOT_CONNECTED) {
- /* unexpected slot state; surprise removal? */
- cmn_err(CE_WARN, "Unexpected event on slot #%d"
- "(state 0x%x)", ctrl_p->slot.slotNum, dev_state);
+ /* unexpected slot state; surprise removal? */
+ cmn_err(CE_WARN, "Unexpected event on slot #%d"
+ "(state 0x%x)", ctrl_p->slot.slotNum, dev_state);
}
/* send the ATTN button event to HPS framework */
(void) hpc_slot_event_notify(ctrl_p->slot.slot_handle,
- HPC_EVENT_SLOT_ATTN, HPC_EVENT_NORMAL);
+ HPC_EVENT_SLOT_ATTN, HPC_EVENT_NORMAL);
break;
default:
cmn_err(CE_NOTE, "Unknown Notify() event %d on slot #%d\n",
- val, ctrl_p->slot.slotNum);
+ val, ctrl_p->slot.slotNum);
break;
}
mutex_exit(&ctrl_p->pciehpc_mutex);
@@ -620,11 +616,11 @@ pciehpc_acpi_uninstall_event_handler(pciehpc_t *ctrl_p)
pciehpc_acpi_t *acpi_p = ctrl_p->misc_data;
PCIEHPC_DEBUG((CE_CONT, "Uninstall event handler for slot #%d\n",
- ctrl_p->slot.slotNum));
+ ctrl_p->slot.slotNum));
(void) AcpiRemoveNotifyHandler(acpi_p->slot_dev_obj,
- ACPI_SYSTEM_NOTIFY, pciehpc_acpi_notify_handler);
+ ACPI_SYSTEM_NOTIFY, pciehpc_acpi_notify_handler);
(void) AcpiRemoveNotifyHandler(acpi_p->bus_obj,
- ACPI_SYSTEM_NOTIFY, pciehpc_acpi_notify_handler);
+ ACPI_SYSTEM_NOTIFY, pciehpc_acpi_notify_handler);
}
/*
@@ -638,26 +634,26 @@ pciehpc_acpi_power_on_slot(pciehpc_t *ctrl_p)
int dev_state = 0;
PCIEHPC_DEBUG((CE_CONT, "turn ON power to the slot #%d\n",
- ctrl_p->slot.slotNum));
+ ctrl_p->slot.slotNum));
status = AcpiEvaluateObject(acpi_p->slot_dev_obj, "_PS0", NULL, NULL);
/* get the state of the device (from _STA method) */
if (status == AE_OK) {
- if (pciehpc_acpi_get_dev_state(acpi_p->slot_dev_obj,
- &dev_state) != AE_OK)
+ if (pciehpc_acpi_get_dev_state(acpi_p->slot_dev_obj,
+ &dev_state) != AE_OK)
cmn_err(CE_WARN, "failed to get device status on slot #%d",
- ctrl_p->slot.slotNum);
+ ctrl_p->slot.slotNum);
}
PCIEHPC_DEBUG((CE_CONT, "(3)device state on slot #%d: 0x%x\n",
- ctrl_p->slot.slotNum, dev_state));
+ ctrl_p->slot.slotNum, dev_state));
pciehpc_get_slot_state(ctrl_p);
if (ctrl_p->slot.slot_state != HPC_SLOT_CONNECTED) {
cmn_err(CE_WARN, "failed to power on the slot #%d"
- "(dev_state 0x%x, ACPI_STATUS 0x%x)",
- ctrl_p->slot.slotNum, dev_state, status);
+ "(dev_state 0x%x, ACPI_STATUS 0x%x)",
+ ctrl_p->slot.slotNum, dev_state, status);
return (AE_ERROR);
}
@@ -675,26 +671,26 @@ pciehpc_acpi_power_off_slot(pciehpc_t *ctrl_p)
int dev_state = 0;
PCIEHPC_DEBUG((CE_CONT, "turn OFF power to the slot #%d\n",
- ctrl_p->slot.slotNum));
+ ctrl_p->slot.slotNum));
status = AcpiEvaluateObject(acpi_p->slot_dev_obj, "_EJ0", NULL, NULL);
/* get the state of the device (from _STA method) */
if (status == AE_OK) {
- if (pciehpc_acpi_get_dev_state(acpi_p->slot_dev_obj,
- &dev_state) != AE_OK)
+ if (pciehpc_acpi_get_dev_state(acpi_p->slot_dev_obj,
+ &dev_state) != AE_OK)
cmn_err(CE_WARN, "failed to get device status on slot #%d",
- ctrl_p->slot.slotNum);
+ ctrl_p->slot.slotNum);
}
PCIEHPC_DEBUG((CE_CONT, "(2)device state on slot #%d: 0x%x\n",
- ctrl_p->slot.slotNum, dev_state));
+ ctrl_p->slot.slotNum, dev_state));
pciehpc_get_slot_state(ctrl_p);
if (ctrl_p->slot.slot_state == HPC_SLOT_CONNECTED) {
cmn_err(CE_WARN, "failed to power OFF the slot #%d"
- "(dev_state 0x%x, ACPI_STATUS 0x%x)",
- ctrl_p->slot.slotNum, dev_state, status);
+ "(dev_state 0x%x, ACPI_STATUS 0x%x)",
+ ctrl_p->slot.slotNum, dev_state, status);
return (AE_ERROR);
}
@@ -713,7 +709,7 @@ pciehpc_acpi_ej0_present(ACPI_HANDLE pcibus_obj)
ACPI_HANDLE ej0_hdl;
if ((status = AcpiGetNextObject(ACPI_TYPE_DEVICE, pcibus_obj,
- NULL, &d0f0_obj)) == AE_OK) {
+ NULL, &d0f0_obj)) == AE_OK) {
/* child device node(s) are present; check for _EJ0 method */
status = AcpiGetHandle(d0f0_obj, "_EJ0", &ej0_hdl);
}
@@ -770,7 +766,6 @@ pciehpc_acpi_eval_osc(ACPI_HANDLE osc_hdl, uint32_t *hp_mode)
ACPI_OBJECT args[4];
UINT32 caps_buffer[3];
ACPI_BUFFER rb;
- ACPI_OBJECT *rv;
UINT32 *rbuf;
/* construct argument list */
@@ -807,27 +802,21 @@ pciehpc_acpi_eval_osc(ACPI_HANDLE osc_hdl, uint32_t *hp_mode)
rb.Length = ACPI_ALLOCATE_BUFFER;
rb.Pointer = NULL;
- status = AcpiEvaluateObject(osc_hdl, NULL, &arglist, &rb);
-
+ status = AcpiEvaluateObjectTyped(osc_hdl, NULL, &arglist, &rb,
+ ACPI_TYPE_BUFFER);
if (status != AE_OK) {
PCIEHPC_DEBUG((CE_CONT,
"Failed to execute _OSC method (status %d)\n", status));
return (status);
}
- rv = rb.Pointer;
- if (rv == NULL || rv->Type != ACPI_TYPE_BUFFER) {
- PCIEHPC_DEBUG((CE_CONT,
- "Failed to execute _OSC method -- bad status\n"));
- return (AE_ERROR);
- }
- rbuf = (UINT32 *)rv->Buffer.Pointer;
+ rbuf = (UINT32 *)((ACPI_OBJECT *)rb.Pointer)->Buffer.Pointer;
/* check the STATUS word in the capability buffer */
if (rbuf[0] & OSC_STATUS_ERRORS) {
PCIEHPC_DEBUG((CE_CONT, "_OSC method failed (STATUS %d)\n",
rbuf[0]));
- AcpiOsFree(rv);
+ AcpiOsFree(rb.Pointer);
return (AE_ERROR);
}
@@ -841,7 +830,7 @@ pciehpc_acpi_eval_osc(ACPI_HANDLE osc_hdl, uint32_t *hp_mode)
else
*hp_mode = ACPI_HP_MODE;
- AcpiOsFree(rv);
+ AcpiOsFree(rb.Pointer);
return (AE_OK);
}
@@ -868,10 +857,10 @@ pciehpc_dump_acpi_obj(ACPI_HANDLE pcibus_obj)
/* dump all the methods for this bus node */
cmn_err(CE_CONT, " METHODS: \n");
status = AcpiWalkNamespace(ACPI_TYPE_METHOD, pcibus_obj, 1,
- pciehpc_print_acpi_name, " ", NULL);
+ pciehpc_print_acpi_name, " ", NULL);
/* dump all the child devices */
status = AcpiWalkNamespace(ACPI_TYPE_DEVICE, pcibus_obj, 1,
- pciehpc_walk_obj_namespace, NULL, NULL);
+ pciehpc_walk_obj_namespace, NULL, NULL);
}
/*ARGSUSED*/
@@ -891,14 +880,14 @@ pciehpc_walk_obj_namespace(ACPI_HANDLE hdl, uint32_t nl, void *context,
return (status);
buf[0] = 0;
while (nl--)
- (void) strcat(buf, " ");
+ (void) strcat(buf, " ");
cmn_err(CE_CONT, "%sDEVICE: %s\n", buf, (char *)retbuf.Pointer);
AcpiOsFree(retbuf.Pointer);
/* dump all the methods for this device */
cmn_err(CE_CONT, "%s METHODS: \n", buf);
status = AcpiWalkNamespace(ACPI_TYPE_METHOD, hdl, 1,
- pciehpc_print_acpi_name, (void *)buf, NULL);
+ pciehpc_print_acpi_name, (void *)buf, NULL);
return (status);
}
diff --git a/usr/src/uts/intel/io/pci/pci_boot.c b/usr/src/uts/intel/io/pci/pci_boot.c
index b59724ca9b..761c8f9499 100644
--- a/usr/src/uts/intel/io/pci/pci_boot.c
+++ b/usr/src/uts/intel/io/pci/pci_boot.c
@@ -246,30 +246,27 @@ static int
pci_bbn_present(int bus)
{
ACPI_HANDLE hdl;
- ACPI_BUFFER rb;
int rv;
/* no dip means no _BBN */
if (pci_bus_res[bus].dip == NULL)
return (0);
- rv = acpica_get_handle(pci_bus_res[bus].dip, &hdl);
- if (rv != AE_OK)
- return (-1);
-
- rb.Length = ACPI_ALLOCATE_BUFFER;
-
- rv = AcpiEvaluateObject(hdl, "_BBN", NULL, &rb);
-
- if (rb.Length > 0)
- AcpiOsFree(rb.Pointer);
+ rv = -1; /* default return value in case of error below */
+ if (ACPI_SUCCESS(acpica_get_handle(pci_bus_res[bus].dip, &hdl))) {
+ switch (AcpiEvaluateObject(hdl, "_BBN", NULL, NULL)) {
+ case AE_OK:
+ rv = 1;
+ break;
+ case AE_NOT_FOUND:
+ rv = 0;
+ break;
+ default:
+ break;
+ }
+ }
- if (rv == AE_OK)
- return (1);
- else if (rv == AE_NOT_FOUND)
- return (0);
- else
- return (-1);
+ return (rv);
}
/*
@@ -309,8 +306,8 @@ pci_bus_renumber()
return (1);
/* get the FADT */
- if (AcpiGetFirmwareTable(FADT_SIG, 1, ACPI_LOGICAL_ADDRESSING,
- (ACPI_TABLE_HEADER **)&fadt) != AE_OK)
+ if (AcpiGetTable(ACPI_SIG_FADT, 1, (ACPI_TABLE_HEADER **)&fadt) !=
+ AE_OK)
return (0);
/* compare OEM Table ID to "SUNm31" */
diff --git a/usr/src/uts/intel/sys/acpi/acapps.h b/usr/src/uts/intel/sys/acpi/acapps.h
index 15503375b1..87dcc2a43a 100644
--- a/usr/src/uts/intel/sys/acpi/acapps.h
+++ b/usr/src/uts/intel/sys/acpi/acapps.h
@@ -8,7 +8,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -168,7 +168,8 @@ AdGetLocalTables (
ACPI_STATUS
AdParseTable (
- ACPI_TABLE_HEADER *Table);
+ ACPI_TABLE_HEADER *Table,
+ BOOLEAN LoadTable);
ACPI_STATUS
AdDisplayTables (
diff --git a/usr/src/uts/intel/sys/acpi/acconfig.h b/usr/src/uts/intel/sys/acpi/acconfig.h
index 926007c62a..7df0774c5a 100644
--- a/usr/src/uts/intel/sys/acpi/acconfig.h
+++ b/usr/src/uts/intel/sys/acpi/acconfig.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acconfig.h - Global configuration constants
- * $Revision: 1.222 $
+ * $Revision: 1.243 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -137,7 +137,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
-#define ACPI_CA_VERSION 0x20060721
+#define ACPI_CA_VERSION 0x20080829
/*
* OS name, used for the _OS object. The _OS object is essentially obsolete,
@@ -190,6 +190,10 @@
#define ACPI_NUM_OWNERID_MASKS 8
+/* Size of the root table array is increased by this increment */
+
+#define ACPI_ROOT_TABLE_SIZE_INCREMENT 4
+
/******************************************************************************
*
@@ -222,12 +226,28 @@
#define ACPI_OBJ_NUM_OPERANDS 8
#define ACPI_OBJ_MAX_OPERAND 7
+/* Number of elements in the Result Stack frame, can be an arbitrary value */
+
+#define ACPI_RESULTS_FRAME_OBJ_NUM 8
+
+/*
+ * Maximal number of elements the Result Stack can contain,
+ * it may be an arbitray value not exceeding the types of
+ * ResultSize and ResultCount (now UINT8).
+ */
+#define ACPI_RESULTS_OBJ_NUM_MAX 255
+
/* Names within the namespace are 4 bytes long */
#define ACPI_NAME_SIZE 4
#define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */
#define ACPI_PATH_SEPARATOR '.'
+/* Sizes for ACPI table headers */
+
+#define ACPI_OEM_ID_SIZE 6
+#define ACPI_OEM_TABLE_ID_SIZE 8
+
/* Constants used in searching for the RSDP in low memory */
#define ACPI_EBDA_PTR_LOCATION 0x0000040E /* Physical Address */
diff --git a/usr/src/uts/intel/sys/acpi/acdebug.h b/usr/src/uts/intel/sys/acpi/acdebug.h
index a56bde7cca..ce0371d506 100644
--- a/usr/src/uts/intel/sys/acpi/acdebug.h
+++ b/usr/src/uts/intel/sys/acpi/acdebug.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acdebug.h - ACPI/AML debugger
- * $Revision: 1.81 $
+ * $Revision: 1.85 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -260,6 +260,13 @@ AcpiDbGenerateGpe (
char *GpeArg,
char *BlockArg);
+void
+AcpiDbCheckPredefinedNames (
+ void);
+
+void
+AcpiDbBatchExecute (
+ void);
/*
* dbdisply - debug display commands
@@ -323,6 +330,12 @@ AcpiDbCreateExecutionThreads (
char *NumLoopsArg,
char *MethodNameArg);
+#ifdef ACPI_DBG_TRACK_ALLOCATIONS
+UINT32
+AcpiDbGetCacheInfo (
+ ACPI_MEMORY_LIST *Cache);
+#endif
+
/*
* dbfileio - Debugger file I/O commands
@@ -423,4 +436,9 @@ ACPI_NAMESPACE_NODE *
AcpiDbLocalNsLookup (
char *Name);
+void
+AcpiDbUInt32ToHexString (
+ UINT32 Value,
+ char *Buffer);
+
#endif /* __ACDEBUG_H__ */
diff --git a/usr/src/uts/intel/sys/acpi/acdisasm.h b/usr/src/uts/intel/sys/acpi/acdisasm.h
index 2098b7908c..12fee7ea43 100644
--- a/usr/src/uts/intel/sys/acpi/acdisasm.h
+++ b/usr/src/uts/intel/sys/acpi/acdisasm.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acdisasm.h - AML disassembler
- * $Revision: 1.35 $
+ * $Revision: 1.45 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -174,19 +174,26 @@ typedef const struct acpi_dmtable_info
#define ACPI_DMT_CHKSUM 20
#define ACPI_DMT_SPACEID 21
#define ACPI_DMT_GAS 22
-#define ACPI_DMT_MADT 23
-#define ACPI_DMT_SRAT 24
-#define ACPI_DMT_EXIT 25
+#define ACPI_DMT_ASF 23
+#define ACPI_DMT_DMAR 24
+#define ACPI_DMT_HEST 25
+#define ACPI_DMT_HESTNTFY 26
+#define ACPI_DMT_HESTNTYP 27
+#define ACPI_DMT_MADT 28
+#define ACPI_DMT_SRAT 29
+#define ACPI_DMT_EXIT 30
+#define ACPI_DMT_SIG 31
typedef
-void (*ACPI_TABLE_HANDLER) (
+void (*ACPI_DMTABLE_HANDLER) (
ACPI_TABLE_HEADER *Table);
typedef struct acpi_dmtable_data
{
char *Signature;
- ACPI_DMTABLE_INFO *TableInfo;
- ACPI_TABLE_HANDLER TableHandler;
+ ACPI_DMTABLE_INFO *TableInfo;
+ ACPI_DMTABLE_HANDLER TableHandler;
+ char *Name;
} ACPI_DMTABLE_DATA;
@@ -226,20 +233,35 @@ extern const char *AcpiGbl_MatchOps[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf1[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf1a[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf2[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf2a[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf3[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf4[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsfHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoBoot[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoBert[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCpep[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoCpep0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoDbgp[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmarHdr[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmarScope[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar0[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar1[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoDmar2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoEcdt[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoEinj[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoEinj0[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoErst[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFacs[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoGas[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoHeader[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoHest9[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoHestNotify[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoHpet[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt0[];
@@ -251,18 +273,23 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt5[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt6[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt7[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt8[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt9[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadt10[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMadtHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMcfg[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoMcfg0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSbst[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlic[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlit[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSpcr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSpmi[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoSratHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat1[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoSrat2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpa[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoWdrt[];
@@ -274,7 +301,7 @@ void
AcpiDmDumpDataTable (
ACPI_TABLE_HEADER *Table);
-void
+ACPI_STATUS
AcpiDmDumpTable (
UINT32 TableLength,
UINT32 TableOffset,
@@ -308,11 +335,23 @@ AcpiDmDumpCpep (
ACPI_TABLE_HEADER *Table);
void
+AcpiDmDumpDmar (
+ ACPI_TABLE_HEADER *Table);
+
+void
+AcpiDmDumpEinj (
+ ACPI_TABLE_HEADER *Table);
+
+void
+AcpiDmDumpErst (
+ ACPI_TABLE_HEADER *Table);
+
+void
AcpiDmDumpFadt (
ACPI_TABLE_HEADER *Table);
void
-AcpiDmDumpSrat (
+AcpiDmDumpHest (
ACPI_TABLE_HEADER *Table);
void
@@ -336,6 +375,10 @@ AcpiDmDumpSlit (
ACPI_TABLE_HEADER *Table);
void
+AcpiDmDumpSrat (
+ ACPI_TABLE_HEADER *Table);
+
+void
AcpiDmDumpXsdt (
ACPI_TABLE_HEADER *Table);
@@ -408,7 +451,7 @@ AcpiDmCommaIfFieldMember (
*/
UINT32
AcpiDmDumpName (
- char *Name);
+ UINT32 Name);
ACPI_STATUS
AcpiPsDisplayObjectPathname (
@@ -504,7 +547,7 @@ AcpiDmResourceTemplate (
UINT8 *ByteData,
UINT32 ByteCount);
-BOOLEAN
+ACPI_STATUS
AcpiDmIsResourceTemplate (
ACPI_PARSE_OBJECT *Op);
diff --git a/usr/src/uts/intel/sys/acpi/acdispat.h b/usr/src/uts/intel/sys/acpi/acdispat.h
index 752bc850e7..f13a6cc8cf 100644
--- a/usr/src/uts/intel/sys/acpi/acdispat.h
+++ b/usr/src/uts/intel/sys/acpi/acdispat.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acdispat.h - dispatcher (parser to interpreter interface)
- * $Revision: 1.72 $
+ * $Revision: 1.79 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -131,6 +131,10 @@ AcpiDsGetBufferFieldArguments (
ACPI_OPERAND_OBJECT *ObjDesc);
ACPI_STATUS
+AcpiDsGetBankFieldArguments (
+ ACPI_OPERAND_OBJECT *ObjDesc);
+
+ACPI_STATUS
AcpiDsGetRegionArguments (
ACPI_OPERAND_OBJECT *RgnDesc);
@@ -153,12 +157,22 @@ AcpiDsEvalRegionOperands (
ACPI_PARSE_OBJECT *Op);
ACPI_STATUS
+AcpiDsEvalTableRegionOperands (
+ ACPI_WALK_STATE *WalkState,
+ ACPI_PARSE_OBJECT *Op);
+
+ACPI_STATUS
AcpiDsEvalDataObjectOperands (
ACPI_WALK_STATE *WalkState,
ACPI_PARSE_OBJECT *Op,
ACPI_OPERAND_OBJECT *ObjDesc);
ACPI_STATUS
+AcpiDsEvalBankFieldOperands (
+ ACPI_WALK_STATE *WalkState,
+ ACPI_PARSE_OBJECT *Op);
+
+ACPI_STATUS
AcpiDsInitializeRegion (
ACPI_HANDLE ObjHandle);
@@ -259,7 +273,7 @@ AcpiDsInitCallbacks (
*/
ACPI_STATUS
AcpiDsStoreObjectToLocal (
- UINT16 Opcode,
+ UINT8 Type,
UINT32 Index,
ACPI_OPERAND_OBJECT *SrcDesc,
ACPI_WALK_STATE *WalkState);
@@ -281,7 +295,7 @@ AcpiDsIsMethodValue (
ACPI_STATUS
AcpiDsMethodDataGetValue (
- UINT16 Opcode,
+ UINT8 Type,
UINT32 Index,
ACPI_WALK_STATE *WalkState,
ACPI_OPERAND_OBJECT **DestDesc);
@@ -294,7 +308,7 @@ AcpiDsMethodDataInitArgs (
ACPI_STATUS
AcpiDsMethodDataGetNode (
- UINT16 Opcode,
+ UINT8 Type,
UINT32 Index,
ACPI_WALK_STATE *WalkState,
ACPI_NAMESPACE_NODE **Node);
@@ -343,7 +357,7 @@ AcpiDsMethodError (
*/
ACPI_STATUS
AcpiDsInitializeObjects (
- ACPI_TABLE_DESC *TableDesc,
+ UINT32 TableIndex,
ACPI_NAMESPACE_NODE *StartNode);
@@ -421,6 +435,10 @@ void
AcpiDsClearOperands (
ACPI_WALK_STATE *WalkState);
+ACPI_STATUS
+AcpiDsEvaluateNamePath (
+ ACPI_WALK_STATE *WalkState);
+
/*
* dswscope - Scope Stack manipulation
@@ -471,7 +489,7 @@ AcpiDsInitAmlWalk (
ACPI_EVALUATE_INFO *Info,
UINT8 PassNumber);
-ACPI_STATUS
+void
AcpiDsObjStackPopAndDelete (
UINT32 PopCount,
ACPI_WALK_STATE *WalkState);
@@ -490,14 +508,6 @@ AcpiDsPushWalkState (
ACPI_THREAD_STATE *Thread);
ACPI_STATUS
-AcpiDsResultStackPop (
- ACPI_WALK_STATE *WalkState);
-
-ACPI_STATUS
-AcpiDsResultStackPush (
- ACPI_WALK_STATE *WalkState);
-
-ACPI_STATUS
AcpiDsResultStackClear (
ACPI_WALK_STATE *WalkState);
@@ -506,12 +516,6 @@ AcpiDsGetCurrentWalkState (
ACPI_THREAD_STATE *Thread);
ACPI_STATUS
-AcpiDsResultRemove (
- ACPI_OPERAND_OBJECT **Object,
- UINT32 Index,
- ACPI_WALK_STATE *WalkState);
-
-ACPI_STATUS
AcpiDsResultPop (
ACPI_OPERAND_OBJECT **Object,
ACPI_WALK_STATE *WalkState);
@@ -521,9 +525,4 @@ AcpiDsResultPush (
ACPI_OPERAND_OBJECT *Object,
ACPI_WALK_STATE *WalkState);
-ACPI_STATUS
-AcpiDsResultPopFromBottom (
- ACPI_OPERAND_OBJECT **Object,
- ACPI_WALK_STATE *WalkState);
-
#endif /* _ACDISPAT_H_ */
diff --git a/usr/src/uts/intel/sys/acpi/acevents.h b/usr/src/uts/intel/sys/acpi/acevents.h
index 1b685c7201..5884d378fe 100644
--- a/usr/src/uts/intel/sys/acpi/acevents.h
+++ b/usr/src/uts/intel/sys/acpi/acevents.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acevents.h - Event subcomponent prototypes and defines
- * $Revision: 1.106 $
+ * $Revision: 1.110 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/sys/acpi/acexcep.h b/usr/src/uts/intel/sys/acpi/acexcep.h
index 0af2d8f2c5..9ff35f203e 100644
--- a/usr/src/uts/intel/sys/acpi/acexcep.h
+++ b/usr/src/uts/intel/sys/acpi/acexcep.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acexcep.h - Exception codes returned by the ACPI subsystem
- * $Revision: 1.77 $
+ * $Revision: 1.80 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -152,25 +152,21 @@
#define AE_STACK_OVERFLOW (ACPI_STATUS) (0x000C | AE_CODE_ENVIRONMENTAL)
#define AE_STACK_UNDERFLOW (ACPI_STATUS) (0x000D | AE_CODE_ENVIRONMENTAL)
#define AE_NOT_IMPLEMENTED (ACPI_STATUS) (0x000E | AE_CODE_ENVIRONMENTAL)
-#define AE_VERSION_MISMATCH (ACPI_STATUS) (0x000F | AE_CODE_ENVIRONMENTAL)
-#define AE_SUPPORT (ACPI_STATUS) (0x0010 | AE_CODE_ENVIRONMENTAL)
-#define AE_SHARE (ACPI_STATUS) (0x0011 | AE_CODE_ENVIRONMENTAL)
-#define AE_LIMIT (ACPI_STATUS) (0x0012 | AE_CODE_ENVIRONMENTAL)
-#define AE_TIME (ACPI_STATUS) (0x0013 | AE_CODE_ENVIRONMENTAL)
-#define AE_UNKNOWN_STATUS (ACPI_STATUS) (0x0014 | AE_CODE_ENVIRONMENTAL)
-#define AE_ACQUIRE_DEADLOCK (ACPI_STATUS) (0x0015 | AE_CODE_ENVIRONMENTAL)
-#define AE_RELEASE_DEADLOCK (ACPI_STATUS) (0x0016 | AE_CODE_ENVIRONMENTAL)
-#define AE_NOT_ACQUIRED (ACPI_STATUS) (0x0017 | AE_CODE_ENVIRONMENTAL)
-#define AE_ALREADY_ACQUIRED (ACPI_STATUS) (0x0018 | AE_CODE_ENVIRONMENTAL)
-#define AE_NO_HARDWARE_RESPONSE (ACPI_STATUS) (0x0019 | AE_CODE_ENVIRONMENTAL)
-#define AE_NO_GLOBAL_LOCK (ACPI_STATUS) (0x001A | AE_CODE_ENVIRONMENTAL)
-#define AE_LOGICAL_ADDRESS (ACPI_STATUS) (0x001B | AE_CODE_ENVIRONMENTAL)
-#define AE_ABORT_METHOD (ACPI_STATUS) (0x001C | AE_CODE_ENVIRONMENTAL)
-#define AE_SAME_HANDLER (ACPI_STATUS) (0x001D | AE_CODE_ENVIRONMENTAL)
-#define AE_WAKE_ONLY_GPE (ACPI_STATUS) (0x001E | AE_CODE_ENVIRONMENTAL)
-#define AE_OWNER_ID_LIMIT (ACPI_STATUS) (0x001F | AE_CODE_ENVIRONMENTAL)
-
-#define AE_CODE_ENV_MAX 0x001F
+#define AE_SUPPORT (ACPI_STATUS) (0x000F | AE_CODE_ENVIRONMENTAL)
+#define AE_LIMIT (ACPI_STATUS) (0x0010 | AE_CODE_ENVIRONMENTAL)
+#define AE_TIME (ACPI_STATUS) (0x0011 | AE_CODE_ENVIRONMENTAL)
+#define AE_ACQUIRE_DEADLOCK (ACPI_STATUS) (0x0012 | AE_CODE_ENVIRONMENTAL)
+#define AE_RELEASE_DEADLOCK (ACPI_STATUS) (0x0013 | AE_CODE_ENVIRONMENTAL)
+#define AE_NOT_ACQUIRED (ACPI_STATUS) (0x0014 | AE_CODE_ENVIRONMENTAL)
+#define AE_ALREADY_ACQUIRED (ACPI_STATUS) (0x0015 | AE_CODE_ENVIRONMENTAL)
+#define AE_NO_HARDWARE_RESPONSE (ACPI_STATUS) (0x0016 | AE_CODE_ENVIRONMENTAL)
+#define AE_NO_GLOBAL_LOCK (ACPI_STATUS) (0x0017 | AE_CODE_ENVIRONMENTAL)
+#define AE_ABORT_METHOD (ACPI_STATUS) (0x0018 | AE_CODE_ENVIRONMENTAL)
+#define AE_SAME_HANDLER (ACPI_STATUS) (0x0019 | AE_CODE_ENVIRONMENTAL)
+#define AE_WAKE_ONLY_GPE (ACPI_STATUS) (0x001A | AE_CODE_ENVIRONMENTAL)
+#define AE_OWNER_ID_LIMIT (ACPI_STATUS) (0x001B | AE_CODE_ENVIRONMENTAL)
+
+#define AE_CODE_ENV_MAX 0x001B
/*
@@ -180,13 +176,12 @@
#define AE_BAD_CHARACTER (ACPI_STATUS) (0x0002 | AE_CODE_PROGRAMMER)
#define AE_BAD_PATHNAME (ACPI_STATUS) (0x0003 | AE_CODE_PROGRAMMER)
#define AE_BAD_DATA (ACPI_STATUS) (0x0004 | AE_CODE_PROGRAMMER)
-#define AE_BAD_ADDRESS (ACPI_STATUS) (0x0005 | AE_CODE_PROGRAMMER)
-#define AE_ALIGNMENT (ACPI_STATUS) (0x0006 | AE_CODE_PROGRAMMER)
-#define AE_BAD_HEX_CONSTANT (ACPI_STATUS) (0x0007 | AE_CODE_PROGRAMMER)
-#define AE_BAD_OCTAL_CONSTANT (ACPI_STATUS) (0x0008 | AE_CODE_PROGRAMMER)
-#define AE_BAD_DECIMAL_CONSTANT (ACPI_STATUS) (0x0009 | AE_CODE_PROGRAMMER)
+#define AE_BAD_HEX_CONSTANT (ACPI_STATUS) (0x0005 | AE_CODE_PROGRAMMER)
+#define AE_BAD_OCTAL_CONSTANT (ACPI_STATUS) (0x0006 | AE_CODE_PROGRAMMER)
+#define AE_BAD_DECIMAL_CONSTANT (ACPI_STATUS) (0x0007 | AE_CODE_PROGRAMMER)
+#define AE_MISSING_ARGUMENTS (ACPI_STATUS) (0x0008 | AE_CODE_PROGRAMMER)
-#define AE_CODE_PGM_MAX 0x0009
+#define AE_CODE_PGM_MAX 0x0008
/*
@@ -196,52 +191,49 @@
#define AE_BAD_HEADER (ACPI_STATUS) (0x0002 | AE_CODE_ACPI_TABLES)
#define AE_BAD_CHECKSUM (ACPI_STATUS) (0x0003 | AE_CODE_ACPI_TABLES)
#define AE_BAD_VALUE (ACPI_STATUS) (0x0004 | AE_CODE_ACPI_TABLES)
-#define AE_TABLE_NOT_SUPPORTED (ACPI_STATUS) (0x0005 | AE_CODE_ACPI_TABLES)
-#define AE_INVALID_TABLE_LENGTH (ACPI_STATUS) (0x0006 | AE_CODE_ACPI_TABLES)
+#define AE_INVALID_TABLE_LENGTH (ACPI_STATUS) (0x0005 | AE_CODE_ACPI_TABLES)
-#define AE_CODE_TBL_MAX 0x0006
+#define AE_CODE_TBL_MAX 0x0005
/*
* AML exceptions. These are caused by problems with
* the actual AML byte stream
*/
-#define AE_AML_ERROR (ACPI_STATUS) (0x0001 | AE_CODE_AML)
-#define AE_AML_PARSE (ACPI_STATUS) (0x0002 | AE_CODE_AML)
-#define AE_AML_BAD_OPCODE (ACPI_STATUS) (0x0003 | AE_CODE_AML)
-#define AE_AML_NO_OPERAND (ACPI_STATUS) (0x0004 | AE_CODE_AML)
-#define AE_AML_OPERAND_TYPE (ACPI_STATUS) (0x0005 | AE_CODE_AML)
-#define AE_AML_OPERAND_VALUE (ACPI_STATUS) (0x0006 | AE_CODE_AML)
-#define AE_AML_UNINITIALIZED_LOCAL (ACPI_STATUS) (0x0007 | AE_CODE_AML)
-#define AE_AML_UNINITIALIZED_ARG (ACPI_STATUS) (0x0008 | AE_CODE_AML)
-#define AE_AML_UNINITIALIZED_ELEMENT (ACPI_STATUS) (0x0009 | AE_CODE_AML)
-#define AE_AML_NUMERIC_OVERFLOW (ACPI_STATUS) (0x000A | AE_CODE_AML)
-#define AE_AML_REGION_LIMIT (ACPI_STATUS) (0x000B | AE_CODE_AML)
-#define AE_AML_BUFFER_LIMIT (ACPI_STATUS) (0x000C | AE_CODE_AML)
-#define AE_AML_PACKAGE_LIMIT (ACPI_STATUS) (0x000D | AE_CODE_AML)
-#define AE_AML_DIVIDE_BY_ZERO (ACPI_STATUS) (0x000E | AE_CODE_AML)
-#define AE_AML_BAD_NAME (ACPI_STATUS) (0x000F | AE_CODE_AML)
-#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_AML_METHOD_LIMIT (ACPI_STATUS) (0x0015 | AE_CODE_AML)
-#define AE_AML_NOT_OWNER (ACPI_STATUS) (0x0016 | AE_CODE_AML)
-#define AE_AML_MUTEX_ORDER (ACPI_STATUS) (0x0017 | AE_CODE_AML)
-#define AE_AML_MUTEX_NOT_ACQUIRED (ACPI_STATUS) (0x0018 | AE_CODE_AML)
-#define AE_AML_INVALID_RESOURCE_TYPE (ACPI_STATUS) (0x0019 | AE_CODE_AML)
-#define AE_AML_INVALID_INDEX (ACPI_STATUS) (0x001A | AE_CODE_AML)
-#define AE_AML_REGISTER_LIMIT (ACPI_STATUS) (0x001B | AE_CODE_AML)
-#define AE_AML_NO_WHILE (ACPI_STATUS) (0x001C | AE_CODE_AML)
-#define AE_AML_ALIGNMENT (ACPI_STATUS) (0x001D | AE_CODE_AML)
-#define AE_AML_NO_RESOURCE_END_TAG (ACPI_STATUS) (0x001E | AE_CODE_AML)
-#define AE_AML_BAD_RESOURCE_VALUE (ACPI_STATUS) (0x001F | AE_CODE_AML)
-#define AE_AML_CIRCULAR_REFERENCE (ACPI_STATUS) (0x0020 | AE_CODE_AML)
-#define AE_AML_BAD_RESOURCE_LENGTH (ACPI_STATUS) (0x0021 | AE_CODE_AML)
-#define AE_AML_ILLEGAL_ADDRESS (ACPI_STATUS) (0x0022 | AE_CODE_AML)
-
-#define AE_CODE_AML_MAX 0x0022
+#define AE_AML_BAD_OPCODE (ACPI_STATUS) (0x0001 | AE_CODE_AML)
+#define AE_AML_NO_OPERAND (ACPI_STATUS) (0x0002 | AE_CODE_AML)
+#define AE_AML_OPERAND_TYPE (ACPI_STATUS) (0x0003 | AE_CODE_AML)
+#define AE_AML_OPERAND_VALUE (ACPI_STATUS) (0x0004 | AE_CODE_AML)
+#define AE_AML_UNINITIALIZED_LOCAL (ACPI_STATUS) (0x0005 | AE_CODE_AML)
+#define AE_AML_UNINITIALIZED_ARG (ACPI_STATUS) (0x0006 | AE_CODE_AML)
+#define AE_AML_UNINITIALIZED_ELEMENT (ACPI_STATUS) (0x0007 | AE_CODE_AML)
+#define AE_AML_NUMERIC_OVERFLOW (ACPI_STATUS) (0x0008 | AE_CODE_AML)
+#define AE_AML_REGION_LIMIT (ACPI_STATUS) (0x0009 | AE_CODE_AML)
+#define AE_AML_BUFFER_LIMIT (ACPI_STATUS) (0x000A | AE_CODE_AML)
+#define AE_AML_PACKAGE_LIMIT (ACPI_STATUS) (0x000B | AE_CODE_AML)
+#define AE_AML_DIVIDE_BY_ZERO (ACPI_STATUS) (0x000C | AE_CODE_AML)
+#define AE_AML_BAD_NAME (ACPI_STATUS) (0x000D | AE_CODE_AML)
+#define AE_AML_NAME_NOT_FOUND (ACPI_STATUS) (0x000E | AE_CODE_AML)
+#define AE_AML_INTERNAL (ACPI_STATUS) (0x000F | AE_CODE_AML)
+#define AE_AML_INVALID_SPACE_ID (ACPI_STATUS) (0x0010 | AE_CODE_AML)
+#define AE_AML_STRING_LIMIT (ACPI_STATUS) (0x0011 | AE_CODE_AML)
+#define AE_AML_NO_RETURN_VALUE (ACPI_STATUS) (0x0012 | AE_CODE_AML)
+#define AE_AML_METHOD_LIMIT (ACPI_STATUS) (0x0013 | AE_CODE_AML)
+#define AE_AML_NOT_OWNER (ACPI_STATUS) (0x0014 | AE_CODE_AML)
+#define AE_AML_MUTEX_ORDER (ACPI_STATUS) (0x0015 | AE_CODE_AML)
+#define AE_AML_MUTEX_NOT_ACQUIRED (ACPI_STATUS) (0x0016 | AE_CODE_AML)
+#define AE_AML_INVALID_RESOURCE_TYPE (ACPI_STATUS) (0x0017 | AE_CODE_AML)
+#define AE_AML_INVALID_INDEX (ACPI_STATUS) (0x0018 | AE_CODE_AML)
+#define AE_AML_REGISTER_LIMIT (ACPI_STATUS) (0x0019 | AE_CODE_AML)
+#define AE_AML_NO_WHILE (ACPI_STATUS) (0x001A | AE_CODE_AML)
+#define AE_AML_ALIGNMENT (ACPI_STATUS) (0x001B | AE_CODE_AML)
+#define AE_AML_NO_RESOURCE_END_TAG (ACPI_STATUS) (0x001C | AE_CODE_AML)
+#define AE_AML_BAD_RESOURCE_VALUE (ACPI_STATUS) (0x001D | AE_CODE_AML)
+#define AE_AML_CIRCULAR_REFERENCE (ACPI_STATUS) (0x001E | AE_CODE_AML)
+#define AE_AML_BAD_RESOURCE_LENGTH (ACPI_STATUS) (0x001F | AE_CODE_AML)
+#define AE_AML_ILLEGAL_ADDRESS (ACPI_STATUS) (0x0020 | AE_CODE_AML)
+
+#define AE_CODE_AML_MAX 0x0020
/*
@@ -258,8 +250,10 @@
#define AE_CTRL_BREAK (ACPI_STATUS) (0x0009 | AE_CODE_CONTROL)
#define AE_CTRL_CONTINUE (ACPI_STATUS) (0x000A | AE_CODE_CONTROL)
#define AE_CTRL_SKIP (ACPI_STATUS) (0x000B | AE_CODE_CONTROL)
+#define AE_CTRL_PARSE_CONTINUE (ACPI_STATUS) (0x000C | AE_CODE_CONTROL)
+#define AE_CTRL_PARSE_PENDING (ACPI_STATUS) (0x000D | AE_CODE_CONTROL)
-#define AE_CODE_CTRL_MAX 0x000B
+#define AE_CODE_CTRL_MAX 0x000D
#ifdef DEFINE_ACPI_GLOBALS
@@ -286,19 +280,15 @@ char const *AcpiGbl_ExceptionNames_Env[] =
"AE_STACK_OVERFLOW",
"AE_STACK_UNDERFLOW",
"AE_NOT_IMPLEMENTED",
- "AE_VERSION_MISMATCH",
"AE_SUPPORT",
- "AE_SHARE",
"AE_LIMIT",
"AE_TIME",
- "AE_UNKNOWN_STATUS",
"AE_ACQUIRE_DEADLOCK",
"AE_RELEASE_DEADLOCK",
"AE_NOT_ACQUIRED",
"AE_ALREADY_ACQUIRED",
"AE_NO_HARDWARE_RESPONSE",
"AE_NO_GLOBAL_LOCK",
- "AE_LOGICAL_ADDRESS",
"AE_ABORT_METHOD",
"AE_SAME_HANDLER",
"AE_WAKE_ONLY_GPE",
@@ -307,31 +297,30 @@ char const *AcpiGbl_ExceptionNames_Env[] =
char const *AcpiGbl_ExceptionNames_Pgm[] =
{
+ NULL,
"AE_BAD_PARAMETER",
"AE_BAD_CHARACTER",
"AE_BAD_PATHNAME",
"AE_BAD_DATA",
- "AE_BAD_ADDRESS",
- "AE_ALIGNMENT",
"AE_BAD_HEX_CONSTANT",
"AE_BAD_OCTAL_CONSTANT",
- "AE_BAD_DECIMAL_CONSTANT"
+ "AE_BAD_DECIMAL_CONSTANT",
+ "AE_MISSING_ARGUMENTS"
};
char const *AcpiGbl_ExceptionNames_Tbl[] =
{
+ NULL,
"AE_BAD_SIGNATURE",
"AE_BAD_HEADER",
"AE_BAD_CHECKSUM",
"AE_BAD_VALUE",
- "AE_TABLE_NOT_SUPPORTED",
"AE_INVALID_TABLE_LENGTH"
};
char const *AcpiGbl_ExceptionNames_Aml[] =
{
- "AE_AML_ERROR",
- "AE_AML_PARSE",
+ NULL,
"AE_AML_BAD_OPCODE",
"AE_AML_NO_OPERAND",
"AE_AML_OPERAND_TYPE",
@@ -363,11 +352,12 @@ char const *AcpiGbl_ExceptionNames_Aml[] =
"AE_AML_BAD_RESOURCE_VALUE",
"AE_AML_CIRCULAR_REFERENCE",
"AE_AML_BAD_RESOURCE_LENGTH",
- "AE_AML_ILLEGAL_ADDRESS"
+ "AE_AML_ILLEGAL_ADDRESS",
};
char const *AcpiGbl_ExceptionNames_Ctrl[] =
{
+ NULL,
"AE_CTRL_RETURN_VALUE",
"AE_CTRL_PENDING",
"AE_CTRL_TERMINATE",
@@ -378,7 +368,9 @@ char const *AcpiGbl_ExceptionNames_Ctrl[] =
"AE_CTRL_TRANSFER",
"AE_CTRL_BREAK",
"AE_CTRL_CONTINUE",
- "AE_CTRL_SKIP"
+ "AE_CTRL_SKIP",
+ "AE_CTRL_PARSE_CONTINUE",
+ "AE_CTRL_PARSE_PENDING"
};
#endif /* ACPI GLOBALS */
diff --git a/usr/src/uts/intel/sys/acpi/acglobal.h b/usr/src/uts/intel/sys/acpi/acglobal.h
index e5f24a2a5c..9a0834ac13 100644
--- a/usr/src/uts/intel/sys/acpi/acglobal.h
+++ b/usr/src/uts/intel/sys/acpi/acglobal.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acglobal.h - Declarations for global variables
- * $Revision: 1.185 $
+ * $Revision: 1.199 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -132,37 +132,6 @@
#define ACPI_INIT_GLOBAL(a,b) a
#endif
-/*
- * Keep local copies of these FADT-based registers. NOTE: These globals
- * are first in this file for alignment reasons on 64-bit systems.
- */
-ACPI_EXTERN ACPI_GENERIC_ADDRESS AcpiGbl_XPm1aEnable;
-ACPI_EXTERN ACPI_GENERIC_ADDRESS AcpiGbl_XPm1bEnable;
-
-
-/*****************************************************************************
- *
- * Debug support
- *
- ****************************************************************************/
-
-/* Runtime configuration of debug print levels */
-
-extern UINT32 AcpiDbgLevel;
-extern UINT32 AcpiDbgLayer;
-
-/* Procedure nesting level for debug output */
-
-extern UINT32 AcpiGbl_NestingLevel;
-
-/* Support for dynamic control method tracing mechanism */
-
-ACPI_EXTERN UINT32 AcpiGbl_OriginalDbgLevel;
-ACPI_EXTERN UINT32 AcpiGbl_OriginalDbgLayer;
-ACPI_EXTERN ACPI_NAME AcpiGbl_TraceMethodName;
-ACPI_EXTERN UINT32 AcpiGbl_TraceDbgLevel;
-ACPI_EXTERN UINT32 AcpiGbl_TraceDbgLayer;
-ACPI_EXTERN UINT32 AcpiGbl_TraceFlags;
/*****************************************************************************
*
@@ -216,49 +185,28 @@ ACPI_EXTERN UINT8 ACPI_INIT_GLOBAL (AcpiGbl_LeaveWakeGpesDisabled, TRUE);
****************************************************************************/
/*
- * Table pointers.
- * Although these pointers are somewhat redundant with the global AcpiTable,
- * they are convenient because they are typed pointers.
+ * AcpiGbl_RootTableList is the master list of ACPI tables found in the
+ * RSDT/XSDT.
*
- * These tables are single-table only; meaning that there can be at most one
- * of each in the system. Each global points to the actual table.
- */
-ACPI_EXTERN UINT32 AcpiGbl_TableFlags;
-ACPI_EXTERN UINT32 AcpiGbl_RsdtTableCount;
-ACPI_EXTERN RSDP_DESCRIPTOR *AcpiGbl_RSDP;
-ACPI_EXTERN XSDT_DESCRIPTOR *AcpiGbl_XSDT;
-ACPI_EXTERN FADT_DESCRIPTOR *AcpiGbl_FADT;
-ACPI_EXTERN ACPI_TABLE_HEADER *AcpiGbl_DSDT;
-ACPI_EXTERN FACS_DESCRIPTOR *AcpiGbl_FACS;
-ACPI_EXTERN ACPI_COMMON_FACS AcpiGbl_CommonFACS;
-/*
- * Since there may be multiple SSDTs and PSDTs, a single pointer is not
- * sufficient; Therefore, there isn't one!
+ * AcpiGbl_FADT is a local copy of the FADT, converted to a common format.
*/
+ACPI_EXTERN ACPI_INTERNAL_RSDT AcpiGbl_RootTableList;
+ACPI_EXTERN ACPI_TABLE_FADT AcpiGbl_FADT;
+/* These addresses are calculated from FADT address values */
-/* The root table can be either an RSDT or an XSDT */
-
-ACPI_EXTERN UINT8 AcpiGbl_RootTableType;
-#define ACPI_TABLE_TYPE_RSDT 'R'
-#define ACPI_TABLE_TYPE_XSDT 'X'
-
+ACPI_EXTERN ACPI_GENERIC_ADDRESS AcpiGbl_XPm1aEnable;
+ACPI_EXTERN ACPI_GENERIC_ADDRESS AcpiGbl_XPm1bEnable;
/*
- * Handle both ACPI 1.0 and ACPI 2.0 Integer widths:
- * If we are executing a method that exists in a 32-bit ACPI table,
- * use only the lower 32 bits of the (internal) 64-bit Integer.
+ * Handle both ACPI 1.0 and ACPI 2.0 Integer widths. The integer width is
+ * determined by the revision of the DSDT: If the DSDT revision is less than
+ * 2, use only the lower 32 bits of the internal 64-bit Integer.
*/
ACPI_EXTERN UINT8 AcpiGbl_IntegerBitWidth;
ACPI_EXTERN UINT8 AcpiGbl_IntegerByteWidth;
ACPI_EXTERN UINT8 AcpiGbl_IntegerNybbleWidth;
-/*
- * ACPI Table info arrays
- */
-extern ACPI_TABLE_LIST AcpiGbl_TableLists[ACPI_TABLE_ID_MAX+1];
-extern ACPI_TABLE_SUPPORT AcpiGbl_TableData[ACPI_TABLE_ID_MAX+1];
-
/*****************************************************************************
*
@@ -267,17 +215,21 @@ extern ACPI_TABLE_SUPPORT AcpiGbl_TableData[ACPI_TABLE_ID_MAX+1];
****************************************************************************/
/*
- * Predefined mutex objects. This array contains the
+ * Predefined mutex objects. This array contains the
* actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs.
* (The table maps local handles to the real OS handles)
*/
ACPI_EXTERN ACPI_MUTEX_INFO AcpiGbl_MutexInfo[ACPI_NUM_MUTEX];
/*
- * Global lock semaphore works in conjunction with the actual HW global lock
+ * Global lock mutex is an actual AML mutex object
+ * Global lock semaphore works in conjunction with the HW global lock
*/
-ACPI_EXTERN ACPI_MUTEX AcpiGbl_GlobalLockMutex;
+ACPI_EXTERN ACPI_OPERAND_OBJECT *AcpiGbl_GlobalLockMutex;
ACPI_EXTERN ACPI_SEMAPHORE AcpiGbl_GlobalLockSemaphore;
+ACPI_EXTERN UINT16 AcpiGbl_GlobalLockHandle;
+ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockAcquired;
+ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockPresent;
/*
* Spinlocks are used for interfaces that can be possibly called at
@@ -293,14 +245,6 @@ ACPI_EXTERN ACPI_SPINLOCK AcpiGbl_HardwareLock; /* For ACPI H/W ex
*
****************************************************************************/
-#ifdef ACPI_DBG_TRACK_ALLOCATIONS
-
-/* Lists for tracking memory allocations */
-
-ACPI_EXTERN ACPI_MEMORY_LIST *AcpiGbl_GlobalList;
-ACPI_EXTERN ACPI_MEMORY_LIST *AcpiGbl_NsNodeList;
-#endif
-
/* Object caches */
ACPI_EXTERN ACPI_CACHE_T *AcpiGbl_NamespaceCache;
@@ -315,34 +259,60 @@ ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER AcpiGbl_DeviceNotify;
ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER AcpiGbl_SystemNotify;
ACPI_EXTERN ACPI_EXCEPTION_HANDLER AcpiGbl_ExceptionHandler;
ACPI_EXTERN ACPI_INIT_HANDLER AcpiGbl_InitHandler;
+ACPI_EXTERN ACPI_TABLE_HANDLER AcpiGbl_TableHandler;
+ACPI_EXTERN void *AcpiGbl_TableHandlerContext;
ACPI_EXTERN ACPI_WALK_STATE *AcpiGbl_BreakpointWalk;
+
+/* Owner ID support */
+
+ACPI_EXTERN UINT32 AcpiGbl_OwnerIdMask[ACPI_NUM_OWNERID_MASKS];
+ACPI_EXTERN UINT8 AcpiGbl_LastOwnerIdIndex;
+ACPI_EXTERN UINT8 AcpiGbl_NextOwnerIdOffset;
+
/* Misc */
ACPI_EXTERN UINT32 AcpiGbl_OriginalMode;
ACPI_EXTERN UINT32 AcpiGbl_RsdpOriginalLocation;
ACPI_EXTERN UINT32 AcpiGbl_NsLookupCount;
ACPI_EXTERN UINT32 AcpiGbl_PsFindCount;
-ACPI_EXTERN UINT32 AcpiGbl_OwnerIdMask[ACPI_NUM_OWNERID_MASKS];
ACPI_EXTERN UINT16 AcpiGbl_Pm1EnableRegisterSave;
-ACPI_EXTERN UINT16 AcpiGbl_GlobalLockHandle;
-ACPI_EXTERN UINT8 AcpiGbl_LastOwnerIdIndex;
-ACPI_EXTERN UINT8 AcpiGbl_NextOwnerIdOffset;
ACPI_EXTERN UINT8 AcpiGbl_DebuggerConfiguration;
-ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockAcquired;
ACPI_EXTERN BOOLEAN AcpiGbl_StepToNextCall;
ACPI_EXTERN BOOLEAN AcpiGbl_AcpiHardwarePresent;
-ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockPresent;
ACPI_EXTERN BOOLEAN AcpiGbl_EventsInitialized;
ACPI_EXTERN BOOLEAN AcpiGbl_SystemAwakeAndRunning;
+
+#ifndef DEFINE_ACPI_GLOBALS
+
+/* Exception codes */
+
+extern char const *AcpiGbl_ExceptionNames_Env[];
+extern char const *AcpiGbl_ExceptionNames_Pgm[];
+extern char const *AcpiGbl_ExceptionNames_Tbl[];
+extern char const *AcpiGbl_ExceptionNames_Aml[];
+extern char const *AcpiGbl_ExceptionNames_Ctrl[];
+
+/* Other miscellaneous */
+
extern BOOLEAN AcpiGbl_Shutdown;
extern UINT32 AcpiGbl_StartupFlags;
-extern const UINT8 AcpiGbl_DecodeTo8bit[8];
extern const char *AcpiGbl_SleepStateNames[ACPI_S_STATE_COUNT];
extern const char *AcpiGbl_HighestDstateNames[4];
extern const ACPI_OPCODE_INFO AcpiGbl_AmlOpInfo[AML_NUM_OPCODES];
extern const char *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS];
+#endif
+
+
+#ifdef ACPI_DBG_TRACK_ALLOCATIONS
+
+/* Lists for tracking memory allocations */
+
+ACPI_EXTERN ACPI_MEMORY_LIST *AcpiGbl_GlobalList;
+ACPI_EXTERN ACPI_MEMORY_LIST *AcpiGbl_NsNodeList;
+ACPI_EXTERN BOOLEAN AcpiGbl_DisplayFinalMemStats;
+#endif
/*****************************************************************************
@@ -351,8 +321,6 @@ extern const char *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_
*
****************************************************************************/
-#define NUM_NS_TYPES ACPI_TYPE_INVALID+1
-
#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
#define NUM_PREDEFINED_NAMES 10
#else
@@ -363,15 +331,15 @@ ACPI_EXTERN ACPI_NAMESPACE_NODE AcpiGbl_RootNodeStruct;
ACPI_EXTERN ACPI_NAMESPACE_NODE *AcpiGbl_RootNode;
ACPI_EXTERN ACPI_NAMESPACE_NODE *AcpiGbl_FadtGpeDevice;
-extern const UINT8 AcpiGbl_NsProperties[NUM_NS_TYPES];
+extern const UINT8 AcpiGbl_NsProperties [ACPI_NUM_NS_TYPES];
extern const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames [NUM_PREDEFINED_NAMES];
#ifdef ACPI_DEBUG_OUTPUT
ACPI_EXTERN UINT32 AcpiGbl_CurrentNodeCount;
ACPI_EXTERN UINT32 AcpiGbl_CurrentNodeSize;
ACPI_EXTERN UINT32 AcpiGbl_MaxConcurrentNodeCount;
-ACPI_EXTERN ACPI_SIZE AcpiGbl_EntryStackPointer;
-ACPI_EXTERN ACPI_SIZE AcpiGbl_LowestStackPointer;
+ACPI_EXTERN ACPI_SIZE *AcpiGbl_EntryStackPointer;
+ACPI_EXTERN ACPI_SIZE *AcpiGbl_LowestStackPointer;
ACPI_EXTERN UINT32 AcpiGbl_DeepestNesting;
#endif
@@ -415,6 +383,38 @@ ACPI_EXTERN ACPI_GPE_BLOCK_INFO *AcpiGbl_GpeFadtBlocks[ACPI_MAX_GPE_BLOCK
/*****************************************************************************
*
+ * Debug support
+ *
+ ****************************************************************************/
+
+/* Runtime configuration of debug print levels */
+
+extern UINT32 AcpiDbgLevel;
+extern UINT32 AcpiDbgLayer;
+
+/* Procedure nesting level for debug output */
+
+extern UINT32 AcpiGbl_NestingLevel;
+
+/* Event counters */
+
+ACPI_EXTERN UINT32 AcpiMethodCount;
+ACPI_EXTERN UINT32 AcpiGpeCount;
+ACPI_EXTERN UINT32 AcpiSciCount;
+ACPI_EXTERN UINT32 AcpiFixedEventCount[ACPI_NUM_FIXED_EVENTS];
+
+/* Support for dynamic control method tracing mechanism */
+
+ACPI_EXTERN UINT32 AcpiGbl_OriginalDbgLevel;
+ACPI_EXTERN UINT32 AcpiGbl_OriginalDbgLayer;
+ACPI_EXTERN ACPI_NAME AcpiGbl_TraceMethodName;
+ACPI_EXTERN UINT32 AcpiGbl_TraceDbgLevel;
+ACPI_EXTERN UINT32 AcpiGbl_TraceDbgLayer;
+ACPI_EXTERN UINT32 AcpiGbl_TraceFlags;
+
+
+/*****************************************************************************
+ *
* Debugger globals
*
****************************************************************************/
@@ -440,7 +440,7 @@ ACPI_EXTERN char *optarg;
ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_tables;
ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_stats;
ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_ini_methods;
-
+ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_NoRegionSupport;
ACPI_EXTERN char *AcpiGbl_DbArgs[ACPI_DEBUGGER_MAX_ARGS];
ACPI_EXTERN char AcpiGbl_DbLineBuf[80];
diff --git a/usr/src/uts/intel/sys/acpi/achware.h b/usr/src/uts/intel/sys/acpi/achware.h
index 1a043c2fd1..d7af631600 100644
--- a/usr/src/uts/intel/sys/acpi/achware.h
+++ b/usr/src/uts/intel/sys/acpi/achware.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: achware.h -- hardware specific interfaces
- * $Revision: 1.80 $
+ * $Revision: 1.84 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -138,10 +138,6 @@
* hwacpi - high level functions
*/
ACPI_STATUS
-AcpiHwInitialize (
- void);
-
-ACPI_STATUS
AcpiHwSetMode (
UINT32 Mode);
@@ -159,13 +155,11 @@ AcpiHwGetBitRegisterInfo (
ACPI_STATUS
AcpiHwRegisterRead (
- BOOLEAN UseLock,
UINT32 RegisterId,
UINT32 *ReturnValue);
ACPI_STATUS
AcpiHwRegisterWrite (
- BOOLEAN UseLock,
UINT32 RegisterId,
UINT32 Value);
@@ -183,13 +177,17 @@ AcpiHwLowLevelWrite (
ACPI_STATUS
AcpiHwClearAcpiStatus (
- UINT32 Flags);
+ void);
/*
* hwgpe - GPE support
*/
ACPI_STATUS
+AcpiHwLowDisableGpe (
+ ACPI_GPE_EVENT_INFO *GpeEventInfo);
+
+ACPI_STATUS
AcpiHwWriteGpeEnableReg (
ACPI_GPE_EVENT_INFO *GpeEventInfo);
diff --git a/usr/src/uts/intel/sys/acpi/acinterp.h b/usr/src/uts/intel/sys/acpi/acinterp.h
index f4b80b493e..268a9edada 100644
--- a/usr/src/uts/intel/sys/acpi/acinterp.h
+++ b/usr/src/uts/intel/sys/acpi/acinterp.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acinterp.h - Interpreter subcomponent prototypes and defines
- * $Revision: 1.167 $
+ * $Revision: 1.173 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -334,10 +334,6 @@ AcpiExCreateRegion (
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
-AcpiExCreateTableRegion (
- ACPI_WALK_STATE *WalkState);
-
-ACPI_STATUS
AcpiExCreateEvent (
ACPI_WALK_STATE *WalkState);
@@ -381,10 +377,20 @@ AcpiExAcquireMutex (
ACPI_WALK_STATE *WalkState);
ACPI_STATUS
+AcpiExAcquireMutexObject (
+ UINT16 Timeout,
+ ACPI_OPERAND_OBJECT *ObjDesc,
+ ACPI_THREAD_ID ThreadId);
+
+ACPI_STATUS
AcpiExReleaseMutex (
ACPI_OPERAND_OBJECT *ObjDesc,
ACPI_WALK_STATE *WalkState);
+ACPI_STATUS
+AcpiExReleaseMutexObject (
+ ACPI_OPERAND_OBJECT *ObjDesc);
+
void
AcpiExReleaseAllMutexes (
ACPI_THREAD_STATE *Thread);
@@ -558,12 +564,8 @@ AcpiExDumpOperand (
void
AcpiExDumpOperands (
ACPI_OPERAND_OBJECT **Operands,
- ACPI_INTERPRETER_MODE InterpreterMode,
- char *Ident,
- UINT32 NumLevels,
- char *Note,
- char *ModuleName,
- UINT32 LineNumber);
+ const char *OpcodeName,
+ UINT32 NumOpcodes);
void
AcpiExDumpObjectDescriptor (
@@ -665,7 +667,7 @@ AcpiExCopyIntegerToBufferField (
/*
* exutils - interpreter/scanner utilities
*/
-ACPI_STATUS
+void
AcpiExEnterInterpreter (
void);
@@ -674,16 +676,24 @@ AcpiExExitInterpreter (
void);
void
+AcpiExReacquireInterpreter (
+ void);
+
+void
+AcpiExRelinquishInterpreter (
+ void);
+
+void
AcpiExTruncateFor32bitTable (
ACPI_OPERAND_OBJECT *ObjDesc);
-BOOLEAN
+void
AcpiExAcquireGlobalLock (
UINT32 Rule);
void
AcpiExReleaseGlobalLock (
- BOOLEAN Locked);
+ UINT32 Rule);
void
AcpiExEisaIdToString (
@@ -695,10 +705,6 @@ AcpiExUnsignedIntegerToString (
ACPI_INTEGER Value,
char *OutString);
-ACPI_INTEGER
-AcpiExStringToUnsignedInteger (
- char *String);
-
/*
* exregion - default OpRegion handlers
diff --git a/usr/src/uts/intel/sys/acpi/aclocal.h b/usr/src/uts/intel/sys/acpi/aclocal.h
index 1ba3e90b20..95815e6715 100644
--- a/usr/src/uts/intel/sys/acpi/aclocal.h
+++ b/usr/src/uts/intel/sys/acpi/aclocal.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: aclocal.h - Internal data types used across the ACPI subsystem
- * $Revision: 1.237 $
+ * $Revision: 1.250 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -124,6 +124,7 @@
#define ACPI_SERIALIZED 0xFF
typedef UINT32 ACPI_MUTEX_HANDLE;
+#define ACPI_GLOBAL_LOCK (ACPI_SEMAPHORE) (-1)
/* Total number of aml opcodes defined */
@@ -155,8 +156,8 @@ union acpi_parse_object;
* table below also!
*/
#define ACPI_MTX_INTERPRETER 0 /* AML Interpreter, main lock */
-#define ACPI_MTX_TABLES 1 /* Data for ACPI tables */
-#define ACPI_MTX_NAMESPACE 2 /* ACPI Namespace */
+#define ACPI_MTX_NAMESPACE 1 /* ACPI Namespace */
+#define ACPI_MTX_TABLES 2 /* Data for ACPI tables */
#define ACPI_MTX_EVENTS 3 /* Data for ACPI events */
#define ACPI_MTX_CACHES 4 /* Internal caches, general purposes */
#define ACPI_MTX_MEMORY 5 /* Debug memory tracking lists */
@@ -174,8 +175,8 @@ union acpi_parse_object;
static char *AcpiGbl_MutexNames[ACPI_NUM_MUTEX] =
{
"ACPI_MTX_Interpreter",
- "ACPI_MTX_Tables",
"ACPI_MTX_Namespace",
+ "ACPI_MTX_Tables",
"ACPI_MTX_Events",
"ACPI_MTX_Caches",
"ACPI_MTX_Memory",
@@ -247,7 +248,7 @@ typedef enum
{
ACPI_IMODE_LOAD_PASS1 = 0x01,
ACPI_IMODE_LOAD_PASS2 = 0x02,
- ACPI_IMODE_EXECUTE = 0x0E
+ ACPI_IMODE_EXECUTE = 0x03
} ACPI_INTERPRETER_MODE;
@@ -296,7 +297,7 @@ typedef struct acpi_namespace_node
/* Namespace Node flags */
#define ANOBJ_END_OF_PEER_LIST 0x01 /* End-of-list, Peer field points to parent */
-#define ANOBJ_RESERVED 0x02 /* Available for future use */
+#define ANOBJ_TEMPORARY 0x02 /* Node is create by a method and is temporary */
#define ANOBJ_METHOD_ARG 0x04 /* Node is a method argument */
#define ANOBJ_METHOD_LOCAL 0x08 /* Node is a method local */
#define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */
@@ -312,27 +313,45 @@ typedef struct acpi_namespace_node
*/
typedef struct acpi_table_desc
{
- struct acpi_table_desc *Prev;
- struct acpi_table_desc *Next;
- struct acpi_table_desc *InstalledDesc;
+ ACPI_PHYSICAL_ADDRESS Address;
ACPI_TABLE_HEADER *Pointer;
- UINT8 *AmlStart;
- UINT64 PhysicalAddress;
- ACPI_SIZE Length;
- UINT32 AmlLength;
+ UINT32 Length; /* Length fixed at 32 bits */
+ ACPI_NAME_UNION Signature;
ACPI_OWNER_ID OwnerId;
- UINT8 Type;
- UINT8 Allocation;
- BOOLEAN LoadedIntoNamespace;
+ UINT8 Flags;
} ACPI_TABLE_DESC;
-typedef struct acpi_table_list
+/* Flags for above */
+
+#define ACPI_TABLE_ORIGIN_UNKNOWN (0)
+#define ACPI_TABLE_ORIGIN_MAPPED (1)
+#define ACPI_TABLE_ORIGIN_ALLOCATED (2)
+#define ACPI_TABLE_ORIGIN_MASK (3)
+#define ACPI_TABLE_IS_LOADED (4)
+
+/* One internal RSDT for table management */
+
+typedef struct acpi_internal_rsdt
{
- struct acpi_table_desc *Next;
+ ACPI_TABLE_DESC *Tables;
UINT32 Count;
+ UINT32 Size;
+ UINT8 Flags;
+
+} ACPI_INTERNAL_RSDT;
+
+/* Flags for above */
+
+#define ACPI_ROOT_ORIGIN_UNKNOWN (0) /* ~ORIGIN_ALLOCATED */
+#define ACPI_ROOT_ORIGIN_ALLOCATED (1)
+#define ACPI_ROOT_ALLOW_RESIZE (2)
-} ACPI_TABLE_LIST;
+
+/* Predefined (fixed) table indexes */
+
+#define ACPI_TABLE_INDEX_DSDT (0)
+#define ACPI_TABLE_INDEX_FACS (1)
typedef struct acpi_find_context
@@ -373,8 +392,8 @@ typedef struct acpi_predefined_names
typedef struct acpi_namestring_info
{
- char *ExternalName;
- char *NextExternalChar;
+ const char *ExternalName;
+ const char *NextExternalChar;
char *InternalName;
UINT32 Length;
UINT32 NumSegments;
@@ -471,7 +490,7 @@ typedef struct acpi_gpe_event_info
union acpi_gpe_dispatch_info Dispatch; /* Either Method or Handler */
struct acpi_gpe_register_info *RegisterInfo; /* Backpointer to register info */
UINT8 Flags; /* Misc info about this GPE */
- UINT8 RegisterBit; /* This GPE bit within the register */
+ UINT8 GpeNumber; /* This GPE */
} ACPI_GPE_EVENT_INFO;
@@ -674,9 +693,7 @@ typedef struct acpi_thread_state
typedef struct acpi_result_values
{
ACPI_STATE_COMMON
- UINT8 NumResults;
- UINT8 LastInsert;
- union acpi_operand_object *ObjDesc [ACPI_OBJ_NUM_OPERANDS];
+ union acpi_operand_object *ObjDesc [ACPI_RESULTS_FRAME_OBJ_NUM];
} ACPI_RESULT_VALUES;
@@ -776,6 +793,7 @@ typedef union acpi_parse_value
union acpi_parse_object *Next; /* Next op */\
ACPI_NAMESPACE_NODE *Node; /* For use by interpreter */\
ACPI_PARSE_VALUE Value; /* Value or args associated with the opcode */\
+ UINT8 ArgListLength; /* Number of elements in the arg list */\
ACPI_DISASM_ONLY_MEMBERS (\
UINT8 DisasmFlags; /* Used during AML disassembly */\
UINT8 DisasmOpcode; /* Subtype used for disassembly */\
@@ -885,6 +903,8 @@ typedef struct acpi_parse_state
#define ACPI_PARSEOP_NAMED 0x02
#define ACPI_PARSEOP_DEFERRED 0x04
#define ACPI_PARSEOP_BYTELIST 0x08
+#define ACPI_PARSEOP_IN_STACK 0x10
+#define ACPI_PARSEOP_TARGET 0x20
#define ACPI_PARSEOP_IN_CACHE 0x80
/* Parse object DisasmFlags */
@@ -1073,12 +1093,30 @@ typedef struct acpi_bit_register_info
typedef struct acpi_db_method_info
{
- ACPI_HANDLE ThreadGate;
+ ACPI_HANDLE MainThreadGate;
+ ACPI_HANDLE ThreadCompleteGate;
+ UINT32 *Threads;
+ UINT32 NumThreads;
+ UINT32 NumCreated;
+ UINT32 NumCompleted;
+
char *Name;
- char **Args;
UINT32 Flags;
UINT32 NumLoops;
char Pathname[128];
+ char **Args;
+
+ /*
+ * Arguments to be passed to method for the command
+ * Threads -
+ * the Number of threads, ID of current thread and
+ * Index of current thread inside all them created.
+ */
+ char InitArgs;
+ char *Arguments[4];
+ char NumThreadsStr[11];
+ char IdOfThreadStr[11];
+ char IndexOfThreadStr[11];
} ACPI_DB_METHOD_INFO;
@@ -1151,6 +1189,8 @@ typedef struct acpi_memory_list
UINT32 TotalAllocated;
UINT32 TotalFreed;
+ UINT32 MaxOccupied;
+ UINT32 TotalSize;
UINT32 CurrentTotalSize;
UINT32 Requests;
UINT32 Hits;
diff --git a/usr/src/uts/intel/sys/acpi/acmacros.h b/usr/src/uts/intel/sys/acpi/acmacros.h
index 16ef74b92d..db6dfe10b1 100644
--- a/usr/src/uts/intel/sys/acpi/acmacros.h
+++ b/usr/src/uts/intel/sys/acpi/acmacros.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acmacros.h - C macros for the entire subsystem.
- * $Revision: 1.191 $
+ * $Revision: 1.199 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -129,61 +129,15 @@
#define ACPI_SET_BIT(target,bit) ((target) |= (bit))
#define ACPI_CLEAR_BIT(target,bit) ((target) &= ~(bit))
#define ACPI_MIN(a,b) (((a)<(b))?(a):(b))
+#define ACPI_MAX(a,b) (((a)>(b))?(a):(b))
/* Size calculation */
#define ACPI_ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0]))
-#if ACPI_MACHINE_WIDTH == 16
-
-/*
- * For 16-bit addresses, we have to assume that the upper 32 bits
- * (out of 64) are zero.
- */
-#define ACPI_LODWORD(l) ((UINT32)(l))
-#define ACPI_HIDWORD(l) ((UINT32)(0))
-
-#define ACPI_GET_ADDRESS(a) ((a).Lo)
-#define ACPI_STORE_ADDRESS(a,b) {(a).Hi=0;(a).Lo=(UINT32)(b);}
-#define ACPI_VALID_ADDRESS(a) ((a).Hi | (a).Lo)
-
-#else
-#ifdef ACPI_NO_INTEGER64_SUPPORT
/*
- * ACPI_INTEGER is 32-bits, no 64-bit support on this platform
- */
-#define ACPI_LODWORD(l) ((UINT32)(l))
-#define ACPI_HIDWORD(l) ((UINT32)(0))
-
-#define ACPI_GET_ADDRESS(a) (a)
-#define ACPI_STORE_ADDRESS(a,b) ((a)=(b))
-#define ACPI_VALID_ADDRESS(a) (a)
-
-#else
-
-/*
- * Full 64-bit address/integer on both 32-bit and 64-bit platforms
- */
-#define ACPI_LODWORD(l) ((UINT32)(UINT64)(l))
-#define ACPI_HIDWORD(l) ((UINT32)(((*(UINT64_STRUCT *)(void *)(&l))).Hi))
-
-#define ACPI_GET_ADDRESS(a) (a)
-#define ACPI_STORE_ADDRESS(a,b) ((a)=(ACPI_PHYSICAL_ADDRESS)(b))
-#define ACPI_VALID_ADDRESS(a) (a)
-#endif
-#endif
-
-/*
- * printf() format helpers
- */
-
-/* Split 64-bit integer into two 32-bit values. Use with %8.8X%8.8X */
-
-#define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i),ACPI_LODWORD(i)
-
-/*
- * Extract data using a pointer. Any more than a byte and we
+ * Extract data using a pointer. Any more than a byte and we
* get into potential aligment issues -- see the STORE macros below.
* Use with care.
*/
@@ -201,31 +155,52 @@
*/
#define ACPI_CAST_PTR(t, p) ((t *) (ACPI_UINTPTR_T) (p))
#define ACPI_CAST_INDIRECT_PTR(t, p) ((t **) (ACPI_UINTPTR_T) (p))
-#define ACPI_ADD_PTR(t,a,b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (UINT8,(a)) + (ACPI_NATIVE_UINT)(b)))
-#define ACPI_PTR_DIFF(a,b) (ACPI_NATIVE_UINT) (ACPI_CAST_PTR (UINT8,(a)) - ACPI_CAST_PTR (UINT8,(b)))
+#define ACPI_ADD_PTR(t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (UINT8, (a)) + (ACPI_SIZE)(b)))
+#define ACPI_PTR_DIFF(a, b) (ACPI_SIZE) (ACPI_CAST_PTR (UINT8, (a)) - ACPI_CAST_PTR (UINT8, (b)))
/* Pointer/Integer type conversions */
-#define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void,(void *) NULL,(ACPI_NATIVE_UINT) i)
-#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL)
-#define ACPI_OFFSET(d,f) (ACPI_SIZE) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL)
-
-#if ACPI_MACHINE_WIDTH == 16
-#define ACPI_STORE_POINTER(d,s) ACPI_MOVE_32_TO_32(d,s)
-#define ACPI_PHYSADDR_TO_PTR(i) (void *)(i)
-#define ACPI_PTR_TO_PHYSADDR(i) (UINT32) ACPI_CAST_PTR (UINT8,(i))
-#else
+#define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void, (void *) NULL,(ACPI_SIZE) i)
+#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p, (void *) NULL)
+#define ACPI_OFFSET(d, f) (ACPI_SIZE) ACPI_PTR_DIFF (&(((d *)0)->f), (void *) NULL)
#define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i)
#define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i)
-#endif
#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
-#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (UINT32,(a)) == *ACPI_CAST_PTR (UINT32,(b)))
+#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (UINT32, (a)) == *ACPI_CAST_PTR (UINT32, (b)))
#else
-#define ACPI_COMPARE_NAME(a,b) (!ACPI_STRNCMP (ACPI_CAST_PTR (char,(a)), ACPI_CAST_PTR (char,(b)), ACPI_NAME_SIZE))
+#define ACPI_COMPARE_NAME(a,b) (!ACPI_STRNCMP (ACPI_CAST_PTR (char, (a)), ACPI_CAST_PTR (char, (b)), ACPI_NAME_SIZE))
#endif
/*
+ * Full 64-bit integer must be available on both 32-bit and 64-bit platforms
+ */
+typedef struct acpi_integer_overlay
+{
+ UINT32 LoDword;
+ UINT32 HiDword;
+
+} ACPI_INTEGER_OVERLAY;
+
+#define ACPI_LODWORD(Integer) (ACPI_CAST_PTR (ACPI_INTEGER_OVERLAY, &Integer)->LoDword)
+#define ACPI_HIDWORD(Integer) (ACPI_CAST_PTR (ACPI_INTEGER_OVERLAY, &Integer)->HiDword)
+
+/*
+ * printf() format helpers
+ */
+
+/* Split 64-bit integer into two 32-bit values. Use with %8.8X%8.8X */
+
+#define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i), ACPI_LODWORD(i)
+
+#if ACPI_MACHINE_WIDTH == 64
+#define ACPI_FORMAT_NATIVE_UINT(i) ACPI_FORMAT_UINT64(i)
+#else
+#define ACPI_FORMAT_NATIVE_UINT(i) 0, (i)
+#endif
+
+
+/*
* Macros for moving data around to/from buffers that are possibly unaligned.
* If the hardware supports the transfer of unaligned data, just do the store.
* Otherwise, we have to move one byte at a time.
@@ -235,37 +210,33 @@
* Macros for big-endian machines
*/
-/* This macro sets a buffer index, starting from the end of the buffer */
-
-#define ACPI_BUFFER_INDEX(BufLen,BufOffset,ByteGran) ((BufLen) - (((BufOffset)+1) * (ByteGran)))
-
/* These macros reverse the bytes during the move, converting little-endian to big endian */
/* Big Endian <== Little Endian */
/* Hi...Lo Lo...Hi */
/* 16-bit source, 16/32/64 destination */
-#define ACPI_MOVE_16_TO_16(d,s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[1];\
+#define ACPI_MOVE_16_TO_16(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[1];\
(( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[0];}
-#define ACPI_MOVE_16_TO_32(d,s) {(*(UINT32 *)(void *)(d))=0;\
+#define ACPI_MOVE_16_TO_32(d, s) {(*(UINT32 *)(void *)(d))=0;\
((UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[1];\
((UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[0];}
-#define ACPI_MOVE_16_TO_64(d,s) {(*(UINT64 *)(void *)(d))=0;\
+#define ACPI_MOVE_16_TO_64(d, s) {(*(UINT64 *)(void *)(d))=0;\
((UINT8 *)(void *)(d))[6] = ((UINT8 *)(void *)(s))[1];\
((UINT8 *)(void *)(d))[7] = ((UINT8 *)(void *)(s))[0];}
/* 32-bit source, 16/32/64 destination */
-#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
+#define ACPI_MOVE_32_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
-#define ACPI_MOVE_32_TO_32(d,s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\
+#define ACPI_MOVE_32_TO_32(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[3];\
(( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[2];\
(( UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[1];\
(( UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[0];}
-#define ACPI_MOVE_32_TO_64(d,s) {(*(UINT64 *)(void *)(d))=0;\
+#define ACPI_MOVE_32_TO_64(d, s) {(*(UINT64 *)(void *)(d))=0;\
((UINT8 *)(void *)(d))[4] = ((UINT8 *)(void *)(s))[3];\
((UINT8 *)(void *)(d))[5] = ((UINT8 *)(void *)(s))[2];\
((UINT8 *)(void *)(d))[6] = ((UINT8 *)(void *)(s))[1];\
@@ -273,11 +244,11 @@
/* 64-bit source, 16/32/64 destination */
-#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
+#define ACPI_MOVE_64_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
-#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
+#define ACPI_MOVE_64_TO_32(d, s) ACPI_MOVE_32_TO_32(d, s) /* Truncate to 32 */
-#define ACPI_MOVE_64_TO_64(d,s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
+#define ACPI_MOVE_64_TO_64(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[7];\
(( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[6];\
(( UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[5];\
(( UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[4];\
@@ -290,86 +261,59 @@
* Macros for little-endian machines
*/
-/* This macro sets a buffer index, starting from the beginning of the buffer */
-
-#define ACPI_BUFFER_INDEX(BufLen,BufOffset,ByteGran) (BufOffset)
-
#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
/* The hardware supports unaligned transfers, just do the little-endian move */
-#if ACPI_MACHINE_WIDTH == 16
-
-/* No 64-bit integers */
/* 16-bit source, 16/32/64 destination */
-#define ACPI_MOVE_16_TO_16(d,s) *(UINT16 *)(void *)(d) = *(UINT16 *)(void *)(s)
-#define ACPI_MOVE_16_TO_32(d,s) *(UINT32 *)(void *)(d) = *(UINT16 *)(void *)(s)
-#define ACPI_MOVE_16_TO_64(d,s) ACPI_MOVE_16_TO_32(d,s)
+#define ACPI_MOVE_16_TO_16(d, s) *(UINT16 *)(void *)(d) = *(UINT16 *)(void *)(s)
+#define ACPI_MOVE_16_TO_32(d, s) *(UINT32 *)(void *)(d) = *(UINT16 *)(void *)(s)
+#define ACPI_MOVE_16_TO_64(d, s) *(UINT64 *)(void *)(d) = *(UINT16 *)(void *)(s)
/* 32-bit source, 16/32/64 destination */
-#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
-#define ACPI_MOVE_32_TO_32(d,s) *(UINT32 *)(void *)(d) = *(UINT32 *)(void *)(s)
-#define ACPI_MOVE_32_TO_64(d,s) ACPI_MOVE_32_TO_32(d,s)
+#define ACPI_MOVE_32_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
+#define ACPI_MOVE_32_TO_32(d, s) *(UINT32 *)(void *)(d) = *(UINT32 *)(void *)(s)
+#define ACPI_MOVE_32_TO_64(d, s) *(UINT64 *)(void *)(d) = *(UINT32 *)(void *)(s)
/* 64-bit source, 16/32/64 destination */
-#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
-#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
-#define ACPI_MOVE_64_TO_64(d,s) ACPI_MOVE_32_TO_32(d,s)
-
-#else
-/* 16-bit source, 16/32/64 destination */
-
-#define ACPI_MOVE_16_TO_16(d,s) *(UINT16 *)(void *)(d) = *(UINT16 *)(void *)(s)
-#define ACPI_MOVE_16_TO_32(d,s) *(UINT32 *)(void *)(d) = *(UINT16 *)(void *)(s)
-#define ACPI_MOVE_16_TO_64(d,s) *(UINT64 *)(void *)(d) = *(UINT16 *)(void *)(s)
-
-/* 32-bit source, 16/32/64 destination */
-
-#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
-#define ACPI_MOVE_32_TO_32(d,s) *(UINT32 *)(void *)(d) = *(UINT32 *)(void *)(s)
-#define ACPI_MOVE_32_TO_64(d,s) *(UINT64 *)(void *)(d) = *(UINT32 *)(void *)(s)
-
-/* 64-bit source, 16/32/64 destination */
-
-#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
-#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
-#define ACPI_MOVE_64_TO_64(d,s) *(UINT64 *)(void *)(d) = *(UINT64 *)(void *)(s)
-#endif
+#define ACPI_MOVE_64_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
+#define ACPI_MOVE_64_TO_32(d, s) ACPI_MOVE_32_TO_32(d, s) /* Truncate to 32 */
+#define ACPI_MOVE_64_TO_64(d, s) *(UINT64 *)(void *)(d) = *(UINT64 *)(void *)(s)
#else
/*
- * The hardware does not support unaligned transfers. We must move the
- * data one byte at a time. These macros work whether the source or
+ * The hardware does not support unaligned transfers. We must move the
+ * data one byte at a time. These macros work whether the source or
* the destination (or both) is/are unaligned. (Little-endian move)
*/
/* 16-bit source, 16/32/64 destination */
-#define ACPI_MOVE_16_TO_16(d,s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\
+#define ACPI_MOVE_16_TO_16(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\
(( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];}
-#define ACPI_MOVE_16_TO_32(d,s) {(*(UINT32 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d,s);}
-#define ACPI_MOVE_16_TO_64(d,s) {(*(UINT64 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d,s);}
+#define ACPI_MOVE_16_TO_32(d, s) {(*(UINT32 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d, s);}
+#define ACPI_MOVE_16_TO_64(d, s) {(*(UINT64 *)(void *)(d)) = 0; ACPI_MOVE_16_TO_16(d, s);}
/* 32-bit source, 16/32/64 destination */
-#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
+#define ACPI_MOVE_32_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
-#define ACPI_MOVE_32_TO_32(d,s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\
+#define ACPI_MOVE_32_TO_32(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\
(( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];\
(( UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[2];\
(( UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[3];}
-#define ACPI_MOVE_32_TO_64(d,s) {(*(UINT64 *)(void *)(d)) = 0; ACPI_MOVE_32_TO_32(d,s);}
+#define ACPI_MOVE_32_TO_64(d, s) {(*(UINT64 *)(void *)(d)) = 0; ACPI_MOVE_32_TO_32(d, s);}
/* 64-bit source, 16/32/64 destination */
-#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
-#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
-#define ACPI_MOVE_64_TO_64(d,s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\
+#define ACPI_MOVE_64_TO_16(d, s) ACPI_MOVE_16_TO_16(d, s) /* Truncate to 16 */
+#define ACPI_MOVE_64_TO_32(d, s) ACPI_MOVE_32_TO_32(d, s) /* Truncate to 32 */
+#define ACPI_MOVE_64_TO_64(d, s) {(( UINT8 *)(void *)(d))[0] = ((UINT8 *)(void *)(s))[0];\
(( UINT8 *)(void *)(d))[1] = ((UINT8 *)(void *)(s))[1];\
(( UINT8 *)(void *)(d))[2] = ((UINT8 *)(void *)(s))[2];\
(( UINT8 *)(void *)(d))[3] = ((UINT8 *)(void *)(s))[3];\
@@ -380,68 +324,53 @@
#endif
#endif
-/* Macros based on machine integer width */
-
-#if ACPI_MACHINE_WIDTH == 16
-#define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s)
-
-#elif ACPI_MACHINE_WIDTH == 32
-#define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_32_TO_16(d,s)
-
-#elif ACPI_MACHINE_WIDTH == 64
-#define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_64_TO_16(d,s)
-
-#else
-#error unknown ACPI_MACHINE_WIDTH
-#endif
-
/*
* Fast power-of-two math macros for non-optimized compilers
*/
-#define _ACPI_DIV(value,PowerOf2) ((UINT32) ((value) >> (PowerOf2)))
-#define _ACPI_MUL(value,PowerOf2) ((UINT32) ((value) << (PowerOf2)))
-#define _ACPI_MOD(value,Divisor) ((UINT32) ((value) & ((Divisor) -1)))
+#define _ACPI_DIV(value, PowerOf2) ((UINT32) ((value) >> (PowerOf2)))
+#define _ACPI_MUL(value, PowerOf2) ((UINT32) ((value) << (PowerOf2)))
+#define _ACPI_MOD(value, Divisor) ((UINT32) ((value) & ((Divisor) -1)))
-#define ACPI_DIV_2(a) _ACPI_DIV(a,1)
-#define ACPI_MUL_2(a) _ACPI_MUL(a,1)
-#define ACPI_MOD_2(a) _ACPI_MOD(a,2)
+#define ACPI_DIV_2(a) _ACPI_DIV(a, 1)
+#define ACPI_MUL_2(a) _ACPI_MUL(a, 1)
+#define ACPI_MOD_2(a) _ACPI_MOD(a, 2)
-#define ACPI_DIV_4(a) _ACPI_DIV(a,2)
-#define ACPI_MUL_4(a) _ACPI_MUL(a,2)
-#define ACPI_MOD_4(a) _ACPI_MOD(a,4)
+#define ACPI_DIV_4(a) _ACPI_DIV(a, 2)
+#define ACPI_MUL_4(a) _ACPI_MUL(a, 2)
+#define ACPI_MOD_4(a) _ACPI_MOD(a, 4)
-#define ACPI_DIV_8(a) _ACPI_DIV(a,3)
-#define ACPI_MUL_8(a) _ACPI_MUL(a,3)
-#define ACPI_MOD_8(a) _ACPI_MOD(a,8)
+#define ACPI_DIV_8(a) _ACPI_DIV(a, 3)
+#define ACPI_MUL_8(a) _ACPI_MUL(a, 3)
+#define ACPI_MOD_8(a) _ACPI_MOD(a, 8)
-#define ACPI_DIV_16(a) _ACPI_DIV(a,4)
-#define ACPI_MUL_16(a) _ACPI_MUL(a,4)
-#define ACPI_MOD_16(a) _ACPI_MOD(a,16)
+#define ACPI_DIV_16(a) _ACPI_DIV(a, 4)
+#define ACPI_MUL_16(a) _ACPI_MUL(a, 4)
+#define ACPI_MOD_16(a) _ACPI_MOD(a, 16)
-#define ACPI_DIV_32(a) _ACPI_DIV(a,5)
-#define ACPI_MUL_32(a) _ACPI_MUL(a,5)
-#define ACPI_MOD_32(a) _ACPI_MOD(a,32)
+#define ACPI_DIV_32(a) _ACPI_DIV(a, 5)
+#define ACPI_MUL_32(a) _ACPI_MUL(a, 5)
+#define ACPI_MOD_32(a) _ACPI_MOD(a, 32)
/*
* Rounding macros (Power of two boundaries only)
*/
-#define ACPI_ROUND_DOWN(value,boundary) (((ACPI_NATIVE_UINT)(value)) & \
- (~(((ACPI_NATIVE_UINT) boundary)-1)))
+#define ACPI_ROUND_DOWN(value, boundary) (((ACPI_SIZE)(value)) & \
+ (~(((ACPI_SIZE) boundary)-1)))
-#define ACPI_ROUND_UP(value,boundary) ((((ACPI_NATIVE_UINT)(value)) + \
- (((ACPI_NATIVE_UINT) boundary)-1)) & \
- (~(((ACPI_NATIVE_UINT) boundary)-1)))
+#define ACPI_ROUND_UP(value, boundary) ((((ACPI_SIZE)(value)) + \
+ (((ACPI_SIZE) boundary)-1)) & \
+ (~(((ACPI_SIZE) boundary)-1)))
-/* Note: sizeof(ACPI_NATIVE_UINT) evaluates to either 2, 4, or 8 */
+/* Note: sizeof(ACPI_SIZE) evaluates to either 4 or 8 (32- vs 64-bit mode) */
-#define ACPI_ROUND_DOWN_TO_32BIT(a) ACPI_ROUND_DOWN(a,4)
-#define ACPI_ROUND_DOWN_TO_64BIT(a) ACPI_ROUND_DOWN(a,8)
-#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a,sizeof(ACPI_NATIVE_UINT))
+#define ACPI_ROUND_DOWN_TO_32BIT(a) ACPI_ROUND_DOWN(a, 4)
+#define ACPI_ROUND_DOWN_TO_64BIT(a) ACPI_ROUND_DOWN(a, 8)
+#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a, sizeof(ACPI_SIZE))
-#define ACPI_ROUND_UP_TO_32BIT(a) ACPI_ROUND_UP(a,4)
-#define ACPI_ROUND_UP_TO_64BIT(a) ACPI_ROUND_UP(a,8)
-#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a,sizeof(ACPI_NATIVE_UINT))
+#define ACPI_ROUND_UP_TO_32BIT(a) ACPI_ROUND_UP(a, 4)
+#define ACPI_ROUND_UP_TO_64BIT(a) ACPI_ROUND_UP(a, 8)
+#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a, sizeof(ACPI_SIZE))
#define ACPI_ROUND_BITS_UP_TO_BYTES(a) ACPI_DIV_8((a) + 7)
#define ACPI_ROUND_BITS_DOWN_TO_BYTES(a) ACPI_DIV_8((a))
@@ -450,9 +379,9 @@
/* Generic (non-power-of-two) rounding */
-#define ACPI_ROUND_UP_TO(value,boundary) (((value) + ((boundary)-1)) / (boundary))
+#define ACPI_ROUND_UP_TO(value, boundary) (((value) + ((boundary)-1)) / (boundary))
-#define ACPI_IS_MISALIGNED(value) (((ACPI_NATIVE_UINT)value) & (sizeof(ACPI_NATIVE_UINT)-1))
+#define ACPI_IS_MISALIGNED(value) (((ACPI_SIZE) value) & (sizeof(ACPI_SIZE)-1))
/*
* Bitmask creation
@@ -463,9 +392,6 @@
#define ACPI_MASK_BITS_ABOVE(position) (~((ACPI_INTEGER_MAX) << ((UINT32) (position))))
#define ACPI_MASK_BITS_BELOW(position) ((ACPI_INTEGER_MAX) << ((UINT32) (position)))
-#define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7'))
-
-
/* Bitfields within ACPI registers */
#define ACPI_REGISTER_PREPARE_BITS(Val, Pos, Mask) ((Val << Pos) & Mask)
@@ -473,40 +399,29 @@
#define ACPI_INSERT_BITS(Target, Mask, Source) Target = ((Target & (~(Mask))) | (Source & Mask))
-/* Generate a UUID */
-
-#define ACPI_INIT_UUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \
- (a) & 0xFF, ((a) >> 8) & 0xFF, ((a) >> 16) & 0xFF, ((a) >> 24) & 0xFF, \
- (b) & 0xFF, ((b) >> 8) & 0xFF, \
- (c) & 0xFF, ((c) >> 8) & 0xFF, \
- (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7)
-
/*
- * An ACPI_NAMESPACE_NODE * can appear in some contexts,
- * where a pointer to an ACPI_OPERAND_OBJECT can also
- * appear. This macro is used to distinguish them.
+ * An ACPI_NAMESPACE_NODE can appear in some contexts
+ * where a pointer to an ACPI_OPERAND_OBJECT can also
+ * appear. This macro is used to distinguish them.
*
* The "Descriptor" field is the first field in both structures.
*/
#define ACPI_GET_DESCRIPTOR_TYPE(d) (((ACPI_DESCRIPTOR *)(void *)(d))->Common.DescriptorType)
-#define ACPI_SET_DESCRIPTOR_TYPE(d,t) (((ACPI_DESCRIPTOR *)(void *)(d))->Common.DescriptorType = t)
-
+#define ACPI_SET_DESCRIPTOR_TYPE(d, t) (((ACPI_DESCRIPTOR *)(void *)(d))->Common.DescriptorType = t)
/* Macro to test the object type */
#define ACPI_GET_OBJECT_TYPE(d) (((ACPI_OPERAND_OBJECT *)(void *)(d))->Common.Type)
-/* Macro to check the table flags for SINGLE or MULTIPLE tables are allowed */
-
-#define ACPI_IS_SINGLE_TABLE(x) (((x) & 0x01) == ACPI_TABLE_SINGLE ? 1 : 0)
-
/*
* Macros for the master AML opcode table
*/
-#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUG_OUTPUT)
-#define ACPI_OP(Name,PArgs,IArgs,ObjType,Class,Type,Flags) {Name,(UINT32)(PArgs),(UINT32)(IArgs),(UINT32)(Flags),ObjType,Class,Type}
+#if defined (ACPI_DISASSEMBLER) || defined (ACPI_DEBUG_OUTPUT)
+#define ACPI_OP(Name, PArgs, IArgs, ObjType, Class, Type, Flags) \
+ {Name, (UINT32)(PArgs), (UINT32)(IArgs), (UINT32)(Flags), ObjType, Class, Type}
#else
-#define ACPI_OP(Name,PArgs,IArgs,ObjType,Class,Type,Flags) {(UINT32)(PArgs),(UINT32)(IArgs),(UINT32)(Flags),ObjType,Class,Type}
+#define ACPI_OP(Name, PArgs, IArgs, ObjType, Class, Type, Flags) \
+ {(UINT32)(PArgs), (UINT32)(IArgs), (UINT32)(Flags), ObjType, Class, Type}
#endif
#ifdef ACPI_DISASSEMBLER
@@ -524,18 +439,18 @@
#define ARG_6(x) ((UINT32)(x) << (5 * ARG_TYPE_WIDTH))
#define ARGI_LIST1(a) (ARG_1(a))
-#define ARGI_LIST2(a,b) (ARG_1(b)|ARG_2(a))
-#define ARGI_LIST3(a,b,c) (ARG_1(c)|ARG_2(b)|ARG_3(a))
-#define ARGI_LIST4(a,b,c,d) (ARG_1(d)|ARG_2(c)|ARG_3(b)|ARG_4(a))
-#define ARGI_LIST5(a,b,c,d,e) (ARG_1(e)|ARG_2(d)|ARG_3(c)|ARG_4(b)|ARG_5(a))
-#define ARGI_LIST6(a,b,c,d,e,f) (ARG_1(f)|ARG_2(e)|ARG_3(d)|ARG_4(c)|ARG_5(b)|ARG_6(a))
+#define ARGI_LIST2(a, b) (ARG_1(b)|ARG_2(a))
+#define ARGI_LIST3(a, b, c) (ARG_1(c)|ARG_2(b)|ARG_3(a))
+#define ARGI_LIST4(a, b, c, d) (ARG_1(d)|ARG_2(c)|ARG_3(b)|ARG_4(a))
+#define ARGI_LIST5(a, b, c, d, e) (ARG_1(e)|ARG_2(d)|ARG_3(c)|ARG_4(b)|ARG_5(a))
+#define ARGI_LIST6(a, b, c, d, e, f) (ARG_1(f)|ARG_2(e)|ARG_3(d)|ARG_4(c)|ARG_5(b)|ARG_6(a))
#define ARGP_LIST1(a) (ARG_1(a))
-#define ARGP_LIST2(a,b) (ARG_1(a)|ARG_2(b))
-#define ARGP_LIST3(a,b,c) (ARG_1(a)|ARG_2(b)|ARG_3(c))
-#define ARGP_LIST4(a,b,c,d) (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d))
-#define ARGP_LIST5(a,b,c,d,e) (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d)|ARG_5(e))
-#define ARGP_LIST6(a,b,c,d,e,f) (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d)|ARG_5(e)|ARG_6(f))
+#define ARGP_LIST2(a, b) (ARG_1(a)|ARG_2(b))
+#define ARGP_LIST3(a, b, c) (ARG_1(a)|ARG_2(b)|ARG_3(c))
+#define ARGP_LIST4(a, b, c, d) (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d))
+#define ARGP_LIST5(a, b, c, d, e) (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d)|ARG_5(e))
+#define ARGP_LIST6(a, b, c, d, e, f) (ARG_1(a)|ARG_2(b)|ARG_3(c)|ARG_4(d)|ARG_5(e)|ARG_6(f))
#define GET_CURRENT_ARG_TYPE(List) (List & ((UINT32) 0x1F))
#define INCREMENT_ARG_LIST(List) (List >>= ((UINT32) ARG_TYPE_WIDTH))
@@ -547,7 +462,7 @@
* error messages. The __FILE__ macro is not very useful for this, because it
* often includes the entire pathname to the module
*/
-#define ACPI_MODULE_NAME(Name) static char ACPI_UNUSED_VAR *_AcpiModuleName = Name;
+#define ACPI_MODULE_NAME(Name) static const char ACPI_UNUSED_VAR _AcpiModuleName[] = Name;
#else
#define ACPI_MODULE_NAME(Name)
#endif
@@ -567,8 +482,8 @@
#define ACPI_WARNING(plist) AcpiUtWarning plist
#define ACPI_EXCEPTION(plist) AcpiUtException plist
#define ACPI_ERROR(plist) AcpiUtError plist
-#define ACPI_ERROR_NAMESPACE(s,e) AcpiNsReportError (AE_INFO, s, e);
-#define ACPI_ERROR_METHOD(s,n,p,e) AcpiNsReportMethodError (AE_INFO, s, n, p, e);
+#define ACPI_ERROR_NAMESPACE(s, e) AcpiNsReportError (AE_INFO, s, e);
+#define ACPI_ERROR_METHOD(s, n, p, e) AcpiNsReportMethodError (AE_INFO, s, n, p, e);
#else
@@ -578,8 +493,8 @@
#define ACPI_WARNING(plist)
#define ACPI_EXCEPTION(plist)
#define ACPI_ERROR(plist)
-#define ACPI_ERROR_NAMESPACE(s,e)
-#define ACPI_ERROR_METHOD(s,n,p,e)
+#define ACPI_ERROR_NAMESPACE(s, e)
+#define ACPI_ERROR_METHOD(s, n, p, e)
#endif
/*
@@ -600,19 +515,17 @@
/*
* If ACPI_GET_FUNCTION_NAME was not defined in the compiler-dependent header,
* define it now. This is the case where there the compiler does not support
- * a __FUNCTION__ macro or equivalent. We save the function name on the
- * local stack.
+ * a __FUNCTION__ macro or equivalent.
*/
#ifndef ACPI_GET_FUNCTION_NAME
#define ACPI_GET_FUNCTION_NAME _AcpiFunctionName
/*
* The Name parameter should be the procedure name as a quoted string.
- * This is declared as a local string ("MyFunctionName") so that it can
- * be also used by the function exit macros below.
+ * The function name is also used by the function exit macros below.
* Note: (const char) is used to be compatible with the debug interfaces
* and macros such as __FUNCTION__.
*/
-#define ACPI_FUNCTION_NAME(Name) const char *_AcpiFunctionName = #Name;
+#define ACPI_FUNCTION_NAME(Name) static const char _AcpiFunctionName[] = #Name;
#else
/* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */
@@ -622,18 +535,18 @@
#define ACPI_FUNCTION_TRACE(a) ACPI_FUNCTION_NAME(a) \
AcpiUtTrace(ACPI_DEBUG_PARAMETERS)
-#define ACPI_FUNCTION_TRACE_PTR(a,b) ACPI_FUNCTION_NAME(a) \
- AcpiUtTracePtr(ACPI_DEBUG_PARAMETERS,(void *)b)
-#define ACPI_FUNCTION_TRACE_U32(a,b) ACPI_FUNCTION_NAME(a) \
- AcpiUtTraceU32(ACPI_DEBUG_PARAMETERS,(UINT32)b)
-#define ACPI_FUNCTION_TRACE_STR(a,b) ACPI_FUNCTION_NAME(a) \
- AcpiUtTraceStr(ACPI_DEBUG_PARAMETERS,(char *)b)
+#define ACPI_FUNCTION_TRACE_PTR(a, b) ACPI_FUNCTION_NAME(a) \
+ AcpiUtTracePtr(ACPI_DEBUG_PARAMETERS, (void *)b)
+#define ACPI_FUNCTION_TRACE_U32(a, b) ACPI_FUNCTION_NAME(a) \
+ AcpiUtTraceU32(ACPI_DEBUG_PARAMETERS, (UINT32)b)
+#define ACPI_FUNCTION_TRACE_STR(a, b) ACPI_FUNCTION_NAME(a) \
+ AcpiUtTraceStr(ACPI_DEBUG_PARAMETERS, (char *)b)
#define ACPI_FUNCTION_ENTRY() AcpiUtTrackStackPtr()
/*
* Function exit tracing.
- * WARNING: These macros include a return statement. This is usually considered
+ * WARNING: These macros include a return statement. This is usually considered
* bad form, but having a separate exit macro is very ugly and difficult to maintain.
* One of the FUNCTION_TRACE macros above must be used in conjunction with these macros
* so that "_AcpiFunctionName" is defined.
@@ -701,23 +614,17 @@
/* Conditional execution */
#define ACPI_DEBUG_EXEC(a) a
-#define ACPI_NORMAL_EXEC(a)
-
-#define ACPI_DEBUG_DEFINE(a) a;
#define ACPI_DEBUG_ONLY_MEMBERS(a) a;
#define _VERBOSE_STRUCTURES
-/* Stack and buffer dumping */
-
-#define ACPI_DUMP_STACK_ENTRY(a) AcpiExDumpOperand((a),0)
-#define ACPI_DUMP_OPERANDS(a,b,c,d,e) AcpiExDumpOperands(a,b,c,d,e,_AcpiModuleName,__LINE__)
+/* Various object display routines for debug */
-
-#define ACPI_DUMP_ENTRY(a,b) AcpiNsDumpEntry (a,b)
-#define ACPI_DUMP_PATHNAME(a,b,c,d) AcpiNsDumpPathname(a,b,c,d)
-#define ACPI_DUMP_RESOURCE_LIST(a) AcpiRsDumpResourceList(a)
-#define ACPI_DUMP_BUFFER(a,b) AcpiUtDumpBuffer((UINT8 *)a,b,DB_BYTE_DISPLAY,_COMPONENT)
+#define ACPI_DUMP_STACK_ENTRY(a) AcpiExDumpOperand((a), 0)
+#define ACPI_DUMP_OPERANDS(a, b ,c) AcpiExDumpOperands(a, b, c)
+#define ACPI_DUMP_ENTRY(a, b) AcpiNsDumpEntry (a, b)
+#define ACPI_DUMP_PATHNAME(a, b, c, d) AcpiNsDumpPathname(a, b, c, d)
+#define ACPI_DUMP_BUFFER(a, b) AcpiUtDumpBuffer((UINT8 *) a, b, DB_BYTE_DISPLAY, _COMPONENT)
/*
* Master debug print macros
@@ -735,26 +642,22 @@
* leaving no executable debug code!
*/
#define ACPI_DEBUG_EXEC(a)
-#define ACPI_NORMAL_EXEC(a) a;
-
-#define ACPI_DEBUG_DEFINE(a)
#define ACPI_DEBUG_ONLY_MEMBERS(a)
#define ACPI_FUNCTION_NAME(a)
#define ACPI_FUNCTION_TRACE(a)
-#define ACPI_FUNCTION_TRACE_PTR(a,b)
-#define ACPI_FUNCTION_TRACE_U32(a,b)
-#define ACPI_FUNCTION_TRACE_STR(a,b)
+#define ACPI_FUNCTION_TRACE_PTR(a, b)
+#define ACPI_FUNCTION_TRACE_U32(a, b)
+#define ACPI_FUNCTION_TRACE_STR(a, b)
#define ACPI_FUNCTION_EXIT
#define ACPI_FUNCTION_STATUS_EXIT(s)
#define ACPI_FUNCTION_VALUE_EXIT(s)
#define ACPI_FUNCTION_ENTRY()
#define ACPI_DUMP_STACK_ENTRY(a)
-#define ACPI_DUMP_OPERANDS(a,b,c,d,e)
-#define ACPI_DUMP_ENTRY(a,b)
-#define ACPI_DUMP_TABLES(a,b)
-#define ACPI_DUMP_PATHNAME(a,b,c,d)
-#define ACPI_DUMP_RESOURCE_LIST(a)
-#define ACPI_DUMP_BUFFER(a,b)
+#define ACPI_DUMP_OPERANDS(a, b, c)
+#define ACPI_DUMP_ENTRY(a, b)
+#define ACPI_DUMP_TABLES(a, b)
+#define ACPI_DUMP_PATHNAME(a, b, c, d)
+#define ACPI_DUMP_BUFFER(a, b)
#define ACPI_DEBUG_PRINT(pl)
#define ACPI_DEBUG_PRINT_RAW(pl)
@@ -780,38 +683,16 @@
/*
- * For 16-bit code, we want to shrink some things even though
- * we are using ACPI_DEBUG_OUTPUT to get the debug output
- */
-#if ACPI_MACHINE_WIDTH == 16
-#undef ACPI_DEBUG_ONLY_MEMBERS
-#undef _VERBOSE_STRUCTURES
-#define ACPI_DEBUG_ONLY_MEMBERS(a)
-#endif
-
-
-#ifdef ACPI_DEBUG_OUTPUT
-/*
- * 1) Set name to blanks
- * 2) Copy the object name
- */
-#define ACPI_ADD_OBJECT_NAME(a,b) ACPI_MEMSET (a->Common.Name, ' ', sizeof (a->Common.Name));\
- ACPI_STRNCPY (a->Common.Name, AcpiGbl_NsTypeNames[b], sizeof (a->Common.Name))
-#else
-
-#define ACPI_ADD_OBJECT_NAME(a,b)
-#endif
-
-
-/*
* Memory allocation tracking (DEBUG ONLY)
*/
+#define ACPI_MEM_PARAMETERS _COMPONENT, _AcpiModuleName, __LINE__
+
#ifndef ACPI_DBG_TRACK_ALLOCATIONS
/* Memory allocation */
-#define ACPI_ALLOCATE(a) AcpiUtAllocate((ACPI_SIZE)(a),_COMPONENT,_AcpiModuleName,__LINE__)
-#define ACPI_ALLOCATE_ZEROED(a) AcpiUtAllocateZeroed((ACPI_SIZE)(a), _COMPONENT,_AcpiModuleName,__LINE__)
+#define ACPI_ALLOCATE(a) AcpiUtAllocate((ACPI_SIZE) (a), ACPI_MEM_PARAMETERS)
+#define ACPI_ALLOCATE_ZEROED(a) AcpiUtAllocateZeroed((ACPI_SIZE) (a), ACPI_MEM_PARAMETERS)
#define ACPI_FREE(a) AcpiOsFree(a)
#define ACPI_MEM_TRACKING(a)
@@ -819,11 +700,27 @@
/* Memory allocation */
-#define ACPI_ALLOCATE(a) AcpiUtAllocateAndTrack((ACPI_SIZE)(a),_COMPONENT,_AcpiModuleName,__LINE__)
-#define ACPI_ALLOCATE_ZEROED(a) AcpiUtAllocateZeroedAndTrack((ACPI_SIZE)(a), _COMPONENT,_AcpiModuleName,__LINE__)
-#define ACPI_FREE(a) AcpiUtFreeAndTrack(a,_COMPONENT,_AcpiModuleName,__LINE__)
+#define ACPI_ALLOCATE(a) AcpiUtAllocateAndTrack((ACPI_SIZE) (a), ACPI_MEM_PARAMETERS)
+#define ACPI_ALLOCATE_ZEROED(a) AcpiUtAllocateZeroedAndTrack((ACPI_SIZE) (a), ACPI_MEM_PARAMETERS)
+#define ACPI_FREE(a) AcpiUtFreeAndTrack(a, ACPI_MEM_PARAMETERS)
#define ACPI_MEM_TRACKING(a) a
#endif /* ACPI_DBG_TRACK_ALLOCATIONS */
+
+/*
+ * Macros used for ACPICA utilities only
+ */
+
+/* Generate a UUID */
+
+#define ACPI_INIT_UUID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \
+ (a) & 0xFF, ((a) >> 8) & 0xFF, ((a) >> 16) & 0xFF, ((a) >> 24) & 0xFF, \
+ (b) & 0xFF, ((b) >> 8) & 0xFF, \
+ (c) & 0xFF, ((c) >> 8) & 0xFF, \
+ (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7)
+
+#define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7'))
+
+
#endif /* ACMACROS_H */
diff --git a/usr/src/uts/intel/sys/acpi/acnames.h b/usr/src/uts/intel/sys/acpi/acnames.h
index 72ad9484ce..b054106c2c 100644
--- a/usr/src/uts/intel/sys/acpi/acnames.h
+++ b/usr/src/uts/intel/sys/acpi/acnames.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acnames.h - Global names and strings
- * $Revision: 1.6 $
+ * $Revision: 1.8 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/sys/acpi/acnamesp.h b/usr/src/uts/intel/sys/acpi/acnamesp.h
index a65aab935f..96a0a38927 100644
--- a/usr/src/uts/intel/sys/acpi/acnamesp.h
+++ b/usr/src/uts/intel/sys/acpi/acnamesp.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acnamesp.h - Namespace subcomponent prototypes and defines
- * $Revision: 1.149 $
+ * $Revision: 1.154 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -139,9 +139,13 @@
#define ACPI_NS_ERROR_IF_FOUND 0x08
#define ACPI_NS_PREFIX_IS_SCOPE 0x10
#define ACPI_NS_EXTERNAL 0x20
+#define ACPI_NS_TEMPORARY 0x40
-#define ACPI_NS_WALK_UNLOCK TRUE
-#define ACPI_NS_WALK_NO_UNLOCK FALSE
+/* Flags for AcpiNsWalkNamespace */
+
+#define ACPI_NS_WALK_NO_UNLOCK 0
+#define ACPI_NS_WALK_UNLOCK 0x01
+#define ACPI_NS_WALK_TEMP_NODES 0x02
/*
@@ -165,7 +169,7 @@ AcpiNsLoadNamespace (
ACPI_STATUS
AcpiNsLoadTable (
- ACPI_TABLE_DESC *TableDesc,
+ UINT32 TableIndex,
ACPI_NAMESPACE_NODE *Node);
@@ -177,7 +181,7 @@ AcpiNsWalkNamespace (
ACPI_OBJECT_TYPE Type,
ACPI_HANDLE StartObject,
UINT32 MaxDepth,
- BOOLEAN UnlockBeforeCallback,
+ UINT32 Flags,
ACPI_WALK_CALLBACK UserFunction,
void *Context,
void **ReturnValue);
@@ -194,13 +198,14 @@ AcpiNsGetNextNode (
*/
ACPI_STATUS
AcpiNsParseTable (
- ACPI_TABLE_DESC *TableDesc,
- ACPI_NAMESPACE_NODE *Scope);
+ UINT32 TableIndex,
+ ACPI_NAMESPACE_NODE *StartNode);
ACPI_STATUS
AcpiNsOneCompleteParse (
- UINT8 PassNumber,
- ACPI_TABLE_DESC *TableDesc);
+ UINT32 PassNumber,
+ UINT32 TableIndex,
+ ACPI_NAMESPACE_NODE *StartNode);
/*
@@ -310,7 +315,7 @@ UINT32
AcpiNsOpensScope (
ACPI_OBJECT_TYPE Type);
-void
+ACPI_STATUS
AcpiNsBuildExternalPath (
ACPI_NAMESPACE_NODE *Node,
ACPI_SIZE Size,
@@ -337,7 +342,7 @@ AcpiNsPatternMatch (
ACPI_STATUS
AcpiNsGetNode (
ACPI_NAMESPACE_NODE *PrefixNode,
- char *ExternalPathname,
+ const char *ExternalPathname,
UINT32 Flags,
ACPI_NAMESPACE_NODE **OutNode);
@@ -426,24 +431,24 @@ AcpiNsLocal (
void
AcpiNsReportError (
- char *ModuleName,
+ const char *ModuleName,
UINT32 LineNumber,
- char *InternalName,
+ const char *InternalName,
ACPI_STATUS LookupStatus);
void
AcpiNsReportMethodError (
- char *ModuleName,
+ const char *ModuleName,
UINT32 LineNumber,
- char *Message,
+ const char *Message,
ACPI_NAMESPACE_NODE *Node,
- char *Path,
+ const char *Path,
ACPI_STATUS LookupStatus);
void
AcpiNsPrintNodePathname (
ACPI_NAMESPACE_NODE *Node,
- char *Msg);
+ const char *Msg);
ACPI_STATUS
AcpiNsBuildInternalName (
@@ -455,13 +460,13 @@ AcpiNsGetInternalNameLength (
ACPI_STATUS
AcpiNsInternalizeName (
- char *DottedName,
+ const char *DottedName,
char **ConvertedName);
ACPI_STATUS
AcpiNsExternalizeName (
UINT32 InternalNameLength,
- char *InternalName,
+ const char *InternalName,
UINT32 *ConvertedNameLength,
char **ConvertedName);
diff --git a/usr/src/uts/intel/sys/acpi/acobject.h b/usr/src/uts/intel/sys/acpi/acobject.h
index 3a72fe9aa6..0c3bae50ee 100644
--- a/usr/src/uts/intel/sys/acpi/acobject.h
+++ b/usr/src/uts/intel/sys/acpi/acobject.h
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only)
- * $Revision: 1.139 $
+ * $Revision: 1.144 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -126,7 +126,15 @@
* to the interpreter, and to keep track of the various handlers such as
* address space handlers and notify handlers. The object is a constant
* size in order to allow it to be cached and reused.
+ *
+ * Note: The object is optimized to be aligned and will not work if it is
+ * byte-packed.
*/
+#if ACPI_MACHINE_WIDTH == 64
+#pragma pack(8)
+#else
+#pragma pack(4)
+#endif
/*******************************************************************************
*
@@ -182,6 +190,7 @@ typedef struct acpi_object_common
typedef struct acpi_object_integer
{
ACPI_OBJECT_COMMON_HEADER
+ UINT8 Fill[3]; /* Prevent warning on some compilers */
ACPI_INTEGER Value;
} ACPI_OBJECT_INTEGER;
@@ -248,8 +257,9 @@ typedef struct acpi_object_mutex
ACPI_OBJECT_COMMON_HEADER
UINT8 SyncLevel; /* 0-15, specified in Mutex() call */
UINT16 AcquisitionDepth; /* Allow multiple Acquires, same thread */
- struct acpi_thread_state *OwnerThread; /* Current owner of the mutex */
ACPI_MUTEX OsMutex; /* Actual OS synchronization object */
+ ACPI_THREAD_ID ThreadId; /* Current owner of the mutex */
+ struct acpi_thread_state *OwnerThread; /* Current owner of the mutex */
union acpi_operand_object *Prev; /* Link for list of acquired mutexes */
union acpi_operand_object *Next; /* Link for list of acquired mutexes */
ACPI_NAMESPACE_NODE *Node; /* Containing namespace node */
@@ -332,6 +342,9 @@ typedef struct acpi_object_power_resource
typedef struct acpi_object_processor
{
ACPI_OBJECT_COMMON_HEADER
+
+ /* The next two fields take advantage of the 3-byte space before NOTIFY_INFO */
+
UINT8 ProcId;
UINT8 Length;
ACPI_COMMON_NOTIFY_INFO
@@ -467,21 +480,39 @@ typedef struct acpi_object_addr_handler
*****************************************************************************/
/*
- * The Reference object type is used for these opcodes:
- * Arg[0-6], Local[0-7], IndexOp, NameOp, ZeroOp, OneOp, OnesOp, DebugOp
+ * The Reference object is used for these opcodes:
+ * Arg[0-6], Local[0-7], IndexOp, NameOp, RefOfOp, LoadOp, LoadTableOp, DebugOp
+ * The Reference.Class differentiates these types.
*/
typedef struct acpi_object_reference
{
ACPI_OBJECT_COMMON_HEADER
- UINT8 TargetType; /* Used for IndexOp */
- UINT16 Opcode;
- void *Object; /* NameOp=>HANDLE to obj, IndexOp=>ACPI_OPERAND_OBJECT */
- ACPI_NAMESPACE_NODE *Node;
- union acpi_operand_object **Where;
- UINT32 Offset; /* Used for ArgOp, LocalOp, and IndexOp */
+ UINT8 Class; /* Reference Class */
+ UINT8 TargetType; /* Used for Index Op */
+ UINT8 Reserved;
+ void *Object; /* NameOp=>HANDLE to obj, IndexOp=>ACPI_OPERAND_OBJECT */
+ ACPI_NAMESPACE_NODE *Node; /* RefOf or Namepath */
+ union acpi_operand_object **Where; /* Target of Index */
+ UINT32 Value; /* Used for Local/Arg/Index/DdbHandle */
} ACPI_OBJECT_REFERENCE;
+/* Values for Reference.Class above */
+
+typedef enum
+{
+ ACPI_REFCLASS_LOCAL = 0, /* Method local */
+ ACPI_REFCLASS_ARG = 1, /* Method argument */
+ ACPI_REFCLASS_REFOF = 2, /* Result of RefOf() TBD: Split to Ref/Node and Ref/OperandObj? */
+ ACPI_REFCLASS_INDEX = 3, /* Result of Index() */
+ ACPI_REFCLASS_TABLE = 4, /* DdbHandle - Load(), LoadTable() */
+ ACPI_REFCLASS_NAME = 5, /* Reference to a named object */
+ ACPI_REFCLASS_DEBUG = 6, /* Debug object */
+
+ ACPI_REFCLASS_MAX = 6
+
+} ACPI_REFERENCE_CLASSES;
+
/*
* Extra object is used as additional storage for types that
@@ -556,6 +587,13 @@ typedef union acpi_operand_object
ACPI_OBJECT_DATA Data;
ACPI_OBJECT_CACHE_LIST Cache;
+ /*
+ * Add namespace node to union in order to simplify code that accepts both
+ * ACPI_OPERAND_OBJECTs and ACPI_NAMESPACE_NODEs. The structures share
+ * a common DescriptorType field in order to differentiate them.
+ */
+ ACPI_NAMESPACE_NODE Node;
+
} ACPI_OPERAND_OBJECT;
@@ -601,5 +639,6 @@ typedef union acpi_descriptor
} ACPI_DESCRIPTOR;
+#pragma pack()
#endif /* _ACOBJECT_H */
diff --git a/usr/src/uts/intel/sys/acpi/acopcode.h b/usr/src/uts/intel/sys/acpi/acopcode.h
index d3127248dc..ed543b442d 100644
--- a/usr/src/uts/intel/sys/acpi/acopcode.h
+++ b/usr/src/uts/intel/sys/acpi/acopcode.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acopcode.h - AML opcode information for the AML parser and interpreter
- * $Revision: 1.5 $
+ * $Revision: 1.9 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -308,7 +308,7 @@
#define ARGI_CREATE_WORD_FIELD_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_REFERENCE)
#define ARGI_DATA_REGION_OP ARGI_LIST3 (ARGI_STRING, ARGI_STRING, ARGI_STRING)
#define ARGI_DEBUG_OP ARG_NONE
-#define ARGI_DECREMENT_OP ARGI_LIST1 (ARGI_INTEGER_REF)
+#define ARGI_DECREMENT_OP ARGI_LIST1 (ARGI_TARGETREF)
#define ARGI_DEREF_OF_OP ARGI_LIST1 (ARGI_REF_OR_STRING)
#define ARGI_DEVICE_OP ARGI_INVALID_OPCODE
#define ARGI_DIVIDE_OP ARGI_LIST4 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF, ARGI_TARGETREF)
@@ -321,7 +321,7 @@
#define ARGI_FIND_SET_RIGHT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
#define ARGI_FROM_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_FIXED_TARGET)
#define ARGI_IF_OP ARGI_INVALID_OPCODE
-#define ARGI_INCREMENT_OP ARGI_LIST1 (ARGI_INTEGER_REF)
+#define ARGI_INCREMENT_OP ARGI_LIST1 (ARGI_TARGETREF)
#define ARGI_INDEX_FIELD_OP ARGI_INVALID_OPCODE
#define ARGI_INDEX_OP ARGI_LIST3 (ARGI_COMPLEXOBJ, ARGI_INTEGER, ARGI_TARGETREF)
#define ARGI_LAND_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_INTEGER)
@@ -332,7 +332,7 @@
#define ARGI_LLESSEQUAL_OP ARGI_INVALID_OPCODE
#define ARGI_LNOT_OP ARGI_LIST1 (ARGI_INTEGER)
#define ARGI_LNOTEQUAL_OP ARGI_INVALID_OPCODE
-#define ARGI_LOAD_OP ARGI_LIST2 (ARGI_REGION_OR_FIELD,ARGI_TARGETREF)
+#define ARGI_LOAD_OP ARGI_LIST2 (ARGI_REGION_OR_BUFFER,ARGI_TARGETREF)
#define ARGI_LOAD_TABLE_OP ARGI_LIST6 (ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_STRING, ARGI_ANYTYPE)
#define ARGI_LOCAL0 ARG_NONE
#define ARGI_LOCAL1 ARG_NONE
diff --git a/usr/src/uts/intel/sys/acpi/acoutput.h b/usr/src/uts/intel/sys/acpi/acoutput.h
index 590d05299a..e37148be86 100644
--- a/usr/src/uts/intel/sys/acpi/acoutput.h
+++ b/usr/src/uts/intel/sys/acpi/acoutput.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acoutput.h -- debug output
- * $Revision: 1.100 $
+ * $Revision: 1.102 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -146,7 +146,6 @@
#define ACPI_ALL_COMPONENTS 0x00003FFF
#define ACPI_COMPONENT_DEFAULT (ACPI_ALL_COMPONENTS)
-
/* Component IDs reserved for ACPI drivers */
#define ACPI_ALL_DRIVERS 0xFFFF0000
@@ -155,12 +154,10 @@
/*
* Raw debug output levels, do not use these in the DEBUG_PRINT macros
*/
-#define ACPI_LV_ERROR 0x00000001
-#define ACPI_LV_WARN 0x00000002
-#define ACPI_LV_INIT 0x00000004
-#define ACPI_LV_DEBUG_OBJECT 0x00000008
-#define ACPI_LV_INFO 0x00000010
-#define ACPI_LV_ALL_EXCEPTIONS 0x0000001F
+#define ACPI_LV_INIT 0x00000001
+#define ACPI_LV_DEBUG_OBJECT 0x00000002
+#define ACPI_LV_INFO 0x00000004
+#define ACPI_LV_ALL_EXCEPTIONS 0x00000007
/* Trace verbosity level 1 [Standard Trace Level] */
@@ -202,7 +199,6 @@
#define ACPI_LV_VERBOSE_INFO 0x20000000
#define ACPI_LV_FULL_TABLES 0x40000000
#define ACPI_LV_EVENTS 0x80000000
-
#define ACPI_LV_VERBOSE 0xF0000000
@@ -211,21 +207,17 @@
*/
#define ACPI_DEBUG_LEVEL(dl) (UINT32) dl,ACPI_DEBUG_PARAMETERS
-/* Exception level -- used in the global "DebugLevel" */
-
+/*
+ * Exception level -- used in the global "DebugLevel"
+ *
+ * Note: For errors, use the ACPI_ERROR or ACPI_EXCEPTION interfaces.
+ * For warnings, use ACPI_WARNING.
+ */
#define ACPI_DB_INIT ACPI_DEBUG_LEVEL (ACPI_LV_INIT)
#define ACPI_DB_DEBUG_OBJECT ACPI_DEBUG_LEVEL (ACPI_LV_DEBUG_OBJECT)
#define ACPI_DB_INFO ACPI_DEBUG_LEVEL (ACPI_LV_INFO)
#define ACPI_DB_ALL_EXCEPTIONS ACPI_DEBUG_LEVEL (ACPI_LV_ALL_EXCEPTIONS)
-/*
- * These two levels are essentially obsolete, all instances in the
- * ACPICA core code have been replaced by ACPI_ERROR and ACPI_WARNING
- * (Kept here because some drivers may still use them)
- */
-#define ACPI_DB_ERROR ACPI_DEBUG_LEVEL (ACPI_LV_ERROR)
-#define ACPI_DB_WARN ACPI_DEBUG_LEVEL (ACPI_LV_WARN)
-
/* Trace level -- also used in the global "DebugLevel" */
#define ACPI_DB_INIT_NAMES ACPI_DEBUG_LEVEL (ACPI_LV_INIT_NAMES)
@@ -249,14 +241,15 @@
#define ACPI_DB_USER_REQUESTS ACPI_DEBUG_LEVEL (ACPI_LV_USER_REQUESTS)
#define ACPI_DB_PACKAGE ACPI_DEBUG_LEVEL (ACPI_LV_PACKAGE)
#define ACPI_DB_MUTEX ACPI_DEBUG_LEVEL (ACPI_LV_MUTEX)
+#define ACPI_DB_EVENTS ACPI_DEBUG_LEVEL (ACPI_LV_EVENTS)
#define ACPI_DB_ALL ACPI_DEBUG_LEVEL (ACPI_LV_ALL)
/* Defaults for DebugLevel, debug and normal */
-#define ACPI_DEBUG_DEFAULT (ACPI_LV_INIT | ACPI_LV_WARN | ACPI_LV_ERROR | ACPI_LV_DEBUG_OBJECT)
-#define ACPI_NORMAL_DEFAULT (ACPI_LV_INIT | ACPI_LV_WARN | ACPI_LV_ERROR | ACPI_LV_DEBUG_OBJECT)
+#define ACPI_DEBUG_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT)
+#define ACPI_NORMAL_DEFAULT (ACPI_LV_INIT | ACPI_LV_DEBUG_OBJECT)
#define ACPI_DEBUG_ALL (ACPI_LV_AML_DISASSEMBLE | ACPI_LV_ALL_EXCEPTIONS | ACPI_LV_ALL)
diff --git a/usr/src/uts/intel/sys/acpi/acparser.h b/usr/src/uts/intel/sys/acpi/acparser.h
index 91cc58cef0..c45bd63764 100644
--- a/usr/src/uts/intel/sys/acpi/acparser.h
+++ b/usr/src/uts/intel/sys/acpi/acparser.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Module Name: acparser.h - AML Parser subcomponent prototypes and defines
- * $Revision: 1.81 $
+ * $Revision: 1.84 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -211,6 +211,10 @@ char *
AcpiPsGetOpcodeName (
UINT16 Opcode);
+UINT8
+AcpiPsGetArgumentCount (
+ UINT32 OpType);
+
/*
* psparse - top level parsing routines
diff --git a/usr/src/uts/intel/sys/acpi/acpi.h b/usr/src/uts/intel/sys/acpi/acpi.h
index ddaeec42d0..dcdf2ebaa5 100644
--- a/usr/src/uts/intel/sys/acpi/acpi.h
+++ b/usr/src/uts/intel/sys/acpi/acpi.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acpi.h - Master include file, Publics and external data.
- * $Revision: 1.60 $
+ * $Revision: 1.62 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/sys/acpi/acpiosxf.h b/usr/src/uts/intel/sys/acpi/acpiosxf.h
index 2143368412..d3fb8074eb 100644
--- a/usr/src/uts/intel/sys/acpi/acpiosxf.h
+++ b/usr/src/uts/intel/sys/acpi/acpiosxf.h
@@ -12,7 +12,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -171,10 +171,9 @@ AcpiOsTerminate (
/*
* ACPI Table interfaces
*/
-ACPI_STATUS
+ACPI_PHYSICAL_ADDRESS
AcpiOsGetRootPointer (
- UINT32 Flags,
- ACPI_POINTER *Address);
+ void);
ACPI_STATUS
AcpiOsPredefinedOverride (
@@ -272,11 +271,10 @@ void
AcpiOsFree (
void * Memory);
-ACPI_STATUS
+void *
AcpiOsMapMemory (
- ACPI_PHYSICAL_ADDRESS PhysicalAddress,
- ACPI_SIZE Size,
- void **LogicalAddress);
+ ACPI_PHYSICAL_ADDRESS Where,
+ ACPI_SIZE Length);
void
AcpiOsUnmapMemory (
diff --git a/usr/src/uts/intel/sys/acpi/acpixf.h b/usr/src/uts/intel/sys/acpi/acpixf.h
index e0a94341cb..364e9c89ea 100644
--- a/usr/src/uts/intel/sys/acpi/acpixf.h
+++ b/usr/src/uts/intel/sys/acpi/acpixf.h
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -126,6 +126,12 @@
* Global interfaces
*/
ACPI_STATUS
+AcpiInitializeTables (
+ ACPI_TABLE_DESC *InitialStorage,
+ UINT32 InitialTableCount,
+ BOOLEAN AllowResize);
+
+ACPI_STATUS
AcpiInitializeSubsystem (
void);
@@ -157,6 +163,10 @@ ACPI_STATUS
AcpiGetSystemInfo (
ACPI_BUFFER *RetBuffer);
+ACPI_STATUS
+AcpiGetStatistics (
+ ACPI_STATISTICS *Stats);
+
const char *
AcpiFormatException (
ACPI_STATUS Exception);
@@ -190,40 +200,42 @@ AcpiFree (
* ACPI table manipulation interfaces
*/
ACPI_STATUS
-AcpiFindRootPointer (
- UINT32 Flags,
- ACPI_POINTER *RsdpAddress);
-
-ACPI_STATUS
-AcpiLoadTables (
+AcpiReallocateRootTable (
void);
ACPI_STATUS
-AcpiLoadTable (
- ACPI_TABLE_HEADER *TablePtr);
+AcpiFindRootPointer (
+ ACPI_SIZE *RsdpAddress);
ACPI_STATUS
-AcpiUnloadTable (
- ACPI_TABLE_TYPE TableType);
+AcpiLoadTables (
+ void);
ACPI_STATUS
AcpiGetTableHeader (
- ACPI_TABLE_TYPE TableType,
+ ACPI_STRING Signature,
UINT32 Instance,
ACPI_TABLE_HEADER *OutTableHeader);
ACPI_STATUS
AcpiGetTable (
- ACPI_TABLE_TYPE TableType,
+ ACPI_STRING Signature,
UINT32 Instance,
- ACPI_BUFFER *RetBuffer);
+ ACPI_TABLE_HEADER **OutTable);
ACPI_STATUS
-AcpiGetFirmwareTable (
- ACPI_STRING Signature,
- UINT32 Instance,
- UINT32 Flags,
- ACPI_TABLE_HEADER **TablePointer);
+AcpiGetTableByIndex (
+ UINT32 TableIndex,
+ ACPI_TABLE_HEADER **OutTable);
+
+ACPI_STATUS
+AcpiInstallTableHandler (
+ ACPI_TABLE_HANDLER Handler,
+ void *Context);
+
+ACPI_STATUS
+AcpiRemoveTableHandler (
+ ACPI_TABLE_HANDLER Handler);
/*
@@ -510,14 +522,17 @@ AcpiResourceToAddress64 (
ACPI_STATUS
AcpiGetRegister (
UINT32 RegisterId,
- UINT32 *ReturnValue,
- UINT32 Flags);
+ UINT32 *ReturnValue);
+
+ACPI_STATUS
+AcpiGetRegisterUnlocked (
+ UINT32 RegisterId,
+ UINT32 *ReturnValue);
ACPI_STATUS
AcpiSetRegister (
UINT32 RegisterId,
- UINT32 Value,
- UINT32 Flags);
+ UINT32 Value);
ACPI_STATUS
AcpiSetFirmwareWakingVector (
diff --git a/usr/src/uts/intel/sys/acpi/acresrc.h b/usr/src/uts/intel/sys/acpi/acresrc.h
index 9c0cd3c080..5714f3acb2 100644
--- a/usr/src/uts/intel/sys/acpi/acresrc.h
+++ b/usr/src/uts/intel/sys/acpi/acresrc.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acresrc.h - Resource Manager function prototypes
- * $Revision: 1.59 $
+ * $Revision: 1.62 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -170,6 +170,7 @@ typedef const struct acpi_rsconvert_info
#define ACPI_RSC_BITMASK16 18
#define ACPI_RSC_EXIT_NE 19
#define ACPI_RSC_EXIT_LE 20
+#define ACPI_RSC_EXIT_EQ 21
/* Resource Conversion sub-opcodes */
diff --git a/usr/src/uts/intel/sys/acpi/acstruct.h b/usr/src/uts/intel/sys/acpi/acstruct.h
index 87744cced2..f01f73455c 100644
--- a/usr/src/uts/intel/sys/acpi/acstruct.h
+++ b/usr/src/uts/intel/sys/acpi/acstruct.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acstruct.h - Internal structs
- * $Revision: 1.44 $
+ * $Revision: 1.50 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -156,12 +156,15 @@ typedef struct acpi_walk_state
UINT16 Opcode; /* Current AML opcode */
UINT8 NextOpInfo; /* Info about NextOp */
UINT8 NumOperands; /* Stack pointer for Operands[] array */
+ UINT8 OperandIndex; /* Index into operand stack, to be used by AcpiDsObjStackPush */
ACPI_OWNER_ID OwnerId; /* Owner of objects created during the walk */
BOOLEAN LastPredicate; /* Result of last predicate */
UINT8 CurrentResult;
UINT8 ReturnUsed;
UINT8 ScopeDepth;
UINT8 PassNumber; /* Parse pass during table load */
+ UINT8 ResultSize; /* Total elements for the result stack */
+ UINT8 ResultCount; /* Current number of occupied elements of result stack */
UINT32 AmlOffset;
UINT32 ArgTypes;
UINT32 MethodBreakpoint; /* For single stepping */
@@ -181,7 +184,6 @@ typedef struct acpi_walk_state
union acpi_operand_object **CallerReturnDesc;
ACPI_GENERIC_STATE *ControlState; /* List of control states (nested IFs) */
struct acpi_namespace_node *DeferredNode; /* Used when executing deferred opcodes */
- struct acpi_gpe_event_info *GpeEventInfo; /* Info for GPE (_Lxx/_Exx methods only */
union acpi_operand_object *ImplicitReturnObj;
struct acpi_namespace_node *MethodCallNode; /* Called method Node*/
ACPI_PARSE_OBJECT *MethodCallOp; /* MethodCall Op if running a method */
@@ -218,7 +220,8 @@ typedef struct acpi_init_walk_info
UINT16 BufferInit;
UINT16 PackageInit;
UINT16 ObjectCount;
- ACPI_TABLE_DESC *TableDesc;
+ ACPI_OWNER_ID OwnerId;
+ UINT32 TableIndex;
} ACPI_INIT_WALK_INFO;
@@ -276,18 +279,13 @@ typedef struct acpi_evaluate_info
ACPI_OPERAND_OBJECT **Parameters;
ACPI_NAMESPACE_NODE *ResolvedNode;
ACPI_OPERAND_OBJECT *ReturnObject;
+ UINT8 ParamCount;
UINT8 PassNumber;
- UINT8 ParameterType;
UINT8 ReturnObjectType;
UINT8 Flags;
} ACPI_EVALUATE_INFO;
-/* Types for ParameterType above */
-
-#define ACPI_PARAM_ARGS 0
-#define ACPI_PARAM_GPE 1
-
/* Values for Flags above */
#define ACPI_IGNORE_RETURN_VALUE 1
diff --git a/usr/src/uts/intel/sys/acpi/actables.h b/usr/src/uts/intel/sys/acpi/actables.h
index 78c6338896..93cc7907c6 100644
--- a/usr/src/uts/intel/sys/acpi/actables.h
+++ b/usr/src/uts/intel/sys/acpi/actables.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actables.h - ACPI table management
- * $Revision: 1.55 $
+ * $Revision: 1.65 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -118,161 +118,126 @@
#define __ACTABLES_H__
-/* Used in AcpiTbMapAcpiTable for size parameter if table header is to be used */
-
-#define SIZE_IN_HEADER 0
-
-
-/*
- * tbconvrt - Table conversion routines
- */
-ACPI_STATUS
-AcpiTbConvertToXsdt (
- ACPI_TABLE_DESC *TableInfo);
-
-ACPI_STATUS
-AcpiTbConvertTableFadt (
- void);
-
ACPI_STATUS
-AcpiTbBuildCommonFacs (
- ACPI_TABLE_DESC *TableInfo);
-
-UINT32
-AcpiTbGetTableCount (
- RSDP_DESCRIPTOR *RSDP,
- ACPI_TABLE_HEADER *RSDT);
-
+AcpiAllocateRootTable (
+ UINT32 InitialTableCount);
/*
- * tbget - Table "get" routines
+ * tbfadt - FADT parse/convert/validate
*/
-ACPI_STATUS
-AcpiTbGetTable (
- ACPI_POINTER *Address,
- ACPI_TABLE_DESC *TableInfo);
-
-ACPI_STATUS
-AcpiTbGetTableHeader (
- ACPI_POINTER *Address,
- ACPI_TABLE_HEADER *ReturnHeader);
-
-ACPI_STATUS
-AcpiTbGetTableBody (
- ACPI_POINTER *Address,
- ACPI_TABLE_HEADER *Header,
- ACPI_TABLE_DESC *TableInfo);
-
-ACPI_STATUS
-AcpiTbGetTablePtr (
- ACPI_TABLE_TYPE TableType,
- UINT32 Instance,
- ACPI_TABLE_HEADER **TablePtrLoc);
-
-ACPI_STATUS
-AcpiTbVerifyRsdp (
- ACPI_POINTER *Address);
-
void
-AcpiTbGetRsdtAddress (
- ACPI_POINTER *OutAddress);
+AcpiTbParseFadt (
+ UINT32 TableIndex,
+ UINT8 Flags);
-ACPI_STATUS
-AcpiTbValidateRsdt (
- ACPI_TABLE_HEADER *TablePtr);
+void
+AcpiTbCreateLocalFadt (
+ ACPI_TABLE_HEADER *Table,
+ UINT32 Length);
/*
- * tbgetall - get multiple required tables
+ * tbfind - find ACPI table
*/
ACPI_STATUS
-AcpiTbGetRequiredTables (
- void);
+AcpiTbFindTable (
+ char *Signature,
+ char *OemId,
+ char *OemTableId,
+ UINT32 *TableIndex);
/*
- * tbinstall - Table installation
+ * tbinstal - Table removal and deletion
*/
ACPI_STATUS
-AcpiTbInstallTable (
- ACPI_TABLE_DESC *TableInfo);
+AcpiTbResizeRootTableList (
+ void);
ACPI_STATUS
-AcpiTbRecognizeTable (
- ACPI_TABLE_DESC *TableInfo,
- UINT8 SearchType);
+AcpiTbVerifyTable (
+ ACPI_TABLE_DESC *TableDesc);
ACPI_STATUS
-AcpiTbInitTableDescriptor (
- ACPI_TABLE_TYPE TableType,
- ACPI_TABLE_DESC *TableInfo);
+AcpiTbAddTable (
+ ACPI_TABLE_DESC *TableDesc,
+ UINT32 *TableIndex);
+ACPI_STATUS
+AcpiTbStoreTable (
+ ACPI_PHYSICAL_ADDRESS Address,
+ ACPI_TABLE_HEADER *Table,
+ UINT32 Length,
+ UINT8 Flags,
+ UINT32 *TableIndex);
-/*
- * tbremove - Table removal and deletion
- */
void
-AcpiTbDeleteAllTables (
- void);
+AcpiTbDeleteTable (
+ ACPI_TABLE_DESC *TableDesc);
void
-AcpiTbDeleteTablesByType (
- ACPI_TABLE_TYPE Type);
+AcpiTbTerminate (
+ void);
void
-AcpiTbDeleteSingleTable (
- ACPI_TABLE_DESC *TableDesc);
+AcpiTbDeleteNamespaceByOwner (
+ UINT32 TableIndex);
-ACPI_TABLE_DESC *
-AcpiTbUninstallTable (
- ACPI_TABLE_DESC *TableDesc);
-
-
-/*
- * tbxfroot - RSDP, RSDT utilities
- */
ACPI_STATUS
-AcpiTbFindTable (
- char *Signature,
- char *OemId,
- char *OemTableId,
- ACPI_TABLE_HEADER **TablePtr);
+AcpiTbAllocateOwnerId (
+ UINT32 TableIndex);
ACPI_STATUS
-AcpiTbGetTableRsdt (
- void);
+AcpiTbReleaseOwnerId (
+ UINT32 TableIndex);
ACPI_STATUS
-AcpiTbValidateRsdp (
- RSDP_DESCRIPTOR *Rsdp);
+AcpiTbGetOwnerId (
+ UINT32 TableIndex,
+ ACPI_OWNER_ID *OwnerId);
+
+BOOLEAN
+AcpiTbIsTableLoaded (
+ UINT32 TableIndex);
+
+void
+AcpiTbSetTableLoadedFlag (
+ UINT32 TableIndex,
+ BOOLEAN IsLoaded);
/*
- * tbutils - common table utilities
+ * tbutils - table manager utilities
*/
-ACPI_STATUS
-AcpiTbIsTableInstalled (
- ACPI_TABLE_DESC *NewTableDesc);
+BOOLEAN
+AcpiTbTablesLoaded (
+ void);
-ACPI_STATUS
-AcpiTbVerifyTableChecksum (
- ACPI_TABLE_HEADER *TableHeader);
+void
+AcpiTbPrintTableHeader(
+ ACPI_PHYSICAL_ADDRESS Address,
+ ACPI_TABLE_HEADER *Header);
UINT8
-AcpiTbSumTable (
- void *Buffer,
+AcpiTbChecksum (
+ UINT8 *Buffer,
UINT32 Length);
-UINT8
-AcpiTbGenerateChecksum (
- ACPI_TABLE_HEADER *Table);
+ACPI_STATUS
+AcpiTbVerifyChecksum (
+ ACPI_TABLE_HEADER *Table,
+ UINT32 Length);
void
-AcpiTbSetChecksum (
- ACPI_TABLE_HEADER *Table);
+AcpiTbInstallTable (
+ ACPI_PHYSICAL_ADDRESS Address,
+ UINT8 Flags,
+ char *Signature,
+ UINT32 TableIndex);
ACPI_STATUS
-AcpiTbValidateTableHeader (
- ACPI_TABLE_HEADER *TableHeader);
+AcpiTbParseRootTable (
+ ACPI_PHYSICAL_ADDRESS RsdpAddress,
+ UINT8 Flags);
#endif /* __ACTABLES_H__ */
diff --git a/usr/src/uts/intel/sys/acpi/actbl.h b/usr/src/uts/intel/sys/acpi/actbl.h
index c8b8539fab..1ad1e6bfea 100644
--- a/usr/src/uts/intel/sys/acpi/actbl.h
+++ b/usr/src/uts/intel/sys/acpi/actbl.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actbl.h - Basic ACPI Table Definitions
- * $Revision: 1.80 $
+ * $Revision: 1.85 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -121,15 +121,15 @@
* Values for description table header signatures. Useful because they make
* it more difficult to inadvertently type in the wrong signature.
*/
-#define DSDT_SIG "DSDT" /* Differentiated System Description Table */
-#define FADT_SIG "FACP" /* Fixed ACPI Description Table */
-#define FACS_SIG "FACS" /* Firmware ACPI Control Structure */
-#define PSDT_SIG "PSDT" /* Persistent System Description Table */
-#define RSDP_SIG "RSD PTR " /* Root System Description Pointer */
-#define RSDT_SIG "RSDT" /* Root System Description Table */
-#define XSDT_SIG "XSDT" /* Extended System Description Table */
-#define SSDT_SIG "SSDT" /* Secondary System Description Table */
-#define RSDP_NAME "RSDP"
+#define ACPI_SIG_DSDT "DSDT" /* Differentiated System Description Table */
+#define ACPI_SIG_FADT "FACP" /* Fixed ACPI Description Table */
+#define ACPI_SIG_FACS "FACS" /* Firmware ACPI Control Structure */
+#define ACPI_SIG_PSDT "PSDT" /* Persistent System Description Table */
+#define ACPI_SIG_RSDP "RSD PTR " /* Root System Description Pointer */
+#define ACPI_SIG_RSDT "RSDT" /* Root System Description Table */
+#define ACPI_SIG_XSDT "XSDT" /* Extended System Description Table */
+#define ACPI_SIG_SSDT "SSDT" /* Secondary System Description Table */
+#define ACPI_RSDP_NAME "RSDP" /* Short name for RSDP, not signature */
/*
@@ -158,32 +158,33 @@
*
******************************************************************************/
-#define ACPI_TABLE_HEADER_DEF \
- char Signature[4]; /* ASCII table signature */\
- UINT32 Length; /* Length of table in bytes, including this header */\
- UINT8 Revision; /* ACPI Specification minor version # */\
- UINT8 Checksum; /* To make sum of entire table == 0 */\
- char OemId[6]; /* ASCII OEM identification */\
- char OemTableId[8]; /* ASCII OEM table identification */\
- UINT32 OemRevision; /* OEM revision number */\
- char AslCompilerId[4]; /* ASCII ASL compiler vendor ID */\
- UINT32 AslCompilerRevision; /* ASL compiler version */
-
typedef struct acpi_table_header
{
- ACPI_TABLE_HEADER_DEF
+ char Signature[ACPI_NAME_SIZE]; /* ASCII table signature */
+ UINT32 Length; /* Length of table in bytes, including this header */
+ UINT8 Revision; /* ACPI Specification minor version # */
+ UINT8 Checksum; /* To make sum of entire table == 0 */
+ char OemId[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */
+ char OemTableId[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */
+ UINT32 OemRevision; /* OEM revision number */
+ char AslCompilerId[ACPI_NAME_SIZE]; /* ASCII ASL compiler vendor ID */
+ UINT32 AslCompilerRevision; /* ASL compiler version */
} ACPI_TABLE_HEADER;
/*
* GAS - Generic Address Structure (ACPI 2.0+)
+ *
+ * Note: Since this structure is used in the ACPI tables, it is byte aligned.
+ * If misalignment is not supported, access to the Address field must be
+ * performed with care.
*/
typedef struct acpi_generic_address
{
- UINT8 AddressSpaceId; /* Address space where struct or register exists */
- UINT8 RegisterBitWidth; /* Size in bits of given register */
- UINT8 RegisterBitOffset; /* Bit offset within the register */
+ UINT8 SpaceId; /* Address space where struct or register exists */
+ UINT8 BitWidth; /* Size in bits of given register */
+ UINT8 BitOffset; /* Bit offset within the register */
UINT8 AccessWidth; /* Minimum Access size (ACPI 3.0) */
UINT64 Address; /* 64-bit address of struct or register */
@@ -196,19 +197,19 @@ typedef struct acpi_generic_address
*
******************************************************************************/
-typedef struct rsdp_descriptor
+typedef struct acpi_table_rsdp
{
- char Signature[8]; /* ACPI signature, contains "RSD PTR " */
- UINT8 Checksum; /* ACPI 1.0 checksum */
- char OemId[6]; /* OEM identification */
- UINT8 Revision; /* Must be (0) for ACPI 1.0 or (2) for ACPI 2.0+ */
- UINT32 RsdtPhysicalAddress; /* 32-bit physical address of the RSDT */
- UINT32 Length; /* Table length in bytes, including header (ACPI 2.0+) */
- UINT64 XsdtPhysicalAddress; /* 64-bit physical address of the XSDT (ACPI 2.0+) */
- UINT8 ExtendedChecksum; /* Checksum of entire table (ACPI 2.0+) */
- UINT8 Reserved[3]; /* Reserved, must be zero */
-
-} RSDP_DESCRIPTOR;
+ char Signature[8]; /* ACPI signature, contains "RSD PTR " */
+ UINT8 Checksum; /* ACPI 1.0 checksum */
+ char OemId[ACPI_OEM_ID_SIZE]; /* OEM identification */
+ UINT8 Revision; /* Must be (0) for ACPI 1.0 or (2) for ACPI 2.0+ */
+ UINT32 RsdtPhysicalAddress; /* 32-bit physical address of the RSDT */
+ UINT32 Length; /* Table length in bytes, including header (ACPI 2.0+) */
+ UINT64 XsdtPhysicalAddress; /* 64-bit physical address of the XSDT (ACPI 2.0+) */
+ UINT8 ExtendedChecksum; /* Checksum of entire table (ACPI 2.0+) */
+ UINT8 Reserved[3]; /* Reserved, must be zero */
+
+} ACPI_TABLE_RSDP;
#define ACPI_RSDP_REV0_SIZE 20 /* Size of original ACPI 1.0 RSDP */
@@ -219,19 +220,19 @@ typedef struct rsdp_descriptor
*
******************************************************************************/
-typedef struct rsdt_descriptor
+typedef struct acpi_table_rsdt
{
- ACPI_TABLE_HEADER_DEF
- UINT32 TableOffsetEntry[1]; /* Array of pointers to ACPI tables */
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT32 TableOffsetEntry[1]; /* Array of pointers to ACPI tables */
-} RSDT_DESCRIPTOR;
+} ACPI_TABLE_RSDT;
-typedef struct xsdt_descriptor
+typedef struct acpi_table_xsdt
{
- ACPI_TABLE_HEADER_DEF
- UINT64 TableOffsetEntry[1]; /* Array of pointers to ACPI tables */
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT64 TableOffsetEntry[1]; /* Array of pointers to ACPI tables */
-} XSDT_DESCRIPTOR;
+} ACPI_TABLE_XSDT;
/*******************************************************************************
@@ -240,40 +241,28 @@ typedef struct xsdt_descriptor
*
******************************************************************************/
-typedef struct facs_descriptor
+typedef struct acpi_table_facs
{
char Signature[4]; /* ASCII table signature */
UINT32 Length; /* Length of structure, in bytes */
UINT32 HardwareSignature; /* Hardware configuration signature */
UINT32 FirmwareWakingVector; /* 32-bit physical address of the Firmware Waking Vector */
UINT32 GlobalLock; /* Global Lock for shared hardware resources */
-
- /* Flags (32 bits) */
-
- UINT8 S4Bios_f : 1; /* 00: S4BIOS support is present */
- UINT8 : 7; /* 01-07: Reserved, must be zero */
- UINT8 Reserved1[3]; /* 08-31: Reserved, must be zero */
-
+ UINT32 Flags;
UINT64 XFirmwareWakingVector; /* 64-bit version of the Firmware Waking Vector (ACPI 2.0+) */
UINT8 Version; /* Version of this table (ACPI 2.0+) */
UINT8 Reserved[31]; /* Reserved, must be zero */
-} FACS_DESCRIPTOR;
+} ACPI_TABLE_FACS;
-#define ACPI_GLOCK_PENDING 0x01 /* 00: Pending global lock ownership */
-#define ACPI_GLOCK_OWNED 0x02 /* 01: Global lock is owned */
+/* Flag macros */
+#define ACPI_FACS_S4_BIOS_PRESENT (1) /* 00: S4BIOS support is present */
-/*
- * Common FACS - This is a version-independent FACS structure used for internal use only
- */
-typedef struct acpi_common_facs
-{
- UINT32 *GlobalLock;
- UINT64 *FirmwareWakingVector;
- UINT8 VectorWidth;
+/* Global lock flags */
-} ACPI_COMMON_FACS;
+#define ACPI_GLOCK_PENDING 0x01 /* 00: Pending global lock ownership */
+#define ACPI_GLOCK_OWNED 0x02 /* 01: Global lock is owned */
/*******************************************************************************
@@ -284,135 +273,104 @@ typedef struct acpi_common_facs
/* Fields common to all versions of the FADT */
-#define ACPI_FADT_COMMON \
- ACPI_TABLE_HEADER_DEF \
- UINT32 V1_FirmwareCtrl; /* 32-bit physical address of FACS */ \
- UINT32 V1_Dsdt; /* 32-bit physical address of DSDT */ \
- UINT8 Reserved1; /* System Interrupt Model isn't used in ACPI 2.0*/ \
- UINT8 Prefer_PM_Profile; /* Conveys preferred power management profile to OSPM. */ \
- UINT16 SciInt; /* System vector of SCI interrupt */ \
- UINT32 SmiCmd; /* Port address of SMI command port */ \
- UINT8 AcpiEnable; /* Value to write to smi_cmd to enable ACPI */ \
- UINT8 AcpiDisable; /* Value to write to smi_cmd to disable ACPI */ \
- UINT8 S4BiosReq; /* Value to write to SMI CMD to enter S4BIOS state */ \
- UINT8 PstateCnt; /* Processor performance state control*/ \
- UINT32 V1_Pm1aEvtBlk; /* Port address of Power Mgt 1a Event Reg Blk */ \
- UINT32 V1_Pm1bEvtBlk; /* Port address of Power Mgt 1b Event Reg Blk */ \
- UINT32 V1_Pm1aCntBlk; /* Port address of Power Mgt 1a Control Reg Blk */ \
- UINT32 V1_Pm1bCntBlk; /* Port address of Power Mgt 1b Control Reg Blk */ \
- UINT32 V1_Pm2CntBlk; /* Port address of Power Mgt 2 Control Reg Blk */ \
- UINT32 V1_PmTmrBlk; /* Port address of Power Mgt Timer Ctrl Reg Blk */ \
- UINT32 V1_Gpe0Blk; /* Port addr of General Purpose AcpiEvent 0 Reg Blk */ \
- UINT32 V1_Gpe1Blk; /* Port addr of General Purpose AcpiEvent 1 Reg Blk */ \
- UINT8 Pm1EvtLen; /* Byte Length of ports at pm1X_evt_blk */ \
- UINT8 Pm1CntLen; /* Byte Length of ports at pm1X_cnt_blk */ \
- UINT8 Pm2CntLen; /* Byte Length of ports at pm2_cnt_blk */ \
- UINT8 PmTmLen; /* Byte Length of ports at pm_tm_blk */ \
- UINT8 Gpe0BlkLen; /* Byte Length of ports at gpe0_blk */ \
- UINT8 Gpe1BlkLen; /* Byte Length of ports at gpe1_blk */ \
- UINT8 Gpe1Base; /* Offset in gpe model where gpe1 events start */ \
- UINT8 CstCnt; /* Support for the _CST object and C States change notification.*/ \
- UINT16 Plvl2Lat; /* Worst case HW latency to enter/exit C2 state */ \
- UINT16 Plvl3Lat; /* Worst case HW latency to enter/exit C3 state */ \
- UINT16 FlushSize; /* Processor's memory cache line width, in bytes */ \
- UINT16 FlushStride; /* Number of flush strides that need to be read */ \
- UINT8 DutyOffset; /* Processor's duty cycle index in processor's P_CNT reg*/ \
- UINT8 DutyWidth; /* Processor's duty cycle value bit width in P_CNT register.*/ \
- UINT8 DayAlrm; /* Index to day-of-month alarm in RTC CMOS RAM */ \
- UINT8 MonAlrm; /* Index to month-of-year alarm in RTC CMOS RAM */ \
- UINT8 Century; /* Index to century in RTC CMOS RAM */ \
- UINT16 IapcBootArch; /* IA-PC Boot Architecture Flags. See Table 5-10 for description*/ \
- UINT8 Reserved2; /* Reserved, must be zero */
-
-
-/*
- * ACPI 2.0+ FADT
- */
-typedef struct fadt_descriptor
+typedef struct acpi_table_fadt
{
- ACPI_FADT_COMMON
-
- /* Flags (32 bits) */
-
- UINT8 WbInvd : 1; /* 00: The wbinvd instruction works properly */
- UINT8 WbInvdFlush : 1; /* 01: The wbinvd flushes but does not invalidate */
- UINT8 ProcC1 : 1; /* 02: All processors support C1 state */
- UINT8 Plvl2Up : 1; /* 03: C2 state works on MP system */
- UINT8 PwrButton : 1; /* 04: Power button is handled as a generic feature */
- UINT8 SleepButton : 1; /* 05: Sleep button is handled as a generic feature, or not present */
- UINT8 FixedRTC : 1; /* 06: RTC wakeup stat not in fixed register space */
- UINT8 Rtcs4 : 1; /* 07: RTC wakeup stat not possible from S4 */
- UINT8 TmrValExt : 1; /* 08: tmr_val is 32 bits 0=24-bits */
- UINT8 DockCap : 1; /* 09: Docking supported */
- UINT8 ResetRegSup : 1; /* 10: System reset via the FADT RESET_REG supported */
- UINT8 SealedCase : 1; /* 11: No internal expansion capabilities and case is sealed */
- UINT8 Headless : 1; /* 12: No local video capabilities or local input devices */
- UINT8 CpuSwSleep : 1; /* 13: Must execute native instruction after writing SLP_TYPx register */
-
- UINT8 PciExpWak : 1; /* 14: System supports PCIEXP_WAKE (STS/EN) bits (ACPI 3.0) */
- UINT8 UsePlatformClock : 1; /* 15: OSPM should use platform-provided timer (ACPI 3.0) */
- UINT8 S4RtcStsValid : 1; /* 16: Contents of RTC_STS valid after S4 wake (ACPI 3.0) */
- UINT8 RemotePowerOnCapable : 1; /* 17: System is compatible with remote power on (ACPI 3.0) */
- UINT8 ForceApicClusterModel : 1; /* 18: All local APICs must use cluster model (ACPI 3.0) */
- UINT8 ForceApicPhysicalDestinationMode : 1; /* 19: All local xAPICs must use physical dest mode (ACPI 3.0) */
- UINT8 : 4; /* 20-23: Reserved, must be zero */
- UINT8 Reserved3; /* 24-31: Reserved, must be zero */
-
- ACPI_GENERIC_ADDRESS ResetRegister; /* Reset register address in GAS format */
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT32 Facs; /* 32-bit physical address of FACS */
+ UINT32 Dsdt; /* 32-bit physical address of DSDT */
+ UINT8 Model; /* System Interrupt Model (ACPI 1.0) - not used in ACPI 2.0+ */
+ UINT8 PreferredProfile; /* Conveys preferred power management profile to OSPM. */
+ UINT16 SciInterrupt; /* System vector of SCI interrupt */
+ UINT32 SmiCommand; /* 32-bit Port address of SMI command port */
+ UINT8 AcpiEnable; /* Value to write to smi_cmd to enable ACPI */
+ UINT8 AcpiDisable; /* Value to write to smi_cmd to disable ACPI */
+ UINT8 S4BiosRequest; /* Value to write to SMI CMD to enter S4BIOS state */
+ UINT8 PstateControl; /* Processor performance state control*/
+ UINT32 Pm1aEventBlock; /* 32-bit Port address of Power Mgt 1a Event Reg Blk */
+ UINT32 Pm1bEventBlock; /* 32-bit Port address of Power Mgt 1b Event Reg Blk */
+ UINT32 Pm1aControlBlock; /* 32-bit Port address of Power Mgt 1a Control Reg Blk */
+ UINT32 Pm1bControlBlock; /* 32-bit Port address of Power Mgt 1b Control Reg Blk */
+ UINT32 Pm2ControlBlock; /* 32-bit Port address of Power Mgt 2 Control Reg Blk */
+ UINT32 PmTimerBlock; /* 32-bit Port address of Power Mgt Timer Ctrl Reg Blk */
+ UINT32 Gpe0Block; /* 32-bit Port address of General Purpose Event 0 Reg Blk */
+ UINT32 Gpe1Block; /* 32-bit Port address of General Purpose Event 1 Reg Blk */
+ UINT8 Pm1EventLength; /* Byte Length of ports at Pm1xEventBlock */
+ UINT8 Pm1ControlLength; /* Byte Length of ports at Pm1xControlBlock */
+ UINT8 Pm2ControlLength; /* Byte Length of ports at Pm2ControlBlock */
+ UINT8 PmTimerLength; /* Byte Length of ports at PmTimerBlock */
+ UINT8 Gpe0BlockLength; /* Byte Length of ports at Gpe0Block */
+ UINT8 Gpe1BlockLength; /* Byte Length of ports at Gpe1Block */
+ UINT8 Gpe1Base; /* Offset in GPE number space where GPE1 events start */
+ UINT8 CstControl; /* Support for the _CST object and C States change notification */
+ UINT16 C2Latency; /* Worst case HW latency to enter/exit C2 state */
+ UINT16 C3Latency; /* Worst case HW latency to enter/exit C3 state */
+ UINT16 FlushSize; /* Processor's memory cache line width, in bytes */
+ UINT16 FlushStride; /* Number of flush strides that need to be read */
+ UINT8 DutyOffset; /* Processor duty cycle index in processor's P_CNT reg*/
+ UINT8 DutyWidth; /* Processor duty cycle value bit width in P_CNT register.*/
+ UINT8 DayAlarm; /* Index to day-of-month alarm in RTC CMOS RAM */
+ UINT8 MonthAlarm; /* Index to month-of-year alarm in RTC CMOS RAM */
+ UINT8 Century; /* Index to century in RTC CMOS RAM */
+ UINT16 BootFlags; /* IA-PC Boot Architecture Flags. See Table 5-10 for description */
+ UINT8 Reserved; /* Reserved, must be zero */
+ UINT32 Flags; /* Miscellaneous flag bits (see below for individual flags) */
+ ACPI_GENERIC_ADDRESS ResetRegister; /* 64-bit address of the Reset register */
UINT8 ResetValue; /* Value to write to the ResetRegister port to reset the system */
- UINT8 Reserved4[3]; /* These three bytes must be zero */
- UINT64 XFirmwareCtrl; /* 64-bit physical address of FACS */
+ UINT8 Reserved4[3]; /* Reserved, must be zero */
+ UINT64 XFacs; /* 64-bit physical address of FACS */
UINT64 XDsdt; /* 64-bit physical address of DSDT */
- ACPI_GENERIC_ADDRESS XPm1aEvtBlk; /* Extended Power Mgt 1a AcpiEvent Reg Blk address */
- ACPI_GENERIC_ADDRESS XPm1bEvtBlk; /* Extended Power Mgt 1b AcpiEvent Reg Blk address */
- ACPI_GENERIC_ADDRESS XPm1aCntBlk; /* Extended Power Mgt 1a Control Reg Blk address */
- ACPI_GENERIC_ADDRESS XPm1bCntBlk; /* Extended Power Mgt 1b Control Reg Blk address */
- ACPI_GENERIC_ADDRESS XPm2CntBlk; /* Extended Power Mgt 2 Control Reg Blk address */
- ACPI_GENERIC_ADDRESS XPmTmrBlk; /* Extended Power Mgt Timer Ctrl Reg Blk address */
- ACPI_GENERIC_ADDRESS XGpe0Blk; /* Extended General Purpose AcpiEvent 0 Reg Blk address */
- ACPI_GENERIC_ADDRESS XGpe1Blk; /* Extended General Purpose AcpiEvent 1 Reg Blk address */
-
-} FADT_DESCRIPTOR;
+ ACPI_GENERIC_ADDRESS XPm1aEventBlock; /* 64-bit Extended Power Mgt 1a Event Reg Blk address */
+ ACPI_GENERIC_ADDRESS XPm1bEventBlock; /* 64-bit Extended Power Mgt 1b Event Reg Blk address */
+ ACPI_GENERIC_ADDRESS XPm1aControlBlock; /* 64-bit Extended Power Mgt 1a Control Reg Blk address */
+ ACPI_GENERIC_ADDRESS XPm1bControlBlock; /* 64-bit Extended Power Mgt 1b Control Reg Blk address */
+ ACPI_GENERIC_ADDRESS XPm2ControlBlock; /* 64-bit Extended Power Mgt 2 Control Reg Blk address */
+ ACPI_GENERIC_ADDRESS XPmTimerBlock; /* 64-bit Extended Power Mgt Timer Ctrl Reg Blk address */
+ ACPI_GENERIC_ADDRESS XGpe0Block; /* 64-bit Extended General Purpose Event 0 Reg Blk address */
+ ACPI_GENERIC_ADDRESS XGpe1Block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */
+
+} ACPI_TABLE_FADT;
+
+
+/* FADT flags */
+
+#define ACPI_FADT_WBINVD (1) /* 00: The wbinvd instruction works properly */
+#define ACPI_FADT_WBINVD_FLUSH (1<<1) /* 01: The wbinvd flushes but does not invalidate */
+#define ACPI_FADT_C1_SUPPORTED (1<<2) /* 02: All processors support C1 state */
+#define ACPI_FADT_C2_MP_SUPPORTED (1<<3) /* 03: C2 state works on MP system */
+#define ACPI_FADT_POWER_BUTTON (1<<4) /* 04: Power button is handled as a generic feature */
+#define ACPI_FADT_SLEEP_BUTTON (1<<5) /* 05: Sleep button is handled as a generic feature, or not present */
+#define ACPI_FADT_FIXED_RTC (1<<6) /* 06: RTC wakeup stat not in fixed register space */
+#define ACPI_FADT_S4_RTC_WAKE (1<<7) /* 07: RTC wakeup stat not possible from S4 */
+#define ACPI_FADT_32BIT_TIMER (1<<8) /* 08: tmr_val is 32 bits 0=24-bits */
+#define ACPI_FADT_DOCKING_SUPPORTED (1<<9) /* 09: Docking supported */
+#define ACPI_FADT_RESET_REGISTER (1<<10) /* 10: System reset via the FADT RESET_REG supported */
+#define ACPI_FADT_SEALED_CASE (1<<11) /* 11: No internal expansion capabilities and case is sealed */
+#define ACPI_FADT_HEADLESS (1<<12) /* 12: No local video capabilities or local input devices */
+#define ACPI_FADT_SLEEP_TYPE (1<<13) /* 13: Must execute native instruction after writing SLP_TYPx register */
+#define ACPI_FADT_PCI_EXPRESS_WAKE (1<<14) /* 14: System supports PCIEXP_WAKE (STS/EN) bits (ACPI 3.0) */
+#define ACPI_FADT_PLATFORM_CLOCK (1<<15) /* 15: OSPM should use platform-provided timer (ACPI 3.0) */
+#define ACPI_FADT_S4_RTC_VALID (1<<16) /* 16: Contents of RTC_STS valid after S4 wake (ACPI 3.0) */
+#define ACPI_FADT_REMOTE_POWER_ON (1<<17) /* 17: System is compatible with remote power on (ACPI 3.0) */
+#define ACPI_FADT_APIC_CLUSTER (1<<18) /* 18: All local APICs must use cluster model (ACPI 3.0) */
+#define ACPI_FADT_APIC_PHYSICAL (1<<19) /* 19: All local xAPICs must use physical dest mode (ACPI 3.0) */
/*
- * "Down-revved" ACPI 2.0 FADT descriptor
- * Defined here to allow compiler to generate the length of the struct
+ * FADT Prefered Power Management Profiles
*/
-typedef struct fadt_descriptor_rev2_minus
+enum AcpiPreferedPmProfiles
{
- ACPI_FADT_COMMON
- UINT32 Flags;
- ACPI_GENERIC_ADDRESS ResetRegister; /* Reset register address in GAS format */
- UINT8 ResetValue; /* Value to write to the ResetRegister port to reset the system. */
- UINT8 Reserved7[3]; /* Reserved, must be zero */
+ PM_UNSPECIFIED = 0,
+ PM_DESKTOP = 1,
+ PM_MOBILE = 2,
+ PM_WORKSTATION = 3,
+ PM_ENTERPRISE_SERVER = 4,
+ PM_SOHO_SERVER = 5,
+ PM_APPLIANCE_PC = 6
+};
-} FADT_DESCRIPTOR_REV2_MINUS;
-
-/*
- * ACPI 1.0 FADT
- * Defined here to allow compiler to generate the length of the struct
- */
-typedef struct fadt_descriptor_rev1
-{
- ACPI_FADT_COMMON
- UINT32 Flags;
-
-} FADT_DESCRIPTOR_REV1;
-
-
-/* FADT: Prefered Power Management Profiles */
-
-#define PM_UNSPECIFIED 0
-#define PM_DESKTOP 1
-#define PM_MOBILE 2
-#define PM_WORKSTATION 3
-#define PM_ENTERPRISE_SERVER 4
-#define PM_SOHO_SERVER 5
-#define PM_APPLIANCE_PC 6
-
-/* FADT: Boot Arch Flags */
+/* FADT Boot Arch Flags */
#define BAF_LEGACY_DEVICES 0x0001
#define BAF_8042_KEYBOARD_CONTROLLER 0x0002
@@ -426,59 +384,12 @@ typedef struct fadt_descriptor_rev1
#pragma pack()
/*
- * This macro is temporary until the table bitfield flag definitions
- * are removed and replaced by a Flags field.
- */
-#define ACPI_FLAG_OFFSET(d,f,o) (UINT8) (ACPI_OFFSET (d,f) + \
- sizeof(((d *)0)->f) + o)
-/*
* Get the remaining ACPI tables
*/
#include "actbl1.h"
-/*
- * ACPI Table information. We save the table address, length,
- * and type of memory allocation (mapped or allocated) for each
- * table for 1) when we exit, and 2) if a new table is installed
- */
-#define ACPI_MEM_NOT_ALLOCATED 0
-#define ACPI_MEM_ALLOCATED 1
-#define ACPI_MEM_MAPPED 2
-
-/* Definitions for the Flags bitfield member of ACPI_TABLE_SUPPORT */
-
-#define ACPI_TABLE_SINGLE 0x00
-#define ACPI_TABLE_MULTIPLE 0x01
-#define ACPI_TABLE_EXECUTABLE 0x02
-
-#define ACPI_TABLE_ROOT 0x00
-#define ACPI_TABLE_PRIMARY 0x10
-#define ACPI_TABLE_SECONDARY 0x20
-#define ACPI_TABLE_ALL 0x30
-#define ACPI_TABLE_TYPE_MASK 0x30
-
-/* Data about each known table type */
-
-typedef struct acpi_table_support
-{
- char *Name;
- char *Signature;
- void **GlobalPtr;
- UINT8 SigLength;
- UINT8 Flags;
-
-} ACPI_TABLE_SUPPORT;
-
-
/* Macros used to generate offsets to specific table fields */
-#define ACPI_FACS_OFFSET(f) (UINT8) ACPI_OFFSET (FACS_DESCRIPTOR,f)
-#define ACPI_FADT_OFFSET(f) (UINT8) ACPI_OFFSET (FADT_DESCRIPTOR, f)
-#define ACPI_GAS_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_GENERIC_ADDRESS,f)
-#define ACPI_HDR_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_HEADER,f)
-#define ACPI_RSDP_OFFSET(f) (UINT8) ACPI_OFFSET (RSDP_DESCRIPTOR,f)
-
-#define ACPI_FADT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (FADT_DESCRIPTOR,f,o)
-#define ACPI_FACS_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (FACS_DESCRIPTOR,f,o)
+#define ACPI_FADT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_FADT, f)
#endif /* __ACTBL_H__ */
diff --git a/usr/src/uts/intel/sys/acpi/actbl1.h b/usr/src/uts/intel/sys/acpi/actbl1.h
index 86e38d8d13..021d3e8063 100644
--- a/usr/src/uts/intel/sys/acpi/actbl1.h
+++ b/usr/src/uts/intel/sys/acpi/actbl1.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actbl1.h - Additional ACPI table definitions
- * $Revision: 1.41 $
+ * $Revision: 1.51 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -133,27 +133,30 @@
* it more difficult to inadvertently type in the wrong signature.
*/
#define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
+#define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */
#define ACPI_SIG_BOOT "BOOT" /* Simple Boot Flag Table */
#define ACPI_SIG_CPEP "CPEP" /* Corrected Platform Error Polling table */
#define ACPI_SIG_DBGP "DBGP" /* Debug Port table */
+#define ACPI_SIG_DMAR "DMAR" /* DMA Remapping table */
#define ACPI_SIG_ECDT "ECDT" /* Embedded Controller Boot Resources Table */
+#define ACPI_SIG_EINJ "EINJ" /* Error Injection table */
+#define ACPI_SIG_ERST "ERST" /* Error Record Serialization Table */
+#define ACPI_SIG_HEST "HEST" /* Hardware Error Source Table */
#define ACPI_SIG_HPET "HPET" /* High Precision Event Timer table */
+#define ACPI_SIG_IBFT "IBFT" /* iSCSI Boot Firmware Table */
#define ACPI_SIG_MADT "APIC" /* Multiple APIC Description Table */
#define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
#define ACPI_SIG_SBST "SBST" /* Smart Battery Specification Table */
+#define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
#define ACPI_SIG_SLIT "SLIT" /* System Locality Distance Information Table */
#define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
#define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
#define ACPI_SIG_SRAT "SRAT" /* System Resource Affinity Table */
#define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */
+#define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */
+#define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */
#define ACPI_SIG_WDRT "WDRT" /* Watchdog Resource Table */
-/* Legacy names */
-
-#define APIC_SIG "APIC" /* Multiple APIC Description Table */
-#define BOOT_SIG "BOOT" /* Simple Boot Flag Table */
-#define SBST_SIG "SBST" /* Smart Battery Specification Table */
-
/*
* All tables must be byte-packed to match the ACPI specification, since
@@ -168,38 +171,68 @@
*/
+/* Common Subtable header (used in MADT, SRAT, etc.) */
+
+typedef struct acpi_subtable_header
+{
+ UINT8 Type;
+ UINT8 Length;
+
+} ACPI_SUBTABLE_HEADER;
+
+
+/* Common Subtable header for WHEA tables (EINJ, ERST, WDAT) */
+
+typedef struct acpi_whea_header
+{
+ UINT8 Action;
+ UINT8 Instruction;
+ UINT8 Flags;
+ UINT8 Reserved;
+ ACPI_GENERIC_ADDRESS RegisterRegion;
+ UINT64 Value; /* Value used with Read/Write register */
+ UINT64 Mask; /* Bitmask required for this register instruction */
+
+} ACPI_WHEA_HEADER;
+
+
/*******************************************************************************
*
* ASF - Alert Standard Format table (Signature "ASF!")
*
+ * Conforms to the Alert Standard Format Specification V2.0, 23 April 2003
+ *
******************************************************************************/
typedef struct acpi_table_asf
{
- ACPI_TABLE_HEADER_DEF
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
} ACPI_TABLE_ASF;
-#define ACPI_ASF_HEADER_DEF \
- UINT8 Type; \
- UINT8 Reserved; \
- UINT16 Length;
+
+/* ASF subtable header */
typedef struct acpi_asf_header
{
- ACPI_ASF_HEADER_DEF
+ UINT8 Type;
+ UINT8 Reserved;
+ UINT16 Length;
} ACPI_ASF_HEADER;
-/* Values for Type field */
+/* Values for Type field above */
-#define ASF_INFO 0
-#define ASF_ALERT 1
-#define ASF_CONTROL 2
-#define ASF_BOOT 3
-#define ASF_ADDRESS 4
-#define ASF_RESERVED 5
+enum AcpiAsfType
+{
+ ACPI_ASF_TYPE_INFO = 0,
+ ACPI_ASF_TYPE_ALERT = 1,
+ ACPI_ASF_TYPE_CONTROL = 2,
+ ACPI_ASF_TYPE_BOOT = 3,
+ ACPI_ASF_TYPE_ADDRESS = 4,
+ ACPI_ASF_TYPE_RESERVED = 5
+};
/*
* ASF subtables
@@ -209,7 +242,7 @@ typedef struct acpi_asf_header
typedef struct acpi_asf_info
{
- ACPI_ASF_HEADER_DEF
+ ACPI_ASF_HEADER Header;
UINT8 MinResetValue;
UINT8 MinPollInterval;
UINT16 SystemId;
@@ -223,32 +256,56 @@ typedef struct acpi_asf_info
typedef struct acpi_asf_alert
{
- ACPI_ASF_HEADER_DEF
+ ACPI_ASF_HEADER Header;
UINT8 AssertMask;
UINT8 DeassertMask;
UINT8 Alerts;
UINT8 DataLength;
- UINT8 Array[1];
} ACPI_ASF_ALERT;
+typedef struct acpi_asf_alert_data
+{
+ UINT8 Address;
+ UINT8 Command;
+ UINT8 Mask;
+ UINT8 Value;
+ UINT8 SensorType;
+ UINT8 Type;
+ UINT8 Offset;
+ UINT8 SourceType;
+ UINT8 Severity;
+ UINT8 SensorNumber;
+ UINT8 Entity;
+ UINT8 Instance;
+
+} ACPI_ASF_ALERT_DATA;
+
/* 2: ASF Remote Control */
typedef struct acpi_asf_remote
{
- ACPI_ASF_HEADER_DEF
+ ACPI_ASF_HEADER Header;
UINT8 Controls;
UINT8 DataLength;
UINT16 Reserved2;
- UINT8 Array[1];
} ACPI_ASF_REMOTE;
+typedef struct acpi_asf_control_data
+{
+ UINT8 Function;
+ UINT8 Address;
+ UINT8 Command;
+ UINT8 Value;
+
+} ACPI_ASF_CONTROL_DATA;
+
/* 3: ASF RMCP Boot Options */
typedef struct acpi_asf_rmcp
{
- ACPI_ASF_HEADER_DEF
+ ACPI_ASF_HEADER Header;
UINT8 Capabilities[7];
UINT8 CompletionCode;
UINT32 EnterpriseId;
@@ -263,23 +320,57 @@ typedef struct acpi_asf_rmcp
typedef struct acpi_asf_address
{
- ACPI_ASF_HEADER_DEF
+ ACPI_ASF_HEADER Header;
UINT8 EpromAddress;
UINT8 Devices;
- UINT8 SmbusAddresses[1];
} ACPI_ASF_ADDRESS;
/*******************************************************************************
*
+ * BERT - Boot Error Record Table
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_bert
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT32 RegionLength; /* Length of the boot error region */
+ UINT64 Address; /* Physical addresss of the error region */
+
+} ACPI_TABLE_BERT;
+
+
+/* Boot Error Region */
+
+typedef struct acpi_bert_region
+{
+ UINT32 BlockStatus;
+ UINT32 RawDataOffset;
+ UINT32 RawDataLength;
+ UINT32 DataLength;
+ UINT32 ErrorSeverity;
+
+} ACPI_BERT_REGION;
+
+/* BlockStatus Flags */
+
+#define ACPI_BERT_UNCORRECTABLE (1)
+#define ACPI_BERT_CORRECTABLE (2)
+#define ACPI_BERT_MULTIPLE_UNCORRECTABLE (4)
+#define ACPI_BERT_MULTIPLE_CORRECTABLE (8)
+
+
+/*******************************************************************************
+ *
* BOOT - Simple Boot Flag Table
*
******************************************************************************/
typedef struct acpi_table_boot
{
- ACPI_TABLE_HEADER_DEF
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
UINT8 CmosIndex; /* Index in CMOS RAM for the boot register */
UINT8 Reserved[3];
@@ -294,20 +385,21 @@ typedef struct acpi_table_boot
typedef struct acpi_table_cpep
{
- ACPI_TABLE_HEADER_DEF
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
UINT64 Reserved;
} ACPI_TABLE_CPEP;
+
/* Subtable */
typedef struct acpi_cpep_polling
{
UINT8 Type;
UINT8 Length;
- UINT8 ProcessorId; /* Processor ID */
- UINT8 ProcessorEid; /* Processor EID */
- UINT32 PollingInterval; /* Polling interval (msec) */
+ UINT8 Id; /* Processor ID */
+ UINT8 Eid; /* Processor EID */
+ UINT32 Interval; /* Polling interval (msec) */
} ACPI_CPEP_POLLING;
@@ -320,8 +412,8 @@ typedef struct acpi_cpep_polling
typedef struct acpi_table_dbgp
{
- ACPI_TABLE_HEADER_DEF
- UINT8 InterfaceType; /* 0=full 16550, 1=subset of 16550 */
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT8 Type; /* 0=full 16550, 1=subset of 16550 */
UINT8 Reserved[3];
ACPI_GENERIC_ADDRESS DebugPort;
@@ -330,263 +422,896 @@ typedef struct acpi_table_dbgp
/*******************************************************************************
*
+ * DMAR - DMA Remapping table
+ * From "Intel Virtualization Technology for Directed I/O", Sept. 2007
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_dmar
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT8 Width; /* Host Address Width */
+ UINT8 Flags;
+ UINT8 Reserved[10];
+
+} ACPI_TABLE_DMAR;
+
+/* Flags */
+
+#define ACPI_DMAR_INTR_REMAP (1)
+
+/* DMAR subtable header */
+
+typedef struct acpi_dmar_header
+{
+ UINT16 Type;
+ UINT16 Length;
+
+} ACPI_DMAR_HEADER;
+
+/* Values for subtable type in ACPI_DMAR_HEADER */
+
+enum AcpiDmarType
+{
+ ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
+ ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
+ ACPI_DMAR_TYPE_ATSR = 2,
+ ACPI_DMAR_TYPE_RESERVED = 3 /* 3 and greater are reserved */
+};
+
+typedef struct acpi_dmar_device_scope
+{
+ UINT8 EntryType;
+ UINT8 Length;
+ UINT16 Reserved;
+ UINT8 EnumerationId;
+ UINT8 Bus;
+
+} ACPI_DMAR_DEVICE_SCOPE;
+
+/* Values for EntryType in ACPI_DMAR_DEVICE_SCOPE */
+
+enum AcpiDmarScopeType
+{
+ ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
+ ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
+ ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
+ ACPI_DMAR_SCOPE_TYPE_IOAPIC = 3,
+ ACPI_DMAR_SCOPE_TYPE_HPET = 4,
+ ACPI_DMAR_SCOPE_TYPE_RESERVED = 5 /* 5 and greater are reserved */
+};
+
+typedef struct acpi_dmar_pci_path
+{
+ UINT8 Device;
+ UINT8 Function;
+
+} ACPI_DMAR_PCI_PATH;
+
+/*
+ * DMAR Sub-tables, correspond to Type in ACPI_DMAR_HEADER
+ */
+
+/* 0: Hardware Unit Definition */
+
+typedef struct acpi_dmar_hardware_unit
+{
+ ACPI_DMAR_HEADER Header;
+ UINT8 Flags;
+ UINT8 Reserved;
+ UINT16 Segment;
+ UINT64 Address; /* Register Base Address */
+
+} ACPI_DMAR_HARDWARE_UNIT;
+
+/* Flags */
+
+#define ACPI_DMAR_INCLUDE_ALL (1)
+
+/* 1: Reserved Memory Defininition */
+
+typedef struct acpi_dmar_reserved_memory
+{
+ ACPI_DMAR_HEADER Header;
+ UINT16 Reserved;
+ UINT16 Segment;
+ UINT64 BaseAddress; /* 4K aligned base address */
+ UINT64 EndAddress; /* 4K aligned limit address */
+
+} ACPI_DMAR_RESERVED_MEMORY;
+
+/* Flags */
+
+#define ACPI_DMAR_ALLOW_ALL (1)
+
+/* 2: Root Port ATS Capability Reporting Structure */
+
+typedef struct acpi_dmar_atsr
+{
+ ACPI_DMAR_HEADER Header;
+ UINT8 Flags;
+ UINT8 Reserved;
+ UINT16 Segment;
+
+} ACPI_DMAR_ATSR;
+
+/* Flags */
+
+#define ACPI_DMAR_ALL_PORTS (1)
+
+
+/*******************************************************************************
+ *
* ECDT - Embedded Controller Boot Resources Table
*
******************************************************************************/
-typedef struct ec_boot_resources
+typedef struct acpi_table_ecdt
{
- ACPI_TABLE_HEADER_DEF
- ACPI_GENERIC_ADDRESS EcControl; /* Address of EC command/status register */
- ACPI_GENERIC_ADDRESS EcData; /* Address of EC data register */
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ ACPI_GENERIC_ADDRESS Control; /* Address of EC command/status register */
+ ACPI_GENERIC_ADDRESS Data; /* Address of EC data register */
UINT32 Uid; /* Unique ID - must be same as the EC _UID method */
- UINT8 GpeBit; /* The GPE for the EC */
- UINT8 EcId[1]; /* Full namepath of the EC in the ACPI namespace */
+ UINT8 Gpe; /* The GPE for the EC */
+ UINT8 Id[1]; /* Full namepath of the EC in the ACPI namespace */
-} EC_BOOT_RESOURCES;
+} ACPI_TABLE_ECDT;
/*******************************************************************************
*
- * HPET - High Precision Event Timer table
+ * EINJ - Error Injection Table
*
******************************************************************************/
-typedef struct acpi_hpet_table
+typedef struct acpi_table_einj
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT32 HeaderLength;
+ UINT32 Reserved;
+ UINT32 Entries;
+
+} ACPI_TABLE_EINJ;
+
+/* EINJ Injection Instruction Entries (actions) */
+
+typedef struct acpi_einj_entry
+{
+ ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */
+
+} ACPI_EINJ_ENTRY;
+
+/* Values for Action field above */
+
+enum AcpiEinjActions
+{
+ ACPI_EINJ_BEGIN_OPERATION = 0,
+ ACPI_EINJ_GET_TRIGGER_TABLE = 1,
+ ACPI_EINJ_SET_ERROR_TYPE = 2,
+ ACPI_EINJ_GET_ERROR_TYPE = 3,
+ ACPI_EINJ_END_OPERATION = 4,
+ ACPI_EINJ_EXECUTE_OPERATION = 5,
+ ACPI_EINJ_CHECK_BUSY_STATUS = 6,
+ ACPI_EINJ_GET_COMMAND_STATUS = 7,
+ ACPI_EINJ_ACTION_RESERVED = 8, /* 8 and greater are reserved */
+ ACPI_EINJ_TRIGGER_ERROR = 0xFF /* Except for this value */
+};
+
+/* Values for Instruction field above */
+
+enum AcpiEinjInstructions
{
- ACPI_TABLE_HEADER_DEF
- UINT32 HardwareId; /* Hardware ID of event timer block */
- ACPI_GENERIC_ADDRESS BaseAddress; /* Address of event timer block */
- UINT8 HpetNumber; /* HPET sequence number */
- UINT16 ClockTick; /* Main counter min tick, periodic mode */
- UINT8 Attributes;
+ ACPI_EINJ_READ_REGISTER = 0,
+ ACPI_EINJ_READ_REGISTER_VALUE = 1,
+ ACPI_EINJ_WRITE_REGISTER = 2,
+ ACPI_EINJ_WRITE_REGISTER_VALUE = 3,
+ ACPI_EINJ_NOOP = 4,
+ ACPI_EINJ_INSTRUCTION_RESERVED = 5 /* 5 and greater are reserved */
+};
-} HPET_TABLE;
+/* EINJ Trigger Error Action Table */
-#if 0 /* HPET flags to be converted to macros */
- struct /* Flags (8 bits) */
- {
- UINT8 PageProtect :1; /* 00: No page protection */
- UINT8 PageProtect4 :1; /* 01: 4KB page protected */
- UINT8 PageProtect64 :1; /* 02: 64KB page protected */
- UINT8 :5; /* 03-07: Reserved, must be zero */
- } Flags;
-#endif
+typedef struct acpi_einj_trigger
+{
+ UINT32 HeaderSize;
+ UINT32 Revision;
+ UINT32 TableSize;
+ UINT32 EntryCount;
+
+} ACPI_EINJ_TRIGGER;
/*******************************************************************************
*
- * MADT - Multiple APIC Description Table
+ * ERST - Error Record Serialization Table
*
******************************************************************************/
-typedef struct multiple_apic_table
+typedef struct acpi_table_erst
{
- ACPI_TABLE_HEADER_DEF
- UINT32 LocalApicAddress; /* Physical address of local APIC */
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT32 HeaderLength;
+ UINT32 Reserved;
+ UINT32 Entries;
+
+} ACPI_TABLE_ERST;
+
+/* ERST Serialization Entries (actions) */
- /* Flags (32 bits) */
+typedef struct acpi_erst_entry
+{
+ ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */
- UINT8 PCATCompat : 1; /* 00: System also has dual 8259s */
- UINT8 : 7; /* 01-07: Reserved, must be zero */
- UINT8 Reserved1[3]; /* 08-31: Reserved, must be zero */
+} ACPI_ERST_ENTRY;
-} MULTIPLE_APIC_TABLE;
+/* Values for Action field above */
-/* Values for MADT PCATCompat */
+enum AcpiErstActions
+{
+ ACPI_ERST_BEGIN_WRITE_OPERATION = 0,
+ ACPI_ERST_BEGIN_READ_OPERATION = 1,
+ ACPI_ERST_BETGIN_CLEAR_OPERATION= 2,
+ ACPI_ERST_END_OPERATION = 3,
+ ACPI_ERST_SET_RECORD_OFFSET = 4,
+ ACPI_ERST_EXECUTE_OPERATION = 5,
+ ACPI_ERST_CHECK_BUSY_STATUS = 6,
+ ACPI_ERST_GET_COMMAND_STATUS = 7,
+ ACPI_ERST_GET_RECORD_IDENTIFIER = 8,
+ ACPI_ERST_SET_RECORD_IDENTIFIER = 9,
+ ACPI_ERST_GET_RECORD_COUNT = 10,
+ ACPI_ERST_BEGIN_DUMMY_WRIITE = 11,
+ ACPI_ERST_NOT_USED = 12,
+ ACPI_ERST_GET_ERROR_RANGE = 13,
+ ACPI_ERST_GET_ERROR_LENGTH = 14,
+ ACPI_ERST_GET_ERROR_ATTRIBUTES = 15,
+ ACPI_ERST_ACTION_RESERVED = 16 /* 16 and greater are reserved */
+};
+
+/* Values for Instruction field above */
+
+enum AcpiErstInstructions
+{
+ ACPI_ERST_READ_REGISTER = 0,
+ ACPI_ERST_READ_REGISTER_VALUE = 1,
+ ACPI_ERST_WRITE_REGISTER = 2,
+ ACPI_ERST_WRITE_REGISTER_VALUE = 3,
+ ACPI_ERST_NOOP = 4,
+ ACPI_ERST_LOAD_VAR1 = 5,
+ ACPI_ERST_LOAD_VAR2 = 6,
+ ACPI_ERST_STORE_VAR1 = 7,
+ ACPI_ERST_ADD = 8,
+ ACPI_ERST_SUBTRACT = 9,
+ ACPI_ERST_ADD_VALUE = 10,
+ ACPI_ERST_SUBTRACT_VALUE = 11,
+ ACPI_ERST_STALL = 12,
+ ACPI_ERST_STALL_WHILE_TRUE = 13,
+ ACPI_ERST_SKIP_NEXT_IF_TRUE = 14,
+ ACPI_ERST_GOTO = 15,
+ ACPI_ERST_SET_SRC_ADDRESS_BASE = 16,
+ ACPI_ERST_SET_DST_ADDRESS_BASE = 17,
+ ACPI_ERST_MOVE_DATA = 18,
+ ACPI_ERST_INSTRUCTION_RESERVED = 19 /* 19 and greater are reserved */
+};
-#define DUAL_PIC 0
-#define MULTIPLE_APIC 1
+/*******************************************************************************
+ *
+ * HEST - Hardware Error Source Table
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_hest
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT32 ErrorSourceCount;
+
+} ACPI_TABLE_HEST;
+
+
+/* HEST subtable header */
+
+typedef struct acpi_hest_header
+{
+ UINT16 Type;
-/* Common MADT Sub-table header */
+} ACPI_HEST_HEADER;
-#define APIC_HEADER_DEF \
- UINT8 Type; \
+
+/* Values for Type field above for subtables */
+
+enum AcpiHestTypes
+{
+ ACPI_HEST_TYPE_XPF_MACHINE_CHECK = 0,
+ ACPI_HEST_TYPE_XPF_CORRECTED_MACHINE_CHECK = 1,
+ ACPI_HEST_TYPE_XPF_UNUSED = 2,
+ ACPI_HEST_TYPE_XPF_NON_MASKABLE_INTERRUPT = 3,
+ ACPI_HEST_TYPE_IPF_CORRECTED_MACHINE_CHECK = 4,
+ ACPI_HEST_TYPE_IPF_CORRECTED_PLATFORM_ERROR = 5,
+ ACPI_HEST_TYPE_AER_ROOT_PORT = 6,
+ ACPI_HEST_TYPE_AER_ENDPOINT = 7,
+ ACPI_HEST_TYPE_AER_BRIDGE = 8,
+ ACPI_HEST_TYPE_GENERIC_HARDWARE_ERROR_SOURCE = 9,
+ ACPI_HEST_TYPE_RESERVED = 10 /* 10 and greater are reserved */
+};
+
+
+/*
+ * HEST Sub-subtables
+ */
+
+/* XPF Machine Check Error Bank */
+
+typedef struct acpi_hest_xpf_error_bank
+{
+ UINT8 BankNumber;
+ UINT8 ClearStatusOnInit;
+ UINT8 StatusFormat;
+ UINT8 ConfigWriteEnable;
+ UINT32 ControlRegister;
+ UINT64 ControlInitData;
+ UINT32 StatusRegister;
+ UINT32 AddressRegister;
+ UINT32 MiscRegister;
+
+} ACPI_HEST_XPF_ERROR_BANK;
+
+
+/* Generic Error Status */
+
+typedef struct acpi_hest_generic_status
+{
+ UINT32 BlockStatus;
+ UINT32 RawDataOffset;
+ UINT32 RawDataLength;
+ UINT32 DataLength;
+ UINT32 ErrorSeverity;
+
+} ACPI_HEST_GENERIC_STATUS;
+
+
+/* Generic Error Data */
+
+typedef struct acpi_hest_generic_data
+{
+ UINT8 SectionType[16];
+ UINT32 ErrorSeverity;
+ UINT16 Revision;
+ UINT8 ValidationBits;
+ UINT8 Flags;
+ UINT32 ErrorDataLength;
+ UINT8 FruId[16];
+ UINT8 FruText[20];
+
+} ACPI_HEST_GENERIC_DATA;
+
+
+/* Common HEST structure for PCI/AER types below (6,7,8) */
+
+typedef struct acpi_hest_aer_common
+{
+ UINT16 SourceId;
+ UINT16 ConfigWriteEnable;
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 RecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 Bus;
+ UINT16 Device;
+ UINT16 Function;
+ UINT16 DeviceControl;
+ UINT16 Reserved;
+ UINT32 UncorrectableErrorMask;
+ UINT32 UncorrectableErrorSeverity;
+ UINT32 CorrectableErrorMask;
+ UINT32 AdvancedErrorCababilities;
+
+} ACPI_HEST_AER_COMMON;
+
+
+/* Hardware Error Notification */
+
+typedef struct acpi_hest_notify
+{
+ UINT8 Type;
UINT8 Length;
+ UINT16 ConfigWriteEnable;
+ UINT32 PollInterval;
+ UINT32 Vector;
+ UINT32 PollingThresholdValue;
+ UINT32 PollingThresholdWindow;
+ UINT32 ErrorThresholdValue;
+ UINT32 ErrorThresholdWindow;
-typedef struct apic_header
+} ACPI_HEST_NOTIFY;
+
+/* Values for Notify Type field above */
+
+enum AcpiHestNotifyTypes
{
- APIC_HEADER_DEF
+ ACPI_HEST_NOTIFY_POLLED = 0,
+ ACPI_HEST_NOTIFY_EXTERNAL = 1,
+ ACPI_HEST_NOTIFY_LOCAL = 2,
+ ACPI_HEST_NOTIFY_SCI = 3,
+ ACPI_HEST_NOTIFY_NMI = 4,
+ ACPI_HEST_NOTIFY_RESERVED = 5 /* 5 and greater are reserved */
+};
-} APIC_HEADER;
-/* Values for Type in APIC_HEADER */
+/*
+ * HEST subtables
+ *
+ * From WHEA Design Document, 16 May 2007.
+ * Note: There is no subtable type 2 in this version of the document,
+ * and there are two different subtable type 3s.
+ */
-#define APIC_PROCESSOR 0
-#define APIC_IO 1
-#define APIC_XRUPT_OVERRIDE 2
-#define APIC_NMI 3
-#define APIC_LOCAL_NMI 4
-#define APIC_ADDRESS_OVERRIDE 5
-#define APIC_IO_SAPIC 6
-#define APIC_LOCAL_SAPIC 7
-#define APIC_XRUPT_SOURCE 8
-#define X2APIC_PROCESSOR 9
-#define X2APIC_LOCAL_NMI 10
-#define APIC_RESERVED 11 /* 11 and greater are reserved */
+ /* 0: XPF Machine Check Exception */
+typedef struct acpi_hest_xpf_machine_check
+{
+ ACPI_HEST_HEADER Header;
+ UINT16 SourceId;
+ UINT16 ConfigWriteEnable;
+ UINT8 Flags;
+ UINT8 Reserved1;
+ UINT32 RecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT64 GlobalCapabilityData;
+ UINT64 GlobalControlData;
+ UINT8 NumHardwareBanks;
+ UINT8 Reserved2[7];
-/* Flag definitions for MADT sub-tables */
+} ACPI_HEST_XPF_MACHINE_CHECK;
-#define ACPI_MADT_IFLAGS /* INTI flags (16 bits) */ \
- UINT8 Polarity : 2; /* 00-01: Polarity of APIC I/O input signals */\
- UINT8 TriggerMode : 2; /* 02-03: Trigger mode of APIC input signals */\
- UINT8 : 4; /* 04-07: Reserved, must be zero */\
- UINT8 Reserved1; /* 08-15: Reserved, must be zero */
-#define ACPI_MADT_LFLAGS /* Local Sapic flags (32 bits) */ \
- UINT8 ProcessorEnabled: 1; /* 00: Processor is usable if set */\
- UINT8 : 7; /* 01-07: Reserved, must be zero */\
- UINT8 Reserved2[3]; /* 08-31: Reserved, must be zero */
+/* 1: XPF Corrected Machine Check */
+typedef struct acpi_table_hest_xpf_corrected
+{
+ ACPI_HEST_HEADER Header;
+ UINT16 SourceId;
+ UINT16 ConfigWriteEnable;
+ UINT8 Flags;
+ UINT8 Enabled;
+ UINT32 RecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ ACPI_HEST_NOTIFY Notify;
+ UINT8 NumHardwareBanks;
+ UINT8 Reserved[3];
-/* Values for MPS INTI flags */
+} ACPI_HEST_XPF_CORRECTED;
-#define POLARITY_CONFORMS 0
-#define POLARITY_ACTIVE_HIGH 1
-#define POLARITY_RESERVED 2
-#define POLARITY_ACTIVE_LOW 3
-#define TRIGGER_CONFORMS 0
-#define TRIGGER_EDGE 1
-#define TRIGGER_RESERVED 2
-#define TRIGGER_LEVEL 3
+/* 3: XPF Non-Maskable Interrupt */
+
+typedef struct acpi_hest_xpf_nmi
+{
+ ACPI_HEST_HEADER Header;
+ UINT16 SourceId;
+ UINT32 Reserved;
+ UINT32 RecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 MaxRawDataLength;
+
+} ACPI_HEST_XPF_NMI;
+
+
+/* 4: IPF Corrected Machine Check */
+
+typedef struct acpi_hest_ipf_corrected
+{
+ ACPI_HEST_HEADER Header;
+ UINT8 Enabled;
+ UINT8 Reserved;
+
+} ACPI_HEST_IPF_CORRECTED;
+
+
+/* 5: IPF Corrected Platform Error */
+
+typedef struct acpi_hest_ipf_corrected_platform
+{
+ ACPI_HEST_HEADER Header;
+ UINT8 Enabled;
+ UINT8 Reserved;
+
+} ACPI_HEST_IPF_CORRECTED_PLATFORM;
+
+
+/* 6: PCI Express Root Port AER */
+
+typedef struct acpi_hest_aer_root
+{
+ ACPI_HEST_HEADER Header;
+ ACPI_HEST_AER_COMMON Aer;
+ UINT32 RootErrorCommand;
+
+} ACPI_HEST_AER_ROOT;
+
+
+/* 7: PCI Express AER (AER Endpoint) */
+
+typedef struct acpi_hest_aer
+{
+ ACPI_HEST_HEADER Header;
+ ACPI_HEST_AER_COMMON Aer;
+
+} ACPI_HEST_AER;
+
+
+/* 8: PCI Express/PCI-X Bridge AER */
+
+typedef struct acpi_hest_aer_bridge
+{
+ ACPI_HEST_HEADER Header;
+ ACPI_HEST_AER_COMMON Aer;
+ UINT32 SecondaryUncorrectableErrorMask;
+ UINT32 SecondaryUncorrectableErrorSeverity;
+ UINT32 SecondaryAdvancedCapabilities;
+
+} ACPI_HEST_AER_BRIDGE;
+
+
+/* 9: Generic Hardware Error Source */
+
+typedef struct acpi_hest_generic
+{
+ ACPI_HEST_HEADER Header;
+ UINT16 SourceId;
+ UINT16 RelatedSourceId;
+ UINT8 ConfigWriteEnable;
+ UINT8 Enabled;
+ UINT32 RecordsToPreAllocate;
+ UINT32 MaxSectionsPerRecord;
+ UINT32 MaxRawDataLength;
+ ACPI_GENERIC_ADDRESS ErrorStatusAddress;
+ ACPI_HEST_NOTIFY Notify;
+ UINT32 ErrorStatusBlockLength;
+
+} ACPI_HEST_GENERIC;
+
+
+/*******************************************************************************
+ *
+ * HPET - High Precision Event Timer table
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_hpet
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT32 Id; /* Hardware ID of event timer block */
+ ACPI_GENERIC_ADDRESS Address; /* Address of event timer block */
+ UINT8 Sequence; /* HPET sequence number */
+ UINT16 MinimumTick; /* Main counter min tick, periodic mode */
+ UINT8 Flags;
+
+} ACPI_TABLE_HPET;
+
+/*! Flags */
+
+#define ACPI_HPET_PAGE_PROTECT (1) /* 00: No page protection */
+#define ACPI_HPET_PAGE_PROTECT_4 (1<<1) /* 01: 4KB page protected */
+#define ACPI_HPET_PAGE_PROTECT_64 (1<<2) /* 02: 64KB page protected */
+
+/*! [End] no source code translation !*/
+
+
+/*******************************************************************************
+ *
+ * IBFT - Boot Firmware Table
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_ibft
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT8 Reserved[12];
+
+} ACPI_TABLE_IBFT;
+
+
+/* IBFT common subtable header */
+
+typedef struct acpi_ibft_header
+{
+ UINT8 Type;
+ UINT8 Version;
+ UINT16 Length;
+ UINT8 Index;
+ UINT8 Flags;
+
+} ACPI_IBFT_HEADER;
+
+
+/* Values for Type field above */
+
+enum AcpiIbftType
+{
+ ACPI_IBFT_TYPE_NOT_USED = 0,
+ ACPI_IBFT_TYPE_CONTROL = 1,
+ ACPI_IBFT_TYPE_INITIATOR = 2,
+ ACPI_IBFT_TYPE_NIC = 3,
+ ACPI_IBFT_TYPE_TARGET = 4,
+ ACPI_IBFT_TYPE_EXTENSIONS = 5,
+ ACPI_IBFT_TYPE_RESERVED = 6 /* 6 and greater are reserved */
+};
+
+
+/* IBFT subtables */
+
+typedef struct acpi_ibft_control
+{
+ ACPI_IBFT_HEADER Header;
+ UINT16 Extensions;
+ UINT16 InitiatorOffset;
+ UINT16 Nic0Offset;
+ UINT16 Target0Offset;
+ UINT16 Nic1Offset;
+ UINT16 Target1Offset;
+
+} ACPI_IBFT_CONTROL;
+
+typedef struct acpi_ibft_initiator
+{
+ ACPI_IBFT_HEADER Header;
+ UINT8 SnsServer[16];
+ UINT8 SlpServer[16];
+ UINT8 PrimaryServer[16];
+ UINT8 SecondaryServer[16];
+ UINT16 NameLength;
+ UINT16 NameOffset;
+
+} ACPI_IBFT_INITIATOR;
+
+typedef struct acpi_ibft_nic
+{
+ ACPI_IBFT_HEADER Header;
+ UINT8 IpAddress[16];
+ UINT8 SubnetMaskPrefix;
+ UINT8 Origin;
+ UINT8 Gateway[16];
+ UINT8 PrimaryDns[16];
+ UINT8 SecondaryDns[16];
+ UINT8 Dhcp[16];
+ UINT16 Vlan;
+ UINT8 MacAddress[6];
+ UINT16 PciAddress;
+ UINT16 NameLength;
+ UINT16 NameOffset;
+
+} ACPI_IBFT_NIC;
+
+typedef struct acpi_ibft_target
+{
+ ACPI_IBFT_HEADER Header;
+ UINT8 TargetIpAddress[16];
+ UINT16 TargetIpSocket;
+ UINT8 TargetBootLun[8];
+ UINT8 ChapType;
+ UINT8 NicAssociation;
+ UINT16 TargetNameLength;
+ UINT16 TargetNameOffset;
+ UINT16 ChapNameLength;
+ UINT16 ChapNameOffset;
+ UINT16 ChapSecretLength;
+ UINT16 ChapSecretOffset;
+ UINT16 ReverseChapNameLength;
+ UINT16 ReverseChapNameOffset;
+ UINT16 ReverseChapSecretLength;
+ UINT16 ReverseChapSecretOffset;
+
+} ACPI_IBFT_TARGET;
+
+
+/*******************************************************************************
+ *
+ * MADT - Multiple APIC Description Table
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_madt
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT32 Address; /* Physical address of local APIC */
+ UINT32 Flags;
+
+} ACPI_TABLE_MADT;
+
+/* Flags */
+
+#define ACPI_MADT_PCAT_COMPAT (1) /* 00: System also has dual 8259s */
+
+/* Values for PCATCompat flag */
+
+#define ACPI_MADT_DUAL_PIC 0
+#define ACPI_MADT_MULTIPLE_APIC 1
+
+
+/* Values for subtable type in ACPI_SUBTABLE_HEADER */
+
+enum AcpiMadtType
+{
+ ACPI_MADT_TYPE_LOCAL_APIC = 0,
+ ACPI_MADT_TYPE_IO_APIC = 1,
+ ACPI_MADT_TYPE_INTERRUPT_OVERRIDE = 2,
+ ACPI_MADT_TYPE_NMI_SOURCE = 3,
+ ACPI_MADT_TYPE_LOCAL_APIC_NMI = 4,
+ ACPI_MADT_TYPE_LOCAL_APIC_OVERRIDE = 5,
+ ACPI_MADT_TYPE_IO_SAPIC = 6,
+ ACPI_MADT_TYPE_LOCAL_SAPIC = 7,
+ ACPI_MADT_TYPE_INTERRUPT_SOURCE = 8,
+ ACPI_MADT_TYPE_LOCAL_X2APIC = 9,
+ ACPI_MADT_TYPE_LOCAL_X2APIC_NMI = 10,
+ ACPI_MADT_TYPE_RESERVED = 11 /* 11 and greater are reserved */
+};
/*
- * MADT Sub-tables, correspond to Type in APIC_HEADER
+ * MADT Sub-tables, correspond to Type in ACPI_SUBTABLE_HEADER
*/
-/* 0: processor APIC */
+/* 0: Processor Local APIC */
-typedef struct madt_processor_apic
+typedef struct acpi_madt_local_apic
{
- APIC_HEADER_DEF
+ ACPI_SUBTABLE_HEADER Header;
UINT8 ProcessorId; /* ACPI processor id */
- UINT8 LocalApicId; /* Processor's local APIC id */
- ACPI_MADT_LFLAGS
+ UINT8 Id; /* Processor's local APIC id */
+ UINT32 LapicFlags;
-} MADT_PROCESSOR_APIC;
+} ACPI_MADT_LOCAL_APIC;
/* 1: IO APIC */
-typedef struct madt_io_apic
+typedef struct acpi_madt_io_apic
{
- APIC_HEADER_DEF
- UINT8 IoApicId; /* I/O APIC ID */
+ ACPI_SUBTABLE_HEADER Header;
+ UINT8 Id; /* I/O APIC ID */
UINT8 Reserved; /* Reserved - must be zero */
UINT32 Address; /* APIC physical address */
- UINT32 Interrupt; /* Global system interrupt where INTI lines start */
+ UINT32 GlobalIrqBase; /* Global system interrupt where INTI lines start */
-} MADT_IO_APIC;
+} ACPI_MADT_IO_APIC;
/* 2: Interrupt Override */
-typedef struct madt_interrupt_override
+typedef struct acpi_madt_interrupt_override
{
- APIC_HEADER_DEF
+ ACPI_SUBTABLE_HEADER Header;
UINT8 Bus; /* 0 - ISA */
- UINT8 Source; /* Interrupt source (IRQ) */
- UINT32 Interrupt; /* Global system interrupt */
- ACPI_MADT_IFLAGS
+ UINT8 SourceIrq; /* Interrupt source (IRQ) */
+ UINT32 GlobalIrq; /* Global system interrupt */
+ UINT16 IntiFlags;
-} MADT_INTERRUPT_OVERRIDE;
+} ACPI_MADT_INTERRUPT_OVERRIDE;
-/* 3: NMI Sources */
+/* 3: NMI Source */
-typedef struct madt_nmi_source
+typedef struct acpi_madt_nmi_source
{
- APIC_HEADER_DEF
- ACPI_MADT_IFLAGS
- UINT32 Interrupt; /* Global system interrupt */
+ ACPI_SUBTABLE_HEADER Header;
+ UINT16 IntiFlags;
+ UINT32 GlobalIrq; /* Global system interrupt */
-} MADT_NMI_SOURCE;
+} ACPI_MADT_NMI_SOURCE;
/* 4: Local APIC NMI */
-typedef struct madt_local_apic_nmi
+typedef struct acpi_madt_local_apic_nmi
{
- APIC_HEADER_DEF
+ ACPI_SUBTABLE_HEADER Header;
UINT8 ProcessorId; /* ACPI processor id */
- ACPI_MADT_IFLAGS
+ UINT16 IntiFlags;
UINT8 Lint; /* LINTn to which NMI is connected */
-} MADT_LOCAL_APIC_NMI;
+} ACPI_MADT_LOCAL_APIC_NMI;
/* 5: Address Override */
-typedef struct madt_address_override
+typedef struct acpi_madt_local_apic_override
{
- APIC_HEADER_DEF
+ ACPI_SUBTABLE_HEADER Header;
UINT16 Reserved; /* Reserved, must be zero */
UINT64 Address; /* APIC physical address */
-} MADT_ADDRESS_OVERRIDE;
+} ACPI_MADT_LOCAL_APIC_OVERRIDE;
/* 6: I/O Sapic */
-typedef struct madt_io_sapic
+typedef struct acpi_madt_io_sapic
{
- APIC_HEADER_DEF
- UINT8 IoSapicId; /* I/O SAPIC ID */
+ ACPI_SUBTABLE_HEADER Header;
+ UINT8 Id; /* I/O SAPIC ID */
UINT8 Reserved; /* Reserved, must be zero */
- UINT32 InterruptBase; /* Glocal interrupt for SAPIC start */
+ UINT32 GlobalIrqBase; /* Global interrupt for SAPIC start */
UINT64 Address; /* SAPIC physical address */
-} MADT_IO_SAPIC;
+} ACPI_MADT_IO_SAPIC;
/* 7: Local Sapic */
-typedef struct madt_local_sapic
+typedef struct acpi_madt_local_sapic
{
- APIC_HEADER_DEF
+ ACPI_SUBTABLE_HEADER Header;
UINT8 ProcessorId; /* ACPI processor id */
- UINT8 LocalSapicId; /* SAPIC ID */
- UINT8 LocalSapicEid; /* SAPIC EID */
+ UINT8 Id; /* SAPIC ID */
+ UINT8 Eid; /* SAPIC EID */
UINT8 Reserved[3]; /* Reserved, must be zero */
- ACPI_MADT_LFLAGS
- UINT32 ProcessorUID; /* Numeric UID - ACPI 3.0 */
- char ProcessorUIDString[1]; /* String UID - ACPI 3.0 */
+ UINT32 LapicFlags;
+ UINT32 Uid; /* Numeric UID - ACPI 3.0 */
+ char UidString[1]; /* String UID - ACPI 3.0 */
-} MADT_LOCAL_SAPIC;
+} ACPI_MADT_LOCAL_SAPIC;
/* 8: Platform Interrupt Source */
-typedef struct madt_interrupt_source
+typedef struct acpi_madt_interrupt_source
{
- APIC_HEADER_DEF
- ACPI_MADT_IFLAGS
- UINT8 InterruptType; /* 1=PMI, 2=INIT, 3=corrected */
- UINT8 ProcessorId; /* Processor ID */
- UINT8 ProcessorEid; /* Processor EID */
+ ACPI_SUBTABLE_HEADER Header;
+ UINT16 IntiFlags;
+ UINT8 Type; /* 1=PMI, 2=INIT, 3=corrected */
+ UINT8 Id; /* Processor ID */
+ UINT8 Eid; /* Processor EID */
UINT8 IoSapicVector; /* Vector value for PMI interrupts */
- UINT32 Interrupt; /* Global system interrupt */
+ UINT32 GlobalIrq; /* Global system interrupt */
UINT32 Flags; /* Interrupt Source Flags */
-} MADT_INTERRUPT_SOURCE;
+} ACPI_MADT_INTERRUPT_SOURCE;
-/* 9: Processor x2APIC */
+/* Flags field above */
-typedef struct madt_processor_ext_apic
+#define ACPI_MADT_CPEI_OVERRIDE (1)
+
+/* 9: Processor Local X2_APIC (07/2008) */
+
+typedef struct acpi_madt_local_x2apic
{
- APIC_HEADER_DEF
- UINT16 Reserved; /* Reserved - must be zero */
- UINT32 X2LocalApicId; /* Processor's x2APIC ID */
- ACPI_MADT_LFLAGS
- UINT32 ProcessorUID; /* Extended x2APIC processor ID */
-} MADT_PROCESSOR_X2APIC;
+ ACPI_SUBTABLE_HEADER Header;
+ UINT16 Reserved; /* Reserved - must be zero */
+ UINT32 LocalApicId; /* Processor X2_APIC ID */
+ UINT32 LapicFlags;
+ UINT32 Uid; /* Extended X2_APIC processor ID */
+
+} ACPI_MADT_LOCAL_X2APIC;
-/* 10: Extended X2APIC NMI Structure */
+/* 10: Local X2APIC NMI (07/2008) */
-typedef struct madt_local_x2apic_nmi
+typedef struct acpi_madt_local_x2apic_nmi
{
- APIC_HEADER_DEF
- ACPI_MADT_IFLAGS
- UINT32 ProcessorUID; /* Processor's x2APIC ID */
- UINT8 Lint; /* LINTn to which NMI is connected */
+ ACPI_SUBTABLE_HEADER Header;
+ UINT16 IntiFlags;
+ UINT32 Uid; /* Processor X2_APIC ID */
+ UINT8 Lint; /* LINTn to which NMI is connected */
UINT8 Reserved[3];
-} MADT_LOCAL_X2APIC_NMI;
+
+} ACPI_MADT_LOCAL_X2APIC_NMI;
+
+
+/*
+ * Common flags fields for MADT subtables
+ */
+
+/* MADT Local APIC flags (LapicFlags) */
+
+#define ACPI_MADT_ENABLED (1) /* 00: Processor is usable if set */
+
+/* MADT MPS INTI flags (IntiFlags) */
+
+#define ACPI_MADT_POLARITY_MASK (3) /* 00-01: Polarity of APIC I/O input signals */
+#define ACPI_MADT_TRIGGER_MASK (3<<2) /* 02-03: Trigger mode of APIC input signals */
+
+/* Values for MPS INTI flags */
+
+#define ACPI_MADT_POLARITY_CONFORMS 0
+#define ACPI_MADT_POLARITY_ACTIVE_HIGH 1
+#define ACPI_MADT_POLARITY_RESERVED 2
+#define ACPI_MADT_POLARITY_ACTIVE_LOW 3
+
+#define ACPI_MADT_TRIGGER_CONFORMS (0)
+#define ACPI_MADT_TRIGGER_EDGE (1<<2)
+#define ACPI_MADT_TRIGGER_RESERVED (2<<2)
+#define ACPI_MADT_TRIGGER_LEVEL (3<<2)
/*******************************************************************************
@@ -597,14 +1322,17 @@ typedef struct madt_local_x2apic_nmi
typedef struct acpi_table_mcfg
{
- ACPI_TABLE_HEADER_DEF
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
UINT8 Reserved[8];
} ACPI_TABLE_MCFG;
+
+/* Subtable */
+
typedef struct acpi_mcfg_allocation
{
- UINT64 BaseAddress; /* Base address, processor-relative */
+ UINT64 Address; /* Base address, processor-relative */
UINT16 PciSegment; /* PCI segment group number */
UINT8 StartBusNumber; /* Starting PCI Bus number */
UINT8 EndBusNumber; /* Final PCI Bus number */
@@ -619,14 +1347,14 @@ typedef struct acpi_mcfg_allocation
*
******************************************************************************/
-typedef struct smart_battery_table
+typedef struct acpi_table_sbst
{
- ACPI_TABLE_HEADER_DEF
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
UINT32 WarningLevel;
UINT32 LowLevel;
UINT32 CriticalLevel;
-} SMART_BATTERY_TABLE;
+} ACPI_TABLE_SBST;
/*******************************************************************************
@@ -635,13 +1363,13 @@ typedef struct smart_battery_table
*
******************************************************************************/
-typedef struct system_locality_info
+typedef struct acpi_table_slit
{
- ACPI_TABLE_HEADER_DEF
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
UINT64 LocalityCount;
- UINT8 Entry[1][1];
+ UINT8 Entry[1]; /* Real size = localities^2 */
-} SYSTEM_LOCALITY_INFO;
+} ACPI_TABLE_SLIT;
/*******************************************************************************
@@ -652,7 +1380,7 @@ typedef struct system_locality_info
typedef struct acpi_table_spcr
{
- ACPI_TABLE_HEADER_DEF
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
UINT8 InterfaceType; /* 0=full 16550, 1=subset of 16550 */
UINT8 Reserved[3];
ACPI_GENERIC_ADDRESS SerialPort;
@@ -664,7 +1392,7 @@ typedef struct acpi_table_spcr
UINT8 StopBits;
UINT8 FlowControl;
UINT8 TerminalType;
- UINT8 Reserved2;
+ UINT8 Reserved1;
UINT16 PciDeviceId;
UINT16 PciVendorId;
UINT8 PciBus;
@@ -672,7 +1400,7 @@ typedef struct acpi_table_spcr
UINT8 PciFunction;
UINT32 PciFlags;
UINT8 PciSegment;
- UINT32 Reserved3;
+ UINT32 Reserved2;
} ACPI_TABLE_SPCR;
@@ -685,13 +1413,13 @@ typedef struct acpi_table_spcr
typedef struct acpi_table_spmi
{
- ACPI_TABLE_HEADER_DEF
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
UINT8 Reserved;
UINT8 InterfaceType;
UINT16 SpecRevision; /* Version of IPMI */
UINT8 InterruptType;
UINT8 GpeNumber; /* GPE assigned */
- UINT8 Reserved2;
+ UINT8 Reserved1;
UINT8 PciDeviceFlag;
UINT32 Interrupt;
ACPI_GENERIC_ADDRESS IpmiRegister;
@@ -709,68 +1437,78 @@ typedef struct acpi_table_spmi
*
******************************************************************************/
-typedef struct system_resource_affinity
+typedef struct acpi_table_srat
{
- ACPI_TABLE_HEADER_DEF
- UINT32 Reserved1; /* Must be value '1' */
- UINT64 Reserved2; /* Reserved, must be zero */
-
-} SYSTEM_RESOURCE_AFFINITY;
-
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT32 TableRevision; /* Must be value '1' */
+ UINT64 Reserved; /* Reserved, must be zero */
-/* SRAT common sub-table header */
-
-#define SRAT_SUBTABLE_HEADER \
- UINT8 Type; \
- UINT8 Length;
+} ACPI_TABLE_SRAT;
-/* Values for Type above */
+/* Values for subtable type in ACPI_SUBTABLE_HEADER */
-#define SRAT_CPU_AFFINITY 0
-#define SRAT_MEMORY_AFFINITY 1
-#define SRAT_RESERVED 2
+enum AcpiSratType
+{
+ ACPI_SRAT_TYPE_CPU_AFFINITY = 0,
+ ACPI_SRAT_TYPE_MEMORY_AFFINITY = 1,
+ ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY = 2,
+ ACPI_SRAT_TYPE_RESERVED = 3 /* 3 and greater are reserved */
+};
+/*
+ * SRAT Sub-tables, correspond to Type in ACPI_SUBTABLE_HEADER
+ */
-/* SRAT sub-tables */
+/* 0: Processor Local APIC/SAPIC Affinity */
-typedef struct static_resource_alloc
+typedef struct acpi_srat_cpu_affinity
{
- SRAT_SUBTABLE_HEADER
+ ACPI_SUBTABLE_HEADER Header;
UINT8 ProximityDomainLo;
UINT8 ApicId;
-
- /* Flags (32 bits) */
-
- UINT8 Enabled :1; /* 00: Use affinity structure */
- UINT8 :7; /* 01-07: Reserved, must be zero */
- UINT8 Reserved3[3]; /* 08-31: Reserved, must be zero */
-
+ UINT32 Flags;
UINT8 LocalSapicEid;
UINT8 ProximityDomainHi[3];
- UINT32 Reserved4; /* Reserved, must be zero */
+ UINT32 Reserved; /* Reserved, must be zero */
-} STATIC_RESOURCE_ALLOC;
+} ACPI_SRAT_CPU_AFFINITY;
-typedef struct memory_affinity
+/* 1: Memory Affinity */
+
+typedef struct acpi_srat_mem_affinity
{
- SRAT_SUBTABLE_HEADER
+ ACPI_SUBTABLE_HEADER Header;
UINT32 ProximityDomain;
- UINT16 Reserved3;
+ UINT16 Reserved; /* Reserved, must be zero */
UINT64 BaseAddress;
- UINT64 AddressLength;
- UINT32 Reserved4;
+ UINT64 Length;
+ UINT32 Reserved1;
+ UINT32 Flags;
+ UINT64 Reserved2; /* Reserved, must be zero */
+
+} ACPI_SRAT_MEM_AFFINITY;
+
+/* Flags */
- /* Flags (32 bits) */
+#define ACPI_SRAT_MEM_ENABLED (1) /* 00: Use affinity structure */
+#define ACPI_SRAT_MEM_HOT_PLUGGABLE (1<<1) /* 01: Memory region is hot pluggable */
+#define ACPI_SRAT_MEM_NON_VOLATILE (1<<2) /* 02: Memory region is non-volatile */
- UINT8 Enabled :1; /* 00: Use affinity structure */
- UINT8 HotPluggable :1; /* 01: Memory region is hot pluggable */
- UINT8 NonVolatile :1; /* 02: Memory is non-volatile */
- UINT8 :5; /* 03-07: Reserved, must be zero */
- UINT8 Reserved5[3]; /* 08-31: Reserved, must be zero */
+/* 2: Processor Local X2_APIC Affinity (07/2008) */
- UINT64 Reserved6; /* Reserved, must be zero */
+typedef struct acpi_srat_x2apic_cpu_affinity
+{
+ ACPI_SUBTABLE_HEADER Header;
+ UINT16 Reserved; /* Reserved, must be zero */
+ UINT32 ProximityDomain;
+ UINT32 ApicId;
+ UINT32 Flags;
-} MEMORY_AFFINITY;
+} ACPI_SRAT_X2APIC_CPU_AFFINITY;
+
+/* Flags for ACPI_SRAT_CPU_AFFINITY and ACPI_SRAT_X2APIC_CPU_AFFINITY */
+
+#define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */
/*******************************************************************************
@@ -781,7 +1519,7 @@ typedef struct memory_affinity
typedef struct acpi_table_tcpa
{
- ACPI_TABLE_HEADER_DEF
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
UINT16 Reserved;
UINT32 MaxLogLength; /* Maximum length for the event log area */
UINT64 LogAddress; /* Address of the event log area */
@@ -791,13 +1529,95 @@ typedef struct acpi_table_tcpa
/*******************************************************************************
*
+ * UEFI - UEFI Boot optimization Table
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_uefi
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT8 Identifier[16]; /* UUID identifier */
+ UINT16 DataOffset; /* Offset of remaining data in table */
+ UINT8 Data;
+
+} ACPI_TABLE_UEFI;
+
+
+/*******************************************************************************
+ *
+ * WDAT - Watchdog Action Table
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_wdat
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+ UINT32 HeaderLength; /* Watchdog Header Length */
+ UINT16 PciSegment; /* PCI Segment number */
+ UINT8 PciBus; /* PCI Bus number */
+ UINT8 PciDevice; /* PCI Device number */
+ UINT8 PciFunction; /* PCI Function number */
+ UINT8 Reserved[3];
+ UINT32 TimerPeriod; /* Period of one timer count (msec) */
+ UINT32 MaxCount; /* Maximum counter value supported */
+ UINT32 MinCount; /* Minimum counter value */
+ UINT8 Flags;
+ UINT8 Reserved2[3];
+ UINT32 Entries; /* Number of watchdog entries that follow */
+
+} ACPI_TABLE_WDAT;
+
+/* WDAT Instruction Entries (actions) */
+
+typedef struct acpi_wdat_entry
+{
+ ACPI_WHEA_HEADER WheaHeader; /* Common header for WHEA tables */
+
+} ACPI_WDAT_ENTRY;
+
+/* Values for Action field above */
+
+enum AcpiWdatActions
+{
+ ACPI_WDAT_RESET = 1,
+ ACPI_WDAT_GET_CURRENT_COUNTDOWN = 4,
+ ACPI_WDAT_GET_COUNTDOWN = 5,
+ ACPI_WDAT_SET_COUNTDOWN = 6,
+ ACPI_WDAT_GET_RUNNING_STATE = 8,
+ ACPI_WDAT_SET_RUNNING_STATE = 9,
+ ACPI_WDAT_GET_STOPPED_STATE = 10,
+ ACPI_WDAT_SET_STOPPED_STATE = 11,
+ ACPI_WDAT_GET_REBOOT = 16,
+ ACPI_WDAT_SET_REBOOT = 17,
+ ACPI_WDAT_GET_SHUTDOWN = 18,
+ ACPI_WDAT_SET_SHUTDOWN = 19,
+ ACPI_WDAT_GET_STATUS = 32,
+ ACPI_WDAT_SET_STATUS = 33,
+ ACPI_WDAT_ACTION_RESERVED = 34 /* 34 and greater are reserved */
+};
+
+/* Values for Instruction field above */
+
+enum AcpiWdatInstructions
+{
+ ACPI_WDAT_READ_VALUE = 0,
+ ACPI_WDAT_READ_COUNTDOWN = 1,
+ ACPI_WDAT_WRITE_VALUE = 2,
+ ACPI_WDAT_WRITE_COUNTDOWN = 3,
+ ACPI_WDAT_INSTRUCTION_RESERVED = 4, /* 4 and greater are reserved */
+ ACPI_WDAT_PRESERVE_REGISTER = 0x80 /* Except for this value */
+};
+
+
+/*******************************************************************************
+ *
* WDRT - Watchdog Resource Table
*
******************************************************************************/
typedef struct acpi_table_wdrt
{
- ACPI_TABLE_HEADER_DEF
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
UINT32 HeaderLength; /* Watchdog Header Length */
UINT8 PciSegment; /* PCI Segment number */
UINT8 PciBus; /* PCI Bus number */
@@ -812,60 +1632,9 @@ typedef struct acpi_table_wdrt
} ACPI_TABLE_WDRT;
-#if 0 /* Flags, will be converted to macros */
- UINT8 Enabled :1; /* 00: Timer enabled */
- UINT8 :6; /* 01-06: Reserved */
- UINT8 SleepStop :1; /* 07: Timer stopped in sleep state */
-#endif
-
-
-/* Macros used to generate offsets to specific table fields */
-
-#define ACPI_ASF0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_ASF_INFO,f)
-#define ACPI_ASF1_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_ASF_ALERT,f)
-#define ACPI_ASF2_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_ASF_REMOTE,f)
-#define ACPI_ASF3_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_ASF_RMCP,f)
-#define ACPI_ASF4_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_ASF_ADDRESS,f)
-#define ACPI_BOOT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_BOOT,f)
-#define ACPI_CPEP_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_CPEP,f)
-#define ACPI_CPEP0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_CPEP_POLLING,f)
-#define ACPI_DBGP_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_DBGP,f)
-#define ACPI_ECDT_OFFSET(f) (UINT8) ACPI_OFFSET (EC_BOOT_RESOURCES,f)
-#define ACPI_HPET_OFFSET(f) (UINT8) ACPI_OFFSET (HPET_TABLE,f)
-#define ACPI_MADT_OFFSET(f) (UINT8) ACPI_OFFSET (MULTIPLE_APIC_TABLE,f)
-#define ACPI_MADT0_OFFSET(f) (UINT8) ACPI_OFFSET (MADT_PROCESSOR_APIC,f)
-#define ACPI_MADT1_OFFSET(f) (UINT8) ACPI_OFFSET (MADT_IO_APIC,f)
-#define ACPI_MADT2_OFFSET(f) (UINT8) ACPI_OFFSET (MADT_INTERRUPT_OVERRIDE,f)
-#define ACPI_MADT3_OFFSET(f) (UINT8) ACPI_OFFSET (MADT_NMI_SOURCE,f)
-#define ACPI_MADT4_OFFSET(f) (UINT8) ACPI_OFFSET (MADT_LOCAL_APIC_NMI,f)
-#define ACPI_MADT5_OFFSET(f) (UINT8) ACPI_OFFSET (MADT_ADDRESS_OVERRIDE,f)
-#define ACPI_MADT6_OFFSET(f) (UINT8) ACPI_OFFSET (MADT_IO_SAPIC,f)
-#define ACPI_MADT7_OFFSET(f) (UINT8) ACPI_OFFSET (MADT_LOCAL_SAPIC,f)
-#define ACPI_MADT8_OFFSET(f) (UINT8) ACPI_OFFSET (MADT_INTERRUPT_SOURCE,f)
-#define ACPI_MADTH_OFFSET(f) (UINT8) ACPI_OFFSET (APIC_HEADER,f)
-#define ACPI_MCFG_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_MCFG,f)
-#define ACPI_MCFG0_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_MCFG_ALLOCATION,f)
-#define ACPI_SBST_OFFSET(f) (UINT8) ACPI_OFFSET (SMART_BATTERY_TABLE,f)
-#define ACPI_SLIT_OFFSET(f) (UINT8) ACPI_OFFSET (SYSTEM_LOCALITY_INFO,f)
-#define ACPI_SPCR_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_SPCR,f)
-#define ACPI_SPMI_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_SPMI,f)
-#define ACPI_SRAT_OFFSET(f) (UINT8) ACPI_OFFSET (SYSTEM_RESOURCE_AFFINITY,f)
-#define ACPI_SRAT0_OFFSET(f) (UINT8) ACPI_OFFSET (STATIC_RESOURCE_ALLOC,f)
-#define ACPI_SRAT1_OFFSET(f) (UINT8) ACPI_OFFSET (MEMORY_AFFINITY,f)
-#define ACPI_TCPA_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_TCPA,f)
-#define ACPI_WDRT_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_TABLE_WDRT,f)
-
-
-#define ACPI_HPET_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (HPET_TABLE,f,o)
-#define ACPI_SRAT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (STATIC_RESOURCE_ALLOC,f,o)
-#define ACPI_SRAT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (MEMORY_AFFINITY,f,o)
-#define ACPI_MADT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (MULTIPLE_APIC_TABLE,f,o)
-#define ACPI_MADT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (MADT_PROCESSOR_APIC,f,o)
-#define ACPI_MADT2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (MADT_INTERRUPT_OVERRIDE,f,o)
-#define ACPI_MADT3_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (MADT_NMI_SOURCE,f,o)
-#define ACPI_MADT4_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (MADT_LOCAL_APIC_NMI,f,o)
-#define ACPI_MADT7_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (MADT_LOCAL_SAPIC,f,o)
-#define ACPI_MADT8_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (MADT_INTERRUPT_SOURCE,f,o)
+/* Flags */
+
+#define ACPI_WDRT_TIMER_ENABLED (1) /* 00: Timer enabled */
/* Reset to default packing */
@@ -873,5 +1642,3 @@ typedef struct acpi_table_wdrt
#pragma pack()
#endif /* __ACTBL1_H__ */
-
-
diff --git a/usr/src/uts/intel/sys/acpi/actbl2.h b/usr/src/uts/intel/sys/acpi/actbl2.h
index e1d6b3cbc1..0b6c47e9fa 100644
--- a/usr/src/uts/intel/sys/acpi/actbl2.h
+++ b/usr/src/uts/intel/sys/acpi/actbl2.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actbl2.h - ACPI Specification Revision 2.0 Tables
- * $Revision: 1.50 $
+ * $Revision: 1.52 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/sys/acpi/actypes.h b/usr/src/uts/intel/sys/acpi/actypes.h
index 6bf7c4e17d..07ec23f053 100644
--- a/usr/src/uts/intel/sys/acpi/actypes.h
+++ b/usr/src/uts/intel/sys/acpi/actypes.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: actypes.h - Common data types for the entire ACPI subsystem
- * $Revision: 1.308 $
+ * $Revision: 1.323 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -121,7 +121,8 @@
/*
* ACPI_MACHINE_WIDTH must be specified in an OS- or compiler-dependent header
- * and must be either 16, 32, or 64
+ * and must be either 32 or 64. 16-bit ACPICA is no longer supported, as of
+ * 12/2006.
*/
#ifndef ACPI_MACHINE_WIDTH
#error ACPI_MACHINE_WIDTH not defined
@@ -183,10 +184,10 @@
* usually used for memory allocation, efficient loop counters, and array
* indexes. The types are similar to the size_t type in the C library and are
* required because there is no C type that consistently represents the native
- * data width.
+ * data width. ACPI_SIZE is needed because there is no guarantee that a
+ * kernel-level C library is present.
*
* ACPI_SIZE 16/32/64-bit unsigned value
- * ACPI_NATIVE_UINT 16/32/64-bit unsigned value
* ACPI_NATIVE_INT 16/32/64-bit signed value
*
*/
@@ -222,10 +223,9 @@ typedef int INT32;
/*! [End] no source code translation !*/
-typedef UINT64 ACPI_NATIVE_UINT;
typedef INT64 ACPI_NATIVE_INT;
-typedef UINT64 ACPI_TABLE_PTR;
+typedef UINT64 ACPI_SIZE;
typedef UINT64 ACPI_IO_ADDRESS;
typedef UINT64 ACPI_PHYSICAL_ADDRESS;
@@ -264,64 +264,23 @@ typedef int INT32;
/*! [End] no source code translation !*/
-typedef UINT32 ACPI_NATIVE_UINT;
typedef INT32 ACPI_NATIVE_INT;
-typedef UINT64 ACPI_TABLE_PTR;
+typedef UINT32 ACPI_SIZE;
typedef UINT32 ACPI_IO_ADDRESS;
-typedef UINT64 ACPI_PHYSICAL_ADDRESS;
+typedef UINT32 ACPI_PHYSICAL_ADDRESS;
#define ACPI_MAX_PTR ACPI_UINT32_MAX
#define ACPI_SIZE_MAX ACPI_UINT32_MAX
-
-/*******************************************************************************
- *
- * Types specific to 16-bit targets
- *
- ******************************************************************************/
-
-#elif ACPI_MACHINE_WIDTH == 16
-
-/*! [Begin] no source code translation (keep the typedefs as-is) */
-
-typedef unsigned long UINT32;
-typedef short INT16;
-typedef long INT32;
-
-/*! [End] no source code translation !*/
-
-
-typedef UINT16 ACPI_NATIVE_UINT;
-typedef INT16 ACPI_NATIVE_INT;
-
-typedef UINT32 ACPI_TABLE_PTR;
-typedef UINT32 ACPI_IO_ADDRESS;
-typedef char *ACPI_PHYSICAL_ADDRESS;
-
-#define ACPI_MAX_PTR ACPI_UINT16_MAX
-#define ACPI_SIZE_MAX ACPI_UINT16_MAX
-
-#define ACPI_USE_NATIVE_DIVIDE /* No 64-bit integers, ok to use native divide */
-
-/* 64-bit integers cannot be supported */
-
-#define ACPI_NO_INTEGER64_SUPPORT
-
-
#else
-/* ACPI_MACHINE_WIDTH must be either 64, 32, or 16 */
+/* ACPI_MACHINE_WIDTH must be either 64 or 32 */
#error unknown ACPI_MACHINE_WIDTH
#endif
-/* Variable-width type, used instead of clib size_t */
-
-typedef ACPI_NATIVE_UINT ACPI_SIZE;
-
-
/*******************************************************************************
*
* OS-dependent and compiler-dependent types
@@ -336,7 +295,7 @@ typedef ACPI_NATIVE_UINT ACPI_SIZE;
/* Value returned by AcpiOsGetThreadId */
#ifndef ACPI_THREAD_ID
-#define ACPI_THREAD_ID ACPI_NATIVE_UINT
+#define ACPI_THREAD_ID ACPI_SIZE
#endif
/* Object returned from AcpiOsCreateLock */
@@ -348,7 +307,7 @@ typedef ACPI_NATIVE_UINT ACPI_SIZE;
/* Flags for AcpiOsAcquireLock/AcpiOsReleaseLock */
#ifndef ACPI_CPU_FLAGS
-#define ACPI_CPU_FLAGS ACPI_NATIVE_UINT
+#define ACPI_CPU_FLAGS ACPI_SIZE
#endif
/* Object returned from AcpiOsCreateCache */
@@ -396,41 +355,6 @@ typedef ACPI_NATIVE_UINT ACPI_SIZE;
*
******************************************************************************/
-/*
- * Pointer overlays to avoid lots of typecasting for
- * code that accepts both physical and logical pointers.
- */
-typedef union acpi_pointers
-{
- ACPI_PHYSICAL_ADDRESS Physical;
- void *Logical;
- ACPI_TABLE_PTR Value;
-
-} ACPI_POINTERS;
-
-typedef struct acpi_pointer
-{
- UINT32 PointerType;
- union acpi_pointers Pointer;
-
-} ACPI_POINTER;
-
-/* PointerTypes for above */
-
-#define ACPI_PHYSICAL_POINTER 0x01
-#define ACPI_LOGICAL_POINTER 0x02
-
-/* Processor mode */
-
-#define ACPI_PHYSICAL_ADDRESSING 0x04
-#define ACPI_LOGICAL_ADDRESSING 0x08
-#define ACPI_MEMORY_MODE 0x0C
-
-#define ACPI_PHYSMODE_PHYSPTR ACPI_PHYSICAL_ADDRESSING | ACPI_PHYSICAL_POINTER
-#define ACPI_LOGMODE_PHYSPTR ACPI_LOGICAL_ADDRESSING | ACPI_PHYSICAL_POINTER
-#define ACPI_LOGMODE_LOGPTR ACPI_LOGICAL_ADDRESSING | ACPI_LOGICAL_POINTER
-
-
/* Logical defines and NULL */
#ifdef FALSE
@@ -485,28 +409,11 @@ typedef struct uint32_struct
/*
- * Acpi integer width. In ACPI version 1, integers are
- * 32 bits. In ACPI version 2, integers are 64 bits.
- * Note that this pertains to the ACPI integer type only, not
- * other integers used in the implementation of the ACPI CA
+ * Acpi integer width. In ACPI version 1, integers are 32 bits. In ACPI
+ * version 2, integers are 64 bits. Note that this pertains to the ACPI integer
+ * type only, not other integers used in the implementation of the ACPI CA
* subsystem.
*/
-#ifdef ACPI_NO_INTEGER64_SUPPORT
-
-/* 32-bit integers only, no 64-bit support */
-
-typedef UINT32 ACPI_INTEGER;
-#define ACPI_INTEGER_MAX ACPI_UINT32_MAX
-#define ACPI_INTEGER_BIT_SIZE 32
-#define ACPI_MAX_DECIMAL_DIGITS 10 /* 2^32 = 4,294,967,296 */
-
-#define ACPI_USE_NATIVE_DIVIDE /* Use compiler native 32-bit divide */
-
-
-#else
-
-/* 64-bit integers */
-
typedef UINT64 ACPI_INTEGER;
#define ACPI_INTEGER_MAX ACPI_UINT64_MAX
#define ACPI_INTEGER_BIT_SIZE 64
@@ -516,7 +423,6 @@ typedef UINT64 ACPI_INTEGER;
#if ACPI_MACHINE_WIDTH == 64
#define ACPI_USE_NATIVE_DIVIDE /* Use compiler native 64-bit divide */
#endif
-#endif
#define ACPI_MAX64_DECIMAL_DIGITS 20
#define ACPI_MAX32_DECIMAL_DIGITS 10
@@ -544,7 +450,8 @@ typedef UINT64 ACPI_INTEGER;
/*
* Initialization state
*/
-#define ACPI_INITIALIZED_OK 0x01
+#define ACPI_SUBSYSTEM_INITIALIZE 0x01
+#define ACPI_INITIALIZED_OK 0x02
/*
* Power state values
@@ -583,29 +490,20 @@ typedef UINT64 ACPI_INTEGER;
/*
* Standard notify values
*/
-#define ACPI_NOTIFY_BUS_CHECK (UINT8) 0
-#define ACPI_NOTIFY_DEVICE_CHECK (UINT8) 1
-#define ACPI_NOTIFY_DEVICE_WAKE (UINT8) 2
-#define ACPI_NOTIFY_EJECT_REQUEST (UINT8) 3
-#define ACPI_NOTIFY_DEVICE_CHECK_LIGHT (UINT8) 4
-#define ACPI_NOTIFY_FREQUENCY_MISMATCH (UINT8) 5
-#define ACPI_NOTIFY_BUS_MODE_MISMATCH (UINT8) 6
-#define ACPI_NOTIFY_POWER_FAULT (UINT8) 7
-
-/*
- * Table types. These values are passed to the table related APIs
- */
-typedef UINT32 ACPI_TABLE_TYPE;
-
-#define ACPI_TABLE_ID_RSDP (ACPI_TABLE_TYPE) 0
-#define ACPI_TABLE_ID_DSDT (ACPI_TABLE_TYPE) 1
-#define ACPI_TABLE_ID_FADT (ACPI_TABLE_TYPE) 2
-#define ACPI_TABLE_ID_FACS (ACPI_TABLE_TYPE) 3
-#define ACPI_TABLE_ID_PSDT (ACPI_TABLE_TYPE) 4
-#define ACPI_TABLE_ID_SSDT (ACPI_TABLE_TYPE) 5
-#define ACPI_TABLE_ID_XSDT (ACPI_TABLE_TYPE) 6
-#define ACPI_TABLE_ID_MAX 6
-#define ACPI_NUM_TABLE_TYPES (ACPI_TABLE_ID_MAX+1)
+#define ACPI_NOTIFY_BUS_CHECK (UINT8) 0x00
+#define ACPI_NOTIFY_DEVICE_CHECK (UINT8) 0x01
+#define ACPI_NOTIFY_DEVICE_WAKE (UINT8) 0x02
+#define ACPI_NOTIFY_EJECT_REQUEST (UINT8) 0x03
+#define ACPI_NOTIFY_DEVICE_CHECK_LIGHT (UINT8) 0x04
+#define ACPI_NOTIFY_FREQUENCY_MISMATCH (UINT8) 0x05
+#define ACPI_NOTIFY_BUS_MODE_MISMATCH (UINT8) 0x06
+#define ACPI_NOTIFY_POWER_FAULT (UINT8) 0x07
+#define ACPI_NOTIFY_CAPABILITIES_CHECK (UINT8) 0x08
+#define ACPI_NOTIFY_DEVICE_PLD_CHECK (UINT8) 0x09
+#define ACPI_NOTIFY_RESERVED (UINT8) 0x0A
+#define ACPI_NOTIFY_LOCALITY_UPDATE (UINT8) 0x0B
+
+#define ACPI_NOTIFY_MAX 0x0B
/*
* Types associated with ACPI names and objects. The first group of
@@ -673,6 +571,9 @@ typedef UINT32 ACPI_OBJECT_TYPE;
#define ACPI_TYPE_INVALID 0x1E
#define ACPI_TYPE_NOT_FOUND 0xFF
+#define ACPI_NUM_NS_TYPES (ACPI_TYPE_INVALID + 1)
+
+
/*
* All I/O
*/
@@ -740,7 +641,7 @@ typedef UINT32 ACPI_EVENT_STATUS;
* | | | +--- Type of dispatch -- to method, handler, or none
* | | +--- Enabled for runtime?
* | +--- Enabled for wake?
- * +--- System state when GPE ocurred (running/waking)
+ * +--- Unused
*/
#define ACPI_GPE_XRUPT_TYPE_MASK (UINT8) 0x01
#define ACPI_GPE_LEVEL_TRIGGERED (UINT8) 0x01
@@ -766,10 +667,6 @@ typedef UINT32 ACPI_EVENT_STATUS;
#define ACPI_GPE_ENABLE_MASK (UINT8) 0x60 /* Both run/wake */
-#define ACPI_GPE_SYSTEM_MASK (UINT8) 0x80
-#define ACPI_GPE_SYSTEM_RUNNING (UINT8) 0x80
-#define ACPI_GPE_SYSTEM_WAKING (UINT8) 0x00
-
/*
* Flags for GPE and Lock interfaces
*/
@@ -784,7 +681,7 @@ typedef UINT32 ACPI_EVENT_STATUS;
#define ACPI_SYSTEM_NOTIFY 0x1
#define ACPI_DEVICE_NOTIFY 0x2
-#define ACPI_ALL_NOTIFY 0x3
+#define ACPI_ALL_NOTIFY (ACPI_SYSTEM_NOTIFY | ACPI_DEVICE_NOTIFY)
#define ACPI_MAX_NOTIFY_HANDLER_TYPE 0x3
#define ACPI_MAX_SYS_NOTIFY 0x7f
@@ -842,46 +739,51 @@ typedef UINT8 ACPI_ADR_SPACE_TYPE;
/*
* External ACPI object definition
*/
+
+/*
+ * Note: Type == ACPI_TYPE_ANY (0) is used to indicate a NULL package element
+ * or an unresolved named reference.
+ */
typedef union acpi_object
{
ACPI_OBJECT_TYPE Type; /* See definition of AcpiNsType for values */
struct
{
- ACPI_OBJECT_TYPE Type;
+ ACPI_OBJECT_TYPE Type; /* ACPI_TYPE_INTEGER */
ACPI_INTEGER Value; /* The actual number */
} Integer;
struct
{
- ACPI_OBJECT_TYPE Type;
+ ACPI_OBJECT_TYPE Type; /* ACPI_TYPE_STRING */
UINT32 Length; /* # of bytes in string, excluding trailing null */
char *Pointer; /* points to the string value */
} String;
struct
{
- ACPI_OBJECT_TYPE Type;
+ ACPI_OBJECT_TYPE Type; /* ACPI_TYPE_BUFFER */
UINT32 Length; /* # of bytes in buffer */
UINT8 *Pointer; /* points to the buffer */
} Buffer;
struct
{
- ACPI_OBJECT_TYPE Type;
- UINT32 Fill1;
- ACPI_HANDLE Handle; /* object reference */
- } Reference;
-
- struct
- {
- ACPI_OBJECT_TYPE Type;
+ ACPI_OBJECT_TYPE Type; /* ACPI_TYPE_PACKAGE */
UINT32 Count; /* # of elements in package */
union acpi_object *Elements; /* Pointer to an array of ACPI_OBJECTs */
} Package;
struct
{
- ACPI_OBJECT_TYPE Type;
+ ACPI_OBJECT_TYPE Type; /* ACPI_TYPE_LOCAL_REFERENCE */
+ ACPI_OBJECT_TYPE ActualType; /* Type associated with the Handle */
+ ACPI_HANDLE Handle; /* object reference */
+ } Reference;
+
+ struct
+ {
+ ACPI_OBJECT_TYPE Type; /* ACPI_TYPE_PROCESSOR */
UINT32 ProcId;
ACPI_IO_ADDRESS PblkAddress;
UINT32 PblkLength;
@@ -889,7 +791,7 @@ typedef union acpi_object
struct
{
- ACPI_OBJECT_TYPE Type;
+ ACPI_OBJECT_TYPE Type; /* ACPI_TYPE_POWER */
UINT32 SystemLevel;
UINT32 ResourceOrder;
} PowerResource;
@@ -941,16 +843,6 @@ typedef struct acpi_buffer
/*
- * ACPI Table Info. One per ACPI table _type_
- */
-typedef struct acpi_table_info
-{
- UINT32 Count;
-
-} ACPI_TABLE_INFO;
-
-
-/*
* System info returned by AcpiGetSystemInfo()
*/
typedef struct acpi_system_info
@@ -962,13 +854,31 @@ typedef struct acpi_system_info
UINT32 Reserved2;
UINT32 DebugLevel;
UINT32 DebugLayer;
- UINT32 NumTableTypes;
- ACPI_TABLE_INFO TableInfo [ACPI_TABLE_ID_MAX+1];
} ACPI_SYSTEM_INFO;
/*
+ * System statistecs returned by AcpiGetStatistics()
+ */
+typedef struct acpi_statistics
+{
+ UINT32 SciCount;
+ UINT32 GpeCount;
+ UINT32 FixedEventCount[ACPI_NUM_FIXED_EVENTS];
+ UINT32 MethodCount;
+
+} ACPI_STATISTICS;
+
+
+/* Table Event Types */
+
+#define ACPI_TABLE_EVENT_LOAD 0x0
+#define ACPI_TABLE_EVENT_UNLOAD 0x1
+#define ACPI_NUM_TABLE_EVENTS 2
+
+
+/*
* Types specific to the OS service interfaces
*/
typedef UINT32
@@ -1013,6 +923,18 @@ ACPI_STATUS (*ACPI_EXCEPTION_HANDLER) (
UINT32 AmlOffset,
void *Context);
+/* Table Event handler (Load, LoadTable etc) and types */
+
+typedef
+ACPI_STATUS (*ACPI_TABLE_HANDLER) (
+ UINT32 Event,
+ void *Table,
+ void *Context);
+
+#define ACPI_TABLE_LOAD 0x0
+#define ACPI_TABLE_UNLOAD 0x1
+#define ACPI_NUM_TABLE_EVENTS 2
+
/* Address Spaces (For Operation Regions) */
@@ -1114,6 +1036,7 @@ typedef struct acpi_device_info
{
ACPI_COMMON_OBJ_INFO;
+ UINT32 ParamCount; /* If a method, required parameter count */
UINT32 Valid; /* Indicates which fields below are valid */
UINT32 CurrentStatus; /* _STA value */
ACPI_INTEGER Address; /* _ADR value if any */
@@ -1261,6 +1184,7 @@ typedef struct acpi_vendor_uuid
*/
typedef struct acpi_resource_irq
{
+ UINT8 DescriptorLength;
UINT8 Triggering;
UINT8 Polarity;
UINT8 Sharable;
@@ -1269,7 +1193,6 @@ typedef struct acpi_resource_irq
} ACPI_RESOURCE_IRQ;
-
typedef struct ACPI_RESOURCE_DMA
{
UINT8 Type;
@@ -1280,9 +1203,9 @@ typedef struct ACPI_RESOURCE_DMA
} ACPI_RESOURCE_DMA;
-
typedef struct acpi_resource_start_dependent
{
+ UINT8 DescriptorLength;
UINT8 CompatibilityPriority;
UINT8 PerformanceRobustness;
@@ -1551,8 +1474,8 @@ typedef struct acpi_resource
#pragma pack()
-#define ACPI_RS_SIZE_MIN 12
#define ACPI_RS_SIZE_NO_DATA 8 /* Id + Length fields */
+#define ACPI_RS_SIZE_MIN (UINT32) ACPI_ROUND_UP_TO_NATIVE_WORD (12)
#define ACPI_RS_SIZE(Type) (UINT32) (ACPI_RS_SIZE_NO_DATA + sizeof (Type))
#define ACPI_NEXT_RESOURCE(Res) (ACPI_RESOURCE *)((UINT8 *) Res + Res->Length)
diff --git a/usr/src/uts/intel/sys/acpi/acutils.h b/usr/src/uts/intel/sys/acpi/acutils.h
index b4b6423b08..e8abd70566 100644
--- a/usr/src/uts/intel/sys/acpi/acutils.h
+++ b/usr/src/uts/intel/sys/acpi/acutils.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
- * $Revision: 1.196 $
+ * $Revision: 1.204 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -190,7 +190,7 @@ typedef struct acpi_pkg_info
/*
* utglobal - Global data structures and procedures
*/
-void
+ACPI_STATUS
AcpiUtInitGlobals (
void);
@@ -200,6 +200,10 @@ char *
AcpiUtGetMutexName (
UINT32 MutexId);
+const char *
+AcpiUtGetNotifyName (
+ UINT32 NotifyValue);
+
#endif
char *
@@ -214,6 +218,10 @@ char *
AcpiUtGetDescriptorName (
void *Object);
+const char *
+AcpiUtGetReferenceName (
+ ACPI_OPERAND_OBJECT *Object);
+
char *
AcpiUtGetObjectTypeName (
ACPI_OPERAND_OBJECT *ObjDesc);
@@ -247,10 +255,6 @@ void
AcpiUtSubsystemShutdown (
void);
-ACPI_STATUS
-AcpiUtValidateFadt (
- void);
-
/*
* utclib - Local implementations of C library functions
@@ -320,7 +324,7 @@ AcpiUtMemcpy (
void *
AcpiUtMemset (
void *Dest,
- ACPI_NATIVE_UINT Value,
+ UINT8 Value,
ACPI_SIZE Count);
int
@@ -417,14 +421,14 @@ void
AcpiUtTrace (
UINT32 LineNumber,
const char *FunctionName,
- char *ModuleName,
+ const char *ModuleName,
UINT32 ComponentId);
void
AcpiUtTracePtr (
UINT32 LineNumber,
const char *FunctionName,
- char *ModuleName,
+ const char *ModuleName,
UINT32 ComponentId,
void *Pointer);
@@ -432,7 +436,7 @@ void
AcpiUtTraceU32 (
UINT32 LineNumber,
const char *FunctionName,
- char *ModuleName,
+ const char *ModuleName,
UINT32 ComponentId,
UINT32 Integer);
@@ -440,7 +444,7 @@ void
AcpiUtTraceStr (
UINT32 LineNumber,
const char *FunctionName,
- char *ModuleName,
+ const char *ModuleName,
UINT32 ComponentId,
char *String);
@@ -448,14 +452,14 @@ void
AcpiUtExit (
UINT32 LineNumber,
const char *FunctionName,
- char *ModuleName,
+ const char *ModuleName,
UINT32 ComponentId);
void
AcpiUtStatusExit (
UINT32 LineNumber,
const char *FunctionName,
- char *ModuleName,
+ const char *ModuleName,
UINT32 ComponentId,
ACPI_STATUS Status);
@@ -463,7 +467,7 @@ void
AcpiUtValueExit (
UINT32 LineNumber,
const char *FunctionName,
- char *ModuleName,
+ const char *ModuleName,
UINT32 ComponentId,
ACPI_INTEGER Value);
@@ -471,7 +475,7 @@ void
AcpiUtPtrExit (
UINT32 LineNumber,
const char *FunctionName,
- char *ModuleName,
+ const char *ModuleName,
UINT32 ComponentId,
UINT8 *Ptr);
@@ -510,9 +514,9 @@ AcpiUtDebugPrint (
UINT32 RequestedDebugLevel,
UINT32 LineNumber,
const char *FunctionName,
- char *ModuleName,
+ const char *ModuleName,
UINT32 ComponentId,
- char *Format,
+ const char *Format,
...) ACPI_PRINTF_LIKE(6);
void ACPI_INTERNAL_VAR_XFACE
@@ -520,38 +524,38 @@ AcpiUtDebugPrintRaw (
UINT32 RequestedDebugLevel,
UINT32 LineNumber,
const char *FunctionName,
- char *ModuleName,
+ const char *ModuleName,
UINT32 ComponentId,
- char *Format,
+ const char *Format,
...) ACPI_PRINTF_LIKE(6);
void ACPI_INTERNAL_VAR_XFACE
AcpiUtError (
- char *ModuleName,
+ const char *ModuleName,
UINT32 LineNumber,
- char *Format,
+ const char *Format,
...) ACPI_PRINTF_LIKE(3);
void ACPI_INTERNAL_VAR_XFACE
AcpiUtException (
- char *ModuleName,
+ const char *ModuleName,
UINT32 LineNumber,
ACPI_STATUS Status,
- char *Format,
+ const char *Format,
...) ACPI_PRINTF_LIKE(4);
void ACPI_INTERNAL_VAR_XFACE
AcpiUtWarning (
- char *ModuleName,
+ const char *ModuleName,
UINT32 LineNumber,
- char *Format,
+ const char *Format,
...) ACPI_PRINTF_LIKE(3);
void ACPI_INTERNAL_VAR_XFACE
AcpiUtInfo (
- char *ModuleName,
+ const char *ModuleName,
UINT32 LineNumber,
- char *Format,
+ const char *Format,
...) ACPI_PRINTF_LIKE(3);
@@ -630,14 +634,14 @@ AcpiUtExecute_Sxds (
*/
ACPI_OPERAND_OBJECT *
AcpiUtCreateInternalObjectDbg (
- char *ModuleName,
+ const char *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId,
ACPI_OBJECT_TYPE Type);
void *
AcpiUtAllocateObjectDescDbg (
- char *ModuleName,
+ const char *ModuleName,
UINT32 LineNumber,
UINT32 ComponentId);
@@ -653,6 +657,10 @@ AcpiUtValidInternalObject (
void *Object);
ACPI_OPERAND_OBJECT *
+AcpiUtCreatePackageObject (
+ UINT32 Count);
+
+ACPI_OPERAND_OBJECT *
AcpiUtCreateBufferObject (
ACPI_SIZE BufferSize);
@@ -740,6 +748,10 @@ AcpiUtShortDivide (
/*
* utmisc
*/
+const char *
+AcpiUtValidateException (
+ ACPI_STATUS Status);
+
BOOLEAN
AcpiUtIsAmlTable (
ACPI_TABLE_HEADER *Table);
@@ -772,14 +784,14 @@ BOOLEAN
AcpiUtValidAcpiName (
UINT32 Name);
-ACPI_NAME
+void
AcpiUtRepairName (
- ACPI_NAME Name);
+ char *Name);
BOOLEAN
AcpiUtValidAcpiChar (
char Character,
- ACPI_NATIVE_UINT Position);
+ UINT32 Position);
ACPI_STATUS
AcpiUtStrtoul64 (
@@ -889,14 +901,14 @@ void *
AcpiUtAllocate (
ACPI_SIZE Size,
UINT32 Component,
- char *Module,
+ const char *Module,
UINT32 Line);
void *
AcpiUtAllocateZeroed (
ACPI_SIZE Size,
UINT32 Component,
- char *Module,
+ const char *Module,
UINT32 Line);
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
@@ -904,21 +916,21 @@ void *
AcpiUtAllocateAndTrack (
ACPI_SIZE Size,
UINT32 Component,
- char *Module,
+ const char *Module,
UINT32 Line);
void *
AcpiUtAllocateZeroedAndTrack (
ACPI_SIZE Size,
UINT32 Component,
- char *Module,
+ const char *Module,
UINT32 Line);
void
AcpiUtFreeAndTrack (
void *Address,
UINT32 Component,
- char *Module,
+ const char *Module,
UINT32 Line);
void
@@ -928,7 +940,7 @@ AcpiUtDumpAllocationInfo (
void
AcpiUtDumpAllocations (
UINT32 Component,
- char *Module);
+ const char *Module);
ACPI_STATUS
AcpiUtCreateList (
diff --git a/usr/src/uts/intel/sys/acpi/amlcode.h b/usr/src/uts/intel/sys/acpi/amlcode.h
index bb4948c825..9de6e51430 100644
--- a/usr/src/uts/intel/sys/acpi/amlcode.h
+++ b/usr/src/uts/intel/sys/acpi/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: 1.84 $
+ * $Revision: 1.87 $
*
*****************************************************************************/
@@ -11,7 +11,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -349,7 +349,7 @@
#define ARGI_DATAOBJECT 0x12 /* Buffer, String, package or reference to a Node - Used only by SizeOf operator*/
#define ARGI_COMPLEXOBJ 0x13 /* Buffer, String, or package (Used by INDEX op only) */
#define ARGI_REF_OR_STRING 0x14 /* Reference or String (Used by DEREFOF op only) */
-#define ARGI_REGION_OR_FIELD 0x15 /* Used by LOAD op only */
+#define ARGI_REGION_OR_BUFFER 0x15 /* Used by LOAD op only */
#define ARGI_DATAREFOBJ 0x16
/* Note: types above can expand to 0x1F maximum */
diff --git a/usr/src/uts/intel/sys/acpi/amlresrc.h b/usr/src/uts/intel/sys/acpi/amlresrc.h
index 22838f2ce8..ae6e3bf9ff 100644
--- a/usr/src/uts/intel/sys/acpi/amlresrc.h
+++ b/usr/src/uts/intel/sys/acpi/amlresrc.h
@@ -2,7 +2,7 @@
/******************************************************************************
*
* Module Name: amlresrc.h - AML resource descriptors
- * $Revision: 1.39 $
+ * $Revision: 1.41 $
*
*****************************************************************************/
@@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/sys/acpi/platform/acefi.h b/usr/src/uts/intel/sys/acpi/platform/acefi.h
index 8410b06e5d..cb86bc70ee 100644
--- a/usr/src/uts/intel/sys/acpi/platform/acefi.h
+++ b/usr/src/uts/intel/sys/acpi/platform/acefi.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acefi.h - OS specific defines, etc.
- * $Revision: 1.17 $
+ * $Revision: 1.19 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/sys/acpi/platform/acenv.h b/usr/src/uts/intel/sys/acpi/platform/acenv.h
index 0f5cc55840..44f46e09b7 100644
--- a/usr/src/uts/intel/sys/acpi/platform/acenv.h
+++ b/usr/src/uts/intel/sys/acpi/platform/acenv.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acenv.h - Generation environment specific items
- * $Revision: 1.130 $
+ * $Revision: 1.133 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -211,7 +211,7 @@
/*! [Begin] no source code translation */
-#if defined(__linux__)
+#if defined(_LINUX) || defined(__linux__)
#include "aclinux.h"
#elif defined(_AED_EFI)
@@ -241,6 +241,9 @@
#elif defined(__sun)
#include "acsolaris.h"
+#elif defined(__OS2__)
+#include "acos2.h"
+
#else
/* All other environments */
diff --git a/usr/src/uts/intel/sys/acpi/platform/acfreebsd.h b/usr/src/uts/intel/sys/acpi/platform/acfreebsd.h
index 3e255e6ae0..e7b2c825ce 100644
--- a/usr/src/uts/intel/sys/acpi/platform/acfreebsd.h
+++ b/usr/src/uts/intel/sys/acpi/platform/acfreebsd.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acfreebsd.h - OS specific defines, etc.
- * $Revision: 1.23 $
+ * $Revision: 1.27 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -124,7 +124,6 @@
#include <sys/types.h>
#include <machine/acpica_machdep.h>
-#define ACPI_THREAD_ID pid_t
#define ACPI_UINTPTR_T uintptr_t
#define ACPI_USE_LOCAL_CACHE
#define __cdecl
@@ -176,25 +175,25 @@
/* Always use FreeBSD code over our local versions */
#define ACPI_USE_SYSTEM_CLIBRARY
-#ifdef _KERNEL
+#if defined(_KERNEL) && (__FreeBSD_version < 700020)
/* Or strstr (used in debugging mode, also move to libkern) */
static __inline char *
-strstr(char *s, char *find)
+strstr (char *s, char *find)
{
char c, sc;
size_t len;
if ((c = *find++) != 0) {
- len = strlen(find);
- do {
+ len = strlen (find);
do {
- if ((sc = *s++) == 0)
- return (NULL);
- } while (sc != c);
- } while (strncmp(s, find, len) != 0);
- s--;
+ do {
+ if ((sc = *s++) == 0)
+ return (NULL);
+ } while (sc != c);
+ } while (strncmp (s, find, len) != 0);
+ s--;
}
- return ((char *)s);
+ return ((char *) s);
}
#endif /* _KERNEL */
diff --git a/usr/src/uts/intel/sys/acpi/platform/acgcc.h b/usr/src/uts/intel/sys/acpi/platform/acgcc.h
index 199f142c9b..0f19883bd3 100644
--- a/usr/src/uts/intel/sys/acpi/platform/acgcc.h
+++ b/usr/src/uts/intel/sys/acpi/platform/acgcc.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acgcc.h - GCC specific defines, etc.
- * $Revision: 1.31 $
+ * $Revision: 1.33 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/sys/acpi/platform/acintel.h b/usr/src/uts/intel/sys/acpi/platform/acintel.h
index 2b834323ff..92cd70b3e3 100644
--- a/usr/src/uts/intel/sys/acpi/platform/acintel.h
+++ b/usr/src/uts/intel/sys/acpi/platform/acintel.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acintel.h - VC specific defines, etc.
- * $Revision: 1.16 $
+ * $Revision: 1.19 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -121,6 +121,8 @@
#define COMPILER_DEPENDENT_INT64 __int64
#define COMPILER_DEPENDENT_UINT64 unsigned __int64
+#define inline __inline
+
/*
* Calling conventions:
*
diff --git a/usr/src/uts/intel/sys/acpi/platform/aclinux.h b/usr/src/uts/intel/sys/acpi/platform/aclinux.h
index fc84c72b9b..1322424704 100644
--- a/usr/src/uts/intel/sys/acpi/platform/aclinux.h
+++ b/usr/src/uts/intel/sys/acpi/platform/aclinux.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: aclinux.h - OS specific defines, etc.
- * $Revision: 1.41 $
+ * $Revision: 1.44 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -158,7 +158,10 @@
#define ACPI_USE_NATIVE_DIVIDE
#endif
+#ifndef __cdecl
#define __cdecl
+#endif
+
#define ACPI_FLUSH_CPU_CACHE()
#endif /* __KERNEL__ */
diff --git a/usr/src/uts/intel/sys/acpi/platform/acmsvc.h b/usr/src/uts/intel/sys/acpi/platform/acmsvc.h
index 282231cc1d..3b065a8905 100644
--- a/usr/src/uts/intel/sys/acpi/platform/acmsvc.h
+++ b/usr/src/uts/intel/sys/acpi/platform/acmsvc.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acmsvc.h - VC specific defines, etc.
- * $Revision: 1.25 $
+ * $Revision: 1.28 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -168,9 +168,6 @@
}
#endif
-/* warn C4214: nonstandard extension used : bit field types other than int */
-#pragma warning(disable:4214)
-
/* warn C4100: unreferenced formal parameter */
#pragma warning(disable:4100)
diff --git a/usr/src/uts/intel/sys/acpi/platform/acnetbsd.h b/usr/src/uts/intel/sys/acpi/platform/acnetbsd.h
index 591cd49f36..d120b54a10 100644
--- a/usr/src/uts/intel/sys/acpi/platform/acnetbsd.h
+++ b/usr/src/uts/intel/sys/acpi/platform/acnetbsd.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acnetbsd.h - OS specific defines, etc.
- * $Revision: 1.8 $
+ * $Revision: 1.10 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
diff --git a/usr/src/uts/intel/sys/acpi/platform/acos2.h b/usr/src/uts/intel/sys/acpi/platform/acos2.h
new file mode 100644
index 0000000000..f8ab46563c
--- /dev/null
+++ b/usr/src/uts/intel/sys/acpi/platform/acos2.h
@@ -0,0 +1,178 @@
+/******************************************************************************
+ *
+ * Name: acos2.h - OS/2 specific defines, etc.
+ * $Revision: 1.0 $
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999 - 2008, 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.
+ *
+ *****************************************************************************/
+
+#ifndef __ACOS2_H__
+#define __ACOS2_H__
+#define INCL_LONGLONG
+#include <os2.h>
+
+
+#define ACPI_MACHINE_WIDTH 32
+
+#define COMPILER_DEPENDENT_INT64 long long
+#define COMPILER_DEPENDENT_UINT64 unsigned long long
+#define ACPI_USE_NATIVE_DIVIDE
+
+#define ACPI_SYSTEM_XFACE APIENTRY
+#define ACPI_EXTERNAL_XFACE APIENTRY
+#define ACPI_INTERNAL_XFACE APIENTRY
+#define ACPI_INTERNAL_VAR_XFACE APIENTRY
+
+/*
+ * Some compilers complain about unused variables. Sometimes we don't want to
+ * use all the variables (most specifically for _THIS_MODULE). This allow us
+ * to to tell the compiler warning in a per-variable manner that a variable
+ * is unused.
+ */
+#define ACPI_UNUSED_VAR
+
+#define ACPI_USE_STANDARD_HEADERS
+#include <io.h>
+
+#define ACPI_ASM_MACROS
+
+#define BREAKPOINT3 __interrupt(3)
+#define ACPI_DISABLE_IRQS() __disable()
+#define ACPI_ENABLE_IRQS() __enable()
+#define ACPI_FLUSH_CPU_CACHE() Wbinvd()
+void Wbinvd(void);
+
+#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) Acq = OSPMAcquireGlobalLock(GLptr)
+#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Pnd) Pnd = OSPMReleaseGlobalLock(GLptr)
+unsigned short OSPMAcquireGlobalLock (void *);
+unsigned short OSPMReleaseGlobalLock (void *);
+
+#define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \
+{ \
+ unsigned long long val = 0LL; \
+ val = n_lo | ( ((unsigned long long)h_hi) << 32 ); \
+ __llrotr (val,1); \
+ n_hi = (unsigned long)((val >> 32 ) & 0xffffffff ); \
+ n_lo = (unsigned long)(val & 0xffffffff); \
+}
+
+/* IBM VAC does not have inline */
+
+#if __IBMC__ || __IBMCPP__
+#define inline
+#endif
+
+#ifndef ACPI_ASL_COMPILER
+#define ACPI_USE_LOCAL_CACHE
+#undef ACPI_DEBUGGER
+#endif
+
+#endif /* __ACOS2_H__ */
diff --git a/usr/src/uts/intel/sys/acpi/platform/acsolaris.h b/usr/src/uts/intel/sys/acpi/platform/acsolaris.h
index 87820c1ce7..849a95acad 100644
--- a/usr/src/uts/intel/sys/acpi/platform/acsolaris.h
+++ b/usr/src/uts/intel/sys/acpi/platform/acsolaris.h
@@ -19,15 +19,13 @@
* CDDL HEADER END
*/
/*
- * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _ACSOLARIS_H_
#define _ACSOLARIS_H_
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -39,8 +37,8 @@ extern "C" {
#define strtoul simple_strtoul
-uint32_t __acpi_acquire_global_lock(uint32_t *);
-uint32_t __acpi_release_global_lock(uint32_t *);
+uint32_t __acpi_acquire_global_lock(void *);
+uint32_t __acpi_release_global_lock(void *);
void __acpi_wbinvd(void);
#ifdef _ILP32
@@ -79,11 +77,11 @@ void __acpi_wbinvd(void);
#define BREAKPOINT3
#define ACPI_DISABLE_IRQS() cli()
#define ACPI_ENABLE_IRQS() sti()
-#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \
- ((Acq) = __acpi_acquire_global_lock(GLptr))
+#define ACPI_ACQUIRE_GLOBAL_LOCK(Facs, Acq) \
+ ((Acq) = __acpi_acquire_global_lock(Facs))
-#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \
- ((Acq) = __acpi_release_global_lock(GLptr))
+#define ACPI_RELEASE_GLOBAL_LOCK(Facs, Acq) \
+ ((Acq) = __acpi_release_global_lock(Facs))
#ifdef __cplusplus
}
diff --git a/usr/src/uts/intel/sys/acpi/platform/acwin.h b/usr/src/uts/intel/sys/acpi/platform/acwin.h
index d7d1996b70..4845d7364c 100644
--- a/usr/src/uts/intel/sys/acpi/platform/acwin.h
+++ b/usr/src/uts/intel/sys/acpi/platform/acwin.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acwin.h - OS specific defines, etc.
- * $Revision: 1.25 $
+ * $Revision: 1.30 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -128,6 +128,7 @@
#define ACPI_MACHINE_WIDTH 32
#define isascii __isascii
+#define inline __inline
#define ACPI_USE_STANDARD_HEADERS
@@ -172,15 +173,21 @@ typedef COMPILER_DEPENDENT_UINT64 u64;
#define ACPI_SIMPLE_RETURN_MACROS
#endif
+/*! [End] no source code translation !*/
+
/*
- * For Acpi applications, we don't want to try to access the global lock
+ * Global Lock acquire/release code
+ *
+ * Note: Handles case where the FACS pointer is null
*/
-#ifdef ACPI_APPLICATION
-#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) if (AcpiGbl_CommonFACS.GlobalLock) Acq = TRUE;
-#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Pnd) Pnd = 0;
-#else
-#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) __asm { \
- __asm mov ecx, GLptr \
+#define ACPI_ACQUIRE_GLOBAL_LOCK(FacsPtr, Acq) __asm \
+{ \
+ __asm mov eax, 0xFF \
+ __asm mov ecx, FacsPtr \
+ __asm or ecx, ecx \
+ __asm jz exit_acq \
+ __asm lea ecx, [ecx].GlobalLock \
+ \
__asm acq10: \
__asm mov eax, [ecx] \
__asm mov edx, eax \
@@ -192,11 +199,19 @@ typedef COMPILER_DEPENDENT_UINT64 u64;
\
__asm cmp dl, 3 \
__asm sbb eax, eax \
+ \
+ __asm exit_acq: \
__asm mov Acq, al \
}
-#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Pnd) __asm { \
- __asm mov ecx, GLptr \
+#define ACPI_RELEASE_GLOBAL_LOCK(FacsPtr, Pnd) __asm \
+{ \
+ __asm xor eax, eax \
+ __asm mov ecx, FacsPtr \
+ __asm or ecx, ecx \
+ __asm jz exit_rel \
+ __asm lea ecx, [ecx].GlobalLock \
+ \
__asm Rel10: \
__asm mov eax, [ecx] \
__asm mov edx, eax \
@@ -206,10 +221,9 @@ typedef COMPILER_DEPENDENT_UINT64 u64;
\
__asm cmp dl, 3 \
__asm and eax, 1 \
+ \
+ __asm exit_rel: \
__asm mov Pnd, al \
}
-#endif
-
-
#endif /* __ACWIN_H__ */
diff --git a/usr/src/uts/intel/sys/acpi/platform/acwin64.h b/usr/src/uts/intel/sys/acpi/platform/acwin64.h
index bf4a5e0ab3..6b289a439f 100644
--- a/usr/src/uts/intel/sys/acpi/platform/acwin64.h
+++ b/usr/src/uts/intel/sys/acpi/platform/acwin64.h
@@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acwin.h - OS specific defines, etc.
- * $Revision: 1.15 $
+ * $Revision: 1.17 $
*
*****************************************************************************/
@@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp.
* All rights reserved.
*
* 2. License