reserving memory using OF rsvmap feature?

Jenkins, Clive Clive.Jenkins at xerox.com
Wed Jun 13 01:48:15 EST 2012


> 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).


Clive


More information about the Linuxppc-dev mailing list