Re: [PATCH v3] arm64/efi: efistub: jump to 'stext' directly, not through the header

2014-10-10 Thread Ard Biesheuvel
On 10 October 2014 01:20, Roy Franz roy.fr...@linaro.org wrote: On Thu, Oct 9, 2014 at 3:19 PM, Mark Salter msal...@redhat.com wrote: On Thu, 2014-10-09 at 21:03 +0200, Ard Biesheuvel wrote: On 9 October 2014 19:23, Mark Rutland mark.rutl...@arm.com wrote: Hi Ard, On Wed, Oct 08, 2014 at

Re: [RFT PATCH] efi/x86: move x86 back to libstub

2014-10-10 Thread Ard Biesheuvel
On 6 October 2014 13:06, Ard Biesheuvel ard.biesheu...@linaro.org wrote: This reverts commit 84be880560fb, which itself reverted my original attempt to move x86 from #include'ing .c files from across the tree to using the EFI stub built as a static library. The issue that affected the

Re: [RFT PATCH] efi/x86: move x86 back to libstub

2014-10-10 Thread Maarten Lankhorst
Hey, On 10-10-14 08:35, Ard Biesheuvel wrote: On 6 October 2014 13:06, Ard Biesheuvel ard.biesheu...@linaro.org wrote: This reverts commit 84be880560fb, which itself reverted my original attempt to move x86 from #include'ing .c files from across the tree to using the EFI stub built as a

Re: [RFT PATCH] efi/x86: move x86 back to libstub

2014-10-10 Thread Ard Biesheuvel
On 10 October 2014 10:30, Maarten Lankhorst maarten.lankho...@canonical.com wrote: Hey, On 10-10-14 08:35, Ard Biesheuvel wrote: On 6 October 2014 13:06, Ard Biesheuvel ard.biesheu...@linaro.org wrote: This reverts commit 84be880560fb, which itself reverted my original attempt to move x86

[PATCH] arm64/efi: set PE/COFF section alignment to 4 KB

2014-10-10 Thread Ard Biesheuvel
Position independent AArch64 code needs to be linked and loaded at the same relative offset from a 4 KB boundary, or adrp/add and adrp/ldr pairs will not work correctly. (This is how PC relative symbol references with a 4 GB reach are emitted) We need to declare this in the PE/COFF header,

Re: [PATCH] arm64/efi: set PE/COFF section alignment to 4 KB

2014-10-10 Thread Mark Rutland
Hi Ard, On Fri, Oct 10, 2014 at 10:25:24AM +0100, Ard Biesheuvel wrote: Position independent AArch64 code needs to be linked and loaded at the same relative offset from a 4 KB boundary, or adrp/add and adrp/ldr pairs will not work correctly. (This is how PC relative symbol references with a 4

Re: [PATCH] arm64/efi: set PE/COFF section alignment to 4 KB

2014-10-10 Thread Ard Biesheuvel
On 10 October 2014 12:33, Mark Rutland mark.rutl...@arm.com wrote: Hi Ard, On Fri, Oct 10, 2014 at 10:25:24AM +0100, Ard Biesheuvel wrote: Position independent AArch64 code needs to be linked and loaded at the same relative offset from a 4 KB boundary, or adrp/add and adrp/ldr pairs will not

Re: [PATCH v3] arm64/efi: efistub: jump to 'stext' directly, not through the header

2014-10-10 Thread Mark Rutland
On Thu, Oct 09, 2014 at 08:03:52PM +0100, Ard Biesheuvel wrote: On 9 October 2014 19:23, Mark Rutland mark.rutl...@arm.com wrote: Hi Ard, On Wed, Oct 08, 2014 at 03:11:27PM +0100, Ard Biesheuvel wrote: After the EFI stub has done its business, it jumps into the kernel by branching to

Re: [PATCH v3] arm64/efi: efistub: jump to 'stext' directly, not through the header

2014-10-10 Thread Ard Biesheuvel
On 10 October 2014 12:49, Mark Rutland mark.rutl...@arm.com wrote: On Thu, Oct 09, 2014 at 08:03:52PM +0100, Ard Biesheuvel wrote: On 9 October 2014 19:23, Mark Rutland mark.rutl...@arm.com wrote: Hi Ard, On Wed, Oct 08, 2014 at 03:11:27PM +0100, Ard Biesheuvel wrote: After the EFI stub

Re: [PATCH v3] arm64/efi: efistub: jump to 'stext' directly, not through the header

2014-10-10 Thread Mark Rutland
On Fri, Oct 10, 2014 at 12:52:32PM +0100, Ard Biesheuvel wrote: On 10 October 2014 12:49, Mark Rutland mark.rutl...@arm.com wrote: On Thu, Oct 09, 2014 at 08:03:52PM +0100, Ard Biesheuvel wrote: On 9 October 2014 19:23, Mark Rutland mark.rutl...@arm.com wrote: Hi Ard, On Wed, Oct 08,

Re: [PATCH v3] arm64/efi: efistub: jump to 'stext' directly, not through the header

2014-10-10 Thread Mark Rutland
On Fri, Oct 10, 2014 at 02:27:46PM +0100, Ard Biesheuvel wrote: On 10 October 2014 15:03, Mark Rutland mark.rutl...@arm.com wrote: [...] But if the EFI loader is allowed to load stext at the precise start of RAM (or anywhere not in the idmap), in attempting the copy we'd try to

Re: [PATCH] arm64/efi: set PE/COFF section alignment to 4 KB

2014-10-10 Thread Mark Rutland
On Fri, Oct 10, 2014 at 11:37:03AM +0100, Ard Biesheuvel wrote: On 10 October 2014 12:33, Mark Rutland mark.rutl...@arm.com wrote: Hi Ard, On Fri, Oct 10, 2014 at 10:25:24AM +0100, Ard Biesheuvel wrote: Position independent AArch64 code needs to be linked and loaded at the same relative

Re: [PATCH v3] arm64/efi: efistub: jump to 'stext' directly, not through the header

2014-10-10 Thread Mark Salter
On Fri, 2014-10-10 at 08:30 +0200, Ard Biesheuvel wrote: On 10 October 2014 01:20, Roy Franz roy.fr...@linaro.org wrote: On Thu, Oct 9, 2014 at 3:19 PM, Mark Salter msal...@redhat.com wrote: On Thu, 2014-10-09 at 21:03 +0200, Ard Biesheuvel wrote: On 9 October 2014 19:23, Mark Rutland

Re: [PATCH v3] arm64/efi: efistub: jump to 'stext' directly, not through the header

2014-10-10 Thread Ard Biesheuvel
On 10 October 2014 16:14, Mark Salter msal...@redhat.com wrote: On Fri, 2014-10-10 at 08:30 +0200, Ard Biesheuvel wrote: On 10 October 2014 01:20, Roy Franz roy.fr...@linaro.org wrote: On Thu, Oct 9, 2014 at 3:19 PM, Mark Salter msal...@redhat.com wrote: On Thu, 2014-10-09 at 21:03 +0200,

Re: [PATCH] arm64/efi: set PE/COFF section alignment to 4 KB

2014-10-10 Thread Ard Biesheuvel
On 10 October 2014 16:09, Mark Rutland mark.rutl...@arm.com wrote: On Fri, Oct 10, 2014 at 11:37:03AM +0100, Ard Biesheuvel wrote: On 10 October 2014 12:33, Mark Rutland mark.rutl...@arm.com wrote: Hi Ard, On Fri, Oct 10, 2014 at 10:25:24AM +0100, Ard Biesheuvel wrote: Position

Re: [PATCH] arm64/efi: set PE/COFF section alignment to 4 KB

2014-10-10 Thread Mark Rutland
On Fri, Oct 10, 2014 at 03:50:49PM +0100, Ard Biesheuvel wrote: On 10 October 2014 16:09, Mark Rutland mark.rutl...@arm.com wrote: On Fri, Oct 10, 2014 at 11:37:03AM +0100, Ard Biesheuvel wrote: On 10 October 2014 12:33, Mark Rutland mark.rutl...@arm.com wrote: Hi Ard, On Fri, Oct

Re: [PATCH v3] arm64/efi: efistub: jump to 'stext' directly, not through the header

2014-10-10 Thread Roy Franz
On Fri, Oct 10, 2014 at 6:27 AM, Ard Biesheuvel ard.biesheu...@linaro.org wrote: On 10 October 2014 15:03, Mark Rutland mark.rutl...@arm.com wrote: [...] But if the EFI loader is allowed to load stext at the precise start of RAM (or anywhere not in the idmap), in attempting the copy we'd

Re: [PATCH 2/2] efi: Capsule update support

2014-10-10 Thread Sam Protsenko
Hi Matt, 1. Why x86 code isn't separated to another patch? 2. drivers/firmware/efi/reboot.c: efi_reboot(): One shouldn't use printk() with no KERN_* stuff passed into it. I'd recommend to use pr_info() macro or something like that. -- To unsubscribe from this list: send the line unsubscribe

Re: [PATCH] arm64/efi: set PE/COFF section alignment to 4 KB

2014-10-10 Thread Roy Franz
On Fri, Oct 10, 2014 at 3:37 AM, Ard Biesheuvel ard.biesheu...@linaro.org wrote: On 10 October 2014 12:33, Mark Rutland mark.rutl...@arm.com wrote: Hi Ard, On Fri, Oct 10, 2014 at 10:25:24AM +0100, Ard Biesheuvel wrote: Position independent AArch64 code needs to be linked and loaded at the

Re: [PATCH] arm64/efi: set PE/COFF section alignment to 4 KB

2014-10-10 Thread Ard Biesheuvel
On 10 October 2014 17:55, Roy Franz roy.fr...@linaro.org wrote: On Fri, Oct 10, 2014 at 3:37 AM, Ard Biesheuvel ard.biesheu...@linaro.org wrote: On 10 October 2014 12:33, Mark Rutland mark.rutl...@arm.com wrote: Hi Ard, On Fri, Oct 10, 2014 at 10:25:24AM +0100, Ard Biesheuvel wrote:

Re: [PATCH v3] arm64/efi: efistub: jump to 'stext' directly, not through the header

2014-10-10 Thread Ard Biesheuvel
On 10 October 2014 17:38, Roy Franz roy.fr...@linaro.org wrote: On Fri, Oct 10, 2014 at 6:27 AM, Ard Biesheuvel ard.biesheu...@linaro.org wrote: On 10 October 2014 15:03, Mark Rutland mark.rutl...@arm.com wrote: [...] But if the EFI loader is allowed to load stext at the precise start of

[PATCH] arm64/efi: set PE/COFF file alignment to 512 bytes

2014-10-10 Thread Ard Biesheuvel
Change our PE/COFF header to use the minimum file alignment of 512 bytes (0x200), as mandated by the PE/COFF spec v8.3 Also update the linker script so that the Image file itself is also a round multiple of FileAlignment. Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org --- Another one

Re: [PATCH] arm64/efi: set PE/COFF file alignment to 512 bytes

2014-10-10 Thread Roy Franz
On Fri, Oct 10, 2014 at 9:58 AM, Ard Biesheuvel ard.biesheu...@linaro.org wrote: Change our PE/COFF header to use the minimum file alignment of 512 bytes (0x200), as mandated by the PE/COFF spec v8.3 Also update the linker script so that the Image file itself is also a round multiple of

Re: [PATCH 2/2] efi: Capsule update support

2014-10-10 Thread Borislav Petkov
On Tue, Oct 07, 2014 at 03:42:31PM +0100, Matt Fleming wrote: From: Matt Fleming matt.flem...@intel.com The EFI capsule mechanism allows data blobs to be passed to the EFI firmware. This patch just introduces the main infrastruture for interacting with the firmware. Once a capsule has