Re: PCI BAR value can be changed ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Correct me if wrong.

On 10/1/08, yogeshwar sonawane <yogyas@xxxxxxxxx> wrote:
> Hi all,
>
> By reading the PCI BAR value from PCI config space, one gets BAR
> region starting address for that PCI device.
> If device is 32-bit capable, then max 6 BARs are possible, but for
> 64-bit PCI card, only 3 BAR regions are possible.
>
> Generally, BIOS sets the address/value in these BARs which device
> driver reads & access the device. I am referring linux OS.
> So the BAR region address range OR starting address assignment is done by
> BIOS.
> Can we change this address through device driver, by writing the PCI
> BARs in PCI config space ?
> There are apis to read/write to PCI config space.
>
> Can i map a BAR region of a PCI device, above 4 GB (i.e. 64-bit addr)
> instead of 32bit address(higher 32bits as 0) ?
> If possible, how to do this ?
>

Above 4GB, u need PAE + HIGHMEM option both enabled.   Yes, u can
always use kmap() and friends API to map from > 4GB area to lowmem.
Then writing will just write to these lowmem area.

Reference:

http://www.ussg.indiana.edu/hypermail/linux/kernel/0806.3/1019.html

Correct????


> Writing/changing BAR register value through device driver, will
> propagate till PCI root controller ?
> Can setpci command be used for this ?
>
> Any link or reference will be helpful.
>
> Thanking in advance,
> Yogeshwar


-- 
Regards,
Peter Teoh

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux