arm: mach-qemu: add support for boot from TF-A.
Subsystems (2)
PATCH 1/1 arm: mach-qemu: add support for boot from TF-A.
From: Chali Anis <[email protected]>
add support for boot from Arm Trusted Firmware for qemu aarch64 permits to exprement TF-A boot, Tested on qemu-system-aarch64.
--- arch/arm/mach-qemu/Kconfig | 1 + board/emulation/common/qemu_mtdparts.c | 2 ++ 2 files changed, 3 insertions(+)
arch/arm/mach-qemu/Kconfig +1 -0
@@ -18,6 +18,7 @@ config TARGET_QEMU_ARM_64BIT bool "ARMv8, 64bit" select ARM64 select BOARD_LATE_INIT + select ARCH_SUPPORT_TFABOOT config TARGET_QEMU_ARM_SBSA bool "SBSA Reference"
board/emulation/common/qemu_mtdparts.c +2 -0
@@ -59,6 +59,7 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts)debug ("mtd device = %s\n" , dev->name); } +#ifndef CONFIG_TFABOOT mtd =get_mtd_device_nm ("nor0" );if (!IS_ERR_OR_NULL (mtd)) { mtd_partition =CONFIG_MTDPARTS_NOR0 ;
@@ -72,6 +73,7 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts)board_get_mtdparts ("nor1" , mtd_partition, ids, parts); put_mtd_device(mtd); } +#endif } mtd_initialized = true;
Signature · 1 line
2.34.1
Hi,
Quoted 12 lines · On Wed, 10 Sept 2025 at 04:19, <[email protected]> wrote:
From: Chali Anis <[email protected]>
add support for boot from Arm Trusted Firmware for qemu aarch64 permits to exprement TF-A boot, Tested on qemu-system-aarch64.
Signed-off-by Chali Anis <[email protected]>--- arch/arm/mach-qemu/Kconfig | 1 + board/emulation/common/qemu_mtdparts.c | 2 ++ 2 files changed, 3 insertions(+)
The change to skip NOR flash partition setup under TFABOOT looks reasonable, since in TF-A boot flow the storage layout should be handled via FIP/TF-A.
But the commit message is a bit too vague, is it the final change and qemu_arm64 is now sufficient to declare ARCH_SUPPORT_TFABOOT? If yes, please state it in the commit message.
And please also explicitly describe what the patch did, like "skip NOR flash partition setup for boot from TF-A".
Regards,
Raymond
Quoted 35 lines
arch/arm/mach-qemu/Kconfig +1
-0@@ -18,6 +18,7 @@ config TARGET_QEMU_ARM_64BIT bool "ARMv8, 64bit" select ARM64 select BOARD_LATE_INIT + select ARCH_SUPPORT_TFABOOT config TARGET_QEMU_ARM_SBSA bool "SBSA Reference"board/emulation/common/qemu_mtdparts.c +2
-1@@ -59,6 +59,7 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts)debug ("mtd device = %s\n" , dev->name); } +#ifndef CONFIG_TFABOOT mtd =get_mtd_device_nm ("nor0" );if (!IS_ERR_OR_NULL (mtd)) { mtd_partition =CONFIG_MTDPARTS_NOR0 ;@@ -72,6 +73,7 @@ void board_mtdparts_default(const char **mtdids, const char **mtdparts)board_get_mtdparts ("nor1" , mtd_partition, ids, parts); put_mtd_device(mtd); } +#endif } mtd_initialized = true; --2.34.1