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
22bcf51e
Unverified
Commit
22bcf51e
authored
Apr 13, 2018
by
Dimitris Papastamos
Committed by
GitHub
Apr 13, 2018
Browse files
Merge pull request #1355 from jonathanwright-ARM/jw/REVIDR-errata-workaround
Check presence of hardware fix for 2 errata on Cortex A53
parents
0f17a683
fe634fa6
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/lib/cpus/aarch64/cpu_macros.S
View file @
22bcf51e
...
...
@@ -230,6 +230,7 @@ CPU_OPS_SIZE = .
/
*
Check
whether
errata
applies
*/
mov
x0
,
\
_rev_var
/
*
Shall
clobber
:
x0
-
x7
*/
bl
check_errata_
\
_id
.
ifeq
\
_chosen
...
...
lib/cpus/aarch64/cortex_a53.S
View file @
22bcf51e
/*
*
Copyright
(
c
)
2014
-
201
7
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2014
-
201
8
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
SPDX
-
License
-
Identifier
:
BSD
-
3
-
Clause
*/
...
...
@@ -9,6 +9,7 @@
#include <cortex_a53.h>
#include <cpu_macros.S>
#include <debug.h>
#include <errata_report.h>
#include <plat_macros.S>
#if A53_DISABLE_NON_TEMPORAL_HINT
...
...
@@ -144,8 +145,23 @@ endfunc check_errata_855873
*
This
workaround
is
statically
enabled
at
build
time
.
*/
func
check_errata_835769
mov
x1
,
#
0x04
b
cpu_rev_var_ls
cmp
x0
,
#
0x04
b.hi
errata_not_applies
/
*
*
Fix
potentially
available
for
revisions
r0p2
,
r0p3
and
r0p4
.
*
If
r0p2
,
r0p3
or
r0p4
; check for fix in REVIDR, else exit.
*/
cmp
x0
,
#
0x01
mov
x0
,
#
ERRATA_APPLIES
b.ls
exit_check_errata_835769
/
*
Load
REVIDR
.
*/
mrs
x1
,
revidr_el1
/
*
If
REVIDR
[
7
]
is
set
(
fix
exists
)
set
ERRATA_NOT_APPLIES
,
else
exit
.
*/
tbz
x1
,
#
7
,
exit_check_errata_835769
errata_not_applies
:
mov
x0
,
#
ERRATA_NOT_APPLIES
exit_check_errata_835769
:
ret
endfunc
check_errata_835769
/*
...
...
@@ -154,8 +170,22 @@ endfunc check_errata_835769
*
This
workaround
is
statically
enabled
at
build
time
.
*/
func
check_errata_843419
mov
x1
,
#
0x04
b
cpu_rev_var_ls
mov
x1
,
#
ERRATA_APPLIES
mov
x2
,
#
ERRATA_NOT_APPLIES
cmp
x0
,
#
0x04
csel
x0
,
x1
,
x2
,
ls
/
*
*
Fix
potentially
available
for
revision
r0p4
.
*
If
r0p4
check
for
fix
in
REVIDR
,
else
exit
.
*/
b.ne
exit_check_errata_843419
/
*
Load
REVIDR
.
*/
mrs
x3
,
revidr_el1
/
*
If
REVIDR
[
8
]
is
set
(
fix
exists
)
set
ERRATA_NOT_APPLIES
,
else
exit
.
*/
tbz
x3
,
#
8
,
exit_check_errata_843419
mov
x0
,
x2
exit_check_errata_843419
:
ret
endfunc
check_errata_843419
/
*
-------------------------------------------------
...
...
lib/cpus/aarch64/cpu_helpers.S
View file @
22bcf51e
...
...
@@ -198,6 +198,8 @@ endfunc cpu_get_rev_var
*
Compare
the
CPU
's revision-variant (x0) with a given value (x1), for errata
*
application
purposes
.
If
the
revision
-
variant
is
less
than
or
same
as
a
given
*
value
,
indicates
that
errata
applies
; otherwise not.
*
*
Shall
clobber
:
x0
-
x3
*/
.
globl
cpu_rev_var_ls
func
cpu_rev_var_ls
...
...
@@ -212,6 +214,8 @@ endfunc cpu_rev_var_ls
*
Compare
the
CPU
's revision-variant (x0) with a given value (x1), for errata
*
application
purposes
.
If
the
revision
-
variant
is
higher
than
or
same
as
a
*
given
value
,
indicates
that
errata
applies
; otherwise not.
*
*
Shall
clobber
:
x0
-
x3
*/
.
globl
cpu_rev_var_hs
func
cpu_rev_var_hs
...
...
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