16 Oct, 2018

1 commit


24 Sep, 2018

6 commits

  • 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
     
  • ascii2unicode() always ends the u16 string with '\0'.
    Remove redundant assignment.

    Add description for efi_str_to_u16() and ascii2unicode().

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

    Heinrich Schuchardt
     
  • Currently we assign a lot of protocols to loaded images though
    these protocols are not related to them. Instead they should be
    installed on a separate handle. Via the device path it is the
    parent to the devices like the network adapter.

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

    Heinrich Schuchardt
     
  • %s/efi_simple_input_interface/efi_simple_text_input_protocol/

    We should be consistent in the naming of the EFI protocol interface
    structures. The protocol is called EFI_SIMPLE_TEXT_INPUT_PROTOCOL.

    %s/ExtendedVerification/extended_verification/

    Use consistent naming of function parameters. Do not use CamelCase.

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

    Heinrich Schuchardt
     
  • The patch implements the EFI_UNICODE_COLLATION_PROTOCOL.

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

    Heinrich Schuchardt
     
  • Use CONFIG_IS_ENABLED(EFI_LOADER) to avoid explicitly checking CONFIG_SPL
    too. This simplifies the conditional.

    Signed-off-by: Stephen Warren
    Signed-off-by: Alexander Graf

    Stephen Warren
     

20 Aug, 2018

1 commit


25 Jul, 2018

5 commits

  • Remove unused function efi_get_time_init().

    Initialization of the RTC has to be done in board bring up not in the EFI
    subsystem.

    There is no RTC device in the UEFI spec. The RTC is only accessed through
    the runtime services.

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

    Heinrich Schuchardt
     
  • The system table contains a link to the list of configurations tables.
    These include the device tree, SMBIOS table, and the ACPI table.

    This array is currently statically linked. With the patch it is allocated
    as EFI_RUNTIME_SERVICES_DATA. Due to the structure of the system table we
    cannot work with a linked list here.

    Signed-off-by: Heinrich Schuchardt
    Reviewed-by: Bin Meng
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt
     
  • For the boot and runtime services tables and for the system table the
    crc32 has to be set in the header.

    Signed-off-by: Heinrich Schuchardt
    Reviewed-by: Bin Meng
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt
     
  • The UEFI spec requires that the memory map key is checked in
    ExitBootServices().

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

    Heinrich Schuchardt
     
  • Some times gcc may generate data that is then used within code that may
    be part of an efi runtime section. That data could be jump tables,
    constants or strings.

    In order to make sure we catch these, we need to ensure that gcc emits
    them into a section that we can relocate together with all the other
    efi runtime bits. This only works if the -ffunction-sections and
    -fdata-sections flags are passed and the efi runtime functions are
    in a section that starts with ".text".

    Up to now we had all efi runtime bits in sections that did not
    interfere with the normal section naming scheme, but this forces
    us to do so. Hence we need to move the efi_loader text/data/rodata
    sections before the global *(.text*) catch-all section.

    With this patch in place, we should hopefully have an easier time
    to extend the efi runtime functionality in the future.

    Signed-off-by: Alexander Graf
    [agraf: Fix x86_64 breakage]

    Alexander Graf
     

02 Jul, 2018

1 commit


03 Jun, 2018

2 commits


29 May, 2018

1 commit


11 May, 2018

1 commit

  • As part of the main conversion a few files were missed. These files had
    additional whitespace after the '*' and before the SPDX tag and my
    previous regex was too strict. This time I did a grep for all SPDX tags
    and then filtered out anything that matched the correct styles.

    Fixes: 83d290c56fab ("SPDX: Convert all of our single license tags to Linux Kernel style")
    Reported-by: Heinrich Schuchardt
    Signed-off-by: Tom Rini

    Tom Rini
     

24 Apr, 2018

3 commits


05 Apr, 2018

3 commits


04 Apr, 2018

11 commits


10 Feb, 2018

2 commits

  • efi_disk_register should return as status code (efi_status_t).

    Disks with zero blocks should be reported as 'not ready' without throwing
    an error.

    This patch solves a problem running OpenBSD on system configured with
    CONFIG_BLK=n (e.g. i.MX6).

    Reported-by: Jonathan Gray
    Signed-off-by: Heinrich Schuchardt
    Tested-by: Jonathan Gray
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt
     
  • Change the return type of efi_driver_init() to efi_status_t.

    efi_driver_init() calls efi_add_driver() which returns an efi_status_t
    value. efi_driver_init() should not subject this value to a conversion to
    int losing high bits on 64bit systems.

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

    Heinrich Schuchardt
     

23 Jan, 2018

3 commits

  • This patch provides
    * a uclass for EFI drivers
    * a EFI driver for block devices

    For each EFI driver the uclass
    * creates a handle
    * adds the driver binding protocol

    The uclass provides the bind, start, and stop entry points for the driver
    binding protocol.

    In bind() and stop() it checks if the controller implements the protocol
    supported by the EFI driver. In the start() function it calls the bind()
    function of the EFI driver. In the stop() function it destroys the child
    controllers.

    The EFI block driver binds to controllers implementing the block io
    protocol.

    When the bind function of the EFI block driver is called it creates a
    new U-Boot block device. It installs child handles for all partitions and
    installs the simple file protocol on these.

    The read and write functions of the EFI block driver delegate calls to the
    controller that it is bound to.

    A usage example is as following:

    U-Boot loads the iPXE snp.efi executable. iPXE connects an iSCSI drive and
    exposes a handle with the block IO protocol. It calls ConnectController.

    Now the EFI block driver installs the partitions with the simple file
    protocol.

    iPXE uses the simple file protocol to load Grub or the Linux Kernel.

    Signed-off-by: Heinrich Schuchardt
    [agraf: add comment on calloc len]
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt
     
  • In ExitBootServices we need to signal events irrespective of the current
    TPL level. A new parameter check_tpl is added to efi_signal_event().

    Function efi_console_timer_notify() gets some comments.

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

    Heinrich Schuchardt
     
  • On a block device and its partitions the same protocols can be
    installed. To tell the apart we can use the type of the last
    node of the device path which is not the end node.

    The patch provides a utility function to find this last node.

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

    Heinrich Schuchardt