Skip to content

Commit b4b89a0

Browse files
nivedita76ardbiesheuvel
authored andcommitted
efi/gop: Add prototypes for query_mode and set_mode
Add prototypes and argmap for the Graphics Output Protocol's QueryMode and SetMode functions. Signed-off-by: Arvind Sankar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ard Biesheuvel <[email protected]>
1 parent d49fd4b commit b4b89a0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

arch/x86/include/asm/efi.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,10 @@ static inline u32 efi64_convert_status(efi_status_t status)
307307
#define __efi64_argmap_load_file(protocol, path, policy, bufsize, buf) \
308308
((protocol), (path), (policy), efi64_zero_upper(bufsize), (buf))
309309

310+
/* Graphics Output Protocol */
311+
#define __efi64_argmap_query_mode(gop, mode, size, info) \
312+
((gop), (mode), efi64_zero_upper(size), efi64_zero_upper(info))
313+
310314
/*
311315
* The macros below handle the plumbing for the argument mapping. To add a
312316
* mapping for a specific EFI method, simply define a macro

drivers/firmware/efi/libstub/efistub.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,10 @@ typedef union efi_graphics_output_protocol efi_graphics_output_protocol_t;
314314

315315
union efi_graphics_output_protocol {
316316
struct {
317-
void *query_mode;
318-
void *set_mode;
317+
efi_status_t (__efiapi *query_mode)(efi_graphics_output_protocol_t *,
318+
u32, unsigned long *,
319+
efi_graphics_output_mode_info_t **);
320+
efi_status_t (__efiapi *set_mode) (efi_graphics_output_protocol_t *, u32);
319321
void *blt;
320322
efi_graphics_output_protocol_mode_t *mode;
321323
};

0 commit comments

Comments
 (0)