Re: [PATCH] Specify ELF ABI for EFI handover protocol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2013-01-07 at 02:07 +0000, David Woodhouse wrote:
> This would have saved me some time...
> 
> Signed-off-by: David Woodhouse <David.Woodhouse@xxxxxxxxx>
> ---
> Also, are interrupts supposed to be disabled? The efi_main() function
> will disable them, but only *after* lidt/lgdt. Shouldn't it happen
> sooner?

I was under the impression that, yes, interrupts should be disabled when
we jump to the kernel entry points. Certainly for the 32-bit boot
protocol detailed in Documentation/x86/boot.txt, interrupts must be
disabled. The 'cli' in efi_main() is likely superfluous. I can't think
of any reason you'd want to leave interrupts enabled when you enter
efi_main().

> diff --git a/Documentation/x86/boot.txt b/Documentation/x86/boot.txt
> index 9efceff..c00aa8a 100644
> --- a/Documentation/x86/boot.txt
> +++ b/Documentation/x86/boot.txt
> @@ -1054,3 +1054,7 @@ The boot loader *must* fill out the following fields in bp,
>      o hdr.ramdisk_size  (if applicable)
>  
>  All other fields should be zero.
> +
> +Note that the efi_main entry point uses Linux/ELF calling conventions, not
> +EFI calling conventions. So 'handle' is in %rdi, 'table' in %rsi and 'bp'
> +in %rdx.

Unless you're booting under 32-bit, in which case they're on the stack.
I'll take this patch and munge it a little to mention 32-bit, thanks.

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


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux