[LinuxBIOS] Disabled device help

Myles Watson myles at pel.cs.byu.edu
Mon Nov 6 18:37:17 CET 2006

Thanks a lot! It worked fine, except it missed the last 4GB of the
allocation. This is an ugly way of getting it back.  I'm not sure what the
elegant way would be. The lower 32-bits need to be filled with ones in order
for the space to be allocated correctly. Otherwise a 4GB allocation would
show up as a one byte allocation.

Now /proc/iomem shows my device at 8000000000-bfffffffff


--- drivers/pci/probe.c	2006-11-06 09:23:03.000000000 -0700
+++ drivers/pci/probe_new.c	2006-11-06 10:17:08.000000000 -0700
@@ -203,7 +203,7 @@
 			res->end = res->start + sz;
 			if (szhi) {
 				/* This BAR needs > 4GB?  Wow. */
-				res->end |= (unsigned long)szhi<<32;
+				res->end |= ((unsigned
 			if (szhi) {

>Please check the patch.


>The Kernel pci_read_bases in drivers/pci/probe.c. has problem when size
>if bigger than 4G.

>It will first check the 32 bit SPACE_ADDRESS, and pci_size will return
>0, So it will skip that resource. And the pre-set values is ignored.

>And later, it will try to allocate the value. It will fail.

>I will produce one patch for you.


>>My large device gets disabled somewhere in LinuxBIOS or the kernel. This
>>is the encouraging line from LinuxBIOS telling me that the registers are
>>indeed set correctly.

>>PCI: 05:01.0 18 <- [8000000000 - bfffffffff] prefmem64

>>Unfortunately, Linux sees something different and fails to allocate this
>>region because it sees it at 00000080-000000bf and that conflicts with
>>other things.

>>Does anyone have a pointer to where I should look for this problem? Has
>>anyone else had problems with devices larger than 4GB?


More information about the coreboot mailing list