0489d5bd | 27-Feb-2023 |
Anton Johansson <anjo@rev.ng> |
target/riscv: Replace `tb_pc()` with `tb->pc`
Signed-off-by: Anton Johansson <anjo@rev.ng> Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> M
target/riscv: Replace `tb_pc()` with `tb->pc`
Signed-off-by: Anton Johansson <anjo@rev.ng> Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230227135202.9710-18-anjo@rev.ng> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
show more ...
|
04bc3027 | 17-Dec-2022 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
target/riscv/cpu: Move Floating-Point fields closer
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <2022121717290
target/riscv/cpu: Move Floating-Point fields closer
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20221217172907.8364-7-philmd@linaro.org>
show more ...
|
d90ebc47 | 16-Dec-2022 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
target/cpu: Restrict do_transaction_failed() handlers to sysemu
The 'hwaddr' type is only available / meaningful on system emulation.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> S
target/cpu: Restrict do_transaction_failed() handlers to sysemu
The 'hwaddr' type is only available / meaningful on system emulation.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20221216215519.5522-6-philmd@linaro.org>
show more ...
|
6d2d454a | 06-Dec-2022 |
Philippe Mathieu-Daudé <philmd@linaro.org> |
target/cpu: Restrict cpu_get_phys_page_debug() handlers to sysemu
The 'hwaddr' type is only available / meaningful on system emulation.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
target/cpu: Restrict cpu_get_phys_page_debug() handlers to sysemu
The 'hwaddr' type is only available / meaningful on system emulation.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20221216215519.5522-5-philmd@linaro.org>
show more ...
|
8c89d50c | 13-Feb-2023 |
LIU Zhiwei <zhiwei_liu@linux.alibaba.com> |
target/riscv: Fix vslide1up.vf and vslide1down.vf
vslide1up_##BITWIDTH is used by the vslide1up.vx and vslide1up.vf. So its scalar input should be uint64_t to hold the 64 bits float register.And the
target/riscv: Fix vslide1up.vf and vslide1down.vf
vslide1up_##BITWIDTH is used by the vslide1up.vx and vslide1up.vf. So its scalar input should be uint64_t to hold the 64 bits float register.And the same for vslide1down_##BITWIDTH.
This bug is caught when run these instructions on qemu-riscv32.
Signed-off-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn> Reviewed-by: Frank Chang <frank.chang@sifive.com> Message-ID: <20230213094550.29621-1-zhiwei_liu@linux.alibaba.com> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
show more ...
|
718942ae | 10-Feb-2023 |
Daniel Henrique Barboza <dbarboza@ventanamicro.com> |
target/riscv: avoid env_archcpu() in cpu_get_tb_cpu_state()
We have a RISCVCPU *cpu pointer available at the start of the function.
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com
target/riscv: avoid env_archcpu() in cpu_get_tb_cpu_state()
We have a RISCVCPU *cpu pointer available at the start of the function.
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn> Message-ID: <20230210123836.506286-1-dbarboza@ventanamicro.com> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
show more ...
|
90b1fafc | 08-Feb-2023 |
Himanshu Chauhan <hchauhan@ventanamicro.com> |
target/riscv: Smepmp: Skip applying default rules when address matches
When MSECCFG.MML is set, after checking the address range in PMP if the asked permissions are not same as programmed in PMP, th
target/riscv: Smepmp: Skip applying default rules when address matches
When MSECCFG.MML is set, after checking the address range in PMP if the asked permissions are not same as programmed in PMP, the default permissions are applied. This should only be the case when there is no matching address is found.
This patch skips applying default rules when matching address range is found. It returns the index of the match PMP entry.
Fixes: 824cac681c3 (target/riscv: Fix PMP propagation for tlb) Signed-off-by: Himanshu Chauhan <hchauhan@ventanamicro.com> Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20230209055206.229392-1-hchauhan@ventanamicro.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
show more ...
|
0e660142 | 08-Feb-2023 |
Frank Chang <frank.chang@sifive.com> |
target/riscv: Remove privileged spec version restriction for RVV
The RVV specification does not require that the core needs to support the privileged specification v1.12.0 to support RVV, and there
target/riscv: Remove privileged spec version restriction for RVV
The RVV specification does not require that the core needs to support the privileged specification v1.12.0 to support RVV, and there is no dependency from ISA level.
This commit removes the restriction from both RVV CSRs and extension CPU ISA string.
Signed-off-by: Frank Chang <frank.chang@sifive.com> Reviewed-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Acked-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20230208063209.27279-1-frank.chang@sifive.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
show more ...
|
06e2b010 | 02-Feb-2023 |
Markus Armbruster <armbru@redhat.com> |
riscv: Clean up includes
This commit was created with scripts/clean-includes.
All .c should include qemu/osdep.h first. The script performs three related cleanups:
* Ensure .c files include qemu/
riscv: Clean up includes
This commit was created with scripts/clean-includes.
All .c should include qemu/osdep.h first. The script performs three related cleanups:
* Ensure .c files include qemu/osdep.h first. * Including it in a .h is redundant, since the .c already includes it. Drop such inclusions. * Likewise, including headers qemu/osdep.h includes is redundant. Drop these, too.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-Id: <20230202133830.2152150-15-armbru@redhat.com>
show more ...
|
947bf7fe | 03-Feb-2023 |
Vladimir Isaev <vladimir.isaev@syntacore.com> |
target/riscv: fix SBI getchar handler for KVM
Character must be returned via ret[0] field (copied to a0 by KVM).
Return value should be set to 0 to indicate successful processing.
Signed-off-by: V
target/riscv: fix SBI getchar handler for KVM
Character must be returned via ret[0] field (copied to a0 by KVM).
Return value should be set to 0 to indicate successful processing.
Signed-off-by: Vladimir Isaev <vladimir.isaev@syntacore.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20230203135155.12449-1-vladimir.isaev@syntacore.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
5fc0fc87 | 04-Feb-2023 |
Vladimir Isaev <vladimir.isaev@syntacore.com> |
target/riscv: fix ctzw behavior
According to spec, ctzw should work with 32-bit register, not 64.
For example, previous implementation returns 33 for (1<<33) input when the new one returns 32.
Sig
target/riscv: fix ctzw behavior
According to spec, ctzw should work with 32-bit register, not 64.
For example, previous implementation returns 33 for (1<<33) input when the new one returns 32.
Signed-off-by: Vladimir Isaev <vladimir.isaev@syntacore.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Suggested-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230204082312.43557-1-vladimir.isaev@syntacore.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
506c6698 | 27-Jan-2023 |
Deepak Gupta <debug@rivosinc.com> |
target/riscv: fix for virtual instr exception
commit fb3f3730e4 added mechanism to generate virtual instruction exception during instruction decode when virt is enabled.
However in some situations,
target/riscv: fix for virtual instr exception
commit fb3f3730e4 added mechanism to generate virtual instruction exception during instruction decode when virt is enabled.
However in some situations, illegal instruction exception can be raised due to state of CPU. One such situation is implementing branch tracking. [1] An indirect branch if doesn't land on a landing pad instruction, then cpu must raise an illegal instruction exception. Implementation would raise such expcetion due to missing landing pad inst and not due to decode. Thus DisasContext must have `virt_inst_excp` initialized to false during DisasContxt initialization for TB.
[1] - https://github.com/riscv/riscv-cfi
Signed-off-by: Deepak Gupta <debug@rivosinc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20230127191758.755844-1-debug@rivosinc.com> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
578086ba | 31-Jan-2023 |
Christoph Müllner <christoph.muellner@vrull.eu> |
RISC-V: Adding XTheadFmv ISA extension
This patch adds support for the XTheadFmv ISA extension. The patch uses the T-Head specific decoder and translation.
Signed-off-by: LIU Zhiwei <zhiwei_liu@lin
RISC-V: Adding XTheadFmv ISA extension
This patch adds support for the XTheadFmv ISA extension. The patch uses the T-Head specific decoder and translation.
Signed-off-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu> Message-Id: <20230131202013.2541053-14-christoph.muellner@vrull.eu> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
95bd8daa | 31-Jan-2023 |
Christoph Müllner <christoph.muellner@vrull.eu> |
RISC-V: Add initial support for T-Head C906
This patch adds the T-Head C906 to the list of known CPUs. Selecting this CPUs will automatically enable the available ISA extensions of the CPUs (incl. v
RISC-V: Add initial support for T-Head C906
This patch adds the T-Head C906 to the list of known CPUs. Selecting this CPUs will automatically enable the available ISA extensions of the CPUs (incl. vendor extensions).
Co-developed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu> Message-Id: <20230131202013.2541053-13-christoph.muellner@vrull.eu> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
7ad2878c | 31-Jan-2023 |
Christoph Müllner <christoph.muellner@vrull.eu> |
RISC-V: Set minimum priv version for Zfh to 1.11
There are no differences for floating point instructions in priv version 1.11 and 1.12. There is also no dependency for Zfh to priv version 1.12. The
RISC-V: Set minimum priv version for Zfh to 1.11
There are no differences for floating point instructions in priv version 1.11 and 1.12. There is also no dependency for Zfh to priv version 1.12. Therefore allow Zfh to be enabled for priv version 1.11.
Acked-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu> Message-Id: <20230131202013.2541053-12-christoph.muellner@vrull.eu> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
d4d90115 | 31-Jan-2023 |
Christoph Müllner <christoph.muellner@vrull.eu> |
RISC-V: Adding T-Head FMemIdx extension
This patch adds support for the T-Head FMemIdx instructions. The patch uses the T-Head specific decoder and translation.
Co-developed-by: LIU Zhiwei <zhiwei_
RISC-V: Adding T-Head FMemIdx extension
This patch adds support for the T-Head FMemIdx instructions. The patch uses the T-Head specific decoder and translation.
Co-developed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu> Message-Id: <20230131202013.2541053-11-christoph.muellner@vrull.eu> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
45f9df86 | 31-Jan-2023 |
Christoph Müllner <christoph.muellner@vrull.eu> |
RISC-V: Adding T-Head MemIdx extension
This patch adds support for the T-Head MemIdx instructions. The patch uses the T-Head specific decoder and translation.
Co-developed-by: LIU Zhiwei <zhiwei_li
RISC-V: Adding T-Head MemIdx extension
This patch adds support for the T-Head MemIdx instructions. The patch uses the T-Head specific decoder and translation.
Co-developed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu> Message-Id: <20230131202013.2541053-10-christoph.muellner@vrull.eu> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
af99aa72 | 31-Jan-2023 |
Christoph Müllner <christoph.muellner@vrull.eu> |
RISC-V: Adding T-Head MemPair extension
This patch adds support for the T-Head MemPair instructions. The patch uses the T-Head specific decoder and translation.
Co-developed-by: LIU Zhiwei <zhiwei_
RISC-V: Adding T-Head MemPair extension
This patch adds support for the T-Head MemPair instructions. The patch uses the T-Head specific decoder and translation.
Co-developed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu> Message-Id: <20230131202013.2541053-9-christoph.muellner@vrull.eu> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
b8a5832b | 31-Jan-2023 |
Christoph Müllner <christoph.muellner@vrull.eu> |
RISC-V: Adding T-Head multiply-accumulate instructions
This patch adds support for the T-Head MAC instructions. The patch uses the T-Head specific decoder and translation.
Co-developed-by: LIU Zhiw
RISC-V: Adding T-Head multiply-accumulate instructions
This patch adds support for the T-Head MAC instructions. The patch uses the T-Head specific decoder and translation.
Co-developed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu> Message-Id: <20230131202013.2541053-8-christoph.muellner@vrull.eu> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
32909338 | 31-Jan-2023 |
Christoph Müllner <christoph.muellner@vrull.eu> |
RISC-V: Adding XTheadCondMov ISA extension
This patch adds support for the XTheadCondMov ISA extension. The patch uses the T-Head specific decoder and translation.
Co-developed-by: LIU Zhiwei <zhiw
RISC-V: Adding XTheadCondMov ISA extension
This patch adds support for the XTheadCondMov ISA extension. The patch uses the T-Head specific decoder and translation.
Co-developed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu> Message-Id: <20230131202013.2541053-7-christoph.muellner@vrull.eu> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
fa134585 | 31-Jan-2023 |
Christoph Müllner <christoph.muellner@vrull.eu> |
RISC-V: Adding XTheadBs ISA extension
This patch adds support for the XTheadBs ISA extension. The patch uses the T-Head specific decoder and translation.
Co-developed-by: Philipp Tomsich <philipp.t
RISC-V: Adding XTheadBs ISA extension
This patch adds support for the XTheadBs ISA extension. The patch uses the T-Head specific decoder and translation.
Co-developed-by: Philipp Tomsich <philipp.tomsich@vrull.eu> Co-developed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu> Message-Id: <20230131202013.2541053-6-christoph.muellner@vrull.eu> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
426c0491 | 31-Jan-2023 |
Christoph Müllner <christoph.muellner@vrull.eu> |
RISC-V: Adding XTheadBb ISA extension
This patch adds support for the XTheadBb ISA extension. The patch uses the T-Head specific decoder and translation.
Co-developed-by: Philipp Tomsich <philipp.t
RISC-V: Adding XTheadBb ISA extension
This patch adds support for the XTheadBb ISA extension. The patch uses the T-Head specific decoder and translation.
Co-developed-by: Philipp Tomsich <philipp.tomsich@vrull.eu> Co-developed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu> Message-Id: <20230131202013.2541053-5-christoph.muellner@vrull.eu> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
c9410a68 | 31-Jan-2023 |
Christoph Müllner <christoph.muellner@vrull.eu> |
RISC-V: Adding XTheadBa ISA extension
This patch adds support for the XTheadBa ISA extension. The patch uses the T-Head specific decoder and translation.
Co-developed-by: Philipp Tomsich <philipp.t
RISC-V: Adding XTheadBa ISA extension
This patch adds support for the XTheadBa ISA extension. The patch uses the T-Head specific decoder and translation.
Co-developed-by: Philipp Tomsich <philipp.tomsich@vrull.eu> Co-developed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu> Message-Id: <20230131202013.2541053-4-christoph.muellner@vrull.eu> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
134c3ffa | 31-Jan-2023 |
Christoph Müllner <christoph.muellner@vrull.eu> |
RISC-V: Adding XTheadSync ISA extension
This patch adds support for the XTheadSync ISA extension. The patch uses the T-Head specific decoder and translation.
The implementation introduces a helper
RISC-V: Adding XTheadSync ISA extension
This patch adds support for the XTheadSync ISA extension. The patch uses the T-Head specific decoder and translation.
The implementation introduces a helper to execute synchronization tasks: helper_tlb_flush_all() performs a synchronized TLB flush on all CPUs.
Co-developed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu> Message-Id: <20230131202013.2541053-3-christoph.muellner@vrull.eu> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|
49a7f3aa | 31-Jan-2023 |
Christoph Müllner <christoph.muellner@vrull.eu> |
RISC-V: Adding XTheadCmo ISA extension
This patch adds support for the XTheadCmo ISA extension. To avoid interfering with standard extensions, decoder and translation are in its own xthead* specific
RISC-V: Adding XTheadCmo ISA extension
This patch adds support for the XTheadCmo ISA extension. To avoid interfering with standard extensions, decoder and translation are in its own xthead* specific files. Future patches should be able to easily add additional T-Head extension.
The implementation does not have much functionality (besides accepting the instructions and not qualifying them as illegal instructions if the hart executes in the required privilege level for the instruction), as QEMU does not model CPU caches and instructions are documented to not raise any exceptions.
Co-developed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com> Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20230131202013.2541053-2-christoph.muellner@vrull.eu> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
show more ...
|