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:
parent
a70187fb31
commit
0a5137f109
9 changed files with 80 additions and 2 deletions
|
@ -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
|
||||
|
|
25
boards/arc/qemu_arc/qemu_arc_hs6x.dts
Normal file
25
boards/arc/qemu_arc/qemu_arc_hs6x.dts
Normal 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>;
|
||||
};
|
||||
};
|
||||
};
|
11
boards/arc/qemu_arc/qemu_arc_hs6x.yaml
Normal file
11
boards/arc/qemu_arc/qemu_arc_hs6x.yaml
Normal 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
|
14
boards/arc/qemu_arc/qemu_arc_hs6x_defconfig
Normal file
14
boards/arc/qemu_arc/qemu_arc_hs6x_defconfig
Normal 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
|
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
9
soc/arc/snps_qemu/Kconfig.defconfig.hs6x
Normal file
9
soc/arc/snps_qemu/Kconfig.defconfig.hs6x
Normal 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
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue