Re: [PATCH] EFI x86: pass firmware call parameters on the stack

Andrew Morton
2007-01-30T19:11:08Z

On Tue, 30 Jan 2007 20:01:18 +0100
Frédéric Riss <frederic.riss@gmail.com> wrote:

>
> When calling into an EFI firmware, the parameters need to be passed on
> the stack. The recent change to use -mregparm=3 breaks x86 EFI support.
> This patch is needed to allow the new Intel-based Macs to suspend to ram
> when run in EFI mode (efi.get_time is called during the suspend phase).
>
> Signed-off-by: Frederic Riss <frederic.riss@gmail.com>
>
> ---
>
> [As I couldn't find an official maintainer for the linux/efi.h file and
> the file header is quite old, I'm Cc:ing the last 2 commiters.]

Matt normally looks after EFI.

> This patch fixes the issue for x86, but the file is also used by IA64. I
> would have used asmlinkage to force arguments on the stack, but it has a
> special meaning on IA64, thus I used a raw regparm(0) GCC attribute.
> This attribute is documented only for x86, I hope it has no side effect
> on other archs.

hm, this sounds like a fairly serious problem. Has this been runtime
tested on ia64 and x86_64>