linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PCI Endpoint - Missing inbound mapping ops ?
@ 2018-08-14 12:49 Ramon Fried
       [not found] ` <cdc09cf9-27dd-7838-34e7-12d63571e770@ti.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Ramon Fried @ 2018-08-14 12:49 UTC (permalink / raw)
  To: kishon, lorenzo.pieralisi, bhelgaas, linux-pci, open list

Hi.
I recently saw that the PCI endpoint API only supports outbound memory
mapping: (AXI -> PCI) through the map_addr op.
Why inbound mapping is missing (PCI->AXI) is missing ?
In almost all of the PCI EP controllers I've worked with there was a
need to map complete BARS or part of BARS to mmio/aperature regions on
the device.

Thanks !
Ramon.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PCI Endpoint - Missing inbound mapping ops ?
       [not found] ` <cdc09cf9-27dd-7838-34e7-12d63571e770@ti.com>
@ 2018-08-14 12:55   ` Ramon Fried
  2018-08-14 13:04     ` Kishon Vijay Abraham I
  2018-08-14 13:08   ` Miguel Ojeda
  1 sibling, 1 reply; 5+ messages in thread
From: Ramon Fried @ 2018-08-14 12:55 UTC (permalink / raw)
  To: kishon; +Cc: lorenzo.pieralisi, bhelgaas, linux-pci, open list

On Tue, Aug 14, 2018 at 1:53 PM Kishon Vijay Abraham I <kishon@ti.com> wrote:
>
> Hi,
>
> On Tuesday 14 August 2018 06:19 PM, Ramon Fried wrote:
> > Hi.
> > I recently saw that the PCI endpoint API only supports outbound memory
> > mapping: (AXI -> PCI) through the map_addr op.
> > Why inbound mapping is missing (PCI->AXI) is missing ?
> > In almost all of the PCI EP controllers I've worked with there was a
> > need to map complete BARS or part of BARS to mmio/aperature regions on
> > the device.
>
> pci_epc_set_bar() is used for mapping BAR.
Thanks Kishon.
what about address mapping ? Synopsys has this functionality if I
recall correctly.

>
> Thanks
> Kishon

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PCI Endpoint - Missing inbound mapping ops ?
  2018-08-14 12:55   ` Ramon Fried
@ 2018-08-14 13:04     ` Kishon Vijay Abraham I
  2018-08-14 13:06       ` Ramon Fried
  0 siblings, 1 reply; 5+ messages in thread
From: Kishon Vijay Abraham I @ 2018-08-14 13:04 UTC (permalink / raw)
  To: Ramon Fried; +Cc: lorenzo.pieralisi, bhelgaas, linux-pci, open list

Hi,

On Tuesday 14 August 2018 06:25 PM, Ramon Fried wrote:
> On Tue, Aug 14, 2018 at 1:53 PM Kishon Vijay Abraham I <kishon@ti.com> wrote:
>>
>> Hi,
>>
>> On Tuesday 14 August 2018 06:19 PM, Ramon Fried wrote:
>>> Hi.
>>> I recently saw that the PCI endpoint API only supports outbound memory
>>> mapping: (AXI -> PCI) through the map_addr op.
>>> Why inbound mapping is missing (PCI->AXI) is missing ?
>>> In almost all of the PCI EP controllers I've worked with there was a
>>> need to map complete BARS or part of BARS to mmio/aperature regions on
>>> the device.
>>
>> pci_epc_set_bar() is used for mapping BAR.
> Thanks Kishon.
> what about address mapping ? Synopsys has this functionality if I
> recall correctly.

The addresses that the RC will put in BAR's is not known while we initialize
the endpoint. So we really can't map BAR's PCI address to an inbound address
while EP initialization.

I think some older version of Synopsys had this (and didn't have BAR mapping).
Actually TI's K2G had this IP. However the ATU registers here are mapped to
BAR0. So the host side PCI driver can program the PCI address (that the RC has
allocated for BARs) in ATU.

Thanks
Kishon

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PCI Endpoint - Missing inbound mapping ops ?
  2018-08-14 13:04     ` Kishon Vijay Abraham I
@ 2018-08-14 13:06       ` Ramon Fried
  0 siblings, 0 replies; 5+ messages in thread
From: Ramon Fried @ 2018-08-14 13:06 UTC (permalink / raw)
  To: kishon; +Cc: lorenzo.pieralisi, bhelgaas, linux-pci, open list

On Tue, Aug 14, 2018 at 2:04 PM Kishon Vijay Abraham I <kishon@ti.com> wrote:
>
> Hi,
>
> On Tuesday 14 August 2018 06:25 PM, Ramon Fried wrote:
> > On Tue, Aug 14, 2018 at 1:53 PM Kishon Vijay Abraham I <kishon@ti.com> wrote:
> >>
> >> Hi,
> >>
> >> On Tuesday 14 August 2018 06:19 PM, Ramon Fried wrote:
> >>> Hi.
> >>> I recently saw that the PCI endpoint API only supports outbound memory
> >>> mapping: (AXI -> PCI) through the map_addr op.
> >>> Why inbound mapping is missing (PCI->AXI) is missing ?
> >>> In almost all of the PCI EP controllers I've worked with there was a
> >>> need to map complete BARS or part of BARS to mmio/aperature regions on
> >>> the device.
> >>
> >> pci_epc_set_bar() is used for mapping BAR.
> > Thanks Kishon.
> > what about address mapping ? Synopsys has this functionality if I
> > recall correctly.
>
> The addresses that the RC will put in BAR's is not known while we initialize
> the endpoint. So we really can't map BAR's PCI address to an inbound address
> while EP initialization.
>
> I think some older version of Synopsys had this (and didn't have BAR mapping).
> Actually TI's K2G had this IP. However the ATU registers here are mapped to
> BAR0. So the host side PCI driver can program the PCI address (that the RC has
> allocated for BARs) in ATU.
Yes. you're right.
Thanks for the clarification.
>
> Thanks
> Kishon

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PCI Endpoint - Missing inbound mapping ops ?
       [not found] ` <cdc09cf9-27dd-7838-34e7-12d63571e770@ti.com>
  2018-08-14 12:55   ` Ramon Fried
@ 2018-08-14 13:08   ` Miguel Ojeda
  1 sibling, 0 replies; 5+ messages in thread
From: Miguel Ojeda @ 2018-08-14 13:08 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: Ramon Fried, lorenzo.pieralisi, bhelgaas, linux-pci, open list

Hi Kishon,

On Tue, Aug 14, 2018 at 2:53 PM, Kishon Vijay Abraham I <kishon@ti.com> wrote:
> Hi,
>
> On Tuesday 14 August 2018 06:19 PM, Ramon Fried wrote:
>> Hi.
>> I recently saw that the PCI endpoint API only supports outbound memory
>> mapping: (AXI -> PCI) through the map_addr op.
>> Why inbound mapping is missing (PCI->AXI) is missing ?
>> In almost all of the PCI EP controllers I've worked with there was a
>> need to map complete BARS or part of BARS to mmio/aperature regions on
>> the device.
>
> pci_epc_set_bar() is used for mapping BAR.

Just to let you know, the ARC/DKIM seems wrong according to gmail and
is marked as spam. It seems it happens from time to time. Bjorn
Helgaas (in CC) also had the same problem a couple of years ago.

Cheers,
Miguel

>
> Thanks
> Kishon

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-08-14 15:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-14 12:49 PCI Endpoint - Missing inbound mapping ops ? Ramon Fried
     [not found] ` <cdc09cf9-27dd-7838-34e7-12d63571e770@ti.com>
2018-08-14 12:55   ` Ramon Fried
2018-08-14 13:04     ` Kishon Vijay Abraham I
2018-08-14 13:06       ` Ramon Fried
2018-08-14 13:08   ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).