#include "mm_communication.h"
static struct efivars tee_efivars;
-static struct efivar_operations tee_efivar_ops;
static size_t max_buffer_size; /* comm + var + func + data */
static size_t max_payload_size; /* func + data */
efivars_generic_ops_register();
}
+static const struct efivar_operations tee_efivar_ops = {
+ .get_variable = tee_get_variable,
+ .get_next_variable = tee_get_next_variable,
+ .set_variable = tee_set_variable,
+ .set_variable_nonblocking = tee_set_variable_nonblocking,
+ .query_variable_store = efi_query_variable_store,
+ .query_variable_info = tee_query_variable_info,
+};
+
static int tee_stmm_efi_probe(struct tee_client_device *tee_dev)
{
struct device *dev = &tee_dev->dev;
MM_VARIABLE_COMMUNICATE_SIZE +
max_payload_size;
- tee_efivar_ops.get_variable = tee_get_variable;
- tee_efivar_ops.get_next_variable = tee_get_next_variable;
- tee_efivar_ops.set_variable = tee_set_variable;
- tee_efivar_ops.set_variable_nonblocking = tee_set_variable_nonblocking;
- tee_efivar_ops.query_variable_store = efi_query_variable_store;
- tee_efivar_ops.query_variable_info = tee_query_variable_info;
-
efivars_generic_ops_unregister();
pr_info("Using TEE-based EFI runtime variable services\n");
efivars_register(&tee_efivars, &tee_efivar_ops);