From owner-freebsd-arm@FreeBSD.ORG Mon Jul 13 08:39:31 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0AEFC10656C0; Mon, 13 Jul 2009 08:39:31 +0000 (UTC) (envelope-from mih@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id B084F8FC0A; Mon, 13 Jul 2009 08:39:30 +0000 (UTC) (envelope-from mih@semihalf.com) Received: from [10.0.0.43] (cardhu.semihalf.com [213.17.239.108]) by smtp.semihalf.com (Postfix) with ESMTPSA id 2C620C3AAA; Mon, 13 Jul 2009 10:36:23 +0200 (CEST) Message-ID: <4A5AF2DA.9050101@semihalf.com> Date: Mon, 13 Jul 2009 10:39:54 +0200 From: Michal Hajduk User-Agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: Mark Tinguely References: <200907101454.n6AEs7nJ087492@casselton.net> In-Reply-To: <200907101454.n6AEs7nJ087492@casselton.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-arm@freebsd.org Subject: Re: pmap problem in FreeBSD current - PS X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 08:39:31 -0000 Hi Mark, I've corrected busdma_machdep instead of adding this PVF_REF flag to arm pmap code and it works good. My patch: =========================================================== diff --git a/sys/arm/arm/busdma_machdep.c b/sys/arm/arm/busdma_machdep.c index a8b2de9..b55a714 100644 --- a/sys/arm/arm/busdma_machdep.c +++ b/sys/arm/arm/busdma_machdep.c @@ -631,10 +631,10 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, ((vm_offset_t)*vaddr & PAGE_MASK)); newmap->origbuffer = *vaddr; newmap->allocbuffer = tmpaddr; - cpu_idcache_wbinv_range((vm_offset_t)*vaddr, - dmat->maxsize); - cpu_l2cache_wbinv_range((vm_offset_t)*vaddr, - dmat->maxsize); + cpu_idcache_wbinv_range((vm_offset_t)*vaddr & + ~PAGE_MASK, PAGE_SIZE); + cpu_l2cache_wbinv_range((vm_offset_t)*vaddr & + ~PAGE_MASK, PAGE_SIZE); *vaddr = tmpaddr; } else newmap->origbuffer = newmap->allocbuffer = NULL; ============================================================ While debugging this problem we've found another in pmap_kremove(). There was an invalidation on va + PAGE_SIZE instead of page which contains va address. My patch: ===================================================== diff --git a/sys/arm/arm/pmap.c b/sys/arm/arm/pmap.c index 3cdab65..7988f40 100644 --- a/sys/arm/arm/pmap.c +++ b/sys/arm/arm/pmap.c @@ -2984,8 +2984,8 @@ pmap_kremove(vm_offset_t va) pmap_free_pv_entry(pve); PMAP_UNLOCK(pmap_kernel()); vm_page_unlock_queues(); - cpu_dcache_wbinv_range(va, PAGE_SIZE); - cpu_l2cache_wbinv_range(va, PAGE_SIZE); + cpu_dcache_wbinv_range(va & ~PAGE_MASK, PAGE_SIZE); + cpu_l2cache_wbinv_range(va & ~PAGE_MASK, PAGE_SIZE); cpu_tlb_flushD_SE(va); cpu_cpwait(); *pte = 0; ===================================================== I suggest, that maybe for now we should only change the cpu_(l2)idcache_wbinv_range() routines by adding simple check: If the va address is page aligned and size is equal to PAGE_SIZE we should write-back and invalidate whole page. Otherwise we should invalidate line by line. I've also checked your patch and it didn't help (I had a panic) ... uhub0: 1 port with 1 removable, self powered Root mount waiting for: usbus0 panic: blockable sleep lock (sleep mutex) vm page queue mutex @ /home/mih/git/marvell-current/sys/arm/arm/pmap.c:1947 KDB: enter: panic [thread pid 15 tid 100028 ] Stopped at $d: ldrb r15, [r15, r15, ror r15]! Many thanks, Michał Hajduk From owner-freebsd-arm@FreeBSD.ORG Mon Jul 13 11:06:51 2009 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11651106564A for ; Mon, 13 Jul 2009 11:06:51 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id F279F8FC14 for ; Mon, 13 Jul 2009 11:06:50 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n6DB6olj040526 for ; Mon, 13 Jul 2009 11:06:50 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n6DB6oKV040522 for freebsd-arm@FreeBSD.org; Mon, 13 Jul 2009 11:06:50 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 13 Jul 2009 11:06:50 GMT Message-Id: <200907131106.n6DB6oKV040522@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-arm@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-arm@FreeBSD.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 11:06:51 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o arm/134368 arm [patch] nslu2_led driver for the LEDs on the NSLU2 o arm/134338 arm [patch] Lock GPIO accesses on ixp425 o arm/134092 arm [patch] NSLU.hints contains wrong hints for on board n 3 problems total. From owner-freebsd-arm@FreeBSD.ORG Mon Jul 13 12:57:09 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57AB91065674; Mon, 13 Jul 2009 12:57:09 +0000 (UTC) (envelope-from mih@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id BEEF48FC1E; Mon, 13 Jul 2009 12:57:08 +0000 (UTC) (envelope-from mih@semihalf.com) Received: from [10.0.0.43] (cardhu.semihalf.com [213.17.239.108]) by smtp.semihalf.com (Postfix) with ESMTPSA id 957FFC3BAA; Mon, 13 Jul 2009 14:54:01 +0200 (CEST) Message-ID: <4A5B2F3C.4030501@semihalf.com> Date: Mon, 13 Jul 2009 14:57:32 +0200 From: Michal Hajduk User-Agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103) MIME-Version: 1.0 To: Mark Tinguely References: <200907101454.n6AEs7nJ087492@casselton.net> <4A5AF2DA.9050101@semihalf.com> In-Reply-To: <4A5AF2DA.9050101@semihalf.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-arm@freebsd.org Subject: Re: pmap problem in FreeBSD current - PS X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 12:57:09 -0000 Michal Hajduk wrote: > Hi Mark, > > I've corrected busdma_machdep instead of adding this PVF_REF flag to arm > pmap code and it works good. > My patch: > =========================================================== > diff --git a/sys/arm/arm/busdma_machdep.c b/sys/arm/arm/busdma_machdep.c > index a8b2de9..b55a714 100644 > --- a/sys/arm/arm/busdma_machdep.c > +++ b/sys/arm/arm/busdma_machdep.c > .... I've found another problem in busdma_machdep.c in function bus_dmamem_alloc. After write-back invalidate operation there is no tlb flush. Below there is complete patch: ============================================================ diff --git a/sys/arm/arm/busdma_machdep.c b/sys/arm/arm/busdma_machdep.c index a8b2de9..9562615 100644 --- a/sys/arm/arm/busdma_machdep.c +++ b/sys/arm/arm/busdma_machdep.c @@ -631,10 +631,11 @@ bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, ((vm_offset_t)*vaddr & PAGE_MASK)); newmap->origbuffer = *vaddr; newmap->allocbuffer = tmpaddr; - cpu_idcache_wbinv_range((vm_offset_t)*vaddr, - dmat->maxsize); - cpu_l2cache_wbinv_range((vm_offset_t)*vaddr, - dmat->maxsize); + cpu_dcache_wbinv_range((vm_offset_t)*vaddr & + ~PAGE_MASK, PAGE_SIZE); + cpu_l2cache_wbinv_range((vm_offset_t)*vaddr & + ~PAGE_MASK, PAGE_SIZE); + cpu_tlb_flushID_SE((vm_offset_t)*vaddr); *vaddr = tmpaddr; } else newmap->origbuffer = newmap->allocbuffer = NULL; ============================================================ > I've also checked your patch and it didn't help (I had a panic) > ... > uhub0: 1 port with 1 removable, self powered > Root mount waiting for: usbus0 > panic: blockable sleep lock (sleep mutex) vm page queue mutex @ > /home/mih/git/marvell-current/sys/arm/arm/pmap.c:1947 > KDB: enter: panic > [thread pid 15 tid 100028 ] > Stopped at $d: ldrb r15, [r15, r15, ror r15]! > > Many thanks, > Michał Hajduk > Can we move vm_page_unlock_queues() (line 1693) and vm_page_lock_queues to pmap_get_pv_entry() ? Is it added only because of pagedaemon_wakeup()? If this is correct, I've prepared a patch: =========================================================== diff --git a/sys/arm/arm/pmap.c b/sys/arm/arm/pmap.c index 3cdab65..b4ffbbf 100644 --- a/sys/arm/arm/pmap.c +++ b/sys/arm/arm/pmap.c @@ -1690,10 +1690,8 @@ pmap_enter_pv(struct vm_page *pg, struct pv_entry *pve, pmap_t pm, TAILQ_INSERT_HEAD(&pm->pm_pvlist, pve, pv_plist); if ((km = PMAP_OWNED(pmap_kernel()))) PMAP_UNLOCK(pmap_kernel()); - vm_page_unlock_queues(); if ((pve = pmap_get_pv_entry()) == NULL) panic("pmap_kenter_internal: no pv entries"); - vm_page_lock_queues(); if (km) PMAP_LOCK(pmap_kernel()); } @@ -2904,10 +2902,8 @@ pmap_kenter_internal(vm_offset_t va, vm_offset_t pa, int flags) vm_page_lock_queues(); if (!TAILQ_EMPTY(&m->md.pv_list) || m->md.pv_kva) { /* release vm_page lock for pv_entry UMA */ - vm_page_unlock_queues(); if ((pve = pmap_get_pv_entry()) == NULL) panic("pmap_kenter_internal: no pv entries"); - vm_page_lock_queues(); PMAP_LOCK(pmap_kernel()); pmap_enter_pv(m, pve, pmap_kernel(), va, PVF_WRITE | PVF_UNMAN); @@ -2984,8 +2980,8 @@ pmap_kremove(vm_offset_t va) pmap_free_pv_entry(pve); PMAP_UNLOCK(pmap_kernel()); vm_page_unlock_queues(); - cpu_dcache_wbinv_range(va, PAGE_SIZE); - cpu_l2cache_wbinv_range(va, PAGE_SIZE); + cpu_dcache_wbinv_range(va & ~PAGE_MASK, PAGE_SIZE); + cpu_l2cache_wbinv_range(va & ~PAGE_MASK, PAGE_SIZE); cpu_tlb_flushD_SE(va); cpu_cpwait(); *pte = 0; @@ -3935,8 +3931,11 @@ pmap_get_pv_entry(void) pv_entry_t ret_value; pv_entry_count++; - if (pv_entry_count > pv_entry_high_water) + if (pv_entry_count > pv_entry_high_water) { + vm_page_unlock_queues(); pagedaemon_wakeup(); + vm_page_lock_queues(); + } ret_value = uma_zalloc(pvzone, M_NOWAIT); return ret_value; } ========================================================== With this patch I didn't observe LORs (as well as with your + mine patch). Thanks for your help. Best regards, Michał Hajduk From owner-freebsd-arm@FreeBSD.ORG Tue Jul 14 08:28:05 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1246B1065670 for ; Tue, 14 Jul 2009 08:28:05 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from mx.bulinfo.net (mx.bulinfo.net [193.194.156.1]) by mx1.freebsd.org (Postfix) with ESMTP id BD8938FC16 for ; Tue, 14 Jul 2009 08:28:04 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id 88936C3DB for ; Tue, 14 Jul 2009 11:04:07 +0300 (EEST) Received: from mx.bulinfo.net ([127.0.0.1]) by localhost (mx.bulinfo.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 30183-02 for ; Tue, 14 Jul 2009 11:04:06 +0300 (EEST) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id C363CBAAC for ; Tue, 14 Jul 2009 11:04:06 +0300 (EEST) Message-ID: <4A5C3BF5.9030200@bulinfo.net> Date: Tue, 14 Jul 2009 11:04:05 +0300 From: Krassimir Slavchev User-Agent: Thunderbird 2.0.0.19 (X11/20090225) MIME-Version: 1.0 To: freebsd-arm@freebsd.org X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at mx.bulinfo.net Subject: ohci not detected on at91rm9200? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 08:28:05 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, The ohci controller is not detected by FreeBSD 8.0-BETA1 r195653. Last working kernel I have is r187522 (~ Jan 2009) with old USB stack. I have only removed the 'ugen' device from my kernel config file. Can someone confirm this? Or may be I miss something? Best regards -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFKXDv1xJBWvpalMpkRAmmNAJ4q6n4nIkLhXwQc8FlI1hthMW5G0QCgrbBi feMkpQcoM3/a5wVXfJMUak8= =Mdqp -----END PGP SIGNATURE----- From owner-freebsd-arm@FreeBSD.ORG Tue Jul 14 08:31:12 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 968BE1065674; Tue, 14 Jul 2009 08:31:12 +0000 (UTC) (envelope-from kosmo@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id 44E208FC1A; Tue, 14 Jul 2009 08:31:12 +0000 (UTC) (envelope-from kosmo@semihalf.com) Received: from [10.0.0.5] (cardhu.semihalf.com [213.17.239.108]) by smtp.semihalf.com (Postfix) with ESMTPSA id 7F009C3A96; Tue, 14 Jul 2009 10:28:06 +0200 (CEST) From: Piotr =?iso-8859-2?q?Zi=EAcik?= Organization: Semihalf To: Hans Petter Selasky Date: Tue, 14 Jul 2009 10:31:10 +0200 User-Agent: PLD Linux KMail/1.9.10 References: <200906231035.43096.kosmo@semihalf.com> <200907091721.01272.kosmo@semihalf.com> <200907091834.42462.hselasky@c2i.net> In-Reply-To: <200907091834.42462.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907141031.11185.kosmo@semihalf.com> Cc: freebsd-arm@freebsd.org, thompsa@freebsd.org, freebsd-usb@freebsd.org Subject: Re: CPU Cache and busdma usage in USB X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 08:31:13 -0000 > > 1) My analysis: Only the data areas are being flushed/invalidated. No > transfer descriptors are flushed/invalidated. I see no cache operations > happening on any DMA control structures, even though there are calls from > EHCI to xxx_pc_flush() and xxx_pc_invalidate(). > This is 100% correct if control structures are marked as BUS_DMA_COHERENT. > One patch you can try is to add an additional unload call to > "usbd_transfer_setup_sub_malloc()": > > ==== //depot/projects/usb/src/sys/dev/usb/usb_transfer.c#159 - > /home/hans_other/usb.p4/src/sys/dev/usb/usb_transfer.c ==== > @@ -268,6 +268,10 @@ > pg, z, align)) { > return (1); /* failure */ > } > + > + bus_dmamap_unload(parm->dma_page_cache_ptr->tag, > + parm->dma_page_cache_ptr->map); > + > /* Set beginning of current buffer */ > buf = parm->dma_page_cache_ptr->buffer; > /* Make room for one DMA page cache and one page */ > > This will avoid the same memory area being loaded twice. Not sure if there > is still a bug in pmap about this! I checked this patch and I did not saw any changes in USB behaviour. The problem sill was visible. > > Could you provide a new trace, showing an enumeration failure. In your > previous trace there was no error, because the printouts probably caused to > CPU to flush out its cache. > I have tried many times and I was unable to generate trace showing enumeration faliure. Even little amount of debugging code caused proper enumeration. However access to attached device (pendrive) was not possible - SCSI layer reported errors. Probaby you see more on your AT91 device as you know USB stack internals. Have you tried to bring up OHCI on you ARM board ? -- Best Regards, Piotr Ziecik From owner-freebsd-arm@FreeBSD.ORG Tue Jul 14 08:37:04 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87C91106566B; Tue, 14 Jul 2009 08:37:04 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe03.swip.net [212.247.154.65]) by mx1.freebsd.org (Postfix) with ESMTP id BA20D8FC26; Tue, 14 Jul 2009 08:37:03 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Hrwt8fWgTlIA:10 a=gg2W7PyvkLb8p4ie143lBA==:17 a=om2l70Afvy8vTdHHAnkA:9 a=5FU4yHL6dsHrAk0xMt0YfBKeK2UA:4 Received: from [194.248.135.20] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe03.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1284812544; Tue, 14 Jul 2009 10:37:02 +0200 From: Hans Petter Selasky To: Piotr =?iso-8859-2?q?Zi=EAcik?= Date: Tue, 14 Jul 2009 10:36:43 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA1; KDE/4.2.4; i386; ; ) References: <200906231035.43096.kosmo@semihalf.com> <200907091834.42462.hselasky@c2i.net> <200907141031.11185.kosmo@semihalf.com> In-Reply-To: <200907141031.11185.kosmo@semihalf.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200907141036.44652.hselasky@c2i.net> Cc: freebsd-arm@freebsd.org, thompsa@freebsd.org, freebsd-usb@freebsd.org Subject: Re: CPU Cache and busdma usage in USB X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 08:37:05 -0000 On Tuesday 14 July 2009 10:31:10 Piotr Zi=EAcik wrote: > > 1) My analysis: Only the data areas are being flushed/invalidated. No > > transfer descriptors are flushed/invalidated. I see no cache operations > > happening on any DMA control structures, even though there are calls fr= om > > EHCI to xxx_pc_flush() and xxx_pc_invalidate(). > > Probaby you see more on your AT91 device as you know USB stack internals. > Have you tried to bring up OHCI on you ARM board ? Not yet. I'm terribly busy with some LibUSB stuff headed for the 8-current= =20 release. As soon as I find time I will fire off a build and debug. BTW: Has pmap been fixed for ARM in 8-current? =2D-HPS From owner-freebsd-arm@FreeBSD.ORG Tue Jul 14 09:21:41 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E81C106564A; Tue, 14 Jul 2009 09:21:41 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id 1E14A8FC13; Tue, 14 Jul 2009 09:21:40 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from [10.0.0.34] (cardhu.semihalf.com [213.17.239.108]) by smtp.semihalf.com (Postfix) with ESMTPSA id 4B5EFC3A96; Tue, 14 Jul 2009 11:18:35 +0200 (CEST) Message-Id: From: Rafal Jaworowski To: Hans Petter Selasky In-Reply-To: <200907141036.44652.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-2; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v935.3) Date: Tue, 14 Jul 2009 11:21:39 +0200 References: <200906231035.43096.kosmo@semihalf.com> <200907091834.42462.hselasky@c2i.net> <200907141031.11185.kosmo@semihalf.com> <200907141036.44652.hselasky@c2i.net> X-Mailer: Apple Mail (2.935.3) Cc: thompsa@freebsd.org, freebsd-arm@freebsd.org, Marcel Moolenaar , =?ISO-8859-2?Q?Piotr_Zi=EAcik?= , freebsd-usb@freebsd.org Subject: Re: CPU Cache and busdma usage in USB X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 09:21:42 -0000 On 2009-07-14, at 10:36, Hans Petter Selasky wrote: > On Tuesday 14 July 2009 10:31:10 Piotr Zi=EAcik wrote: >>> 1) My analysis: Only the data areas are being flushed/invalidated. =20= >>> No >>> transfer descriptors are flushed/invalidated. I see no cache =20 >>> operations >>> happening on any DMA control structures, even though there are =20 >>> calls from >>> EHCI to xxx_pc_flush() and xxx_pc_invalidate(). >> > >> Probaby you see more on your AT91 device as you know USB stack =20 >> internals. >> Have you tried to bring up OHCI on you ARM board ? > > Not yet. I'm terribly busy with some LibUSB stuff headed for the 8-=20 > current > release. As soon as I find time I will fire off a build and debug. Please note these problems should be considered as a showstopper for =20 the release since USB is currently broken on at least three ARM =20 platforms in the tree (Marvell). > BTW: Has pmap been fixed for ARM in 8-current? Seems like the most critical problems (panics) are resolved and will =20 be pushed into SVN shortly. In case you'd like to apply the fix =20 directly, see: = http://people.freebsd.org/~raj/patches/arm/pmap-fixes.diff Rafal From owner-freebsd-arm@FreeBSD.ORG Tue Jul 14 09:31:19 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 206FC106564A for ; Tue, 14 Jul 2009 09:31:19 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe09.swipnet.se [212.247.155.1]) by mx1.freebsd.org (Postfix) with ESMTP id AD5E78FC1C for ; Tue, 14 Jul 2009 09:31:18 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=vWjDCZN0tDgA:10 a=gg2W7PyvkLb8p4ie143lBA==:17 a=lFYDmBXuFHZkeiYfzVoA:9 a=XfpAuKmVjHoXBguBVUGSVk9CScEA:4 Received: from [194.248.135.20] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe09.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 931714028; Tue, 14 Jul 2009 10:31:15 +0200 From: Hans Petter Selasky To: freebsd-arm@freebsd.org Date: Tue, 14 Jul 2009 10:30:56 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA1; KDE/4.2.4; i386; ; ) References: <4A5C3BF5.9030200@bulinfo.net> In-Reply-To: <4A5C3BF5.9030200@bulinfo.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907141030.57784.hselasky@c2i.net> Cc: Subject: Re: ohci not detected on at91rm9200? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 09:31:19 -0000 On Tuesday 14 July 2009 10:04:05 Krassimir Slavchev wrote: > Hi, > > The ohci controller is not detected by FreeBSD 8.0-BETA1 r195653. > Last working kernel I have is r187522 (~ Jan 2009) with old USB stack. > I have only removed the 'ugen' device from my kernel config file. > > Can someone confirm this? Or may be I miss something? > Does your kernel contain: "device ohci". Also diff the example config files for AT91RM9200 with yours under /sys/arm/conf . --HPS From owner-freebsd-arm@FreeBSD.ORG Tue Jul 14 10:07:51 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F1FB106564A for ; Tue, 14 Jul 2009 10:07:51 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from mx.bulinfo.net (mx.bulinfo.net [193.194.156.1]) by mx1.freebsd.org (Postfix) with ESMTP id 45DC78FC1C for ; Tue, 14 Jul 2009 10:07:49 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id A6882C3FF; Tue, 14 Jul 2009 13:07:48 +0300 (EEST) Received: from mx.bulinfo.net ([127.0.0.1]) by localhost (mx.bulinfo.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 34123-10; Tue, 14 Jul 2009 13:07:47 +0300 (EEST) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id A9FCDB9A0; Tue, 14 Jul 2009 13:07:46 +0300 (EEST) Message-ID: <4A5C58F0.5050904@bulinfo.net> Date: Tue, 14 Jul 2009 13:07:44 +0300 From: Krassimir Slavchev User-Agent: Thunderbird 2.0.0.19 (X11/20090225) MIME-Version: 1.0 To: Hans Petter Selasky References: <4A5C3BF5.9030200@bulinfo.net> <200907141030.57784.hselasky@c2i.net> In-Reply-To: <200907141030.57784.hselasky@c2i.net> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at mx.bulinfo.net Cc: freebsd-arm@freebsd.org Subject: Re: ohci not detected on at91rm9200? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 10:07:51 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hans Petter Selasky wrote: > On Tuesday 14 July 2009 10:04:05 Krassimir Slavchev wrote: >> Hi, >> >> The ohci controller is not detected by FreeBSD 8.0-BETA1 r195653. >> Last working kernel I have is r187522 (~ Jan 2009) with old USB stack. >> I have only removed the 'ugen' device from my kernel config file. >> >> Can someone confirm this? Or may be I miss something? >> > > Does your kernel contain: "device ohci". Also diff the example config files > for AT91RM9200 with yours under /sys/arm/conf . Yes, it does: kldstat -v | grep ohci 24 ohci/usbus With last working kernel from Jan: ... ohci0: mem 0xdfe00000-0xdfefffff irq 23 on atmelarm0 ohci0: [GIANT-LOCKED] ohci0: [ITHREAD] usb0: OHCI version 1.0 usb0 on ohci0 usb0: USB revision 1.0 uhub0: on usb0 uhub0: 2 ports with 2 removable, self powered uhub0: device problem (IOERROR), disabling port 2 ... I just upgraded the source tree and removed the ugen device from the previous kernel config file. > > --HPS > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFKXFjvxJBWvpalMpkRAlcYAJ9ThGnoLB1CVNtQtBR1xJpm2NoEJACfZyGR vfuHD4i+U7IEl14OROb72Yk= =YJ4r -----END PGP SIGNATURE----- From owner-freebsd-arm@FreeBSD.ORG Tue Jul 14 11:36:18 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60519106566C for ; Tue, 14 Jul 2009 11:36:18 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from mx.bulinfo.net (mx.bulinfo.net [193.194.156.1]) by mx1.freebsd.org (Postfix) with ESMTP id 172228FC23 for ; Tue, 14 Jul 2009 11:36:17 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id A641CC428; Tue, 14 Jul 2009 14:36:16 +0300 (EEST) Received: from mx.bulinfo.net ([127.0.0.1]) by localhost (mx.bulinfo.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 40185-10; Tue, 14 Jul 2009 14:36:16 +0300 (EEST) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id 1BFCAC40D; Tue, 14 Jul 2009 14:36:15 +0300 (EEST) Message-ID: <4A5C6DAC.6030103@bulinfo.net> Date: Tue, 14 Jul 2009 14:36:12 +0300 From: Krassimir Slavchev User-Agent: Thunderbird 2.0.0.19 (X11/20090225) MIME-Version: 1.0 To: Hans Petter Selasky References: <4A5C3BF5.9030200@bulinfo.net> <200907141030.57784.hselasky@c2i.net> In-Reply-To: <200907141030.57784.hselasky@c2i.net> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at mx.bulinfo.net Cc: freebsd-arm@freebsd.org Subject: Re: ohci not detected on at91rm9200? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 11:36:18 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hans Petter Selasky wrote: > On Tuesday 14 July 2009 10:04:05 Krassimir Slavchev wrote: >> Hi, >> >> The ohci controller is not detected by FreeBSD 8.0-BETA1 r195653. >> Last working kernel I have is r187522 (~ Jan 2009) with old USB stack. >> I have only removed the 'ugen' device from my kernel config file. >> >> Can someone confirm this? Or may be I miss something? >> > > Does your kernel contain: "device ohci". Also diff the example config files > for AT91RM9200 with yours under /sys/arm/conf . > > --HPS > > This fixes the problem: - --- files.at91 (revision 195653) +++ files.at91 (working copy) @@ -18,6 +18,7 @@ arm/at91/uart_bus_at91usart.c optional uart arm/at91/uart_cpu_at91rm9200usart.c optional uart arm/at91/uart_dev_at91usart.c optional uart +dev/usb/controller/ohci_atmelarm.c optional ohci # # All the boards we support # -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD4DBQFKXG2sxJBWvpalMpkRAsPLAKCg3LhSgdFav00A0VkAO28rYNGuEQCXSq7F j3wjjctKON3dmnORo023+w== =1zRQ -----END PGP SIGNATURE----- From owner-freebsd-arm@FreeBSD.ORG Tue Jul 14 11:49:20 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19838106564A for ; Tue, 14 Jul 2009 11:49:20 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe06.swip.net [212.247.154.161]) by mx1.freebsd.org (Postfix) with ESMTP id A5A028FC08 for ; Tue, 14 Jul 2009 11:49:19 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=vWjDCZN0tDgA:10 a=gg2W7PyvkLb8p4ie143lBA==:17 a=IyFnZZ-8x_S39xErnY4A:9 a=Ta1tW-gg_JcKEKhM-93L_JprIIwA:4 Received: from [194.248.135.20] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe06.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1277268355; Tue, 14 Jul 2009 13:49:18 +0200 From: Hans Petter Selasky To: Krassimir Slavchev Date: Tue, 14 Jul 2009 13:48:59 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA1; KDE/4.2.4; i386; ; ) References: <4A5C3BF5.9030200@bulinfo.net> <200907141030.57784.hselasky@c2i.net> <4A5C6DAC.6030103@bulinfo.net> In-Reply-To: <4A5C6DAC.6030103@bulinfo.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907141349.00740.hselasky@c2i.net> Cc: freebsd-arm@freebsd.org Subject: Re: ohci not detected on at91rm9200? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 11:49:20 -0000 On Tuesday 14 July 2009 13:36:12 Krassimir Slavchev wrote: > Hans Petter Selasky wrote: > > On Tuesday 14 July 2009 10:04:05 Krassimir Slavchev wrote: > >> Hi, > >> > >> The ohci controller is not detected by FreeBSD 8.0-BETA1 r195653. > >> Last working kernel I have is r187522 (~ Jan 2009) with old USB stack. > >> I have only removed the 'ugen' device from my kernel config file. > >> > >> Can someone confirm this? Or may be I miss something? > > > > Does your kernel contain: "device ohci". Also diff the example config > > files for AT91RM9200 with yours under /sys/arm/conf . > > > > --HPS > > This fixes the problem: > > --- files.at91 (revision 195653) > +++ files.at91 (working copy) > @@ -18,6 +18,7 @@ > arm/at91/uart_bus_at91usart.c optional uart > arm/at91/uart_cpu_at91rm9200usart.c optional uart > arm/at91/uart_dev_at91usart.c optional uart > +dev/usb/controller/ohci_atmelarm.c optional ohci > # > # All the boards we support > # Hi, %grep -d recurse ohci_atmelarm.c . ./files:dev/usb/controller/ohci_atmelarm.c optional ohci at91rm9200 The option is already there, but you need to add: device at91rm9200 To your kernel config file. Maybe you also want to test the device port: ./files:dev/usb/controller/at91dci_atmelarm.c optional at91dci at91rm9200 Requires usb_template module and ustorage module. BTW: Does the OHCI part work like expected? --HPS From owner-freebsd-arm@FreeBSD.ORG Tue Jul 14 14:14:55 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD60C106568E for ; Tue, 14 Jul 2009 14:14:55 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from mx.bulinfo.net (mx.bulinfo.net [193.194.156.1]) by mx1.freebsd.org (Postfix) with ESMTP id 070158FC22 for ; Tue, 14 Jul 2009 14:14:54 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id 52B92C444; Tue, 14 Jul 2009 17:14:53 +0300 (EEST) Received: from mx.bulinfo.net ([127.0.0.1]) by localhost (mx.bulinfo.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 53057-02; Tue, 14 Jul 2009 17:14:52 +0300 (EEST) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id ABC21B9A2; Tue, 14 Jul 2009 17:14:52 +0300 (EEST) Message-ID: <4A5C92DB.7030701@bulinfo.net> Date: Tue, 14 Jul 2009 17:14:51 +0300 From: Krassimir Slavchev User-Agent: Thunderbird 2.0.0.19 (X11/20090225) MIME-Version: 1.0 To: Hans Petter Selasky References: <4A5C3BF5.9030200@bulinfo.net> <200907141030.57784.hselasky@c2i.net> <4A5C6DAC.6030103@bulinfo.net> <200907141349.00740.hselasky@c2i.net> In-Reply-To: <200907141349.00740.hselasky@c2i.net> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at mx.bulinfo.net Cc: freebsd-arm@freebsd.org Subject: Re: ohci not detected on at91rm9200? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 14:14:56 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hans Petter Selasky wrote: > On Tuesday 14 July 2009 13:36:12 Krassimir Slavchev wrote: >> Hans Petter Selasky wrote: >>> On Tuesday 14 July 2009 10:04:05 Krassimir Slavchev wrote: >>>> Hi, >>>> >>>> The ohci controller is not detected by FreeBSD 8.0-BETA1 r195653. >>>> Last working kernel I have is r187522 (~ Jan 2009) with old USB stack. >>>> I have only removed the 'ugen' device from my kernel config file. >>>> >>>> Can someone confirm this? Or may be I miss something? >>> Does your kernel contain: "device ohci". Also diff the example config >>> files for AT91RM9200 with yours under /sys/arm/conf . >>> >>> --HPS >> This fixes the problem: >> >> --- files.at91 (revision 195653) >> +++ files.at91 (working copy) >> @@ -18,6 +18,7 @@ >> arm/at91/uart_bus_at91usart.c optional uart >> arm/at91/uart_cpu_at91rm9200usart.c optional uart >> arm/at91/uart_dev_at91usart.c optional uart >> +dev/usb/controller/ohci_atmelarm.c optional ohci >> # >> # All the boards we support >> # > > Hi, > > %grep -d recurse ohci_atmelarm.c . > ./files:dev/usb/controller/ohci_atmelarm.c optional ohci at91rm9200 > > The option is already there, but you need to add: > > device at91rm9200 > > To your kernel config file. Ahh, where this is documented? This device is missing in other at91rm9200 kernel config files in sys/arm/conf . > > Maybe you also want to test the device port: > > ./files:dev/usb/controller/at91dci_atmelarm.c optional at91dci at91rm9200 > > Requires usb_template module and ustorage module. You mean: device at91dci device usb_template device usfs ugen0.2: at usbus0 ugen0.2: at usbus0 (disconnected) ugen0.2: at usbus0 ustorage_fs0: on usbus0 umass0: FreeBSD foundation USB Memory Stick, rev 1.10/1.00, addr 5 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-2 device da0: 1.000MB/s transfers da0: 4MB (8192 512 byte sectors: 64H 32S/T 4C) Reading produces only zeros but I am not sure whether device port is initialized or not, most probably not. > > BTW: Does the OHCI part work like expected? At least the most memory sticks I have work. Only one does not work: ugen1.2: at usbus1 umass0: on usbus1 umass0: SCSI over Bulk-Only; quirks = 0x0000 umass0:0:0:-1: Attached to scbus0 This memory stick works on i386 6.x and 7.x umass0: Corsair Flash Voyager, rev 2.00/11.00, addr 2 da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 40.000MB/s transfers da0: 967MB (1981440 512 byte sectors: 64H 32S/T 967C) Great work! Thanks. Best Regards > > --HPS > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFKXJLbxJBWvpalMpkRAhh3AJ9lEaeWi1oP5iascpNy754zBmpAFACfTHeP zHgTf6+R0seIZfMjh9qGllQ= =+/2x -----END PGP SIGNATURE----- From owner-freebsd-arm@FreeBSD.ORG Tue Jul 14 15:04:05 2009 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA6CD106566B for ; Tue, 14 Jul 2009 15:04:05 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 4DBC48FC15 for ; Tue, 14 Jul 2009 15:04:05 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n6EExrck012901; Tue, 14 Jul 2009 08:59:54 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 14 Jul 2009 09:00:23 -0600 (MDT) Message-Id: <20090714.090023.709401729.imp@bsdimp.com> To: hselasky@c2i.net From: "M. Warner Losh" In-Reply-To: <200907141349.00740.hselasky@c2i.net> References: <200907141030.57784.hselasky@c2i.net> <4A5C6DAC.6030103@bulinfo.net> <200907141349.00740.hselasky@c2i.net> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-arm@FreeBSD.org Subject: Re: ohci not detected on at91rm9200? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 15:04:05 -0000 In message: <200907141349.00740.hselasky@c2i.net> Hans Petter Selasky writes: : On Tuesday 14 July 2009 13:36:12 Krassimir Slavchev wrote: : > Hans Petter Selasky wrote: : > > On Tuesday 14 July 2009 10:04:05 Krassimir Slavchev wrote: : > >> Hi, : > >> : > >> The ohci controller is not detected by FreeBSD 8.0-BETA1 r195653. : > >> Last working kernel I have is r187522 (~ Jan 2009) with old USB stack. : > >> I have only removed the 'ugen' device from my kernel config file. : > >> : > >> Can someone confirm this? Or may be I miss something? : > > : > > Does your kernel contain: "device ohci". Also diff the example config : > > files for AT91RM9200 with yours under /sys/arm/conf . : > > : > > --HPS : > : > This fixes the problem: : > : > --- files.at91 (revision 195653) : > +++ files.at91 (working copy) : > @@ -18,6 +18,7 @@ : > arm/at91/uart_bus_at91usart.c optional uart : > arm/at91/uart_cpu_at91rm9200usart.c optional uart : > arm/at91/uart_dev_at91usart.c optional uart : > +dev/usb/controller/ohci_atmelarm.c optional ohci : > # : > # All the boards we support : > # This patch looks good. : %grep -d recurse ohci_atmelarm.c . : ./files:dev/usb/controller/ohci_atmelarm.c optional ohci at91rm9200 : : The option is already there, but you need to add: : : device at91rm9200 This is lame. Totally lame. For a variety of reasons. I'll go fix this now. : To your kernel config file. : : Maybe you also want to test the device port: : : ./files:dev/usb/controller/at91dci_atmelarm.c optional at91dci at91rm9200 : : Requires usb_template module and ustorage module. dev/usb/controller/at91dci_atmelarm.c optional at91dci at91rm9200 dev/usb/controller/musb_otg_atmelarm.c optional musb at91rm9200 dev/usb/controller/uss820dci_atmelarm.c optional uss820dci at91rm9200 How many of these devices are actually present in at91rm9200 systems? : BTW: Does the OHCI part work like expected? : : --HPS : _______________________________________________ : freebsd-arm@freebsd.org mailing list : http://lists.freebsd.org/mailman/listinfo/freebsd-arm : To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" : : From owner-freebsd-arm@FreeBSD.ORG Tue Jul 14 15:05:35 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64ABB106567F for ; Tue, 14 Jul 2009 15:05:35 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 1B7598FC1A for ; Tue, 14 Jul 2009 15:05:35 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n6EF4LJT012972; Tue, 14 Jul 2009 09:04:21 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 14 Jul 2009 09:04:51 -0600 (MDT) Message-Id: <20090714.090451.-1264101575.imp@bsdimp.com> To: krassi@bulinfo.net From: "M. Warner Losh" In-Reply-To: <4A5C92DB.7030701@bulinfo.net> References: <4A5C6DAC.6030103@bulinfo.net> <200907141349.00740.hselasky@c2i.net> <4A5C92DB.7030701@bulinfo.net> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Tue_Jul_14_09_04_51_2009_733)--" Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org Subject: Re: ohci not detected on at91rm9200? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 15:05:35 -0000 ----Next_Part(Tue_Jul_14_09_04_51_2009_733)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit In message: <4A5C92DB.7030701@bulinfo.net> Krassimir Slavchev writes: : -----BEGIN PGP SIGNED MESSAGE----- : Hash: SHA1 : : Hans Petter Selasky wrote: : > On Tuesday 14 July 2009 13:36:12 Krassimir Slavchev wrote: : >> Hans Petter Selasky wrote: : >>> On Tuesday 14 July 2009 10:04:05 Krassimir Slavchev wrote: : >>>> Hi, : >>>> : >>>> The ohci controller is not detected by FreeBSD 8.0-BETA1 r195653. : >>>> Last working kernel I have is r187522 (~ Jan 2009) with old USB stack. : >>>> I have only removed the 'ugen' device from my kernel config file. : >>>> : >>>> Can someone confirm this? Or may be I miss something? : >>> Does your kernel contain: "device ohci". Also diff the example config : >>> files for AT91RM9200 with yours under /sys/arm/conf . : >>> : >>> --HPS : >> This fixes the problem: : >> : >> --- files.at91 (revision 195653) : >> +++ files.at91 (working copy) : >> @@ -18,6 +18,7 @@ : >> arm/at91/uart_bus_at91usart.c optional uart : >> arm/at91/uart_cpu_at91rm9200usart.c optional uart : >> arm/at91/uart_dev_at91usart.c optional uart : >> +dev/usb/controller/ohci_atmelarm.c optional ohci : >> # : >> # All the boards we support : >> # : > : > Hi, : > : > %grep -d recurse ohci_atmelarm.c . : > ./files:dev/usb/controller/ohci_atmelarm.c optional ohci at91rm9200 : > : > The option is already there, but you need to add: : > : > device at91rm9200 : > : > To your kernel config file. : : Ahh, where this is documented? This device is missing in other : at91rm9200 kernel config files in sys/arm/conf . It is bogus. : > : > Maybe you also want to test the device port: : > : > ./files:dev/usb/controller/at91dci_atmelarm.c optional at91dci at91rm9200 : > : > Requires usb_template module and ustorage module. : : You mean: : device at91dci : device usb_template : device usfs : : ugen0.2: at usbus0 : ugen0.2: at usbus0 (disconnected) : ugen0.2: at usbus0 : ustorage_fs0: on usbus0 : : umass0: FreeBSD foundation USB Memory Stick, rev 1.10/1.00, addr 5 : da0 at umass-sim0 bus 0 target 0 lun 0 : da0: Removable Direct Access SCSI-2 device : da0: 1.000MB/s transfers : da0: 4MB (8192 512 byte sectors: 64H 32S/T 4C) : : Reading produces only zeros but I am not sure whether device port is : initialized or not, most probably not. : : > : > BTW: Does the OHCI part work like expected? : : At least the most memory sticks I have work. Only one does not work: : ugen1.2: at usbus1 : umass0: on usbus1 : umass0: SCSI over Bulk-Only; quirks = 0x0000 : umass0:0:0:-1: Attached to scbus0 : : This memory stick works on i386 6.x and 7.x : umass0: Corsair Flash Voyager, rev 2.00/11.00, addr 2 : da0 at umass-sim0 bus 0 target 0 lun 0 : da0: Removable Direct Access SCSI-0 device : da0: 40.000MB/s transfers : da0: 967MB (1981440 512 byte sectors: 64H 32S/T 967C) Please try the patch enclosed. Warner ----Next_Part(Tue_Jul_14_09_04_51_2009_733)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="at91.diff" Index: conf/files =================================================================== --- conf/files (revision 195560) +++ conf/files (working copy) @@ -1565,19 +1565,14 @@ # # USB controller drivers # -dev/usb/controller/at91dci.c optional at91dci -dev/usb/controller/at91dci_atmelarm.c optional at91dci at91rm9200 dev/usb/controller/musb_otg.c optional musb -dev/usb/controller/musb_otg_atmelarm.c optional musb at91rm9200 dev/usb/controller/ehci.c optional ehci dev/usb/controller/ehci_pci.c optional ehci pci dev/usb/controller/ohci.c optional ohci -dev/usb/controller/ohci_atmelarm.c optional ohci at91rm9200 dev/usb/controller/ohci_pci.c optional ohci pci dev/usb/controller/uhci.c optional uhci dev/usb/controller/uhci_pci.c optional uhci pci dev/usb/controller/uss820dci.c optional uss820dci -dev/usb/controller/uss820dci_atmelarm.c optional uss820dci at91rm9200 dev/usb/controller/usb_controller.c optional usb # # USB storage drivers Index: arm/at91/files.at91 =================================================================== --- arm/at91/files.at91 (revision 195560) +++ arm/at91/files.at91 (working copy) @@ -25,3 +25,12 @@ arm/at91/board_hl200.c optional at91_board_hl200 arm/at91/board_kb920x.c optional at91_board_kb920x arm/at91/board_tsc4370.c optional at91_board_tsc4370 +# +# new usb has the usb support file in dev/usb rather than under +# at91. +# +dev/usb/controller/at91dci.c optional at91dci +dev/usb/controller/at91dci_atmelarm.c optional at91dci +dev/usb/controller/musb_otg_atmelarm.c optional musb +dev/usb/controller/ohci_atmelarm.c optional ohci +dev/usb/controller/uss820dci_atmelarm.c optional uss820dci ----Next_Part(Tue_Jul_14_09_04_51_2009_733)---- From owner-freebsd-arm@FreeBSD.ORG Tue Jul 14 15:17:00 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31C09106566B for ; Tue, 14 Jul 2009 15:17:00 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe05.swip.net [212.247.154.129]) by mx1.freebsd.org (Postfix) with ESMTP id B81248FC0C for ; Tue, 14 Jul 2009 15:16:59 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=vWjDCZN0tDgA:10 a=MXw7gxVQKqGXY79tIT8aFQ==:17 a=JAeLuXJwAG06DQ934uAA:9 a=9Scf8lkwzIlFtqSXUOpLvd86KZUA:4 Received: from [62.113.132.61] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe05.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1177717705; Tue, 14 Jul 2009 17:16:57 +0200 From: Hans Petter Selasky To: "M. Warner Losh" Date: Tue, 14 Jul 2009 17:16:40 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA1; KDE/4.2.4; i386; ; ) References: <200907141030.57784.hselasky@c2i.net> <200907141349.00740.hselasky@c2i.net> <20090714.090023.709401729.imp@bsdimp.com> In-Reply-To: <20090714.090023.709401729.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907141716.41209.hselasky@c2i.net> Cc: freebsd-arm@freebsd.org Subject: Re: ohci not detected on at91rm9200? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 15:17:00 -0000 On Tuesday 14 July 2009 17:00:23 M. Warner Losh wrote: > How many of these devices are actually present in at91rm9200 systems? Only the AT91UDP is built into the CPU. The others are only present in customisations. --HPS From owner-freebsd-arm@FreeBSD.ORG Tue Jul 14 15:21:29 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B0FA1065674 for ; Tue, 14 Jul 2009 15:21:29 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe16.tele2.se [212.247.155.225]) by mx1.freebsd.org (Postfix) with ESMTP id A54378FC08 for ; Tue, 14 Jul 2009 15:21:28 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=vWjDCZN0tDgA:10 a=MXw7gxVQKqGXY79tIT8aFQ==:17 a=-bknNYTd5aTdK7hKIjcA:9 a=QmwLY4xX3qrnrpg8YZINQKp5khgA:4 Received: from [62.113.132.61] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe16.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 536407275; Tue, 14 Jul 2009 17:21:27 +0200 From: Hans Petter Selasky To: Krassimir Slavchev Date: Tue, 14 Jul 2009 17:21:09 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA1; KDE/4.2.4; i386; ; ) References: <4A5C3BF5.9030200@bulinfo.net> <200907141349.00740.hselasky@c2i.net> <4A5C92DB.7030701@bulinfo.net> In-Reply-To: <4A5C92DB.7030701@bulinfo.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907141721.10364.hselasky@c2i.net> Cc: freebsd-arm@freebsd.org Subject: Re: ohci not detected on at91rm9200? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 15:21:29 -0000 On Tuesday 14 July 2009 16:14:51 Krassimir Slavchev wrote: > Hans Petter Selasky wrote: > > On Tuesday 14 July 2009 13:36:12 Krassimir Slavchev wrote: > >> Hans Petter Selasky wrote: > >>> On Tuesday 14 July 2009 10:04:05 Krassimir Slavchev wrote: > >>>> Hi, > > > > Hi, > > > > %grep -d recurse ohci_atmelarm.c . > > ./files:dev/usb/controller/ohci_atmelarm.c optional ohci at91rm9200 > > > > The option is already there, but you need to add: > > > > device at91rm9200 > > > > To your kernel config file. > > Ahh, where this is documented? This device is missing in other > at91rm9200 kernel config files in sys/arm/conf . See Warner's patch. It's not documented, more of a hack. > > > Maybe you also want to test the device port: > > > > ./files:dev/usb/controller/at91dci_atmelarm.c optional at91dci > > at91rm9200 > > > > Requires usb_template module and ustorage module. > > You mean: > device at91dci > device usb_template > device usfs > > ugen0.2: at usbus0 > ugen0.2: at usbus0 (disconnected) > ugen0.2: at usbus0 > ustorage_fs0: on usbus0 > > umass0: FreeBSD foundation USB Memory Stick, rev 1.10/1.00, addr 5 > da0 at umass-sim0 bus 0 target 0 lun 0 > da0: Removable Direct Access SCSI-2 device > da0: 1.000MB/s transfers > da0: 4MB (8192 512 byte sectors: 64H 32S/T 4C) > > Reading produces only zeros but I am not sure whether device port is > initialized or not, most probably not. > That's like expected. You need to format the image, hence it is only a RAM disk of 4MBytes. It there is also an ethernet DCI profile. See: sysctl hw.usb.template=1 And you need: device if_cdce In the kernel config. --HPS From owner-freebsd-arm@FreeBSD.ORG Tue Jul 14 17:20:25 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 149531065676; Tue, 14 Jul 2009 17:20:25 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id B20CD8FC2C; Tue, 14 Jul 2009 17:20:24 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from [10.0.0.34] (cardhu.semihalf.com [213.17.239.108]) by smtp.semihalf.com (Postfix) with ESMTPSA id 752E0C3A96; Tue, 14 Jul 2009 19:17:19 +0200 (CEST) Message-Id: From: Rafal Jaworowski To: Marcel Moolenaar In-Reply-To: Content-Type: text/plain; charset=ISO-8859-2; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v935.3) Date: Tue, 14 Jul 2009 19:20:22 +0200 References: <200906231035.43096.kosmo@semihalf.com> <200907091834.42462.hselasky@c2i.net> <200907141031.11185.kosmo@semihalf.com> <200907141036.44652.hselasky@c2i.net> X-Mailer: Apple Mail (2.935.3) Cc: Marcel Moolenaar , =?ISO-8859-2?Q?Piotr_Zi=EAcik?= , freebsd-usb@freebsd.org, freebsd-arm@freebsd.org, thompsa@freebsd.org Subject: Re: CPU Cache and busdma usage in USB X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 17:20:25 -0000 On 2009-07-14, at 18:58, Marcel Moolenaar wrote: > On Jul 14, 2009, at 2:21 AM, Rafal Jaworowski wrote: > >> >> On 2009-07-14, at 10:36, Hans Petter Selasky wrote: >> >>> On Tuesday 14 July 2009 10:31:10 Piotr Zi=EAcik wrote: >>>>> 1) My analysis: Only the data areas are being flushed/=20 >>>>> invalidated. No >>>>> transfer descriptors are flushed/invalidated. I see no cache =20 >>>>> operations >>>>> happening on any DMA control structures, even though there are =20 >>>>> calls from >>>>> EHCI to xxx_pc_flush() and xxx_pc_invalidate(). >>>> >>> >>>> Probaby you see more on your AT91 device as you know USB stack =20 >>>> internals. >>>> Have you tried to bring up OHCI on you ARM board ? >>> >>> Not yet. I'm terribly busy with some LibUSB stuff headed for the 8-=20= >>> current >>> release. As soon as I find time I will fire off a build and debug. >> >> Please note these problems should be considered as a showstopper =20 >> for the release since USB is currently broken on at least three ARM =20= >> platforms in the tree (Marvell). > > Rafal, > > Anything I can do to help? > (as a reminder: I have an Orion board) Your input on the desired final solution to these issues would be =20 appreciated. Please see the beginning of this thread (originated on =20 usb@ ML), where a quick fix was proposed by Piotr. That patch works =20 around the problems for us (also for some MIPS and noncoherent PPC), =20 but the problem here is that we believe that using bus dma for the =20 purpose of cache synchronization is improper in principle, and cpu-=20 specific calls should be used instead, although Hans is rather =20 reluctant to embracing the latter path. >>> BTW: Has pmap been fixed for ARM in 8-current? >> >> Seems like the most critical problems (panics) are resolved and =20 >> will be pushed into SVN shortly. In case you'd like to apply the =20 >> fix directly, see: = http://people.freebsd.org/~raj/patches/arm/pmap-fixes.diff > > Good! I was about to start a discussion about reverting > rev. 194459 for now. We're about to start BETA-2 and it > helps (at least Juniper :-) to have 8.0-RELEASE not be > DOA :-) No worries, we're also looking forward to 8.0 as a great ARM =20 release :-) I will be following up on that pmap-related stuff, but am =20= waiting for confirmation from stas@ there are no regressions on AT91 =20 with this patch. Rafal From owner-freebsd-arm@FreeBSD.ORG Tue Jul 14 17:59:10 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F0F11065676; Tue, 14 Jul 2009 17:59:10 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout030.mac.com (asmtpout030.mac.com [17.148.16.105]) by mx1.freebsd.org (Postfix) with ESMTP id 457478FC1D; Tue, 14 Jul 2009 17:59:10 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-2; format=flowed; delsp=yes Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp030.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KMS00CCJ763KL60@asmtp030.mac.com>; Tue, 14 Jul 2009 09:59:04 -0700 (PDT) From: Marcel Moolenaar In-reply-to: Date: Tue, 14 Jul 2009 09:58:51 -0700 Content-transfer-encoding: quoted-printable Message-id: References: <200906231035.43096.kosmo@semihalf.com> <200907091834.42462.hselasky@c2i.net> <200907141031.11185.kosmo@semihalf.com> <200907141036.44652.hselasky@c2i.net> To: Rafal Jaworowski X-Mailer: Apple Mail (2.1070) Cc: Marcel Moolenaar , =?iso-8859-2?Q?Piotr_Zi=EAcik?= , freebsd-usb@freebsd.org, freebsd-arm@freebsd.org, thompsa@freebsd.org Subject: Re: CPU Cache and busdma usage in USB X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 17:59:10 -0000 On Jul 14, 2009, at 2:21 AM, Rafal Jaworowski wrote: > > On 2009-07-14, at 10:36, Hans Petter Selasky wrote: > >> On Tuesday 14 July 2009 10:31:10 Piotr Zi=EAcik wrote: >>>> 1) My analysis: Only the data areas are being flushed/=20 >>>> invalidated. No >>>> transfer descriptors are flushed/invalidated. I see no cache =20 >>>> operations >>>> happening on any DMA control structures, even though there are =20 >>>> calls from >>>> EHCI to xxx_pc_flush() and xxx_pc_invalidate(). >>> >> >>> Probaby you see more on your AT91 device as you know USB stack =20 >>> internals. >>> Have you tried to bring up OHCI on you ARM board ? >> >> Not yet. I'm terribly busy with some LibUSB stuff headed for the 8-=20= >> current >> release. As soon as I find time I will fire off a build and debug. > > Please note these problems should be considered as a showstopper for =20= > the release since USB is currently broken on at least three ARM =20 > platforms in the tree (Marvell). Rafal, Anything I can do to help? (as a reminder: I have an Orion board) > >> BTW: Has pmap been fixed for ARM in 8-current? > > Seems like the most critical problems (panics) are resolved and will =20= > be pushed into SVN shortly. In case you'd like to apply the fix =20 > directly, see: = http://people.freebsd.org/~raj/patches/arm/pmap-fixes.diff Good! I was about to start a discussion about reverting rev. 194459 for now. We're about to start BETA-2 and it helps (at least Juniper :-) to have 8.0-RELEASE not be DOA :-) --=20 Marcel Moolenaar xcllnt@mac.com From owner-freebsd-arm@FreeBSD.ORG Wed Jul 15 11:48:36 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91351106566C for ; Wed, 15 Jul 2009 11:48:36 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from mx.bulinfo.net (mx.bulinfo.net [193.194.156.1]) by mx1.freebsd.org (Postfix) with ESMTP id 455E28FC1C for ; Wed, 15 Jul 2009 11:48:36 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id CF68FC552; Wed, 15 Jul 2009 14:48:34 +0300 (EEST) Received: from mx.bulinfo.net ([127.0.0.1]) by localhost (mx.bulinfo.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 96625-04; Wed, 15 Jul 2009 14:48:34 +0300 (EEST) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id 3CEA3BCED; Wed, 15 Jul 2009 14:48:34 +0300 (EEST) Message-ID: <4A5DC210.5000806@bulinfo.net> Date: Wed, 15 Jul 2009 14:48:32 +0300 From: Krassimir Slavchev User-Agent: Thunderbird 2.0.0.19 (X11/20090225) MIME-Version: 1.0 To: Hans Petter Selasky References: <4A5C3BF5.9030200@bulinfo.net> <200907141349.00740.hselasky@c2i.net> <4A5C92DB.7030701@bulinfo.net> <200907141721.10364.hselasky@c2i.net> In-Reply-To: <200907141721.10364.hselasky@c2i.net> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at mx.bulinfo.net Cc: freebsd-arm@freebsd.org Subject: Re: ohci not detected on at91rm9200? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2009 11:48:36 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hans Petter Selasky wrote: >> >> ugen0.2: at usbus0 >> ugen0.2: at usbus0 (disconnected) >> ugen0.2: at usbus0 >> ustorage_fs0: on usbus0 >> >> umass0: FreeBSD foundation USB Memory Stick, rev 1.10/1.00, addr 5 >> da0 at umass-sim0 bus 0 target 0 lun 0 >> da0: Removable Direct Access SCSI-2 device >> da0: 1.000MB/s transfers >> da0: 4MB (8192 512 byte sectors: 64H 32S/T 4C) >> >> Reading produces only zeros but I am not sure whether device port is >> initialized or not, most probably not. >> > > That's like expected. You need to format the image, hence it is only a RAM > disk of 4MBytes. It will be more useful to share the SPI flash for example. > > It there is also an ethernet DCI profile. > > See: > > sysctl hw.usb.template=1 > > And you need: > > device if_cdce > > In the kernel config. It is detected but after configuring the interface I cannot send/receive packets. cdce0: on uhub4 cdce0: faking MAC address cdce0: WARNING: using obsoleted IFF_NEEDSGIANT flag cdce0: Ethernet address: 2a:29:df:24:01:00 cdce0: usb error on tx: TIMEOUT cdce0: usb error on rx: IOERROR However, the idea is very good! > > --HPS > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFKXcIQxJBWvpalMpkRAj4XAKCzPTo9tqW8UYj85DNgdfl2owYmNgCgl4ps gVhlXyyuy2+waFtqJ9M2N0w= =Yef7 -----END PGP SIGNATURE----- From owner-freebsd-arm@FreeBSD.ORG Wed Jul 15 11:53:43 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3806E1065694 for ; Wed, 15 Jul 2009 11:53:43 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.swip.net [212.247.154.33]) by mx1.freebsd.org (Postfix) with ESMTP id 84C738FC12 for ; Wed, 15 Jul 2009 11:53:42 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=vWjDCZN0tDgA:10 a=gg2W7PyvkLb8p4ie143lBA==:17 a=PpnIbe5T08m20vBHKoAA:9 a=hKPEqFWnlYPVkxrRwd9Nn25lwH8A:4 a=zSkOo72E2eXfUtUk:21 a=0h21LyIvYe3vmxNE:21 Received: from [194.248.135.20] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe02.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1287113713; Wed, 15 Jul 2009 13:53:41 +0200 From: Hans Petter Selasky To: Krassimir Slavchev Date: Wed, 15 Jul 2009 13:53:20 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA1; KDE/4.2.4; i386; ; ) References: <4A5C3BF5.9030200@bulinfo.net> <200907141721.10364.hselasky@c2i.net> <4A5DC210.5000806@bulinfo.net> In-Reply-To: <4A5DC210.5000806@bulinfo.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907151353.21403.hselasky@c2i.net> Cc: freebsd-arm@freebsd.org Subject: Re: ohci not detected on at91rm9200? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2009 11:53:44 -0000 Hi, On Wednesday 15 July 2009 13:48:32 Krassimir Slavchev wrote: > Hans Petter Selasky wrote: > > It will be more useful to share the SPI flash for example. Yes. Please provide patches if you want additional functionality. > > > It there is also an ethernet DCI profile. > > > > See: > > > > sysctl hw.usb.template=1 > > > > And you need: > > > > device if_cdce > > > > In the kernel config. > > It is detected but after configuring the interface I cannot send/receive > packets. > > cdce0: 1.10/1.00, addr 2> on uhub4 > cdce0: faking MAC address > cdce0: WARNING: using obsoleted IFF_NEEDSGIANT flag > cdce0: Ethernet address: 2a:29:df:24:01:00 > cdce0: usb error on tx: TIMEOUT > cdce0: usb error on rx: IOERROR > You need to "ifconfig up" the interface on both sides before any traffic will pass. --HPS From owner-freebsd-arm@FreeBSD.ORG Wed Jul 15 13:23:18 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E9E4106564A for ; Wed, 15 Jul 2009 13:23:18 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from mx.bulinfo.net (mx.bulinfo.net [193.194.156.1]) by mx1.freebsd.org (Postfix) with ESMTP id 32CAE8FC12 for ; Wed, 15 Jul 2009 13:23:18 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id 8F3C3C6C9; Wed, 15 Jul 2009 16:23:16 +0300 (EEST) Received: from mx.bulinfo.net ([127.0.0.1]) by localhost (mx.bulinfo.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00945-08; Wed, 15 Jul 2009 16:23:15 +0300 (EEST) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id 5B6E6C5B5; Wed, 15 Jul 2009 16:23:15 +0300 (EEST) Message-ID: <4A5DD842.3080007@bulinfo.net> Date: Wed, 15 Jul 2009 16:23:14 +0300 From: Krassimir Slavchev User-Agent: Thunderbird 2.0.0.19 (X11/20090225) MIME-Version: 1.0 To: Hans Petter Selasky References: <4A5C3BF5.9030200@bulinfo.net> <200907141721.10364.hselasky@c2i.net> <4A5DC210.5000806@bulinfo.net> <200907151353.21403.hselasky@c2i.net> In-Reply-To: <200907151353.21403.hselasky@c2i.net> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at mx.bulinfo.net Cc: freebsd-arm@freebsd.org Subject: Re: ohci not detected on at91rm9200? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2009 13:23:18 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hans Petter Selasky wrote: >> It is detected but after configuring the interface I cannot send/receive >> packets. >> >> cdce0: > 1.10/1.00, addr 2> on uhub4 >> cdce0: faking MAC address >> cdce0: WARNING: using obsoleted IFF_NEEDSGIANT flag >> cdce0: Ethernet address: 2a:29:df:24:01:00 >> cdce0: usb error on tx: TIMEOUT >> cdce0: usb error on rx: IOERROR >> > > You need to "ifconfig up" the interface on both sides before any traffic will > pass. Of course they are: cdce0: flags=108c43 metric 0 mtu 1500 ether 2a:00:00:00:00:00 inet 192.168.2.121 netmask 0xffffff00 broadcast 192.168.2.255 media: Ethernet 10baseT/UTP status: active ate0: flags=8843 metric 0 mtu 1500 options=8 ether 43:00:00:01:ff:00 inet 192.168.2.189 netmask 0xffffff00 broadcast 192.168.2.255 media: Ethernet autoselect (100baseTX ) status: active -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFKXdhCxJBWvpalMpkRAvX8AJ9qOCXKNwA3pIx/+F7GkmNNbw6MlgCgk+Rx m7vmhz+1WVYZnpSOLhrO1KU= =sXH6 -----END PGP SIGNATURE----- From owner-freebsd-arm@FreeBSD.ORG Wed Jul 15 13:32:23 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B95EC106566C for ; Wed, 15 Jul 2009 13:32:23 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe11.tele2.se [212.247.155.65]) by mx1.freebsd.org (Postfix) with ESMTP id 4EAC68FC12 for ; Wed, 15 Jul 2009 13:32:23 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=vWjDCZN0tDgA:10 a=gg2W7PyvkLb8p4ie143lBA==:17 a=r7U4exS7A-IL3ncmhQYA:9 a=ktwAaxRaf3aRyZnDewy82YTyWYEA:4 Received: from [194.248.135.20] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe11.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1107565154; Wed, 15 Jul 2009 15:32:21 +0200 From: Hans Petter Selasky To: Krassimir Slavchev Date: Wed, 15 Jul 2009 15:32:02 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA1; KDE/4.2.4; i386; ; ) References: <4A5C3BF5.9030200@bulinfo.net> <200907151353.21403.hselasky@c2i.net> <4A5DD842.3080007@bulinfo.net> In-Reply-To: <4A5DD842.3080007@bulinfo.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907151532.03875.hselasky@c2i.net> Cc: freebsd-arm@freebsd.org Subject: Re: ohci not detected on at91rm9200? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2009 13:32:24 -0000 On Wednesday 15 July 2009 15:23:14 Krassimir Slavchev wrote: > Hans Petter Selasky wrote: > >> It is detected but after configuring the interface I cannot send/receive > > > > You need to "ifconfig up" the interface on both sides before any traffic > > will pass. > > Of course they are: > > cdce0: > flags=108c43 > metric 0 mtu 1500 > ether 2a:00:00:00:00:00 > inet 192.168.2.121 netmask 0xffffff00 broadcast 192.168.2.255 > media: Ethernet 10baseT/UTP > status: active > > ate0: flags=8843 metric 0 mtu 1500 > options=8 > ether 43:00:00:01:ff:00 > inet 192.168.2.189 netmask 0xffffff00 broadcast 192.168.2.255 > media: Ethernet autoselect (100baseTX ) > status: active You should have cdce devices on both sides, PC and Host. Looks like there will be a network conflict if you use 192.168.2.xx for both network devices when they are not on the same cable. ? --HPS From owner-freebsd-arm@FreeBSD.ORG Wed Jul 15 15:15:13 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B93F4106566B for ; Wed, 15 Jul 2009 15:15:13 +0000 (UTC) (envelope-from hpcharles@gmail.com) Received: from mail-fx0-f224.google.com (mail-fx0-f224.google.com [209.85.220.224]) by mx1.freebsd.org (Postfix) with ESMTP id 427E78FC14 for ; Wed, 15 Jul 2009 15:15:12 +0000 (UTC) (envelope-from hpcharles@gmail.com) Received: by fxm24 with SMTP id 24so3137410fxm.43 for ; Wed, 15 Jul 2009 08:15:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:date:message-id :subject:from:to:content-type; bh=eBb1h0Enb8QSzLVNFJTBj0mfbnjrGvTGpDvb8awZaRo=; b=ULIx5kvG6PyMu5yvkq8xsdY/INvim7X/McWLsq/MVT/PZT8u4TOVEwo2OZNVq8KhFf 6TFTvv/bRwEiQWi34jOryjoSaE+AJwmW8I/tK2shiTvQeYN2JkjrmLjM/eBDu1JwDmG5 E51kfH5NMQMa2fZ5aFCo5WOxcojLkmyal13V0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:date:message-id:subject:from:to:content-type; b=oY58ejqV/49kxtF7CBlWQSZHoeGtvrkR16UegrouxFIRHSDZu5q7HMWTNYODBXfbkZ Dak/rWkHIySvjJ4PTDJjL+6uBFdb5L+Ck0633zdq1jLD1/Zy6SRWJJaUSjizYM5FaALR rbYRhTOiqns6OAwBuBEiknotnRYiRtk3v/Atk= MIME-Version: 1.0 Received: by 10.103.121.16 with SMTP id y16mr4157078mum.6.1247669560063; Wed, 15 Jul 2009 07:52:40 -0700 (PDT) Date: Wed, 15 Jul 2009 16:52:40 +0200 Message-ID: <4734a3ed0907150752g595b680frcacba26da7979479@mail.gmail.com> From: Henri-Pierre Charles To: freebsd-arm@freebsd.org Content-Type: multipart/mixed; boundary=001636848210ecb59d046ebfb41f Subject: qemu / boot parameter X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: hpcharles@gmail.com List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2009 15:15:14 -0000 --001636848210ecb59d046ebfb41f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hello list, I try to do my first FreeBSD/arm installation. I plan to use qemu. I've started with this page http://people.freebsd.org/~cognet/freebsd_arm.txt for kernel/world build. For my personnal teaching, I've summarized these instructions in the attached script. Now, I'm stuck with qemu. I've tried many invocation, and the best result I get is with qemu-system-arm hda.img -boot n \ -tftp $ARMFS/boot/kernel/ -bootp /kernel \ -kernel $ARMFS/boot/kernel/kernel \ -m 300 \ -M integratorc And I get : qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0200100 (which is not far from KERNVIRTADDR) I miss something somewhere ? Any idea ? HPC -- HPC --001636848210ecb59d046ebfb41f Content-Type: application/octet-stream; name=BuildArmImage Content-Disposition: attachment; filename=BuildArmImage Content-Transfer-Encoding: base64 X-Attachment-Id: f_fx65zs9f0 IyEvYmluL3Rjc2gKCgojIFdoZXJlIHRoZSB0aGluZ3MgbGl2ZQpzZXRlbnYgQVJNRlMgL3Vzci90 bXAvRnJlZUJTREFSTS03LjIKc2V0ZW52IENST1NTRElSIC91c3IvY3Jvc3MvYXJtCgojIFZhcmlv dXMgYWxpYXNlcwpzZXRlbnYgTUFLRSAibWFrZSAtaiA4ICIKc2V0ZW52IENDICAgICAgJENST1NT RElSL3Vzci9iaW4vZ2NjCnNldGVudiBBUyAgICAgICRDUk9TU0RJUi91c3IvYmluL2FzCnNldGVu diBOTSAgICAgICRDUk9TU0RJUi91c3IvYmluL25tCnNldGVudiBSQU5MSUIgICRDUk9TU0RJUi91 c3IvYmluL3JhbmxpYgpzZXRlbnYgTEQgICAgICAkQ1JPU1NESVIvdXNyL2Jpbi9sZApzZXRlbnYg T0JKQ09QWSAkQ1JPU1NESVIvdXNyL2Jpbi9vYmpjb3B5CnNldGVudiBTSVpFICAgICRDUk9TU0RJ Ui91c3IvYmluL3NpemUKc2V0ZW52IE1BQ0hJTkUgYXJtCnNldGVudiBNQUNISU5FX0FSQ0ggYXJt CgojIEdlbmVyYXRlIGluaXRpYWwgZmlsZSBzeXN0ZW0KbWtkaXIgJEFSTUZTCmNkICAgICRBUk1G Uwpta2RpciAtcCB1c3IvYmluCm1rZGlyIC1wIHVzci9saWIgICAgICAgICAgICAgICAgICAKbWtk aXIgLXAgdXNyL2luY2x1ZGUgICAgICAgICAgICAgICAgIApta2RpciAtcCB1c3Ivc2hhcmUvbWFu L21hbjEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IApta2RpciAtcCB1c3Ivc2hhcmUvaW5mbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIApta2RpciAtcCB1c3IvbGliZGF0YS9sZHNjcmlwdHMg Cm1rZGlyIC1wIHVzci9saWJleGVjCgojIEdlbmVyYXRlIGNyb3NzIGNvbXBpbCB0b29scwpjZCAv dXNyL3NyYy9nbnUvdXNyLmJpbi9jYwpzdWRvICRNQUtFIFRBUkdFVF9BUkNIPWFybSBUT09MU19Q UkVGSVg9JENST1NTRElSIGRlcGVuZCBhbGwKc3VkbyAkTUFLRSBUQVJHRVRfQVJDSD1hcm0gVE9P TFNfUFJFRklYPSRDUk9TU0RJUiBERVNURElSPSRDUk9TU0RJUiBpbnN0YWxsCmNkIC91c3Ivc3Jj L2dudS91c3IuYmluL2JpbnV0aWxzCnN1ZG8gJE1BS0UgVEFSR0VUX0FSQ0g9YXJtIFRPT0xTX1BS RUZJWD0kQ1JPU1NESVIgY2xlYW4gZGVwZW5kIGFsbApzdWRvICRNQUtFIFRBUkdFVF9BUkNIPWFy bSBUT09MU19QUkVGSVg9JENST1NTRElSIERFU1RESVI9JENST1NTRElSIGluc3RhbGwKCiMgQ3Jl YXRlIGEga2VybmVsCmNkIC91c3Ivc3JjL3N5cy9hcm0vY29uZgpzdWRvIGNvbmZpZyBJUTMxMjQ0 CmNkIC4uL2NvbXBpbGUvSVEzMTI0NCAmJiBzdWRvICRNQUtFIGNsZWFuZGVwZW5kIGRlcGVuZCBh bGwKc3VkbyBtYWtlIGluc3RhbGwgREVTVERJUj0kQVJNRlMKIyBNYWtlICB3b3JsZApjZCAvdXNy L3NyYwokTUFLRSBUQVJHRVRfQVJDSD1hcm0gVEFSR0VUX0NQVVRZUEU9eHNjYWxlIGJ1aWxkd29y bGQKJE1BS0UgVEFSR0VUX0FSQ0g9YXJtIFRBUkdFVF9DUFVUWVBFPXhzY2FsZSBERVNURElSPSRB Uk1GUyBpbnN0YWxsd29ybGQKCmV4aXQKCiMgU3RhcnQgcWVtdS1zeXN0ZW0tYXJtIAoKIyBxZW11 LXN5c3RlbS1hcm0gRnJlZUJTRDdBcm0uaW1nIC1ib290IG4gLXRmdHAgJEFSTUZTL2Jvb3Qva2Vy bmVsLwpxZW11LXN5c3RlbS1hcm0gaGRhLmltZyAtYm9vdCBuIAkJXAogICAgLXRmdHAgJEFSTUZT L2Jvb3Qva2VybmVsLyAtYm9vdHAgL2tlcm5lbCAJXAogICAgLWtlcm5lbCAkQVJNRlMvYm9vdC9r ZXJuZWwva2VybmVsIAkJXAogICAgLW0gMzAwIAkJCQkJXAogICAgLU0gaW50ZWdyYXRvcmNwCg== --001636848210ecb59d046ebfb41f-- From owner-freebsd-arm@FreeBSD.ORG Wed Jul 15 15:41:18 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02A34106566B for ; Wed, 15 Jul 2009 15:41:18 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from mx.bulinfo.net (mx.bulinfo.net [193.194.156.1]) by mx1.freebsd.org (Postfix) with ESMTP id AABDB8FC1F for ; Wed, 15 Jul 2009 15:41:17 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id D6DE5C794; Wed, 15 Jul 2009 18:41:15 +0300 (EEST) Received: from mx.bulinfo.net ([127.0.0.1]) by localhost (mx.bulinfo.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 11164-03; Wed, 15 Jul 2009 18:41:15 +0300 (EEST) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id 0CF1EC31D; Wed, 15 Jul 2009 18:41:15 +0300 (EEST) Message-ID: <4A5DF89A.1070004@bulinfo.net> Date: Wed, 15 Jul 2009 18:41:14 +0300 From: Krassimir Slavchev User-Agent: Thunderbird 2.0.0.19 (X11/20090225) MIME-Version: 1.0 To: Hans Petter Selasky References: <4A5C3BF5.9030200@bulinfo.net> <200907151353.21403.hselasky@c2i.net> <4A5DD842.3080007@bulinfo.net> <200907151532.03875.hselasky@c2i.net> In-Reply-To: <200907151532.03875.hselasky@c2i.net> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at mx.bulinfo.net Cc: freebsd-arm@freebsd.org Subject: Re: ohci not detected on at91rm9200? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2009 15:41:18 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hans Petter Selasky wrote: > On Wednesday 15 July 2009 15:23:14 Krassimir Slavchev wrote: >> Hans Petter Selasky wrote: >>>> It is detected but after configuring the interface I cannot send/receive > >>> You need to "ifconfig up" the interface on both sides before any traffic >>> will pass. >> Of course they are: >> >> cdce0: >> flags=108c43 >> metric 0 mtu 1500 >> ether 2a:00:00:00:00:00 >> inet 192.168.2.121 netmask 0xffffff00 broadcast 192.168.2.255 >> media: Ethernet 10baseT/UTP >> status: active >> >> ate0: flags=8843 metric 0 mtu 1500 >> options=8 >> ether 43:00:00:01:ff:00 >> inet 192.168.2.189 netmask 0xffffff00 broadcast 192.168.2.255 >> media: Ethernet autoselect (100baseTX ) >> status: active > > You should have cdce devices on both sides, PC and Host. Looks like there will > be a network conflict if you use 192.168.2.xx for both network devices when > they are not on the same cable. > > ? Yes, I realize that. After adding cdce on arm board: cdce0: on usbus0 ue0: on cdce0 ue0: Ethernet address: 2a:23:45:67:89:54 ue0: flags=8843 metric 0 mtu 1500 ether 2a:23:45:67:89:54 But on the other side running 7.2: cdce0: on uhub4 cdce0: setting alternate interface failed device_attach: cdce0 attach returned 6 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFKXfiaxJBWvpalMpkRAi6fAJwMzhfBcwNouW4Y7iPFFHl9PjiUTQCcCSzB hlRr1q6cBUpGcGXjgm9/wh8= =bXm9 -----END PGP SIGNATURE----- From owner-freebsd-arm@FreeBSD.ORG Thu Jul 16 09:33:54 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9180C1065672 for ; Thu, 16 Jul 2009 09:33:54 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe13.swip.net [212.247.155.129]) by mx1.freebsd.org (Postfix) with ESMTP id EF4A78FC13 for ; Thu, 16 Jul 2009 09:33:53 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=vWjDCZN0tDgA:10 a=gg2W7PyvkLb8p4ie143lBA==:17 a=6I5d2MoRAAAA:8 a=LB_BjYVugI_Mejrs-OwA:9 a=Y0hpUecGYeMhxM8fhG4A:7 a=RLYROsxkiImR_ya2IVyN9EK9df4A:4 Received: from [194.248.135.20] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe13.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 890686109; Thu, 16 Jul 2009 10:33:51 +0200 From: Hans Petter Selasky To: Krassimir Slavchev Date: Thu, 16 Jul 2009 10:33:33 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA1; KDE/4.2.4; i386; ; ) References: <4A5C3BF5.9030200@bulinfo.net> <200907151532.03875.hselasky@c2i.net> <4A5DF89A.1070004@bulinfo.net> In-Reply-To: <4A5DF89A.1070004@bulinfo.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907161033.34560.hselasky@c2i.net> Cc: freebsd-arm@freebsd.org Subject: Re: ohci not detected on at91rm9200? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2009 09:33:54 -0000 On Wednesday 15 July 2009 17:41:14 Krassimir Slavchev wrote: > Hans Petter Selasky wrote: > > On Wednesday 15 July 2009 15:23:14 Krassimir Slavchev wrote: > >> Hans Petter Selasky wrote: > >>>> It is detected but after configuring the interface I cannot > >>>> send/receive > >>> > >>> You need to "ifconfig up" the interface on both sides before any > >>> traffic will pass. > >> > >> Of course they are: > >> > >> cdce0: > >> flags=108c43 > >> metric 0 mtu 1500 > >> ether 2a:00:00:00:00:00 > >> inet 192.168.2.121 netmask 0xffffff00 broadcast 192.168.2.255 > >> media: Ethernet 10baseT/UTP > >> status: active > >> > >> ate0: flags=8843 metric 0 mtu > >> 1500 options=8 > >> ether 43:00:00:01:ff:00 > >> inet 192.168.2.189 netmask 0xffffff00 broadcast 192.168.2.255 > >> media: Ethernet autoselect (100baseTX ) > >> status: active > > > > You should have cdce devices on both sides, PC and Host. Looks like there > > will be a network conflict if you use 192.168.2.xx for both network > > devices when they are not on the same cable. > > > > ? > > Yes, I realize that. > > After adding cdce on arm board: > cdce0: on usbus0 > ue0: on cdce0 > ue0: Ethernet address: 2a:23:45:67:89:54 > > ue0: flags=8843 metric 0 mtu 1500 > ether 2a:23:45:67:89:54 > > > But on the other side running 7.2: > cdce0: 1.10/1.00, addr 2> on uhub4 > cdce0: setting alternate interface failed > device_attach: cdce0 attach returned 6 Maybe the following patch helps on the ARM side: http://perforce.freebsd.org/chv.cgi?CH=166156 I'm going to test this setup, and will probably resolve the issue, if I find any, including the cache sync stuff. --HPS From owner-freebsd-arm@FreeBSD.ORG Thu Jul 16 10:45:19 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF1B010656CC for ; Thu, 16 Jul 2009 10:45:19 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from mx.bulinfo.net (mx.bulinfo.net [193.194.156.1]) by mx1.freebsd.org (Postfix) with ESMTP id 627FA8FC1F for ; Thu, 16 Jul 2009 10:45:19 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id EAA46C829; Thu, 16 Jul 2009 13:45:17 +0300 (EEST) Received: from mx.bulinfo.net ([127.0.0.1]) by localhost (mx.bulinfo.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 46299-06; Thu, 16 Jul 2009 13:45:13 +0300 (EEST) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id 9C602C82B; Thu, 16 Jul 2009 13:45:13 +0300 (EEST) Message-ID: <4A5F04B8.1060109@bulinfo.net> Date: Thu, 16 Jul 2009 13:45:12 +0300 From: Krassimir Slavchev User-Agent: Thunderbird 2.0.0.19 (X11/20090225) MIME-Version: 1.0 To: Hans Petter Selasky References: <4A5C3BF5.9030200@bulinfo.net> <200907151532.03875.hselasky@c2i.net> <4A5DF89A.1070004@bulinfo.net> <200907161033.34560.hselasky@c2i.net> In-Reply-To: <200907161033.34560.hselasky@c2i.net> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at mx.bulinfo.net Cc: freebsd-arm@freebsd.org Subject: Re: ohci not detected on at91rm9200? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2009 10:45:19 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hans Petter Selasky wrote: >> >> After adding cdce on arm board: >> cdce0: on usbus0 >> ue0: on cdce0 >> ue0: Ethernet address: 2a:23:45:67:89:54 >> >> ue0: flags=8843 metric 0 mtu 1500 >> ether 2a:23:45:67:89:54 >> >> >> But on the other side running 7.2: >> cdce0: > 1.10/1.00, addr 2> on uhub4 >> cdce0: setting alternate interface failed >> device_attach: cdce0 attach returned 6 > > Maybe the following patch helps on the ARM side: > > http://perforce.freebsd.org/chv.cgi?CH=166156 > > I'm going to test this setup, and will probably resolve the issue, if I find > any, including the cache sync stuff. I have made these changes on the ARM side but the error is same. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFKXwS4xJBWvpalMpkRAssSAJ43mCgijyZKFgnzR/xGquLRqgQnAgCeJsfE OYEP1MwnCcvGrONUi2DMCJg= =qCW4 -----END PGP SIGNATURE----- From owner-freebsd-arm@FreeBSD.ORG Thu Jul 16 13:10:33 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B5D31065673 for ; Thu, 16 Jul 2009 13:10:33 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 2F3868FC14 for ; Thu, 16 Jul 2009 13:10:33 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from stasss.yandex.ru (dhcp170-227-red.yandex.net [95.108.170.227]) by mx0.deglitch.com (Postfix) with ESMTPSA id 24BB78FC27; Thu, 16 Jul 2009 17:10:31 +0400 (MSD) Date: Thu, 16 Jul 2009 17:10:30 +0400 From: Stanislav Sedov To: hpcharles@gmail.com Message-Id: <20090716171030.a0e7a3f0.stas@FreeBSD.org> In-Reply-To: <4734a3ed0907150752g595b680frcacba26da7979479@mail.gmail.com> References: <4734a3ed0907150752g595b680frcacba26da7979479@mail.gmail.com> Organization: The FreeBSD Project X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Thu__16_Jul_2009_17_10_30_+0400_guTENwVAxq1_al2G" Cc: freebsd-arm@freebsd.org Subject: Re: qemu / boot parameter X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2009 13:10:33 -0000 --Signature=_Thu__16_Jul_2009_17_10_30_+0400_guTENwVAxq1_al2G Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, 15 Jul 2009 16:52:40 +0200 Henri-Pierre Charles mentioned: > Hello list, I try to do my first FreeBSD/arm installation. I plan to > use qemu. I've started with this page > http://people.freebsd.org/~cognet/freebsd_arm.txt for kernel/world > build. For my personnal teaching, I've summarized these instructions > in the attached script. >=20 > Now, I'm stuck with qemu. I've tried many invocation, and the best > result I get is with qemu-system-arm hda.img -boot n \ > -tftp $ARMFS/boot/kernel/ -bootp /kernel \ > -kernel $ARMFS/boot/kernel/kernel \ > -m 300 \ > -M integratorc >=20 > And I get : > qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0200100 > (which is not far from KERNVIRTADDR) >=20 > I miss something somewhere ? Any idea ? >=20 As far as I know we don't currently support qemu ARM/intergrator platform. However, current versions of qemu can emulate XScale devices (gumstix, for example), so you may want to try this type of emulation with your XScale kernel. Please note, however, that qemu usually emulate specific memory layouts that may not match what FreeBSD kernel which was configured to run on the different hardware would expect. So a bit of hand-tweaking might be required. You should study where qemu maps memory and onboard devices, and how it passes the control to FreeBSD kernel and make the appropriate modifications to the code/kernel config. Hope that helps. --=20 Stanislav Sedov ST4096-RIPE --Signature=_Thu__16_Jul_2009_17_10_30_+0400_guTENwVAxq1_al2G Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iQIcBAEBAgAGBQJKXybGAAoJEKN82nOYvCd0oFEP/0PEIVKyls+UHmHdjJhtjXlF 8mFOLeQgua+f5FxYgOymTXhh+3Jq6wq1p/DElL/Qf9LIB78A14p6iDzHjHGuJKOS Q2RFEQpBkWIk1DeOlr2/g+wCOC+DLAtWnzxNYE2kmdjG9kxY4jQ0c0bGWTn7Omhg 3RhgwAlPmSEEyqy+1uNaXMsLXoVMIY1YmmEmylhMF/YlQU8JPknRPeCvGYAZHaWY XSqxhZVrFY4kWOKQcytJT+Fh0HiE3AW0zCvPmO9pEILSjOpafwEx9MOC1FrKO+vQ ea2uNMr4DWVg7oBHWl3hE44EkJ9u0i3uNiKPhRcEmkicX4Bb+IjcNFEXDX6YOnTv PPFUD1RkgZXT9HIgrbRISanp2H+oOkoafUf4x5QoZzjydHbbfw+kCubkuKZM64ar 5VSFE62Cs0+QUCFlV+0yXVaAMFXvipRz1wDGWysVBwwUrCe/R7BUkuDoNpKpzbO9 W9PMAbCmRDK9hKi7Ejb4iUW7HTSZyV+6bM3oioBiAldPrwEmiggayxtCOZ/bkZTq SFuWIXrPcpsVYKt6n3zjjbjFsLPvfV8fLX472PVDuScbrg0hd0lN8ZxfTVgTSquj LtpiQDAM4+lVevHlvwTC7BNnj4sxWpV4ccUkn1Qt2by7dBJ5nZMay5z6xoilYRrz WJJ7rep2r9HD314W0sCv =y1kB -----END PGP SIGNATURE----- --Signature=_Thu__16_Jul_2009_17_10_30_+0400_guTENwVAxq1_al2G-- From owner-freebsd-arm@FreeBSD.ORG Thu Jul 16 14:16:30 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD6151065733; Thu, 16 Jul 2009 14:16:30 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: from mail-bw0-f208.google.com (mail-bw0-f208.google.com [209.85.218.208]) by mx1.freebsd.org (Postfix) with ESMTP id 06C988FC1D; Thu, 16 Jul 2009 14:16:29 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: by bwz4 with SMTP id 4so133537bwz.43 for ; Thu, 16 Jul 2009 07:16:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=wmDsYnWXmhMAAovBCYMqnh23xwESb/hzWlci4aMjf9I=; b=YzMf137/rrVmZy0HFECJeQ4ssNrCvdm2dAFi7VzLo4W1Ph+ytZKf8cYeVzc0wLKLfz fKFK4y0S5WUU54ulFMRjFhwy779KdECY11WBOyTwUpQNi1E4a6USCNKJDc4g3qrsyCci WZRHHkfQX+RnZZRWhD77J7ON7181WBf7eHa5o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=fU89mzD/setWc6Cb7t9NTqsJY4FD9o1xDSQ2jpAFUSyUnC5B8feeQ6q1hfrNCfawND uZixeQEr01MWRqiQ4LTKgd4q4PGiPksCL5WGI8HiUDIRpL9rFPAkQuULMu9UNYNS8tLg zrr/mXCK6/QI1Uzzubb1QSYMHX+QwutfDT6F0= MIME-Version: 1.0 Received: by 10.204.65.1 with SMTP id g1mr8874819bki.57.1247751820850; Thu, 16 Jul 2009 06:43:40 -0700 (PDT) In-Reply-To: <20090716171030.a0e7a3f0.stas@FreeBSD.org> References: <4734a3ed0907150752g595b680frcacba26da7979479@mail.gmail.com> <20090716171030.a0e7a3f0.stas@FreeBSD.org> Date: Thu, 16 Jul 2009 15:43:37 +0200 Message-ID: From: Jacques Fourie To: Stanislav Sedov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-arm@freebsd.org Subject: Re: qemu / boot parameter X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2009 14:16:31 -0000 On Thu, Jul 16, 2009 at 3:10 PM, Stanislav Sedov wrote: > On Wed, 15 Jul 2009 16:52:40 +0200 > Henri-Pierre Charles mentioned: > >> Hello list, I try to do my first FreeBSD/arm installation. I plan to >> use qemu. I've started with this page >> http://people.freebsd.org/~cognet/freebsd_arm.txt for kernel/world >> build. For my personnal teaching, I've summarized these instructions >> in the attached script. >> >> Now, I'm stuck with qemu. I've tried many invocation, and the best >> result I get is with qemu-system-arm hda.img -boot n =A0 =A0 =A0 =A0 =A0= \ >> =A0 =A0 -tftp $ARMFS/boot/kernel/ -bootp /kernel =A0\ >> =A0 =A0 -kernel $ARMFS/boot/kernel/kernel =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 \ >> =A0 =A0 -m 300 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0\ >> =A0 =A0 -M integratorc >> >> And I get : >> qemu: fatal: Trying to execute code outside RAM or ROM at 0xc0200100 >> (which is not far from KERNVIRTADDR) >> >> I miss something somewhere ? Any idea ? >> > > As far as I know we don't currently support qemu ARM/intergrator platform= . > However, current versions of qemu can emulate XScale devices (gumstix, > for example), so you may want to try this type of emulation with your > XScale kernel. > > Please note, however, that qemu usually emulate specific memory layouts > that may not match what FreeBSD kernel which was configured to run > on the different hardware would expect. =A0So a bit of hand-tweaking migh= t > be required. =A0You should study where qemu maps memory and onboard devic= es, > and how it passes the control to FreeBSD kernel and make the appropriate > modifications to the code/kernel config. > > Hope that helps. > > -- > Stanislav Sedov > ST4096-RIPE > Here is a recipe that worked for me on qemu 0.9.1. As far as I know it won't work with the qemu 0.10 but your mileage may vary. * Apply following patch to sys/arm/xscale/pxa/uart_bus_pxa.c (Patch by Mark Tinguely) static int uart_pxa_probe(device_t dev) { bus_space_handle_t base; struct uart_softc *sc; +#ifdef QEMU + base =3D (bus_space_handle_t)pxa_get_base(dev); + if (0x40100000 !=3D (unsigned int) base) + return (ENXIO); +#else /* Check to see if the enable bit's on. */ if ((bus_space_read_4(obio_tag, base, (REG_IER << 2)) & PXA_UART_UUE) =3D=3D 0) return (ENXIO); +#endif sc =3D device_get_softc(dev); sc->sc_class =3D &uart_ns8250_class; return(uart_bus_probe(dev, 2, PXA2X0_COM_FREQ, 0, 0)); } * Remove ARM_CACHE_LOCK_ENABLE from sys/arm/xscale/std.xscale and compile a GUMSTIX kernel * Build flash image: dd of=3Dflash bs=3D1k count=3D16k if=3D/dev/zero dd of=3Dflash bs=3D1k conv=3Dnotrunc if=3Du-boot-connex-400-r1604.bin dd of=3Dflash bs=3D1k conv=3Dnotrunc seek=3D256 if=3Dkernel.gz.tramp I start qemu as follows: qemu-system-arm -M connex -m 289 -pflash flash \ -nographic -serial tcp::4000,server \ -net nic,macaddr=3D52:54:00:12:34:50,vlan=3D0,model=3Dsmc91c111 \ -net tap,vlan=3D0,ifname=3Dtap1,script=3Dno I then telnet to port 4000 for the serial console and use 'bootelf 4000' in the uboot prompt to boot the kernel. From owner-freebsd-arm@FreeBSD.ORG Thu Jul 16 18:22:50 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD5871065672 for ; Thu, 16 Jul 2009 18:22:50 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe09.tele2.se [212.247.155.1]) by mx1.freebsd.org (Postfix) with ESMTP id 70A088FC18 for ; Thu, 16 Jul 2009 18:22:50 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=vWjDCZN0tDgA:10 a=MXw7gxVQKqGXY79tIT8aFQ==:17 a=6I5d2MoRAAAA:8 a=vVp9YtHgRjnUUa3HezcA:9 a=4ttwdEW9zR8HkZkKYMAA:7 a=S5nT_q3zp7gCzUjm2W-SoD7pu_EA:4 Received: from [62.113.132.61] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe09.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 933179231; Thu, 16 Jul 2009 20:22:42 +0200 From: Hans Petter Selasky To: Krassimir Slavchev Date: Thu, 16 Jul 2009 20:22:24 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA1; KDE/4.2.4; i386; ; ) References: <4A5C3BF5.9030200@bulinfo.net> <200907161033.34560.hselasky@c2i.net> <4A5F04B8.1060109@bulinfo.net> In-Reply-To: <4A5F04B8.1060109@bulinfo.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907162022.25810.hselasky@c2i.net> Cc: freebsd-arm@freebsd.org Subject: Re: ohci not detected on at91rm9200? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2009 18:22:51 -0000 On Thursday 16 July 2009 12:45:12 Krassimir Slavchev wrote: > Hans Petter Selasky wrote: > >> After adding cdce on arm board: > >> cdce0: on usbus0 > >> ue0: on cdce0 > >> ue0: Ethernet address: 2a:23:45:67:89:54 > >> > >> ue0: flags=8843 metric 0 mtu > >> 1500 ether 2a:23:45:67:89:54 > >> > >> > >> But on the other side running 7.2: > >> cdce0: >> 1.10/1.00, addr 2> on uhub4 > >> cdce0: setting alternate interface failed > >> device_attach: cdce0 attach returned 6 > > > > Maybe the following patch helps on the ARM side: > > > > http://perforce.freebsd.org/chv.cgi?CH=166156 > > > > I'm going to test this setup, and will probably resolve the issue, if I > > find any, including the cache sync stuff. > > I have made these changes on the ARM side but the error is same. Hi, You also need this fix, in addition to the previous one. http://perforce.freebsd.org/chv.cgi?CH=166168 CDC-ethernet should work now. --HPS From owner-freebsd-arm@FreeBSD.ORG Thu Jul 16 19:56:29 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 498AE1065672; Thu, 16 Jul 2009 19:56:29 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe15.swipnet.se [212.247.155.193]) by mx1.freebsd.org (Postfix) with ESMTP id 0B6488FC12; Thu, 16 Jul 2009 19:56:27 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Hrwt8fWgTlIA:10 a=MXw7gxVQKqGXY79tIT8aFQ==:17 a=B_zZn5-Rd8HGBMezT6QA:9 a=JNpn4SdkRBrMK3k_QEYA:7 a=TTBpQAZNaQe9nYvObQmjU1kUzmgA:4 a=n26B4fOH_80_4pcn:21 a=2bjXZ3cnzzwmxv3j:21 Received: from [62.113.132.61] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe15.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 534963832; Thu, 16 Jul 2009 21:56:26 +0200 From: Hans Petter Selasky To: Rafal Jaworowski Date: Thu, 16 Jul 2009 21:56:04 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA1; KDE/4.2.4; i386; ; ) References: <200906231035.43096.kosmo@semihalf.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907162156.06598.hselasky@c2i.net> Cc: Marcel Moolenaar , Piotr =?iso-8859-2?q?Zi=EAcik?= , freebsd-usb@freebsd.org, freebsd-arm@freebsd.org, thompsa@freebsd.org Subject: Re: CPU Cache and busdma usage in USB X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2009 19:56:29 -0000 On Tuesday 14 July 2009 19:20:22 Rafal Jaworowski wrote: > >> Please note these problems should be considered as a showstopper > >> for the release since USB is currently broken on at least three ARM > >> platforms in the tree (Marvell). Hi, First of all I'm not able to boot into userland on my ARM board. Maybe I missed something. I'm using a custom built userland image. Trying to mount root from ufs:/dev/md0 warning: no time-of-day clock registered, system time will not be set accurately Jul 16 18:53:22 init: login_getclass: unknown class 'daemon' Fatal kernel mode data abort: 'Alignment Fault 3' trapframe: 0xc622cc60 FSR=00000003, FAR=6e75203a, spsr=600000d3 r0 =60000093, r1 =c10594a0, r2 =c10594a0, r3 =00000002 r4 =c10acbd0, r5 =00000000, r6 =6e75203a, r7 =c10594a0 r8 =c622cd74, r9 =00000000, r10=c0ab081c, r11=c622cccc r12=c622ccac, ssp=c622ccac, slr=c020a144, pc =c00c02c8 [thread pid 4 tid 100008 ] Stopped at _thread_lock_flags+0x24: ldr r4, [r6] db> With the following patch in arm/cpufunc.c my UMASS device gets detected at boot time (KB9202B ARM board). Else I get a USB request timeout followed by a panic. But data transfers of more than 16KByte are likely to be broken. struct cpu_functions arm9_cpufuncs = { ... - /*XXX*/ arm9_dcache_wbinv_range, /* dcache_inv_range */ + /*XXX*/ arm9_dcache_inv_range, /* dcache_inv_range */ }; Looking at the assembly code behind "arm9_dcache_inv_range" in "cpufunc_asm_arm9.S" I see that "arm9_dcache_wbinv_all" gets called if the area to invalidate is greater equal to 16KByte. This is wrong. When asked to invalidate, then no memory must be flushed in that region. Because USB works like this: invalidate (TD) read field from (TD) Next IRQ invalidate (TD) read field from (TD) If the invalidate call flushes any data, you clearly see from the pseudo code above that there is a chance that the last read TD field in the cache gets written back before the next invalidate at the next IRQ, when the invalidate function is implemented like a writeback+invalidate!?? Piotr and Rafal: How does ARM work? Are there two caches? One read cache and one write cache. Or are they the same. What happens if you read a value from RAM into cache, then writeback+invalidate it. Does it get written back to RAM or does it get discarded? Sorry, I have some holes in my ARM knowledge which you need to fill in. Reference: ENTRY(arm9_dcache_inv_range) ldr ip, .Larm9_line_size cmp r1, #0x4000 bcs .Larm9_dcache_wbinv_all Anything unclear? Working version of kernel with my patch having stick plugged in at boot: ugen1.2: at usbus1 umass0: on usbus1 umass0: SCSI over Bulk-Only; quirks = 0x0000 umass0:0:0:-1: Attached to scbus0 (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 (probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error (probe0:umass-sim0:0:0:0): SCSI Status: Check Condition (probe0:umass-sim0:0:0:0): UNIT ATTENTION asc:28,0 (probe0:umass-sim0:0:0:0): Not ready to ready change, medium may have changed (probe0:umass-sim0:0:0:0): Retrying Command (per Sense Data) da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 1.000MB/s transfers da0: 3842MB (7868416 512 byte sectors: 255H 63S/T 489C) Stock 8-current code: ugen1.2: at usbus1 umass0: on usbus1 umass0: SCSI over Bulk-Only; quirks = 0x0000 umass0:0:0:-1: Attached to scbus0 (probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 (probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error (probe0:umass-sim0:0:0:0): SCSI Status: Check Condition (probe0:umass-sim0:0:0:0): UNIT ATTENTION asc:28,0 (probe0:umass-sim0:0:0:0): Not ready to ready change, medium may have changed (probe0:umass-sim0:0:0:0): Retrying Command (per Sense Data) da0 at umass-sim0 bus 0 target 0 lun 0 da0: Removable Direct Access SCSI-0 device da0: 1.000MB/s transfers da0: 3842MB (7868416 512 byte sectors: 255H 63S/T 489C) ugen1.2: at usbus1 (disconnected) umass0: at uhub1, port 1, addr 2 (disconnected) (da0:umass-sim0:0:0:0): lost device (da0:umass-sim0:0:0:0): removing device entry ugen1.2: at usbus1 umass0: on usbus1 umass0: SCSI over Bulk-Only; quirks = 0x0000 umass0:0:0:-1: Attached to scbus0 Sleeping thread (tid 100031, pid 19) owns a non-sleepable lock sched_switch() at sched_switch+0x10 scp=0xc00e7830 rlv=0xc00d2228 (mi_switch+0x108) rsp=0xc6271ddc rfp=0xc6271e04 r7=0xc11306f0 r6=0x00000000 r5=0x000000c0 r4=0x00000000 ... umass0: on usbus1 umass0: SCSI over Bulk-Only; quirks = 0x0000 umass0:0:0:-1: Attached to scbus0 (probe0:umass-sim0:0:0:0): AutoSense Failed usb_alloc_device:1586: set address 3 failed (USB_ERR_IOERROR, ignored) usb_alloc_device:1624: getting device descriptor at addr 3 failed, USB_ERR_IOERROR! usbd_req_re_enumerate:1539: addr=3, set address failed! (USB_ERR_IOERROR, ignored) usbd_req_re_enumerate:1553: getting device descriptor at addr 3 failed, USB_ERR_IOERROR! usbd_req_re_enumerate:1539: addr=3, set address failed! (USB_ERR_IOERROR, ignored) usbd_req_re_enumerate:1553: getting device descriptor at addr 3 failed, USB_ERR_IOERROR! ugen1.3: <(null)> at usbus1 (disconnected) uhub_reattach_port:435: could not allocate new device! (da0:umass-sim0:0:0:0): got CAM status 0x4 (da0:umass-sim0:0:0:0): fatal error, failed to attach to device (da0:umass-sim0:0:0:0): lost device (da0:umass-sim0:0:0:0): removing device entry ugen1.2: at usbus1 (disconnected) umass0: at uhub1, port 1, addr 2 (disconnected) ugen1.2: at usbus1 umass0: on usbus1 umass0: SCSI over Bulk-Only; quirks = 0x0000 vm_fault(0xc0ac65f4, 0, 1, 0) -> 1 Fatal kernel mode data abort: 'Translation Fault (S)' trapframe: 0xc6271a38 FSR=00000005, FAR=00000014, spsr=a00000d3 r0 =c0accdcc, r1 =00000000, r2 =c11306f0, r3 =00000004 r4 =00000000, r5 =00000000, r6 =cc05f270, r7 =c1168d78 r8 =c6271b80, r9 =0000000d, r10=00000030, r11=c6271a98 r12=c6271a6c, ssp=c6271a84, slr=c0209ee8, pc =c00fd518 [thread pid 19 tid 100031 ] Stopped at turnstile_broadcast+0x30: ldr r2, [r1, #0x014] Are there any pending patches which I should have put into the code before building? --HPS From owner-freebsd-arm@FreeBSD.ORG Fri Jul 17 05:36:04 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57E28106566B for ; Fri, 17 Jul 2009 05:36:04 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from mx.bulinfo.net (mx.bulinfo.net [193.194.156.1]) by mx1.freebsd.org (Postfix) with ESMTP id 0B9A28FC0A for ; Fri, 17 Jul 2009 05:36:03 +0000 (UTC) (envelope-from krassi@bulinfo.net) Received: from localhost (localhost [127.0.0.1]) by mx.bulinfo.net (Postfix) with ESMTP id B08C2CA46; Fri, 17 Jul 2009 08:36:02 +0300 (EEST) Received: from mx.bulinfo.net ([127.0.0.1]) by localhost (mx.bulinfo.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 84027-04; Fri, 17 Jul 2009 08:35:59 +0300 (EEST) Received: from [192.168.2.188] (pythia.bulinfo.net [212.72.195.5]) by mx.bulinfo.net (Postfix) with ESMTP id DFA4FC4D8; Fri, 17 Jul 2009 08:35:59 +0300 (EEST) Message-ID: <4A600DBE.9000901@bulinfo.net> Date: Fri, 17 Jul 2009 08:35:58 +0300 From: Krassimir Slavchev User-Agent: Thunderbird 2.0.0.19 (X11/20090225) MIME-Version: 1.0 To: Hans Petter Selasky References: <4A5C3BF5.9030200@bulinfo.net> <200907161033.34560.hselasky@c2i.net> <4A5F04B8.1060109@bulinfo.net> <200907162022.25810.hselasky@c2i.net> In-Reply-To: <200907162022.25810.hselasky@c2i.net> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at mx.bulinfo.net Cc: freebsd-arm@freebsd.org Subject: Re: ohci not detected on at91rm9200? X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 05:36:04 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hans Petter Selasky wrote: > On Thursday 16 July 2009 12:45:12 Krassimir Slavchev wrote: >> Hans Petter Selasky wrote: >>>> After adding cdce on arm board: >>>> cdce0: on usbus0 >>>> ue0: on cdce0 >>>> ue0: Ethernet address: 2a:23:45:67:89:54 >>>> >>>> ue0: flags=8843 metric 0 mtu >>>> 1500 ether 2a:23:45:67:89:54 >>>> >>>> >>>> But on the other side running 7.2: >>>> cdce0: >>> 1.10/1.00, addr 2> on uhub4 >>>> cdce0: setting alternate interface failed >>>> device_attach: cdce0 attach returned 6 >>> Maybe the following patch helps on the ARM side: >>> >>> http://perforce.freebsd.org/chv.cgi?CH=166156 >>> >>> I'm going to test this setup, and will probably resolve the issue, if I >>> find any, including the cache sync stuff. >> I have made these changes on the ARM side but the error is same. > > Hi, > > You also need this fix, in addition to the previous one. > > http://perforce.freebsd.org/chv.cgi?CH=166168 > > CDC-ethernet should work now. > > --HPS > Yes, it works! ARM: ue0: flags=8843 metric 0 mtu 1500 ether 2a:23:45:67:89:54 inet 10.0.0.2 netmask 0xff000000 broadcast 10.255.255.255 # ping -c 5 10.0.0.1 PING 10.0.0.1 (10.0.0.1): 56 data bytes 64 bytes from 10.0.0.1: icmp_seq=0 ttl=64 time=3.266 ms 64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=2.319 ms 64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=2.625 ms 64 bytes from 10.0.0.1: icmp_seq=3 ttl=64 time=2.624 ms 64 bytes from 10.0.0.1: icmp_seq=4 ttl=64 time=2.472 ms - --- 10.0.0.1 ping statistics --- 5 packets transmitted, 5 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 2.319/2.661/3.266/0.323 ms On other side running 7.2: cdce0: flags=108843 metric 0 mtu 1500 ether 2a:b9:a0:0c:00:00 inet 10.0.0.1 netmask 0xff000000 broadcast 10.255.255.255 media: Ethernet 10baseT/UTP status: active #ping -c 5 10.0.0.2 PING 10.0.0.2 (10.0.0.2): 56 data bytes 64 bytes from 10.0.0.2: icmp_seq=0 ttl=64 time=1.457 ms 64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=1.436 ms 64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=1.423 ms 64 bytes from 10.0.0.2: icmp_seq=3 ttl=64 time=1.422 ms 64 bytes from 10.0.0.2: icmp_seq=4 ttl=64 time=1.415 ms - --- 10.0.0.2 ping statistics --- 5 packets transmitted, 5 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 1.415/1.431/1.457/0.015 ms -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFKYA2+xJBWvpalMpkRAoMaAJ99I2jfoePH1KsQlWsVKIacUscPtwCfbWyf qoMtcrbqJaeoa3Z1Wg1egPE= =T2Fo -----END PGP SIGNATURE----- From owner-freebsd-arm@FreeBSD.ORG Fri Jul 17 10:24:00 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76FC61065674; Fri, 17 Jul 2009 10:24:00 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from smtp.semihalf.com (smtp.semihalf.com [213.17.239.109]) by mx1.freebsd.org (Postfix) with ESMTP id CA4978FC3E; Fri, 17 Jul 2009 10:23:59 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from [10.0.0.34] (cardhu.semihalf.com [213.17.239.108]) by smtp.semihalf.com (Postfix) with ESMTPSA id 1B128C3BAA; Fri, 17 Jul 2009 12:20:59 +0200 (CEST) Message-Id: From: Rafal Jaworowski To: Hans Petter Selasky , cognet@freebsd.org In-Reply-To: <200907162156.06598.hselasky@c2i.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Fri, 17 Jul 2009 12:23:57 +0200 References: <200906231035.43096.kosmo@semihalf.com> <200907162156.06598.hselasky@c2i.net> X-Mailer: Apple Mail (2.935.3) Cc: thompsa@freebsd.org, freebsd-arm@freebsd.org, Marcel Moolenaar , =?ISO-8859-2?Q?Piotr_Zi=EAcik?= , freebsd-usb@freebsd.org Subject: Re: CPU Cache and busdma usage in USB X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 10:24:01 -0000 On 2009-07-16, at 21:56, Hans Petter Selasky wrote: > On Tuesday 14 July 2009 19:20:22 Rafal Jaworowski wrote: > >>>> Please note these problems should be considered as a showstopper >>>> for the release since USB is currently broken on at least three ARM >>>> platforms in the tree (Marvell). > > Hi, > > First of all I'm not able to boot into userland on my ARM board. > Maybe I > missed something. I'm using a custom built userland image. > > Trying to mount root from ufs:/dev/md0 > warning: no time-of-day clock registered, system time will not be set > accurately > Jul 16 18:53:22 init: login_getclass: unknown class 'daemon' > Fatal kernel mode data abort: 'Alignment Fault 3' > trapframe: 0xc622cc60 > FSR=00000003, FAR=6e75203a, spsr=600000d3 > r0 =60000093, r1 =c10594a0, r2 =c10594a0, r3 =00000002 > r4 =c10acbd0, r5 =00000000, r6 =6e75203a, r7 =c10594a0 > r8 =c622cd74, r9 =00000000, r10=c0ab081c, r11=c622cccc > r12=c622ccac, ssp=c622ccac, slr=c020a144, pc =c00c02c8 > > [thread pid 4 tid 100008 ] > Stopped at _thread_lock_flags+0x24: ldr r4, [r6] > db> Just making sure: your kernel and world are in sync, correct? > With the following patch in arm/cpufunc.c my UMASS device gets > detected at > boot time (KB9202B ARM board). Else I get a USB request timeout > followed by a > panic. But data transfers of more than 16KByte are likely to be > broken. > > struct cpu_functions arm9_cpufuncs = { > ... > - /*XXX*/ arm9_dcache_wbinv_range, /* dcache_inv_range */ > + /*XXX*/ arm9_dcache_inv_range, /* dcache_inv_range */ > > }; Hm, this looks indeed strange, but I have no idea why both methods point to _wbinv_range; it seems like it was there from the beginning. I also looked at NetBSD code (from which FreeBSD/arm originates) and they still have it this way too... Olivier, any thoughts why this was done this way? (FYI: the cpu we work with fall under ARM9E/ARM10, but the situation with dcache_inv_range() is similar as for ARM9 case above). > Piotr and Rafal: How does ARM work? Are there two caches? One read > cache and > one write cache. Or are they the same. What happens if you read a > value from > RAM into cache, then writeback+invalidate it. Does it get written > back to RAM > or does it get discarded? Sorry, I have some holes in my ARM > knowledge which > you need to fill in. I don't know what separate read/write CPU caches would be; some implementations allow for locking [parts of] cache contents, so it can mimic read-only, but it's probably not what you're asking for. Usually there's cache at various levels, dedicated for data/instructions, or unified, depending on implementation with different characteristics (associativity etc.). It seems you need to read about cache basics, as there are many aspects, and one of the foremost is we have VIVT approach (virtual indexed, virtual tagged) in this context, as opposed to physical approach. > Reference: > > ENTRY(arm9_dcache_inv_range) > ldr ip, .Larm9_line_size > cmp r1, #0x4000 > bcs .Larm9_dcache_wbinv_all > > Anything unclear? Sorry, but what is the question? > Are there any pending patches which I should have put into the code > before > building? There are pmap fixes pending, which will be commited shortly http://people.freebsd.org/~raj/patches/arm/pmap-fixes.diff although according to stas@ they had no visible effect on AT91 (but they fix real issues in pmap, possibly just not [yet] observed on AT91). Rafal From owner-freebsd-arm@FreeBSD.ORG Fri Jul 17 11:08:28 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A31261065674; Fri, 17 Jul 2009 11:08:28 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) by mx1.freebsd.org (Postfix) with ESMTP id 472418FC21; Fri, 17 Jul 2009 11:08:28 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from cicely5.cicely.de ([10.1.1.7]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id n6HAqj48082304 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 17 Jul 2009 12:52:46 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by cicely5.cicely.de (8.14.2/8.14.2) with ESMTP id n6HAqYAc093309 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 17 Jul 2009 12:52:34 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.14.2/8.14.2) with ESMTP id n6HAqYcC098085; Fri, 17 Jul 2009 12:52:34 +0200 (CEST) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.14.2/8.14.2/Submit) id n6HAqXnb098084; Fri, 17 Jul 2009 12:52:33 +0200 (CEST) (envelope-from ticso) Date: Fri, 17 Jul 2009 12:52:33 +0200 From: Bernd Walter To: Hans Petter Selasky Message-ID: <20090717105233.GB97863@cicely7.cicely.de> References: <200906231035.43096.kosmo@semihalf.com> <200907162156.06598.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200907162156.06598.hselasky@c2i.net> X-Operating-System: FreeBSD cicely7.cicely.de 7.0-STABLE i386 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED=-1.8, AWL=0.009, BAYES_00=-2.599 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on spamd.cicely.de Cc: Marcel Moolenaar , Piotr Zi?cik , freebsd-usb@freebsd.org, freebsd-arm@freebsd.org, thompsa@freebsd.org Subject: Re: CPU Cache and busdma usage in USB X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: ticso@cicely.de List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 11:08:29 -0000 On Thu, Jul 16, 2009 at 09:56:04PM +0200, Hans Petter Selasky wrote: > On Tuesday 14 July 2009 19:20:22 Rafal Jaworowski wrote: > > > >> Please note these problems should be considered as a showstopper > > >> for the release since USB is currently broken on at least three ARM > > >> platforms in the tree (Marvell). > > Hi, > > First of all I'm not able to boot into userland on my ARM board. Maybe I > missed something. I'm using a custom built userland image. > > Trying to mount root from ufs:/dev/md0 > warning: no time-of-day clock registered, system time will not be set > accurately > Jul 16 18:53:22 init: login_getclass: unknown class 'daemon' > Fatal kernel mode data abort: 'Alignment Fault 3' > trapframe: 0xc622cc60 > FSR=00000003, FAR=6e75203a, spsr=600000d3 > r0 =60000093, r1 =c10594a0, r2 =c10594a0, r3 =00000002 > r4 =c10acbd0, r5 =00000000, r6 =6e75203a, r7 =c10594a0 > r8 =c622cd74, r9 =00000000, r10=c0ab081c, r11=c622cccc > r12=c622ccac, ssp=c622ccac, slr=c020a144, pc =c00c02c8 > > [thread pid 4 tid 100008 ] > Stopped at _thread_lock_flags+0x24: ldr r4, [r6] > db> The alignment fault is probably our old friend :( It comes and goes and adding/removing unrelated drivers in the kernel can help. I typically have spi and such, which I enable/disable. My neweset ARM is running 8 from 17th april. I had problems with login.conf as well. login.conf.db had to be erased, otherwise bas things happened. Not sure if it was panicing the whole kernel or just crashing processes. Very strange problem, but since I never read about it on this list I really thought it is my local problem somehow. Now a few months later your init complains about login classes... -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-arm@FreeBSD.ORG Fri Jul 17 11:10:14 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AFBB1065670; Fri, 17 Jul 2009 11:10:14 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe10.swipnet.se [212.247.155.33]) by mx1.freebsd.org (Postfix) with ESMTP id 0DD978FC12; Fri, 17 Jul 2009 11:10:12 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=Hrwt8fWgTlIA:10 a=gg2W7PyvkLb8p4ie143lBA==:17 a=6I5d2MoRAAAA:8 a=Wfte-A8PZ4CvN3Pqc4oA:9 a=K1papP_sE1_jh7A71HkA:7 a=D3J5flF0k_qGl-iQSlEjpUw5UdoA:4 Received: from [194.248.135.20] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe10.swip.net (CommuniGate Pro SMTP 5.2.13) with ESMTPA id 1110142483; Fri, 17 Jul 2009 13:10:09 +0200 From: Hans Petter Selasky To: Rafal Jaworowski Date: Fri, 17 Jul 2009 13:09:50 +0200 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA2; KDE/4.2.4; i386; ; ) References: <200906231035.43096.kosmo@semihalf.com> <200907162156.06598.hselasky@c2i.net> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907171309.52316.hselasky@c2i.net> Cc: Marcel Moolenaar , freebsd-usb@freebsd.org, freebsd-arm@freebsd.org, thompsa@freebsd.org, cognet@freebsd.org, Piotr =?utf-8?q?Zi=C4=99cik?= Subject: Re: CPU Cache and busdma usage in USB X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 11:10:14 -0000 On Friday 17 July 2009 12:23:57 Rafal Jaworowski wrote: > On 2009-07-16, at 21:56, Hans Petter Selasky wrote: > > On Tuesday 14 July 2009 19:20:22 Rafal Jaworowski wrote: > >>>> Please note these problems should be considered as a showstopper > >>>> for the release since USB is currently broken on at least three ARM > >>>> platforms in the tree (Marvell). > > > > Hi, > > > > First of all I'm not able to boot into userland on my ARM board. > > Maybe I > > missed something. I'm using a custom built userland image. > > > > Trying to mount root from ufs:/dev/md0 > > warning: no time-of-day clock registered, system time will not be set > > accurately > > Jul 16 18:53:22 init: login_getclass: unknown class 'daemon' > > Fatal kernel mode data abort: 'Alignment Fault 3' > > trapframe: 0xc622cc60 > > FSR=00000003, FAR=6e75203a, spsr=600000d3 > > r0 =60000093, r1 =c10594a0, r2 =c10594a0, r3 =00000002 > > r4 =c10acbd0, r5 =00000000, r6 =6e75203a, r7 =c10594a0 > > r8 =c622cd74, r9 =00000000, r10=c0ab081c, r11=c622cccc > > r12=c622ccac, ssp=c622ccac, slr=c020a144, pc =c00c02c8 > > > > [thread pid 4 tid 100008 ] > > Stopped at _thread_lock_flags+0x24: ldr r4, [r6] > > db> > > Just making sure: your kernel and world are in sync, correct? Yes, I made a clean toolchain, a clean buildworld and a clean buildkernel. > > > With the following patch in arm/cpufunc.c my UMASS device gets > > detected at > > boot time (KB9202B ARM board). Else I get a USB request timeout > > followed by a > > panic. But data transfers of more than 16KByte are likely to be > > broken. > > > > struct cpu_functions arm9_cpufuncs = { > > ... > > - /*XXX*/ arm9_dcache_wbinv_range, /* dcache_inv_range */ > > + /*XXX*/ arm9_dcache_inv_range, /* dcache_inv_range */ > > > > }; > > Hm, this looks indeed strange, but I have no idea why both methods > point to _wbinv_range; it seems like it was there from the beginning. > I also looked at NetBSD code (from which FreeBSD/arm originates) and > they still have it this way too... > > Olivier, any thoughts why this was done this way? > > (FYI: the cpu we work with fall under ARM9E/ARM10, but the situation > with dcache_inv_range() is similar as for ARM9 case above). > > > Piotr and Rafal: How does ARM work? Are there two caches? One read > > cache and > > one write cache. Or are they the same. What happens if you read a > > value from > > RAM into cache, then writeback+invalidate it. Does it get written > > back to RAM > > or does it get discarded? Sorry, I have some holes in my ARM > > knowledge which > > you need to fill in. > > I don't know what separate read/write CPU caches would be; some > implementations allow for locking [parts of] cache contents, so it can > mimic read-only, but it's probably not what you're asking for. Usually > there's cache at various levels, dedicated for data/instructions, or > unified, depending on implementation with different characteristics > (associativity etc.). It seems you need to read about cache basics, as > there are many aspects, and one of the foremost is we have VIVT > approach (virtual indexed, virtual tagged) in this context, as opposed > to physical approach. > > > Reference: > > > > ENTRY(arm9_dcache_inv_range) > > ldr ip, .Larm9_line_size > > cmp r1, #0x4000 > > bcs .Larm9_dcache_wbinv_all > > > > Anything unclear? > > Sorry, but what is the question? I was just pointing out in the assembly code, the fact that the invalidate range call can in some cases do a writeback invalidate. > > > Are there any pending patches which I should have put into the code > > before > > building? > > There are pmap fixes pending, which will be commited shortly > http://people.freebsd.org/~raj/patches/arm/pmap-fixes.diff although > according to stas@ they had no visible effect on AT91 (but they fix real > issues in pmap, possibly just not [yet] observed on AT91). Ok. --HPS From owner-freebsd-arm@FreeBSD.ORG Fri Jul 17 12:48:32 2009 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33EC4106564A; Fri, 17 Jul 2009 12:48:32 +0000 (UTC) (envelope-from doginou@kanar.ci0.org) Received: from kanar.ci0.org (kanar.ci0.org [88.191.50.96]) by mx1.freebsd.org (Postfix) with ESMTP id BB0008FC15; Fri, 17 Jul 2009 12:48:31 +0000 (UTC) (envelope-from doginou@kanar.ci0.org) Received: from kanar.ci0.org (pluxor@localhost [127.0.0.1]) by kanar.ci0.org (8.14.2/8.14.3) with ESMTP id n6HCHlBk038919; Fri, 17 Jul 2009 14:17:47 +0200 (CEST) (envelope-from doginou@kanar.ci0.org) Received: (from doginou@localhost) by kanar.ci0.org (8.14.2/8.14.3/Submit) id n6HCHlve038918; Fri, 17 Jul 2009 14:17:47 +0200 (CEST) (envelope-from doginou) Date: Fri, 17 Jul 2009 14:17:46 +0200 From: Olivier Houchard To: Rafal Jaworowski Message-ID: <20090717121746.GA38852@ci0.org> References: <200906231035.43096.kosmo@semihalf.com> <200907162156.06598.hselasky@c2i.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: Marcel Moolenaar , Piotr Zi?cik , freebsd-usb@freebsd.org, freebsd-arm@freebsd.org, thompsa@freebsd.org Subject: Re: CPU Cache and busdma usage in USB X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 12:48:32 -0000 On Fri, Jul 17, 2009 at 12:23:57PM +0200, Rafal Jaworowski wrote: > > >With the following patch in arm/cpufunc.c my UMASS device gets > >detected at > >boot time (KB9202B ARM board). Else I get a USB request timeout > >followed by a > >panic. But data transfers of more than 16KByte are likely to be > >broken. > > > >struct cpu_functions arm9_cpufuncs = { > >... > >- /*XXX*/ arm9_dcache_wbinv_range, /* dcache_inv_range */ > >+ /*XXX*/ arm9_dcache_inv_range, /* dcache_inv_range */ > > > >}; > > Hm, this looks indeed strange, but I have no idea why both methods > point to _wbinv_range; it seems like it was there from the beginning. > I also looked at NetBSD code (from which FreeBSD/arm originates) and > they still have it this way too... > > Olivier, any thoughts why this was done this way? > > (FYI: the cpu we work with fall under ARM9E/ARM10, but the situation > with dcache_inv_range() is similar as for ARM9 case above). > I can't get the reason why it's this way, reading the CVS logs from NetBSD doesn't enlight me, but I'm pretty sure we should switch to use the proper function for _inv_range, as done in this patch. That's what we do for Xscale/Xscale core 3 anyway, and if it breaks something, we should jut fix it. Olivier