Re: [PATCH 2.3.99pre6]ix86 kernel 'mem=' parameter breaks memory setup

From: HIBINO Kei (ex8k-hbn@asahi-net.or.jp)
Date: Thu May 04 2000 - 11:46:35 EST


This bug is not fixed in 2.3.99pre7-4.

At Thu, 04 May 2000 01:37:39 +0900,
hibi wrote:
>
> Hello,
> I found kernel is stopped by kernel command-line parameter
> 'mem=' at boot time.
>
> A parameter 'mem=' generated by kernel code is conflicted
> with one specified by a user.
>
> For example, when a generated parameter is
>
> mem=65535K
>

This 'generated parameter' is the 'mem=<size>' parameter
auto-generated by kernel code.
(Does kernel auto-detect memory size?)

> and an user specified parameter is
>
> mem=256M root=/dev/hda1
>
> , content of 'saved_command_line[]' in
> arch/i386/kernel/setup.c is
>
> mem=65535K mem=256M root=/dev/hda1
>
> .
>
> This command line parameter makes overlapped memory
> region.
>
> This command line parameter makes two memory regions and
> these regions are conflicted each other.
> (Please read parse_mem_cmdline() in arch/i386/kernel/setup.c)
>
>
> I fixed last 'mem=<size>' parameter makes sense.
>

A kernel without this fix always fails to boot with the
'mem=<size>' parameter specified by users.

> --- linux-2.3.99pre6/arch/i386/kernel/setup_org.c Thu May 4 00:40:48 2000
> +++ linux-2.3.99pre6/arch/i386/kernel/setup.c Thu May 4 00:43:04 2000
> @@ -516,16 +516,17 @@
> add_memory_region(0, LOWMEMSIZE(), E820_RAM);
> }
> mem_size = memparse(from+4, &from);
> if (*from == '@')
> start_at = memparse(from+1, &from);
> else {
> start_at = HIGH_MEMORY;
> mem_size -= HIGH_MEMORY;
> + usermem = 0;
> }
> add_memory_region(start_at, mem_size, E820_RAM);
> }
> }
> c = *(from++);
> if (!c)
> break;
> if (COMMAND_LINE_SIZE <= ++len)
>

--
// HIBINO Kei
// hibi@utmc.or.jp

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:15 EST