lkml.org 
[lkml]   [2004]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PCI memory allocation bug with CONFIG_HIGHMEM


On Mon, 5 Jan 2004, David Hinds wrote:
>
> The original problem was actually that grub was passing a bogus mem=
> parameter to the kernel that was 4K too small, I guess because it was
> intending to indicate the amount of "available" memory (the top 4K is
> reserved for ACPI). If highmem had not been enabled, the above code
> would have corrected the problem; but with highmem, the computed
> low_mem_size was incorrect. I would say that grub is just broken and
> is misusing the mem= parameter, but this has been a problem for years
> and they don't seem interested in fixing it.

Hmm.. I suspect that it might be ok to check "max_pfn" for being less than
4GB, and use that if so. Add something like

if (max_pfn < 0x100000)
if (pci_mem_start < (max_pfn << PAGE_SHIFT))
pci_mem_start = max_pfn << PAGE_SHIFT;

to that sequence too.. I dunno. Ugly as hell. The basic issue is that if
the kernel doesn't know the RAM layout, there's no way it will get things
right all the time, so e820 or another other "good" memory layout should
really always be used.

"mem=xxx" really doesn't work too well on modern machines. The issue is
just too complex, with RAM that is reserved etc..

Linus
-
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: 2009-11-18 23:46    [W:0.107 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site