neoverse_v1.S 2.05 KB
Newer Older
1
/*
2
 * Copyright (c) 2019-2020, ARM Limited. All rights reserved.
3
4
5
6
7
8
9
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#include <arch.h>
#include <asm_macros.S>
#include <common/bl_common.h>
10
#include <neoverse_v1.h>
11
12
13
#include <cpu_macros.S>
#include <plat_macros.S>

14
15
/* Hardware handled coherency */
#if HW_ASSISTED_COHERENCY == 0
16
#error "Neoverse V1 must be compiled with HW_ASSISTED_COHERENCY enabled"
17
18
19
20
#endif

/* 64-bit only core */
#if CTX_INCLUDE_AARCH32_REGS == 1
21
#error "Neoverse-V1 supports only AArch64. Compile with CTX_INCLUDE_AARCH32_REGS=0"
22
23
#endif

24
25
26
27
	/* ---------------------------------------------
	 * HW will do the cache maintenance while powering down
	 * ---------------------------------------------
	 */
28
func neoverse_v1_core_pwr_dwn
29
30
31
32
	/* ---------------------------------------------
	 * Enable CPU power down bit in power control register
	 * ---------------------------------------------
	 */
33
34
35
	mrs	x0, NEOVERSE_V1_CPUPWRCTLR_EL1
	orr	x0, x0, #NEOVERSE_V1_CPUPWRCTLR_EL1_CORE_PWRDN_BIT
	msr	NEOVERSE_V1_CPUPWRCTLR_EL1, x0
36
37
	isb
	ret
38
endfunc neoverse_v1_core_pwr_dwn
39
40

	/*
41
	 * Errata printing function for Neoverse V1. Must follow AAPCS.
42
43
	 */
#if REPORT_ERRATA
44
func neoverse_v1_errata_report
45
	ret
46
endfunc neoverse_v1_errata_report
47
48
#endif

49
func neoverse_v1_reset_func
50
51
52
53
54
55
56
	mov	x19, x30

	/* Disable speculative loads */
	msr	SSBS, xzr

	isb
	ret	x19
57
endfunc neoverse_v1_reset_func
58

59
	/* ---------------------------------------------
60
	 * This function provides Neoverse-V1 specific
61
62
63
64
65
66
67
	 * register information for crash reporting.
	 * It needs to return with x6 pointing to
	 * a list of register names in ascii and
	 * x8 - x15 having values of registers to be
	 * reported.
	 * ---------------------------------------------
	 */
68
69
.section .rodata.neoverse_v1_regs, "aS"
neoverse_v1_regs:  /* The ascii list of register names to be reported */
70
71
	.asciz	"cpuectlr_el1", ""

72
73
74
func neoverse_v1_cpu_reg_dump
	adr	x6, neoverse_v1_regs
	mrs	x8, NEOVERSE_V1_CPUECTLR_EL1
75
	ret
76
endfunc neoverse_v1_cpu_reg_dump
77

78
79
80
declare_cpu_ops neoverse_v1, NEOVERSE_V1_MIDR, \
	neoverse_v1_reset_func, \
	neoverse_v1_core_pwr_dwn