Yocto Upgrade to Scarthgap, RAM total change

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Yocto Upgrade to Scarthgap, RAM total change

1,745件の閲覧回数
Krakert
Contributor I

Hi all,

I'm working on an i.MX8MM-based board (custom hardware with a Phytec IMX8mm SOM) running Linux. After updating the kernel from version 5.15.71 to 6.6.52 (Kirkstone to Scarthgap), I noticed that significantly less working memory (RAM) is available to the system.

Here’s what I’ve gathered so far:

Memory layout before the update:

  • CMA was reserved from: 0x6a000000
  • Size: 320 MiB
  • MemTotal: 971764 kB

After the kernel update:

  • CMA is reserved from: 0x6ac00000
  • Same size (320 MiB)
  • MemTotal: 900136 kB

dmesg also shows different amount of reserved RAM:

Kirkstone (5.15.71):

[ 0.000000] Memory: 640372K/1015808K available (16064K kernel code, 1558K rwdata, 5196K rodata, 3712K init, 533K bss, 47756K reserved, 327680K cma-reserved)

Scarthgap (6.6.52)

[ 0.000000] Memory: 567912K/1015808K available (19136K kernel code, 1632K rwdata, 7208K rodata, 4544K init, 614K bss, 120216K reserved, 327680K cma-reserved)

Due to the fact that the SoM only has 1Gb we need that 70Mb to support loading media and update files. 

How do I approche this to get my 70Mb back, I have checked some configurations in the yocto build but unsure what affect they will have.

 

 

 

ラベル(1)
0 件の賞賛
返信
3 返答(返信)

1,721件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

it seems that you don't use nxp official bsp, you can check what different memory setting in the dts file, which should allocate the memory size and memory start address in the dts file, you can compare with them and change by youself

0 件の賞賛
返信

1,709件の閲覧回数
Krakert
Contributor I

I checked the DTS and DTSI files in the BSP but didn't find any specific memory allocation defined.

our hardware is based on the imx8mm-phyboard-polis-rdk, which includes imx8mm-phycore-som.dtsi, and that in turn includes imx8mm.dtsi. The only reserved-memory section I found is in the imx8mm.dtsi, and it hasn't changed between the 5.15.71 kernel version and the Kirkstone release.

タグ(1)
0 件の賞賛
返信

1,593件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

refer to your print log, I searched that these memory allocate is defined in the init memory stage for kernel usage

https://github.com/nxp-imx/linux-imx/blob/lf-6.12.y/mm/mm_init.c#L2582

compare these two bsp version, they are have the same total memory (1015808K ), but Scarthgap needs more memory for code, kernel code and some static and init code, and you need get more memory than 567912K, right? this memory size is 1015808K - reserved memory, in the dts file, you can allocate reserved memory, you can set lower reserved memory (if you don't need this size)to get more free memory you need, it seems Scarthgap need more memory for init and kernel code, another option is to optimize the memory, like disable some configure for some feature you don't need, also can disable CONFIG_DEBUG_KERNEL to save some memory

0 件の賞賛
返信