xref: /rk3399_ARM-atf/lib/cpus/cpu-ops.mk (revision 82cb2c1ad9897473743f08437d0a3995bed561b9)
15541bb3fSSoby Mathew#
254035fc4SSandrine Bailleux# Copyright (c) 2014-2016, ARM Limited and Contributors. All rights reserved.
35541bb3fSSoby Mathew#
4*82cb2c1aSdp-arm# SPDX-License-Identifier: BSD-3-Clause
55541bb3fSSoby Mathew#
65541bb3fSSoby Mathew
75541bb3fSSoby Mathew# Cortex A57 specific optimisation to skip L1 cache flush when
85541bb3fSSoby Mathew# cluster is powered down.
95541bb3fSSoby MathewSKIP_A57_L1_FLUSH_PWR_DWN	?=0
105541bb3fSSoby Mathew
1154035fc4SSandrine Bailleux# Flag to disable the cache non-temporal hint.
1254035fc4SSandrine Bailleux# It is enabled by default.
1354035fc4SSandrine BailleuxA53_DISABLE_NON_TEMPORAL_HINT	?=1
1454035fc4SSandrine Bailleux
1554035fc4SSandrine Bailleux# Flag to disable the cache non-temporal hint.
1654035fc4SSandrine Bailleux# It is enabled by default.
1754035fc4SSandrine BailleuxA57_DISABLE_NON_TEMPORAL_HINT	?=1
1854035fc4SSandrine Bailleux
195541bb3fSSoby Mathew# Process SKIP_A57_L1_FLUSH_PWR_DWN flag
205541bb3fSSoby Mathew$(eval $(call assert_boolean,SKIP_A57_L1_FLUSH_PWR_DWN))
215541bb3fSSoby Mathew$(eval $(call add_define,SKIP_A57_L1_FLUSH_PWR_DWN))
225541bb3fSSoby Mathew
2354035fc4SSandrine Bailleux# Process A53_DISABLE_NON_TEMPORAL_HINT flag
2454035fc4SSandrine Bailleux$(eval $(call assert_boolean,A53_DISABLE_NON_TEMPORAL_HINT))
2554035fc4SSandrine Bailleux$(eval $(call add_define,A53_DISABLE_NON_TEMPORAL_HINT))
2654035fc4SSandrine Bailleux
2754035fc4SSandrine Bailleux# Process A57_DISABLE_NON_TEMPORAL_HINT flag
2854035fc4SSandrine Bailleux$(eval $(call assert_boolean,A57_DISABLE_NON_TEMPORAL_HINT))
2954035fc4SSandrine Bailleux$(eval $(call add_define,A57_DISABLE_NON_TEMPORAL_HINT))
3054035fc4SSandrine Bailleux
315541bb3fSSoby Mathew
32097b787aSSandrine Bailleux# CPU Errata Build flags.
33097b787aSSandrine Bailleux# These should be enabled by the platform if the erratum workaround needs to be
34097b787aSSandrine Bailleux# applied.
355541bb3fSSoby Mathew
36097b787aSSandrine Bailleux# Flag to apply erratum 826319 workaround during reset. This erratum applies
37097b787aSSandrine Bailleux# only to revision <= r0p2 of the Cortex A53 cpu.
386b0d97b2SJimmy HuangERRATA_A53_826319	?=0
396b0d97b2SJimmy Huang
40097b787aSSandrine Bailleux# Flag to apply erratum 836870 workaround during reset. This erratum applies
41097b787aSSandrine Bailleux# only to revision <= r0p3 of the Cortex A53 cpu. From r0p4 and onwards, this
423fbe46d7SDouglas Raillard# erratum workaround is enabled by default in hardware.
436b0d97b2SJimmy HuangERRATA_A53_836870	?=0
446b0d97b2SJimmy Huang
45b75dc0e4SAndre Przywara# Flag to apply errata 855873 during reset. This errata applies to all
46b75dc0e4SAndre Przywara# revisions of the Cortex A53 CPU, but this firmware workaround only works
47b75dc0e4SAndre Przywara# for revisions r0p3 and higher. Earlier revisions are taken care
48b75dc0e4SAndre Przywara# of by the rich OS.
49b75dc0e4SAndre PrzywaraERRATA_A53_855873	?=0
50b75dc0e4SAndre Przywara
51097b787aSSandrine Bailleux# Flag to apply erratum 806969 workaround during reset. This erratum applies
52097b787aSSandrine Bailleux# only to revision r0p0 of the Cortex A57 cpu.
535541bb3fSSoby MathewERRATA_A57_806969	?=0
545541bb3fSSoby Mathew
55ccbec91cSAntonio Nino Diaz# Flag to apply erratum 813419 workaround during reset. This erratum applies
56ccbec91cSAntonio Nino Diaz# only to revision r0p0 of the Cortex A57 cpu.
57ccbec91cSAntonio Nino DiazERRATA_A57_813419	?=0
58ccbec91cSAntonio Nino Diaz
59097b787aSSandrine Bailleux# Flag to apply erratum 813420  workaround during reset. This erratum applies
60097b787aSSandrine Bailleux# only to revision r0p0 of the Cortex A57 cpu.
615541bb3fSSoby MathewERRATA_A57_813420	?=0
625541bb3fSSoby Mathew
63df22d602SSandrine Bailleux# Flag to apply erratum 826974 workaround during reset. This erratum applies
64df22d602SSandrine Bailleux# only to revision <= r1p1 of the Cortex A57 cpu.
65df22d602SSandrine BailleuxERRATA_A57_826974	?=0
66df22d602SSandrine Bailleux
6707288865SSandrine Bailleux# Flag to apply erratum 826977 workaround during reset. This erratum applies
6807288865SSandrine Bailleux# only to revision <= r1p1 of the Cortex A57 cpu.
6907288865SSandrine BailleuxERRATA_A57_826977	?=0
7007288865SSandrine Bailleux
71a8b1c769SSandrine Bailleux# Flag to apply erratum 828024 workaround during reset. This erratum applies
72a8b1c769SSandrine Bailleux# only to revision <= r1p1 of the Cortex A57 cpu.
73a8b1c769SSandrine BailleuxERRATA_A57_828024	?=0
74a8b1c769SSandrine Bailleux
750b77197bSSandrine Bailleux# Flag to apply erratum 829520 workaround during reset. This erratum applies
760b77197bSSandrine Bailleux# only to revision <= r1p2 of the Cortex A57 cpu.
770b77197bSSandrine BailleuxERRATA_A57_829520	?=0
780b77197bSSandrine Bailleux
79adeecf92SSandrine Bailleux# Flag to apply erratum 833471 workaround during reset. This erratum applies
80adeecf92SSandrine Bailleux# only to revision <= r1p2 of the Cortex A57 cpu.
81adeecf92SSandrine BailleuxERRATA_A57_833471	?=0
82adeecf92SSandrine Bailleux
836b0d97b2SJimmy Huang# Process ERRATA_A53_826319 flag
846b0d97b2SJimmy Huang$(eval $(call assert_boolean,ERRATA_A53_826319))
856b0d97b2SJimmy Huang$(eval $(call add_define,ERRATA_A53_826319))
866b0d97b2SJimmy Huang
876b0d97b2SJimmy Huang# Process ERRATA_A53_836870 flag
886b0d97b2SJimmy Huang$(eval $(call assert_boolean,ERRATA_A53_836870))
896b0d97b2SJimmy Huang$(eval $(call add_define,ERRATA_A53_836870))
906b0d97b2SJimmy Huang
91b75dc0e4SAndre Przywara# Process ERRATA_A53_855873 flag
92b75dc0e4SAndre Przywara$(eval $(call assert_boolean,ERRATA_A53_855873))
93b75dc0e4SAndre Przywara$(eval $(call add_define,ERRATA_A53_855873))
94b75dc0e4SAndre Przywara
955541bb3fSSoby Mathew# Process ERRATA_A57_806969 flag
965541bb3fSSoby Mathew$(eval $(call assert_boolean,ERRATA_A57_806969))
975541bb3fSSoby Mathew$(eval $(call add_define,ERRATA_A57_806969))
985541bb3fSSoby Mathew
99ccbec91cSAntonio Nino Diaz# Process ERRATA_A57_813419 flag
100ccbec91cSAntonio Nino Diaz$(eval $(call assert_boolean,ERRATA_A57_813419))
101ccbec91cSAntonio Nino Diaz$(eval $(call add_define,ERRATA_A57_813419))
102ccbec91cSAntonio Nino Diaz
1035541bb3fSSoby Mathew# Process ERRATA_A57_813420 flag
1045541bb3fSSoby Mathew$(eval $(call assert_boolean,ERRATA_A57_813420))
1055541bb3fSSoby Mathew$(eval $(call add_define,ERRATA_A57_813420))
106df22d602SSandrine Bailleux
107df22d602SSandrine Bailleux# Process ERRATA_A57_826974 flag
108df22d602SSandrine Bailleux$(eval $(call assert_boolean,ERRATA_A57_826974))
109df22d602SSandrine Bailleux$(eval $(call add_define,ERRATA_A57_826974))
110a8b1c769SSandrine Bailleux
11107288865SSandrine Bailleux# Process ERRATA_A57_826977 flag
11207288865SSandrine Bailleux$(eval $(call assert_boolean,ERRATA_A57_826977))
11307288865SSandrine Bailleux$(eval $(call add_define,ERRATA_A57_826977))
11407288865SSandrine Bailleux
115a8b1c769SSandrine Bailleux# Process ERRATA_A57_828024 flag
116a8b1c769SSandrine Bailleux$(eval $(call assert_boolean,ERRATA_A57_828024))
117a8b1c769SSandrine Bailleux$(eval $(call add_define,ERRATA_A57_828024))
1180b77197bSSandrine Bailleux
1190b77197bSSandrine Bailleux# Process ERRATA_A57_829520 flag
1200b77197bSSandrine Bailleux$(eval $(call assert_boolean,ERRATA_A57_829520))
1210b77197bSSandrine Bailleux$(eval $(call add_define,ERRATA_A57_829520))
122adeecf92SSandrine Bailleux
123adeecf92SSandrine Bailleux# Process ERRATA_A57_833471 flag
124adeecf92SSandrine Bailleux$(eval $(call assert_boolean,ERRATA_A57_833471))
125adeecf92SSandrine Bailleux$(eval $(call add_define,ERRATA_A57_833471))
126