From owner-p4-projects@FreeBSD.ORG Fri Oct 2 20:23:08 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7943010656A4; Fri, 2 Oct 2009 20:23:08 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C7961065696 for ; Fri, 2 Oct 2009 20:23:08 +0000 (UTC) (envelope-from truncs@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 29D5A8FC17 for ; Fri, 2 Oct 2009 20:23:08 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n92KN8KZ070403 for ; Fri, 2 Oct 2009 20:23:08 GMT (envelope-from truncs@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n92KN7PY070401 for perforce@freebsd.org; Fri, 2 Oct 2009 20:23:07 GMT (envelope-from truncs@FreeBSD.org) Date: Fri, 2 Oct 2009 20:23:07 GMT Message-Id: <200910022023.n92KN7PY070401@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to truncs@FreeBSD.org using -f From: Aditya Sarawgi To: Perforce Change Reviews Cc: Subject: PERFORCE change 169156 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Oct 2009 20:23:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=169156 Change 169156 by truncs@aditya on 2009/10/02 20:22:14 IFC. Affected files ... .. //depot/projects/soc2009/soc_ext2fs/src/sys/amd64/acpica/acpi_machdep.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/amd64/acpica/madt.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/amd64/amd64/initcpu.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/amd64/amd64/machdep.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/amd64/amd64/pmap.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/amd64/amd64/trap.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/amd64/conf/GENERIC#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/amd64/conf/NOTES#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/amd64/include/acpica_machdep.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/amd64/include/apm_bios.h#1 branch .. //depot/projects/soc2009/soc_ext2fs/src/sys/amd64/include/cpufunc.h#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/amd64/include/param.h#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/amd64/pci/pci_cfgreg.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/arm/arm/cpufunc.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/arm/arm/identcpu.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/arm/include/md_var.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/arm/include/param.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/arm/xscale/xscalereg.h#2 delete .. //depot/projects/soc2009/soc_ext2fs/src/sys/arm/xscale/xscalevar.h#2 delete .. //depot/projects/soc2009/soc_ext2fs/src/sys/boot/forth/loader.conf#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/bsm/audit_kevents.h#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/cam/ata/ata_all.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/cam/cam_periph.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/cam/cam_xpt.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/cam/scsi/scsi_target.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/cddl/compat/opensolaris/sys/vfs.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/fletcher.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/compat/freebsd32/freebsd32_proto.h#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/compat/freebsd32/freebsd32_syscall.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/compat/freebsd32/freebsd32_syscalls.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/compat/freebsd32/freebsd32_sysent.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/compat/freebsd32/syscalls.master#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/compat/linux/linux_ioctl.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/compat/x86bios/x86bios.c#1 branch .. //depot/projects/soc2009/soc_ext2fs/src/sys/compat/x86bios/x86bios.h#1 branch .. //depot/projects/soc2009/soc_ext2fs/src/sys/compat/x86bios/x86bios_alloc.c#1 branch .. //depot/projects/soc2009/soc_ext2fs/src/sys/conf/NOTES#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/conf/files#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/conf/files.amd64#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/conf/files.i386#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/conf/files.pc98#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/conf/newvers.sh#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/conf/options#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/contrib/x86emu/x86emu.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/contrib/x86emu/x86emu_util.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/ddb/db_ps.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/acpi_support/acpi_aiboost.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/acpi_support/acpi_ibm.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/acpica/acpi.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/acpica/acpi_acad.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/acpica/acpi_video.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/acpica/acpivar.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/ae/if_ae.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/age/if_age.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/agp/agp_i810.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/alc/if_alc.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/ale/if_ale.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/amdtemp/amdtemp.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/asmc/asmc.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/asmc/asmcvar.h#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/ata/chipsets/ata-marvell.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/atkbdc/atkbd.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/ciss/ciss.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/ciss/cissreg.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/ciss/cissvar.h#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/de/if_de.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/de/if_devar.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/dpms/dpms.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/drm/r600_blit.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/drm/radeon_cs.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/drm/radeon_drv.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/drm/radeon_irq.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/drm/radeon_state.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/fb/s3_pci.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/fb/vesa.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/fb/vga.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/fxp/if_fxp.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/hwpmc/pmc_events.h#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/if_ndis/if_ndis.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/isp/isp.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/isp/isp_freebsd.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/isp/isp_stds.h#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/isp/isp_tpublic.h#2 delete .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/isp/ispmbox.h#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/jme/if_jme.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/kbd/kbd.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/lindev/full.c#1 branch .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/lindev/lindev.c#1 branch .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/lindev/lindev.h#1 branch .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/mii/e1000phy.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/mii/e1000phyreg.h#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/msk/if_msk.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/msk/if_mskreg.h#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/mwl/if_mwl.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/mxge/if_mxge.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/mxge/if_mxge_var.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/pci/pci.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/pci/pcireg.h#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/ppbus/vpo.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/sound/pci/es137x.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/sound/pci/es137x.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/sound/pci/hda/hda_reg.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/sound/pci/hda/hdac.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/sound/pci/t4dwave.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/syscons/scmouse.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/syscons/scterm-teken.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/syscons/syscons.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/syscons/syscons.h#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/twa/tw_cl_io.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/twa/tw_cl_share.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/twe/twe.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/twe/twevar.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/controller/atmegadci.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/controller/ehci.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/controller/ehci_pci.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/controller/usb_controller.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/net/if_axe.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/net/if_cdce.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/net/if_cdcereg.h#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/quirk/usb_quirk.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/serial/u3g.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/serial/uark.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/serial/ubsa.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/serial/ubser.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/serial/uch341.c#1 branch .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/serial/uchcom.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/serial/ucycom.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/serial/ufoma.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/serial/uftdi.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/serial/ugensa.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/serial/uipaq.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/serial/umct.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/serial/umodem.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/serial/umoscom.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/serial/uplcom.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/serial/usb_serial.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/serial/usb_serial.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/serial/uslcom.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/serial/uvscom.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/storage/umass.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/usb.h#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/usb_bus.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/usb_cdc.h#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/usb_device.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/usb_device.h#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/usb_hub.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/usb_transfer.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/dev/usb/usbdevs#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/fs/fifofs/fifo_vnops.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/fs/nfs/nfs_commonacl.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/fs/procfs/procfs.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/fs/procfs/procfs.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/fs/procfs/procfs_osrel.c#1 branch .. //depot/projects/soc2009/soc_ext2fs/src/sys/geom/part/g_part.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/geom/part/g_part_ebr.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/i386/acpica/acpi_machdep.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/i386/acpica/madt.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/i386/conf/GENERIC#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/i386/conf/NOTES#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/i386/i386/initcpu.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/i386/i386/machdep.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/i386/i386/pmap.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/i386/i386/trap.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/i386/i386/vm_machdep.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/i386/include/acpica_machdep.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/i386/include/apm_bios.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/i386/include/cpufunc.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/i386/include/param.h#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/i386/pci/pci_cfgreg.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/i386/xen/xen_machdep.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/ia64/include/param.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/init_main.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/init_sysent.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/kern_descrip.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/kern_event.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/kern_exec.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/kern_mib.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/kern_proc.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/kern_rwlock.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/kern_sig.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/kern_sx.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/kern_umtx.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/sched_ule.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/subr_acl_nfs4.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/subr_acl_posix1e.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/subr_bus.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/subr_devstat.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/subr_smp.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/syscalls.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/syscalls.master#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/uipc_socket.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/uipc_syscalls.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/vfs_default.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/vfs_export.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/vfs_subr.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/kern/vfs_vnops.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/mips/include/param.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/modules/Makefile#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/modules/acpi/acpi/Makefile#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/modules/lindev/Makefile#1 branch .. //depot/projects/soc2009/soc_ext2fs/src/sys/modules/nfslockd/Makefile#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/modules/procfs/Makefile#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/modules/usb/Makefile#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/modules/usb/uch341/Makefile#1 branch .. //depot/projects/soc2009/soc_ext2fs/src/sys/modules/x86bios/Makefile#1 branch .. //depot/projects/soc2009/soc_ext2fs/src/sys/modules/x86emu/Makefile#2 delete .. //depot/projects/soc2009/soc_ext2fs/src/sys/net/flowtable.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/net/flowtable.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/net/if.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/net/if_llatbl.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/net/if_var.h#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/net/route.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/net80211/ieee80211.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/net80211/ieee80211_hwmp.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/net80211/ieee80211_mesh.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/net80211/ieee80211_mesh.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/if_ether.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/in.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/in_mcast.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/in_pcb.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/in_proto.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/raw_ip.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/sctp_asconf.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/sctp_bsd_addr.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/sctp_input.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/sctp_os_bsd.h#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/sctp_output.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/sctp_pcb.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/sctp_pcb.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/sctp_structs.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/sctp_sysctl.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/sctp_timer.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/sctp_usrreq.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/sctputil.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/tcp_subr.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/tcp_timer.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/tcp_timer.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/tcp_usrreq.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet/tcp_var.h#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet6/in6.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet6/in6_ifattach.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netinet6/sctp6_usrreq.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netipsec/key.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/netipsec/xform_esp.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/nfsclient/nfs_vfsops.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/nfsserver/nfs_serv.c#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/pc98/conf/GENERIC#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/pc98/conf/NOTES#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/pci/intpm.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/powerpc/include/param.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/rpc/rpcsec_gss/svc_rpcsec_gss.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/sparc64/conf/GENERIC#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/sparc64/include/param.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/sun4v/include/param.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/sys/ata.h#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/sys/bus.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/sys/event.h#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/sys/fcntl.h#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/sys/kbio.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/sys/mman.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/sys/param.h#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/sys/pmc.h#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/sys/rwlock.h#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/sys/smp.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/sys/sx.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/sys/syscall.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/sys/syscall.mk#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/sys/sysproto.h#5 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/sys/systm.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/sys/vnode.h#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/teken/sequences#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/teken/teken.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/teken/teken.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/teken/teken_demo.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/teken/teken_scs.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/teken/teken_stress.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/teken/teken_subr.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/teken/teken_subr_compat.h#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/ufs/ufs/ufs_gjournal.c#2 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/ufs/ufs/ufs_vnops.c#4 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/vm/vm_map.c#3 integrate .. //depot/projects/soc2009/soc_ext2fs/src/sys/vm/vm_mmap.c#4 integrate Differences ... ==== //depot/projects/soc2009/soc_ext2fs/src/sys/amd64/acpica/acpi_machdep.c#3 (text+ko) ==== @@ -25,20 +25,42 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/acpica/acpi_machdep.c,v 1.21 2009/06/05 18:44:36 jkim Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/acpica/acpi_machdep.c,v 1.23 2009/09/27 14:00:16 jkim Exp $"); #include #include #include #include #include +#include +#include #include +#include +#include #include #include +/* + * APM driver emulation + */ + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include + SYSCTL_DECL(_debug_acpi); int acpi_resume_beep; @@ -50,7 +72,432 @@ TUNABLE_INT("hw.acpi.reset_video", &acpi_reset_video); static int intr_model = ACPI_INTR_PIC; -static struct apm_clone_data acpi_clone; +static int apm_active; +static struct clonedevs *apm_clones; + +MALLOC_DEFINE(M_APMDEV, "apmdev", "APM device emulation"); + +static d_open_t apmopen; +static d_close_t apmclose; +static d_write_t apmwrite; +static d_ioctl_t apmioctl; +static d_poll_t apmpoll; +static d_kqfilter_t apmkqfilter; +static void apmreadfiltdetach(struct knote *kn); +static int apmreadfilt(struct knote *kn, long hint); +static struct filterops apm_readfiltops = { + .f_isfd = 1, + .f_detach = apmreadfiltdetach, + .f_event = apmreadfilt, +}; + +static struct cdevsw apm_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_TRACKCLOSE | D_NEEDMINOR, + .d_open = apmopen, + .d_close = apmclose, + .d_write = apmwrite, + .d_ioctl = apmioctl, + .d_poll = apmpoll, + .d_name = "apm", + .d_kqfilter = apmkqfilter +}; + +static int +acpi_capm_convert_battstate(struct acpi_battinfo *battp) +{ + int state; + + state = APM_UNKNOWN; + + if (battp->state & ACPI_BATT_STAT_DISCHARG) { + if (battp->cap >= 50) + state = 0; /* high */ + else + state = 1; /* low */ + } + if (battp->state & ACPI_BATT_STAT_CRITICAL) + state = 2; /* critical */ + if (battp->state & ACPI_BATT_STAT_CHARGING) + state = 3; /* charging */ + + /* If still unknown, determine it based on the battery capacity. */ + if (state == APM_UNKNOWN) { + if (battp->cap >= 50) + state = 0; /* high */ + else + state = 1; /* low */ + } + + return (state); +} + +static int +acpi_capm_convert_battflags(struct acpi_battinfo *battp) +{ + int flags; + + flags = 0; + + if (battp->cap >= 50) + flags |= APM_BATT_HIGH; + else { + if (battp->state & ACPI_BATT_STAT_CRITICAL) + flags |= APM_BATT_CRITICAL; + else + flags |= APM_BATT_LOW; + } + if (battp->state & ACPI_BATT_STAT_CHARGING) + flags |= APM_BATT_CHARGING; + if (battp->state == ACPI_BATT_STAT_NOT_PRESENT) + flags = APM_BATT_NOT_PRESENT; + + return (flags); +} + +static int +acpi_capm_get_info(apm_info_t aip) +{ + int acline; + struct acpi_battinfo batt; + + aip->ai_infoversion = 1; + aip->ai_major = 1; + aip->ai_minor = 2; + aip->ai_status = apm_active; + aip->ai_capabilities= 0xff00; /* unknown */ + + if (acpi_acad_get_acline(&acline)) + aip->ai_acline = APM_UNKNOWN; /* unknown */ + else + aip->ai_acline = acline; /* on/off */ + + if (acpi_battery_get_battinfo(NULL, &batt) != 0) { + aip->ai_batt_stat = APM_UNKNOWN; + aip->ai_batt_life = APM_UNKNOWN; + aip->ai_batt_time = -1; /* unknown */ + aip->ai_batteries = ~0U; /* unknown */ + } else { + aip->ai_batt_stat = acpi_capm_convert_battstate(&batt); + aip->ai_batt_life = batt.cap; + aip->ai_batt_time = (batt.min == -1) ? -1 : batt.min * 60; + aip->ai_batteries = acpi_battery_get_units(); + } + + return (0); +} + +static int +acpi_capm_get_pwstatus(apm_pwstatus_t app) +{ + device_t dev; + int acline, unit, error; + struct acpi_battinfo batt; + + if (app->ap_device != PMDV_ALLDEV && + (app->ap_device < PMDV_BATT0 || app->ap_device > PMDV_BATT_ALL)) + return (1); + + if (app->ap_device == PMDV_ALLDEV) + error = acpi_battery_get_battinfo(NULL, &batt); + else { + unit = app->ap_device - PMDV_BATT0; + dev = devclass_get_device(devclass_find("battery"), unit); + if (dev != NULL) + error = acpi_battery_get_battinfo(dev, &batt); + else + error = ENXIO; + } + if (error) + return (1); + + app->ap_batt_stat = acpi_capm_convert_battstate(&batt); + app->ap_batt_flag = acpi_capm_convert_battflags(&batt); + app->ap_batt_life = batt.cap; + app->ap_batt_time = (batt.min == -1) ? -1 : batt.min * 60; + + if (acpi_acad_get_acline(&acline)) + app->ap_acline = APM_UNKNOWN; + else + app->ap_acline = acline; /* on/off */ + + return (0); +} + +/* Create single-use devices for /dev/apm and /dev/apmctl. */ +static void +apm_clone(void *arg, struct ucred *cred, char *name, int namelen, + struct cdev **dev) +{ + int ctl_dev, unit; + + if (*dev != NULL) + return; + if (strcmp(name, "apmctl") == 0) + ctl_dev = TRUE; + else if (strcmp(name, "apm") == 0) + ctl_dev = FALSE; + else + return; + + /* Always create a new device and unit number. */ + unit = -1; + if (clone_create(&apm_clones, &apm_cdevsw, &unit, dev, 0)) { + if (ctl_dev) { + *dev = make_dev(&apm_cdevsw, unit, + UID_ROOT, GID_OPERATOR, 0660, "apmctl%d", unit); + } else { + *dev = make_dev(&apm_cdevsw, unit, + UID_ROOT, GID_OPERATOR, 0664, "apm%d", unit); + } + if (*dev != NULL) { + dev_ref(*dev); + (*dev)->si_flags |= SI_CHEAPCLONE; + } + } +} + +/* Create a struct for tracking per-device suspend notification. */ +static struct apm_clone_data * +apm_create_clone(struct cdev *dev, struct acpi_softc *acpi_sc) +{ + struct apm_clone_data *clone; + + clone = malloc(sizeof(*clone), M_APMDEV, M_WAITOK); + clone->cdev = dev; + clone->acpi_sc = acpi_sc; + clone->notify_status = APM_EV_NONE; + bzero(&clone->sel_read, sizeof(clone->sel_read)); + knlist_init_mtx(&clone->sel_read.si_note, &acpi_mutex); + + /* + * The acpi device is always managed by devd(8) and is considered + * writable (i.e., ack is required to allow suspend to proceed.) + */ + if (strcmp("acpi", devtoname(dev)) == 0) + clone->flags = ACPI_EVF_DEVD | ACPI_EVF_WRITE; + else + clone->flags = ACPI_EVF_NONE; + + ACPI_LOCK(acpi); + STAILQ_INSERT_TAIL(&acpi_sc->apm_cdevs, clone, entries); + ACPI_UNLOCK(acpi); + return (clone); +} + +static int +apmopen(struct cdev *dev, int flag, int fmt, struct thread *td) +{ + struct acpi_softc *acpi_sc; + struct apm_clone_data *clone; + + acpi_sc = devclass_get_softc(devclass_find("acpi"), 0); + clone = apm_create_clone(dev, acpi_sc); + dev->si_drv1 = clone; + + /* If the device is opened for write, record that. */ + if ((flag & FWRITE) != 0) + clone->flags |= ACPI_EVF_WRITE; + + return (0); +} + +static int +apmclose(struct cdev *dev, int flag, int fmt, struct thread *td) +{ + struct apm_clone_data *clone; + struct acpi_softc *acpi_sc; + + clone = dev->si_drv1; + acpi_sc = clone->acpi_sc; + + /* We are about to lose a reference so check if suspend should occur */ + if (acpi_sc->acpi_next_sstate != 0 && + clone->notify_status != APM_EV_ACKED) + acpi_AckSleepState(clone, 0); + + /* Remove this clone's data from the list and free it. */ + ACPI_LOCK(acpi); + STAILQ_REMOVE(&acpi_sc->apm_cdevs, clone, apm_clone_data, entries); + knlist_destroy(&clone->sel_read.si_note); + ACPI_UNLOCK(acpi); + free(clone, M_APMDEV); + destroy_dev_sched(dev); + return (0); +} + +static int +apmioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) +{ + int error; + struct apm_clone_data *clone; + struct acpi_softc *acpi_sc; + struct apm_info info; + struct apm_event_info *ev_info; + apm_info_old_t aiop; + + error = 0; + clone = dev->si_drv1; + acpi_sc = clone->acpi_sc; + + switch (cmd) { + case APMIO_SUSPEND: + if ((flag & FWRITE) == 0) + return (EPERM); + if (acpi_sc->acpi_next_sstate == 0) { + if (acpi_sc->acpi_suspend_sx != ACPI_STATE_S5) { + error = acpi_ReqSleepState(acpi_sc, + acpi_sc->acpi_suspend_sx); + } else { + printf( + "power off via apm suspend not supported\n"); + error = ENXIO; + } + } else + error = acpi_AckSleepState(clone, 0); + break; + case APMIO_STANDBY: + if ((flag & FWRITE) == 0) + return (EPERM); + if (acpi_sc->acpi_next_sstate == 0) { + if (acpi_sc->acpi_standby_sx != ACPI_STATE_S5) { + error = acpi_ReqSleepState(acpi_sc, + acpi_sc->acpi_standby_sx); + } else { + printf( + "power off via apm standby not supported\n"); + error = ENXIO; + } + } else + error = acpi_AckSleepState(clone, 0); + break; + case APMIO_NEXTEVENT: + printf("apm nextevent start\n"); + ACPI_LOCK(acpi); + if (acpi_sc->acpi_next_sstate != 0 && clone->notify_status == + APM_EV_NONE) { + ev_info = (struct apm_event_info *)addr; + if (acpi_sc->acpi_next_sstate <= ACPI_STATE_S3) + ev_info->type = PMEV_STANDBYREQ; + else + ev_info->type = PMEV_SUSPENDREQ; + ev_info->index = 0; + clone->notify_status = APM_EV_NOTIFIED; + printf("apm event returning %d\n", ev_info->type); + } else + error = EAGAIN; + ACPI_UNLOCK(acpi); + break; + case APMIO_GETINFO_OLD: + if (acpi_capm_get_info(&info)) + error = ENXIO; + aiop = (apm_info_old_t)addr; + aiop->ai_major = info.ai_major; + aiop->ai_minor = info.ai_minor; + aiop->ai_acline = info.ai_acline; + aiop->ai_batt_stat = info.ai_batt_stat; + aiop->ai_batt_life = info.ai_batt_life; + aiop->ai_status = info.ai_status; + break; + case APMIO_GETINFO: + if (acpi_capm_get_info((apm_info_t)addr)) + error = ENXIO; + break; + case APMIO_GETPWSTATUS: + if (acpi_capm_get_pwstatus((apm_pwstatus_t)addr)) + error = ENXIO; + break; + case APMIO_ENABLE: + if ((flag & FWRITE) == 0) + return (EPERM); + apm_active = 1; + break; + case APMIO_DISABLE: + if ((flag & FWRITE) == 0) + return (EPERM); + apm_active = 0; + break; + case APMIO_HALTCPU: + break; + case APMIO_NOTHALTCPU: + break; + case APMIO_DISPLAY: + if ((flag & FWRITE) == 0) + return (EPERM); + break; + case APMIO_BIOS: + if ((flag & FWRITE) == 0) + return (EPERM); + bzero(addr, sizeof(struct apm_bios_arg)); + break; + default: + error = EINVAL; + break; + } + + return (error); +} + +static int +apmwrite(struct cdev *dev, struct uio *uio, int ioflag) +{ + return (uio->uio_resid); +} + +static int +apmpoll(struct cdev *dev, int events, struct thread *td) +{ + struct apm_clone_data *clone; + int revents; + + revents = 0; + ACPI_LOCK(acpi); + clone = dev->si_drv1; + if (clone->acpi_sc->acpi_next_sstate) + revents |= events & (POLLIN | POLLRDNORM); + else + selrecord(td, &clone->sel_read); + ACPI_UNLOCK(acpi); + return (revents); +} + +static int +apmkqfilter(struct cdev *dev, struct knote *kn) +{ + struct apm_clone_data *clone; + + ACPI_LOCK(acpi); + clone = dev->si_drv1; + kn->kn_hook = clone; + kn->kn_fop = &apm_readfiltops; + knlist_add(&clone->sel_read.si_note, kn, 0); + ACPI_UNLOCK(acpi); + return (0); +} + +static void +apmreadfiltdetach(struct knote *kn) +{ + struct apm_clone_data *clone; + + ACPI_LOCK(acpi); + clone = kn->kn_hook; + knlist_remove(&clone->sel_read.si_note, kn, 0); + ACPI_UNLOCK(acpi); +} + +static int +apmreadfilt(struct knote *kn, long hint) +{ + struct apm_clone_data *clone; + int sleeping; + + ACPI_LOCK(acpi); + clone = kn->kn_hook; + sleeping = clone->acpi_sc->acpi_next_sstate ? 1 : 0; + ACPI_UNLOCK(acpi); + return (sleeping); +} int acpi_machdep_init(device_t dev) @@ -59,14 +506,11 @@ sc = devclass_get_softc(devclass_find("acpi"), 0); - /* Create a fake clone for /dev/acpi. */ + /* Create a clone for /dev/acpi also. */ STAILQ_INIT(&sc->apm_cdevs); - acpi_clone.cdev = sc->acpi_dev_t; - acpi_clone.acpi_sc = sc; - ACPI_LOCK(acpi); - STAILQ_INSERT_TAIL(&sc->apm_cdevs, &acpi_clone, entries); - ACPI_UNLOCK(acpi); - sc->acpi_clone = &acpi_clone; + sc->acpi_clone = apm_create_clone(sc->acpi_dev_t, sc); + clone_setup(&apm_clones); + EVENTHANDLER_REGISTER(dev_clone, apm_clone, 0, 1000); acpi_install_wakeup_handler(sc); if (intr_model != ACPI_INTR_PIC) @@ -100,6 +544,246 @@ } /* + * Support for mapping ACPI tables during early boot. Currently this + * uses the crashdump map to map each table. However, the crashdump + * map is created in pmap_bootstrap() right after the direct map, so + * we should be able to just use pmap_mapbios() here instead. + * + * This makes the following assumptions about how we use this KVA: + * pages 0 and 1 are used to map in the header of each table found via + * the RSDT or XSDT and pages 2 to n are used to map in the RSDT or + * XSDT. This has to use 2 pages for the table headers in case a + * header spans a page boundary. + * + * XXX: We don't ensure the table fits in the available address space + * in the crashdump map. + */ + +/* + * Map some memory using the crashdump map. 'offset' is an offset in + * pages into the crashdump map to use for the start of the mapping. + */ +static void * +table_map(vm_paddr_t pa, int offset, vm_offset_t length) +{ + vm_offset_t va, off; + void *data; + + off = pa & PAGE_MASK; + length = roundup(length + off, PAGE_SIZE); + pa = pa & PG_FRAME; + va = (vm_offset_t)pmap_kenter_temporary(pa, offset) + + (offset * PAGE_SIZE); + data = (void *)(va + off); + length -= PAGE_SIZE; + while (length > 0) { + va += PAGE_SIZE; + pa += PAGE_SIZE; + length -= PAGE_SIZE; + pmap_kenter(va, pa); + invlpg(va); + } + return (data); +} + +/* Unmap memory previously mapped with table_map(). */ +static void +table_unmap(void *data, vm_offset_t length) +{ + vm_offset_t va, off; + + va = (vm_offset_t)data; + off = va & PAGE_MASK; + length = roundup(length + off, PAGE_SIZE); + va &= ~PAGE_MASK; + while (length > 0) { + pmap_kremove(va); + invlpg(va); + va += PAGE_SIZE; + length -= PAGE_SIZE; + } +} + +/* + * Map a table at a given offset into the crashdump map. It first + * maps the header to determine the table length and then maps the + * entire table. + */ +static void * +map_table(vm_paddr_t pa, int offset, const char *sig) +{ + ACPI_TABLE_HEADER *header; + vm_offset_t length; + void *table; + + header = table_map(pa, offset, sizeof(ACPI_TABLE_HEADER)); + if (strncmp(header->Signature, sig, ACPI_NAME_SIZE) != 0) { + table_unmap(header, sizeof(ACPI_TABLE_HEADER)); + return (NULL); + } + length = header->Length; + table_unmap(header, sizeof(ACPI_TABLE_HEADER)); + table = table_map(pa, offset, length); + if (ACPI_FAILURE(AcpiTbChecksum(table, length))) { + if (bootverbose) + printf("ACPI: Failed checksum for table %s\n", sig); + table_unmap(table, length); + return (NULL); + } + return (table); +} + +/* + * See if a given ACPI table is the requested table. Returns the + * length of the able if it matches or zero on failure. + */ +static int +probe_table(vm_paddr_t address, const char *sig) +{ + ACPI_TABLE_HEADER *table; + + table = table_map(address, 0, sizeof(ACPI_TABLE_HEADER)); + if (table == NULL) { + if (bootverbose) + printf("ACPI: Failed to map table at 0x%jx\n", + (uintmax_t)address); + return (0); + } + if (bootverbose) + printf("Table '%.4s' at 0x%jx\n", table->Signature, + (uintmax_t)address); + + if (strncmp(table->Signature, sig, ACPI_NAME_SIZE) != 0) { + table_unmap(table, sizeof(ACPI_TABLE_HEADER)); + return (0); + } + table_unmap(table, sizeof(ACPI_TABLE_HEADER)); + return (1); +} + +/* + * Try to map a table at a given physical address previously returned + * by acpi_find_table(). + */ +void * +acpi_map_table(vm_paddr_t pa, const char *sig) +{ + + return (map_table(pa, 0, sig)); +} + +/* Unmap a table previously mapped via acpi_map_table(). */ +void +acpi_unmap_table(void *table) +{ + ACPI_TABLE_HEADER *header; + + header = (ACPI_TABLE_HEADER *)table; + table_unmap(table, header->Length); +} + +/* + * Return the physical address of the requested table or zero if one + * is not found. + */ +vm_paddr_t +acpi_find_table(const char *sig) +{ + ACPI_PHYSICAL_ADDRESS rsdp_ptr; + ACPI_TABLE_RSDP *rsdp; + ACPI_TABLE_RSDT *rsdt; + ACPI_TABLE_XSDT *xsdt; + ACPI_TABLE_HEADER *table; + vm_paddr_t addr; + int i, count; + + if (resource_disabled("acpi", 0)) + return (0); + + /* + * Map in the RSDP. Since ACPI uses AcpiOsMapMemory() which in turn + * calls pmap_mapbios() to find the RSDP, we assume that we can use + * pmap_mapbios() to map the RSDP. + */ + if ((rsdp_ptr = AcpiOsGetRootPointer()) == 0) + return (0); + rsdp = pmap_mapbios(rsdp_ptr, sizeof(ACPI_TABLE_RSDP)); + if (rsdp == NULL) { + if (bootverbose) + printf("ACPI: Failed to map RSDP\n"); + return (0); + } + + /* + * For ACPI >= 2.0, use the XSDT if it is available. + * Otherwise, use the RSDT. We map the XSDT or RSDT at page 2 + * in the crashdump area. Pages 0 and 1 are used to map in the + * headers of candidate ACPI tables. + */ + addr = 0; + if (rsdp->Revision >= 2 && rsdp->XsdtPhysicalAddress != 0) { + /* + * AcpiOsGetRootPointer only verifies the checksum for + * the version 1.0 portion of the RSDP. Version 2.0 has + * an additional checksum that we verify first. + */ + if (AcpiTbChecksum((UINT8 *)rsdp, ACPI_RSDP_XCHECKSUM_LENGTH)) { + if (bootverbose) + printf("ACPI: RSDP failed extended checksum\n"); + return (0); + } + xsdt = map_table(rsdp->XsdtPhysicalAddress, 2, ACPI_SIG_XSDT); + if (xsdt == NULL) { + if (bootverbose) + printf("ACPI: Failed to map XSDT\n"); + return (0); + } + count = (xsdt->Header.Length - sizeof(ACPI_TABLE_HEADER)) / + sizeof(UINT64); >>> TRUNCATED FOR MAIL (1000 lines) <<<