Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1444052 > unrolled thread
| Started by | Bharat Kumar Gogada <bharat.kumar.gogada@xilinx.com> |
|---|---|
| First post | 2016-07-15 10:40 +0200 |
| Last post | 2016-07-16 05:30 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
Memory and IO space Enabling different in x86 and ARM64 Bharat Kumar Gogada <bharat.kumar.gogada@xilinx.com> - 2016-07-15 10:40 +0200
Re: Memory and IO space Enabling different in x86 and ARM64 Arnd Bergmann <arnd@arndb.de> - 2016-07-15 10:40 +0200
Re: Memory and IO space Enabling different in x86 and ARM64 Bjorn Helgaas <helgaas@kernel.org> - 2016-07-15 23:50 +0200
RE: Memory and IO space Enabling different in x86 and ARM64 Bharat Kumar Gogada <bharat.kumar.gogada@xilinx.com> - 2016-07-16 05:30 +0200
| From | Bharat Kumar Gogada <bharat.kumar.gogada@xilinx.com> |
|---|---|
| Date | 2016-07-15 10:40 +0200 |
| Subject | Memory and IO space Enabling different in x86 and ARM64 |
| Message-ID | <rV6P7-4CX-1@gated-at.bofh.it> |
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.
[toc] | [next] | [standalone]
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2016-07-15 10:40 +0200 |
| Message-ID | <rV6P8-4CX-39@gated-at.bofh.it> |
| In reply to | #1444052 |
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
[toc] | [prev] | [next] | [standalone]
| From | Bjorn Helgaas <helgaas@kernel.org> |
|---|---|
| Date | 2016-07-15 23:50 +0200 |
| Message-ID | <rVj9E-3EM-3@gated-at.bofh.it> |
| In reply to | #1444052 |
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
[toc] | [prev] | [next] | [standalone]
| From | Bharat Kumar Gogada <bharat.kumar.gogada@xilinx.com> |
|---|---|
| Date | 2016-07-16 05:30 +0200 |
| Message-ID | <rVosF-71Z-5@gated-at.bofh.it> |
| In reply to | #1444611 |
> 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.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web