blob: fa733ce1b1876c6699d69d91bb69060bfe34edd7 [file] [log] [blame]
Isla Mitchellabbffe92017-08-03 16:04:46 +01001/*
John Tsichritzisda6d75a2019-02-19 13:49:06 +00002 * Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
Isla Mitchellabbffe92017-08-03 16:04:46 +01003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
John Tsichritzisda6d75a2019-02-19 13:49:06 +00007#ifndef NEOVERSE_N1_H
8#define NEOVERSE_N1_H
Antonio Nino Diaz43534992018-10-25 17:11:02 +01009
Antonio Nino Diaz09d40e02018-12-14 00:18:21 +000010#include <lib/utils_def.h>
Isla Mitchellabbffe92017-08-03 16:04:46 +010011
John Tsichritzisda6d75a2019-02-19 13:49:06 +000012/* Neoverse N1 MIDR for revision 0 */
13#define NEOVERSE_N1_MIDR U(0x410fd0c0)
Isla Mitchellabbffe92017-08-03 16:04:46 +010014
laurenw-arm80942622019-08-20 15:51:24 -050015/* Exception Syndrome register EC code for IC Trap */
16#define NEOVERSE_N1_EC_IC_TRAP U(0x1f)
17
Isla Mitchellabbffe92017-08-03 16:04:46 +010018/*******************************************************************************
Louis Mayencourt632ab3e2019-04-18 14:34:11 +010019 * CPU Power Control register specific definitions.
Isla Mitchellabbffe92017-08-03 16:04:46 +010020 ******************************************************************************/
John Tsichritzisda6d75a2019-02-19 13:49:06 +000021#define NEOVERSE_N1_CPUPWRCTLR_EL1 S3_0_C15_C2_7
Isla Mitchellabbffe92017-08-03 16:04:46 +010022
John Tsichritzisda6d75a2019-02-19 13:49:06 +000023/* Definitions of register field mask in NEOVERSE_N1_CPUPWRCTLR_EL1 */
24#define NEOVERSE_N1_CORE_PWRDN_EN_MASK U(0x1)
Isla Mitchellabbffe92017-08-03 16:04:46 +010025
John Tsichritzisda6d75a2019-02-19 13:49:06 +000026#define NEOVERSE_N1_ACTLR_AMEN_BIT (U(1) << 4)
Dimitris Papastamos08268e22018-02-13 11:28:02 +000027
John Tsichritzisda6d75a2019-02-19 13:49:06 +000028#define NEOVERSE_N1_AMU_NR_COUNTERS U(5)
29#define NEOVERSE_N1_AMU_GROUP0_MASK U(0x1f)
Dimitris Papastamos08268e22018-02-13 11:28:02 +000030
Louis Mayencourt632ab3e2019-04-18 14:34:11 +010031/*******************************************************************************
32 * CPU Extended Control register specific definitions.
33 ******************************************************************************/
34#define NEOVERSE_N1_CPUECTLR_EL1 S3_0_C15_C1_4
35
lauwal019eceb022019-06-24 11:38:53 -050036#define NEOVERSE_N1_WS_THR_L2_MASK (ULL(3) << 24)
lauwal0111c48372019-06-24 11:47:30 -050037#define NEOVERSE_N1_CPUECTLR_EL1_MM_TLBPF_DIS_BIT (ULL(1) << 51)
lauwal019eceb022019-06-24 11:38:53 -050038
Louis Mayencourt632ab3e2019-04-18 14:34:11 +010039/*******************************************************************************
40 * CPU Auxiliary Control register specific definitions.
41 ******************************************************************************/
lauwal01a601afe2019-06-24 11:23:50 -050042#define NEOVERSE_N1_CPUACTLR_EL1 S3_0_C15_C1_0
43
44#define NEOVERSE_N1_CPUACTLR_EL1_BIT_6 (ULL(1) << 6)
lauwal01411f4952019-06-24 11:44:58 -050045#define NEOVERSE_N1_CPUACTLR_EL1_BIT_13 (ULL(1) << 13)
lauwal01a601afe2019-06-24 11:23:50 -050046
Louis Mayencourt632ab3e2019-04-18 14:34:11 +010047#define NEOVERSE_N1_CPUACTLR2_EL1 S3_0_C15_C1_1
48
lauwal012017ab22019-06-24 11:32:40 -050049#define NEOVERSE_N1_CPUACTLR2_EL1_BIT_0 (ULL(1) << 0)
Andre Przywara5f5d0762019-05-20 14:57:06 +010050#define NEOVERSE_N1_CPUACTLR2_EL1_BIT_2 (ULL(1) << 2)
lauwal01ef5fa7d2019-06-24 11:35:37 -050051#define NEOVERSE_N1_CPUACTLR2_EL1_BIT_11 (ULL(1) << 11)
lauwal012017ab22019-06-24 11:32:40 -050052#define NEOVERSE_N1_CPUACTLR2_EL1_BIT_15 (ULL(1) << 15)
Andre Przywara5f5d0762019-05-20 14:57:06 +010053#define NEOVERSE_N1_CPUACTLR2_EL1_BIT_16 (ULL(1) << 16)
lauwal01e34606f2019-06-24 11:28:34 -050054#define NEOVERSE_N1_CPUACTLR2_EL1_BIT_59 (ULL(1) << 59)
55
lauwal01335b3c72019-06-24 11:42:02 -050056#define NEOVERSE_N1_CPUACTLR3_EL1 S3_0_C15_C1_2
57
58#define NEOVERSE_N1_CPUACTLR3_EL1_BIT_10 (ULL(1) << 10)
Louis Mayencourt632ab3e2019-04-18 14:34:11 +010059
Dimitris Papastamos040b5462018-03-26 16:46:01 +010060/* Instruction patching registers */
61#define CPUPSELR_EL3 S3_6_C15_C8_0
62#define CPUPCR_EL3 S3_6_C15_C8_1
63#define CPUPOR_EL3 S3_6_C15_C8_2
64#define CPUPMR_EL3 S3_6_C15_C8_3
65
John Tsichritzisda6d75a2019-02-19 13:49:06 +000066#endif /* NEOVERSE_N1_H */