Re: [RFC] A simple way to determine if the kernel needs HIGHMEM64G to be able to use all the installed memory

From: Andi Kleen
Date: Sun Mar 08 2009 - 16:21:11 EST


Ozan ÃaÄlayan <ozan@xxxxxxxxxxxxx> writes:
>
> So, the PAE enabled kernel should be installed by distribution installers or
> package management systems if the processor honors the PAE bit. Because PAE
> is an extension mechanism for 32bit processors, AFAIK it has some overhead.
> So enabling it if the user doesn't have a memory size >=4GB would not make
> much sense if a proper noexecute (NX) support is not intended.

The general recommendation is to always use PAE when the machine
is NX capable. Or at least use it by default.

> Fedora installer parses /proc/iomem to see if any address listed is bigger than
> 0x100000000h. I checked it on a machine having 4GB of memory, and it failed.

Newer kernels have the memmap in /sys/firmware/memmap to export the memory
map. If anything is in there >4GB you need PAE.

But there's also the problem that a few systems have MMIO mappings above 4GB.
If you're lucky they are in the memmap too, but sometimes they are not.

For those you also always need PAE. The only way to check for that
would be to load all drivers and then check /proc/iomem or walk
the PCI resources (in /sys/bus/pci). That would be still not 100% fool
proof, but probably as good as you can get.

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