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:
Andrea Mazzoleni wrote:> 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.No, sorry, that is not true. That *only* applies if E820 memory detection is available. If E820 memory detection is not available, mem= is used verbatim. This is, in fact, the only way you can get access to all memory on some machines. The reason E820 overlays mem= is because E820 contains memory map information for ACPI. The memory map can also be fed separately using the memmap= command.> 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.It doesn't always work. You've broken any machine without E820. The right solution is to turn on "4G" highmem support in the kernel config. -hpa