[syslinux] lpxelinux.0 with device that doesn't support Interrupts

H. Peter Anvin hpa at zytor.com
Tue Mar 1 15:45:07 PST 2016


On 03/01/16 11:38, H. Peter Anvin via Syslinux wrote:
> On 02/26/16 15:10, Wissam Shoukair via Syslinux wrote:
>>
>> I am experiencing an issue where I ran ipxe (as an option rom) and
>> downloaded the lpxelinux.0 as the bootloader.
>> Next it should download the ldlinux.c32 file using UNDI API.
>>
>> but before that it will close and open  the underlying device (which
>> is ipxe), and hooking the device interrupt so it can start getting
>> some packets.
>>
>> What I'm experiencing is that if the underlying device doesn't
>> support interrupts, i.e. the IntNumber that is returned in
>> PXENV_UNDI_GET_INFORMATION is 0, then lpxelinux.0 will hook IRQ0
>> which is very bad behavior.
>>
>> one good example of the faulty code is in undinet.c where we open a
>> device, we hook the IRQ regardless if its 0 or not, while in the
>> latest iPXE code this behavior was corrected and a check expression
>> was added to avoid such bad behavior
>>
> 
> This will happen if the device reports that it supports interrupts via
> the device flags, but checking that IRQ != 0 seems like a good sanity check.
> 
> In other words, we're reacting badly to a firmware bug which is probably
> fairly common and is also easy to work around.
> 

I just looked at this:

There is no file called undinet.c in the Syslinux sources.  None.  The
main UNDI handing is in core/lwip/src/netif/undiif.c, but the IRQ
handing is in core/fs/pxe/isr.c:

    if (irq) {
        if (!install_irq_vector(irq, pxe_isr, &pxe_irq_chain))
            irq = 0;            /* Install failed or stuck interrupt */
    }

This call obviously doesn't happen if irq is zero.

	-hpa



More information about the Syslinux mailing list