The `mem=' Argument
This argument has several purposes: The original purpose was to specify the amount of installed memory (or a value less than that if you wanted to limit the amount of memory available to linux).The next (and hardly used) purpose is to specify
mem=nopentium
which tells the Linux kernel to not use the 4MB page table performance feature. If you want to use it for both purposes, use a separate mem=
for each one.The original BIOS call defined in the PC specification that returns the amount of installed memory was only designed to be able to report up to 64MB. (Yes, another lack of foresight, just like the 1024 cylinder disks... sigh.) Linux uses this BIOS call at boot to determine how much memory is installed. A newer specification (e820) allows the BIOS to get this right on most machines nowadays. If you have more than 64MB of RAM installed on an older machine, you can use this boot argument to tell Linux how much memory you have. Here is a quote from Linus on the usage of the
mem=
parameter.``The kernel will accept any `mem=xx' parameter you give it, and if it turns out that you lied to it, it will crash horribly sooner or later. The parameter indicates the highest addressable RAM address, so `mem=0x1000000' means you have 16MB of memory, for example. For a 96MB machine this would be `mem=0x6000000'. If you tell Linux that it has more memory than it actually does have, bad things will happen: maybe not at once, but surely eventually.''
Note that the argument does not have to be in hex, and the suffixes `k' and `M' (case insensitive) can be used to specify kilobytes and Megabytes, respectively. (A `k' will cause a 10 bit shift on your value, and a `M' will cause a 20 bit shift.) A typical example for a 128MB machine would be "
mem=128m
".In some cases, the memory reported via e820 can also be wrong, and so the
mem=exactmap
was added. You use this in conjunction with specifying an exact memory map, such as:mem=exactmap mem=640K@0 mem=1023M@1M
for a 1GB machine with the usual 384k of ISA memory mapped I/O space excluded from use.
No comments:
Post a Comment