diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/efi_api.h | 5 | ||||
-rw-r--r-- | include/efi_loader.h | 34 | ||||
-rw-r--r-- | include/efi_selftest.h | 11 |
3 files changed, 37 insertions, 13 deletions
diff --git a/include/efi_api.h b/include/efi_api.h index 472160cb30..755c405793 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -128,7 +128,8 @@ struct efi_boot_services { efi_status_t exit_status, efi_uintn_t exitdata_size, u16 *exitdata); efi_status_t (EFIAPI *unload_image)(efi_handle_t image_handle); - efi_status_t (EFIAPI *exit_boot_services)(efi_handle_t, unsigned long); + efi_status_t (EFIAPI *exit_boot_services)(efi_handle_t image_handle, + efi_uintn_t map_key); efi_status_t (EFIAPI *get_next_monotonic_count)(u64 *count); efi_status_t (EFIAPI *stall)(unsigned long usecs); @@ -348,7 +349,7 @@ struct efi_loaded_image { aligned_u64 image_size; unsigned int image_code_type; unsigned int image_data_type; - unsigned long unload; + efi_status_t (EFIAPI *unload)(efi_handle_t image_handle); }; #define EFI_DEVICE_PATH_PROTOCOL_GUID \ diff --git a/include/efi_loader.h b/include/efi_loader.h index 7af3f16ef8..07ef14ba1c 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 */ diff --git a/include/efi_selftest.h b/include/efi_selftest.h index dd42e49023..eaee188de7 100644 --- a/include/efi_selftest.h +++ b/include/efi_selftest.h @@ -93,17 +93,6 @@ u16 *efi_st_translate_char(u16 code); u16 *efi_st_translate_code(u16 code); /* - * Compare memory. - * We cannot use lib/string.c due to different CFLAGS values. - * - * @buf1: first buffer - * @buf2: second buffer - * @length: number of bytes to compare - * @return: 0 if both buffers contain the same bytes - */ -int efi_st_memcmp(const void *buf1, const void *buf2, size_t length); - -/* * Compare an u16 string to a char string. * * @buf1: u16 string |