aboutsummaryrefslogtreecommitdiff
path: root/core/arch/arm/plat-rockchip/core_pos_a32.S
blob: e53172143592e8ada0426bdbeea99bdda933fa5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* SPDX-License-Identifier: BSD-2-Clause */
/*
 * Copyright (c) 2017, Linaro Limited
 */

#include <asm.S>
#include <arm.h>
#include <arm32_macros.S>

FUNC get_core_pos_mpidr , :
UNWIND( .fnstart)
	/*
	 * Because mpidr is designed mistake in hardware, ie. core0 is 0xf00,
	 * core1 is 0xf01..., so we need implement the function to correct this.
	 */
	and	r0, r0, #MPIDR_CPU_MASK
	bx	lr
UNWIND( .fnend)
END_FUNC get_core_pos_mpidr