All of lore.kernel.org
 help / color / mirror / Atom feed
* reserving memory using OF rsvmap feature?
@ 2012-06-11 19:16 Joakim Tjernlund
  2012-06-12 15:48 ` Jenkins, Clive
  0 siblings, 1 reply; 3+ messages in thread
From: Joakim Tjernlund @ 2012-06-11 19:16 UTC (permalink / raw)
  To: linuxppc-dev


Is it possible to reserve some memory using OF rsvmap such that Linux
will not touch this area at all? Think of is as warm start stash area
were one could store data which should survive a reboot.

One could then create an uio driver which exports this memory to user space I hope.

 Jocke

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: reserving memory using OF rsvmap feature?
  2012-06-11 19:16 reserving memory using OF rsvmap feature? Joakim Tjernlund
@ 2012-06-12 15:48 ` Jenkins, Clive
  2012-06-12 17:20   ` Joakim Tjernlund
  0 siblings, 1 reply; 3+ messages in thread
From: Jenkins, Clive @ 2012-06-12 15:48 UTC (permalink / raw)
  To: Joakim Tjernlund, linuxppc-dev

> Is it possible to reserve some memory using OF rsvmap such that Linux
> will not touch this area at all? Think of is as warm start stash area
> were one could store data which should survive a reboot.

Yes, I guess it should be possible, but you need to take care where you
place this block so it does not get overwritten during the boot process.
This depends on how your bootloader is set up to place images in memory,
decompress them etc.

I don't know about OF, but in U-Boot use the function fdt_add_mem_rsv()
in file
http://git.denx.de/?p=3Du-boot.git;a=3Dblob;f=3Dlib/libfdt/fdt_rw.c

// Reserve the memory location of the framebuffer + descriptor page.
if (fdt_add_mem_rsv(working_fdt, fbinfo->smem_start,
                    (fbinfo->smem_len + 0x1FFF) & 0xFFFFF000))
	printf("ERROR: could not reserve FB memory in device tree\n");

In my powerpc_e500v2 systems this block is located at 64MiB
(0x04000000).


Clive

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: reserving memory using OF rsvmap feature?
  2012-06-12 15:48 ` Jenkins, Clive
@ 2012-06-12 17:20   ` Joakim Tjernlund
  0 siblings, 0 replies; 3+ messages in thread
From: Joakim Tjernlund @ 2012-06-12 17:20 UTC (permalink / raw)
  To: Jenkins, Clive; +Cc: linuxppc-dev

"Jenkins, Clive" <Clive.Jenkins@xerox.com> wrote on 2012/06/12 17:48:15:
>
> > Is it possible to reserve some memory using OF rsvmap such that Linux
> > will not touch this area at all? Think of is as warm start stash area
> > were one could store data which should survive a reboot.
>
> Yes, I guess it should be possible, but you need to take care where you
> place this block so it does not get overwritten during the boot process.
> This depends on how your bootloader is set up to place images in memory,
> decompress them etc.
>
> I don't know about OF, but in U-Boot use the function fdt_add_mem_rsv()
> in file
> http://git.denx.de/?p=u-boot.git;a=blob;f=lib/libfdt/fdt_rw.c
>
> // Reserve the memory location of the framebuffer + descriptor page.
> if (fdt_add_mem_rsv(working_fdt, fbinfo->smem_start,
>                     (fbinfo->smem_len + 0x1FFF) & 0xFFFFF000))
>    printf("ERROR: could not reserve FB memory in device tree\n");
>
> In my powerpc_e500v2 systems this block is located at 64MiB
> (0x04000000).

Thanks, this was what I was looking at too. I plan to use u-boots PRAM feature
and reserve memory at the end of RAM.

 Jocke

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-06-12 17:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-11 19:16 reserving memory using OF rsvmap feature? Joakim Tjernlund
2012-06-12 15:48 ` Jenkins, Clive
2012-06-12 17:20   ` Joakim Tjernlund

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.