内存是否连续要看硬件连接方式,而且还要查看bib的配置,在bib中没有规定的ram是做为额外的内存,要调用OEMEnumExtensionDRAM枚举。
三星的2450的bank不能设置内存大小,所以2450如果有两片内存就应该是不连续的地址
三星6410的bank可以将两片内存连到同一个bank上。
如果物理地址不连续需要修改oemaddrtab.inc这个虚拟映射表。configure.bib中的文件也要做相应的修改
在init.c文件的oeminit函数中添加下面的代码
g_pOemGlobal->pfnProfileTimerEnable = OEMProfileTimerEnable;
g_pOemGlobal->pfnProfileTimerDisable = OEMProfileTimerDisable;
g_pOemGlobal->pfnEnumExtensionDRAM = OEMEnumExtensionDRAM;
//在init.c中添加下面的函数
DWORD OEMEnumExtensionDRAM (
PMEMORY_SECTION pMemSections,
DWORD cMemSections
)
{
DWORD cSections = 0;
// check the section ram bank
if (cSections < cMemSections)
{
pMemSections[0].dwFlags = 0;
pMemSections[0].dwStart = 0x84000000;
pMemSections[0].dwLen = 0x04000000;
cSections++;
}
return cSections;
}