Merge "errata: workaround for Neoverse V1 errata 1940577" into integration

This commit is contained in:
bipin.ravi 2021-07-20 00:09:18 +02:00 committed by TrustedFirmware Code Review
commit c31c82dfd4
3 changed files with 73 additions and 0 deletions

View File

@ -329,6 +329,10 @@ For Neoverse V1, the following errata build flags are defined :
CPU. This needs to be enabled only for revisions r0p0 and r1p0, it is fixed CPU. This needs to be enabled only for revisions r0p0 and r1p0, it is fixed
in r1p1. in r1p1.
- ``ERRATA_V1_1940577``: This applies errata 1940577 workaround to Neoverse-V1
CPU. This needs to be enabled only for revision r1p0 and r1p1 of the
CPU.
DSU Errata Workarounds DSU Errata Workarounds
---------------------- ----------------------

View File

@ -49,6 +49,61 @@ func check_errata_1791573
b cpu_rev_var_ls b cpu_rev_var_ls
endfunc check_errata_1791573 endfunc check_errata_1791573
/* --------------------------------------------------
* Errata Workaround for Neoverse V1 Erratum #1940577
* This applies to revisions r1p0 - r1p1 and is open.
* It also exists in r0p0 but there is no fix in that
* revision.
* Inputs:
* x0: variant[4:7] and revision[0:3] of current cpu.
* Shall clobber: x0-x17
* --------------------------------------------------
*/
func errata_neoverse_v1_1940577_wa
/* Compare x0 against revisions r1p0 - r1p1 */
mov x17, x30
bl check_errata_1940577
cbz x0, 1f
mov x0, #0
msr S3_6_C15_C8_0, x0
ldr x0, =0x10E3900002
msr S3_6_C15_C8_2, x0
ldr x0, =0x10FFF00083
msr S3_6_C15_C8_3, x0
ldr x0, =0x2001003FF
msr S3_6_C15_C8_1, x0
mov x0, #1
msr S3_6_C15_C8_0, x0
ldr x0, =0x10E3800082
msr S3_6_C15_C8_2, x0
ldr x0, =0x10FFF00083
msr S3_6_C15_C8_3, x0
ldr x0, =0x2001003FF
msr S3_6_C15_C8_1, x0
mov x0, #2
msr S3_6_C15_C8_0, x0
ldr x0, =0x10E3800200
msr S3_6_C15_C8_2, x0
ldr x0, =0x10FFF003E0
msr S3_6_C15_C8_3, x0
ldr x0, =0x2001003FF
msr S3_6_C15_C8_1, x0
isb
1:
ret x17
endfunc errata_neoverse_v1_1940577_wa
func check_errata_1940577
/* Applies to revisions r1p0 - r1p1. */
mov x1, #0x10
mov x2, #0x11
b cpu_rev_var_range
endfunc check_errata_1940577
/* --------------------------------------------- /* ---------------------------------------------
* HW will do the cache maintenance while powering down * HW will do the cache maintenance while powering down
* --------------------------------------------- * ---------------------------------------------
@ -80,6 +135,7 @@ func neoverse_v1_errata_report
* checking functions of each errata. * checking functions of each errata.
*/ */
report_errata ERRATA_V1_1791573, neoverse_v1, 1791573 report_errata ERRATA_V1_1791573, neoverse_v1, 1791573
report_errata ERRATA_V1_1940577, neoverse_v1, 1940577
ldp x8, x30, [sp], #16 ldp x8, x30, [sp], #16
ret ret
@ -98,6 +154,11 @@ func neoverse_v1_reset_func
bl errata_neoverse_v1_1791573_wa bl errata_neoverse_v1_1791573_wa
#endif #endif
#if ERRATA_V1_1940577
mov x0, x18
bl errata_neoverse_v1_1940577_wa
#endif
ret x19 ret x19
endfunc neoverse_v1_reset_func endfunc neoverse_v1_reset_func

View File

@ -376,6 +376,10 @@ ERRATA_N1_1946160 ?=0
# to revisions r0p0 and r1p0 of the Neoverse V1 core, and was fixed in r1p1. # to revisions r0p0 and r1p0 of the Neoverse V1 core, and was fixed in r1p1.
ERRATA_V1_1791573 ?=0 ERRATA_V1_1791573 ?=0
# Flag to apply erratum 1940577 workaround during reset. This erratum applies
# to revisions r1p0 and r1p1 of the Neoverse V1 cpu.
ERRATA_V1_1940577 ?=0
# Flag to apply DSU erratum 798953. This erratum applies to DSUs revision r0p0. # Flag to apply DSU erratum 798953. This erratum applies to DSUs revision r0p0.
# Applying the workaround results in higher DSU power consumption on idle. # Applying the workaround results in higher DSU power consumption on idle.
ERRATA_DSU_798953 ?=0 ERRATA_DSU_798953 ?=0
@ -685,6 +689,10 @@ $(eval $(call add_define,ERRATA_N1_1946160))
$(eval $(call assert_boolean,ERRATA_V1_1791573)) $(eval $(call assert_boolean,ERRATA_V1_1791573))
$(eval $(call add_define,ERRATA_V1_1791573)) $(eval $(call add_define,ERRATA_V1_1791573))
# Process ERRATA_V1_1940577 flag
$(eval $(call assert_boolean,ERRATA_V1_1940577))
$(eval $(call add_define,ERRATA_V1_1940577))
# Process ERRATA_DSU_798953 flag # Process ERRATA_DSU_798953 flag
$(eval $(call assert_boolean,ERRATA_DSU_798953)) $(eval $(call assert_boolean,ERRATA_DSU_798953))
$(eval $(call add_define,ERRATA_DSU_798953)) $(eval $(call add_define,ERRATA_DSU_798953))