Mismatch in RAM memory info on Hikey960

Hi,

We have two Hikey960 boards, one we have ordered some 4 months back(OLD) and other one is recently(NEW).
On new board we are seeing mismatch in memory info.
During boot up it shows “8704 MB”, but in ‘/proc/meminfo’ its showing “4037068 kB”.

[ 0.000000] Memory: 3837020K/4176636K available (13692K kernel code, 1354K rwdata, 4012K rodata, 1152K init, 1029K bs s, 208544K reserved, 131072K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] modules : 0xffffff8000000000 - 0xffffff8008000000 ( 128 MB)
[ 0.000000] vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000 ( 250 GB)
[ 0.000000] .text : 0xffffff8008080000 - 0xffffff8008de0000 ( 13696 KB)
[ 0.000000] .rodata : 0xffffff8008de0000 - 0xffffff80091d0000 ( 4032 KB)
[ 0.000000] .init : 0xffffff80091d0000 - 0xffffff80092f0000 ( 1152 KB)
[ 0.000000] .data : 0xffffff80092f0000 - 0xffffff8009442a00 ( 1355 KB)
[ 0.000000] .bss : 0xffffff8009442a00 - 0xffffff8009543fe8 ( 1030 KB)
[ 0.000000] fixed : 0xffffffbefe7fd000 - 0xffffffbefec00000 ( 4108 KB)
[ 0.000000] PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000 ( 16 MB)
[ 0.000000] vmemmap : 0xffffffbf00000000 - 0xffffffc000000000 ( 4 GB maximum)
[ 0.000000] 0xffffffbf00000000 - 0xffffffbf08800000 ( 136 MB actual)
[ 0.000000] memory : 0xffffffc000000000 - 0xffffffc220000000 ( 8704 MB)

cat /proc/meminfo
MemTotal: 4037068 kB
MemFree: 2705532 kB
MemAvailable: 3349140 kB

Same images are used on old board also, below is the logs :

[ 0.000000] Memory: 2821228K/3128060K available (13692K kernel code, 1354K rwdata, 4008K rodata, 1152K init, 1029K bss, 175760K reserved, 131072K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] modules : 0xffffff8000000000 - 0xffffff8008000000 ( 128 MB)
[ 0.000000] vmalloc : 0xffffff8008000000 - 0xffffffbebfff0000 ( 250 GB)
[ 0.000000] .text : 0xffffff8008080000 - 0xffffff8008de0000 ( 13696 KB)
[ 0.000000] .rodata : 0xffffff8008de0000 - 0xffffff80091d0000 ( 4032 KB)
[ 0.000000] .init : 0xffffff80091d0000 - 0xffffff80092f0000 ( 1152 KB)
[ 0.000000] .data : 0xffffff80092f0000 - 0xffffff8009442a00 ( 1355 KB)
[ 0.000000] .bss : 0xffffff8009442a00 - 0xffffff8009544068 ( 1030 KB)
[ 0.000000] fixed : 0xffffffbefe7fd000 - 0xffffffbefec00000 ( 4108 KB)
[ 0.000000] PCI I/O : 0xffffffbefee00000 - 0xffffffbeffe00000 ( 16 MB)
[ 0.000000] vmemmap : 0xffffffbf00000000 - 0xffffffc000000000 ( 4 GB maximum)
[ 0.000000] 0xffffffbf00000000 - 0xffffffbf03000000 ( 48 MB actual)
[ 0.000000] memory : 0xffffffc000000000 - 0xffffffc0c0000000 ( 3072 MB)

cat /proc/meminfo
MemTotal: 3020780 kB
MemFree: 1974320 kB
MemAvailable: 2480876 kB

We are facing some stability issues on new boards while using pcie devices connected to Hikey960, so we are suspecting this might be the issue.
Is there any change in RAM memory size on new Hikey960 boards or some issue in kernel code? please suggest.

Thanks

/proc/meminfo gives you the physical memory available, which is 4GB with the new hikey960 version.
During boot you get the Virtual kernel memory layout, which is only about virtual memory. I don’t think there is any issue here.

Which kind of stability issues, do you have the same image/build flashed on both ?

Hi Loic,

Do you mean there is increase in RAM memory on new Hikey960?
But it is not specified on the specification sheet that comes with Hikey960 package.
And not even at : HiKey960 - 96Boards

do you have the same image/build flashed on both ?

Yes we have flashed same image on both boards.

Which kind of stability issues.

Some dma related kernel panic issue is seen, will share the complete logs.

Thanks

Crap. I just got two of these things 2 weeks ago. Now they’re all out of stock everywhere and an apparent ram upgrade.

Bought them from these guys via amazon;
https://www.loverpi.com/collections/featured-products/products/hikey-960?variant=41055226829

Paid the “upgraded ram” price.

I’ll have to check the boards. Hopefully they’re the 4 GB version, otherwise I feel ripped off.

Could you use below two commands to check the board configurations?

cat /sys/kernel/debug/memblock/memory
cat /sys/kernel/debug/memblock/reserved

If you are using the UEFI/ARM-TF, I think you should get the exactly same memory info for two different boards, though one board has 4GB RAM, this is cause by the UEFI code: https://github.com/96boards-hikey/OpenPlatformPkg/blob/testing/hikey960_v1.3.4/Platforms/Hisilicon/HiKey960/HiKey960.dsc#L293

Thanks,
Leo Yan