PCI: device not available (can't reserve [mem 0x00000000-0x0003ffff])
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
PCI: device not available (can't reserve [mem 0x00000000-0x0003ffff])
Hi,
I am facing a strange problem with a PCI express device. I have written a simple PCI driver(pci_skel sample driver for LDD book) just to detect a PCI device and read its vender and device id from its configuration space. When I connect the device on a standard i386 based PC, it works fine, as expected. But when I run the same driver on the MPC837xERDB board(powerpc arch based processor from freescale), it gives me error. Below is the O/P on both the architectures. Could anyone suggest what can be the cause of this problem? I am new to linux device driver development.
i386 output.
Quote:
[ 921.097050] PCI driver: Init function
[ 921.097415] PCI driver: Probe function
[ 921.097442] pci_skel 0000:04:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[ 921.097453] PCI driver Vendor ID = 1204
[ 921.097462] PCI driver Device ID = e250
[ 921.097471] PCI driver Revision = 0
Powerpc output
Quote:
PCI driver: Init function
PCI driver: Probe function
pci_skel 0001:02:00.0: device not available (can't reserve [mem 0x00000000-0x0003ffff])
Unable to Enable PCI device:-22
pci_skel: probe of 0001:02:00.0 failed with error -22
You are new to linux device driver development but you are already making a PCI driver, one step ahead and you'll be making a usb host/device driver.
Did you build on same linux kernel source for both arch? What is the result of lspci for both arch?
You are new to linux device driver development but you are already making a PCI driver, one step ahead and you'll be making a usb host/device driver.
i.e. what you call corporate world ... you do things which you have never done before even if you know nothing about them.
Quote:
Originally Posted by archieval
Did you build on same linux kernel source for both arch? What is the result of lspci for both arch?
No, the i386 machine I am using, is running on linux kernel version 2.6.31 and the one on the powerpc board is linux kernel version 2.6.35. Below is the O/P of lspci command on both the arch. My device is the one named "Non-VGA unclassified device: Lattice Semiconductor Corporation Device e250".
One more thing, if I see the contents of /proc/iomem file, I can see the resource range allocated to my device. If resource range is already allocated then why it is saying "device not available (can't reserve [mem 0x00000000-0x0003ffff])" Can you explain the reason for this?
This is printed when same resource that the BIOS says should be reserved has already been reserved by Linux (which already knows that this address should not be used) or by some other BIOS mechanism (there are multiple PnP interfaces).
You snipped the actual address, but this is usually harmless.
yes I tried .... I upgraded the kernel on i386 machine to linux 2.6.35 and it still works giving the same O/P as in case of linux 2.6.31
Quote:
Originally Posted by archieval
This is printed when same resource that the BIOS says should be reserved has already been reserved by Linux (which already knows that this address should not be used) or by some other BIOS mechanism (there are multiple PnP interfaces).
You snipped the actual address, but this is usually harmless.
Can you please elaborate a little bit keeping in mind that it works for i386 arch in my case?
I think it has something to do with the mapping of physical address to kernel virtual address. You can check the probe function of your pci driver and verify the virtual address usually returned by ioremap. Probably the virtual address space is not enough to map additional pci device?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.