diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2018-03-03 15:28:59 +0100 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2018-04-04 11:00:06 +0200 |
commit | 22c793e6a26505fdf80cb5b099142dd6f8f0fff9 (patch) | |
tree | aa7c248ef8df34d27514b26b20cb5e06b6a83a6b /lib/efi_loader/efi_runtime.c | |
parent | 098a6cdd1cc519f6c75b5e5de91c6655500a188a (diff) | |
download | u-boot-22c793e6a26505fdf80cb5b099142dd6f8f0fff9.tar.gz u-boot-22c793e6a26505fdf80cb5b099142dd6f8f0fff9.tar.bz2 u-boot-22c793e6a26505fdf80cb5b099142dd6f8f0fff9.zip |
efi_loader: exit status for efi_reset_system_init
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@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'lib/efi_loader/efi_runtime.c')
-rw-r--r-- | lib/efi_loader/efi_runtime.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c index ccb4fc6141..85f85711dd 100644 --- a/lib/efi_loader/efi_runtime.c +++ b/lib/efi_loader/efi_runtime.c @@ -134,8 +134,9 @@ void __weak __efi_runtime EFIAPI efi_reset_system( while (1) { } } -void __weak efi_reset_system_init(void) +efi_status_t __weak efi_reset_system_init(void) { + return EFI_SUCCESS; } efi_status_t __weak __efi_runtime EFIAPI efi_get_time( @@ -332,18 +333,26 @@ static efi_status_t EFIAPI efi_set_virtual_address_map( return EFI_EXIT(EFI_INVALID_PARAMETER); } -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) + 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; } /* |