From owner-freebsd-sparc64@FreeBSD.ORG Tue Sep 2 07:21:52 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 E418616A4C1 for ; Tue, 2 Sep 2003 07:21:52 -0700 (PDT) Received: from k6.locore.ca (k6.locore.ca [198.96.117.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id A790D43F85 for ; Tue, 2 Sep 2003 07:21:51 -0700 (PDT) (envelope-from jake@locore.ca) Received: by k6.locore.ca (Postfix, from userid 1000) id 54C869D41; Tue, 2 Sep 2003 10:22:37 -0400 (EDT) Date: Tue, 2 Sep 2003 10:22:37 -0400 From: Jake Burkholder To: Marcel Moolenaar Message-ID: <20030902142236.GA76041@locore.ca> References: <20030902021813.GA2300@dhcp01.pn.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030902021813.GA2300@dhcp01.pn.xcllnt.net> User-Agent: Mutt/1.4.1i cc: sparc64@FreeBSD.org Subject: Re: Req review: OF_decode_addr() 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, 02 Sep 2003 14:21:53 -0000 Apparently, On Mon, Sep 01, 2003 at 07:18:13PM -0700, Marcel Moolenaar said words to the effect of; > Gang, > > Attached a patch to add function OF_decode_addr(). The function > takes a package handle (phandle_t) and returns the physical > (decoded) address at which it resides as well as it space. > This function is needed by uart(4) to for low-level console > access. > > There's one thing I'm not happy about and that's the call to > ofw_isa_map_iorange(). It makes it impossible to create a kernel > without isa. It makes sense to move the bulk of the code in > OF_decode_addr() to the respective bus drivers and have some > linker set to tie bus name to function pointer. I'm not sure > it's important to have that right away or if we can commit this > and deal with that later? I'm biased because I want uart to go in so keyboards work :), but I think this can be dealt with later. What you suggest is a good idea, I'm just hesitant to put too much effort into infrastructure for supporting early device access because its a specialized thing and hopefully will only be used for this class of devices. I like that its all contained in one function that just does its job and doesn't really affect anything else. You could use #ifdef DEV_ISA, DEV_EBUS etc around the bus specific parts. Note that syscons depends on isa anyway, and this is unlikely to change very soon, so I think we're kind of stuck with it. Such is life in FreeBSD. I say commit it. Jake