mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-01 00:45:43 +00:00
efi_loader: update secure state
Update the UEFI secure state when variable 'PK' is updated in the TEE variables implementation. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
parent
012c56ac76
commit
1a7b0f6e4e
1 changed files with 10 additions and 0 deletions
|
@ -557,6 +557,12 @@ efi_status_t efi_set_variable_int(u16 *variable_name, const efi_guid_t *vendor,
|
||||||
var_property.maxsize = var_acc->data_size;
|
var_property.maxsize = var_acc->data_size;
|
||||||
ret = set_property_int(variable_name, name_size, vendor, &var_property);
|
ret = set_property_int(variable_name, name_size, vendor, &var_property);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (alt_ret != EFI_SUCCESS)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
if (!u16_strcmp(variable_name, L"PK"))
|
||||||
|
alt_ret = efi_init_secure_state();
|
||||||
out:
|
out:
|
||||||
free(comm_buf);
|
free(comm_buf);
|
||||||
return alt_ret == EFI_SUCCESS ? ret : alt_ret;
|
return alt_ret == EFI_SUCCESS ? ret : alt_ret;
|
||||||
|
@ -716,5 +722,9 @@ efi_status_t efi_init_variables(void)
|
||||||
MM_VARIABLE_COMMUNICATE_SIZE +
|
MM_VARIABLE_COMMUNICATE_SIZE +
|
||||||
max_payload_size;
|
max_payload_size;
|
||||||
|
|
||||||
|
ret = efi_init_secure_state();
|
||||||
|
if (ret != EFI_SUCCESS)
|
||||||
|
return ret;
|
||||||
|
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue