summaryrefslogtreecommitdiff
path: root/arch/x86/include
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2024-12-19 12:37:40 +0300
committerArd Biesheuvel <ardb@kernel.org>2025-01-14 10:35:08 +0300
commit60a34085c36d6eb292c1e03bc355b1aa3a74a689 (patch)
tree8ad2a0546870e1184dbbde0da0c0a4ddddb5a995 /arch/x86/include
parentc14bca3f7aa94fd8d3f5e621ce5b56535ef2396b (diff)
downloadlinux-60a34085c36d6eb292c1e03bc355b1aa3a74a689.tar.xz
efi/libstub: Simplify GOP handling code
Use the LocateHandleBuffer() API and a __free() function to simplify the logic that allocates a handle buffer to iterate over all GOP protocols in the EFI database. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/efi.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h
index 521aad70e41b..f227a70ac91f 100644
--- a/arch/x86/include/asm/efi.h
+++ b/arch/x86/include/asm/efi.h
@@ -250,6 +250,9 @@ static inline u32 efi64_convert_status(efi_status_t status)
#define __efi64_argmap_allocate_pool(type, size, buffer) \
((type), (size), efi64_zero_upper(buffer))
+#define __efi64_argmap_locate_handle_buffer(type, proto, key, num, buf) \
+ ((type), (proto), (key), efi64_zero_upper(num), efi64_zero_upper(buf))
+
#define __efi64_argmap_create_event(type, tpl, f, c, event) \
((type), (tpl), (f), (c), efi64_zero_upper(event))