Date: Sun, 13 Sep 2009 21:56:07 GMT From: Marko Zec <zec@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 168519 for review Message-ID: <200909132156.n8DLu7fa089387@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=168519 Change 168519 by zec@zec_tpx32 on 2009/09/13 21:55:18 IFC @ 168505 gone bad... Affected files ... .. //depot/projects/vimage-commit2/src/sys/amd64/amd64/identcpu.c#11 integrate .. //depot/projects/vimage-commit2/src/sys/amd64/amd64/initcpu.c#6 integrate .. //depot/projects/vimage-commit2/src/sys/amd64/amd64/msi.c#7 integrate .. //depot/projects/vimage-commit2/src/sys/amd64/include/specialreg.h#9 integrate .. //depot/projects/vimage-commit2/src/sys/amd64/linux32/linux32_proto.h#4 integrate .. //depot/projects/vimage-commit2/src/sys/boot/i386/libi386/pxe.c#4 integrate .. //depot/projects/vimage-commit2/src/sys/boot/pc98/Makefile.inc#3 integrate .. //depot/projects/vimage-commit2/src/sys/cam/scsi/scsi_target.c#6 integrate .. //depot/projects/vimage-commit2/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h#4 integrate .. //depot/projects/vimage-commit2/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c#8 integrate .. //depot/projects/vimage-commit2/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#17 integrate .. //depot/projects/vimage-commit2/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c#8 integrate .. //depot/projects/vimage-commit2/src/sys/compat/svr4/svr4_proto.h#3 integrate .. //depot/projects/vimage-commit2/src/sys/conf/files#51 integrate .. //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/acpica_prep.sh#3 integrate .. //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/changes.txt#2 integrate .. //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/common/dmrestag.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/common/dmtable.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/common/dmtbdump.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/common/dmtbinfo.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/compiler/aslcompiler.h#3 integrate .. //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/compiler/aslcompiler.l#3 integrate .. //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/compiler/aslcompiler.y#3 integrate .. //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/compiler/asldefine.h#3 integrate .. //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/compiler/aslfiles.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/compiler/aslglobal.h#3 integrate .. //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/compiler/aslload.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/compiler/asllookup.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/compiler/aslmain.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/compiler/aslmap.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/compiler/aslstubs.c#3 integrate .. //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/compiler/asltypes.h#3 integrate .. //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/include/actbl2.h#1 branch .. //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/namespace/nsrepair.c#1 branch .. //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/utilities/utids.c#1 branch Differences ... ==== //depot/projects/vimage-commit2/src/sys/amd64/amd64/identcpu.c#11 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.174 2009/06/30 11:16:32 avg Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/identcpu.c,v 1.175 2009/09/10 17:27:36 jkim Exp $"); #include "opt_cpu.h" @@ -371,21 +371,21 @@ switch (cpu_vendor_id) { case CPU_VENDOR_AMD: if ((amd_pminfo & AMDPM_TSC_INVARIANT) || - AMD64_CPU_FAMILY(cpu_id) >= 0x10 || + CPUID_TO_FAMILY(cpu_id) >= 0x10 || cpu_id == 0x60fb2) tsc_is_invariant = 1; break; case CPU_VENDOR_INTEL: if ((amd_pminfo & AMDPM_TSC_INVARIANT) || - (AMD64_CPU_FAMILY(cpu_id) == 0x6 && - AMD64_CPU_MODEL(cpu_id) >= 0xe) || - (AMD64_CPU_FAMILY(cpu_id) == 0xf && - AMD64_CPU_MODEL(cpu_id) >= 0x3)) + (CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) >= 0xe) || + (CPUID_TO_FAMILY(cpu_id) == 0xf && + CPUID_TO_MODEL(cpu_id) >= 0x3)) tsc_is_invariant = 1; break; case CPU_VENDOR_CENTAUR: - if (AMD64_CPU_FAMILY(cpu_id) == 0x6 && - AMD64_CPU_MODEL(cpu_id) >= 0xf && + if (CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) >= 0xf && (rdmsr(0x1203) & 0x100000000ULL) == 0) tsc_is_invariant = 1; break; ==== //depot/projects/vimage-commit2/src/sys/amd64/amd64/initcpu.c#6 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/initcpu.c,v 1.54 2009/07/22 14:32:38 kib Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/initcpu.c,v 1.55 2009/09/10 17:27:36 jkim Exp $"); #include "opt_cpu.h" @@ -154,8 +154,8 @@ pg_nx = PG_NX; } if (cpu_vendor_id == CPU_VENDOR_CENTAUR && - AMD64_CPU_FAMILY(cpu_id) == 0x6 && - AMD64_CPU_MODEL(cpu_id) >= 0xf) + CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) >= 0xf) init_via(); /* ==== //depot/projects/vimage-commit2/src/sys/amd64/amd64/msi.c#7 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.14 2009/07/06 18:23:00 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.15 2009/09/10 17:27:36 jkim Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -275,8 +275,8 @@ case CPU_VENDOR_AMD: break; case CPU_VENDOR_CENTAUR: - if (AMD64_CPU_FAMILY(cpu_id) == 0x6 && - AMD64_CPU_MODEL(cpu_id) >= 0xf) + if (CPUID_TO_FAMILY(cpu_id) == 0x6 && + CPUID_TO_MODEL(cpu_id) >= 0xf) break; /* FALLTHROUGH */ default: ==== //depot/projects/vimage-commit2/src/sys/amd64/include/specialreg.h#9 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * from: @(#)specialreg.h 7.1 (Berkeley) 5/9/91 - * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.55 2009/05/13 17:53:04 jhb Exp $ + * $FreeBSD: src/sys/amd64/include/specialreg.h,v 1.56 2009/09/10 17:27:36 jkim Exp $ */ #ifndef _MACHINE_SPECIALREG_H_ @@ -168,10 +168,10 @@ #define CPUID_FAMILY 0x00000f00 #define CPUID_EXT_MODEL 0x000f0000 #define CPUID_EXT_FAMILY 0x0ff00000 -#define AMD64_CPU_MODEL(id) \ +#define CPUID_TO_MODEL(id) \ ((((id) & CPUID_MODEL) >> 4) | \ (((id) & CPUID_EXT_MODEL) >> 12)) -#define AMD64_CPU_FAMILY(id) \ +#define CPUID_TO_FAMILY(id) \ ((((id) & CPUID_FAMILY) >> 8) + \ (((id) & CPUID_EXT_FAMILY) >> 20)) ==== //depot/projects/vimage-commit2/src/sys/amd64/linux32/linux32_proto.h#4 (text+ko) ==== @@ -2,7 +2,7 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.39 2008/11/29 14:57:58 kib Exp $ + * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.40 2009/09/10 13:20:27 des Exp $ * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 185438 2008-11-29 14:55:24Z kib */ @@ -1257,6 +1257,13 @@ #endif /* COMPAT_FREEBSD6 */ + +#ifdef COMPAT_FREEBSD7 + +#define nosys linux_nosys + +#endif /* COMPAT_FREEBSD7 */ + #define LINUX_SYS_AUE_linux_fork AUE_FORK #define LINUX_SYS_AUE_linux_open AUE_OPEN_RWTC #define LINUX_SYS_AUE_linux_waitpid AUE_WAIT4 ==== //depot/projects/vimage-commit2/src/sys/boot/i386/libi386/pxe.c#4 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/pxe.c,v 1.23 2007/10/12 17:09:43 ps Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/i386/libi386/pxe.c,v 1.24 2009/09/10 22:05:43 emaste Exp $"); #include <stand.h> #include <string.h> @@ -282,7 +282,7 @@ bootp(pxe_sock, BOOTP_PXE); if (rootip.s_addr == 0) rootip.s_addr = bootplayer.sip; - if (!rootpath[1]) + if (!rootpath[0]) strcpy(rootpath, PXENFSROOTPATH); for (i = 0; rootpath[i] != '\0' && i < FNAME_SIZE; i++) ==== //depot/projects/vimage-commit2/src/sys/boot/pc98/Makefile.inc#3 (text+ko) ==== @@ -1,10 +1,10 @@ # Common defines for all of /sys/boot/pc98/ # -# $FreeBSD: src/sys/boot/pc98/Makefile.inc,v 1.8 2008/06/25 21:33:28 ru Exp $ +# $FreeBSD: src/sys/boot/pc98/Makefile.inc,v 1.9 2009/09/13 11:20:17 nyan Exp $ BINDIR?= /boot -LOADER_ADDRESS?=0x100000 +LOADER_ADDRESS?=0x200000 CFLAGS+= -ffreestanding -mpreferred-stack-boundary=2 \ -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 \ -Os ==== //depot/projects/vimage-commit2/src/sys/cam/scsi/scsi_target.c#6 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.78 2009/06/25 18:46:30 kib Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.79 2009/09/12 20:03:45 rwatson Exp $"); #include <sys/param.h> @@ -103,8 +103,11 @@ static d_kqfilter_t targkqfilter; static void targreadfiltdetach(struct knote *kn); static int targreadfilt(struct knote *kn, long hint); -static struct filterops targread_filtops = - { 1, NULL, targreadfiltdetach, targreadfilt }; +static struct filterops targread_filtops = { + .f_isfd = 1, + .f_detach = targreadfiltdetach, + .f_event = targreadfilt, +}; static struct cdevsw targ_cdevsw = { .d_version = D_VERSION, ==== //depot/projects/vimage-commit2/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h#4 (text+ko) ==== @@ -231,8 +231,27 @@ /* * Convert between znode pointers and vnode pointers */ +#ifdef DEBUG +static __inline vnode_t * +ZTOV(znode_t *zp) +{ + vnode_t *vp = zp->z_vnode; + + ASSERT(vp == NULL || vp->v_data == NULL || vp->v_data == zp); + return (vp); +} +static __inline znode_t * +VTOZ(vnode_t *vp) +{ + znode_t *zp = (znode_t *)vp->v_data; + + ASSERT(zp == NULL || zp->z_vnode == NULL || zp->z_vnode == vp); + return (zp); +} +#else #define ZTOV(ZP) ((ZP)->z_vnode) #define VTOZ(VP) ((znode_t *)(VP)->v_data) +#endif /* * ZFS_ENTER() is called on entry to each ZFS vnode and vfs operation. ==== //depot/projects/vimage-commit2/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c#3 (text+ko) ==== @@ -181,10 +181,11 @@ return (0); } -static void +static int mze_insert(zap_t *zap, int chunkid, uint64_t hash, mzap_ent_phys_t *mzep) { mzap_ent_t *mze; + avl_index_t idx; ASSERT(zap->zap_ismicro); ASSERT(RW_WRITE_HELD(&zap->zap_rwlock)); @@ -194,7 +195,12 @@ mze->mze_chunkid = chunkid; mze->mze_hash = hash; mze->mze_phys = *mzep; - avl_add(&zap->zap_m.zap_avl, mze); + if (avl_find(&zap->zap_m.zap_avl, mze, &idx) != NULL) { + kmem_free(mze, sizeof (mzap_ent_t)); + return (EEXIST); + } + avl_insert(&zap->zap_m.zap_avl, mze, idx); + return (0); } static mzap_ent_t * @@ -329,10 +335,15 @@ if (mze->mze_name[0]) { zap_name_t *zn; - zap->zap_m.zap_num_entries++; zn = zap_name_alloc(zap, mze->mze_name, MT_EXACT); - mze_insert(zap, i, zn->zn_hash, mze); + if (mze_insert(zap, i, zn->zn_hash, mze) == 0) + zap->zap_m.zap_num_entries++; + else { + printf("ZFS WARNING: Duplicated ZAP " + "entry detected (%s).", + mze->mze_name); + } zap_name_free(zn); } } @@ -771,7 +782,7 @@ if (zap->zap_m.zap_alloc_next == zap->zap_m.zap_num_chunks) zap->zap_m.zap_alloc_next = 0; - mze_insert(zap, i, zn->zn_hash, mze); + VERIFY(0 == mze_insert(zap, i, zn->zn_hash, mze)); return; } } ==== //depot/projects/vimage-commit2/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c#8 (text+ko) ==== @@ -947,6 +947,18 @@ zfsvfs->z_unmounted = B_TRUE; rrw_exit(&zfsvfs->z_teardown_lock, FTAG); rw_exit(&zfsvfs->z_teardown_inactive_lock); + +#ifdef __FreeBSD__ + /* + * Some znodes might not be fully reclaimed, wait for them. + */ + mutex_enter(&zfsvfs->z_znodes_lock); + while (list_head(&zfsvfs->z_all_znodes) != NULL) { + msleep(zfsvfs, &zfsvfs->z_znodes_lock, 0, + "zteardown", 0); + } + mutex_exit(&zfsvfs->z_znodes_lock); +#endif } /* @@ -1137,6 +1149,8 @@ credanonp, numsecflavors, secflavors)); } +CTASSERT(SHORT_FID_LEN <= sizeof(struct fid)); +CTASSERT(LONG_FID_LEN <= sizeof(struct fid)); static int zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vnode_t **vpp) ==== //depot/projects/vimage-commit2/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#17 (text+ko) ==== @@ -1185,8 +1185,6 @@ } } - ZFS_EXIT(zfsvfs); - /* Translate errors and add SAVENAME when needed. */ if (cnp->cn_flags & ISLASTCN) { switch (nameiop) { @@ -1217,6 +1215,7 @@ if (error != 0) { VN_RELE(*vpp); *vpp = NULL; + ZFS_EXIT(zfsvfs); return (error); } } @@ -1238,6 +1237,8 @@ } #endif + ZFS_EXIT(zfsvfs); + return (error); } @@ -4343,11 +4344,20 @@ znode_t *zp = arg; zfsvfs_t *zfsvfs = zp->z_zfsvfs; - ZFS_LOG(1, "zp=%p", zp); - ZFS_OBJ_HOLD_ENTER(zfsvfs, zp->z_id); - zfs_znode_dmu_fini(zp); - ZFS_OBJ_HOLD_EXIT(zfsvfs, zp->z_id); + rw_enter(&zfsvfs->z_teardown_inactive_lock, RW_READER); + if (zp->z_dbuf != NULL) { + ZFS_OBJ_HOLD_ENTER(zfsvfs, zp->z_id); + zfs_znode_dmu_fini(zp); + ZFS_OBJ_HOLD_EXIT(zfsvfs, zp->z_id); + } zfs_znode_free(zp); + rw_exit(&zfsvfs->z_teardown_inactive_lock); + /* + * If the file system is being unmounted, there is a process waiting + * for us, wake it up. + */ + if (zfsvfs->z_unmounted) + wakeup_one(zfsvfs); } static int @@ -4359,6 +4369,9 @@ { vnode_t *vp = ap->a_vp; znode_t *zp = VTOZ(vp); + zfsvfs_t *zfsvfs = zp->z_zfsvfs; + + rw_enter(&zfsvfs->z_teardown_inactive_lock, RW_READER); ASSERT(zp != NULL); @@ -4369,7 +4382,7 @@ mutex_enter(&zp->z_lock); ASSERT(zp->z_phys != NULL); - ZTOV(zp) = NULL; + zp->z_vnode = NULL; mutex_exit(&zp->z_lock); if (zp->z_unlinked) @@ -4377,7 +4390,6 @@ else if (zp->z_dbuf == NULL) zfs_znode_free(zp); else /* if (!zp->z_unlinked && zp->z_dbuf != NULL) */ { - zfsvfs_t *zfsvfs = zp->z_zfsvfs; int locked; locked = MUTEX_HELD(ZFS_OBJ_MUTEX(zfsvfs, zp->z_id)) ? 2 : @@ -4400,6 +4412,7 @@ vp->v_data = NULL; ASSERT(vp->v_holdcnt >= 1); VI_UNLOCK(vp); + rw_exit(&zfsvfs->z_teardown_inactive_lock); return (0); } ==== //depot/projects/vimage-commit2/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c#8 (text+ko) ==== @@ -110,7 +110,7 @@ mutex_exit(&zp->z_lock); zfs_znode_free(zp); } else if (vp->v_count == 0) { - ZTOV(zp) = NULL; + zp->z_vnode = NULL; vhold(vp); mutex_exit(&zp->z_lock); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, curthread); @@ -890,8 +890,16 @@ if (zp->z_unlinked) { err = ENOENT; } else { - if (ZTOV(zp) != NULL) - VN_HOLD(ZTOV(zp)); + if ((vp = ZTOV(zp)) != NULL) { + VI_LOCK(vp); + if ((vp->v_iflag & VI_DOOMED) != 0) { + VI_UNLOCK(vp); + vp = NULL; + } else + VI_UNLOCK(vp); + } + if (vp != NULL) + VN_HOLD(vp); else { if (first) { ZFS_LOG(1, "dying znode detected (zp=%p)", zp); @@ -1525,7 +1533,7 @@ ZTOV(rootzp)->v_data = NULL; ZTOV(rootzp)->v_count = 0; ZTOV(rootzp)->v_holdcnt = 0; - ZTOV(rootzp) = NULL; + rootzp->z_vnode = NULL; VOP_UNLOCK(vp, 0); vdestroy(vp); dmu_buf_rele(rootzp->z_dbuf, NULL); ==== //depot/projects/vimage-commit2/src/sys/compat/svr4/svr4_proto.h#3 (text+ko) ==== @@ -2,7 +2,7 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/svr4/svr4_proto.h,v 1.29 2009/05/08 20:16:04 ed Exp $ + * $FreeBSD: src/sys/compat/svr4/svr4_proto.h,v 1.30 2009/09/10 13:20:27 des Exp $ * created from FreeBSD: head/sys/compat/svr4/syscalls.master 160798 2006-07-28 19:05:28Z jhb */ @@ -503,6 +503,12 @@ #endif /* COMPAT_FREEBSD6 */ + +#ifdef COMPAT_FREEBSD7 + + +#endif /* COMPAT_FREEBSD7 */ + #define SVR4_SYS_AUE_svr4_sys_open AUE_NULL #define SVR4_SYS_AUE_svr4_sys_wait AUE_NULL #define SVR4_SYS_AUE_svr4_sys_creat AUE_NULL ==== //depot/projects/vimage-commit2/src/sys/conf/files#51 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1463 2009/09/09 05:53:26 delphij Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1464 2009/09/11 22:49:34 jkim Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -220,6 +220,7 @@ contrib/dev/acpica/namespace/nsobject.c optional acpi contrib/dev/acpica/namespace/nsparse.c optional acpi contrib/dev/acpica/namespace/nspredef.c optional acpi +contrib/dev/acpica/namespace/nsrepair.c optional acpi contrib/dev/acpica/namespace/nssearch.c optional acpi contrib/dev/acpica/namespace/nsutils.c optional acpi contrib/dev/acpica/namespace/nswalk.c optional acpi @@ -260,6 +261,7 @@ contrib/dev/acpica/utilities/utdelete.c optional acpi contrib/dev/acpica/utilities/uteval.c optional acpi contrib/dev/acpica/utilities/utglobal.c optional acpi +contrib/dev/acpica/utilities/utids.c optional acpi contrib/dev/acpica/utilities/utinit.c optional acpi contrib/dev/acpica/utilities/utlock.c optional acpi contrib/dev/acpica/utilities/utmath.c optional acpi ==== //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/acpica_prep.sh#3 (text+ko) ==== @@ -1,5 +1,5 @@ #!/bin/sh -# $FreeBSD: src/sys/contrib/dev/acpica/acpica_prep.sh,v 1.11 2009/06/05 18:43:13 jkim Exp $ +# $FreeBSD: src/sys/contrib/dev/acpica/acpica_prep.sh,v 1.12 2009/09/11 22:48:53 jkim Exp $ # # Unpack an ACPI CA drop and restructure it to fit the FreeBSD layout # @@ -21,7 +21,7 @@ # files to remove stripdirs="acpisrc acpixtract examples generate os_specific" stripfiles="Makefile README acintel.h aclinux.h acmsvc.h acnetbsd.h \ - acos2.h accygwin.h acefi.h actbl2.h acwin.h acwin64.h aeexec.c \ + acos2.h accygwin.h acefi.h acwin.h acwin64.h aeexec.c \ aehandlers.c aemain.c aetables.c osunixdir.c readme.txt \ utclib.c" @@ -31,8 +31,8 @@ aclocal.h acmacros.h acnames.h acnamesp.h acobject.h acopcode.h \ acoutput.h acparser.h acpi.h acpiosxf.h acpixf.h acpredef.h \ acresrc.h acrestyp.h acstruct.h actables.h actbl.h actbl1.h \ - actypes.h acutils.h amlcode.h amlresrc.h platform/acenv.h \ - platform/acfreebsd.h platform/acgcc.h" + actbl2.h actypes.h acutils.h amlcode.h amlresrc.h \ + platform/acenv.h platform/acfreebsd.h platform/acgcc.h" comp_headers="aslcompiler.h asldefine.h aslglobal.h asltypes.h" platform_headers="acfreebsd.h acgcc.h" ==== //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/changes.txt#2 (text+ko) ==== @@ -1,4 +1,227 @@ ---------------------------------------- +03 September 2009. Summary of changes for version 20090903: + +This release is available at www.acpica.org/downloads + +1) ACPI CA Core Subsystem: + +For Windows Vista compatibility, added the automatic execution of an _INI +method located at the namespace root (\_INI). This method is executed at +table load time. This support is in addition to the automatic execution of +\_SB._INI. Lin Ming. + +Fixed a possible memory leak in the interpreter for AML package objects if +the package initializer list is longer than the defined size of the package. +This apparently can only happen if the BIOS changes the package size on the +fly (seen in a _PSS object), as ASL compilers do not allow this. The +interpreter will truncate the package to the defined size (and issue an error +message), but previously could leave the extra objects undeleted if they were +pre-created during the argument processing (such is the case if the package +consists of a number of sub-packages as in the _PSS.) ACPICA BZ 805. + +Fixed a problem seen when a Buffer or String is stored to itself via ASL. +This has been reported in the field. Previously, ACPICA would zero out the +buffer/string. Now, the operation is treated as a noop. Provides Windows +compatibility. ACPICA BZ 803. Lin Ming. + +Removed an extraneous error message for ASL constructs of the form +Store(LocalX,LocalX) when LocalX is uninitialized. These curious statements +are seen in many BIOSs and are once again treated as NOOPs and no error is +emitted when they are encountered. ACPICA BZ 785. + +Fixed an extraneous warning message if a _DSM reserved method returns a +Package object. _DSM can return any type of object, so validation on the +return type cannot be performed. ACPICA BZ 802. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 85.5K Code, 18.0K Data, 103.5K Total + Debug Version: 161.6K Code, 50.9K Data, 212.5K Total + Current Release: + Non-Debug Version: 85.6K Code, 18.0K Data, 103.6K Total + Debug Version: 161.7K Code, 50.9K Data, 212.6K Total + +2) iASL Compiler/Disassembler and Tools: + +iASL: Fixed a problem with the use of the Alias operator and Resource +Templates. The correct alias is now constructed and no error is emitted. +ACPICA BZ 738. + +iASL: Implemented the -I option to specify additional search directories for +include files. Allows multiple additional search paths for include files. +Directories are searched in the order specified on the command line (after +the local directory is searched.) ACPICA BZ 800. + +iASL: Fixed a problem where the full pathname for include files was not +emitted for warnings/errors. This caused the IDE support to not work +properly. ACPICA BZ 765. + +iASL: Implemented the -@ option to specify a Windows-style response file +containing additional command line options. ACPICA BZ 801. + +AcpiExec: Added support to load multiple AML files simultaneously (such as a +DSDT and multiple SSDTs). Also added support for wildcards within the AML +pathname. These features allow all machine tables to be easily loaded and +debugged together. ACPICA BZ 804. + +Disassembler: Added missing support for disassembly of HEST table Error Bank +subtables. + +---------------------------------------- +30 July 2009. Summary of changes for version 20090730: + +This release is available at www.acpica.org/downloads + +The ACPI 4.0 implementation for ACPICA is complete with this release. + +1) ACPI CA Core Subsystem: + +ACPI 4.0: Added header file support for all new and changed ACPI tables. +Completely new tables are: IBFT, IVRS, MSCT, and WAET. Tables that are new +for ACPI 4.0, but have previously been supported in ACPICA are: CPEP, BERT, +EINJ, ERST, and HEST. Other newly supported tables are: UEFI and WDAT. There +have been some ACPI 4.0 changes to other existing tables. Split the large +actbl1.h header into the existing actbl2.h header. ACPICA BZ 774. + +ACPI 4.0: Implemented predefined name validation for all new names. There are +31 new names in ACPI 4.0. The predefined validation module was split into two +files. The new file is namespace/nsrepair.c. ACPICA BZ 770. + +Implemented support for so-called "module-level executable code". This is +executable AML code that exists outside of any control method and is intended +to be executed at table load time. Although illegal since ACPI 2.0, this type +of code still exists and is apparently still being created. Blocks of this +code are now detected and executed as intended. Currently, the code blocks +must exist under either an If, Else, or While construct; these are the +typical cases seen in the field. ACPICA BZ 762. Lin Ming. + +Implemented an automatic dynamic repair for predefined names that return +nested Package objects. This applies to predefined names that are defined to +return a variable-length Package of sub-packages. If the number of sub- +packages is one, BIOS code is occasionally seen that creates a simple single +package with no sub-packages. This code attempts to fix the problem by +wrapping a new package object around the existing package. These methods can +be repaired: _ALR, _CSD, _HPX, _MLS, _PRT, _PSS, _TRT, and _TSS. ACPICA BZ +790. + +Fixed a regression introduced in 20090625 for the AcpiGetDevices interface. +The _HID/_CID matching was broken and no longer matched IDs correctly. ACPICA +BZ 793. + +Fixed a problem with AcpiReset where the reset would silently fail if the +register was one of the protected I/O ports. AcpiReset now bypasses the port +validation mechanism. This may eventually be driven into the AcpiRead/Write +interfaces. + +Fixed a regression related to the recent update of the AcpiRead/Write +interfaces. A sleep/suspend could fail if the optional PM2 Control register +does not exist during an attempt to write the Bus Master Arbitration bit. +(However, some hosts already delete the code that writes this bit, and the +code may in fact be obsolete at this date.) ACPICA BZ 799. + +Fixed a problem where AcpiTerminate could fault if inadvertently called twice +in succession. ACPICA BZ 795. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 84.7K Code, 17.8K Data, 102.5K Total + Debug Version: 160.5K Code, 50.6K Data, 211.1K Total + Current Release: + Non-Debug Version: 85.5K Code, 18.0K Data, 103.5K Total + Debug Version: 161.6K Code, 50.9K Data, 212.5K Total + +2) iASL Compiler/Disassembler and Tools: + +ACPI 4.0: Implemented disassembler support for all new ACPI tables and +changes to existing tables. ACPICA BZ 775. + +---------------------------------------- +25 June 2009. Summary of changes for version 20090625: + +This release is available at www.acpica.org/downloads + +The ACPI 4.0 Specification was released on June 16 and is available at +www.acpi.info. ACPICA implementation of ACPI 4.0 is underway and will +continue for the next few releases. + +1) ACPI CA Core Subsystem: + +ACPI 4.0: Implemented interpreter support for the IPMI operation region +address space. Includes support for bi-directional data buffers and an IPMI +address space handler (to be installed by an IPMI device driver.) ACPICA BZ +773. Lin Ming. + +ACPI 4.0: Added changes for existing ACPI tables - FACS and SRAT. Includes +support in both the header files and the disassembler. + +Completed a major update for the AcpiGetObjectInfo external interface. +Changes include: + - Support for variable, unlimited length HID, UID, and CID strings. + - Support Processor objects the same as Devices (HID,UID,CID,ADR,STA, etc.) + - Call the _SxW power methods on behalf of a device object. + - Determine if a device is a PCI root bridge. + - Change the ACPI_BUFFER parameter to ACPI_DEVICE_INFO. +These changes will require an update to all callers of this interface. See +the updated ACPICA Programmer Reference for details. One new source file has +been added - utilities/utids.c. ACPICA BZ 368, 780. + +Updated the AcpiRead and AcpiWrite external interfaces to support 64-bit +transfers. The Value parameter has been extended from 32 bits to 64 bits in +order to support new ACPI 4.0 tables. These changes will require an update to +all callers of these interfaces. See the ACPICA Programmer Reference for +details. ACPICA BZ 768. + +Fixed several problems with AcpiAttachData. The handler was not invoked when +the host node was deleted. The data sub-object was not automatically deleted +when the host node was deleted. The interface to the handler had an unused +parameter, this was removed. ACPICA BZ 778. + +Enhanced the function that dumps ACPI table headers. All non-printable +characters in the string fields are now replaced with '?' (Signature, OemId, +OemTableId, and CompilerId.) ACPI tables with non-printable characters in +these fields are occasionally seen in the field. ACPICA BZ 788. + +Fixed a problem with predefined method repair code where the code that +attempts to repair/convert an object of incorrect type is only executed on +the first time the predefined method is called. The mechanism that disables +warnings on subsequent calls was interfering with the repair mechanism. +ACPICA BZ 781. + +Fixed a possible memory leak in the predefined validation/repair code when a +buffer is automatically converted to an expected string object. + +Removed obsolete 16-bit files from the distribution and from the current git +tree head. ACPICA BZ 776. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 6.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and has a +much larger code and data size. + + Previous Release: + Non-Debug Version: 83.4K Code, 17.5K Data, 100.9K Total + Debug Version: 158.9K Code, 50.0K Data, 208.9K Total + Current Release: + Non-Debug Version: 84.7K Code, 17.8K Data, 102.5K Total + Debug Version: 160.5K Code, 50.6K Data, 211.1K Total + +2) iASL Compiler/Disassembler and Tools: + +ACPI 4.0: iASL and Disassembler - implemented support for the new IPMI +operation region keyword. ACPICA BZ 771, 772. Lin Ming. + +ACPI 4.0: iASL - implemented compile-time validation support for all new +predefined names and control methods (31 total). ACPICA BZ 769. + +---------------------------------------- 21 May 2009. Summary of changes for version 20090521: This release is available at www.acpica.org/downloads ==== //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/common/dmrestag.c#3 (text+ko) ==== @@ -387,7 +387,7 @@ static UINT32 AcpiGbl_NextResourceId = 0; static UINT8 AcpiGbl_NextPrefix = 0; -static UINT8 AcpiGbl_Prefix[ACPI_NUM_RES_PREFIX] = +static char AcpiGbl_Prefix[ACPI_NUM_RES_PREFIX] = {'Y','Z','J','K','X'}; ==== //depot/projects/vimage-commit2/src/sys/contrib/dev/acpica/common/dmtable.c#3 (text+ko) ==== @@ -132,6 +132,7 @@ static void AcpiDmCheckAscii ( UINT8 *Target, + char *RepairedName, UINT32 Count); UINT8 @@ -156,17 +157,18 @@ "Hardware Unit Definition", "Reserved Memory Region", "Root Port ATS Capability", + "Remapping Hardware Static Affinity", "Unknown SubTable Type" /* Reserved */ }; static const char *AcpiDmHestSubnames[] = { - "XPF Machine Check Exception", - "XPF Corrected Machine Check", - "NOT USED???", - "XPF Non-Maskable Interrupt", - "IPF Corrected Machine Check", - "IPF Corrected Platform Error", + "IA-32 Machine Check Exception", + "IA-32 Corrected Machine Check", + "IA-32 Non-Maskable Interrupt", + "Unknown SubTable Type", /* 3 - Reserved */ + "Unknown SubTable Type", /* 4 - Reserved */ + "Unknown SubTable Type", /* 5 - Reserved */ "PCI Express Root Port AER", "PCI Express AER (AER Endpoint)", "PCI Express/PCI-X Bridge AER", @@ -208,7 +210,15 @@ "Unknown SubTable Type" /* Reserved */ }; +static const char *AcpiDmIvrsSubnames[] = +{ + "Hardware Definition Block", + "Memory Definition Block", + "Unknown SubTable Type" /* Reserved */ +}; + + #define ACPI_FADT_PM_RESERVED 8 static const char *AcpiDmFadtProfiles[] = @@ -224,11 +234,12 @@ "Unknown Profile Type" }; - /******************************************************************************* * * ACPI Table Data, indexed by signature. * + * Each entry contains: Signature, Table Info, Handler, Description + * * Simple tables have only a TableInfo structure, complex tables have a handler. * This table must be NULL terminated. RSDP and FACS are special-cased * elsewhere. @@ -249,8 +260,10 @@ {ACPI_SIG_FADT, NULL, AcpiDmDumpFadt, "Fixed ACPI Description Table"}, {ACPI_SIG_HEST, NULL, AcpiDmDumpHest, "Hardware Error Source Table"}, {ACPI_SIG_HPET, AcpiDmTableInfoHpet, NULL, "High Precision Event Timer table"}, + {ACPI_SIG_IVRS, NULL, AcpiDmDumpIvrs, "I/O Virtualization Reporting Structure"}, {ACPI_SIG_MADT, NULL, AcpiDmDumpMadt, "Multiple APIC Description Table"}, {ACPI_SIG_MCFG, NULL, AcpiDmDumpMcfg, "Memory Mapped Configuration table"}, + {ACPI_SIG_MSCT, NULL, AcpiDmDumpMsct, "Maximum System Characteristics Table"}, {ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, "Root System Description Table"}, {ACPI_SIG_SBST, AcpiDmTableInfoSbst, NULL, "Smart Battery Specification Table"}, {ACPI_SIG_SLIC, AcpiDmTableInfoSlic, NULL, "Software Licensing Description Table"}, @@ -259,6 +272,9 @@ {ACPI_SIG_SPMI, AcpiDmTableInfoSpmi, NULL, "Server Platform Management Interface table"}, {ACPI_SIG_SRAT, NULL, AcpiDmDumpSrat, "System Resource Affinity Table"}, {ACPI_SIG_TCPA, AcpiDmTableInfoTcpa, NULL, "Trusted Computing Platform Alliance table"}, + {ACPI_SIG_UEFI, AcpiDmTableInfoUefi, NULL, "UEFI Boot Optimization Table"}, + {ACPI_SIG_WAET, AcpiDmTableInfoWaet, NULL, "Windows ACPI Emulated Devices Table"}, + {ACPI_SIG_WDAT, NULL, AcpiDmDumpWdat, "Watchdog Action Table"}, {ACPI_SIG_WDRT, AcpiDmTableInfoWdrt, NULL, "Watchdog Resource Table"}, {ACPI_SIG_XSDT, NULL, AcpiDmDumpXsdt, "Extended System Description Table"}, {NULL, NULL, NULL, NULL} @@ -511,7 +527,9 @@ UINT8 Temp8; UINT16 Temp16; ACPI_DMTABLE_DATA *TableData; + const char *Name; BOOLEAN LastOutputBlankLine = FALSE; + char RepairedName[8]; if (!Info) @@ -547,6 +565,7 @@ case ACPI_DMT_UINT8: case ACPI_DMT_CHKSUM: case ACPI_DMT_SPACEID: + case ACPI_DMT_IVRS: case ACPI_DMT_MADT: case ACPI_DMT_SRAT: case ACPI_DMT_ASF: @@ -577,6 +596,9 @@ case ACPI_DMT_NAME8: ByteLength = 8; break; + case ACPI_DMT_BUF16: + ByteLength = 16; + break; case ACPI_DMT_STRING: ByteLength = ACPI_STRLEN (ACPI_CAST_PTR (char, Target)) + 1; break; @@ -677,17 +699,28 @@ ACPI_FORMAT_UINT64 (ACPI_GET64 (Target))); break; + case ACPI_DMT_BUF16: + + /* Buffer of length 16 */ + + for (Temp8 = 0; Temp8 < 16; Temp8++) + { + AcpiOsPrintf ("%2.2X,", Target[Temp8]); + } + AcpiOsPrintf ("\n"); + break; + case ACPI_DMT_STRING: - AcpiOsPrintf ("%s\n", ACPI_CAST_PTR (char, Target)); + AcpiOsPrintf ("\"%s\"\n", ACPI_CAST_PTR (char, Target)); break; /* Fixed length ASCII name fields */ case ACPI_DMT_SIG: - AcpiDmCheckAscii (Target, 4); - AcpiOsPrintf ("\"%4.4s\" ", Target); + AcpiDmCheckAscii (Target, RepairedName, 4); + AcpiOsPrintf ("\"%.4s\" ", RepairedName); TableData = AcpiDmGetTableData (ACPI_CAST_PTR (char, Target)); if (TableData) { @@ -698,20 +731,20 @@ case ACPI_DMT_NAME4: - AcpiDmCheckAscii (Target, 4); - AcpiOsPrintf ("\"%4.4s\"\n", Target); + AcpiDmCheckAscii (Target, RepairedName, 4); + AcpiOsPrintf ("\"%.4s\"\n", RepairedName); break; case ACPI_DMT_NAME6: - AcpiDmCheckAscii (Target, 6); - AcpiOsPrintf ("\"%6.6s\"\n", Target); + AcpiDmCheckAscii (Target, RepairedName, 6); + AcpiOsPrintf ("\"%.6s\"\n", RepairedName); break; case ACPI_DMT_NAME8: - AcpiDmCheckAscii (Target, 8); - AcpiOsPrintf ("\"%8.8s\"\n", Target); + AcpiDmCheckAscii (Target, RepairedName, 8); + AcpiOsPrintf ("\"%.8s\"\n", RepairedName); break; /* Special Data Types */ @@ -742,8 +775,8 @@ /* Generic Address Structure */ AcpiOsPrintf ("<Generic Address Structure>\n"); - AcpiDmDumpTable (ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length, - CurrentOffset, Target, sizeof (ACPI_GENERIC_ADDRESS), AcpiDmTableInfoGas); + AcpiDmDumpTable (TableLength, CurrentOffset, Target, + sizeof (ACPI_GENERIC_ADDRESS), AcpiDmTableInfoGas); AcpiOsPrintf ("\n"); LastOutputBlankLine = TRUE; >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909132156.n8DLu7fa089387>