设为首页 加入收藏

TOP

MACHINE_START and MACHINE_END Macro define(二)
2014-11-24 14:21:35 来源: 作者: 【 】 浏览:1
Tags:MACHINE_START and MACHINE_END Macro define
中间省略


/*
* Look in and arch/arm/kernel/arch.[ch] for
* more information about the __proc_info and __arch_info structures.
*/
.align 2
3: .long __proc_info_begin
.long __proc_info_end
4: .long .
.long __arch_info_begin
.long __arch_info_end


/*
* Lookup machine architecture in the linker-build list of architectures.
* Note that we can't use the absolute addresses for the __arch_info
* lists since we aren't running with the MMU on (and therefore, we are
* not in the correct address space). We have to calculate the offset.
*
* r1 = machine architecture number
* Returns:
* r3, r4, r6 corrupted
* r5 = mach_info pointer in physical address space
*/
__lookup_machine_type:
#ifdef CONFIG_ARCH_W90X900 //这个就是前面的1860,十六进制为:0x744
mov r1, #0x700
add r1, r1, #0x40
add r1, r1, #0x04
#endif
adr r3, 4b
ldmia r3, {r4, r5, r6}
sub r3, r3, r4 @ get offset between virt&phys
add r5, r5, r3 @ convert virt addresses to
add r6, r6, r3 @ physical address space
1: ldr r3, [r5, #MACHINFO_TYPE] @ get machine type
teq r3, r1 @ matches loader number
beq 2f @ found
add r5, r5, #SIZEOF_MACHINE_DESC @ next machine_desc
cmp r5, r6
blo 1b
mov r5, #0 @ unknown machine
2: mov pc, lr
ENDPROC(__lookup_machine_type)


首页 上一页 1 2 下一页 尾页 2/2/2
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇Android游戏开发教程:手教你写跳.. 下一篇S3C2410支持64M到1GB的NAND FLASH

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: