1/* SPDX-License-Identifier: BSD-2-Clause */ 2/* 3 * Copyright (c) 2017, Linaro Limited 4 */ 5 6#include <asm.S> 7#include <arm.h> 8#include <arm32_macros.S> 9 10FUNC get_core_pos_mpidr , : 11 /* 12 * Because mpidr is designed mistake in hardware, ie. core0 is 0xf00, 13 * core1 is 0xf01..., so we need implement the function to correct this. 14 */ 15 and r0, r0, #MPIDR_CPU_MASK 16 bx lr 17END_FUNC get_core_pos_mpidr 18 19