/* * Copyright (c) 2019 Carlo Caione * * SPDX-License-Identifier: Apache-2.0 */ #ifndef _MACRO_PRIV_INC_ #define _MACRO_PRIV_INC_ #include #ifdef _ASMLANGUAGE /* * Get CPU id */ .macro get_cpu_id xreg0 mrs \xreg0, mpidr_el1 /* FIMXME: aff3 not taken into consideration */ ubfx \xreg0, \xreg0, #0, #24 .endm /* * Get CPU pointer */ .macro get_cpu xreg0 mrs \xreg0, tpidrro_el0 and \xreg0, \xreg0, #TPIDRROEL0_CURR_CPU .endm #endif /* _ASMLANGUAGE */ #endif /* _MACRO_PRIV_INC_ */