[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH rc6 22/30] target/avr: Register AVR support with the rest of QEMU
From: |
Thomas Huth |
Subject: |
[PATCH rc6 22/30] target/avr: Register AVR support with the rest of QEMU |
Date: |
Sun, 5 Jul 2020 16:03:07 +0200 |
From: Michael Rolnik <mrolnik@gmail.com>
Add AVR related definitions into QEMU.
[AM: Remove word 'Atmel' from filenames and all elements of code]
Suggested-by: Aleksandar Markovic <aleksandar.m.mail@gmail.com>
Signed-off-by: Michael Rolnik <mrolnik@gmail.com>
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: Aleksandar Markovic <amarkovic@wavecomp.com>
Signed-off-by: Thomas Huth <huth@tuxfamily.org>
---
arch_init.c | 2 ++
include/disas/dis-asm.h | 19 +++++++++++++++++++
include/sysemu/arch_init.h | 1 +
qapi/machine.json | 2 +-
4 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/arch_init.c b/arch_init.c
index 8afea4748b..7fd5c09b2b 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -90,6 +90,8 @@ int graphic_depth = 32;
#define QEMU_ARCH QEMU_ARCH_UNICORE32
#elif defined(TARGET_XTENSA)
#define QEMU_ARCH QEMU_ARCH_XTENSA
+#elif defined(TARGET_AVR)
+#define QEMU_ARCH QEMU_ARCH_AVR
#endif
const uint32_t arch_type = QEMU_ARCH;
diff --git a/include/disas/dis-asm.h b/include/disas/dis-asm.h
index c5f9fa08ab..9856bf7921 100644
--- a/include/disas/dis-asm.h
+++ b/include/disas/dis-asm.h
@@ -211,6 +211,25 @@ enum bfd_architecture
#define bfd_mach_m32r 0 /* backwards compatibility */
bfd_arch_mn10200, /* Matsushita MN10200 */
bfd_arch_mn10300, /* Matsushita MN10300 */
+ bfd_arch_avr, /* AVR microcontrollers */
+#define bfd_mach_avr1 1
+#define bfd_mach_avr2 2
+#define bfd_mach_avr25 25
+#define bfd_mach_avr3 3
+#define bfd_mach_avr31 31
+#define bfd_mach_avr35 35
+#define bfd_mach_avr4 4
+#define bfd_mach_avr5 5
+#define bfd_mach_avr51 51
+#define bfd_mach_avr6 6
+#define bfd_mach_avrtiny 100
+#define bfd_mach_avrxmega1 101
+#define bfd_mach_avrxmega2 102
+#define bfd_mach_avrxmega3 103
+#define bfd_mach_avrxmega4 104
+#define bfd_mach_avrxmega5 105
+#define bfd_mach_avrxmega6 106
+#define bfd_mach_avrxmega7 107
bfd_arch_cris, /* Axis CRIS */
#define bfd_mach_cris_v0_v10 255
#define bfd_mach_cris_v32 32
diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h
index 71a7a285ee..54f069d491 100644
--- a/include/sysemu/arch_init.h
+++ b/include/sysemu/arch_init.h
@@ -25,6 +25,7 @@ enum {
QEMU_ARCH_HPPA = (1 << 18),
QEMU_ARCH_RISCV = (1 << 19),
QEMU_ARCH_RX = (1 << 20),
+ QEMU_ARCH_AVR = (1 << 21),
QEMU_ARCH_NONE = (1 << 31),
};
diff --git a/qapi/machine.json b/qapi/machine.json
index ff7b5032e3..39b6b6d089 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -25,7 +25,7 @@
# Since: 3.0
##
{ 'enum' : 'SysEmuTarget',
- 'data' : [ 'aarch64', 'alpha', 'arm', 'cris', 'hppa', 'i386', 'lm32',
+ 'data' : [ 'aarch64', 'alpha', 'arm', 'avr', 'cris', 'hppa', 'i386', 'lm32',
'm68k', 'microblaze', 'microblazeel', 'mips', 'mips64',
'mips64el', 'mipsel', 'moxie', 'nios2', 'or1k', 'ppc',
'ppc64', 'riscv32', 'riscv64', 'rx', 's390x', 'sh4',
--
2.26.2
- [PATCH rc6 14/30] target/avr: Add instruction translation - Bit and Bit-test Instructions, (continued)
- [PATCH rc6 14/30] target/avr: Add instruction translation - Bit and Bit-test Instructions, Thomas Huth, 2020/07/05
- [PATCH rc6 17/30] target/avr: Initialize TCG register variables, Thomas Huth, 2020/07/05
- [PATCH rc6 13/30] target/avr: Add instruction translation - Data Transfer Instructions, Thomas Huth, 2020/07/05
- [PATCH rc6 12/30] target/avr: Add instruction translation - Branch Instructions, Thomas Huth, 2020/07/05
- [PATCH rc6 15/30] target/avr: Add instruction translation - MCU Control Instructions, Thomas Huth, 2020/07/05
- [PATCH rc6 16/30] target/avr: Add instruction translation - CPU main translation function, Thomas Huth, 2020/07/05
- [PATCH rc6 18/30] target/avr: Add support for disassembling via option '-d in_asm', Thomas Huth, 2020/07/05
- [PATCH rc6 19/30] hw/char: avr: Add limited support for USART peripheral, Thomas Huth, 2020/07/05
- [PATCH rc6 21/30] hw/misc: avr: Add limited support for power reduction device, Thomas Huth, 2020/07/05
- [PATCH rc6 20/30] hw/timer: avr: Add limited support for 16-bit timer peripheral, Thomas Huth, 2020/07/05
- [PATCH rc6 22/30] target/avr: Register AVR support with the rest of QEMU,
Thomas Huth <=
- [PATCH rc6 26/30] target/avr: Update build system, Thomas Huth, 2020/07/05
- [PATCH rc6 24/30] hw/avr: Add some ATmega microcontrollers, Thomas Huth, 2020/07/05
- [PATCH rc6 28/30] tests/boot-serial: Test some Arduino boards (AVR based), Thomas Huth, 2020/07/05
- [PATCH rc6 27/30] tests/machine-none: Add AVR support, Thomas Huth, 2020/07/05
- [PATCH rc6 23/30] hw/avr: Add support for loading ELF/raw binaries, Thomas Huth, 2020/07/05
- [PATCH rc6 25/30] hw/avr: Add limited support for some Arduino boards, Thomas Huth, 2020/07/05
- [PATCH rc6 29/30] tests/acceptance: Test the Arduino MEGA2560 board, Thomas Huth, 2020/07/05