[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/4] efi: On x86-64, align the stack to a 16-byte boundary as
From: |
Vladimir 'φ-coder/phcoder' Serbinenko |
Subject: |
Re: [PATCH 4/4] efi: On x86-64, align the stack to a 16-byte boundary as required by ABI |
Date: |
Thu, 14 Nov 2013 09:01:19 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9 |
>
> diff --git a/grub-core/kern/x86_64/efi/startup.S
> b/grub-core/kern/x86_64/efi/startup.S
> index f86f019..94bd6ae 100644
> --- a/grub-core/kern/x86_64/efi/startup.S
> +++ b/grub-core/kern/x86_64/efi/startup.S
> @@ -29,7 +29,11 @@ start:
> _start:
> movq %rcx, EXT_C(grub_efi_image_handle)(%rip)
> movq %rdx, EXT_C(grub_efi_system_table)(%rip)
> -
> + mov %rsp, %rax
> + subq $8, %rsp
> + and $~0xf, %rsp
> + mov %rax, (%rsp)
> call EXT_C(grub_main)
> + mov (%rsp), %rsp
This would be useful if we ever returned but we never do (we call
boot_services->exit instead). Could you instead prepare a patch which
does stack alignment and removed the "ret" putting instead a comment /*
Doesn't return. */ ?
> ret
>
>
signature.asc
Description: OpenPGP digital signature
- [PATCH 0/4] i386-efi and x86_64-efi fixes, Josh Triplett, 2013/11/12
- [PATCH 1/4] efi: Fix firmware memory allocation to round to 4k pages, not 1k, Josh Triplett, 2013/11/12
- [PATCH 2/4] efi: Fix requests to allocate GRUB_MEMORY_AVAILABLE, Josh Triplett, 2013/11/12
- [PATCH 3/4] efi: Support GRUB_MMAP_MALLOC_LOW in the EFI firmware allocator, Josh Triplett, 2013/11/12
- [PATCH 4/4] efi: On x86-64, align the stack to a 16-byte boundary as required by ABI, Josh Triplett, 2013/11/12