mirror of
https://github.com/apache/nuttx.git
synced 2026-05-20 20:44:39 +08:00
arm/chip/qemu: add chip QEMU_CORTEXR5
This adds support for QEMU Cortex-R5 virtual processor on existing QEMU Cortex-A7 code base with profile support in `armv7-r/` and `armv7-a/`. Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
This commit is contained in:
committed by
Alan C. Assis
parent
3f85df583c
commit
55e1e11f1e
@@ -20,7 +20,11 @@
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
set(SRCS qemu_boot.c qemu_serial.c qemu_irq.c qemu_timer.c qemu_memorymap.c)
|
||||
set(SRCS qemu_boot.c qemu_serial.c qemu_irq.c qemu_timer.c)
|
||||
|
||||
if(CONFIG_ARCH_ARMV7A)
|
||||
list(APPEND SRCS qemu_memorymap.c)
|
||||
endif()
|
||||
|
||||
if(CONFIG_SMP)
|
||||
list(APPEND SRCS qemu_cpuboot.c)
|
||||
|
||||
@@ -25,6 +25,14 @@ config ARCH_CHIP_QEMU_CORTEXA7
|
||||
select ARMV7A_HAVE_GTM
|
||||
select ARMV7A_HAVE_PTM
|
||||
|
||||
config ARCH_CHIP_QEMU_CORTEXR5
|
||||
bool "Qemu virtual Processor (cortex-r5)"
|
||||
select ARCH_CORTEXR5
|
||||
select ARCH_HAVE_FPU
|
||||
select ARCH_HAVE_LOWVECTORS
|
||||
select ARMV7R_HAVE_GICv2
|
||||
select ARMV7R_HAVE_PTM
|
||||
|
||||
endchoice # Qemu Chip Selection
|
||||
|
||||
endmenu # "Qemu Virt Chip Selection"
|
||||
|
||||
@@ -20,11 +20,20 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
ifeq ($(CONFIG_ARCH_ARMV7A),y)
|
||||
include armv7-a/Make.defs
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ARCH_ARMV7R),y)
|
||||
include armv7-r/Make.defs
|
||||
endif
|
||||
|
||||
# qemu-specific C source files
|
||||
CHIP_CSRCS = qemu_boot.c qemu_serial.c qemu_irq.c qemu_timer.c qemu_memorymap.c
|
||||
CHIP_CSRCS += qemu_pgalloc.c
|
||||
CHIP_CSRCS = qemu_boot.c qemu_serial.c qemu_irq.c qemu_timer.c
|
||||
|
||||
ifeq ($(CONFIG_ARCH_ARMV7A),y)
|
||||
CHIP_CSRCS += qemu_pgalloc.c qemu_memorymap.c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SMP),y)
|
||||
CHIP_CSRCS += qemu_cpuboot.c
|
||||
|
||||
@@ -27,7 +27,10 @@
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include "arm_internal.h"
|
||||
#include "arm_cpu_psci.h"
|
||||
|
||||
#ifdef CONFIG_ARM_PSCI
|
||||
# include "arm_cpu_psci.h"
|
||||
#endif
|
||||
|
||||
#include "qemu_irq.h"
|
||||
#include "qemu_memorymap.h"
|
||||
@@ -43,6 +46,10 @@
|
||||
# include <nuttx/sched_note.h>
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_ARMV7R
|
||||
# include <nuttx/init.h>
|
||||
#endif
|
||||
|
||||
#include <nuttx/syslog/syslog_rpmsg.h>
|
||||
|
||||
/****************************************************************************
|
||||
@@ -73,9 +80,11 @@ void arm_boot(void)
|
||||
up_perf_init(0);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_ARMV7A
|
||||
/* Set the page table for section */
|
||||
|
||||
qemu_setupmappings();
|
||||
#endif
|
||||
|
||||
arm_fpuconfig();
|
||||
|
||||
@@ -98,6 +107,12 @@ void arm_boot(void)
|
||||
#ifdef CONFIG_SYSLOG_RPMSG
|
||||
syslog_rpmsg_init_early(g_syslog_rpmsg_buf, sizeof(g_syslog_rpmsg_buf));
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ARCH_ARMV7R
|
||||
/* dont return per armv7-r/arm_head.S design */
|
||||
|
||||
nx_start();
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(CONFIG_ARM_PSCI) && defined(CONFIG_SMP)
|
||||
|
||||
Reference in New Issue
Block a user