diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/arch/aarch32/arch.h | 4 | ||||
-rw-r--r-- | include/arch/aarch32/arch_helpers.h | 4 | ||||
-rw-r--r-- | include/arch/aarch64/arch.h | 8 | ||||
-rw-r--r-- | include/arch/aarch64/arch_helpers.h | 24 | ||||
-rw-r--r-- | include/lib/cpus/aarch32/cortex_a57.h | 1 | ||||
-rw-r--r-- | include/lib/cpus/aarch64/cortex_a55.h | 18 | ||||
-rw-r--r-- | include/lib/cpus/aarch64/cortex_a57.h | 1 | ||||
-rw-r--r-- | include/lib/el3_runtime/pubsub.h | 2 | ||||
-rw-r--r-- | include/lib/extensions/ras.h | 6 |
9 files changed, 64 insertions, 4 deletions
diff --git a/include/arch/aarch32/arch.h b/include/arch/aarch32/arch.h index 2aa6effc2..44044d403 100644 --- a/include/arch/aarch32/arch.h +++ b/include/arch/aarch32/arch.h @@ -71,7 +71,11 @@ /* Data Cache set/way op type defines */ #define DC_OP_ISW U(0x0) #define DC_OP_CISW U(0x1) +#if ERRATA_A53_827319 +#define DC_OP_CSW DC_OP_CISW +#else #define DC_OP_CSW U(0x2) +#endif /******************************************************************************* * Generic timer memory mapped registers & offsets diff --git a/include/arch/aarch32/arch_helpers.h b/include/arch/aarch32/arch_helpers.h index 64ddc86fe..cbac84b93 100644 --- a/include/arch/aarch32/arch_helpers.h +++ b/include/arch/aarch32/arch_helpers.h @@ -328,7 +328,11 @@ DEFINE_BPIOP_FUNC(allis, BPIALLIS) */ DEFINE_DCOP_PARAM_FUNC(civac, DCCIMVAC) DEFINE_DCOP_PARAM_FUNC(ivac, DCIMVAC) +#if ERRATA_A53_819472 || ERRATA_A53_824069 || ERRATA_A53_827319 +DEFINE_DCOP_PARAM_FUNC(cvac, DCCIMVAC) +#else DEFINE_DCOP_PARAM_FUNC(cvac, DCCMVAC) +#endif /* Previously defined accessor functions with incomplete register names */ #define dsb() dsbsy() diff --git a/include/arch/aarch64/arch.h b/include/arch/aarch64/arch.h index 1032d9ae9..debe8722c 100644 --- a/include/arch/aarch64/arch.h +++ b/include/arch/aarch64/arch.h @@ -119,7 +119,11 @@ /* Data cache set/way op type defines */ #define DCISW U(0x0) #define DCCISW U(0x1) +#if ERRATA_A53_827319 +#define DCCSW DCCISW +#else #define DCCSW U(0x2) +#endif /* ID_AA64PFR0_EL1 definitions */ #define ID_AA64PFR0_EL0_SHIFT U(0) @@ -783,6 +787,10 @@ /* MPAM register definitions */ #define MPAM3_EL3_MPAMEN_BIT (ULL(1) << 63) +#define MPAMHCR_EL2_TRAP_MPAMIDR_EL1 (ULL(1) << 31) + +#define MPAM2_EL2_TRAPMPAM0EL1 (ULL(1) << 49) +#define MPAM2_EL2_TRAPMPAM1EL1 (ULL(1) << 48) #define MPAMIDR_HAS_HCR_BIT (ULL(1) << 17) diff --git a/include/arch/aarch64/arch_helpers.h b/include/arch/aarch64/arch_helpers.h index e07db300b..836d61ef2 100644 --- a/include/arch/aarch64/arch_helpers.h +++ b/include/arch/aarch64/arch_helpers.h @@ -113,6 +113,18 @@ static inline void tlbi ## _type(uint64_t v) \ } #endif /* ERRATA_A57_813419 */ +#if ERRATA_A53_819472 || ERRATA_A53_824069 || ERRATA_A53_827319 +/* + * Define function for DC instruction with register parameter that enables + * the workaround for errata 819472, 824069 and 827319 of Cortex-A53. + */ +#define DEFINE_DCOP_ERRATA_A53_TYPE_PARAM_FUNC(_name, _type) \ +static inline void dc ## _name(uint64_t v) \ +{ \ + __asm__("dc " #_type ", %0" : : "r" (v)); \ +} +#endif /* ERRATA_A53_819472 || ERRATA_A53_824069 || ERRATA_A53_827319 */ + DEFINE_SYSOP_TYPE_FUNC(tlbi, alle1) DEFINE_SYSOP_TYPE_FUNC(tlbi, alle1is) DEFINE_SYSOP_TYPE_FUNC(tlbi, alle2) @@ -143,11 +155,23 @@ DEFINE_SYSOP_TYPE_PARAM_FUNC(tlbi, vale3is) ******************************************************************************/ DEFINE_SYSOP_TYPE_PARAM_FUNC(dc, isw) DEFINE_SYSOP_TYPE_PARAM_FUNC(dc, cisw) +#if ERRATA_A53_827319 +DEFINE_DCOP_ERRATA_A53_TYPE_PARAM_FUNC(csw, cisw) +#else DEFINE_SYSOP_TYPE_PARAM_FUNC(dc, csw) +#endif +#if ERRATA_A53_819472 || ERRATA_A53_824069 || ERRATA_A53_827319 +DEFINE_DCOP_ERRATA_A53_TYPE_PARAM_FUNC(cvac, civac) +#else DEFINE_SYSOP_TYPE_PARAM_FUNC(dc, cvac) +#endif DEFINE_SYSOP_TYPE_PARAM_FUNC(dc, ivac) DEFINE_SYSOP_TYPE_PARAM_FUNC(dc, civac) +#if ERRATA_A53_819472 || ERRATA_A53_824069 || ERRATA_A53_827319 +DEFINE_DCOP_ERRATA_A53_TYPE_PARAM_FUNC(cvau, civac) +#else DEFINE_SYSOP_TYPE_PARAM_FUNC(dc, cvau) +#endif DEFINE_SYSOP_TYPE_PARAM_FUNC(dc, zva) /******************************************************************************* diff --git a/include/lib/cpus/aarch32/cortex_a57.h b/include/lib/cpus/aarch32/cortex_a57.h index f7005da3e..ffabd61ac 100644 --- a/include/lib/cpus/aarch32/cortex_a57.h +++ b/include/lib/cpus/aarch32/cortex_a57.h @@ -45,6 +45,7 @@ #define CORTEX_A57_CPUACTLR p15, 0, c15 #define CORTEX_A57_CPUACTLR_DIS_LOAD_PASS_DMB (ULL(1) << 59) +#define CORTEX_A57_CPUACTLR_DIS_DMB_NULLIFICATION (ULL(1) << 58) #define CORTEX_A57_CPUACTLR_DIS_LOAD_PASS_STORE (ULL(1) << 55) #define CORTEX_A57_CPUACTLR_GRE_NGRE_AS_NGNRE (ULL(1) << 54) #define CORTEX_A57_CPUACTLR_DIS_OVERREAD (ULL(1) << 52) diff --git a/include/lib/cpus/aarch64/cortex_a55.h b/include/lib/cpus/aarch64/cortex_a55.h index 8b21e16a1..feac1d2f0 100644 --- a/include/lib/cpus/aarch64/cortex_a55.h +++ b/include/lib/cpus/aarch64/cortex_a55.h @@ -18,6 +18,24 @@ #define CORTEX_A55_CPUPWRCTLR_EL1 S3_0_C15_C2_7 #define CORTEX_A55_CPUECTLR_EL1 S3_0_C15_C1_4 +#define CORTEX_A55_CPUECTLR_EL1_L1WSCTL (ULL(3) << 25) + +/******************************************************************************* + * CPU Auxiliary Control register specific definitions. + ******************************************************************************/ +#define CORTEX_A55_CPUACTLR_EL1 S3_0_C15_C1_0 + +#define CORTEX_A55_CPUACTLR_EL1_DISABLE_WRITE_STREAMING (ULL(1) << 24) +#define CORTEX_A55_CPUACTLR_EL1_DISABLE_DUAL_ISSUE (ULL(1) << 31) +#define CORTEX_A55_CPUACTLR_EL1_DISABLE_L1_PAGEWALKS (ULL(1) << 49) + +/******************************************************************************* + * CPU Identification register specific definitions. + ******************************************************************************/ +#define CORTEX_A55_CLIDR_EL1 S3_1_C0_C0_1 + +#define CORTEX_A55_CLIDR_EL1_CTYPE3 (ULL(7) << 6) + /* Definitions of register field mask in CORTEX_A55_CPUPWRCTLR_EL1 */ #define CORTEX_A55_CORE_PWRDN_EN_MASK U(0x1) diff --git a/include/lib/cpus/aarch64/cortex_a57.h b/include/lib/cpus/aarch64/cortex_a57.h index 1e68f21a4..102ff60c3 100644 --- a/include/lib/cpus/aarch64/cortex_a57.h +++ b/include/lib/cpus/aarch64/cortex_a57.h @@ -45,6 +45,7 @@ #define CORTEX_A57_CPUACTLR_EL1 S3_1_C15_C2_0 #define CORTEX_A57_CPUACTLR_EL1_DIS_LOAD_PASS_DMB (ULL(1) << 59) +#define CORTEX_A57_CPUACTLR_EL1_DIS_DMB_NULLIFICATION (ULL(1) << 58) #define CORTEX_A57_CPUACTLR_EL1_DIS_LOAD_PASS_STORE (ULL(1) << 55) #define CORTEX_A57_CPUACTLR_EL1_GRE_NGRE_AS_NGNRE (ULL(1) << 54) #define CORTEX_A57_CPUACTLR_EL1_DIS_OVERREAD (ULL(1) << 52) diff --git a/include/lib/el3_runtime/pubsub.h b/include/lib/el3_runtime/pubsub.h index eb9128656..9c303f548 100644 --- a/include/lib/el3_runtime/pubsub.h +++ b/include/lib/el3_runtime/pubsub.h @@ -49,7 +49,7 @@ /* * Have the function func called back when the specified event happens. This * macro places the function address into the pubsub section, which is picked up - * and invoked by the invoke_pubsubs() function via. the PUBLISH_EVENT* macros. + * and invoked by the invoke_pubsubs() function via the PUBLISH_EVENT* macros. * * The extern declaration is there to satisfy MISRA C-2012 rule 8.4. */ diff --git a/include/lib/extensions/ras.h b/include/lib/extensions/ras.h index 9f6b2905f..98daab601 100644 --- a/include/lib/extensions/ras.h +++ b/include/lib/extensions/ras.h @@ -106,7 +106,7 @@ struct err_handler_data { */ uint32_t syndrome; - /* For errors signalled via. interrupt, the raw interrupt ID; otherwise, 0. */ + /* For errors signalled via interrupt, the raw interrupt ID; otherwise, 0. */ unsigned int interrupt; }; @@ -129,7 +129,7 @@ struct err_record_info { union { struct { /* - * For a group accessed via. memory-mapped register, + * For a group accessed via memory-mapped register, * base address of the page hosting error records, and * the size of the record group. */ @@ -141,7 +141,7 @@ struct err_record_info { struct { /* - * For error records accessed via. system register, index of + * For error records accessed via system register, index of * the error record. */ unsigned int idx_start; |