Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1iunDC-00033N-Hj for mharc-qemu-riscv@gnu.org; Thu, 23 Jan 2020 19:52:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44688) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iunD6-0002xJ-85 for qemu-riscv@nongnu.org; Thu, 23 Jan 2020 19:52:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iunD5-0005yI-52 for qemu-riscv@nongnu.org; Thu, 23 Jan 2020 19:52:32 -0500 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:38492) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iunD2-0005qB-IS; Thu, 23 Jan 2020 19:52:28 -0500 Received: by mail-wr1-x443.google.com with SMTP id y17so74859wrh.5; Thu, 23 Jan 2020 16:52:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OnpC27SyHpc9dVU+hh1ArBidC5H9rjuvClffq7/FDC8=; b=hwvwCLxk2IP66snNmc+W/Xk5+sQCQyEf+KpPefyG2m0hkWVCe4An8F+juz+kSSRCKm VX+HFRl4TdTcyHTkgjzMdaPb1h5tKejL35kSET1kMCvqAJY8H4qEgkGl8lkcltyZaWlD UduG5OkIgbNj1ydO/WTRK2G3l23PEKYSj7qa+vErDfN3wfP8k7WZ5cVa0czSkvsjDGy/ 4dQL4kzoTGKtf6HJ8yEStaiHtmLnV3tA9/rtWmyasb1rq9ADybAfSsfpRlTfySFoAu4t NtPJPaph4NRyWLWnRCW+17ClmWH5ZHKZU8czejHDjGeIaPOiJ/jvL3XM47pLaW8SWPeq NS1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=OnpC27SyHpc9dVU+hh1ArBidC5H9rjuvClffq7/FDC8=; b=hojdhJPrqnlI2zQjEwqXbgWGfd4g+sLmHcbrArBNN2aiyfOEbwBeNi5DMtRwhpPjYf AtaU9A1InF8jAZRWKqoa1v0Raqnn2dciCaE4W7+yao3kQiUWAU1+WUS4p6ZPr1YctyVi fLiC028QrSMCSBSLwTYYgonXVvr4CbOxl4RBeA8UFNsClMA58V9OmqXeF4TEg6q1iKZV /xe4hARYj/OCiVsJbR71cGLjlNcjXvdg+Nle3yvztjKbwh78uhi762jlX7S1aMVq0T60 zQABlSWd9ChqnfKNJs3Ldrj5kteZipA7qrvQDlc2A4rDsS13zZo40V6UXzIwKu7c8CFL p9HQ== X-Gm-Message-State: APjAAAW79EcItGL/HoWeXDkNy8XkbVsZrVyUzvkLZ+nUWf+FBf31GSBo z3FswfnVfwmAHtDDUDGFmSaHiZB0 X-Google-Smtp-Source: APXvYqwUmlBoRNZatAROoWt4+wpBIH2e4uoi6vIhNhlhPIOE1C/fSwCvjq91zXCz2c06wD+M45um2Q== X-Received: by 2002:a5d:4e0a:: with SMTP id p10mr883164wrt.229.1579827147338; Thu, 23 Jan 2020 16:52:27 -0800 (PST) Received: from x1w.redhat.com (113.red-83-57-172.dynamicip.rima-tde.net. [83.57.172.113]) by smtp.gmail.com with ESMTPSA id s139sm4598271wme.35.2020.01.23.16.52.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jan 2020 16:52:26 -0800 (PST) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, mrolnik@gmail.com, richard.henderson@linaro.org, me@xcancerberox.com.ar Cc: Alistair Francis , Paolo Bonzini , S.E.Harris@kent.ac.uk, thuth@redhat.com, qemu-riscv@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bastian Koppelmann , imammedo@redhat.com, Markus Armbruster , Laurent Vivier , Fam Zheng , Marcel Apfelbaum , Eric Blake , Sagar Karandikar , aleksandar.m.mail@gmail.com, =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , dovgaluk@ispras.ru, Eduardo Habkost , Palmer Dabbelt , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH rc2 23/25] tests/boot-serial-test: Test some Arduino boards (AVR based) Date: Fri, 24 Jan 2020 01:51:29 +0100 Message-Id: <20200124005131.16276-24-f4bug@amsat.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200124005131.16276-1-f4bug@amsat.org> References: <20200124005131.16276-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 X-BeenThere: qemu-riscv@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jan 2020 00:52:36 -0000 From: Michael Rolnik 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 Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Acked-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé [rth: Squash Arduino adjustments from f4bug] Tested-by: Richard Henderson Signed-off-by: Richard Henderson --- 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.21.1