lkml.org 
[lkml]   [1996]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subjectpp2.1.0#4 bugfix for mem= option and init_rd
Date
Hi Linus and other bleeding edge people,

When you try to boot the pre-patch 2.1.0 #4 i386 kernel with
the mem=... option, it reboots.

The tested fix follows.

While looking at the code, I found a suspiscious spot in the
sizing of the init_rd. This patch is untested, please have a look.

Heiko

--- arch/i386/kernel/setup.c.or Fri Sep 27 03:58:57 1996
+++ arch/i386/kernel/setup.c Mon Sep 30 02:29:19 1996
@@ -139,7 +139,6 @@
if (!MOUNT_ROOT_RDONLY)
root_mountflags &= ~MS_RDONLY;
memory_start = (unsigned long) &_end;
- memory_end += PAGE_OFFSET;
init_task.mm->start_code = PAGE_OFFSET;
init_task.mm->end_code = (unsigned long) &_etext;
init_task.mm->end_data = (unsigned long) &_edata;
@@ -180,13 +179,14 @@
}
*to = '\0';
*cmdline_p = command_line;
+ memory_end += PAGE_OFFSET;
*memory_start_p = memory_start;
*memory_end_p = memory_end;

#ifdef CONFIG_BLK_DEV_INITRD
if (LOADER_TYPE) {
initrd_start = INITRD_START + PAGE_OFFSET;
- initrd_end = INITRD_START+INITRD_SIZE;
+ initrd_end = initrd_start+INITRD_SIZE;
if (initrd_end > memory_end) {
printk("initrd extends beyond end of memory "
"(0x%08lx > 0x%08lx)\ndisabling initrd\n",
\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.067 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site