📄 2443mon_u.cpp
字号:
/**
* Project Name : S3C2443 verification project
*
* Copyright 2006 by Samsung Electronics, Inc.
* All rights reserved.
*
* Project Description :
* This software is only for verifying functions of the S3C2443.
* Anybody can use this code without our permission.
*/
#include "def.h"
#include "config.h"
#include "nand.h"
#include "MMUCACHE.H"
void (*run) (void);
DWORD JumpAddr;
DWORD ReadImageFromNand(DWORD dwEntry, DWORD dwSig);
INT32 FIL_Init(void);
int main(void)
{
DWORD err;
MMU_EnableICache();
NAND_Init();
err = ReadImageFromNand(0,0);
if(err)
{
while(1);
}
else
{
run = (void (*)(void))JumpAddr;
run();
}
}
DWORD
ReadImageFromNand(DWORD dwEntry, DWORD dwSig)
{
DWORD dwStartSector, dwTotalSectors, dwPageStart, dwPageTotal;
DWORD dwRAM;
DWORD dwStatus;
int i,j;
dwPageStart = 6;//changes 0117 fix issue for pair effect
dwPageTotal = NAND_BLOCK_PAGE-2-dwPageStart;
dwRAM =IPL_RUN_ADDRESS;
JumpAddr = IPL_RUN_ADDRESS;
// Load the disk image directly into RAM
for(i = dwPageStart; i<dwPageTotal ;i++)
{
if (NAND_Read(0, i, (unsigned char *)dwRAM))
{
while(1);
}
dwRAM += NAND_PAGE_SIZE;
}
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -