文件:arch/arm/kernel/head.S
// cpu执行入口
.section ".text.head", "ax"
ENTRY(stext)
msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode
@ and irqs disabled
mrc p15, 0, r9, c0, c0 @ get processor id
bl __lookup_processor_type @ r5=procinfo r9=cpuid
movs r10, r5 @ invalid processor (r5=0)?
beq __error_p @ yes, error 'p'
bl __lookup_machine_type @ r5=machinfo
movs r8, r5 @ invalid machine (r5=0)?
beq __error_a @ yes, error 'a'
bl __vet_atags
bl __create_page_tables // 建立映射表
文件:arch/arm/kernel/asm-offsets.c
DEFINE(MACHINFO_PHYSIO, offsetof(struct machine_desc, phys_io));
文件:arch/arm/kernel/head.S
__create_page_tables:
#ifdef CONFIG_DEBUG_LL // 只有配置CONFIG_DEBUG_LL之后
......
ldr r3, [r8, #MACHINFO_PHYSIO] // 才会为EP93XX_APB_PHYS_BASE物理寄存器建立MMU映射[luther.gliethttp]
...... // 一般我们都不会去配置CONFIG_DEBUG_LL,而是在ep93xx_map_io中由我们自己建立io寄存器映射
#endif
MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board")
/* Maintainer: Toufeeq Hussain */
.phys_io = EP93XX_APB_PHYS_BASE,[luther.gliethttp]
.io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
.boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
.map_io = ep93xx_map_io,
.init_irq = ep93xx_init_irq,
.timer = &ep93xx_timer,
.init_machine = edb9312_init_machine,[luther.gliethttp]
MACHINE_END
阅读(1262) | 评论(0) | 转发(0) |