From: Masahisa Kojima <masahisa.kojima@linaro.org>
To: Ard Biesheuvel <ardb@kernel.org>,
Jens Wiklander <jens.wiklander@linaro.org>,
Sumit Garg <sumit.garg@linaro.org>,
linux-kernel@vger.kernel.org, op-tee@lists.trustedfirmware.org
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Johan Hovold <johan+linaro@kernel.org>,
Masahisa Kojima <masahisa.kojima@linaro.org>,
linux-efi@vger.kernel.org
Subject: [PATCH v5 1/3] efi: expose efivar generic ops register function
Date: Fri, 26 May 2023 10:07:45 +0900 [thread overview]
Message-ID: <20230526010748.1222-2-masahisa.kojima@linaro.org> (raw)
In-Reply-To: <20230526010748.1222-1-masahisa.kojima@linaro.org>
This is a preparation for supporting efivar operations
provided by other than efi subsystem.
Both register and unregister functions are exposed
so that non-efi subsystem can revert the efi generic
operation.
Acked-by: Sumit Garg <sumit.garg@linaro.org>
Co-developed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
---
drivers/firmware/efi/efi.c | 12 ++++++++++++
include/linux/efi.h | 3 +++
2 files changed, 15 insertions(+)
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index d0dfa007bffc..d108cf03e19d 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -228,6 +228,18 @@ static void generic_ops_unregister(void)
efivars_unregister(&generic_efivars);
}
+void efivars_generic_ops_register(void)
+{
+ generic_ops_register();
+}
+EXPORT_SYMBOL_GPL(efivars_generic_ops_register);
+
+void efivars_generic_ops_unregister(void)
+{
+ generic_ops_unregister();
+}
+EXPORT_SYMBOL_GPL(efivars_generic_ops_unregister);
+
#ifdef CONFIG_EFI_CUSTOM_SSDT_OVERLAYS
#define EFIVAR_SSDT_NAME_MAX 16UL
static char efivar_ssdt[EFIVAR_SSDT_NAME_MAX] __initdata;
diff --git a/include/linux/efi.h b/include/linux/efi.h
index bed3c92cbc31..b8ba9c5adc7a 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -1349,4 +1349,7 @@ bool efi_config_table_is_usable(const efi_guid_t *guid, unsigned long table)
return xen_efi_config_table_is_usable(guid, table);
}
+void efivars_generic_ops_register(void);
+void efivars_generic_ops_unregister(void);
+
#endif /* _LINUX_EFI_H */
--
2.30.2
next prev parent reply other threads:[~2023-05-26 1:09 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-26 1:07 [PATCH v5 0/3] introduce tee-based EFI Runtime Variable Service Masahisa Kojima
2023-05-26 1:07 ` Masahisa Kojima [this message]
2023-05-26 1:07 ` [PATCH v5 2/3] efi: Add EFI_ACCESS_DENIED status code Masahisa Kojima
2023-05-26 1:07 ` [PATCH v5 3/3] efi: Add tee-based EFI variable driver Masahisa Kojima
2023-06-06 6:39 ` Jan Kiszka
2023-06-06 6:51 ` Sumit Garg
2023-06-06 6:57 ` Ard Biesheuvel
2023-06-06 7:51 ` Sumit Garg
2023-06-06 7:52 ` Jan Kiszka
2023-06-07 6:34 ` Ilias Apalodimas
2023-06-07 6:35 ` Ilias Apalodimas
2023-06-07 7:25 ` Sumit Garg
2023-06-07 8:25 ` Ilias Apalodimas
2023-06-07 12:40 ` Jan Kiszka
2023-06-07 15:18 ` Sumit Garg
2023-06-07 16:04 ` Jan Kiszka
2023-06-07 16:09 ` Ilias Apalodimas
2023-06-07 16:59 ` Ilias Apalodimas
2023-06-07 17:14 ` Jan Kiszka
2023-06-07 18:17 ` Ilias Apalodimas
2023-06-07 19:46 ` Jan Kiszka
2023-06-08 6:21 ` Ilias Apalodimas
2023-06-08 13:52 ` Ard Biesheuvel
2023-06-08 19:38 ` Ilias Apalodimas
2023-06-09 6:18 ` Jan Kiszka
2023-06-09 6:34 ` Ilias Apalodimas
2023-06-09 6:40 ` Jan Kiszka
2023-06-09 8:00 ` Ilias Apalodimas
2023-06-09 6:16 ` Jan Kiszka
2023-06-09 6:22 ` Ilias Apalodimas
2023-06-09 6:36 ` Jan Kiszka
2023-05-26 13:09 ` [PATCH v5 0/3] introduce tee-based EFI Runtime Variable Service Ard Biesheuvel
2023-05-29 9:05 ` Jens Wiklander
2023-05-29 13:29 ` Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230526010748.1222-2-masahisa.kojima@linaro.org \
--to=masahisa.kojima@linaro.org \
--cc=ardb@kernel.org \
--cc=ilias.apalodimas@linaro.org \
--cc=jens.wiklander@linaro.org \
--cc=johan+linaro@kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=op-tee@lists.trustedfirmware.org \
--cc=sumit.garg@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®