LS1088A DDR Size

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LS1088A DDR Size

Jump to solution
1,270 Views
cuongkelvin
Contributor I

Hello,

we are having a DDR4 size problem on LS1088a platform.  We have 4GB DDR4 on the board. When u-boot starts it is confirmed that board has 4GB DDR4. But when we checked on kernel with free commands, it shows that RAM is 2GB.  I was delete the "mcmemsize" variable from my U-Boot configuration. Do you have any idea why are we having mismatch DDR size in u-boot and kernel ?

Attached photos you can see the differences.

Screenshot from 2024-10-09 09-21-15.pngScreenshot from 2024-10-09 09-18-52.png

0 Kudos
Reply
1 Solution
1,248 Views
yipingwang
NXP TechSupport
NXP TechSupport

The lost DDR can be divided into 2 parts.

1) DDR used by NXP specific software, firmware components

2) DDR used by various segments of kernel.

 

For the first part,

1) u-boot uses memory till it is used, but once kernel boots, u-boot is swapped out of memory.

2) 66 MB is used by TF-A

3) MC can use anywhere between 512M to 2G (it depends on u-boot comandline argument 'mcmemsize'). The parameter mcmemsize defines amount of system DDR to be used by the Management Complex. If this variable is not defined, the compile-time value 0x70000000 or 1.75GB will be the default. Normally, users do not need to set this variable because the default is acceptable.

 

TF-A+MC is about 1.8G

 

kernel reserved=(18620K kernel code, 2476K rwdata, 8844K rodata, 5888K init, 993K bss, 406712K reserved, 327680K cma-reserved) = 771213K=0.7G

 

MemTotal in /proc/meminfo is 14232028 kB, the lost memory is about 16-13.6=2.4G(TF-A+MC+kernel reserved)

 

root@TinyLinux:~# cat /proc/meminfo

MemTotal:       14232028 kB

MemFree:        13596760 kB

MemAvailable:   13478276 kB

View solution in original post

0 Kudos
Reply
3 Replies
1,221 Views
cuongkelvin
Contributor I

Thank for reply.
If I delete "mcmemsize" will network performance decrease?

0 Kudos
Reply
1,216 Views
yipingwang
NXP TechSupport
NXP TechSupport

Yes, it will.

1,249 Views
yipingwang
NXP TechSupport
NXP TechSupport

The lost DDR can be divided into 2 parts.

1) DDR used by NXP specific software, firmware components

2) DDR used by various segments of kernel.

 

For the first part,

1) u-boot uses memory till it is used, but once kernel boots, u-boot is swapped out of memory.

2) 66 MB is used by TF-A

3) MC can use anywhere between 512M to 2G (it depends on u-boot comandline argument 'mcmemsize'). The parameter mcmemsize defines amount of system DDR to be used by the Management Complex. If this variable is not defined, the compile-time value 0x70000000 or 1.75GB will be the default. Normally, users do not need to set this variable because the default is acceptable.

 

TF-A+MC is about 1.8G

 

kernel reserved=(18620K kernel code, 2476K rwdata, 8844K rodata, 5888K init, 993K bss, 406712K reserved, 327680K cma-reserved) = 771213K=0.7G

 

MemTotal in /proc/meminfo is 14232028 kB, the lost memory is about 16-13.6=2.4G(TF-A+MC+kernel reserved)

 

root@TinyLinux:~# cat /proc/meminfo

MemTotal:       14232028 kB

MemFree:        13596760 kB

MemAvailable:   13478276 kB

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-1969396%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ELS1088A%20DDR%20Size%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1969396%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3Ewe%20are%20having%20a%20DDR4%20size%20problem%20on%20LS1088a%20platform.%26nbsp%3B%20We%20have%204GB%20DDR4%20on%20the%20board.%20When%20u-boot%20starts%20it%20is%20confirmed%20that%20board%20has%204GB%20DDR4.%20But%20when%20we%20checked%20on%20kernel%20with%20free%20commands%2C%20it%20shows%20that%20RAM%20is%202GB.%26nbsp%3B%20I%20was%26nbsp%3B%3CSPAN%3Edelete%20the%20%22mcmemsize%22%20variable%20from%20my%20U-Boot%20configuration.%26nbsp%3B%3C%2FSPAN%3EDo%20you%20have%20any%20idea%20why%20are%20we%20having%20mismatch%20DDR%20size%20in%20u-boot%20and%20kernel%20%3F%3C%2FP%3E%3CP%3EAttached%20photos%20you%20can%20see%20the%20differences.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%20from%202024-10-09%2009-21-15.png%22%20style%3D%22width%3A%20408px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screenshot%20from%202024-10-09%2009-21-15.png%22%20style%3D%22width%3A%20408px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F303563iEC4BDF2B8FA0DE7C%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%20from%202024-10-09%2009-21-15.png%22%20alt%3D%22Screenshot%20from%202024-10-09%2009-21-15.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%20from%202024-10-09%2009-18-52.png%22%20style%3D%22width%3A%20504px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Screenshot%20from%202024-10-09%2009-18-52.png%22%20style%3D%22width%3A%20504px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F303564i7E3489CC69731D35%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%20from%202024-10-09%2009-18-52.png%22%20alt%3D%22Screenshot%20from%202024-10-09%2009-18-52.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1971229%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LS1088A%20DDR%20Size%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1971229%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EYes%2C%20it%20will.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1971226%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LS1088A%20DDR%20Size%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1971226%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThank%20for%20reply.%3CBR%20%2F%3EIf%20I%20delete%20%22mcmemsize%22%20will%20network%20performance%20decrease%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1969724%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20LS1088A%20DDR%20Size%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1969724%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EThe%20lost%20DDR%20can%20be%20divided%20into%202%20parts.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E1)%20DDR%20used%20by%20NXP%20specific%20software%2C%20firmware%20components%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E2)%20DDR%20used%20by%20various%20segments%20of%20kernel.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EFor%20the%20first%20part%2C%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E1)%20u-boot%20uses%20memory%20till%20it%20is%20used%2C%20but%20once%20kernel%20boots%2C%20u-boot%20is%20swapped%20out%20of%20memory.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E2)%2066%20MB%20is%20used%20by%20TF-A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E3)%20MC%20can%20use%20anywhere%20between%20512M%20to%202G%20(it%20depends%20on%20u-boot%20comandline%20argument%20'mcmemsize').%20The%20parameter%20mcmemsize%20defines%20amount%20of%20system%20DDR%20to%20be%20used%20by%20the%20Management%20Complex.%20If%20this%20variable%20is%20not%20defined%2C%20the%20compile-time%20value%200x70000000%20or%201.75GB%20will%20be%20the%20default.%20Normally%2C%20users%20do%20not%20need%20to%20set%20this%20variable%20because%20the%20default%20is%20acceptable.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3ETF-A%2BMC%20is%20about%201.8G%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3Ekernel%20reserved%3D(18620K%20kernel%20code%2C%202476K%20rwdata%2C%208844K%20rodata%2C%205888K%20init%2C%20993K%20bss%2C%20406712K%20reserved%2C%20327680K%20cma-reserved)%20%3D%20771213K%3D0.7G%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EMemTotal%20in%20%2Fproc%2Fmeminfo%20is%2014232028%20kB%2C%20the%20lost%20memory%20is%20about%2016-13.6%3D2.4G(TF-A%2BMC%2Bkernel%20reserved)%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3Eroot%40TinyLinux%3A~%23%20cat%20%2Fproc%2Fmeminfo%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EMemTotal%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2014232028%20kB%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EMemFree%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2013596760%20kB%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EMemAvailable%3A%26nbsp%3B%26nbsp%3B%2013478276%20kB%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E