您的位置:首页 > 其它

浅析开发板相关变量phys_io即EP93XX_APB_PHYS_BASE什么时候被引用

2010-12-04 17:27 253 查看
文件: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 <toufeeq_hussain@infosys.com> */
    .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

文章出处:http://blog.chinaunix.net/u1/38994/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  io timer struct c