This is quite simple to do with a simple piece of C code in the startup file.
You are going to want to do this in the ResetISR code, before anything else. You will want code something like this:
extern unsigned int __base_RAM;
extern unsigned int __top_RAM;
//*****************************************************************************
// Reset entry point for your code.
// Sets up a simple runtime environment and initializes the C/C++
// library.
//*****************************************************************************
__attribute__ ((section(".after_vectors")))
void
ResetISR(void) {
unsigned int *baseRAM = &__base_RAM ;
while (baseRAM < &__top_RAM){
*baseRAM++ = 0 ;
}
...
I haven't tested this, but I'm sure you get the idea. Do not make any C library calls as it will not have been set up. Also, be careful with the stack. You can do something similar for each RAM block.