Re: PCI BAR value can be changed ?

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

 



Hi jfs,

Thanks for info.

I have seen a machine, in which BIOS was having a option like :-
map BAR above 4GB/2GB/2.5GB... such 3 or 4 options.
Using such option, it was mapping BAR above the specified range.

Now, not all machines are having such options.
So, i was just trying to explore a way, to get BAR mapped above some range.

On Wed, Oct 1, 2008 at 6:49 PM, jean-francois simon <jfsthemis@xxxxxxxxx> wrote:
> yogeshwar sonawane 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.
>
> ok.
>
>>
>> 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.
>
> i don't think this is possible for a driver to reassign pci resources.
>>
>> 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 ?
>
> check your bios: AMI bioses can work with PCI 64b devices. but i  don't
> know if linux can be forced to assign 64b pci devices above 4GB.
>>
>> Writing/changing BAR register value through device driver, will
>> propagate till PCI root controller ?
>> Can setpci command be used for this ?
>
> i dont think you want to do that. the pci enumeration is the
> responsibility of the kernel, and you can't change this from a driver.
> look at /proc/iomem and you will see your device is part of a pci bus
> within a given MMIO window. maybe you can change yr device BARs within
> that window...but even this i dont recommend.
>
> the kernel parameter "pci=assign-busses" is supposed to re-enumerate the
> PCI hierarchy and you may like what linux did in that area better than
> what the bios did.
>
> i am saying all this with a grain of salt. i am also wondering how pci
> enumeration/resource allocation really works....i have recently looked
> at the code and it is not easy to figure out if on an arch like x86_64,
> devices can be set > 4GB, if and when they are moved...
> but i'll look more and get back to you if i find anything
> -jfs
>
>
>

--
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