Commit 13bdae0a authored by Jisheng Zhang's avatar Jisheng Zhang Committed by Johan Hedberg
Browse files

arch: arm: Add initial support for Cortex-M52 Core



Add initial support for the Cortex-M52 Core which is an implementation
of the Armv8.1-M mainline architecture.

The support is based on the Cortex-M55 support that already exists in
Zephyr.

Signed-off-by: default avatarJisheng Zhang <jszhang@kernel.org>
parent 598eba4d
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -63,6 +63,17 @@ config CPU_CORTEX_M33
	help
	  This option signifies the use of a Cortex-M33 CPU

config CPU_CORTEX_M52
	bool
	select CPU_CORTEX_M
	select ARMV8_1_M_MAINLINE
	select ARMV8_M_SE if CPU_HAS_TEE
	select ARMV7_M_ARMV8_M_FP if CPU_HAS_FPU
	select CPU_HAS_DCACHE
	select CPU_HAS_ICACHE
	help
	  This option signifies the use of a Cortex-M52 CPU

config CPU_CORTEX_M55
	bool
	select CPU_CORTEX_M
+1 −0
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@ static uint8_t static_regions_num;
#include "arm_mpu_v7_internal.h"
#elif defined(CONFIG_CPU_CORTEX_M23) || \
	defined(CONFIG_CPU_CORTEX_M33) || \
	defined(CONFIG_CPU_CORTEX_M52) || \
	defined(CONFIG_CPU_CORTEX_M55) || \
	defined(CONFIG_CPU_CORTEX_M85) || \
	defined(CONFIG_AARCH32_ARMV8_R)
+2 −1
Original line number Diff line number Diff line
@@ -32,7 +32,8 @@ struct dynamic_region_info {
 */
static struct dynamic_region_info dyn_reg_info[MPU_DYNAMIC_REGION_AREAS_NUM];
#if defined(CONFIG_CPU_CORTEX_M23) || defined(CONFIG_CPU_CORTEX_M33) || \
	defined(CONFIG_CPU_CORTEX_M55) || defined(CONFIG_CPU_CORTEX_M85)
	defined(CONFIG_CPU_CORTEX_M52) || defined(CONFIG_CPU_CORTEX_M55) || \
	defined(CONFIG_CPU_CORTEX_M85)
static inline void mpu_set_mair0(uint32_t mair0)
{
	MPU->MAIR0 = mair0;
+10 −0
Original line number Diff line number Diff line
@@ -24,6 +24,16 @@ if("${ARCH}" STREQUAL "arm")
    else()
      set(GCC_M_CPU cortex-m33+nodsp)
    endif()
  elseif(CONFIG_CPU_CORTEX_M52)
    if    (CONFIG_ARMV8_1_M_MVEF)
      set(GCC_M_CPU cortex-m52)
    elseif(CONFIG_ARMV8_1_M_MVEI)
      set(GCC_M_CPU cortex-m52+nomve.fp)
    elseif(CONFIG_ARMV8_M_DSP)
      set(GCC_M_CPU cortex-m52+nomve)
    else()
      set(GCC_M_CPU cortex-m52+nodsp)
    endif()
  elseif(CONFIG_CPU_CORTEX_M55)
    if    (CONFIG_ARMV8_1_M_MVEF)
      set(GCC_M_CPU cortex-m55)
+4 −0
Original line number Diff line number Diff line
@@ -35,6 +35,10 @@ if("${ARCH}" STREQUAL "arm")
    set(FPU_FOR_cortex-m7           fpv5-${PRECISION_TOKEN}d16)
    set(FPU_FOR_cortex-m33          fpv5-${PRECISION_TOKEN}d16)
    set(FPU_FOR_cortex-m33+nodsp    fpv5-${PRECISION_TOKEN}d16)
    set(FPU_FOR_cortex-m52          auto)
    set(FPU_FOR_cortex-m52+nomve.fp auto)
    set(FPU_FOR_cortex-m52+nomve    auto)
    set(FPU_FOR_cortex-m52+nodsp    auto)
    set(FPU_FOR_cortex-m55          auto)
    set(FPU_FOR_cortex-m55+nomve.fp auto)
    set(FPU_FOR_cortex-m55+nomve    auto)
Loading