U-Boot启动过程源码分析(一)
U-Boot属于两阶段的Bootloader,第一阶段中分为两个步骤:
1、硬件设备初始化
2、为加载Bootloader的第二阶段代码准备RAM空间
这里分析硬件设备初始化部分,文件为cpu/arm920t/start.S,主要是平台相关的。
1、CPU工作模式设置为管理模式(svc)
#if defined(CONFIG_S3C2400)# define pWTCON 0x15300000# define INTMSK 0x14400008 /* Interupt-Controller base addresses */# define CLKDIVN 0x14800014 /* clock divisor register */#elif defined(CONFIG_S3C2410)# define pWTCON 0x53000000 /* 看门狗计时器的寄存器地址:0x53000000~0x53000008 */# define INTMSK 0x4A000008 /* 中断控制器的寄存器地址:0x4A000000~0x4A00001C */# define INTSUBMSK 0x4A00001C# define CLKDIVN 0x4C000014 /* 系统时钟的寄存器地址:0x4C000000~0x4C000018 */#endif