[RFC PATCH v4 27/30] hw/loongarch: Add LoongArch smbios support

2022-01-08 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/loongarch/Kconfig | 1 + hw/loongarch/loongson3.c | 40 include/hw/loongarch/loongarch.h | 1 + 3 files changed, 42 insertions(+) diff --git a/hw/loongarch/Kconfig b/hw/loongarch

[RFC PATCH v4 14/30] hw/pci-host: Add ls7a1000 PCIe Host bridge support for Loongson3 Platform

2022-01-08 Thread Xiaojuan Yang
interrupt sources. For more detailed info about ls7a1000 you can see the doc at https://github.com/loongson/LoongArch-Documentation/releases/latest/ download/Loongson-7A1000-usermanual-2.00-EN.pdf Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/pci-host/Kconfig| 4 + hw/pci-host

[RFC PATCH v4 05/30] target/loongarch: Add constant timer support

2022-01-08 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/constant_timer.c | 63 +++ target/loongarch/cpu.c| 9 + target/loongarch/cpu.h| 10 + target/loongarch/meson.build | 1 + 4 files changed, 83 insertions

[RFC PATCH v4 12/30] target/loongarch: Add timer related instructions support.

2022-01-08 Thread Xiaojuan Yang
This includes: -RDTIME{L/H}.W -RDTIME.D Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/helper.h | 1 + target/loongarch/insn_trans/trans_extra.c.inc | 32 +++ target/loongarch/op_helper.c | 6 target

[RFC PATCH v4 22/30] Enable common virtio pci support for LoongArch

2022-01-08 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- softmmu/qdev-monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c index 01f3834db5..49491d74a1 100644 --- a/softmmu/qdev-monitor.c +++ b/softmmu/qdev-monitor.c

[RFC PATCH v4 01/30] target/loongarch: Update README

2022-01-08 Thread Xiaojuan Yang
Mainly introduce how to run the softmmu Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/README | 25 + 1 file changed, 25 insertions(+) diff --git a/target/loongarch/README b/target/loongarch/README index d5780c5918..337ba55f33 100644

[RFC PATCH v4 23/30] hw/loongarch: Add some devices support for 3A5000.

2022-01-08 Thread Xiaojuan Yang
1.Add uart,virtio-net,vga and usb for 3A5000. 2.Add irq set and map for the pci host. Non pci device use irq 0-16, pci device use 16-64. 3.Add some unimplented device to emulate guest unused memory space. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/loongarch/Kconfig | 7

[RFC PATCH v4 19/30] hw/intc: Add LoongArch ls7a msi interrupt controller support(PCH-MSI)

2022-01-08 Thread Xiaojuan Yang
This patch realize PCH-MSI interrupt controller. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/intc/Kconfig | 5 ++ hw/intc/loongarch_pch_msi.c | 75 + hw/intc/meson.build | 1 + hw/intc/trace-events

[RFC PATCH v4 28/30] hw/loongarch: Add LoongArch acpi support

2022-01-08 Thread Xiaojuan Yang
Add a simple acpi model for LoongArch cpu More complex functions will be added later Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/acpi/Kconfig | 4 + hw/acpi/ls7a.c | 374 ++ hw/acpi/meson.build | 1 + hw

[PATCH v1 02/43] target/loongarch: Add core definition

2022-04-15 Thread Xiaojuan Yang
From: Song Gao This patch adds target state header, target definitions and initialization routines. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/loongarch/cpu-param.h | 18 ++ target/loongarch/cpu.c

[PATCH v1 08/43] target/loongarch: Add fixed point atomic instruction translation

2022-04-15 Thread Xiaojuan Yang
From: Song Gao This includes: - LL.{W/D}, SC.{W/D} - AM{SWAP/ADD/AND/OR/XOR/MAX/MIN}[_DB].{W/D} - AM{MAX/MIN}[_DB].{WU/DU} Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- .../loongarch/insn_trans/trans_atomic.c.inc | 114

[PATCH v1 27/43] target/loongarch: Add TLB instruction support

2022-04-15 Thread Xiaojuan Yang
This includes: - TLBSRCH - TLBRD - TLBWR - TLBFILL - TLBCLR - TLBFLUSH - INVTLB Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/disas.c | 18 + target/loongarch/helper.h | 13 + .../insn_trans/trans_privileged.c.inc

[PATCH v1 03/43] target/loongarch: Add main translation routines

2022-04-15 Thread Xiaojuan Yang
From: Song Gao This patch adds main translation routines and basic functions for translation. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/helper.h| 6 ++ target/loongarch/op_helper.c | 21 + target/loongarch/translate.c

[PATCH v1 16/43] target/loongarch: Add disassembler

2022-04-15 Thread Xiaojuan Yang
From: Song Gao This patch adds support for disassembling via option '-d in_asm'. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- include/disas/dis-asm.h | 2 + meson.build | 1 + target/loongarch/disas.c | 610

[PATCH v1 12/43] target/loongarch: Add floating point conversion instruction translation

2022-04-15 Thread Xiaojuan Yang
From: Song Gao This includes: - FCVT.S.D, FCVT.D.S - FFINT.{S/D}.{W/L}, FTINT.{W/L}.{S/D} - FTINT{RM/RP/RZ/RNE}.{W/L}.{S/D} - FRINT.{S/D} Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/fpu_helper.c| 393

[PATCH v1 14/43] target/loongarch: Add floating point load/store instruction translation

2022-04-15 Thread Xiaojuan Yang
From: Song Gao This includes: - FLD.{S/D}, FST.{S/D} - FLDX.{S/D}, FSTX.{S/D} - FLD{GT/LE}.{S/D}, FST{GT/LE}.{S/D} Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- .../loongarch/insn_trans/trans_fmemory.c.inc | 153 ++ target/loongarch

[PATCH v1 38/43] hw/loongarch: Add some devices support for 3A5000.

2022-04-15 Thread Xiaojuan Yang
1.Add uart,virtio-net,vga and usb for 3A5000. 2.Add irq set and map for the pci host. Non pci device use irq 0-16, pci device use 16-64. 3.Add some unimplented device to emulate guest unused memory space. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/loongarch/Kconfig | 7

[PATCH v1 28/43] target/loongarch: Add other core instructions support

2022-04-15 Thread Xiaojuan Yang
This includes: -CACOP -LDDIR -LDPTE -ERTN -DBCL -IDLE Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/disas.c | 17 target/loongarch/helper.h | 5 + .../insn_trans/trans_privileged.c.inc | 65 + target

[PATCH v1 22/43] target/loongarch: Add MMU support for LoongArch CPU.

2022-04-15 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/cpu-param.h | 2 +- target/loongarch/cpu.c| 24 +++ target/loongarch/cpu.h| 51 ++ target/loongarch/internals.h | 9 + target/loongarch/machine.c| 17

[PATCH v1 00/43] Add LoongArch softmmu support

2022-04-15 Thread Xiaojuan Yang
suport target/loongarch: 'make check-tcg' support Xiaojuan Yang (25): target/loongarch: Add system emulation introduction target/loongarch: Add CSRs definition target/loongarch: Add basic vmstate description of CPU. target/loongarch: Implement qmp_query_cpu_definitions() target

[PATCH v1 06/43] target/loongarch: Add fixed point bit instruction translation

2022-04-15 Thread Xiaojuan Yang
From: Song Gao This includes: - EXT.W.{B/H} - CL{O/Z}.{W/D}, CT{O/Z}.{W/D} - BYTEPICK.{W/D} - REVB.{2H/4H/2W/D} - REVH.{2W/D} - BITREV.{4B/8B}, BITREV.{W/D} - BSTRINS.{W/D}, BSTRPICK.{W/D} - MASKEQZ, MASKNEZ Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson

[PATCH v1 36/43] hw/loongarch: Add irq hierarchy for the system

2022-04-15 Thread Xiaojuan Yang
This patch add the irq hierarchy for the virt board. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/loongarch/loongson3.c | 106 +++ 1 file changed, 106 insertions(+) diff --git a/hw/loongarch/loongson3.c b/hw/loongarch/loongson3.c index

[PATCH v1 33/43] hw/intc: Add LoongArch ls7a interrupt controller support(PCH-PIC)

2022-04-15 Thread Xiaojuan Yang
This patch realize the PCH-PIC interrupt controller. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- MAINTAINERS | 1 + hw/intc/Kconfig | 4 + hw/intc/loongarch_pch_pic.c | 488 hw/intc/meson.build

[PATCH v1 30/43] target/loongarch: Add gdb support.

2022-04-15 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- MAINTAINERS | 2 + configs/targets/loongarch64-softmmu.mak | 1 + gdb-xml/loongarch-base64.xml| 44 ++ gdb-xml/loongarch-fpu64.xml | 57 + target/loongarch

[PATCH v1 15/43] target/loongarch: Add branch instruction translation

2022-04-15 Thread Xiaojuan Yang
From: Song Gao This includes: - BEQ, BNE, BLT[U], BGE[U] - BEQZ, BNEZ - B - BL - JIRL - BCEQZ, BCNEZ Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- .../loongarch/insn_trans/trans_branch.c.inc | 83 +++ target/loongarch/insns.decode

[PATCH v1 41/43] hw/loongarch: Add LoongArch ls7a acpi device support

2022-04-15 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- MAINTAINERS| 2 + hw/acpi/Kconfig| 4 + hw/acpi/ls7a.c | 374 + hw/acpi/meson.build| 1 + hw/loongarch/Kconfig | 2 + hw/loongarch/loongson3

[PATCH v1 01/43] target/loongarch: Add README

2022-04-15 Thread Xiaojuan Yang
From: Song Gao This patch gives an introduction to the LoongArch target. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- MAINTAINERS | 6 ++ target/loongarch/README | 10 ++ 2 files changed, 16 insertions(+) create mode

[PATCH v1 19/43] target/loongarch: Add CSRs definition

2022-04-15 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/cpu-csr.h | 201 + target/loongarch/cpu.c | 36 +++ target/loongarch/cpu.h | 65 3 files changed, 302 insertions(+) create

[PATCH v1 31/43] hw/loongarch: Add support loongson3 virt machine type.

2022-04-15 Thread Xiaojuan Yang
are emulated. More detailed info you can see https://github.com/loongson/LoongArch-Documentation Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- MAINTAINERS | 3 + .../devices/loongarch64-softmmu/default.mak | 3 + configs/targets/loongarch64-softmmu.mak

[PATCH v1 09/43] target/loongarch: Add fixed point extra instruction translation

2022-04-15 Thread Xiaojuan Yang
From: Song Gao This includes: - CRC[C].W.{B/H/W/D}.W - SYSCALL - BREAK - ASRT{LE/GT}.D - RDTIME{L/H}.W, RDTIME.D - CPUCFG Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/helper.h | 4 ++ target/loongarch

[PATCH v1 20/43] target/loongarch: Add basic vmstate description of CPU.

2022-04-15 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/cpu.c | 1 + target/loongarch/internals.h | 2 + target/loongarch/machine.c | 85 target/loongarch/meson.build | 6 +++ 4 files changed, 94

[PATCH v1 25/43] target/loongarch: Add LoongArch CSR instruction

2022-04-15 Thread Xiaojuan Yang
This includes: - CSRRD - CSRWR - CSRXCHG Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/cpu-csr.h| 2 + target/loongarch/csr_helper.c | 186 ++ target/loongarch/disas.c | 15 ++ target

[PATCH v1 13/43] target/loongarch: Add floating point move instruction translation

2022-04-15 Thread Xiaojuan Yang
From: Song Gao This includes: - FMOV.{S/D} - FSEL - MOVGR2FR.{W/D}, MOVGR2FRH.W - MOVFR2GR.{S/D}, MOVFRH2GR.S - MOVGR2FCSR, MOVFCSR2GR - MOVFR2CF, MOVCF2FR - MOVGR2CF, MOVCF2GR Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch

[PATCH v1 35/43] hw/intc: Add LoongArch extioi interrupt controller(EIOINTC)

2022-04-15 Thread Xiaojuan Yang
This patch realize the EIOINTC interrupt controller. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/intc/Kconfig| 3 + hw/intc/loongarch_extioi.c | 373 + hw/intc/meson.build| 1 + hw/intc/trace-events

[PATCH v1 34/43] hw/intc: Add LoongArch ls7a msi interrupt controller support(PCH-MSI)

2022-04-15 Thread Xiaojuan Yang
This patch realize PCH-MSI interrupt controller. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/intc/Kconfig | 5 ++ hw/intc/loongarch_pch_msi.c | 75 + hw/intc/meson.build | 1 + hw/intc/trace-events

[PATCH v1 26/43] target/loongarch: Add LoongArch IOCSR instruction

2022-04-15 Thread Xiaojuan Yang
This includes: - IOCSR{RD/WR}.{B/H/W/D} Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/cpu.h| 3 + target/loongarch/disas.c | 8 + target/loongarch/helper.h | 2 + .../insn_trans

[PATCH v1 29/43] target/loongarch: Add timer related instructions support.

2022-04-15 Thread Xiaojuan Yang
This includes: -RDTIME{L/H}.W -RDTIME.D Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/disas.c | 3 ++ target/loongarch/helper.h | 2 ++ target/loongarch/insn_trans/trans_extra.c.inc | 33 +++ target

[PATCH v1 24/43] target/loongarch: Add constant timer support

2022-04-15 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/constant_timer.c | 65 +++ target/loongarch/cpu.c| 2 + target/loongarch/cpu.h| 4 ++ target/loongarch/internals.h | 6 +++ target/loongarch/meson.build

[PATCH v1 37/43] Enable common virtio pci support for LoongArch

2022-04-15 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- softmmu/qdev-monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c index 12fe60c467..bb5897fc76 100644 --- a/softmmu/qdev-monitor.c

[PATCH v1 32/43] hw/loongarch: Add LoongArch ipi interrupt support(IPI)

2022-04-15 Thread Xiaojuan Yang
This patch realize the IPI interrupt controller. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- MAINTAINERS | 2 + hw/intc/Kconfig | 3 + hw/intc/loongarch_ipi.c | 145 +++ hw/intc/meson.build

[PATCH v1 05/43] target/loongarch: Add fixed point shift instruction translation

2022-04-15 Thread Xiaojuan Yang
From: Song Gao This includes: - SLL.W, SRL.W, SRA.W, ROTR.W - SLLI.W, SRLI.W, SRAI.W, ROTRI.W - SLL.D, SRL.D, SRA.D, ROTR.D - SLLI.D, SRLI.D, SRAI.D, ROTRI.D Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/insn_trans/trans_shift.c.inc

[PATCH v1 04/43] target/loongarch: Add fixed point arithmetic instruction translation

2022-04-15 Thread Xiaojuan Yang
, ORI, XORI Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/insn_trans/trans_arith.c.inc | 304 ++ target/loongarch/insns.decode | 79 + target/loongarch/translate.c | 83 + target

[PATCH v1 23/43] target/loongarch: Add LoongArch interrupt and exception handle

2022-04-15 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/cpu.c | 261 +++ target/loongarch/cpu.h | 2 + target/loongarch/internals.h | 2 + 3 files changed, 265 insertions(+) diff --git a/target/loongarch/cpu.c b/target/loongarch

[PATCH v1 39/43] hw/loongarch: Add LoongArch ls7a rtc device support

2022-04-15 Thread Xiaojuan Yang
This patch add ls7a rtc device support. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- MAINTAINERS| 1 + hw/loongarch/Kconfig | 1 + hw/loongarch/loongson3.c | 4 + hw/rtc/Kconfig | 3 + hw/rtc/ls7a_rtc.c | 323

[PATCH v1 43/43] target/loongarch: 'make check-tcg' support

2022-04-15 Thread Xiaojuan Yang
From: Song Gao Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson Acked-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- tests/tcg/configure.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index

[PATCH v1 40/43] hw/loongarch: Add LoongArch boot code and load elf function.

2022-04-15 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/loongarch/loongson3.c | 68 +++- include/hw/loongarch/loongarch.h | 8 2 files changed, 74 insertions(+), 2 deletions(-) diff --git a/hw/loongarch/loongson3.c b/hw/loongarch/loongson3.c index

[PATCH v1 11/43] target/loongarch: Add floating point comparison instruction translation

2022-04-15 Thread Xiaojuan Yang
From: Song Gao This includes: - FCMP.cond.{S/D} Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/fpu_helper.c| 60 target/loongarch/helper.h| 9 +++ target/loongarch/insn_trans

[PATCH v1 17/43] target/loongarch: Add target build suport

2022-04-15 Thread Xiaojuan Yang
From: Song Gao Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/loongarch/meson.build | 19 +++ target/meson.build | 1 + 2 files changed, 20 insertions(+) create mode 100644 target

[PATCH v1 10/43] target/loongarch: Add floating point arithmetic instruction translation

2022-04-15 Thread Xiaojuan Yang
From: Song Gao This includes: - F{ADD/SUB/MUL/DIV}.{S/D} - F{MADD/MSUB/NMADD/NMSUB}.{S/D} - F{MAX/MIN}.{S/D} - F{MAXA/MINA}.{S/D} - F{ABS/NEG}.{S/D} - F{SQRT/RECIP/RSQRT}.{S/D} - F{SCALEB/LOGB/COPYSIGN}.{S/D} - FCLASS.{S/D} Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed

[PATCH v1 42/43] tests/tcg/loongarch64: Add hello/memory test in loongarch64 system

2022-04-15 Thread Xiaojuan Yang
- We write a very minimal softmmu harness. - This is a very simple smoke test with no need to run a full Linux/kernel. - The Makefile.softmmu-target record the rule to run. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- MAINTAINERS | 1 + tests/tcg

[PATCH v1 18/43] target/loongarch: Add system emulation introduction

2022-04-15 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- MAINTAINERS | 8 + docs/system/loongarch/loongson3.rst | 41 ++ target/loongarch/README | 54 + 3 files changed, 103 insertions(+) create mode

[PATCH v1 21/43] target/loongarch: Implement qmp_query_cpu_definitions()

2022-04-15 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- qapi/machine-target.json | 6 -- target/loongarch/cpu.c | 26 ++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/qapi/machine-target.json b/qapi/machine

[PATCH v1 07/43] target/loongarch: Add fixed point load/store instruction translation

2022-04-15 Thread Xiaojuan Yang
From: Song Gao This includes: - LD.{B[U]/H[U]/W[U]/D}, ST.{B/H/W/D} - LDX.{B[U]/H[U]/W[U]/D}, STX.{B/H/W/D} - LDPTR.{W/D}, STPTR.{W/D} - PRELD - LD{GT/LE}.{B/H/W/D}, ST{GT/LE}.{B/H/W/D} - DBAR, IBAR Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson

[PATCH 1/1] LoongArch: step down as general arch maintainer

2023-10-12 Thread Xiaojuan Yang
I haven't really been working on LoongArch for some time now, so let's remove myself from this entry. Signed-off-by: Xiaojuan Yang --- MAINTAINERS | 2 -- 1 file changed, 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index c3cc12dc29..5c386f1f37 100644 --- a/MAINTAINERS +++ b

[PATCH v2 35/43] hw/loongarch: Add irq hierarchy for the system

2022-04-25 Thread Xiaojuan Yang
This patch add the irq hierarchy for the virt board. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- hw/loongarch/loongson3.c | 116 +++ 1 file changed, 116 insertions(+) diff --git a/hw/loongarch/loongson3.c b/hw

[PATCH v2 40/43] hw/loongarch: Add LoongArch ls7a acpi device support

2022-04-25 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- MAINTAINERS| 2 + hw/acpi/Kconfig| 4 + hw/acpi/ls7a.c | 374 + hw/acpi/meson.build| 1 + hw/loongarch/Kconfig | 2 + hw/loongarch/loongson3

[PATCH v2 22/43] target/loongarch: Add MMU support for LoongArch CPU.

2022-04-25 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/cpu-param.h | 2 +- target/loongarch/cpu.c| 24 +++ target/loongarch/cpu.h| 51 ++ target/loongarch/internals.h | 9 + target/loongarch/machine.c| 17

[PATCH v2 08/43] target/loongarch: Add fixed point atomic instruction translation

2022-04-25 Thread Xiaojuan Yang
From: Song Gao This includes: - LL.{W/D}, SC.{W/D} - AM{SWAP/ADD/AND/OR/XOR/MAX/MIN}[_DB].{W/D} - AM{MAX/MIN}[_DB].{WU/DU} Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- .../loongarch/insn_trans/trans_atomic.c.inc | 113

[PATCH v2 06/43] target/loongarch: Add fixed point bit instruction translation

2022-04-25 Thread Xiaojuan Yang
From: Song Gao This includes: - EXT.W.{B/H} - CL{O/Z}.{W/D}, CT{O/Z}.{W/D} - BYTEPICK.{W/D} - REVB.{2H/4H/2W/D} - REVH.{2W/D} - BITREV.{4B/8B}, BITREV.{W/D} - BSTRINS.{W/D}, BSTRPICK.{W/D} - MASKEQZ, MASKNEZ Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson

[PATCH v2 07/43] target/loongarch: Add fixed point load/store instruction translation

2022-04-25 Thread Xiaojuan Yang
From: Song Gao This includes: - LD.{B[U]/H[U]/W[U]/D}, ST.{B/H/W/D} - LDX.{B[U]/H[U]/W[U]/D}, STX.{B/H/W/D} - LDPTR.{W/D}, STPTR.{W/D} - PRELD - LD{GT/LE}.{B/H/W/D}, ST{GT/LE}.{B/H/W/D} - DBAR, IBAR Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson

[PATCH v2 23/43] target/loongarch: Add LoongArch interrupt and exception handle

2022-04-25 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/cpu.c | 229 +++ target/loongarch/cpu.h | 2 + target/loongarch/internals.h | 2 + 3 files changed, 233 insertions(+) diff --git a/target/loongarch/cpu.c b/target/loongarch

[PATCH v2 26/43] target/loongarch: Add LoongArch IOCSR instruction

2022-04-25 Thread Xiaojuan Yang
This includes: - IOCSR{RD/WR}.{B/H/W/D} Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/cpu.c| 52 ++ target/loongarch/cpu.h| 25 +++ target/loongarch/disas.c | 8 + target/loongarch/helper.h

[PATCH v2 34/43] hw/intc: Add LoongArch extioi interrupt controller(EIOINTC)

2022-04-25 Thread Xiaojuan Yang
This patch realize the EIOINTC interrupt controller. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/intc/Kconfig| 3 + hw/intc/loongarch_extioi.c | 483 + hw/intc/meson.build| 1 + hw/intc/trace-events

[PATCH v2 13/43] target/loongarch: Add floating point move instruction translation

2022-04-25 Thread Xiaojuan Yang
From: Song Gao This includes: - FMOV.{S/D} - FSEL - MOVGR2FR.{W/D}, MOVGR2FRH.W - MOVFR2GR.{S/D}, MOVFRH2GR.S - MOVGR2FCSR, MOVFCSR2GR - MOVFR2CF, MOVCF2FR - MOVGR2CF, MOVCF2GR Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch

[PATCH v2 27/43] target/loongarch: Add TLB instruction support

2022-04-25 Thread Xiaojuan Yang
This includes: - TLBSRCH - TLBRD - TLBWR - TLBFILL - TLBCLR - TLBFLUSH - INVTLB Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/disas.c | 18 + target/loongarch/helper.h | 13 + .../insn_trans

[PATCH v2 33/43] hw/intc: Add LoongArch ls7a msi interrupt controller support(PCH-MSI)

2022-04-25 Thread Xiaojuan Yang
This patch realize PCH-MSI interrupt controller. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- hw/intc/Kconfig | 5 ++ hw/intc/loongarch_pch_msi.c | 75 + hw/intc/meson.build

[PATCH v2 21/43] target/loongarch: Implement qmp_query_cpu_definitions()

2022-04-25 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- qapi/machine-target.json | 6 -- target/loongarch/cpu.c | 26 ++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/qapi/machine-target.json b/qapi/machine

[PATCH v2 43/43] target/loongarch: 'make check-tcg' support

2022-04-25 Thread Xiaojuan Yang
From: Song Gao Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson Acked-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- tests/tcg/configure.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/tcg/configure.sh b/tests/tcg/configure.sh index

[PATCH v2 38/43] hw/loongarch: Add LoongArch ls7a rtc device support

2022-04-25 Thread Xiaojuan Yang
This patch add ls7a rtc device support. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- MAINTAINERS| 1 + hw/loongarch/Kconfig | 1 + hw/loongarch/loongson3.c | 4 + hw/rtc/Kconfig | 3 + hw/rtc/ls7a_rtc.c | 322

[PATCH v2 01/43] target/loongarch: Add README

2022-04-25 Thread Xiaojuan Yang
From: Song Gao This patch gives an introduction to the LoongArch target. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- MAINTAINERS | 6 ++ target/loongarch/README | 10 ++ 2 files changed, 16 insertions(+) create mode

[PATCH v2 11/43] target/loongarch: Add floating point comparison instruction translation

2022-04-25 Thread Xiaojuan Yang
From: Song Gao This includes: - FCMP.cond.{S/D} Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/fpu_helper.c| 60 target/loongarch/helper.h| 9 +++ target/loongarch/insn_trans

[PATCH v2 00/43] Add LoongArch softmmu support

2022-04-25 Thread Xiaojuan Yang
translation target/loongarch: Add disassembler target/loongarch: Add target build suport target/loongarch: 'make check-tcg' support Xiaojuan Yang (25): target/loongarch: Add system emulation introduction target/loongarch: Add CSRs definition target/loongarch: Add basic vmstate description

[PATCH v2 14/43] target/loongarch: Add floating point load/store instruction translation

2022-04-25 Thread Xiaojuan Yang
From: Song Gao This includes: - FLD.{S/D}, FST.{S/D} - FLDX.{S/D}, FSTX.{S/D} - FLD{GT/LE}.{S/D}, FST{GT/LE}.{S/D} Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- .../loongarch/insn_trans/trans_fmemory.c.inc | 153 ++ target/loongarch

[PATCH v2 15/43] target/loongarch: Add branch instruction translation

2022-04-25 Thread Xiaojuan Yang
From: Song Gao This includes: - BEQ, BNE, BLT[U], BGE[U] - BEQZ, BNEZ - B - BL - JIRL - BCEQZ, BCNEZ Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- .../loongarch/insn_trans/trans_branch.c.inc | 83 +++ target/loongarch/insns.decode

[PATCH v2 17/43] target/loongarch: Add target build suport

2022-04-25 Thread Xiaojuan Yang
From: Song Gao Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/loongarch/meson.build | 19 +++ target/meson.build | 1 + 2 files changed, 20 insertions(+) create mode 100644 target

[PATCH v2 20/43] target/loongarch: Add basic vmstate description of CPU.

2022-04-25 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/cpu.c | 1 + target/loongarch/internals.h | 2 + target/loongarch/machine.c | 86 target/loongarch/meson.build | 6 +++ 4 files changed, 95

[PATCH v2 12/43] target/loongarch: Add floating point conversion instruction translation

2022-04-25 Thread Xiaojuan Yang
From: Song Gao This includes: - FCVT.S.D, FCVT.D.S - FFINT.{S/D}.{W/L}, FTINT.{W/L}.{S/D} - FTINT{RM/RP/RZ/RNE}.{W/L}.{S/D} - FRINT.{S/D} Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/fpu_helper.c| 393

[PATCH v2 18/43] target/loongarch: Add system emulation introduction

2022-04-25 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- MAINTAINERS | 8 + docs/system/loongarch/loongson3.rst | 41 ++ target/loongarch/README | 54 + 3 files changed, 103

[PATCH v2 42/43] tests/tcg/loongarch64: Add hello/memory test in loongarch64 system

2022-04-25 Thread Xiaojuan Yang
- We write a very minimal softmmu harness. - This is a very simple smoke test with no need to run a full Linux/kernel. - The Makefile.softmmu-target record the rule to run. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- MAINTAINERS

[PATCH v2 29/43] target/loongarch: Add timer related instructions support.

2022-04-25 Thread Xiaojuan Yang
This includes: -RDTIME{L/H}.W -RDTIME.D Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/disas.c | 3 ++ target/loongarch/helper.h | 2 ++ target/loongarch/insn_trans/trans_extra.c.inc | 33 +++ target

[PATCH v2 36/43] Enable common virtio pci support for LoongArch

2022-04-25 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- softmmu/qdev-monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/softmmu/qdev-monitor.c b/softmmu/qdev-monitor.c index 12fe60c467..bb5897fc76 100644 --- a/softmmu/qdev-monitor.c

[PATCH v2 02/43] target/loongarch: Add core definition

2022-04-25 Thread Xiaojuan Yang
From: Song Gao This patch adds target state header, target definitions and initialization routines. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- target/loongarch/cpu-param.h | 18 ++ target/loongarch/cpu.c

[PATCH v2 03/43] target/loongarch: Add main translation routines

2022-04-25 Thread Xiaojuan Yang
From: Song Gao This patch adds main translation routines and basic functions for translation. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/helper.h| 6 ++ target/loongarch/op_helper.c | 21 + target/loongarch/translate.c

[PATCH v2 10/43] target/loongarch: Add floating point arithmetic instruction translation

2022-04-25 Thread Xiaojuan Yang
From: Song Gao This includes: - F{ADD/SUB/MUL/DIV}.{S/D} - F{MADD/MSUB/NMADD/NMSUB}.{S/D} - F{MAX/MIN}.{S/D} - F{MAXA/MINA}.{S/D} - F{ABS/NEG}.{S/D} - F{SQRT/RECIP/RSQRT}.{S/D} - F{SCALEB/LOGB/COPYSIGN}.{S/D} - FCLASS.{S/D} Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed

[PATCH v2 00/43] Add LoongArch softmmu support

2022-04-25 Thread Xiaojuan Yang
translation target/loongarch: Add disassembler target/loongarch: Add target build suport target/loongarch: 'make check-tcg' support Xiaojuan Yang (25): target/loongarch: Add system emulation introduction target/loongarch: Add CSRs definition target/loongarch: Add basic vmstate description

[PATCH v2 39/43] hw/loongarch: Add LoongArch load elf function.

2022-04-25 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/loongarch/loongson3.c| 54 +++-- include/hw/loongarch/virt.h | 9 +++ target/loongarch/cpu.c | 4 +++ target/loongarch/cpu.h | 2 ++ 4 files changed, 67 insertions(+), 2 deletions

[PATCH v2 19/43] target/loongarch: Add CSRs definition

2022-04-25 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/cpu-csr.h | 208 + target/loongarch/cpu.c | 36 +++ target/loongarch/cpu.h | 65 3 files changed, 309 insertions(+) create

[PATCH v2 41/43] target/loongarch: Add gdb support.

2022-04-25 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- MAINTAINERS | 1 + configs/targets/loongarch64-softmmu.mak | 1 + gdb-xml/loongarch-base64.xml| 44 ++ gdb-xml/loongarch-fpu64.xml | 57 + target/loongarch

[PATCH v2 32/43] hw/intc: Add LoongArch ls7a interrupt controller support(PCH-PIC)

2022-04-25 Thread Xiaojuan Yang
This patch realize the PCH-PIC interrupt controller. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- MAINTAINERS | 1 + hw/intc/Kconfig | 4 + hw/intc/loongarch_pch_pic.c | 434 hw/intc/meson.build

[PATCH v2 37/43] hw/loongarch: Add some devices support for 3A5000.

2022-04-25 Thread Xiaojuan Yang
1.Add uart,virtio-net,vga and usb for 3A5000. 2.Add irq set and map for the pci host. Non pci device use irq 0-16, pci device use 16-64. 3.Add some unimplented device to emulate guest unused memory space. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- hw/loongarch/Kconfig | 7

[PATCH v2 04/43] target/loongarch: Add fixed point arithmetic instruction translation

2022-04-25 Thread Xiaojuan Yang
, ORI, XORI Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/insn_trans/trans_arith.c.inc | 304 ++ target/loongarch/insns.decode | 79 + target/loongarch/translate.c | 83 + target

[PATCH v2 05/43] target/loongarch: Add fixed point shift instruction translation

2022-04-25 Thread Xiaojuan Yang
From: Song Gao This includes: - SLL.W, SRL.W, SRA.W, ROTR.W - SLLI.W, SRLI.W, SRAI.W, ROTRI.W - SLL.D, SRL.D, SRA.D, ROTR.D - SLLI.D, SRLI.D, SRAI.D, ROTRI.D Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/insn_trans/trans_shift.c.inc

[PATCH v2 16/43] target/loongarch: Add disassembler

2022-04-25 Thread Xiaojuan Yang
From: Song Gao This patch adds support for disassembling via option '-d in_asm'. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- include/disas/dis-asm.h | 2 + meson.build | 1 + target/loongarch/disas.c | 610

[PATCH v2 09/43] target/loongarch: Add fixed point extra instruction translation

2022-04-25 Thread Xiaojuan Yang
From: Song Gao This includes: - CRC[C].W.{B/H/W/D}.W - SYSCALL - BREAK - ASRT{LE/GT}.D - RDTIME{L/H}.W, RDTIME.D - CPUCFG Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- target/loongarch/helper.h | 4 ++ target/loongarch

[PATCH v2 28/43] target/loongarch: Add other core instructions support

2022-04-25 Thread Xiaojuan Yang
This includes: -CACOP -LDDIR -LDPTE -ERTN -DBCL -IDLE Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/disas.c | 17 target/loongarch/helper.h | 5 + .../insn_trans/trans_privileged.c.inc

[PATCH v2 30/43] hw/loongarch: Add support loongson3 virt machine type.

2022-04-25 Thread Xiaojuan Yang
are emulated. More detailed info you can see https://github.com/loongson/LoongArch-Documentation Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- MAINTAINERS | 4 + .../devices/loongarch64-softmmu/default.mak | 3 + configs/targets/loongarch64-softmmu.mak

[PATCH v2 31/43] hw/loongarch: Add LoongArch ipi interrupt support(IPI)

2022-04-25 Thread Xiaojuan Yang
This patch realize the IPI interrupt controller. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- MAINTAINERS | 2 + hw/intc/Kconfig | 3 + hw/intc/loongarch_ipi.c | 166 hw/intc/meson.build

[PATCH v2 25/43] target/loongarch: Add LoongArch CSR instruction

2022-04-25 Thread Xiaojuan Yang
This includes: - CSRRD - CSRWR - CSRXCHG Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/csr_helper.c | 87 ++ target/loongarch/disas.c | 95 +++ target/loongarch/helper.h | 8 + .../insn_trans

[PATCH v2 24/43] target/loongarch: Add constant timer support

2022-04-25 Thread Xiaojuan Yang
Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao Reviewed-by: Richard Henderson --- target/loongarch/constant_timer.c | 64 +++ target/loongarch/cpu.c| 2 + target/loongarch/cpu.h| 4 ++ target/loongarch/internals.h | 6

[PATCH v4 01/43] target/loongarch: Add README

2022-05-17 Thread Xiaojuan Yang
From: Song Gao This patch gives an introduction to the LoongArch target. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang Reviewed-by: Richard Henderson --- MAINTAINERS | 6 ++ target/loongarch/README | 10 ++ 2 files changed, 16 insertions(+) create mode

<    1   2   3   4   5   6   7   >