1
0

secondary_cpu.c 609 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) 2006-2022, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. */
  9. #include <rthw.h>
  10. #include <rtthread.h>
  11. #include <cpu.h>
  12. #include "gic.h"
  13. #include "interrupt.h"
  14. #include "mmu.h"
  15. #ifdef RT_USING_SMP
  16. extern unsigned long MMUTable[];
  17. void rt_hw_secondary_cpu_bsp_start(void)
  18. {
  19. rt_hw_spin_lock(&_cpus_lock);
  20. rt_hw_mmu_ktbl_set((unsigned long)MMUTable);
  21. // interrupt init
  22. rt_hw_vector_init();
  23. arm_gic_cpu_init(0, 0);
  24. // local timer init
  25. rt_system_scheduler_start();
  26. }
  27. #endif // SMP