/Zephyr-Core-3.6.0/arch/arc/core/ |
D | smp.c | 42 void arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz, in arch_start_cpu() argument 45 _curr_cpu[cpu_num] = &(_kernel.cpus[cpu_num]); in arch_start_cpu() 46 arc_cpu_init[cpu_num].fn = fn; in arch_start_cpu() 47 arc_cpu_init[cpu_num].arg = arg; in arch_start_cpu() 55 arc_cpu_wake_flag = cpu_num; in arch_start_cpu() 64 static void arc_connect_debug_mask_update(int cpu_num) in arc_connect_debug_mask_update() argument 66 uint32_t core_mask = 1 << cpu_num; in arc_connect_debug_mask_update() 72 if (cpu_num != ARC_MP_PRIMARY_CPU_ID) { in arc_connect_debug_mask_update() 92 void arch_secondary_cpu_init(int cpu_num) in arch_secondary_cpu_init() argument 103 arc_connect_debug_mask_update(cpu_num); in arch_secondary_cpu_init() [all …]
|
/Zephyr-Core-3.6.0/arch/riscv/core/ |
D | smp.c | 30 void arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz, in arch_start_cpu() argument 33 riscv_cpu_init[cpu_num].fn = fn; in arch_start_cpu() 34 riscv_cpu_init[cpu_num].arg = arg; in arch_start_cpu() 40 if (pm_cpu_on(cpu_num, (uintptr_t)&__start)) { in arch_start_cpu() 41 printk("Failed to boot secondary CPU %d\n", cpu_num); in arch_start_cpu() 47 riscv_cpu_wake_flag = _kernel.cpus[cpu_num].arch.hartid; in arch_start_cpu() 54 unsigned int cpu_num = 0; in arch_secondary_cpu_init() local 58 cpu_num = i; in arch_secondary_cpu_init() 61 csr_write(mscratch, &_kernel.cpus[cpu_num]); in arch_secondary_cpu_init() 63 _kernel.cpus[cpu_num].arch.online = true; in arch_secondary_cpu_init() [all …]
|
/Zephyr-Core-3.6.0/soc/xtensa/intel_adsp/ace/include/intel_ace20_lnl/ |
D | adsp_power.h | 58 static ALWAYS_INLINE void soc_cpu_power_up(int cpu_num) in soc_cpu_power_up() argument 60 ACE_PWRCTL->wpdsphpxpg |= BIT(cpu_num); in soc_cpu_power_up() 72 static ALWAYS_INLINE void soc_cpu_power_down(int cpu_num) in soc_cpu_power_down() argument 74 ACE_PWRCTL->wpdsphpxpg &= ~BIT(cpu_num); in soc_cpu_power_down() 86 static ALWAYS_INLINE bool soc_cpu_is_powered(int cpu_num) in soc_cpu_is_powered() argument 88 return (ACE_PWRSTS->dsphpxpgs & BIT(cpu_num)) == BIT(cpu_num); in soc_cpu_is_powered()
|
/Zephyr-Core-3.6.0/soc/xtensa/intel_adsp/ace/include/intel_ace15_mtpm/ |
D | adsp_power.h | 58 static ALWAYS_INLINE void soc_cpu_power_up(int cpu_num) in soc_cpu_power_up() argument 60 ACE_PWRCTL->wpdsphpxpg |= BIT(cpu_num); in soc_cpu_power_up() 72 static ALWAYS_INLINE void soc_cpu_power_down(int cpu_num) in soc_cpu_power_down() argument 74 ACE_PWRCTL->wpdsphpxpg &= ~BIT(cpu_num); in soc_cpu_power_down() 86 static ALWAYS_INLINE bool soc_cpu_is_powered(int cpu_num) in soc_cpu_is_powered() argument 88 return (ACE_PWRSTS->dsphpxpgs & BIT(cpu_num)) == BIT(cpu_num); in soc_cpu_is_powered()
|
/Zephyr-Core-3.6.0/arch/arm/core/cortex_a_r/ |
D | smp.c | 55 int cpu_num; member 93 void arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz, arch_cpustart_t fn, void *arg) in arch_start_cpu() argument 111 if (j == cpu_num - 1) { in arch_start_cpu() 118 printk("Can't find CPU Core %d from dts and failed to boot it\n", cpu_num); in arch_start_cpu() 124 arm_cpu_boot_params.fiq_sp = Z_KERNEL_STACK_BUFFER(z_arm_fiq_stack[cpu_num]) in arch_start_cpu() 126 arm_cpu_boot_params.abt_sp = Z_KERNEL_STACK_BUFFER(z_arm_abort_stack[cpu_num]) in arch_start_cpu() 128 arm_cpu_boot_params.udf_sp = Z_KERNEL_STACK_BUFFER(z_arm_undef_stack[cpu_num]) in arch_start_cpu() 130 arm_cpu_boot_params.svc_sp = Z_KERNEL_STACK_BUFFER(z_arm_svc_stack[cpu_num]) in arch_start_cpu() 132 arm_cpu_boot_params.sys_sp = Z_KERNEL_STACK_BUFFER(z_arm_sys_stack[cpu_num]) in arch_start_cpu() 137 arm_cpu_boot_params.cpu_num = cpu_num; in arch_start_cpu() [all …]
|
/Zephyr-Core-3.6.0/arch/x86/core/intel64/ |
D | cpu.c | 141 void arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz, in arch_start_cpu() argument 149 ACPI_MADT_LOCAL_APIC *lapic = acpi_local_apic_get(cpu_num); in arch_start_cpu() 153 x86_cpu_loapics[cpu_num] = lapic->Id; in arch_start_cpu() 157 apic_id = x86_cpu_loapics[cpu_num]; in arch_start_cpu() 159 x86_cpuboot[cpu_num].sp = (uint64_t) Z_KERNEL_STACK_BUFFER(stack) + sz; in arch_start_cpu() 160 x86_cpuboot[cpu_num].stack_size = sz; in arch_start_cpu() 161 x86_cpuboot[cpu_num].fn = fn; in arch_start_cpu() 162 x86_cpuboot[cpu_num].arg = arg; in arch_start_cpu() 168 while (x86_cpuboot[cpu_num].ready == 0) { in arch_start_cpu() 171 ARG_UNUSED(cpu_num); in arch_start_cpu() [all …]
|
/Zephyr-Core-3.6.0/arch/arm64/core/ |
D | smp.c | 41 int cpu_num; member 65 void arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz, in arch_start_cpu() argument 90 arm64_cpu_boot_params.cpu_num = cpu_num; in arch_start_cpu() 109 cpu_num, cpu_mpid); in arch_start_cpu() 121 printk("Can't find CPU Core %d from dts and failed to boot it\n", cpu_num); in arch_start_cpu() 130 cpu_map[cpu_num] = cpu_mpid; in arch_start_cpu() 132 printk("Secondary CPU core %d (MPID:%#llx) is up\n", cpu_num, cpu_mpid); in arch_start_cpu() 136 void arch_secondary_cpu_init(int cpu_num) in arch_secondary_cpu_init() argument 138 cpu_num = arm64_cpu_boot_params.cpu_num; in arch_secondary_cpu_init() 145 write_tpidrro_el0((uintptr_t)&_kernel.cpus[cpu_num]); in arch_secondary_cpu_init()
|
/Zephyr-Core-3.6.0/soc/xtensa/intel_adsp/ace/ |
D | multiprocessing.c | 121 void soc_start_core(int cpu_num) in soc_start_core() argument 125 if (cpu_num > 0) { in soc_start_core() 136 if (pm_state_next_get(cpu_num)->state == PM_STATE_ACTIVE) { in soc_start_core() 146 soc_cpu_power_up(cpu_num); in soc_start_core() 148 if (!WAIT_FOR(soc_cpu_is_powered(cpu_num), in soc_start_core() 154 DSPCS.bootctl[cpu_num].battr |= DSPBR_BATTR_LPSCTL_BATTR_SLAVE_CORE; in soc_start_core() 161 DSPCS.capctl[cpu_num].ctl &= ~DSPCS_CTL_SPA; in soc_start_core() 164 if (!WAIT_FOR((DSPCS.capctl[cpu_num].ctl & DSPCS_CTL_CPA) != DSPCS_CTL_CPA, in soc_start_core() 169 DSPCS.capctl[cpu_num].ctl |= DSPCS_CTL_SPA; in soc_start_core() 172 while (((DSPCS.capctl[cpu_num].ctl & DSPCS_CTL_CPA) != DSPCS_CTL_CPA) && in soc_start_core()
|
/Zephyr-Core-3.6.0/soc/xtensa/intel_adsp/common/ |
D | multiprocessing.c | 118 bool arch_cpu_active(int cpu_num) in arch_cpu_active() argument 120 return soc_cpus_active[cpu_num]; in arch_cpu_active() 123 void arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz, in arch_start_cpu() argument 126 __ASSERT_NO_MSG(!soc_cpus_active[cpu_num]); in arch_start_cpu() 128 start_rec.cpu = cpu_num; in arch_start_cpu() 134 soc_start_core(cpu_num); in arch_start_cpu()
|
/Zephyr-Core-3.6.0/soc/xtensa/intel_adsp/cavs/ |
D | multiprocessing.c | 42 void soc_start_core(int cpu_num) in soc_start_core() argument 84 if (pm_state_next_get(cpu_num)->state == PM_STATE_ACTIVE) in soc_start_core() 100 CAVS_SHIM.clkctl |= CAVS_CLKCTL_TCPLCG(cpu_num); in soc_start_core() 101 CAVS_SHIM.pwrctl |= CAVS_PWRCTL_TCPDSPPG(cpu_num); in soc_start_core() 106 CAVS_INTCTRL[cpu_num].l2.clear = CAVS_L2_IDC; in soc_start_core() 120 IDC[curr_cpu].core[cpu_num].ietc = ietc; in soc_start_core() 121 IDC[curr_cpu].core[cpu_num].itc = IDC_MSG_POWER_UP; in soc_start_core()
|
/Zephyr-Core-3.6.0/arch/riscv/include/ |
D | kernel_arch_func.h | 43 unsigned int cpu_num, hart_x; in arch_kernel_init() local 45 for (cpu_num = 1, hart_x = 0; cpu_num < arch_num_cpus(); cpu_num++) { in arch_kernel_init() 49 _kernel.cpus[cpu_num].arch.hartid = cpu_node_list[hart_x]; in arch_kernel_init()
|
/Zephyr-Core-3.6.0/soc/xtensa/espressif_esp32/esp32/ |
D | esp32-mp.c | 246 void arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz, in arch_start_cpu() argument 253 __ASSERT(cpu_num == 1, "ESP-32 supports only two CPUs"); in arch_start_cpu() 259 sr.cpu = cpu_num; in arch_start_cpu() 276 cpus_active[cpu_num] = true; in arch_start_cpu() 304 IRAM_ATTR bool arch_cpu_active(int cpu_num) in arch_cpu_active() argument 306 return cpus_active[cpu_num]; in arch_cpu_active()
|
/Zephyr-Core-3.6.0/drivers/interrupt_controller/ |
D | intc_plic.c | 114 static inline mem_addr_t get_context_en_addr(const struct device *dev, uint32_t cpu_num) in get_context_en_addr() argument 126 hartid = _kernel.cpus[cpu_num].arch.hartid; in get_context_en_addr() 151 static inline mem_addr_t get_threshold_priority_addr(const struct device *dev, uint32_t cpu_num) in get_threshold_priority_addr() argument 157 hartid = _kernel.cpus[cpu_num].arch.hartid; in get_threshold_priority_addr() 211 for (uint32_t cpu_num = 0; cpu_num < arch_num_cpus(); cpu_num++) { in plic_irq_enable_set_state() local 213 get_context_en_addr(dev, cpu_num) + local_irq_to_reg_offset(local_irq); in plic_irq_enable_set_state() 409 for (uint32_t cpu_num = 0; cpu_num < arch_num_cpus(); cpu_num++) { in plic_init() local 410 en_addr = get_context_en_addr(dev, cpu_num); in plic_init() 411 thres_prio_addr = get_threshold_priority_addr(dev, cpu_num); in plic_init()
|
/Zephyr-Core-3.6.0/soc/xtensa/intel_adsp/common/include/ |
D | soc.h | 25 extern void soc_start_core(int cpu_num);
|
/Zephyr-Core-3.6.0/include/zephyr/sys/ |
D | arch_interface.h | 241 void arch_start_cpu(int cpu_num, k_thread_stack_t *stack, int sz, 249 bool arch_cpu_active(int cpu_num);
|
/Zephyr-Core-3.6.0/include/zephyr/acpi/ |
D | acpi.h | 290 ACPI_MADT_LOCAL_APIC *acpi_local_apic_get(int cpu_num);
|
/Zephyr-Core-3.6.0/lib/acpi/ |
D | acpi.c | 909 ACPI_MADT_LOCAL_APIC *acpi_local_apic_get(int cpu_num) in acpi_local_apic_get() argument 921 for (idx = 0; cpu_num >= 0 && idx < cpu_cnt; idx++) { in acpi_local_apic_get() 923 if (cpu_num == 0) { in acpi_local_apic_get() 927 cpu_num--; in acpi_local_apic_get()
|