From owner-freebsd-sparc64@FreeBSD.ORG Tue Jul 8 11:15:28 2003 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9243537B401 for ; Tue, 8 Jul 2003 11:15:28 -0700 (PDT) Received: from ns1.xcllnt.net (209-128-86-226.bayarea.net [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 22C0D43F3F for ; Tue, 8 Jul 2003 11:15:27 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.9/8.12.9) with ESMTP id h68IFQv1035299 for ; Tue, 8 Jul 2003 11:15:26 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp01.pn.xcllnt.net (8.12.9/8.12.9) with ESMTP id h68IFQKH031263 for ; Tue, 8 Jul 2003 11:15:26 -0700 (PDT) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.9/8.12.9/Submit) id h68IFQgN031262 for sparc64@freebsd.org; Tue, 8 Jul 2003 11:15:26 -0700 (PDT) (envelope-from marcel) Date: Tue, 8 Jul 2003 11:15:26 -0700 From: Marcel Moolenaar To: sparc64@freebsd.org Message-ID: <20030708181526.GA31152@dhcp01.pn.xcllnt.net> References: <20030707210543.GA29440@ns1.xcllnt.net> <20030708132815.GA659@crow.dom2ip.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030708132815.GA659@crow.dom2ip.de> User-Agent: Mutt/1.5.4i Subject: Re: pre-newbus address decoding X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jul 2003 18:15:28 -0000 On Tue, Jul 08, 2003 at 03:28:15PM +0200, Thomas Moestl wrote: > > > > Q2: Am I correct that the basic logic is to traverse to the root and > > decode the address at each intermediate parent, until we end up > > with what is then the physical address? > > Yes. I've put some old sio patches which I use at > http://people.freebsd.org/~tmm/sio-s64-20030612.diff > in case you are interested (this is a quick and dirty hack; the > code I use to attach the console is at the very end). As you can see, > I special-cased the register mapping at PCI and ISA/EBus level (which > I guess you want to avoid to be more generic). Cool. This is exactly what I'm looking for. > > Q4: Given the above, does it make sense to add decoding functionality > > to the bus drivers as a low-level interface between low-level > > console drivers and OFW (ie not using newbus data structures)? > > I guess a generic mapping function would be preferable if it is > possible and all firmware implementation are close enough to the > standard to allow this. The bus drivers will mostly just do the same, > but attaching them early would probably be more trouble. Ok. I'll add one on the uart branch. At first it'll be a copy of what you have in the sio patch, but it'll probably evolve. Unfortunately all my UARTs are on EBUS. Then again, a PCI multi I/O card shouldn't be that expensive... Last questions: Since I create a fake bustag, I need to have a valid bus space type (bus_space_asi index). Am I correct that the PCI types use little endian reads and writes? If so, can I avoid the problem by always using 8-byte reads/writes and just use type 0 or is the magic slightly more complex and do I need to keep track of a proper type while traversing to the root? -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net