Date: Thu, 15 Jan 2004 08:44:50 -0800 (PST) From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 45394 for review Message-ID: <200401151644.i0FGioeO003901@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=45394 Change 45394 by sam@sam_ebb on 2004/01/15 08:43:54 IFC Affected files ... .. //depot/projects/netperf+sockets/sys/alpha/include/sysarch.h#2 integrate .. //depot/projects/netperf+sockets/sys/amd64/include/sysarch.h#2 integrate .. //depot/projects/netperf+sockets/sys/boot/forth/beastie.4th#4 integrate .. //depot/projects/netperf+sockets/sys/boot/i386/cdboot/cdboot.s#3 integrate .. //depot/projects/netperf+sockets/sys/compat/linprocfs/linprocfs.c#4 integrate .. //depot/projects/netperf+sockets/sys/compat/linux/linux_util.c#2 integrate .. //depot/projects/netperf+sockets/sys/compat/ndis/kern_ndis.c#11 integrate .. //depot/projects/netperf+sockets/sys/compat/ndis/ndis_var.h#9 integrate .. //depot/projects/netperf+sockets/sys/compat/ndis/pe_var.h#3 integrate .. //depot/projects/netperf+sockets/sys/compat/ndis/subr_hal.c#3 integrate .. //depot/projects/netperf+sockets/sys/compat/ndis/subr_ndis.c#11 integrate .. //depot/projects/netperf+sockets/sys/compat/ndis/subr_ntoskrnl.c#8 integrate .. //depot/projects/netperf+sockets/sys/compat/ndis/subr_pe.c#6 integrate .. //depot/projects/netperf+sockets/sys/conf/files#6 integrate .. //depot/projects/netperf+sockets/sys/conf/files.alpha#2 integrate .. //depot/projects/netperf+sockets/sys/conf/files.i386#4 integrate .. //depot/projects/netperf+sockets/sys/conf/files.ia64#4 integrate .. //depot/projects/netperf+sockets/sys/conf/files.pc98#3 integrate .. //depot/projects/netperf+sockets/sys/conf/files.powerpc#2 integrate .. //depot/projects/netperf+sockets/sys/conf/files.sparc64#3 integrate .. //depot/projects/netperf+sockets/sys/conf/kern.post.mk#5 integrate .. //depot/projects/netperf+sockets/sys/conf/majors#4 integrate .. //depot/projects/netperf+sockets/sys/conf/newvers.sh#3 integrate .. //depot/projects/netperf+sockets/sys/conf/options.i386#5 integrate .. //depot/projects/netperf+sockets/sys/contrib/dev/acpica/exstore.c#3 integrate .. //depot/projects/netperf+sockets/sys/dev/acpica/Osd/OsdTable.c#2 integrate .. //depot/projects/netperf+sockets/sys/dev/acpica/acpi.c#8 integrate .. //depot/projects/netperf+sockets/sys/dev/acpica/acpi_thermal.c#4 integrate .. //depot/projects/netperf+sockets/sys/dev/acpica/acpivar.h#5 integrate .. //depot/projects/netperf+sockets/sys/dev/an/if_an.c#4 integrate .. //depot/projects/netperf+sockets/sys/dev/ata/ata-all.c#3 integrate .. //depot/projects/netperf+sockets/sys/dev/ata/ata-all.h#3 integrate .. //depot/projects/netperf+sockets/sys/dev/ata/ata-card.c#3 integrate .. //depot/projects/netperf+sockets/sys/dev/ata/ata-cbus.c#2 integrate .. //depot/projects/netperf+sockets/sys/dev/ata/ata-chipset.c#5 integrate .. //depot/projects/netperf+sockets/sys/dev/ata/ata-disk.c#3 integrate .. //depot/projects/netperf+sockets/sys/dev/ata/ata-dma.c#3 integrate .. //depot/projects/netperf+sockets/sys/dev/ata/ata-isa.c#3 integrate .. //depot/projects/netperf+sockets/sys/dev/ata/ata-lowlevel.c#4 integrate .. //depot/projects/netperf+sockets/sys/dev/ata/ata-pci.c#4 integrate .. //depot/projects/netperf+sockets/sys/dev/ata/ata-queue.c#3 integrate .. //depot/projects/netperf+sockets/sys/dev/ata/ata-raid.c#3 integrate .. //depot/projects/netperf+sockets/sys/dev/ata/atapi-cam.c#3 integrate .. //depot/projects/netperf+sockets/sys/dev/ata/atapi-cd.c#3 integrate .. //depot/projects/netperf+sockets/sys/dev/ata/atapi-fd.c#3 integrate .. //depot/projects/netperf+sockets/sys/dev/ata/atapi-tape.c#3 integrate .. //depot/projects/netperf+sockets/sys/dev/awi/am79c930.c#2 integrate .. //depot/projects/netperf+sockets/sys/dev/awi/am79c930reg.h#2 integrate .. //depot/projects/netperf+sockets/sys/dev/awi/am79c930var.h#2 integrate .. //depot/projects/netperf+sockets/sys/dev/awi/awi.c#2 integrate .. //depot/projects/netperf+sockets/sys/dev/awi/awi_wep.c#2 delete .. //depot/projects/netperf+sockets/sys/dev/awi/awi_wicfg.c#2 delete .. //depot/projects/netperf+sockets/sys/dev/awi/awireg.h#2 integrate .. //depot/projects/netperf+sockets/sys/dev/awi/awivar.h#2 integrate .. //depot/projects/netperf+sockets/sys/dev/awi/if_awi_pccard.c#3 integrate .. //depot/projects/netperf+sockets/sys/dev/bge/if_bge.c#3 integrate .. //depot/projects/netperf+sockets/sys/dev/bge/if_bgereg.h#3 integrate .. //depot/projects/netperf+sockets/sys/dev/bktr/bktr_os.c#3 integrate .. //depot/projects/netperf+sockets/sys/dev/firewire/firewire.c#5 integrate .. //depot/projects/netperf+sockets/sys/dev/firewire/fwohci.c#5 integrate .. //depot/projects/netperf+sockets/sys/dev/firewire/if_fwe.c#4 integrate .. //depot/projects/netperf+sockets/sys/dev/firewire/sbp.c#4 integrate .. //depot/projects/netperf+sockets/sys/dev/ida/ida.c#2 integrate .. //depot/projects/netperf+sockets/sys/dev/ida/ida_disk.c#2 integrate .. //depot/projects/netperf+sockets/sys/dev/ida/ida_eisa.c#2 integrate .. //depot/projects/netperf+sockets/sys/dev/ida/ida_pci.c#2 integrate .. //depot/projects/netperf+sockets/sys/dev/ida/idaio.h#1 branch .. //depot/projects/netperf+sockets/sys/dev/ida/idareg.h#2 integrate .. //depot/projects/netperf+sockets/sys/dev/ida/idavar.h#2 integrate .. //depot/projects/netperf+sockets/sys/dev/idt/idt.c#4 integrate .. //depot/projects/netperf+sockets/sys/dev/if_ndis/if_ndis.c#10 integrate .. //depot/projects/netperf+sockets/sys/dev/if_ndis/if_ndisvar.h#5 integrate .. //depot/projects/netperf+sockets/sys/dev/ispfw/asm_12160.h#2 integrate .. //depot/projects/netperf+sockets/sys/dev/ispfw/asm_2200.h#2 integrate .. //depot/projects/netperf+sockets/sys/dev/ispfw/asm_2300.h#2 integrate .. //depot/projects/netperf+sockets/sys/dev/md/md.c#4 integrate .. //depot/projects/netperf+sockets/sys/dev/pci/pci_pci.c#2 integrate .. //depot/projects/netperf+sockets/sys/dev/pci/pci_user.c#2 integrate .. //depot/projects/netperf+sockets/sys/dev/pci/pcib_private.h#2 integrate .. //depot/projects/netperf+sockets/sys/dev/pdq/pdqvar.h#3 integrate .. //depot/projects/netperf+sockets/sys/dev/sound/pci/emu10k1.c#2 integrate .. //depot/projects/netperf+sockets/sys/dev/trm/trm.c#2 integrate .. //depot/projects/netperf+sockets/sys/dev/usb/uhci.c#3 integrate .. //depot/projects/netperf+sockets/sys/dev/usb/uhci_pci.c#3 integrate .. //depot/projects/netperf+sockets/sys/dev/usb/usb_quirks.c#2 integrate .. //depot/projects/netperf+sockets/sys/dev/usb/usbdevs#7 integrate .. //depot/projects/netperf+sockets/sys/dev/usb/usbdevs.h#7 integrate .. //depot/projects/netperf+sockets/sys/dev/usb/usbdevs_data.h#7 integrate .. //depot/projects/netperf+sockets/sys/fs/nullfs/null_vnops.c#3 integrate .. //depot/projects/netperf+sockets/sys/fs/smbfs/smbfs_smb.c#2 integrate .. //depot/projects/netperf+sockets/sys/fs/smbfs/smbfs_vnops.c#3 integrate .. //depot/projects/netperf+sockets/sys/geom/geom_subr.c#3 integrate .. //depot/projects/netperf+sockets/sys/gnu/dev/sound/pci/emu10k1-ac97.h#2 integrate .. //depot/projects/netperf+sockets/sys/gnu/dev/sound/pci/emu10k1-alsa.h#2 integrate .. //depot/projects/netperf+sockets/sys/gnu/dev/sound/pci/emu10k1.h#2 integrate .. //depot/projects/netperf+sockets/sys/i386/acpica/acpi_toshiba.c#1 branch .. //depot/projects/netperf+sockets/sys/i386/conf/NOTES#6 integrate .. //depot/projects/netperf+sockets/sys/i386/i386/pmap.c#7 integrate .. //depot/projects/netperf+sockets/sys/i386/include/sysarch.h#2 integrate .. //depot/projects/netperf+sockets/sys/ia64/include/cpufunc.h#3 integrate .. //depot/projects/netperf+sockets/sys/ia64/include/sysarch.h#4 integrate .. //depot/projects/netperf+sockets/sys/kern/init_main.c#2 integrate .. //depot/projects/netperf+sockets/sys/kern/kern_descrip.c#4 integrate .. //depot/projects/netperf+sockets/sys/kern/kern_fork.c#4 integrate .. //depot/projects/netperf+sockets/sys/kern/kern_intr.c#4 integrate .. //depot/projects/netperf+sockets/sys/kern/kern_sig.c#5 integrate .. //depot/projects/netperf+sockets/sys/kern/kern_thread.c#5 integrate .. //depot/projects/netperf+sockets/sys/kern/sys_pipe.c#4 integrate .. //depot/projects/netperf+sockets/sys/kern/tty.c#3 integrate .. //depot/projects/netperf+sockets/sys/kern/uipc_syscalls.c#7 integrate .. //depot/projects/netperf+sockets/sys/kern/uipc_usrreq.c#6 integrate .. //depot/projects/netperf+sockets/sys/kern/vfs_syscalls.c#4 integrate .. //depot/projects/netperf+sockets/sys/libkern/ffs.c#2 integrate .. //depot/projects/netperf+sockets/sys/libkern/ffsl.c#1 branch .. //depot/projects/netperf+sockets/sys/libkern/fls.c#1 branch .. //depot/projects/netperf+sockets/sys/libkern/flsl.c#1 branch .. //depot/projects/netperf+sockets/sys/modules/Makefile#5 integrate .. //depot/projects/netperf+sockets/sys/modules/acpi/Makefile#4 integrate .. //depot/projects/netperf+sockets/sys/modules/acpi/Makefile.inc#1 branch .. //depot/projects/netperf+sockets/sys/modules/acpi/acpi/Makefile#3 integrate .. //depot/projects/netperf+sockets/sys/modules/acpi/acpi_toshiba/Makefile#1 branch .. //depot/projects/netperf+sockets/sys/modules/awi/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/cx/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/drm/mga/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/drm/r128/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/drm/radeon/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/drm/sis/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/drm/tdfx/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/ida/Makefile#1 branch .. //depot/projects/netperf+sockets/sys/modules/ndis/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/netgraph/bluetooth/bluetooth/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/netgraph/bluetooth/bt3c/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/netgraph/bluetooth/h4/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/netgraph/bluetooth/hci/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/netgraph/bluetooth/l2cap/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/netgraph/bluetooth/socket/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/netgraph/bluetooth/ubt/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/netgraph/bluetooth/ubtbcmfw/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/netgraph/fec/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/sound/driver/emu10k1/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/ubsa/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/ucom/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/udf/Makefile#3 integrate .. //depot/projects/netperf+sockets/sys/modules/ufm/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/uftdi/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/umct/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/uplcom/Makefile#3 integrate .. //depot/projects/netperf+sockets/sys/modules/uvisor/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/modules/uvscom/Makefile#2 integrate .. //depot/projects/netperf+sockets/sys/net/if_atmsubr.c#3 integrate .. //depot/projects/netperf+sockets/sys/net/if_media.h#3 integrate .. //depot/projects/netperf+sockets/sys/net80211/ieee80211.c#4 integrate .. //depot/projects/netperf+sockets/sys/net80211/ieee80211.h#5 integrate .. //depot/projects/netperf+sockets/sys/net80211/ieee80211_input.c#4 integrate .. //depot/projects/netperf+sockets/sys/net80211/ieee80211_ioctl.c#7 integrate .. //depot/projects/netperf+sockets/sys/net80211/ieee80211_var.h#4 integrate .. //depot/projects/netperf+sockets/sys/netgraph/ng_ether.c#4 integrate .. //depot/projects/netperf+sockets/sys/netgraph/ng_rfc1490.c#2 integrate .. //depot/projects/netperf+sockets/sys/netgraph/ng_rfc1490.h#3 integrate .. //depot/projects/netperf+sockets/sys/netinet/in_pcb.c#3 integrate .. //depot/projects/netperf+sockets/sys/netinet/ip_icmp.c#4 integrate .. //depot/projects/netperf+sockets/sys/netinet/ip_output.c#3 integrate .. //depot/projects/netperf+sockets/sys/netinet/tcp.h#2 integrate .. //depot/projects/netperf+sockets/sys/netinet/tcp_input.c#6 integrate .. //depot/projects/netperf+sockets/sys/netinet/tcp_subr.c#7 integrate .. //depot/projects/netperf+sockets/sys/netinet/tcp_usrreq.c#5 integrate .. //depot/projects/netperf+sockets/sys/netinet/tcp_var.h#4 integrate .. //depot/projects/netperf+sockets/sys/netinet6/in6.c#3 integrate .. //depot/projects/netperf+sockets/sys/netinet6/in6_ifattach.c#3 integrate .. //depot/projects/netperf+sockets/sys/netinet6/in6_pcb.c#4 integrate .. //depot/projects/netperf+sockets/sys/netinet6/ipsec.c#3 integrate .. //depot/projects/netperf+sockets/sys/netkey/key.c#4 integrate .. //depot/projects/netperf+sockets/sys/pc98/conf/NOTES#5 integrate .. //depot/projects/netperf+sockets/sys/pc98/i386/machdep.c#4 integrate .. //depot/projects/netperf+sockets/sys/pci/if_dc.c#3 integrate .. //depot/projects/netperf+sockets/sys/pci/if_dcreg.h#3 integrate .. //depot/projects/netperf+sockets/sys/pci/ncr.c#2 integrate .. //depot/projects/netperf+sockets/sys/powerpc/include/nexusvar.h#2 integrate .. //depot/projects/netperf+sockets/sys/powerpc/include/openpicvar.h#2 integrate .. //depot/projects/netperf+sockets/sys/powerpc/powermac/ata_macio.c#3 integrate .. //depot/projects/netperf+sockets/sys/powerpc/powermac/hrowpic.c#3 integrate .. //depot/projects/netperf+sockets/sys/powerpc/powermac/openpic_macio.c#1 branch .. //depot/projects/netperf+sockets/sys/powerpc/powerpc/nexus.c#2 integrate .. //depot/projects/netperf+sockets/sys/powerpc/powerpc/openpic.c#3 integrate .. //depot/projects/netperf+sockets/sys/powerpc/psim/ata_iobus.c#2 integrate .. //depot/projects/netperf+sockets/sys/powerpc/psim/openpic_iobus.c#1 branch .. //depot/projects/netperf+sockets/sys/rpc/rpcclnt.c#3 integrate .. //depot/projects/netperf+sockets/sys/sparc64/include/ofw_machdep.h#2 integrate .. //depot/projects/netperf+sockets/sys/sparc64/include/sysarch.h#2 integrate .. //depot/projects/netperf+sockets/sys/sparc64/sparc64/ofw_machdep.c#3 integrate .. //depot/projects/netperf+sockets/sys/sys/filedesc.h#3 integrate .. //depot/projects/netperf+sockets/sys/sys/libkern.h#2 integrate .. //depot/projects/netperf+sockets/sys/vm/vm_contig.c#3 integrate .. //depot/projects/netperf+sockets/sys/vm/vm_extern.h#2 integrate .. //depot/projects/netperf+sockets/sys/vm/vm_kern.c#6 integrate .. //depot/projects/netperf+sockets/sys/vm/vm_page.c#5 integrate Differences ... ==== //depot/projects/netperf+sockets/sys/alpha/include/sysarch.h#2 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/alpha/include/sysarch.h,v 1.6 2002/03/20 18:58:45 obrien Exp $ + * $FreeBSD: src/sys/alpha/include/sysarch.h,v 1.7 2004/01/09 16:52:08 nectar Exp $ */ /* @@ -52,6 +52,7 @@ __BEGIN_DECLS int alpha_sethae(u_int64_t); +int sysarch(int, void *); __END_DECLS #endif ==== //depot/projects/netperf+sockets/sys/amd64/include/sysarch.h#2 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/sysarch.h,v 1.21 2003/10/23 06:06:14 peter Exp $ + * $FreeBSD: src/sys/amd64/include/sysarch.h,v 1.22 2004/01/09 16:52:08 nectar Exp $ */ /* @@ -50,9 +50,10 @@ __BEGIN_DECLS int amd64_get_fsbase(void **); +int amd64_get_gsbase(void **); int amd64_set_fsbase(void *); -int amd64_get_gsbase(void **); int amd64_set_gsbase(void *); +int sysarch(int, void *); __END_DECLS #endif ==== //depot/projects/netperf+sockets/sys/boot/forth/beastie.4th#4 (text+ko) ==== @@ -23,7 +23,7 @@ \ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF \ SUCH DAMAGE. \ -\ $FreeBSD: src/sys/boot/forth/beastie.4th,v 1.7 2003/10/28 17:18:42 scottl Exp $ +\ $FreeBSD: src/sys/boot/forth/beastie.4th,v 1.8 2004/01/09 19:20:47 scottl Exp $ marker task-beastie.4th @@ -228,6 +228,7 @@ s" acpi_load" unsetenv s" 1" s" hint.acpi.0.disabled" setenv s" 1" s" loader.acpi_disabled_by_user" setenv + s" 1" s" hint.apic.0.disabled" setenv then s" 0" s" hw.ata.ata_dma" setenv s" 0" s" hw.ata.atapi_dma" setenv ==== //depot/projects/netperf+sockets/sys/boot/i386/cdboot/cdboot.s#3 (text+ko) ==== @@ -13,7 +13,7 @@ # purpose. # -# $FreeBSD: src/sys/boot/i386/cdboot/cdboot.s,v 1.10 2003/12/11 22:42:50 jhb Exp $ +# $FreeBSD: src/sys/boot/i386/cdboot/cdboot.s,v 1.11 2004/01/12 20:34:42 jhb Exp $ # # This program is a freestanding boot program to load an a.out binary @@ -165,7 +165,7 @@ # mov DIR_SIZE(%bx),%eax # Read file length add $SECTOR_SIZE-1,%eax # Convert length to sectors - shr $11,%eax + shr $SECTOR_SHIFT,%eax cmp $BUFFER_LEN,%eax jbe load_sizeok mov $msg_load2big,%si # Error message @@ -400,6 +400,7 @@ # Trashes: EAX # read: push %si # Save + push %cx # Save since some BIOSs trash mov %eax,edd_lba # LBA to read from mov %ebx,%eax # Convert address shr $4,%eax # to segment @@ -413,7 +414,8 @@ int $0x13 # Call BIOS pop %dx # Restore jc read.fail # Worked? - pop %si # Restore + pop %cx # Restore + pop %si ret # Return read.fail: cmp $ERROR_TIMEOUT,%ah # Timeout? je read.retry # Yes, Retry. @@ -460,6 +462,7 @@ mov twiddle_chars,%bx # Address table inc %al # Next and $3,%al # char + mov %al,twiddle_index # Save index for next call xlat # Get char call putc # Output it mov $8,%al # Backspace ==== //depot/projects/netperf+sockets/sys/compat/linprocfs/linprocfs.c#4 (text+ko) ==== @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.80 2004/01/02 19:29:31 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linprocfs/linprocfs.c,v 1.81 2004/01/12 03:14:37 rwatson Exp $"); #include <sys/param.h> #include <sys/queue.h> @@ -352,7 +352,7 @@ /* resolve symlinks etc. in the emulation tree prefix */ NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, linux_emul_path, td); flep = NULL; - if (namei(&nd) != 0 || vn_fullpath(td, nd.ni_vp, &dlep, &flep) == -1) + if (namei(&nd) != 0 || vn_fullpath(td, nd.ni_vp, &dlep, &flep) != 0) lep = linux_emul_path; else lep = dlep; ==== //depot/projects/netperf+sockets/sys/compat/linux/linux_util.c#2 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_util.c,v 1.23 2003/06/10 21:27:40 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_util.c,v 1.24 2004/01/14 22:38:03 truckman Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -96,8 +96,6 @@ { struct nameidata nd; struct nameidata ndroot; - struct vattr vat; - struct vattr vatroot; int error; const char *prefix; char *ptr, *buf, *cp; @@ -169,17 +167,7 @@ goto keeporig; } - if ((error = VOP_GETATTR(nd.ni_vp, &vat, td->td_ucred, td)) != 0) { - goto bad; - } - - if ((error = VOP_GETATTR(ndroot.ni_vp, &vatroot, td->td_ucred, td)) - != 0) { - goto bad; - } - - if (vat.va_fsid == vatroot.va_fsid && - vat.va_fileid == vatroot.va_fileid) { + if (nd.ni_vp == ndroot.ni_vp) { error = ENOENT; goto bad; } ==== //depot/projects/netperf+sockets/sys/compat/ndis/kern_ndis.c#11 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/ndis/kern_ndis.c,v 1.23 2004/01/07 06:15:56 wpaul Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/ndis/kern_ndis.c,v 1.29 2004/01/13 22:49:45 obrien Exp $"); #include <sys/param.h> #include <sys/types.h> @@ -75,7 +75,6 @@ #include <compat/ndis/cfg_var.h> #include <dev/if_ndis/if_ndisvar.h> -#define __stdcall __attribute__((__stdcall__)) #define NDIS_DUMMY_PATH "\\\\some\\bogus\\path" __stdcall static void ndis_status_func(ndis_handle, ndis_status, @@ -151,7 +150,8 @@ ndis_miniport_block *block; block = adapter; - device_printf (block->nmb_dev, "status: %x\n", status); + if (block->nmb_ifp->if_flags & IFF_DEBUG) + device_printf (block->nmb_dev, "status: %x\n", status); return; } @@ -162,7 +162,8 @@ ndis_miniport_block *block; block = adapter; - device_printf (block->nmb_dev, "status complete\n"); + if (block->nmb_ifp->if_flags & IFF_DEBUG) + device_printf (block->nmb_dev, "status complete\n"); return; } @@ -201,7 +202,8 @@ ndis_miniport_block *block; block = adapter; - device_printf (block->nmb_dev, "reset done...\n"); + if (block->nmb_ifp->if_flags & IFF_DEBUG) + device_printf (block->nmb_dev, "reset done...\n"); return; } @@ -305,17 +307,17 @@ "NDIS API Version", "0x00050001", CTLFLAG_RD); /* Bus type (PCI, PCMCIA, etc...) */ - sprintf(buf, "%d\n", (int)sc->ndis_iftype); + sprintf(buf, "%d", (int)sc->ndis_iftype); ndis_add_sysctl(sc, "BusType", "Bus Type", buf, CTLFLAG_RD); if (sc->ndis_res_io != NULL) { - sprintf(buf, "0x%lx\n", rman_get_start(sc->ndis_res_io)); + sprintf(buf, "0x%lx", rman_get_start(sc->ndis_res_io)); ndis_add_sysctl(sc, "IOBaseAddress", "Base I/O Address", buf, CTLFLAG_RD); } if (sc->ndis_irq != NULL) { - sprintf(buf, "%lu\n", rman_get_start(sc->ndis_irq)); + sprintf(buf, "%lu", rman_get_start(sc->ndis_irq)); ndis_add_sysctl(sc, "InterruptNumber", "Interrupt Number", buf, CTLFLAG_RD); } @@ -600,6 +602,7 @@ priv = &(*p)->np_private; priv->npp_totlen = m0->m_pkthdr.len; priv->npp_packetooboffset = offsetof(ndis_packet, np_oob); + priv->npp_ndispktflags = NDIS_PACKET_ALLOCATED_BY_NDIS; for (m = m0; m != NULL; m = m->m_next) { if (m->m_len == 0) @@ -1080,6 +1083,8 @@ return(0); } +#define NDIS_LOADED 0x42534F44 + int ndis_load_driver(img, arg) vm_offset_t img; @@ -1098,22 +1103,34 @@ sc = arg; - /* Perform text relocation */ - if (pe_relocate(img)) - return(ENOEXEC); + /* + * Only perform the relocation/linking phase once + * since the binary image may be shared among multiple + * device instances. + */ - /* Dynamically link the NDIS.SYS routines -- required. */ - if (pe_patch_imports(img, "NDIS", ndis_functbl)) - return(ENOEXEC); + ptr = (uint32_t *)(img + 8); + if (*ptr != NDIS_LOADED) { + /* Perform text relocation */ + if (pe_relocate(img)) + return(ENOEXEC); - /* Dynamically link the HAL.dll routines -- also required. */ - if (pe_patch_imports(img, "HAL", hal_functbl)) - return(ENOEXEC); + /* Dynamically link the NDIS.SYS routines -- required. */ + if (pe_patch_imports(img, "NDIS", ndis_functbl)) + return(ENOEXEC); - /* Dynamically link ntoskrnl.exe -- optional. */ - if (pe_get_import_descriptor(img, &imp_desc, "ntoskrnl") == 0) { - if (pe_patch_imports(img, "ntoskrnl", ntoskrnl_functbl)) + /* Dynamically link the HAL.dll routines -- also required. */ + if (pe_patch_imports(img, "HAL", hal_functbl)) return(ENOEXEC); + + /* Dynamically link ntoskrnl.exe -- optional. */ + if (pe_get_import_descriptor(img, + &imp_desc, "ntoskrnl") == 0) { + if (pe_patch_imports(img, + "ntoskrnl", ntoskrnl_functbl)) + return(ENOEXEC); + } + *ptr = NDIS_LOADED; } /* Locate the driver entry point */ ==== //depot/projects/netperf+sockets/sys/compat/ndis/ndis_var.h#9 (text+ko) ==== @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/compat/ndis/ndis_var.h,v 1.12 2004/01/06 07:09:26 wpaul Exp $ + * $FreeBSD: src/sys/compat/ndis/ndis_var.h,v 1.15 2004/01/12 03:49:20 wpaul Exp $ */ #ifndef _NDIS_VAR_H_ @@ -443,7 +443,7 @@ struct ndis_80211_bssid_list_ex { uint32_t nblx_items; - ndis_wlan_bssid nblx_bssid[1]; + ndis_wlan_bssid_ex nblx_bssid[1]; }; typedef struct ndis_80211_bssid_list_ex ndis_80211_bssid_list_ex; @@ -808,7 +808,7 @@ */ struct ndis_miniport_interrupt { void *ni_introbj; - ndis_spin_lock ni_dpccountlock; + ndis_kspin_lock ni_dpccountlock; void *ni_rsvd; void *ni_isrfunc; void *ni_dpcfunc; @@ -919,6 +919,10 @@ #define NDIS_FLAGS_SENT_AT_DPC 0x00001000 #define NDIS_FLAGS_USES_SG_BUFFER_LIST 0x00002000 +#define NDIS_PACKET_WRAPPER_RESERVED 0x3F +#define NDIS_PACKET_CONTAINS_MEDIA_SPECIFIC_INFO 0x40 +#define NDIS_PACKET_ALLOCATED_BY_NDIS 0x80 + #define NDIS_PROTOCOL_ID_DEFAULT 0x00 #define NDIS_PROTOCOL_ID_TCP_IP 0x02 #define NDIS_PROTOCOL_ID_IPX 0x06 @@ -1157,6 +1161,14 @@ TAILQ_HEAD(nte_head, ndis_timer_entry); +struct ndis_fh { + void *nf_vp; + void *nf_map; + uint32_t nf_maplen; +}; + +typedef struct ndis_fh ndis_fh; + /* * The miniport block is basically the internal NDIS handle. We need * to define this because, unfortunately, it is not entirely opaque ==== //depot/projects/netperf+sockets/sys/compat/ndis/pe_var.h#3 (text+ko) ==== @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/compat/ndis/pe_var.h,v 1.3 2004/01/06 18:06:54 wpaul Exp $ + * $FreeBSD: src/sys/compat/ndis/pe_var.h,v 1.4 2004/01/13 22:49:45 obrien Exp $ */ #ifndef _PE_VAR_H_ @@ -408,6 +408,20 @@ typedef struct image_patch_table image_patch_table; +/* + * Note: Windows uses the _stdcall calling convention. This means + * that the callback functions provided in the function table must + * be declared using __attribute__((__stdcall__)), otherwise the + * Windows code will likely screw up the %esp register and cause + * us to jump to an invalid address when it returns. + */ + +#ifdef __amd64__ +#define __stdcall +#else +#define __stdcall __attribute__((__stdcall__)) +#endif + __BEGIN_DECLS extern int pe_get_dos_header(vm_offset_t, image_dos_header *); extern int pe_is_nt_image(vm_offset_t); ==== //depot/projects/netperf+sockets/sys/compat/ndis/subr_hal.c#3 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_hal.c,v 1.3 2004/01/03 09:20:48 wpaul Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_hal.c,v 1.6 2004/01/13 22:49:45 obrien Exp $"); #include <sys/param.h> #include <sys/types.h> @@ -55,7 +55,6 @@ #include <compat/ndis/hal_var.h> #include <compat/ndis/ntoskrnl_var.h> -#define __stdcall __attribute__((__stdcall__)) #define FUNC void(*)(void) __stdcall static void hal_stall_exec_cpu(uint32_t); @@ -82,6 +81,8 @@ __stdcall static uint8_t hal_irql(void); __stdcall static void dummy (void); +extern struct mtx_pool *ndis_mtxpool; + __stdcall static void hal_stall_exec_cpu(usecs) uint32_t usecs; @@ -211,7 +212,7 @@ __asm__ __volatile__ ("" : "=c" (lock)); - mtx_lock((struct mtx *)*lock); + mtx_pool_lock(ndis_mtxpool, (struct mtx *)*lock); return(0); } @@ -223,7 +224,7 @@ __asm__ __volatile__ ("" : "=c" (lock), "=d" (newiqrl)); - mtx_unlock((struct mtx *)*lock); + mtx_pool_unlock(ndis_mtxpool, (struct mtx *)*lock); return; } ==== //depot/projects/netperf+sockets/sys/compat/ndis/subr_ndis.c#11 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.30 2004/01/07 19:26:47 wpaul Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.37 2004/01/15 07:42:26 wpaul Exp $"); /* * This file implements a translation layer between the BSD networking @@ -65,6 +65,10 @@ #include <sys/smp.h> #include <sys/queue.h> #include <sys/taskqueue.h> +#include <sys/proc.h> +#include <sys/namei.h> +#include <sys/fcntl.h> +#include <sys/vnode.h> #include <net/if.h> #include <net/if_arp.h> @@ -96,10 +100,14 @@ #include <compat/ndis/cfg_var.h> #include <dev/if_ndis/if_ndisvar.h> -#define __stdcall __attribute__((__stdcall__)) #define FUNC void(*)(void) -static struct mtx ndis_interlock; +static struct mtx *ndis_interlock; +static char ndis_filepath[MAXPATHLEN]; +struct mtx_pool *ndis_mtxpool; + +SYSCTL_STRING(_hw, OID_AUTO, ndis_filepath, CTLFLAG_RW, ndis_filepath, + MAXPATHLEN, "Path used by NdisOpenFile() to search for files"); __stdcall static void ndis_initwrap(ndis_handle, ndis_driver_object *, void *, void *); @@ -255,6 +263,10 @@ void *, uint32_t); static void ndis_workfunc(void *, int); __stdcall static ndis_status ndis_sched_workitem(ndis_work_item *); +__stdcall static void ndis_pkt_to_pkt(ndis_packet *, uint32_t, uint32_t, + ndis_packet *, uint32_t, uint32_t *); +__stdcall static void ndis_pkt_to_pkt_safe(ndis_packet *, uint32_t, uint32_t, + ndis_packet *, uint32_t, uint32_t *, uint32_t); __stdcall static void dummy(void); /* @@ -270,16 +282,17 @@ int ndis_libinit() { - mtx_init(&ndis_interlock, "ndislock", MTX_NETWORK_LOCK, - MTX_DEF | MTX_RECURSE | MTX_DUPOK); - + strcpy(ndis_filepath, "/compat/ndis"); + ndis_mtxpool = mtx_pool_create("ndis mutex pool", + 1024, MTX_DEF | MTX_RECURSE | MTX_DUPOK);; + ndis_interlock = mtx_pool_alloc(ndis_mtxpool); return(0); } int ndis_libfini() { - mtx_destroy(&ndis_interlock); + mtx_pool_destroy(&ndis_mtxpool); return(0); } @@ -669,15 +682,7 @@ ndis_create_lock(lock) ndis_spin_lock *lock; { - struct mtx *mtx; - - mtx = malloc(sizeof(struct mtx), M_DEVBUF, M_NOWAIT|M_ZERO); - if (mtx == NULL) - return; - mtx_init(mtx, "ndislock", "ndis spin lock", - MTX_DEF | MTX_RECURSE | MTX_DUPOK); - lock->nsl_spinlock = (ndis_kspin_lock)mtx; - + lock->nsl_spinlock = (ndis_kspin_lock)mtx_pool_alloc(ndis_mtxpool); return; } @@ -685,13 +690,7 @@ ndis_destroy_lock(lock) ndis_spin_lock *lock; { - struct mtx *ndis_mtx; - - ndis_mtx = (struct mtx *)lock->nsl_spinlock; - mtx_destroy(ndis_mtx); - free(ndis_mtx, M_DEVBUF); - lock->nsl_spinlock = 0xdeadf00d; /* XXX */ - + /* We use a mutex pool, so this is a no-op. */ return; } @@ -699,32 +698,7 @@ ndis_lock(lock) ndis_spin_lock *lock; { - if (lock == NULL) - return; - /* - * Workaround for certain broken NDIS drivers. I have - * encountered one case where a driver creates a spinlock - * within its DriverEntry() routine, which is then destroyed - * in its MiniportHalt() routine. This is a bug, because - * MiniportHalt() is meant to only destroy what MiniportInit() - * creates. This leads to the following problem: - * DriverEntry() <- spinlock created - * MiniportInit() <- NIC initialized - * MiniportHalt() <- NIC halted, spinlock destroyed - * MiniportInit() <- NIC initialized, spinlock not recreated - * NdisAcquireSpinLock(boguslock) <- panic - * To work around this, we poison the spinlock on destroy, and - * if we try to re-acquire the poison pill^Wspinlock, we init - * it again so subsequent calls will work. - * - * Drivers that behave in this way are likely not officially - * certified by Microsoft, since their I would expect the - * Microsoft NDIS test tool to catch mistakes like this. - */ - if (lock->nsl_spinlock == 0xdeadf00d) - ndis_create_lock(lock); - mtx_lock((struct mtx *)lock->nsl_spinlock); - + mtx_pool_lock(ndis_mtxpool, (struct mtx *)lock->nsl_spinlock); return; } @@ -732,10 +706,7 @@ ndis_unlock(lock) ndis_spin_lock *lock; { - if (lock == NULL) - return; - mtx_unlock((struct mtx *)lock->nsl_spinlock); - + mtx_pool_unlock(ndis_mtxpool, (struct mtx *)lock->nsl_spinlock); return; } @@ -1101,7 +1072,8 @@ if (sc->ndis_res_io == NULL) return(NDIS_STATUS_FAILURE); - if (rman_get_size(sc->ndis_res_io) != numports) + /* Don't let the device map more ports than we have. */ + if (rman_get_size(sc->ndis_res_io) < numports) return(NDIS_STATUS_INVALID_LENGTH); *offset = (void *)rman_get_start(sc->ndis_res_io); @@ -1539,6 +1511,13 @@ pkt->np_private.npp_packetooboffset = offsetof(ndis_packet, np_oob); + /* + * We must initialize the packet flags correctly in order + * for the NDIS_SET_PACKET_MEDIA_SPECIFIC_INFO() and + * NDIS_GET_PACKET_MEDIA_SPECIFIC_INFO() to work correctly. + */ + pkt->np_private.npp_ndispktflags = NDIS_PACKET_ALLOCATED_BY_NDIS; + *packet = pkt; head->np_private.npp_count++; @@ -2086,13 +2065,13 @@ { ndis_list_entry *flink; - mtx_lock((struct mtx *)lock->nsl_spinlock); + mtx_pool_lock(ndis_mtxpool, (struct mtx *)lock->nsl_spinlock); flink = head->nle_flink; entry->nle_flink = flink; entry->nle_blink = head; flink->nle_blink = entry; head->nle_flink = entry; - mtx_unlock((struct mtx *)lock->nsl_spinlock); + mtx_pool_unlock(ndis_mtxpool, (struct mtx *)lock->nsl_spinlock); return(flink); } @@ -2105,12 +2084,12 @@ ndis_list_entry *flink; ndis_list_entry *entry; - mtx_lock((struct mtx *)lock->nsl_spinlock); + mtx_pool_lock(ndis_mtxpool, (struct mtx *)lock->nsl_spinlock); entry = head->nle_flink; flink = entry->nle_flink; head->nle_flink = flink; flink->nle_blink = head; - mtx_unlock((struct mtx *)lock->nsl_spinlock); + mtx_pool_unlock(ndis_mtxpool, (struct mtx *)lock->nsl_spinlock); return(entry); } @@ -2123,13 +2102,13 @@ { ndis_list_entry *blink; - mtx_lock((struct mtx *)lock->nsl_spinlock); + mtx_pool_lock(ndis_mtxpool, (struct mtx *)lock->nsl_spinlock); blink = head->nle_blink; entry->nle_flink = head; entry->nle_blink = blink; blink->nle_flink = entry; head->nle_blink = entry; - mtx_unlock((struct mtx *)lock->nsl_spinlock); + mtx_pool_unlock(ndis_mtxpool, (struct mtx *)lock->nsl_spinlock); return(blink); } @@ -2149,9 +2128,9 @@ sc = (struct ndis_softc *)intr->ni_block->nmb_ifp; sync = syncfunc; - mtx_lock(&sc->ndis_intrmtx); + mtx_pool_lock(ndis_mtxpool, sc->ndis_intrmtx); rval = sync(syncctx); - mtx_unlock(&sc->ndis_intrmtx); + mtx_pool_unlock(ndis_mtxpool, sc->ndis_intrmtx); return(rval); } @@ -2323,12 +2302,50 @@ ndis_physaddr highestaddr; { char *afilename = NULL; + struct thread *td = curthread; + struct nameidata nd; + int flags, error; + struct vattr vat; + struct vattr *vap = &vat; + ndis_fh *fh; + char path[MAXPATHLEN]; - ndis_unicode_to_ascii(filename->nus_buf, filename->nus_len, &afilename); - printf("ndis_open_file(\"%s\", %ju)\n", afilename, - highestaddr.np_quad); + ndis_unicode_to_ascii(filename->nus_buf, + filename->nus_len, &afilename); + + sprintf(path, "%s/%s", ndis_filepath, afilename); free(afilename, M_DEVBUF); - *status = NDIS_STATUS_FILE_NOT_FOUND; + + fh = malloc(sizeof(ndis_fh), M_TEMP, M_NOWAIT); + if (fh == NULL) { + *status = NDIS_STATUS_RESOURCES; + return; + } + + mtx_lock(&Giant); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, path, td); + + flags = FREAD; + error = vn_open(&nd, &flags, 0, -1); + if (error) { + mtx_unlock(&Giant); + *status = NDIS_STATUS_FILE_NOT_FOUND; + free(fh, M_TEMP); + return; + } + + NDFREE(&nd, NDF_ONLY_PNBUF); + + /* Get the file size. */ + VOP_GETATTR(nd.ni_vp, vap, NOCRED, td); + VOP_UNLOCK(nd.ni_vp, 0, td); + mtx_unlock(&Giant); + + fh->nf_vp = nd.ni_vp; + fh->nf_map = NULL; + *filehandle = fh; + *filelength = fh->nf_maplen = vap->va_size & 0xFFFFFFFF; + *status = NDIS_STATUS_SUCCESS; return; } @@ -2338,8 +2355,46 @@ void **mappedbuffer; ndis_handle filehandle; { + ndis_fh *fh; + struct thread *td = curthread; + int error, resid; + + if (filehandle == NULL) { + *status = NDIS_STATUS_FAILURE; + return; + } + + fh = (ndis_fh *)filehandle; + + if (fh->nf_vp == NULL) { + *status = NDIS_STATUS_FAILURE; + return; + } - *status = NDIS_STATUS_ALREADY_MAPPED; + if (fh->nf_map != NULL) { + *status = NDIS_STATUS_ALREADY_MAPPED; + return; + } + + fh->nf_map = malloc(fh->nf_maplen, M_DEVBUF, M_NOWAIT); + + if (fh->nf_map == NULL) { + *status = NDIS_STATUS_RESOURCES; + return; + } + + mtx_lock(&Giant); + error = vn_rdwr(UIO_READ, fh->nf_vp, fh->nf_map, fh->nf_maplen, 0, + UIO_SYSSPACE, 0, td->td_ucred, NOCRED, &resid, td); + mtx_unlock(&Giant); + + if (error) + *status = NDIS_STATUS_FAILURE; + else { + *status = NDIS_STATUS_SUCCESS; + *mappedbuffer = fh->nf_map; + } + return; } @@ -2347,6 +2402,14 @@ ndis_unmap_file(filehandle) ndis_handle filehandle; { + ndis_fh *fh; + fh = (ndis_fh *)filehandle; + + if (fh->nf_map == NULL) + return; + free(fh->nf_map, M_DEVBUF); + fh->nf_map = NULL; + return; } @@ -2354,18 +2417,36 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<<
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401151644.i0FGioeO003901>