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

2015-10-28 Thread Mark Rutland
On Wed, Oct 28, 2015 at 04:02:23PM -0500, Timur Tabi wrote: > On 10/28/2015 12:26 PM, Mark Rutland wrote: > >>>This does make the kernel boot, but we suspect that there may be > >>>another problem. We need to investigate it, but we have a suspicion > >>>that the EFI stub is trying to allocate from

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

2015-10-28 Thread Timur Tabi
On 10/28/2015 12:26 PM, Mark Rutland wrote: >This does make the kernel boot, but we suspect that there may be >another problem. We need to investigate it, but we have a suspicion >that the EFI stub is trying to allocate from the Runtime Data block, >and the alignment adjustment "fixes" the probl

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

2015-10-28 Thread Will Deacon
On Wed, Oct 28, 2015 at 12:11:57PM -0500, Timur Tabi wrote: > On 10/27/2015 09:06 PM, Ard Biesheuvel wrote: > >diff --git a/arch/arm64/kernel/efi-stub.c b/arch/arm64/kernel/efi-stub.c > >index 816120ece6bc..a60ce249cfc0 100644 > >--- a/arch/arm64/kernel/efi-stub.c > >+++ b/arch/arm64/kernel/efi-stu

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

2015-10-28 Thread Mark Rutland
On Wed, Oct 28, 2015 at 12:11:57PM -0500, Timur Tabi wrote: > On 10/27/2015 09:06 PM, Ard Biesheuvel wrote: > > > >diff --git a/arch/arm64/kernel/efi-stub.c b/arch/arm64/kernel/efi-stub.c > >index 816120ece6bc..a60ce249cfc0 100644 > >--- a/arch/arm64/kernel/efi-stub.c > >+++ b/arch/arm64/kernel/efi

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

2015-10-28 Thread Timur Tabi
On 10/27/2015 09:06 PM, Ard Biesheuvel wrote: diff --git a/arch/arm64/kernel/efi-stub.c b/arch/arm64/kernel/efi-stub.c index 816120ece6bc..a60ce249cfc0 100644 --- a/arch/arm64/kernel/efi-stub.c +++ b/arch/arm64/kernel/efi-stub.c @@ -42,7 +42,8 @@ * Mustang), we can still place

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

2015-10-28 Thread Mark Rutland
On Tue, Oct 27, 2015 at 09:13:22PM -0500, Timur Tabi wrote: > Ard Biesheuvel wrote: > >No. I screwed up the patch since the trailing ) should not be there, > >but we do need to round first, and only then add the offset. > > But if the offset is not a multiple of 2MB, won't the address passed > to

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

2015-10-27 Thread Timur Tabi
Ard Biesheuvel wrote: No. I screwed up the patch since the trailing ) should not be there, but we do need to round first, and only then add the offset. But if the offset is not a multiple of 2MB, won't the address passed to allocate_pages be unaligned? I'll test your patch on our system, but

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

2015-10-27 Thread Ard Biesheuvel
On 28 October 2015 at 11:10, Timur Tabi wrote: > Ard Biesheuvel wrote: >> >> + *image_addr = *reserve_addr = round_up(dram_base, SZ_2M) + >> + TEXT_OFFSET); > > > Shouldn't this be: > > *image_addr = *reserve_addr = round_up(dram_b

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

2015-10-27 Thread Timur Tabi
Ard Biesheuvel wrote: + *image_addr = *reserve_addr = round_up(dram_base, SZ_2M) + + TEXT_OFFSET); Shouldn't this be: *image_addr = *reserve_addr = round_up(dram_base + TEXT_OFFSET, SZ_2M); -- Sent by an employee of the Qualco

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

2015-10-27 Thread Ard Biesheuvel
On 28 October 2015 at 06:24, Timur Tabi wrote: > From: Shanker Donthineni > > The vmlinux image load address must be aligned to 2MB, as documented > in Documentation/arm64/booting.txt. Otherwise, __create_page_tables > in head.S will create incorrect page table entries. > > Signed-off-by: Shanker

[PATCH] arm64: efi: make sure vmlinux load address aligned on 2MBytes

2015-10-27 Thread Timur Tabi
From: Shanker Donthineni The vmlinux image load address must be aligned to 2MB, as documented in Documentation/arm64/booting.txt. Otherwise, __create_page_tables in head.S will create incorrect page table entries. Signed-off-by: Shanker Donthineni Signed-off-by: Timur Tabi --- arch/arm64/kern