sync with head yamt-lazymbuf
authoryamt <yamt@NetBSD.org>
Mon, 21 Jan 2008 09:45:00 +0000
branchyamt-lazymbuf
changeset 288732 c6f414228f06
parent 288731 3c506cf42424
child 288733 0f04843c5810
sync with head
sys/dist/acpica/acmacros.h
sys/dist/acpica/acnames.h
sys/dist/acpica/acnamesp.h
sys/dist/acpica/acobject.h
sys/dist/acpica/acopcode.h
sys/dist/acpica/acoutput.h
sys/dist/acpica/acparser.h
sys/dist/acpica/acpi.h
sys/dist/acpica/acpiosxf.h
sys/dist/acpica/acpixf.h
sys/dist/acpica/acresrc.h
sys/dist/acpica/acstruct.h
sys/dist/acpica/actables.h
sys/dist/acpica/actbl.h
sys/dist/acpica/actbl1.h
sys/dist/acpica/actbl2.h
sys/dist/acpica/actypes.h
sys/dist/acpica/acutils.h
sys/dist/acpica/aecommon.h
sys/dist/acpica/amlcode.h
sys/dist/acpica/amlresrc.h
sys/dist/acpica/dbcmds.c
sys/dist/acpica/dbdisply.c
sys/dist/acpica/dbexec.c
sys/dist/acpica/dbfileio.c
sys/dist/acpica/dbhistry.c
sys/dist/acpica/dbinput.c
sys/dist/acpica/dbstats.c
sys/dist/acpica/dbutils.c
sys/dist/acpica/dbxface.c
sys/dist/acpica/dmbuffer.c
sys/dist/acpica/dmnames.c
sys/dist/acpica/dmobject.c
sys/dist/acpica/dmopcode.c
sys/dist/acpica/dmresrc.c
sys/dist/acpica/dmresrcl.c
sys/dist/acpica/dmresrcs.c
sys/dist/acpica/dmutils.c
sys/dist/acpica/dmwalk.c
sys/dist/acpica/dsfield.c
sys/dist/acpica/dsinit.c
sys/dist/acpica/dsmethod.c
sys/dist/acpica/dsmthdat.c
sys/dist/acpica/dsobject.c
sys/dist/acpica/dsopcode.c
sys/dist/acpica/dsutils.c
sys/dist/acpica/dswexec.c
sys/dist/acpica/dswload.c
sys/dist/acpica/dswscope.c
sys/dist/acpica/dswstate.c
sys/dist/acpica/evevent.c
sys/dist/acpica/evgpe.c
sys/dist/acpica/evgpeblk.c
sys/dist/acpica/evmisc.c
sys/dist/acpica/evregion.c
sys/dist/acpica/evrgnini.c
sys/dist/acpica/evsci.c
sys/dist/acpica/evxface.c
sys/dist/acpica/evxfevnt.c
sys/dist/acpica/evxfregn.c
sys/dist/acpica/exconfig.c
sys/dist/acpica/exconvrt.c
sys/dist/acpica/excreate.c
sys/dist/acpica/exdump.c
sys/dist/acpica/exfield.c
sys/dist/acpica/exfldio.c
sys/dist/acpica/exmisc.c
sys/dist/acpica/exmutex.c
sys/dist/acpica/exnames.c
sys/dist/acpica/exoparg1.c
sys/dist/acpica/exoparg2.c
sys/dist/acpica/exoparg3.c
sys/dist/acpica/exoparg6.c
sys/dist/acpica/exprep.c
sys/dist/acpica/exregion.c
sys/dist/acpica/exresnte.c
sys/dist/acpica/exresolv.c
sys/dist/acpica/exresop.c
sys/dist/acpica/exstore.c
sys/dist/acpica/exstoren.c
sys/dist/acpica/exstorob.c
sys/dist/acpica/exsystem.c
sys/dist/acpica/exutils.c
sys/dist/acpica/hwacpi.c
sys/dist/acpica/hwgpe.c
sys/dist/acpica/hwregs.c
sys/dist/acpica/hwsleep.c
sys/dist/acpica/hwtimer.c
sys/dist/acpica/nsaccess.c
sys/dist/acpica/nsalloc.c
sys/dist/acpica/nsdump.c
sys/dist/acpica/nsdumpdv.c
sys/dist/acpica/nseval.c
sys/dist/acpica/nsinit.c
sys/dist/acpica/nsload.c
sys/dist/acpica/nsnames.c
sys/dist/acpica/nsobject.c
sys/dist/acpica/nsparse.c
sys/dist/acpica/nssearch.c
sys/dist/acpica/nsutils.c
sys/dist/acpica/nswalk.c
sys/dist/acpica/nsxfeval.c
sys/dist/acpica/nsxfname.c
sys/dist/acpica/nsxfobj.c
sys/dist/acpica/psargs.c
sys/dist/acpica/psloop.c
sys/dist/acpica/psopcode.c
sys/dist/acpica/psparse.c
sys/dist/acpica/psscope.c
sys/dist/acpica/pstree.c
sys/dist/acpica/psutils.c
sys/dist/acpica/pswalk.c
sys/dist/acpica/psxface.c
sys/dist/acpica/rsaddr.c
sys/dist/acpica/rscalc.c
sys/dist/acpica/rscreate.c
sys/dist/acpica/rsdump.c
sys/dist/acpica/rsinfo.c
sys/dist/acpica/rsio.c
sys/dist/acpica/rsirq.c
sys/dist/acpica/rslist.c
sys/dist/acpica/rsmemory.c
sys/dist/acpica/rsmisc.c
sys/dist/acpica/rsutils.c
sys/dist/acpica/rsxface.c
sys/dist/acpica/tbconvrt.c
sys/dist/acpica/tbfadt.c
sys/dist/acpica/tbfind.c
sys/dist/acpica/tbget.c
sys/dist/acpica/tbgetall.c
sys/dist/acpica/tbinstal.c
sys/dist/acpica/tbrsdt.c
sys/dist/acpica/tbutils.c
sys/dist/acpica/tbxface.c
sys/dist/acpica/tbxfroot.c
sys/dist/acpica/utalloc.c
sys/dist/acpica/utcache.c
sys/dist/acpica/utclib.c
sys/dist/acpica/utcopy.c
sys/dist/acpica/utdebug.c
sys/dist/acpica/utdelete.c
sys/dist/acpica/uteval.c
sys/dist/acpica/utglobal.c
sys/dist/acpica/utinit.c
sys/dist/acpica/utmath.c
sys/dist/acpica/utmisc.c
sys/dist/acpica/utmutex.c
sys/dist/acpica/utobject.c
sys/dist/acpica/utresrc.c
sys/dist/acpica/utstate.c
sys/dist/acpica/uttrack.c
sys/dist/acpica/utxface.c
sys/dist/ipf/netinet/ip_fil_netbsd.c
sys/dist/ipf/netinet/ip_ftp_pxy.c
sys/dist/ipf/netinet/ip_h323_pxy.c
sys/dist/ipf/netinet/ip_htable.c
sys/dist/ipf/netinet/ip_ipsec_pxy.c
sys/dist/ipf/netinet/ip_irc_pxy.c
sys/dist/ipf/netinet/ip_lookup.c
sys/dist/ipf/netinet/ip_nat.c
sys/dist/ipf/netinet/ip_netbios_pxy.c
sys/dist/ipf/netinet/ip_pool.c
sys/dist/ipf/netinet/ip_pptp_pxy.c
sys/dist/ipf/netinet/ip_proxy.c
sys/dist/ipf/netinet/ip_raudio_pxy.c
sys/dist/ipf/netinet/ip_rcmd_pxy.c
sys/dist/ipf/netinet/ip_rpcb_pxy.c
sys/dist/ipf/netinet/ip_scan.c
sys/dist/ipf/netinet/ip_sync.c
sys/dist/pf/net/if_pflog.c
sys/dist/pf/net/pf.c
sys/dist/pf/net/pf_if.c
sys/dist/pf/net/pf_ioctl.c
sys/dist/pf/net/pf_norm.c
sys/dist/pf/net/pf_osfp.c
sys/dist/pf/net/pf_table.c
sys/fs/adosfs/adutil.c
sys/fs/adosfs/advfsops.c
sys/fs/adosfs/advnops.c
sys/fs/cd9660/cd9660_node.c
sys/fs/cd9660/cd9660_node.h
sys/fs/cd9660/cd9660_vfsops.c
sys/fs/cd9660/cd9660_vnops.c
sys/fs/efs/efs_ihash.c
sys/fs/efs/efs_vfsops.c
sys/fs/efs/efs_vnops.c
sys/fs/filecorefs/filecore.h
sys/fs/filecorefs/filecore_node.c
sys/fs/filecorefs/filecore_vfsops.c
sys/fs/hfs/hfs_nhash.c
sys/fs/hfs/hfs_subr.c
sys/fs/hfs/hfs_vfsops.c
sys/fs/hfs/hfs_vnops.c
sys/fs/hfs/libhfs.c
sys/fs/hfs/unicode.c
sys/fs/msdosfs/msdosfs_denode.c
sys/fs/msdosfs/msdosfs_vfsops.c
sys/fs/msdosfs/msdosfs_vnops.c
sys/fs/ntfs/ntfs_inode.h
sys/fs/ntfs/ntfs_subr.c
sys/fs/ntfs/ntfs_vfsops.c
sys/fs/ntfs/ntfs_vnops.c
sys/fs/ptyfs/ptyfs_subr.c
sys/fs/ptyfs/ptyfs_vnops.c
sys/fs/puffs/puffs_msgif.c
sys/fs/puffs/puffs_msgif.h
sys/fs/puffs/puffs_node.c
sys/fs/puffs/puffs_subr.c
sys/fs/puffs/puffs_sys.h
sys/fs/puffs/puffs_vfsops.c
sys/fs/puffs/puffs_vnops.c
sys/fs/smbfs/smbfs_io.c
sys/fs/smbfs/smbfs_kq.c
sys/fs/smbfs/smbfs_node.c
sys/fs/smbfs/smbfs_vfsops.c
sys/fs/smbfs/smbfs_vnops.c
sys/fs/sysvbfs/bfs.c
sys/fs/sysvbfs/bfs.h
sys/fs/sysvbfs/bfs_sysvbfs.c
sys/fs/sysvbfs/sysvbfs_vfsops.c
sys/fs/sysvbfs/sysvbfs_vnops.c
sys/fs/tmpfs/tmpfs.h
sys/fs/tmpfs/tmpfs_pool.c
sys/fs/tmpfs/tmpfs_subr.c
sys/fs/tmpfs/tmpfs_vfsops.c
sys/fs/tmpfs/tmpfs_vnops.c
sys/fs/udf/ecma167-udf.h
sys/fs/udf/udf_osta.c
sys/fs/udf/udf_subr.c
sys/fs/udf/udf_vfsops.c
sys/fs/udf/udf_vnops.c
sys/fs/union/union.h
sys/fs/union/union_subr.c
sys/fs/union/union_vfsops.c
sys/fs/union/union_vnops.c
sys/kern/Make.tags.inc
sys/kern/exec_conf.c
sys/kern/exec_elf32.c
sys/kern/exec_macho.c
sys/kern/exec_script.c
sys/kern/exec_subr.c
sys/kern/init_main.c
sys/kern/init_sysctl.c
sys/kern/init_sysent.c
sys/kern/kern_acct.c
sys/kern/kern_clock.c
sys/kern/kern_core.c
sys/kern/kern_cpu.c
sys/kern/kern_descrip.c
sys/kern/kern_event.c
sys/kern/kern_exec.c
sys/kern/kern_exit.c
sys/kern/kern_fileassoc.c
sys/kern/kern_fork.c
sys/kern/kern_idle.c
sys/kern/kern_ksyms.c
sys/kern/kern_kthread.c
sys/kern/kern_ktrace.c
sys/kern/kern_lkm.c
sys/kern/kern_lock.c
sys/kern/kern_lwp.c
sys/kern/kern_malloc.c
sys/kern/kern_module.c
sys/kern/kern_mutex.c
sys/kern/kern_ntptime.c
sys/kern/kern_pax.c
sys/kern/kern_physio.c
sys/kern/kern_pmf.c
sys/kern/kern_proc.c
sys/kern/kern_prot.c
sys/kern/kern_ras.c
sys/kern/kern_resource.c
sys/kern/kern_rwlock.c
sys/kern/kern_sig.c
sys/kern/kern_sleepq.c
sys/kern/kern_softint.c
sys/kern/kern_stub.c
sys/kern/kern_subr.c
sys/kern/kern_synch.c
sys/kern/kern_sysctl.c
sys/kern/kern_systrace.c
sys/kern/kern_tc.c
sys/kern/kern_time.c
sys/kern/kern_timeout.c
sys/kern/kern_todr.c
sys/kern/kern_turnstile.c
sys/kern/kern_uuid.c
sys/kern/kern_verifiedexec.c
sys/kern/kern_xxx.c
sys/kern/makesyscalls.sh
sys/kern/sched_4bsd.c
sys/kern/sched_m2.c
sys/kern/subr_autoconf.c
sys/kern/subr_disk.c
sys/kern/subr_disk_mbr.c
sys/kern/subr_kmem.c
sys/kern/subr_kobj.c
sys/kern/subr_lockdebug.c
sys/kern/subr_log.c
sys/kern/subr_percpu.c
sys/kern/subr_pool.c
sys/kern/subr_prf.c
sys/kern/subr_prf2.c
sys/kern/subr_prof.c
sys/kern/subr_tftproot.c
sys/kern/subr_time.c
sys/kern/subr_vmem.c
sys/kern/sys_aio.c
sys/kern/sys_generic.c
sys/kern/sys_lwp.c
sys/kern/sys_module.c
sys/kern/sys_mqueue.c
sys/kern/sys_pipe.c
sys/kern/sys_pmc.c
sys/kern/sys_process.c
sys/kern/sys_pset.c
sys/kern/sys_sched.c
sys/kern/sys_sig.c
sys/kern/sys_syscall.c
sys/kern/syscalls.c
sys/kern/syscalls.master
sys/kern/sysv_msg.c
sys/kern/sysv_sem.c
sys/kern/sysv_shm.c
sys/kern/tty.c
sys/kern/tty_bsdpty.c
sys/kern/tty_ptm.c
sys/kern/tty_pty.c
sys/kern/tty_subr.c
sys/kern/uipc_domain.c
sys/kern/uipc_mbuf.c
sys/kern/uipc_sem.c
sys/kern/uipc_socket.c
sys/kern/uipc_syscalls.c
sys/kern/uipc_usrreq.c
sys/kern/vfs_bio.c
sys/kern/vfs_getcwd.c
sys/kern/vfs_init.c
sys/kern/vfs_lockf.c
sys/kern/vfs_lookup.c
sys/kern/vfs_subr.c
sys/kern/vfs_subr2.c
sys/kern/vfs_syscalls.c
sys/kern/vfs_trans.c
sys/kern/vfs_vnops.c
sys/kern/vfs_xattr.c
sys/kern/vnode_if.c
sys/kern/vnode_if.sh
sys/kern/vnode_if.src
sys/lib/libkern/arch/ns32k/Makefile.inc
sys/lib/libkern/arch/ns32k/random.S
sys/lib/libkern/arch/usermode/Makefile.inc
sys/lib/libkern/libkern.h
sys/lib/libsa/Makefile
sys/lib/libsa/loadfile.c
sys/lib/libsa/loadfile_aout.c
sys/lib/libsa/loadfile_ecoff.c
sys/lib/libsa/loadfile_elf32.c
sys/lib/libsa/stand.h
sys/lib/libsa/ufs.c
sys/lib/libx86emu/files.x86emu
sys/lib/libz/zalloc.c
sys/lkm/arch/i386/powernow/lkminit_powernow.c
sys/lkm/compat/Makefile
sys/lkm/compat/aoutm68k/lkminit_emul.c
sys/lkm/compat/freebsd/lkminit_emul.c
sys/lkm/compat/hpux/Makefile
sys/lkm/compat/hpux/lkminit_emul.c
sys/lkm/compat/ibcs2/lkminit_emul.c
sys/lkm/compat/irix/lkminit_emul.c
sys/lkm/compat/linux/Makefile
sys/lkm/compat/linux/lkminit_emul.c
sys/lkm/compat/netbsd32/lkminit_emul.c
sys/lkm/compat/osf1/lkminit_emul.c
sys/lkm/compat/sunos/lkminit_emul.c
sys/lkm/compat/sunos32/lkminit_emul.c
sys/lkm/compat/svr4/lkminit_emul.c
sys/lkm/compat/svr4_32/lkminit_emul.c
sys/lkm/compat/ultrix/lkminit_emul.c
sys/lkm/exec/Makefile
sys/lkm/exec/aout/lkminit_exec.c
sys/lkm/exec/elf/lkminit_exec.c
sys/lkm/exec/freebsd_aout/lkminit_exec.c
sys/lkm/exec/freebsd_elf/lkminit_exec.c
sys/lkm/exec/hpux_aout/Makefile
sys/lkm/exec/hpux_aout/lkminit_exec.c
sys/lkm/exec/ibcs2_coff/lkminit_exec.c
sys/lkm/exec/ibcs2_elf/lkminit_exec.c
sys/lkm/exec/ibcs2_xout/lkminit_exec.c
sys/lkm/exec/linux_aout/lkminit_exec.c
sys/lkm/exec/linux_elf/lkminit_exec.c
sys/lkm/exec/m68k4k/lkminit_exec.c
sys/lkm/exec/netbsd32_aout/lkminit_exec.c
sys/lkm/exec/netbsd32_elf/lkminit_exec.c
sys/lkm/exec/osf1_ecoff/lkminit_exec.c
sys/lkm/exec/pecoff/lkminit_exec.c
sys/lkm/exec/sunos32_aout/lkminit_exec.c
sys/lkm/exec/sunos_aout/lkminit_exec.c
sys/lkm/exec/svr4_32_elf/lkminit_exec.c
sys/lkm/exec/svr4_elf/lkminit_exec.c
sys/lkm/exec/ultrix_ecoff/lkminit_exec.c
sys/lkm/exec/vax1k/lkminit_exec.c
sys/lkm/misc/example/example_misc.c
sys/lkm/misc/example/lkminit_misc.c
sys/lkm/syscall/example/example_syscall.c
sys/lkm/syscall/example/lkminit_syscall.c
sys/lkm/vfs/adosfs/lkminit_vfs.c
sys/lkm/vfs/cd9660/lkminit_vfs.c
sys/lkm/vfs/filecorefs/lkminit_vfs.c
sys/lkm/vfs/miscfs/fdesc/lkminit_vfs.c
sys/lkm/vfs/miscfs/kernfs/lkminit_vfs.c
sys/lkm/vfs/miscfs/nullfs/lkminit_vfs.c
sys/lkm/vfs/miscfs/overlay/lkminit_vfs.c
sys/lkm/vfs/miscfs/portal/lkminit_vfs.c
sys/lkm/vfs/miscfs/procfs/lkminit_vfs.c
sys/lkm/vfs/miscfs/umapfs/lkminit_vfs.c
sys/lkm/vfs/miscfs/union/lkminit_vfs.c
sys/lkm/vfs/msdosfs/lkminit_vfs.c
sys/lkm/vfs/ntfs/lkminit_vfs.c
sys/lkm/vfs/puffs/lkminit_vfs.c
sys/lkm/vfs/smbfs/lkminit_vfs.c
sys/lkm/vfs/udf/lkminit_vfs.c
sys/lkm/vfs/ufs/ext2fs/lkminit_vfs.c
sys/lkm/vfs/ufs/ffs/lkminit_vfs.c
sys/lkm/vfs/ufs/lfs/lkminit_vfs.c
sys/lkm/vfs/ufs/mfs/lkminit_vfs.c
sys/miscfs/deadfs/dead_vnops.c
sys/miscfs/fdesc/fdesc_vfsops.c
sys/miscfs/fdesc/fdesc_vnops.c
sys/miscfs/genfs/genfs_io.c
sys/miscfs/genfs/genfs_vnops.c
sys/miscfs/genfs/layer_subr.c
sys/miscfs/genfs/layer_vfsops.c
sys/miscfs/genfs/layer_vnops.c
sys/miscfs/kernfs/kernfs_subr.c
sys/miscfs/kernfs/kernfs_vnops.c
sys/miscfs/nullfs/null_vfsops.c
sys/miscfs/overlay/overlay_vfsops.c
sys/miscfs/portal/portal_vfsops.c
sys/miscfs/portal/portal_vnops.c
sys/miscfs/procfs/procfs_linux.c
sys/miscfs/procfs/procfs_map.c
sys/miscfs/procfs/procfs_subr.c
sys/miscfs/procfs/procfs_vfsops.c
sys/miscfs/procfs/procfs_vnops.c
sys/miscfs/specfs/spec_vnops.c
sys/miscfs/syncfs/sync_subr.c
sys/miscfs/syncfs/sync_vnops.c
sys/miscfs/umapfs/umap_vfsops.c
sys/modules/Makefile.assym
sys/modules/Makefile.inc
sys/modules/example/Makefile
sys/modules/example/example.c
sys/net/agr/if_agr.c
sys/net/bpf.c
sys/net/bpf_filter.c
sys/net/bridgestp.c
sys/net/if.c
sys/net/if.h
sys/net/if_arc.h
sys/net/if_arcsubr.c
sys/net/if_arp.h
sys/net/if_atm.h
sys/net/if_bridge.c
sys/net/if_eco.h
sys/net/if_ether.h
sys/net/if_etherip.c
sys/net/if_ethersubr.c
sys/net/if_fddi.h
sys/net/if_fddisubr.c
sys/net/if_gre.c
sys/net/if_gre.h
sys/net/if_hippi.h
sys/net/if_hippisubr.c
sys/net/if_ieee1394subr.c
sys/net/if_llc.h
sys/net/if_media.c
sys/net/if_media.h
sys/net/if_ppp.c
sys/net/if_pppoe.c
sys/net/if_spppsubr.c
sys/net/if_srt.c
sys/net/if_stf.c
sys/net/if_tap.c
sys/net/if_token.h
sys/net/if_tokensubr.c
sys/net/if_tun.c
sys/net/if_vlanvar.h
sys/net/route.c
sys/net/route.h
sys/net/rtsock.c
sys/net80211/_ieee80211.h
sys/net80211/ieee80211.h
sys/net80211/ieee80211_amrr.c
sys/net80211/ieee80211_netbsd.c
sys/net80211/ieee80211_netbsd.h
sys/net80211/ieee80211_node.c
sys/net80211/ieee80211_node.h
sys/net80211/ieee80211_proto.c
sys/net80211/ieee80211_sysctl.h
sys/netatalk/ddp_input.c
sys/netatalk/ddp_output.c
sys/netatalk/ddp_usrreq.c
sys/netbt/hci.h
sys/netbt/hci_event.c
sys/netbt/hci_socket.c
sys/netbt/hci_unit.c
sys/netinet/icmp6.h
sys/netinet/if_arp.c
sys/netinet/if_ether.h
sys/netinet/igmp.h
sys/netinet/in.h
sys/netinet/in_cksum.c
sys/netinet/in_gif.c
sys/netinet/in_pcb.c
sys/netinet/ip.h
sys/netinet/ip6.h
sys/netinet/ip_carp.c
sys/netinet/ip_etherip.c
sys/netinet/ip_flow.c
sys/netinet/ip_icmp.h
sys/netinet/ip_input.c
sys/netinet/ip_mroute.c
sys/netinet/ip_mroute.h
sys/netinet/ip_output.c
sys/netinet/ip_var.h
sys/netinet/raw_ip.c
sys/netinet/tcp.h
sys/netinet/tcp_input.c
sys/netinet/tcp_output.c
sys/netinet/tcp_subr.c
sys/netinet/tcp_usrreq.c
sys/netinet/tcp_var.h
sys/netinet/tcpip.h
sys/netinet/udp.h
sys/netinet/udp_var.h
sys/netinet6/esp_aesctr.c
sys/netinet6/esp_output.c
sys/netinet6/frag6.c
sys/netinet6/in6.h
sys/netinet6/in6_cksum.c
sys/netinet6/in6_gif.c
sys/netinet6/in6_pcb.c
sys/netinet6/ip6_etherip.c
sys/netinet6/ip6_flow.c
sys/netinet6/ip6_forward.c
sys/netinet6/ip6_output.c
sys/netinet6/ipcomp_input.c
sys/netinet6/ipcomp_output.c
sys/netinet6/ipsec.c
sys/netinet6/nd6_rtr.c
sys/netinet6/scope6.c
sys/netinet6/udp6_output.c
sys/netipsec/ipcomp_var.h
sys/netipsec/ipsec.c
sys/netipsec/ipsec.h
sys/netipsec/ipsec_mbuf.c
sys/netipsec/ipsec_osdep.h
sys/netipsec/ipsec_output.c
sys/netipsec/key.c
sys/netipsec/xform_ipcomp.c
sys/netipsec/xform_ipip.c
sys/netipsec/xform_tcp.c
sys/netisdn/i4b_debug.h
sys/netiso/clnp.h
sys/netiso/clnp_er.c
sys/netiso/clnp_output.c
sys/netiso/clnp_subr.c
sys/netiso/esis.h
sys/netiso/if_eon.c
sys/netiso/iso_pcb.c
sys/netiso/iso_proto.c
sys/netiso/tp_inet.c
sys/netiso/tp_iso.c
sys/netiso/tp_pcb.h
sys/netiso/tp_subr2.c
sys/netkey/key.c
sys/netkey/keysock.c
sys/netnatm/natm_proto.c
sys/netsmb/smb_iod.c
sys/netsmb/smb_rq.c
sys/netsmb/smb_subr.h
sys/nfs/nfs_bio.c
sys/nfs/nfs_bootdhcp.c
sys/nfs/nfs_bootparam.c
sys/nfs/nfs_export.c
sys/nfs/nfs_kq.c
sys/nfs/nfs_node.c
sys/nfs/nfs_serv.c
sys/nfs/nfs_socket.c
sys/nfs/nfs_subs.c
sys/nfs/nfs_syscalls.c
sys/nfs/nfs_var.h
sys/nfs/nfs_vfsops.c
sys/nfs/nfs_vnops.c
sys/opencrypto/cryptodev.c
sys/opencrypto/cryptodev.h
sys/rump/fs/Makefile.rumpfs
sys/rump/fs/bin/syspuffs/Makefile
sys/rump/fs/bin/syspuffs/syspuffs.c
sys/rump/fs/lib/liblfs/Makefile
sys/rump/fs/lib/libp2k/p2k.c
sys/rump/fs/lib/libsyspuffs/Makefile
sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.c
sys/rump/fs/lib/libsyspuffs/puffs_rumpglue.h
sys/rump/fs/lib/libukfs/ukfs.c
sys/rump/include/machine/intr.h
sys/rump/librump/rumpkern/Makefile
sys/rump/librump/rumpkern/atomic.c
sys/rump/librump/rumpkern/auth.c
sys/rump/librump/rumpkern/emul.c
sys/rump/librump/rumpkern/fstrans_stub.c
sys/rump/librump/rumpkern/genfs_io.c
sys/rump/librump/rumpkern/intr.c
sys/rump/librump/rumpkern/locks.c
sys/rump/librump/rumpkern/ltsleep.c
sys/rump/librump/rumpkern/misc_stub.c
sys/rump/librump/rumpkern/pool.c
sys/rump/librump/rumpkern/rump.c
sys/rump/librump/rumpkern/rump.h
sys/rump/librump/rumpkern/rump_private.h
sys/rump/librump/rumpkern/specfs.c
sys/rump/librump/rumpkern/vfs.c
sys/rump/librump/rumpkern/vm.c
sys/rump/librump/rumpuser/rumpuser.c
sys/rump/librump/rumpuser/rumpuser.h
sys/rump/librump/rumpuser/rumpuser_pth.c
sys/secmodel/bsd44/secmodel_bsd44_suser.c
sys/secmodel/securelevel/secmodel_securelevel.c
sys/sys/Makefile
sys/sys/atomic.h
sys/sys/bootblock.h
sys/sys/buf.h
sys/sys/cc_microtime.h
sys/sys/cpu.h
sys/sys/cpu_data.h
sys/sys/device.h
sys/sys/disk.h
sys/sys/disklabel_gpt.h
sys/sys/evcnt.h
sys/sys/exec.h
sys/sys/exec_elf.h
sys/sys/extent.h
sys/sys/file.h
sys/sys/filedesc.h
sys/sys/fstrans.h
sys/sys/gpio.h
sys/sys/iostat.h
sys/sys/kauth.h
sys/sys/kernel.h
sys/sys/kmem.h
sys/sys/kobj.h
sys/sys/kprintf.h
sys/sys/kthread.h
sys/sys/ktrace.h
sys/sys/lkm.h
sys/sys/lock.h
sys/sys/lockdebug.h
sys/sys/lwp.h
sys/sys/mbuf.h
sys/sys/module.h
sys/sys/mount.h
sys/sys/mutex.h
sys/sys/namei.h
sys/sys/namei.src
sys/sys/once.h
sys/sys/param.h
sys/sys/pax.h
sys/sys/percpu.h
sys/sys/percpu_types.h
sys/sys/pipe.h
sys/sys/pmf.h
sys/sys/pool.h
sys/sys/power.h
sys/sys/proc.h
sys/sys/pset.h
sys/sys/ptrace.h
sys/sys/queue.h
sys/sys/reboot.h
sys/sys/resourcevar.h
sys/sys/sched.h
sys/sys/shm.h
sys/sys/signalvar.h
sys/sys/simplelock.h
sys/sys/socketvar.h
sys/sys/syscall.h
sys/sys/syscallargs.h
sys/sys/sysctl.h
sys/sys/systm.h
sys/sys/systrace.h
sys/sys/time.h
sys/sys/timepps.h
sys/sys/timetc.h
sys/sys/timevar.h
sys/sys/timex.h
sys/sys/tty.h
sys/sys/types.h
sys/sys/unistd.h
sys/sys/vfs_syscalls.h
sys/sys/vmem.h
sys/sys/vnode.h
sys/sys/vnode_if.h
sys/ufs/ext2fs/ext2fs.h
sys/ufs/ext2fs/ext2fs_bmap.c
sys/ufs/ext2fs/ext2fs_dir.h
sys/ufs/ext2fs/ext2fs_extern.h
sys/ufs/ext2fs/ext2fs_inode.c
sys/ufs/ext2fs/ext2fs_lookup.c
sys/ufs/ext2fs/ext2fs_readwrite.c
sys/ufs/ext2fs/ext2fs_vfsops.c
sys/ufs/ext2fs/ext2fs_vnops.c
sys/ufs/ffs/ffs_alloc.c
sys/ufs/ffs/ffs_balloc.c
sys/ufs/ffs/ffs_extern.h
sys/ufs/ffs/ffs_inode.c
sys/ufs/ffs/ffs_snapshot.c
sys/ufs/ffs/ffs_softdep.c
sys/ufs/ffs/ffs_softdep.stub.c
sys/ufs/ffs/ffs_vfsops.c
sys/ufs/ffs/ffs_vnops.c
sys/ufs/ffs/fs.h
sys/ufs/files.ufs
sys/ufs/lfs/lfs.h
sys/ufs/lfs/lfs_alloc.c
sys/ufs/lfs/lfs_balloc.c
sys/ufs/lfs/lfs_bio.c
sys/ufs/lfs/lfs_debug.c
sys/ufs/lfs/lfs_extern.h
sys/ufs/lfs/lfs_inode.c
sys/ufs/lfs/lfs_itimes.c
sys/ufs/lfs/lfs_rfw.c
sys/ufs/lfs/lfs_segment.c
sys/ufs/lfs/lfs_subr.c
sys/ufs/lfs/lfs_syscalls.c
sys/ufs/lfs/lfs_vfsops.c
sys/ufs/lfs/lfs_vnops.c
sys/ufs/mfs/mfs_vnops.c
sys/ufs/ufs/inode.h
sys/ufs/ufs/ufs_bmap.c
sys/ufs/ufs/ufs_dirhash.c
sys/ufs/ufs/ufs_extattr.c
sys/ufs/ufs/ufs_extern.h
sys/ufs/ufs/ufs_ihash.c
sys/ufs/ufs/ufs_inode.c
sys/ufs/ufs/ufs_lookup.c
sys/ufs/ufs/ufs_quota.c
sys/ufs/ufs/ufs_readwrite.c
sys/ufs/ufs/ufs_vfsops.c
sys/ufs/ufs/ufs_vnops.c
sys/ufs/ufs/ufsmount.h
sys/uvm/uvm.h
sys/uvm/uvm_amap.c
sys/uvm/uvm_anon.c
sys/uvm/uvm_anon.h
sys/uvm/uvm_aobj.c
sys/uvm/uvm_bio.c
sys/uvm/uvm_device.c
sys/uvm/uvm_extern.h
sys/uvm/uvm_fault.c
sys/uvm/uvm_fault_i.h
sys/uvm/uvm_glue.c
sys/uvm/uvm_init.c
sys/uvm/uvm_km.c
sys/uvm/uvm_loan.c
sys/uvm/uvm_map.c
sys/uvm/uvm_map.h
sys/uvm/uvm_mmap.c
sys/uvm/uvm_mremap.c
sys/uvm/uvm_object.c
sys/uvm/uvm_object.h
sys/uvm/uvm_page.c
sys/uvm/uvm_page.h
sys/uvm/uvm_pager.c
sys/uvm/uvm_pdaemon.c
sys/uvm/uvm_pdaemon.h
sys/uvm/uvm_pdpolicy_clock.c
sys/uvm/uvm_pdpolicy_clockpro.c
sys/uvm/uvm_readahead.c
sys/uvm/uvm_readahead.h
sys/uvm/uvm_stat.h
sys/uvm/uvm_swap.c
sys/uvm/uvm_swapstub.c
sys/uvm/uvm_unix.c
sys/uvm/uvm_vnode.c
--- a/sys/dist/acpica/acmacros.h	Mon Jan 21 09:34:59 2008 +0000
+++ b/sys/dist/acpica/acmacros.h	Mon Jan 21 09:45:00 2008 +0000
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acmacros.h - C macros for the entire subsystem.
- *       xRevision: 1.180 $
+ *       $Revision: 1.1.14.3 $
  *
  *****************************************************************************/
 
@@ -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 - 2007, Intel Corp.
  * All rights reserved.
  *
  * 2. License
@@ -129,46 +129,19 @@
 #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))
 
-#if ACPI_MACHINE_WIDTH == 16
+/* Size calculation */
+
+#define ACPI_ARRAY_LENGTH(x)            (sizeof(x) / sizeof((x)[0]))
+
 
 /*
- * 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
+ * Full 64-bit integer must be available 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
@@ -197,7 +170,7 @@
  */
 #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_CAST_CONST_PTR(t, p)       ((const t *)(const void *)(p))
+#define ACPI_CAST_CONST_PTR(t, p)	((const t *)(const void *)(p))
 #define ACPI_CAST_CONST_INDIRECT_PTR(t, p) ((const t **)(const void *)(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)))
@@ -207,15 +180,13 @@
 #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)
-#define ACPI_FADT_OFFSET(f)             ACPI_OFFSET (FADT_DESCRIPTOR, f)
-
-#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_PHYSADDR_TO_PTR(i)         ACPI_TO_POINTER(i)
 #define ACPI_PTR_TO_PHYSADDR(i)         ACPI_TO_INTEGER(i)
+
+#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
+#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))
 #endif
 
 /*
@@ -238,16 +209,16 @@
                                                      /*  Hi...Lo                     Lo...Hi     */
 /* 16-bit source, 16/32/64 destination */
 
-#define ACPI_MOVE_16_TO_16(d,s)         {((  UINT8 *)(void *)(d))[0] = ((const UINT8 *)(const void *)(s))[1];\
-                                         ((  UINT8 *)(void *)(d))[1] = ((const UINT8 *)(const void *)(s))[0];}
+#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;\
-                                           ((UINT8 *)(void *)(d))[2] = ((const UINT8 *)(const void *)(s))[1];\
-                                           ((UINT8 *)(void *)(d))[3] = ((const UINT8 *)(const void *)(s))[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;\
-                                           ((UINT8 *)(void *)(d))[6] = ((const UINT8 *)(const void *)(s))[1];\
-                                           ((UINT8 *)(void *)(d))[7] = ((const UINT8 *)(const void *)(s))[0];}
+                                           ((UINT8 *)(void *)(d))[6] = ((UINT8 *)(void *)(s))[1];\
+                                           ((UINT8 *)(void *)(d))[7] = ((UINT8 *)(void *)(s))[0];}
 
 /* 32-bit source, 16/32/64 destination */
 
@@ -270,14 +241,14 @@
 
 #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] = ((const UINT8 *)(const void *)(s))[7];\
-                                         ((  UINT8 *)(void *)(d))[1] = ((const UINT8 *)(const void *)(s))[6];\
-                                         ((  UINT8 *)(void *)(d))[2] = ((const UINT8 *)(const void *)(s))[5];\
-                                         ((  UINT8 *)(void *)(d))[3] = ((const UINT8 *)(const void *)(s))[4];\
-                                         ((  UINT8 *)(void *)(d))[4] = ((const UINT8 *)(const void *)(s))[3];\
-                                         ((  UINT8 *)(void *)(d))[5] = ((const UINT8 *)(const void *)(s))[2];\
-                                         ((  UINT8 *)(void *)(d))[6] = ((const UINT8 *)(const void *)(s))[1];\
-                                         ((  UINT8 *)(void *)(d))[7] = ((const UINT8 *)(const void *)(s))[0];}
+#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];\
+                                         ((  UINT8 *)(void *)(d))[4] = ((UINT8 *)(void *)(s))[3];\
+                                         ((  UINT8 *)(void *)(d))[5] = ((UINT8 *)(void *)(s))[2];\
+                                         ((  UINT8 *)(void *)(d))[6] = ((UINT8 *)(void *)(s))[1];\
+                                         ((  UINT8 *)(void *)(d))[7] = ((UINT8 *)(void *)(s))[0];}
 #else
 /*
  * Macros for little-endian machines
@@ -291,33 +262,11 @@
 
 /* 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) = *(const UINT16 *)(const void *)(s)
-#define ACPI_MOVE_16_TO_32(d,s)         *(UINT32 *)(void *)(d) = *(const UINT16 *)(const void *)(s)
-#define ACPI_MOVE_16_TO_64(d,s)         ACPI_MOVE_16_TO_32(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_32(d,s)         *(UINT32 *)(void *)(d) = *(const UINT32 *)(const void *)(s)
-#define ACPI_MOVE_32_TO_64(d,s)         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)         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) = *(const UINT16 *)(const void *)(s)
-#define ACPI_MOVE_16_TO_32(d,s)         *(UINT32 *)(void *)(d) = *(const UINT16 *)(const void *)(s)
-#define ACPI_MOVE_16_TO_64(d,s)         *(UINT64 *)(void *)(d) = *(const UINT16 *)(const void *)(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 */
 
@@ -330,7 +279,6 @@
 #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) = *(const UINT64 *)(const void *)(s)
-#endif
 
 #else
 /*
@@ -341,8 +289,8 @@
 
 /* 16-bit source, 16/32/64 destination */
 
-#define ACPI_MOVE_16_TO_16(d,s)         {((  UINT8 *)(void *)(d))[0] = ((const UINT8 *)(const void *)(s))[0];\
-                                         ((  UINT8 *)(void *)(d))[1] = ((const UINT8 *)(const void *)(s))[1];}
+#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);}
@@ -351,10 +299,10 @@
 
 #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] = ((const UINT8 *)(const void *)(s))[0];\
-                                         ((  UINT8 *)(void *)(d))[1] = ((const UINT8 *)(const void *)(s))[1];\
-                                         ((  UINT8 *)(void *)(d))[2] = ((const UINT8 *)(const void *)(s))[2];\
-                                         ((  UINT8 *)(void *)(d))[3] = ((const UINT8 *)(const void *)(s))[3];}
+#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);}
 
@@ -362,23 +310,20 @@
 
 #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] = ((const UINT8 *)(const void *)(s))[0];\
-                                         ((  UINT8 *)(void *)(d))[1] = ((const UINT8 *)(const void *)(s))[1];\
-                                         ((  UINT8 *)(void *)(d))[2] = ((const UINT8 *)(const void *)(s))[2];\
-                                         ((  UINT8 *)(void *)(d))[3] = ((const UINT8 *)(const void *)(s))[3];\
-                                         ((  UINT8 *)(void *)(d))[4] = ((const UINT8 *)(const void *)(s))[4];\
-                                         ((  UINT8 *)(void *)(d))[5] = ((const UINT8 *)(const void *)(s))[5];\
-                                         ((  UINT8 *)(void *)(d))[6] = ((const UINT8 *)(const void *)(s))[6];\
-                                         ((  UINT8 *)(void *)(d))[7] = ((const UINT8 *)(const void *)(s))[7];}
+#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];\
+                                         ((  UINT8 *)(void *)(d))[4] = ((UINT8 *)(void *)(s))[4];\
+                                         ((  UINT8 *)(void *)(d))[5] = ((UINT8 *)(void *)(s))[5];\
+                                         ((  UINT8 *)(void *)(d))[6] = ((UINT8 *)(void *)(s))[6];\
+                                         ((  UINT8 *)(void *)(d))[7] = ((UINT8 *)(void *)(s))[7];}
 #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
+#if ACPI_MACHINE_WIDTH == 32
 #define ACPI_MOVE_SIZE_TO_16(d,s)       ACPI_MOVE_32_TO_16(d,s)
 
 #elif ACPI_MACHINE_WIDTH == 64
@@ -464,6 +409,8 @@
 #define ACPI_REGISTER_PREPARE_BITS(Val, Pos, Mask)      ((Val << Pos) & Mask)
 #define ACPI_REGISTER_INSERT_VALUE(Reg, Pos, Mask, Val)  Reg = (Reg & (~(Mask))) | ACPI_REGISTER_PREPARE_BITS(Val, Pos, Mask)
 
+#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) \
@@ -479,8 +426,8 @@
  *
  * The "Descriptor" field is the first field in both structures.
  */
-#define ACPI_GET_DESCRIPTOR_TYPE(d)     (((ACPI_DESCRIPTOR *)(void *)(d))->DescriptorId)
-#define ACPI_SET_DESCRIPTOR_TYPE(d,t)   (((ACPI_DESCRIPTOR *)(void *)(d))->DescriptorId = t)
+#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)
 
 
 /* Macro to test the object type */
@@ -561,14 +508,6 @@
 #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);
 
-/* Legacy interfaces. Remove when migration is complete */
-
-#define ACPI_REPORT_INFO(fp)            {AcpiUtReportInfo (AE_INFO); \
-                                            AcpiOsPrintf fp;}
-#define ACPI_REPORT_ERROR(fp)           {AcpiUtReportError (AE_INFO); \
-                                            AcpiOsPrintf fp;}
-#define ACPI_REPORT_WARNING(fp)         {AcpiUtReportWarning (AE_INFO); \
-                                            AcpiOsPrintf fp;}
 #else
 
 /* No error messages */
@@ -579,10 +518,6 @@
 #define ACPI_ERROR(plist)
 #define ACPI_ERROR_NAMESPACE(s,e)
 #define ACPI_ERROR_METHOD(s,n,p,e)
-
-#define ACPI_REPORT_INFO(fp)
-#define ACPI_REPORT_ERROR(fp)
-#define ACPI_REPORT_WARNING(fp)
 #endif
 
 /*
@@ -615,7 +550,7 @@
  * 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)        const char *_AcpiFunctionName = #Name;
 
 #else
 /* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */
@@ -626,11 +561,11 @@
 #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, b)
+                                            AcpiUtTracePtr(ACPI_DEBUG_PARAMETERS,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, b)
+                                            AcpiUtTraceStr(ACPI_DEBUG_PARAMETERS,b)
 
 #define ACPI_FUNCTION_ENTRY()           AcpiUtTrackStackPtr()
 
@@ -782,17 +717,6 @@
 #endif
 
 
-/*
- * 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
@@ -813,19 +737,19 @@
 
 /* Memory allocation */
 
-#define ACPI_MEM_ALLOCATE(a)            AcpiUtAllocate((ACPI_SIZE)(a),_COMPONENT,_AcpiModuleName,__LINE__)
-#define ACPI_MEM_CALLOCATE(a)           AcpiUtCallocate((ACPI_SIZE)(a), _COMPONENT,_AcpiModuleName,__LINE__)
-#define ACPI_MEM_FREE(a)                AcpiOsFree(a)
+#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_FREE(a)                AcpiOsFree(a)
 #define ACPI_MEM_TRACKING(a)
 
 #else
 
 /* Memory allocation */
 
-#define ACPI_MEM_ALLOCATE(a)            AcpiUtAllocateAndTrack((ACPI_SIZE)(a),_COMPONENT,_AcpiModuleName,__LINE__)
-#define ACPI_MEM_CALLOCATE(a)           AcpiUtCallocateAndTrack((ACPI_SIZE)(a), _COMPONENT,_AcpiModuleName,__LINE__)
-#define ACPI_MEM_FREE(a)                AcpiUtFreeAndTrack(a,_COMPONENT,_AcpiModuleName,__LINE__)
-#define ACPI_MEM_TRACKING(a)            a
+#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_MEM_TRACKING(a)        a
 
 #endif /* ACPI_DBG_TRACK_ALLOCATIONS */
 
--- a/sys/dist/acpica/acnames.h	Mon Jan 21 09:34:59 2008 +0000
+++ b/sys/dist/acpica/acnames.h	Mon Jan 21 09:45:00 2008 +0000
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acnames.h - Global names and strings
- *       xRevision: 1.6 $
+ *       $Revision: 1.1.14.3 $
  *
  *****************************************************************************/
 
@@ -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 - 2007, Intel Corp.
  * All rights reserved.
  *
  * 2. License
--- a/sys/dist/acpica/acnamesp.h	Mon Jan 21 09:34:59 2008 +0000
+++ b/sys/dist/acpica/acnamesp.h	Mon Jan 21 09:45:00 2008 +0000
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acnamesp.h - Namespace subcomponent prototypes and defines
- *       xRevision: 1.144 $
+ *       $Revision: 1.1.14.3 $
  *
  *****************************************************************************/
 
@@ -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 - 2007, Intel Corp.
  * All rights reserved.
  *
  * 2. License
@@ -137,9 +137,15 @@
 #define ACPI_NS_DONT_OPEN_SCOPE     0x02
 #define ACPI_NS_NO_PEER_SEARCH      0x04
 #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
 
 
 /*
@@ -163,7 +169,7 @@
 
 ACPI_STATUS
 AcpiNsLoadTable (
-    ACPI_TABLE_DESC         *TableDesc,
+    ACPI_NATIVE_UINT        TableIndex,
     ACPI_NAMESPACE_NODE     *Node);
 
 
@@ -175,7 +181,7 @@
     ACPI_OBJECT_TYPE        Type,
     ACPI_HANDLE             StartObject,
     UINT32                  MaxDepth,
-    BOOLEAN                 UnlockBeforeCallback,
+    UINT32                  Flags,
     ACPI_WALK_CALLBACK      UserFunction,
     void                    *Context,
     void                    **ReturnValue);
@@ -192,13 +198,13 @@
  */
 ACPI_STATUS
 AcpiNsParseTable (
-    ACPI_TABLE_DESC         *TableDesc,
-    ACPI_NAMESPACE_NODE     *Scope);
+    ACPI_NATIVE_UINT        TableIndex,
+    ACPI_NAMESPACE_NODE     *StartNode);
 
 ACPI_STATUS
 AcpiNsOneCompleteParse (
-    UINT8                   PassNumber,
-    ACPI_TABLE_DESC         *TableDesc);
+    ACPI_NATIVE_UINT        PassNumber,
+    ACPI_NATIVE_UINT        TableIndex);
 
 
 /*
@@ -297,18 +303,8 @@
  * nseval - Namespace evaluation functions
  */
 ACPI_STATUS
-AcpiNsEvaluateByHandle (
-    ACPI_PARAMETER_INFO     *Info);
-
-ACPI_STATUS
-AcpiNsEvaluateByName (
-    const char              *Pathname,
-    ACPI_PARAMETER_INFO     *Info);
-
-ACPI_STATUS
-AcpiNsEvaluateRelative (
-    const char              *Pathname,
-    ACPI_PARAMETER_INFO     *Info);
+AcpiNsEvaluate (
+    ACPI_EVALUATE_INFO      *Info);
 
 
 /*
@@ -318,6 +314,12 @@
 AcpiNsOpensScope (
     ACPI_OBJECT_TYPE        Type);
 
+void
+AcpiNsBuildExternalPath (
+    ACPI_NAMESPACE_NODE     *Node,
+    ACPI_SIZE               Size,
+    char                    *NameBuffer);
+
 char *
 AcpiNsGetExternalPathname (
     ACPI_NAMESPACE_NODE     *Node);
@@ -334,12 +336,12 @@
 BOOLEAN
 AcpiNsPatternMatch (
     ACPI_NAMESPACE_NODE     *ObjNode,
-    const char              *SearchFor);
+    char                    *SearchFor);
 
 ACPI_STATUS
-AcpiNsGetNodeByPath (
+AcpiNsGetNode (
+    ACPI_NAMESPACE_NODE     *PrefixNode,
     const char              *ExternalPathname,
-    ACPI_NAMESPACE_NODE     *InPrefixNode,
     UINT32                  Flags,
     ACPI_NAMESPACE_NODE     **OutNode);
 
@@ -397,7 +399,7 @@
     ACPI_NAMESPACE_NODE     **RetNode);
 
 ACPI_STATUS
-AcpiNsSearchNode (
+AcpiNsSearchOneScope (
     UINT32                  EntryName,
     ACPI_NAMESPACE_NODE     *Node,
     ACPI_OBJECT_TYPE        Type,
@@ -430,7 +432,7 @@
 AcpiNsReportError (
     const char              *ModuleName,
     UINT32                  LineNumber,
-    const char              *InternalName,
+    char                    *InternalName,
     ACPI_STATUS             LookupStatus);
 
 void
@@ -463,7 +465,7 @@
 ACPI_STATUS
 AcpiNsExternalizeName (
     UINT32                  InternalNameLength,
-    const char              *InternalName,
+    char                    *InternalName,
     UINT32                  *ConvertedNameLength,
     char                    **ConvertedName);
 
--- a/sys/dist/acpica/acobject.h	Mon Jan 21 09:34:59 2008 +0000
+++ b/sys/dist/acpica/acobject.h	Mon Jan 21 09:45:00 2008 +0000
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Name: acobject.h - Definition of ACPI_OPERAND_OBJECT  (Internal object only)
- *       xRevision: 1.133 $
+ *       $Revision: 1.1.14.3 $
  *
  *****************************************************************************/
 
@@ -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 - 2007, Intel Corp.
  * All rights reserved.
  *
  * 2. License
@@ -118,13 +118,23 @@
 #ifndef _ACOBJECT_H
 #define _ACOBJECT_H
 
+/* acpisrc:StructDefs -- for acpisrc conversion */
+
 
 /*
- * The ACPI_OPERAND_OBJECT  is used to pass AML operands from the dispatcher
+ * The ACPI_OPERAND_OBJECT is used to pass AML operands from the dispatcher
  * to the interpreter, and to keep track of the various handlers such as
- * address space handlers and notify handlers.  The object is a constant
+ * 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
 
 /*******************************************************************************
  *
@@ -135,17 +145,25 @@
 /*
  * Common area for all objects.
  *
- * DataType is used to differentiate between internal descriptors, and MUST
- * be the first byte in this structure.
+ * DescriptorType is used to differentiate between internal descriptors, and
+ * must be in the same place across all descriptors
+ *
+ * Note: The DescriptorType and Type fields must appear in the identical
+ * position in both the ACPI_NAMESPACE_NODE and ACPI_OPERAND_OBJECT
+ * structures.
  */
-#define ACPI_OBJECT_COMMON_HEADER   /* SIZE/ALIGNMENT: 32 bits, one ptr plus trailing 8-bit flag */\
-    UINT8                           Descriptor;         /* To differentiate various internal objs */\
+#define ACPI_OBJECT_COMMON_HEADER \
+    union acpi_operand_object       *NextObject;        /* Objects linked to parent NS node */\
+    UINT8                           DescriptorType;     /* To differentiate various internal objs */\
     UINT8                           Type;               /* ACPI_OBJECT_TYPE */\
     UINT16                          ReferenceCount;     /* For object deletion management */\
-    union acpi_operand_object       *NextObject;        /* Objects linked to parent NS node */\
     UINT8                           Flags;
+    /*
+     * Note: There are 3 bytes available here before the
+     * next natural alignment boundary (for both 32/64 cases)
+     */
 
-/* Values for flag byte above */
+/* Values for Flag byte above */
 
 #define AOPOBJ_AML_CONSTANT         0x01
 #define AOPOBJ_STATIC_POINTER       0x02
@@ -153,39 +171,7 @@
 #define AOPOBJ_OBJECT_INITIALIZED   0x08
 #define AOPOBJ_SETUP_COMPLETE       0x10
 #define AOPOBJ_SINGLE_DATUM         0x20
-
-
-/*
- * Common bitfield for the field objects
- * "Field Datum"  -- a datum from the actual field object
- * "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field
- */
-#define ACPI_COMMON_FIELD_INFO      /* SIZE/ALIGNMENT: 24 bits + three 32-bit values */\
-    UINT8                           FieldFlags;         /* Access, update, and lock bits */\
-    UINT8                           Attribute;          /* From AccessAs keyword */\
-    UINT8                           AccessByteWidth;    /* Read/Write size in bytes */\
-    UINT32                          BitLength;          /* Length of field in bits */\
-    UINT32                          BaseByteOffset;     /* Byte offset within containing object */\
-    UINT8                           StartFieldBitOffset;/* Bit offset within first field datum (0-63) */\
-    UINT8                           AccessBitWidth;     /* Read/Write size in bits (8-64) */\
-    UINT32                          Value;              /* Value to store into the Bank or Index register */\
-    ACPI_NAMESPACE_NODE             *Node;              /* Link back to parent node */
-
-
-/*
- * Fields common to both Strings and Buffers
- */
-#define ACPI_COMMON_BUFFER_INFO \
-    UINT32                          Length;
-
-
-/*
- * Common fields for objects that support ASL notifications
- */
-#define ACPI_COMMON_NOTIFY_INFO \
-    union acpi_operand_object       *SystemNotify;      /* Handler for system notifies */\
-    union acpi_operand_object       *DeviceNotify;      /* Handler for driver notifies */\
-    union acpi_operand_object       *Handler;           /* Handler for Address space */
+#define AOPOBJ_INVALID              0x40 /* Used if host OS won't allow an OpRegion address */
 
 
 /******************************************************************************
@@ -204,6 +190,7 @@
 typedef struct acpi_object_integer
 {
     ACPI_OBJECT_COMMON_HEADER
+    UINT8                           Fill[3];            /* Prevent warning on some compilers */
     ACPI_INTEGER                    Value;
 
 } ACPI_OBJECT_INTEGER;
@@ -211,13 +198,19 @@
 
 /*
  * Note: The String and Buffer object must be identical through the Pointer
- * element.  There is code that depends on this.
+ * and length elements.  There is code that depends on this.
+ *
+ * Fields common to both Strings and Buffers
  */
+#define ACPI_COMMON_BUFFER_INFO(_Type) \
+    _Type                           *Pointer; \
+    UINT32                          Length;
+
+
 typedef struct acpi_object_string   /* Null terminated, ASCII characters only */
 {
     ACPI_OBJECT_COMMON_HEADER
-    ACPI_COMMON_BUFFER_INFO
-    char                            *Pointer;           /* String in AML stream or allocated string */
+    ACPI_COMMON_BUFFER_INFO         (char)              /* String in AML stream or allocated string */
 
 } ACPI_OBJECT_STRING;
 
@@ -225,11 +218,10 @@
 typedef struct acpi_object_buffer
 {
     ACPI_OBJECT_COMMON_HEADER
-    ACPI_COMMON_BUFFER_INFO
-    UINT8                           *Pointer;           /* Buffer in AML stream or allocated buffer */
+    ACPI_COMMON_BUFFER_INFO         (UINT8)             /* Buffer in AML stream or allocated buffer */
+    UINT32                          AmlLength;
+    UINT8                           *AmlStart;
     ACPI_NAMESPACE_NODE             *Node;              /* Link back to parent node */
-    UINT8                           *AmlStart;
-    UINT32                          AmlLength;
 
 } ACPI_OBJECT_BUFFER;
 
@@ -237,12 +229,11 @@
 typedef struct acpi_object_package
 {
     ACPI_OBJECT_COMMON_HEADER
-
-    UINT32                          Count;              /* # of elements in package */
-    UINT32                          AmlLength;
-    UINT8                           *AmlStart;
     ACPI_NAMESPACE_NODE             *Node;              /* Link back to parent node */
     union acpi_operand_object       **Elements;         /* Array of pointers to AcpiObjects */
+    UINT8                           *AmlStart;
+    UINT32                          AmlLength;
+    UINT32                          Count;              /* # of elements in package */
 
 } ACPI_OBJECT_PACKAGE;
 
@@ -256,40 +247,19 @@
 typedef struct acpi_object_event
 {
     ACPI_OBJECT_COMMON_HEADER
-    void                            *Semaphore;
+    ACPI_SEMAPHORE                  OsSemaphore;        /* Actual OS synchronization object */
 
 } ACPI_OBJECT_EVENT;
 
 
-#define ACPI_INFINITE_CONCURRENCY   0xFF
-
-typedef
-ACPI_STATUS (*ACPI_INTERNAL_METHOD) (
-    struct acpi_walk_state  *WalkState);
-
-typedef struct acpi_object_method
-{
-    ACPI_OBJECT_COMMON_HEADER
-    UINT8                           MethodFlags;
-    UINT8                           ParamCount;
-    UINT32                          AmlLength;
-    void                            *Semaphore;
-    UINT8                           *AmlStart;
-    ACPI_INTERNAL_METHOD            Implementation;
-    UINT8                           Concurrency;
-    UINT8                           ThreadCount;
-    ACPI_OWNER_ID                   OwnerId;
-
-} ACPI_OBJECT_METHOD;
-
-
 typedef struct acpi_object_mutex
 {
     ACPI_OBJECT_COMMON_HEADER
     UINT8                           SyncLevel;          /* 0-15, specified in Mutex() call */
     UINT16                          AcquisitionDepth;   /* Allow multiple Acquires, same thread */
+    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 */
-    void                            *Semaphore;         /* Actual OS synchronization object */
     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 */
@@ -301,23 +271,47 @@
 typedef struct acpi_object_region
 {
     ACPI_OBJECT_COMMON_HEADER
-
     UINT8                           SpaceId;
-    union acpi_operand_object       *Handler;           /* Handler for region access */
     ACPI_NAMESPACE_NODE             *Node;              /* Containing namespace node */
+    union acpi_operand_object       *Handler;           /* Handler for region access */
     union acpi_operand_object       *Next;
+    ACPI_PHYSICAL_ADDRESS           Address;
     UINT32                          Length;
-    ACPI_PHYSICAL_ADDRESS           Address;
 
 } ACPI_OBJECT_REGION;
 
 
+typedef struct acpi_object_method
+{
+    ACPI_OBJECT_COMMON_HEADER
+    UINT8                           MethodFlags;
+    UINT8                           ParamCount;
+    UINT8                           SyncLevel;
+    union acpi_operand_object       *Mutex;
+    UINT8                           *AmlStart;
+    ACPI_INTERNAL_METHOD            Implementation;
+    UINT32                          AmlLength;
+    UINT8                           ThreadCount;
+    ACPI_OWNER_ID                   OwnerId;
+
+} ACPI_OBJECT_METHOD;
+
+
 /******************************************************************************
  *
  * Objects that can be notified.  All share a common NotifyInfo area.
  *
  *****************************************************************************/
 
+/*
+ * Common fields for objects that support ASL notifications
+ */
+#define ACPI_COMMON_NOTIFY_INFO \
+    union acpi_operand_object       *SystemNotify;      /* Handler for system notifies */\
+    union acpi_operand_object       *DeviceNotify;      /* Handler for driver notifies */\
+    union acpi_operand_object       *Handler;           /* Handler for Address space */
+
+
 typedef struct acpi_object_notify_common    /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
 {
     ACPI_OBJECT_COMMON_HEADER
@@ -348,9 +342,12 @@
 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
-    UINT32                          ProcId;
-    UINT32                          Length;
     ACPI_IO_ADDRESS                 Address;
 
 } ACPI_OBJECT_PROCESSOR;
@@ -370,12 +367,29 @@
  *
  *****************************************************************************/
 
+/*
+ * Common bitfield for the field objects
+ * "Field Datum"  -- a datum from the actual field object
+ * "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field
+ */
+#define ACPI_COMMON_FIELD_INFO \
+    UINT8                           FieldFlags;         /* Access, update, and lock bits */\
+    UINT8                           Attribute;          /* From AccessAs keyword */\
+    UINT8                           AccessByteWidth;    /* Read/Write size in bytes */\
+    ACPI_NAMESPACE_NODE             *Node;              /* Link back to parent node */\
+    UINT32                          BitLength;          /* Length of field in bits */\
+    UINT32                          BaseByteOffset;     /* Byte offset within containing object */\
+    UINT32                          Value;              /* Value to store into the Bank or Index register */\
+    UINT8                           StartFieldBitOffset;/* Bit offset within first field datum (0-63) */\
+    UINT8                           AccessBitWidth;     /* Read/Write size in bits (8-64) */
+
+
 typedef struct acpi_object_field_common                 /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
 {
     ACPI_OBJECT_COMMON_HEADER
     ACPI_COMMON_FIELD_INFO
-    union acpi_operand_object       *RegionObj;         /* Containing Operation Region object */
-                                                        /* (REGION/BANK fields only) */
+    union acpi_operand_object       *RegionObj;         /* Parent Operation Region object (REGION/BANK fields only) */
+
 } ACPI_OBJECT_FIELD_COMMON;
 
 
@@ -440,16 +454,11 @@
 } ACPI_OBJECT_NOTIFY_HANDLER;
 
 
-/* Flags for address handler */
-
-#define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED  0x1
-
-
 typedef struct acpi_object_addr_handler
 {
     ACPI_OBJECT_COMMON_HEADER
     UINT8                           SpaceId;
-    UINT16                          Hflags;
+    UINT8                           HandlerFlags;
     ACPI_ADR_SPACE_HANDLER          Handler;
     ACPI_NAMESPACE_NODE             *Node;              /* Parent device */
     void                            *Context;
@@ -459,6 +468,10 @@
 
 } ACPI_OBJECT_ADDR_HANDLER;
 
+/* Flags for address handler (HandlerFlags) */
+
+#define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED  0x01
+
 
 /******************************************************************************
  *
@@ -475,10 +488,10 @@
     ACPI_OBJECT_COMMON_HEADER
     UINT8                           TargetType;         /* Used for IndexOp */
     UINT16                          Opcode;
-    UINT32                          Offset;             /* Used for ArgOp, LocalOp, and IndexOp */
     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 */
 
 } ACPI_OBJECT_REFERENCE;
 
@@ -493,12 +506,10 @@
 typedef struct acpi_object_extra
 {
     ACPI_OBJECT_COMMON_HEADER
-    UINT8                           ByteFill1;
-    UINT16                          WordFill1;
-    UINT32                          AmlLength;
-    UINT8                           *AmlStart;
     ACPI_NAMESPACE_NODE             *Method_REG;        /* _REG method for this region (if any) */
     void                            *RegionContext;     /* Region-specific data */
+    UINT8                           *AmlStart;
+    UINT32                          AmlLength;
 
 } ACPI_OBJECT_EXTRA;
 
@@ -532,31 +543,31 @@
 
 typedef union acpi_operand_object
 {
-    ACPI_OBJECT_COMMON              Common;
-    ACPI_OBJECT_INTEGER             Integer;
-    ACPI_OBJECT_STRING              String;
-    ACPI_OBJECT_BUFFER              Buffer;
-    ACPI_OBJECT_PACKAGE             Package;
-    ACPI_OBJECT_EVENT               Event;
-    ACPI_OBJECT_METHOD              Method;
-    ACPI_OBJECT_MUTEX               Mutex;
-    ACPI_OBJECT_REGION              Region;
-    ACPI_OBJECT_NOTIFY_COMMON       CommonNotify;
-    ACPI_OBJECT_DEVICE              Device;
-    ACPI_OBJECT_POWER_RESOURCE      PowerResource;
-    ACPI_OBJECT_PROCESSOR           Processor;
-    ACPI_OBJECT_THERMAL_ZONE        ThermalZone;
-    ACPI_OBJECT_FIELD_COMMON        CommonField;
-    ACPI_OBJECT_REGION_FIELD        Field;
-    ACPI_OBJECT_BUFFER_FIELD        BufferField;
-    ACPI_OBJECT_BANK_FIELD          BankField;
-    ACPI_OBJECT_INDEX_FIELD         IndexField;
-    ACPI_OBJECT_NOTIFY_HANDLER      Notify;
-    ACPI_OBJECT_ADDR_HANDLER        AddressSpace;
-    ACPI_OBJECT_REFERENCE           Reference;
-    ACPI_OBJECT_EXTRA               Extra;
-    ACPI_OBJECT_DATA                Data;
-    ACPI_OBJECT_CACHE_LIST          Cache;
+    ACPI_OBJECT_COMMON                  Common;
+    ACPI_OBJECT_INTEGER                 Integer;
+    ACPI_OBJECT_STRING                  String;
+    ACPI_OBJECT_BUFFER                  Buffer;
+    ACPI_OBJECT_PACKAGE                 Package;
+    ACPI_OBJECT_EVENT                   Event;
+    ACPI_OBJECT_METHOD                  Method;
+    ACPI_OBJECT_MUTEX                   Mutex;
+    ACPI_OBJECT_REGION                  Region;
+    ACPI_OBJECT_NOTIFY_COMMON           CommonNotify;
+    ACPI_OBJECT_DEVICE                  Device;
+    ACPI_OBJECT_POWER_RESOURCE          PowerResource;
+    ACPI_OBJECT_PROCESSOR               Processor;
+    ACPI_OBJECT_THERMAL_ZONE            ThermalZone;
+    ACPI_OBJECT_FIELD_COMMON            CommonField;
+    ACPI_OBJECT_REGION_FIELD            Field;
+    ACPI_OBJECT_BUFFER_FIELD            BufferField;
+    ACPI_OBJECT_BANK_FIELD              BankField;
+    ACPI_OBJECT_INDEX_FIELD             IndexField;
+    ACPI_OBJECT_NOTIFY_HANDLER          Notify;
+    ACPI_OBJECT_ADDR_HANDLER            AddressSpace;
+    ACPI_OBJECT_REFERENCE               Reference;
+    ACPI_OBJECT_EXTRA                   Extra;
+    ACPI_OBJECT_DATA                    Data;
+    ACPI_OBJECT_CACHE_LIST              Cache;
 
 } ACPI_OPERAND_OBJECT;
 
@@ -587,14 +598,22 @@
 #define ACPI_DESC_TYPE_MAX              0x0F
 
 
+typedef struct acpi_common_descriptor
+{
+    void                            *CommonPointer;
+    UINT8                           DescriptorType; /* To differentiate various internal objs */
+
+} ACPI_COMMON_DESCRIPTOR;
+
 typedef union acpi_descriptor
 {
-    UINT8                           DescriptorId;   /* To differentiate various internal objs */
+    ACPI_COMMON_DESCRIPTOR          Common;
     ACPI_OPERAND_OBJECT             Object;
     ACPI_NAMESPACE_NODE             Node;
     ACPI_PARSE_OBJECT               Op;
 
 } ACPI_DESCRIPTOR;
 
+#pragma pack()
 
 #endif /* _ACOBJECT_H */
--- a/sys/dist/acpica/acopcode.h	Mon Jan 21 09:34:59 2008 +0000
+++ b/sys/dist/acpica/acopcode.h	Mon Jan 21 09:45:00 2008 +0000
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acopcode.h - AML opcode information for the AML parser and interpreter
- *       xRevision: 1.4 $
+ *       $Revision: 1.1.14.3 $
  *
  *****************************************************************************/
 
@@ -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 - 2007, Intel Corp.
  * All rights reserved.
  *
  * 2. License
@@ -168,7 +168,7 @@
 #define ARGP_CONCAT_RES_OP              ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_TARGET)
 #define ARGP_COND_REF_OF_OP             ARGP_LIST2 (ARGP_SUPERNAME,  ARGP_SUPERNAME)
 #define ARGP_CONTINUE_OP                ARG_NONE
-#define ARGP_COPY_OP                    ARGP_LIST2 (ARGP_SUPERNAME,  ARGP_SIMPLENAME)
+#define ARGP_COPY_OP                    ARGP_LIST2 (ARGP_TERMARG,    ARGP_SIMPLENAME)
 #define ARGP_CREATE_BIT_FIELD_OP        ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_NAME)
 #define ARGP_CREATE_BYTE_FIELD_OP       ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_NAME)
 #define ARGP_CREATE_DWORD_FIELD_OP      ARGP_LIST3 (ARGP_TERMARG,    ARGP_TERMARG,       ARGP_NAME)
@@ -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
--- a/sys/dist/acpica/acoutput.h	Mon Jan 21 09:34:59 2008 +0000
+++ b/sys/dist/acpica/acoutput.h	Mon Jan 21 09:45:00 2008 +0000
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acoutput.h -- debug output
- *       xRevision: 1.99 $
+ *       $Revision: 1.1.14.3 $
  *
  *****************************************************************************/
 
@@ -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 - 2007, Intel Corp.
  * All rights reserved.
  *
  * 2. License
@@ -220,7 +220,7 @@
 
 /*
  * These two levels are essentially obsolete, all instances in the
- * ACPICA core code have been replaced by REPORT_ERROR and REPORT_WARNING
+ * 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)
--- a/sys/dist/acpica/acparser.h	Mon Jan 21 09:34:59 2008 +0000
+++ b/sys/dist/acpica/acparser.h	Mon Jan 21 09:45:00 2008 +0000
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Module Name: acparser.h - AML Parser subcomponent prototypes and defines
- *       xRevision: 1.78 $
+ *       $Revision: 1.1.14.3 $
  *
  *****************************************************************************/
 
@@ -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 - 2007, Intel Corp.
  * All rights reserved.
  *
  * 2. License
@@ -121,7 +121,7 @@
 
 #define OP_HAS_RETURN_VALUE             1
 
-/* variable # arguments */
+/* Variable number of arguments. This field must be 32 bits */
 
 #define ACPI_VAR_ARGS                   ACPI_UINT32_MAX
 
@@ -151,7 +151,7 @@
  */
 ACPI_STATUS
 AcpiPsExecuteMethod (
-    ACPI_PARAMETER_INFO     *Info);
+    ACPI_EVALUATE_INFO      *Info);
 
 
 /*
@@ -211,6 +211,10 @@
 AcpiPsGetOpcodeName (
     UINT16                  Opcode);
 
+UINT8
+AcpiPsGetArgumentCount (
+    UINT32                  OpType);
+
 
 /*
  * psparse - top level parsing routines
--- a/sys/dist/acpica/acpi.h	Mon Jan 21 09:34:59 2008 +0000
+++ b/sys/dist/acpica/acpi.h	Mon Jan 21 09:45:00 2008 +0000
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acpi.h - Master include file, Publics and external data.
- *       xRevision: 1.60 $
+ *       $Revision: 1.1.14.3 $
  *
  *****************************************************************************/
 
@@ -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 - 2007, Intel Corp.
  * All rights reserved.
  *
  * 2. License
@@ -122,22 +122,22 @@
  * We put them here because we don't want to duplicate them
  * in the rest of the source code again and again.
  */
-#include "acnames.h"            /* Global ACPI names and strings */
-#include "acconfig.h"           /* Configuration constants */
-#include "acenv.h"              /* Target environment specific items */
-#include "actypes.h"            /* Fundamental common data types */
-#include "acexcep.h"            /* ACPI exception codes */
-#include "acmacros.h"           /* C macros */
-#include "actbl.h"              /* ACPI table definitions */
-#include "aclocal.h"            /* Internal data types */
-#include "acoutput.h"           /* Error output and Debug macros */
-#include "acpiosxf.h"           /* Interfaces to the ACPI-to-OS layer*/
-#include "acpixf.h"             /* ACPI core subsystem external interfaces */
-#include "acobject.h"           /* ACPI internal object */
-#include "acstruct.h"           /* Common structures */
-#include "acglobal.h"           /* All global variables */
-#include "achware.h"            /* Hardware defines and interfaces */
-#include "acutils.h"            /* Utility interfaces */
+#include <dist/acpica/acnames.h>            /* Global ACPI names and strings */
+#include <dist/acpica/acconfig.h>           /* Configuration constants */
+#include <dist/acpica/acenv.h>     /* Target environment specific items */
+#include <dist/acpica/actypes.h>            /* Fundamental common data types */
+#include <dist/acpica/acexcep.h>            /* ACPI exception codes */
+#include <dist/acpica/acmacros.h>           /* C macros */
+#include <dist/acpica/actbl.h>              /* ACPI table definitions */
+#include <dist/acpica/aclocal.h>            /* Internal data types */
+#include <dist/acpica/acoutput.h>           /* Error output and Debug macros */
+#include <dist/acpica/acpiosxf.h>           /* Interfaces to the ACPI-to-OS layer*/
+#include <dist/acpica/acpixf.h>             /* ACPI core subsystem external interfaces */
+#include <dist/acpica/acobject.h>           /* ACPI internal object */
+#include <dist/acpica/acstruct.h>           /* Common structures */
+#include <dist/acpica/acglobal.h>           /* All global variables */
+#include <dist/acpica/achware.h>            /* Hardware defines and interfaces */
+#include <dist/acpica/acutils.h>            /* Utility interfaces */
 
 
 #endif /* __ACPI_H__ */
--- a/sys/dist/acpica/acpiosxf.h	Mon Jan 21 09:34:59 2008 +0000
+++ b/sys/dist/acpica/acpiosxf.h	Mon Jan 21 09:45:00 2008 +0000
@@ -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 - 2007, Intel Corp.
  * All rights reserved.
  *
  * 2. License
@@ -121,16 +121,22 @@
 #ifndef __ACPIOSXF_H__
 #define __ACPIOSXF_H__
 
-#include "acenv.h"
-#include "actypes.h"
+#include <dist/acpica/acenv.h>
+#include <dist/acpica/actypes.h>
 
 
-/* Priorities for AcpiOsQueueForExecution */
+/* Types for AcpiOsExecute */
 
-#define OSD_PRIORITY_GPE            1
-#define OSD_PRIORITY_HIGH           2
-#define OSD_PRIORITY_MED            3
-#define OSD_PRIORITY_LO             4
+typedef enum
+{
+    OSL_GLOBAL_LOCK_HANDLER,
+    OSL_NOTIFY_HANDLER,
+    OSL_GPE_HANDLER,
+    OSL_DEBUGGER_THREAD,
+    OSL_EC_POLL_HANDLER,
+    OSL_EC_BURST_HANDLER
+
+} ACPI_EXECUTE_TYPE;
 
 #define ACPI_NO_UNIT_LIMIT          ((UINT32) -1)
 #define ACPI_MUTEX_SEM              1
@@ -165,10 +171,9 @@
 /*
  * ACPI Table interfaces
  */
-ACPI_STATUS
+ACPI_PHYSICAL_ADDRESS
 AcpiOsGetRootPointer (
-    UINT32                  Flags,
-    ACPI_POINTER            *Address);
+    void);
 
 ACPI_STATUS
 AcpiOsPredefinedOverride (
@@ -182,45 +187,77 @@
 
 
 /*
- * Synchronization primitives
+ * Spinlock primitives
+ */
+ACPI_STATUS
+AcpiOsCreateLock (
+    ACPI_SPINLOCK           *OutHandle);
+
+void
+AcpiOsDeleteLock (
+    ACPI_SPINLOCK           Handle);
+
+ACPI_CPU_FLAGS
+AcpiOsAcquireLock (
+    ACPI_SPINLOCK           Handle);
+
+void
+AcpiOsReleaseLock (
+    ACPI_SPINLOCK           Handle,
+    ACPI_CPU_FLAGS          Flags);
+
+
+/*
+ * Semaphore primitives
  */
 ACPI_STATUS
 AcpiOsCreateSemaphore (
     UINT32                  MaxUnits,
     UINT32                  InitialUnits,
-    ACPI_HANDLE             *OutHandle);
+    ACPI_SEMAPHORE          *OutHandle);
 
 ACPI_STATUS
 AcpiOsDeleteSemaphore (
-    ACPI_HANDLE             Handle);
+    ACPI_SEMAPHORE          Handle);
 
 ACPI_STATUS
 AcpiOsWaitSemaphore (
-    ACPI_HANDLE             Handle,
+    ACPI_SEMAPHORE          Handle,
     UINT32                  Units,
     UINT16                  Timeout);
 
 ACPI_STATUS
 AcpiOsSignalSemaphore (
-    ACPI_HANDLE             Handle,
+    ACPI_SEMAPHORE          Handle,
     UINT32                  Units);
 
+
+/*
+ * Mutex primitives
+ */
 ACPI_STATUS
-AcpiOsCreateLock (
-    ACPI_HANDLE             *OutHandle);
+AcpiOsCreateMutex (
+    ACPI_MUTEX              *OutHandle);
 
 void
-AcpiOsDeleteLock (
-    ACPI_HANDLE             Handle);
+AcpiOsDeleteMutex (
+    ACPI_MUTEX              Handle);
 
-ACPI_CPU_FLAGS
-AcpiOsAcquireLock (
-    ACPI_HANDLE             Handle);
+ACPI_STATUS
+AcpiOsAcquireMutex (
+    ACPI_MUTEX              Handle,
+    UINT16                  Timeout);
 
 void
-AcpiOsReleaseLock (
-    ACPI_HANDLE             Handle,
-    ACPI_CPU_FLAGS          Flags);
+AcpiOsReleaseMutex (
+    ACPI_MUTEX              Handle);
+
+/* Temporary macros for Mutex* interfaces, map to existing semaphore xfaces */
+
+#define AcpiOsCreateMutex(OutHandle)        AcpiOsCreateSemaphore (1, 1, OutHandle)
+#define AcpiOsDeleteMutex(Handle)           (void) AcpiOsDeleteSemaphore (Handle)
+#define AcpiOsAcquireMutex(Handle,Time)     AcpiOsWaitSemaphore (Handle, 1, Time)
+#define AcpiOsReleaseMutex(Handle)          (void) AcpiOsSignalSemaphore (Handle, 1)
 
 
 /*
@@ -232,13 +269,12 @@
 
 void
 AcpiOsFree (
-    void *                 Memory);
+    void *                  Memory);
 
-ACPI_STATUS
+void *
 AcpiOsMapMemory (
-    ACPI_PHYSICAL_ADDRESS   PhysicalAddress,
-    ACPI_SIZE               Size,
-    void                    **LogicalAddress);
+    ACPI_PHYSICAL_ADDRESS   Where,
+    ACPI_NATIVE_UINT        Length);
 
 void
 AcpiOsUnmapMemory (
@@ -297,13 +333,13 @@
 /*
  * Threads and Scheduling
  */
-UINT32
+ACPI_THREAD_ID
 AcpiOsGetThreadId (
     void);
 
 ACPI_STATUS
-AcpiOsQueueForExecution (
-    UINT32                  Priority,
+AcpiOsExecute (
+    ACPI_EXECUTE_TYPE       Type,
     ACPI_OSD_EXEC_CALLBACK  Function,
     void                    *Context);
 
@@ -371,6 +407,7 @@
     ACPI_INTEGER            Value,
     UINT32                  Width);
 
+
 /*
  * Interim function needed for PCI IRQ routing
  */
@@ -380,9 +417,20 @@
     ACPI_HANDLE             Chandle,
     ACPI_PCI_ID             **PciId);
 
+
 /*
  * Miscellaneous
  */
+ACPI_STATUS
+AcpiOsValidateInterface (
+    char                    *Interface);
+
+ACPI_STATUS
+AcpiOsValidateAddress (
+    UINT8                   SpaceId,
+    ACPI_PHYSICAL_ADDRESS   Address,
+    ACPI_SIZE               Length);
+
 BOOLEAN
 AcpiOsReadable (
     void                    *Pointer,
@@ -402,6 +450,7 @@
     UINT32                  Function,
     const void              *Info);
 
+
 /*
  * Debug print routines
  */
@@ -451,14 +500,5 @@
 AcpiOsCloseDirectory (
     void                    *DirHandle);
 
-/*
- * Debug
- */
-void
-AcpiOsDbgAssert(
-    void                    *FailedAssertion,
-    void                    *FileName,
-    UINT32                  LineNumber,
-    char                    *Message);
 
 #endif /* __ACPIOSXF_H__ */
--- a/sys/dist/acpica/acpixf.h	Mon Jan 21 09:34:59 2008 +0000
+++ b/sys/dist/acpica/acpixf.h	Mon Jan 21 09:45:00 2008 +0000
@@ -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 - 2007, Intel Corp.
  * All rights reserved.
  *
  * 2. License
@@ -118,14 +118,20 @@
 #ifndef __ACXFACE_H__
 #define __ACXFACE_H__
 
-#include "actypes.h"
-#include "actbl.h"
+#include <dist/acpica/actypes.h>
+#include <dist/acpica/actbl.h>
 
 
 /*
  * Global interfaces
  */
 ACPI_STATUS
+AcpiInitializeTables (
+    ACPI_TABLE_DESC         *InitialStorage,
+    UINT32                  InitialTableCount,
+    BOOLEAN                 AllowResize);
+
+ACPI_STATUS
 AcpiInitializeSubsystem (
     void);
 
@@ -190,40 +196,33 @@
  * ACPI table manipulation interfaces
  */
 ACPI_STATUS
+AcpiReallocateRootTable (
+    void);
+
+ACPI_STATUS
 AcpiFindRootPointer (
-    UINT32                  Flags,
-    ACPI_POINTER            *RsdpAddress);
+    ACPI_NATIVE_UINT        *RsdpAddress);
 
 ACPI_STATUS
 AcpiLoadTables (
     void);
 
 ACPI_STATUS
-AcpiLoadTable (
-    ACPI_TABLE_HEADER       *TablePtr);
-
-ACPI_STATUS
-AcpiUnloadTable (
-    ACPI_TABLE_TYPE         TableType);
-
-ACPI_STATUS
 AcpiGetTableHeader (
-    ACPI_TABLE_TYPE         TableType,
-    UINT32                  Instance,
+    ACPI_CONST_STRING       Signature,
+    ACPI_NATIVE_UINT        Instance,
     ACPI_TABLE_HEADER       *OutTableHeader);
 
 ACPI_STATUS
 AcpiGetTable (
-    ACPI_TABLE_TYPE         TableType,
-    UINT32                  Instance,
-    ACPI_BUFFER             *RetBuffer);
+    ACPI_CONST_STRING       Signature,
+    ACPI_NATIVE_UINT        Instance,
+    ACPI_TABLE_HEADER       **OutTable);
 
 ACPI_STATUS
-AcpiGetFirmwareTable (
-    ACPI_CONST_STRING       Signature,
-    UINT32                  Instance,
-    UINT32                  Flags,
-    ACPI_TABLE_HEADER       **TablePointer);
+AcpiGetTableByIndex (
+    ACPI_NATIVE_UINT        TableIndex,
+    ACPI_TABLE_HEADER       **OutTable);
 
 
 /*
@@ -510,14 +509,12 @@
 ACPI_STATUS
 AcpiGetRegister (
     UINT32                  RegisterId,
-    UINT32                  *ReturnValue,
-    UINT32                  Flags);
+    UINT32                  *ReturnValue);
 
 ACPI_STATUS
 AcpiSetRegister (
     UINT32                  RegisterId,
-    UINT32                  Value,
-    UINT32                  Flags);
+    UINT32                  Value);
 
 ACPI_STATUS
 AcpiSetFirmwareWakingVector (
--- a/sys/dist/acpica/acresrc.h	Mon Jan 21 09:34:59 2008 +0000
+++ b/sys/dist/acpica/acresrc.h	Mon Jan 21 09:45:00 2008 +0000
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acresrc.h - Resource Manager function prototypes
- *       xRevision: 1.56 $
+ *       $Revision: 1.1.14.3 $
  *
  *****************************************************************************/
 
@@ -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 - 2007, Intel Corp.
  * All rights reserved.
  *
  * 2. License
@@ -120,14 +120,18 @@
 
 /* Need the AML resource descriptor structs */
 
-#include "amlresrc.h"
+#include <dist/acpica/amlresrc.h>
 
 
 /*
  * If possible, pack the following structures to byte alignment, since we
- * don't care about performance for debug output
+ * don't care about performance for debug output. Two cases where we cannot
+ * pack the structures:
+ *
+ * 1) Hardware does not support misaligned memory transfers
+ * 2) Compiler does not support pointers within packed structures
  */
-#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
+#if (!defined(ACPI_MISALIGNMENT_NOT_SUPPORTED) && !defined(ACPI_PACKED_POINTERS_NOT_SUPPORTED))
 #pragma pack(1)
 #endif
 
@@ -253,17 +257,17 @@
  */
 ACPI_STATUS
 AcpiRsGetPrtMethodData (
-    ACPI_HANDLE             Handle,
+    ACPI_NAMESPACE_NODE     *Node,
     ACPI_BUFFER             *RetBuffer);
 
 ACPI_STATUS
 AcpiRsGetCrsMethodData (
-    ACPI_HANDLE             Handle,
+    ACPI_NAMESPACE_NODE     *Node,
     ACPI_BUFFER             *RetBuffer);
 
 ACPI_STATUS
 AcpiRsGetPrsMethodData (
-    ACPI_HANDLE             Handle,
+    ACPI_NAMESPACE_NODE     *Node,
     ACPI_BUFFER             *RetBuffer);
 
 ACPI_STATUS
@@ -274,7 +278,7 @@
 
 ACPI_STATUS
 AcpiRsSetSrsMethodData (
-    ACPI_HANDLE             Handle,
+    ACPI_NAMESPACE_NODE     *Node,
     ACPI_BUFFER             *RetBuffer);
 
 
@@ -299,9 +303,11 @@
 
 ACPI_STATUS
 AcpiRsConvertAmlToResources (
-    UINT8                   *AmlBuffer,
-    UINT32                  AmlBufferLength,
-    UINT8                   *OutputBuffer);
+    UINT8                   *Aml,
+    UINT32                  Length,
+    UINT32                  Offset,
+    UINT8                   ResourceIndex,
+    void                    *Context);
 
 ACPI_STATUS
 AcpiRsConvertResourcesToAml (
--- a/sys/dist/acpica/acstruct.h	Mon Jan 21 09:34:59 2008 +0000
+++ b/sys/dist/acpica/acstruct.h	Mon Jan 21 09:45:00 2008 +0000
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acstruct.h - Internal structs
- *       xRevision: 1.39 $
+ *       $Revision: 1.1.14.3 $
  *
  *****************************************************************************/
 
@@ -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 - 2007, Intel Corp.
  * All rights reserved.
  *
  * 2. License
@@ -117,6 +117,7 @@
 #ifndef __ACSTRUCT_H__
 #define __ACSTRUCT_H__
 
+/* acpisrc:StructDefs -- for acpisrc conversion */
 
 /*****************************************************************************
  *
@@ -126,68 +127,81 @@
 
 
 /*
- * Walk state - current state of a parse tree walk.  Used for both a leisurely stroll through
- * the tree (for whatever reason), and for control method execution.
+ * Walk state - current state of a parse tree walk.  Used for both a leisurely
+ * stroll through the tree (for whatever reason), and for control method
+ * execution.
  */
 #define ACPI_NEXT_OP_DOWNWARD       1
 #define ACPI_NEXT_OP_UPWARD         2
 
+/*
+ * Groups of definitions for WalkType used for different implementations of
+ * walkers (never simultaneously) - flags for interpreter:
+ */
 #define ACPI_WALK_NON_METHOD        0
-#define ACPI_WALK_METHOD            1
-#define ACPI_WALK_METHOD_RESTART    2
-#define ACPI_WALK_CONST_REQUIRED    3
-#define ACPI_WALK_CONST_OPTIONAL    4
+#define ACPI_WALK_METHOD            0x01
+#define ACPI_WALK_METHOD_RESTART    0x02
+
+/* Flags for iASL compiler only */
+
+#define ACPI_WALK_CONST_REQUIRED    0x10
+#define ACPI_WALK_CONST_OPTIONAL    0x20
+
 
 typedef struct acpi_walk_state
 {
-    UINT8                       DataType;                           /* To differentiate various internal objs MUST BE FIRST!*/
-    UINT8                       WalkType;
-    ACPI_OWNER_ID               OwnerId;                            /* Owner of objects created during the walk */
-    BOOLEAN                     LastPredicate;                      /* Result of last predicate */
-    UINT8                       CurrentResult;                      /* */
-    UINT8                       NextOpInfo;                         /* Info about NextOp */
-    UINT8                       NumOperands;                        /* Stack pointer for Operands[] array */
-    UINT8                       ReturnUsed;
-    UINT16                      Opcode;                             /* Current AML opcode */
-    UINT8                       ScopeDepth;
-    UINT8                       PassNumber;                         /* Parse pass during table load */
-    UINT32                      ArgCount;                           /* push for fixed or var args */
-    UINT32                      AmlOffset;
-    UINT32                      ArgTypes;
-    UINT32                      MethodBreakpoint;                   /* For single stepping */
-    UINT32                      UserBreakpoint;                     /* User AML breakpoint */
-    UINT32                      ParseFlags;
-    UINT32                      PrevArgTypes;
+    struct acpi_walk_state          *Next;              /* Next WalkState in list */
+    UINT8                           DescriptorType;     /* To differentiate various internal objs */
+    UINT8                           WalkType;
+    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 */
+    UINT32                          UserBreakpoint;     /* User AML breakpoint */
+    UINT32                          ParseFlags;
+
+    ACPI_PARSE_STATE                ParserState;        /* Current state of parser */
+    UINT32                          PrevArgTypes;
+    UINT32                          ArgCount;           /* push for fixed or var args */
 
-    UINT8                       *AmlLastWhile;
-    struct acpi_namespace_node  Arguments[ACPI_METHOD_NUM_ARGS];    /* Control method arguments */
-    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  LocalVariables[ACPI_METHOD_NUM_LOCALS];     /* Control method locals */
-    struct acpi_namespace_node  *MethodCallNode;                    /* Called method Node*/
-    ACPI_PARSE_OBJECT           *MethodCallOp;                      /* MethodCall Op if running a method */
-    union acpi_operand_object   *MethodDesc;                        /* Method descriptor if running a method */
-    struct acpi_namespace_node  *MethodNode;                        /* Method node if running a method. */
-    ACPI_PARSE_OBJECT           *Op;                                /* Current parser op */
-    union acpi_operand_object   *Operands[ACPI_OBJ_NUM_OPERANDS+1]; /* Operands passed to the interpreter (+1 for NULL terminator) */
-    const ACPI_OPCODE_INFO      *OpInfo;                            /* Info on current opcode */
-    ACPI_PARSE_OBJECT           *Origin;                            /* Start of walk [Obsolete] */
-    union acpi_operand_object   **Params;
-    ACPI_PARSE_STATE            ParserState;                        /* Current state of parser */
-    union acpi_operand_object   *ResultObj;
-    ACPI_GENERIC_STATE          *Results;                           /* Stack of accumulated results */
-    union acpi_operand_object   *ReturnDesc;                        /* Return object, if any */
-    ACPI_GENERIC_STATE          *ScopeInfo;                         /* Stack of nested scopes */
+    struct acpi_namespace_node      Arguments[ACPI_METHOD_NUM_ARGS];        /* Control method arguments */
+    struct acpi_namespace_node      LocalVariables[ACPI_METHOD_NUM_LOCALS]; /* Control method locals */
+    union acpi_operand_object       *Operands[ACPI_OBJ_NUM_OPERANDS + 1];   /* Operands passed to the interpreter (+1 for NULL terminator) */
+    union acpi_operand_object       **Params;
 
-    ACPI_PARSE_OBJECT           *PrevOp;                            /* Last op that was processed */
-    ACPI_PARSE_OBJECT           *NextOp;                            /* next op to be processed */
-    ACPI_PARSE_DOWNWARDS        DescendingCallback;
-    ACPI_PARSE_UPWARDS          AscendingCallback;
-    ACPI_THREAD_STATE           *Thread;
-    struct acpi_walk_state      *Next;                              /* Next WalkState in list */
+    UINT8                           *AmlLastWhile;
+    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 */
+    union acpi_operand_object       *MethodDesc;        /* Method descriptor if running a method */
+    struct acpi_namespace_node      *MethodNode;        /* Method node if running a method. */
+    ACPI_PARSE_OBJECT               *Op;                /* Current parser op */
+    const ACPI_OPCODE_INFO          *OpInfo;            /* Info on current opcode */
+    ACPI_PARSE_OBJECT               *Origin;            /* Start of walk [Obsolete] */
+    union acpi_operand_object       *ResultObj;
+    ACPI_GENERIC_STATE              *Results;           /* Stack of accumulated results */
+    union acpi_operand_object       *ReturnDesc;        /* Return object, if any */
+    ACPI_GENERIC_STATE              *ScopeInfo;         /* Stack of nested scopes */
+    ACPI_PARSE_OBJECT               *PrevOp;            /* Last op that was processed */
+    ACPI_PARSE_OBJECT               *NextOp;            /* next op to be processed */
+    ACPI_THREAD_STATE               *Thread;
+    ACPI_PARSE_DOWNWARDS            DescendingCallback;
+    ACPI_PARSE_UPWARDS              AscendingCallback;
 
 } ACPI_WALK_STATE;
 
@@ -196,30 +210,102 @@
 
 typedef struct acpi_init_walk_info
 {
-    UINT16                  MethodCount;
-    UINT16                  DeviceCount;
-    UINT16                  OpRegionCount;
-    UINT16                  FieldCount;
-    UINT16                  BufferCount;
-    UINT16                  PackageCount;
-    UINT16                  OpRegionInit;
-    UINT16                  FieldInit;
-    UINT16                  BufferInit;
-    UINT16                  PackageInit;
-    UINT16                  ObjectCount;
-    ACPI_TABLE_DESC         *TableDesc;
+    UINT16                          MethodCount;
+    UINT16                          DeviceCount;
+    UINT16                          OpRegionCount;
+    UINT16                          FieldCount;
+    UINT16                          BufferCount;
+    UINT16                          PackageCount;
+    UINT16                          OpRegionInit;
+    UINT16                          FieldInit;
+    UINT16                          BufferInit;
+    UINT16                          PackageInit;
+    UINT16                          ObjectCount;
+    ACPI_OWNER_ID                   OwnerId;
+    ACPI_NATIVE_UINT                TableIndex;
 
 } ACPI_INIT_WALK_INFO;
 
 
+typedef struct acpi_get_devices_info
+{
+    ACPI_WALK_CALLBACK              UserFunction;
+    void                            *Context;
+    char                            *Hid;
+
+} ACPI_GET_DEVICES_INFO;
+
+
+typedef union acpi_aml_operands
+{
+    ACPI_OPERAND_OBJECT             *Operands[7];
+
+    struct
+    {
+        ACPI_OBJECT_INTEGER             *Type;
+        ACPI_OBJECT_INTEGER             *Code;
+        ACPI_OBJECT_INTEGER             *Argument;
+
+    } Fatal;
+
+    struct
+    {
+        ACPI_OPERAND_OBJECT             *Source;
+        ACPI_OBJECT_INTEGER             *Index;
+        ACPI_OPERAND_OBJECT             *Target;
+
+    } Index;
+
+    struct
+    {
+        ACPI_OPERAND_OBJECT             *Source;
+        ACPI_OBJECT_INTEGER             *Index;
+        ACPI_OBJECT_INTEGER             *Length;
+        ACPI_OPERAND_OBJECT             *Target;
+
+    } Mid;
+
+} ACPI_AML_OPERANDS;
+
+
+/*
+ * Structure used to pass object evaluation parameters.
+ * Purpose is to reduce CPU stack use.
+ */
+typedef struct acpi_evaluate_info
+{
+    ACPI_NAMESPACE_NODE             *PrefixNode;
+    const char                      *Pathname;
+    ACPI_OPERAND_OBJECT             *ObjDesc;
+    ACPI_OPERAND_OBJECT             **Parameters;
+    ACPI_NAMESPACE_NODE             *ResolvedNode;
+    ACPI_OPERAND_OBJECT             *ReturnObject;
+    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
+
+
 /* Info used by AcpiNsInitializeDevices */
 
 typedef struct acpi_device_walk_info
 {
-    UINT16                  DeviceCount;
-    UINT16                  Num_STA;
-    UINT16                  Num_INI;
-    ACPI_TABLE_DESC         *TableDesc;
+    UINT16                          DeviceCount;
+    UINT16                          Num_STA;
+    UINT16                          Num_INI;
+    ACPI_TABLE_DESC                 *TableDesc;
+    ACPI_EVALUATE_INFO              *EvaluateInfo;
 
 } ACPI_DEVICE_WALK_INFO;
 
@@ -228,80 +314,20 @@
 
 typedef struct acpi_walk_info
 {
-    UINT32                  DebugLevel;
-    UINT32                  Count;
-    ACPI_OWNER_ID           OwnerId;
-    UINT8                   DisplayType;
+    UINT32                          DebugLevel;
+    UINT32                          Count;
+    ACPI_OWNER_ID                   OwnerId;
+    UINT8                           DisplayType;
 
 } ACPI_WALK_INFO;
 
 /* Display Types */
 
-#define ACPI_DISPLAY_SUMMARY    (UINT8) 0
-#define ACPI_DISPLAY_OBJECTS    (UINT8) 1
-#define ACPI_DISPLAY_MASK       (UINT8) 1
-
-#define ACPI_DISPLAY_SHORT      (UINT8) 2
-
-typedef struct acpi_get_devices_info
-{
-    ACPI_WALK_CALLBACK      UserFunction;
-    void                    *Context;
-    char                    *Hid;
-
-} ACPI_GET_DEVICES_INFO;
-
-
-typedef union acpi_aml_operands
-{
-    ACPI_OPERAND_OBJECT         *Operands[7];
-
-    struct
-    {
-        ACPI_OBJECT_INTEGER     *Type;
-        ACPI_OBJECT_INTEGER     *Code;
-        ACPI_OBJECT_INTEGER     *Argument;
-
-    } Fatal;
-
-    struct
-    {
-        ACPI_OPERAND_OBJECT     *Source;
-        ACPI_OBJECT_INTEGER     *Index;
-        ACPI_OPERAND_OBJECT     *Target;
+#define ACPI_DISPLAY_SUMMARY        (UINT8) 0
+#define ACPI_DISPLAY_OBJECTS        (UINT8) 1
+#define ACPI_DISPLAY_MASK           (UINT8) 1
 
-    } Index;
-
-    struct
-    {
-        ACPI_OPERAND_OBJECT     *Source;
-        ACPI_OBJECT_INTEGER     *Index;
-        ACPI_OBJECT_INTEGER     *Length;
-        ACPI_OPERAND_OBJECT     *Target;
-
-    } Mid;
-
-} ACPI_AML_OPERANDS;
-
-
-/* Internal method parameter list */
-
-typedef struct acpi_parameter_info
-{
-    ACPI_NAMESPACE_NODE     *Node;
-    ACPI_OPERAND_OBJECT     *ObjDesc;
-    ACPI_OPERAND_OBJECT     **Parameters;
-    ACPI_OPERAND_OBJECT     *ReturnObject;
-    UINT8                   PassNumber;
-    UINT8                   ParameterType;
-    UINT8                   ReturnObjectType;
-
-} ACPI_PARAMETER_INFO;
-
-/* Types for ParameterType above */
-
-#define ACPI_PARAM_ARGS                 0
-#define ACPI_PARAM_GPE                  1
+#define ACPI_DISPLAY_SHORT          (UINT8) 2
 
 
 #endif
--- a/sys/dist/acpica/actables.h	Mon Jan 21 09:34:59 2008 +0000
+++ b/sys/dist/acpica/actables.h	Mon Jan 21 09:45:00 2008 +0000
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: actables.h - ACPI table management
- *       xRevision: 1.54 $
+ *       $Revision: 1.1.14.3 $
  *
  *****************************************************************************/
 
@@ -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 - 2007, Intel Corp.
  * All rights reserved.
  *
  * 2. License
@@ -118,153 +118,126 @@
 #define __ACTABLES_H__
 
 
-/* Used in AcpiTbMapAcpiTable for size parameter if table header is to be used */
-
-#define SIZE_IN_HEADER          0
-
+ACPI_STATUS
+AcpiAllocateRootTable (
+    UINT32                  InitialTableCount);
 
 /*
- * tbconvrt - Table conversion routines
+ * tbfadt - FADT parse/convert/validate
  */
-ACPI_STATUS
-AcpiTbConvertToXsdt (
-    ACPI_TABLE_DESC         *TableInfo);
+void
+AcpiTbParseFadt (
+    ACPI_NATIVE_UINT        TableIndex,
+    UINT8                   Flags);
 
-ACPI_STATUS
-AcpiTbConvertTableFadt (
-    void);
-
-ACPI_STATUS
-AcpiTbBuildCommonFacs (
-    ACPI_TABLE_DESC         *TableInfo);
-
-UINT32
-AcpiTbGetTableCount (
-    RSDP_DESCRIPTOR         *RSDP,
-    ACPI_TABLE_HEADER       *RSDT);
+void
+AcpiTbCreateLocalFadt (
+    ACPI_TABLE_HEADER       *Table,
+    UINT32                  Length);
 
 
 /*
- * tbget - Table "get" routines
- */
-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);
-
-ACPI_STATUS
-AcpiTbValidateRsdt (
-    ACPI_TABLE_HEADER       *TablePtr);
-
-
-/*
- * tbgetall - get multiple required tables
- */
-ACPI_STATUS
-AcpiTbGetRequiredTables (
-    void);
-
-
-/*
- * tbinstall - Table installation
- */
-ACPI_STATUS
-AcpiTbInstallTable (
-    ACPI_TABLE_DESC         *TableInfo);
-
-ACPI_STATUS
-AcpiTbRecognizeTable (
-    ACPI_TABLE_DESC         *TableInfo,
-    UINT8                   SearchType);
-
-ACPI_STATUS
-AcpiTbInitTableDescriptor (
-    ACPI_TABLE_TYPE         TableType,
-    ACPI_TABLE_DESC         *TableInfo);
-
-
-/*
- * tbremove - Table removal and deletion
- */
-void
-AcpiTbDeleteAllTables (
-    void);
-
-void
-AcpiTbDeleteTablesByType (
-    ACPI_TABLE_TYPE         Type);
-
-void
-AcpiTbDeleteSingleTable (
-    ACPI_TABLE_DESC         *TableDesc);
-
-ACPI_TABLE_DESC *
-AcpiTbUninstallTable (
-    ACPI_TABLE_DESC         *TableDesc);
-
-
-/*
- * tbxfroot - RSDP, RSDT utilities
+ * tbfind - find ACPI table
  */
 ACPI_STATUS
 AcpiTbFindTable (
     char                    *Signature,
     char                    *OemId,
     char                    *OemTableId,
-    ACPI_TABLE_HEADER       **TablePtr);
-
-ACPI_STATUS
-AcpiTbGetTableRsdt (
-    void);
-
-ACPI_STATUS
-AcpiTbValidateRsdp (
-    RSDP_DESCRIPTOR         *Rsdp);
+    ACPI_NATIVE_UINT        *TableIndex);
 
 
 /*
- * tbutils - common table utilities
+ * tbinstal - Table removal and deletion
  */
 ACPI_STATUS
-AcpiTbIsTableInstalled (
-    ACPI_TABLE_DESC         *NewTableDesc);
+AcpiTbResizeRootTableList (
+    void);
+
+ACPI_STATUS
+AcpiTbVerifyTable (
+    ACPI_TABLE_DESC         *TableDesc);
+
+ACPI_STATUS
+AcpiTbAddTable (
+    ACPI_TABLE_DESC         *TableDesc,
+    ACPI_NATIVE_UINT        *TableIndex);
+
+ACPI_STATUS
+AcpiTbStoreTable (
+    ACPI_PHYSICAL_ADDRESS   Address,
+    ACPI_TABLE_HEADER       *Table,
+    UINT32                  Length,
+    UINT8                   Flags,
+    ACPI_NATIVE_UINT        *TableIndex);
+
+void
+AcpiTbDeleteTable (
+    ACPI_TABLE_DESC        *TableDesc);
+
+void
+AcpiTbTerminate (
+    void);
+
+void
+AcpiTbDeleteNamespaceByOwner (
+    ACPI_NATIVE_UINT        TableIndex);
+
+ACPI_STATUS
+AcpiTbAllocateOwnerId (
+    ACPI_NATIVE_UINT        TableIndex);
+
+ACPI_STATUS
+AcpiTbReleaseOwnerId (
+    ACPI_NATIVE_UINT        TableIndex);
 
 ACPI_STATUS
-AcpiTbVerifyTableChecksum (
-    ACPI_TABLE_HEADER       *TableHeader);
+AcpiTbGetOwnerId (
+    ACPI_NATIVE_UINT        TableIndex,
+    ACPI_OWNER_ID           *OwnerId);
+
+BOOLEAN
+AcpiTbIsTableLoaded (
+    ACPI_NATIVE_UINT        TableIndex);
+
+void
+AcpiTbSetTableLoadedFlag (
+    ACPI_NATIVE_UINT        TableIndex,
+    BOOLEAN                 IsLoaded);
+
+
+/*
+ * tbutils - table manager utilities
+ */
+BOOLEAN
+AcpiTbTablesLoaded (
+    void);
+
+void
+AcpiTbPrintTableHeader(
+    ACPI_PHYSICAL_ADDRESS   Address,
+    ACPI_TABLE_HEADER       *Header);
 
 UINT8
-AcpiTbGenerateChecksum (
-    void                    *Buffer,
-    UINT32                  Length);
+AcpiTbChecksum (
+    UINT8                   *Buffer,
+    ACPI_NATIVE_UINT        Length);
 
 ACPI_STATUS
-AcpiTbValidateTableHeader (
-    ACPI_TABLE_HEADER       *TableHeader);
+AcpiTbVerifyChecksum (
+    ACPI_TABLE_HEADER       *Table,
+    UINT32                  Length);
+
+void
+AcpiTbInstallTable (
+    ACPI_PHYSICAL_ADDRESS   Address,
+    UINT8                   Flags,
+    const char              *Signature,
+    ACPI_NATIVE_UINT        TableIndex);
+
+ACPI_STATUS
+AcpiTbParseRootTable (
+    ACPI_PHYSICAL_ADDRESS   RsdpAddress,
+    UINT8                   Flags);
 
 #endif /* __ACTABLES_H__ */
--- a/sys/dist/acpica/actbl.h	Mon Jan 21 09:34:59 2008 +0000
+++ b/sys/dist/acpica/actbl.h	Mon Jan 21 09:45:00 2008 +0000
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
- * Name: actbl.h - Table data structures defined in ACPI specification
- *       xRevision: 1.74 $
+ * Name: actbl.h - Basic ACPI Table Definitions
+ *       $Revision: 1.1.14.3 $
  *
  *****************************************************************************/
 
@@ -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 - 2007, Intel Corp.
  * All rights reserved.
  *
  * 2. License
@@ -117,336 +117,279 @@
 #ifndef __ACTBL_H__
 #define __ACTBL_H__
 
+/*
+ * Values for description table header signatures. Useful because they make
+ * it more difficult to inadvertently type in the wrong signature.
+ */
+#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 */
+
 
 /*
+ * All tables and structures must be byte-packed to match the ACPI
+ * specification, since the tables are provided by the system BIOS
+ */
+#pragma pack(1)
+
+
+/*
+ * These are the ACPI tables that are directly consumed by the subsystem.
+ *
+ * The RSDP and FACS do not use the common ACPI table header. All other ACPI
+ * tables use the header.
+ *
  * Note about bitfields: The UINT8 type is used for bitfields in ACPI tables.
  * This is the only type that is even remotely portable. Anything else is not
  * portable, so do not use any other bitfield types.
  */
 
-
-/*
- *  Values for description table header signatures
- */
-#define RSDP_NAME               "RSDP"
-#define RSDP_SIG                "RSD PTR "  /* RSDT Pointer signature */
-#define APIC_SIG                "APIC"      /* Multiple APIC Description Table */
-#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 RSDT_SIG                "RSDT"      /* Root System Description Table */
-#define XSDT_SIG                "XSDT"      /* Extended  System Description Table */
-#define SSDT_SIG                "SSDT"      /* Secondary System Description Table */
-#define SBST_SIG                "SBST"      /* Smart Battery Specification Table */
-#define SPIC_SIG                "SPIC"      /* IOSAPIC table */
-#define BOOT_SIG                "BOOT"      /* Boot table */
-
-
-#define GL_OWNED                0x02        /* Ownership of global lock is bit 1 */
-
-
-/*
- * Common table types.  The base code can remain
- * constant if the underlying tables are changed
- */
-#define RSDT_DESCRIPTOR         RSDT_DESCRIPTOR_REV2
-#define XSDT_DESCRIPTOR         XSDT_DESCRIPTOR_REV2
-#define FACS_DESCRIPTOR         FACS_DESCRIPTOR_REV2
-#define FADT_DESCRIPTOR         FADT_DESCRIPTOR_REV2
-
-
-#pragma pack(1)
-
-/*
- * ACPI Version-independent tables
+/*******************************************************************************
+ *
+ * ACPI Table Header. This common header is used by all tables except the
+ * RSDP and FACS. The define is used for direct inclusion of header into
+ * other ACPI tables
  *
- * NOTE: The tables that are specific to ACPI versions (1.0, 2.0, etc.)
- * are in separate files.
- */
-typedef struct rsdp_descriptor /* Root System Descriptor Pointer */
-{
-    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;                 /* XSDT Length in bytes, including header */
-    UINT64                  XsdtPhysicalAddress;    /* 64-bit physical address of the XSDT */
-    UINT8                   ExtendedChecksum;       /* Checksum of entire table (ACPI 2.0) */
-    char                    Reserved[3];            /* Reserved, must be zero */
+ ******************************************************************************/
 
-} RSDP_DESCRIPTOR;
-
-
-typedef struct acpi_common_facs  /* Common FACS for internal use */
+typedef struct acpi_table_header
 {
-    UINT32                  *GlobalLock;
-    UINT64                  *FirmwareWakingVector;
-    UINT8                   VectorWidth;
-
-} ACPI_COMMON_FACS;
-
-
-#define ACPI_TABLE_HEADER_DEF   /* ACPI common table header */ \
-    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 common 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;
 
 
 /*
- * MADT values and structures
- */
-
-/* Values for MADT PCATCompat */
-
-#define DUAL_PIC                0
-#define MULTIPLE_APIC           1
-
-/* Master MADT */
-
-typedef struct multiple_apic_table
-{
-    ACPI_TABLE_HEADER_DEF                           /* ACPI common table header */
-    UINT32                  LocalApicAddress;       /* Physical address of local APIC */
-
-    /* Flags (32 bits) */
-
-    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 */
-
-} MULTIPLE_APIC_TABLE;
-
-/* Values for Type in APIC_HEADER_DEF */
-
-#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 APIC_RESERVED           9           /* 9 and greater are reserved */
-
-/*
- * MADT sub-structures (Follow MULTIPLE_APIC_DESCRIPTION_TABLE)
+ * 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.
  */
-#define APIC_HEADER_DEF                     /* Common APIC sub-structure header */\
-    UINT8                   Type; \
-    UINT8                   Length;
+typedef struct acpi_generic_address
+{
+    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 */
 
-typedef struct apic_header
-{
-    APIC_HEADER_DEF
+} ACPI_GENERIC_ADDRESS;
+
 
-} APIC_HEADER;
+/*******************************************************************************
+ *
+ * RSDP - Root System Description Pointer (Signature is "RSD PTR ")
+ *
+ ******************************************************************************/
 
-/* Values for MPS INTI flags */
+typedef struct acpi_table_rsdp
+{
+    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 */
 
-#define POLARITY_CONFORMS       0
-#define POLARITY_ACTIVE_HIGH    1
-#define POLARITY_RESERVED       2
-#define POLARITY_ACTIVE_LOW     3
+} ACPI_TABLE_RSDP;
+
+#define ACPI_RSDP_REV0_SIZE     20                  /* Size of original ACPI 1.0 RSDP */
+
 
-#define TRIGGER_CONFORMS        0
-#define TRIGGER_EDGE            1
-#define TRIGGER_RESERVED        2
-#define TRIGGER_LEVEL           3
+/*******************************************************************************
+ *
+ * RSDT/XSDT - Root System Description Tables
+ *
+ ******************************************************************************/
 
-/* Common flag definitions (16 bits each) */
+typedef struct acpi_table_rsdt
+{
+    ACPI_TABLE_HEADER       Header;                 /* Common ACPI table header */
+    UINT32                  TableOffsetEntry[1];    /* Array of pointers to ACPI tables */
+
+} ACPI_TABLE_RSDT;
 
-#define MPS_INTI_FLAGS \
-    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 */
+typedef struct acpi_table_xsdt
+{
+    ACPI_TABLE_HEADER       Header;                 /* Common ACPI table header */
+    UINT64                  TableOffsetEntry[1];    /* Array of pointers to ACPI tables */
+
+} ACPI_TABLE_XSDT;
+
+
+/*******************************************************************************
+ *
+ * FACS - Firmware ACPI Control Structure (FACS)
+ *
+ ******************************************************************************/
 
-#define LOCAL_APIC_FLAGS \
-    UINT8                   ProcessorEnabled: 1;    /* 00:    Processor is usable if set */\
-    UINT8                                   : 7;    /* 01-07: Reserved, must be zero */\
-    UINT8                   Reserved2;              /* 08-15: Reserved, must be zero */
-
-/* Sub-structures for MADT */
+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 */
+    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 */
 
-typedef struct madt_processor_apic
-{
-    APIC_HEADER_DEF
-    UINT8                   ProcessorId;            /* ACPI processor id */
-    UINT8                   LocalApicId;            /* Processor's local APIC id */
-    LOCAL_APIC_FLAGS
+} ACPI_TABLE_FACS;
+
+/* Flag macros */
+
+#define ACPI_FACS_S4_BIOS_PRESENT (1)               /* 00: S4BIOS support is present */
+
+/* Global lock flags */
+
+#define ACPI_GLOCK_PENDING      0x01                /* 00: Pending global lock ownership */
+#define ACPI_GLOCK_OWNED        0x02                /* 01: Global lock is owned */
 
-} MADT_PROCESSOR_APIC;
-
-typedef struct madt_io_apic
-{
-    APIC_HEADER_DEF
-    UINT8                   IoApicId;               /* I/O APIC ID */
-    UINT8                   Reserved;               /* Reserved - must be zero */
-    UINT32                  Address;                /* APIC physical address */
-    UINT32                  Interrupt;              /* Global system interrupt where INTI
-                                                     * lines start */
-} MADT_IO_APIC;
-
-typedef struct madt_interrupt_override
-{
-    APIC_HEADER_DEF
-    UINT8                   Bus;                    /* 0 - ISA */
-    UINT8                   Source;                 /* Interrupt source (IRQ) */
-    UINT32                  Interrupt;              /* Global system interrupt */
-    MPS_INTI_FLAGS
 
-} MADT_INTERRUPT_OVERRIDE;
-
-typedef struct madt_nmi_source
-{
-    APIC_HEADER_DEF
-    MPS_INTI_FLAGS
-    UINT32                  Interrupt;              /* Global system interrupt */
-
-} MADT_NMI_SOURCE;
+/*******************************************************************************
+ *
+ * FADT - Fixed ACPI Description Table (Signature "FACP")
+ *
+ ******************************************************************************/
 
-typedef struct madt_local_apic_nmi
-{
-    APIC_HEADER_DEF
-    UINT8                   ProcessorId;            /* ACPI processor id */
-    MPS_INTI_FLAGS
-    UINT8                   Lint;                   /* LINTn to which NMI is connected */
+/* Fields common to all versions of the FADT */
 
-} MADT_LOCAL_APIC_NMI;
-
-typedef struct madt_address_override
+typedef struct acpi_table_fadt
 {
-    APIC_HEADER_DEF
-    UINT16                  Reserved;               /* Reserved, must be zero */
-    UINT64                  Address;                /* APIC physical address */
-
-} MADT_ADDRESS_OVERRIDE;
-
-typedef struct madt_io_sapic
-{
-    APIC_HEADER_DEF
-    UINT8                   IoSapicId;              /* I/O SAPIC ID */
-    UINT8                   Reserved;               /* Reserved, must be zero */
-    UINT32                  InterruptBase;          /* Glocal interrupt for SAPIC start */
-    UINT64                  Address;                /* SAPIC physical address */
-
-} MADT_IO_SAPIC;
+    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];       /* Reserved, must be zero */
+    UINT64                  XFacs;              /* 64-bit physical address of FACS */
+    UINT64                  XDsdt;              /* 64-bit physical address of DSDT */
+    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 */
 
-typedef struct madt_local_sapic
-{
-    APIC_HEADER_DEF
-    UINT8                   ProcessorId;            /* ACPI processor id */
-    UINT8                   LocalSapicId;           /* SAPIC ID */
-    UINT8                   LocalSapicEid;          /* SAPIC EID */
-    UINT8                   Reserved[3];            /* Reserved, must be zero */
-    LOCAL_APIC_FLAGS
-    UINT32                  ProcessorUID;           /* Numeric UID - ACPI 3.0 */
-    char                    ProcessorUIDString[1];  /* String UID  - ACPI 3.0 */
+} ACPI_TABLE_FADT;
 
-} MADT_LOCAL_SAPIC;
+
+/* FADT flags */
 
-typedef struct madt_interrupt_source
-{
-    APIC_HEADER_DEF
-    MPS_INTI_FLAGS
-    UINT8                   InterruptType;          /* 1=PMI, 2=INIT, 3=corrected */
-    UINT8                   ProcessorId;            /* Processor ID */
-    UINT8                   ProcessorEid;           /* Processor EID */
-    UINT8                   IoSapicVector;          /* Vector value for PMI interrupts */
-    UINT32                  Interrupt;              /* Global system interrupt */
-    UINT32                  Flags;                  /* Interrupt Source Flags */
-
-} MADT_INTERRUPT_SOURCE;
+#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) */
 
 
 /*
- * Smart Battery
+ * FADT Prefered Power Management Profiles
  */
-typedef struct smart_battery_table
+enum AcpiPreferedPmProfiles
 {
-    ACPI_TABLE_HEADER_DEF
-    UINT32                  WarningLevel;
-    UINT32                  LowLevel;
-    UINT32                  CriticalLevel;
+    PM_UNSPECIFIED          = 0,
+    PM_DESKTOP              = 1,
+    PM_MOBILE               = 2,
+    PM_WORKSTATION          = 3,
+    PM_ENTERPRISE_SERVER    = 4,
+    PM_SOHO_SERVER          = 5,
+    PM_APPLIANCE_PC         = 6
+};
+
 
-} SMART_BATTERY_TABLE;
+/* FADT Boot Arch Flags */
+
+#define BAF_LEGACY_DEVICES              0x0001
+#define BAF_8042_KEYBOARD_CONTROLLER    0x0002
 
+#define FADT2_REVISION_ID               3
+#define FADT2_MINUS_REVISION_ID         2
+
+
+/* Reset to default packing */
 
 #pragma pack()
 
-
 /*
- * 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
+ * Get the remaining ACPI tables
  */
-#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 */
+#include <dist/acpica/actbl1.h>
 
-typedef struct acpi_table_support
-{
-    const char              *Name;
-    const char              *Signature;
-    void                    **GlobalPtr;
-    UINT8                   SigLength;
-    UINT8                   Flags;
-
-} ACPI_TABLE_SUPPORT;
-
-
-/*
- * Get the ACPI version-specific tables
- */
-#include "actbl1.h"   /* Acpi 1.0 table definitions */
-#include "actbl2.h"   /* Acpi 2.0 table definitions */
+/* Macros used to generate offsets to specific table fields */
 
-
-#pragma pack(1)
-/*
- * High performance timer
- */
-typedef struct hpet_table
-{
-    ACPI_TABLE_HEADER_DEF
-    UINT32                  HardwareId;
-    ACPI_GENERIC_ADDRESS    BaseAddress;
-    UINT8                   HpetNumber;
-    UINT16                  ClockTick;
-    UINT8                   Attributes;
-
-} HPET_TABLE;
-
-#pragma pack()
+#define ACPI_FADT_OFFSET(f)             (UINT8) ACPI_OFFSET (ACPI_TABLE_FADT, f)
 
 #endif /* __ACTBL_H__ */
--- a/sys/dist/acpica/actbl1.h	Mon Jan 21 09:34:59 2008 +0000
+++ b/sys/dist/acpica/actbl1.h	Mon Jan 21 09:45:00 2008 +0000
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
- * Name: actbl1.h - ACPI 1.0 tables
- *       xRevision: 1.34 $
+ * Name: actbl1.h - Additional ACPI table definitions
+ *       $Revision: 1.1.14.3 $
  *
  *****************************************************************************/
 
@@ -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 - 2007, Intel Corp.
  * All rights reserved.
  *
  * 2. License
@@ -117,102 +117,801 @@
 #ifndef __ACTBL1_H__
 #define __ACTBL1_H__
 
-#pragma pack(1)
+
+/*******************************************************************************
+ *
+ * Additional ACPI Tables
+ *
+ * These tables are not consumed directly by the ACPICA subsystem, but are
+ * included here to support device drivers and the AML disassembler.
+ *
+ ******************************************************************************/
+
 
 /*
- * ACPI 1.0 Root System Description Table (RSDT)
+ * Values for description table header signatures. Useful because they make
+ * it more difficult to inadvertently type in the wrong signature.
  */
-typedef struct rsdt_descriptor_rev1
-{
-    ACPI_TABLE_HEADER_DEF                           /* ACPI common table header */
-    UINT32                  TableOffsetEntry[1];    /* Array of pointers to ACPI tables */
-
-} RSDT_DESCRIPTOR_REV1;
+#define ACPI_SIG_ASF            "ASF!"      /* Alert Standard Format 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_HPET           "HPET"      /* High Precision Event Timer 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_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_WDRT           "WDRT"      /* Watchdog Resource Table */
 
 
 /*
- * ACPI 1.0 Firmware ACPI Control Structure (FACS)
+ * All tables must be byte-packed to match the ACPI specification, since
+ * the tables are provided by the system BIOS.
+ */
+#pragma pack(1)
+
+/*
+ * Note about bitfields: The UINT8 type is used for bitfields in ACPI tables.
+ * This is the only type that is even remotely portable. Anything else is not
+ * portable, so do not use any other bitfield types.
  */
-typedef struct facs_descriptor_rev1
+
+
+/* Common Sub-table header (used in MADT, SRAT, etc.) */
+
+typedef struct acpi_subtable_header
+{
+    UINT8                   Type;
+    UINT8                   Length;
+
+} ACPI_SUBTABLE_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       Header;             /* Common ACPI table header */
+
+} ACPI_TABLE_ASF;
+
+
+/* ASF subtable header */
+
+typedef struct acpi_asf_header
+{
+    UINT8                   Type;
+    UINT8                   Reserved;
+    UINT16                  Length;
+
+} ACPI_ASF_HEADER;
+
+
+/* Values for Type field above */
+
+enum AcpiAsfType
 {
-    char                    Signature[4];           /* ASCII table signature */
-    UINT32                  Length;                 /* Length of structure in bytes */
-    UINT32                  HardwareSignature;      /* Hardware configuration signature */
-    UINT32                  FirmwareWakingVector;   /* ACPI OS waking vector */
-    UINT32                  GlobalLock;             /* Global Lock */
+    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
+ */
+
+/* 0: ASF Information */
+
+typedef struct acpi_asf_info
+{
+    ACPI_ASF_HEADER         Header;
+    UINT8                   MinResetValue;
+    UINT8                   MinPollInterval;
+    UINT16                  SystemId;
+    UINT32                  MfgId;
+    UINT8                   Flags;
+    UINT8                   Reserved2[3];
+
+} ACPI_ASF_INFO;
+
+/* 1: ASF Alerts */
+
+typedef struct acpi_asf_alert
+{
+    ACPI_ASF_HEADER         Header;
+    UINT8                   AssertMask;
+    UINT8                   DeassertMask;
+    UINT8                   Alerts;
+    UINT8                   DataLength;
+
+} 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         Header;
+    UINT8                   Controls;
+    UINT8                   DataLength;
+    UINT16                  Reserved2;
+
+} 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 */
 
-    /* Flags (32 bits) */
+typedef struct acpi_asf_rmcp
+{
+    ACPI_ASF_HEADER         Header;
+    UINT8                   Capabilities[7];
+    UINT8                   CompletionCode;
+    UINT32                  EnterpriseId;
+    UINT8                   Command;
+    UINT16                  Parameter;
+    UINT16                  BootOptions;
+    UINT16                  OemParameters;
+
+} ACPI_ASF_RMCP;
+
+/* 4: ASF Address */
+
+typedef struct acpi_asf_address
+{
+    ACPI_ASF_HEADER         Header;
+    UINT8                   EpromAddress;
+    UINT8                   Devices;
+
+} ACPI_ASF_ADDRESS;
+
+
+/*******************************************************************************
+ *
+ * BOOT - Simple Boot Flag Table
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_boot
+{
+    ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
+    UINT8                   CmosIndex;          /* Index in CMOS RAM for the boot register */
+    UINT8                   Reserved[3];
+
+} ACPI_TABLE_BOOT;
+
+
+/*******************************************************************************
+ *
+ * CPEP - Corrected Platform Error Polling table
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_cpep
+{
+    ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
+    UINT64                  Reserved;
+
+} ACPI_TABLE_CPEP;
+
+
+/* Subtable */
+
+typedef struct acpi_cpep_polling
+{
+    UINT8                   Type;
+    UINT8                   Length;
+    UINT8                   Id;                 /* Processor ID */
+    UINT8                   Eid;                /* Processor EID */
+    UINT32                  Interval;           /* Polling interval (msec) */
+
+} ACPI_CPEP_POLLING;
+
 
-    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 */
+/*******************************************************************************
+ *
+ * DBGP - Debug Port table
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_dbgp
+{
+    ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
+    UINT8                   Type;               /* 0=full 16550, 1=subset of 16550 */
+    UINT8                   Reserved[3];
+    ACPI_GENERIC_ADDRESS    DebugPort;
+
+} ACPI_TABLE_DBGP;
+
+
+/*******************************************************************************
+ *
+ * DMAR - DMA Remapping table
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_dmar
+{
+    ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
+    UINT8                   Width;              /* Host Address Width */
+    UINT8                   Reserved[11];
+
+} ACPI_TABLE_DMAR;
+
+/* DMAR subtable header */
 
-    UINT8                   Reserved2[40];          /* Reserved, must be zero */
+typedef struct acpi_dmar_header
+{
+    UINT16                  Type;
+    UINT16                  Length;
+    UINT8                   Flags;
+    UINT8                   Reserved[3];
+
+} 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_RESERVED             = 2     /* 2 and greater are reserved */
+};
 
-} FACS_DESCRIPTOR_REV1;
+typedef struct acpi_dmar_device_scope
+{
+    UINT8                   EntryType;
+    UINT8                   Length;
+    UINT8                   Segment;
+    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_RESERVED       = 3     /* 3 and greater are reserved */
+};
 
 
 /*
- * ACPI 1.0 Fixed ACPI Description Table (FADT)
+ * DMAR Sub-tables, correspond to Type in ACPI_DMAR_HEADER
  */
-typedef struct fadt_descriptor_rev1
+
+/* 0: Hardware Unit Definition */
+
+typedef struct acpi_dmar_hardware_unit
+{
+    ACPI_DMAR_HEADER        Header;
+    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;
+    UINT64                  Address;            /* 4K aligned base address */
+    UINT64                  EndAddress;         /* 4K aligned limit address */
+
+} ACPI_DMAR_RESERVED_MEMORY;
+
+/* Flags */
+
+#define ACPI_DMAR_ALLOW_ALL         (1)
+
+
+/*******************************************************************************
+ *
+ * ECDT - Embedded Controller Boot Resources Table
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_ecdt
+{
+    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                   Gpe;                /* The GPE for the EC */
+    UINT8                   Id[1];              /* Full namepath of the EC in the ACPI namespace */
+
+} ACPI_TABLE_ECDT;
+
+
+/*******************************************************************************
+ *
+ * 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 !*/
+
+
+/*******************************************************************************
+ *
+ * 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_RESERVED             = 9     /* 9 and greater are reserved */
+};
+
+
+/*
+ * MADT Sub-tables, correspond to Type in ACPI_SUBTABLE_HEADER
+ */
+
+/* 0: Processor Local APIC */
+
+typedef struct acpi_madt_local_apic
+{
+    ACPI_SUBTABLE_HEADER    Header;
+    UINT8                   ProcessorId;        /* ACPI processor id */
+    UINT8                   Id;                 /* Processor's local APIC id */
+    UINT32                  LapicFlags;
+
+} ACPI_MADT_LOCAL_APIC;
+
+/* 1: IO APIC */
+
+typedef struct acpi_madt_io_apic
+{
+    ACPI_SUBTABLE_HEADER    Header;
+    UINT8                   Id;                 /* I/O APIC ID */
+    UINT8                   Reserved;           /* Reserved - must be zero */
+    UINT32                  Address;            /* APIC physical address */
+    UINT32                  GlobalIrqBase;      /* Global system interrupt where INTI lines start */
+
+} ACPI_MADT_IO_APIC;
+
+/* 2: Interrupt Override */
+
+typedef struct acpi_madt_interrupt_override
+{
+    ACPI_SUBTABLE_HEADER    Header;
+    UINT8                   Bus;                /* 0 - ISA */
+    UINT8                   SourceIrq;          /* Interrupt source (IRQ) */
+    UINT32                  GlobalIrq;          /* Global system interrupt */
+    UINT16                  IntiFlags;
+
+} ACPI_MADT_INTERRUPT_OVERRIDE;
+
+/* 3: NMI Source */
+
+typedef struct acpi_madt_nmi_source
+{
+    ACPI_SUBTABLE_HEADER    Header;
+    UINT16                  IntiFlags;
+    UINT32                  GlobalIrq;          /* Global system interrupt */
+
+} ACPI_MADT_NMI_SOURCE;
+
+/* 4: Local APIC NMI */
+
+typedef struct acpi_madt_local_apic_nmi
+{
+    ACPI_SUBTABLE_HEADER    Header;
+    UINT8                   ProcessorId;        /* ACPI processor id */
+    UINT16                  IntiFlags;
+    UINT8                   Lint;               /* LINTn to which NMI is connected */
+
+} ACPI_MADT_LOCAL_APIC_NMI;
+
+/* 5: Address Override */
+
+typedef struct acpi_madt_local_apic_override
+{
+    ACPI_SUBTABLE_HEADER    Header;
+    UINT16                  Reserved;           /* Reserved, must be zero */
+    UINT64                  Address;            /* APIC physical address */
+
+} ACPI_MADT_LOCAL_APIC_OVERRIDE;
+
+/* 6: I/O Sapic */
+
+typedef struct acpi_madt_io_sapic
+{
+    ACPI_SUBTABLE_HEADER    Header;
+    UINT8                   Id;                 /* I/O SAPIC ID */
+    UINT8                   Reserved;           /* Reserved, must be zero */
+    UINT32                  GlobalIrqBase;      /* Global interrupt for SAPIC start */
+    UINT64                  Address;            /* SAPIC physical address */
+
+} ACPI_MADT_IO_SAPIC;
+
+/* 7: Local Sapic */
+
+typedef struct acpi_madt_local_sapic
+{
+    ACPI_SUBTABLE_HEADER    Header;
+    UINT8                   ProcessorId;        /* ACPI processor id */
+    UINT8                   Id;                 /* SAPIC ID */
+    UINT8                   Eid;                /* SAPIC EID */
+    UINT8                   Reserved[3];        /* Reserved, must be zero */
+    UINT32                  LapicFlags;
+    UINT32                  Uid;                /* Numeric UID - ACPI 3.0 */
+    char                    UidString[1];       /* String UID  - ACPI 3.0 */
+
+} ACPI_MADT_LOCAL_SAPIC;
+
+/* 8: Platform Interrupt Source */
+
+typedef struct acpi_madt_interrupt_source
 {
-    ACPI_TABLE_HEADER_DEF                           /* ACPI common table header */
-    UINT32                  FirmwareCtrl;           /* Physical address of FACS */
-    UINT32                  Dsdt;                   /* Physical address of DSDT */
-    UINT8                   Model;                  /* System Interrupt Model */
-    UINT8                   Reserved1;              /* Reserved, must be zero */
-    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                   Reserved2;              /* Reserved, must be zero */
-    UINT32                  Pm1aEvtBlk;             /* Port address of Power Mgt 1a AcpiEvent Reg Blk */
-    UINT32                  Pm1bEvtBlk;             /* Port address of Power Mgt 1b AcpiEvent Reg Blk */
-    UINT32                  Pm1aCntBlk;             /* Port address of Power Mgt 1a Control Reg Blk */
-    UINT32                  Pm1bCntBlk;             /* Port address of Power Mgt 1b Control Reg Blk */
-    UINT32                  Pm2CntBlk;              /* Port address of Power Mgt 2 Control Reg Blk */
-    UINT32                  PmTmrBlk;               /* Port address of Power Mgt Timer Ctrl Reg Blk */
-    UINT32                  Gpe0Blk;                /* Port addr of General Purpose AcpiEvent 0 Reg Blk */
-    UINT32                  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                   Reserved3;              /* Reserved, must be zero */
-    UINT16                  Plvl2Lat;               /* Worst case HW latency to enter/exit C2 state */
-    UINT16                  Plvl3Lat;               /* Worst case HW latency to enter/exit C3 state */
-    UINT16                  FlushSize;              /* Size of area read to flush caches */
-    UINT16                  FlushStride;            /* Stride used in flushing caches */
-    UINT8                   DutyOffset;             /* Bit location of duty cycle field in p_cnt reg */
-    UINT8                   DutyWidth;              /* Bit width of duty cycle field in p_cnt reg */
-    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 */
-    UINT8                   Reserved4[3];           /* Reserved, must be zero */
+    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                  GlobalIrq;          /* Global system interrupt */
+    UINT32                  Flags;              /* Interrupt Source Flags */
+
+} ACPI_MADT_INTERRUPT_SOURCE;
+
+/* Flags field above */
+
+#define ACPI_MADT_CPEI_OVERRIDE     (1)
+
+
+/*
+ * 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)
+
+
+/*******************************************************************************
+ *
+ * MCFG - PCI Memory Mapped Configuration table and sub-table
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_mcfg
+{
+    ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
+    UINT8                   Reserved[8];
+
+} ACPI_TABLE_MCFG;
+
+
+/* Subtable */
+
+typedef struct acpi_mcfg_allocation
+{
+    UINT64                  Address;            /* Base address, processor-relative */
+    UINT16                  PciSegment;         /* PCI segment group number */
+    UINT8                   StartBusNumber;     /* Starting PCI Bus number */
+    UINT8                   EndBusNumber;       /* Final PCI Bus number */
+    UINT32                  Reserved;
+
+} ACPI_MCFG_ALLOCATION;
+
+
+/*******************************************************************************
+ *
+ * SBST - Smart Battery Specification Table
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_sbst
+{
+    ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
+    UINT32                  WarningLevel;
+    UINT32                  LowLevel;
+    UINT32                  CriticalLevel;
+
+} ACPI_TABLE_SBST;
+
+
+/*******************************************************************************
+ *
+ * SLIT - System Locality Distance Information Table
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_slit
+{
+    ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
+    UINT64                  LocalityCount;
+    UINT8                   Entry[1];           /* Real size = localities^2 */
+
+} ACPI_TABLE_SLIT;
+
+
+/*******************************************************************************
+ *
+ * SPCR - Serial Port Console Redirection table
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_spcr
+{
+    ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
+    UINT8                   InterfaceType;      /* 0=full 16550, 1=subset of 16550 */
+    UINT8                   Reserved[3];
+    ACPI_GENERIC_ADDRESS    SerialPort;
+    UINT8                   InterruptType;
+    UINT8                   PcInterrupt;
+    UINT32                  Interrupt;
+    UINT8                   BaudRate;
+    UINT8                   Parity;
+    UINT8                   StopBits;
+    UINT8                   FlowControl;
+    UINT8                   TerminalType;
+    UINT8                   Reserved1;
+    UINT16                  PciDeviceId;
+    UINT16                  PciVendorId;
+    UINT8                   PciBus;
+    UINT8                   PciDevice;
+    UINT8                   PciFunction;
+    UINT32                  PciFlags;
+    UINT8                   PciSegment;
+    UINT32                  Reserved2;
+
+} ACPI_TABLE_SPCR;
+
+
+/*******************************************************************************
+ *
+ * SPMI - Server Platform Management Interface table
+ *
+ ******************************************************************************/
 
-    /* Flags (32 bits) */
+typedef struct acpi_table_spmi
+{
+    ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
+    UINT8                   Reserved;
+    UINT8                   InterfaceType;
+    UINT16                  SpecRevision;       /* Version of IPMI */
+    UINT8                   InterruptType;
+    UINT8                   GpeNumber;          /* GPE assigned */
+    UINT8                   Reserved1;
+    UINT8                   PciDeviceFlag;
+    UINT32                  Interrupt;
+    ACPI_GENERIC_ADDRESS    IpmiRegister;
+    UINT8                   PciSegment;
+    UINT8                   PciBus;
+    UINT8                   PciDevice;
+    UINT8                   PciFunction;
+
+} ACPI_TABLE_SPMI;
+
+
+/*******************************************************************************
+ *
+ * SRAT - System Resource Affinity Table
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_srat
+{
+    ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
+    UINT32                  TableRevision;      /* Must be value '1' */
+    UINT64                  Reserved;           /* Reserved, must be zero */
+
+} ACPI_TABLE_SRAT;
+
+/* Values for subtable type in ACPI_SUBTABLE_HEADER */
+
+enum AcpiSratType
+{
+    ACPI_SRAT_TYPE_CPU_AFFINITY     = 0,
+    ACPI_SRAT_TYPE_MEMORY_AFFINITY  = 1,
+    ACPI_SRAT_TYPE_RESERVED         = 2
+};
+
+/* SRAT sub-tables */
+
+typedef struct acpi_srat_cpu_affinity
+{
+    ACPI_SUBTABLE_HEADER    Header;
+    UINT8                   ProximityDomainLo;
+    UINT8                   ApicId;
+    UINT32                  Flags;
+    UINT8                   LocalSapicEid;
+    UINT8                   ProximityDomainHi[3];
+    UINT32                  Reserved;           /* Reserved, must be zero */
+
+} ACPI_SRAT_CPU_AFFINITY;
+
+/* Flags */
+
+#define ACPI_SRAT_CPU_ENABLED       (1)         /* 00: Use affinity structure */
+
 
-    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 width is 32 bits (0 = 24 bits) */
-    UINT8                                   : 7;    /* 09-15: Reserved, must be zero */
-    UINT8                   Reserved5[2];           /* 16-31: Reserved, must be zero */
+typedef struct acpi_srat_mem_affinity
+{
+    ACPI_SUBTABLE_HEADER    Header;
+    UINT32                  ProximityDomain;
+    UINT16                  Reserved;           /* Reserved, must be zero */
+    UINT64                  BaseAddress;
+    UINT64                  Length;
+    UINT32                  MemoryType;         /* See acpi_address_range_id */
+    UINT32                  Flags;
+    UINT64                  Reserved1;          /* Reserved, must be zero */
+
+} ACPI_SRAT_MEM_AFFINITY;
+
+/* Flags */
+
+#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 */
+
+/* Memory types */
+
+enum acpi_address_range_id
+{
+    ACPI_ADDRESS_RANGE_MEMORY   = 1,
+    ACPI_ADDRESS_RANGE_RESERVED = 2,
+    ACPI_ADDRESS_RANGE_ACPI     = 3,
+    ACPI_ADDRESS_RANGE_NVS      = 4,
+    ACPI_ADDRESS_RANGE_COUNT    = 5
+};
+
+
+/*******************************************************************************
+ *
+ * TCPA - Trusted Computing Platform Alliance table
+ *
+ ******************************************************************************/
 
-} FADT_DESCRIPTOR_REV1;
+typedef struct acpi_table_tcpa
+{
+    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 */
+
+} ACPI_TABLE_TCPA;
+
+
+/*******************************************************************************
+ *
+ * WDRT - Watchdog Resource Table
+ *
+ ******************************************************************************/
+
+typedef struct acpi_table_wdrt
+{
+    ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
+    UINT32                  HeaderLength;       /* Watchdog Header Length */
+    UINT8                   PciSegment;         /* PCI Segment number */
+    UINT8                   PciBus;             /* PCI Bus number */
+    UINT8                   PciDevice;          /* PCI Device number */
+    UINT8                   PciFunction;        /* PCI Function number */
+    UINT32                  TimerPeriod;        /* Period of one timer count (msec) */
+    UINT32                  MaxCount;           /* Maximum counter value supported */
+    UINT32                  MinCount;           /* Minimum counter value */
+    UINT8                   Flags;
+    UINT8                   Reserved[3];
+    UINT32                  Entries;            /* Number of watchdog entries that follow */
+
+} ACPI_TABLE_WDRT;
+
+/* Flags */
+
+#define ACPI_WDRT_TIMER_ENABLED     (1)         /* 00: Timer enabled */
+
+
+/* Reset to default packing */
 
 #pragma pack()
 
 #endif /* __ACTBL1_H__ */
-
-
--- a/sys/dist/acpica/actbl2.h	Mon Jan 21 09:34:59 2008 +0000
+++ b/sys/dist/acpica/actbl2.h	Mon Jan 21 09:45:00 2008 +0000
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: actbl2.h - ACPI Specification Revision 2.0 Tables
- *       xRevision: 1.47 $
+ *       $Revision: 1.1.14.3 $
  *
  *****************************************************************************/
 
@@ -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 - 2007, Intel Corp.
  * All rights reserved.
  *
  * 2. License
@@ -117,272 +117,7 @@
 #ifndef __ACTBL2_H__
 #define __ACTBL2_H__
 
-/*
- * 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
-
-/*
- * ACPI Boot Arch Flags
- */
-#define BAF_LEGACY_DEVICES              0x0001
-#define BAF_8042_KEYBOARD_CONTROLLER    0x0002
-
-#define FADT2_REVISION_ID               3
-#define FADT2_MINUS_REVISION_ID         2
-
-
-#pragma pack(1)
-
-/*
- * ACPI 2.0 Root System Description Table (RSDT)
- */
-typedef struct rsdt_descriptor_rev2
-{
-    ACPI_TABLE_HEADER_DEF                           /* ACPI common table header */
-    UINT32                  TableOffsetEntry[1];    /* Array of pointers to ACPI tables */
-
-} RSDT_DESCRIPTOR_REV2;
-
-
-/*
- * ACPI 2.0 Extended System Description Table (XSDT)
- */
-typedef struct xsdt_descriptor_rev2
-{
-    ACPI_TABLE_HEADER_DEF                           /* ACPI common table header */
-    UINT64                  TableOffsetEntry[1];    /* Array of pointers to ACPI tables */
-
-} XSDT_DESCRIPTOR_REV2;
-
-
-/*
- * ACPI 2.0 Firmware ACPI Control Structure (FACS)
- */
-typedef struct facs_descriptor_rev2
-{
-    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 used to synchronize access to 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 */
-
-    UINT64                  XFirmwareWakingVector;  /* 64-bit physical address of the Firmware Waking Vector. */
-    UINT8                   Version;                /* Version of this table */
-    UINT8                   Reserved3[31];          /* Reserved, must be zero */
-
-} FACS_DESCRIPTOR_REV2;
-
-
-/*
- * ACPI 2.0+ Generic Address Structure (GAS)
- */
-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                   AccessWidth;            /* Minimum Access size (ACPI 3.0) */
-    UINT64                  Address;                /* 64-bit address of struct or register */
-
-} ACPI_GENERIC_ADDRESS;
-
-
-#define FADT_REV2_COMMON \
-    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 AcpiEvent Reg Blk */ \
-    UINT32                  V1_Pm1bEvtBlk;      /* Port address of Power Mgt 1b AcpiEvent 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;          /* Number of flush strides that need to be read */ \
-    UINT16                  FlushStride;        /* Processor's memory cache line width, in bytes */ \
-    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*/
-
-/*
- * ACPI 2.0+ Fixed ACPI Description Table (FADT)
- */
-typedef struct fadt_descriptor_rev2
-{
-    ACPI_TABLE_HEADER_DEF                       /* ACPI common table header */
-    FADT_REV2_COMMON
-    UINT8                   Reserved2;          /* Reserved, must be zero */
-
-    /* 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 */
-    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 */
-    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_REV2;
-
-
-/* "Down-revved" ACPI 2.0 FADT descriptor */
-
-typedef struct fadt_descriptor_rev2_minus
-{
-    ACPI_TABLE_HEADER_DEF                       /* ACPI common table header */
-    FADT_REV2_COMMON
-    UINT8                   Reserved2;          /* Reserved, must be zero */
-    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 */
-
-} FADT_DESCRIPTOR_REV2_MINUS;
-
-
-/* ECDT - Embedded Controller Boot Resources Table */
-
-typedef struct ec_boot_resources
-{
-    ACPI_TABLE_HEADER_DEF
-    ACPI_GENERIC_ADDRESS    EcControl;          /* Address of EC command/status register */
-    ACPI_GENERIC_ADDRESS    EcData;             /* 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 */
-
-} EC_BOOT_RESOURCES;
-
-
-/* SRAT - System Resource Affinity Table */
-
-typedef struct static_resource_alloc
-{
-    UINT8                   Type;
-    UINT8                   Length;
-    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 */
-
-    UINT8                   LocalSapicEid;
-    UINT8                   ProximityDomainHi[3];
-    UINT32                  Reserved4;          /* Reserved, must be zero */
-
-} STATIC_RESOURCE_ALLOC;
-
-typedef struct memory_affinity
-{
-    UINT8                   Type;
-    UINT8                   Length;
-    UINT32                  ProximityDomain;
-    UINT16                  Reserved3;
-    UINT64                  BaseAddress;
-    UINT64                  AddressLength;
-    UINT32                  Reserved4;
-
-    /* Flags (32 bits) */
-
-    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 */
-
-    UINT64                  Reserved6;          /* Reserved, must be zero */
-
-} MEMORY_AFFINITY;
-
-typedef struct system_resource_affinity
-{
-    ACPI_TABLE_HEADER_DEF
-    UINT32                  Reserved1;          /* Must be value '1' */
-    UINT64                  Reserved2;          /* Reserved, must be zero */
-
-} SYSTEM_RESOURCE_AFFINITY;
-
-
-/* SLIT - System Locality Distance Information Table */
-
-typedef struct system_locality_info
-{
-    ACPI_TABLE_HEADER_DEF
-    UINT64                  LocalityCount;
-    UINT8                   Entry[1][1];
-
-} SYSTEM_LOCALITY_INFO;
-
-
-#pragma pack()
+/* Code moved to both actbl.h and actbl1.h */
 
 #endif /* __ACTBL2_H__ */
 
--- a/sys/dist/acpica/actypes.h	Mon Jan 21 09:34:59 2008 +0000
+++ b/sys/dist/acpica/actypes.h	Mon Jan 21 09:45:00 2008 +0000
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: actypes.h - Common data types for the entire ACPI subsystem
- *       xRevision: 1.301 $
+ *       $Revision: 1.1.14.4 $
  *
  *****************************************************************************/
 
@@ -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 - 2007, Intel Corp.
  * All rights reserved.
  *
  * 2. License
@@ -117,15 +117,17 @@
 #ifndef __ACTYPES_H__
 #define __ACTYPES_H__
 
+/* acpisrc:StructDefs -- for acpisrc conversion */
+
 /*
  * 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
 #endif
 
-
 /*! [Begin] no source code translation */
 
 /*
@@ -224,7 +226,6 @@
 typedef UINT64                          ACPI_NATIVE_UINT;
 typedef INT64                           ACPI_NATIVE_INT;
 
-typedef UINT64                          ACPI_TABLE_PTR;
 typedef UINT64                          ACPI_IO_ADDRESS;
 typedef UINT64                          ACPI_PHYSICAL_ADDRESS;
 
@@ -266,51 +267,15 @@
 typedef UINT32                          ACPI_NATIVE_UINT;
 typedef INT32                           ACPI_NATIVE_INT;
 
-typedef UINT64                          ACPI_TABLE_PTR;
 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
@@ -323,14 +288,39 @@
 
 /*******************************************************************************
  *
- * OS- or compiler-dependent types
+ * OS-dependent and compiler-dependent types
  *
- * If the defaults below are not appropriate for the host system, they can 
+ * If the defaults below are not appropriate for the host system, they can
  * be defined in the compiler-specific or OS-specific header, and this will
  * take precedence.
  *
  ******************************************************************************/
 
+
+/* Value returned by AcpiOsGetThreadId */
+
+#ifndef ACPI_THREAD_ID
+#define ACPI_THREAD_ID                  ACPI_NATIVE_UINT
+#endif
+
+/* Object returned from AcpiOsCreateLock */
+
+#ifndef ACPI_SPINLOCK
+#define ACPI_SPINLOCK                   void *
+#endif
+
+/* Flags for AcpiOsAcquireLock/AcpiOsReleaseLock */
+
+#ifndef ACPI_CPU_FLAGS
+#define ACPI_CPU_FLAGS                  ACPI_NATIVE_UINT
+#endif
+
+/* Object returned from AcpiOsCreateCache */
+
+#ifndef ACPI_CACHE_T
+#define ACPI_CACHE_T                    ACPI_MEMORY_LIST
+#endif
+
 /* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */
 
 #ifndef ACPI_UINTPTR_T
@@ -338,23 +328,6 @@
 #endif
 
 /*
- * If ACPI_CACHE_T was not defined in the OS-dependent header,
- * define it now. This is typically the case where the local cache
- * manager implementation is to be used (ACPI_USE_LOCAL_CACHE)
- */
-#ifndef ACPI_CACHE_T
-#define ACPI_CACHE_T                    ACPI_MEMORY_LIST
-#endif
-
-/*
- * Allow the CPU flags word to be defined per-OS to simplify the use of the
- * lock and unlock OSL interfaces.
- */
-#ifndef ACPI_CPU_FLAGS
-#define ACPI_CPU_FLAGS                  ACPI_NATIVE_UINT
-#endif
-
-/*
  * ACPI_PRINTF_LIKE is used to tag functions as "printf-like" because
  * some compilers can catch printf format string problems
  */
@@ -372,6 +345,14 @@
 #define ACPI_UNUSED_VAR
 #endif
 
+/*
+ * All ACPICA functions that are available to the rest of the kernel are
+ * tagged with this macro which can be defined as appropriate for the host.
+ */
+#ifndef ACPI_EXPORT_SYMBOL
+#define ACPI_EXPORT_SYMBOL(Symbol)
+#endif
+
 
 /*******************************************************************************
  *
@@ -379,41 +360,6 @@
  *
  ******************************************************************************/
 
-/*
- * 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
@@ -437,54 +383,43 @@
 typedef UINT32                          ACPI_STATUS;    /* All ACPI Exceptions */
 typedef UINT32                          ACPI_NAME;      /* 4-byte ACPI name */
 typedef char *                          ACPI_STRING;    /* Null terminated ASCII string */
-typedef const char *                    ACPI_CONST_STRING;    /* Null terminated ASCII string */
-typedef void *                         ACPI_HANDLE;    /* Actually a ptr to a NS Node */
+typedef const char *                    ACPI_CONST_STRING; /* Null terminated ASCII string */
+typedef void *                          ACPI_HANDLE;    /* Actually a ptr to a NS Node */
 
 typedef struct uint64_struct
 {
-    UINT32                      Lo;
-    UINT32                      Hi;
+    UINT32                          Lo;
+    UINT32                          Hi;
 
 } UINT64_STRUCT;
 
 typedef union uint64_overlay
 {
-    UINT64                      Full;
-    UINT64_STRUCT               Part;
+    UINT64                          Full;
+    UINT64_STRUCT                   Part;
 
 } UINT64_OVERLAY;
 
 typedef struct uint32_struct
 {
-    UINT32                      Lo;
-    UINT32                      Hi;
+    UINT32                          Lo;
+    UINT32                          Hi;
 
 } UINT32_STRUCT;
 
 
+/* Synchronization objects */
+
+#define ACPI_MUTEX                      void *
+#define ACPI_SEMAPHORE                  void *
+
+
 /*
- * 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
@@ -494,7 +429,6 @@
 #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
@@ -522,7 +456,8 @@
 /*
  * Initialization state
  */
-#define ACPI_INITIALIZED_OK             0x01
+#define ACPI_SUBSYSTEM_INITIALIZE       0x01
+#define ACPI_INITIALIZED_OK             0x02
 
 /*
  * Power state values
@@ -571,21 +506,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_RSDP                 (ACPI_TABLE_TYPE) 0
-#define ACPI_TABLE_DSDT                 (ACPI_TABLE_TYPE) 1
-#define ACPI_TABLE_FADT                 (ACPI_TABLE_TYPE) 2
-#define ACPI_TABLE_FACS                 (ACPI_TABLE_TYPE) 3
-#define ACPI_TABLE_PSDT                 (ACPI_TABLE_TYPE) 4
-#define ACPI_TABLE_SSDT                 (ACPI_TABLE_TYPE) 5
-#define ACPI_TABLE_XSDT                 (ACPI_TABLE_TYPE) 6
-#define ACPI_TABLE_MAX                  6
-#define NUM_ACPI_TABLE_TYPES            (ACPI_TABLE_MAX+1)
-
-/*
  * Types associated with ACPI names and objects.  The first group of
  * values (up to ACPI_TYPE_EXTERNAL_MAX) correspond to the definition
  * of the ACPI ObjectType() operator (See the ACPI Spec).  Therefore,
@@ -718,7 +638,7 @@
  *  | | |  +--- 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
@@ -744,10 +664,6 @@
 
 #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
  */
@@ -822,54 +738,54 @@
  */
 typedef union acpi_object
 {
-    ACPI_OBJECT_TYPE            Type;   /* See definition of AcpiNsType for values */
+    ACPI_OBJECT_TYPE                Type;   /* See definition of AcpiNsType for values */
     struct
     {
-        ACPI_OBJECT_TYPE            Type;
-        ACPI_INTEGER                Value;      /* The actual number */
+        ACPI_OBJECT_TYPE                Type;
+        ACPI_INTEGER                    Value;      /* The actual number */
     } Integer;
 
     struct
     {
-        ACPI_OBJECT_TYPE            Type;
-        UINT32                      Length;     /* # of bytes in string, excluding trailing null */
-        const char                  *Pointer;   /* points to the string value */
+        ACPI_OBJECT_TYPE                Type;
+        UINT32                          Length;     /* # of bytes in string, excluding trailing null */
+        char                            *Pointer;   /* points to the string value */
     } String;
 
     struct
     {
-        ACPI_OBJECT_TYPE            Type;
-        UINT32                      Length;     /* # of bytes in buffer */
-        UINT8                       *Pointer;   /* points to the buffer */
+        ACPI_OBJECT_TYPE                Type;
+        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 */
+        ACPI_OBJECT_TYPE                Type;
+        UINT32                          Fill1;
+        ACPI_HANDLE                     Handle;     /* object reference */
     } Reference;
 
     struct
     {
-        ACPI_OBJECT_TYPE            Type;
-        UINT32                      Count;      /* # of elements in package */
-        union acpi_object           *Elements;  /* Pointer to an array of ACPI_OBJECTs */
+        ACPI_OBJECT_TYPE                Type;
+        UINT32                          Count;      /* # of elements in package */
+        union acpi_object               *Elements;  /* Pointer to an array of ACPI_OBJECTs */
     } Package;
 
     struct
     {
-        ACPI_OBJECT_TYPE            Type;
-        UINT32                      ProcId;
-        ACPI_IO_ADDRESS             PblkAddress;
-        UINT32                      PblkLength;
+        ACPI_OBJECT_TYPE                Type;
+        UINT32                          ProcId;
+        ACPI_IO_ADDRESS                 PblkAddress;
+        UINT32                          PblkLength;
     } Processor;
 
     struct
     {
-        ACPI_OBJECT_TYPE            Type;
-        UINT32                      SystemLevel;
-        UINT32                      ResourceOrder;
+        ACPI_OBJECT_TYPE                Type;
+        UINT32                          SystemLevel;
+        UINT32                          ResourceOrder;
     } PowerResource;
 
 } ACPI_OBJECT;
@@ -880,8 +796,8 @@
  */
 typedef struct acpi_object_list
 {
-    UINT32                      Count;
-    ACPI_OBJECT                 *Pointer;
+    UINT32                          Count;
+    ACPI_OBJECT                     *Pointer;
 
 } ACPI_OBJECT_LIST;
 
@@ -895,8 +811,8 @@
 
 typedef struct acpi_buffer
 {
-    ACPI_SIZE                   Length;         /* Length in bytes of the buffer */
-    void                        *Pointer;       /* pointer to buffer */
+    ACPI_SIZE                       Length;         /* Length in bytes of the buffer */
+    void                            *Pointer;       /* pointer to buffer */
 
 } ACPI_BUFFER;
 
@@ -919,29 +835,17 @@
 
 
 /*
- * 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
 {
-    UINT32                      AcpiCaVersion;
-    UINT32                      Flags;
-    UINT32                      TimerResolution;
-    UINT32                      Reserved1;
-    UINT32                      Reserved2;
-    UINT32                      DebugLevel;
-    UINT32                      DebugLayer;
-    UINT32                      NumTableTypes;
-    ACPI_TABLE_INFO             TableInfo [NUM_ACPI_TABLE_TYPES];
+    UINT32                          AcpiCaVersion;
+    UINT32                          Flags;
+    UINT32                          TimerResolution;
+    UINT32                          Reserved1;
+    UINT32                          Reserved2;
+    UINT32                          DebugLevel;
+    UINT32                          DebugLayer;
 
 } ACPI_SYSTEM_INFO;
 
@@ -951,77 +855,77 @@
  */
 typedef UINT32
 (ACPI_SYSTEM_XFACE *ACPI_OSD_HANDLER) (
-    void                    *Context);
+    void                            *Context);
 
 typedef void
 (ACPI_SYSTEM_XFACE *ACPI_OSD_EXEC_CALLBACK) (
-    void                    *Context);
+    void                            *Context);
 
 /*
  * Various handlers and callback procedures
  */
 typedef
 UINT32 (*ACPI_EVENT_HANDLER) (
-    void                        *Context);
+    void                            *Context);
 
 typedef
 void (*ACPI_NOTIFY_HANDLER) (
-    ACPI_HANDLE                 Device,
-    UINT32                      Value,
-    void                        *Context);
+    ACPI_HANDLE                     Device,
+    UINT32                          Value,
+    void                            *Context);
 
 typedef
 void (*ACPI_OBJECT_HANDLER) (
-    ACPI_HANDLE                 Object,
-    UINT32                      Function,
-    void                        *Data);
+    ACPI_HANDLE                     Object,
+    UINT32                          Function,
+    void                            *Data);
 
 typedef
 ACPI_STATUS (*ACPI_INIT_HANDLER) (
-    ACPI_HANDLE                 Object,
-    UINT32                      Function);
+    ACPI_HANDLE                     Object,
+    UINT32                          Function);
 
 #define ACPI_INIT_DEVICE_INI        1
 
 typedef
 ACPI_STATUS (*ACPI_EXCEPTION_HANDLER) (
-    ACPI_STATUS             AmlStatus,
-    ACPI_NAME               Name,
-    UINT16                  Opcode,
-    UINT32                  AmlOffset,
-    void                    *Context);
+    ACPI_STATUS                     AmlStatus,
+    ACPI_NAME                       Name,
+    UINT16                          Opcode,
+    UINT32                          AmlOffset,
+    void                            *Context);
 
 
 /* Address Spaces (For Operation Regions) */
 
 typedef
 ACPI_STATUS (*ACPI_ADR_SPACE_HANDLER) (
-    UINT32                      Function,
-    ACPI_PHYSICAL_ADDRESS       Address,
-    UINT32                      BitWidth,
-    ACPI_INTEGER                *Value,
-    void                        *HandlerContext,
-    void                        *RegionContext);
+    UINT32                          Function,
+    ACPI_PHYSICAL_ADDRESS           Address,
+    UINT32                          BitWidth,
+    ACPI_INTEGER                    *Value,
+    void                            *HandlerContext,
+    void                            *RegionContext);
 
-#define ACPI_DEFAULT_HANDLER        NULL
+#define ACPI_DEFAULT_HANDLER            NULL
 
 
 typedef
 ACPI_STATUS (*ACPI_ADR_SPACE_SETUP) (
-    ACPI_HANDLE                 RegionHandle,
-    UINT32                      Function,
-    void                        *HandlerContext,
-    void                        **RegionContext);
+    ACPI_HANDLE                     RegionHandle,
+    UINT32                          Function,
+    void                            *HandlerContext,
+    void                            **RegionContext);
 
 #define ACPI_REGION_ACTIVATE    0
 #define ACPI_REGION_DEACTIVATE  1
 
 typedef
 ACPI_STATUS (*ACPI_WALK_CALLBACK) (
-    ACPI_HANDLE                 ObjHandle,
-    UINT32                      NestingLevel,
-    void                        *Context,
-    void                        **ReturnValue);
+    ACPI_HANDLE                     ObjHandle,
+    UINT32                          NestingLevel,
+    void                            *Context,
+    void                            **ReturnValue);
 
 
 /* Interrupt handler return values */
@@ -1034,7 +938,7 @@
 
 typedef struct acpi_device_id
 {
-    char                    Value[ACPI_DEVICE_ID_LENGTH];
+    char                            Value[ACPI_DEVICE_ID_LENGTH];
 
 } ACPI_DEVICE_ID;
 
@@ -1042,15 +946,15 @@
 
 typedef struct acpi_compatible_id
 {
-    char                    Value[ACPI_MAX_CID_LENGTH];
+    char                            Value[ACPI_MAX_CID_LENGTH];
 
 } ACPI_COMPATIBLE_ID;
 
 typedef struct acpi_compatible_id_list
 {
-    UINT32                  Count;
-    UINT32                  Size;
-    ACPI_COMPATIBLE_ID      Id[1];
+    UINT32                          Count;
+    UINT32                          Size;
+    ACPI_COMPATIBLE_ID              Id[1];
 
 } ACPI_COMPATIBLE_ID_LIST;
 
@@ -1069,13 +973,14 @@
 #define ACPI_STA_DEVICE_PRESENT         0x01
 #define ACPI_STA_DEVICE_ENABLED         0x02
 #define ACPI_STA_DEVICE_UI              0x04
-#define ACPI_STA_DEVICE_OK              0x08
+#define ACPI_STA_DEVICE_FUNCTIONING     0x08
+#define ACPI_STA_DEVICE_OK              0x08 /* Synonym */
 #define ACPI_STA_BATTERY_PRESENT        0x10
 
 
 #define ACPI_COMMON_OBJ_INFO \
-    ACPI_OBJECT_TYPE            Type;           /* ACPI object type */ \
-    ACPI_NAME                   Name            /* ACPI object Name */
+    ACPI_OBJECT_TYPE                Type;           /* ACPI object type */ \
+    ACPI_NAME                       Name            /* ACPI object Name */
 
 
 typedef struct acpi_obj_info_header
@@ -1091,13 +996,13 @@
 {
     ACPI_COMMON_OBJ_INFO;
 
-    UINT32                      Valid;              /* Indicates which fields below are valid */
-    UINT32                      CurrentStatus;      /* _STA value */
-    ACPI_INTEGER                Address;            /* _ADR value if any */
-    ACPI_DEVICE_ID              HardwareId;         /* _HID value if any */
-    ACPI_DEVICE_ID              UniqueId;           /* _UID value if any */
-    UINT8                       HighestDstates[4];  /* _SxD values: 0xFF indicates not valid */
-    ACPI_COMPATIBLE_ID_LIST     CompatibilityId;    /* List of _CIDs if any */
+    UINT32                          Valid;              /* Indicates which fields below are valid */
+    UINT32                          CurrentStatus;      /* _STA value */
+    ACPI_INTEGER                    Address;            /* _ADR value if any */
+    ACPI_DEVICE_ID                  HardwareId;         /* _HID value if any */
+    ACPI_DEVICE_ID                  UniqueId;           /* _UID value if any */
+    UINT8                           HighestDstates[4];  /* _SxD values: 0xFF indicates not valid */
+    ACPI_COMPATIBLE_ID_LIST         CompatibilityId;    /* List of _CIDs if any */
 
 } ACPI_DEVICE_INFO;
 
@@ -1106,21 +1011,21 @@
 
 typedef struct acpi_pci_id
 {
-    UINT16                      Segment;
-    UINT16                      Bus;
-    UINT16                      Device;
-    UINT16                      Function;
+    UINT16                          Segment;
+    UINT16                          Bus;
+    UINT16                          Device;
+    UINT16                          Function;
 
 } ACPI_PCI_ID;
 
 
 typedef struct acpi_mem_space_context
 {
-    UINT32                      Length;
-    ACPI_PHYSICAL_ADDRESS       Address;
-    ACPI_PHYSICAL_ADDRESS       MappedPhysicalAddress;
-    UINT8                       *MappedLogicalAddress;
-    ACPI_SIZE                   MappedLength;
+    UINT32                          Length;
+    ACPI_PHYSICAL_ADDRESS           Address;
+    ACPI_PHYSICAL_ADDRESS           MappedPhysicalAddress;
+    UINT8                           *MappedLogicalAddress;
+    ACPI_SIZE                       MappedLength;
 
 } ACPI_MEM_SPACE_CONTEXT;
 
@@ -1223,13 +1128,13 @@
 
 typedef struct acpi_uuid
 {
-    UINT8                   Data[ACPI_UUID_LENGTH];
+    UINT8                           Data[ACPI_UUID_LENGTH];
 } ACPI_UUID;
 
 typedef struct acpi_vendor_uuid
 {
-    UINT8                   Subtype;
-    UINT8                   Data[ACPI_UUID_LENGTH];
+    UINT8                           Subtype;
+    UINT8                           Data[ACPI_UUID_LENGTH];
 
 } ACPI_VENDOR_UUID;
 
@@ -1238,30 +1143,30 @@
  */
 typedef struct acpi_resource_irq
 {
-    UINT8                       Triggering;
-    UINT8                       Polarity;
-    UINT8                       Sharable;
-    UINT8                       InterruptCount;
-    UINT8                       Interrupts[1];
+    UINT8                           Triggering;
+    UINT8                           Polarity;
+    UINT8                           Sharable;
+    UINT8                           InterruptCount;
+    UINT8                           Interrupts[1];
 
 } ACPI_RESOURCE_IRQ;
 
 
 typedef struct ACPI_RESOURCE_DMA
 {
-    UINT8                       Type;
-    UINT8                       BusMaster;
-    UINT8                       Transfer;
-    UINT8                       ChannelCount;
-    UINT8                       Channels[1];
+    UINT8                           Type;
+    UINT8                           BusMaster;
+    UINT8                           Transfer;
+    UINT8                           ChannelCount;
+    UINT8                           Channels[1];
 
 } ACPI_RESOURCE_DMA;
 
 
 typedef struct acpi_resource_start_dependent
 {
-    UINT8                       CompatibilityPriority;
-    UINT8                       PerformanceRobustness;
+    UINT8                           CompatibilityPriority;
+    UINT8                           PerformanceRobustness;
 
 } ACPI_RESOURCE_START_DEPENDENT;
 
@@ -1274,25 +1179,25 @@
 
 typedef struct acpi_resource_io
 {
-    UINT8                       IoDecode;
-    UINT8                       Alignment;
-    UINT8                       AddressLength;
-    UINT16                      Minimum;
-    UINT16                      Maximum;
+    UINT8                           IoDecode;
+    UINT8                           Alignment;
+    UINT8                           AddressLength;
+    UINT16                          Minimum;
+    UINT16                          Maximum;
 
 } ACPI_RESOURCE_IO;
 
 typedef struct acpi_resource_fixed_io
 {
-    UINT16                      Address;
-    UINT8                       AddressLength;
+    UINT16                          Address;
+    UINT8                           AddressLength;
 
 } ACPI_RESOURCE_FIXED_IO;
 
 typedef struct acpi_resource_vendor
 {
-    UINT16                      ByteLength;
-    UINT8                       ByteData[1];
+    UINT16                          ByteLength;
+    UINT8                           ByteData[1];
 
 } ACPI_RESOURCE_VENDOR;
 
@@ -1300,93 +1205,93 @@
 
 typedef struct acpi_resource_vendor_typed
 {
-    UINT16                      ByteLength;
-    UINT8                       UuidSubtype;
-    UINT8                       Uuid[ACPI_UUID_LENGTH];
-    UINT8                       ByteData[1];
+    UINT16                          ByteLength;
+    UINT8                           UuidSubtype;
+    UINT8                           Uuid[ACPI_UUID_LENGTH];
+    UINT8                           ByteData[1];
 
 } ACPI_RESOURCE_VENDOR_TYPED;
 
 typedef struct acpi_resource_end_tag
 {
-    UINT8                       Checksum;
+    UINT8                           Checksum;
 
 } ACPI_RESOURCE_END_TAG;
 
 typedef struct acpi_resource_memory24
 {
-    UINT8                       WriteProtect;
-    UINT16                      Minimum;
-    UINT16                      Maximum;
-    UINT16                      Alignment;
-    UINT16                      AddressLength;
+    UINT8                           WriteProtect;
+    UINT16                          Minimum;
+    UINT16                          Maximum;
+    UINT16                          Alignment;
+    UINT16                          AddressLength;
 
 } ACPI_RESOURCE_MEMORY24;
 
 typedef struct acpi_resource_memory32
 {
-    UINT8                       WriteProtect;
-    UINT32                      Minimum;
-    UINT32                      Maximum;
-    UINT32                      Alignment;
-    UINT32                      AddressLength;
+    UINT8                           WriteProtect;
+    UINT32                          Minimum;
+    UINT32                          Maximum;
+    UINT32                          Alignment;
+    UINT32                          AddressLength;
 
 } ACPI_RESOURCE_MEMORY32;
 
 typedef struct acpi_resource_fixed_memory32
 {
-    UINT8                       WriteProtect;
-    UINT32                      Address;
-    UINT32                      AddressLength;
+    UINT8                           WriteProtect;
+    UINT32                          Address;
+    UINT32                          AddressLength;
 
 } ACPI_RESOURCE_FIXED_MEMORY32;
 
 typedef struct acpi_memory_attribute
 {
-    UINT8                       WriteProtect;
-    UINT8                       Caching;
-    UINT8                       RangeType;
-    UINT8                       Translation;
+    UINT8                           WriteProtect;
+    UINT8                           Caching;
+    UINT8                           RangeType;
+    UINT8                           Translation;
 
 } ACPI_MEMORY_ATTRIBUTE;
 
 typedef struct acpi_io_attribute
 {
-    UINT8                       RangeType;
-    UINT8                       Translation;
-    UINT8                       TranslationType;
-    UINT8                       Reserved1;
+    UINT8                           RangeType;
+    UINT8                           Translation;
+    UINT8                           TranslationType;
+    UINT8                           Reserved1;
 
 } ACPI_IO_ATTRIBUTE;
 
 typedef union acpi_resource_attribute
 {
-    ACPI_MEMORY_ATTRIBUTE       Mem;
-    ACPI_IO_ATTRIBUTE           Io;
+    ACPI_MEMORY_ATTRIBUTE           Mem;
+    ACPI_IO_ATTRIBUTE               Io;
 
     /* Used for the *WordSpace macros */
 
-    UINT8                       TypeSpecific;
+    UINT8                           TypeSpecific;
 
 } ACPI_RESOURCE_ATTRIBUTE;
 
 typedef struct acpi_resource_source
 {
-    UINT8                       Index;
-    UINT16                      StringLength;
-    char                        *StringPtr;
+    UINT8                           Index;
+    UINT16                          StringLength;
+    char                            *StringPtr;
 
 } ACPI_RESOURCE_SOURCE;
 
 /* Fields common to all address descriptors, 16/32/64 bit */
 
 #define ACPI_RESOURCE_ADDRESS_COMMON \
-    UINT8                       ResourceType; \
-    UINT8                       ProducerConsumer; \
-    UINT8                       Decode; \
-    UINT8                       MinAddressFixed; \
-    UINT8                       MaxAddressFixed; \
-    ACPI_RESOURCE_ATTRIBUTE     Info;
+    UINT8                           ResourceType; \
+    UINT8                           ProducerConsumer; \
+    UINT8                           Decode; \
+    UINT8                           MinAddressFixed; \
+    UINT8                           MaxAddressFixed; \
+    ACPI_RESOURCE_ATTRIBUTE         Info;
 
 typedef struct acpi_resource_address
 {
@@ -1397,71 +1302,71 @@
 typedef struct acpi_resource_address16
 {
     ACPI_RESOURCE_ADDRESS_COMMON
-    UINT16                      Granularity;
-    UINT16                      Minimum;
-    UINT16                      Maximum;
-    UINT16                      TranslationOffset;
-    UINT16                      AddressLength;
-    ACPI_RESOURCE_SOURCE        ResourceSource;
+    UINT16                          Granularity;
+    UINT16                          Minimum;
+    UINT16                          Maximum;
+    UINT16                          TranslationOffset;
+    UINT16                          AddressLength;
+    ACPI_RESOURCE_SOURCE            ResourceSource;
 
 } ACPI_RESOURCE_ADDRESS16;
 
 typedef struct acpi_resource_address32
 {
     ACPI_RESOURCE_ADDRESS_COMMON
-    UINT32                      Granularity;
-    UINT32                      Minimum;
-    UINT32                      Maximum;
-    UINT32                      TranslationOffset;
-    UINT32                      AddressLength;
-    ACPI_RESOURCE_SOURCE        ResourceSource;
+    UINT32                          Granularity;
+    UINT32                          Minimum;
+    UINT32                          Maximum;
+    UINT32                          TranslationOffset;
+    UINT32                          AddressLength;
+    ACPI_RESOURCE_SOURCE            ResourceSource;
 
 } ACPI_RESOURCE_ADDRESS32;
 
 typedef struct acpi_resource_address64
 {
     ACPI_RESOURCE_ADDRESS_COMMON
-    UINT64                      Granularity;
-    UINT64                      Minimum;
-    UINT64                      Maximum;
-    UINT64                      TranslationOffset;
-    UINT64                      AddressLength;
-    ACPI_RESOURCE_SOURCE        ResourceSource;
+    UINT64                          Granularity;
+    UINT64                          Minimum;
+    UINT64                          Maximum;
+    UINT64                          TranslationOffset;
+    UINT64                          AddressLength;
+    ACPI_RESOURCE_SOURCE            ResourceSource;
 
 } ACPI_RESOURCE_ADDRESS64;
 
 typedef struct acpi_resource_extended_address64
 {
     ACPI_RESOURCE_ADDRESS_COMMON
-    UINT8                       RevisionID;
-    UINT64                      Granularity;
-    UINT64                      Minimum;
-    UINT64                      Maximum;
-    UINT64                      TranslationOffset;
-    UINT64                      AddressLength;
-    UINT64                      TypeSpecific;
+    UINT8                           RevisionID;
+    UINT64                          Granularity;
+    UINT64                          Minimum;
+    UINT64                          Maximum;
+    UINT64                          TranslationOffset;
+    UINT64                          AddressLength;
+    UINT64                          TypeSpecific;
 
 } ACPI_RESOURCE_EXTENDED_ADDRESS64;
 
 typedef struct acpi_resource_extended_irq
 {
-    UINT8                       ProducerConsumer;
-    UINT8                       Triggering;
-    UINT8                       Polarity;
-    UINT8                       Sharable;
-    UINT8                       InterruptCount;
-    ACPI_RESOURCE_SOURCE        ResourceSource;
-    UINT32                      Interrupts[1];
+    UINT8                           ProducerConsumer;
+    UINT8                           Triggering;
+    UINT8                           Polarity;
+    UINT8                           Sharable;
+    UINT8                           InterruptCount;
+    ACPI_RESOURCE_SOURCE            ResourceSource;
+    UINT32                          Interrupts[1];
 
 } ACPI_RESOURCE_EXTENDED_IRQ;
 
 typedef struct acpi_resource_generic_register
 {
-    UINT8                       SpaceId;
-    UINT8                       BitWidth;
-    UINT8                       BitOffset;
-    UINT8                       AccessSize;
-    UINT64                      Address;
+    UINT8                           SpaceId;
+    UINT8                           BitWidth;
+    UINT8                           BitOffset;
+    UINT8                           AccessSize;
+    UINT64                          Address;
 
 } ACPI_RESOURCE_GENERIC_REGISTER;
 
@@ -1490,36 +1395,36 @@
 
 typedef union acpi_resource_data
 {
-    ACPI_RESOURCE_IRQ                   Irq;
-    ACPI_RESOURCE_DMA                   Dma;
-    ACPI_RESOURCE_START_DEPENDENT       StartDpf;
-    ACPI_RESOURCE_IO                    Io;
-    ACPI_RESOURCE_FIXED_IO              FixedIo;
-    ACPI_RESOURCE_VENDOR                Vendor;
-    ACPI_RESOURCE_VENDOR_TYPED          VendorTyped;
-    ACPI_RESOURCE_END_TAG               EndTag;
-    ACPI_RESOURCE_MEMORY24              Memory24;
-    ACPI_RESOURCE_MEMORY32              Memory32;
-    ACPI_RESOURCE_FIXED_MEMORY32        FixedMemory32;
-    ACPI_RESOURCE_ADDRESS16             Address16;
-    ACPI_RESOURCE_ADDRESS32             Address32;
-    ACPI_RESOURCE_ADDRESS64             Address64;
-    ACPI_RESOURCE_EXTENDED_ADDRESS64    ExtAddress64;
-    ACPI_RESOURCE_EXTENDED_IRQ          ExtendedIrq;
-    ACPI_RESOURCE_GENERIC_REGISTER      GenericReg;
+    ACPI_RESOURCE_IRQ                       Irq;
+    ACPI_RESOURCE_DMA                       Dma;
+    ACPI_RESOURCE_START_DEPENDENT           StartDpf;
+    ACPI_RESOURCE_IO                        Io;
+    ACPI_RESOURCE_FIXED_IO                  FixedIo;
+    ACPI_RESOURCE_VENDOR                    Vendor;
+    ACPI_RESOURCE_VENDOR_TYPED              VendorTyped;
+    ACPI_RESOURCE_END_TAG                   EndTag;
+    ACPI_RESOURCE_MEMORY24                  Memory24;
+    ACPI_RESOURCE_MEMORY32                  Memory32;
+    ACPI_RESOURCE_FIXED_MEMORY32            FixedMemory32;
+    ACPI_RESOURCE_ADDRESS16                 Address16;
+    ACPI_RESOURCE_ADDRESS32                 Address32;
+    ACPI_RESOURCE_ADDRESS64                 Address64;
+    ACPI_RESOURCE_EXTENDED_ADDRESS64        ExtAddress64;
+    ACPI_RESOURCE_EXTENDED_IRQ              ExtendedIrq;
+    ACPI_RESOURCE_GENERIC_REGISTER          GenericReg;
 
     /* Common fields */
 
-    ACPI_RESOURCE_ADDRESS               Address;        /* Common 16/32/64 address fields */
+    ACPI_RESOURCE_ADDRESS                   Address;        /* Common 16/32/64 address fields */
 
 } ACPI_RESOURCE_DATA;
 
 
 typedef struct acpi_resource
 {
-    UINT32                      Type;
-    UINT32                      Length;
-    ACPI_RESOURCE_DATA          Data;
+    UINT32                          Type;
+    UINT32                          Length;
+    ACPI_RESOURCE_DATA              Data;
 
 } ACPI_RESOURCE;
 
@@ -1534,24 +1439,16 @@
 
 #define ACPI_NEXT_RESOURCE(Res)             (ACPI_RESOURCE *)((UINT8 *) Res + Res->Length)
 
-/*
- * END: of definitions for Resource Attributes
- */
-
 
 typedef struct acpi_pci_routing_table
 {
-    UINT32                      Length;
-    UINT32                      Pin;
-    ACPI_INTEGER                Address;        /* here for 64-bit alignment */
-    UINT32                      SourceIndex;
-    char                        Source[4];      /* pad to 64 bits so sizeof() works in all cases */
+    UINT32                          Length;
+    UINT32                          Pin;
+    ACPI_INTEGER                    Address;        /* here for 64-bit alignment */
+    UINT32                          SourceIndex;
+    char                            Source[4];      /* pad to 64 bits so sizeof() works in all cases */
 
 } ACPI_PCI_ROUTING_TABLE;
 
-/*
- * END: of definitions for PCI Routing tables
- */
-
 
 #endif /* __ACTYPES_H__ */
--- a/sys/dist/acpica/acutils.h	Mon Jan 21 09:34:59 2008 +0000
+++ b/sys/dist/acpica/acutils.h	Mon Jan 21 09:45:00 2008 +0000
@@ -1,7 +1,7 @@
 /******************************************************************************
  *
  * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
- *       xRevision: 1.189 $
+ *       $Revision: 1.1.14.3 $
  *
  *****************************************************************************/
 
@@ -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 - 2007, Intel Corp.
  * All rights reserved.
  *
  * 2. License
@@ -124,24 +124,24 @@
 
 #if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER)
 
-extern const char                       *AcpiGbl_BMDecode[2];
-extern const char                       *AcpiGbl_ConfigDecode[4];
-extern const char                       *AcpiGbl_ConsumeDecode[2];
-extern const char                       *AcpiGbl_DECDecode[2];
-extern const char                       *AcpiGbl_HEDecode[2];
-extern const char                       *AcpiGbl_IoDecode[2];
-extern const char                       *AcpiGbl_LLDecode[2];
-extern const char                       *AcpiGbl_MaxDecode[2];
-extern const char                       *AcpiGbl_MEMDecode[4];
-extern const char                       *AcpiGbl_MinDecode[2];
-extern const char                       *AcpiGbl_MTPDecode[4];
-extern const char                       *AcpiGbl_RNGDecode[4];
-extern const char                       *AcpiGbl_RWDecode[2];
-extern const char                       *AcpiGbl_SHRDecode[2];
-extern const char                       *AcpiGbl_SIZDecode[4];
-extern const char                       *AcpiGbl_TRSDecode[2];
-extern const char                       *AcpiGbl_TTPDecode[2];
-extern const char                       *AcpiGbl_TYPDecode[4];
+extern const char                       *AcpiGbl_BmDecode[];
+extern const char                       *AcpiGbl_ConfigDecode[];
+extern const char                       *AcpiGbl_ConsumeDecode[];
+extern const char                       *AcpiGbl_DecDecode[];
+extern const char                       *AcpiGbl_HeDecode[];
+extern const char                       *AcpiGbl_IoDecode[];
+extern const char                       *AcpiGbl_LlDecode[];
+extern const char                       *AcpiGbl_MaxDecode[];
+extern const char                       *AcpiGbl_MemDecode[];
+extern const char                       *AcpiGbl_MinDecode[];
+extern const char                       *AcpiGbl_MtpDecode[];
+extern const char                       *AcpiGbl_RngDecode[];
+extern const char                       *AcpiGbl_RwDecode[];
+extern const char                       *AcpiGbl_ShrDecode[];
+extern const char                       *AcpiGbl_SizDecode[];
+extern const char                       *AcpiGbl_TrsDecode[];
+extern const char                       *AcpiGbl_TtpDecode[];
+extern const char                       *AcpiGbl_TypDecode[];
 #endif
 
 /* Types for Resource descriptor entries */
@@ -152,6 +152,14 @@
 #define ACPI_SMALL_VARIABLE_LENGTH      3
 
 typedef
+ACPI_STATUS (*ACPI_WALK_AML_CALLBACK) (
+    UINT8                   *Aml,
+    UINT32                  Length,
+    UINT32                  Offset,
+    UINT8                   ResourceIndex,
+    void                    *Context);
+
+typedef
 ACPI_STATUS (*ACPI_PKG_CALLBACK) (
     UINT8                   ObjectType,
     ACPI_OPERAND_OBJECT     *SourceObject,
@@ -239,10 +247,6 @@
 AcpiUtSubsystemShutdown (
     void);
 
-ACPI_STATUS
-AcpiUtValidateFadt (
-    void);
-
 
 /*
  * utclib - Local implementations of C library functions
@@ -475,6 +479,12 @@
     UINT32                  componentId);
 
 void
+AcpiUtDumpBuffer2 (
+    UINT8                   *Buffer,
+    UINT32                  Count,
+    UINT32                  Display);
+
+void
 AcpiUtReportError (
     const char              *ModuleName,
     UINT32                  LineNumber);
@@ -726,6 +736,14 @@
 /*
  * utmisc
  */
+const char *
+AcpiUtValidateException (
+    ACPI_STATUS             Status);
+
+BOOLEAN
+AcpiUtIsAmlTable (
+    ACPI_TABLE_HEADER       *Table);
+
 ACPI_STATUS
 AcpiUtAllocateOwnerId (
     ACPI_OWNER_ID           *OwnerId);
@@ -754,9 +772,14 @@
 AcpiUtValidAcpiName (
     UINT32                  Name);
 
+ACPI_NAME
+AcpiUtRepairName (
+    char                    *Name);
+
 BOOLEAN
-AcpiUtValidAcpiCharacter (
-    char                    Character);
+AcpiUtValidAcpiChar (
+    char                    Character,
+    ACPI_NATIVE_UINT        Position);
 
 ACPI_STATUS
 AcpiUtStrtoul64 (
@@ -768,6 +791,33 @@
 
 #define ACPI_ANY_BASE        0
 
+UINT32
+AcpiUtDwordByteSwap (
+    UINT32                  Value);
+
+void
+AcpiUtSetIntegerWidth (
+    UINT8                   Revision);
+
+#ifdef ACPI_DEBUG_OUTPUT
+void
+AcpiUtDisplayInitPathname (
+    UINT8                   Type,
+    ACPI_NAMESPACE_NODE     *ObjHandle,
+    const char              *Path);
+#endif
+
+
+/*
+ * utresrc
+ */
+ACPI_STATUS
+AcpiUtWalkAmlResources (
+    UINT8                   *Aml,
+    ACPI_SIZE               AmlLength,
+    ACPI_WALK_AML_CALLBACK  UserFunction,
+    void                    *Context);
+
 ACPI_STATUS
 AcpiUtValidateResource (
     void                    *Aml,
@@ -794,23 +844,6 @@
     ACPI_OPERAND_OBJECT     *ObjDesc,
     UINT8                   **EndTag);
 
-UINT32
-AcpiUtDwordByteSwap (
-    UINT32                  Value);
-
-void
-AcpiUtSetIntegerWidth (
-    UINT8                   Revision);
-
-#ifdef ACPI_DEBUG_OUTPUT
-void
-AcpiUtDisplayInitPathname (
-    UINT8                   Type,
-    ACPI_NAMESPACE_NODE     *ObjHandle,
-    const char              *Path);
-
-#endif
-
 
 /*
  * utmutex - mutex support
@@ -860,7 +893,7 @@
     UINT32                  Line);
 
 void *
-AcpiUtCallocate (
+AcpiUtAllocateZeroed (
     ACPI_SIZE               Size,
     UINT32                  Component,
     const char              *Module,
@@ -875,7 +908,7 @@
     UINT32                  Line);
 
 void *
-AcpiUtCallocateAndTrack (
+AcpiUtAllocateZeroedAndTrack (
     ACPI_SIZE               Size,
     UINT32                  Component,
     const char              *Module,
@@ -895,7 +928,15 @@
 void
 AcpiUtDumpAllocations (
     UINT32                  Component,
-    const char              *Module);
+    char                    *Module);
+
+ACPI_STATUS
+AcpiUtCreateList (
+    const char              *ListName,
+    UINT16                  ObjectSize,
+    ACPI_MEMORY_LIST        **ReturnCache);
+
+
 #endif
 
 #endif /* _ACUTILS_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/dist/acpica/aecommon.h	Mon Jan 21 09:45:00 2008 +0000
@@ -0,0 +1,243 @@
+/******************************************************************************
+ *
+ * Module Name: aecommon - common include for the AcpiExec utility
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999 - 2007, 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 _AECOMMON
+#define _AECOMMON
+
+#ifdef _MSC_VER                 /* disable some level-4 warnings */
+#pragma warning(disable:4100)   /* warning C4100: unreferenced formal parameter */
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <signal.h>
+
+#include <dist/acpica/acpi.h>
+#include <dist/acpica/acparser.h>
+#include <dist/acpica/amlcode.h>
+#include <dist/acpica/acnamesp.h>
+#include <dist/acpica/acdebug.h>
+#include <dist/acpica/actables.h>
+#include <dist/acpica/acinterp.h>
+#include <dist/acpica/acapps.h>
+
+extern FILE                     *AcpiGbl_DebugFile;
+extern BOOLEAN                  AcpiGbl_IgnoreErrors;
+
+/*
+ * Debug Regions
+ */
+typedef struct Region
+{
+    ACPI_PHYSICAL_ADDRESS   Address;
+    UINT32                  Length;
+    void                    *Buffer;
+    void                    *NextRegion;
+    UINT8                   SpaceId;
+
+} REGION;
+
+typedef struct DebugRegions
+{
+    UINT32                  NumberOfRegions;
+    REGION                  *RegionList;
+
+} DEBUG_REGIONS;
+
+
+/*
+ * Pointer overlay for 16-bit code
+ */
+typedef union ptr_ovl
+{
+    void                *ptr;
+    UINT32              dword;
+    struct
+    {
+        UINT16              offset;
+        UINT16              base;
+    } ovl;
+
+} PTR_OVL;
+
+
+#define GET_SEGMENT(ptr)                ((UINT16)(_segment)(ptr))
+#define GET_OFFSET(ptr)                 ((UINT16)(UINT32) (ptr))
+#define GET_PHYSICAL_ADDRESS(ptr)       (((((UINT32)GET_SEGMENT(ptr)) << 4)) + GET_OFFSET(ptr))
+#define PTR_OVL_BUILD_PTR(p,b,o)        {p.ovl.base=b;p.ovl.offset=o;}
+
+
+#define TEST_OUTPUT_LEVEL(lvl)          if ((lvl) & OutputLevel)
+
+#define OSD_PRINT(lvl,fp)               TEST_OUTPUT_LEVEL(lvl) {\
+                                            AcpiOsPrintf PARAM_LIST(fp);}
+
+void __cdecl
+AeCtrlCHandler (
+    int                     Sig);
+
+ACPI_STATUS
+AeBuildLocalTables (
+    ACPI_TABLE_HEADER       *UserTable);
+
+ACPI_STATUS
+AeInstallTables (
+    void);
+
+void
+AeDumpNamespace (
+    void);
+
+void
+AeDumpObject (
+    char                    *MethodName,
+    ACPI_BUFFER             *ReturnObj);
+
+void
+AeDumpBuffer (
+    UINT32                  Address);
+
+void
+AeExecute (
+    char                    *Name);
+
+void
+AeSetScope (
+    char                    *Name);
+
+void
+AeCloseDebugFile (
+    void);
+
+void
+AeOpenDebugFile (
+    char                    *Name);
+
+ACPI_STATUS
+AeDisplayAllMethods (
+    UINT32                  DisplayCount);
+
+ACPI_STATUS
+AeInstallHandlers (
+    void);
+
+void
+AeMiscellaneousTests (
+    void);
+
+
+#endif /* _AECOMMON */
+
--- a/sys/dist/acpica/amlcode.h	Mon Jan 21 09:34:59 2008 +0000
+++ b/sys/dist/acpica/amlcode.h	Mon Jan 21 09:45:00 2008 +0000
@@ -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.
- *       xRevision: 1.83 $
+ *       $Revision: 1.1.14.3 $
  *
  *****************************************************************************/
 
@@ -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 - 2007, Intel Corp.
  * All rights reserved.
  *
  * 2. License
@@ -254,8 +254,10 @@
 #define AML_DATA_REGION_OP          (UINT16) 0x5b88     /* ACPI 2.0 */
 
 
-/* Bogus opcodes (they are actually two separate opcodes) */
-
+/*
+ * Combination opcodes (actually two one-byte opcodes)
+ * Used by the disassembler and iASL compiler
+ */
 #define AML_LGREATEREQUAL_OP        (UINT16) 0x9295
 #define AML_LLESSEQUAL_OP           (UINT16) 0x9294
 #define AML_LNOTEQUAL_OP            (UINT16) 0x9293
@@ -347,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 */
--- a/sys/dist/acpica/amlresrc.h	Mon Jan 21 09:34:59 2008 +0000
+++ b/sys/dist/acpica/amlresrc.h	Mon Jan 21 09:45:00 2008 +0000
@@ -2,7 +2,7 @@
 /******************************************************************************
  *
  * Module Name: amlresrc.h - AML resource descriptors
- *              xRevision: 1.35 $
+ *              $Revision: 1.1.14.3 $
  *
  *****************************************************************************/
 
@@ -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 - 2007, Intel Corp.
  * All rights reserved.
  *
  * 2. License
@@ -115,41 +115,46 @@
  *
  *****************************************************************************/
 
+/* acpisrc:StructDefs -- for acpisrc conversion */
 
 #ifndef __AMLRESRC_H
 #define __AMLRESRC_H
 
 
-#define ASL_RESNAME_ADDRESS                     "_ADR"
-#define ASL_RESNAME_ALIGNMENT                   "_ALN"
-#define ASL_RESNAME_ADDRESSSPACE                "_ASI"
-#define ASL_RESNAME_ACCESSSIZE                  "_ASZ"
-#define ASL_RESNAME_TYPESPECIFICATTRIBUTES      "_ATT"
-#define ASL_RESNAME_BASEADDRESS                 "_BAS"
-#define ASL_RESNAME_BUSMASTER                   "_BM_"  /* Master(1), Slave(0) */
-#define ASL_RESNAME_DECODE                      "_DEC"
-#define ASL_RESNAME_DMA                         "_DMA"
-#define ASL_RESNAME_DMATYPE                     "_TYP"  /* Compatible(0), A(1), B(2), F(3) */
-#define ASL_RESNAME_GRANULARITY                 "_GRA"
-#define ASL_RESNAME_INTERRUPT                   "_INT"
-#define ASL_RESNAME_INTERRUPTLEVEL              "_LL_"  /* ActiveLo(1), ActiveHi(0) */
-#define ASL_RESNAME_INTERRUPTSHARE              "_SHR"  /* Shareable(1), NoShare(0) */
-#define ASL_RESNAME_INTERRUPTTYPE               "_HE_"  /* Edge(1), Level(0) */
-#define ASL_RESNAME_LENGTH                      "_LEN"
-#define ASL_RESNAME_MEMATTRIBUTES               "_MTP"  /* Memory(0), Reserved(1), ACPI(2), NVS(3) */
-#define ASL_RESNAME_MEMTYPE                     "_MEM"  /* NonCache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */
-#define ASL_RESNAME_MAXADDR                     "_MAX"
-#define ASL_RESNAME_MINADDR                     "_MIN"
-#define ASL_RESNAME_MAXTYPE                     "_MAF"
-#define ASL_RESNAME_MINTYPE                     "_MIF"
-#define ASL_RESNAME_REGISTERBITOFFSET           "_RBO"
-#define ASL_RESNAME_REGISTERBITWIDTH            "_RBW"
-#define ASL_RESNAME_RANGETYPE                   "_RNG"
-#define ASL_RESNAME_READWRITETYPE               "_RW_"  /* ReadOnly(0), Writeable (1) */
-#define ASL_RESNAME_TRANSLATION                 "_TRA"
-#define ASL_RESNAME_TRANSTYPE                   "_TRS"  /* Sparse(1), Dense(0) */
-#define ASL_RESNAME_TYPE                        "_TTP"  /* Translation(1), Static (0) */
-#define ASL_RESNAME_XFERTYPE                    "_SIZ"  /* 8(0), 8And16(1), 16(2) */
+/*
+ * Resource descriptor tags, as defined in the ACPI specification.
+ * Used to symbolically reference fields within a descriptor.
+ */
+#define ACPI_RESTAG_ADDRESS                     "_ADR"
+#define ACPI_RESTAG_ALIGNMENT                   "_ALN"
+#define ACPI_RESTAG_ADDRESSSPACE                "_ASI"
+#define ACPI_RESTAG_ACCESSSIZE                  "_ASZ"
+#define ACPI_RESTAG_TYPESPECIFICATTRIBUTES      "_ATT"
+#define ACPI_RESTAG_BASEADDRESS                 "_BAS"
+#define ACPI_RESTAG_BUSMASTER                   "_BM_"  /* Master(1), Slave(0) */
+#define ACPI_RESTAG_DECODE                      "_DEC"
+#define ACPI_RESTAG_DMA                         "_DMA"
+#define ACPI_RESTAG_DMATYPE                     "_TYP"  /* Compatible(0), A(1), B(2), F(3) */
+#define ACPI_RESTAG_GRANULARITY                 "_GRA"
+#define ACPI_RESTAG_INTERRUPT                   "_INT"
+#define ACPI_RESTAG_INTERRUPTLEVEL              "_LL_"  /* ActiveLo(1), ActiveHi(0) */
+#define ACPI_RESTAG_INTERRUPTSHARE              "_SHR"  /* Shareable(1), NoShare(0) */
+#define ACPI_RESTAG_INTERRUPTTYPE               "_HE_"  /* Edge(1), Level(0) */
+#define ACPI_RESTAG_LENGTH                      "_LEN"
+#define ACPI_RESTAG_MEMATTRIBUTES               "_MTP"  /* Memory(0), Reserved(1), ACPI(2), NVS(3) */
+#define ACPI_RESTAG_MEMTYPE                     "_MEM"  /* NonCache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */
+#define ACPI_RESTAG_MAXADDR                     "_MAX"
+#define ACPI_RESTAG_MINADDR                     "_MIN"
+#define ACPI_RESTAG_MAXTYPE                     "_MAF"
+#define ACPI_RESTAG_MINTYPE                     "_MIF"
+#define ACPI_RESTAG_REGISTERBITOFFSET           "_RBO"
+#define ACPI_RESTAG_REGISTERBITWIDTH            "_RBW"
+#define ACPI_RESTAG_RANGETYPE                   "_RNG"
+#define ACPI_RESTAG_READWRITETYPE               "_RW_"  /* ReadOnly(0), Writeable (1) */
+#define ACPI_RESTAG_TRANSLATION                 "_TRA"
+#define ACPI_RESTAG_TRANSTYPE                   "_TRS"  /* Sparse(1), Dense(0) */
+#define ACPI_RESTAG_TYPE                        "_TTP"  /* Translation(1), Static (0) */
+#define ACPI_RESTAG_XFERTYPE                    "_SIZ"  /* 8(0), 8And16(1), 16(2) */
 
 
 /* Default sizes for "small" resource descriptors */
@@ -165,9 +170,9 @@
 
 typedef struct asl_resource_node
 {
-    UINT32                      BufferLength;
-    void                        *Buffer;
-    struct asl_resource_node    *Next;
+    UINT32                          BufferLength;
+    void                            *Buffer;
+    struct asl_resource_node        *Next;
 
 } ASL_RESOURCE_NODE;
 
@@ -189,7 +194,7 @@
  * SMALL descriptors
  */
 #define AML_RESOURCE_SMALL_HEADER_COMMON \
-    UINT8                       DescriptorType;
+    UINT8                           DescriptorType;
 
 typedef struct aml_resource_small_header
 {
@@ -201,8 +206,8 @@
 typedef struct aml_resource_irq
 {
     AML_RESOURCE_SMALL_HEADER_COMMON
-    UINT16                      IrqMask;
-    UINT8                       Flags;
+    UINT16                          IrqMask;
+    UINT8                           Flags;
 
 } AML_RESOURCE_IRQ;
 
@@ -210,7 +215,7 @@
 typedef struct aml_resource_irq_noflags
 {
     AML_RESOURCE_SMALL_HEADER_COMMON
-    UINT16                      IrqMask;
+    UINT16                          IrqMask;
 
 } AML_RESOURCE_IRQ_NOFLAGS;
 
@@ -218,8 +223,8 @@
 typedef struct aml_resource_dma
 {
     AML_RESOURCE_SMALL_HEADER_COMMON
-    UINT8                       DmaChannelMask;
-    UINT8                       Flags;
+    UINT8                           DmaChannelMask;
+    UINT8                           Flags;
 
 } AML_RESOURCE_DMA;
 
@@ -227,7 +232,7 @@
 typedef struct aml_resource_start_dependent
 {
     AML_RESOURCE_SMALL_HEADER_COMMON
-    UINT8                       Flags;
+    UINT8                           Flags;
 
 } AML_RESOURCE_START_DEPENDENT;
 
@@ -249,11 +254,11 @@
 typedef struct aml_resource_io
 {
     AML_RESOURCE_SMALL_HEADER_COMMON
-    UINT8                       Flags;
-    UINT16                      Minimum;
-    UINT16                      Maximum;
-    UINT8                       Alignment;
-    UINT8                       AddressLength;
+    UINT8                           Flags;
+    UINT16                          Minimum;
+    UINT16                          Maximum;
+    UINT8                           Alignment;
+    UINT8                           AddressLength;
 
 } AML_RESOURCE_IO;
 
@@ -261,8 +266,8 @@
 typedef struct aml_resource_fixed_io
 {
     AML_RESOURCE_SMALL_HEADER_COMMON
-    UINT16                      Address;
-    UINT8                       AddressLength;
+    UINT16                          Address;
+    UINT8                           AddressLength;
 
 } AML_RESOURCE_FIXED_IO;
 
@@ -277,7 +282,7 @@
 typedef struct aml_resource_end_tag
 {
     AML_RESOURCE_SMALL_HEADER_COMMON
-    UINT8                       Checksum;
+    UINT8                           Checksum;
 
 } AML_RESOURCE_END_TAG;
 
@@ -286,8 +291,8 @@
  * LARGE descriptors
  */
 #define AML_RESOURCE_LARGE_HEADER_COMMON \
-    UINT8                       DescriptorType;\
-    UINT16                      ResourceLength;
+    UINT8                           DescriptorType;\
+    UINT16                          ResourceLength;
 
 typedef struct aml_resource_large_header
 {
@@ -299,11 +304,11 @@
 typedef struct aml_resource_memory24
 {
     AML_RESOURCE_LARGE_HEADER_COMMON
-    UINT8                       Flags;
-    UINT16                      Minimum;
-    UINT16                      Maximum;
-    UINT16                      Alignment;
-    UINT16                      AddressLength;
+    UINT8                           Flags;
+    UINT16                          Minimum;
+    UINT16                          Maximum;
+    UINT16                          Alignment;
+    UINT16                          AddressLength;
 
 } AML_RESOURCE_MEMORY24;
 
@@ -318,11 +323,11 @@
 typedef struct aml_resource_memory32
 {
     AML_RESOURCE_LARGE_HEADER_COMMON
-    UINT8                       Flags;
-    UINT32                      Minimum;
-    UINT32                      Maximum;
-    UINT32                      Alignment;
-    UINT32                      AddressLength;
+    UINT8                           Flags;
+    UINT32                          Minimum;
+    UINT32                          Maximum;
+    UINT32                          Alignment;
+    UINT32                          AddressLength;
 
 } AML_RESOURCE_MEMORY32;
 
@@ -330,17 +335,17 @@
 typedef struct aml_resource_fixed_memory32
 {
     AML_RESOURCE_LARGE_HEADER_COMMON
-    UINT8                       Flags;
-    UINT32                      Address;
-    UINT32                      AddressLength;
+    UINT8                           Flags;
+    UINT32                          Address;
+    UINT32                          AddressLength;
 
 } AML_RESOURCE_FIXED_MEMORY32;
 
 
 #define AML_RESOURCE_ADDRESS_COMMON \
-    UINT8                       ResourceType; \
-    UINT8                       Flags; \
-    UINT8                       SpecificFlags;
+    UINT8                           ResourceType; \
+    UINT8                           Flags; \
+    UINT8                           SpecificFlags;
 
 
 typedef struct aml_resource_address
@@ -355,14 +360,14 @@
 {
     AML_RESOURCE_LARGE_HEADER_COMMON
     AML_RESOURCE_ADDRESS_COMMON
-    UINT8                       RevisionID;
-    UINT8                       Reserved;
-    UINT64                      Granularity;
-    UINT64                      Minimum;
-    UINT64                      Maximum;
-    UINT64                      TranslationOffset;
-    UINT64                      AddressLength;
-    UINT64                      TypeSpecific;
+    UINT8                           RevisionID;
+    UINT8                           Reserved;
+    UINT64                          Granularity;
+    UINT64                          Minimum;
+    UINT64                          Maximum;
+    UINT64                          TranslationOffset;
+    UINT64                          AddressLength;
+    UINT64                          TypeSpecific;
 
 } AML_RESOURCE_EXTENDED_ADDRESS64;
 
@@ -373,11 +378,11 @@
 {
     AML_RESOURCE_LARGE_HEADER_COMMON
     AML_RESOURCE_ADDRESS_COMMON
-    UINT64                      Granularity;
-    UINT64                      Minimum;
-    UINT64                      Maximum;
-    UINT64                      TranslationOffset;
-    UINT64                      AddressLength;
+    UINT64                          Granularity;
+    UINT64                          Minimum;
+    UINT64                          Maximum;
+    UINT64                          TranslationOffset;
+    UINT64                          AddressLength;
 
 } AML_RESOURCE_ADDRESS64;
 
@@ -386,11 +391,11 @@
 {
     AML_RESOURCE_LARGE_HEADER_COMMON
     AML_RESOURCE_ADDRESS_COMMON
-    UINT32                      Granularity;
-    UINT32                      Minimum;
-    UINT32                      Maximum;
-    UINT32                      TranslationOffset;
-    UINT32                      AddressLength;
+    UINT32                          Granularity;
+    UINT32                          Minimum;
+    UINT32                          Maximum;
+    UINT32                          TranslationOffset;
+    UINT32                          AddressLength;
 
 } AML_RESOURCE_ADDRESS32;
 
@@ -399,11 +404,11 @@
 {
     AML_RESOURCE_LARGE_HEADER_COMMON
     AML_RESOURCE_ADDRESS_COMMON
-    UINT16                      Granularity;
-    UINT16                      Minimum;
-    UINT16                      Maximum;
-    UINT16                      TranslationOffset;
-    UINT16                      AddressLength;
+    UINT16                          Granularity;
+    UINT16                          Minimum;
+    UINT16                          Maximum;
+    UINT16                          TranslationOffset;
+    UINT16                          AddressLength;
 
 } AML_RESOURCE_ADDRESS16;
 
@@ -411,9 +416,9 @@
 typedef struct aml_resource_extended_irq
 {
     AML_RESOURCE_LARGE_HEADER_COMMON
-    UINT8                       Flags;
-    UINT8                       InterruptCount;
-    UINT32                      Interrupts[1];
+    UINT8                           Flags;
+    UINT8                           InterruptCount;
+    UINT32                          Interrupts[1];
     /* ResSourceIndex, ResSource optional fields follow */
 
 } AML_RESOURCE_EXTENDED_IRQ;
@@ -422,11 +427,11 @@
 typedef struct aml_resource_generic_register
 {
     AML_RESOURCE_LARGE_HEADER_COMMON
-    UINT8                       AddressSpaceId;
-    UINT8                       BitWidth;
-    UINT8                       BitOffset;
-    UINT8                       AccessSize; /* ACPI 3.0, was previously Reserved */
-    UINT64                      Address;
+    UINT8                           AddressSpaceId;
+    UINT8                           BitWidth;
+    UINT8                           BitOffset;
+    UINT8                           AccessSize; /* ACPI 3.0, was previously Reserved */
+    UINT64                          Address;
 
 } AML_RESOURCE_GENERIC_REGISTER;
 
@@ -440,42 +445,42 @@
 {
     /* Descriptor headers */
 
-    AML_RESOURCE_SMALL_HEADER       SmallHeader;
-    AML_RESOURCE_LARGE_HEADER       LargeHeader;
+    UINT8                                   DescriptorType;
+    AML_RESOURCE_SMALL_HEADER               SmallHeader;
+    AML_RESOURCE_LARGE_HEADER               LargeHeader;
 
     /* Small resource descriptors */
 
-    AML_RESOURCE_IRQ                Irq;
-    AML_RESOURCE_DMA                Dma;
-    AML_RESOURCE_START_DEPENDENT    StartDpf;
-    AML_RESOURCE_END_DEPENDENT      EndDpf;
-    AML_RESOURCE_IO                 Io;
-    AML_RESOURCE_FIXED_IO           FixedIo;
-    AML_RESOURCE_VENDOR_SMALL       VendorSmall;
-    AML_RESOURCE_END_TAG            EndTag;
+    AML_RESOURCE_IRQ                        Irq;
+    AML_RESOURCE_DMA                        Dma;
+    AML_RESOURCE_START_DEPENDENT            StartDpf;
+    AML_RESOURCE_END_DEPENDENT              EndDpf;
+    AML_RESOURCE_IO                         Io;
+    AML_RESOURCE_FIXED_IO                   FixedIo;
+    AML_RESOURCE_VENDOR_SMALL               VendorSmall;
+    AML_RESOURCE_END_TAG                    EndTag;
 
     /* Large resource descriptors */
 
-    AML_RESOURCE_MEMORY24           Memory24;
-    AML_RESOURCE_GENERIC_REGISTER   GenericReg;
-    AML_RESOURCE_VENDOR_LARGE       VendorLarge;
-    AML_RESOURCE_MEMORY32           Memory32;
-    AML_RESOURCE_FIXED_MEMORY32     FixedMemory32;
-    AML_RESOURCE_ADDRESS16          Address16;
-    AML_RESOURCE_ADDRESS32          Address32;
-    AML_RESOURCE_ADDRESS64          Address64;
-    AML_RESOURCE_EXTENDED_ADDRESS64 ExtAddress64;
-    AML_RESOURCE_EXTENDED_IRQ       ExtendedIrq;
+    AML_RESOURCE_MEMORY24                   Memory24;
+    AML_RESOURCE_GENERIC_REGISTER           GenericReg;
+    AML_RESOURCE_VENDOR_LARGE               VendorLarge;
+    AML_RESOURCE_MEMORY32                   Memory32;
+    AML_RESOURCE_FIXED_MEMORY32             FixedMemory32;
+    AML_RESOURCE_ADDRESS16                  Address16;
+    AML_RESOURCE_ADDRESS32                  Address32;
+    AML_RESOURCE_ADDRESS64                  Address64;
+    AML_RESOURCE_EXTENDED_ADDRESS64         ExtAddress64;
+    AML_RESOURCE_EXTENDED_IRQ               ExtendedIrq;
 
     /* Utility overlays */
 
-    AML_RESOURCE_ADDRESS            Address;
-    UINT32                          U32Item;
-    UINT16                          U16Item;
-    UINT8                           U8Item;
+    AML_RESOURCE_ADDRESS                    Address;
+    UINT32                                  DwordItem;
+    UINT16                                  WordItem;
+    UINT8                                   ByteItem;
 
 } AML_RESOURCE;
 
-
 #endif
 
--- a/sys/dist/acpica/dbcmds.c	Mon Jan 21 09:34:59 2008 +0000
+++ b/sys/dist/acpica/dbcmds.c	Mon Jan 21 09:45:00 2008 +0000
@@ -1,7 +1,9 @@
+/*	$NetBSD: dbcmds.c,v 1.1.14.3 2008/01/21 09:45:05 yamt Exp $	*/
+
 /*******************************************************************************
  *
  * Module Name: dbcmds - debug commands and output routines
- *              xRevision: 1.140 $
+ *              $Revision: 1.1.14.3 $
  *
  ******************************************************************************/
 
@@ -9,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 - 2007, Intel Corp.
  * All rights reserved.
  *
  * 2. License
@@ -114,21 +116,20 @@
  *
  *****************************************************************************/
 
-
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dbcmds.c,v 1.1.14.2 2006/06/21 15:08:24 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dbcmds.c,v 1.1.14.3 2008/01/21 09:45:05 yamt Exp $");
 
-#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 <dist/acpica/acpi.h>
+#include <dist/acpica/acdispat.h>
+#include <dist/acpica/amlcode.h>
+#include <dist/acpica/acnamesp.h>
+#include <dist/acpica/acevents.h>
+#include <dist/acpica/acdebug.h>
+#include <dist/acpica/acresrc.h>
+#include <dist/acpica/acdisasm.h>
 
 
-#include "acparser.h"
+#include <dist/acpica/acparser.h>
 
 #ifdef ACPI_DEBUGGER
 
@@ -288,9 +289,6 @@
 AcpiDbSleep (
     char                    *ObjectArg)
 {
-#if ACPI_MAC