tpidr_el1是启动时每个核写入的值么?
#ifdef RT_USING_SMP
/* The more common mpidr_el1 table, redefine it in BSP if it is in other cases */
RT_WEAK rt_uint64_t rt_cpu_mpidr_early[] =
{
[0] = 0x80000000,
[1] = 0x80000001,
[2] = 0x80000002,
[3] = 0x80000003,
[4] = 0x80000004,
[5] = 0x80000005,
[6] = 0x80000006,
[7] = 0x80000007,
[RT_CPUS_NR] = 0
};
#endif
int rt_hw_cpu_id(void)
{
rt_base_t value;
asm volatile ("mrs %0, tpidr_el1":"=r"(value));
return value;
}
更多回帖