From: timur@codeaurora.org (Timur Tabi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: efi: make sure vmlinux load address aligned on 2MBytes
Date: Wed, 28 Oct 2015 12:11:57 -0500 [thread overview]
Message-ID: <563101DD.8080508@codeaurora.org> (raw)
In-Reply-To: <CAKv+Gu_ivkemFva-Fu0E24mQqE-m0jPWBzo5OZAr7cyM08hqug@mail.gmail.com>
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 the kernel at the address
> * 'dram_base + TEXT_OFFSET'.
> */
> - *image_addr = *reserve_addr = dram_base + TEXT_OFFSET;
> + *image_addr = *reserve_addr = round_up(dram_base, SZ_2M) +
> + TEXT_OFFSET);
> nr_pages = round_up(kernel_memsize, EFI_ALLOC_ALIGN) /
> EFI_PAGE_SIZE;
> status = efi_call_early(allocate_pages, EFI_ALLOCATE_ADDRESS,
Tested-by: Timur Tabi <timur@codeaurora.org>
Tested-by: Shanker Donthineni <shankerd@codeaurora.org>
However, I think this formatting is easier to read:
*image_addr = *reserve_addr =
round_up(dram_base, SZ_2M) + TEXT_OFFSET;
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 problem by moving the pointer to
Conventional Memory.
Anyway, is there any chance we can get this fix into 4.3? I'd hate to
have 4.3 released knowing that it's broken on our hardware.
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
next prev parent reply other threads:[~2015-10-28 17:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-27 21:24 [PATCH] arm64: efi: make sure vmlinux load address aligned on 2MBytes Timur Tabi
2015-10-28 2:06 ` Ard Biesheuvel
2015-10-28 2:10 ` Timur Tabi
2015-10-28 2:11 ` Ard Biesheuvel
2015-10-28 2:13 ` Timur Tabi
2015-10-28 11:28 ` Mark Rutland
2015-10-28 17:11 ` Timur Tabi [this message]
2015-10-28 17:26 ` Mark Rutland
2015-10-28 21:02 ` Timur Tabi
2015-10-27 12:05 ` Mark Rutland
2015-10-28 17:27 ` Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=563101DD.8080508@codeaurora.org \
--to=timur@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).