blob: 71e7b5171866abff46b181daac610ab5857b7b3f [file] [log] [blame]
Joel Hutton46e88702018-01-10 16:06:07 +00001/*
John Tsichritzis11088e32019-02-19 14:01:55 +00002 * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
Joel Hutton46e88702018-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 Diaz09d40e02018-12-14 00:18:21 +00008#include <common/bl_common.h>
9#include <common/debug.h>
John Tsichritzis11088e32019-02-19 14:01:55 +000010#include <neoverse_e1.h>
Joel Hutton46e88702018-01-10 16:06:07 +000011#include <cpu_macros.S>
Joel Hutton46e88702018-01-10 16:06:07 +000012#include <plat_macros.S>
13
John Tsichritzis076b5f02019-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 Tsichritzis11088e32019-02-19 14:01:55 +000019func neoverse_e1_cpu_pwr_dwn
20 mrs x0, NEOVERSE_E1_CPUPWRCTLR_EL1
21 orr x0, x0, #NEOVERSE_E1_CPUPWRCTLR_EL1_CORE_PWRDN_BIT
22 msr NEOVERSE_E1_CPUPWRCTLR_EL1, x0
Joel Hutton46e88702018-01-10 16:06:07 +000023 isb
24 ret
John Tsichritzis11088e32019-02-19 14:01:55 +000025endfunc neoverse_e1_cpu_pwr_dwn
Joel Hutton46e88702018-01-10 16:06:07 +000026
Soby Mathew12af5ed2018-09-17 04:34:35 +010027#if REPORT_ERRATA
28/*
John Tsichritzis11088e32019-02-19 14:01:55 +000029 * Errata printing function for Neoverse N1. Must follow AAPCS.
Soby Mathew12af5ed2018-09-17 04:34:35 +010030 */
John Tsichritzis11088e32019-02-19 14:01:55 +000031func neoverse_e1_errata_report
Soby Mathew12af5ed2018-09-17 04:34:35 +010032 ret
John Tsichritzis11088e32019-02-19 14:01:55 +000033endfunc neoverse_e1_errata_report
Soby Mathew12af5ed2018-09-17 04:34:35 +010034#endif
35
36
John Tsichritzis11088e32019-02-19 14:01:55 +000037.section .rodata.neoverse_e1_regs, "aS"
38neoverse_e1_regs: /* The ascii list of register names to be reported */
Joel Hutton46e88702018-01-10 16:06:07 +000039 .asciz "cpuectlr_el1", ""
40
John Tsichritzis11088e32019-02-19 14:01:55 +000041func neoverse_e1_cpu_reg_dump
42 adr x6, neoverse_e1_regs
43 mrs x8, NEOVERSE_E1_ECTLR_EL1
Joel Hutton46e88702018-01-10 16:06:07 +000044 ret
John Tsichritzis11088e32019-02-19 14:01:55 +000045endfunc neoverse_e1_cpu_reg_dump
Joel Hutton46e88702018-01-10 16:06:07 +000046
John Tsichritzis11088e32019-02-19 14:01:55 +000047declare_cpu_ops neoverse_e1, NEOVERSE_E1_MIDR, \
Joel Hutton46e88702018-01-10 16:06:07 +000048 CPU_NO_RESET_FUNC, \
John Tsichritzis11088e32019-02-19 14:01:55 +000049 neoverse_e1_cpu_pwr_dwn