ARC: ARCv3: add qemu HS6x board

Add QEMU board with single core ARCv3 HS6x 64 bit CPU

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
This commit is contained in:
Evgeniy Paltsev 2021-04-19 15:26:05 +03:00 committed by Kumar Gala
commit 0a5137f109
9 changed files with 80 additions and 2 deletions

View file

@ -8,10 +8,20 @@ set(QEMU_FLAGS_${ARCH} -cpu arcem)
elseif(${CONFIG_SOC_QEMU_ARC_HS})
set(QEMU_CPU_TYPE_${ARCH} archs)
set(QEMU_FLAGS_${ARCH} -cpu archs)
elseif(${CONFIG_SOC_QEMU_ARC_HS6X})
set(QEMU_ARCH arc64)
set(QEMU_CPU_TYPE_${ARCH} arc64)
set(QEMU_FLAGS_${ARCH} -cpu hs6x)
endif()
# For old QEMU we had 'simhs' qemu board, however we are going to rename it
# to 'virt' board. It will be renamed in ARC QEMU in the nearest Zephyr SDK
# (where ARCv3 HS6x support will be added to QEMU)
# Let's rely on the QEMU defaults instead of specifying exact board name,
# until the updated Zephyr SDK will be set as default. By that we keep both SDKs
# (old and new) working for ARCv2.
# After that we can specify board explicitly with '-M virt' option.
list(APPEND QEMU_FLAGS_${ARCH}
-M simhs
-m 8M
-nographic
-no-reboot

View file

@ -0,0 +1,25 @@
/*
* Copyright (c) 2020, Synopsys, Inc. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include "qemu_arc.dtsi"
/ {
model = "QEMU ARC HS";
compatible = "qemu,archs";
cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu@0 {
device_type = "cpu";
compatible = "snps,archs";
reg = <0>;
};
};
};

View file

@ -0,0 +1,11 @@
identifier: qemu_arc_hs6x
name: QEMU Emulation for ARC HS
type: qemu
simulation: qemu
arch: arc
toolchain:
- cross-compile
testing:
ignore_tags:
- net
- bluetooth

View file

@ -0,0 +1,14 @@
CONFIG_ISA_ARCV3=y
CONFIG_SOC_QEMU_ARC=y
CONFIG_SOC_QEMU_ARC_HS6X=y
CONFIG_XIP=n
CONFIG_BUILD_OUTPUT_BIN=n
CONFIG_PRINTK=y
CONFIG_ARCV2_INTERRUPT_UNIT=y
CONFIG_ARCV2_TIMER=y
CONFIG_ARC_HAS_STACK_CHECKING=n
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_NS16550=y
CONFIG_QEMU_ICOUNT_SHIFT=6

View file

@ -1,2 +1,6 @@
# SPDX-License-Identifier: Apache-2.0
zephyr_compile_options(-mcpu=${GCC_M_CPU} -mno-sdata)
zephyr_compile_options(-mcpu=${GCC_M_CPU})
if(NOT CONFIG_64BIT)
zephyr_compile_options(-mno-sdata)
endif()

View file

@ -12,4 +12,7 @@ config SOC_QEMU_ARC_EM
config SOC_QEMU_ARC_HS
bool "Synopsys ARC HS in QEMU"
config SOC_QEMU_ARC_HS6X
bool "Synopsys ARC HS in QEMU"
endchoice

View file

@ -36,5 +36,6 @@ config ARC_MPU_VER
source "soc/arc/snps_qemu/Kconfig.defconfig.em"
source "soc/arc/snps_qemu/Kconfig.defconfig.hs"
source "soc/arc/snps_qemu/Kconfig.defconfig.hs6x"
endif

View file

@ -0,0 +1,9 @@
# Copyright (c) 2021 Synopsys, Inc. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
if SOC_QEMU_ARC_HS6X
config CPU_HS6X
default y
endif

View file

@ -23,6 +23,7 @@ tests:
extra_configs:
- CONFIG_CBPRINTF_NANO=y
- CONFIG_CBPRINTF_REDUCED_INTEGRAL=y
platform_exclude: qemu_arc_hs6x
kernel.common.nano64:
tags: kernel userspace
min_flash: 33