From nobody Thu Nov 13 12:14:16 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1579827738; cv=none; d=zohomail.com; s=zohoarc; b=niP82StDNqVNVoEIgvwqvYRt9+8gAUmX0qr0ub8cFBmKzNJ/2BwRAZ2ORKTRAhz6wcNmmgzs83jPgHKWWw9ix5Po9+667sFjlkxkF8i/Mms3C9011u+XbBzOuHsKD1eZFcCHseOiSd+weZ5go1Iu2SklLq7zb+5B3MC3GBkk6po= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579827738; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OnpC27SyHpc9dVU+hh1ArBidC5H9rjuvClffq7/FDC8=; b=m1RpLNc1kLj+59gCB0ROy0SlCW++WXZdeSpweAGG3AtB2LP4n7VSnssfJb41VuNlm0LcPSCzV/OEumu72rppuDBKAWyvDd6/gnTwzUwtC4Af0Z1ax7d6oqj6YPcszwWtw03vzoFR0Xx+5yi1sc89hrnBzKknPhNjskNnvC+EGJ4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1579827738353927.2352426157493; Thu, 23 Jan 2020 17:02:18 -0800 (PST) Received: from localhost ([::1]:36176 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iunMX-0005ao-9n for importer@patchew.org; Thu, 23 Jan 2020 20:02:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44645) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iunD3-0002s9-Ua for qemu-devel@nongnu.org; Thu, 23 Jan 2020 19:52:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iunD2-0005s5-Oq for qemu-devel@nongnu.org; Thu, 23 Jan 2020 19:52:29 -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) 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) 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) 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 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: quoted-printable 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-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Fam Zheng , S.E.Harris@kent.ac.uk, qemu-riscv@nongnu.org, Eduardo Habkost , Sagar Karandikar , dovgaluk@ispras.ru, Bastian Koppelmann , thuth@redhat.com, Markus Armbruster , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Alistair Francis , imammedo@redhat.com, Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Palmer Dabbelt , aleksandar.m.mail@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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=C3=A9 Tested-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daud=C3=A9 [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" =20 +static const uint8_t bios_avr[] =3D { + 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[] =3D { 0x41, 0xf9, 0xfc, 0x06, 0x00, 0x00, /* lea 0xfc060000,%a0 */ 0x10, 0x3c, 0x00, 0x54, /* move.b #'T',%d0 */ @@ -103,6 +112,8 @@ typedef struct testdef { =20 static testdef_t tests[] =3D { { "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 +=3D numa-test =20 check-qtest-x86_64-y +=3D $(check-qtest-i386-y) =20 +check-qtest-avr-y +=3D boot-serial-test + check-qtest-alpha-y +=3D boot-serial-test check-qtest-alpha-$(CONFIG_VGA) +=3D display-vga-test =20 --=20 2.21.1