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
0b77197b
Commit
0b77197b
authored
Apr 14, 2016
by
Sandrine Bailleux
Browse files
Add support for Cortex-A57 erratum 829520 workaround
Change-Id: Ia2ce8aa752efb090cfc734c1895c8f2539e82439
parent
a8b1c769
Changes
4
Hide whitespace changes
Inline
Side-by-side
docs/cpu-specific-build-macros.md
View file @
0b77197b
...
@@ -66,6 +66,9 @@ For Cortex-A57, following errata build flags are defined :
...
@@ -66,6 +66,9 @@ For Cortex-A57, following errata build flags are defined :
*
`ERRATA_A57_828024`
: This applies errata 828024 workaround to Cortex-A57
*
`ERRATA_A57_828024`
: This applies errata 828024 workaround to Cortex-A57
CPU. This needs to be enabled only for revision <= r1p1 of the CPU.
CPU. This needs to be enabled only for revision <= r1p1 of the CPU.
*
`ERRATA_A57_829520`
: This applies errata 829520 workaround to Cortex-A57
CPU. This needs to be enabled only for revision <= r1p2 of the CPU.
3.
CPU Specific optimizations
3.
CPU Specific optimizations
------------------------------
------------------------------
...
...
include/lib/cpus/aarch64/cortex_a57.h
View file @
0b77197b
...
@@ -67,6 +67,7 @@
...
@@ -67,6 +67,7 @@
#define CPUACTLR_DCC_AS_DCCI (1 << 44)
#define CPUACTLR_DCC_AS_DCCI (1 << 44)
#define CPUACTLR_DIS_STREAMING (3 << 27)
#define CPUACTLR_DIS_STREAMING (3 << 27)
#define CPUACTLR_DIS_L1_STREAMING (3 << 25)
#define CPUACTLR_DIS_L1_STREAMING (3 << 25)
#define CPUACTLR_DIS_INDIRECT_PREDICTOR (1 << 4)
/*******************************************************************************
/*******************************************************************************
* L2 Control register specific definitions.
* L2 Control register specific definitions.
...
...
lib/cpus/aarch64/cortex_a57.S
View file @
0b77197b
...
@@ -225,6 +225,32 @@ apply_828024:
...
@@ -225,6 +225,32 @@ apply_828024:
ret
ret
endfunc
errata_a57_828024_wa
endfunc
errata_a57_828024_wa
/
*
---------------------------------------------------
*
Errata
Workaround
for
Cortex
A57
Errata
#
829520
.
*
This
applies
only
to
revision
<=
r1p2
of
Cortex
A57
.
*
Inputs
:
*
x0
:
variant
[
4
:
7
]
and
revision
[
0
:
3
]
of
current
cpu
.
*
Clobbers
:
x0
-
x5
*
---------------------------------------------------
*/
func
errata_a57_829520_wa
/
*
*
Compare
x0
against
revision
r1p2
*/
cmp
x0
,
#
0x12
b.ls
apply_829520
#if LOG_LEVEL >= LOG_LEVEL_VERBOSE
b
print_revision_warning
#else
ret
#endif
apply_829520
:
mrs
x1
,
CPUACTLR_EL1
orr
x1
,
x1
,
#
CPUACTLR_DIS_INDIRECT_PREDICTOR
msr
CPUACTLR_EL1
,
x1
ret
endfunc
errata_a57_829520_wa
/
*
-------------------------------------------------
/
*
-------------------------------------------------
*
The
CPU
Ops
reset
function
for
Cortex
-
A57
.
*
The
CPU
Ops
reset
function
for
Cortex
-
A57
.
*
Clobbers
:
x0
-
x5
,
x15
,
x19
,
x30
*
Clobbers
:
x0
-
x5
,
x15
,
x19
,
x30
...
@@ -267,6 +293,12 @@ func cortex_a57_reset_func
...
@@ -267,6 +293,12 @@ func cortex_a57_reset_func
mov
x0
,
x15
mov
x0
,
x15
bl
errata_a57_828024_wa
bl
errata_a57_828024_wa
#endif
#endif
#if ERRATA_A57_829520
mov
x0
,
x15
bl
errata_a57_829520_wa
#endif
/
*
---------------------------------------------
/
*
---------------------------------------------
*
Enable
the
SMP
bit
.
*
Enable
the
SMP
bit
.
*
---------------------------------------------
*
---------------------------------------------
...
...
lib/cpus/cpu-ops.mk
View file @
0b77197b
...
@@ -82,6 +82,10 @@ ERRATA_A57_826974 ?=0
...
@@ -82,6 +82,10 @@ ERRATA_A57_826974 ?=0
# only to revision <= r1p1 of the Cortex A57 cpu.
# only to revision <= r1p1 of the Cortex A57 cpu.
ERRATA_A57_828024
?=
0
ERRATA_A57_828024
?=
0
# Flag to apply erratum 829520 workaround during reset. This erratum applies
# only to revision <= r1p2 of the Cortex A57 cpu.
ERRATA_A57_829520
?=
0
# Process ERRATA_A53_826319 flag
# Process ERRATA_A53_826319 flag
$(eval
$(call
assert_boolean,ERRATA_A53_826319))
$(eval
$(call
assert_boolean,ERRATA_A53_826319))
$(eval
$(call
add_define,ERRATA_A53_826319))
$(eval
$(call
add_define,ERRATA_A53_826319))
...
@@ -105,3 +109,7 @@ $(eval $(call add_define,ERRATA_A57_826974))
...
@@ -105,3 +109,7 @@ $(eval $(call add_define,ERRATA_A57_826974))
# Process ERRATA_A57_828024 flag
# Process ERRATA_A57_828024 flag
$(eval
$(call
assert_boolean,ERRATA_A57_828024))
$(eval
$(call
assert_boolean,ERRATA_A57_828024))
$(eval
$(call
add_define,ERRATA_A57_828024))
$(eval
$(call
add_define,ERRATA_A57_828024))
# Process ERRATA_A57_829520 flag
$(eval
$(call
assert_boolean,ERRATA_A57_829520))
$(eval
$(call
add_define,ERRATA_A57_829520))
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