From 7eaa900e56b28350d954eac20b14c3adb6da2570 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 7 Jun 2019 06:47:01 +0200 Subject: efi_loader: event signaling in ExitBootServices ExitBootServices() has to stop timer related activity before calling the events of the EFI_EVENT_GROUP_EXIT_BOOT_SERVICES event group. But our current implementation was stopping all other events. All events have to observe the task priority level. Signed-off-by: Heinrich Schuchardt --- include/efi_loader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/efi_loader.h b/include/efi_loader.h index 23ce7322676..8a3f8fe03d1 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -432,7 +432,7 @@ efi_status_t efi_create_event(uint32_t type, efi_uintn_t notify_tpl, efi_status_t efi_set_timer(struct efi_event *event, enum efi_timer_delay type, uint64_t trigger_time); /* Call this to signal an event */ -void efi_signal_event(struct efi_event *event, bool check_tpl); +void efi_signal_event(struct efi_event *event); /* open file system: */ struct efi_simple_file_system_protocol *efi_simple_file_system( -- cgit v1.2.3 From 7a69e97ba42a93e33dccfe715a8522754117a715 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Wed, 5 Jun 2019 21:00:39 +0200 Subject: efi_loader: implement event queue Up to now we have only been using a flag queued for events. But this does not satisfy the requirements of the UEFI spec. Events must be notified in the sequence of decreasing TPL level and within a TPL level in the sequence of signaling. Implement a queue for signaled events. Signed-off-by: Heinrich Schuchardt --- include/efi_loader.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/efi_loader.h b/include/efi_loader.h index 8a3f8fe03d1..f0e1313f934 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -256,6 +256,7 @@ struct efi_loaded_image_obj { * struct efi_event * * @link: Link to list of all events + * @queue_link: Link to the list of queued events * @type: Type of event, see efi_create_event * @notify_tpl: Task priority level of notifications * @nofify_function: Function to call when the event is triggered @@ -264,11 +265,11 @@ struct efi_loaded_image_obj { * @trigger_time: Period of the timer * @trigger_next: Next time to trigger the timer * @trigger_type: Type of timer, see efi_set_timer - * @is_queued: The notification function is queued * @is_signaled: The event occurred. The event is in the signaled state. */ struct efi_event { struct list_head link; + struct list_head queue_link; uint32_t type; efi_uintn_t notify_tpl; void (EFIAPI *notify_function)(struct efi_event *event, void *context); @@ -277,7 +278,6 @@ struct efi_event { u64 trigger_next; u64 trigger_time; enum efi_timer_delay trigger_type; - bool is_queued; bool is_signaled; }; -- cgit v1.2.3