From: Marek Vasut <marex@denx.de>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Simon Glass <sjg@chromium.org>, Tom Rini <trini@konsulko.com>,
u-boot@lists.denx.de
Subject: Re: [PATCH] efi_loader: Handle GD_FLG_SKIP_RELOC
Date: Mon, 25 Oct 2021 20:52:16 +0200 [thread overview]
Message-ID: <afd5d863-ecd7-e232-1802-2c7759517854@denx.de> (raw)
In-Reply-To: <835fa80d-1cca-3d86-38d2-7083ab0119cd@gmx.de>
On 10/25/21 8:46 PM, Heinrich Schuchardt wrote:
>
>
> On 10/24/21 01:03, Marek Vasut wrote:
>> On 10/11/21 1:36 PM, Heinrich Schuchardt wrote:
>> Hi,
>>
>>>> In case U-Boot starts with GD_FLG_SKIP_RELOC, the efi loader
>>>> relocation code breaks down because it assumes gd->relocaddr
>>>> points to relocated U-Boot code, which is not the case. Add
>>>> special case for handling GD_FLG_SKIP_RELOC, which uses the
>>>> __image_copy_start instead of gd->relocaddr for efi loader
>>>> code relocation source address.
>>>
>>> GD_FLG_SKIP_RELOC is only to be used by the x86 EFI app which is
>>> incompatible with CONFIG_EFI_LOADER=y.
>>> lib/efi/efi_app.c:131: board_init_f(GD_FLG_SKIP_RELOC);
>>>
>>> Why do we need this patch?
>>
>> GD_FLG_SKIP_RELOC is set when U-Boot doesn't perform relocation, it has
>> nothing to do with EFI. That case is currently broken, try setting
>> GD_FLG_SKIP_RELOC early on in U-Boot (somewhere early, e.g. in
>> mach_cpu_init()) and the system crashes on board_init_r when
>> initializing EFI.
>
> You missed the second question:
>
> Why should the change be ARM specific?
It shouldn't, do you have a more generic idea ?
prev parent reply other threads:[~2021-10-25 18:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-10 21:48 [PATCH] efi_loader: Handle GD_FLG_SKIP_RELOC marek.vasut
2021-10-11 11:36 ` Heinrich Schuchardt
2021-10-23 23:03 ` Marek Vasut
2021-10-25 18:46 ` Heinrich Schuchardt
2021-10-25 18:52 ` Marek Vasut [this message]
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=afd5d863-ecd7-e232-1802-2c7759517854@denx.de \
--to=marex@denx.de \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.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