主要有以下几个地方需要注意:
1. Image_Cfg.h
// DRAM1 Base Address
#define DRAM_BASE_PA_START(0x40000000)
#define DRAM_BASE_CA_START(0x80000000)
#define DRAM_BASE_UA_START(0xA0000000)
#define DRAM_BASE_PA_LAST(0x48000000)
#define DRAM_BASE_CA_LAST(0x88000000)
#define DRAM_BASE_UA_LAST(0xA8000000)
// Extra DRAM1 Base Address for V210
#define DRAM_EXTRA_BASE_PA_START(0x48000000)
#define DRAM_EXTRA_BASE_CA_START(0x99600000)
#define DRAM_EXTRA_BASE_UA_START(0xB9600000)
#define DRAM_EXTRA_SIZE (0x06A00000)
#define DRAM_EXTRA_BASE_UA_LAST(DRAM_EXTRA_BASE_UA_START + DRAM_EXTRA_SIZE)
// DRAM0 Base Address
#define DRAM0_BASE_PA_START(0x20000000)
#define DRAM0_BASE_CA_START(0x88000000)
#define DRAM0_BASE_UA_START(0xA8000000)
#define DRAM0_BASE_PA_LAST(0x28000000)
#define DRAM0_BASE_CA_LAST(0x90000000)
#define DRAM0_BASE_UA_LAST(0xB0000000)
2. oemaddrtab_cfg.inc
DCD DRAM_BASE_CA_START, DRAM_BASE_PA_START, 128 ; 128 MB DRAM3. image_cfg.inc
DCD DRAM0_BASE_CA_START, DRAM0_BASE_PA_START, 128 ; 128 MB DRAM on DMC0
DCD BASE_REG_CA_CHIPID, BASE_REG_PA_CHIPID, 43 ; 43 MB SFR, 0x9000_0000 - 0x92AF_FFFF
;------------------------------------------------------------------------------; SDRAM ;------------------------------------------------------------------------------DRAM0_BASE_PA_START EQU (0x20000000)DRAM0_BASE_CA_START EQU (0x88000000)DRAM0_BASE_UA_START EQU (0xA8000000)DRAM0_SIZE EQU (0x08000000);128M;------------------------------------------------------------------------------; SDRAM ;------------------------------------------------------------------------------DRAM_BASE_PA_START EQU (0x40000000)DRAM_BASE_CA_START EQU (0x80000000)DRAM_BASE_UA_START EQU (0xA0000000)DRAM_SIZE EQU (0x08000000);128M;------------------------------------------------------------------------------; Extra DRAM for V210;------------------------------------------------------------------------------DRAM_EXTRA_BASE_PA_START EQU (0x48000000)DRAM_EXTRA_BASE_CA_START EQU (0x99600000)DRAM_EXTRA_BASE_UA_START EQU (0xB9600000)DRAM_EXTRA_SIZE EQU (0x06A00000);106M
4 . init.c
static DWORD OEMEnumExtensionDRAM(
PMEMORY_SECTION pMemSections,
DWORD cMemSections)
{
DWORD cSections = 0;
if (cSections < cMemSections)
{
// DRAM0 Area
pMemSections[cSections].dwFlags = 0;
pMemSections[cSections].dwStart = DRAM0_BASE_CA_START; //0x88000000
pMemSections[cSections].dwLen = ONEDRAM_EXTSIZE_FOR_AP;
cSections++;
// Extra DRAM1 Area 0x48000000, 106MB
pMemSections[cSections].dwFlags = 0;
pMemSections[cSections].dwStart = DRAM_EXTRA_BASE_CA_START; //0x99600000
pMemSections[cSections].dwLen = DRAM_EXTRA_SIZE;
cSections++;
}
return cSections;
}
image_cfg.inc貌似不改也没问题。
其余的关于内存的一些配置,在System_Init.c中,可以对照内存的Spec以及210手册中Memory配置部分即可。
转载自:http://blog.csdn.net/lbqhope/article/details/7301090