[U-Boot] [RFC] efi_loader: EFI variables

Alexander Graf agraf at suse.de
Tue Feb 12 09:49:09 UTC 2019


On 02/03/2019 07:32 PM, Heinrich Schuchardt wrote:
> Hello Alex, hello Takahiro,
>
> this morning I met Daniel Thompson of Linaro. He thinks it would be 
> quite valuable if U-Boot would at least offer read access to EFI 
> variables at runtime.
>
> I think what it takes is only a RAM buffer that we put between our 
> current storage backend (i.e. synchronization with U-Boot variables) 
> and the API implementation.
>
> We will need such a buffer anyway for non-permanent variables once we 
> have a SPI flash storage.

I think slowly we need to take a critical design decision: Do we want to 
be in the business of managing runtime UEFI variables?

I don't have a fully cohesive answer to that yet. My gut feeling tells 
me, that runtime variables would be much better off if they lived in 
TrustZone. That way we don't have to play relocation tricks, and devices 
that give you persistency are owned by the secure world anyway, so there 
is no weird intersection between OS and RTS.

So maybe the path forward would be to implement variable services in ATF 
(or OP-TEE rather I suppose) and just provide shim stubs to communicate 
with them from runtime services? That would keep all the variable logic 
platform agnostic, and we would not have to jump through weird hoops 
with DM.


Alex



More information about the U-Boot mailing list