Branch data Line data Source code
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 : :
11 : 1 : void nsif_cpu0_pre_cmdline_hooks(void)
12 : : {
13 : 1 : run_native_tasks(_NATIVE_PRE_BOOT_1_LEVEL);
14 : 1 : }
15 : :
16 : 1 : void nsif_cpu0_pre_hw_init_hooks(void)
17 : : {
18 : 1 : run_native_tasks(_NATIVE_PRE_BOOT_2_LEVEL);
19 : 1 : }
20 : :
21 : 1 : void nsif_cpu0_boot(void)
22 : : {
23 : 1 : run_native_tasks(_NATIVE_PRE_BOOT_3_LEVEL);
24 : 1 : posix_boot_cpu();
25 : 0 : run_native_tasks(_NATIVE_FIRST_SLEEP_LEVEL);
26 : 0 : }
27 : :
28 : 2 : int 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 : 2 : posix_soc_clean_up();
35 : 1 : return 0;
36 : : }
37 : :
38 : 0 : void nsif_cpu0_irq_raised(void)
39 : : {
40 : 0 : posix_interrupt_raised();
41 : 0 : }
|