1 /* 2 * Copyright (c) 2019-2020 Cobham Gaisler AB 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /** 8 * @file 9 * @brief Full C support initialization 10 */ 11 12 #include <kernel_internal.h> 13 #include <zephyr/platform/hooks.h> 14 #include <zephyr/arch/cache.h> 15 16 /** 17 * @brief Prepare to and run C code 18 * 19 * This routine prepares for the execution of and runs C code. 20 */ 21 z_prep_c(void)22void z_prep_c(void) 23 { 24 #if defined(CONFIG_SOC_PREP_HOOK) 25 soc_prep_hook(); 26 #endif 27 z_data_copy(); 28 #if CONFIG_ARCH_CACHE 29 arch_cache_init(); 30 #endif 31 z_cstart(); 32 CODE_UNREACHABLE; 33 } 34