From owner-freebsd-doc Fri May 19 0:16:44 2000 Delivered-To: freebsd-doc@freebsd.org Received: from mass.cdrom.com (adsl-63-206-88-224.dsl.snfc21.pacbell.net [63.206.88.224]) by hub.freebsd.org (Postfix) with ESMTP id 09CB337BCFE; Fri, 19 May 2000 00:16:30 -0700 (PDT) (envelope-from msmith@mass.cdrom.com) Received: from mass.cdrom.com (localhost [127.0.0.1]) by mass.cdrom.com (8.9.3/8.9.3) with ESMTP id AAA07106; Fri, 19 May 2000 00:17:13 -0700 (PDT) (envelope-from msmith@mass.cdrom.com) Message-Id: <200005190717.AAA07106@mass.cdrom.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: Alexander Langer Cc: "Matthew N. Dodd" , doc@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: request for review: bus_alloc_resource(9) In-reply-to: Your message of "Fri, 19 May 2000 09:12:30 +0200." <20000519091230.C2729@cichlids.cichlids.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 19 May 2000 00:17:13 -0700 From: Mike Smith Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > Thus spake Matthew N. Dodd (winter@jurai.net): > > > is just a range; start and length, and a type. The 'rid' has nothing to > > do with offsets into a memory/port resource. > > Hmm. When I wrote Doug Rabson about newbus months ago, he gave me that > part of code: > > rid = 0x10; /* offset of pci mapping register - check your docs */ > res = bus_alloc_resource(dev, SYS_RES_IOPORTS, &rid, 0, ~0, 1, > RF_ACTIVE); > st = rman_get_bustag(res); > sh = rman_get_bushandle(res); > > This "offset of the pci mapping register" is quite confusing for me > then. Not at all; in the PCI context, that's what the rid is. As has been said several times now, the meaning of the rid is _bus_specific_. -- \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ msmith@freebsd.org \\ and he'll hate you for a lifetime. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message