lkml.org 
[lkml]   [2017]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Purpose of PCI address in ranges property
On Sun, Mar 19, 2017 at 3:14 PM, valmiki <valmikibow@gmail.com> wrote:
> Hi,
>
> When ranges property is being parsed using of_pci_get_host_bridge_resources,
> the pci address is being used for
> calculating the offset for pci_add_resource_offset.
>
> What is this offset for ?
>
> So the cpu address is being used for programming memory base and limit
> registers ?

Linux IORESOURCE_MEM resources are defined in terms of CPU addresses,
while PCI config space BAR registers are programmed with bus addresses.
These are often the same, but on some machines they are not, which results
in an offset that has to be used when accessing the BARs.

Arnd

\
 
 \ /
  Last update: 2017-03-19 22:53    [W:0.079 / U:0.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site