summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorguanxi.cgh <[email protected]>2026-09-04 11:04:21 +0800
committerRbb666 <[email protected]>2026-09-15 22:57:55 +0800
commite81494f881526b257165207cf716df1043f1bb2a (patch)
tree13435476c3708095b1a1d2aac32fd19af1f10003 /src
parent5b19c18f4713f5f79d1ee49f4b4270b264b3b65e (diff)
[libcpu][risc-v]Feat: Add OpenSBI SMP support to t-head c908
Diffstat (limited to 'src')
-rw-r--r--src/components.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/components.c b/src/components.c
index 7d47683dd0..167b2d4590 100644
--- a/src/components.c
+++ b/src/components.c
@@ -193,9 +193,6 @@ static void main_thread_entry(void *parameter)
rt_components_init();
#endif /* RT_USING_COMPONENTS_INIT */
-#ifdef RT_USING_SMP
- rt_hw_secondary_cpu_up();
-#endif /* RT_USING_SMP */
/* invoke system main function */
#ifdef __ARMCC_VERSION
{
@@ -266,6 +263,11 @@ int rtthread_startup(void)
rt_system_signal_init();
#endif /* RT_USING_SIGNALS */
+#ifdef RT_USING_SMP
+ rt_hw_spin_lock(&_cpus_lock);
+ rt_hw_secondary_cpu_up();
+#endif /* RT_USING_SMP */
+
/* create init_thread */
rt_application_init();
@@ -278,10 +280,6 @@ int rtthread_startup(void)
/* defunct thread initialization */
rt_thread_defunct_init();
-#ifdef RT_USING_SMP
- rt_hw_spin_lock(&_cpus_lock);
-#endif /* RT_USING_SMP */
-
/* start scheduler */
rt_system_scheduler_start();