utils.h: add is_primary_core

Signed-off-by: Sven Peter <sven@svenpeter.dev>
This commit is contained in:
Sven Peter 2021-03-14 22:40:02 +01:00 committed by Hector Martin
parent 1a04590ed3
commit f80933a7d3

View file

@ -285,6 +285,11 @@ static inline int in_el2(void)
return (mrs(CurrentEL) >> 2) == 2; return (mrs(CurrentEL) >> 2) == 2;
} }
static inline int is_primary_core(void)
{
return mrs(MPIDR_EL1) == 0x80000000;
}
extern char _base[]; extern char _base[];
extern char _end[]; extern char _end[];
extern char _payload_start[]; extern char _payload_start[];