You basically have those two solutions. You can as you say divide the RAM in two zones, one for the software and another one shared with hardware. It makes it simpler for the hardware as you can put a fixed address, but you need to modify the link script, as dsl explained. I think that the new environment (software build tools) can let you specify your own link script, but you will have to modify it by hand. I don't remember the syntax, but you can google the GNU cc documentation for that, I remember I found it easily when I needed it.
Using malloc() or a static variable is easier for the software and requires no special link script, but as you guessed you need to give this address to your hardware, as it can change at each compile or run. For that you can create a register in your IP that the CPU can write to, that will contain the address to use. This is commonly done with DMA IPs for example.