efi/gop: Add prototypes for query_mode and set_mode
authorArvind Sankar <nivedita@alum.mit.edu>
Fri, 20 Mar 2020 02:00:24 +0000 (22:00 -0400)
committerArd Biesheuvel <ardb@kernel.org>
Thu, 23 Apr 2020 18:15:06 +0000 (20:15 +0200)
Add prototypes and argmap for the Graphics Output Protocol's QueryMode
and SetMode functions.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Link: https://lore.kernel.org/r/20200320020028.1936003-11-nivedita@alum.mit.edu
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
arch/x86/include/asm/efi.h
drivers/firmware/efi/libstub/efistub.h

index 8391c115c0ecd32da2c9ad856bdb28caf3319143..f59cba117dcb7136af4b78c78278b6816cfce183 100644 (file)
@@ -307,6 +307,10 @@ static inline u32 efi64_convert_status(efi_status_t status)
 #define __efi64_argmap_load_file(protocol, path, policy, bufsize, buf) \
        ((protocol), (path), (policy), efi64_zero_upper(bufsize), (buf))
 
+/* Graphics Output Protocol */
+#define __efi64_argmap_query_mode(gop, mode, size, info)               \
+       ((gop), (mode), efi64_zero_upper(size), efi64_zero_upper(info))
+
 /*
  * The macros below handle the plumbing for the argument mapping. To add a
  * mapping for a specific EFI method, simply define a macro
index d9ad8582dbea8f4eec88e3166f1d42d887b8ecd0..321244ed20a4bc35f190ecf1517d0c3d3c583d33 100644 (file)
@@ -314,8 +314,10 @@ typedef union efi_graphics_output_protocol efi_graphics_output_protocol_t;
 
 union efi_graphics_output_protocol {
        struct {
-               void *query_mode;
-               void *set_mode;
+               efi_status_t (__efiapi *query_mode)(efi_graphics_output_protocol_t *,
+                                                   u32, unsigned long *,
+                                                   efi_graphics_output_mode_info_t **);
+               efi_status_t (__efiapi *set_mode)  (efi_graphics_output_protocol_t *, u32);
                void *blt;
                efi_graphics_output_protocol_mode_t *mode;
        };