
Hi!
Thanks for you answer! I have found that one, but I need to be able to specify exactly what memory range that shall be protected. I did find the CONFIG_PRAM-parameter but I did not figure out how to tell u-boot exactly what range not to whipe-out. Such as do not destroy 0x1000-0x2000. Also the solution that I would like to find/create is to have the possibility to set a protect area using a system parameter in order to be able to change the protection zone without recompilation. Would that be a good feature?
Thanks, Markus
-----Original Message----- From: wd@denx.de [mailto:wd@denx.de] Sent: den 23 augusti 2007 12:42 To: Markus Malmgren Cc: u-boot-users@lists.sourceforge.net Subject: Re: [U-Boot-Users] Protect an area in RAM
In message DC6F86A94046A64094043D44A3A708F7A148D4@sestoex02.enea.se you wrote:
Many hardware manufactures provide their development platform with u-boot. I was wondering if there is a feature (did not find anything)
in
u-boot to protect a specific area in the RAM from being overwritten
when
u-boot boots a microcontroller? The reason for this is that we store debug information between restarts from our software and using u-boot this is destroyed.
I'm seriously surprised that you did not find anything. Did you actually search for "protected RAM"?
-> grep -ir 'protected ram' * README:- Protected RAM: README: "protected RAM", i. e. RAM which is not overwritten README: ... eventually: pRAM (Protected RAM - unchanged by reset) board/netstal/hcu5/README.txt: * - protected RAM include/configs/CCM.h:#define CONFIG_PRAM 512 /* reserve 512kB "protected RAM"*/ include/configs/CMS700.h:#undef CONFIG_PRAM /* no "protected RAM" */ include/configs/DP405.h:#define CONFIG_PRAM 2 /* reserve 2 kB "protected RAM" */ include/configs/PCI405.h:#define CONFIG_PRAM 2048 /* reserve 2 MB "protected RAM" */ include/configs/PN62.h:#define CONFIG_PRAM 1024 /* reserve 1 MB protected RAM*/ include/configs/VOM405.h:#undef CONFIG_PRAM /* no "protected RAM" */ include/configs/pcu_e.h:#define CONFIG_PRAM 2048 /* reserve 2 MB "protected RAM" */ lib_m68k/board.c: * - protected RAM lib_m68k/board.c: * reserve protected RAM lib_m68k/board.c: debug ("Reserving %ldk for protected RAM at %08lx\n", reg, addr); lib_m68k/board.c: * taking into account the protected RAM at top of memory lib_ppc/board.c: * - protected RAM lib_ppc/board.c: * reserve protected RAM lib_ppc/board.c: debug ("Reserving %ldk for protected RAM at %08lx\n", reg, addr); lib_ppc/board.c: * taking into account the protected RAM at top of memory
If this feature does not exist, one general solution would be to add a system parameter in which areas that are not to be destroyed could be added as a default feature of u-boot. Would this be a feature that others need as well? If so I will start to investigate what could be done.
This feature has been available for a long, long time, as well as a log driver which is intended to pass for example U-Boot POST information to the OS (Linux), or to allow U-Boot to dump Linux' log buffer after a crash.
I guess you should refine your search methods.
Best regards,
Wolfgang Denk