arch: Add Cortex-R8 support

Enable Cortex R8 support, similar to Cortex-R5.

Signed-off-by: Krzysztof Sychla <ksychla@antmicro.com>
Signed-off-by: Marek Slowinski <mslowinski@antmicro.com>
Signed-off-by: Piotr Zierhoffer <pzierhoffer@antmicro.com>
Signed-off-by: Mateusz Hołenko <mholenko@antmicro.com>
This commit is contained in:
Krzysztof Sychla 2024-03-25 12:57:21 +01:00 committed by Alberto Escolar
parent fa4f2ffc47
commit 5d76b563ea
6 changed files with 31 additions and 2 deletions

View file

@ -93,6 +93,14 @@ config CPU_CORTEX_R7
help
This option signifies the use of a Cortex-R7 CPU
config CPU_CORTEX_R8
bool
select CPU_AARCH32_CORTEX_R
select ARMV7_R
select ARMV7_R_FP if CPU_HAS_FPU
help
This option signifies the use of a Cortex-R8 CPU
config CPU_CORTEX_R52
bool
select CPU_AARCH32_CORTEX_R

View file

@ -68,6 +68,15 @@ if("${ARCH}" STREQUAL "arm")
else()
set(GCC_M_CPU ${GCC_M_CPU}+nofp)
endif()
elseif(CONFIG_CPU_CORTEX_R8)
set(GCC_M_CPU cortex-r8)
if(CONFIG_FPU AND CONFIG_CPU_HAS_VFP)
if(NOT CONFIG_VFP_FEATURE_DOUBLE_PRECISION)
set(GCC_M_CPU ${GCC_M_CPU}+nofp.dp)
endif()
else()
set(GCC_M_CPU ${GCC_M_CPU}+nofp)
endif()
elseif(CONFIG_CPU_CORTEX_R52)
set(GCC_M_CPU cortex-r52)
if(CONFIG_FPU AND CONFIG_CPU_HAS_VFP)

View file

@ -7,7 +7,7 @@ if(CONFIG_FPU)
if("${ARCH}" STREQUAL "arm")
if(CONFIG_CPU_AARCH32_CORTEX_R)
if(CONFIG_CPU_CORTEX_R4 OR CONFIG_CPU_CORTEX_R5) # VFPv3
if(CONFIG_CPU_CORTEX_R4 OR CONFIG_CPU_CORTEX_R5 OR CONFIG_CPU_CORTEX_R8) # VFPv3
if(CONFIG_VFP_FEATURE_DOUBLE_PRECISION)
set(GCC_M_FPU vfpv3-d16)
elseif(CONFIG_VFP_FEATURE_SINGLE_PRECISION)

View file

@ -32,7 +32,7 @@
#define MPU_RASR_B_Pos 0
#define MPU_RASR_B_Msk (1UL << MPU_RASR_B_Pos)
#if defined(CONFIG_CPU_CORTEX_R4) || defined(CONFIG_CPU_CORTEX_R5)
#if defined(CONFIG_CPU_CORTEX_R4) || defined(CONFIG_CPU_CORTEX_R5) || defined(CONFIG_CPU_CORTEX_R8)
#define ARM_MPU_REGION_SIZE_32B ((uint8_t)0x04U)
#define ARM_MPU_REGION_SIZE_64B ((uint8_t)0x05U)
#define ARM_MPU_REGION_SIZE_128B ((uint8_t)0x06U)

View file

@ -46,6 +46,8 @@ extern "C" {
#include <core_cr5.h>
#elif defined(CONFIG_CPU_CORTEX_R7)
#include <core_cr7.h>
#elif defined(CONFIG_CPU_CORTEX_R8)
#include <core_cr8.h>
#elif defined(CONFIG_CPU_CORTEX_R52)
#include <core_cr52.h>
#elif defined(CONFIG_CPU_AARCH32_CORTEX_A)

View file

@ -83,6 +83,16 @@ extern "C" {
#else
#define PROCESSOR_NAME "cortex-r7+nofp"
#endif
#elif defined(CONFIG_CPU_CORTEX_R8)
#if defined(CONFIG_FPU) && defined(CONFIG_CPU_HAS_VFP)
#if !defined(CONFIG_VFP_FEATURE_DOUBLE_PRECISION)
#define PROCESSOR_NAME "cortex-r8+nofp.dp"
#else
#define PROCESSOR_NAME "cortex-r8"
#endif
#else
#define PROCESSOR_NAME "cortex-r8+nofp"
#endif
#elif defined(CONFIG_CPU_CORTEX_R52)
#if defined(CONFIG_FPU) && defined(CONFIG_CPU_HAS_VFP)
#if !defined(CONFIG_VFP_FEATURE_DOUBLE_PRECISION)