Skip to content
Snippets Groups Projects
  1. Feb 28, 2020
    • Heinrich Schuchardt's avatar
      doc/efi: add load file 2 protocol to HTML documentation · 71a7de44
      Heinrich Schuchardt authored
      
      The load file 2 protocol can be used by the Linux kernel to load the initial
      RAM disk. U-Boot can be configured to provide an implementation.
      
      Add a description to the UEFI overview and document the related functions
      in the API section.
      
      Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      71a7de44
    • Ilias Apalodimas's avatar
      efi_selftest: add selftests for loadfile2 used to load initramfs · 479ab6c1
      Ilias Apalodimas authored
      
      Provide a unit test loading an initial ramdisk using the
      EFI_LOAD_FILE2_PROTOCOL. The test is only executed on request.
      
      An example usage - given a file image with a file system in partition 1
      holding file initrd - is:
      
      * Configure the sandbox with
      
        CONFIG_EFI_SELFTEST=y
        CONFIG_EFI_LOAD_FILE2_INITRD=y
        CONFIG_EFI_INITRD_FILESPEC="host 0:1 initrd"
      
      * Run ./u-boot and execute
      
          host bind 0 image
          setenv efi_selftest load initrd
          bootefi selftest
      
      This would provide a test output like:
      
          Testing EFI API implementation
      
          Selected test: 'load initrd'
      
          Setting up 'load initrd'
          Setting up 'load initrd' succeeded
      
          Executing 'load initrd'
          Loaded 12378613 bytes
          CRC32 2997478465
          Executing 'load initrd' succeeded
      
      Now the size and CRC32 can be compared to the provided file.
      
      Signed-off-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
      Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      479ab6c1
    • Ilias Apalodimas's avatar
      efi_loader: Implement FileLoad2 for initramfs loading · ec80b473
      Ilias Apalodimas authored
      Following kernel's proposal for an arch-agnostic initrd loading
      mechanism [1] let's implement the U-boot counterpart.
      This new approach has a number of advantages compared to what we did up
      to now. The file is loaded into memory only when requested limiting the
      area of TOCTOU attacks. Users will be allowed to place the initramfs
      file on any u-boot accessible partition instead of just the ESP one.
      Finally this is an attempt of a generic interface across architectures
      in the linux kernel so it makes sense to support that.
      
      The file location is intentionally only supported as a config option
      argument(CONFIG_EFI_INITRD_FILESPEC), in an effort to enhance security.
      Although U-boot is not responsible for verifying the integrity of the
      initramfs, we can enhance the offered security by only accepting a
      built-in option, which will be naturally verified by UEFI Secure Boot.
      This can easily change in the future if needed and configure that via ENV
      or UEFI variable.
      
      [1] https://lore.kernel.org/linux-efi/20200207202637.GA3464906@rani.riverdale.lan/T/#m4a25eb33112fab7a22faa0fd65d4d663209af32f
      
      
      
      Signed-off-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
      Signed-off-by: default avatarHeinrich Schuchardt <xypron.glpk@gmx.de>
      ec80b473
  2. Feb 27, 2020
  3. Feb 26, 2020
  4. Feb 25, 2020
  5. Feb 24, 2020
  6. Feb 21, 2020
  7. Feb 20, 2020
Loading