xref: /rk3399_ARM-atf/lib/cpus/cpu-ops.mk (revision dcbfbcb5de2c0110cf397dae62a4f6cf7ad2a6a2)
15541bb3fSSoby Mathew#
2f2d6b4eeSManish Pandey# Copyright (c) 2014-2020, ARM Limited and Contributors. All rights reserved.
3cd0ea184SVarun Wadekar# Copyright (c) 2020, NVIDIA Corporation. All rights reserved.
45541bb3fSSoby Mathew#
582cb2c1aSdp-arm# SPDX-License-Identifier: BSD-3-Clause
65541bb3fSSoby Mathew#
75541bb3fSSoby Mathew
85541bb3fSSoby Mathew# Cortex A57 specific optimisation to skip L1 cache flush when
95541bb3fSSoby Mathew# cluster is powered down.
105541bb3fSSoby MathewSKIP_A57_L1_FLUSH_PWR_DWN	?=0
115541bb3fSSoby Mathew
1254035fc4SSandrine Bailleux# Flag to disable the cache non-temporal hint.
1354035fc4SSandrine Bailleux# It is enabled by default.
1454035fc4SSandrine BailleuxA53_DISABLE_NON_TEMPORAL_HINT	?=1
1554035fc4SSandrine Bailleux
1654035fc4SSandrine Bailleux# Flag to disable the cache non-temporal hint.
1754035fc4SSandrine Bailleux# It is enabled by default.
1854035fc4SSandrine BailleuxA57_DISABLE_NON_TEMPORAL_HINT	?=1
1954035fc4SSandrine Bailleux
20cd0ea184SVarun Wadekar# Flag to enable higher performance non-cacheable load forwarding.
21cd0ea184SVarun Wadekar# It is disabled by default.
22cd0ea184SVarun WadekarA57_ENABLE_NONCACHEABLE_LOAD_FWD	?= 0
23cd0ea184SVarun Wadekar
24f62ad322SDimitris PapastamosWORKAROUND_CVE_2017_5715	?=1
25b8a25bbbSDimitris PapastamosWORKAROUND_CVE_2018_3639	?=1
26fe007b2eSDimitris PapastamosDYNAMIC_WORKAROUND_CVE_2018_3639	?=0
27f62ad322SDimitris Papastamos
28f2d6b4eeSManish Pandey# Flag to indicate internal or external Last level cache
29f2d6b4eeSManish Pandey# By default internal
30f2d6b4eeSManish PandeyNEOVERSE_N1_EXTERNAL_LLC	?=0
31f2d6b4eeSManish Pandey
32cd0ea184SVarun Wadekar# Process A57_ENABLE_NONCACHEABLE_LOAD_FWD flag
33cd0ea184SVarun Wadekar$(eval $(call assert_boolean,A57_ENABLE_NONCACHEABLE_LOAD_FWD))
34cd0ea184SVarun Wadekar$(eval $(call add_define,A57_ENABLE_NONCACHEABLE_LOAD_FWD))
35cd0ea184SVarun Wadekar
365541bb3fSSoby Mathew# Process SKIP_A57_L1_FLUSH_PWR_DWN flag
375541bb3fSSoby Mathew$(eval $(call assert_boolean,SKIP_A57_L1_FLUSH_PWR_DWN))
385541bb3fSSoby Mathew$(eval $(call add_define,SKIP_A57_L1_FLUSH_PWR_DWN))
395541bb3fSSoby Mathew
4054035fc4SSandrine Bailleux# Process A53_DISABLE_NON_TEMPORAL_HINT flag
4154035fc4SSandrine Bailleux$(eval $(call assert_boolean,A53_DISABLE_NON_TEMPORAL_HINT))
4254035fc4SSandrine Bailleux$(eval $(call add_define,A53_DISABLE_NON_TEMPORAL_HINT))
4354035fc4SSandrine Bailleux
4454035fc4SSandrine Bailleux# Process A57_DISABLE_NON_TEMPORAL_HINT flag
4554035fc4SSandrine Bailleux$(eval $(call assert_boolean,A57_DISABLE_NON_TEMPORAL_HINT))
4654035fc4SSandrine Bailleux$(eval $(call add_define,A57_DISABLE_NON_TEMPORAL_HINT))
4754035fc4SSandrine Bailleux
48f62ad322SDimitris Papastamos# Process WORKAROUND_CVE_2017_5715 flag
49f62ad322SDimitris Papastamos$(eval $(call assert_boolean,WORKAROUND_CVE_2017_5715))
50f62ad322SDimitris Papastamos$(eval $(call add_define,WORKAROUND_CVE_2017_5715))
515541bb3fSSoby Mathew
52b8a25bbbSDimitris Papastamos# Process WORKAROUND_CVE_2018_3639 flag
53b8a25bbbSDimitris Papastamos$(eval $(call assert_boolean,WORKAROUND_CVE_2018_3639))
54b8a25bbbSDimitris Papastamos$(eval $(call add_define,WORKAROUND_CVE_2018_3639))
55b8a25bbbSDimitris Papastamos
56fe007b2eSDimitris Papastamos$(eval $(call assert_boolean,DYNAMIC_WORKAROUND_CVE_2018_3639))
57fe007b2eSDimitris Papastamos$(eval $(call add_define,DYNAMIC_WORKAROUND_CVE_2018_3639))
58fe007b2eSDimitris Papastamos
59f2d6b4eeSManish Pandey$(eval $(call assert_boolean,NEOVERSE_N1_EXTERNAL_LLC))
60f2d6b4eeSManish Pandey$(eval $(call add_define,NEOVERSE_N1_EXTERNAL_LLC))
61f2d6b4eeSManish Pandey
62fe007b2eSDimitris Papastamosifneq (${DYNAMIC_WORKAROUND_CVE_2018_3639},0)
63fe007b2eSDimitris Papastamos    ifeq (${WORKAROUND_CVE_2018_3639},0)
64fe007b2eSDimitris Papastamos        $(error "Error: WORKAROUND_CVE_2018_3639 must be 1 if DYNAMIC_WORKAROUND_CVE_2018_3639 is 1")
65fe007b2eSDimitris Papastamos    endif
66fe007b2eSDimitris Papastamosendif
67fe007b2eSDimitris Papastamos
68097b787aSSandrine Bailleux# CPU Errata Build flags.
69097b787aSSandrine Bailleux# These should be enabled by the platform if the erratum workaround needs to be
70097b787aSSandrine Bailleux# applied.
715541bb3fSSoby Mathew
72dd4cf2c7SJoel Hutton# Flag to apply erratum 794073 workaround when disabling mmu.
73dd4cf2c7SJoel HuttonERRATA_A9_794073	?=0
74dd4cf2c7SJoel Hutton
7575a1ada9SAmbroise Vincent# Flag to apply erratum 816470 workaround during power down. This erratum
7675a1ada9SAmbroise Vincent# applies only to revision >= r3p0 of the Cortex A15 cpu.
7775a1ada9SAmbroise VincentERRATA_A15_816470	?=0
7875a1ada9SAmbroise Vincent
795f2c690dSAmbroise Vincent# Flag to apply erratum 827671 workaround during reset. This erratum applies
805f2c690dSAmbroise Vincent# only to revision >= r3p0 of the Cortex A15 cpu.
815f2c690dSAmbroise VincentERRATA_A15_827671	?=0
825f2c690dSAmbroise Vincent
830b64c194SAmbroise Vincent# Flag to apply erratum 852421 workaround during reset. This erratum applies
840b64c194SAmbroise Vincent# only to revision <= r1p2 of the Cortex A17 cpu.
850b64c194SAmbroise VincentERRATA_A17_852421	?=0
860b64c194SAmbroise Vincent
87be10dcdeSAmbroise Vincent# Flag to apply erratum 852423 workaround during reset. This erratum applies
88be10dcdeSAmbroise Vincent# only to revision <= r1p2 of the Cortex A17 cpu.
89be10dcdeSAmbroise VincentERRATA_A17_852423	?=0
90be10dcdeSAmbroise Vincent
91cba71b70SLouis Mayencourt# Flag to apply erratum 855472 workaround during reset. This erratum applies
92cba71b70SLouis Mayencourt# only to revision r0p0 of the Cortex A35 cpu.
93cba71b70SLouis MayencourtERRATA_A35_855472	?=0
94cba71b70SLouis Mayencourt
95bd393704SAmbroise Vincent# Flag to apply erratum 819472 workaround during reset. This erratum applies
96bd393704SAmbroise Vincent# only to revision <= r0p1 of the Cortex A53 cpu.
97bd393704SAmbroise VincentERRATA_A53_819472	?=0
98bd393704SAmbroise Vincent
99bd393704SAmbroise Vincent# Flag to apply erratum 824069 workaround during reset. This erratum applies
100bd393704SAmbroise Vincent# only to revision <= r0p2 of the Cortex A53 cpu.
101bd393704SAmbroise VincentERRATA_A53_824069	?=0
102bd393704SAmbroise Vincent
103097b787aSSandrine Bailleux# Flag to apply erratum 826319 workaround during reset. This erratum applies
104097b787aSSandrine Bailleux# only to revision <= r0p2 of the Cortex A53 cpu.
1056b0d97b2SJimmy HuangERRATA_A53_826319	?=0
1066b0d97b2SJimmy Huang
107bd393704SAmbroise Vincent# Flag to apply erratum 827319 workaround during reset. This erratum applies
108bd393704SAmbroise Vincent# only to revision <= r0p2 of the Cortex A53 cpu.
109bd393704SAmbroise VincentERRATA_A53_827319	?=0
110bd393704SAmbroise Vincent
111a94cc374SDouglas Raillard# Flag to apply erratum 835769 workaround at compile and link time.  This
112a94cc374SDouglas Raillard# erratum applies to revision <= r0p4 of the Cortex A53 cpu. Enabling this
113a94cc374SDouglas Raillard# workaround can lead the linker to create "*.stub" sections.
114a94cc374SDouglas RaillardERRATA_A53_835769	?=0
115a94cc374SDouglas Raillard
116097b787aSSandrine Bailleux# Flag to apply erratum 836870 workaround during reset. This erratum applies
117097b787aSSandrine Bailleux# only to revision <= r0p3 of the Cortex A53 cpu. From r0p4 and onwards, this
1183fbe46d7SDouglas Raillard# erratum workaround is enabled by default in hardware.
1196b0d97b2SJimmy HuangERRATA_A53_836870	?=0
1206b0d97b2SJimmy Huang
121a94cc374SDouglas Raillard# Flag to apply erratum 843419 workaround at link time.
122a94cc374SDouglas Raillard# This erratum applies to revision <= r0p4 of the Cortex A53 cpu. Enabling this
123a94cc374SDouglas Raillard# workaround could lead the linker to emit "*.stub" sections which are 4kB
124a94cc374SDouglas Raillard# aligned.
125a94cc374SDouglas RaillardERRATA_A53_843419	?=0
126a94cc374SDouglas Raillard
127b75dc0e4SAndre Przywara# Flag to apply errata 855873 during reset. This errata applies to all
128b75dc0e4SAndre Przywara# revisions of the Cortex A53 CPU, but this firmware workaround only works
129b75dc0e4SAndre Przywara# for revisions r0p3 and higher. Earlier revisions are taken care
130b75dc0e4SAndre Przywara# of by the rich OS.
131b75dc0e4SAndre PrzywaraERRATA_A53_855873	?=0
132b75dc0e4SAndre Przywara
1331afeee92SAmbroise Vincent# Flag to apply erratum 768277 workaround during reset. This erratum applies
1341afeee92SAmbroise Vincent# only to revision r0p0 of the Cortex A55 cpu.
1351afeee92SAmbroise VincentERRATA_A55_768277	?=0
1361afeee92SAmbroise Vincent
137a6cc6610SAmbroise Vincent# Flag to apply erratum 778703 workaround during reset. This erratum applies
138a6cc6610SAmbroise Vincent# only to revision r0p0 of the Cortex A55 cpu.
139a6cc6610SAmbroise VincentERRATA_A55_778703	?=0
140a6cc6610SAmbroise Vincent
1416ab87d29SAmbroise Vincent# Flag to apply erratum 798797 workaround during reset. This erratum applies
1426ab87d29SAmbroise Vincent# only to revision r0p0 of the Cortex A55 cpu.
1436ab87d29SAmbroise VincentERRATA_A55_798797	?=0
1446ab87d29SAmbroise Vincent
1456e78973eSAmbroise Vincent# Flag to apply erratum 846532 workaround during reset. This erratum applies
1466e78973eSAmbroise Vincent# only to revision <= r0p1 of the Cortex A55 cpu.
1476e78973eSAmbroise VincentERRATA_A55_846532	?=0
1486e78973eSAmbroise Vincent
14947949f3fSAmbroise Vincent# Flag to apply erratum 903758 workaround during reset. This erratum applies
15047949f3fSAmbroise Vincent# only to revision <= r0p1 of the Cortex A55 cpu.
15147949f3fSAmbroise VincentERRATA_A55_903758	?=0
15247949f3fSAmbroise Vincent
1539af07df0SAmbroise Vincent# Flag to apply erratum 1221012 workaround during reset. This erratum applies
1549af07df0SAmbroise Vincent# only to revision <= r1p0 of the Cortex A55 cpu.
1559af07df0SAmbroise VincentERRATA_A55_1221012	?=0
1569af07df0SAmbroise Vincent
157097b787aSSandrine Bailleux# Flag to apply erratum 806969 workaround during reset. This erratum applies
158097b787aSSandrine Bailleux# only to revision r0p0 of the Cortex A57 cpu.
1595541bb3fSSoby MathewERRATA_A57_806969	?=0
1605541bb3fSSoby Mathew
161ccbec91cSAntonio Nino Diaz# Flag to apply erratum 813419 workaround during reset. This erratum applies
162ccbec91cSAntonio Nino Diaz# only to revision r0p0 of the Cortex A57 cpu.
163ccbec91cSAntonio Nino DiazERRATA_A57_813419	?=0
164ccbec91cSAntonio Nino Diaz
165097b787aSSandrine Bailleux# Flag to apply erratum 813420  workaround during reset. This erratum applies
166097b787aSSandrine Bailleux# only to revision r0p0 of the Cortex A57 cpu.
1675541bb3fSSoby MathewERRATA_A57_813420	?=0
1685541bb3fSSoby Mathew
1690f6fbbd2SAmbroise Vincent# Flag to apply erratum 814670  workaround during reset. This erratum applies
1700f6fbbd2SAmbroise Vincent# only to revision r0p0 of the Cortex A57 cpu.
1710f6fbbd2SAmbroise VincentERRATA_A57_814670	?=0
1720f6fbbd2SAmbroise Vincent
1735bd2c24fSAmbroise Vincent# Flag to apply erratum 817169 workaround during power down. This erratum
1745bd2c24fSAmbroise Vincent# applies only to revision <= r0p1 of the Cortex A57 cpu.
1755bd2c24fSAmbroise VincentERRATA_A57_817169	?=0
1765bd2c24fSAmbroise Vincent
177df22d602SSandrine Bailleux# Flag to apply erratum 826974 workaround during reset. This erratum applies
178df22d602SSandrine Bailleux# only to revision <= r1p1 of the Cortex A57 cpu.
179df22d602SSandrine BailleuxERRATA_A57_826974	?=0
180df22d602SSandrine Bailleux
18107288865SSandrine Bailleux# Flag to apply erratum 826977 workaround during reset. This erratum applies
18207288865SSandrine Bailleux# only to revision <= r1p1 of the Cortex A57 cpu.
18307288865SSandrine BailleuxERRATA_A57_826977	?=0
18407288865SSandrine Bailleux
185a8b1c769SSandrine Bailleux# Flag to apply erratum 828024 workaround during reset. This erratum applies
186a8b1c769SSandrine Bailleux# only to revision <= r1p1 of the Cortex A57 cpu.
187a8b1c769SSandrine BailleuxERRATA_A57_828024	?=0
188a8b1c769SSandrine Bailleux
1890b77197bSSandrine Bailleux# Flag to apply erratum 829520 workaround during reset. This erratum applies
1900b77197bSSandrine Bailleux# only to revision <= r1p2 of the Cortex A57 cpu.
1910b77197bSSandrine BailleuxERRATA_A57_829520	?=0
1920b77197bSSandrine Bailleux
193adeecf92SSandrine Bailleux# Flag to apply erratum 833471 workaround during reset. This erratum applies
194adeecf92SSandrine Bailleux# only to revision <= r1p2 of the Cortex A57 cpu.
195adeecf92SSandrine BailleuxERRATA_A57_833471	?=0
196adeecf92SSandrine Bailleux
19745b52c20SEleanor Bonnici# Flag to apply erratum 855972 workaround during reset. This erratum applies
19845b52c20SEleanor Bonnici# only to revision <= r1p3 of the Cortex A57 cpu.
19945b52c20SEleanor BonniciERRATA_A57_859972	?=0
20045b52c20SEleanor Bonnici
2016de9b336SEleanor Bonnici# Flag to apply erratum 855971 workaround during reset. This erratum applies
2026de9b336SEleanor Bonnici# only to revision <= r0p3 of the Cortex A72 cpu.
2036de9b336SEleanor BonniciERRATA_A72_859971	?=0
2046de9b336SEleanor Bonnici
20525278eabSLouis Mayencourt# Flag to apply erratum 852427 workaround during reset. This erratum applies
20625278eabSLouis Mayencourt# only to revision r0p0 of the Cortex A73 cpu.
20725278eabSLouis MayencourtERRATA_A73_852427	?=0
20825278eabSLouis Mayencourt
209e6cab15dSLouis Mayencourt# Flag to apply erratum 855423 workaround during reset. This erratum applies
210e6cab15dSLouis Mayencourt# only to revision <= r0p1 of the Cortex A73 cpu.
211e6cab15dSLouis MayencourtERRATA_A73_855423	?=0
212e6cab15dSLouis Mayencourt
2135f5d1ed7SLouis Mayencourt# Flag to apply erratum 764081 workaround during reset. This erratum applies
2145f5d1ed7SLouis Mayencourt# only to revision <= r0p0 of the Cortex A75 cpu.
2155f5d1ed7SLouis MayencourtERRATA_A75_764081	?=0
2165f5d1ed7SLouis Mayencourt
21798551591SLouis Mayencourt# Flag to apply erratum 790748 workaround during reset. This erratum applies
21898551591SLouis Mayencourt# only to revision <= r0p0 of the Cortex A75 cpu.
21998551591SLouis MayencourtERRATA_A75_790748	?=0
22098551591SLouis Mayencourt
2215c6aa01aSLouis Mayencourt# Flag to apply erratum 1073348 workaround during reset. This erratum applies
2225c6aa01aSLouis Mayencourt# only to revision <= r1p0 of the Cortex A76 cpu.
2235c6aa01aSLouis MayencourtERRATA_A76_1073348	?=0
2245c6aa01aSLouis Mayencourt
225508d7110SLouis Mayencourt# Flag to apply erratum 1130799 workaround during reset. This erratum applies
226508d7110SLouis Mayencourt# only to revision <= r2p0 of the Cortex A76 cpu.
227508d7110SLouis MayencourtERRATA_A76_1130799	?=0
228508d7110SLouis Mayencourt
2295cc8c7baSLouis Mayencourt# Flag to apply erratum 1220197 workaround during reset. This erratum applies
2305cc8c7baSLouis Mayencourt# only to revision <= r2p0 of the Cortex A76 cpu.
2315cc8c7baSLouis MayencourtERRATA_A76_1220197	?=0
2325cc8c7baSLouis Mayencourt
233e6e1d0acSSoby Mathew# Flag to apply erratum 1257314 workaround during reset. This erratum applies
234e6e1d0acSSoby Mathew# only to revision <= r3p0 of the Cortex A76 cpu.
235e6e1d0acSSoby MathewERRATA_A76_1257314	?=0
236e6e1d0acSSoby Mathew
237e6e1d0acSSoby Mathew# Flag to apply erratum 1262606 workaround during reset. This erratum applies
238e6e1d0acSSoby Mathew# only to revision <= r3p0 of the Cortex A76 cpu.
239e6e1d0acSSoby MathewERRATA_A76_1262606	?=0
240e6e1d0acSSoby Mathew
241e6e1d0acSSoby Mathew# Flag to apply erratum 1262888 workaround during reset. This erratum applies
242e6e1d0acSSoby Mathew# only to revision <= r3p0 of the Cortex A76 cpu.
243e6e1d0acSSoby MathewERRATA_A76_1262888	?=0
244e6e1d0acSSoby Mathew
245e6e1d0acSSoby Mathew# Flag to apply erratum 1275112 workaround during reset. This erratum applies
246e6e1d0acSSoby Mathew# only to revision <= r3p0 of the Cortex A76 cpu.
247e6e1d0acSSoby MathewERRATA_A76_1275112	?=0
248e6e1d0acSSoby Mathew
249f85edceaSSoby Mathew# Flag to apply erratum 1286807 workaround during reset. This erratum applies
250f85edceaSSoby Mathew# only to revision <= r3p0 of the Cortex A76 cpu.
251f85edceaSSoby MathewERRATA_A76_1286807	?=0
252f85edceaSSoby Mathew
253d7b08e69Sjohpow01# Flag to apply erratum 1791580 workaround during reset. This erratum applies
254d7b08e69Sjohpow01# only to revision <= r4p0 of the Cortex A76 cpu.
255d7b08e69Sjohpow01ERRATA_A76_1791580	?=0
256d7b08e69Sjohpow01
257*dcbfbcb5Sjohpow01# Flag to apply erratum 1800710 workaround during reset. This erratum applies
258*dcbfbcb5Sjohpow01# only to revision <= r4p0 of the Cortex A76 cpu.
259*dcbfbcb5Sjohpow01ERRATA_A76_1800710	?=0
260*dcbfbcb5Sjohpow01
26183e95524SMadhukar Pappireddy# Flag to apply erratum 1688305 workaround during reset. This erratum applies
2623f35709cSJimmy Brisson# to revisions r0p0 - r1p0 of the A78 cpu.
2633f35709cSJimmy BrissonERRATA_A78_1688305	?=0
26483e95524SMadhukar Pappireddy
265040b546eSDimitris Papastamos# Flag to apply T32 CLREX workaround during reset. This erratum applies
266da6d75a0SJohn Tsichritzis# only to r0p0 and r1p0 of the Neoverse N1 cpu.
267dbafda7cSlaurenw-armERRATA_N1_1043202	?=0
268040b546eSDimitris Papastamos
269a601afe1Slauwal01# Flag to apply erratum 1073348 workaround during reset. This erratum applies
270a601afe1Slauwal01# only to revision r0p0 and r1p0 of the Neoverse N1 cpu.
271a601afe1Slauwal01ERRATA_N1_1073348	?=0
272a601afe1Slauwal01
273e34606f2Slauwal01# Flag to apply erratum 1130799 workaround during reset. This erratum applies
274e34606f2Slauwal01# only to revision <= r2p0 of the Neoverse N1 cpu.
275e34606f2Slauwal01ERRATA_N1_1130799	?=0
276e34606f2Slauwal01
2772017ab24Slauwal01# Flag to apply erratum 1165347 workaround during reset. This erratum applies
2782017ab24Slauwal01# only to revision <= r2p0 of the Neoverse N1 cpu.
2792017ab24Slauwal01ERRATA_N1_1165347	?=0
2802017ab24Slauwal01
281ef5fa7d4Slauwal01# Flag to apply erratum 1207823 workaround during reset. This erratum applies
282ef5fa7d4Slauwal01# only to revision <= r2p0 of the Neoverse N1 cpu.
283ef5fa7d4Slauwal01ERRATA_N1_1207823	?=0
284ef5fa7d4Slauwal01
2859eceb020Slauwal01# Flag to apply erratum 1220197 workaround during reset. This erratum applies
2869eceb020Slauwal01# only to revision <= r2p0 of the Neoverse N1 cpu.
2879eceb020Slauwal01ERRATA_N1_1220197	?=0
2889eceb020Slauwal01
289335b3c79Slauwal01# Flag to apply erratum 1257314 workaround during reset. This erratum applies
290335b3c79Slauwal01# only to revision <= r3p0 of the Neoverse N1 cpu.
291335b3c79Slauwal01ERRATA_N1_1257314	?=0
292335b3c79Slauwal01
293411f4959Slauwal01# Flag to apply erratum 1262606 workaround during reset. This erratum applies
294411f4959Slauwal01# only to revision <= r3p0 of the Neoverse N1 cpu.
295411f4959Slauwal01ERRATA_N1_1262606	?=0
296411f4959Slauwal01
29711c48370Slauwal01# Flag to apply erratum 1262888 workaround during reset. This erratum applies
29811c48370Slauwal01# only to revision <= r3p0 of the Neoverse N1 cpu.
29911c48370Slauwal01ERRATA_N1_1262888	?=0
30011c48370Slauwal01
3014d8801feSlauwal01# Flag to apply erratum 1275112 workaround during reset. This erratum applies
3024d8801feSlauwal01# only to revision <= r3p0 of the Neoverse N1 cpu.
3034d8801feSlauwal01ERRATA_N1_1275112	?=0
3044d8801feSlauwal01
3055f5d0763SAndre Przywara# Flag to apply erratum 1315703 workaround during reset. This erratum applies
3065f5d0763SAndre Przywara# to revisions before r3p1 of the Neoverse N1 cpu.
307dbafda7cSlaurenw-armERRATA_N1_1315703	?=0
3085f5d0763SAndre Przywara
30980942622Slaurenw-arm# Flag to apply erratum 1542419 workaround during reset. This erratum applies
31080942622Slaurenw-arm# to revisions r3p0 - r4p0 of the Neoverse N1 cpu.
31180942622Slaurenw-armERRATA_N1_1542419	?=0
31280942622Slaurenw-arm
3130e985d70SLouis Mayencourt# Flag to apply DSU erratum 798953. This erratum applies to DSUs revision r0p0.
3140e985d70SLouis Mayencourt# Applying the workaround results in higher DSU power consumption on idle.
3150e985d70SLouis MayencourtERRATA_DSU_798953	?=0
3160e985d70SLouis Mayencourt
3178a677180SJohn Tsichritzis# Flag to apply DSU erratum 936184. This erratum applies to DSUs containing
3188a677180SJohn Tsichritzis# the ACP interface and revision < r2p0. Applying the workaround results in
3198a677180SJohn Tsichritzis# higher DSU power consumption on idle.
3208a677180SJohn TsichritzisERRATA_DSU_936184	?=0
3218a677180SJohn Tsichritzis
322dd4cf2c7SJoel Hutton# Process ERRATA_A9_794073 flag
323dd4cf2c7SJoel Hutton$(eval $(call assert_boolean,ERRATA_A9_794073))
324dd4cf2c7SJoel Hutton$(eval $(call add_define,ERRATA_A9_794073))
325dd4cf2c7SJoel Hutton
32675a1ada9SAmbroise Vincent# Process ERRATA_A15_816470 flag
32775a1ada9SAmbroise Vincent$(eval $(call assert_boolean,ERRATA_A15_816470))
32875a1ada9SAmbroise Vincent$(eval $(call add_define,ERRATA_A15_816470))
32975a1ada9SAmbroise Vincent
3305f2c690dSAmbroise Vincent# Process ERRATA_A15_827671 flag
3315f2c690dSAmbroise Vincent$(eval $(call assert_boolean,ERRATA_A15_827671))
3325f2c690dSAmbroise Vincent$(eval $(call add_define,ERRATA_A15_827671))
3335f2c690dSAmbroise Vincent
3340b64c194SAmbroise Vincent# Process ERRATA_A17_852421 flag
3350b64c194SAmbroise Vincent$(eval $(call assert_boolean,ERRATA_A17_852421))
3360b64c194SAmbroise Vincent$(eval $(call add_define,ERRATA_A17_852421))
3370b64c194SAmbroise Vincent
338be10dcdeSAmbroise Vincent# Process ERRATA_A17_852423 flag
339be10dcdeSAmbroise Vincent$(eval $(call assert_boolean,ERRATA_A17_852423))
340be10dcdeSAmbroise Vincent$(eval $(call add_define,ERRATA_A17_852423))
341be10dcdeSAmbroise Vincent
342cba71b70SLouis Mayencourt# Process ERRATA_A35_855472 flag
343cba71b70SLouis Mayencourt$(eval $(call assert_boolean,ERRATA_A35_855472))
344cba71b70SLouis Mayencourt$(eval $(call add_define,ERRATA_A35_855472))
345cba71b70SLouis Mayencourt
346bd393704SAmbroise Vincent# Process ERRATA_A53_819472 flag
347bd393704SAmbroise Vincent$(eval $(call assert_boolean,ERRATA_A53_819472))
348bd393704SAmbroise Vincent$(eval $(call add_define,ERRATA_A53_819472))
349bd393704SAmbroise Vincent
350bd393704SAmbroise Vincent# Process ERRATA_A53_824069 flag
351bd393704SAmbroise Vincent$(eval $(call assert_boolean,ERRATA_A53_824069))
352bd393704SAmbroise Vincent$(eval $(call add_define,ERRATA_A53_824069))
353bd393704SAmbroise Vincent
3546b0d97b2SJimmy Huang# Process ERRATA_A53_826319 flag
3556b0d97b2SJimmy Huang$(eval $(call assert_boolean,ERRATA_A53_826319))
3566b0d97b2SJimmy Huang$(eval $(call add_define,ERRATA_A53_826319))
3576b0d97b2SJimmy Huang
358bd393704SAmbroise Vincent# Process ERRATA_A53_827319 flag
359bd393704SAmbroise Vincent$(eval $(call assert_boolean,ERRATA_A53_827319))
360bd393704SAmbroise Vincent$(eval $(call add_define,ERRATA_A53_827319))
361bd393704SAmbroise Vincent
362a94cc374SDouglas Raillard# Process ERRATA_A53_835769 flag
363a94cc374SDouglas Raillard$(eval $(call assert_boolean,ERRATA_A53_835769))
364a94cc374SDouglas Raillard$(eval $(call add_define,ERRATA_A53_835769))
365a94cc374SDouglas Raillard
3666b0d97b2SJimmy Huang# Process ERRATA_A53_836870 flag
3676b0d97b2SJimmy Huang$(eval $(call assert_boolean,ERRATA_A53_836870))
3686b0d97b2SJimmy Huang$(eval $(call add_define,ERRATA_A53_836870))
3696b0d97b2SJimmy Huang
370a94cc374SDouglas Raillard# Process ERRATA_A53_843419 flag
371a94cc374SDouglas Raillard$(eval $(call assert_boolean,ERRATA_A53_843419))
372a94cc374SDouglas Raillard$(eval $(call add_define,ERRATA_A53_843419))
373a94cc374SDouglas Raillard
374b75dc0e4SAndre Przywara# Process ERRATA_A53_855873 flag
375b75dc0e4SAndre Przywara$(eval $(call assert_boolean,ERRATA_A53_855873))
376b75dc0e4SAndre Przywara$(eval $(call add_define,ERRATA_A53_855873))
377b75dc0e4SAndre Przywara
3781afeee92SAmbroise Vincent# Process ERRATA_A55_768277 flag
3791afeee92SAmbroise Vincent$(eval $(call assert_boolean,ERRATA_A55_768277))
3801afeee92SAmbroise Vincent$(eval $(call add_define,ERRATA_A55_768277))
3811afeee92SAmbroise Vincent
382a6cc6610SAmbroise Vincent# Process ERRATA_A55_778703 flag
383a6cc6610SAmbroise Vincent$(eval $(call assert_boolean,ERRATA_A55_778703))
384a6cc6610SAmbroise Vincent$(eval $(call add_define,ERRATA_A55_778703))
385a6cc6610SAmbroise Vincent
3866ab87d29SAmbroise Vincent# Process ERRATA_A55_798797 flag
3876ab87d29SAmbroise Vincent$(eval $(call assert_boolean,ERRATA_A55_798797))
3886ab87d29SAmbroise Vincent$(eval $(call add_define,ERRATA_A55_798797))
3896ab87d29SAmbroise Vincent
3906e78973eSAmbroise Vincent# Process ERRATA_A55_846532 flag
3916e78973eSAmbroise Vincent$(eval $(call assert_boolean,ERRATA_A55_846532))
3926e78973eSAmbroise Vincent$(eval $(call add_define,ERRATA_A55_846532))
3936e78973eSAmbroise Vincent
39447949f3fSAmbroise Vincent# Process ERRATA_A55_903758 flag
39547949f3fSAmbroise Vincent$(eval $(call assert_boolean,ERRATA_A55_903758))
39647949f3fSAmbroise Vincent$(eval $(call add_define,ERRATA_A55_903758))
39747949f3fSAmbroise Vincent
3989af07df0SAmbroise Vincent# Process ERRATA_A55_1221012 flag
3999af07df0SAmbroise Vincent$(eval $(call assert_boolean,ERRATA_A55_1221012))
4009af07df0SAmbroise Vincent$(eval $(call add_define,ERRATA_A55_1221012))
4019af07df0SAmbroise Vincent
4025541bb3fSSoby Mathew# Process ERRATA_A57_806969 flag
4035541bb3fSSoby Mathew$(eval $(call assert_boolean,ERRATA_A57_806969))
4045541bb3fSSoby Mathew$(eval $(call add_define,ERRATA_A57_806969))
4055541bb3fSSoby Mathew
406ccbec91cSAntonio Nino Diaz# Process ERRATA_A57_813419 flag
407ccbec91cSAntonio Nino Diaz$(eval $(call assert_boolean,ERRATA_A57_813419))
408ccbec91cSAntonio Nino Diaz$(eval $(call add_define,ERRATA_A57_813419))
409ccbec91cSAntonio Nino Diaz
4105541bb3fSSoby Mathew# Process ERRATA_A57_813420 flag
4115541bb3fSSoby Mathew$(eval $(call assert_boolean,ERRATA_A57_813420))
4125541bb3fSSoby Mathew$(eval $(call add_define,ERRATA_A57_813420))
413df22d602SSandrine Bailleux
4140f6fbbd2SAmbroise Vincent# Process ERRATA_A57_814670 flag
4150f6fbbd2SAmbroise Vincent$(eval $(call assert_boolean,ERRATA_A57_814670))
4160f6fbbd2SAmbroise Vincent$(eval $(call add_define,ERRATA_A57_814670))
4170f6fbbd2SAmbroise Vincent
4185bd2c24fSAmbroise Vincent# Process ERRATA_A57_817169 flag
4195bd2c24fSAmbroise Vincent$(eval $(call assert_boolean,ERRATA_A57_817169))
4205bd2c24fSAmbroise Vincent$(eval $(call add_define,ERRATA_A57_817169))
4215bd2c24fSAmbroise Vincent
422df22d602SSandrine Bailleux# Process ERRATA_A57_826974 flag
423df22d602SSandrine Bailleux$(eval $(call assert_boolean,ERRATA_A57_826974))
424df22d602SSandrine Bailleux$(eval $(call add_define,ERRATA_A57_826974))
425a8b1c769SSandrine Bailleux
42607288865SSandrine Bailleux# Process ERRATA_A57_826977 flag
42707288865SSandrine Bailleux$(eval $(call assert_boolean,ERRATA_A57_826977))
42807288865SSandrine Bailleux$(eval $(call add_define,ERRATA_A57_826977))
42907288865SSandrine Bailleux
430a8b1c769SSandrine Bailleux# Process ERRATA_A57_828024 flag
431a8b1c769SSandrine Bailleux$(eval $(call assert_boolean,ERRATA_A57_828024))
432a8b1c769SSandrine Bailleux$(eval $(call add_define,ERRATA_A57_828024))
4330b77197bSSandrine Bailleux
4340b77197bSSandrine Bailleux# Process ERRATA_A57_829520 flag
4350b77197bSSandrine Bailleux$(eval $(call assert_boolean,ERRATA_A57_829520))
4360b77197bSSandrine Bailleux$(eval $(call add_define,ERRATA_A57_829520))
437adeecf92SSandrine Bailleux
438adeecf92SSandrine Bailleux# Process ERRATA_A57_833471 flag
439adeecf92SSandrine Bailleux$(eval $(call assert_boolean,ERRATA_A57_833471))
440adeecf92SSandrine Bailleux$(eval $(call add_define,ERRATA_A57_833471))
441a94cc374SDouglas Raillard
44245b52c20SEleanor Bonnici# Process ERRATA_A57_859972 flag
44345b52c20SEleanor Bonnici$(eval $(call assert_boolean,ERRATA_A57_859972))
44445b52c20SEleanor Bonnici$(eval $(call add_define,ERRATA_A57_859972))
44545b52c20SEleanor Bonnici
4466de9b336SEleanor Bonnici# Process ERRATA_A72_859971 flag
4476de9b336SEleanor Bonnici$(eval $(call assert_boolean,ERRATA_A72_859971))
4486de9b336SEleanor Bonnici$(eval $(call add_define,ERRATA_A72_859971))
4496de9b336SEleanor Bonnici
45025278eabSLouis Mayencourt# Process ERRATA_A73_852427 flag
45125278eabSLouis Mayencourt$(eval $(call assert_boolean,ERRATA_A73_852427))
45225278eabSLouis Mayencourt$(eval $(call add_define,ERRATA_A73_852427))
45325278eabSLouis Mayencourt
454e6cab15dSLouis Mayencourt# Process ERRATA_A73_855423 flag
455e6cab15dSLouis Mayencourt$(eval $(call assert_boolean,ERRATA_A73_855423))
456e6cab15dSLouis Mayencourt$(eval $(call add_define,ERRATA_A73_855423))
457e6cab15dSLouis Mayencourt
4585f5d1ed7SLouis Mayencourt# Process ERRATA_A75_764081 flag
4595f5d1ed7SLouis Mayencourt$(eval $(call assert_boolean,ERRATA_A75_764081))
4605f5d1ed7SLouis Mayencourt$(eval $(call add_define,ERRATA_A75_764081))
4615f5d1ed7SLouis Mayencourt
46298551591SLouis Mayencourt# Process ERRATA_A75_790748 flag
46398551591SLouis Mayencourt$(eval $(call assert_boolean,ERRATA_A75_790748))
46498551591SLouis Mayencourt$(eval $(call add_define,ERRATA_A75_790748))
46598551591SLouis Mayencourt
4665c6aa01aSLouis Mayencourt# Process ERRATA_A76_1073348 flag
4675c6aa01aSLouis Mayencourt$(eval $(call assert_boolean,ERRATA_A76_1073348))
4685c6aa01aSLouis Mayencourt$(eval $(call add_define,ERRATA_A76_1073348))
4695c6aa01aSLouis Mayencourt
470508d7110SLouis Mayencourt# Process ERRATA_A76_1130799 flag
471508d7110SLouis Mayencourt$(eval $(call assert_boolean,ERRATA_A76_1130799))
472508d7110SLouis Mayencourt$(eval $(call add_define,ERRATA_A76_1130799))
473508d7110SLouis Mayencourt
4745cc8c7baSLouis Mayencourt# Process ERRATA_A76_1220197 flag
4755cc8c7baSLouis Mayencourt$(eval $(call assert_boolean,ERRATA_A76_1220197))
4765cc8c7baSLouis Mayencourt$(eval $(call add_define,ERRATA_A76_1220197))
4775cc8c7baSLouis Mayencourt
478e6e1d0acSSoby Mathew# Process ERRATA_A76_1257314 flag
479e6e1d0acSSoby Mathew$(eval $(call assert_boolean,ERRATA_A76_1257314))
480e6e1d0acSSoby Mathew$(eval $(call add_define,ERRATA_A76_1257314))
481e6e1d0acSSoby Mathew
482e6e1d0acSSoby Mathew# Process ERRATA_A76_1262606 flag
483e6e1d0acSSoby Mathew$(eval $(call assert_boolean,ERRATA_A76_1262606))
484e6e1d0acSSoby Mathew$(eval $(call add_define,ERRATA_A76_1262606))
485e6e1d0acSSoby Mathew
486e6e1d0acSSoby Mathew# Process ERRATA_A76_1262888 flag
487e6e1d0acSSoby Mathew$(eval $(call assert_boolean,ERRATA_A76_1262888))
488e6e1d0acSSoby Mathew$(eval $(call add_define,ERRATA_A76_1262888))
489e6e1d0acSSoby Mathew
490e6e1d0acSSoby Mathew# Process ERRATA_A76_1275112 flag
491e6e1d0acSSoby Mathew$(eval $(call assert_boolean,ERRATA_A76_1275112))
492e6e1d0acSSoby Mathew$(eval $(call add_define,ERRATA_A76_1275112))
493e6e1d0acSSoby Mathew
494f85edceaSSoby Mathew# Process ERRATA_A76_1286807 flag
495f85edceaSSoby Mathew$(eval $(call assert_boolean,ERRATA_A76_1286807))
496f85edceaSSoby Mathew$(eval $(call add_define,ERRATA_A76_1286807))
497f85edceaSSoby Mathew
498d7b08e69Sjohpow01# Process ERRATA_A76_1791580 flag
499d7b08e69Sjohpow01$(eval $(call assert_boolean,ERRATA_A76_1791580))
500d7b08e69Sjohpow01$(eval $(call add_define,ERRATA_A76_1791580))
501d7b08e69Sjohpow01
502*dcbfbcb5Sjohpow01# Process ERRATA_A76_1800710 flag
503*dcbfbcb5Sjohpow01$(eval $(call assert_boolean,ERRATA_A76_1800710))
504*dcbfbcb5Sjohpow01$(eval $(call add_define,ERRATA_A76_1800710))
505*dcbfbcb5Sjohpow01
5063f35709cSJimmy Brisson# Process ERRATA_A78_1688305 flag
5073f35709cSJimmy Brisson$(eval $(call assert_boolean,ERRATA_A78_1688305))
5083f35709cSJimmy Brisson$(eval $(call add_define,ERRATA_A78_1688305))
50983e95524SMadhukar Pappireddy
510da6d75a0SJohn Tsichritzis# Process ERRATA_N1_1043202 flag
511da6d75a0SJohn Tsichritzis$(eval $(call assert_boolean,ERRATA_N1_1043202))
512da6d75a0SJohn Tsichritzis$(eval $(call add_define,ERRATA_N1_1043202))
513040b546eSDimitris Papastamos
514a601afe1Slauwal01# Process ERRATA_N1_1073348 flag
515a601afe1Slauwal01$(eval $(call assert_boolean,ERRATA_N1_1073348))
516a601afe1Slauwal01$(eval $(call add_define,ERRATA_N1_1073348))
517a601afe1Slauwal01
518e34606f2Slauwal01# Process ERRATA_N1_1130799 flag
519e34606f2Slauwal01$(eval $(call assert_boolean,ERRATA_N1_1130799))
520e34606f2Slauwal01$(eval $(call add_define,ERRATA_N1_1130799))
521e34606f2Slauwal01
5222017ab24Slauwal01# Process ERRATA_N1_1165347 flag
5232017ab24Slauwal01$(eval $(call assert_boolean,ERRATA_N1_1165347))
5242017ab24Slauwal01$(eval $(call add_define,ERRATA_N1_1165347))
5252017ab24Slauwal01
526ef5fa7d4Slauwal01# Process ERRATA_N1_1207823 flag
527ef5fa7d4Slauwal01$(eval $(call assert_boolean,ERRATA_N1_1207823))
528ef5fa7d4Slauwal01$(eval $(call add_define,ERRATA_N1_1207823))
529ef5fa7d4Slauwal01
5309eceb020Slauwal01# Process ERRATA_N1_1220197 flag
5319eceb020Slauwal01$(eval $(call assert_boolean,ERRATA_N1_1220197))
5329eceb020Slauwal01$(eval $(call add_define,ERRATA_N1_1220197))
5339eceb020Slauwal01
534335b3c79Slauwal01# Process ERRATA_N1_1257314 flag
535335b3c79Slauwal01$(eval $(call assert_boolean,ERRATA_N1_1257314))
536335b3c79Slauwal01$(eval $(call add_define,ERRATA_N1_1257314))
537335b3c79Slauwal01
538411f4959Slauwal01# Process ERRATA_N1_1262606 flag
539411f4959Slauwal01$(eval $(call assert_boolean,ERRATA_N1_1262606))
540411f4959Slauwal01$(eval $(call add_define,ERRATA_N1_1262606))
541411f4959Slauwal01
54211c48370Slauwal01# Process ERRATA_N1_1262888 flag
54311c48370Slauwal01$(eval $(call assert_boolean,ERRATA_N1_1262888))
54411c48370Slauwal01$(eval $(call add_define,ERRATA_N1_1262888))
54511c48370Slauwal01
5464d8801feSlauwal01# Process ERRATA_N1_1275112 flag
5474d8801feSlauwal01$(eval $(call assert_boolean,ERRATA_N1_1275112))
5484d8801feSlauwal01$(eval $(call add_define,ERRATA_N1_1275112))
5494d8801feSlauwal01
5505f5d0763SAndre Przywara# Process ERRATA_N1_1315703 flag
5515f5d0763SAndre Przywara$(eval $(call assert_boolean,ERRATA_N1_1315703))
5525f5d0763SAndre Przywara$(eval $(call add_define,ERRATA_N1_1315703))
5535f5d0763SAndre Przywara
55480942622Slaurenw-arm# Process ERRATA_N1_1542419 flag
55580942622Slaurenw-arm$(eval $(call assert_boolean,ERRATA_N1_1542419))
55680942622Slaurenw-arm$(eval $(call add_define,ERRATA_N1_1542419))
55780942622Slaurenw-arm
5580e985d70SLouis Mayencourt# Process ERRATA_DSU_798953 flag
5590e985d70SLouis Mayencourt$(eval $(call assert_boolean,ERRATA_DSU_798953))
5600e985d70SLouis Mayencourt$(eval $(call add_define,ERRATA_DSU_798953))
5610e985d70SLouis Mayencourt
5628a677180SJohn Tsichritzis# Process ERRATA_DSU_936184 flag
5638a677180SJohn Tsichritzis$(eval $(call assert_boolean,ERRATA_DSU_936184))
5648a677180SJohn Tsichritzis$(eval $(call add_define,ERRATA_DSU_936184))
5658a677180SJohn Tsichritzis
566a94cc374SDouglas Raillard# Errata build flags
567a94cc374SDouglas Raillardifneq (${ERRATA_A53_843419},0)
568c2b8806fSDouglas RaillardTF_LDFLAGS_aarch64	+= --fix-cortex-a53-843419
569a94cc374SDouglas Raillardendif
570a94cc374SDouglas Raillard
571a94cc374SDouglas Raillardifneq (${ERRATA_A53_835769},0)
572a94cc374SDouglas RaillardTF_CFLAGS_aarch64	+= -mfix-cortex-a53-835769
573c2b8806fSDouglas RaillardTF_LDFLAGS_aarch64	+= --fix-cortex-a53-835769
574a94cc374SDouglas Raillardendif
575