From patchwork Fri Oct 20 12:31:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Debbie Martin X-Patchwork-Id: 32642 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 66E83C001DF for ; Fri, 20 Oct 2023 12:32:18 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.53197.1697805130804761947 for ; Fri, 20 Oct 2023 05:32:10 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: debbie.martin@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 8FF692F4 for ; Fri, 20 Oct 2023 05:32:50 -0700 (PDT) Received: from e127725.arm.com (unknown [10.57.36.11]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CE3EB3F5A1 for ; Fri, 20 Oct 2023 05:32:08 -0700 (PDT) From: Debbie Martin To: meta-arm@lists.yoctoproject.org Subject: [PATCH 1/5] arm-bsp/u-boot: Divide the U-boot configuration by machine Date: Fri, 20 Oct 2023 13:31:35 +0100 Message-Id: <20231020123139.339204-1-Debbie.Martin@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, 20 Oct 2023 12:32:18 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/5153 Have separate machine include files rather than multiple machine-specific settings in the same file. Signed-off-by: Debbie Martin --- .../u-boot/u-boot-corstone1000.inc | 59 +++++++++++++ .../recipes-bsp/u-boot/u-boot-fvp-base.inc | 5 ++ .../recipes-bsp/u-boot/u-boot-juno.inc | 3 + meta-arm-bsp/recipes-bsp/u-boot/u-boot-tc.inc | 5 ++ .../recipes-bsp/u-boot/u-boot_%.bbappend | 83 ++----------------- 5 files changed, 78 insertions(+), 77 deletions(-) create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot-corstone1000.inc create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot-fvp-base.inc create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot-juno.inc create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot-tc.inc diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot-corstone1000.inc b/meta-arm-bsp/recipes-bsp/u-boot/u-boot-corstone1000.inc new file mode 100644 index 00000000..e978e06a --- /dev/null +++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot-corstone1000.inc @@ -0,0 +1,59 @@ +# Corstone1000 specific U-boot support + +DEPENDS:append = " gnutls-native openssl-native efitools-native" +CORSTONE1000_DEVICE_TREE:corstone1000-mps3 = "corstone1000-mps3" +CORSTONE1000_DEVICE_TREE:corstone1000-fvp = "corstone1000-fvp" +EXTRA_OEMAKE:append = ' DEVICE_TREE=${CORSTONE1000_DEVICE_TREE}' + +SYSROOT_DIRS:append = " /boot" + +SRC_URI:append = " \ + file://0001-FF-A-v15-arm64-smccc-add-support-for-SMCCCv1.2-x0-x1.patch \ + file://0002-FF-A-v15-lib-uuid-introduce-uuid_str_to_le_bin-funct.patch \ + file://0003-FF-A-v15-lib-uuid-introduce-testcase-for-uuid_str_to.patch \ + file://0004-FF-A-v15-arm_ffa-introduce-Arm-FF-A-support.patch \ + file://0005-FF-A-v15-arm_ffa-introduce-armffa-command.patch \ + file://0006-FF-A-v15-arm_ffa-introduce-sandbox-FF-A-support.patch \ + file://0007-FF-A-v15-arm_ffa-introduce-sandbox-test-cases-for-UC.patch \ + file://0008-FF-A-v15-arm_ffa-introduce-armffa-command-Sandbox-te.patch \ + file://0009-FF-A-v15-arm_ffa-efi-introduce-FF-A-MM-communication.patch \ + file://0010-FF-A-v15-arm_ffa-efi-corstone1000-enable-MM-communic.patch \ + file://0011-efi-corstone1000-fwu-introduce-EFI-capsule-update.patch \ + file://0012-arm-corstone1000-fix-unrecognized-filesystem-type.patch \ + file://0013-efi_loader-corstone1000-remove-guid-check-from-corst.patch \ + file://0014-efi_loader-populate-ESRT-table-if-EFI_ESRT-config-op.patch \ + file://0015-efi_firmware-add-get_image_info-for-corstone1000.patch \ + file://0016-efi_loader-fix-null-pointer-exception-with-get_image.patch \ + file://0017-arm-corstone1000-add-mmc-for-fvp.patch \ + file://0018-corstone1000-add-compressed-kernel-support.patch \ + file://0019-arm-corstone1000-esrt-support.patch \ + file://0020-corstone1000-enable-distro-booting-command.patch \ + file://0021-corstone1000-add-fwu-metadata-store-info.patch \ + file://0022-fwu_metadata-make-sure-structures-are-packed.patch \ + file://0023-corstone1000-add-boot-index.patch \ + file://0024-corstone1000-adjust-boot-bank-and-kernel-location.patch \ + file://0025-corstone1000-add-nvmxip-fwu-mdata-and-gpt-options.patch \ + file://0026-nvmxip-move-header-to-include.patch \ + file://0027-corstone1000-set-kernel_addr-based-on-boot_idx.patch \ + file://0028-corstone1000-boot-index-from-active.patch \ + file://0029-corstone1000-enable-PSCI-reset.patch \ + file://0030-Enable-EFI-set-get-time-services.patch \ + file://0031-corstone1000-detect-inflated-kernel-size.patch \ + file://0032-corstone1000-ESRT-add-unique-firmware-GUID.patch \ + file://0033-dt-Provide-a-way-to-remove-non-compliant-nodes-and-p.patch \ + file://0034-bootefi-Call-the-EVT_FT_FIXUP-event-handler.patch \ + file://0035-corstone1000-purge-U-Boot-specific-DT-nodes.patch \ + file://0036-corstone1000-add-signature-device-tree-overlay.patch \ + file://0037-corstone1000-enable-authenticated-capsule-config.patch \ + file://0038-corstone1000-introduce-EFI-authenticated-capsule-upd.patch \ + " + +do_configure:append(){ + openssl req -x509 -sha256 -newkey rsa:2048 -subj /CN=CRT/ -keyout ${B}/CRT.key -out ${B}/CRT.crt -nodes -days 365 + cert-to-efi-sig-list ${B}/CRT.crt ${B}/corstone1000_defconfig/CRT.esl +} + +do_install:append() { + install -D -p -m 0644 ${B}/CRT.crt ${DEPLOY_DIR_IMAGE}/corstone1000_capsule_cert.crt + install -D -p -m 0644 ${B}/CRT.key ${DEPLOY_DIR_IMAGE}/corstone1000_capsule_key.key +} diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot-fvp-base.inc b/meta-arm-bsp/recipes-bsp/u-boot/u-boot-fvp-base.inc new file mode 100644 index 00000000..21046724 --- /dev/null +++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot-fvp-base.inc @@ -0,0 +1,5 @@ +# FVP base specific U-boot support + +SRC_URI:append = " file://bootargs.cfg \ + file://0001-Revert-vexpress64-pick-DRAM-size-from-DT.patch \ + " diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot-juno.inc b/meta-arm-bsp/recipes-bsp/u-boot/u-boot-juno.inc new file mode 100644 index 00000000..e49d87c2 --- /dev/null +++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot-juno.inc @@ -0,0 +1,3 @@ +# Juno specific U-boot support + +SRC_URI:append = " file://0001-configs-vexpress-modify-to-boot-compressed-initramfs.patch" diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot-tc.inc b/meta-arm-bsp/recipes-bsp/u-boot/u-boot-tc.inc new file mode 100644 index 00000000..ca182c55 --- /dev/null +++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot-tc.inc @@ -0,0 +1,5 @@ +# TC0 and TC1 specific U-boot support + +SRC_URI:append = " \ + file://bootargs.cfg \ + " diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend b/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend index 4989ff61..11f332ad 100644 --- a/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend +++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot_%.bbappend @@ -1,81 +1,10 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" -# -# Corstone1000 64-bit machines -# -DEPENDS:append:corstone1000 = " gnutls-native openssl-native efitools-native" -CORSTONE1000_DEVICE_TREE:corstone1000-mps3 = "corstone1000-mps3" -CORSTONE1000_DEVICE_TREE:corstone1000-fvp = "corstone1000-fvp" -EXTRA_OEMAKE:append:corstone1000 = ' DEVICE_TREE=${CORSTONE1000_DEVICE_TREE}' +MACHINE_U-BOOT_REQUIRE ?= "" +MACHINE_U-BOOT_REQUIRE:corstone1000 = "u-boot-corstone1000.inc" +MACHINE_U-BOOT_REQUIRE:fvp-base = "u-boot-fvp-base.inc" +MACHINE_U-BOOT_REQUIRE:juno = "u-boot-juno.inc" +MACHINE_U-BOOT_REQUIRE:tc = "u-boot-tc.inc" -SYSROOT_DIRS:append:corstone1000 = " /boot" +require ${MACHINE_U-BOOT_REQUIRE} -SRC_URI:append:corstone1000 = " \ - file://0001-FF-A-v15-arm64-smccc-add-support-for-SMCCCv1.2-x0-x1.patch \ - file://0002-FF-A-v15-lib-uuid-introduce-uuid_str_to_le_bin-funct.patch \ - file://0003-FF-A-v15-lib-uuid-introduce-testcase-for-uuid_str_to.patch \ - file://0004-FF-A-v15-arm_ffa-introduce-Arm-FF-A-support.patch \ - file://0005-FF-A-v15-arm_ffa-introduce-armffa-command.patch \ - file://0006-FF-A-v15-arm_ffa-introduce-sandbox-FF-A-support.patch \ - file://0007-FF-A-v15-arm_ffa-introduce-sandbox-test-cases-for-UC.patch \ - file://0008-FF-A-v15-arm_ffa-introduce-armffa-command-Sandbox-te.patch \ - file://0009-FF-A-v15-arm_ffa-efi-introduce-FF-A-MM-communication.patch \ - file://0010-FF-A-v15-arm_ffa-efi-corstone1000-enable-MM-communic.patch \ - file://0011-efi-corstone1000-fwu-introduce-EFI-capsule-update.patch \ - file://0012-arm-corstone1000-fix-unrecognized-filesystem-type.patch \ - file://0013-efi_loader-corstone1000-remove-guid-check-from-corst.patch \ - file://0014-efi_loader-populate-ESRT-table-if-EFI_ESRT-config-op.patch \ - file://0015-efi_firmware-add-get_image_info-for-corstone1000.patch \ - file://0016-efi_loader-fix-null-pointer-exception-with-get_image.patch \ - file://0017-arm-corstone1000-add-mmc-for-fvp.patch \ - file://0018-corstone1000-add-compressed-kernel-support.patch \ - file://0019-arm-corstone1000-esrt-support.patch \ - file://0020-corstone1000-enable-distro-booting-command.patch \ - file://0021-corstone1000-add-fwu-metadata-store-info.patch \ - file://0022-fwu_metadata-make-sure-structures-are-packed.patch \ - file://0023-corstone1000-add-boot-index.patch \ - file://0024-corstone1000-adjust-boot-bank-and-kernel-location.patch \ - file://0025-corstone1000-add-nvmxip-fwu-mdata-and-gpt-options.patch \ - file://0026-nvmxip-move-header-to-include.patch \ - file://0027-corstone1000-set-kernel_addr-based-on-boot_idx.patch \ - file://0028-corstone1000-boot-index-from-active.patch \ - file://0029-corstone1000-enable-PSCI-reset.patch \ - file://0030-Enable-EFI-set-get-time-services.patch \ - file://0031-corstone1000-detect-inflated-kernel-size.patch \ - file://0032-corstone1000-ESRT-add-unique-firmware-GUID.patch \ - file://0033-dt-Provide-a-way-to-remove-non-compliant-nodes-and-p.patch \ - file://0034-bootefi-Call-the-EVT_FT_FIXUP-event-handler.patch \ - file://0035-corstone1000-purge-U-Boot-specific-DT-nodes.patch \ - file://0036-corstone1000-add-signature-device-tree-overlay.patch \ - file://0037-corstone1000-enable-authenticated-capsule-config.patch \ - file://0038-corstone1000-introduce-EFI-authenticated-capsule-upd.patch \ - " - -do_configure:append:corstone1000(){ - openssl req -x509 -sha256 -newkey rsa:2048 -subj /CN=CRT/ -keyout ${B}/CRT.key -out ${B}/CRT.crt -nodes -days 365 - cert-to-efi-sig-list ${B}/CRT.crt ${B}/corstone1000_defconfig/CRT.esl -} - -do_install:append:corstone1000() { - install -D -p -m 0644 ${B}/CRT.crt ${DEPLOY_DIR_IMAGE}/corstone1000_capsule_cert.crt - install -D -p -m 0644 ${B}/CRT.key ${DEPLOY_DIR_IMAGE}/corstone1000_capsule_key.key -} - -# -# FVP BASE -# -SRC_URI:append:fvp-base = " file://bootargs.cfg \ - file://0001-Revert-vexpress64-pick-DRAM-size-from-DT.patch \ - " -# -# Juno Machines -# -SRC_URI:append:juno = " file://0001-configs-vexpress-modify-to-boot-compressed-initramfs.patch" - - -# -# TC0 and TC1 MACHINES -# -SRC_URI:append:tc = " \ - file://bootargs.cfg \ - " From patchwork Fri Oct 20 12:38:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Debbie Martin X-Patchwork-Id: 32643 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 6B40BCDB474 for ; Fri, 20 Oct 2023 12:38:48 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.53318.1697805525170128908 for ; Fri, 20 Oct 2023 05:38:45 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: debbie.martin@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 14AC92F4 for ; Fri, 20 Oct 2023 05:39:25 -0700 (PDT) Received: from e127725.arm.com (unknown [10.57.36.11]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BE9D43F5A1 for ; Fri, 20 Oct 2023 05:38:43 -0700 (PDT) From: Debbie Martin To: meta-arm@lists.yoctoproject.org Subject: [PATCH 2/5] arm-bsp/fvp-base: Merge fvp-common.inc into fvp-base.conf Date: Fri, 20 Oct 2023 13:38:24 +0100 Message-Id: <20231020123827.346193-1-Debbie.Martin@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, 20 Oct 2023 12:38:48 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/5154 Merge the common FVP configuration in fvp-common.inc into fvp-base.conf since that is the only place it is inherited. Drop setting MACHINE_FEATURES to "optee" because there is no optee machine feature. Signed-off-by: Debbie Martin --- meta-arm-bsp/conf/machine/fvp-base.conf | 45 +++++++++++++++-- .../conf/machine/include/fvp-common.inc | 50 ------------------- 2 files changed, 42 insertions(+), 53 deletions(-) delete mode 100644 meta-arm-bsp/conf/machine/include/fvp-common.inc -- 2.25.1 diff --git a/meta-arm-bsp/conf/machine/fvp-base.conf b/meta-arm-bsp/conf/machine/fvp-base.conf index 3a923bad..cc0893fa 100644 --- a/meta-arm-bsp/conf/machine/fvp-base.conf +++ b/meta-arm-bsp/conf/machine/fvp-base.conf @@ -4,15 +4,54 @@ #@NAME: Armv8-A Base Platform FVP machine #@DESCRIPTION: Machine configuration for Armv8-A Base Platform FVP model -require conf/machine/include/fvp-common.inc require conf/machine/include/arm/arch-armv8a.inc TUNE_FEATURES = "aarch64" +IMAGE_NAME_SUFFIX = "" +IMAGE_FSTYPES += "wic" +WKS_FILE ?= "fvp-base.wks" + +SERIAL_CONSOLES = "115200;ttyAMA0" + +PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" +KERNEL_DEVICETREE = "arm/fvp-base-revc.dtb" +KERNEL_IMAGETYPE = "Image" + +EXTRA_IMAGEDEPENDS += "trusted-firmware-a" + # FVP u-boot configuration UBOOT_MACHINE = "vexpress_aemv8a_semi_defconfig" -KERNEL_IMAGETYPE = "Image" +# As this is a virtual target that will not be used in the real world there is +# no need for real SSH keys. +MACHINE_EXTRA_RRECOMMENDS += "ssh-pregen-hostkeys" + +TEST_TARGET = "OEFVPTarget" +TEST_TARGET_IP = "127.0.0.1:2222" +TEST_SUITES:append = " fvp_boot fvp_devices" +TEST_FVP_DEVICES ?= "rtc watchdog networking virtiorng cpu_hotplug" +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" +# Tell testimage to connect to localhost:2222, and forward that to SSH in the FVP. +FVP_CONFIG[bp.virtio_net.hostbridge.userNetPorts] = "2222=22" FVP_CONFIG[bp.virtio_rng.enabled] ?= "1" -IMAGE_NAME_SUFFIX = "" +FVP_CONFIG[cache_state_modelled] ?= "0" +FVP_CONFIG[bp.secureflashloader.fname] ?= "bl1-fvp.bin" +FVP_CONFIG[bp.flashloader0.fname] ?= "fip-fvp.bin" +FVP_CONFIG[bp.virtioblockdevice.image_path] ?= "${IMAGE_NAME}.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_DATA ?= "cluster0.cpu0=${KERNEL_IMAGETYPE}@0x80080000 \ + cluster0.cpu0=fvp-base-revc.dtb@0x8fc00000" +FVP_TERMINALS[bp.terminal_0] ?= "Console" +FVP_TERMINALS[bp.terminal_1] ?= "" +FVP_TERMINALS[bp.terminal_2] ?= "" +FVP_TERMINALS[bp.terminal_3] ?= "" + diff --git a/meta-arm-bsp/conf/machine/include/fvp-common.inc b/meta-arm-bsp/conf/machine/include/fvp-common.inc deleted file mode 100644 index e6e44431..00000000 --- a/meta-arm-bsp/conf/machine/include/fvp-common.inc +++ /dev/null @@ -1,50 +0,0 @@ -# FVP common parameters - -# -# Capturing FVP common configurations (Armv8-A Base Platform FVP, -# Armv8-A Foundation Platform and Armv7-A Base Platform FVP). -# - -MACHINE_FEATURES = "optee" - -IMAGE_FSTYPES += "wic" -WKS_FILE ?= "fvp-base.wks" - -SERIAL_CONSOLES = "115200;ttyAMA0" - -PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" - -KERNEL_DEVICETREE = "arm/fvp-base-revc.dtb" - -EXTRA_IMAGEDEPENDS += "trusted-firmware-a" - -# As this is a virtual target that will not be used in the real world there is -# no need for real SSH keys. -MACHINE_EXTRA_RRECOMMENDS += "ssh-pregen-hostkeys" - -TEST_TARGET = "OEFVPTarget" -TEST_TARGET_IP = "127.0.0.1:2222" -TEST_SUITES:append = " fvp_boot fvp_devices" -TEST_FVP_DEVICES ?= "rtc watchdog networking virtiorng cpu_hotplug" - -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" -# Tell testimage to connect to localhost:2222, and forward that to SSH in the FVP. -FVP_CONFIG[bp.virtio_net.hostbridge.userNetPorts] = "2222=22" -FVP_CONFIG[cache_state_modelled] ?= "0" -FVP_CONFIG[bp.secureflashloader.fname] ?= "bl1-fvp.bin" -FVP_CONFIG[bp.flashloader0.fname] ?= "fip-fvp.bin" -FVP_CONFIG[bp.virtioblockdevice.image_path] ?= "${IMAGE_NAME}.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_DATA ?= "cluster0.cpu0=${KERNEL_IMAGETYPE}@0x80080000 \ - cluster0.cpu0=fvp-base-revc.dtb@0x8fc00000" -FVP_TERMINALS[bp.terminal_0] ?= "Console" -FVP_TERMINALS[bp.terminal_1] ?= "" -FVP_TERMINALS[bp.terminal_2] ?= "" -FVP_TERMINALS[bp.terminal_3] ?= "" From patchwork Fri Oct 20 12:38:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Debbie Martin X-Patchwork-Id: 32644 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 504E1C001DF for ; Fri, 20 Oct 2023 12:39:38 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.53332.1697805577004164158 for ; Fri, 20 Oct 2023 05:39:37 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: debbie.martin@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 989A32F4 for ; Fri, 20 Oct 2023 05:40:17 -0700 (PDT) Received: from e127725.arm.com (unknown [10.57.36.11]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 286983F5A1 for ; Fri, 20 Oct 2023 05:39:36 -0700 (PDT) From: Debbie Martin To: meta-arm@lists.yoctoproject.org Subject: [PATCH 3/5] arm-bsp/trusted-firmware-a/fvp-base: Add stdout path and virtio net and rng Date: Fri, 20 Oct 2023 13:38:25 +0100 Message-Id: <20231020123827.346193-2-Debbie.Martin@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231020123827.346193-1-Debbie.Martin@arm.com> References: <20231020123827.346193-1-Debbie.Martin@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, 20 Oct 2023 12:39:38 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/5155 Set the Trusted Firmware devicetree to fvp-base-gicv3-psci-1t. Patch the devicetree to include: the stdout path for console access, a virtio net node and a virtio rng node. This is necessary in the case that the Trusted Firmware devicetree is passed to Linux from U-boot (rather than sideloading). Also rename the include file to change the suffix from "fvp" to "fvp-base". Signed-off-by: Debbie Martin --- ...d-stdout-path-and-virtio-net-and-rng.patch | 64 +++++++++++++++++++ ...vp.inc => trusted-firmware-a-fvp-base.inc} | 5 ++ .../trusted-firmware-a_%.bbappend | 2 +- 3 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/fvp-base/0001-fdts-fvp-base-Add-stdout-path-and-virtio-net-and-rng.patch rename meta-arm-bsp/recipes-bsp/trusted-firmware-a/{trusted-firmware-a-fvp.inc => trusted-firmware-a-fvp-base.inc} (50%) diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/fvp-base/0001-fdts-fvp-base-Add-stdout-path-and-virtio-net-and-rng.patch b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/fvp-base/0001-fdts-fvp-base-Add-stdout-path-and-virtio-net-and-rng.patch new file mode 100644 index 00000000..4d0019a5 --- /dev/null +++ b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/fvp-base/0001-fdts-fvp-base-Add-stdout-path-and-virtio-net-and-rng.patch @@ -0,0 +1,64 @@ +From b79d3cf319cc5698311ef83247110c93d3c2de2c Mon Sep 17 00:00:00 2001 +Message-Id: +From: Diego Sueiro +Date: Wed, 27 Sep 2023 18:05:26 +0100 +Subject: [PATCH] fdts/fvp-base: Add stdout-path and virtio net and rng nodes + +Upstream-Status: Pending +Signed-off-by: Diego Sueiro +--- + fdts/fvp-base-psci-common.dtsi | 8 ++++++-- + fdts/rtsm_ve-motherboard.dtsi | 12 ++++++++++++ + 2 files changed, 18 insertions(+), 2 deletions(-) + +diff --git a/fdts/fvp-base-psci-common.dtsi b/fdts/fvp-base-psci-common.dtsi +index 79cf37d3b0..b1ba5ce703 100644 +--- a/fdts/fvp-base-psci-common.dtsi ++++ b/fdts/fvp-base-psci-common.dtsi +@@ -30,7 +30,9 @@ + #if (ENABLE_RME == 1) + chosen { bootargs = "console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda ip=on";}; + #else +- chosen {}; ++ chosen { ++ stdout-path = &v2m_serial0; ++ }; + #endif + + aliases { +@@ -243,6 +245,8 @@ + <0 0 39 &gic 0 GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>, + <0 0 40 &gic 0 GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>, + <0 0 41 &gic 0 GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>, +- <0 0 42 &gic 0 GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>; ++ <0 0 42 &gic 0 GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>, ++ <0 0 44 &gic 0 GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>, ++ <0 0 46 &gic 0 GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>; + }; + }; +diff --git a/fdts/rtsm_ve-motherboard.dtsi b/fdts/rtsm_ve-motherboard.dtsi +index 0a824b349a..21a083a51a 100644 +--- a/fdts/rtsm_ve-motherboard.dtsi ++++ b/fdts/rtsm_ve-motherboard.dtsi +@@ -230,6 +230,18 @@ + interrupts = <42>; + }; + ++ virtio@150000 { ++ compatible = "virtio,mmio"; ++ reg = <0x150000 0x200>; ++ interrupts = <44>; ++ }; ++ ++ virtio@200000 { ++ compatible = "virtio,mmio"; ++ reg = <0x200000 0x200>; ++ interrupts = <46>; ++ }; ++ + rtc@170000 { + compatible = "arm,pl031", "arm,primecell"; + reg = <0x170000 0x1000>; +-- +2.39.1 + diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.inc b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp-base.inc similarity index 50% rename from meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.inc rename to meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp-base.inc index ca96b448..d773e41c 100644 --- a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp.inc +++ b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a-fvp-base.inc @@ -4,9 +4,14 @@ # Armv8-A Base Platform FVP # +FILESEXTRAPATHS:prepend := "${THISDIR}/files/:" +SRC_URI:append = " file://0001-fdts-fvp-base-Add-stdout-path-and-virtio-net-and-rng.patch" + COMPATIBLE_MACHINE = "fvp-base" TFA_PLATFORM = "fvp" TFA_DEBUG = "1" TFA_MBEDTLS = "1" TFA_UBOOT ?= "1" TFA_BUILD_TARGET = "bl1 bl2 bl31 dtbs fip" + +EXTRA_OEMAKE:append = " FVP_DT_PREFIX=fvp-base-gicv3-psci-1t" diff --git a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend index 7fbcd3ab..cb482a6f 100644 --- a/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend +++ b/meta-arm-bsp/recipes-bsp/trusted-firmware-a/trusted-firmware-a_%.bbappend @@ -4,7 +4,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files/:" MACHINE_TFA_REQUIRE ?= "" MACHINE_TFA_REQUIRE:corstone1000 = "trusted-firmware-a-corstone1000.inc" -MACHINE_TFA_REQUIRE:fvp-base = "trusted-firmware-a-fvp.inc" +MACHINE_TFA_REQUIRE:fvp-base = "trusted-firmware-a-fvp-base.inc" MACHINE_TFA_REQUIRE:juno = "trusted-firmware-a-juno.inc" MACHINE_TFA_REQUIRE:n1sdp = "trusted-firmware-a-n1sdp.inc" MACHINE_TFA_REQUIRE:sgi575 = "trusted-firmware-a-sgi575.inc" From patchwork Fri Oct 20 12:38:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Debbie Martin X-Patchwork-Id: 32646 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 5500EC0032E for ; Fri, 20 Oct 2023 12:39:48 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.53139.1697805581173989587 for ; Fri, 20 Oct 2023 05:39:41 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: debbie.martin@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 B02862F4 for ; Fri, 20 Oct 2023 05:40:21 -0700 (PDT) Received: from e127725.arm.com (unknown [10.57.36.11]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2DB2D3F5A1 for ; Fri, 20 Oct 2023 05:39:39 -0700 (PDT) From: Debbie Martin To: meta-arm@lists.yoctoproject.org Subject: [PATCH 4/5] arm-bsp/u-boot/fvp-base: Configure FVP base U-boot machine and enable U-boot sysreset, CRC-32 and virtio RNG Date: Fri, 20 Oct 2023 13:38:26 +0100 Message-Id: <20231020123827.346193-3-Debbie.Martin@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231020123827.346193-1-Debbie.Martin@arm.com> References: <20231020123827.346193-1-Debbie.Martin@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, 20 Oct 2023 12:39:48 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/5156 Configure FVP base to use vexpress_fvp_defconfig as the U-boot machine. Configure U-boot: 1. Drop the patch to pick the DRAM size from the devicetree since the FVP now specifies a devicetree. 2. Enable sysreset to reset by PSCI and patch the vexpress U-boot machine to leave the reset to PSCI in this case. 3. Enable Virtio RNG and patch the U-boot Virtio RNG driver to workaround an issue with the FVP that results in RNG calls hanging. 4. Enable the Arm64 CRC-32 instruction by default and remove the now redundant config setting. Signed-off-by: Debbie Martin --- meta-arm-bsp/conf/machine/fvp-base.conf | 2 +- .../recipes-bsp/u-boot/u-boot-fvp-base.inc | 5 +- ...rt-vexpress64-pick-DRAM-size-from-DT.patch | 44 ---------------- ...round-for-FVP-returning-zero-size-bu.patch | 49 +++++++++++++++++ ...2-vexpress64-Set-the-DM_RNG-property.patch | 31 +++++++++++ ...press64-Select-PSCI-RESET-by-default.patch | 52 +++++++++++++++++++ ...-Imply-CONFIG_ARM64_CRC32-by-default.patch | 31 +++++++++++ .../u-boot/u-boot/fvp-base/bootargs.cfg | 2 - 8 files changed, 168 insertions(+), 48 deletions(-) delete mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0001-Revert-vexpress64-pick-DRAM-size-from-DT.patch create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0001-virtio-rng-Workaround-for-FVP-returning-zero-size-bu.patch create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0002-vexpress64-Set-the-DM_RNG-property.patch create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0003-vexpress64-Select-PSCI-RESET-by-default.patch create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0004-vexpress64-Imply-CONFIG_ARM64_CRC32-by-default.patch diff --git a/meta-arm-bsp/conf/machine/fvp-base.conf b/meta-arm-bsp/conf/machine/fvp-base.conf index cc0893fa..940a4330 100644 --- a/meta-arm-bsp/conf/machine/fvp-base.conf +++ b/meta-arm-bsp/conf/machine/fvp-base.conf @@ -21,7 +21,7 @@ KERNEL_IMAGETYPE = "Image" EXTRA_IMAGEDEPENDS += "trusted-firmware-a" # FVP u-boot configuration -UBOOT_MACHINE = "vexpress_aemv8a_semi_defconfig" +UBOOT_MACHINE = "vexpress_fvp_defconfig" # As this is a virtual target that will not be used in the real world there is # no need for real SSH keys. diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot-fvp-base.inc b/meta-arm-bsp/recipes-bsp/u-boot/u-boot-fvp-base.inc index 21046724..e1fcb1f2 100644 --- a/meta-arm-bsp/recipes-bsp/u-boot/u-boot-fvp-base.inc +++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot-fvp-base.inc @@ -1,5 +1,8 @@ # FVP base specific U-boot support SRC_URI:append = " file://bootargs.cfg \ - file://0001-Revert-vexpress64-pick-DRAM-size-from-DT.patch \ + file://0001-virtio-rng-Workaround-for-FVP-returning-zero-size-bu.patch \ + file://0002-vexpress64-Set-the-DM_RNG-property.patch \ + file://0003-vexpress64-Select-PSCI-RESET-by-default.patch \ + file://0004-vexpress64-Imply-CONFIG_ARM64_CRC32-by-default.patch \ " diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0001-Revert-vexpress64-pick-DRAM-size-from-DT.patch b/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0001-Revert-vexpress64-pick-DRAM-size-from-DT.patch deleted file mode 100644 index d5516224..00000000 --- a/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0001-Revert-vexpress64-pick-DRAM-size-from-DT.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 4f649e0a3e0f9ed1f0d6efdff5b14cdc40d84201 Mon Sep 17 00:00:00 2001 -From: Jon Mason -Upstream-Status: Inappropriate ---- - board/armltd/vexpress64/vexpress64.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c -index af326dc6f453..e8ce88b22c5a 100644 ---- a/board/armltd/vexpress64/vexpress64.c -+++ b/board/armltd/vexpress64/vexpress64.c -@@ -88,12 +88,20 @@ int board_init(void) - - int dram_init(void) - { -- return fdtdec_setup_mem_size_base(); -+ gd->ram_size = PHYS_SDRAM_1_SIZE; -+ return 0; - } - - int dram_init_banksize(void) - { -- return fdtdec_setup_memory_banksize(); -+ gd->bd->bi_dram[0].start = PHYS_SDRAM_1; -+ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE; -+#ifdef PHYS_SDRAM_2 -+ gd->bd->bi_dram[1].start = PHYS_SDRAM_2; -+ gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE; -+#endif -+ -+ return 0; - } - - /* Assigned in lowlevel_init.S diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0001-virtio-rng-Workaround-for-FVP-returning-zero-size-bu.patch b/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0001-virtio-rng-Workaround-for-FVP-returning-zero-size-bu.patch new file mode 100644 index 00000000..689361d1 --- /dev/null +++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0001-virtio-rng-Workaround-for-FVP-returning-zero-size-bu.patch @@ -0,0 +1,49 @@ +From 3ab73b453016d91b9f942a7c12173854135530a4 Mon Sep 17 00:00:00 2001 +From: Peter Hoyes +Date: Wed, 23 Aug 2023 21:17:17 +0100 +Subject: [PATCH] virtio: rng: Workaround for FVP returning zero-size buffer + +The FVP virtio-rng device is observed to always 8 fewer bytes of random +data than requested. When 8 of fewer bytes are requested, the FVP +returns 0 bytes. This causes U-Boot to hang upon attempting to fill the +last 8 bytes of the input buffer. + +The virtio spec states than entropy devices must always return at least +1 byte of random data. + +To workaround this, always request exactly 16 bytes from the virtio +device, discarding any unused data. + +Upstream-Status: Inappropriate [Temporary workaround] +Signed-off-by: Peter Hoyes +--- + drivers/virtio/virtio_rng.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/virtio/virtio_rng.c b/drivers/virtio/virtio_rng.c +index b85545c2ee5..1e4fc342406 100644 +--- a/drivers/virtio/virtio_rng.c ++++ b/drivers/virtio/virtio_rng.c +@@ -29,7 +29,7 @@ static int virtio_rng_read(struct udevice *dev, void *data, size_t len) + + while (len) { + sg.addr = buf; +- sg.length = min(len, sizeof(buf)); ++ sg.length = sizeof(buf); + sgs[0] = &sg; + + ret = virtqueue_add(priv->rng_vq, sgs, 0, 1); +@@ -44,8 +44,8 @@ static int virtio_rng_read(struct udevice *dev, void *data, size_t len) + if (rsize > sg.length) + return -EIO; + +- memcpy(ptr, buf, rsize); +- len -= rsize; ++ memcpy(ptr, buf, min(len, (size_t)rsize)); ++ len -= min(len, (size_t)rsize); + ptr += rsize; + } + +-- +2.34.1 + diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0002-vexpress64-Set-the-DM_RNG-property.patch b/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0002-vexpress64-Set-the-DM_RNG-property.patch new file mode 100644 index 00000000..2f99eaf8 --- /dev/null +++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0002-vexpress64-Set-the-DM_RNG-property.patch @@ -0,0 +1,31 @@ +From 9a28caf05b8345cd19276cf7a840599bd9e37749 Mon Sep 17 00:00:00 2001 +From: Debbie Martin +Date: Fri, 25 Aug 2023 15:09:33 +0100 +Subject: [PATCH] vexpress64: Set the DM_RNG property + +Enable the DM_RNG virtio random number generator driver in +in order to consume entropy within u-boot. This is necessary +in the case that the kernel is not configured to enable the +virtio rng driver itself. + +Upstream-Status: Pending +Signed-off-by: Debbie Martin +--- + board/armltd/vexpress64/Kconfig | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/board/armltd/vexpress64/Kconfig b/board/armltd/vexpress64/Kconfig +index cf998096e4..7ae5055f59 100644 +--- a/board/armltd/vexpress64/Kconfig ++++ b/board/armltd/vexpress64/Kconfig +@@ -21,6 +21,7 @@ config VEXPRESS64_BASE_MODEL + imply EFI_SET_TIME if DM_RTC + select LINUX_KERNEL_IMAGE_HEADER + select POSITION_INDEPENDENT ++ imply DM_RNG + + choice + prompt "VExpress64 board variant" +-- +2.25.1 + diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0003-vexpress64-Select-PSCI-RESET-by-default.patch b/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0003-vexpress64-Select-PSCI-RESET-by-default.patch new file mode 100644 index 00000000..9d9a5bdf --- /dev/null +++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0003-vexpress64-Select-PSCI-RESET-by-default.patch @@ -0,0 +1,52 @@ +From 43881e2e9dd165a65791927b1455f4b6c8727f4c Mon Sep 17 00:00:00 2001 +Message-Id: <43881e2e9dd165a65791927b1455f4b6c8727f4c.1696397516.git.diego.sueiro@arm.com> +In-Reply-To: <98035c418c3df58817ab678037599303842ee931.1696397516.git.diego.sueiro@arm.com> +References: <98035c418c3df58817ab678037599303842ee931.1696397516.git.diego.sueiro@arm.com> +From: Diego Sueiro +Date: Wed, 4 Oct 2023 06:31:50 +0100 +Subject: [PATCH 2/2] vexpress64: Select PSCI RESET by default + +Set SYSRESET and SYSRESET_PSCI config for vexpress64 by +by default. This means that the reset_cpu function in +vexpress64.c is no longer needed because it is called in +sysreset-uclass.c instead. + +Upstream-Status: Pending +Signed-off-by: Diego Sueiro +--- + board/armltd/vexpress64/Kconfig | 2 ++ + board/armltd/vexpress64/vexpress64.c | 5 ----- + 2 files changed, 2 insertions(+), 5 deletions(-) + +diff --git a/board/armltd/vexpress64/Kconfig b/board/armltd/vexpress64/Kconfig +index 0d161740fb..0c2e5f8759 100644 +--- a/board/armltd/vexpress64/Kconfig ++++ b/board/armltd/vexpress64/Kconfig +@@ -31,6 +31,8 @@ config TARGET_VEXPRESS64_BASE_FVP + bool "Support Versatile Express ARMv8a FVP BASE model" + select VEXPRESS64_BASE_MODEL + imply OF_HAS_PRIOR_STAGE ++ select SYSRESET ++ select SYSRESET_PSCI + + config TARGET_VEXPRESS64_BASER_FVP + bool "Support Versatile Express ARMv8r64 FVP BASE model" +diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c +index ee65a59683..f73de56464 100644 +--- a/board/armltd/vexpress64/vexpress64.c ++++ b/board/armltd/vexpress64/vexpress64.c +@@ -207,11 +207,6 @@ void *board_fdt_blob_setup(int *err) + } + #endif + +-/* Actual reset is done via PSCI. */ +-void reset_cpu(void) +-{ +-} +- + /* + * Board specific ethernet initialization routine. + */ +-- +2.39.1 + diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0004-vexpress64-Imply-CONFIG_ARM64_CRC32-by-default.patch b/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0004-vexpress64-Imply-CONFIG_ARM64_CRC32-by-default.patch new file mode 100644 index 00000000..3d10994b --- /dev/null +++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/0004-vexpress64-Imply-CONFIG_ARM64_CRC32-by-default.patch @@ -0,0 +1,31 @@ +From 98035c418c3df58817ab678037599303842ee931 Mon Sep 17 00:00:00 2001 +Message-Id: <98035c418c3df58817ab678037599303842ee931.1696397516.git.diego.sueiro@arm.com> +From: Diego Sueiro +Date: Wed, 4 Oct 2023 06:29:12 +0100 +Subject: [PATCH 1/2] vexpress64: Imply CONFIG_ARM64_CRC32 by default + +Enable the Arm64 CRC-32 instruction by default for +vexpress64. The CRC-32 instruction is a required +feature of ARMv8.1 and newer. + +Upstream-Status: Pending +Signed-off-by: Diego Sueiro +--- + board/armltd/vexpress64/Kconfig | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/board/armltd/vexpress64/Kconfig b/board/armltd/vexpress64/Kconfig +index 7ae5055f59..0d161740fb 100644 +--- a/board/armltd/vexpress64/Kconfig ++++ b/board/armltd/vexpress64/Kconfig +@@ -22,6 +22,7 @@ config VEXPRESS64_BASE_MODEL + select LINUX_KERNEL_IMAGE_HEADER + select POSITION_INDEPENDENT + imply DM_RNG ++ imply ARM64_CRC32 + + choice + prompt "VExpress64 board variant" +-- +2.39.1 + 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 13f4cb47..2cf42a53 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,4 +1,2 @@ CONFIG_BOOTARGS="console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda1 rw rootwait" CONFIG_BOOTCOMMAND="booti $kernel_addr_r - $fdt_addr_r" -# Our FVP support CRC instructions -CONFIG_ARM64_CRC32=y From patchwork Fri Oct 20 12:38:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Debbie Martin X-Patchwork-Id: 32645 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 52759CDB474 for ; Fri, 20 Oct 2023 12:39:48 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.53140.1697805582708342364 for ; Fri, 20 Oct 2023 05:39:42 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: arm.com, ip: 217.140.110.172, mailfrom: debbie.martin@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 402BE2F4 for ; Fri, 20 Oct 2023 05:40:23 -0700 (PDT) Received: from e127725.arm.com (unknown [10.57.36.11]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D6EE23F5A1 for ; Fri, 20 Oct 2023 05:39:41 -0700 (PDT) From: Debbie Martin To: meta-arm@lists.yoctoproject.org Subject: [PATCH 5/5] arm-bsp/fvp-base: Configure grub as the EFI provider Date: Fri, 20 Oct 2023 13:38:27 +0100 Message-Id: <20231020123827.346193-4-Debbie.Martin@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231020123827.346193-1-Debbie.Martin@arm.com> References: <20231020123827.346193-1-Debbie.Martin@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, 20 Oct 2023 12:39:48 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/5157 Configure grub as the EFI provider and remove the U-boot boot args. Signed-off-by: Debbie Martin --- meta-arm-bsp/conf/machine/fvp-base.conf | 8 +++++--- meta-arm-bsp/recipes-bsp/u-boot/u-boot-fvp-base.inc | 2 +- .../recipes-bsp/u-boot/u-boot/fvp-base/bootargs.cfg | 2 -- meta-arm-bsp/wic/fvp-base.wks | 3 --- 4 files changed, 6 insertions(+), 9 deletions(-) delete mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/bootargs.cfg delete mode 100644 meta-arm-bsp/wic/fvp-base.wks diff --git a/meta-arm-bsp/conf/machine/fvp-base.conf b/meta-arm-bsp/conf/machine/fvp-base.conf index 940a4330..d202a79f 100644 --- a/meta-arm-bsp/conf/machine/fvp-base.conf +++ b/meta-arm-bsp/conf/machine/fvp-base.conf @@ -8,9 +8,11 @@ require conf/machine/include/arm/arch-armv8a.inc TUNE_FEATURES = "aarch64" +MACHINE_FEATURES = "efi" + IMAGE_NAME_SUFFIX = "" IMAGE_FSTYPES += "wic" -WKS_FILE ?= "fvp-base.wks" +WKS_FILE ?= "efi-disk.wks.in" SERIAL_CONSOLES = "115200;ttyAMA0" @@ -23,6 +25,8 @@ EXTRA_IMAGEDEPENDS += "trusted-firmware-a" # FVP u-boot configuration UBOOT_MACHINE = "vexpress_fvp_defconfig" +EFI_PROVIDER ?= "grub-efi" + # As this is a virtual target that will not be used in the real world there is # no need for real SSH keys. MACHINE_EXTRA_RRECOMMENDS += "ssh-pregen-hostkeys" @@ -48,8 +52,6 @@ FVP_CONFIG[bp.virtioblockdevice.image_path] ?= "${IMAGE_NAME}.wic" FVP_CONFIG[cluster0.has_arm_v8-4] = "1" FVP_CONFIG[cluster1.has_arm_v8-4] = "1" FVP_CONSOLE ?= "terminal_0" -FVP_DATA ?= "cluster0.cpu0=${KERNEL_IMAGETYPE}@0x80080000 \ - cluster0.cpu0=fvp-base-revc.dtb@0x8fc00000" FVP_TERMINALS[bp.terminal_0] ?= "Console" FVP_TERMINALS[bp.terminal_1] ?= "" FVP_TERMINALS[bp.terminal_2] ?= "" diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot-fvp-base.inc b/meta-arm-bsp/recipes-bsp/u-boot/u-boot-fvp-base.inc index e1fcb1f2..b766181b 100644 --- a/meta-arm-bsp/recipes-bsp/u-boot/u-boot-fvp-base.inc +++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot-fvp-base.inc @@ -1,6 +1,6 @@ # FVP base specific U-boot support -SRC_URI:append = " file://bootargs.cfg \ +SRC_URI:append = " \ file://0001-virtio-rng-Workaround-for-FVP-returning-zero-size-bu.patch \ file://0002-vexpress64-Set-the-DM_RNG-property.patch \ file://0003-vexpress64-Select-PSCI-RESET-by-default.patch \ 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 deleted file mode 100644 index 2cf42a53..00000000 --- a/meta-arm-bsp/recipes-bsp/u-boot/u-boot/fvp-base/bootargs.cfg +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG_BOOTARGS="console=ttyAMA0 earlycon=pl011,0x1c090000 root=/dev/vda1 rw rootwait" -CONFIG_BOOTCOMMAND="booti $kernel_addr_r - $fdt_addr_r" diff --git a/meta-arm-bsp/wic/fvp-base.wks b/meta-arm-bsp/wic/fvp-base.wks deleted file mode 100644 index 8399d042..00000000 --- a/meta-arm-bsp/wic/fvp-base.wks +++ /dev/null @@ -1,3 +0,0 @@ -# For fvp-base* machines we just need to populate the rootfs partition - -part / --source rootfs --ondisk sda --fstype=ext4 --label root --align 1024 --extra-space 100