From owner-freebsd-hackers Thu Apr 6 14:30:24 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id BAA9337BA41 for ; Thu, 6 Apr 2000 14:30:16 -0700 (PDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id PAA02789; Thu, 6 Apr 2000 15:30:12 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id PAA93631; Thu, 6 Apr 2000 15:29:19 -0600 (MDT) Message-Id: <200004062129.PAA93631@harmony.village.org> To: "Gary T. Corcoran" Subject: Re: How to get multiple PCI I/O base addresses in attach()? Cc: freebsd-hackers@FreeBSD.ORG In-reply-to: Your message of "Thu, 06 Apr 2000 16:14:03 EDT." <38ECF00B.CA0AD45B@lucent.com> References: <38ECF00B.CA0AD45B@lucent.com> <38EC3755.DA40DEC8@home.com> Date: Thu, 06 Apr 2000 15:29:19 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <38ECF00B.CA0AD45B@lucent.com> "Gary T. Corcoran" writes: : At first I thought "res1" would be the base address I was looking for. : However, it appears (boy I wish this stuff was documented!) that : bus_alloc_resource returns a "struct resource *". But I looked and : looked and I can't find the definition of what a "struct resource" is. : So I'm still in the dark as to how to get my I/O base address from : the pointer returned by the bus_alloc_resource. How do I do that? bt = rman_get_bustag(res1); bh = rman_get_bushandle(res1); bus_space_read_{1,2,4}(bt, bh, offset) bus_space_write_{1,2,4}(bt, bh, offset, value) Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message