cpu.h 682 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) 2006-2023, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. */
  9. #ifndef __RT_HW_CPU_H__
  10. #define __RT_HW_CPU_H__
  11. #include <rtdef.h>
  12. #include <cpuport.h>
  13. #include <mm_aspace.h>
  14. #ifdef RT_USING_OFW
  15. #include <drivers/ofw.h>
  16. #endif
  17. #define ID_ERROR __INT64_MAX__
  18. #define MPIDR_AFFINITY_MASK 0x000000ff00ffffffUL
  19. struct cpu_ops_t
  20. {
  21. const char *method;
  22. int (*cpu_init)(rt_uint32_t id, void *param);
  23. int (*cpu_boot)(rt_uint32_t id, rt_uint64_t entry);
  24. void (*cpu_shutdown)(void);
  25. };
  26. extern rt_uint64_t rt_cpu_mpidr_table[];
  27. #endif /* __RT_HW_CPU_H__ */