Re: [PATCH] [v2] arm64: efi: make sure vmlinux load address aligned on 2MB

2015-10-29 Thread Ard Biesheuvel
On 29 October 2015 at 14:43, Mark Rutland wrote: > On Thu, Oct 29, 2015 at 11:59:46AM +0900, Ard Biesheuvel wrote: >> On 29 October 2015 at 03:21, Mark Rutland wrote: >> > On Wed, Oct 28, 2015 at 01:12:36PM -0500, Timur Tabi wrote: >> >> On 10/28/2015

Re: [PATCH] [v2] arm64: efi: make sure vmlinux load address aligned on 2MB

2015-10-29 Thread Mark Rutland
On Thu, Oct 29, 2015 at 11:59:46AM +0900, Ard Biesheuvel wrote: > On 29 October 2015 at 03:21, Mark Rutland wrote: > > On Wed, Oct 28, 2015 at 01:12:36PM -0500, Timur Tabi wrote: > >> On 10/28/2015 01:08 PM, Mark Rutland wrote: > >> > >> >arm64: efi: ensure kernel is loaded

Re: [PATCH] [v2] arm64: efi: make sure vmlinux load address aligned on 2MB

2015-10-29 Thread Timur Tabi
On 10/29/2015 08:48 AM, Ard Biesheuvel wrote: >There is another (existing) problem I spotted, in that we'll sometimes >move the kernel to a worse address. If the kernel was loaded at a valid >address (i.e. image_addr % SZ_2MB == TEXT_OFFSET), but not at the >preferred offset, we try to relocate

Re: [PATCH] [v2] arm64: efi: make sure vmlinux load address aligned on 2MB

2015-10-29 Thread Ard Biesheuvel
> On 29 okt. 2015, at 15:54, Timur Tabi wrote: > > On 10/29/2015 08:48 AM, Ard Biesheuvel wrote: >>> >There is another (existing) problem I spotted, in that we'll sometimes >>> >move the kernel to a worse address. If the kernel was loaded at a valid >>> >address (i.e.

Re: [PATCH] [v2] arm64: efi: make sure vmlinux load address aligned on 2MB

2015-10-28 Thread Timur Tabi
On 10/28/2015 01:08 PM, Mark Rutland wrote: arm64: efi: ensure kernel is loaded at correct address The kernel image needs to be loaded text_offset_bytes from a 2M-aligned base, per Documentation/arm64/booting.txt. If loaded at the wrong offset modulo 2M, __create_page_tables will create

Re: [PATCH] [v2] arm64: efi: make sure vmlinux load address aligned on 2MB

2015-10-28 Thread Mark Rutland
On Wed, Oct 28, 2015 at 01:12:36PM -0500, Timur Tabi wrote: > On 10/28/2015 01:08 PM, Mark Rutland wrote: > > >arm64: efi: ensure kernel is loaded at correct address > > > >The kernel image needs to be loaded text_offset_bytes from a 2M-aligned > >base, per Documentation/arm64/booting.txt. If

Re: [PATCH] [v2] arm64: efi: make sure vmlinux load address aligned on 2MB

2015-10-28 Thread Ard Biesheuvel
On 29 October 2015 at 03:21, Mark Rutland wrote: > On Wed, Oct 28, 2015 at 01:12:36PM -0500, Timur Tabi wrote: >> On 10/28/2015 01:08 PM, Mark Rutland wrote: >> >> >arm64: efi: ensure kernel is loaded at correct address >> > >> >The kernel image needs to be loaded