Varun Wadekar | 28463b9 | 2015-07-14 17:11:20 +0530 | [diff] [blame] | 1 | /* |
Varun Wadekar | 2b91412 | 2018-06-25 11:36:47 -0700 | [diff] [blame] | 2 | * Copyright (c) 2015-2018, ARM Limited and Contributors. All rights reserved. |
Varun Wadekar | 28463b9 | 2015-07-14 17:11:20 +0530 | [diff] [blame] | 3 | * |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
Varun Wadekar | 28463b9 | 2015-07-14 17:11:20 +0530 | [diff] [blame] | 5 | */ |
| 6 | |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 7 | #ifndef DENVER_H |
| 8 | #define DENVER_H |
Varun Wadekar | 28463b9 | 2015-07-14 17:11:20 +0530 | [diff] [blame] | 9 | |
Varun Wadekar | 3c337a6 | 2015-09-03 17:15:06 +0530 | [diff] [blame] | 10 | /* MIDR values for Denver */ |
Varun Wadekar | c6a11f6 | 2017-05-25 18:04:48 -0700 | [diff] [blame] | 11 | #define DENVER_MIDR_PN0 U(0x4E0F0000) |
| 12 | #define DENVER_MIDR_PN1 U(0x4E0F0010) |
| 13 | #define DENVER_MIDR_PN2 U(0x4E0F0020) |
| 14 | #define DENVER_MIDR_PN3 U(0x4E0F0030) |
| 15 | #define DENVER_MIDR_PN4 U(0x4E0F0040) |
Alex Van Brunt | 5f68fa7 | 2019-07-23 10:00:42 -0700 | [diff] [blame] | 16 | #define DENVER_MIDR_PN5 U(0x4E0F0050) |
| 17 | #define DENVER_MIDR_PN6 U(0x4E0F0060) |
| 18 | #define DENVER_MIDR_PN7 U(0x4E0F0070) |
| 19 | #define DENVER_MIDR_PN8 U(0x4E0F0080) |
Hemant Nigam | 96e081d | 2019-12-17 14:21:38 -0800 | [diff] [blame] | 20 | #define DENVER_MIDR_PN9 U(0x4E0F0090) |
Varun Wadekar | 3c337a6 | 2015-09-03 17:15:06 +0530 | [diff] [blame] | 21 | |
| 22 | /* Implementer code in the MIDR register */ |
Varun Wadekar | c6a11f6 | 2017-05-25 18:04:48 -0700 | [diff] [blame] | 23 | #define DENVER_IMPL U(0x4E) |
Varun Wadekar | 28463b9 | 2015-07-14 17:11:20 +0530 | [diff] [blame] | 24 | |
| 25 | /* CPU state ids - implementation defined */ |
Varun Wadekar | c6a11f6 | 2017-05-25 18:04:48 -0700 | [diff] [blame] | 26 | #define DENVER_CPU_STATE_POWER_DOWN U(0x3) |
Varun Wadekar | 28463b9 | 2015-07-14 17:11:20 +0530 | [diff] [blame] | 27 | |
Varun Wadekar | cd38e6e | 2018-08-28 09:11:30 -0700 | [diff] [blame] | 28 | /* Speculative store buffering */ |
| 29 | #define DENVER_CPU_DIS_SSB_EL3 (U(1) << 11) |
| 30 | #define DENVER_PN4_CPU_DIS_SSB_EL3 (U(1) << 18) |
| 31 | |
| 32 | /* Speculative memory disambiguation */ |
| 33 | #define DENVER_CPU_DIS_MD_EL3 (U(1) << 9) |
| 34 | #define DENVER_PN4_CPU_DIS_MD_EL3 (U(1) << 17) |
| 35 | |
Varun Wadekar | 2b91412 | 2018-06-25 11:36:47 -0700 | [diff] [blame] | 36 | /* Core power management states */ |
| 37 | #define DENVER_CPU_PMSTATE_C1 U(0x1) |
| 38 | #define DENVER_CPU_PMSTATE_C6 U(0x6) |
| 39 | #define DENVER_CPU_PMSTATE_C7 U(0x7) |
| 40 | #define DENVER_CPU_PMSTATE_MASK U(0xF) |
| 41 | |
Kalyani Chidambaram | fcd1e88 | 2018-09-12 14:59:08 -0700 | [diff] [blame] | 42 | /* ACTRL_ELx bits to enable dual execution*/ |
| 43 | #define DENVER_CPU_ENABLE_DUAL_EXEC_EL2 (ULL(1) << 9) |
| 44 | #define DENVER_CPU_ENABLE_DUAL_EXEC_EL3 (ULL(1) << 9) |
| 45 | #define DENVER_CPU_ENABLE_DUAL_EXEC_EL1 (U(1) << 4) |
| 46 | |
Julius Werner | 53456fc | 2019-07-09 13:49:11 -0700 | [diff] [blame] | 47 | #ifndef __ASSEMBLER__ |
Varun Wadekar | d43583c | 2016-02-22 11:09:41 -0800 | [diff] [blame] | 48 | |
| 49 | /* Disable Dynamic Code Optimisation */ |
| 50 | void denver_disable_dco(void); |
| 51 | |
Julius Werner | 53456fc | 2019-07-09 13:49:11 -0700 | [diff] [blame] | 52 | #endif /* __ASSEMBLER__ */ |
Varun Wadekar | d43583c | 2016-02-22 11:09:41 -0800 | [diff] [blame] | 53 | |
Antonio Nino Diaz | 5eb8837 | 2018-11-08 10:20:19 +0000 | [diff] [blame] | 54 | #endif /* DENVER_H */ |