From patchwork Tue Jul 7 18:17:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1324600 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Iy5sJM2K; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4B1WKM5r2Zz9sRK for ; Wed, 8 Jul 2020 04:33:26 +1000 (AEST) Received: from localhost ([::1]:41116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jssPC-0006yw-Cf for incoming@patchwork.ozlabs.org; Tue, 07 Jul 2020 14:33:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35794) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jssAK-0000FA-KY for qemu-devel@nongnu.org; Tue, 07 Jul 2020 14:18:01 -0400 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:39928) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jssAI-0002xQ-8U for qemu-devel@nongnu.org; Tue, 07 Jul 2020 14:17:59 -0400 Received: by mail-wr1-x42e.google.com with SMTP id q5so46208541wru.6 for ; Tue, 07 Jul 2020 11:17:57 -0700 (PDT) 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=gqKTEnLB2iuxK7jGK7ZUL1Ecj0AJQZnfl86LWY8+k7U=; b=Iy5sJM2K90j0vyDR35kRJnyd2WzynU1QMOOFXXP4GHH0p3/36SpK29BXgo9bkw5B1E 7yDMDyZa+N3HkvdQ/FhvJbKMWk7zpFlpp1QvHuLL+y50UkrriXTw44vSMIyk/jdknI6f xjIRX/S8zki11dn95m06L2kJ/YoB7UXjXCVL7gLn/Gem+zxsPsWTmvyz2DMI52fTjtje xx++z1dzGlDUPy6pVFCZYloxx0PZJemEHcb2c95Q5YrAd1R+2hvtoN3cRYSFTEjTlJWs BPRFQx0IV8Ca2KqNlEr1/WxqK4Zsx1ISdFz/mVvqbbthEXCQiB+eWmMp/FCaHUGkh0jz s9Uw== 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=gqKTEnLB2iuxK7jGK7ZUL1Ecj0AJQZnfl86LWY8+k7U=; b=axUuRukiVpQjkU9iiLImCJgjbgabAuREsGTJc9sSmnZKNbGYAC0PJZ5acrCilvpang UckmD5m1hygmknamQo11XKNB83UrkubZ9U3Pr04M8hSYwgiGXL2Wf1C0j2JCE3CrCqV+ jijFckRD8mC1tG+fQaaa/kyAIhyrRsNS5KzAas3FKHHWYNga6Ty5vP/uFJRT9U51W92d LlPnxPbqBo4B25FvKBBCog7Xe4278PzMwCV23Yngvotg4nG3cccr8Vu28ARtTfzxFVxi SgYorKQIiJEuLSZC/Yrsb25qqzLaYMtXp8xofbNpGwfur01J8VvvqOmsZsx0p+K8K2Yw r75Q== X-Gm-Message-State: AOAM532U2rx2rdJTmKEUAJIMwX7uGitiTXo7R+9VVOWjd/xQnMu2GtWP V9qXeDEum65rMKVVtT4Y+aPvkb8F X-Google-Smtp-Source: ABdhPJzE7PljyI4A8dcxcIQ6/f72Slds82YJHzyAseJ9WHm1pZMQdm0vzH7nvcz4schr4p/sFT+odA== X-Received: by 2002:a5d:4710:: with SMTP id y16mr56973951wrq.189.1594145876077; Tue, 07 Jul 2020 11:17:56 -0700 (PDT) Received: from localhost.localdomain (138.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.138]) by smtp.gmail.com with ESMTPSA id 65sm2253337wma.48.2020.07.07.11.17.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 11:17:55 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 27/32] tests/boot-serial: Test some Arduino boards (AVR based) Date: Tue, 7 Jul 2020 20:17:05 +0200 Message-Id: <20200707181710.30950-28-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200707181710.30950-1-f4bug@amsat.org> References: <20200707181710.30950-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42e.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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 , Sarah Harris , Eduardo Habkost , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Cleber Rosa , Richard Henderson , Markus Armbruster , Wainer dos Santos Moschetta , Thomas Huth , =?utf-8?q?Alex_Benn=C3=A9e?= , Michael Rolnik , Paolo Bonzini , Pavel Dovgalyuk , =?utf-8?q?Marc-Andr=C3=A9_Lurea?= =?utf-8?q?u?= , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Aleksandar Markovic , Richard Henderson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 Signed-off-by: Philippe Mathieu-Daudé [rth: Squash Arduino adjustments from f4bug] Tested-by: Richard Henderson Signed-off-by: Richard Henderson Signed-off-by: Aleksandar Markovic Acked-by: Thomas Huth Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth Message-Id: <20200705140315.260514-29-huth@tuxfamily.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 85a3614286..bfe7624dc6 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 98af2c2d93..994ac47399 100644 --- a/tests/qtest/Makefile.include +++ b/tests/qtest/Makefile.include @@ -66,6 +66,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