I have been trying to reserve a block of HPS DDR memory for the FPGA to write to.
I am using an Arria 10 dev board running the GSRD.
I’m assuming that this need to be done at uboot so that the Linux Kernel knows not to touch that area of memory and it is marked as reserved.
After reading a few examples I tried the following edit to the environment variables.
_setenv mmcboot “setenv bootargs console=ttyS0,115200 mem=512M memmap=512M$1024M root=/dev/mmcblk0p2 rw rootwait;fpgabr 1;bootz 0x8000 - 0x100”
On checking /proc/iomem in Linux I could see that the System RAM size had been halved (with no mem it defaults to 1024M).
00000000-1fffffff : System RAM
00008000-0067b5ff : Kernel code
006d0000-0074c5b3 : Kernel data
ff800000-ff801fff : /sopc@0/ethernet@0xff800000
ff808000-ff808fff : /sopc@0/flash@0xff808000
ffb00000-ffb3ffff : /sopc@0/usb@0xffb00000
ffc02100-ffc0211f : serial
ffc02300-ffc023ff : /sopc@0/i2c@0xffc02300
ffc02900-ffc029ff : /sopc@0/gpio@0xffc02900
ffc02a00-ffc02aff : /sopc@0/gpio@0xffc02a00
ffc02b00-ffc02bff : /sopc@0/gpio@0xffc02b00
ffd00300-ffd003ff : /sopc@0/timer@0xffd00300
ffda1000-ffda1fff : /sopc@0/dma@0xffda1000
ffda5000-ffda50ff : ffda5000.spi
However as can be seen there is no reserved block at 40000000.
In the examples I followed memmap is supposed to create a reserved block visible in iomem.
Now through trial and error I have found that I can write my data via the fpga2hps bus at physical address 0x60000000.
Writing directly after after the top address of system RAM, or at the top of the DDR crashes Linux.
Therefore I would rather write into a reserved block that Linux knows about to avoid any future issues.
I just cant seem to find any info on how to do this.
Does anyone know of a guide or example for reserving a block of HPS DDR on the Arria 10?