Warner,

> rid = 0x10;
> res1 = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, 0, ~0, 1, RF_ACTIVE);
...
> should do the trick.  Change SYS_RES_MEMORY to SYS_RES_IOPORT if it is
> I/O mapped rather than memory mapped.
> 
> In case it wasn't clear, the rid is the offset into the config space
> where the BAR register that you want to use is.  Multiples of 4 only
> need apply.

Thanks, that helps.  BUT...
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?

Thanks,
Gary
-- 
=========================================================
 Gary Corcoran - Distinguished Member of Technical Staff
Lucent Microelectronics - Client Access Broadband Systems
   Communications Protocol & Driver Development Group
   "We make the drivers that make communications work"
              Email: [EMAIL PROTECTED]
---------------------------------------------------------
There are only two kinds of machines - those that fail
little by little, and those that fail all at once.
=========================================================


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to