From e23c8e81ebc97bbe9d4037b1324994446c2bc6c4 Mon Sep 17 00:00:00 2001 From: Masahisa Kojima Date: Fri, 10 Nov 2023 13:25:38 +0900 Subject: efi_loader: add missing const classifier for event service const classifier is missing in EventGroup parameter of CreateEventEx(). Fix it to remove the compiler warning. NotifyContext parameter of CreateEventEx() is also defined with const in UEFI specification, but NotifyContext parameter of CreateEvent() is defined without const. Since current implementation calls the common efi_create_event() function from both CreateEventEx() and CreateEvent() services, NotifyContext parameter leaves as is. Signed-off-by: Masahisa Kojima Reviewed-by: Ilias Apalodimas Signed-off-by: Ilias Apalodimas --- lib/efi_loader/efi_boottime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/efi_loader/efi_boottime.c') diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 0b7579cb5af..f9b10a9763b 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -712,7 +712,7 @@ efi_status_t efi_create_event(uint32_t type, efi_uintn_t notify_tpl, void (EFIAPI *notify_function) ( struct efi_event *event, void *context), - void *notify_context, efi_guid_t *group, + void *notify_context, const efi_guid_t *group, struct efi_event **event) { struct efi_event *evt; @@ -790,7 +790,7 @@ efi_status_t EFIAPI efi_create_event_ex(uint32_t type, efi_uintn_t notify_tpl, struct efi_event *event, void *context), void *notify_context, - efi_guid_t *event_group, + const efi_guid_t *event_group, struct efi_event **event) { efi_status_t ret; -- cgit v1.2.3 From e0d1a1ea68c47b29d93bfc375d984fe0aee21093 Mon Sep 17 00:00:00 2001 From: Masahisa Kojima Date: Fri, 10 Nov 2023 13:25:39 +0900 Subject: efi_loader: add return to efibootmgr event group When the image loaded by efibootmgr returns, efibootmgr needs to clean the resources. Adding the event of returning to efibootmgr is useful to simplify the implementation. Signed-off-by: Masahisa Kojima Reviewed-by: Ilias Apalodimas Signed-off-by: Ilias Apalodimas --- lib/efi_loader/efi_boottime.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/efi_loader/efi_boottime.c') diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index f9b10a9763b..3767fa2db42 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -90,6 +90,9 @@ const efi_guid_t efi_guid_event_group_ready_to_boot = /* event group ResetSystem() invoked (before ExitBootServices) */ const efi_guid_t efi_guid_event_group_reset_system = EFI_EVENT_GROUP_RESET_SYSTEM; +/* event group return to efibootmgr */ +const efi_guid_t efi_guid_event_group_return_to_efibootmgr = + EFI_EVENT_GROUP_RETURN_TO_EFIBOOTMGR; /* GUIDs of the Load File and Load File2 protocols */ const efi_guid_t efi_guid_load_file_protocol = EFI_LOAD_FILE_PROTOCOL_GUID; const efi_guid_t efi_guid_load_file2_protocol = EFI_LOAD_FILE2_PROTOCOL_GUID; -- cgit v1.2.3 From c38cb227d39f8ce9983df8051f31dcc8466f311e Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Thu, 14 Dec 2023 13:16:55 -0500 Subject: efi_loader: Remove We largely do not need in these files, so drop it. The only exception here is that efi_freestanding.c needs and had been getting that via . Reviewed-by: Simon Glass Signed-off-by: Tom Rini --- lib/efi_loader/efi_boottime.c | 1 - 1 file changed, 1 deletion(-) (limited to 'lib/efi_loader/efi_boottime.c') diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c index 644bebee6b7..c579d89211b 100644 --- a/lib/efi_loader/efi_boottime.c +++ b/lib/efi_loader/efi_boottime.c @@ -5,7 +5,6 @@ * Copyright (c) 2016 Alexander Graf */ -#include #include #include #include -- cgit v1.2.3