lkml.org 
[lkml]   [2004]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: pci_request_regions() failure
On Thu, 6 May 2004, Alec H. Peterson wrote:

> Greetings again,
>
> It seems that this is actually an alignment problem. The region of memory
> that should be used (in this case ec107000-ec108fff) is not 8k aligned.
> Does anybody have any suggestions about how I can force aligned memory
> blocks?
>
> Thanks!
>
> Alec
>

The BIOS should have aligned everything correctly.
0xec108fff - 0xec107000 = 0x1fff (0x2000 bytes)

0xec107000 / 0x2000 = 0x76083, * 0x2000 = 0xec106000
(where it should have been). Check to see if that region is
clear and if it is, write that address to the PCI
BAR. If it isn't, check the next higher address
(ex106000 + 0x2000), etc.

It would be instructional to find out if the bad
address was as a result of the BIOS or Linux re-writing
the BARs because it didn't like them.

Upon startup, the BIOS, knowing where RAM stops, is supposed
to put an address into each BAR based upon the rule
that if it allocates X-bytes of address-space, it must be
X-bytes aligned. Sometimes, where you have all the address-
space used by RAM (4 Gb), the BIOS may be using some
untested buggy software to allocate address-space. You
see, if you have used up all the address-space for RAM,
some of this address space needs to be "overloaded" with
PCI BARs (subtracting from available RAM). Under these
conditions, the buggy BIOS may attempt to allocate "backwards"
with some buggy code.

If you have 4Gb or RAM, just pull one stick and see if that
"fixes" the address problem. If it does, try to find a BIOS
upgrade for your board and, if none is available at least
report the problem.

In any event, you can write any unused, properly aligned,
address to that BAR (then allocate it and remap it).

Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5557.45 BogoMips).
Note 96.31% of all statistics are fiction.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.057 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site