* mounting fs from memory
@ 2004-03-22 3:18 Andrew Frezell
2004-03-22 18:46 ` Ralf Baechle
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Frezell @ 2004-03-22 3:18 UTC (permalink / raw)
To: linux-mips
Hello All,
I have a bootloader that that is reading segments out of flash and into
memory. The segments are 3 compressed ext2 filesystems and the linux
kernel. After a signature check of each of the sections in memory the
bootloader jumps to the kernel.
I would like to mount one filesystem section in RAM as the root
filesystem. I think it's easy enough to specify initrd as the offset
and size of the section in RAM. But I would also like to mount the
remaining two filesystems in RAM when linux starts up. This is where
I'm having some trouble. I have two questions:
1. Is there some way to protect the memory regions in RAM from linux
just trashing it? I saw a function add_memory_region in
arch/mips/kernel/setup.c that seems to do something, does anyone know
what exactly this does?
2. How do you mount an area of memory that you know has a filesystem
already there under linux? Is there some mount command where you can
pass the address and size, and mount does the right thing?
Thank you in advance,
Drew Frezell
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: mounting fs from memory
2004-03-22 3:18 mounting fs from memory Andrew Frezell
@ 2004-03-22 18:46 ` Ralf Baechle
0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2004-03-22 18:46 UTC (permalink / raw)
To: Andrew Frezell; +Cc: linux-mips
On Sun, Mar 21, 2004 at 10:18:37PM -0500, Andrew Frezell wrote:
> 1. Is there some way to protect the memory regions in RAM from linux
> just trashing it? I saw a function add_memory_region in
> arch/mips/kernel/setup.c that seems to do something, does anyone know
> what exactly this does?
The kernel won't touch any memory below the kernel itself. I consider that
a bug so will change that for now that's a save region to place something.
add_memory_region takes a third argument which can be BOOT_MEM_RAM,
BOOT_MEM_ROM_DATA or BOOT_MEM_RESERVED. You should pass BOOT_MEM_RESERVED
for to tell the kernel that a certain region should not be considered
usable memory. For completeness sake BOOT_MEM_RAM is free memory and
BOOT_MEM_ROM_DATA will be free at the end of kernel initialization so is
usually used to describe free memory regions which hold firmware data that
becomes useless after initialization.
Ralf
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-03-22 18:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-22 3:18 mounting fs from memory Andrew Frezell
2004-03-22 18:46 ` Ralf Baechle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.