mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 01:54:22 +00:00
cpus: Fix some incorrect definitions in CPU headers
There are some values that should be 64-bit immediates but that resolve to 0 because the type of the value is 32-bit wide. This patch casts the expressions to 64-bit before the shift so that the definition has the correct value. The definitions are only used in assembly so far, so the code is not actually affected by this bug. The assembler treats all values as 64-bit values, so there are no overflows. Change-Id: I965e4be631c1d28787c0913661d224c82a6b9155 Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
This commit is contained in:
parent
873e394b3b
commit
a69817eda2
4 changed files with 21 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2016-2019, ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -7,6 +7,8 @@
|
|||
#ifndef CORTEX_A53_H
|
||||
#define CORTEX_A53_H
|
||||
|
||||
#include <lib/utils_def.h>
|
||||
|
||||
/* Cortex-A53 midr for revision 0 */
|
||||
#define CORTEX_A53_MIDR 0x410FD030
|
||||
|
||||
|
@ -42,9 +44,10 @@
|
|||
******************************************************************************/
|
||||
#define CORTEX_A53_CPUACTLR p15, 0, c15
|
||||
|
||||
#define CORTEX_A53_CPUACTLR_ENDCCASCI_SHIFT 44
|
||||
#define CORTEX_A53_CPUACTLR_ENDCCASCI (1 << CORTEX_A53_CPUACTLR_ENDCCASCI_SHIFT)
|
||||
#define CORTEX_A53_CPUACTLR_DTAH (1 << 24)
|
||||
#define CORTEX_A53_CPUACTLR_ENDCCASCI_SHIFT U(44)
|
||||
#define CORTEX_A53_CPUACTLR_ENDCCASCI (ULL(1) << CORTEX_A53_CPUACTLR_ENDCCASCI_SHIFT)
|
||||
#define CORTEX_A53_CPUACTLR_DTAH_SHIFT U(24)
|
||||
#define CORTEX_A53_CPUACTLR_DTAH (ULL(1) << CORTEX_A53_CPUACTLR_DTAH_SHIFT)
|
||||
|
||||
/*******************************************************************************
|
||||
* L2 Auxiliary Control register specific definitions.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014-2017, ARM Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2014-2019, ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -7,6 +7,8 @@
|
|||
#ifndef CORTEX_A53_H
|
||||
#define CORTEX_A53_H
|
||||
|
||||
#include <lib/utils_def.h>
|
||||
|
||||
/* Cortex-A53 midr for revision 0 */
|
||||
#define CORTEX_A53_MIDR U(0x410FD030)
|
||||
|
||||
|
@ -43,13 +45,13 @@
|
|||
#define CORTEX_A53_CPUACTLR_EL1 S3_1_C15_C2_0
|
||||
|
||||
#define CORTEX_A53_CPUACTLR_EL1_ENDCCASCI_SHIFT U(44)
|
||||
#define CORTEX_A53_CPUACTLR_EL1_ENDCCASCI (U(1) << CORTEX_A53_CPUACTLR_EL1_ENDCCASCI_SHIFT)
|
||||
#define CORTEX_A53_CPUACTLR_EL1_ENDCCASCI (ULL(1) << CORTEX_A53_CPUACTLR_EL1_ENDCCASCI_SHIFT)
|
||||
#define CORTEX_A53_CPUACTLR_EL1_RADIS_SHIFT U(27)
|
||||
#define CORTEX_A53_CPUACTLR_EL1_RADIS (U(3) << CORTEX_A53_CPUACTLR_EL1_RADIS_SHIFT)
|
||||
#define CORTEX_A53_CPUACTLR_EL1_RADIS (ULL(3) << CORTEX_A53_CPUACTLR_EL1_RADIS_SHIFT)
|
||||
#define CORTEX_A53_CPUACTLR_EL1_L1RADIS_SHIFT U(25)
|
||||
#define CORTEX_A53_CPUACTLR_EL1_L1RADIS (U(3) << CORTEX_A53_CPUACTLR_EL1_L1RADIS_SHIFT)
|
||||
#define CORTEX_A53_CPUACTLR_EL1_L1RADIS (ULL(3) << CORTEX_A53_CPUACTLR_EL1_L1RADIS_SHIFT)
|
||||
#define CORTEX_A53_CPUACTLR_EL1_DTAH_SHIFT U(24)
|
||||
#define CORTEX_A53_CPUACTLR_EL1_DTAH (U(1) << CORTEX_A53_CPUACTLR_EL1_DTAH_SHIFT)
|
||||
#define CORTEX_A53_CPUACTLR_EL1_DTAH (ULL(1) << CORTEX_A53_CPUACTLR_EL1_DTAH_SHIFT)
|
||||
|
||||
/*******************************************************************************
|
||||
* L2 Auxiliary Control register specific definitions.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014-2017, ARM Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2014-2019, ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -26,10 +26,10 @@
|
|||
******************************************************************************/
|
||||
#define CORTEX_A57_ECTLR_EL1 S3_1_C15_C2_1
|
||||
|
||||
#define CORTEX_A57_ECTLR_SMP_BIT (U(1) << 6)
|
||||
#define CORTEX_A57_ECTLR_DIS_TWD_ACC_PFTCH_BIT (U(1) << 38)
|
||||
#define CORTEX_A57_ECTLR_L2_IPFTCH_DIST_MASK (U(0x3) << 35)
|
||||
#define CORTEX_A57_ECTLR_L2_DPFTCH_DIST_MASK (U(0x3) << 32)
|
||||
#define CORTEX_A57_ECTLR_SMP_BIT (ULL(1) << 6)
|
||||
#define CORTEX_A57_ECTLR_DIS_TWD_ACC_PFTCH_BIT (ULL(1) << 38)
|
||||
#define CORTEX_A57_ECTLR_L2_IPFTCH_DIST_MASK (ULL(0x3) << 35)
|
||||
#define CORTEX_A57_ECTLR_L2_DPFTCH_DIST_MASK (ULL(0x3) << 32)
|
||||
|
||||
#define CORTEX_A57_ECTLR_CPU_RET_CTRL_SHIFT U(0)
|
||||
#define CORTEX_A57_ECTLR_CPU_RET_CTRL_MASK (U(0x7) << CORTEX_A57_ECTLR_CPU_RET_CTRL_SHIFT)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
|
||||
* Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
@ -23,7 +23,7 @@
|
|||
******************************************************************************/
|
||||
#define CORTEX_A75_CPUACTLR_EL1 S3_0_C15_C1_0
|
||||
|
||||
#define CORTEX_A75_CPUACTLR_EL1_DISABLE_LOAD_PASS_STORE (1 << 35)
|
||||
#define CORTEX_A75_CPUACTLR_EL1_DISABLE_LOAD_PASS_STORE (ULL(1) << 35)
|
||||
|
||||
/* Definitions of register field mask in CORTEX_A75_CPUPWRCTLR_EL1 */
|
||||
#define CORTEX_A75_CORE_PWRDN_EN_MASK U(0x1)
|
||||
|
|
Loading…
Add table
Reference in a new issue