[lkml]   [2004]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: PCI memory allocation bug with CONFIG_HIGHMEM
On Mon, Jan 05, 2004 at 12:07:07PM -0800, David Hinds wrote:
> In arch/i386/kernel/setup.c we have:
> /* Tell the PCI layer not to allocate too close to the RAM area.. */
> low_mem_size = ((max_low_pfn << PAGE_SHIFT) + 0xfffff) & ~0xfffff;
> if (low_mem_size > pci_mem_start)
> pci_mem_start = low_mem_size;
> which is meant to round up pci_mem_start to the nearest 1 MB boundary
> past the top of physical RAM. However this does not consider highmem.
> Should this just be using max_pfn rather than max_low_pfn?
> (I have a report of this failing on a laptop with a highmem kernel,
> causing a PCI memory resource to be allocated on top of a RAM area)

Beware - people sometimes use mem= to tell the kernel how much RAM is
available for its use. Unfortunately, this overrides the E820 map,
and causes the kernel to believe that all memory above the end of RAM
is available for use.

This is not the case, especially on ACPI systems.

I have come to the conclusion that the use of mem= is a _very_ bad idea
unless someone has an extremely good reason to override the E820 map.
And even then, it must be used with extreme care, and also in combination
with the reserve= parameter to ensure that reserved memory areas remain
marked as such. (Reserved regions as in the ACPI data tables.)

Failure to follow this will result in non-functional PCMCIA/Cardbus
because of memory resource collisions between system RAM and PCI
memory space.

Russell King
Linux kernel 2.6 ARM Linux -
maintainer of: 2.6 PCMCIA -
2.6 Serial core
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:59    [W:0.048 / U:3.964 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site