[U-Boot] [PATCH v4 1/1] vsprintf.c: add EFI device path printing

Simon Glass sjg at chromium.org
Tue Jan 16 14:56:34 UTC 2018


On 10 January 2018 at 09:06, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
> For debugging efi_loader we need the capability to print EFI
> device paths. With this patch we can write:
>
>     debug("device path: %pD", dp);
>
> A possible output would be
>
>     device path: /MemoryMapped(0x0,0x3ff93a82,0x3ff93a82)
>
> This enhancement is not available when building without EFI support
> and neither in the SPL nor in the API example.
>
> A test is provided. It can be executed in the sandbox with command
> ut_print.
>
> The development for EFI support in the sandbox is currently in
> branch u-boot-dm/efi-working. The branch currently lacks
> commit 6ea8b580f06b ("efi_loader: correct DeviceNodeToText
> for media types"). Ater rebasing the aforementioned branch on
> U-Boot v2018.01 the test is executed successfully.
>
> Without EFI support in the sandbox the test is simply skipped.
>
> Cc: Wolfgang Denk <wd at denx.de>
> Cc: Simon Glass <sjg at chromium.org>
> Suggested-by: Rob Clark <robdclark at gmail.com>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
> I propose Alex picks up this patch for the EFI tree.
>
> v4:
>         Add unit test.
> v3:
>         Return -ENOMEM if out of memory.
>         Avoid missing dependency error when building the SPL of the
>         API example.
> v2:
>         Panic if out of memory.
>         Wolfgang suggested not to silently ignore an out of memory
>         situation.
> ---
>  examples/api/Makefile |  3 +++
>  lib/vsprintf.c        | 47 +++++++++++++++++++++++++++++++++++++++++------
>  test/print_ut.c       | 37 +++++++++++++++++++++++++++++++++++++
>  3 files changed, 81 insertions(+), 6 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list