Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
0f66bbf2
Unverified
Commit
0f66bbf2
authored
Mar 22, 2018
by
davidcunado-arm
Committed by
GitHub
Mar 22, 2018
Browse files
Merge pull request #1307 from wangfeng-64/master
FVP: change the method for translating MPIDR values to a linear indices
parents
fbdadd01
39b21d19
Changes
1
Hide whitespace changes
Inline
Side-by-side
plat/arm/board/fvp/aarch64/fvp_helpers.S
View file @
0f66bbf2
...
...
@@ -178,19 +178,22 @@ func plat_is_my_cpu_primary
ret
endfunc
plat_is_my_cpu_primary
/
*
-----------------------------------------------------
/
*
-----------------------------------------------------
----------------
*
unsigned
int
plat_arm_calc_core_pos
(
u_register_t
mpidr
)
*
*
Function
to
calculate
the
core
position
on
FVP
.
*
*
(
ClusterId
*
FVP_MAX_CPUS_PER_CLUSTER
)
+
*
(
ClusterId
*
FVP_MAX_CPUS_PER_CLUSTER
*
FVP_MAX_PE_PER_CPU
)
+
*
(
CPUId
*
FVP_MAX_PE_PER_CPU
)
+
*
ThreadId
*
-----------------------------------------------------
*
*
which
can
be
simplified
as
:
*
*
((
ClusterId
*
FVP_MAX_CPUS_PER_CLUSTER
+
CPUId
)
*
FVP_MAX_PE_PER_CPU
)
*
+
ThreadId
*
---------------------------------------------------------------------
*/
func
plat_arm_calc_core_pos
mov
x3
,
x0
/
*
*
Check
for
MT
bit
in
MPIDR
.
If
not
set
,
shift
MPIDR
to
left
to
make
it
*
look
as
if
in
a
multi
-
threaded
implementation
.
...
...
@@ -205,9 +208,9 @@ func plat_arm_calc_core_pos
ubfx
x2
,
x3
,
#
MPIDR_AFF2_SHIFT
,
#
MPIDR_AFFINITY_BITS
/
*
Compute
linear
position
*/
mov
x4
,
#
FVP_MAX_
PE
_PER_C
PU
madd
x
0
,
x
1
,
x4
,
x
0
mov
x5
,
#
FVP_MAX_
CPUS
_PER_C
LUSTER
madd
x0
,
x
2
,
x5
,
x0
mov
x4
,
#
FVP_MAX_
CPUS
_PER_C
LUSTER
madd
x
1
,
x
2
,
x4
,
x
1
mov
x5
,
#
FVP_MAX_
PE
_PER_C
PU
madd
x0
,
x
1
,
x5
,
x0
ret
endfunc
plat_arm_calc_core_pos
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment