blob: c5241afab0529a70ea0d88e0fcc10b100c74affc [file] [log] [blame]
John Tsichritzis6deaf9c2018-10-08 17:09:43 +01001/*
2 * Copyright (c) 2019, ARM Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <arch.h>
8#include <asm_macros.S>
9#include <common/bl_common.h>
10#include <neoverse_zeus.h>
11#include <cpu_macros.S>
12#include <plat_macros.S>
13
John Tsichritzisfe6df392019-03-19 17:20:52 +000014/* Hardware handled coherency */
15#if HW_ASSISTED_COHERENCY == 0
16#error "Neoverse Zeus must be compiled with HW_ASSISTED_COHERENCY enabled"
17#endif
18
John Tsichritzis6deaf9c2018-10-08 17:09:43 +010019 /* ---------------------------------------------
20 * HW will do the cache maintenance while powering down
21 * ---------------------------------------------
22 */
23func neoverse_zeus_core_pwr_dwn
24 /* ---------------------------------------------
25 * Enable CPU power down bit in power control register
26 * ---------------------------------------------
27 */
28 mrs x0, NEOVERSE_ZEUS_CPUPWRCTLR_EL1
29 orr x0, x0, #NEOVERSE_ZEUS_CPUPWRCTLR_EL1_CORE_PWRDN_BIT
30 msr NEOVERSE_ZEUS_CPUPWRCTLR_EL1, x0
31 isb
32 ret
33endfunc neoverse_zeus_core_pwr_dwn
34
35 /*
36 * Errata printing function for Neoverse Zeus. Must follow AAPCS.
37 */
38#if REPORT_ERRATA
39func neoverse_zeus_errata_report
40 ret
41endfunc neoverse_zeus_errata_report
42#endif
43
44 /* ---------------------------------------------
45 * This function provides Neoverse-Zeus specific
46 * register information for crash reporting.
47 * It needs to return with x6 pointing to
48 * a list of register names in ascii and
49 * x8 - x15 having values of registers to be
50 * reported.
51 * ---------------------------------------------
52 */
53.section .rodata.neoverse_zeus_regs, "aS"
54neoverse_zeus_regs: /* The ascii list of register names to be reported */
55 .asciz "cpuectlr_el1", ""
56
57func neoverse_zeus_cpu_reg_dump
58 adr x6, neoverse_zeus_regs
59 mrs x8, NEOVERSE_ZEUS_CPUECTLR_EL1
60 ret
61endfunc neoverse_zeus_cpu_reg_dump
62
63declare_cpu_ops neoverse_zeus, NEOVERSE_ZEUS_MIDR, \
64 CPU_NO_RESET_FUNC, \
65 neoverse_zeus_core_pwr_dwn