public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Baruch Siach <baruch@tkos.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm64: mvebu: fix crash in EFI memory allocation
Date: Thu, 29 Nov 2018 20:54:46 +0200	[thread overview]
Message-ID: <87h8fz7lzd.fsf@tkos.co.il> (raw)
In-Reply-To: <c98b5487-c844-7cde-4b25-e8370aaeacd6@wwwdotorg.org>

Hi Stephen,

Adding Heinrich Schuchardt.

Stephen Warren writes:
> On 11/22/18 8:19 AM, Baruch Siach wrote:
>> Adding Stephen Warren to Cc.
>>
>> On Thu, Nov 22, 2018 at 02:30:34PM +0000, Alexander Graf wrote:
>>>> Am 22.11.2018 um 11:42 schrieb Baruch Siach <baruch@tkos.co.il>:
>>>>
>>>> EFI memory allocation code return values that are not mapped by U-Boot
>>>> MMU. This causes a crash when tftp calls efi_set_bootdev(). Fix this
>>>> similarly to commit 0797f7f0b7e1 ("ARM: tegra: reserve unmapped RAM so
>>>> EFI doesn't use it").
>>>>
>>>> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
>>>
>>> Hm, how about we fox this up in the common memory registration function and
>>> add addresses > board_get_usable_ram_top() as boot time data?
>>
>> That would be much nicer indeed. Where should I look in lib/efi_loader/ to
>> implement that?
>>
>> With that in place we can revert commit 0797f7f0b7e1, right? Stephen, do you
>> concur?
>
> I believe so, yes. I'm not sure why it's acceptable to fix the EFI allocator
> to solve this now, when it wasn't acceptable before though.

I read the previous discussion[1] from July/August. If I understand the
conclusion correctly, efi_add_memory_map() provides information that is
vital to the correctness of the EFI memory map, and is platform
specific. Is that correct?

If so, then this patch (actually, its v2) is the correct solution for
Armada 8K. A possible improvement to the EFI memory allocation code
would be a warning instead of crash. Would that be acceptable?

Thanks,
baruch

[1] https://lists.denx.de/pipermail/u-boot/2018-July/336726.html

--
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

  reply	other threads:[~2018-11-29 18:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-22 11:42 [U-Boot] [PATCH] arm64: mvebu: fix crash in EFI memory allocation Baruch Siach
2018-11-22 14:30 ` Alexander Graf
2018-11-22 15:19   ` Baruch Siach
2018-11-26 16:51     ` Stephen Warren
2018-11-29 18:54       ` Baruch Siach [this message]
2018-11-29 22:41         ` Alexander Graf

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=87h8fz7lzd.fsf@tkos.co.il \
    --to=baruch@tkos.co.il \
    --cc=u-boot@lists.denx.de \
    /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