summaryrefslogtreecommitdiff
path: root/drivers/firmware/efi/libstub/random.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2019-12-24 18:10:12 +0300
committerIngo Molnar <mingo@kernel.org>2019-12-25 12:49:19 +0300
commit8f24f8c2fc82f701866419dcb594e2cc1d3f46ba (patch)
tree78911f8dba19edd090d65649482291b11e10ca1b /drivers/firmware/efi/libstub/random.c
parent960a8d01834eabc4549928c60f8ce0300ad08519 (diff)
downloadlinux-8f24f8c2fc82f701866419dcb594e2cc1d3f46ba.tar.xz
efi/libstub: Annotate firmware routines as __efiapi
Annotate all the firmware routines (boot services, runtime services and protocol methods) called in the boot context as __efiapi, and make it expand to __attribute__((ms_abi)) on 64-bit x86. This allows us to use the compiler to generate the calls into firmware that use the MS calling convention instead of the SysV one. 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-13-ardb@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/libstub/random.c')
-rw-r--r--drivers/firmware/efi/libstub/random.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/firmware/efi/libstub/random.c b/drivers/firmware/efi/libstub/random.c
index 1a5a4a9db2a7..4f5c249c62dc 100644
--- a/drivers/firmware/efi/libstub/random.c
+++ b/drivers/firmware/efi/libstub/random.c
@@ -13,10 +13,12 @@ typedef union efi_rng_protocol efi_rng_protocol_t;
union efi_rng_protocol {
struct {
- efi_status_t (*get_info)(efi_rng_protocol_t *,
- unsigned long *, efi_guid_t *);
- efi_status_t (*get_rng)(efi_rng_protocol_t *,
- efi_guid_t *, unsigned long, u8 *out);
+ efi_status_t (__efiapi *get_info)(efi_rng_protocol_t *,
+ unsigned long *,
+ efi_guid_t *);
+ efi_status_t (__efiapi *get_rng)(efi_rng_protocol_t *,
+ efi_guid_t *, unsigned long,
+ u8 *out);
};
struct {
u32 get_info;