[PATCH v2 1/1] efi_loader: prepare for read only OP-TEE variables

Heinrich Schuchardt xypron.glpk at gmx.de
Wed Jun 24 07:51:42 CEST 2020


On 6/23/20 1:44 AM, AKASHI Takahiro wrote:
> On Mon, Jun 22, 2020 at 06:10:27PM +0200, Heinrich Schuchardt wrote:
>> We currently have two implementations of UEFI variables:
>>
>> * variables provided via an OP-TEE module
>> * variables stored in the U-Boot environment
>>
>> Read only variables are up to now only implemented in the U-Boot
>> environment implementation.
>>
>> Provide a common interface for both implementations that allows handling
>> read-only variables.
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
>> ---
>> v2:
>> 	add missing efi_variable.h
>> 	consider attributes==NULL in efi_variable_get()
>> ---
>>  include/efi_variable.h               |  40 +++++++
>>  lib/efi_loader/Makefile              |   1 +
>>  lib/efi_loader/efi_variable.c        | 171 ++++++++-------------------
>>  lib/efi_loader/efi_variable_common.c |  79 +++++++++++++
>>  lib/efi_loader/efi_variable_tee.c    |  75 ++++--------
>>  5 files changed, 188 insertions(+), 178 deletions(-)
>>  create mode 100644 include/efi_variable.h
>>  create mode 100644 lib/efi_loader/efi_variable_common.c
>>
>> diff --git a/include/efi_variable.h b/include/efi_variable.h
>> new file mode 100644
>> index 0000000000..784dbd9cf4
>> --- /dev/null
>> +++ b/include/efi_variable.h
>
> I think that all the stuff here should be put in efi_loader.h.
> I don't see any benefit of having a separate header.
>
>

This is more or less a question of taste. My motivation is:

* efi_loader.h is rather large (805 lines).
* Other variable functions will be added.
* The functions defined here are used only in very few places
  while efi_loader.h is included in 57 files.

Best regards

Heinrich


More information about the U-Boot mailing list