1 /* 2 * Copyright (c) 2023 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef NSI_COMMON_SRC_INCL_NSI_CPU_CTRL_H 8 #define NSI_COMMON_SRC_INCL_NSI_CPU_CTRL_H 9 10 #include <stdbool.h> 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 /** 17 * @brief Define if a CPU should automatically start at boot or not 18 * 19 * @param[in] cpu_n: Which CPU 20 * @param[in] auto_start: If true, it will autostart on its own, 21 * if 0, it won't 22 */ 23 void nsi_cpu_set_auto_start(int cpu_n, bool auto_start); 24 25 bool nsi_cpu_get_auto_start(int cpu_n); 26 27 /** 28 * @brief Boot CPU <cpu_n> 29 * 30 * Note: This API may only be called if that CPU was not stared before 31 * 32 * @param[in] cpu_n: Which CPU 33 */ 34 void nsi_cpu_boot(int cpu_n); 35 36 /* 37 * Internal native simulator runner API. 38 * Boot all CPUs which are configured to boot automatically 39 */ 40 void nsi_cpu_auto_boot(void); 41 42 #ifdef __cplusplus 43 } 44 #endif 45 46 #endif /* NSI_COMMON_SRC_INCL_NSI_CPU_CTRL_H */ 47