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

From: Andrew Morton
Date: Tue Jan 30 2007 - 14:11:26 EST


On Tue, 30 Jan 2007 20:01:18 +0100
Frédéric Riss <frederic.riss@xxxxxxxxx> 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@xxxxxxxxx>
>
> ---
>
> [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>


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/