mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
efi_loader: create handles from normal memory
Handles are not used at runtime. They are freed by the firmware when the last protocol interface is uninstalled. So there is no reason to use EFI memory when creating handles. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
3282614081
commit
d29e7824d7
1 changed files with 6 additions and 7 deletions
|
@ -431,16 +431,15 @@ void efi_add_handle(struct efi_object *obj)
|
|||
efi_status_t efi_create_handle(efi_handle_t *handle)
|
||||
{
|
||||
struct efi_object *obj;
|
||||
efi_status_t r;
|
||||
|
||||
r = efi_allocate_pool(EFI_ALLOCATE_ANY_PAGES,
|
||||
sizeof(struct efi_object),
|
||||
(void **)&obj);
|
||||
if (r != EFI_SUCCESS)
|
||||
return r;
|
||||
obj = calloc(1, sizeof(struct efi_object));
|
||||
if (!obj)
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
|
||||
efi_add_handle(obj);
|
||||
*handle = obj->handle;
|
||||
return r;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue