xref: /rk3399_ARM-atf/include/lib/cpus/aarch32/cortex_a57.h (revision 72e8f2456af54b75a0a1d92aadfce0b4bcde6ba1)
1dc787588SYatharth Kochar /*
2*4c700c15SGovindraj Raja  * Copyright (c) 2017-2019, Arm Limited and Contributors. All rights reserved.
3dc787588SYatharth Kochar  *
482cb2c1aSdp-arm  * SPDX-License-Identifier: BSD-3-Clause
5dc787588SYatharth Kochar  */
6dc787588SYatharth Kochar 
7c3cf06f1SAntonio Nino Diaz #ifndef CORTEX_A57_H
8c3cf06f1SAntonio Nino Diaz #define CORTEX_A57_H
9c3cf06f1SAntonio Nino Diaz 
1009d40e0eSAntonio Nino Diaz #include <lib/utils_def.h>
11dc787588SYatharth Kochar 
12dc787588SYatharth Kochar /* Cortex-A57 midr for revision 0 */
131a74e4a8SAntonio Nino Diaz #define CORTEX_A57_MIDR			U(0x410FD070)
14dc787588SYatharth Kochar 
15dc787588SYatharth Kochar /* Retention timer tick definitions */
161a74e4a8SAntonio Nino Diaz #define RETENTION_ENTRY_TICKS_2		U(0x1)
171a74e4a8SAntonio Nino Diaz #define RETENTION_ENTRY_TICKS_8		U(0x2)
181a74e4a8SAntonio Nino Diaz #define RETENTION_ENTRY_TICKS_32	U(0x3)
191a74e4a8SAntonio Nino Diaz #define RETENTION_ENTRY_TICKS_64	U(0x4)
201a74e4a8SAntonio Nino Diaz #define RETENTION_ENTRY_TICKS_128	U(0x5)
211a74e4a8SAntonio Nino Diaz #define RETENTION_ENTRY_TICKS_256	U(0x6)
221a74e4a8SAntonio Nino Diaz #define RETENTION_ENTRY_TICKS_512	U(0x7)
23dc787588SYatharth Kochar 
24dc787588SYatharth Kochar /*******************************************************************************
25dc787588SYatharth Kochar  * CPU Extended Control register specific definitions.
26dc787588SYatharth Kochar  ******************************************************************************/
27fb7d32e5SVarun Wadekar #define CORTEX_A57_ECTLR			p15, 1, c15
28dc787588SYatharth Kochar 
29e4e6c4beSEleanor Bonnici #define CORTEX_A57_ECTLR_SMP_BIT		(ULL(1) << 6)
30e4e6c4beSEleanor Bonnici #define CORTEX_A57_ECTLR_DIS_TWD_ACC_PFTCH_BIT	(ULL(1) << 38)
31e4e6c4beSEleanor Bonnici #define CORTEX_A57_ECTLR_L2_IPFTCH_DIST_MASK	(ULL(0x3) << 35)
32e4e6c4beSEleanor Bonnici #define CORTEX_A57_ECTLR_L2_DPFTCH_DIST_MASK	(ULL(0x3) << 32)
33dc787588SYatharth Kochar 
341a74e4a8SAntonio Nino Diaz #define CORTEX_A57_ECTLR_CPU_RET_CTRL_SHIFT	U(0)
35e4e6c4beSEleanor Bonnici #define CORTEX_A57_ECTLR_CPU_RET_CTRL_MASK	(ULL(0x7) << CORTEX_A57_ECTLR_CPU_RET_CTRL_SHIFT)
36dc787588SYatharth Kochar 
37dc787588SYatharth Kochar /*******************************************************************************
38dc787588SYatharth Kochar  * CPU Memory Error Syndrome register specific definitions.
39dc787588SYatharth Kochar  ******************************************************************************/
40fb7d32e5SVarun Wadekar #define CORTEX_A57_CPUMERRSR			p15, 2, c15
41dc787588SYatharth Kochar 
42dc787588SYatharth Kochar /*******************************************************************************
43dc787588SYatharth Kochar  * CPU Auxiliary Control register specific definitions.
44dc787588SYatharth Kochar  ******************************************************************************/
4580bcf981SEleanor Bonnici #define CORTEX_A57_CPUACTLR				p15, 0, c15
46dc787588SYatharth Kochar 
4780bcf981SEleanor Bonnici #define CORTEX_A57_CPUACTLR_DIS_LOAD_PASS_DMB		(ULL(1) << 59)
480f6fbbd2SAmbroise Vincent #define CORTEX_A57_CPUACTLR_DIS_DMB_NULLIFICATION	(ULL(1) << 58)
49e0865708SDimitris Papastamos #define CORTEX_A57_CPUACTLR_DIS_LOAD_PASS_STORE		(ULL(1) << 55)
5080bcf981SEleanor Bonnici #define CORTEX_A57_CPUACTLR_GRE_NGRE_AS_NGNRE		(ULL(1) << 54)
5180bcf981SEleanor Bonnici #define CORTEX_A57_CPUACTLR_DIS_OVERREAD		(ULL(1) << 52)
5280bcf981SEleanor Bonnici #define CORTEX_A57_CPUACTLR_NO_ALLOC_WBWA		(ULL(1) << 49)
5380bcf981SEleanor Bonnici #define CORTEX_A57_CPUACTLR_DCC_AS_DCCI			(ULL(1) << 44)
5480bcf981SEleanor Bonnici #define CORTEX_A57_CPUACTLR_FORCE_FPSCR_FLUSH		(ULL(1) << 38)
5545b52c20SEleanor Bonnici #define CORTEX_A57_CPUACTLR_DIS_INSTR_PREFETCH		(ULL(1) << 32)
5680bcf981SEleanor Bonnici #define CORTEX_A57_CPUACTLR_DIS_STREAMING		(ULL(3) << 27)
5780bcf981SEleanor Bonnici #define CORTEX_A57_CPUACTLR_DIS_L1_STREAMING		(ULL(3) << 25)
5880bcf981SEleanor Bonnici #define CORTEX_A57_CPUACTLR_DIS_INDIRECT_PREDICTOR	(ULL(1) << 4)
59dc787588SYatharth Kochar 
60dc787588SYatharth Kochar /*******************************************************************************
61dc787588SYatharth Kochar  * L2 Control register specific definitions.
62dc787588SYatharth Kochar  ******************************************************************************/
63f9688f27SDimitris Papastamos #define CORTEX_A57_L2CTLR				p15, 1, c9, c0, 2
64dc787588SYatharth Kochar 
651a74e4a8SAntonio Nino Diaz #define CORTEX_A57_L2CTLR_DATA_RAM_LATENCY_SHIFT	U(0)
661a74e4a8SAntonio Nino Diaz #define CORTEX_A57_L2CTLR_TAG_RAM_LATENCY_SHIFT		U(6)
67dc787588SYatharth Kochar 
681a74e4a8SAntonio Nino Diaz #define CORTEX_A57_L2_DATA_RAM_LATENCY_3_CYCLES		U(0x2)
691a74e4a8SAntonio Nino Diaz #define CORTEX_A57_L2_TAG_RAM_LATENCY_3_CYCLES		U(0x2)
70dc787588SYatharth Kochar 
71dc787588SYatharth Kochar /*******************************************************************************
72dc787588SYatharth Kochar  * L2 Extended Control register specific definitions.
73dc787588SYatharth Kochar  ******************************************************************************/
74fb7d32e5SVarun Wadekar #define CORTEX_A57_L2ECTLR			p15, 1, c9, c0, 3
75dc787588SYatharth Kochar 
761a74e4a8SAntonio Nino Diaz #define CORTEX_A57_L2ECTLR_RET_CTRL_SHIFT	U(0)
771a74e4a8SAntonio Nino Diaz #define CORTEX_A57_L2ECTLR_RET_CTRL_MASK	(U(0x7) << CORTEX_A57_L2ECTLR_RET_CTRL_SHIFT)
78dc787588SYatharth Kochar 
79dc787588SYatharth Kochar /*******************************************************************************
80dc787588SYatharth Kochar  * L2 Memory Error Syndrome register specific definitions.
81dc787588SYatharth Kochar  ******************************************************************************/
82fb7d32e5SVarun Wadekar #define CORTEX_A57_L2MERRSR			p15, 3, c15
83dc787588SYatharth Kochar 
84c3cf06f1SAntonio Nino Diaz #endif /* CORTEX_A57_H */
85