[syslinux] Fix for the mem= kernel option

Andrea Mazzoleni amadvance at users.sourceforge.net
Mon Dec 29 08:21:51 PST 2003


This patch fixes ISOLINUX/SYSLINUX when using the kernel mem= option
with a value greater than the effective memory on the system.
At present, in this condition the kernel doesn't boot correctly.

The default Linux behaviour (verified on 2.4.22) is to ignore this option
if the BIOS reports less memory than the value manually specified.
This patch force the same behaviour for ISOLINUX/SYSLINUX.

The patch is for the version 2.06, but it should work also for the last
releases.

If someone is interested, I'm using this patch in a bootable Linux CD
(advancemame.sourceforge.net) which uses the Linux Frame Buffer drivers.
These drivers have problems mapping the video memory in the kernel if
the system has 1 GB or more of memory. For these systems limiting the
memory used is an easy and standard solution which works always.
Obviously the CD must work also on systems with less memory than the
limit specified. So, the need for this patch.

-- 
Andrea Mazzoleni
935A 2D3C 5C70 BCD6 CB0C  ED89 7C19 4321 6340 3F6D
-------------- next part --------------
--- runkernel.inc.ori	2003-08-22 05:39:37.000000000 +0200
+++ runkernel.inc	2003-10-05 17:18:16.000000000 +0200
@@ -198,6 +198,9 @@
 %if HIGHMEM_SLOP != 0
 		sub ebx,HIGHMEM_SLOP
 %endif
+		cmp [cs:HighMemSize],ebx	; Set the memory only if less than the BIOS detected
+		jb skip_this_opt
+
 		mov [cs:HighMemSize],ebx
 		jmp short skip_this_opt
 cmdline_end:


More information about the Syslinux mailing list