bootsec.c
来自「可以在三星的ARM处理器s3c44b0上移植的bootLoader源代码」· C语言 代码 · 共 63 行
C
63 行
/****************************************************************************/
//
// BootLoader stub
// Created by Strong Embeded Studio
// www.8800.org
// If there are any concerns on the code
// go to www.8800.org for discussion
//
/****************************************************************************/
// This routine copies the BootLoader into dram memory for execution
/****************************************************************************/
//***************************************************************************
#include "inc\44b.h"
#include "inc\option.h"
//***************************************************************************
typedef (*FUNC)(void);
FUNC fp;
void Main(void)
{
unsigned int *org;
unsigned int *dst;
unsigned int len;
unsigned int i;
//
//8K Cachable
//
rSYSCFG = CACHECFG;
//
// I/O range uncachable
//
rNCACHBE0 = 0xc0002000;
//
// Write the LED (00)
//
*(volatile short *)(0x6080000) = 0x4848;
//
// Move the BootLoader to DRAM
//
org = (unsigned int *)0x00001000;
dst = (unsigned int *)0x0C000000;
fp = (FUNC)dst;
len = (0x10000)>>2;
for (i=0;i<len;i++) *dst++ = *org++;
//
// Go there for execution
//
(*fp)();
}
//***************************************************************************
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?