From patchwork Fri Mar 18 16:54:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 5486 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70219C433FE for ; Fri, 18 Mar 2022 16:54:27 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.12007.1647622466257171375 for ; Fri, 18 Mar 2022 09:54:27 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0434A1515 for ; Fri, 18 Mar 2022 09:54:25 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A7D0E3F7B4 for ; Fri, 18 Mar 2022 09:54:24 -0700 (PDT) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 1/4] arm/oeqa/fvp: show more log from the FVP on failure Date: Fri, 18 Mar 2022 16:54:19 +0000 Message-Id: <20220318165422.1711512-1-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 18 Mar 2022 16:54:27 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/3185 If the FVP fails to boot, the last 20 lines may just be a stack trace. Show the last 200 lines for further context. Signed-off-by: Ross Burton --- meta-arm/lib/oeqa/controllers/fvp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-arm/lib/oeqa/controllers/fvp.py b/meta-arm/lib/oeqa/controllers/fvp.py index 29ccae5f..7136a003 100644 --- a/meta-arm/lib/oeqa/controllers/fvp.py +++ b/meta-arm/lib/oeqa/controllers/fvp.py @@ -63,7 +63,8 @@ class OEFVPTarget(oeqa.core.target.ssh.OESSHTarget): return except asyncio.TimeoutError: self.logger.info("Timed out waiting for login prompt.") - self.logger.info(b"\n".join(bootlog.splitlines()[-20:]).decode("utf-8", errors="replace")) + self.logger.info("Boot log follows:") + self.logger.info(b"\n".join(bootlog.splitlines()[-200:]).decode("utf-8", errors="replace")) raise RuntimeError("Failed to start FVP.") def start(self, **kwargs): From patchwork Fri Mar 18 16:54:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 5484 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C3C6C433F5 for ; Fri, 18 Mar 2022 16:54:27 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.12271.1647622466566801436 for ; Fri, 18 Mar 2022 09:54:26 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8AC351570 for ; Fri, 18 Mar 2022 09:54:25 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3A22F3F7B4 for ; Fri, 18 Mar 2022 09:54:25 -0700 (PDT) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 2/4] arm-bsp/fvp-base: consolidate FVP configuration Date: Fri, 18 Mar 2022 16:54:20 +0000 Message-Id: <20220318165422.1711512-2-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220318165422.1711512-1-ross.burton@arm.com> References: <20220318165422.1711512-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 18 Mar 2022 16:54:27 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/3184 The bulk of the FVP_* variables are common, so move them into fvp-common.inc. Signed-off-by: Ross Burton --- meta-arm-bsp/conf/machine/fvp-base-arm32.conf | 15 +++++++++++++-- meta-arm-bsp/conf/machine/fvp-base.conf | 16 +--------------- meta-arm-bsp/conf/machine/fvp-common.inc | 15 +++++++++++++++ 3 files changed, 29 insertions(+), 17 deletions(-) diff --git a/meta-arm-bsp/conf/machine/fvp-base-arm32.conf b/meta-arm-bsp/conf/machine/fvp-base-arm32.conf index 9e821b74..acaadbaf 100644 --- a/meta-arm-bsp/conf/machine/fvp-base-arm32.conf +++ b/meta-arm-bsp/conf/machine/fvp-base-arm32.conf @@ -7,9 +7,20 @@ require conf/machine/fvp-common.inc require conf/machine/include/arm/arch-armv7a.inc -KERNEL_IMAGETYPE = "zImage" - # FVP u-boot configuration UBOOT_MACHINE = "vexpress_aemv8a_aarch32_defconfig" +KERNEL_IMAGETYPE = "zImage" + KERNEL_DEVICETREE = "arm/fvp-base-gicv3-psci-custom.dtb" + +FVP_DATA ?= "cluster0.cpu0=${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}@0x80080000 \ + cluster0.cpu0=${DEPLOY_DIR_IMAGE}/fvp-base-gicv3-psci-custom.dtb@0x83000000" +FVP_CONFIG[cluster0.cpu0.CONFIG64] = "0" +FVP_CONFIG[cluster0.cpu1.CONFIG64] = "0" +FVP_CONFIG[cluster0.cpu2.CONFIG64] = "0" +FVP_CONFIG[cluster0.cpu3.CONFIG64] = "0" +FVP_CONFIG[cluster1.cpu0.CONFIG64] = "0" +FVP_CONFIG[cluster1.cpu1.CONFIG64] = "0" +FVP_CONFIG[cluster1.cpu2.CONFIG64] = "0" +FVP_CONFIG[cluster1.cpu3.CONFIG64] = "0" diff --git a/meta-arm-bsp/conf/machine/fvp-base.conf b/meta-arm-bsp/conf/machine/fvp-base.conf index 06a8bd93..00ef2116 100644 --- a/meta-arm-bsp/conf/machine/fvp-base.conf +++ b/meta-arm-bsp/conf/machine/fvp-base.conf @@ -16,19 +16,5 @@ KERNEL_IMAGETYPE = "Image" KERNEL_DEVICETREE = "arm/fvp-base-revc.dtb" -FVP_PROVIDER ?= "fvp-base-a-aem-native" -FVP_EXE ?= "FVP_Base_RevC-2xAEMvA" -FVP_CONFIG[bp.ve_sysregs.exit_on_shutdown] ?= "1" -FVP_CONFIG[bp.virtio_net.enabled] ?= "1" -FVP_CONFIG[bp.virtio_net.hostbridge.userNetworking] ?= "1" -FVP_CONFIG[cache_state_modelled] ?= "0" -FVP_CONFIG[bp.secureflashloader.fname] ?= "${DEPLOY_DIR_IMAGE}/bl1-fvp.bin" -FVP_CONFIG[bp.flashloader0.fname] ?= "${DEPLOY_DIR_IMAGE}/fip-fvp.bin" -FVP_CONFIG[bp.virtioblockdevice.image_path] ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.wic" FVP_DATA ?= "cluster0.cpu0=${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}@0x80080000 \ - cluster0.cpu0=${DEPLOY_DIR_IMAGE}/fvp-base-revc.dtb@0x83000000" -FVP_CONSOLE ?= "terminal_0" -FVP_TERMINALS[bp.terminal_0] ?= "Console" -FVP_TERMINALS[bp.terminal_1] ?= "" -FVP_TERMINALS[bp.terminal_2] ?= "" -FVP_TERMINALS[bp.terminal_3] ?= "" + cluster0.cpu0=${DEPLOY_DIR_IMAGE}/fvp-base-revc.dtb@0x83000000" diff --git a/meta-arm-bsp/conf/machine/fvp-common.inc b/meta-arm-bsp/conf/machine/fvp-common.inc index a8fd60d9..f98f6cc8 100644 --- a/meta-arm-bsp/conf/machine/fvp-common.inc +++ b/meta-arm-bsp/conf/machine/fvp-common.inc @@ -25,3 +25,18 @@ PACKAGECONFIG:remove:pn-openssh = "rng-tools" MACHINE_EXTRA_RRECOMMENDS += "ssh-pregen-hostkeys" TEST_TARGET = "OEFVPTarget" + +FVP_PROVIDER ?= "fvp-base-a-aem-native" +FVP_EXE ?= "FVP_Base_RevC-2xAEMvA" +FVP_CONFIG[bp.ve_sysregs.exit_on_shutdown] ?= "1" +FVP_CONFIG[bp.virtio_net.enabled] ?= "1" +FVP_CONFIG[bp.virtio_net.hostbridge.userNetworking] ?= "1" +FVP_CONFIG[cache_state_modelled] ?= "0" +FVP_CONFIG[bp.secureflashloader.fname] ?= "${DEPLOY_DIR_IMAGE}/bl1-fvp.bin" +FVP_CONFIG[bp.flashloader0.fname] ?= "${DEPLOY_DIR_IMAGE}/fip-fvp.bin" +FVP_CONFIG[bp.virtioblockdevice.image_path] ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.wic" +FVP_CONSOLE ?= "terminal_0" +FVP_TERMINALS[bp.terminal_0] ?= "Console" +FVP_TERMINALS[bp.terminal_1] ?= "" +FVP_TERMINALS[bp.terminal_2] ?= "" +FVP_TERMINALS[bp.terminal_3] ?= "" From patchwork Fri Mar 18 16:54:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 5483 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E296C433EF for ; Fri, 18 Mar 2022 16:54:27 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.12008.1647622466593987508 for ; Fri, 18 Mar 2022 09:54:27 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1CA8D1576 for ; Fri, 18 Mar 2022 09:54:26 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C061A3F7B4 for ; Fri, 18 Mar 2022 09:54:25 -0700 (PDT) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 3/4] arm-bsp/fvp-base: configure the FVP with v8.4 cores Date: Fri, 18 Mar 2022 16:54:21 +0000 Message-Id: <20220318165422.1711512-3-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220318165422.1711512-1-ross.burton@arm.com> References: <20220318165422.1711512-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 18 Mar 2022 16:54:27 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/3186 Configure the FVP to have v8.4 cores, instead of v8.0. This gives us more useful instructions, such as pointer authentication. See this document for more details: https://developer.arm.com/documentation/102378/0201/Armv8-x-and-Armv9-x-extensions-and-features Signed-off-by: Ross Burton --- meta-arm-bsp/conf/machine/fvp-common.inc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta-arm-bsp/conf/machine/fvp-common.inc b/meta-arm-bsp/conf/machine/fvp-common.inc index f98f6cc8..3da1ef0b 100644 --- a/meta-arm-bsp/conf/machine/fvp-common.inc +++ b/meta-arm-bsp/conf/machine/fvp-common.inc @@ -35,6 +35,9 @@ FVP_CONFIG[cache_state_modelled] ?= "0" FVP_CONFIG[bp.secureflashloader.fname] ?= "${DEPLOY_DIR_IMAGE}/bl1-fvp.bin" FVP_CONFIG[bp.flashloader0.fname] ?= "${DEPLOY_DIR_IMAGE}/fip-fvp.bin" FVP_CONFIG[bp.virtioblockdevice.image_path] ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.wic" +# Set the baseline to ARMv8.4, as the default is 8.0. +FVP_CONFIG[cluster0.has_arm_v8-4] = "1" +FVP_CONFIG[cluster1.has_arm_v8-4] = "1" FVP_CONSOLE ?= "terminal_0" FVP_TERMINALS[bp.terminal_0] ?= "Console" FVP_TERMINALS[bp.terminal_1] ?= "" From patchwork Fri Mar 18 16:54:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Burton X-Patchwork-Id: 5485 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4420DC4332F for ; Fri, 18 Mar 2022 16:54:28 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.12378.1647622467157475156 for ; Fri, 18 Mar 2022 09:54:27 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: ross.burton@arm.com) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A33A11595 for ; Fri, 18 Mar 2022 09:54:26 -0700 (PDT) Received: from oss-tx204.lab.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5298D3F7B4 for ; Fri, 18 Mar 2022 09:54:26 -0700 (PDT) From: Ross Burton To: meta-arm@lists.yoctoproject.org Subject: [PATCH 4/4] arm-bsp/u-boot: use latest u-boot for fvp-base Date: Fri, 18 Mar 2022 16:54:22 +0000 Message-Id: <20220318165422.1711512-4-ross.burton@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220318165422.1711512-1-ross.burton@arm.com> References: <20220318165422.1711512-1-ross.burton@arm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 18 Mar 2022 16:54:28 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/3187 Explicitly enable use of CRC instructions: we configure fvp-base to have armv8.4 cores, but the default uboot config disables crc (see uboot 51d8367d8). Keep fvp-base-arm32 on 2021.10 as the arm32-specific patches need rebasing, and a trivial rebase doesn't boot successfully. Signed-off-by: Ross Burton --- meta-arm-bsp/conf/machine/fvp-base-arm32.conf | 1 + meta-arm-bsp/conf/machine/fvp-common.inc | 2 -- meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/bootargs.cfg | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/meta-arm-bsp/conf/machine/fvp-base-arm32.conf b/meta-arm-bsp/conf/machine/fvp-base-arm32.conf index acaadbaf..b6fe6f77 100644 --- a/meta-arm-bsp/conf/machine/fvp-base-arm32.conf +++ b/meta-arm-bsp/conf/machine/fvp-base-arm32.conf @@ -8,6 +8,7 @@ require conf/machine/fvp-common.inc require conf/machine/include/arm/arch-armv7a.inc # FVP u-boot configuration +PREFERRED_VERSION_u-boot ?= "2021.10" UBOOT_MACHINE = "vexpress_aemv8a_aarch32_defconfig" KERNEL_IMAGETYPE = "zImage" diff --git a/meta-arm-bsp/conf/machine/fvp-common.inc b/meta-arm-bsp/conf/machine/fvp-common.inc index 3da1ef0b..b0aeb81f 100644 --- a/meta-arm-bsp/conf/machine/fvp-common.inc +++ b/meta-arm-bsp/conf/machine/fvp-common.inc @@ -14,8 +14,6 @@ SERIAL_CONSOLES = "115200;ttyAMA0" PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" -PREFERRED_VERSION_u-boot ?= "2021.10" - EXTRA_IMAGEDEPENDS += "trusted-firmware-a u-boot" # As this is a virtual target that will not be used in the real world there is diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/bootargs.cfg b/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/bootargs.cfg index b7510f48..716600f4 100644 --- a/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/bootargs.cfg +++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/bootargs.cfg @@ -1 +1,3 @@ CONFIG_BOOTARGS="console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda1 rw rootwait" +# Our FVP support CRC instructions +CONFIG_ARM64_CRC32=y