Subject: Re: memory disk, evbarm - lubbock
To: Stewart Heitmann <S.Heitmann@lake.com>
From: Richard Earnshaw <firstname.lastname@example.org>
Date: 04/14/2003 23:59:47
> I am trying to create a memory disk within the kernel
> for the evbarm port to the LUBBOCK (Intel XScale) eval board.
> Ultimately I want to put the root filesystem on the memory disk,
> but havent got that far yet because I cant make the memory
> disk large enough.
> I can compile a kernel with up to 4096K space set aside
> for the memory disk, but when I try to make it larger I
> get a kernel panic.
I think static data is part of the kernel image, so the amount of space
reserved for it is governed by the definition of KERNEL_PT_KERNEL_NUM in
evbarm/<board>/<board>_machdep.c. This is the number of L2 tables to
allocate for mapping the kernel image (each page can manage 4MB of
memory). The default seems to be about 2 for most boards. You could try
increasing that number, you probably need to make it one or two more than
is needed for your ram disk.
> Oddly enough, when I make it much much larger (16384K or more)
> the kernel boots ok, but /sbin/init seg faults.
That's probably just a coincidence.
> Is there a limit on the size of a memory disk?
> I'd like to make one about 30MB, is that a silly thing to try???
Well, you need kernel space VM for this. There's a limit on the amount of
virtual address space available for that, but how much you have will
depend on where your kernel is mapped and what other addresses have to be
crammed into the available space. All devices are mapped in there.