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
ece32c4f
Commit
ece32c4f
authored
Oct 28, 2015
by
danh-arm
Browse files
Merge pull request #416 from davwan01/dw/css-common
Allow CSS to redefine function `plat_arm_calc_core_pos`
parents
368bb87b
371d4399
Changes
2
Hide whitespace changes
Inline
Side-by-side
plat/arm/board/juno/aarch64/juno_helpers.S
View file @
ece32c4f
...
...
@@ -37,7 +37,7 @@
.
globl
plat_reset_handler
.
globl
plat_arm_calc_core_pos
/
*
--------------------------------------------------------------------
*
void
plat_reset_handler
(
void
)
;
...
...
@@ -117,3 +117,12 @@ ret:
isb
ret
endfunc
plat_reset_handler
/
*
-----------------------------------------------------
*
unsigned
int
plat_arm_calc_core_pos
(
uint64_t
mpidr
)
*
Helper
function
to
calculate
the
core
position
.
*
-----------------------------------------------------
*/
func
plat_arm_calc_core_pos
b
css_calc_core_pos_swap_cluster
endfunc
plat_arm_calc_core_pos
plat/arm/css/common/aarch64/css_helpers.S
View file @
ece32c4f
...
...
@@ -34,7 +34,7 @@
.
weak
plat_secondary_cold_boot_setup
.
weak
plat_get_my_entrypoint
.
globl
plat_arm
_calc_core_pos
.
globl
css
_calc_core_pos
_swap_cluster
.
weak
plat_is_my_cpu_primary
/
*
-----------------------------------------------------
...
...
@@ -73,20 +73,20 @@ func plat_get_my_entrypoint
endfunc
plat_get_my_entrypoint
/
*
-----------------------------------------------------------
*
unsigned
int
plat_arm
_calc_core_pos
(
uint64_t
mpidr
)
*
F
unction
to
calculate
the
core
position
by
*
unsigned
int
css
_calc_core_pos
_swap_cluster
(
uint64_t
mpidr
)
*
Utility
f
unction
to
calculate
the
core
position
by
*
swapping
the
cluster
order
.
This
is
necessary
in
order
to
*
match
the
format
of
the
boot
information
passed
by
the
SCP
*
and
read
in
plat_is_my_cpu_primary
below
.
*
-----------------------------------------------------------
*/
func
plat_arm
_calc_core_pos
func
css
_calc_core_pos
_swap_cluster
and
x1
,
x0
,
#
MPIDR_CPU_MASK
and
x0
,
x0
,
#
MPIDR_CLUSTER_MASK
eor
x0
,
x0
,
#(
1
<<
MPIDR_AFFINITY_BITS
)
//
swap
cluster
order
add
x0
,
x1
,
x0
,
LSR
#
6
ret
endfunc
plat_arm
_calc_core_pos
endfunc
css
_calc_core_pos
_swap_cluster
/
*
-----------------------------------------------------
*
unsigned
int
plat_is_my_cpu_primary
(
void
)
;
...
...
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