From owner-p4-projects@FreeBSD.ORG Tue May 30 23:39:35 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 023C116A580; Tue, 30 May 2006 23:39:35 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1658216A4A5 for ; Tue, 30 May 2006 23:39:31 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2B1C43D55 for ; Tue, 30 May 2006 23:39:30 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k4UNcBRS089866 for ; Tue, 30 May 2006 23:38:11 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k4UNc9AX089851 for perforce@freebsd.org; Tue, 30 May 2006 23:38:09 GMT (envelope-from imp@freebsd.org) Date: Tue, 30 May 2006 23:38:09 GMT Message-Id: <200605302338.k4UNc9AX089851@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 98170 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: Tue, 30 May 2006 23:39:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=98170 Change 98170 by imp@imp_harmony on 2006/05/30 23:37:34 IFC @98168 Affected files ... .. //depot/projects/arm/src/sys/Makefile#6 integrate .. //depot/projects/arm/src/sys/amd64/amd64/busdma_machdep.c#8 integrate .. //depot/projects/arm/src/sys/arm/arm/elf_trampoline.c#6 integrate .. //depot/projects/arm/src/sys/arm/arm/pmap.c#16 integrate .. //depot/projects/arm/src/sys/arm/sa11x0/assabet_machdep.c#4 integrate .. //depot/projects/arm/src/sys/arm/sa11x0/sa11x0_var.h#3 integrate .. //depot/projects/arm/src/sys/cam/cam_xpt.c#5 integrate .. //depot/projects/arm/src/sys/cam/scsi/scsi_all.h#2 integrate .. //depot/projects/arm/src/sys/conf/Makefile.arm#11 integrate .. //depot/projects/arm/src/sys/conf/kern.mk#5 integrate .. //depot/projects/arm/src/sys/dev/bfe/if_bfe.c#7 integrate .. //depot/projects/arm/src/sys/dev/bfe/if_bfereg.h#4 integrate .. //depot/projects/arm/src/sys/dev/ciss/ciss.c#8 integrate .. //depot/projects/arm/src/sys/dev/isp/isp_freebsd.c#10 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt.c#13 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt.h#12 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt_cam.c#15 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt_cam.h#3 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt_debug.c#9 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt_pci.c#10 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt_raid.c#7 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt_raid.h#4 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt_reg.h#4 integrate .. //depot/projects/arm/src/sys/dev/ofw/ofw_console.c#4 integrate .. //depot/projects/arm/src/sys/dev/pci/pcireg.h#5 integrate .. //depot/projects/arm/src/sys/dev/sound/midi/midi.c#2 integrate .. //depot/projects/arm/src/sys/dev/sound/midi/sequencer.c#2 integrate .. //depot/projects/arm/src/sys/dev/usb/ehci.c#10 integrate .. //depot/projects/arm/src/sys/dev/usb/ehci_pci.c#5 integrate .. //depot/projects/arm/src/sys/dev/usb/if_axe.c#5 integrate .. //depot/projects/arm/src/sys/dev/usb/if_axereg.h#3 integrate .. //depot/projects/arm/src/sys/dev/usb/ohci.c#11 integrate .. //depot/projects/arm/src/sys/dev/usb/ohci_pci.c#7 integrate .. //depot/projects/arm/src/sys/dev/usb/ohcireg.h#2 integrate .. //depot/projects/arm/src/sys/dev/usb/ohcivar.h#6 integrate .. //depot/projects/arm/src/sys/dev/usb/sl811hs.c#3 integrate .. //depot/projects/arm/src/sys/dev/usb/sl811hsvar.h#2 integrate .. //depot/projects/arm/src/sys/dev/usb/uhci.c#6 integrate .. //depot/projects/arm/src/sys/dev/usb/uhci_pci.c#3 integrate .. //depot/projects/arm/src/sys/dev/usb/uhcivar.h#3 integrate .. //depot/projects/arm/src/sys/dev/usb/usb_mem.c#3 integrate .. //depot/projects/arm/src/sys/dev/usb/usbdi.c#5 integrate .. //depot/projects/arm/src/sys/dev/usb/usbdivar.h#3 integrate .. //depot/projects/arm/src/sys/doc/subsys/Doxyfile-cam#2 integrate .. //depot/projects/arm/src/sys/doc/subsys/Doxyfile-crypto#2 integrate .. //depot/projects/arm/src/sys/doc/subsys/Doxyfile-dev_pci#2 integrate .. //depot/projects/arm/src/sys/doc/subsys/Doxyfile-dev_sound#2 integrate .. //depot/projects/arm/src/sys/doc/subsys/Doxyfile-dev_usb#2 integrate .. //depot/projects/arm/src/sys/doc/subsys/Doxyfile-geom#2 integrate .. //depot/projects/arm/src/sys/doc/subsys/Doxyfile-i4b#2 integrate .. //depot/projects/arm/src/sys/doc/subsys/Doxyfile-kern#2 integrate .. //depot/projects/arm/src/sys/doc/subsys/Doxyfile-libkern#2 integrate .. //depot/projects/arm/src/sys/doc/subsys/Doxyfile-linux#2 integrate .. //depot/projects/arm/src/sys/doc/subsys/Doxyfile-net80211#2 integrate .. //depot/projects/arm/src/sys/doc/subsys/Doxyfile-netgraph#2 integrate .. //depot/projects/arm/src/sys/doc/subsys/Doxyfile-netinet#2 integrate .. //depot/projects/arm/src/sys/doc/subsys/Doxyfile-netinet6#2 integrate .. //depot/projects/arm/src/sys/doc/subsys/Doxyfile-netipsec#2 integrate .. //depot/projects/arm/src/sys/doc/subsys/Doxyfile-opencrypto#2 integrate .. //depot/projects/arm/src/sys/doc/subsys/Doxyfile-vm#2 integrate .. //depot/projects/arm/src/sys/doc/subsys/Makefile#2 integrate .. //depot/projects/arm/src/sys/doc/subsys/notreviewed.dox#1 branch .. //depot/projects/arm/src/sys/fs/nullfs/null_vfsops.c#6 integrate .. //depot/projects/arm/src/sys/i386/i386/busdma_machdep.c#7 integrate .. //depot/projects/arm/src/sys/i386/i386/machdep.c#12 integrate .. //depot/projects/arm/src/sys/i386/i386/ptrace_machdep.c#2 integrate .. //depot/projects/arm/src/sys/i386/i386/vm_machdep.c#5 integrate .. //depot/projects/arm/src/sys/i386/include/npx.h#3 integrate .. //depot/projects/arm/src/sys/i386/isa/npx.c#8 integrate .. //depot/projects/arm/src/sys/kern/kern_exec.c#10 integrate .. //depot/projects/arm/src/sys/kern/kern_exit.c#16 integrate .. //depot/projects/arm/src/sys/kern/subr_disk.c#4 integrate .. //depot/projects/arm/src/sys/kern/subr_stack.c#2 integrate .. //depot/projects/arm/src/sys/kern/vnode_if.src#5 integrate .. //depot/projects/arm/src/sys/modules/acpi/acpi/Makefile#4 integrate .. //depot/projects/arm/src/sys/modules/acpi/acpi_asus/Makefile#2 integrate .. //depot/projects/arm/src/sys/modules/acpi/acpi_panasonic/Makefile#2 integrate .. //depot/projects/arm/src/sys/modules/acpi/acpi_toshiba/Makefile#2 integrate .. //depot/projects/arm/src/sys/modules/acpi/acpi_video/Makefile#3 integrate .. //depot/projects/arm/src/sys/modules/cpufreq/Makefile#4 integrate .. //depot/projects/arm/src/sys/modules/fdc/Makefile#3 integrate .. //depot/projects/arm/src/sys/modules/geom/geom_eli/Makefile#3 integrate .. //depot/projects/arm/src/sys/modules/mfi/Makefile#3 integrate .. //depot/projects/arm/src/sys/net/bpf.c#7 integrate .. //depot/projects/arm/src/sys/net/bpf_filter.c#4 integrate .. //depot/projects/arm/src/sys/net/if_tap.c#5 integrate .. //depot/projects/arm/src/sys/nfsclient/nfs_vfsops.c#7 integrate .. //depot/projects/arm/src/sys/pci/agp_amd64.c#5 integrate .. //depot/projects/arm/src/sys/pci/agp_sis.c#4 integrate .. //depot/projects/arm/src/sys/sparc64/include/pmap.h#3 integrate .. //depot/projects/arm/src/sys/sparc64/sparc64/pmap.c#7 integrate .. //depot/projects/arm/src/sys/tools/vnode_if.awk#5 integrate .. //depot/projects/arm/src/sys/vm/vm_extern.h#4 integrate .. //depot/projects/arm/src/sys/vm/vm_glue.c#4 integrate .. //depot/projects/arm/src/sys/vm/vm_map.c#7 integrate .. //depot/projects/arm/src/sys/vm/vm_map.h#3 integrate .. //depot/projects/arm/src/sys/vm/vm_meter.c#3 integrate Differences ... ==== //depot/projects/arm/src/sys/Makefile#6 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/Makefile,v 1.35 2006/03/17 18:54:34 ru Exp $ +# $FreeBSD: src/sys/Makefile,v 1.36 2006/05/29 19:29:41 maxim Exp $ .include @@ -11,10 +11,10 @@ # Directories to include in cscope name file and TAGS. CSCOPEDIRS= coda compat conf contrib crypto ddb dev fs gnu i4b isa \ - isofs kern libkern modules net netatalk netatm netgraph \ - netinet netinet6 netipx netkey netnatm netncp netsmb nfs \ - nfsclient nfs4client rpc pccard pci posix4 sys ufs vm \ - ${ARCHDIR} + isofs kern libkern modules net net80211 netatalk netatm \ + netgraph netinet netinet6 netipx netkey netnatm netncp \ + netsmb nfs nfsclient nfs4client rpc pccard pci posix4 sys \ + ufs vm ${ARCHDIR} ARCHDIR ?= ${MACHINE} ==== //depot/projects/arm/src/sys/amd64/amd64/busdma_machdep.c#8 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.74 2006/05/03 04:14:17 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.75 2006/05/28 18:31:32 silby Exp $"); #include #include @@ -492,7 +492,16 @@ } } + /* + * XXX: + * (dmat->alignment < dmat->maxsize) is just a quick hack; the exact + * alignment guarantees of malloc need to be nailed down, and the + * code below should be rewritten to take that into account. + * + * In the meantime, we'll panic if malloc gets it wrong. + */ if ((dmat->maxsize <= PAGE_SIZE) && + (dmat->alignment < dmat->maxsize) && dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem)) { *vaddr = malloc(dmat->maxsize, M_DEVBUF, mflags); } else { @@ -510,6 +519,8 @@ CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", __func__, dmat, dmat->flags, ENOMEM); return (ENOMEM); + } else if ((uintptr_t)*vaddr & (dmat->alignment - 1)) { + panic("bus_dmamem_alloc failed to align memory properly."); } CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", __func__, dmat, dmat->flags, ENOMEM); @@ -529,8 +540,9 @@ */ if (map != NULL) panic("bus_dmamem_free: Invalid map freed\n"); - if ((dmat->maxsize <= PAGE_SIZE) - && dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem)) + if ((dmat->maxsize <= PAGE_SIZE) && + (dmat->alignment < dmat->maxsize) && + dmat->lowaddr >= ptoa((vm_paddr_t)Maxmem)) free(vaddr, M_DEVBUF); else { contigfree(vaddr, dmat->maxsize, M_DEVBUF); ==== //depot/projects/arm/src/sys/arm/arm/elf_trampoline.c#6 (text+ko) ==== @@ -23,7 +23,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/elf_trampoline.c,v 1.5 2006/01/20 00:46:44 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/elf_trampoline.c,v 1.6 2006/05/30 21:13:47 cognet Exp $"); #include #include #include @@ -31,6 +31,7 @@ #include #include #include +#include #include @@ -44,6 +45,24 @@ #define GZ_HEAD 0xa +#ifdef CPU_ARM7TDMI +#define cpu_idcache_wbinv_all arm7tdmi_cache_flushID +#elif defined(CPU_ARM8) +#define cpu_idcache_wbinv_all arm8_cache_purgeID +#elif defined(CPU_ARM9) +#define cpu_idcache_wbinv_all arm9_dcache_wbinv_all +#elif defined(CPU_ARM10) +#define cpu_idcache_wbinv_all arm10_idcache_wbinv_all +#elif defined(CPU_SA110) || defined(CPU_SA1110) || defined(CPU_SA1100) || \ + defined(CPU_IXP12X0) +#define cpu_idcache_wbinv_all sa1_cache_purgeID +#elif defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ + defined(CPU_XSCALE_PXA2X0) || defined(CPU_XSCALE_IXP425) +#define cpu_idcache_wbinv_all xscale_cache_purgeID +#endif +int arm_pdcache_line_size = 32; +int block_userspace_access = 0; + static __inline void * memcpy(void *dst, const void *src, int len) { @@ -160,7 +179,7 @@ static int input(void *dummy) { - if ((size_t)(i_input - orig_input) >= KERNSIZE) { + if ((size_t)(i_input - orig_input) >= KERNCOMPSIZE) { return (GZ_EOF); } return *i_input++; @@ -383,7 +402,7 @@ __start(void) { void *curaddr; - void *dst; + void *dst, *altdst; char *kernel = (char *)&kernel_start; __asm __volatile("mov %0, pc" : @@ -393,11 +412,22 @@ if (*kernel == 0x1f && kernel[1] == 0x8b) { int pt_addr = (((int)&_end + KERNSIZE + 0x100) & ~(L1_TABLE_SIZE - 1)) + L1_TABLE_SIZE; + setup_pagetables(pt_addr, (vm_paddr_t)curaddr, (vm_paddr_t)curaddr + 0x10000000); /* Gzipped kernel */ dst = inflate_kernel(kernel, &_end); kernel = (char *)&_end; + altdst = 4 + load_kernel((unsigned int)kernel, + (unsigned int)curaddr, + (unsigned int)&func_end , 0); + if (altdst > dst) + dst = altdst; + cpu_idcache_wbinv_all(); + __asm __volatile("mrc p15, 0, %0, c1, c0, 0\n" + "bic %0, %0, #1\n" /* MMU_ENABLE */ + "mcr p15, 0, %0, c1, c0, 0\n" + : "=r" (pt_addr)); } else #endif dst = 4 + load_kernel((unsigned int)&kernel_start, ==== //depot/projects/arm/src/sys/arm/arm/pmap.c#16 (text+ko) ==== @@ -147,7 +147,7 @@ #include "opt_vm.h" #include -__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.47 2006/04/22 22:51:32 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.49 2006/05/30 16:55:38 cognet Exp $"); #include #include #include @@ -3073,6 +3073,7 @@ if (!pmap_get_pde_pte(pmap, addr, &pde, &pte)) return (FALSE); + KASSERT(pte != NULL, ("Valid mapping but no pte ?")); if (*pte == 0) return (TRUE); return (FALSE); @@ -4480,7 +4481,7 @@ pa += PAGE_SIZE; } - return ((void *)(va)); + return ((void *)(va + offset)); } #define BOOTSTRAP_DEBUG ==== //depot/projects/arm/src/sys/arm/sa11x0/assabet_machdep.c#4 (text+ko) ==== @@ -47,7 +47,7 @@ #include -__FBSDID("$FreeBSD: src/sys/arm/sa11x0/assabet_machdep.c,v 1.13 2006/05/26 01:41:47 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/sa11x0/assabet_machdep.c,v 1.15 2006/05/30 15:47:55 cognet Exp $"); #include "opt_md.h" @@ -221,6 +221,7 @@ vm_size_t pt_size; int i = 0; uint32_t fake_preload[35]; + uint32_t memsize = 32 * 1024 * 1024; boothowto = RB_VERBOSE | RB_SINGLE; cninit(); @@ -257,7 +258,7 @@ fake_preload[i] = 0; preload_metadata = (void *)fake_preload; - physmem =( 16 * 1024 * 1024) / PAGE_SIZE; + physmem = memsize / PAGE_SIZE; pc = &__pcpu; pcpu_init(pc, 0, sizeof(struct pcpu)); PCPU_SET(curthread, &thread0); @@ -405,7 +406,7 @@ * After booting there are no gross reloations of the kernel thus * this problem will not occur after initarm(). */ -/* cpu_idcache_wbinv_all();*/ + cpu_idcache_wbinv_all(); bootverbose = 1; @@ -444,7 +445,7 @@ init_param1(); init_param2(physmem); kdb_init(); - avail_end = 0xc0000000 + 0x02000000 - 1; + avail_end = 0xc0000000 + memsize - 1; return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - sizeof(struct pcb))); } ==== //depot/projects/arm/src/sys/arm/sa11x0/sa11x0_var.h#3 (text+ko) ==== @@ -34,7 +34,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/arm/sa11x0/sa11x0_var.h,v 1.2 2005/09/25 21:06:50 cognet Exp $ + * $FreeBSD: src/sys/arm/sa11x0/sa11x0_var.h,v 1.3 2006/05/29 19:32:32 cognet Exp $ * */ @@ -64,15 +64,6 @@ typedef void *sa11x0_chipset_tag_t; extern struct bus_space sa11x0_bs_tag; -struct sa11x0_attach_args { - sa11x0_chipset_tag_t sa_sc; - bus_space_tag_t sa_iot; /* Bus tag */ - bus_addr_t sa_addr; /* i/o address */ - bus_size_t sa_size; - - int sa_intr; - int sa_gpio; -}; void *sa11x0_intr_establish(sa11x0_chipset_tag_t, int, int, int, int (*)(void *), void *); ==== //depot/projects/arm/src/sys/cam/cam_xpt.c#5 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.158 2006/01/20 19:21:38 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/cam_xpt.c,v 1.159 2006/05/30 22:44:00 mjacob Exp $"); #include #include @@ -3502,8 +3502,7 @@ if ((crs->release_flags & RELSIM_ADJUST_OPENINGS) != 0) { - if ((dev->inq_data.flags & SID_CmdQue) != 0) { - + if (INQ_DATA_TQ_ENABLED(&dev->inq_data)) { /* Don't ever go below one opening */ if (crs->openings > 0) { xpt_dev_ccbq_resize(crs->ccb_h.path, @@ -5991,7 +5990,7 @@ #ifdef CAM_NEW_TRAN_CODE xpt_devise_transport(path); #endif /* CAM_NEW_TRAN_CODE */ - if ((inq_buf->flags & SID_CmdQue) != 0) + if (INQ_DATA_TQ_ENABLED(inq_buf)) softc->action = PROBE_MODE_SENSE; else softc->action = PROBE_SERIAL_NUM; @@ -6416,7 +6415,7 @@ /* SCSI specific sanity checking */ if ((cpi.hba_inquiry & PI_TAG_ABLE) == 0 - || (inq_data->flags & SID_CmdQue) == 0 + || (INQ_DATA_TQ_ENABLED(inq_data)) == 0 || (device->queue_flags & SCP_QUEUE_DQUE) != 0 || (device->quirk->mintags == 0)) { /* @@ -6712,7 +6711,7 @@ } if ((cpi.hba_inquiry & PI_TAG_ABLE) == 0 - || (inq_data->flags & SID_CmdQue) == 0 + || (INQ_DATA_TQ_ENABLED(inq_data)) == 0 || (device->queue_flags & SCP_QUEUE_DQUE) != 0 || (device->quirk->mintags == 0)) { /* ==== //depot/projects/arm/src/sys/cam/scsi/scsi_all.h#2 (text+ko) ==== @@ -14,7 +14,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 * - * $FreeBSD: src/sys/cam/scsi/scsi_all.h,v 1.24 2005/01/05 22:34:34 imp Exp $ + * $FreeBSD: src/sys/cam/scsi/scsi_all.h,v 1.25 2006/05/30 22:44:00 mjacob Exp $ */ /* @@ -599,7 +599,19 @@ #define SID_AENC 0x80 #define SID_TrmIOP 0x40 u_int8_t additional_length; - u_int8_t reserved[2]; + u_int8_t reserved; + u_int8_t spc2_flags; +#define SPC2_SID_MChngr 0x08 +#define SPC2_SID_MultiP 0x10 +#define SPC2_SID_EncServ 0x40 +#define SPC2_SID_BQueue 0x80 + +#define INQ_DATA_TQ_ENABLED(iqd) \ + ((SID_ANSI_REV(iqd) < SCSI_REV_SPC2)? ((iqd)->flags & SID_CmdQue) : \ + (((iqd)->flags & SID_CmdQue) && !((iqd)->spc2_flags & SPC2_SID_BQueue)) || \ + (!((iqd)->flags & SID_CmdQue) && ((iqd)->spc2_flags & SPC2_SID_BQueue))) + + u_int8_t flags; #define SID_SftRe 0x01 #define SID_CmdQue 0x02 ==== //depot/projects/arm/src/sys/conf/Makefile.arm#11 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.arm -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.arm,v 1.26 2006/03/27 00:32:46 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.arm,v 1.27 2006/05/30 21:13:47 cognet Exp $ # # Makefile for FreeBSD # @@ -59,6 +59,10 @@ ${KERNEL_KO}.bin; \ rm ${FULLKERNEL}.noheader +FILES_CPU_FUNC = $S/$M/$M/cpufunc_asm_arm7tdmi.S \ + $S/$M/$M/cpufunc_asm_arm8.S $S/$M/$M/cpufunc_asm_arm9.S \ + $S/$M/$M/cpufunc_asm_sa1.S $S/$M/$M/cpufunc_asm_arm10.S \ + $S/$M/$M/cpufunc_asm_xscale.S trampoline: ${KERNEL_KO}.tramp ${KERNEL_KO}.tramp: ${KERNEL_KO} echo "#define KERNNAME \"${KERNEL_KO}.tmp\"" >opt_kernname.h @@ -85,10 +89,10 @@ ${CC} -O2 -DKZIP -I. -c $S/kern/inflate.c -o inflate-tramp.o ${CC} -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.$M.tramp \ -DKZIP $S/$M/$M/elf_trampoline.c inflate-tramp.o $S/$M/$M/inckern.S \ - -o ${KERNEL_KO}.gz.tramp + ${FILES_CPU_FUNC} -o ${KERNEL_KO}.gz.tramp ${CC} -O -nostdlib -I. -Xlinker -T -Xlinker ldscript.$M.tramp.noheader \ -DKZIP $S/$M/$M/elf_trampoline.c inflate-tramp.o $S/$M/$M/inckern.S \ - -o ${KERNEL_KO}.tramp.noheader + ${FILES_CPU_FUNC} -o ${KERNEL_KO}.tramp.noheader ${OBJCOPY} -S -O binary ${KERNEL_KO}.tramp.noheader \ ${KERNEL_KO}.gz.tramp.bin rm ${KERNEL_KO}.tmp.gz ${KERNEL_KO}.tramp.noheader opt_kernname.h \ ==== //depot/projects/arm/src/sys/conf/kern.mk#5 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/kern.mk,v 1.47 2006/05/11 22:25:26 jhb Exp $ +# $FreeBSD: src/sys/conf/kern.mk,v 1.48 2006/05/30 19:18:01 ru Exp $ # # Warning flags for compiling the kernel and components of the kernel. @@ -12,7 +12,10 @@ .else CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \ -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \ - -fformat-extensions -std=c99 + ${_wundef} -fformat-extensions -std=c99 +.if !defined(NO_UNDEF) +_wundef= -Wundef +.endif .endif # # The following flags are next up for working on: ==== //depot/projects/arm/src/sys/dev/bfe/if_bfe.c#7 (text+ko) ==== @@ -26,7 +26,7 @@ #include -__FBSDID("$FreeBSD: src/sys/dev/bfe/if_bfe.c,v 1.38 2006/05/16 14:36:23 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bfe/if_bfe.c,v 1.40 2006/05/28 20:35:39 silby Exp $"); #include #include @@ -201,7 +201,7 @@ * greater than 1GB. */ error = bus_dma_tag_create(NULL, /* parent */ - PAGE_SIZE, 0, /* alignment, boundary */ + 4096, 0, /* alignment, boundary */ 0x3FFFFFFF, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ @@ -214,7 +214,7 @@ /* tag for TX ring */ error = bus_dma_tag_create(sc->bfe_parent_tag, - 1, 0, + 4096, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, @@ -232,7 +232,7 @@ /* tag for RX ring */ error = bus_dma_tag_create(sc->bfe_parent_tag, - 1, 0, + 4096, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, NULL, NULL, @@ -1212,6 +1212,21 @@ } if(istat & BFE_ISTAT_ERRORS) { + + if (istat & BFE_ISTAT_DSCE) { + printf("if_bfe Descriptor Error\n"); + bfe_stop(sc); + BFE_UNLOCK(sc); + return; + } + + if (istat & BFE_ISTAT_DPE) { + printf("if_bfe Descriptor Protocol Error\n"); + bfe_stop(sc); + BFE_UNLOCK(sc); + return; + } + flag = CSR_READ_4(sc, BFE_DMATX_STAT); if(flag & BFE_STAT_EMASK) ifp->if_oerrors++; ==== //depot/projects/arm/src/sys/dev/bfe/if_bfereg.h#4 (text+ko) ==== @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ -/* $FreeBSD: src/sys/dev/bfe/if_bfereg.h,v 1.9 2006/05/11 17:39:06 silby Exp $ */ +/* $FreeBSD: src/sys/dev/bfe/if_bfereg.h,v 1.10 2006/05/28 18:44:39 silby Exp $ */ #ifndef _BFE_H #define _BFE_H @@ -427,8 +427,8 @@ #define BFE_RX_RING_SIZE 512 #define BFE_TX_RING_SIZE 512 #define BFE_LINK_DOWN 5 -#define BFE_TX_LIST_CNT 511 -#define BFE_RX_LIST_CNT 511 +#define BFE_TX_LIST_CNT 128 +#define BFE_RX_LIST_CNT 128 #define BFE_TX_LIST_SIZE BFE_TX_LIST_CNT * sizeof(struct bfe_desc) #define BFE_RX_LIST_SIZE BFE_RX_LIST_CNT * sizeof(struct bfe_desc) #define BFE_RX_OFFSET 30 ==== //depot/projects/arm/src/sys/dev/ciss/ciss.c#8 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/ciss/ciss.c,v 1.70 2006/05/16 14:36:23 phk Exp $ + * $FreeBSD: src/sys/dev/ciss/ciss.c,v 1.71 2006/05/30 06:42:02 ps Exp $ */ /* @@ -2261,8 +2261,8 @@ /* * Get a request. */ - if ((error = ciss_get_request(sc, &cr)) != 0) - goto out; + while (ciss_get_request(sc, &cr) != 0) + tsleep(sc, PPAUSE, "cissREQ", hz); cc = CISS_FIND_COMMAND(cr); /* ==== //depot/projects/arm/src/sys/dev/isp/isp_freebsd.c#10 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/isp/isp_freebsd.c,v 1.116 2006/05/22 07:07:30 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/isp/isp_freebsd.c,v 1.117 2006/05/30 17:43:04 mjacob Exp $"); #include #include @@ -1899,7 +1899,7 @@ inot->message_args[0] = MSG_ABORT_TAG; inot->message_args[1] = inp->in_seqid & 0xff; inot->message_args[2] = (inp->in_seqid >> 8) & 0xff; - inot->ccb_h.status = CAM_MESSAGE_RECV|CAM_DEV_QFRZN; + inot->ccb_h.status = CAM_MESSAGE_RECV; xpt_done((union ccb *)inot); } break; ==== //depot/projects/arm/src/sys/dev/mpt/mpt.c#13 (text+ko) ==== @@ -57,6 +57,10 @@ * * Support from Chris Ellsworth in order to make SAS adapters work * is gratefully acknowledged. + * + * + * Support from LSI-Logic has also gone a great deal toward making this a + * workable subsystem and is gratefully acknowledged. */ /*- * Copyright (c) 2004, Avid Technology, Inc. and its contributors. @@ -92,7 +96,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt.c,v 1.29 2006/05/27 17:26:57 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt.c,v 1.30 2006/05/29 20:34:28 mjacob Exp $"); #include #include /* XXX For static handler registration */ ==== //depot/projects/arm/src/sys/dev/mpt/mpt.h#12 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/mpt/mpt.h,v 1.20 2006/05/27 17:26:57 mjacob Exp $ */ +/* $FreeBSD: src/sys/dev/mpt/mpt.h,v 1.22 2006/05/29 20:34:28 mjacob Exp $ */ /*- * Generic defines for LSI '909 FC adapters. * FreeBSD Version. @@ -58,6 +58,10 @@ * * Support from Chris Ellsworth in order to make SAS adapters work * is gratefully acknowledged. + * + * + * Support from LSI-Logic has also gone a great deal toward making this a + * workable subsystem and is gratefully acknowledged. */ /* * Copyright (c) 2004, Avid Technology, Inc. and its contributors. @@ -942,6 +946,7 @@ MPT_PRT_ERROR, MPT_PRT_WARN, MPT_PRT_INFO, + MPT_PRT_NEGOTIATION, MPT_PRT_DEBUG, MPT_PRT_DEBUG1, MPT_PRT_DEBUG2, ==== //depot/projects/arm/src/sys/dev/mpt/mpt_cam.c#15 (text+ko) ==== @@ -57,6 +57,9 @@ * * Support from Chris Ellsworth in order to make SAS adapters work * is gratefully acknowledged. + * + * Support from LSI-Logic has also gone a great deal toward making this a + * workable subsystem and is gratefully acknowledged. */ /*- * Copyright (c) 2004, Avid Technology, Inc. and its contributors. @@ -91,7 +94,7 @@ * OWNER OR CONTRIBUTOR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include -__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt_cam.c,v 1.19 2006/05/27 17:26:57 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt_cam.c,v 1.21 2006/05/29 20:34:28 mjacob Exp $"); #include #include @@ -647,7 +650,7 @@ static int mpt_set_initial_config_spi(struct mpt_softc *mpt) { - int i, pp1val = ((1 << mpt->mpt_ini_id) << 16) | mpt->mpt_ini_id; + int i, j, pp1val = ((1 << mpt->mpt_ini_id) << 16) | mpt->mpt_ini_id; int error; mpt->mpt_disc_enable = 0xff; @@ -682,12 +685,17 @@ * The purpose of this exercise is to get * all targets back to async/narrow. * - * We skip this if the BIOS has already negotiated speeds with targets. + * We skip this step if the BIOS has already negotiated + * speeds with the targets and does not require us to + * do Domain Validation. */ i = mpt->mpt_port_page2.PortSettings & MPI_SCSIPORTPAGE2_PORT_MASK_NEGO_MASTER_SETTINGS; - if (i == MPI_SCSIPORTPAGE2_PORT_ALL_MASTER_SETTINGS) { - mpt_lprt(mpt, /* MPT_PRT_INFO */ MPT_PRT_ALWAYS, + j = mpt->mpt_port_page2.PortFlags & + MPI_SCSIPORTPAGE2_PORT_FLAGS_DV_MASK; + if (i == MPI_SCSIPORTPAGE2_PORT_ALL_MASTER_SETTINGS && + j == MPI_SCSIPORTPAGE2_PORT_FLAGS_OFF_DV) { + mpt_lprt(mpt, MPT_PRT_NEGOTIATION, "honoring BIOS transfer negotiations\n"); return (0); } @@ -2782,7 +2790,7 @@ uint8_t dval; u_int period; u_int offset; - int m; + int i, j; cts = &ccb->cts; if (!IS_CURRENT_SETTINGS(cts)) { @@ -2790,27 +2798,37 @@ mpt_set_ccb_status(ccb, CAM_REQ_INVALID); break; } + if (mpt->is_fc || mpt->is_sas) { mpt_set_ccb_status(ccb, CAM_REQ_CMP); break; } - if (mpt->ioc_page2 && mpt->ioc_page2->MaxPhysDisks != 0 && - raid_passthru == 0) { + /* + * Skip attempting settings on RAID volume disks. + * Other devices on the bus get the normal treatment. + */ + if (mpt->phydisk_sim && raid_passthru == 0 && + mpt_is_raid_volume(mpt, tgt) != 0) { + mpt_lprt(mpt, MPT_PRT_ALWAYS, + "skipping transfer settings for RAID volumes\n"); mpt_set_ccb_status(ccb, CAM_REQ_CMP); break; } - m = mpt->mpt_port_page2.PortSettings; - if ((m & MPI_SCSIPORTPAGE2_PORT_MASK_NEGO_MASTER_SETTINGS) == - MPI_SCSIPORTPAGE2_PORT_ALL_MASTER_SETTINGS) { -mpt_prt(mpt, "master settings\n"); -if (raid_passthru == 0) { + i = mpt->mpt_port_page2.PortSettings & + MPI_SCSIPORTPAGE2_PORT_MASK_NEGO_MASTER_SETTINGS; + j = mpt->mpt_port_page2.PortFlags & + MPI_SCSIPORTPAGE2_PORT_FLAGS_DV_MASK; + if (i == MPI_SCSIPORTPAGE2_PORT_ALL_MASTER_SETTINGS && + j == MPI_SCSIPORTPAGE2_PORT_FLAGS_OFF_DV) { + mpt_lprt(mpt, MPT_PRT_ALWAYS, + "honoring BIOS transfer negotiations\n"); mpt_set_ccb_status(ccb, CAM_REQ_CMP); break; -} } + dval = 0; period = 0; offset = 0; @@ -2846,24 +2864,27 @@ spi = &cts->xport_specific.spi; if ((spi->valid & CTS_SPI_VALID_DISC) != 0) { - if ((spi->flags & CTS_SPI_FLAGS_DISC_ENB) != 0) + if ((spi->flags & CTS_SPI_FLAGS_DISC_ENB) != 0) { dval |= DP_DISC_ENABLE; - else + } else { dval |= DP_DISC_DISABL; + } } if ((scsi->valid & CTS_SCSI_VALID_TQ) != 0) { - if ((scsi->flags & CTS_SCSI_FLAGS_TAG_ENB) != 0) + if ((scsi->flags & CTS_SCSI_FLAGS_TAG_ENB) != 0) { dval |= DP_TQING_ENABLE; - else + } else { dval |= DP_TQING_DISABL; + } } if ((spi->valid & CTS_SPI_VALID_BUS_WIDTH) != 0) { - if (spi->bus_width == MSG_EXT_WDTR_BUS_16_BIT) + if (spi->bus_width == MSG_EXT_WDTR_BUS_16_BIT) { dval |= DP_WIDE; - else + } else { dval |= DP_NARROW; + } } if ((spi->valid & CTS_SPI_VALID_SYNC_OFFSET) && @@ -2874,6 +2895,9 @@ offset = spi->sync_offset; } #endif + mpt_lprt(mpt, MPT_PRT_NEGOTIATION, + "mpt_action: SET tgt %d flags %x period %x off %x\n", + tgt, dval, period, offset); CAMLOCK_2_MPTLOCK(mpt); if (dval & DP_DISC_ENABLE) { mpt->mpt_disc_enable |= (1 << tgt); @@ -2891,10 +2915,12 @@ if (dval & DP_SYNC) { mpt_setsync(mpt, tgt, period, offset); } + if (mpt_update_spi_config(mpt, tgt)) { + MPTLOCK_2_CAMLOCK(mpt); + mpt_set_ccb_status(ccb, CAM_REQ_CMP_ERR); + break; + } MPTLOCK_2_CAMLOCK(mpt); - mpt_lprt(mpt, MPT_PRT_DEBUG, - "SET tgt %d flags %x period %x off %x\n", - tgt, dval, period, offset); mpt_set_ccb_status(ccb, CAM_REQ_CMP); break; } @@ -2952,11 +2978,9 @@ sas->valid = CTS_SAS_VALID_SPEED; sas->bitrate = 300000; /* XXX: Default 3Gbps */ #endif - } else { - if (mpt_get_spi_settings(mpt, cts) != 0) { - mpt_set_ccb_status(ccb, CAM_REQ_CMP_ERR); - break; - } + } else if (mpt_get_spi_settings(mpt, cts) != 0) { + mpt_set_ccb_status(ccb, CAM_REQ_CMP_ERR); + break; } mpt_set_ccb_status(ccb, CAM_REQ_CMP); break; @@ -3005,10 +3029,17 @@ cpi->base_transfer_speed = 3300; cpi->hba_inquiry = PI_SDTR_ABLE|PI_TAG_ABLE|PI_WIDE_16; } + + /* + * We give our fake RAID passhtru bus a width that is MaxVolumes + * wide, restrict it to one lun and have it *not* be a bus + * that can have a SCSI bus reset. + */ if (raid_passthru) { + cpi->max_target = mpt->ioc_page2->MaxPhysDisks - 1; + cpi->initiator_id = cpi->max_target+1; cpi->max_lun = 0; cpi->hba_misc = PIM_NOBUSRESET; - cpi->initiator_id = cpi->max_target+1; } if ((mpt->role & MPT_ROLE_INITIATOR) == 0) { @@ -3109,30 +3140,12 @@ uint8_t dval, pval, oval; int rv; - /* - * Check to see if this is an Integrated Raid card. - * - * If it is, and we're the RAID bus side, both current - * and goal settings are synthesized as we only look at - * or change actual settings for the physical disk side. - * - * NB: In the future we can just do this on the blacked out - * NB: portion that the RAID volume covers- there may be - * NB: other entities on this bus as well. - */ - - if (mpt->phydisk_sim) { - if (xpt_path_sim(cts->ccb_h.path) != mpt->phydisk_sim) { - dval = DP_WIDE|DP_DISC|DP_TQING; - oval = (mpt->mpt_port_page0.Capabilities >> 16); - pval = (mpt->mpt_port_page0.Capabilities >> 8); - tgt = cts->ccb_h.target_id; - goto skip; + if (xpt_path_sim(cts->ccb_h.path) == mpt->phydisk_sim) { + if (mpt_map_physdisk(mpt, (union ccb *)cts, &tgt)) { + return (-1); } - } - - if (mpt_map_physdisk(mpt, (union ccb *)cts, &tgt) != 0) { - return (-1); + } else { + tgt = cts->ccb_h.target_id; } /* @@ -3156,10 +3169,6 @@ return (rv); } MPTLOCK_2_CAMLOCK(mpt); - - mpt_lprt(mpt, MPT_PRT_DEBUG, - "mpt_get_spi: SPI Tgt %d Page 0: NParms %x Info %x\n", - tgt, tmp.NegotiatedParameters, tmp.Information); if (tmp.NegotiatedParameters & MPI_SCSIDEVPAGE0_NP_WIDE) { dval |= DP_WIDE; } @@ -3181,7 +3190,6 @@ oval = (mpt->mpt_port_page0.Capabilities >> 16); pval = (mpt->mpt_port_page0.Capabilities >> 8); } - skip: #ifndef CAM_NEW_TRAN_CODE cts->flags &= ~(CCB_TRANS_DISC_ENB|CCB_TRANS_TAG_ENB); if (dval & DP_DISC_ENABLE) { @@ -3236,9 +3244,9 @@ scsi->valid = 0; } #endif - mpt_lprt(mpt, MPT_PRT_DEBUG, - "mpt_get_spi: tgt %d %s settings flags %x period %x offset %x\n", - tgt, IS_CURRENT_SETTINGS(cts)? "ACTIVE" : "NVRAM", + mpt_lprt(mpt, MPT_PRT_NEGOTIATION, + "mpt_get_spi_settings: tgt %d %s settings flags 0x%x period 0x%x " + "offset %x\n", tgt, IS_CURRENT_SETTINGS(cts)? "ACTIVE" : "NVRAM ", dval, pval, oval); return (0); } @@ -3246,27 +3254,27 @@ static void mpt_setwidth(struct mpt_softc *mpt, int tgt, int onoff) { - PTR_CONFIG_PAGE_SCSI_DEVICE_1 tmp; + PTR_CONFIG_PAGE_SCSI_DEVICE_1 ptr; - tmp = &mpt->mpt_dev_page1[tgt]; + ptr = &mpt->mpt_dev_page1[tgt]; if (onoff) { - tmp->RequestedParameters |= MPI_SCSIDEVPAGE1_RP_WIDE; + ptr->RequestedParameters |= MPI_SCSIDEVPAGE1_RP_WIDE; } else { - tmp->RequestedParameters &= ~MPI_SCSIDEVPAGE1_RP_WIDE; + ptr->RequestedParameters &= ~MPI_SCSIDEVPAGE1_RP_WIDE; } } static void mpt_setsync(struct mpt_softc *mpt, int tgt, int period, int offset) { - PTR_CONFIG_PAGE_SCSI_DEVICE_1 tmp; + PTR_CONFIG_PAGE_SCSI_DEVICE_1 ptr; - tmp = &mpt->mpt_dev_page1[tgt]; - tmp->RequestedParameters &= ~MPI_SCSIDEVPAGE1_RP_MIN_SYNC_PERIOD_MASK; - tmp->RequestedParameters &= ~MPI_SCSIDEVPAGE1_RP_MAX_SYNC_OFFSET_MASK; - tmp->RequestedParameters &= ~MPI_SCSIDEVPAGE1_RP_DT; - tmp->RequestedParameters &= ~MPI_SCSIDEVPAGE1_RP_QAS; - tmp->RequestedParameters &= ~MPI_SCSIDEVPAGE1_RP_IU; + ptr = &mpt->mpt_dev_page1[tgt]; + ptr->RequestedParameters &= ~MPI_SCSIDEVPAGE1_RP_MIN_SYNC_PERIOD_MASK; + ptr->RequestedParameters &= ~MPI_SCSIDEVPAGE1_RP_MAX_SYNC_OFFSET_MASK; + ptr->RequestedParameters &= ~MPI_SCSIDEVPAGE1_RP_DT; + ptr->RequestedParameters &= ~MPI_SCSIDEVPAGE1_RP_QAS; + ptr->RequestedParameters &= ~MPI_SCSIDEVPAGE1_RP_IU; /* * XXX: For now, we're ignoring specific settings @@ -3284,7 +3292,7 @@ np |= MPI_SCSIDEVPAGE1_RP_DT; } np |= (factor << 8) | (offset << 16); - tmp->RequestedParameters |= np; >>> TRUNCATED FOR MAIL (1000 lines) <<<