[PATCH 4/7] arm: efi: add a generic efi machine.
Ahmad Fatoum
a.fatoum at pengutronix.de
Thu Sep 4 01:20:27 PDT 2025
Hi,
On 31.08.25 05:55, chalianis1 at gmail.com wrote:
> From: Chali Anis <chalianis1 at gmail.com>
>
> add a generic arm64 machine that can select the CPU_V8 and the
> required efi payload minimal configs. this machine permits to have
> a clean arm64 efi payload, idealy we don't need the other machine
> that comes from multi arch since they execute code that is specific
> for the correspondig hardware. with this generic efi machine the
> barebox log shell is more clean. to get a pure clean efi payload
> you need to unselect all the other arch machines and keep only the
> EFI ARM64.
>
> Signed-off-by: Chali Anis <chalianis1 at gmail.com>
> ---
> arch/arm/Kconfig | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index cce71b50eb04..0a098440ddde 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -254,6 +254,18 @@ config ARCH_ZYNQMP
> select GPIOLIB
> select HAS_MACB
>
> +config EFI_ARM64
Thinking about it, this doesn't really fit into the existing model.
We have CONFIG_EFI_PAYLOAD, which when enabled gives _all_ images
an EFI stub.
I think it's better to just give CPU_V7 and CPU_V8 prompts.
Then they can be enabled for the barebones EFI-only use case alongside
CONFIG_EFI_PAYLOAD. CONFIG_EFI_PAYLOAD should have its depends on
COMPILE_TEST removed as last patch in your series then I think (or
before last if you add a dedicated efi_defconfig).
> + bool "EFI on ARM64"
Generally, we should call it EFI payload to differentiate from
EFI loader (firmware)
> + select CPU_V8
> + select CPU_SUPPORTS_64BIT_KERNEL
Symbol doesn't exist on ARM.
> + select HAVE_EFI_PAYLOAD
Already selected by CPU_64
> + select EFI_PAYLOAD
> + select BOOTM_FITIMAGE
select means it can't be deselected, which is not needed here.
> + select CLOCKSOURCE_EFI
> + select DRIVER_VIDEO_EFI_GOP
It's reasonable to disable GOP if the device is headless anyway.
You can give the DRIVER_VIDEO_EFI_GOP a default y though if you like,
because many (most?) users will likely want to use GOP.
Point is moot with above suggested change though.
> + depends on 64BIT
> + default y if ARCH_MULTIARCH
> +
> source "arch/arm/cpu/Kconfig"
> source "arch/arm/mach-at91/Kconfig"
> source "arch/arm/mach-bcm283x/Kconfig"
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list