blob: 1e68f21a4cc732187d6240f48757888e1d28827b [file] [log] [blame]
Achin Gupta4f6ad662013-10-25 09:08:21 +01001/*
Antonio Nino Diaz96f16312019-02-11 13:34:54 +00002 * Copyright (c) 2014-2019, 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
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +00007#ifndef CORTEX_A57_H
8#define CORTEX_A57_H
Antonio Nino Diaze0f90632018-12-14 00:18:21 +00009
10#include <lib/utils_def.h>
Achin Gupta4f6ad662013-10-25 09:08:21 +010011
Soby Mathew8e2f2872014-08-14 12:49:05 +010012/* Cortex-A57 midr for revision 0 */
Varun Wadekarc6a11f62017-05-25 18:04:48 -070013#define CORTEX_A57_MIDR U(0x410FD070)
Achin Gupta4f6ad662013-10-25 09:08:21 +010014
Varun Wadekar3ce4e882015-08-21 15:52:51 +053015/* Retention timer tick definitions */
Varun Wadekarc6a11f62017-05-25 18:04:48 -070016#define RETENTION_ENTRY_TICKS_2 U(0x1)
17#define RETENTION_ENTRY_TICKS_8 U(0x2)
18#define RETENTION_ENTRY_TICKS_32 U(0x3)
19#define RETENTION_ENTRY_TICKS_64 U(0x4)
20#define RETENTION_ENTRY_TICKS_128 U(0x5)
21#define RETENTION_ENTRY_TICKS_256 U(0x6)
22#define RETENTION_ENTRY_TICKS_512 U(0x7)
Varun Wadekar3ce4e882015-08-21 15:52:51 +053023
Soby Mathew8e2f2872014-08-14 12:49:05 +010024/*******************************************************************************
25 * CPU Extended Control register specific definitions.
26 ******************************************************************************/
Varun Wadekar1384a162017-06-05 14:54:46 -070027#define CORTEX_A57_ECTLR_EL1 S3_1_C15_C2_1
Soby Mathew38b4bc92014-08-14 13:36:41 +010028
Antonio Nino Diaz96f16312019-02-11 13:34:54 +000029#define CORTEX_A57_ECTLR_SMP_BIT (ULL(1) << 6)
30#define CORTEX_A57_ECTLR_DIS_TWD_ACC_PFTCH_BIT (ULL(1) << 38)
31#define CORTEX_A57_ECTLR_L2_IPFTCH_DIST_MASK (ULL(0x3) << 35)
32#define CORTEX_A57_ECTLR_L2_DPFTCH_DIST_MASK (ULL(0x3) << 32)
Achin Gupta4f6ad662013-10-25 09:08:21 +010033
Varun Wadekarc6a11f62017-05-25 18:04:48 -070034#define CORTEX_A57_ECTLR_CPU_RET_CTRL_SHIFT U(0)
Antonio Nino Diaz5e79cfe2019-02-11 13:34:15 +000035#define CORTEX_A57_ECTLR_CPU_RET_CTRL_MASK (ULL(0x7) << CORTEX_A57_ECTLR_CPU_RET_CTRL_SHIFT)
Varun Wadekar3ce4e882015-08-21 15:52:51 +053036
Soby Mathew802f8652014-08-14 16:19:29 +010037/*******************************************************************************
Naga Sureshkumar Relli6a72a912016-07-01 12:52:41 +053038 * CPU Memory Error Syndrome register specific definitions.
39 ******************************************************************************/
Varun Wadekar1384a162017-06-05 14:54:46 -070040#define CORTEX_A57_MERRSR_EL1 S3_1_C15_C2_2
Naga Sureshkumar Relli6a72a912016-07-01 12:52:41 +053041
42/*******************************************************************************
Soby Mathew802f8652014-08-14 16:19:29 +010043 * CPU Auxiliary Control register specific definitions.
44 ******************************************************************************/
Eleanor Bonnici41b61be2017-08-09 16:42:40 +010045#define CORTEX_A57_CPUACTLR_EL1 S3_1_C15_C2_0
Soby Mathew802f8652014-08-14 16:19:29 +010046
Eleanor Bonnici41b61be2017-08-09 16:42:40 +010047#define CORTEX_A57_CPUACTLR_EL1_DIS_LOAD_PASS_DMB (ULL(1) << 59)
Dimitris Papastamose6625ec2018-04-05 14:38:26 +010048#define CORTEX_A57_CPUACTLR_EL1_DIS_LOAD_PASS_STORE (ULL(1) << 55)
Eleanor Bonnici41b61be2017-08-09 16:42:40 +010049#define CORTEX_A57_CPUACTLR_EL1_GRE_NGRE_AS_NGNRE (ULL(1) << 54)
50#define CORTEX_A57_CPUACTLR_EL1_DIS_OVERREAD (ULL(1) << 52)
51#define CORTEX_A57_CPUACTLR_EL1_NO_ALLOC_WBWA (ULL(1) << 49)
52#define CORTEX_A57_CPUACTLR_EL1_DCC_AS_DCCI (ULL(1) << 44)
53#define CORTEX_A57_CPUACTLR_EL1_FORCE_FPSCR_FLUSH (ULL(1) << 38)
Eleanor Bonnici0c9bd272017-08-02 16:35:04 +010054#define CORTEX_A57_CPUACTLR_EL1_DIS_INSTR_PREFETCH (ULL(1) << 32)
Eleanor Bonnici41b61be2017-08-09 16:42:40 +010055#define CORTEX_A57_CPUACTLR_EL1_DIS_STREAMING (ULL(3) << 27)
56#define CORTEX_A57_CPUACTLR_EL1_DIS_L1_STREAMING (ULL(3) << 25)
57#define CORTEX_A57_CPUACTLR_EL1_DIS_INDIRECT_PREDICTOR (ULL(1) << 4)
Soby Mathew802f8652014-08-14 16:19:29 +010058
Sandrine Bailleux798140d2014-07-17 16:06:39 +010059/*******************************************************************************
60 * L2 Control register specific definitions.
61 ******************************************************************************/
Eleanor Bonnicib83e42b2017-08-09 10:36:08 +010062#define CORTEX_A57_L2CTLR_EL1 S3_1_C11_C0_2
Sandrine Bailleux798140d2014-07-17 16:06:39 +010063
Varun Wadekarc6a11f62017-05-25 18:04:48 -070064#define CORTEX_A57_L2CTLR_DATA_RAM_LATENCY_SHIFT U(0)
Eleanor Bonnicib83e42b2017-08-09 10:36:08 +010065#define CORTEX_A57_L2CTLR_TAG_RAM_LATENCY_SHIFT U(6)
Sandrine Bailleux798140d2014-07-17 16:06:39 +010066
Eleanor Bonnicib83e42b2017-08-09 10:36:08 +010067#define CORTEX_A57_L2_DATA_RAM_LATENCY_3_CYCLES U(0x2)
68#define CORTEX_A57_L2_TAG_RAM_LATENCY_3_CYCLES U(0x2)
Sandrine Bailleux798140d2014-07-17 16:06:39 +010069
Eleanor Bonnicib83e42b2017-08-09 10:36:08 +010070#define CORTEX_A57_L2_ECC_PARITY_PROTECTION_BIT (U(1) << 21)
Varun Wadekar69ce1012016-05-12 13:43:33 -070071
Varun Wadekar3ce4e882015-08-21 15:52:51 +053072/*******************************************************************************
73 * L2 Extended Control register specific definitions.
74 ******************************************************************************/
Varun Wadekar1384a162017-06-05 14:54:46 -070075#define CORTEX_A57_L2ECTLR_EL1 S3_1_C11_C0_3
Varun Wadekar3ce4e882015-08-21 15:52:51 +053076
Varun Wadekarc6a11f62017-05-25 18:04:48 -070077#define CORTEX_A57_L2ECTLR_RET_CTRL_SHIFT U(0)
78#define CORTEX_A57_L2ECTLR_RET_CTRL_MASK (U(0x7) << CORTEX_A57_L2ECTLR_RET_CTRL_SHIFT)
Varun Wadekar3ce4e882015-08-21 15:52:51 +053079
Naga Sureshkumar Relli6a72a912016-07-01 12:52:41 +053080/*******************************************************************************
81 * L2 Memory Error Syndrome register specific definitions.
82 ******************************************************************************/
Varun Wadekar1384a162017-06-05 14:54:46 -070083#define CORTEX_A57_L2MERRSR_EL1 S3_1_C15_C2_3
Naga Sureshkumar Relli6a72a912016-07-01 12:52:41 +053084
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000085#endif /* CORTEX_A57_H */