aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/efi.h
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2019-12-24 16:10:11 +0100
committerIngo Molnar <mingo@kernel.org>2019-12-25 10:49:18 +0100
commit960a8d01834eabc4549928c60f8ce0300ad08519 (patch)
tree5b8c71ad5a440efa45c4ea145aab52fe7ecf3330 /include/linux/efi.h
parentefi/libstub: Drop explicit 32/64-bit protocol definitions (diff)
downloadwireguard-linux-960a8d01834eabc4549928c60f8ce0300ad08519.tar.xz
wireguard-linux-960a8d01834eabc4549928c60f8ce0300ad08519.zip
efi/libstub: Use stricter typing for firmware function pointers
We will soon remove another level of pointer casting, so let's make sure all type handling involving firmware calls at boot time is correct. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Cc: Arvind Sankar <nivedita@alum.mit.edu> Cc: Borislav Petkov <bp@alien8.de> Cc: James Morse <james.morse@arm.com> Cc: Matt Fleming <matt@codeblueprint.co.uk> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-efi@vger.kernel.org Link: https://lkml.kernel.org/r/20191224151025.32482-12-ardb@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/efi.h')
-rw-r--r--include/linux/efi.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h
index d8e987910853..880077639113 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -382,7 +382,11 @@ union efi_pci_io_protocol {
void *allocate_buffer;
void *free_buffer;
void *flush;
- void *get_location;
+ efi_status_t (*get_location)(efi_pci_io_protocol_t *,
+ unsigned long *segment_nr,
+ unsigned long *bus_nr,
+ unsigned long *device_nr,
+ unsigned long *function_nr);
void *attributes;
void *get_bar_attributes;
void *set_bar_attributes;
@@ -730,6 +734,8 @@ typedef struct {
u32 tables;
} efi_system_table_32_t;
+typedef union efi_simple_text_output_protocol efi_simple_text_output_protocol_t;
+
typedef union {
struct {
efi_table_hdr_t hdr;
@@ -738,7 +744,7 @@ typedef union {
unsigned long con_in_handle;
unsigned long con_in;
unsigned long con_out_handle;
- unsigned long con_out;
+ efi_simple_text_output_protocol_t *con_out;
unsigned long stderr_handle;
unsigned long stderr;
efi_runtime_services_t *runtime;
@@ -1337,8 +1343,6 @@ struct efivar_entry {
bool deleting;
};
-typedef union efi_simple_text_output_protocol efi_simple_text_output_protocol_t;
-
union efi_simple_text_output_protocol {
struct {
void *reset;