diff mbox series

[U-Boot,v8,2/8] efi_loader: define load option attributes

Message ID 20190222081014.2117-3-takahiro.akashi@linaro.org
State Superseded
Delegated to: Heinrich Schuchardt
Headers show
Series cmd: add efidebug for efi environment | expand

Commit Message

AKASHI Takahiro Feb. 22, 2019, 8:10 a.m. UTC
See UEFI specification v2.7a, section 3.1.3, "Load Option Processing."

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
 include/efi_api.h            | 9 +++++++++
 lib/efi_loader/efi_bootmgr.c | 4 ----
 2 files changed, 9 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/include/efi_api.h b/include/efi_api.h
index 45ca05e8ac69..ccf608653d4a 100644
--- a/include/efi_api.h
+++ b/include/efi_api.h
@@ -1438,4 +1438,13 @@  struct efi_unicode_collation_protocol {
 	char *supported_languages;
 };
 
+/* Boot manager load options */
+#define LOAD_OPTION_ACTIVE		0x00000001
+#define LOAD_OPTION_FORCE_RECONNECT	0x00000002
+#define LOAD_OPTION_HIDDEN		0x00000008
+/* All values 0x00000200-0x00001F00 are reserved */
+#define LOAD_OPTION_CATEGORY		0x00001F00
+#define LOAD_OPTION_CATEGORY_BOOT	0x00000000
+#define LOAD_OPTION_CATEGORY_APP	0x00000100
+
 #endif
diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c
index 196116b54729..8bb84f888c12 100644
--- a/lib/efi_loader/efi_bootmgr.c
+++ b/lib/efi_loader/efi_bootmgr.c
@@ -14,10 +14,6 @@ 
 static const struct efi_boot_services *bs;
 static const struct efi_runtime_services *rs;
 
-#define LOAD_OPTION_ACTIVE		0x00000001
-#define LOAD_OPTION_FORCE_RECONNECT	0x00000002
-#define LOAD_OPTION_HIDDEN		0x00000008
-
 /*
  * bootmgr implements the logic of trying to find a payload to boot
  * based on the BootOrder + BootXXXX variables, and then loading it.