• Ard Biesheuvel's avatar
    efi/libstub/arm: Add opt-in Kconfig option for the DTB loader · 3d7ee348
    Ard Biesheuvel authored
    There are various ways a platform can provide a device tree binary
    to the kernel, with different levels of sophistication:
    
    - ideally, the UEFI firmware, which is tightly coupled with the
      platform, provides a device tree image directly as a UEFI
      configuration table, and typically permits the contents to be
      manipulated either via menu options or via UEFI environment
      variables that specify a replacement image,
    
    - GRUB for ARM has a 'devicetree' directive which allows a device
      tree image to be loaded from any location accessible to GRUB, and
      supersede the one provided by the firmware,
    
    - the EFI stub implements a dtb= command line option that allows a
      device tree image to be loaded from a file residing in the same
      file system as the one the kernel image was loaded from.
    
    The dtb= command line option was never intended to be more than a
    development feature, to allow the other options to be implemented
    in parallel. So let's make it an opt-in feature that is disabled
    by default, but can be re-enabled at will.
    
    Note that we already disable the dtb= command line option when we
    detect that we are running with UEFI Secure Boot enabled.
    Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
    Reviewed-by: default avatarAlexander Graf <agraf@suse.de>
    Acked-by: default avatarLeif Lindholm <leif.lindholm@linaro.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: linux-efi@vger.kernel.org
    Link: http://lkml.kernel.org/r/20180711094040.12506-7-ard.biesheuvel@linaro.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    3d7ee348
arm-stub.c 12.1 KB