diff mbox series

[U-Boot,RFC,v4,15/16] env, efi_loader: define flags for well-known global UEFI variables

Message ID 20190717082525.891-16-takahiro.akashi@linaro.org
State RFC
Delegated to: Heinrich Schuchardt
Headers show
Series efi_loader: non-volatile variables support | expand

Commit Message

AKASHI Takahiro July 17, 2019, 8:25 a.m. UTC
Those global UEFI variables are well defined in UEFI specification,
and their attributes in U-Boot environment should be enforced with
specific values.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
 include/env_flags.h | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
diff mbox series

Patch

diff --git a/include/env_flags.h b/include/env_flags.h
index 15391a28de77..184a42a2990a 100644
--- a/include/env_flags.h
+++ b/include/env_flags.h
@@ -78,10 +78,27 @@  enum env_flags_varstorage {
 #define SERIAL_FLAGS ""
 #endif
 
+#ifdef CONFIG_EFI_VARIABLE_USE_ENV
+	/* All the values are stringified in hex representation */
+#define UEFI_FLAGS \
+	"efi_Boot[0-9A-F]*_8be4df61-93ca-11d2-aa-0d-00-e0-98-03-2b-8c:san," \
+	"efi_BootCurrent_8be4df61-93ca-11d2-aa-0d-00-e0-98-03-2b-8c:sav," \
+	"efi_BootNext_8be4df61-93ca-11d2-aa-0d-00-e0-98-03-2b-8c:san," \
+	"efi_BootOrder_8be4df61-93ca-11d2-aa-0d-00-e0-98-03-2b-8c:san," \
+	"efi_OsIndications_8be4df61-93ca-11d2-aa-0d-00-e0-98-03-2b-8c:san," \
+	"efi_OsIndicationsSupported_8be4df61-93ca-11d2-aa-0d-00-e0-98-03-2b-8c:sav," \
+	"efi_PlatfromLang_8be4df61-93ca-11d2-aa-0d-00-e0-98-03-2b-8c:san," \
+	"efi_PlatfromLangCodes_8be4df61-93ca-11d2-aa-0d-00-e0-98-03-2b-8c:sav," \
+	"efi_RuntimeServicesSupported_8be4df61-93ca-11d2-aa-0d-00-e0-98-03-2b-8c:srv,"
+#else
+#define UEFI_FLAGS ""
+#endif
+
 #define ENV_FLAGS_LIST_STATIC \
 	ETHADDR_FLAGS \
 	NET_FLAGS \
 	SERIAL_FLAGS \
+	UEFI_FLAGS \
 	CONFIG_ENV_FLAGS_LIST_STATIC
 
 #ifdef CONFIG_CMD_ENV_FLAGS