Add support for Cortex-A75 and Cortex-A55 CPUs
authorDavid Wang <david.wang@arm.com>
Wed, 9 Nov 2016 16:29:02 +0000 (16:29 +0000)
committerJeenu Viswambharan <jeenu.viswambharan@arm.com>
Thu, 1 Jun 2017 10:44:52 +0000 (11:44 +0100)
Both Cortex-A75 and Cortex-A55 CPUs use the ARM DynamIQ Shared Unit
(DSU). The power-down and power-up sequences are therefore mostly
managed in hardware, and required software operations are considerably
simpler.

Change-Id: I68b30e6e1ebe7c041d5e67f39c59f08575fc7ecc
Co-authored-by: Sandrine Bailleux <sandrine.bailleux@arm.com>
Signed-off-by: Jeenu Viswambharan <jeenu.viswambharan@arm.com>
include/lib/cpus/aarch64/cortex_a55.h [new file with mode: 0644]
include/lib/cpus/aarch64/cortex_a75.h [new file with mode: 0644]
lib/cpus/aarch64/cortex_a55.S [new file with mode: 0644]
lib/cpus/aarch64/cortex_a75.S [new file with mode: 0644]
plat/arm/board/fvp/platform.mk

diff --git a/include/lib/cpus/aarch64/cortex_a55.h b/include/lib/cpus/aarch64/cortex_a55.h
new file mode 100644 (file)
index 0000000..293f2b2
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef __CORTEX_A55_H__
+#define __CORTEX_A55_H__
+
+/* Cortex-A55 MIDR for revision 0 */
+#define CORTEX_A55_MIDR                0x410fd050
+
+/*******************************************************************************
+ * CPU Extended Control register specific definitions.
+ ******************************************************************************/
+#define CORTEX_A55_CPUPWRCTLR_EL1              S3_0_C15_C2_7
+#define CORTEX_A55_CPUECTLR_EL1                S3_0_C15_C1_4
+
+/* Definitions of register field mask in CORTEX_A55_CPUPWRCTLR_EL1 */
+#define CORTEX_A55_CORE_PWRDN_EN_MASK  0x1
+
+#endif /* __CORTEX_A55_H__ */
diff --git a/include/lib/cpus/aarch64/cortex_a75.h b/include/lib/cpus/aarch64/cortex_a75.h
new file mode 100644 (file)
index 0000000..1ffe20b
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef __CORTEX_A75_H__
+#define __CORTEX_A75_H__
+
+/* Cortex-A75 MIDR */
+#define CORTEX_A75_MIDR                0x410fd0a0
+
+/*******************************************************************************
+ * CPU Extended Control register specific definitions.
+ ******************************************************************************/
+#define CORTEX_A75_CPUPWRCTLR_EL1      S3_0_C15_C2_7
+#define CORTEX_A75_CPUECTLR_EL1                S3_0_C15_C1_4
+
+/* Definitions of register field mask in CORTEX_A75_CPUPWRCTLR_EL1 */
+#define CORTEX_A75_CORE_PWRDN_EN_MASK  0x1
+
+#endif /* __CORTEX_A75_H__ */
diff --git a/lib/cpus/aarch64/cortex_a55.S b/lib/cpus/aarch64/cortex_a55.S
new file mode 100644 (file)
index 0000000..f103159
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <cortex_a55.h>
+#include <arch.h>
+#include <asm_macros.S>
+#include <bl_common.h>
+#include <cpu_macros.S>
+#include <plat_macros.S>
+
+       /* ---------------------------------------------
+        * HW will do the cache maintenance while powering down
+        * ---------------------------------------------
+        */
+func cortex_a55_core_pwr_dwn
+       /* ---------------------------------------------
+        * Enable CPU power down bit in power control register
+        * ---------------------------------------------
+        */
+       mrs     x0, CORTEX_A55_CPUPWRCTLR_EL1
+       orr     x0, x0, #CORTEX_A55_CORE_PWRDN_EN_MASK
+       msr     CORTEX_A55_CPUPWRCTLR_EL1, x0
+       isb
+       ret
+endfunc cortex_a55_core_pwr_dwn
+
+       /* ---------------------------------------------
+        * This function provides cortex_a55 specific
+        * register information for crash reporting.
+        * It needs to return with x6 pointing to
+        * a list of register names in ascii and
+        * x8 - x15 having values of registers to be
+        * reported.
+        * ---------------------------------------------
+        */
+.section .rodata.cortex_a55_regs, "aS"
+cortex_a55_regs:  /* The ascii list of register names to be reported */
+       .asciz  "cpuectlr_el1", ""
+
+func cortex_a55_cpu_reg_dump
+       adr     x6, cortex_a55_regs
+       mrs     x8, CORTEX_A55_CPUECTLR_EL1
+       ret
+endfunc cortex_a55_cpu_reg_dump
+
+declare_cpu_ops cortex_a55, CORTEX_A55_MIDR, \
+       CPU_NO_RESET_FUNC, \
+       cortex_a55_core_pwr_dwn
diff --git a/lib/cpus/aarch64/cortex_a75.S b/lib/cpus/aarch64/cortex_a75.S
new file mode 100644 (file)
index 0000000..1f4500c
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <arch.h>
+#include <asm_macros.S>
+#include <bl_common.h>
+#include <cpu_macros.S>
+#include <plat_macros.S>
+#include <cortex_a75.h>
+
+       /* ---------------------------------------------
+        * HW will do the cache maintenance while powering down
+        * ---------------------------------------------
+        */
+func cortex_a75_core_pwr_dwn
+       /* ---------------------------------------------
+        * Enable CPU power down bit in power control register
+        * ---------------------------------------------
+        */
+       mrs     x0, CORTEX_A75_CPUPWRCTLR_EL1
+       orr     x0, x0, #CORTEX_A75_CORE_PWRDN_EN_MASK
+       msr     CORTEX_A75_CPUPWRCTLR_EL1, x0
+       isb
+       ret
+endfunc cortex_a75_core_pwr_dwn
+
+       /* ---------------------------------------------
+        * This function provides cortex_a75 specific
+        * register information for crash reporting.
+        * It needs to return with x6 pointing to
+        * a list of register names in ascii and
+        * x8 - x15 having values of registers to be
+        * reported.
+        * ---------------------------------------------
+        */
+.section .rodata.cortex_a75_regs, "aS"
+cortex_a75_regs:  /* The ascii list of register names to be reported */
+       .asciz  "cpuectlr_el1", ""
+
+func cortex_a75_cpu_reg_dump
+       adr     x6, cortex_a75_regs
+       mrs     x8, CORTEX_A75_CPUECTLR_EL1
+       ret
+endfunc cortex_a75_cpu_reg_dump
+
+declare_cpu_ops cortex_a75, CORTEX_A75_MIDR, \
+       CPU_NO_RESET_FUNC, \
+       cortex_a75_core_pwr_dwn
index 6a759c5a7285bb4294096177be5fc0edd36d6a4d..6dae116c01191d2b0820d32be9e168b6f45fd25a 100644 (file)
@@ -82,9 +82,11 @@ FVP_CPU_LIBS         :=      lib/cpus/${ARCH}/aem_generic.S
 ifeq (${ARCH}, aarch64)
 FVP_CPU_LIBS           +=      lib/cpus/aarch64/cortex_a35.S                   \
                                lib/cpus/aarch64/cortex_a53.S                   \
+                               lib/cpus/aarch64/cortex_a55.S                   \
                                lib/cpus/aarch64/cortex_a57.S                   \
                                lib/cpus/aarch64/cortex_a72.S                   \
-                               lib/cpus/aarch64/cortex_a73.S
+                               lib/cpus/aarch64/cortex_a73.S                   \
+                               lib/cpus/aarch64/cortex_a75.S
 else
 FVP_CPU_LIBS           +=      lib/cpus/aarch32/cortex_a32.S
 endif