From owner-freebsd-mips@FreeBSD.ORG Mon May 2 10:53:36 2011 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F3D61065674 for ; Mon, 2 May 2011 10:53:36 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id F3B9A8FC16 for ; Mon, 2 May 2011 10:53:35 +0000 (UTC) Received: by vws18 with SMTP id 18so5469142vws.13 for ; Mon, 02 May 2011 03:53:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=fdnkZvV9jZpF/kaIsWt/K71sBiE0ZPeb68JQh+iV5D8=; b=OtUl+DwOTp61lJvzwuyaSLyDgwnO6D0pH0GSznioMb86PExPsYFocKx1Xl2sD5Rkf9 dqn3QJROSzoeXRLIFKAzaIgiQJQEV2g+I4F33YjXt/f8vm7UKRWD+qTV47o8yMfmjVJO vTtmMFReS23de5eVDSBMhmOYr2wMyGRWItiAQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=SNc6Z/GgvJThBw7tYxnrfB5NhjKycjTlN6n3WPKNnVBkbjZdGS7lp/LupyRB3m3N5J QUIoxbr9o5JB+VT22z7yxqOMNhJWrzttFAAJACQVC78fMVMbMgCPIqomojzwJt/pvdIa szpnvnevndnfJXneZib5kke6pKPP/lbdwPMPI= MIME-Version: 1.0 Received: by 10.52.180.104 with SMTP id dn8mr9350508vdc.302.1304333615105; Mon, 02 May 2011 03:53:35 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.52.157.202 with HTTP; Mon, 2 May 2011 03:53:35 -0700 (PDT) In-Reply-To: References: Date: Mon, 2 May 2011 18:53:35 +0800 X-Google-Sender-Auth: 5h282w437IfcivGUBcc8kldxgLQ Message-ID: From: Adrian Chadd To: freebsd-mips@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: AR724x update: PB92 (atheros) bootstrap; pcie committed; other fixes X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 10:53:36 -0000 Between Luiz and I, we managed to get the ethernet and PCIe nexus working on the PB92. I've tested an AR9280 NIC in hostap and monitor mode. I haven't really given it a good thrashing. Adrian From owner-freebsd-mips@FreeBSD.ORG Thu May 5 01:44:36 2011 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51489106566B for ; Thu, 5 May 2011 01:44:36 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-yi0-f54.google.com (mail-yi0-f54.google.com [209.85.218.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0D7BD8FC13 for ; Thu, 5 May 2011 01:44:35 +0000 (UTC) Received: by yie12 with SMTP id 12so783858yie.13 for ; Wed, 04 May 2011 18:44:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:date:x-google-sender-auth :message-id:subject:from:to:content-type; bh=CH/vfwUNOul0V8npd7UNIoGeVt8/+m+G6npBYNcSFRw=; b=WZT2VhI/IORwEgEvnR1RO1d9996tOt9eq3/WwGm8n9K3ud28ppJC0hav9V8fAMfs1F KtyJMMt4ZWJWrEUfl8snjQ49iEBWG2qe+wsEtndB0wYtLaqwmE97aKYx012wGChsb0vf 8wHEzm+JKM8o37uiWrZiWDMKL/rZuuxa0emy0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=CcYrOCxXchMbKoxlJ951e6usUaw4bivj6Lm8vQRXku1QL3EZlusJ+AyuL5HtMAKF10 hYLrzf4wnp13Jb/NitXwzi9yO7U0jDI9LenWEBOMCaw4aq4Fb0wIdKrP1jZ6H9Ye4rjO CyWgrxAcmei8gx7v4hWcP3bsUNkuumBxhFFUc= MIME-Version: 1.0 Received: by 10.151.43.8 with SMTP id v8mr1635383ybj.296.1304559875237; Wed, 04 May 2011 18:44:35 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.151.109.2 with HTTP; Wed, 4 May 2011 18:44:35 -0700 (PDT) Date: Thu, 5 May 2011 09:44:35 +0800 X-Google-Sender-Auth: fQGr_rGVgBildfJirBPlCOjTRr0 Message-ID: From: Adrian Chadd To: freebsd-mips@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: RFC: AHB handling for AR71xx/AR913x X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 01:44:36 -0000 Hi, Our AR71xx/AR913x SoC support doesn't have an explicit bus nexus for the atheros host bus (AHB), which various things hang off of. These things (the PCI bridge, USB, SPI and ethernet controllers on the AR71xx; the USB, SPI, ethernet, wireless MAC on the AR913x) currently directly connect to nexus0. Now, there's one case with the AR913x where this is a pain, and that's where a DDR flush should be done when IP2 is triggered. There's a similar case on the AR71xx/AR724x but currently the PCI and ethernet controllers do a DDR flush themselves. But there's no convenient place for this to occur for the AR913x wireless MAC (as it connects directly to nexus0). Additionally, according to the AR7100 datasheet, we should be tickling DDR_WB_FLUSH_USB (DDR_BASE+0xA4) after an ISR read. Our USB code doesn't currently handle that. (An aside note, the datasheet says that the DDR registers should be tickled twice, rather than the once we're doing it.) So I propose this: * create an AHB nexus, glued to nexus0; * glue the above devices to it rather than nexus0; * handle AHB errors in this nexus, to aid debugging; * call the relevant DDR flush for USB, PCI, WMAC, etc here That should tidy up all of the bus handling for these SoCs. What do people think? Thanks, Adrian From owner-freebsd-mips@FreeBSD.ORG Thu May 5 16:28:05 2011 Return-Path: Delivered-To: mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D28C8106566B; Thu, 5 May 2011 16:28:05 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (unknown [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 7C44C8FC13; Thu, 5 May 2011 16:28:05 +0000 (UTC) Received: from warner-losh.int.fusionio.com ([216.51.42.66]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p45GOdtc064384 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Thu, 5 May 2011 10:24:41 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Thu, 5 May 2011 10:24:34 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201105051439.p45EdEgC003770@svn.freebsd.org> To: Attilio Rao X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Thu, 05 May 2011 10:24:43 -0600 (MDT) Cc: Rafal Jaworowski , nathanw@freebsd.org, mips@freebsd.org, Marius Strobl , sbruno@freebsd.org, Marcel Moolenaar , Sergey Kandaurov , Warner Losh Subject: Re: svn commit: r221499 - in projects/largeSMP: gnu/usr.bin/gdb/kgdb lib/libmemstat sys/amd64/acpica sys/amd64/amd64 sys/amd64/include sys/arm/arm sys/arm/include sys/cddl/dev/cyclic/i386 sys/cddl/dev/... X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 16:28:06 -0000 This is really exciting news. My time and focus lately has been = elsewhere. Rather than sit on it, I'm forwarding this on to the mips@ = list so that whoever has the time can work on supporting this. Warner On May 5, 2011, at 8:50 AM, Attilio Rao wrote: > 2011/5/5 Attilio Rao : >> Author: attilio >> Date: Thu May 5 14:39:14 2011 >> New Revision: 221499 >> URL: http://svn.freebsd.org/changeset/base/221499 >>=20 >> Log: >> Commit the support for removing cpumask_t and replacing it directly = with >> cpuset_t objects. >> That is going to offer the underlying support for a simple bump of >> MAXCPU and then support for number of cpus > 32 (as it is today). >>=20 >> Right now, cpumask_t is an int, 32 bits on all our supported = architecture. >> cpumask_t on the other side is implemented as an array of longs, and >> easilly extendible by definition. >>=20 >> The architectures touched by this commit are the following: >> - amd64 >> - i386 >> - pc98 >> - arm >> - ia64 >> - XEN >>=20 >> while the others are still missing. >> Userland is believed to be fully converted with the changes = contained >> here. >>=20 >> Some technical notes: >> - This commit may be considered an ABI nop for all the architectures >> different from amd64 and ia64 (and sparc64 in the future) >> - per-cpu members, which are now converted to cpuset_t, needs to be >> accessed avoiding migration, because the size of cpuset_t should = be >> considered unknown >> - size of cpuset_t objects is different from kernel and userland = (this is >> primirally done in order to leave some more space in userland to = cope >> with KBI extensions). If you need to access kernel cpuset_t from = the >> userland please refer to example in this patch on how to do that >> correctly (kgdb may be a good source, for example). >> - Support for other architectures is going to be added soon >> - Only MAXCPU for amd64 is bumped now >>=20 >> The patch has been tested by sbruno and Nicholas Esborn on opteron >> 4 x 12 pack CPUs. More testing on big SMP is expected to came soon. >> pluknet tested the patch with his 8-ways on both amd64 and i386. >>=20 >> Tested by: pluknet, sbruno, gianni, Nicholas Esborn >> Reviewed by: jeff, jhb, sbruno >=20 >=20 > Hi, > sorry for writing to you directly, but I'm contacting you as arch = maintainer. >=20 > I really want to push this project in ASAP and I may need some help > from you about testing patches, architecture specific. >=20 > So far the missing bits involve: > - mips > - powerpc > - sparc64 > - sun4v >=20 > What I'm looking for is specifically testing/reviewing assitance, as I > add the supports to a specific architecture. > I don't plan to bump the MAXCPU on arches !amd64, but if you want to, > feel free to do that after the patch makes the tree. >=20 > Thanks, > Attilio >=20 >=20 > --=20 > Peace can only be achieved by understanding - A. Einstein >=20 >=20