[U-Boot] [PATCH v2 06/11] efi_loader: exit status for efi_reset_system_init
Simon Glass
sjg at chromium.org
Fri Mar 23 14:30:05 UTC 2018
On 15 February 2018 at 00:31, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
> efi_reset_system_init provides the architecture or board specific
> initialization of the EFI subsystem. Errors should be caught and
> signalled by a return code.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> ---
> v2
> new patch
> ---
> arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 4 ++--
> arch/arm/mach-bcm283x/reset.c | 4 ++--
> include/efi_loader.h | 11 ++++++++---
> lib/efi_loader/efi_runtime.c | 15 ++++++++++++---
> 4 files changed, 24 insertions(+), 10 deletions(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
Suggestion below
>
> -void efi_add_runtime_mmio(void *mmio_ptr, u64 len)
> +efi_status_t efi_add_runtime_mmio(void *mmio_ptr, u64 len)
> {
> struct efi_runtime_mmio_list *newmmio;
> + efi_status_t ret;
>
> u64 pages = (len + EFI_PAGE_MASK) >> EFI_PAGE_SHIFT;
> - efi_add_memory_map(*(uintptr_t *)mmio_ptr, pages, EFI_MMAP_IO, false);
> + ret = efi_add_memory_map(*(uintptr_t *)mmio_ptr, pages, EFI_MMAP_IO,
> + false);
> + if (ret != EFI_SUCCESS)
debug() or log() here?
> + return ret;
>
> newmmio = calloc(1, sizeof(*newmmio));
> + if (!newmmio)
> + return EFI_OUT_OF_RESOURCES;
> newmmio->ptr = mmio_ptr;
> newmmio->paddr = *(uintptr_t *)mmio_ptr;
> newmmio->len = len;
> list_add_tail(&newmmio->link, &efi_runtime_mmio);
> +
> + return ret;
> }
>
> /*
> --
> 2.15.1
>
More information about the U-Boot
mailing list