2020-08-07 12:10:23 +02:00
|
|
|
# FIXME extra_args should accept files()
|
2021-04-24 05:34:25 +02:00
|
|
|
gen = [
|
|
|
|
decodetree.process('insn16.decode', extra_args: ['--static-decode=decode_insn16', '--insnwidth=16']),
|
2021-04-24 05:34:12 +02:00
|
|
|
decodetree.process('insn32.decode', extra_args: '--static-decode=decode_insn32'),
|
2023-01-31 21:20:00 +01:00
|
|
|
decodetree.process('xthead.decode', extra_args: '--static-decode=decode_xthead'),
|
2022-02-02 01:52:48 +01:00
|
|
|
decodetree.process('XVentanaCondOps.decode', extra_args: '--static-decode=decode_XVentanaCodeOps'),
|
2020-08-07 12:10:23 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
riscv_ss = ss.source_set()
|
2021-04-24 05:34:25 +02:00
|
|
|
riscv_ss.add(gen)
|
2020-08-07 12:10:23 +02:00
|
|
|
riscv_ss.add(files(
|
|
|
|
'cpu.c',
|
|
|
|
'cpu_helper.c',
|
|
|
|
'csr.c',
|
|
|
|
'fpu_helper.c',
|
|
|
|
'gdbstub.c',
|
|
|
|
'op_helper.c',
|
|
|
|
'vector_helper.c',
|
2023-07-11 18:59:00 +02:00
|
|
|
'vector_internals.c',
|
2021-05-05 18:06:13 +02:00
|
|
|
'bitmanip_helper.c',
|
2020-08-07 12:10:23 +02:00
|
|
|
'translate.c',
|
2022-04-23 04:35:02 +02:00
|
|
|
'm128_helper.c',
|
2023-03-07 09:14:00 +01:00
|
|
|
'crypto_helper.c',
|
2023-07-11 18:59:03 +02:00
|
|
|
'zce_helper.c',
|
|
|
|
'vcrypto_helper.c'
|
2020-08-07 12:10:23 +02:00
|
|
|
))
|
|
|
|
|
2023-06-13 15:33:47 +02:00
|
|
|
riscv_system_ss = ss.source_set()
|
|
|
|
riscv_system_ss.add(files(
|
2021-02-01 13:44:58 +01:00
|
|
|
'arch_dump.c',
|
2020-08-07 12:10:23 +02:00
|
|
|
'pmp.c',
|
2022-03-15 07:55:23 +01:00
|
|
|
'debug.c',
|
2020-10-26 12:55:26 +01:00
|
|
|
'monitor.c',
|
2022-06-21 01:15:57 +02:00
|
|
|
'machine.c',
|
2022-08-25 00:13:56 +02:00
|
|
|
'pmu.c',
|
target/riscv: add query-cpy-definitions support
This command is used by tooling like libvirt to retrieve a list of
supported CPUs. Each entry returns a CpuDefinitionInfo object that
contains more information about each CPU.
This initial support includes only the name of the CPU and its typename.
Here's what the command produces for the riscv64 target:
$ ./build/qemu-system-riscv64 -S -M virt -display none -qmp stdio
{"QMP": {"version": (...)}
{"execute": "qmp_capabilities", "arguments": {"enable": ["oob"]}}
{"return": {}}
{"execute": "query-cpu-definitions"}
{"return": [
{"name": "rv64", "typename": "rv64-riscv-cpu", "static": false, "deprecated": false},
{"name": "sifive-e51", "typename": "sifive-e51-riscv-cpu", "static": false, "deprecated": false},
{"name": "any", "typename": "any-riscv-cpu", "static": false, "deprecated": false},
{"name": "x-rv128", "typename": "x-rv128-riscv-cpu", "static": false, "deprecated": false},
{"name": "shakti-c", "typename": "shakti-c-riscv-cpu", "static": false, "deprecated": false},
{"name": "thead-c906", "typename": "thead-c906-riscv-cpu", "static": false, "deprecated": false},
{"name": "sifive-u54", "typename": "sifive-u54-riscv-cpu", "static": false, "deprecated": false}]
}
Next patch will introduce a way to tell whether a given CPU is static or
not.
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20230411183511.189632-3-dbarboza@ventanamicro.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2023-04-11 20:35:10 +02:00
|
|
|
'time_helper.c',
|
|
|
|
'riscv-qmp-cmds.c',
|
2020-08-07 12:10:23 +02:00
|
|
|
))
|
|
|
|
|
2023-09-25 19:56:51 +02:00
|
|
|
subdir('tcg')
|
2023-09-25 19:57:02 +02:00
|
|
|
subdir('kvm')
|
2023-09-25 19:56:51 +02:00
|
|
|
|
2020-08-07 12:10:23 +02:00
|
|
|
target_arch += {'riscv': riscv_ss}
|
2023-10-04 11:06:27 +02:00
|
|
|
target_system_arch += {'riscv': riscv_system_ss}
|