From owner-freebsd-arch@FreeBSD.ORG Wed Feb 13 23:21:56 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 285999AA for ; Wed, 13 Feb 2013 23:21:56 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ob0-f179.google.com (mail-ob0-f179.google.com [209.85.214.179]) by mx1.freebsd.org (Postfix) with ESMTP id E9F7C746 for ; Wed, 13 Feb 2013 23:21:55 +0000 (UTC) Received: by mail-ob0-f179.google.com with SMTP id un3so1829283obb.24 for ; Wed, 13 Feb 2013 15:21:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to:x-mailer:x-gm-message-state; bh=PVi/Y7bwLnzgcewsAwx8EtiGw3+Z+/ni6r48NlgJ3QA=; b=O9nJUtIDMQAGIXGedY44rLP9rOMS5Ukr47Si5JelNUWT7hMc320ZXOWcAV5xfIZl/l kA7EIUu0Mjc85G4YiMYi5cWC1EG6DyvVKBOb5xzW6PwJU7dsIPhsMc04KKr5DBKXrsw3 EvnJz9JplEBNnryXQ5/KYXMOt/+jgy4ieoEVIXV9NDCINBF7RnZpBLEqqZraqxRO4kZe 3OlZLSKdZ26WLuSf8Fe93n/ee9HoKf5i5PVdnJwfMDT8TxN2+GqulHTQ5ZySiYsLpai4 qftVuTb10PkbxVQYNfVE4+odrC6RWxRaUy32Yu17vAcNlZtYuc9Dsb8sbxVgzl7QRXZ3 Jkrg== X-Received: by 10.60.7.129 with SMTP id j1mr17858120oea.54.1360797713018; Wed, 13 Feb 2013 15:21:53 -0800 (PST) Received: from fusionlt2834a.int.fusionio.com ([209.117.142.2]) by mx.google.com with ESMTPS id t9sm3178240obk.13.2013.02.13.15.21.51 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 13 Feb 2013 15:21:52 -0800 (PST) Sender: Warner Losh Subject: Re: FDT on x86 and for non-fdtbus devices. Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <03A622DA-EFD4-4984-8FC3-CD8B4832C32E@xcllnt.net> Date: Wed, 13 Feb 2013 16:21:49 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <77486082-2D96-49CC-9841-2D1572F86DEE@bsdimp.com> References: <03A622DA-EFD4-4984-8FC3-CD8B4832C32E@xcllnt.net> To: Marcel Moolenaar X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQmtF40V7Q4fktNX3UYOBXkuzIFfpLSuxDsERoMdiQMIZjatDeQLa/DRKgC27za84154ropK Cc: "freebsd-arch@FreeBSD.org Arch" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Feb 2013 23:21:56 -0000 On Feb 13, 2013, at 1:56 PM, Marcel Moolenaar wrote: > All, >=20 > Here at Juniper we added support for FDT to x86 (we'll contribute > that shortly). However, it's applicability is rather limited right > now by virtue of needing the devices to be attached to fdtbus > (directly or indirectly). That's cool... > This so that we can map from device_t > to pnode_t. However, there's great value in being able to use the > FDT to tweak the behaviour of any device in the system, and in > particular when we don't need nor use FDT to enumerate them. Yes, I can see that for many possible cases... However, you'll have to = solve the namespace boundary problems inherent in such an undertaking... > What we like to do is to use the FDT to define properties for > pretty much any kind of device. Examples are: > 1. Allow the FDT to define the name by which an interface is > to be created. This might be hard... Perhaps you could flesh out a bit how you'd = propose to do this. > 2. Enumerate smb devices so that we can attach drivers for them > under smbus when we don't need FDT to find ichsmb itself. If there's a 1-1 correspondence in the the FDT between the smb bridge = driver (ichsmb) and the sub devices, this could work. > I think one way to state the problem in a generic way is: How > can we obtain the FDT pnode_t given an arbitrary device_t and > use the pnode_t to query for properties, etc. Yes. What's the naming conventions we need to use here, especially since = names in the FDT don't necessarily match our driver names. Crazy idea: = define freebsd,driver-name properlty to make this association explicit. > Are people already doing things like this? only a little. > Is there an interest in being able to do things like this? Yes. > Are changes to drivers to have them query FDT contributable at > all or do people think such would be "pollution"? I like this idea, but others may not be so open to it. > Thoughts? > Ideas? "Go speed racer! Go!" Warner=