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
1278f363
Unverified
Commit
1278f363
authored
Oct 18, 2018
by
Soby Mathew
Committed by
GitHub
Oct 18, 2018
Browse files
Merge pull request #1631 from deepan02/deepak-arm/relocate-jump_if_cpu_midr
plat/arm: relocate the jump_if_cpu_midr macro.
parents
7be05cd5
da3b038f
Changes
6
Hide whitespace changes
Inline
Side-by-side
include/lib/cpus/aarch32/cpu_macros.S
View file @
1278f363
...
...
@@ -214,5 +214,18 @@
bl
errata_print_msg
.
endm
#endif
/
*
*
Helper
macro
that
reads
the
part
number
of
the
current
CPU
and
jumps
*
to
the
given
label
if
it
matches
the
CPU
MIDR
provided
.
*
*
Clobbers
:
r0
-
r1
*/
.
macro
jump_if_cpu_midr
_cpu_midr
,
_label
ldcopr
r0
,
MIDR
ubfx
r0
,
r0
,
#
MIDR_PN_SHIFT
,
#
12
ldr
r1
,
=((
\
_cpu_midr
>>
MIDR_PN_SHIFT
)
&
MIDR_PN_MASK
)
cmp
r0
,
r1
beq
\
_label
.
endm
#endif /* __CPU_MACROS_S__ */
include/lib/cpus/aarch64/cpu_macros.S
View file @
1278f363
...
...
@@ -272,3 +272,17 @@
cmp
\
_reg
,
#
1
beq
\
_label
.
endm
/
*
*
Helper
macro
that
reads
the
part
number
of
the
current
*
CPU
and
jumps
to
the
given
label
if
it
matches
the
CPU
*
MIDR
provided
.
*
*
Clobbers
x0
.
*/
.
macro
jump_if_cpu_midr
_cpu_midr
,
_label
mrs
x0
,
midr_el1
ubfx
x0
,
x0
,
MIDR_PN_SHIFT
,
#
12
cmp
w0
,
#((
\
_cpu_midr
>>
MIDR_PN_SHIFT
)
&
MIDR_PN_MASK
)
b.eq
\
_label
.
endm
plat/arm/board/juno/aarch32/juno_helpers.S
View file @
1278f363
...
...
@@ -10,6 +10,7 @@
#include <cortex_a53.h>
#include <cortex_a57.h>
#include <cortex_a72.h>
#include <cpu_macros.S>
#include <v2m_def.h>
#include "../juno_def.h"
...
...
@@ -33,21 +34,6 @@
beq
\
_handler
.
endm
/
*
--------------------------------------------------------------------
*
Helper
macro
that
reads
the
part
number
of
the
current
CPU
and
jumps
*
to
the
given
label
if
it
matches
the
CPU
MIDR
provided
.
*
*
Clobbers
r0
.
*
--------------------------------------------------------------------
*/
.
macro
jump_if_cpu_midr
_cpu_midr
,
_label
ldcopr
r0
,
MIDR
ubfx
r0
,
r0
,
#
MIDR_PN_SHIFT
,
#
12
ldr
r1
,
=((
\
_cpu_midr
>>
MIDR_PN_SHIFT
)
&
MIDR_PN_MASK
)
cmp
r0
,
r1
beq
\
_label
.
endm
/
*
--------------------------------------------------------------------
*
Platform
reset
handler
for
Juno
R0
.
*
...
...
plat/arm/board/juno/aarch64/juno_helpers.S
View file @
1278f363
...
...
@@ -39,20 +39,6 @@
b.eq
\
_handler
.
endm
/
*
--------------------------------------------------------------------
*
Helper
macro
that
reads
the
part
number
of
the
current
CPU
and
jumps
*
to
the
given
label
if
it
matches
the
CPU
MIDR
provided
.
*
*
Clobbers
x0
.
*
--------------------------------------------------------------------
*/
.
macro
jump_if_cpu_midr
_cpu_midr
,
_label
mrs
x0
,
midr_el1
ubfx
x0
,
x0
,
MIDR_PN_SHIFT
,
#
12
cmp
w0
,
#((
\
_cpu_midr
>>
MIDR_PN_SHIFT
)
&
MIDR_PN_MASK
)
b.eq
\
_label
.
endm
/
*
--------------------------------------------------------------------
*
Platform
reset
handler
for
Juno
R0
.
*
...
...
plat/arm/css/sgi/aarch64/sgi_helper.S
View file @
1278f363
...
...
@@ -8,6 +8,7 @@
#include <asm_macros.S>
#include <platform_def.h>
#include <cortex_a75.h>
#include <cpu_macros.S>
.
globl
plat_arm_calc_core_pos
.
globl
plat_reset_handler
...
...
@@ -48,21 +49,6 @@ func plat_arm_calc_core_pos
ret
endfunc
plat_arm_calc_core_pos
/
*
------------------------------------------------------
*
Helper
macro
that
reads
the
part
number
of
the
current
*
CPU
and
jumps
to
the
given
label
if
it
matches
the
CPU
*
MIDR
provided
.
*
*
Clobbers
x0
.
*
-----------------------------------------------------
*/
.
macro
jump_if_cpu_midr
_cpu_midr
,
_label
mrs
x0
,
midr_el1
ubfx
x0
,
x0
,
MIDR_PN_SHIFT
,
#
12
cmp
w0
,
#((
\
_cpu_midr
>>
MIDR_PN_SHIFT
)
&
MIDR_PN_MASK
)
b.eq
\
_label
.
endm
/
*
-----------------------------------------------------
*
void
plat_reset_handler
(
void
)
;
*
...
...
plat/arm/css/sgm/aarch64/css_sgm_helpers.S
View file @
1278f363
...
...
@@ -9,6 +9,7 @@
#include <platform_def.h>
#include <cortex_a75.h>
#include <cortex_a55.h>
#include <cpu_macros.S>
.
globl
plat_arm_calc_core_pos
.
globl
plat_reset_handler
...
...
@@ -50,21 +51,6 @@ func plat_arm_calc_core_pos
ret
endfunc
plat_arm_calc_core_pos
/
*
------------------------------------------------------
*
Helper
macro
that
reads
the
part
number
of
the
current
*
CPU
and
jumps
to
the
given
label
if
it
matches
the
CPU
*
MIDR
provided
.
*
*
Clobbers
x0
.
*
-----------------------------------------------------
*/
.
macro
jump_if_cpu_midr
_cpu_midr
,
_label
mrs
x0
,
midr_el1
ubfx
x0
,
x0
,
MIDR_PN_SHIFT
,
#
12
cmp
w0
,
#((
\
_cpu_midr
>>
MIDR_PN_SHIFT
)
&
MIDR_PN_MASK
)
b.eq
\
_label
.
endm
/
*
-----------------------------------------------------
*
void
plat_reset_handler
(
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