[PATCH 27/27] arcv3: Add support for ARCv3

2021-04-05 Thread cupertinomiranda
From: Cupertino Miranda --- configure | 2 ++ default-configs/devices/arcv3-softmmu.mak | 7 +++ default-configs/targets/arcv3-softmmu.mak | 3 +++ include/disas/dis-asm.h | 2 ++ include/elf.h | 1 + meson.build

[PATCH 24/27] arcv3: IRQ changes and new MMUv6 WIP

2021-04-05 Thread cupertinomiranda
From: Cupertino Miranda --- target/arc/irq.c| 11 + target/arc/irq.h| 7 + target/arc/mmu-v6.c | 640 target/arc/mmu-v6.h | 36 +++ 4 files changed, 694 insertions(+) create mode 100644 target/arc/mmu-v6.c create mode 100644 target/arc/m

[PATCH 23/27] arcv3: BCR and AUX register changes

2021-04-05 Thread cupertinomiranda
From: Cupertino Miranda --- target/arc/regs-detail.def | 40 ++ target/arc/regs-impl.c | 5 + target/arc/regs.def| 20 +++ 3 files changed, 65 insertions(+) diff --git a/target/arc/regs-detail.def b/target/arc/regs-detail.def

[PATCH 18/27] arcv3: Decoder code

2021-04-05 Thread cupertinomiranda
From: Cupertino Miranda --- disas/arc.c| 51 +- target/arc/decoder-v3.c| 1547 target/arc/decoder-v3.h| 322 target/arc/flags-v3.def| 103 +++ target/arc/operands-v3.def | 133 5 files changed, 2147 insertions(+)

[PATCH 16/27] tests/acceptance: ARC: Add linux boot testing.

2021-04-05 Thread cupertinomiranda
"data.tar.gz" from @@ -966,6 +986,17 @@ def test_alpha_clipper(self): console_pattern = 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) +def do_test_arc(self, kernel_name, console=0): +tar_url = ('http

[PATCH 13/27] arc: Add Synopsys ARC emulation boards

2021-04-05 Thread cupertinomiranda
From: Claudiu Zissulescu Add the Synopsys ARC boards, arc_sim for testing, sim-hs main emulation board using standard UART and nsim which includes a Synopsys ARC specific UART implementation. Signed-off-by: Claudiu Zissulescu --- hw/arc/Makefile.objs | 21 + hw/arc/arc_sim.c |

[PATCH 26/27] arcv3: board changes

2021-04-05 Thread cupertinomiranda
From: Cupertino Miranda --- hw/arc/boot.c | 1 + hw/arc/virt.c | 4 2 files changed, 5 insertions(+) diff --git a/hw/arc/boot.c b/hw/arc/boot.c index 962fc03b03..0af559e44b 100644 --- a/hw/arc/boot.c +++ b/hw/arc/boot.c @@ -69,6 +69,7 @@ void arc_load_kernel(ARCCPU *cpu, struct arc_boot_in

[PATCH 08/27] arc: Add BCR and AUX registers implementation

2021-04-05 Thread cupertinomiranda
From: Cupertino Miranda Add the infrastructure to define build configuration (BCR) and auxiliary registers allowing independent modules (MMU, MPU, etc.) to use and extend them. Signed-off-by: Cupertino Miranda --- target/arc/cache.c | 182 + target/arc/cache.h | 36

[PATCH 12/27] arc: Add gdbstub and XML for debugging support

2021-04-05 Thread cupertinomiranda
From: Shahab Vahedi Register layout for the target and the mechanisms to read and set them. Signed-off-by: Shahab Vahedi --- gdb-xml/arc-v2-aux.xml | 32 +++ gdb-xml/arc-v2-core.xml | 45 + gdb-xml/arc-v2-other.xml | 235 ++ target/arc/gdbstub.c | 421 +

[PATCH 20/27] arcv3: TCG, decoder glue code and helper changes

2021-04-05 Thread cupertinomiranda
From: Cupertino Miranda --- target/arc/extra_mapping.def | 16 + target/arc/helper.c | 11 + target/arc/helper.h | 16 + target/arc/op_helper.c| 110 ++- target/arc/semfunc-v2_mapping.def | 321 target/arc/semfunc-v3_mappin

[PATCH 25/27] arcv3: gdbstub changes and new XML files

2021-04-05 Thread cupertinomiranda
From: Cupertino Miranda --- gdb-xml/arc-core-v3.xml | 45 + gdb-xml/arc64-aux-minimal.xml | 32 ++ gdb-xml/arc64-aux-other.xml | 177 ++ target/arc/gdbstub.c | 23 + target/arc/gdbstub.h | 10 ++ 5 files changed, 287 i

[PATCH 14/27] arc: Add support for ARCv2

2021-04-05 Thread cupertinomiranda
From: Shahab Vahedi Add remaining bits of the Synopsys ARCv2 (EM/HS) support into QEMU, configure bits, arch_init and configuration files for softmmu (hardware emulation). Signed-off-by: Shahab Vahedi Signed-off-by: Cupertino Miranda --- configure | 2 ++ defaul

[PATCH 11/27] arc: Add memory protection unit (MPU) support

2021-04-05 Thread cupertinomiranda
From: Shahab Vahedi Add memory implementation for Synopsys MPU unit version 3. Synopsys MPU allows to create memory regions against unauthorized execution/read/writes accesses. Signed-off-by: Shahab Vahedi --- target/arc/mpu.c | 656 +++ target/arc/m

[PATCH 21/27] arcv3: TCG instruction generator changes

2021-04-05 Thread cupertinomiranda
From: Cupertino Miranda --- target/arc/translate.c | 180 + 1 file changed, 180 insertions(+) diff --git a/target/arc/translate.c b/target/arc/translate.c index 1712fcc9c3..6b2102394f 100644 --- a/target/arc/translate.c +++ b/target/arc/translate.c @@ -30

[PATCH 09/27] arc: Add IRQ and timer subsystem support

2021-04-05 Thread cupertinomiranda
From: Claudiu Zissulescu Signed-off-by: Claudiu Zissulescu --- target/arc/irq.c | 680 + target/arc/irq.h | 37 +++ target/arc/timer.c | 459 ++ target/arc/timer.h | 27 ++ 4 files changed, 1203 insertions(+) create

[PATCH 17/27] arcv3: Core cpu file changes

2021-04-05 Thread cupertinomiranda
From: Cupertino Miranda --- target/arc/arc-common.h | 19 +++ target/arc/cpu-param.h | 10 ++ target/arc/cpu.c| 35 +++ target/arc/cpu.h| 12 target/arc/meson.build | 19 --- 5 files changed, 8

[PATCH 06/27] arc: semfunc.c tcg code generator.

2021-04-05 Thread cupertinomiranda
From: Cupertino Miranda TCG generator scripts for semfunc.c file. Signed-off-by: Cupertino Miranda --- target/arc/semfunc_generator/Gemfile | 3 + target/arc/semfunc_generator/README | 35 ++ .../classes/CreateInternalVars.rb | 117 .../classes/DecomposeE

[PATCH 05/27] arc: TCG instruction generator and hand-definitions

2021-04-05 Thread cupertinomiranda
From: Cupertino Miranda Add the most generic parts of TCG constructions. It contains the basic infrastructure for fundamental ARC features, such as ZOL (zero overhead loops) and delay-slots. Also includes hand crafted TCG for more intricate instructions, such as vector instructions. Signed-off-b

[PATCH 02/27] arc: Decoder code

2021-04-05 Thread cupertinomiranda
From: Claudiu Zissulescu The decoder and the disassembler inspired by ARC GNU binutils. Signed-off-by: Claudiu Zissulescu --- disas/arc.c | 422 + target/arc/decoder.c| 1297 +++ target/arc/decoder.h| 351 +++ target

[PATCH 10/27] arc: Add memory management unit (MMU) support

2021-04-05 Thread cupertinomiranda
From: Cupertino Miranda Add Synopsys ARC MMU version 4 support. The implementation is restricted to 8K page size support. Signed-off-by: Cupertino Miranda --- target/arc/mmu.c | 805 +++ target/arc/mmu.h | 148 + 2 files changed, 953 insertio

[PATCH 04/27] arc: TCG and decoder glue code and helpers

2021-04-05 Thread cupertinomiranda
From: Cupertino Miranda Signed-off-by: Cupertino Miranda --- target/arc/extra_mapping.def | 63 + target/arc/helper.c| 281 +++ target/arc/helper.h| 39 target/arc/op_helper.c | 406 + target/arc/se

[PATCH 01/27] arc: Add initial core cpu files

2021-04-05 Thread cupertinomiranda
From: Cupertino Miranda Signed-off-by: Cupertino Miranda --- target/arc/arc-common.h | 54 + target/arc/cpu-param.h | 32 +++ target/arc/cpu-qom.h| 52 + target/arc/cpu.c| 472 target/arc/cpu.h| 445 +++

*** ARC port for review ***

2021-04-05 Thread cupertinomiranda
Hello everyone, Here is a long due refresh of ARC port patches. The reason for taking so long was that I did a big refreshement to the code due to the adition of the soon to release ARCv3 (64 bit) architecture. In order to avoid further big changes in the original patches we decided to delay the

[PATCH 11/15] arc: Add gdbstub and XML for debugging support

2020-11-11 Thread cupertinomiranda
From: Shahab Vahedi Register layout for the target and the mechanisms to read and set them. Signed-off-by: Shahab Vahedi --- gdb-xml/arc-v2-aux.xml | 32 +++ gdb-xml/arc-v2-core.xml | 45 + gdb-xml/arc-v2-other.xml | 235 ++ target/arc/gdbstub.c | 420 +

[PATCH 12/15] arc: Add Synopsys ARC emulation boards

2020-11-11 Thread cupertinomiranda
From: Claudiu Zissulescu Add the Synopsys ARC boards, arc_sim for testing, sim-hs main emulation board using standard UART and nsim which includes a Synopsys ARC specific UART implementation. Signed-off-by: Claudiu Zissulescu --- hw/arc/Makefile.objs | 21 +++ hw/arc/arc_sim.c

[PATCH 10/15] arc: Add memory protection unit (MPU) support

2020-11-11 Thread cupertinomiranda
From: Shahab Vahedi Add memory implementation for Synopsys MPU unit version 3. Synopsys MPU allows to create memory regions against unauthorized execution/read/writes accesses. Signed-off-by: Shahab Vahedi --- target/arc/mpu.c | 656 +++ target/arc/m

[PATCH 15/15] tests/acceptance: ARC: Add linux boot testing.

2020-11-11 Thread cupertinomiranda
l to extract "data.tar.gz" from @@ -973,6 +993,17 @@ class BootLinuxConsole(LinuxKernelTest): console_pattern = 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) +def do_test_arc(self, kernel_name, console=0): +

[PATCH 09/15] arc: Add memory management unit (MMU) support

2020-11-11 Thread cupertinomiranda
From: Cupertino Miranda Add Synopsys ARC MMU version 4 support. The implementation is restricted to 8K page size support. Signed-off-by: Cupertino Miranda --- target/arc/mmu.c | 777 +++ target/arc/mmu.h | 166 ++ 2 files changed, 943 inserti

[PATCH 08/15] arc: Add IRQ and timer subsystem support

2020-11-11 Thread cupertinomiranda
From: Claudiu Zissulescu Signed-off-by: Claudiu Zissulescu --- target/arc/irq.c | 658 + target/arc/irq.h | 37 +++ target/arc/timer.c | 454 +++ target/arc/timer.h | 30 +++ 4 files changed, 1179 insertions(+) creat

[PATCH 02/15] arc: Decoder code

2020-11-11 Thread cupertinomiranda
From: Claudiu Zissulescu The decoder and the disassembler inspired by ARC GNU binutils. Signed-off-by: Claudiu Zissulescu --- disas/arc.c | 461 ++ target/arc/decoder.c| 1277 +++ target/arc/decoder.h| 349 +++ targe

[PATCH 13/15] arc: Add support for ARCv2

2020-11-11 Thread cupertinomiranda
From: Shahab Vahedi Add remaining bits of the Synopsys ARCv2 (EM/HS) support into QEMU, configure bits, arch_init and configuration files for softmmu (hardware emulation). Signed-off-by: Shahab Vahedi Signed-off-by: Cupertino Miranda --- configure | 2 ++ defaul

[PATCH 01/15] arc: Add initial core cpu files

2020-11-11 Thread cupertinomiranda
From: Cupertino Miranda Signed-off-by: Cupertino Miranda --- target/arc/arc-common.h | 54 target/arc/cpu-param.h | 32 +++ target/arc/cpu-qom.h| 52 target/arc/cpu.c| 467 +++ target/arc/cpu.h| 531 ++

[PATCH 04/15] arc: TCG and decoder glue code and helpers

2020-11-11 Thread cupertinomiranda
From: Cupertino Miranda Signed-off-by: Cupertino Miranda --- target/arc/extra_mapping.def | 40 ++ target/arc/helper.c| 293 + target/arc/helper.h| 46 ++ target/arc/op_helper.c | 749 + target/arc/semfunc_mapping.d

[PATCH 07/15] arc: Add BCR and AUX registers implementation

2020-11-11 Thread cupertinomiranda
From: Cupertino Miranda Add the infrastructure to define build configuration (BCR) and auxiliary registers allowing independent modules (MMU, MPU, etc.) to use and extend them. Signed-off-by: Cupertino Miranda --- target/arc/cache.c | 182 + target/arc/cache.h | 42

[PATCH 05/15] arc: TCG instruction generator and hand-definitions

2020-11-11 Thread cupertinomiranda
From: Cupertino Miranda Add the most generic parts of TCG constructions. It contains the basic infrastructure for fundamental ARC features, such as ZOL (zero overhead loops) and delay-slots. Also includes hand crafted TCG for more intricate instructions, such as vector instructions. Signed-off-b

[PATCH 00/15] *** ARC port for review ***

2020-11-11 Thread cupertinomiranda
From: Cupertino Miranda Hello everyone, Here is a long due refresh of ARCv2 port patches. List of done requested improvements: - Include acceptance tests for ARC (linux boot), - Copyright notices, - Remove osdep.h from header files, - Removed makefiles, - Cleared list of boards reducing fo

[PATCH 13/14] arc: Add support for ARCv2

2020-09-30 Thread cupertinomiranda
From: Shahab Vahedi Add remaining bits of the Synopsys ARCv2 (EM/HS) support into QEMU, configure bits, arch_init and configuration files for softmmu (hardware emulation). Signed-off-by: Shahab Vahedi --- configure | 5 + default-configs/arc-softmmu.mak | 5 + d

[PATCH 12/14] arc: Add Synopsys ARC emulation boards

2020-09-30 Thread cupertinomiranda
From: Claudiu Zissulescu Add the Synopsys ARC boards, arc_sim for testing, sim-hs main emulation board using standard UART and nsim which includes a Synopsys ARC specific UART implementation. Signed-off-by: Claudiu Zissulescu --- hw/arc/Makefile.objs | 21 +++ hw/arc/arc_sim.c |

[PATCH 11/14] arc: Add gdbstub and XML for debugging support

2020-09-30 Thread cupertinomiranda
From: Shahab Vahedi Register layout for the target and the mechanisms to read and set them. Signed-off-by: Shahab Vahedi --- gdb-xml/arc-aux-minimal.xml | 32 +++ gdb-xml/arc-aux-other.xml | 235 gdb-xml/arc-core-v2.xml | 45 target/arc/gdbstub.c| 421

[PATCH 07/14] arc: Add BCR and AUX registers implementation

2020-09-30 Thread cupertinomiranda
From: Cupertino Miranda Add the infrastructure to define build configuration (BCR) and auxiliary registers allowing independent modules (MMU, MPU, etc.) to use and extend them. Signed-off-by: Cupertino Miranda --- target/arc/cache.c | 180 target/arc/cache.h | 42

[PATCH 08/14] arc: Add IRQ and timer subsystem support

2020-09-30 Thread cupertinomiranda
From: Claudiu Zissulescu Signed-off-by: Claudiu Zissulescu --- target/arc/irq.c | 658 + target/arc/irq.h | 37 +++ target/arc/timer.c | 456 +++ target/arc/timer.h | 32 +++ 4 files changed, 1183 insertions(+) creat

[PATCH 09/14] arc: Add memory management unit (MMU) support

2020-09-30 Thread cupertinomiranda
From: Cupertino Miranda Add Synopsys ARC MMU version 4 support. The implementation is restricted to 8K page size support. Signed-off-by: Cupertino Miranda --- target/arc/mmu.c | 775 +++ target/arc/mmu.h | 165 ++ 2 files changed, 940 inserti

[PATCH 10/14] arc: Add memory protection unit (MPU) support

2020-09-30 Thread cupertinomiranda
From: Shahab Vahedi Add memory implementation for Synopsys MPU unit version 3. Synopsys MPU allows to create memory regions against unauthorized execution/read/writes accesses. Signed-off-by: Shahab Vahedi --- target/arc/mpu.c | 653 +++ target/arc/m

[PATCH 04/14] arc: TCG and decoder glue code and helpers

2020-09-30 Thread cupertinomiranda
From: Cupertino Miranda Signed-off-by: Cupertino Miranda --- target/arc/extra_mapping.def | 40 ++ target/arc/helper.c| 293 + target/arc/helper.h| 46 ++ target/arc/op_helper.c | 749 + target/arc/semfunc_mapping.d

[PATCH 05/14] arc: TCG instruction generator and hand-definitions

2020-09-30 Thread cupertinomiranda
From: Shahab Vahedi Add the most generic parts of TCG constructions. It contains the basic infrastructure for fundamental ARC features, such as ZOL (zero overhead loops) and delay-slots. Also includes hand crafted TCG for more intricate instructions, such as vector instructions. Signed-off-by:

[PATCH 02/14] arc: Decoder code

2020-09-30 Thread cupertinomiranda
From: Claudiu Zissulescu The decoder and the disassembler inspired by ARC GNU binutils. Signed-off-by: Claudiu Zissulescu --- disas/arc.c | 460 ++ target/arc/decoder.c| 1276 +++ target/arc/decoder.h| 350 +++ targe

[PATCH 01/14] arc: Add initial core cpu files

2020-09-30 Thread cupertinomiranda
From: Cupertino Miranda Signed-off-by: Cupertino Miranda --- target/arc/Makefile.objs | 34 +++ target/arc/arc-common.h | 55 target/arc/cpu-param.h | 20 ++ target/arc/cpu-qom.h | 53 target/arc/cpu.c | 468 ++ target/arc/cpu.h

[PATCH 00/14] *** ARC port for review ***

2020-09-30 Thread cupertinomiranda
From: Cupertino Miranda Hello everyone, It is with utmost pleasure that on behalf of Synopsys I initiate the upstream process for our ARCv2 architecture QEMU port. I am one of the main contributors to this port and member of the Synopsys GNU toolchain team, together with Claudiu Zissulescu and