From owner-freebsd-ppc@FreeBSD.ORG Thu Apr 3 03:24:52 2008 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 10FBF1065680 for ; Thu, 3 Apr 2008 03:24:52 +0000 (UTC) (envelope-from nathanw@uchicago.edu) Received: from relay02.uchicago.edu (relay02.uchicago.edu [128.135.12.76]) by mx1.freebsd.org (Postfix) with ESMTP id BD3748FC22 for ; Thu, 3 Apr 2008 03:24:51 +0000 (UTC) (envelope-from nathanw@uchicago.edu) Received: from harper.uchicago.edu (harper.uchicago.edu [128.135.12.7]) by relay02.uchicago.edu (8.13.6.20060614/8.12.9) with ESMTP id m3337ieK026678; Wed, 2 Apr 2008 22:07:44 -0500 (CDT) Received: from localhost (nathanw@localhost) by harper.uchicago.edu (8.12.10/8.12.10) with ESMTP id m3337iEh020964; Wed, 2 Apr 2008 22:07:44 -0500 (CDT) X-Authentication-Warning: harper.uchicago.edu: nathanw owned process doing -bs Date: Wed, 2 Apr 2008 22:07:43 -0500 (CDT) From: Nathan Whitehorn To: Marcel Moolenaar In-Reply-To: Message-ID: References: <47E06B23.7060400@uchicago.edu> <20080325023040.ab0daa19.stas@FreeBSD.org> <47E8527B.2050002@uchicago.edu> <47F39EF4.8040800@uchicago.edu> <47F3D2BC.7060001@uchicago.edu> <47F422A0.9080907@uchicago.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-ppc@freebsd.org Subject: Re: BMAC Ethernet Driver 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: Thu, 03 Apr 2008 03:24:52 -0000 On Wed, 2 Apr 2008, Marcel Moolenaar wrote: > > On Apr 2, 2008, at 5:23 PM, Marcel Moolenaar wrote: > >>>> ... The real concern, on my part, for committing it is whether the macio >>>> IRQ patch breaks anything. >> >> I'll test the patch... > > I doubt the patch is correct.... > > Before: > > scc0: mem 0x13000-0x13fff,0x8400-0x84ff, > 0x8500-0x85ff,0x8600-0x86ff,0x8700-0x87ff irq 22,23 on macio0 > scc0: [FILTER] > scc0: [FILTER] > uart0: on scc0 > uart0: [FILTER] > uart0: console (57600,n,8,1) > uart1: on scc0 > uart1: [FILTER] > ata0 mem 0x1f000-0x1ffff,0x8a00-0x8aff irq 19 on macio0 > ata0: [ITHREAD] > > After: > > scc0: mem 0x13000-0x13fff,0x8400-0x84ff, > 0x8500-0x85ff,0x8600-0x86ff,0x8700-0x87ff irq 22,1,5,0,6,0 on macio0 > scc0: [FILTER] > scc0: [FILTER] > uart0: on scc0 > uart0: [FILTER] > uart0: console (57600,n,8,1) > uart1: on scc0 > uart1: [FILTER] > ata0 mem 0x1f000-0x1ffff,0x8a00-0x8aff irq 19,1,11,0 on macio0 > ata0: [ITHREAD] > > > "ofwdump -aP interrupts" gives: > ... > Node 0xff95fd30: escc > Node 0xff95ffb8: ch-a > interrupts: > 00 00 00 16 00 00 00 01 00 00 00 05 00 00 00 00 00 00 00 06 > 00 00 00 00 > Node 0xff960a08: ch-b > interrupts: > 00 00 00 17 00 00 00 01 00 00 00 07 00 00 00 00 00 00 00 08 > 00 00 00 00 > ... > Node 0xff970618: ata-4 > interrupts: > 00 00 00 13 00 00 00 01 00 00 00 0b 00 00 00 00 > Node 0xff973358: disk > > > Can you send me the output of ofwdump on your machine? So it looks like that corresponds to the OF output, to within the macio limit of 5 interrupts per device. Two of the interrupts for each channel (probably the first two after the main one) are the DBDMA interrupts for transmit and receive DMA on each UART. The others, I don't know. G4 machines seem to have a lot of 0 interrupts listed in OF. Maybe we should remove them? I somehow doubt that 0 is a valid IRQ. This definitely does break the serial support, and should probably be reevaluated. The limit of five interrupts should be removed, certainly, and possibly some of the values trimmed. After that, SCC still needs to get the right per-channel primary interrupt, which I don't know how to do without hints from macio. On my machine, there are three SCC interrupts per channel: the main per-channel interrupts, and the two DBDMA interrupts. None of them are 0. I'll send the exact output in the morning. -Nathan