作者willywl (吓哑)
看板LinuxDev
标题[问题] 嵌入式系统增加记忆体的疑问
时间Thu Jan 31 11:39:09 2013
各位大大好, 小弟目前正在玩嵌入式arm linux
目前想把系统记忆体从64MB增加到128MB
接法是使用两个memory bank, 每个bank各64MB
而两个bank的physical addr 并不是连续的
所以小弟在uboot里面将两块memory mapping到连续的virtaul address
+-----+ phy 0x30000000 -> vir 0xc0000000
| |
| |
| 64M |
| |
+-----+ phy 0x38000000 -> vir 0xc4000000
| |
| |
| 64M |
| |
+-----+
然後用mtest对这两块位置做读写测试, 顺利地通过了
之後在bootarg 加上 mem=128M 进入linux kernel
执行memory allocate测试程式超过64MB後, 系统不意外的panic了
小弟回头找 src/include/asm-arm/memory.h 看到当前code都是以线性方式做转址
不过发现有一个 CONFIG_DISCONTIGMEM define
因此跑去 menuconfig里面看
结果在 Kernel Features/Memory model/ 里面只有看到 Flat Memory的选项
而对於该如何修改使linux能够支援当前的记忆体配置
小弟仍不太有头绪, 因此上来发问
请问有大大对相关方面有经验, 能够作一些方向指点吗?
谢谢!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.45.248.135
1F:→ heoris:哪颗SOC ? 01/31 19:55
2F:→ willywl:s3c2416 01/31 20:54
3F:→ holio:可以参考 mach-clps711x/edb7211-arch.c的 fixup_edb7211 02/01 23:51
4F:→ willywl:感谢holio大提示, 我先从您建议的方面研究! 02/02 00:04