git: bc3dfb03fd49 - stable/14 - efirt: use correct ABI for runtime EFI functions
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 01 Jan 2025 10:38:14 UTC
The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=bc3dfb03fd4979b50c380c1688cfcc2e3d517361 commit bc3dfb03fd4979b50c380c1688cfcc2e3d517361 Author: Ahmad Khalifa <ahmadkhalifa570@gmail.com> AuthorDate: 2024-12-21 21:09:54 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2025-01-01 10:30:20 +0000 efirt: use correct ABI for runtime EFI functions (cherry picked from commit 3e8f4a30594fad6784504d019613ad815b6c9dc5) --- sys/dev/efidev/efirt.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/sys/dev/efidev/efirt.c b/sys/dev/efidev/efirt.c index a74ce9fa9a06..1fb9b3bb01d1 100644 --- a/sys/dev/efidev/efirt.c +++ b/sys/dev/efidev/efirt.c @@ -490,31 +490,32 @@ efi_rt_arch_call_nofault(struct efirt_callinfo *ec) switch (ec->ec_argcnt) { case 0: - ec->ec_efi_status = ((register_t (*)(void))ec->ec_fptr)(); + ec->ec_efi_status = ((register_t EFIABI_ATTR (*)(void)) + ec->ec_fptr)(); break; case 1: - ec->ec_efi_status = ((register_t (*)(register_t))ec->ec_fptr) - (ec->ec_arg1); + ec->ec_efi_status = ((register_t EFIABI_ATTR (*)(register_t)) + ec->ec_fptr)(ec->ec_arg1); break; case 2: - ec->ec_efi_status = ((register_t (*)(register_t, register_t)) - ec->ec_fptr)(ec->ec_arg1, ec->ec_arg2); + ec->ec_efi_status = ((register_t EFIABI_ATTR (*)(register_t, + register_t))ec->ec_fptr)(ec->ec_arg1, ec->ec_arg2); break; case 3: - ec->ec_efi_status = ((register_t (*)(register_t, register_t, - register_t))ec->ec_fptr)(ec->ec_arg1, ec->ec_arg2, - ec->ec_arg3); + ec->ec_efi_status = ((register_t EFIABI_ATTR (*)(register_t, + register_t, register_t))ec->ec_fptr)(ec->ec_arg1, + ec->ec_arg2, ec->ec_arg3); break; case 4: - ec->ec_efi_status = ((register_t (*)(register_t, register_t, - register_t, register_t))ec->ec_fptr)(ec->ec_arg1, - ec->ec_arg2, ec->ec_arg3, ec->ec_arg4); + ec->ec_efi_status = ((register_t EFIABI_ATTR (*)(register_t, + register_t, register_t, register_t))ec->ec_fptr)( + ec->ec_arg1, ec->ec_arg2, ec->ec_arg3, ec->ec_arg4); break; case 5: - ec->ec_efi_status = ((register_t (*)(register_t, register_t, - register_t, register_t, register_t))ec->ec_fptr)( - ec->ec_arg1, ec->ec_arg2, ec->ec_arg3, ec->ec_arg4, - ec->ec_arg5); + ec->ec_efi_status = ((register_t EFIABI_ATTR (*)(register_t, + register_t, register_t, register_t, register_t)) + ec->ec_fptr)(ec->ec_arg1, ec->ec_arg2, ec->ec_arg3, + ec->ec_arg4, ec->ec_arg5); break; default: panic("efi_rt_arch_call: %d args", (int)ec->ec_argcnt);