[syslinux] Limiting memory used by syslinux
H. Peter Anvin
hpa at zytor.com
Mon Jun 4 09:25:59 PDT 2012
On 06/04/2012 08:42 AM, jochen.desmet at emc.com wrote:
> Chris Dion came up with the following patch which seems
> to do the trick for now:
>
> --- syslinux-3.82.orig//com32/lib/malloc.c 2009-06-09 13:19:25.000000000 -0400
> +++ syslinux-3.82/com32/lib/malloc.c 2012-06-03 10:42:48.000000000 -0400
> @@ -34,7 +34,7 @@
> return sp;
> }
>
> -#define E820_MEM_MAX 0xfff00000 /* 4 GB - 1 MB */
> +#define E820_MEM_MAX 0x40000000 /* 1GB */
>
> static int consider_memory_area(void *dummy, addr_t start,
> addr_t len, bool valid)
> --- syslinux-3.82.orig//core/highmem.inc 2009-06-09 13:19:25.000000000 -0400
> +++ syslinux-3.82/core/highmem.inc 2012-06-03 11:14:04.000000000 -0400
> @@ -38,7 +38,7 @@
> ; report main memory as multiple contiguous ranges...
> ;
> get_e820:
> - mov dword [E820Max],-(1 << 20) ; Max amount of high memory
> + mov dword [E820Max],(1 << 30) ; Max amount of high memory
> mov dword [E820Mem],(1 << 20) ; End of detected high memory
> .start_over:
> mov di,E820Buf
>
>
> but he's looking into making it configurable.
>
Yes, that is the two locations I mentioned. The configuration is very
difficult since the memory allocator is used before the config file is
read, and in upcoming Syslinux versions will be used even earlier.
-hpa
--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.
More information about the Syslinux
mailing list