From patchwork Thu Feb 1 17:28:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Huang X-Patchwork-Id: 10195737 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 304B160247 for ; Thu, 1 Feb 2018 17:33:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20C1C23201 for ; Thu, 1 Feb 2018 17:33:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1575C28B88; Thu, 1 Feb 2018 17:33:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7F71023201 for ; Thu, 1 Feb 2018 17:33:24 +0000 (UTC) Received: from localhost ([::1]:49896 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehIjj-0007WL-NX for patchwork-qemu-devel@patchwork.kernel.org; Thu, 01 Feb 2018 12:33:23 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38643) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehIgA-0003az-Ce for qemu-devel@nongnu.org; Thu, 01 Feb 2018 12:29:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehIg9-0005ks-7z for qemu-devel@nongnu.org; Thu, 01 Feb 2018 12:29:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39628) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ehIg3-0005eF-0o; Thu, 01 Feb 2018 12:29:35 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 47F9CA3296; Thu, 1 Feb 2018 17:29:34 +0000 (UTC) Received: from amd-seattle-09.khw.lab.eng.bos.redhat.com (amd-seattle-09.khw.lab.eng.bos.redhat.com [10.16.184.112]) by smtp.corp.redhat.com (Postfix) with ESMTP id D452E891DC; Thu, 1 Feb 2018 17:28:44 +0000 (UTC) From: Wei Huang To: qemu-devel@nongnu.org Date: Thu, 1 Feb 2018 12:28:09 -0500 Message-Id: <1517506091-10396-2-git-send-email-wei@redhat.com> In-Reply-To: <1517506091-10396-1-git-send-email-wei@redhat.com> References: <1517506091-10396-1-git-send-email-wei@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 01 Feb 2018 17:29:34 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 2/4] tests/boot-serial-test: Add support for the aarch64 virt machine X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: wei@redhat.com, peter.maydell@linaro.org, drjones@redhat.com, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch adds a small binary kernel to test aarch64 virt machine's UART. Signed-off-by: Wei Huang Acked-by: Thomas Huth --- tests/Makefile.include | 1 + tests/boot-serial-test.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/tests/Makefile.include b/tests/Makefile.include index ca82e0c..ebdb151 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -367,6 +367,7 @@ gcov-files-arm-y += hw/timer/arm_mptimer.c check-qtest-arm-y += tests/boot-serial-test$(EXESUF) check-qtest-aarch64-y = tests/numa-test$(EXESUF) +check-qtest-aarch64-y += tests/boot-serial-test$(EXESUF) check-qtest-microblazeel-y = $(check-qtest-microblaze-y) diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c index 418c5b9..66f7a84 100644 --- a/tests/boot-serial-test.c +++ b/tests/boot-serial-test.c @@ -55,6 +55,13 @@ static const uint8_t bios_raspi2[] = { 0x00, 0x10, 0x20, 0x3f, /* 0x3f201000 = UART0 base addr */ }; +static const uint8_t kernel_aarch64[] = { + 0x81, 0x0a, 0x80, 0x52, /* mov w1, #0x54 */ + 0x02, 0x20, 0xa1, 0xd2, /* mov x2, #0x9000000 */ + 0x41, 0x00, 0x00, 0x39, /* strb w1, [x2] */ + 0xfd, 0xff, 0xff, 0x17, /* b -12 (loop) */ +}; + typedef struct testdef { const char *arch; /* Target architecture */ const char *machine; /* Name of the machine */ @@ -87,6 +94,8 @@ static testdef_t tests[] = { sizeof(kernel_plml605), kernel_plml605 }, { "moxie", "moxiesim", "", "TT", sizeof(bios_moxiesim), 0, bios_moxiesim }, { "arm", "raspi2", "", "TT", sizeof(bios_raspi2), 0, bios_raspi2 }, + { "aarch64", "virt", "-cpu cortex-a57", "TT", sizeof(kernel_aarch64), + kernel_aarch64 }, { NULL } };