Linux kernel only sees 512MB of RAM?

For topics which do not fit in other specific forums.
Malor
Top Contributor
Posts: 860
Joined: Wed Feb 09, 2022 11:50 pm
Has thanked: 64 times
Been thanked: 194 times

Linux kernel only sees 512MB of RAM?

Unread post 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.
foft
Posts: 344
Joined: Thu Dec 03, 2020 11:05 am
Has thanked: 29 times
Been thanked: 125 times

Re: Linux kernel only sees 512MB of RAM?

Unread post 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
Post Reply