From nobody Tue Feb 10 21:40:56 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1518122701317419.7400381426878; Thu, 8 Feb 2018 12:45:01 -0800 (PST) Received: from localhost ([::1]:47191 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejt3w-0000md-N2 for importer@patchew.org; Thu, 08 Feb 2018 15:44:56 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejsWD-0002Wx-Id for qemu-devel@nongnu.org; Thu, 08 Feb 2018 15:10:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ejsWC-0002Qu-Gg for qemu-devel@nongnu.org; Thu, 08 Feb 2018 15:10:05 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:50442 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ejsWC-0002Qi-Bs for qemu-devel@nongnu.org; Thu, 08 Feb 2018 15:10:04 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 06EF64026776 for ; Thu, 8 Feb 2018 20:10:04 +0000 (UTC) Received: from thh440s.redhat.com (ovpn-204-120.brq.redhat.com [10.40.204.120]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2C64AB3016; Thu, 8 Feb 2018 20:10:02 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Date: Thu, 8 Feb 2018 21:09:42 +0100 Message-Id: <1518120582-26647-15-git-send-email-thuth@redhat.com> In-Reply-To: <1518120582-26647-1-git-send-email-thuth@redhat.com> References: <1518120582-26647-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 08 Feb 2018 20:10:04 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 08 Feb 2018 20:10:04 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'thuth@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH 14/14] 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Wei Huang This patch adds a small binary kernel to test aarch64 virt machine's UART. Signed-off-by: Wei Huang [thuth: Fixed contextual conflict with the hppa patch] Signed-off-by: Thomas Huth Reviewed-by: Eric Blake --- 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 6609276..cc7e7dc 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -371,6 +371,7 @@ gcov-files-arm-y +=3D hw/timer/arm_mptimer.c check-qtest-arm-y +=3D tests/boot-serial-test$(EXESUF) =20 check-qtest-aarch64-y =3D tests/numa-test$(EXESUF) +check-qtest-aarch64-y +=3D tests/boot-serial-test$(EXESUF) =20 check-qtest-microblazeel-y =3D $(check-qtest-microblaze-y) =20 diff --git a/tests/boot-serial-test.c b/tests/boot-serial-test.c index 72873ee..511bf31 100644 --- a/tests/boot-serial-test.c +++ b/tests/boot-serial-test.c @@ -55,6 +55,13 @@ static const uint8_t bios_raspi2[] =3D { 0x00, 0x10, 0x20, 0x3f, /* 0x3f201000 =3D UART0 base a= ddr */ }; =20 +static const uint8_t kernel_aarch64[] =3D { + 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 */ @@ -95,6 +102,8 @@ static testdef_t tests[] =3D { { "moxie", "moxiesim", "", "TT", sizeof(bios_moxiesim), 0, bios_moxies= im }, { "arm", "raspi2", "", "TT", sizeof(bios_raspi2), 0, bios_raspi2 }, { "hppa", "hppa", "", "SeaBIOS wants SYSTEM HALT" }, + { "aarch64", "virt", "-cpu cortex-a57", "TT", sizeof(kernel_aarch64), + kernel_aarch64 }, =20 { NULL } }; --=20 1.8.3.1