> I have a device that sits on the memory bus. It looks like RAM
> until a (module) device driver gets at it. At that point I want it
> to be reserved memory (private to driver). Now I can do this in
> init if I know the location of the device in memory and its size.
> The problem is that to detect the device(s) and their size I use the> i2c and smbus modules. Ergo, to reserve the physical memory I need
> a kernel which is pretty well fully booted (ie the heap etc is
> already built) so I can load those modules and find
> which means that grabbing and reserving bits of physical memory is
> unsafe (because the heap etc is already built). However, if I had
> access to the filesystem at init time, I could go read a file that
> told me where the device(s) are and how big they are, do the
> reservations, and then have the module double check the reservations
> against the reality of what's installed.
> Problem is: I don't (think I) have filesystem access at init time,
> and can't safely reserve specific physical memory after init which
> seems to leave my only option being to pass in the reservation specs
> from the bootloader, which is what rather I'm trying to avoid.
> Or am I missing something?
Possibly... would it be pratical to have part of the module kernel
resident, and the pull its memory location/size off the kernel command
line? Something like memdevice0_mem_start=0xdeadbeef
memdevice0_mem_size=0xf00f? This would avoid crazy filesystem kludges,
but may not be practical for usability reasons...
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Thu Sep 07 2000 - 21:00:24 EST