From nobody Thu Nov 13 16:34:14 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; dmarc=fail(p=none dis=none) header.from=amsat.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1581935735372506.75536691641787; Mon, 17 Feb 2020 02:35:35 -0800 (PST) Received: from localhost ([::1]:43338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3dkT-000888-OL for importer@patchew.org; Mon, 17 Feb 2020 05:35:33 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60797) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j3djj-0007aK-2i for qemu-devel@nongnu.org; Mon, 17 Feb 2020 05:34:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j3djh-0001EJ-Tf for qemu-devel@nongnu.org; Mon, 17 Feb 2020 05:34:47 -0500 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:35145) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j3djh-0001Cr-Nt; Mon, 17 Feb 2020 05:34:45 -0500 Received: by mail-wr1-x443.google.com with SMTP id w12so19043402wrt.2; Mon, 17 Feb 2020 02:34:45 -0800 (PST) Received: from x1w.redhat.com (78.red-88-21-202.staticip.rima-tde.net. [88.21.202.78]) by smtp.gmail.com with ESMTPSA id y17sm302238wrs.82.2020.02.17.02.34.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2020 02:34:43 -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:mime-version :content-transfer-encoding; bh=CDbZ1qZqIrZZED5v+v2YWLCFpUZ7Y0spa/mGSHQL/yg=; b=VXnJ8G08dOg4JCTe4e5F9Vx6/czLA9rQiof6hNGEC3XJ3g7kUup5m27TmnoS00UDhz 7O41foLU4IaV1ECYpggZ9WzdBP19Y0HcJXE/lM3VWnnf6ZEU86L/2U3piaUyFVWuMyLB NthsYnf7zczHWi8djBho0IUYLHR5NP74caIVREOCwHREJ7zvAxLIXc5Kztg7DgAxDrOD ZoAndw8i9TNB7Xj4YSr3++wndlVT84XI1YeebEGRbH8pBtG7b2IfZl5pVcvtCVCq5KzQ u4Th+eNgZVqVyEzGdbR+iEnu8b8saUyhthCq8BTT30CjXqNOaRxMDGBcrPnFfpQxn+vI EuOQ== 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 :mime-version:content-transfer-encoding; bh=CDbZ1qZqIrZZED5v+v2YWLCFpUZ7Y0spa/mGSHQL/yg=; b=jetAyS44pFeP89rrBf9T3b2AFHDhUJjsh9R3Rn/hBzFxeKKcJ5m+dcBLqlQU3jFeVZ ZuNkFE04w+X8EvdF7vFoo2aUFiiex5BZ4Nrvqs1VBT3bdvOZkn3TuVQJ2hLZsIc8N9Dy J5up6p33iT0tfSTIz+v7j5s9GRJ72H1ehovQs1f6DelLmbCApbQ3oRqyM3a8BCkttpHC htEr0zY7fxsDgZxzr7+Tt210aIMKpKJOAyAb1dEcQ3bVv3aZMZwvE+TjIZKbBZqmCPBc +uqqU+9twIrx85TmGpwJB+z7W3ixbkNZNs/Tn7rf7auuY5CgqY8+geXPXFrKm9wCF4Gi 8Cpg== X-Gm-Message-State: APjAAAWmu97tDr1/RAisGNr8eXSJ5R8Ne7a+xw/KM8+6Tb1gsoz7lZBd ZRCrb6dCm8gJOtm7VfL7/vyy+UUfuBU= X-Google-Smtp-Source: APXvYqxCb8LhtQv7+VoSJMgH6bh4lhrDtieRmb5cmD6NKoBVpIcKIxdkhQg36KTqq4JkGSx6iBbu8Q== X-Received: by 2002:adf:ec4c:: with SMTP id w12mr22493091wrn.124.1581935684521; Mon, 17 Feb 2020 02:34:44 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v2] tests/boot_linux_console: Boot Trusted Firmware-A on the Raspberry Pi 3 Date: Mon, 17 Feb 2020 11:34:42 +0100 Message-Id: <20200217103442.30318-1-f4bug@amsat.org> X-Mailer: git-send-email 2.21.1 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: Ard Biesheuvel , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Andrew Baumann , qemu-arm@nongnu.org, pete@akeo.ie, Luc Michel Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) This test runs Trusted Firmware-A on the Raspberry Pi 3. We deliberately stop the boot process when the EDK2 UEFI version is displayed. The binary is build on AppVeyor CI using Pete Batard repository [1]. ATF v2.1 binary are used (see [2]). Extra documentation in [3]. It is very simple and fast: $ avocado --show=3Dapp,console run -t atf tests/acceptance JOB ID : 1e748d7c9e9011cf0af3250ddc8ebf2389d6204e JOB LOG : avocado/job-results/job-2020-02-16T18.08-1e748d7/job.log (1/1) tests/acceptance/boot_linux_console.py:BootLinuxConsole.test_aarch= 64_raspi3_atf: console: NOTICE: Booting Trusted Firmware console: NOTICE: BL1: v2.1(release):v2.1 console: NOTICE: BL1: Built : 15:26:06, May 13 2019 console: NOTICE: rpi3: Detected: Raspberry Pi 3 Model B (1GB, Sony, UK) = [0x00a02082] console: NOTICE: BL1: Booting BL2 console: ERROR: rpi3_sdhost: timeout status 0x40 console: NOTICE: BL2: v2.1(release):v2.1 console: NOTICE: BL2: Built : 15:26:01, May 13 2019 console: NOTICE: BL1: Booting BL31 console: NOTICE: BL31: v2.1(release):v2.1 console: NOTICE: BL31: Built : 15:26:04, May 13 2019 console: =3DUEFI firmware (version UEFI Firmware v1.15 built at 11:58:44 = on Feb 14 2020) PASS (1.54 s) RESULTS : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | = CANCEL 0 JOB TIME : 1.88 s [1] https://github.com/pbatard/RPi3#summary [2] https://github.com/ARM-software/arm-trusted-firmware/blob/v2.1/docs/pla= t/rpi3.rst [3] http://www.skylyrac.net/2018-02-01-port-arm-tf-to-rpi3.html Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Luc Michel --- v2: Start with a single core powered-on --- tests/acceptance/boot_linux_console.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 34d37eba3b..d1288fb59c 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -507,6 +507,30 @@ def test_arm_cubieboard_sata(self): exec_command_and_wait_for_pattern(self, 'reboot', 'reboot: Restarting system= ') =20 + def test_aarch64_raspi3_atf(self): + """ + :avocado: tags=3Darch:aarch64 + :avocado: tags=3Dmachine:raspi3 + :avocado: tags=3Dcpu:cortex-a53 + :avocado: tags=3Ddevice:pl011 + :avocado: tags=3Datf + """ + zip_url =3D ('https://github.com/pbatard/RPi3/releases/download/' + 'v1.15/RPi3_UEFI_Firmware_v1.15.zip') + zip_hash =3D '74b3bd0de92683cadb14e008a7575e1d0c3cafb9' + zip_path =3D self.fetch_asset(zip_url, asset_hash=3Dzip_hash) + + archive.extract(zip_path, self.workdir) + efi_fd =3D os.path.join(self.workdir, 'RPI_EFI.fd') + + self.vm.set_console(console_index=3D1) + self.vm.add_args('-nodefaults', + # VideoCore starts CPU with only 1 core enabled + '-global', 'bcm2836.enabled-cpus=3D1', + '-device', 'loader,file=3D%s,force-raw=3Dtrue' % = efi_fd) + self.vm.launch() + self.wait_for_console_pattern('version UEFI Firmware v1.15') + def test_s390x_s390_ccw_virtio(self): """ :avocado: tags=3Darch:s390x --=20 2.21.1