1# 2# Copyright (c) 2014-2017, ARM Limited and Contributors. All rights reserved. 3# 4# SPDX-License-Identifier: BSD-3-Clause 5# 6 7# Cortex A57 specific optimisation to skip L1 cache flush when 8# cluster is powered down. 9SKIP_A57_L1_FLUSH_PWR_DWN ?=0 10 11# Flag to disable the cache non-temporal hint. 12# It is enabled by default. 13A53_DISABLE_NON_TEMPORAL_HINT ?=1 14 15# Flag to disable the cache non-temporal hint. 16# It is enabled by default. 17A57_DISABLE_NON_TEMPORAL_HINT ?=1 18 19WORKAROUND_CVE_2017_5715 ?=1 20WORKAROUND_CVE_2018_3639 ?=1 21 22# Process SKIP_A57_L1_FLUSH_PWR_DWN flag 23$(eval $(call assert_boolean,SKIP_A57_L1_FLUSH_PWR_DWN)) 24$(eval $(call add_define,SKIP_A57_L1_FLUSH_PWR_DWN)) 25 26# Process A53_DISABLE_NON_TEMPORAL_HINT flag 27$(eval $(call assert_boolean,A53_DISABLE_NON_TEMPORAL_HINT)) 28$(eval $(call add_define,A53_DISABLE_NON_TEMPORAL_HINT)) 29 30# Process A57_DISABLE_NON_TEMPORAL_HINT flag 31$(eval $(call assert_boolean,A57_DISABLE_NON_TEMPORAL_HINT)) 32$(eval $(call add_define,A57_DISABLE_NON_TEMPORAL_HINT)) 33 34# Process WORKAROUND_CVE_2017_5715 flag 35$(eval $(call assert_boolean,WORKAROUND_CVE_2017_5715)) 36$(eval $(call add_define,WORKAROUND_CVE_2017_5715)) 37 38# Process WORKAROUND_CVE_2018_3639 flag 39$(eval $(call assert_boolean,WORKAROUND_CVE_2018_3639)) 40$(eval $(call add_define,WORKAROUND_CVE_2018_3639)) 41 42# CPU Errata Build flags. 43# These should be enabled by the platform if the erratum workaround needs to be 44# applied. 45 46# Flag to apply erratum 826319 workaround during reset. This erratum applies 47# only to revision <= r0p2 of the Cortex A53 cpu. 48ERRATA_A53_826319 ?=0 49 50# Flag to apply erratum 835769 workaround at compile and link time. This 51# erratum applies to revision <= r0p4 of the Cortex A53 cpu. Enabling this 52# workaround can lead the linker to create "*.stub" sections. 53ERRATA_A53_835769 ?=0 54 55# Flag to apply erratum 836870 workaround during reset. This erratum applies 56# only to revision <= r0p3 of the Cortex A53 cpu. From r0p4 and onwards, this 57# erratum workaround is enabled by default in hardware. 58ERRATA_A53_836870 ?=0 59 60# Flag to apply erratum 843419 workaround at link time. 61# This erratum applies to revision <= r0p4 of the Cortex A53 cpu. Enabling this 62# workaround could lead the linker to emit "*.stub" sections which are 4kB 63# aligned. 64ERRATA_A53_843419 ?=0 65 66# Flag to apply errata 855873 during reset. This errata applies to all 67# revisions of the Cortex A53 CPU, but this firmware workaround only works 68# for revisions r0p3 and higher. Earlier revisions are taken care 69# of by the rich OS. 70ERRATA_A53_855873 ?=0 71 72# Flag to apply erratum 806969 workaround during reset. This erratum applies 73# only to revision r0p0 of the Cortex A57 cpu. 74ERRATA_A57_806969 ?=0 75 76# Flag to apply erratum 813419 workaround during reset. This erratum applies 77# only to revision r0p0 of the Cortex A57 cpu. 78ERRATA_A57_813419 ?=0 79 80# Flag to apply erratum 813420 workaround during reset. This erratum applies 81# only to revision r0p0 of the Cortex A57 cpu. 82ERRATA_A57_813420 ?=0 83 84# Flag to apply erratum 826974 workaround during reset. This erratum applies 85# only to revision <= r1p1 of the Cortex A57 cpu. 86ERRATA_A57_826974 ?=0 87 88# Flag to apply erratum 826977 workaround during reset. This erratum applies 89# only to revision <= r1p1 of the Cortex A57 cpu. 90ERRATA_A57_826977 ?=0 91 92# Flag to apply erratum 828024 workaround during reset. This erratum applies 93# only to revision <= r1p1 of the Cortex A57 cpu. 94ERRATA_A57_828024 ?=0 95 96# Flag to apply erratum 829520 workaround during reset. This erratum applies 97# only to revision <= r1p2 of the Cortex A57 cpu. 98ERRATA_A57_829520 ?=0 99 100# Flag to apply erratum 833471 workaround during reset. This erratum applies 101# only to revision <= r1p2 of the Cortex A57 cpu. 102ERRATA_A57_833471 ?=0 103 104# Flag to apply erratum 855972 workaround during reset. This erratum applies 105# only to revision <= r1p3 of the Cortex A57 cpu. 106ERRATA_A57_859972 ?=0 107 108# Flag to apply erratum 855971 workaround during reset. This erratum applies 109# only to revision <= r0p3 of the Cortex A72 cpu. 110ERRATA_A72_859971 ?=0 111 112# Process ERRATA_A53_826319 flag 113$(eval $(call assert_boolean,ERRATA_A53_826319)) 114$(eval $(call add_define,ERRATA_A53_826319)) 115 116# Process ERRATA_A53_835769 flag 117$(eval $(call assert_boolean,ERRATA_A53_835769)) 118$(eval $(call add_define,ERRATA_A53_835769)) 119 120# Process ERRATA_A53_836870 flag 121$(eval $(call assert_boolean,ERRATA_A53_836870)) 122$(eval $(call add_define,ERRATA_A53_836870)) 123 124# Process ERRATA_A53_843419 flag 125$(eval $(call assert_boolean,ERRATA_A53_843419)) 126$(eval $(call add_define,ERRATA_A53_843419)) 127 128# Process ERRATA_A53_855873 flag 129$(eval $(call assert_boolean,ERRATA_A53_855873)) 130$(eval $(call add_define,ERRATA_A53_855873)) 131 132# Process ERRATA_A57_806969 flag 133$(eval $(call assert_boolean,ERRATA_A57_806969)) 134$(eval $(call add_define,ERRATA_A57_806969)) 135 136# Process ERRATA_A57_813419 flag 137$(eval $(call assert_boolean,ERRATA_A57_813419)) 138$(eval $(call add_define,ERRATA_A57_813419)) 139 140# Process ERRATA_A57_813420 flag 141$(eval $(call assert_boolean,ERRATA_A57_813420)) 142$(eval $(call add_define,ERRATA_A57_813420)) 143 144# Process ERRATA_A57_826974 flag 145$(eval $(call assert_boolean,ERRATA_A57_826974)) 146$(eval $(call add_define,ERRATA_A57_826974)) 147 148# Process ERRATA_A57_826977 flag 149$(eval $(call assert_boolean,ERRATA_A57_826977)) 150$(eval $(call add_define,ERRATA_A57_826977)) 151 152# Process ERRATA_A57_828024 flag 153$(eval $(call assert_boolean,ERRATA_A57_828024)) 154$(eval $(call add_define,ERRATA_A57_828024)) 155 156# Process ERRATA_A57_829520 flag 157$(eval $(call assert_boolean,ERRATA_A57_829520)) 158$(eval $(call add_define,ERRATA_A57_829520)) 159 160# Process ERRATA_A57_833471 flag 161$(eval $(call assert_boolean,ERRATA_A57_833471)) 162$(eval $(call add_define,ERRATA_A57_833471)) 163 164# Process ERRATA_A57_859972 flag 165$(eval $(call assert_boolean,ERRATA_A57_859972)) 166$(eval $(call add_define,ERRATA_A57_859972)) 167 168# Process ERRATA_A72_859971 flag 169$(eval $(call assert_boolean,ERRATA_A72_859971)) 170$(eval $(call add_define,ERRATA_A72_859971)) 171 172# Errata build flags 173ifneq (${ERRATA_A53_843419},0) 174TF_LDFLAGS_aarch64 += --fix-cortex-a53-843419 175endif 176 177ifneq (${ERRATA_A53_835769},0) 178TF_CFLAGS_aarch64 += -mfix-cortex-a53-835769 179TF_LDFLAGS_aarch64 += --fix-cortex-a53-835769 180endif 181