Page 1 of 1

Linux kernel only sees 512MB of RAM?

Posted: Wed Aug 10, 2022 1:34 pm
by Malor
Everything's working fine, so this is more curiosity than anything: the DE-10 specs say it has 1GB of DDR3 RAM, but Linux on my Mister is reporting only 512M. The kernel is getting an argument of "memmap=513M$511M", so this is probably deliberate, but I thought I'd check to make sure my DE-10 board wasn't defective in some way. Is the extra RAM being left unused so that the FPGA can use it without conflict?

Thanks!

edit: I did some more searching, and figured I'd go ahead and answer my own question if anyone else is interested. From the kernel docs:
memmap=nn[KMG]$ss[KMG]
[KNL,ACPI] Mark specific memory as reserved.
Region of memory to be reserved is from ss to ss+nn.
Example: Exclude memory from 0x18690000-0x1869ffff
memmap=64K$0x18690000
or
memmap=0x10000$0x18690000
Some bootloaders may need an escape character before '$',
like Grub2, otherwise '$' and the following number
will be eaten.
So the memmap=513M$511M means it's reserving 513 megabytes starting at 511 megabytes. I assume that means the memory is just set aside and not touched, so that the FPGA cores can use it freely.

Re: Linux kernel only sees 512MB of RAM?

Posted: Thu Aug 11, 2022 12:27 pm
by foft
It’s reserved for fpga but you can still mmap it from the Linux side. Though the cpu cache is disabled by default, so it’ll be slow without enabling it. eg https://github.com/scrameta/MiSTer_Hybrid_Kernel_Module