From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: thuth@redhat.com, me@xcancerberox.com.ar, S.E.Harris@kent.ac.uk,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
dovgaluk@ispras.ru, imammedo@redhat.com, mrolnik@gmail.com,
"Philippe Mathieu-Daudé" <philmd@redhat.com>,
aleksandar.m.mail@gmail.com
Subject: [PATCH rc1 22/24] tests/boot-serial-test: Test some Arduino boards (AVR based)
Date: Wed, 22 Jan 2020 14:03:05 -1000 [thread overview]
Message-ID: <20200123000307.11541-23-richard.henderson@linaro.org> (raw)
In-Reply-To: <20200123000307.11541-1-richard.henderson@linaro.org>
From: Michael Rolnik <mrolnik@gmail.com>
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 <mrolnik@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
[rth: Squash Arduino adjustments from f4bug]
Tested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
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 05c7f44457..07067b76a2 100644
--- a/tests/qtest/boot-serial-test.c
+++ b/tests/qtest/boot-serial-test.c
@@ -16,6 +16,15 @@
#include "qemu/osdep.h"
#include "libqtest.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 */
@@ -103,6 +112,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 e6bb4ab28c..4817b6320f 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.20.1
next prev parent reply other threads:[~2020-01-23 0:27 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-23 0:02 [PATCH rc1 00/24] target/avr merger Richard Henderson
2020-01-23 0:02 ` [PATCH rc1 01/24] target/avr: Add outward facing interfaces and core CPU logic Richard Henderson
2020-01-23 0:02 ` [PATCH rc1 02/24] target/avr: Add instruction helpers Richard Henderson
2020-01-23 0:02 ` [PATCH rc1 03/24] target/avr: Add instruction translation - Registers definition Richard Henderson
2020-01-23 0:02 ` [PATCH rc1 04/24] target/avr: Add instruction translation - Arithmetic and Logic Instructions Richard Henderson
2020-01-23 0:02 ` [PATCH rc1 05/24] target/avr: Add instruction translation - Branch Instructions Richard Henderson
2020-01-23 0:02 ` [PATCH rc1 06/24] target/avr: Add instruction translation - Data Transfer Instructions Richard Henderson
2020-01-23 0:02 ` [PATCH rc1 07/24] target/avr: Add instruction translation - Bit and Bit-test Instructions Richard Henderson
2020-01-23 0:02 ` [PATCH rc1 08/24] target/avr: Add instruction translation - MCU Control Instructions Richard Henderson
2020-01-23 0:02 ` [PATCH rc1 09/24] target/avr: Add instruction translation - CPU main translation function Richard Henderson
2020-01-23 0:02 ` [PATCH rc1 10/24] target/avr: Add instruction disassembly function Richard Henderson
2020-01-23 0:02 ` [PATCH rc1 11/24] hw/char: Add limited support for Atmel USART peripheral Richard Henderson
2020-01-23 0:02 ` [PATCH rc1 12/24] hw/timer: Add limited support for Atmel 16 bit timer peripheral Richard Henderson
2020-01-23 4:49 ` Thomas Huth
2020-01-23 17:29 ` Philippe Mathieu-Daudé
2020-01-23 0:02 ` [PATCH rc1 13/24] hw/misc: Add Atmel power device Richard Henderson
2020-01-23 0:02 ` [PATCH rc1 14/24] target/avr: Add section about AVR into QEMU documentation Richard Henderson
2020-01-23 4:56 ` Thomas Huth
2020-01-24 0:33 ` Philippe Mathieu-Daudé
2020-01-23 0:02 ` [PATCH rc1 15/24] target/avr: Register AVR support with the rest of QEMU Richard Henderson
2020-01-23 0:02 ` [PATCH rc1 16/24] target/avr: Add machine none test Richard Henderson
2020-01-23 5:02 ` Thomas Huth
2020-01-23 0:03 ` [PATCH rc1 17/24] target/avr: Update MAINTAINERS file Richard Henderson
2020-01-23 0:03 ` [PATCH rc1 18/24] hw/avr: Introduce ATMEL_ATMEGA_MCU config Richard Henderson
2020-01-23 5:04 ` Thomas Huth
2020-01-23 17:27 ` Philippe Mathieu-Daudé
2020-01-23 0:03 ` [PATCH rc1 19/24] hw/avr: Add some ATmega microcontrollers Richard Henderson
2020-01-23 23:40 ` Philippe Mathieu-Daudé
2020-01-23 0:03 ` [PATCH rc1 20/24] hw/avr: Add some Arduino boards Richard Henderson
2020-01-23 0:03 ` [PATCH rc1 21/24] target/avr: Update build system Richard Henderson
2020-01-23 0:03 ` Richard Henderson [this message]
2020-01-23 0:03 ` [PATCH rc1 23/24] tests/acceptance: Test the Arduino MEGA2560 board Richard Henderson
2020-01-23 0:03 ` [PATCH rc1 24/24] .travis.yml: Run the AVR acceptance tests Richard Henderson
2020-01-23 5:12 ` [PATCH rc1 00/24] target/avr merger Thomas Huth
2020-01-23 11:56 ` Michael Rolnik
2020-01-23 17:36 ` Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200123000307.11541-23-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=S.E.Harris@kent.ac.uk \
--cc=aleksandar.m.mail@gmail.com \
--cc=dovgaluk@ispras.ru \
--cc=f4bug@amsat.org \
--cc=imammedo@redhat.com \
--cc=me@xcancerberox.com.ar \
--cc=mrolnik@gmail.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).