SStar memory layout
作者:互联网
SStar平台上特有的memory layout方式
DDR total memory = linux memory(cat /proc/meminfo的MemTotal) + mma(mma_heap_name0 + MMU_MMA) + kernel reserved
LX_MEM里的MMP HEAP,类似linux的cma,这部分内存是给MI SYS通过软件的方式动态分配给HW IP使用的内存池, 是给通用的HW IP使用, MMAP是专用的HW IP使用,比如摄像头或显示屏使用
分配内存大小,通过修改dts文件
/ { model = "INFINITY2M SSC011A-S01A-S"; compatible = "sstar,infinity2m"; /* memory setting will be replaced with LX_MEM*/ memory { reg = <0x20000000 0x03E00000>; }; /* this cmdline will be replaced with uboot bootargs*/ chosen { bootargs = "console=ttyS0,115200n8r androidboot.console=ttyS0 root=/dev/mtdblock2 init=/linuxrc cma=4m"; }; /*!!IMPORTANT!! The reserved memory must be 1MB aligned*/ reserved-memory { #address-cells = <1>; #size-cells = <1>; ranges; /*cma0 { compatible = "shared-dma-pool"; size = <0x400000>; reusable; alignment = <0x1000>; linux,cma-default; };*/ }; };
参考链接:
https://wx.comake.online/doc/doc/IKAYAKI_ZH/customer/development/reference/memory_layout.html#2-mmap
https://wx.comake.online/doc/syg27dk2rkls-SSD20X/customer/development/software/Px/zh/sys/mma.html
标签:layout,SStar,memory,HW,cma,linux,mma 来源: https://www.cnblogs.com/hzijone/p/16246420.html