]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[rng] Check for several functioning RTC interrupts
authorMichael Brown <mcb30@ipxe.org>
Sat, 11 Feb 2023 15:07:00 +0000 (15:07 +0000)
committerMichael Brown <mcb30@ipxe.org>
Sat, 11 Feb 2023 15:11:51 +0000 (15:11 +0000)
commit3c83843e111ece30d3dfb5143d5e6aed6164d587
tree157d81c6cb2df8f6d086b9189a40837f79de7565
parentbe8ecaf8059a34f27ed34bbc2e95806537802108
[rng] Check for several functioning RTC interrupts

Commit 74222cd ("[rng] Check for functioning RTC interrupt") added a
check that the RTC is capable of generating interrupts via the legacy
PIC, since this mechanism appears to be broken in some Hyper-V virtual
machines.

Experimentation shows that the RTC is sometimes capable of generating
a single interrupt, but will then generate no subsequent interrupts.
This currently causes rtc_entropy_check() to falsely detect that the
entropy gathering mechanism is functional.

Fix by checking for several RTC interrupts before declaring that it is
a functional entropy source.

Reported-by: Andreas Hammarskjöld <junior@2PintSoftware.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/x86/interface/pcbios/rtc_entropy.c