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
41bd1882
Unverified
Commit
41bd1882
authored
Feb 19, 2019
by
Antonio Niño Díaz
Committed by
GitHub
Feb 19, 2019
Browse files
Merge pull request #1825 from antonio-nino-diaz-arm/an/csv2
Update macro to check need for CVE-2017-5715 mitigation
parents
fa233ac9
ff6f62e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/lib/cpus/aarch64/cpu_macros.S
View file @
41bd1882
/*
*
Copyright
(
c
)
2014
-
201
8
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
Copyright
(
c
)
2014
-
201
9
,
ARM
Limited
and
Contributors
.
All
rights
reserved
.
*
*
SPDX
-
License
-
Identifier
:
BSD
-
3
-
Clause
*/
...
...
@@ -7,6 +7,7 @@
#define CPU_MACROS_S
#include <arch.h>
#include <assert_macros.S>
#include <lib/cpus/errata_report.h>
#define CPU_IMPL_PN_MASK (MIDR_IMPL_MASK << MIDR_IMPL_SHIFT) | \
...
...
@@ -263,11 +264,22 @@
mrs
\
_reg
,
id_aa64pfr0_el1
ubfx
\
_reg
,
\
_reg
,
#
ID_AA64PFR0_CSV2_SHIFT
,
#
ID_AA64PFR0_CSV2_LENGTH
/
*
*
If
the
field
equals
to
1
then
branch
targets
trained
in
one
*
context
cannot
affect
speculative
execution
in
a
different
context
.
*
If
the
field
equals
1
,
branch
targets
trained
in
one
context
cannot
*
affect
speculative
execution
in
a
different
context
.
*
*
If
the
field
equals
2
,
it
means
that
the
system
is
also
aware
of
*
SCXTNUM_ELx
register
contexts
.
We
aren
't using them in the TF, so we
*
expect
users
of
the
registers
to
do
the
right
thing
.
*
*
Only
apply
mitigations
if
the
value
of
this
field
is
0
.
*/
cmp
\
_reg
,
#
1
beq
\
_label
#if ENABLE_ASSERTIONS
cmp
\
_reg
,
#
3
/*
Only
values
0
to
2
are
expected
*/
ASM_ASSERT
(
lo
)
#endif
cmp
\
_reg
,
#
0
bne
\
_label
.
endm
/
*
...
...
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