cpu_ops_common.h 490 B

123456789101112131415161718192021
  1. #ifndef __CPU_OPS_COMMON_H__
  2. #define __CPU_OPS_COMMON_H__
  3. #include <rthw.h>
  4. #include <rtthread.h>
  5. #include <mmu.h>
  6. #include "entry_point.h"
  7. static inline rt_uint64_t get_secondary_entry_pa(void)
  8. {
  9. rt_uint64_t secondary_entry_pa = (rt_uint64_t)rt_kmem_v2p(_secondary_cpu_entry);
  10. if (!secondary_entry_pa)
  11. {
  12. LOG_E("Failed to translate 'secondary_entry_pa' to physical address");
  13. return 0;
  14. }
  15. return secondary_entry_pa;
  16. }
  17. #endif /* __CPU_OPS_COMMON_H__ */