05 Mar, 2018

1 commit

  • Thomas reported U-Boot failed to build host tools if libfdt-devel
    package is installed because tools include libfdt headers from
    /usr/include/ instead of using internal ones.

    This commit moves the header code:
    include/libfdt.h -> include/linux/libfdt.h
    include/libfdt_env.h -> include/linux/libfdt_env.h

    and replaces include directives:
    #include -> #include
    #include -> #include

    Reported-by: Thomas Petazzoni
    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

28 Feb, 2018

1 commit


10 Feb, 2018

5 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
     
  • Add stubs for UpdateCapsule, QueryCapsuleCapabilities, and
    QueryVariableInfo.

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

    Heinrich Schuchardt
     
  • Currently the UEFI revision number in the system table header is set to
    2.0.5. This version number does not refer to any existing version of the
    UEFI standard.

    Set the revision number to 2.7.

    Signed-off-by: Heinrich Schuchardt
    Reviewed-by: Mark Kettenis
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt
     
  • Currently we set the function pointer for the CreateEventEx boot service
    to NULL. When called this would lead to an immediate failure.

    A function stub is provided which handles the case that the boot service
    is called without an event group and returns EFI_UNSUPPORTED otherwise.

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

    Heinrich Schuchardt
     
  • Before the patch an undefined constant EFI_SUBSYSTEM was used in the
    crt0 code. The current version of binutils does not swallow the error.

    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=888403

    The necessary constant IMAGE_SUBSYSTEM_EFI_APPLICATION is already
    defined in pe.h. So let's factor out asm-generic/pe.h for the
    image subsystem constants and use it in our assembler code.

    IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER does not exist in the specification
    let's use IMAGE_SUBSYSTEM_EFI_ROM instead.

    The include pe.h is only used in code maintained by Alex so let him be the
    maintainer here too.

    Reported-by: Andre Przywara
    Signed-off-by: Heinrich Schuchardt
    Tested-by: Vagrant Cascadian
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt
     

09 Feb, 2018

2 commits

  • config_fallbacks.h has some logic that sets HAVE_BLOCK_DEVICE
    based on a list of enabled options. Moving HAVE_BLOCK_DEVICE to
    Kconfig allows us to drastically shrink the logic in
    config_fallbacks.h

    Signed-off-by: Adam Ford
    [trini: Rename HAVE_BLOCK_DEVICE to CONFIG_BLOCK_DEVICE]
    Signed-off-by: Tom Rini

    Adam Ford
     
  • config_fallback.h has some logic that checks a variety of options
    and selects LIB_UUID if it hasn't already been selected. This
    will all LIB_UUID in Kconfig and select this option for the list
    of options to allow us to remove the logic from fallbacks

    Signed-off-by: Adam Ford

    Adam Ford
     

29 Jan, 2018

6 commits

  • Now that we have %pD support in vsprintf we should avoid separate
    logic for printing device paths in other places.

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

    Heinrich Schuchardt
     
  • In an image is loaded from memory we do not have a device path.
    Do not install NULL as device path in this case.

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

    Heinrich Schuchardt
     
  • When a UEFI payload just returns instead of calling the Exit() callback,
    we handle that in efi_do_enter() and call Exit on its behalf, so that
    the loaded_image->exit_status value is correct.

    We were missing that logic in StartImage(). Call it there too.

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

    Alexander Graf
     
  • Provide a better description for indent_string.
    Fix a typo.

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

    Heinrich Schuchardt
     
  • EFI calls are usually defined as asmlinkage. That means we pass all parameters
    to functions via the stack x86_32.

    On x86_64 however, we need to also stick to the MS ABI calling conventions,
    which the EFIAPI define conveniently handles for us. Most EFI functions were
    also marked with EFIAPI, except for the entry call.

    So this patch adjusts all entry calls to use EFIAPI instead of the manual
    asmlinkage attribute.

    While at it, we also change the prototype of the entry point to return
    efi_status_t instead of ulong, as this is the correct prototype definition.

    Signed-off-by: Alexander Graf

    ---

    v1 -> v2:

    - Use efi_status_t in all occurences

    Alexander Graf
     
  • We have 2 users of the EFI headers: efi_loader and the EFI stub. Efi_loader
    always expects that the bitness of the definitions it uses is identical to
    the execution.

    The EFI stub however allows to run x86_64 U-Boot on 32bit EFI and the other
    way around, so it allows for different bitness of EFI definitions and U-Boot
    environment.

    This patch explicitly requests via Kconfig that efi_loader can only be enabled
    if the bitness is identical. Because we can run efi_loader on x86_64 without
    EFI stub enabled, it also ensures that this case propagates the correct ABI
    constraints.

    Signed-off-by: Alexander Graf

    Alexander Graf
     

23 Jan, 2018

25 commits