blob: 6c45c06693e18495567344e859978bec596099a4 [file] [log] [blame]
Achin Gupta4f6ad662013-10-25 09:08:21 +01001/*
Varun Wadekarc6a11f62017-05-25 18:04:48 -07002 * Copyright (c) 2014-2017, ARM Limited and Contributors. All rights reserved.
Achin Gupta4f6ad662013-10-25 09:08:21 +01003 *
dp-armfa3cf0b2017-05-03 09:38:09 +01004 * SPDX-License-Identifier: BSD-3-Clause
Achin Gupta4f6ad662013-10-25 09:08:21 +01005 */
6
Soby Mathew8e2f2872014-08-14 12:49:05 +01007#ifndef __CORTEX_A57_H__
8#define __CORTEX_A57_H__
Eleanor Bonnicib83e42b2017-08-09 10:36:08 +01009#include <utils_def.h>
Achin Gupta4f6ad662013-10-25 09:08:21 +010010
Soby Mathew8e2f2872014-08-14 12:49:05 +010011/* Cortex-A57 midr for revision 0 */
Varun Wadekarc6a11f62017-05-25 18:04:48 -070012#define CORTEX_A57_MIDR U(0x410FD070)
Achin Gupta4f6ad662013-10-25 09:08:21 +010013
Varun Wadekar3ce4e882015-08-21 15:52:51 +053014/* Retention timer tick definitions */
Varun Wadekarc6a11f62017-05-25 18:04:48 -070015#define RETENTION_ENTRY_TICKS_2 U(0x1)
16#define RETENTION_ENTRY_TICKS_8 U(0x2)
17#define RETENTION_ENTRY_TICKS_32 U(0x3)
18#define RETENTION_ENTRY_TICKS_64 U(0x4)
19#define RETENTION_ENTRY_TICKS_128 U(0x5)
20#define RETENTION_ENTRY_TICKS_256 U(0x6)
21#define RETENTION_ENTRY_TICKS_512 U(0x7)
Varun Wadekar3ce4e882015-08-21 15:52:51 +053022
Soby Mathew8e2f2872014-08-14 12:49:05 +010023/*******************************************************************************
24 * CPU Extended Control register specific definitions.
25 ******************************************************************************/
Varun Wadekar1384a162017-06-05 14:54:46 -070026#define CORTEX_A57_ECTLR_EL1 S3_1_C15_C2_1
Soby Mathew38b4bc92014-08-14 13:36:41 +010027
Varun Wadekarc6a11f62017-05-25 18:04:48 -070028#define CORTEX_A57_ECTLR_SMP_BIT (U(1) << 6)
29#define CORTEX_A57_ECTLR_DIS_TWD_ACC_PFTCH_BIT (U(1) << 38)
30#define CORTEX_A57_ECTLR_L2_IPFTCH_DIST_MASK (U(0x3) << 35)
31#define CORTEX_A57_ECTLR_L2_DPFTCH_DIST_MASK (U(0x3) << 32)
Achin Gupta4f6ad662013-10-25 09:08:21 +010032
Varun Wadekarc6a11f62017-05-25 18:04:48 -070033#define CORTEX_A57_ECTLR_CPU_RET_CTRL_SHIFT U(0)
34#define CORTEX_A57_ECTLR_CPU_RET_CTRL_MASK (U(0x7) << CORTEX_A57_ECTLR_CPU_RET_CTRL_SHIFT)
Varun Wadekar3ce4e882015-08-21 15:52:51 +053035
Soby Mathew802f8652014-08-14 16:19:29 +010036/*******************************************************************************
Naga Sureshkumar Relli6a72a912016-07-01 12:52:41 +053037 * CPU Memory Error Syndrome register specific definitions.
38 ******************************************************************************/
Varun Wadekar1384a162017-06-05 14:54:46 -070039#define CORTEX_A57_MERRSR_EL1 S3_1_C15_C2_2
Naga Sureshkumar Relli6a72a912016-07-01 12:52:41 +053040
41/*******************************************************************************
Soby Mathew802f8652014-08-14 16:19:29 +010042 * CPU Auxiliary Control register specific definitions.
43 ******************************************************************************/
Eleanor Bonnici41b61be2017-08-09 16:42:40 +010044#define CORTEX_A57_CPUACTLR_EL1 S3_1_C15_C2_0
Soby Mathew802f8652014-08-14 16:19:29 +010045
Eleanor Bonnici41b61be2017-08-09 16:42:40 +010046#define CORTEX_A57_CPUACTLR_EL1_DIS_LOAD_PASS_DMB (ULL(1) << 59)
47#define CORTEX_A57_CPUACTLR_EL1_GRE_NGRE_AS_NGNRE (ULL(1) << 54)
48#define CORTEX_A57_CPUACTLR_EL1_DIS_OVERREAD (ULL(1) << 52)
49#define CORTEX_A57_CPUACTLR_EL1_NO_ALLOC_WBWA (ULL(1) << 49)
50#define CORTEX_A57_CPUACTLR_EL1_DCC_AS_DCCI (ULL(1) << 44)
51#define CORTEX_A57_CPUACTLR_EL1_FORCE_FPSCR_FLUSH (ULL(1) << 38)
Eleanor Bonnici0c9bd272017-08-02 16:35:04 +010052#define CORTEX_A57_CPUACTLR_EL1_DIS_INSTR_PREFETCH (ULL(1) << 32)
Eleanor Bonnici41b61be2017-08-09 16:42:40 +010053#define CORTEX_A57_CPUACTLR_EL1_DIS_STREAMING (ULL(3) << 27)
54#define CORTEX_A57_CPUACTLR_EL1_DIS_L1_STREAMING (ULL(3) << 25)
55#define CORTEX_A57_CPUACTLR_EL1_DIS_INDIRECT_PREDICTOR (ULL(1) << 4)
Soby Mathew802f8652014-08-14 16:19:29 +010056
Sandrine Bailleux798140d2014-07-17 16:06:39 +010057/*******************************************************************************
58 * L2 Control register specific definitions.
59 ******************************************************************************/
Eleanor Bonnicib83e42b2017-08-09 10:36:08 +010060#define CORTEX_A57_L2CTLR_EL1 S3_1_C11_C0_2
Sandrine Bailleux798140d2014-07-17 16:06:39 +010061
Varun Wadekarc6a11f62017-05-25 18:04:48 -070062#define CORTEX_A57_L2CTLR_DATA_RAM_LATENCY_SHIFT U(0)
Eleanor Bonnicib83e42b2017-08-09 10:36:08 +010063#define CORTEX_A57_L2CTLR_TAG_RAM_LATENCY_SHIFT U(6)
Sandrine Bailleux798140d2014-07-17 16:06:39 +010064
Eleanor Bonnicib83e42b2017-08-09 10:36:08 +010065#define CORTEX_A57_L2_DATA_RAM_LATENCY_3_CYCLES U(0x2)
66#define CORTEX_A57_L2_TAG_RAM_LATENCY_3_CYCLES U(0x2)
Sandrine Bailleux798140d2014-07-17 16:06:39 +010067
Eleanor Bonnicib83e42b2017-08-09 10:36:08 +010068#define CORTEX_A57_L2_ECC_PARITY_PROTECTION_BIT (U(1) << 21)
Varun Wadekar69ce1012016-05-12 13:43:33 -070069
Varun Wadekar3ce4e882015-08-21 15:52:51 +053070/*******************************************************************************
71 * L2 Extended Control register specific definitions.
72 ******************************************************************************/
Varun Wadekar1384a162017-06-05 14:54:46 -070073#define CORTEX_A57_L2ECTLR_EL1 S3_1_C11_C0_3
Varun Wadekar3ce4e882015-08-21 15:52:51 +053074
Varun Wadekarc6a11f62017-05-25 18:04:48 -070075#define CORTEX_A57_L2ECTLR_RET_CTRL_SHIFT U(0)
76#define CORTEX_A57_L2ECTLR_RET_CTRL_MASK (U(0x7) << CORTEX_A57_L2ECTLR_RET_CTRL_SHIFT)
Varun Wadekar3ce4e882015-08-21 15:52:51 +053077
Naga Sureshkumar Relli6a72a912016-07-01 12:52:41 +053078/*******************************************************************************
79 * L2 Memory Error Syndrome register specific definitions.
80 ******************************************************************************/
Varun Wadekar1384a162017-06-05 14:54:46 -070081#define CORTEX_A57_L2MERRSR_EL1 S3_1_C15_C2_3
Naga Sureshkumar Relli6a72a912016-07-01 12:52:41 +053082
Eleanor Bonnici41b61be2017-08-09 16:42:40 +010083#if !ERROR_DEPRECATED
84/*
85 * These registers were previously wrongly named. Provide previous definitions so
86 * as not to break platforms that continue using them.
87 */
88#define CORTEX_A57_ACTLR_EL1 CORTEX_A57_CPUACTLR_EL1
89
90#define CORTEX_A57_ACTLR_DIS_LOAD_PASS_DMB CORTEX_A57_CPUACTLR_EL1_DIS_LOAD_PASS_DMB
91#define CORTEX_A57_ACTLR_GRE_NGRE_AS_NGNRE CORTEX_A57_CPUACTLR_EL1_GRE_NGRE_AS_NGNRE
92#define CORTEX_A57_ACTLR_DIS_OVERREAD CORTEX_A57_CPUACTLR_EL1_DIS_OVERREAD
93#define CORTEX_A57_ACTLR_NO_ALLOC_WBWA CORTEX_A57_CPUACTLR_EL1_NO_ALLOC_WBWA
94#define CORTEX_A57_ACTLR_DCC_AS_DCCI CORTEX_A57_CPUACTLR_EL1_DCC_AS_DCCI
95#define CORTEX_A57_ACTLR_FORCE_FPSCR_FLUSH CORTEX_A57_CPUACTLR_EL1_FORCE_FPSCR_FLUSH
96#define CORTEX_A57_ACTLR_DIS_STREAMING CORTEX_A57_CPUACTLR_EL1_DIS_STREAMING
97#define CORTEX_A57_ACTLR_DIS_L1_STREAMING CORTEX_A57_CPUACTLR_EL1_DIS_L1_STREAMING
98#define CORTEX_A57_ACTLR_DIS_INDIRECT_PREDICTOR CORTEX_A57_CPUACTLR_EL1_DIS_INDIRECT_PREDICTOR
99#endif /* !ERROR_DEPRECATED */
100
Soby Mathew8e2f2872014-08-14 12:49:05 +0100101#endif /* __CORTEX_A57_H__ */