[ipxe-devel] [ipxe/ipxe] [efi] Don't use timers to gather entropy, if EFI_RNG_PROTOCOL is available (#101)

Ignat Korchagin notifications at github.com
Fri Dec 27 14:14:00 UTC 2019


When iPXE is compiled as an option ROM (I tried the e1000 driver), it causes a
complete boot stall on the latest release of OVMF for EDK2 [1], run on the
latest QEMU 4.2.0. Further debugging traced it down to commit d8c500b ("[efi]
Drop to TPL_APPLICATION when gathering entropy"). Specifically, somehow the
whole boot process stalls, when trying to RaiseTPL() back to TPL_CALLBACK in
efi_entropy_disable().

I'm also not actually sure the code in efi_entropy_enable() /
efi_entropy_disable() actually runs at TPL_CALLBACK (at least for the first
time) as I dumped the current TPL, when the first efi_entropy_enable() call was
made and it showed iPXE was running at TPL_APPLICATION level.

While the whole idea of constantly running at elevated task priority level is
rather questionable for me, proposing to fix at least the entropy gathering by
not messing with timers and priority levels at all, if we have EFI_RNG_PROTOCOL
provided.

[1] https://github.com/tianocore/edk2

Signed-off-by: Ignat Korchagin <ignat at cloudflare.com>
You can view, comment on, or merge this pull request online at:

  https://github.com/ipxe/ipxe/pull/101

-- Commit Summary --

  * [efi] Don't use timers to gather entropy, if EFI_RNG_PROTOCOL is available

-- File Changes --

    M src/interface/efi/efi_entropy.c (42)

-- Patch Links --

https://github.com/ipxe/ipxe/pull/101.patch
https://github.com/ipxe/ipxe/pull/101.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/ipxe/ipxe/pull/101
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20191227/5ba64bc9/attachment.htm>


More information about the ipxe-devel mailing list