[syslinux] Limiting memory used by syslinux
jochen.desmet at emc.com
jochen.desmet at emc.com
Mon Jun 4 08:42:24 PDT 2012
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.
J.
-----Original Message-----
From: H. Peter Anvin [mailto:hpa at zytor.com]
Sent: Saturday, June 02, 2012 13:06
To: For discussion of Syslinux and tftp-hpa
Cc: Gene Cumm; De Smet, Jochen
Subject: Re: [syslinux] Limiting memory used by syslinux
On 06/02/2012 09:28 AM, Gene Cumm wrote:
> On Jun 2, 2012 11:12 AM, "H. Peter Anvin" <hpa at zytor.com> wrote:
>>
>> On 06/01/2012 12:07 PM, jochen.desmet at emc.com wrote:
>
>>> The problem we're having is that syslinux is overwriting some of that
>>> memory (specifically, at first glance it looks like the com32 stack). Is
>>> there a way to tell syslinux to not use memory above a certain address ?
>
>> There isn't in the stock syslinux, but it wouldn't be hard to do; there
>> is actually a hard-coded limit of 0xfff00000 already (in two places, you
>> probably need to grep for it.) The problem with making this
>> configurable is that it would have to happen very early on, before a lot
>> of the configuration information is available.
>
> Wouldn't this be best done in the ADV or should it be configurable in the
> config file?
>
Those are problematic, since they both are too late in the memory setup.
The best would of course to mark the persistent memory as unavailable in
the e820 setup.
-hpa
More information about the Syslinux
mailing list