blob: 9bcdf542507970ceed2d2234603f167edac53a5b [file] [log] [blame]
Saurabh Gorecha70389ca2020-04-22 21:31:24 +05301/*
2 * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved.
3 * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7
8#include <arch.h>
9#include <asm_macros.S>
10#include <cpu_macros.S>
11
12#include <plat_macros.S>
13#include <qti_cpu.h>
14
15 .p2align 3
16
17/* -------------------------------------------------
18 * The CPU Ops reset function for Kryo-3 Gold
19 * -------------------------------------------------
20 */
21func qti_kryo4_gold_reset_func
22#if IMAGE_BL31 && WORKAROUND_CVE_2017_5715
23 adr x0, wa_cve_2017_5715_bpiall_vbar
24 msr vbar_el3, x0
25 isb
26#endif
27
28 mov x19, x30
29
30 bl qtiseclib_kryo4_gold_reset_asm
Saurabh Gorechab8493012022-04-05 00:11:52 +053031 mov x30, x19
32 b cortex_a76_reset_func
Saurabh Gorecha70389ca2020-04-22 21:31:24 +053033
34endfunc qti_kryo4_gold_reset_func
35
Saurabh Gorecha70389ca2020-04-22 21:31:24 +053036/* -------------------------------------------------------
37 * The CPU Ops cluster power down function for Kryo-3 Gold
38 * -------------------------------------------------------
39 */
40func qti_kryo4_gold_cluster_pwr_dwn
41 ret
42endfunc qti_kryo4_gold_cluster_pwr_dwn
43
44#if REPORT_ERRATA
45/*
46 * Errata printing function for Kryo4 Gold. Must follow AAPCS.
47 */
48func qti_kryo4_gold_errata_report
49 /* TODO : Need to add support. Required only for debug bl31 image.*/
50 ret
51endfunc qti_kryo4_gold_errata_report
52#endif
53
54/* ---------------------------------------------
55 * This function provides kryo4_gold specific
56 * register information for crash reporting.
57 * It needs to return with x6 pointing to
58 * a list of register names in ASCII and
59 * x8 - x15 having values of registers to be
60 * reported.
61 * ---------------------------------------------
62 */
63.section .rodata.qti_kryo4_gold_regs, "aS"
64qti_kryo4_gold_regs: /* The ASCII list of register names to be reported */
65 .asciz ""
66
67func qti_kryo4_gold_cpu_reg_dump
68 adr x6, qti_kryo4_gold_regs
69 ret
70endfunc qti_kryo4_gold_cpu_reg_dump
71
Saurabh Gorechab8493012022-04-05 00:11:52 +053072declare_cpu_ops_wa qti_kryo4_gold, QTI_KRYO4_GOLD_MIDR, \
Saurabh Gorecha70389ca2020-04-22 21:31:24 +053073 qti_kryo4_gold_reset_func, \
Saurabh Gorechab8493012022-04-05 00:11:52 +053074 CPU_NO_EXTRA1_FUNC, \
75 cortex_a76_disable_wa_cve_2018_3639, \
76 cortex_a76_core_pwr_dwn, \
Saurabh Gorecha70389ca2020-04-22 21:31:24 +053077 qti_kryo4_gold_cluster_pwr_dwn