adb5974dcc
target/avr: Drop avr_cpu_memory_rw_debug()
...
CPUClass::memory_rw_debug() holds a callback for GDB memory access.
If not provided, cpu_memory_rw_debug() is used by the GDB stub.
Drop avr_cpu_memory_rw_debug() which does nothing special.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <20220322095004.70682-1-bmeng.cn@gmail.com >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2022-06-20 13:11:36 -07:00
ea9cea93c6
Clean up decorations and whitespace around header guards
...
Cleaned up with scripts/clean-header-guards.pl.
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Message-Id: <20220506134911.2856099-5-armbru@redhat.com >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
2022-05-11 16:50:32 +02:00
b36e239e08
target: Use ArchCPU as interface to target CPU
...
ArchCPU is our interface with target-specific code. Use it as
a forward-declared opaque pointer (abstract type), having its
structure defined by each target.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <20220214183144.27402-15-f4bug@amsat.org >
2022-03-06 22:23:09 +01:00
9295b1aa92
target: Introduce and use OBJECT_DECLARE_CPU_TYPE() macro
...
Replace the boilerplate code to declare CPU QOM types
and macros, and forward-declare the CPU instance type.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <20220214183144.27402-14-f4bug@amsat.org >
2022-03-06 22:23:09 +01:00
1ea4a06af0
target: Use CPUArchState as interface to target-specific CPU state
...
While CPUState is our interface with generic code, CPUArchState is
our interface with target-specific code. Use CPUArchState as an
abstract type, defined by each target.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Message-Id: <20220214183144.27402-13-f4bug@amsat.org >
2022-03-06 22:23:09 +01:00
8b1d5b3c35
include/exec: Move cpu_signal_handler declaration
...
There is nothing target specific about this. The implementation
is host specific, but the declaration is 100% common.
Reviewed-By: Warner Losh <imp@bsdimp.com >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Alistair Francis <alistair.francis@wdc.com >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-09-21 19:36:44 -07:00
e64cb6c231
target/avr: Implement gdb_adjust_breakpoint
...
Ensure at registration that all breakpoints are in
code space, not data space.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2021-07-21 07:47:05 -10:00
9d8caa67a2
target/avr: Add support for disassembling via option '-d in_asm'
...
Provide function disassembles executed instruction when '-d in_asm' is
provided.
Example:
$ qemu-system-avr -bios free-rtos/Demo/AVR_ATMega2560_GCC/demo.elf -d in_asm
...
IN:
0x0000014a: CALL 0x3808
IN: main
0x00003808: CALL 0x4b4
IN: vParTestInitialise
0x000004b4: LDI r24, 255
0x000004b6: STS r24, 0
0x000004b8: MULS r16, r20
0x000004ba: OUT $1, r24
0x000004bc: LDS r24, 0
0x000004be: MULS r16, r20
0x000004c0: OUT $2, r24
0x000004c2: RET
...
Suggested-by: Richard Henderson <richard.henderson@linaro.org >
Suggested-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Suggested-by: Aleksandar Markovic <aleksandar.m.mail@gmail.com >
Signed-off-by: Michael Rolnik <mrolnik@gmail.com >
[rth: Fix spacing and const mnemonic arrays]
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Aleksandar Markovic <aleksandar.m.mail@gmail.com >
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Signed-off-by: Thomas Huth <huth@tuxfamily.org >
Message-Id: <20200705140315.260514-19-huth@tuxfamily.org >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2020-07-11 11:02:05 +02:00
25a08409ab
target/avr: Introduce enumeration AVRFeature
...
This patch introduces enumeration "AVRFeature" that will be
used for defining various AVR core types.
[AM: Split a larger AVR introduction patch into logical units]
Suggested-by: Aleksandar Markovic <aleksandar.m.mail@gmail.com >
Co-developed-by: Michael Rolnik <mrolnik@gmail.com >
Co-developed-by: Sarah Harris <S.E.Harris@kent.ac.uk >
Signed-off-by: Michael Rolnik <mrolnik@gmail.com >
Signed-off-by: Sarah Harris <S.E.Harris@kent.ac.uk >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Aleksandar Markovic <aleksandar.m.mail@gmail.com >
Acked-by: Igor Mammedov <imammedo@redhat.com >
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Signed-off-by: Thomas Huth <huth@tuxfamily.org >
Message-Id: <20200705140315.260514-8-huth@tuxfamily.org >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2020-07-10 17:58:32 +02:00
12b3540547
target/avr: CPU class: Add GDB support
...
This includes GDB hooks for reading from wnd wrtiting to AVR
registers, and xml register definition file as well.
[AM: Split a larger AVR introduction patch into logical units]
Suggested-by: Aleksandar Markovic <aleksandar.m.mail@gmail.com >
Co-developed-by: Michael Rolnik <mrolnik@gmail.com >
Co-developed-by: Sarah Harris <S.E.Harris@kent.ac.uk >
Signed-off-by: Michael Rolnik <mrolnik@gmail.com >
Signed-off-by: Sarah Harris <S.E.Harris@kent.ac.uk >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Aleksandar Markovic <aleksandar.m.mail@gmail.com >
Acked-by: Igor Mammedov <imammedo@redhat.com >
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com >
[thuth: Fixed avr_cpu_gdb_read_register() parameter]
Signed-off-by: Thomas Huth <huth@tuxfamily.org >
Message-Id: <20200705140315.260514-7-huth@tuxfamily.org >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2020-07-10 17:58:32 +02:00
3fa28dd6cf
target/avr: CPU class: Add migration support
...
Add migration-related functions of AVR CPU class object.
[AM: Split a larger AVR introduction patch into logical units]
Suggested-by: Aleksandar Markovic <aleksandar.m.mail@gmail.com >
Co-developed-by: Michael Rolnik <mrolnik@gmail.com >
Co-developed-by: Sarah Harris <S.E.Harris@kent.ac.uk >
Signed-off-by: Michael Rolnik <mrolnik@gmail.com >
Signed-off-by: Sarah Harris <S.E.Harris@kent.ac.uk >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Aleksandar Markovic <aleksandar.m.mail@gmail.com >
Acked-by: Igor Mammedov <imammedo@redhat.com >
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Signed-off-by: Thomas Huth <huth@tuxfamily.org >
Message-Id: <20200705140315.260514-6-huth@tuxfamily.org >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2020-07-10 17:58:32 +02:00
f1c671f96c
target/avr: Introduce basic CPU class object
...
This patch introduces AVR CPU class object and its basic elements
and functions.
[AM: Split a larger AVR introduction patch into logical units]
Suggested-by: Aleksandar Markovic <aleksandar.m.mail@gmail.com >
Co-developed-by: Michael Rolnik <mrolnik@gmail.com >
Co-developed-by: Sarah Harris <S.E.Harris@kent.ac.uk >
Signed-off-by: Michael Rolnik <mrolnik@gmail.com >
Signed-off-by: Sarah Harris <S.E.Harris@kent.ac.uk >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Aleksandar Markovic <aleksandar.m.mail@gmail.com >
Acked-by: Igor Mammedov <imammedo@redhat.com >
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com >
[thuth: Adjusted reset and parent_reset handling]
Signed-off-by: Thomas Huth <huth@tuxfamily.org >
Message-Id: <20200705140315.260514-3-huth@tuxfamily.org >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2020-07-10 17:58:32 +02:00
c8c0d267fd
target/avr: Add basic parameters of the new platform
...
This includes definitions of various basic parameters needed
for integration of a new platform into QEMU.
[AM: Split a larger AVR introduction patch into logical units]
Suggested-by: Aleksandar Markovic <aleksandar.m.mail@gmail.com >
Co-developed-by: Michael Rolnik <mrolnik@gmail.com >
Co-developed-by: Sarah Harris <S.E.Harris@kent.ac.uk >
Signed-off-by: Michael Rolnik <mrolnik@gmail.com >
Signed-off-by: Sarah Harris <S.E.Harris@kent.ac.uk >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Aleksandar Markovic <aleksandar.m.mail@gmail.com >
Acked-by: Igor Mammedov <imammedo@redhat.com >
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com >
[thuth: Simplify MAINTAINERS right from the start]
Signed-off-by: Thomas Huth <huth@tuxfamily.org >
Message-Id: <20200705140315.260514-2-huth@tuxfamily.org >
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
2020-07-10 17:58:32 +02:00