Richard Henderson
fafe0021e3
target/*: Add missing includes of tcg/debug-assert.h
...
This had been pulled in from tcg/tcg.h, via exec/cpu_ldst.h,
via exec/exec-all.h, but the include of tcg.h will be removed.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2023-06-05 12:04:28 -07:00
Anton Johansson
8023d1abcd
target/rx: Replace tb_pc()
with tb->pc
...
Signed-off-by: Anton Johansson <anjo@rev.ng >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Message-Id: <20230227135202.9710-17-anjo@rev.ng >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2023-03-01 07:33:11 -10:00
Peter Maydell
88c41e4082
target/rx: Convert to 3-phase reset
...
Convert the rx CPU class to use 3-phase reset, so it doesn't
need to use device_class_set_parent_reset() any more.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Reviewed-by: Cédric Le Goater <clg@kaod.org >
Reviewed-by: Edgar E. Iglesias <edgar@zeroasic.com >
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com >
Reviewed-by: Greg Kurz <groug@kaod.org >
Message-id: 20221124115023.2437291-16-peter.maydell@linaro.org
2022-12-16 15:58:16 +00:00
Richard Henderson
5439d7a68c
target/rx: Convert to tcg_ops restore_state_to_opc
...
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2022-10-26 11:11:28 +10:00
Richard Henderson
fbf59aad17
accel/tcg: Introduce tb_pc and log_pc
...
The availability of tb->pc will shortly be conditional.
Introduce accessor functions to minimize ifdefs.
Pass around a known pc to places like tcg_gen_code,
where the caller must already have the value.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2022-10-04 12:13:12 -07:00
Richard Henderson
e4fdf9df5b
hw/core: Add CPUClass.get_pc
...
Populate this new method for all targets. Always match
the result that would be given by cpu_get_tb_cpu_state,
as we will want these values to correspond in the logs.
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk > (target/sparc)
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
---
Cc: Eduardo Habkost <eduardo@habkost.net > (supporter:Machine core)
Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com > (supporter:Machine core)
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org > (reviewer:Machine core)
Cc: Yanan Wang <wangyanan55@huawei.com > (reviewer:Machine core)
Cc: Michael Rolnik <mrolnik@gmail.com > (maintainer:AVR TCG CPUs)
Cc: "Edgar E. Iglesias" <edgar.iglesias@gmail.com > (maintainer:CRIS TCG CPUs)
Cc: Taylor Simpson <tsimpson@quicinc.com > (supporter:Hexagon TCG CPUs)
Cc: Song Gao <gaosong@loongson.cn > (maintainer:LoongArch TCG CPUs)
Cc: Xiaojuan Yang <yangxiaojuan@loongson.cn > (maintainer:LoongArch TCG CPUs)
Cc: Laurent Vivier <laurent@vivier.eu > (maintainer:M68K TCG CPUs)
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com > (reviewer:MIPS TCG CPUs)
Cc: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com > (reviewer:MIPS TCG CPUs)
Cc: Chris Wulff <crwulff@gmail.com > (maintainer:NiosII TCG CPUs)
Cc: Marek Vasut <marex@denx.de > (maintainer:NiosII TCG CPUs)
Cc: Stafford Horne <shorne@gmail.com > (odd fixer:OpenRISC TCG CPUs)
Cc: Yoshinori Sato <ysato@users.sourceforge.jp > (reviewer:RENESAS RX CPUs)
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk > (maintainer:SPARC TCG CPUs)
Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de > (maintainer:TriCore TCG CPUs)
Cc: Max Filippov <jcmvbkbc@gmail.com > (maintainer:Xtensa TCG CPUs)
Cc: qemu-arm@nongnu.org (open list:ARM TCG CPUs)
Cc: qemu-ppc@nongnu.org (open list:PowerPC TCG CPUs)
Cc: qemu-riscv@nongnu.org (open list:RISC-V TCG CPUs)
Cc: qemu-s390x@nongnu.org (open list:S390 TCG CPUs)
2022-10-04 12:13:12 -07:00
Marc-André Lureau
0f9668e0c1
Remove qemu-common.h include from most units
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
Message-Id: <20220323155743.1585078-33-marcandre.lureau@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2022-04-06 14:31:55 +02:00
Philippe Mathieu-Daudé
65c575b61e
target/rx: Restrict cpu_exec_interrupt() handler to sysemu
...
Restrict cpu_exec_interrupt() and its callees to sysemu.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Warner Losh <imp@bsdimp.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20210911165434.531552-22-f4bug@amsat.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-09-14 12:00:21 -07:00
Richard Henderson
119065574d
hw/core: Constify TCGCPUOps
...
We no longer have any runtime modifications to this struct,
so declare them all const.
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-ID: <20210227232519.222663-3-richard.henderson@linaro.org >
2021-05-26 15:33:59 -07:00
Philippe Mathieu-Daudé
08928c6d0d
cpu: Move CPUClass::get_phys_page_debug to SysemuCPUOps
...
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20210517105140.1062037-21-f4bug@amsat.org >
[rth: Drop declaration movement from target/*/cpu.h]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-05-26 15:33:59 -07:00
Philippe Mathieu-Daudé
8b80bd28a5
cpu: Introduce SysemuCPUOps structure
...
Introduce a structure to hold handler specific to sysemu.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20210517105140.1062037-15-f4bug@amsat.org >
[rth: Squash "restrict hw/core/sysemu-cpu-ops.h" patch]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-05-26 15:33:59 -07:00
Claudio Fontana
7827168471
cpu: tcg_ops: move to tcg-cpu-ops.h, keep a pointer in CPUClass
...
we cannot in principle make the TCG Operations field definitions
conditional on CONFIG_TCG in code that is included by both common_ss
and specific_ss modules.
Therefore, what we can do safely to restrict the TCG fields to TCG-only
builds, is to move all tcg cpu operations into a separate header file,
which is only included by TCG, target-specific code.
This leaves just a NULL pointer in the cpu.h for the non-TCG builds.
This also tidies up the code in all targets a bit, having all TCG cpu
operations neatly contained by a dedicated data struct.
Signed-off-by: Claudio Fontana <cfontana@suse.de >
Message-Id: <20210204163931.7358-16-cfontana@suse.de >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-02-05 10:24:15 -10:00
Claudio Fontana
0545608056
cpu: move cc->do_interrupt to tcg_ops
...
Signed-off-by: Claudio Fontana <cfontana@suse.de >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20210204163931.7358-10-cfontana@suse.de >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-02-05 10:24:14 -10:00
Eduardo Habkost
e124536f37
cpu: Move tlb_fill to tcg_ops
...
[claudio: wrapped target code in CONFIG_TCG]
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Signed-off-by: Claudio Fontana <cfontana@suse.de >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20210204163931.7358-7-cfontana@suse.de >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-02-05 10:24:14 -10:00
Eduardo Habkost
48c1a3e303
cpu: Move cpu_exec_* to tcg_ops
...
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
[claudio: wrapped target code in CONFIG_TCG]
Signed-off-by: Claudio Fontana <cfontana@suse.de >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20210204163931.7358-6-cfontana@suse.de >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-02-05 10:24:14 -10:00
Eduardo Habkost
ec62595bab
cpu: Move synchronize_from_tb() to tcg_ops
...
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
[claudio: wrapped target code in CONFIG_TCG, reworded comments]
Signed-off-by: Claudio Fontana <cfontana@suse.de >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Message-Id: <20210204163931.7358-5-cfontana@suse.de >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-02-05 10:24:14 -10:00
Eduardo Habkost
e9e51b7154
cpu: Introduce TCGCpuOperations struct
...
The TCG-specific CPU methods will be moved to a separate struct,
to make it easier to move accel-specific code outside generic CPU
code in the future. Start by moving tcg_initialize().
The new CPUClass.tcg_opts field may eventually become a pointer,
but keep it an embedded struct for now, to make code conversion
easier.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
[claudio: move TCGCpuOperations inside include/hw/core/cpu.h]
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Message-Id: <20210204163931.7358-2-cfontana@suse.de >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-02-05 10:24:14 -10:00
Richard Henderson
04a37d4ca4
tcg: Make tb arg to synchronize_from_tb const
...
There is nothing within the translators that ought to be
changing the TranslationBlock data, so make it const.
This does not actually use the read-only copy of the
data structure that exists within the rx region.
Reviewed-by: Joelle van Dyne <j@getutm.app >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-01-07 05:09:41 -10:00
Eduardo Habkost
38688fdbe9
rx: Rename QOM type check macros
...
Currently we have a RXCPU typedef and a RXCPU type checking
macro, but OBJECT_DECLARE* would transform the RXCPU macro into a
function, and the function name would conflict with the typedef
name.
Rename the RXCPU* QOM type check macros to RX_CPU*, so we will
avoid the conflict and make the macro names consistent with the
TYPE_RX_CPU constant name.
This will make future conversion to OBJECT_DECLARE* easier.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20200825192110.3528606-53-ehabkost@redhat.com >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com >
2020-09-02 07:29:25 -04:00
Yoshinori Sato
27a4a30e29
target/rx: CPU definitions
...
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
[PMD: Use newer QOM style, split cpu-qom.h, restrict access to
extable array, use rx_cpu_tlb_fill() extracted from patch of
Yoshinori Sato 'Convert to CPUClass::tlb_fill', call cpu_reset
after qemu_init_vcpu, make rx_crname a function]
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Acked-by: Igor Mammedov <imammedo@redhat.com >
Message-Id: <20200224141923.82118-7-ysato@users.sourceforge.jp >
Acked-by: Richard Henderson <richard.henderson@linaro.org >
[PMD: Use GByteArray in gdbstub (rebase commit a010bdbe
),
use device_class_set_parent_reset (rebase commit 781c67ca
)]
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2020-03-19 17:58:05 +01:00