All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <timur-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: Ard Biesheuvel
	<ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
Cc: Mark Salter <msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	"linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	Matt Fleming
	<matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Shanker Donthineni
	<shankerd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Mark Langsdorf <mlangsdo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Jon Masters <jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH] [v2] arm64: efi: make sure vmlinux load address aligned on 2MB
Date: Thu, 29 Oct 2015 09:54:09 -0500	[thread overview]
Message-ID: <56323311.8050708@codeaurora.org> (raw)
In-Reply-To: <CAKv+Gu8yFYv7GNvsOzUD1UQaXZ0AeXByahq3XjodrCtOGRGfgQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

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 it, even if it's already at the
>> >lowest possible address.
>> >

> Indeed. Unlikely to occur in practice, since UEFI mostly allocates top
> down, but it would indeed be better to drop the new allocation and
> simply use the existing one if it is not an improvement.

So you're saying that if we modify our UEFI so that it always loads the 
kernel at dram_base + TEXT_OFFSET, then one day in the future the kernel 
will skip the relocation?

-- 
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.

WARNING: multiple messages have this Message-ID (diff)
From: timur@codeaurora.org (Timur Tabi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] [v2] arm64: efi: make sure vmlinux load address aligned on 2MB
Date: Thu, 29 Oct 2015 09:54:09 -0500	[thread overview]
Message-ID: <56323311.8050708@codeaurora.org> (raw)
In-Reply-To: <CAKv+Gu8yFYv7GNvsOzUD1UQaXZ0AeXByahq3XjodrCtOGRGfgQ@mail.gmail.com>

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 it, even if it's already at the
>> >lowest possible address.
>> >

> Indeed. Unlikely to occur in practice, since UEFI mostly allocates top
> down, but it would indeed be better to drop the new allocation and
> simply use the existing one if it is not an improvement.

So you're saying that if we modify our UEFI so that it always loads the 
kernel at dram_base + TEXT_OFFSET, then one day in the future the kernel 
will skip the relocation?

-- 
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.

  parent reply	other threads:[~2015-10-29 14:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28 17:37 [PATCH] [v2] arm64: efi: make sure vmlinux load address aligned on 2MB Timur Tabi
2015-10-28 18:08 ` Mark Rutland
2015-10-28 18:12   ` Timur Tabi
2015-10-28 18:12     ` Timur Tabi
     [not found]     ` <56311014.9020400-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-10-28 18:21       ` Mark Rutland
2015-10-28 18:21         ` Mark Rutland
2015-10-29  2:59         ` Ard Biesheuvel
2015-10-29  2:59           ` Ard Biesheuvel
     [not found]           ` <CAKv+Gu-76knWJ+ffAemeR7sBBtVB68pmZNPGQZRZKhmnd21F9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-29 13:43             ` Mark Rutland
2015-10-29 13:43               ` Mark Rutland
2015-10-29 13:48               ` Ard Biesheuvel
2015-10-29 13:48                 ` Ard Biesheuvel
     [not found]                 ` <CAKv+Gu8yFYv7GNvsOzUD1UQaXZ0AeXByahq3XjodrCtOGRGfgQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-29 14:54                   ` Timur Tabi [this message]
2015-10-29 14:54                     ` Timur Tabi
     [not found]                     ` <56323311.8050708-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-10-29 15:08                       ` Ard Biesheuvel
2015-10-29 15:08                         ` Ard Biesheuvel

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=56323311.8050708@codeaurora.org \
    --to=timur-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
    --cc=ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=jcm-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=mlangsdo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=msalter-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=shankerd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=will.deacon-5wv7dgnIgG8@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.