23 Mar, 2020

1 commit


17 Mar, 2020

3 commits


29 Feb, 2020

1 commit

  • 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


06 Oct, 2019

1 commit

  • This allows our EFI API to create a device path node for NVMe
    devices. It adds the necessary device path struct, uses the
    nvme namespace accessor to retrieve the id and eui64, and also
    provides support for the device path text protocol.

    Signed-off-by: Patrick Wildt
    Tested-by: Heinrich Schuchardt
    Reviewed-by: Heinrich Schuchardt

    Patrick Wildt
     

09 Sep, 2019

2 commits


06 Sep, 2019

2 commits


16 Aug, 2019

1 commit

  • U-Boot implements the EFI_PXE_BASE_CODE_PROTOCOL because GRUB uses the mode
    information for booting via PXE. All function pointers in the protocol were
    NULL up to now which will cause immediate crashes when the services of the
    protocol are called.

    Create function stubs for all services of the protocol returning
    EFI_UNSUPPORTED.

    Signed-off-by: Heinrich Schuchardt

    Heinrich Schuchardt
     

31 Jul, 2019

1 commit


07 Jul, 2019

1 commit


29 Jun, 2019

1 commit


21 Jun, 2019

1 commit


15 Jun, 2019

1 commit

  • This variable is defined in UEFI specification 2.8, section 8.1.
    Its value should be updated whenever we add any usable runtime services
    function.

    Currently we only support SetVirtualAddress() for all systems and
    ResetSystem() for some.

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

    AKASHI Takahiro
     

19 May, 2019

2 commits


08 May, 2019

2 commits


23 Apr, 2019

1 commit

  • We should consistently use the same name for protocol GUIDs as defined in
    the UEFI specification. Not adhering to this rule has led to duplicate
    definitions for the EFI_LOADED_IMAGE_PROTOCOL_GUID.

    Adjust misnamed protocol GUIDs.

    Adjust the text for the graphics output protocol in the output of the
    `efidebug dh` command.

    Signed-off-by: Heinrich Schuchardt

    Heinrich Schuchardt
     

07 Apr, 2019

1 commit


28 Mar, 2019

1 commit


25 Feb, 2019

1 commit


13 Feb, 2019

10 commits


03 Dec, 2018

3 commits


16 Oct, 2018

1 commit

  • The UEFI spec requires that file positions are passed as u64 in
    GetPosition() and SetPosition().

    Check if the file handle points to a directory in GetPosition().

    Provide a unit test for GetPosition() and SetPosition().

    Fix Coverity warning CID 184079 (CONSTANT_EXPRESSION_RESULT).

    Add comments.

    Fixes: b6dd57773719 ("efi_loader: use correct types in EFI_FILE_PROTOCOL")
    Signed-off-by: Heinrich Schuchardt
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt
     

24 Sep, 2018

1 commit

  • Create the handle of loaded images and the EFI_LOADED_IMAGE_PROTOCOL
    inside efi_setup_loaded_image(). Do not use local variables.

    Currently we expect the loaded image handle to point to the loaded image
    protocol. Additionally we have appended private fields to the protocol.

    With the patch the handle points to a loaded image object and the private
    fields are added here. This matches how we handle the net and the gop
    object.

    Signed-off-by: Heinrich Schuchardt
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt