From owner-freebsd-sparc64@FreeBSD.ORG Mon Sep 1 23:50:00 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 A9F8316A4BF for ; Mon, 1 Sep 2003 23:50:00 -0700 (PDT) Received: from mail.cyberonic.com (mail.cyberonic.com [4.17.179.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 717F543F75 for ; Mon, 1 Sep 2003 23:49:59 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (node-40244c0a.sfo.onnet.us.uu.net [64.36.76.10]) by mail.cyberonic.com (8.12.8/8.12.5) with ESMTP id h827XJbi023103; Tue, 2 Sep 2003 03:33:20 -0400 Received: (from jmg@localhost) by hydrogen.funkthat.com (8.12.9/8.11.6) id h826nuhK018735; Mon, 1 Sep 2003 23:49:56 -0700 (PDT) (envelope-from jmg) Date: Mon, 1 Sep 2003 23:49:56 -0700 From: John-Mark Gurney To: sparc64@freebsd.org Message-ID: <20030902064956.GA16766@funkthat.com> Mail-Followup-To: sparc64@freebsd.org, Marcel Moolenaar 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 X-Operating-System: FreeBSD 4.2-RELEASE i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html cc: Marcel Moolenaar Subject: Re: Req review: OF_decode_addr() X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: John-Mark Gurney 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 06:50:00 -0000 Marcel Moolenaar wrote this message on Mon, Sep 01, 2003 at 19:18 -0700: > 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. You mean physical address as viewed by the CPU, correct? > 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? Why don't you wrap the ebus/isa part around an #if defined(NISA) || defined(NEBUS) to prevent the inclusion of isa when not necessary? I would like to see this code in a more general format instead of in a MD file. OpenFirmware is quite specific on how each bus lists it's registers and ranges. We should leverage this so that other platforms don't have to have lots of special code to implement the same thing. I don't have an OFW dump handy, so I can't verify correctness of code. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."