lkml.org 
[lkml]   [2016]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH 2/6] arm/efi: Allow invocation of arbitrary runtime services [ver #2]
    On 23 November 2016 at 09:34, David Howells <dhowells@redhat.com> wrote:
    > David Howells <dhowells@redhat.com> wrote:
    >
    >> +#define efi_call_runtime(f, ...) sys_table_arg->runtime->f(__VA_ARGS__)
    >
    > Turns out it's not that simple - of course. runtime->get_variable is just a
    > void pointer. The old arm stub was casting it by virtue of assignment to a
    > function pointer variable.
    >
    > The x86_64 appears to be doing bypassing all the compile-time type checking by
    > passing the arguments through an ellipsis and then fixing up the argument list
    > in the ->call() function.
    >
    > What I've changed the ARM and ARM64 things to is:
    >
    > #define efi_call_runtime(f, ...) ((efi_##f##_t *)sys_table_arg->runtime->f)(__VA_ARGS__)
    >

    Could we please instead fix the definition of efi_runtime_services_t,
    given that we have typedefs already for all its members?

    \
     
     \ /
      Last update: 2016-11-23 11:36    [W:4.592 / U:0.888 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site