Re: Accessing the configuration registers

Dave Jones (dave@denial.force9.co.uk)
3 Jan 2000 14:27:46 GMT


Anil Kumar S R <anilsr@sasi.com> wrote:
> Hi,
> I am using a PCI-ISA bridge, I want to read the Local Configuration
> Registers.
> There are two ways to do :
> 1. I/O mapped
> 2. Memory mapped
> using PCI Base Address Registers.
>
> In case of I/O mapped ,I can use IN & OUT instructions
> for accessing the configuration registers.
>
> In case of Memory mapped how do access the Configuration Registers.

If possible, do whatever you're doing in userspace, using pcilib,
(part of pciutils) such things are already taken care of for you transparently.

If what you're doing _has_ to be in kernel space, check out the functions
in drivers/pci/ Things like pci_read_config_[byte|word|dword] are what
you'll need.

regards,

-- 
Dave.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/