1 /* 2 * Copyright (c) 2023 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #include <soc.h> 8 #include <posix_native_task.h> 9 #include <nsi_cpu_if.h> 10 nsif_cpu0_pre_cmdline_hooks(void)11void nsif_cpu0_pre_cmdline_hooks(void) 12 { 13 run_native_tasks(_NATIVE_PRE_BOOT_1_LEVEL); 14 } 15 nsif_cpu0_pre_hw_init_hooks(void)16void nsif_cpu0_pre_hw_init_hooks(void) 17 { 18 run_native_tasks(_NATIVE_PRE_BOOT_2_LEVEL); 19 } 20 nsif_cpu0_boot(void)21void nsif_cpu0_boot(void) 22 { 23 run_native_tasks(_NATIVE_PRE_BOOT_3_LEVEL); 24 posix_boot_cpu(); 25 run_native_tasks(_NATIVE_FIRST_SLEEP_LEVEL); 26 } 27 nsif_cpu0_cleanup(void)28int nsif_cpu0_cleanup(void) 29 { 30 /* 31 * Note posix_soc_clean_up() may not return, but in that case, 32 * nsif_cpu0_cleanup() will be called again 33 */ 34 posix_soc_clean_up(); 35 return 0; 36 } 37 nsif_cpu0_irq_raised(void)38void nsif_cpu0_irq_raised(void) 39 { 40 posix_interrupt_raised(); 41 } 42