01 Apr, 2020

1 commit


23 Mar, 2020

1 commit


22 Mar, 2020

8 commits


17 Mar, 2020

1 commit


11 Mar, 2020

2 commits

  • The assigned value NULL is never used.

    Signed-off-by: Heinrich Schuchardt

    Heinrich Schuchardt
     
  • Currently, if GetMemoryMap API returns EFI_BUFFER_TOO_SMALL, it doesn't
    set valid values to other parameters, descriptor_size and
    descriptor_version, except memory_map_size.
    Some efi applications, however, may use those value; in particular,
    xen uses descriptor_size to calculate a size of buffer to be allocated.

    While UEFI specification is ambiguous in this point, it would be better
    to address this issue proactively to maximize the compatibility with
    existing efi applications.

    With this patch, for example, xen.efi (and hence linux kernel) can be
    started via bootefi without modification.

    Signed-off-by: AKASHI Takahiro
    Reviewed-by: Heinrich Schuchardt

    AKASHI Takahiro
     

29 Feb, 2020

2 commits

  • 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: Ilias Apalodimas
    Signed-off-by: Heinrich Schuchardt

    Ilias Apalodimas
     
  • 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: Ilias Apalodimas
    Signed-off-by: Heinrich Schuchardt

    Ilias Apalodimas
     

27 Feb, 2020

1 commit


19 Feb, 2020

1 commit


06 Feb, 2020

4 commits


31 Jan, 2020

2 commits

  • In upstream libfdt, 6dcb8ba4 "libfdt: Add helpers for accessing
    unaligned words" introduced changes to support unaligned reads for ARM
    platforms and 11738cf01f15 "libfdt: Don't use memcpy to handle unaligned
    reads on ARM" improved the performance of these helpers.

    In practice however, this only occurs when the user has forced the
    device tree to be placed in memory in a non-aligned way, which in turn
    violates both our rules and the Linux Kernel rules for how things must
    reside in memory to function.

    This "in practice" part is important as handling these other cases adds
    visible (1 second or more) delay to boot in what would be considered the
    fast path of the code.

    Cc: Patrice CHOTARD
    Cc: Patrick DELAUNAY
    Link: https://www.spinics.net/lists/devicetree-compiler/msg02972.html
    Signed-off-by: Tom Rini
    Tested-by: Patrice Chotard

    Tom Rini
     
  • As hinted by GCC 9, there is a return statement that returns
    an uninitialized variable in optee_copy_firmware_node().
    This patch addresses this.

    Signed-off-by: Christoph Müllner
    Reviewed-by: Heiko Stuebner

    Christoph Müllner
     

26 Jan, 2020

2 commits

  • drivers/rng/sandbox_rng.c requires rand() to be defined but configuration
    option CONFIG_CONFIG_LIB_RAND selected in drivers/rng/Kconfig does not
    exist.

    test/lib/test_aes.c requires rand() to be defined.

    Fix the selection criteria for choice "Pseudo-random library support type".

    Signed-off-by: Heinrich Schuchardt

    Heinrich Schuchardt
     
  • CONFIG_SPL_RSA is meant to control if lib/rsa/* is used for SPL. Adjust
    lib/Makefile to consider this setting.

    This was correctly setup with commit 51c14cd128f4 ("verified-boot: Minimal
    support for booting U-Boot proper from SPL") and got lost with commit
    089df18bfe9d ("lib: move hash CONFIG options to Kconfig").

    Fixes: 089df18bfe9d ("lib: move hash CONFIG options to Kconfig")
    Signed-off-by: Heinrich Schuchardt

    Heinrich Schuchardt
     

23 Jan, 2020

2 commits


18 Jan, 2020

5 commits


17 Jan, 2020

4 commits


15 Jan, 2020

4 commits