From owner-freebsd-ppc@FreeBSD.ORG Sun Aug 30 13:49:19 2009 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 443A0106566B for ; Sun, 30 Aug 2009 13:49:19 +0000 (UTC) (envelope-from Daan@vehosting.nl) Received: from VM01.VEHosting.nl (unknown [IPv6:2001:470:1f14:32d::1:140]) by mx1.freebsd.org (Postfix) with ESMTP id D250B8FC3A for ; Sun, 30 Aug 2009 13:49:18 +0000 (UTC) Received: from [192.168.45.11] (129-251.ftth.onsbrabantnet.nl [88.159.251.129] (may be forged)) (authenticated bits=0) by VM01.VEHosting.nl (8.14.3/8.13.8) with ESMTP id n7UDnHOo076141; Sun, 30 Aug 2009 15:49:17 +0200 (CEST) (envelope-from Daan@vehosting.nl) From: Daan Vreeken Organization: VEHosting.nl To: Hans Petter Selasky Date: Sun, 30 Aug 2009 15:49:17 +0200 User-Agent: KMail/1.9.10 References: <35914876-0CFF-427B-8F80-B1BEEA5A7A18@semihalf.com> <200908282127.28482.Daan@vehosting.nl> <200908282146.28715.hselasky@c2i.net> In-Reply-To: <200908282146.28715.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200908301549.18407.Daan@vehosting.nl> x-ve-auth-version: mi-1.0.3 2008-05-30 - Copyright (c) 2008 - Daan Vreeken - VEHosting x-ve-auth: authenticated as 'pa4dan' on VM01.VEHosting.nl Cc: Michal Mazur , Andrew Turner , freebsd-ppc@freebsd.org Subject: Re: FreeBSD/powerpc on MPC5200 X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2009 13:49:19 -0000 Hi Hans Petter, On Friday 28 August 2009 21:46:27 Hans Petter Selasky wrote: > On Friday 28 August 2009 21:27:28 Daan Vreeken wrote: > > Hi Rafal (and the list), > > > > On Sunday 24 May 2009 21:15:44 Rafal Jaworowski wrote: > > > On 2009-05-23, at 07:21, Andrew Turner wrote: > > > > On Fri, 22 May 2009 12:21:01 +0200 > > > > > > > > Rafal Jaworowski wrote: > > > >> On 2009-05-11, at 15:15, Peter Czanik wrote: > > > >>> Rafal Jaworowski =EDrta: > > > >>>> I'd like to let people know that FreeBSD/powerpc is now able to > > > >>>> boot into single user on the Freescale MPC5200 system-on-chip > > > >>>> (EFIKA board). The environment is very simplistic: RAM disk based > > > >>>> root fs, as > > > >>>> there's no peripherals drivers besides serial console and the > > > >>>> built- in > > > >>>> PIC. See this log: http://people.freebsd.org/~raj/logs/efika.log > > > >>> > > > >>> Wow, great news! Two questions: > > > >>> - are there any plans to support additional devices? > > > >> > > > >> We don't have immediate plans for other devices drivers, but this > > > >> basic support will be merged into SVN, and it would be greatly > > > >> welcome to see people help with remaining items. > > > > > > > > Is there a patch available? I would like to get back to working on > > > > the EFIKA. > > > > > > Preliminary diff against 2009.04.06 HEAD is here: > > > http://people.freebsd.org/~raj/patches/powerpc/efika.diff > > > > > > Comments or questions welcome. Some bits need to be streamlined so > > > that all AIM/OF variations work together, and the code has to be > > > rebased against up-to-date HEAD. > > > > I have downloaded your diff and succesfully patched it to -HEAD (checked > > out on 2009-08-25). > > Right now I'm looking into getting the USB controller working. (That > > would allow me to use network & disks all in one go.) > > > > I have written the OHCI attachment code (inspired by a mix of Warner's > > atmel version, mpc5xxx/ic.c and uart_dev_psc.c) and gotten it to > > succesfully attach to the OHCI controller when booting the Efika board. > > USB is not (yet) working correctly. Near the end of ohci_init(), the > > board seems to halt completely for about 30 seconds and after that, the > > OHCI controller sets the 'unrecoverable error' flag. > > > > A complete dmesg dump can be found here : > > http://vehosting.nl/pub_diffs/efika-daan-2009-08-28-ohci_attaching_but_= fa > >il ing.txt The kernel that produced this can be downloaded here : > > http://vehosting.nl/pub_diffs/efika-daan-2009-08-28-ohci_attaching_but_= fa > >il ing.kernel > > > > The files I added/changed to get the attachment of the OHCI controller > > to 'work' can be found here : > > http://vehosting.nl/pub_diffs/efika-daan-2009-08-28_changed_files.tar.gz > > (Warning : Ugly! and full of printf's for now!) > > (I could have missed one, let me know if you can't get it to work.) > > > > The above dmesg shows a number of printf's I've added to ohci.c . My > > mutilated version can be found here : > > http://vehosting.nl/pub_diffs/efika-daan-2009-08-28_ohci.c > > > > As you can see, I printf() the interrupt status register at various > > points during ohci_init(). The 'unrecoverable error' flag gets set just= a > > couple of miliseconds after the following command has been executed : > > > > /* And finally start it! */ > > OWRITE4(sc, OHCI_CONTROL, ctl); > > > > After that OWRITE4(), the board sits for about 30 seconds and then > > continues. I'm just guessing what's going on here, but could it be that > > (one of?) the endpoint lists isn't properly setup and that the OHCI > > controller keeps the CPU from accessing memory while it's racing through > > memory following corrupt/invalid 'next' pointers? > > Maybe busdma is not computing correct physical addresses for the kernel > virtual memory loaded into DMA. I've looking closely at the logs I generated earlier and this doesn't seem = to=20 be the case (I think). The physical address of the HCCA (Host Controller=20 Communications Area) looks the same and the frame_number counter is advanci= ng=20 in this memory area as soon as the controller is enabled. One thing that strikes me is the value of the frame number though : ohci_dumpregs:599: ohci_dumpregs: rev=3D0x00000010 control=3D0x00000093 command=3D0x00000002 ohci_dumpregs:603: intrstat=3D0x00000040 intre=3D0x8000005a intrd=3D0x8000= 005a ohci_dumpregs:607: hcca=3D0x01c12a00 percur=3D0x48000060 ctrlhd=3D0x01c208= 80 ohci_dumpregs:611: ctrlcur=3D0x00000000 bulkhd=3D0x01c20800 bulkcur=3D0x00= 000000 ohci_dumpregs:615: done=3D0x00000000 fmival=3D0xa7782edf fmrem=3D0x800025e7 ohci_dumpregs:619: fmnum=3D0x000000e5 perst=3D0x00002a2f lsthrs=3D0x000006= 28 ohci_dumpregs:623: desca=3D0x02001202 descb=3D0x00000000 stat=3D0x00000000 ohci_dumpregs:626: port1=3D0x00100303 port2=3D0x00010101 ohci_dumpregs:632: HCCA: frame_number=3D0x35fe0000 done_head=3D0x00000000 The frame number at this particular moment is '0x35fe0000', though the OHCI= =20 spec says it should be a 16 bit counter, followed by 16 bits of padding (th= at=20 should read back as '0'). Could it be a big-endian controller, while the USB code expects little-endi= an? =2D-=20 Daan Vreeken VEHosting http://VEHosting.nl tel: +31-(0)40-7113050 / +31-(0)6-46210825 KvK nr: 17174380 From owner-freebsd-ppc@FreeBSD.ORG Sun Aug 30 14:14:57 2009 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E36E106566C for ; Sun, 30 Aug 2009 14:14:57 +0000 (UTC) (envelope-from Daan@vehosting.nl) Received: from VM01.VEHosting.nl (unknown [IPv6:2001:470:1f14:32d::1:140]) by mx1.freebsd.org (Postfix) with ESMTP id 76C8F8FC1D for ; Sun, 30 Aug 2009 14:14:56 +0000 (UTC) Received: from [192.168.45.11] (129-251.ftth.onsbrabantnet.nl [88.159.251.129] (may be forged)) (authenticated bits=0) by VM01.VEHosting.nl (8.14.3/8.13.8) with ESMTP id n7UEEvSm076890; Sun, 30 Aug 2009 16:14:57 +0200 (CEST) (envelope-from Daan@vehosting.nl) From: Daan Vreeken Organization: VEHosting.nl To: freebsd-ppc@freebsd.org Date: Sun, 30 Aug 2009 16:14:57 +0200 User-Agent: KMail/1.9.10 References: <35914876-0CFF-427B-8F80-B1BEEA5A7A18@semihalf.com> <200908282146.28715.hselasky@c2i.net> <200908301549.18407.Daan@vehosting.nl> In-Reply-To: <200908301549.18407.Daan@vehosting.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200908301614.58264.Daan@vehosting.nl> x-ve-auth-version: mi-1.0.3 2008-05-30 - Copyright (c) 2008 - Daan Vreeken - VEHosting x-ve-auth: authenticated as 'pa4dan' on VM01.VEHosting.nl Cc: Michal Mazur , Andrew Turner , Hans Petter Selasky Subject: Re: FreeBSD/powerpc on MPC5200 X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2009 14:14:57 -0000 On Sunday 30 August 2009 15:49:17 Daan Vreeken wrote: > Hi Hans Petter, > > On Friday 28 August 2009 21:46:27 Hans Petter Selasky wrote: > > On Friday 28 August 2009 21:27:28 Daan Vreeken wrote: > > > Hi Rafal (and the list), > > > > > > On Sunday 24 May 2009 21:15:44 Rafal Jaworowski wrote: > > > > On 2009-05-23, at 07:21, Andrew Turner wrote: > > > > > On Fri, 22 May 2009 12:21:01 +0200 > > > > > > > > > > Rafal Jaworowski wrote: > > > > >> On 2009-05-11, at 15:15, Peter Czanik wrote: > > > > >>> Rafal Jaworowski =EDrta: > > > > >>>> I'd like to let people know that FreeBSD/powerpc is now able to > > > > >>>> boot into single user on the Freescale MPC5200 system-on-chip > > > > >>>> (EFIKA board). The environment is very simplistic: RAM disk > > > > >>>> based root fs, as > > > > >>>> there's no peripherals drivers besides serial console and the > > > > >>>> built- in > > > > >>>> PIC. See this log: http://people.freebsd.org/~raj/logs/efika.l= og > > > > >>> > > > > >>> Wow, great news! Two questions: > > > > >>> - are there any plans to support additional devices? > > > > >> > > > > >> We don't have immediate plans for other devices drivers, but this > > > > >> basic support will be merged into SVN, and it would be greatly > > > > >> welcome to see people help with remaining items. > > > > > > > > > > Is there a patch available? I would like to get back to working on > > > > > the EFIKA. > > > > > > > > Preliminary diff against 2009.04.06 HEAD is here: > > > > http://people.freebsd.org/~raj/patches/powerpc/efika.diff > > > > > > > > Comments or questions welcome. Some bits need to be streamlined so > > > > that all AIM/OF variations work together, and the code has to be > > > > rebased against up-to-date HEAD. > > > > > > I have downloaded your diff and succesfully patched it to -HEAD > > > (checked out on 2009-08-25). > > > Right now I'm looking into getting the USB controller working. (That > > > would allow me to use network & disks all in one go.) > > > > > > I have written the OHCI attachment code (inspired by a mix of Warner's > > > atmel version, mpc5xxx/ic.c and uart_dev_psc.c) and gotten it to > > > succesfully attach to the OHCI controller when booting the Efika boar= d. > > > USB is not (yet) working correctly. Near the end of ohci_init(), the > > > board seems to halt completely for about 30 seconds and after that, t= he > > > OHCI controller sets the 'unrecoverable error' flag. > > > > > > A complete dmesg dump can be found here : > > > http://vehosting.nl/pub_diffs/efika-daan-2009-08-28-ohci_attaching_bu= t_ > > >fa il ing.txt The kernel that produced this can be downloaded here : > > > http://vehosting.nl/pub_diffs/efika-daan-2009-08-28-ohci_attaching_bu= t_ > > >fa il ing.kernel > > > > > > The files I added/changed to get the attachment of the OHCI controller > > > to 'work' can be found here : > > > http://vehosting.nl/pub_diffs/efika-daan-2009-08-28_changed_files.tar= =2Eg > > >z (Warning : Ugly! and full of printf's for now!) > > > (I could have missed one, let me know if you can't get it to work.) > > > > > > The above dmesg shows a number of printf's I've added to ohci.c . My > > > mutilated version can be found here : > > > http://vehosting.nl/pub_diffs/efika-daan-2009-08-28_ohci.c > > > > > > As you can see, I printf() the interrupt status register at various > > > points during ohci_init(). The 'unrecoverable error' flag gets set ju= st > > > a couple of miliseconds after the following command has been executed= : > > > > > > /* And finally start it! */ > > > OWRITE4(sc, OHCI_CONTROL, ctl); > > > > > > After that OWRITE4(), the board sits for about 30 seconds and then > > > continues. I'm just guessing what's going on here, but could it be th= at > > > (one of?) the endpoint lists isn't properly setup and that the OHCI > > > controller keeps the CPU from accessing memory while it's racing > > > through memory following corrupt/invalid 'next' pointers? > > > > Maybe busdma is not computing correct physical addresses for the kernel > > virtual memory loaded into DMA. > > I've looking closely at the logs I generated earlier and this doesn't seem > to be the case (I think). The physical address of the HCCA (Host Controll= er > Communications Area) looks the same and the frame_number counter is > advancing in this memory area as soon as the controller is enabled. > One thing that strikes me is the value of the frame number though : > > ohci_dumpregs:599: ohci_dumpregs: rev=3D0x00000010 control=3D0x00000093 > command=3D0x00000002 > ohci_dumpregs:603: intrstat=3D0x00000040 intre=3D0x8000005a intrd=3D0x80= 00005a > ohci_dumpregs:607: hcca=3D0x01c12a00 percur=3D0x48000060 ctrlhd=3D0x01c2= 0880 > ohci_dumpregs:611: ctrlcur=3D0x00000000 bulkhd=3D0x01c20800 bulkcur=3D0x= 00000000 > ohci_dumpregs:615: done=3D0x00000000 fmival=3D0xa7782edf fmrem=3D0x80002= 5e7 > ohci_dumpregs:619: fmnum=3D0x000000e5 perst=3D0x00002a2f lsthrs=3D0x0000= 0628 > ohci_dumpregs:623: desca=3D0x02001202 descb=3D0x00000000 stat=3D0x000000= 00 > ohci_dumpregs:626: port1=3D0x00100303 port2=3D0x00010101 > ohci_dumpregs:632: HCCA: frame_number=3D0x35fe0000 done_head=3D0x00000000 > > The frame number at this particular moment is '0x35fe0000', though the OH= CI > spec says it should be a 16 bit counter, followed by 16 bits of padding > (that should read back as '0'). > > Could it be a big-endian controller, while the USB code expects > little-endian? Yes, that was it. Changing every 'htole32' into 'htobe32' and every 'le32to= h'=20 into 'be32toh' in sys/dev/usb/controller/ohci.c gets the USB controller to= =20 work : ... Timecounter "decrementer" frequency 33000000 Hz quality 0 Timecounters tick every 10.000 msec usbus0: 12Mbps Full Speed USB v1.0 Root mount waiting for: usbus0 ugen0.1: at usbus0 uhub0: on usbu= s0 uhub0: 2 ports with 2 removable, self powered Root mount waiting for: usbus0 ugen0.2: at usbus0 Root mount waiting for: usbus0 ugen0.3: at usbus0 (For those with an Efika board, here's a working kernel :=20 http://vehosting.nl/pub_diffs/efika-daan-2009-08-30-usb-working.kernel ) =2D-=20 Daan Vreeken VEHosting http://VEHosting.nl tel: +31-(0)40-7113050 / +31-(0)6-46210825 KvK nr: 17174380 From owner-freebsd-ppc@FreeBSD.ORG Sun Aug 30 15:53:23 2009 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4948A1065672 for ; Sun, 30 Aug 2009 15:53:23 +0000 (UTC) (envelope-from Daan@vehosting.nl) Received: from VM01.VEHosting.nl (unknown [IPv6:2001:470:1f14:32d::1:140]) by mx1.freebsd.org (Postfix) with ESMTP id B325E8FC19 for ; Sun, 30 Aug 2009 15:53:22 +0000 (UTC) Received: from [192.168.45.11] (129-251.ftth.onsbrabantnet.nl [88.159.251.129] (may be forged)) (authenticated bits=0) by VM01.VEHosting.nl (8.14.3/8.13.8) with ESMTP id n7UFrNiQ079501; Sun, 30 Aug 2009 17:53:23 +0200 (CEST) (envelope-from Daan@vehosting.nl) From: Daan Vreeken Organization: VEHosting.nl To: freebsd-ppc@freebsd.org Date: Sun, 30 Aug 2009 17:53:23 +0200 User-Agent: KMail/1.9.10 References: <35914876-0CFF-427B-8F80-B1BEEA5A7A18@semihalf.com> <200908301549.18407.Daan@vehosting.nl> <200908301614.58264.Daan@vehosting.nl> In-Reply-To: <200908301614.58264.Daan@vehosting.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200908301753.24288.Daan@vehosting.nl> x-ve-auth-version: mi-1.0.3 2008-05-30 - Copyright (c) 2008 - Daan Vreeken - VEHosting x-ve-auth: authenticated as 'pa4dan' on VM01.VEHosting.nl Cc: Michal Mazur , Andrew Turner , Hans Petter Selasky Subject: Re: FreeBSD/powerpc on MPC5200 X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Aug 2009 15:53:23 -0000 Hi Hans Petter, On Sunday 30 August 2009 16:14:57 Daan Vreeken wrote: > On Sunday 30 August 2009 15:49:17 Daan Vreeken wrote: > > On Friday 28 August 2009 21:46:27 Hans Petter Selasky wrote: > > > On Friday 28 August 2009 21:27:28 Daan Vreeken wrote: > > > > Hi Rafal (and the list), > > > > > > > > On Sunday 24 May 2009 21:15:44 Rafal Jaworowski wrote: > > > > > On 2009-05-23, at 07:21, Andrew Turner wrote: > > > > > > On Fri, 22 May 2009 12:21:01 +0200 > > > > > > > > > > > > Rafal Jaworowski wrote: > > > > > >> On 2009-05-11, at 15:15, Peter Czanik wrote: > > > > > >>> Rafal Jaworowski =EDrta: > > > > > >>>> I'd like to let people know that FreeBSD/powerpc is now able > > > > > >>>> to boot into single user on the Freescale MPC5200 > > > > > >>>> system-on-chip (EFIKA board). The environment is very > > > > > >>>> simplistic: RAM disk based root fs, as > > > > > >>>> there's no peripherals drivers besides serial console and the > > > > > >>>> built- in > > > > > >>>> PIC. See this log: > > > > > >>>> http://people.freebsd.org/~raj/logs/efika.log > > > > > >>> > > > > > >>> Wow, great news! Two questions: > > > > > >>> - are there any plans to support additional devices? > > > > > >> > > > > > >> We don't have immediate plans for other devices drivers, but > > > > > >> this basic support will be merged into SVN, and it would be > > > > > >> greatly welcome to see people help with remaining items. > > > > > > > > > > > > Is there a patch available? I would like to get back to working > > > > > > on the EFIKA. > > > > > > > > > > Preliminary diff against 2009.04.06 HEAD is here: > > > > > http://people.freebsd.org/~raj/patches/powerpc/efika.diff > > > > > > > > > > Comments or questions welcome. Some bits need to be streamlined so > > > > > that all AIM/OF variations work together, and the code has to be > > > > > rebased against up-to-date HEAD. > > > > > > > > I have downloaded your diff and succesfully patched it to -HEAD > > > > (checked out on 2009-08-25). > > > > Right now I'm looking into getting the USB controller working. (That > > > > would allow me to use network & disks all in one go.) > > > > > > > > I have written the OHCI attachment code (inspired by a mix of > > > > Warner's atmel version, mpc5xxx/ic.c and uart_dev_psc.c) and gotten > > > > it to succesfully attach to the OHCI controller when booting the > > > > Efika board. USB is not (yet) working correctly. Near the end of > > > > ohci_init(), the board seems to halt completely for about 30 seconds > > > > and after that, the OHCI controller sets the 'unrecoverable error' > > > > flag. > > > > > > > > A complete dmesg dump can be found here : > > > > http://vehosting.nl/pub_diffs/efika-daan-2009-08-28-ohci_attaching_= bu > > > >t_ fa il ing.txt The kernel that produced this can be downloaded here > > > > : > > > > http://vehosting.nl/pub_diffs/efika-daan-2009-08-28-ohci_attaching_= bu > > > >t_ fa il ing.kernel > > > > > > > > The files I added/changed to get the attachment of the OHCI > > > > controller to 'work' can be found here : > > > > http://vehosting.nl/pub_diffs/efika-daan-2009-08-28_changed_files.t= ar > > > >.g z (Warning : Ugly! and full of printf's for now!) > > > > (I could have missed one, let me know if you can't get it to work.) > > > > > > > > The above dmesg shows a number of printf's I've added to ohci.c . My > > > > mutilated version can be found here : > > > > http://vehosting.nl/pub_diffs/efika-daan-2009-08-28_ohci.c > > > > > > > > As you can see, I printf() the interrupt status register at various > > > > points during ohci_init(). The 'unrecoverable error' flag gets set > > > > just a couple of miliseconds after the following command has been > > > > executed : > > > > > > > > /* And finally start it! */ > > > > OWRITE4(sc, OHCI_CONTROL, ctl); > > > > > > > > After that OWRITE4(), the board sits for about 30 seconds and then > > > > continues. I'm just guessing what's going on here, but could it be > > > > that (one of?) the endpoint lists isn't properly setup and that the > > > > OHCI controller keeps the CPU from accessing memory while it's raci= ng > > > > through memory following corrupt/invalid 'next' pointers? > > > > > > Maybe busdma is not computing correct physical addresses for the kern= el > > > virtual memory loaded into DMA. > > > > I've looking closely at the logs I generated earlier and this doesn't > > seem to be the case (I think). The physical address of the HCCA (Host > > Controller Communications Area) looks the same and the frame_number > > counter is advancing in this memory area as soon as the controller is > > enabled. One thing that strikes me is the value of the frame number > > though : > > > > ohci_dumpregs:599: ohci_dumpregs: rev=3D0x00000010 control=3D0x00000093 > > command=3D0x00000002 > > ohci_dumpregs:603: intrstat=3D0x00000040 intre=3D0x8000005a intrd=3D0x= 8000005a > > ohci_dumpregs:607: hcca=3D0x01c12a00 percur=3D0x48000060 ctrlhd=3D0x01= c20880 > > ohci_dumpregs:611: ctrlcur=3D0x00000000 bulkhd=3D0x01c20800 > > bulkcur=3D0x00000000 ohci_dumpregs:615: done=3D0x00000000 fmival=3D0xa7= 782edf > > fmrem=3D0x800025e7 ohci_dumpregs:619: fmnum=3D0x000000e5 perst=3D0x0000= 2a2f > > lsthrs=3D0x00000628 ohci_dumpregs:623: desca=3D0x02001202 descb=3D0x000= 00000 > > stat=3D0x00000000 ohci_dumpregs:626: port1=3D0x00100303 port2=3D0x00010= 101 > > ohci_dumpregs:632: HCCA: frame_number=3D0x35fe0000 done_head=3D0x00000= 000 > > > > The frame number at this particular moment is '0x35fe0000', though the > > OHCI spec says it should be a 16 bit counter, followed by 16 bits of > > padding (that should read back as '0'). > > > > Could it be a big-endian controller, while the USB code expects > > little-endian? > > Yes, that was it. Changing every 'htole32' into 'htobe32' and every > 'le32toh' into 'be32toh' in sys/dev/usb/controller/ohci.c gets the USB > controller to work : Looking at the NetBSD USB code, I see they have tackled this same problem s= ome=20 time ago by adding a member to struct ohci_softc called 'sc_endian'. Byte=20 swapping is done depending on it's value (which is set in attach routines=20 where needed). Based on NetBSD's code, I've put together a diff against our current ohci.[= ch] that adds the same functionality. With this change, I can get the OHCI=20 controller on the Efika board to work, without breaking other controllers. The diff can be found here : http://vehosting.nl/pub_diffs/ohci-patch-endianness-2009-08-30.diff Could you consider adding it? =2D-=20 Daan Vreeken VEHosting http://VEHosting.nl tel: +31-(0)40-7113050 / +31-(0)6-46210825 KvK nr: 17174380 From owner-freebsd-ppc@FreeBSD.ORG Mon Aug 31 11:07:13 2009 Return-Path: Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D5CF1065694 for ; Mon, 31 Aug 2009 11:07:13 +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 5BD668FC23 for ; Mon, 31 Aug 2009 11:07:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n7VB7D5d070673 for ; Mon, 31 Aug 2009 11:07:13 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n7VB7CKc070669 for freebsd-ppc@FreeBSD.org; Mon, 31 Aug 2009 11:07:12 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 31 Aug 2009 11:07:12 GMT Message-Id: <200908311107.n7VB7CKc070669@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-ppc@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-ppc@FreeBSD.org X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Aug 2009 11:07:13 -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 power/135576 ppc gdb cannot debug threaded programs on ppc o power/133503 ppc [sound] Sound stutter after switching ttys o power/133383 ppc firefox thr_kill crash with heavy vm load o power/133382 ppc [install] Installer gets signal 11 o power/131548 ppc ofw_syscons no longer supports 32-bit framebuffer a power/121407 ppc [panic] Won't boot up; strange error message. o power/111296 ppc [kernel] [patch] [request] Support IMISS, DLMISS an DS o power/93203 ppc FreeBSD PPC Can't Write to Partitions. 8 problems total. From owner-freebsd-ppc@FreeBSD.ORG Sat Sep 5 04:40:04 2009 Return-Path: Delivered-To: freebsd-ppc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E47D106574B for ; Sat, 5 Sep 2009 04:40:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 2A89D8FC26 for ; Sat, 5 Sep 2009 04:40:04 +0000 (UTC) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n854e4Xu005752 for ; Sat, 5 Sep 2009 04:40:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n854e4qe005750; Sat, 5 Sep 2009 04:40:04 GMT (envelope-from gnats) Resent-Date: Sat, 5 Sep 2009 04:40:04 GMT Resent-Message-Id: <200909050440.n854e4qe005750@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ppc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Riley Eltrich Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54F7A1065670 for ; Sat, 5 Sep 2009 04:32:58 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 29BED8FC18 for ; Sat, 5 Sep 2009 04:32:58 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n854Wvhl045893 for ; Sat, 5 Sep 2009 04:32:57 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n854WvVA045892; Sat, 5 Sep 2009 04:32:57 GMT (envelope-from nobody) Message-Id: <200909050432.n854WvVA045892@www.freebsd.org> Date: Sat, 5 Sep 2009 04:32:57 GMT From: Riley Eltrich To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: powerpc/138543: No driver for stock Adaptec brand scsi controller from Apple X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Sep 2009 04:40:04 -0000 >Number: 138543 >Category: powerpc >Synopsis: No driver for stock Adaptec brand scsi controller from Apple >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ppc >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Sep 05 04:40:03 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Riley Eltrich >Release: 7.2 >Organization: N/A >Environment: cant actually install without driver :) >Description: there seems to be no support for the scsi addon card that was a stock part in the Blue/White Powermac G3 Adaptec AHA-2940U2/U2W (rev 01) >How-To-Repeat: boot it on a G3 with the unsupported scsi card unless I just have no idea what I am doing (real possibility) >Fix: >Release-Note: >Audit-Trail: >Unformatted: