文件:init/main.c
start_kernel
==> setup_arch(&command_line);
文件:arch/arm/kernel/setup.c
setup_arch
void __init setup_arch(char **cmdline_p)
{
struct tag *tags = (struct tag *)&init_tags;
struct machine_desc *mdesc;
char *from = default_command_line;
......
if (__atags_pointer)
tags = phys_to_virt(__atags_pointer); // bootloader传入了非0的tags的物理地址,优先使用bootloader指定地址[luther.gliethttp]
else if (mdesc->boot_params) // 只有当bootloader没有传入tags参数时才使用arch/arm/mach-ep93xx/edb9312.c中默认参数地址[luther.gliethttp]
tags = phys_to_virt(mdesc->boot_params);// 物理地址转为虚拟地址
......
}
MACHINE_START(EDB9312, "Cirrus Logic EDB9312 Evaluation Board")
/* Maintainer: Toufeeq Hussain */
.phys_io = EP93XX_APB_PHYS_BASE,
.io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
.boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,[luther.gliethttp]
.map_io = ep93xx_map_io,
.init_irq = ep93xx_init_irq,
.timer = &ep93xx_timer,
.init_machine = edb9312_init_machine,[luther.gliethttp]
MACHINE_END
阅读(1240) | 评论(0) | 转发(0) |