david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[pxe] Disable interrupts on the PIC before starting NBP

Some BIOSes (observed with an HP Gen9) seem to spuriously enable
interrupts at the PIC.  This causes problems with NBPs such as GRUB
which use the UNDI API (thereby enabling interrupts on the NIC)
without first hooking an interrupt service routine.  In this
situation, the interrupt will end up being handled by the default BIOS
ISR, which will typically just send an EOI and return.  Since nothing
in this handler causes the NIC to deassert the interrupt, this will
result in an interrupt storm.

Entertainingly, some BIOSes are immune to this problem because the
default ISR sends the EOI only to the slave PIC; this effectively
disables the interrupt.

Work around this problem by disabling the interrupt on the PIC before
invoking the PXE NBP.  An NBP that expects to make use of interrupts
will need to be configuring the PIC anyway, so it is probably safe to
assume that it will explicitly reenable the interrupt.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2016-07-03 12:52:20 +01:00
parent c22da4b8ba
commit 3bb61c33c2
1 changed files with 5 additions and 0 deletions

View File

@ -32,6 +32,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#include <pxe.h>
#include <pxe_call.h>
#include <pic8259.h>
#include <ipxe/uaccess.h>
#include <ipxe/image.h>
#include <ipxe/segment.h>
@ -87,6 +88,10 @@ static int pxe_exec ( struct image *image ) {
/* Reset console since PXE NBP will probably use it */
console_reset();
/* Disable IRQ, if applicable */
if ( netdev_irq_supported ( netdev ) && netdev->dev->desc.irq )
disable_irq ( netdev->dev->desc.irq );
/* Start PXE NBP */
rc = pxe_start_nbp();