blob: 45bd8d318b961ffb378e9c30eede816af2cbed9c [file] [log] [blame]
Joel Huttona7c46872018-01-10 16:06:07 +00001/*
laurenw-arme4acfd52023-06-06 15:17:27 -05002 * Copyright (c) 2018-2023, Arm Limited and Contributors. All rights reserved.
Joel Huttona7c46872018-01-10 16:06:07 +00003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6#include <arch.h>
7#include <asm_macros.S>
Antonio Nino Diaze0f90632018-12-14 00:18:21 +00008#include <common/bl_common.h>
9#include <common/debug.h>
John Tsichritzis16e6d9f2019-02-19 14:01:55 +000010#include <neoverse_e1.h>
Joel Huttona7c46872018-01-10 16:06:07 +000011#include <cpu_macros.S>
Joel Huttona7c46872018-01-10 16:06:07 +000012#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 E1 must be compiled with HW_ASSISTED_COHERENCY enabled"
17#endif
18
John Tsichritzis7557c662019-06-03 13:54:30 +010019/* 64-bit only core */
20#if CTX_INCLUDE_AARCH32_REGS == 1
21#error "Neoverse-E1 supports only AArch64. Compile with CTX_INCLUDE_AARCH32_REGS=0"
22#endif
23
laurenw-arme4acfd52023-06-06 15:17:27 -050024/*
25 * ERRATA_DSU_936184:
26 * The errata is defined in dsu_helpers.S and applies to neoverse_e1.
27 * Henceforth creating symbolic names to the already existing errata
28 * workaround functions to get them registered under the Errata Framework.
29 */
30.equ check_erratum_neoverse_e1_936184, check_errata_dsu_936184
31.equ erratum_neoverse_e1_936184_wa, errata_dsu_936184_wa
32add_erratum_entry neoverse_e1, ERRATUM(936184), ERRATA_DSU_936184, APPLY_AT_RESET
Louis Mayencourt8b8b13b2019-06-10 16:43:39 +010033
laurenw-arme4acfd52023-06-06 15:17:27 -050034cpu_reset_func_start neoverse_e1
35cpu_reset_func_end neoverse_e1
Louis Mayencourt8b8b13b2019-06-10 16:43:39 +010036
John Tsichritzis16e6d9f2019-02-19 14:01:55 +000037func neoverse_e1_cpu_pwr_dwn
38 mrs x0, NEOVERSE_E1_CPUPWRCTLR_EL1
39 orr x0, x0, #NEOVERSE_E1_CPUPWRCTLR_EL1_CORE_PWRDN_BIT
40 msr NEOVERSE_E1_CPUPWRCTLR_EL1, x0
Joel Huttona7c46872018-01-10 16:06:07 +000041 isb
42 ret
John Tsichritzis16e6d9f2019-02-19 14:01:55 +000043endfunc neoverse_e1_cpu_pwr_dwn
Joel Huttona7c46872018-01-10 16:06:07 +000044
laurenw-arme4acfd52023-06-06 15:17:27 -050045errata_report_shim neoverse_e1
Soby Mathew0980dce2018-09-17 04:34:35 +010046
John Tsichritzis16e6d9f2019-02-19 14:01:55 +000047.section .rodata.neoverse_e1_regs, "aS"
48neoverse_e1_regs: /* The ascii list of register names to be reported */
Joel Huttona7c46872018-01-10 16:06:07 +000049 .asciz "cpuectlr_el1", ""
50
John Tsichritzis16e6d9f2019-02-19 14:01:55 +000051func neoverse_e1_cpu_reg_dump
52 adr x6, neoverse_e1_regs
53 mrs x8, NEOVERSE_E1_ECTLR_EL1
Joel Huttona7c46872018-01-10 16:06:07 +000054 ret
John Tsichritzis16e6d9f2019-02-19 14:01:55 +000055endfunc neoverse_e1_cpu_reg_dump
Joel Huttona7c46872018-01-10 16:06:07 +000056
John Tsichritzis16e6d9f2019-02-19 14:01:55 +000057declare_cpu_ops neoverse_e1, NEOVERSE_E1_MIDR, \
Louis Mayencourt8b8b13b2019-06-10 16:43:39 +010058 neoverse_e1_reset_func, \
John Tsichritzis16e6d9f2019-02-19 14:01:55 +000059 neoverse_e1_cpu_pwr_dwn