海思平台HI35XX系列内存设置

在学了在学了! 2020-08-04 20:24:33 1995

海思平台的内存分为两部分,一部分给系统使用,另外的一部分给多媒体使用。可以通过cat /proc/meminfo查看系统内存和cat /proc/media-mem 查看多媒体内存使用情况。

/proc # cat /proc/meminfo

MemTotal: 255192 kB

MemFree: 103232 kB

Buffers: 25328 kB

Cached: 36888 kB

SwapCached: 0 kB

Active: 74936 kB

Inactive: 56008 kB

Active(anon): 68900 kB

Inactive(anon): 272 kB

Active(file): 6036 kB

Inactive(file): 55736 kB

Unevictable: 0 kB

Mlocked: 0 kB

HighTotal: 0 kB

HighFree: 0 kB

LowTotal: 255192 kB

LowFree: 103232 kB

SwapTotal: 0 kB

SwapFree: 0 kB

Dirty: 4320 kB

Writeback: 0 kB

AnonPages: 68748 kB

Mapped: 7032 kB

Shmem: 444 kB

Slab: 9440 kB

SReclaimable: 5632 kB

SUnreclaim: 3808 kB

KernelStack: 1000 kB

PageTables: 748 kB

NFS_Unstable: 0 kB

Bounce: 0 kB

WritebackTmp: 0 kB

CommitLimit: 127596 kB

Committed_AS: 648944 kB

VmallocTotal: 761856 kB

VmallocUsed: 57556 kB

VmallocChunk: 688216 kB

多媒体内存:

/proc # cat /proc/media-mem

+---ZONE: PHYS(0x90000000, 0x9FFFFFFF), GFP=0, nBYTES=262144KB, NAME="anonymous"

|-MMB: phys(0x90000000, 0x90000FFF), kvirt=0x (null), flags=0x00000000, length=4KB, name="SYS_DCI_coef"

|-MMB: phys(0x90001000, 0x90003FFF), kvirt=0x (null), flags=0x00000000, length=12KB, name="SYS_scale_coef"

|-MMB: phys(0x90004000, 0x90006FFF), kvirt=0x (null), flags=0x00000000, length=12KB, name="SYS_scale_coef"

|-MMB: phys(0x90007000, 0x90086FFF), kvirt=0x (null), flags=0x00000000, length=512KB, name="TDE_MemPool"

|-MMB: phys(0x90087000, 0x900D7FFF), kvirt=0x (null), flags=0x00000000, length=324KB, name="VGS_NodeBuf"

|-MMB: phys(0x900D8000, 0x90128FFF), kvirt=0x (null), flags=0x00000000, length=324KB, name="VGS_VpssNodeBuf"

|-MMB: phys(0x90129000, 0x9012BFFF), kvirt=0x (null), flags=0x00000000, length=12KB, name="RgnModInfo"

|-MMB: phys(0x9012C000, 0x90134FFF), kvirt=0x (null), flags=0x00000000, length=36KB, name="vpss_drv_queue"

|-MMB: phys(0x90135000, 0x9013DFFF), kvirt=0x (null), flags=0x00000000, length=36KB, name="RgnModInfo"

|-MMB: phys(0x9013E000, 0x90146FFF), kvirt=0x (null), flags=0x00000000, length=36KB, name="RgnModInfo"

|-MMB: phys(0x90147000, 0x90169FFF), kvirt=0x (null), flags=0x00000000, length=140KB, name="RgnModInfo"

|-MMB: phys(0x9016A000, 0x9018CFFF), kvirt=0x (null), flags=0x00000000, length=140KB, name="RgnModInfo"

|-MMB: phys(0x9018D000, 0x901AFFFF), kvirt=0x (null), flags=0x00000000, length=140KB, name="RgnModInfo"

|-MMB: phys(0x901B0000, 0x901D2FFF), kvirt=0x (null), flags=0x00000000, length=140KB, name="RgnModInfo"

|-MMB: phys(0x901D3000, 0x901DBFFF), kvirt=0x (null), flags=0x00000000, length=36KB, name="VoCoef"

|-MMB: phys(0x901DC000, 0x901E3FFF), kvirt=0x (null), flags=0x00000000, length=32KB, name="RgnModInfo"

|-MMB: phys(0x901E4000, 0x901EBFFF), kvirt=0x (null), flags=0x00000000, length=32KB, name="RgnModInfo"

|-MMB: phys(0x901EC000, 0x901F3FFF), kvirt=0x (null), flags=0x00000000, length=32KB, name="RgnModInfo"

|-MMB: phys(0x901F4000, 0x909DCFFF), kvirt=0x (null), flags=0x00000000, length=8100KB, name="hifb_layer0"

|-MMB: phys(0x909DD000, 0x90B71FFF), kvirt=0x (null), flags=0x00000000, length=1620KB, name="hifb_layer1"

|-MMB: phys(0x90B72000, 0x90B91FFF), kvirt=0x (null), flags=0x00000000, length=128KB, name="hifb_layer2"

|-MMB: phys(0x90B92000, 0x90B96FFF), kvirt=0x (null), flags=0x00000000, length=20KB, name="RgnModInfo"

|-MMB: phys(0x90B97000, 0x90BCBFFF), kvirt=0x (null), flags=0x00000000, length=212KB, name="IVE_QUEUE"

|-MMB: phys(0x90BCC000, 0x90BCCFFF), kvirt=0x (null), flags=0x00000000, length=4KB, name="IVE_TEMP_NODE"

|-MMB: phys(0x90BCD000, 0x92BD6FFF), kvirt=0x (null), flags=0x00000000, length=32808KB, name="VbPool"

|-MMB: phys(0x92BD7000, 0x94BE0FFF), kvirt=0x (null), flags=0x00000000, length=32808KB, name="VbPool"

|-MMB: phys(0x94BE1000, 0x95A1DFFF), kvirt=0x (null), flags=0x00000000, length=14580KB, name="VbPool"

|-MMB: phys(0x95A1E000, 0x9685AFFF), kvirt=0x (null), flags=0x00000000, length=14580KB, name="VbPool"

|-MMB: phys(0x9685B000, 0x96D34FFF), kvirt=0x (null), flags=0x00000000, length=4968KB, name="VbPool"

|-MMB: phys(0x96D35000, 0x96D35FFF), kvirt=0x (null), flags=0x00000000, length=4KB, name="Grp RgnLuma buf"

|-MMB: phys(0x96D36000, 0x96D36FFF), kvirt=0x (null), flags=0x00000000, length=4KB, name="Chn RgnLuma buf"

|-MMB: phys(0x96D37000, 0x96D39FFF), kvirt=0x (null), flags=0x00000000, length=12KB, name="model buf"

|-MMB: phys(0x96D3A000, 0x96EA9FFF), kvirt=0x (null), flags=0x00000000, length=1472KB, name="Ref&Mad buf"

|-MMB: phys(0x96EAA000, 0x96EAAFFF), kvirt=0x (null), flags=0x00000000, length=4KB, name="Dci buf"

|-MMB: phys(0x96EAB000, 0x9701AFFF), kvirt=0x (null), flags=0x00000000, length=1472KB, name="Ref&Mad buf"

|-MMB: phys(0x9701B000, 0x9701BFFF), kvirt=0x (null), flags=0x00000000, length=4KB, name="Dci buf"

|-MMB: phys(0x9701C000, 0x9701CFFF), kvirt=0x (null), flags=0x00000000, length=4KB, name="Grp RgnLuma buf"

|-MMB: phys(0x9701D000, 0x9701DFFF), kvirt=0x (null), flags=0x00000000, length=4KB, name="Chn RgnLuma buf"

|-MMB: phys(0x9701E000, 0x97020FFF), kvirt=0x (null), flags=0x00000000, length=12KB, name="model buf"

|-MMB: phys(0x97021000, 0x97022FFF), kvirt=0x (null), flags=0x00000000, length=8KB, name="AI(0) DMABuf"

|-MMB: phys(0x97023000, 0x9707CFFF), kvirt=0x (null), flags=0x00000000, length=360KB, name="AI(0) FrmBuf"

|-MMB: phys(0x9707D000, 0x97244FFF), kvirt=0x (null), flags=0x00000000, length=1824KB, name="[VOU]VSD(2)"

|-MMB: phys(0x97245000, 0x97408FFF), kvirt=0x (null), flags=0x00000000, length=1808KB, name="h264e0_Str"

|-MMB: phys(0x97409000, 0x9740DFFF), kvirt=0x (null), flags=0x00000000, length=20KB, name="h264e0_Ct"

|-MMB: phys(0x9740E000, 0x976B4FFF), kvirt=0x (null), flags=0x00000000, length=2716KB, name="h264e0_RcnVb"

|-MMB: phys(0x976B5000, 0x976BFFFF), kvirt=0x (null), flags=0x00000000, length=44KB, name="RgnPinPon"

|-MMB: phys(0x976C0000, 0x976D3FFF), kvirt=0x (null), flags=0x00000000, length=80KB, name="RgnPinPon"

|-MMB: phys(0x976D4000, 0x976EAFFF), kvirt=0x (null), flags=0x00000000, length=92KB, name="RgnPinPon"

|-MMB: phys(0x976EB000, 0x976F3FFF), kvirt=0x (null), flags=0x00000000, length=36KB, name="RgnPinPon"

|-MMB: phys(0x976F4000, 0x976FCFFF), kvirt=0x (null), flags=0x00000000, length=36KB, name="RgnPinPon"

|-MMB: phys(0x976FD000, 0x97704FFF), kvirt=0x (null), flags=0x00000000, length=32KB, name="RgnPinPon"

|-MMB: phys(0x97705000, 0x9770AFFF), kvirt=0x (null), flags=0x00000000, length=24KB, name="RgnPinPon"

|-MMB: phys(0x9770B000, 0x97747FFF), kvirt=0x (null), flags=0x00000000, length=244KB, name="AENC(0)StrmBuf"

|-MMB: phys(0x97748000, 0x9774FFFF), kvirt=0x (null), flags=0x00000000, length=32KB, name="AENC(0) CirBuf"

|-MMB: phys(0x97750000, 0x97750FFF), kvirt=0x (null), flags=0x00000000, length=4KB, name="DevCutPower"

---MMZ_USE_INFO:

total size=262144KB(256MB),used=122180KB(119MB + 324KB),remain=139964KB(136MB + 700KB),zone_number=1,block_number=55

/proc #
我的DDR是512M的,256M分配给了系统使用,256M分配给了多媒体。
系统内存设置:
系统内存分配,也就是分配给linux系统使用的,也包括用户的应用程序,这部分的参数设置是在uboot中完成,然后uboot传递给kernel。如下命令,mem设置的就是系统内存。
setenv bootargs 'mem=256M console=ttyAMA0,115200 root=/dev/mtdblock2 rootfstype=jffs2 mtdparts=hi_sfc:1M(boot),4M(kernel),8M(rootfs),4M(app&data),4M(data),2M(parameter),8M(updatefs)'
多媒体内存设置:
多媒体内存是在海思平台用来编码解码操作是使用的内存,他的设置是在文件系统/lib/modules/driver_ko 目录下的load文件中完成。

####################Variables Definition##########################

AD_TYPE=6134 # ad type

mem_total=512; # 512M, total mem

mem_start=0x80000000; # phy mem start

os_mem_size=256; # 256M, os mem

mmz_start=0x90000000; # mmz start addr

mmz_size=256M; # 256M, mmz size

##################################################################
mmz_size 设置的就是多媒体内存。这里需要多注意一点,系统内存os_mem_size在这里是不能设置成功的,需要在到boot里面设置。系统内存+多媒体内存=物理内存。设置小了浪费内存,设置大了易出现异常。

原文链接:https://blog.csdn.net/li_wen01/article/details/86547859

声明:本文内容由易百纳平台入驻作者撰写,文章观点仅代表作者本人,不代表易百纳立场。如有内容侵权或者其他问题,请联系本站进行删除。
红包 点赞 收藏 评论 打赏
评论
0个
内容存在敏感词
手气红包
    易百纳技术社区暂无数据
相关专栏
置顶时间设置
结束时间
删除原因
  • 广告/SPAM
  • 恶意灌水
  • 违规内容
  • 文不对题
  • 重复发帖
打赏作者
易百纳技术社区
在学了在学了!
您的支持将鼓励我继续创作!
打赏金额:
¥1易百纳技术社区
¥5易百纳技术社区
¥10易百纳技术社区
¥50易百纳技术社区
¥100易百纳技术社区
支付方式:
微信支付
支付宝支付
易百纳技术社区微信支付
易百纳技术社区
打赏成功!

感谢您的打赏,如若您也想被打赏,可前往 发表专栏 哦~

举报反馈

举报类型

  • 内容涉黄/赌/毒
  • 内容侵权/抄袭
  • 政治相关
  • 涉嫌广告
  • 侮辱谩骂
  • 其他

详细说明

审核成功

发布时间设置
发布时间:
是否关联周任务-专栏模块

审核失败

失败原因
备注
拼手气红包 红包规则
祝福语
恭喜发财,大吉大利!
红包金额
红包最小金额不能低于5元
红包数量
红包数量范围10~50个
余额支付
当前余额:
可前往问答、专栏板块获取收益 去获取
取 消 确 定

小包子的红包

恭喜发财,大吉大利

已领取20/40,共1.6元 红包规则

    易百纳技术社区