[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH rc5 28/32] tests/boot-serial: Test some Arduino boards (AVR based
From: |
Aleksandar Markovic |
Subject: |
[PATCH rc5 28/32] tests/boot-serial: Test some Arduino boards (AVR based) |
Date: |
Fri, 7 Feb 2020 02:57:56 +0100 |
From: Michael Rolnik <address@hidden>
Print out 'T' through serial port.
The Arduino Duemilanove is based on a AVR5 CPU, while the
Arduino MEGA2560 on a AVR6 CPU.
Signed-off-by: Michael Rolnik <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
[rth: Squash Arduino adjustments from f4bug]
Tested-by: Richard Henderson <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Signed-off-by: Aleksandar Markovic <address@hidden>
Acked-by: Thomas Huth <address@hidden>
Tested-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
---
tests/qtest/boot-serial-test.c | 11 +++++++++++
tests/qtest/Makefile.include | 2 ++
2 files changed, 13 insertions(+)
diff --git a/tests/qtest/boot-serial-test.c b/tests/qtest/boot-serial-test.c
index 85a3614..bfe7624 100644
--- a/tests/qtest/boot-serial-test.c
+++ b/tests/qtest/boot-serial-test.c
@@ -17,6 +17,15 @@
#include "libqtest.h"
#include "libqos/libqos-spapr.h"
+static const uint8_t bios_avr[] = {
+ 0x88, 0xe0, /* ldi r24, 0x08 */
+ 0x80, 0x93, 0xc1, 0x00, /* sts 0x00C1, r24 ; Enable tx */
+ 0x86, 0xe0, /* ldi r24, 0x06 */
+ 0x80, 0x93, 0xc2, 0x00, /* sts 0x00C2, r24 ; Set the data bits to 8 */
+ 0x84, 0xe5, /* ldi r24, 0x54 */
+ 0x80, 0x93, 0xc6, 0x00, /* sts 0x00C6, r24 ; Output 'T' */
+};
+
static const uint8_t kernel_mcf5208[] = {
0x41, 0xf9, 0xfc, 0x06, 0x00, 0x00, /* lea 0xfc060000,%a0 */
0x10, 0x3c, 0x00, 0x54, /* move.b #'T',%d0 */
@@ -104,6 +113,8 @@ typedef struct testdef {
static testdef_t tests[] = {
{ "alpha", "clipper", "", "PCI:" },
+ { "avr", "arduino-duemilanove", "", "T", sizeof(bios_avr), NULL, bios_avr
},
+ { "avr", "arduino-mega-2560-v3", "", "T", sizeof(bios_avr), NULL,
bios_avr},
{ "ppc", "ppce500", "", "U-Boot" },
{ "ppc", "40p", "-vga none -boot d", "Trying cd:," },
{ "ppc", "g3beige", "", "PowerPC,750" },
diff --git a/tests/qtest/Makefile.include b/tests/qtest/Makefile.include
index eb0f23b..00b3219 100644
--- a/tests/qtest/Makefile.include
+++ b/tests/qtest/Makefile.include
@@ -65,6 +65,8 @@ check-qtest-i386-y += numa-test
check-qtest-x86_64-y += $(check-qtest-i386-y)
+check-qtest-avr-y += boot-serial-test
+
check-qtest-alpha-y += boot-serial-test
check-qtest-alpha-$(CONFIG_VGA) += display-vga-test
--
2.7.4
- Re: [PATCH] !fixup "target/avr: Add defintions of AVR core types", (continued)
[PATCH rc5 18/32] target/avr: Add support for disassembling via option '-d in_asm', Aleksandar Markovic, 2020/02/06
[PATCH rc5 12/32] target/avr: Add instruction translation - Branch Instructions, Aleksandar Markovic, 2020/02/06
[PATCH rc5 17/32] target/avr: Initialize TCG register variables, Aleksandar Markovic, 2020/02/06
[PATCH rc5 30/32] .travis.yml: Run the AVR acceptance tests, Aleksandar Markovic, 2020/02/06
[PATCH rc5 27/32] tests/machine-none: Add AVR support, Aleksandar Markovic, 2020/02/06
[PATCH rc5 23/32] hw/avr: Add support for loading ELF/raw binaries, Aleksandar Markovic, 2020/02/06
[PATCH rc5 25/32] hw/avr: Add limited support for some Arduino boards, Aleksandar Markovic, 2020/02/06
[PATCH rc5 22/32] target/avr: Register AVR support with the rest of QEMU, Aleksandar Markovic, 2020/02/06
[PATCH rc5 28/32] tests/boot-serial: Test some Arduino boards (AVR based),
Aleksandar Markovic <=
[PATCH rc5 32/32] target/avr: Add section into QEMU documentation, Aleksandar Markovic, 2020/02/06
[PATCH rc5 29/32] tests/acceptance: Test the Arduino MEGA2560 board, Aleksandar Markovic, 2020/02/06
[PATCH rc5 10/32] target/avr: Add instruction translation - Register definitions, Aleksandar Markovic, 2020/02/06
[PATCH rc5 31/32] target/avr: Simplify sections in MAINTAINERS file, Aleksandar Markovic, 2020/02/06
[PATCH rc5 09/32] target/avr: Add instruction helpers, Aleksandar Markovic, 2020/02/06
[PATCH rc5 21/32] hw/misc: avr: Add limited support for power reduction device, Aleksandar Markovic, 2020/02/06
[PATCH rc5 11/32] target/avr: Add instruction translation - Arithmetic and Logic Instructions, Aleksandar Markovic, 2020/02/06
[PATCH rc5 26/32] target/avr: Update build system, Aleksandar Markovic, 2020/02/06
[PATCH rc5 19/32] hw/char: avr: Add limited support for USART peripheral, Aleksandar Markovic, 2020/02/06
[PATCH rc5 24/32] hw/avr: Add some ATmega microcontrollers, Aleksandar Markovic, 2020/02/06