summaryrefslogtreecommitdiff
path: root/include/efi_loader.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-05-08 09:20:04 -0400
committerTom Rini <trini@konsulko.com>2019-05-08 09:20:04 -0400
commitd4c352138c266d618677778a40a846946ec1af1c (patch)
treebdb960d0e9b457510a48ae97d8ba20d20edd3d97 /include/efi_loader.h
parent8d7f06bbbef16f172cd5e9c4923cdcebe16b8980 (diff)
parentb015ab57bf558daa1c768995a7a7f1df2d40191e (diff)
Merge tag 'efi-2019-07-rc2-2' of git://git.denx.de/u-boot-efi
Pull request for UEFI sub-system for v2019.07-rc2 (2) Fix a bunch of errors in the UEFI sub-system: * implement missing UnloadImage(), * implement missing RegisterProtocolNotify(), * unload images in Exit(), * parameter checks. Provide a unit test for UnloadImage(). Remove a redundant function for unit tests. Clean up the UEFI sub-system initialization
Diffstat (limited to 'include/efi_loader.h')
-rw-r--r--include/efi_loader.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 7af3f16ef84..07ef14ba1cd 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -180,6 +180,19 @@ struct efi_handler {
};
/**
+ * enum efi_object_type - type of EFI object
+ *
+ * In UnloadImage we must be able to identify if the handle relates to a
+ * started image.
+ */
+enum efi_object_type {
+ EFI_OBJECT_TYPE_UNDEFINED = 0,
+ EFI_OBJECT_TYPE_U_BOOT_FIRMWARE,
+ EFI_OBJECT_TYPE_LOADED_IMAGE,
+ EFI_OBJECT_TYPE_STARTED_IMAGE,
+};
+
+/**
* struct efi_object - dereferenced EFI handle
*
* @link: pointers to put the handle into a linked list
@@ -201,6 +214,7 @@ struct efi_object {
struct list_head link;
/* The list of protocols */
struct list_head protocols;
+ enum efi_object_type type;
};
/**
@@ -221,6 +235,7 @@ struct efi_loaded_image_obj {
struct jmp_buf_data exit_jmp;
EFIAPI efi_status_t (*entry)(efi_handle_t image_handle,
struct efi_system_table *st);
+ u16 image_type;
};
/**
@@ -257,6 +272,25 @@ extern struct list_head efi_obj_list;
/* List of all events */
extern struct list_head efi_events;
+/**
+ * efi_register_notify_event - event registered by RegisterProtocolNotify()
+ *
+ * The address of this structure serves as registration value.
+ *
+ * @link: link to list of all registered events
+ * @event: registered event. The same event may registered for
+ * multiple GUIDs.
+ * @protocol: protocol for which the event is registered
+ */
+struct efi_register_notify_event {
+ struct list_head link;
+ struct efi_event *event;
+ efi_guid_t protocol;
+};
+
+/* List of all events registered by RegisterProtocolNotify() */
+extern struct list_head efi_register_notify_events;
+
/* Initialize efi execution environment */
efi_status_t efi_init_obj_list(void);
/* Called by bootefi to initialize root node */