]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[rng] Restore state of IRQ 8 and PIE when disabling entropy gathering
authorMichael Brown <mcb30@ipxe.org>
Fri, 14 Mar 2025 14:11:48 +0000 (14:11 +0000)
committerMichael Brown <mcb30@ipxe.org>
Fri, 14 Mar 2025 15:08:05 +0000 (15:08 +0000)
commit829e2d1f299c7c0b15a5e9e07479f6e3aec121cf
tree95266c98243c75e040ad3dd669b06d700aa76865
parent8840de40962cabf84847919220a29f3c7d1be13e
[rng] Restore state of IRQ 8 and PIE when disabling entropy gathering

Legacy IRQ 8 appears to be enabled by default on some platforms.  If
iPXE selects the RTC entropy source, this will currently result in the
RTC IRQ 8 being unconditionally disabled.  This can break assumptions
made by BIOSes or subsequent bootloaders: in particular, the FreeBSD
loader may lock up at the point of starting its default 10-second
countdown when it calls INT 15,86.

Fix by restoring the previous state of IRQ 8 instead of disabling it
unconditionally.  Note that we do not need to disable IRQ 8 around the
point of hooking (or unhooking) the ISR, since this code will be
executing in iPXE's normal state of having interrupts disabled anyway.

Also restore the previous state of the RTC periodic interrupt enable,
rather than disabling it unconditionally.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/x86/interface/pcbios/rtc_entropy.c