Re: memory limits

Kurt Garloff (garloff@kg1.ping.de)
Fri, 24 Apr 1998 23:47:25 +0200


On Fri, Apr 24, 1998 at 09:56:22AM -0700, Larry M. Augustin wrote:
>
> In the 2.0.* series you are limited to slightly under 1GB on x86. In
> lilo.conf use:
>
> append = "mem=1012M"
>
> and you should be fine.

Here are some lines from Linux-2.1.98: include/asm-i386/page.h:
/*
* This handles the memory map.. We could make this a config
* option, but too many people screw it up, and too few need
* it.
*
* A __PAGE_OFFSET of 0xC0000000 means that the kernel has
* a virtual address space of one gigabyte, which limits the
* amount of physical memory you can use to about 950MB. If
* you want to use more physical memory, change this define.
*
* For example, if you have 2GB worth of physical memory, you
* could change this define to 0x70000000, which gives the
* kernel slightly more than 2GB of virtual memory (enough to
* map all your physical memory + a bit extra for various
* io-memory mappings)
*
* IF YOU CHANGE THIS, PLEASE ALSO CHANGE
*
* arch/i386/vmlinux.lds
*
* which has the same constant encoded..
*/
#define __PAGE_OFFSET (0x80000000)

and here comes arch/i386/vmlinux.lds:

/* ld script to make i386 Linux kernel
* Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>
*/
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
OUTPUT_ARCH(i386)
ENTRY(_start)
SECTIONS
{
. = 0x80000000 + 0x100000;
_text = .; /* Text and read-only data */
.text : {

As you can see, I changed the values to 0x80000000 thus supporting 2000 MB
of RAM. You could also change it to 0x70000000 to have your 2GB fully
supported.
If you want to change your 2.0.3x kernel, you have to search for all files
containig C0000000 and change ot to 80000000 and also change the 768 to 512
in arch/i386/mm/init.c. Check it out. (I didn't.)

-- 
Kurt Garloff, Dortmund 
<K.Garloff@ping.de>
PGP key on http://student.physik.uni-dortmund.de/homepages/garloff

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu