arch_early_init:
arm64:
void arch_early_init(void) { arm64_cpu_early_init(); platform_init_mmu_mappings(); }
arm:
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 ARM_WITH_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); }