TEE_Result init_teecore(void) { static int is_first = 1; /* (DEBUG) for inits at 1st TEE service: when UART is setup */ if (!is_first) return TEE_SUCCESS; is_first = 0; #ifdef CFG_WITH_USER_TA tee_svc_uref_base = CFG_TEE_LOAD_ADDR; #endif /* init support for futur mapping of TAs */ tee_mmu_kmap_init(); teecore_init_pub_ram(); /* time initialization */ time_source_init(); /* call pre-define initcall routines */ call_initcalls(); IMSG("teecore inits done"); return TEE_SUCCESS; }
/* * Note: this function is weak just to make it possible to exclude it from * the unpaged area. */ TEE_Result __weak init_teecore(void) { static int is_first = 1; /* (DEBUG) for inits at 1st TEE service: when UART is setup */ if (!is_first) return TEE_SUCCESS; is_first = 0; #ifdef CFG_WITH_USER_TA tee_svc_uref_base = TEE_TEXT_VA_START; #endif /* init support for future mapping of TAs */ teecore_init_pub_ram(); /* time initialization */ time_source_init(); /* call pre-define initcall routines */ call_initcalls(); IMSG("Initialized"); return TEE_SUCCESS; }
TEE_Result init_teecore(void) { static int is_first = 1; unsigned long a, s; /* (DEBUG) for inits at 1st TEE service: when UART is setup */ if (!is_first) return TEE_SUCCESS; is_first = 0; #ifndef WITH_UART_DRV /* UART tracing support */ asc_init(); IMSG("teecore: uart trace init"); #endif /* core malloc pool init */ #ifdef CFG_TEE_MALLOC_START a = CFG_TEE_MALLOC_START; s = CFG_TEE_MALLOC_SIZE; #else a = (unsigned long)&teecore_heap_start; s = (unsigned long)&teecore_heap_end; a = ((a + 1) & ~0x0FFFF) + 0x10000; /* 64kB aligned */ s = s & ~0x0FFFF; /* 64kB aligned */ s = s - a; #endif IMSG("teecore heap: paddr=0x%lX size=0x%lX (%ldkB)", a, s, s / 1024); malloc_init((void *)a, s); /* init support for futur mapping of TAs */ tee_mmu_kmap_init(); teecore_init_ta_ram(); teecore_init_pub_ram(); /* Libtomcrypt initialization */ tee_ltc_init(); /* time initialization */ time_source_init(); IMSG("teecore inits done"); return TEE_SUCCESS; }