linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Memory and IO space Enabling different in x86 and ARM64
@ 2016-07-15  8:29 Bharat Kumar Gogada
  2016-07-15  8:33 ` Arnd Bergmann
  2016-07-15 21:47 ` Bjorn Helgaas
  0 siblings, 2 replies; 5+ messages in thread
From: Bharat Kumar Gogada @ 2016-07-15  8:29 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

I observe that memory and IO space are enabled by BIOS in x86.

In ARM64 we need to call pci_enable_device form End Point to enable these resources.

Why the resource enablement is different in x86 and ARM64 ?

Please correct me if my observation is wrong.

Thanks & Regards,
Bharat


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

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

* Memory and IO space Enabling different in x86 and ARM64
  2016-07-15  8:29 Memory and IO space Enabling different in x86 and ARM64 Bharat Kumar Gogada
@ 2016-07-15  8:33 ` Arnd Bergmann
  2016-07-16  3:22   ` Bharat Kumar Gogada
  2016-07-15 21:47 ` Bjorn Helgaas
  1 sibling, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2016-07-15  8:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday, July 15, 2016 8:29:49 AM CEST Bharat Kumar Gogada wrote:
> I observe that memory and IO space are enabled by BIOS in x86.
> 
> In ARM64 we need to call pci_enable_device form End Point to enable these resources.
> 
> Why the resource enablement is different in x86 and ARM64 ?
> 
> Please correct me if my observation is wrong.

This is a difference between systems with a BIOS and embedded systems with
a plain bootloader that ignores PCI. On an ARM64 server system with UEFI
you should expect the device to be usable too, but on an embedded system,
Linux takes the role of the BIOS.

	Arnd

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

* Memory and IO space Enabling different in x86 and ARM64
  2016-07-15  8:29 Memory and IO space Enabling different in x86 and ARM64 Bharat Kumar Gogada
  2016-07-15  8:33 ` Arnd Bergmann
@ 2016-07-15 21:47 ` Bjorn Helgaas
  2016-07-16  3:25   ` Bharat Kumar Gogada
  1 sibling, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2016-07-15 21:47 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Jul 15, 2016 at 08:29:49AM +0000, Bharat Kumar Gogada wrote:
> Hi,
> 
> I observe that memory and IO space are enabled by BIOS in x86.
> 
> In ARM64 we need to call pci_enable_device form End Point to enable these resources.
> 
> Why the resource enablement is different in x86 and ARM64 ?

A portable driver should call pci_enable_device() if it needs access
to any BARs.  As you've observed, the command register enable bits may
be set differently on different architectures, and the PCI core
doesn't set them automatically for you, so the driver can't rely on
their initial settings.

One reason why Linux doesn't enable them automatically before calling
the driver's probe method is that it may not be possible to allocate
space for all the BARs (e.g., if the platform doesn't support I/O port
space, or if we just run out of space), but the driver may be able to
operate the device even without all the BARs.

Bjorn

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

* Memory and IO space Enabling different in x86 and ARM64
  2016-07-15  8:33 ` Arnd Bergmann
@ 2016-07-16  3:22   ` Bharat Kumar Gogada
  0 siblings, 0 replies; 5+ messages in thread
From: Bharat Kumar Gogada @ 2016-07-16  3:22 UTC (permalink / raw)
  To: linux-arm-kernel

> Subject: Re: Memory and IO space Enabling different in x86 and ARM64
>
> On Friday, July 15, 2016 8:29:49 AM CEST Bharat Kumar Gogada wrote:
> > I observe that memory and IO space are enabled by BIOS in x86.
> >
> > In ARM64 we need to call pci_enable_device form End Point to enable
> these resources.
> >
> > Why the resource enablement is different in x86 and ARM64 ?
> >
> > Please correct me if my observation is wrong.
>
> This is a difference between systems with a BIOS and embedded systems
> with a plain bootloader that ignores PCI. On an ARM64 server system with
> UEFI you should expect the device to be usable too, but on an embedded
> system, Linux takes the role of the BIOS.
>
Thanks Arnd Bergmann



This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

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

* Memory and IO space Enabling different in x86 and ARM64
  2016-07-15 21:47 ` Bjorn Helgaas
@ 2016-07-16  3:25   ` Bharat Kumar Gogada
  0 siblings, 0 replies; 5+ messages in thread
From: Bharat Kumar Gogada @ 2016-07-16  3:25 UTC (permalink / raw)
  To: linux-arm-kernel

> Subject: Re: Memory and IO space Enabling different in x86 and ARM64
>
> On Fri, Jul 15, 2016 at 08:29:49AM +0000, Bharat Kumar Gogada wrote:
> > Hi,
> >
> > I observe that memory and IO space are enabled by BIOS in x86.
> >
> > In ARM64 we need to call pci_enable_device form End Point to enable
> these resources.
> >
> > Why the resource enablement is different in x86 and ARM64 ?
>
> A portable driver should call pci_enable_device() if it needs access
> to any BARs.  As you've observed, the command register enable bits may
> be set differently on different architectures, and the PCI core
> doesn't set them automatically for you, so the driver can't rely on
> their initial settings.
>
> One reason why Linux doesn't enable them automatically before calling
> the driver's probe method is that it may not be possible to allocate
> space for all the BARs (e.g., if the platform doesn't support I/O port
> space, or if we just run out of space), but the driver may be able to
> operate the device even without all the BARs.
>
Thanks Bjorn


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.

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

end of thread, other threads:[~2016-07-16  3:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-15  8:29 Memory and IO space Enabling different in x86 and ARM64 Bharat Kumar Gogada
2016-07-15  8:33 ` Arnd Bergmann
2016-07-16  3:22   ` Bharat Kumar Gogada
2016-07-15 21:47 ` Bjorn Helgaas
2016-07-16  3:25   ` Bharat Kumar Gogada

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