2022-12-20 17:49:37 +08:00
|
|
|
/*
|
2023-11-28 14:20:11 +08:00
|
|
|
* Copyright (c) 2006-2023, RT-Thread Development Team
|
2022-12-20 17:49:37 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
*/
|
|
|
|
#ifndef __RT_HW_CPU_H__
|
|
|
|
#define __RT_HW_CPU_H__
|
|
|
|
|
2023-11-28 14:20:11 +08:00
|
|
|
#include <rtdef.h>
|
|
|
|
#include <cpuport.h>
|
|
|
|
#include <mm_aspace.h>
|
|
|
|
|
|
|
|
#ifdef RT_USING_OFW
|
|
|
|
#include <drivers/ofw.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define ID_ERROR __INT64_MAX__
|
|
|
|
#define MPIDR_AFFINITY_MASK 0x000000ff00ffffffUL
|
2022-12-20 17:49:37 +08:00
|
|
|
|
|
|
|
struct cpu_ops_t
|
|
|
|
{
|
|
|
|
const char *method;
|
2023-11-28 14:20:11 +08:00
|
|
|
int (*cpu_init)(rt_uint32_t id, void *param);
|
|
|
|
int (*cpu_boot)(rt_uint32_t id, rt_uint64_t entry);
|
2022-12-20 17:49:37 +08:00
|
|
|
void (*cpu_shutdown)(void);
|
|
|
|
};
|
|
|
|
|
2023-11-28 14:20:11 +08:00
|
|
|
extern rt_uint64_t rt_cpu_mpidr_table[];
|
2022-12-20 17:49:37 +08:00
|
|
|
|
2023-11-28 14:20:11 +08:00
|
|
|
#endif /* __RT_HW_CPU_H__ */
|