>>i have 2 SDIMM modules, each of which 32 MB. now i want linux to
>>use only *one* module. then i want to allocate the *other* module
>>from within my application and mess around with it.
>>how could that be done? using mmap? bigphysarea?
>Can't. Linux will take what it gets, possibly even grabbing part of
>the second. Not being a kernel hacker, I'm not 100%, but...
For malloc etc yes. But if changing the kernel is ok, it's an easy fix to
pre-allocate a large defined physical area (like the top 32 MB) and then
write a syscall or two to let a user level program access it (or possibly
map it into its own memory area). Possibly you can do this using the mmap
method in /dev/kmem already, then you're home free, otherwise you might have
to hack a bit in that.
Quote:>>if i use mem=32MB at boottime, is linux only using one module or are the
>>32 MB spread over both (which doesn't make a lot of sense, does it?).
>It's using the lower 32MB. Of course, the other one may not be
>accessible at all...
As others have pointed out, this might not be true at all. If the
motherboard chipset finds it has two DIMMs to play with, it might decide to
do funky tricks with the adressing like interleaving etc. See the detailed
specs of the motherboard chipset to find out. However my guess is that they
don't - for the simple reason that the motherboard probably is as fast with
one DIMM as with two, and hence there would be no point in doing funky
tricks if two DIMMs are mounted.. but better check it than be sorry.
/Bjorn