efi_loader: efi_runtime_detach()?
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
Quoted 16 lines · AKASHI Takahiro
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 servicesIn the current implementation,
efi_runtime_detach()is
called fromefi_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 inexit_boot_services()as well.
Logically,efi_get_variable()won't work as U-Boot environment data can be potentially re-used at any time afterexit_boot_services(). The only meaningful change is to invalidateefi_set_virtual_address_map().
Quoted 8 lines
So I believe that we should distinguish the two purposes and make appropriate changes in
efi_set_virtual_address_map()and andexit_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
Quoted 4 lines
Thanks,
-Takahiro Akashi
Quoted 21 lines · Heinrich Schuchardt
Quoted 20 lines · AKASHI Takahiro
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 servicesIn the current implementation,
efi_runtime_detach()is
called fromefi_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 inexit_boot_services()as well.
Logically,efi_get_variable()won't work as U-Boot environment data can be potentially re-used at any time afterexit_boot_services(). The only meaningful change is to invalidateefi_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 andexit_boot_services()respectively.
Quoted 8 lines
Quoted 4 lines
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?
Quoted 2 lines
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
Quoted 9 lines
Best regards
Heinrich
Quoted 4 lines
Thanks,
-Takahiro Akashi
Quoted 22 lines · AKASHI Takahiro
Quoted 21 lines · Heinrich Schuchardt
Quoted 20 lines · AKASHI Takahiro
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 servicesIn the current implementation,
efi_runtime_detach()is
called fromefi_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 inexit_boot_services()as well.
Logically,efi_get_variable()won't work as U-Boot environment data can be potentially re-used at any time afterexit_boot_services(). The only meaningful change is to invalidateefi_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 andexit_boot_services()respectively.
Quoted 8 lines
Quoted 7 lines
Quoted 4 lines
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