mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-10 01:34:12 +00:00
utils.h: add is_primary_core
Signed-off-by: Sven Peter <sven@svenpeter.dev>
This commit is contained in:
parent
1a04590ed3
commit
f80933a7d3
1 changed files with 5 additions and 0 deletions
|
@ -285,6 +285,11 @@ static inline int in_el2(void)
|
|||
return (mrs(CurrentEL) >> 2) == 2;
|
||||
}
|
||||
|
||||
static inline int is_primary_core(void)
|
||||
{
|
||||
return mrs(MPIDR_EL1) == 0x80000000;
|
||||
}
|
||||
|
||||
extern char _base[];
|
||||
extern char _end[];
|
||||
extern char _payload_start[];
|
||||
|
|
Loading…
Reference in a new issue