reserving memory using OF rsvmap feature?

3 messages, 2 authors, 2012-06-12 · open the first message on its own page

reserving memory using OF rsvmap feature?

From: Joakim Tjernlund <hidden>
Date: 2012-06-11 19:26:05

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

RE: reserving memory using OF rsvmap feature?

From: Jenkins, Clive <hidden>
Date: 2012-06-12 15:58:54

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

RE: reserving memory using OF rsvmap feature?

From: Joakim Tjernlund <hidden>
Date: 2012-06-12 17:20:23

"Jenkins, Clive" [off-list ref] wrote on 2012/06/12 17:48:15:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help