[U-Boot] [PATCH 1/1] efi_loader: create handles from normal memory
Heinrich Schuchardt
xypron.glpk at gmx.de
Sun Jun 3 14:02:43 UTC 2018
On 06/03/2018 03:23 PM, Alexander Graf wrote:
>
>
> On 27.05.18 16:47, Heinrich Schuchardt wrote:
>> 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 at gmx.de>
>
> I agree that efi object structs are supposed to be opaque and thus we
> can use any allocation mechanism we like.
>
> What I also see is that efi_delete_handle() even calls free() on
> objects, so spawning them from efi memory rather than malloc memory is
> also just wrong.
The bit that is missing is to call efi_delete_handle() when the last
protocol interface is uninstalled. Before doing so we must ensure that
no static memory is used and the first element of the handles is an
efi_obj. I did not yet check if we reached that point.
Best regards
Heinrich
>
> In short, I think your patch is completely correct :).
>
>
> Alex
>
>
More information about the U-Boot
mailing list