好哦,前面分析到了arch_early_init
1 void arch_early_init(void) { 2 /* turn off the cache */ 3 arch_disable_cache(UCACHE);//关闭cache,不想细看了 4 #if WITH_DEV_CACHE_PL310 //如果是PL310则关闭 5 pl310_set_enable(false); 6 #endif 7 8 arm_basic_setup();//arm 基本设置 9 10 #if WITH_SMP && ARM_CPU_CORTEX_A9//如果是A9且SMP 11 /* enable snoop control */ 12 addr_t scu_base = arm_read_cbar(); 13 *REG32(scu_base) |= (1<<0); /* enable SCU */ 14 #endif 15 16 #if ARCH_HAS_MMU//如果有MMU 17 arm_mmu_early_init(); 18 19 platform_init_mmu_mappings(); 20 #endif 21 22 /* turn the cache back on */ 23 #if WITH_DEV_CACHE_PL310//如果CACHE 310,则打开 24 pl310_set_enable(true); 25 #endif 26 arch_enable_cache(UCACHE); 27 }
void arch_early_init(void) { /* turn off the cache */ arch_disable_cache(UCACHE);#if WITH_DEV_CACHE_PL310 pl310_set_enable(false);#endif
arm_basic_setup();
#if WITH_SMP && ARM_CPU_CORTEX_A9 /* enable snoop control */ addr_t scu_base = arm_read_cbar(); *REG32(scu_base) |= (1<<0); /* enable SCU */#endif
#if ARCH_HAS_MMU arm_mmu_early_init();
platform_init_mmu_mappings();#endif
/* turn the cache back on */#if WITH_DEV_CACHE_PL310 pl310_set_enable(true);#endif arch_enable_cache(UCACHE);}