All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] efi_loader: efi_runtime_detach()?
@ 2019-05-22  3:15 AKASHI Takahiro
  2019-05-24  5:27 ` Heinrich Schuchardt
  0 siblings, 1 reply; 4+ messages in thread
From: AKASHI Takahiro @ 2019-05-22  3:15 UTC (permalink / raw)
  To: u-boot

Alex,

It seems to me that the current efi_runtime_detach() has
two meanings:
* changes relating to the transition to virtual address mode
* changes relating to exiting boot services

In the current implementation, efi_runtime_detach() is
called from efi_set_virtual_address_map() as those two
purposes are apparently the same.
For instance, however, systab.con_in/out/std_err/boottime are set
to NULL in exit_boot_services() as well.
Logically, efi_get_variable() won't work as U-Boot environment data
can be potentially re-used at any time after exit_boot_services().
The only meaningful change is to invalidate efi_set_virtual_address_map().

So I believe that we should distinguish the two purposes
and make appropriate changes in efi_set_virtual_address_map() and
and exit_boot_services() respectively.

This will be crucial particularly when I will add
runtime variable support using "cache".

Any thoughts?

Thanks,
-Takahiro Akashi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] efi_loader: efi_runtime_detach()?
  2019-05-22  3:15 [U-Boot] efi_loader: efi_runtime_detach()? AKASHI Takahiro
@ 2019-05-24  5:27 ` Heinrich Schuchardt
  2019-05-24  7:17   ` AKASHI Takahiro
  0 siblings, 1 reply; 4+ messages in thread
From: Heinrich Schuchardt @ 2019-05-24  5:27 UTC (permalink / raw)
  To: u-boot

On 5/22/19 5:15 AM, AKASHI Takahiro wrote:
> Alex,
>
> It seems to me that the current efi_runtime_detach() has
> two meanings:
> * changes relating to the transition to virtual address mode
> * changes relating to exiting boot services
>
> In the current implementation, efi_runtime_detach() is
> called from efi_set_virtual_address_map() as those two
> purposes are apparently the same.
> For instance, however, systab.con_in/out/std_err/boottime are set
> to NULL in exit_boot_services() as well.
> Logically, efi_get_variable() won't work as U-Boot environment data
> can be potentially re-used at any time after exit_boot_services().
> The only meaningful change is to invalidate efi_set_virtual_address_map().
>
> So I believe that we should distinguish the two purposes
> and make appropriate changes in efi_set_virtual_address_map() and
> and exit_boot_services() respectively.
>
> This will be crucial particularly when I will add
> runtime variable support using "cache".
>
> Any thoughts?

Please, consider this pending patch from Alex:
https://patchwork.ozlabs.org/patch/1054074/
efi_loader: Patch non-runtime code out at ExitBootServices already

Unfortunately Travis CI is still failing with the patch and QEMU arm64
does not reboot.

Best regards

Heinrich

>
> Thanks,
> -Takahiro Akashi
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] efi_loader: efi_runtime_detach()?
  2019-05-24  5:27 ` Heinrich Schuchardt
@ 2019-05-24  7:17   ` AKASHI Takahiro
  2019-05-29 10:13     ` Alexander Graf
  0 siblings, 1 reply; 4+ messages in thread
From: AKASHI Takahiro @ 2019-05-24  7:17 UTC (permalink / raw)
  To: u-boot

On Fri, May 24, 2019 at 07:27:11AM +0200, Heinrich Schuchardt wrote:
> On 5/22/19 5:15 AM, AKASHI Takahiro wrote:
> > Alex,
> >
> > It seems to me that the current efi_runtime_detach() has
> > two meanings:
> > * changes relating to the transition to virtual address mode
> > * changes relating to exiting boot services
> >
> > In the current implementation, efi_runtime_detach() is
> > called from efi_set_virtual_address_map() as those two
> > purposes are apparently the same.
> > For instance, however, systab.con_in/out/std_err/boottime are set
> > to NULL in exit_boot_services() as well.
> > Logically, efi_get_variable() won't work as U-Boot environment data
> > can be potentially re-used at any time after exit_boot_services().
> > The only meaningful change is to invalidate efi_set_virtual_address_map().
> >
> > So I believe that we should distinguish the two purposes
> > and make appropriate changes in efi_set_virtual_address_map() and
> > and exit_boot_services() respectively.
> >
> > This will be crucial particularly when I will add
> > runtime variable support using "cache".
> >
> > Any thoughts?
> 
> Please, consider this pending patch from Alex:
> https://patchwork.ozlabs.org/patch/1054074/
> efi_loader: Patch non-runtime code out at ExitBootServices already

@Alex, what is the current status of this patch?

> Unfortunately Travis CI is still failing with the patch and QEMU arm64
> does not reboot.

What error did you see?
After what, did qemu arm64 fail to reboot?

-Takahiro Akashi

> Best regards
> 
> Heinrich
> 
> >
> > Thanks,
> > -Takahiro Akashi
> >
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] efi_loader: efi_runtime_detach()?
  2019-05-24  7:17   ` AKASHI Takahiro
@ 2019-05-29 10:13     ` Alexander Graf
  0 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2019-05-29 10:13 UTC (permalink / raw)
  To: u-boot


On 24.05.19 09:17, AKASHI Takahiro wrote:
> On Fri, May 24, 2019 at 07:27:11AM +0200, Heinrich Schuchardt wrote:
>> On 5/22/19 5:15 AM, AKASHI Takahiro wrote:
>>> Alex,
>>>
>>> It seems to me that the current efi_runtime_detach() has
>>> two meanings:
>>> * changes relating to the transition to virtual address mode
>>> * changes relating to exiting boot services
>>>
>>> In the current implementation, efi_runtime_detach() is
>>> called from efi_set_virtual_address_map() as those two
>>> purposes are apparently the same.
>>> For instance, however, systab.con_in/out/std_err/boottime are set
>>> to NULL in exit_boot_services() as well.
>>> Logically, efi_get_variable() won't work as U-Boot environment data
>>> can be potentially re-used at any time after exit_boot_services().
>>> The only meaningful change is to invalidate efi_set_virtual_address_map().
>>>
>>> So I believe that we should distinguish the two purposes
>>> and make appropriate changes in efi_set_virtual_address_map() and
>>> and exit_boot_services() respectively.
>>>
>>> This will be crucial particularly when I will add
>>> runtime variable support using "cache".
>>>
>>> Any thoughts?
>> Please, consider this pending patch from Alex:
>> https://patchwork.ozlabs.org/patch/1054074/
>> efi_loader: Patch non-runtime code out at ExitBootServices already
> @Alex, what is the current status of this patch?


I don't think I touched it ever since :). It's the right thing to do 
though. Care to debug why it breaks?


Alex

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-05-29 10:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-22  3:15 [U-Boot] efi_loader: efi_runtime_detach()? AKASHI Takahiro
2019-05-24  5:27 ` Heinrich Schuchardt
2019-05-24  7:17   ` AKASHI Takahiro
2019-05-29 10:13     ` Alexander Graf

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.