lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 15 Jul 2016 16:47:57 -0500
From:	Bjorn Helgaas <helgaas@...nel.org>
To:	Bharat Kumar Gogada <bharat.kumar.gogada@...inx.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	"Liviu.Dudau@....com" <Liviu.Dudau@....com>,
	nofooter <nofooter@...inx.com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Arnd Bergmann <arnd@...db.de>
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.

Bjorn

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ