From 28180b49d1e42230e27b8b43ea7b621d2d0c772b Mon Sep 17 00:00:00 2001 From: Hidenori Matsubayashi Date: Thu, 13 Oct 2022 22:32:59 +0900 Subject: [PATCH] arm64: add Cortex-A57 and Cortex-A72 configurations This change adds the following: - Rename the board configuration name from qemu-a53 to qemu-v8a. - Add the configurations for Cortex-A57 and Cortex-A72. Signed-off-by: Hidenori Matsubayashi --- arch/arm64/Kconfig | 28 +++++++++++++++++-- arch/arm64/src/Toolchain.defs | 4 +++ arch/arm64/src/qemu/Kconfig | 10 +++++++ boards/Kconfig | 14 +++++----- .../qemu/{qemu-a53 => qemu-armv8a}/Kconfig | 2 +- .../qemu/{qemu-a53 => qemu-armv8a}/README.txt | 11 ++++++-- .../configs/nsh/defconfig | 4 +-- .../configs/nsh_smp/defconfig | 4 +-- .../include/board_memorymap.h | 8 +++--- .../scripts/Make.defs | 2 +- .../scripts/dramboot.ld | 2 +- .../{qemu-a53 => qemu-armv8a}/src/Makefile | 2 +- .../src/qemu-armv8a.h} | 8 +++--- .../src/qemu_appinit.c | 4 +-- .../src/qemu_boardinit.c | 4 +-- .../src/qemu_bringup.c | 4 +-- tools/ci/testlist/macos.dat | 2 +- 17 files changed, 78 insertions(+), 35 deletions(-) rename boards/arm64/qemu/{qemu-a53 => qemu-armv8a}/Kconfig (84%) rename boards/arm64/qemu/{qemu-a53 => qemu-armv8a}/README.txt (97%) rename boards/arm64/qemu/{qemu-a53 => qemu-armv8a}/configs/nsh/defconfig (96%) rename boards/arm64/qemu/{qemu-a53 => qemu-armv8a}/configs/nsh_smp/defconfig (96%) rename boards/arm64/qemu/{qemu-a53 => qemu-armv8a}/include/board_memorymap.h (88%) rename boards/arm64/qemu/{qemu-a53 => qemu-armv8a}/scripts/Make.defs (97%) rename boards/arm64/qemu/{qemu-a53 => qemu-armv8a}/scripts/dramboot.ld (98%) rename boards/arm64/qemu/{qemu-a53 => qemu-armv8a}/src/Makefile (96%) rename boards/arm64/qemu/{qemu-a53/src/qemu-a53.h => qemu-armv8a/src/qemu-armv8a.h} (90%) rename boards/arm64/qemu/{qemu-a53 => qemu-armv8a}/src/qemu_appinit.c (97%) rename boards/arm64/qemu/{qemu-a53 => qemu-armv8a}/src/qemu_boardinit.c (98%) rename boards/arm64/qemu/{qemu-a53 => qemu-armv8a}/src/qemu_bringup.c (96%) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index a693521e3c..483f3f6073 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -11,12 +11,12 @@ choice default ARCH_CHIP_QEMU config ARCH_CHIP_QEMU - bool "QEMU virt platform (cortex-a53)" + bool "QEMU virt platform (ARMv8a)" select ARCH_CORTEX_A53 select ARCH_HAVE_ADDRENV select ARCH_NEED_ADDRENV_MAPPING ---help--- - QEMU virt platform (cortex-a53) + QEMU virt platform (ARMv8a) endchoice @@ -40,6 +40,30 @@ config ARCH_CORTEX_A53 select ARCH_HAVE_FPU select ARCH_HAVE_TESTSET +config ARCH_CORTEX_A57 + bool + default n + select ARCH_ARMV8A + select ARM_HAVE_NEON + select ARCH_HAVE_TRUSTZONE + select ARCH_DCACHE + select ARCH_ICACHE + select ARCH_HAVE_MMU + select ARCH_HAVE_FPU + select ARCH_HAVE_TESTSET + +config ARCH_CORTEX_A72 + bool + default n + select ARCH_ARMV8A + select ARM_HAVE_NEON + select ARCH_HAVE_TRUSTZONE + select ARCH_DCACHE + select ARCH_ICACHE + select ARCH_HAVE_MMU + select ARCH_HAVE_FPU + select ARCH_HAVE_TESTSET + config ARCH_CORTEX_R82 bool default n diff --git a/arch/arm64/src/Toolchain.defs b/arch/arm64/src/Toolchain.defs index 279a5435eb..1733644997 100644 --- a/arch/arm64/src/Toolchain.defs +++ b/arch/arm64/src/Toolchain.defs @@ -36,6 +36,10 @@ endif ifeq ($(CONFIG_ARCH_CORTEX_A53),y) ARCHCPUFLAGS += -mtune=cortex-a53 +else ifeq ($(CONFIG_ARCH_CORTEX_A57),y) + ARCHCPUFLAGS += -mtune=cortex-a57 +else ifeq ($(CONFIG_ARCH_CORTEX_A72),y) + ARCHCPUFLAGS += -mtune=cortex-a72 endif ifeq ($(CONFIG_DEBUG_CUSTOMOPT),y) diff --git a/arch/arm64/src/qemu/Kconfig b/arch/arm64/src/qemu/Kconfig index d2357fa613..f5d4720ebb 100644 --- a/arch/arm64/src/qemu/Kconfig +++ b/arch/arm64/src/qemu/Kconfig @@ -16,6 +16,16 @@ config ARCH_CHIP_QEMU_A53 select ARCH_HAVE_MULTICPU select ARMV8A_HAVE_GICv3 +config ARCH_CHIP_QEMU_A57 + bool "Qemu virtual Processor (cortex-a57)" + select ARCH_HAVE_MULTICPU + select ARMV8A_HAVE_GICv3 + +config ARCH_CHIP_QEMU_A72 + bool "Qemu virtual Processor (cortex-a72)" + select ARCH_HAVE_MULTICPU + select ARMV8A_HAVE_GICv3 + endchoice # Qemu Chip Selection endmenu # "Qemu Chip Selection" diff --git a/boards/Kconfig b/boards/Kconfig index 35212731fe..4634acb73b 100644 --- a/boards/Kconfig +++ b/boards/Kconfig @@ -1707,13 +1707,13 @@ config ARCH_BOARD_SABRE_6QUAD This options selects support for NuttX on the NXP/Freescale Sabre board featuring the iMX 6Quad CPU. -config ARCH_BOARD_QEMU_A53 - bool "Qemu A53 board" +config ARCH_BOARD_QEMU_ARMV8A + bool "Qemu ARMv8a CPUs board" depends on ARCH_CHIP_QEMU select ARCH_HAVE_IRQBUTTONS ---help--- - This options selects support for NuttX on the QEMU A53 - board featuring the qemu a53 CPU. + This options selects support for NuttX on the QEMU ARMv8a + virt + board featuring the qemu ARMv8a CPUs. config ARCH_BOARD_SAMA5D2_XULT bool "Atmel SAMA5D2 Xplained Ultra development board" @@ -2784,7 +2784,7 @@ config ARCH_BOARD default "rv32m1-vega" if ARCH_BOARD_RV32M1_VEGA default "rv-virt" if ARCH_BOARD_QEMU_RV_VIRT default "sabre-6quad" if ARCH_BOARD_SABRE_6QUAD - default "qemu-a53" if ARCH_BOARD_QEMU_A53 + default "qemu-armv8a" if ARCH_BOARD_QEMU_ARMV8A default "sama5d2-xult" if ARCH_BOARD_SAMA5D2_XULT default "giant-board" if ARCH_BOARD_GIANT_BOARD default "sama5d3x-ek" if ARCH_BOARD_SAMA5D3X_EK @@ -2969,8 +2969,8 @@ endif if ARCH_BOARD_SABRE_6QUAD source "boards/arm/imx6/sabre-6quad/Kconfig" endif -if ARCH_BOARD_QEMU_A53 -source "boards/arm64/qemu/qemu-a53/Kconfig" +if ARCH_BOARD_QEMU_ARMV8A +source "boards/arm64/qemu/qemu-armv8a/Kconfig" endif if ARCH_BOARD_IMXRT1020_EVK source "boards/arm/imxrt/imxrt1020-evk/Kconfig" diff --git a/boards/arm64/qemu/qemu-a53/Kconfig b/boards/arm64/qemu/qemu-armv8a/Kconfig similarity index 84% rename from boards/arm64/qemu/qemu-a53/Kconfig rename to boards/arm64/qemu/qemu-armv8a/Kconfig index 0c77d06e31..b7b643344e 100644 --- a/boards/arm64/qemu/qemu-a53/Kconfig +++ b/boards/arm64/qemu/qemu-armv8a/Kconfig @@ -3,5 +3,5 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -if ARCH_BOARD_QEMU_A53 +if ARCH_BOARD_QEMU_ARMV8A endif diff --git a/boards/arm64/qemu/qemu-a53/README.txt b/boards/arm64/qemu/qemu-armv8a/README.txt similarity index 97% rename from boards/arm64/qemu/qemu-a53/README.txt rename to boards/arm64/qemu/qemu-armv8a/README.txt index a7711064b0..51f436bd42 100644 --- a/boards/arm64/qemu/qemu-a53/README.txt +++ b/boards/arm64/qemu/qemu-armv8a/README.txt @@ -1,7 +1,7 @@ README.txt ========== -This board configuration will use QEMU to emulate a generic Cortex-A53 +This board configuration will use QEMU to emulate generic ARM64 v8-A series hardware platform and provides support for these devices: - GICv3 interrupt controller @@ -43,7 +43,7 @@ Getting Started 3. Configuring and running 3.1 Single Core Configuring NuttX and compile: - $ ./tools/configure.sh -l qemu-a53:nsh + $ ./tools/configure.sh -l qemu-armv8a:nsh $ make Running with qemu $ qemu-system-aarch64 -cpu cortex-a53 -nographic \ @@ -53,7 +53,7 @@ Getting Started 3.2 SMP Configuring NuttX and compile: - $ ./tools/configure.sh -l qemu-a53:nsh_smp + $ ./tools/configure.sh -l qemu-armv8a:nsh_smp $ make Running with qemu $ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic \ @@ -70,6 +70,11 @@ Getting Started Status ====== +2022-10-13: +1. Renamed the board configuration name from qemu-a53 to qemu-v8a. + +2. Added the configurations for Cortex-A57 and Cortex-A72. + 2022-07-01: 1. It's very stranger to see that signal testing of ostest is PASSED at Physical Ubuntu PC diff --git a/boards/arm64/qemu/qemu-a53/configs/nsh/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/nsh/defconfig similarity index 96% rename from boards/arm64/qemu/qemu-a53/configs/nsh/defconfig rename to boards/arm64/qemu/qemu-armv8a/configs/nsh/defconfig index 5473bde0df..06af9b7ea3 100644 --- a/boards/arm64/qemu/qemu-a53/configs/nsh/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/nsh/defconfig @@ -7,8 +7,8 @@ # CONFIG_ARCH="arm64" CONFIG_ARCH_ARM64=y -CONFIG_ARCH_BOARD="qemu-a53" -CONFIG_ARCH_BOARD_QEMU_A53=y +CONFIG_ARCH_BOARD="qemu-armv8a" +CONFIG_ARCH_BOARD_QEMU_ARMV8A=y CONFIG_ARCH_CHIP="qemu" CONFIG_ARCH_CHIP_QEMU=y CONFIG_ARCH_CHIP_QEMU_A53=y diff --git a/boards/arm64/qemu/qemu-a53/configs/nsh_smp/defconfig b/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp/defconfig similarity index 96% rename from boards/arm64/qemu/qemu-a53/configs/nsh_smp/defconfig rename to boards/arm64/qemu/qemu-armv8a/configs/nsh_smp/defconfig index b206e7ac4b..72907ed3e6 100644 --- a/boards/arm64/qemu/qemu-a53/configs/nsh_smp/defconfig +++ b/boards/arm64/qemu/qemu-armv8a/configs/nsh_smp/defconfig @@ -8,8 +8,8 @@ # CONFIG_ARCH_FPU is not set CONFIG_ARCH="arm64" CONFIG_ARCH_ARM64=y -CONFIG_ARCH_BOARD="qemu-a53" -CONFIG_ARCH_BOARD_QEMU_A53=y +CONFIG_ARCH_BOARD="qemu-armv8a" +CONFIG_ARCH_BOARD_QEMU_ARMV8A=y CONFIG_ARCH_CHIP="qemu" CONFIG_ARCH_CHIP_QEMU=y CONFIG_ARCH_CHIP_QEMU_A53=y diff --git a/boards/arm64/qemu/qemu-a53/include/board_memorymap.h b/boards/arm64/qemu/qemu-armv8a/include/board_memorymap.h similarity index 88% rename from boards/arm64/qemu/qemu-a53/include/board_memorymap.h rename to boards/arm64/qemu/qemu-armv8a/include/board_memorymap.h index d9fe29b3e4..87671d5ddb 100644 --- a/boards/arm64/qemu/qemu-a53/include/board_memorymap.h +++ b/boards/arm64/qemu/qemu-armv8a/include/board_memorymap.h @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm64/qemu/qemu-a53/include/board_memorymap.h + * boards/arm64/qemu/qemu-armv8a/include/board_memorymap.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __BOARDS_ARM64_QEMU_QEMU_A53_INCLUDE_BOARD_MEMORYMAP_H -#define __BOARDS_ARM64_QEMU_QEMU_A53_INCLUDE_BOARD_MEMORYMAP_H +#ifndef __BOARDS_ARM64_QEMU_QEMU_ARMV8A_INCLUDE_BOARD_MEMORYMAP_H +#define __BOARDS_ARM64_QEMU_QEMU_ARMV8A_INCLUDE_BOARD_MEMORYMAP_H /**************************************************************************** * Included Files @@ -56,4 +56,4 @@ extern "C" #endif #endif /* __ASSEMBLY__ */ -#endif /* __BOARDS_ARM64_QEMU_QEMU_A53_INCLUDE_BOARD_MEMORYMAP_H */ +#endif /* __BOARDS_ARM64_QEMU_QEMU_ARMV8A_INCLUDE_BOARD_MEMORYMAP_H */ diff --git a/boards/arm64/qemu/qemu-a53/scripts/Make.defs b/boards/arm64/qemu/qemu-armv8a/scripts/Make.defs similarity index 97% rename from boards/arm64/qemu/qemu-a53/scripts/Make.defs rename to boards/arm64/qemu/qemu-armv8a/scripts/Make.defs index 42bb6675f4..19c26455ea 100644 --- a/boards/arm64/qemu/qemu-a53/scripts/Make.defs +++ b/boards/arm64/qemu/qemu-armv8a/scripts/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# boards/arm64/qemu/qemu-a53/scripts/Make.defs +# boards/arm64/qemu/qemu-armv8a/scripts/Make.defs # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with diff --git a/boards/arm64/qemu/qemu-a53/scripts/dramboot.ld b/boards/arm64/qemu/qemu-armv8a/scripts/dramboot.ld similarity index 98% rename from boards/arm64/qemu/qemu-a53/scripts/dramboot.ld rename to boards/arm64/qemu/qemu-armv8a/scripts/dramboot.ld index c35eea29c4..09c5db356a 100644 --- a/boards/arm64/qemu/qemu-a53/scripts/dramboot.ld +++ b/boards/arm64/qemu/qemu-armv8a/scripts/dramboot.ld @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm64/qemu/qemu-a53/scripts/dramboot.ld + * boards/arm64/qemu/qemu-armv8a/scripts/dramboot.ld * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/boards/arm64/qemu/qemu-a53/src/Makefile b/boards/arm64/qemu/qemu-armv8a/src/Makefile similarity index 96% rename from boards/arm64/qemu/qemu-a53/src/Makefile rename to boards/arm64/qemu/qemu-armv8a/src/Makefile index 1b36a9242f..4fb236eb41 100644 --- a/boards/arm64/qemu/qemu-a53/src/Makefile +++ b/boards/arm64/qemu/qemu-armv8a/src/Makefile @@ -1,5 +1,5 @@ ############################################################################ -# boards/arm64/qemu/qemu-a53/src/Makefile +# boards/arm64/qemu/qemu-armv8a/src/Makefile # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with diff --git a/boards/arm64/qemu/qemu-a53/src/qemu-a53.h b/boards/arm64/qemu/qemu-armv8a/src/qemu-armv8a.h similarity index 90% rename from boards/arm64/qemu/qemu-a53/src/qemu-a53.h rename to boards/arm64/qemu/qemu-armv8a/src/qemu-armv8a.h index 6f2c6ea1c7..ce8c175630 100644 --- a/boards/arm64/qemu/qemu-a53/src/qemu-a53.h +++ b/boards/arm64/qemu/qemu-armv8a/src/qemu-armv8a.h @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm64/qemu/qemu-a53/src/qemu-a53.h + * boards/arm64/qemu/qemu-armv8a/src/qemu-armv8a.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __BOARDS_ARM64_QEMU_QEMU_A53_SRC_QEMU_A53_H -#define __BOARDS_ARM64_QEMU_QEMU_A53_SRC_QEMU_A53_H +#ifndef __BOARDS_ARM64_QEMU_QEMU_ARMV8A_SRC_QEMU_ARMV8A_H +#define __BOARDS_ARM64_QEMU_QEMU_ARMV8A_SRC_QEMU_ARMV8A_H /**************************************************************************** * Included Files @@ -56,4 +56,4 @@ int qemu_bringup(void); #endif #endif /* __ASSEMBLY__ */ -#endif /* __BOARDS_ARM64_QEMU_QEMU_A53_SRC_QEMU_A53_H */ +#endif /* __BOARDS_ARM64_QEMU_QEMU_ARMV8A_SRC_QEMU_ARMV8A_H */ diff --git a/boards/arm64/qemu/qemu-a53/src/qemu_appinit.c b/boards/arm64/qemu/qemu-armv8a/src/qemu_appinit.c similarity index 97% rename from boards/arm64/qemu/qemu-a53/src/qemu_appinit.c rename to boards/arm64/qemu/qemu-armv8a/src/qemu_appinit.c index 89e240d1e7..116681d816 100644 --- a/boards/arm64/qemu/qemu-a53/src/qemu_appinit.c +++ b/boards/arm64/qemu/qemu-armv8a/src/qemu_appinit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm64/qemu/qemu-a53/src/qemu_appinit.c + * boards/arm64/qemu/qemu-armv8a/src/qemu_appinit.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -28,7 +28,7 @@ #include -#include "qemu-a53.h" +#include "qemu-armv8a.h" #ifdef CONFIG_BOARDCTL diff --git a/boards/arm64/qemu/qemu-a53/src/qemu_boardinit.c b/boards/arm64/qemu/qemu-armv8a/src/qemu_boardinit.c similarity index 98% rename from boards/arm64/qemu/qemu-a53/src/qemu_boardinit.c rename to boards/arm64/qemu/qemu-armv8a/src/qemu_boardinit.c index 63c2f9811b..0a00a1d1a3 100644 --- a/boards/arm64/qemu/qemu-a53/src/qemu_boardinit.c +++ b/boards/arm64/qemu/qemu-armv8a/src/qemu_boardinit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm64/qemu/qemu-a53/src/qemu_boardinit.c + * boards/arm64/qemu/qemu-armv8a/src/qemu_boardinit.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -25,7 +25,7 @@ #include #include #include -#include "qemu-a53.h" +#include "qemu-armv8a.h" /**************************************************************************** * Pre-processor Definitions diff --git a/boards/arm64/qemu/qemu-a53/src/qemu_bringup.c b/boards/arm64/qemu/qemu-armv8a/src/qemu_bringup.c similarity index 96% rename from boards/arm64/qemu/qemu-a53/src/qemu_bringup.c rename to boards/arm64/qemu/qemu-armv8a/src/qemu_bringup.c index 1a242c50e7..a7523c5a33 100644 --- a/boards/arm64/qemu/qemu-a53/src/qemu_bringup.c +++ b/boards/arm64/qemu/qemu-armv8a/src/qemu_bringup.c @@ -1,5 +1,5 @@ /**************************************************************************** - * boards/arm64/qemu/qemu-a53/src/qemu_bringup.c + * boards/arm64/qemu/qemu-armv8a/src/qemu_bringup.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -29,7 +29,7 @@ #include -#include "qemu-a53.h" +#include "qemu-armv8a.h" /**************************************************************************** * Public Functions diff --git a/tools/ci/testlist/macos.dat b/tools/ci/testlist/macos.dat index dd654e45d7..4806d07ff6 100644 --- a/tools/ci/testlist/macos.dat +++ b/tools/ci/testlist/macos.dat @@ -41,4 +41,4 @@ # with float, disable the cibuild check for MACOS # it will be enbaled while new toolchain release -# /arm64/qemu/qemu-a53/configs/nsh_smp +# /arm64/qemu/qemu-armv8a/configs/nsh_smp