From: 'Joerg Roedel'
Sent: 20 August 2021 09:52
On Fri, Aug 20, 2021 at 08:43:47AM +0000, David Laight wrote:
Hmmm... If Linux needs its own IDT then temporarily substituting the old IDT prior to a UEFI call will cause 'grief' if a 'Linux' interrupt happens during the UEFI call.
This is neede only during very early boot before Linux called ExitBootServices(). Nothing that causes IRQs is set up by Linux yet. Of course the Firmware could have set something up, but Linux runs with IRQs disabled when on its own IDT at that stage.
So allocate and initialise the Linux IDT - so entries can be added. But don't execute 'lidt' until later on.
David
- Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)